Assets
Upload a folder of resources as an asset with spica asset apply, preview it with --dry-run, and remove it with spica asset delete.
spica asset uploads a folder of resources as an asset to the current context's instance.
Folder layout
Text
newsletter/
├── asset.yaml
├── bucket/<id>/schema.yaml
├── function/<id>/schema.yaml
├── function/<id>/index.ts # or index.js
├── function/<id>/package.json
├── function/<id>/env.env
├── dashboard/<id>/schema.yaml
├── preference/<id>/schema.yaml
└── apikey/<id>/schema.yamlResource folders are named by id (an ObjectId or a UUID). asset.yaml holds the asset's metadata:
asset.yaml
name: Newsletter
description: Subscribers bucket and a double opt-in function
icon: mail
configs: []Commands
Terminal
spica asset apply --path ./newsletter --dry-run
spica asset apply --path ./newsletter
spica asset delete --path ./newsletter --type soft| Command | Options |
|---|---|
spica asset apply | --path (default: current directory), --dry-run to only list what would be uploaded. |
spica asset delete | --path, --type soft or hard (required). |