unexpected-cli v0.0.4
unexpected-cli-sandbox
Configuration
Create a file unexpected.json with the following structure:
{
"workerId": "fb0eb483-c7ac-4795-a13a-af76c62db462",
"name": "53e535f4-a",
"projectId": "6e94a318-fc68-4e91-a5b0-f92d20640442",
"buildDirectory": ".build",
"env": {
"foo": "bar",
"number": 300
}
}Note: This configuration file is optional. If the configuration file does not exist, it will be created automatically.
workerId: Required. Unique identifier for the worker.name: Optional. Name for the worker, limited to 10 characters.buildDirectory: Optional. Default is.build.env: Optional. Environment variables, either strings or numbers. If you want to bind environment variables during deployment, add them to the config.
Commands
login
Log into the system:
unexpected-cli-sandbox loginlogout
Log out of the system:
unexpected-cli-sandbox logoutbuild
Build the project based on the current configuration. If a path to a folder containing the function is specified, it will build from that folder. If no path is specified, it will build from the default folder functions.
# Build with a specified path to the function folder
unexpected-cli-sandbox build --path /path/to/your/function
# Build from the default folder
unexpected-cli-sandbox buildOptions:
--path,-p: Path to the folder containing the function to deploy. If not specified, the default folderfunctionsis used.
deploy
Deploy the built project to the specified environment. If a path to a folder containing the function is specified, it will deploy from that folder. If no path is specified, it will deploy from the default folder functions.
# Deploy with a specified path to the function folder
unexpected-cli-sandbox deploy --path /path/to/your/function
# Deploy from the default folder
unexpected-cli-sandbox deployOptions:
--path,-p: Path to the folder containing the function to deploy. If not specified, the default folderfunctionsis used.
deploy-live-query
Deploy the live query to the specified environment.
unexpected-cli-sandbox deploy-live-queryset-trigger
Set the trigger for a specified table.
unexpected-cli-sandbox set-trigger --table table_nameOptions:
--table,-t: Name of the table to deploy the live query to. This option is required.
delete-trigger
Delete the trigger for a specified table.
unexpected-cli-sandbox delete-trigger --table table_nameOptions:
--table,-t: Name of the table to delete the trigger from. This option is required.
delete-live-query
Delete the deployed live query.
unexpected-cli-sandbox delete-live-queryhello
Receive greetings from the CLI!
unexpected-cli-sandbox hellotail
Tail the logs of the deployed project in real-time.
unexpected-cli-sandbox taildelete
Delete a worker in the project.
unexpected-cli-sandbox deleteHelp
To get a list of all available commands and their descriptions:
unexpected-cli-sandbox --helpIf no path is specified for commands that require a path, the default folder functions will be used.