1.0.101 • Published 8 months ago

unexpected-cli-sandbox v1.0.101

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

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 login

logout

Log out of the system:

unexpected-cli-sandbox logout

build

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 build

Options:

  • --path, -p: Path to the folder containing the function to deploy. If not specified, the default folder functions is 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 deploy

Options:

  • --path, -p: Path to the folder containing the function to deploy. If not specified, the default folder functions is used.

deploy-live-query

Deploy the live query to the specified environment.

unexpected-cli-sandbox deploy-live-query

set-trigger

Set the trigger for a specified table.

unexpected-cli-sandbox set-trigger --table table_name

Options:

  • --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_name

Options:

  • --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-query

hello

Receive greetings from the CLI!

unexpected-cli-sandbox hello

tail

Tail the logs of the deployed project in real-time.

unexpected-cli-sandbox tail

delete

Delete a worker in the project.

unexpected-cli-sandbox delete

Help

To get a list of all available commands and their descriptions:

unexpected-cli-sandbox --help

If no path is specified for commands that require a path, the default folder functions will be used.

1.0.101

8 months ago

1.0.100

10 months ago

1.0.99

10 months ago

1.0.98

10 months ago

1.0.97

10 months ago

1.0.96

10 months ago

1.0.95

10 months ago

1.0.94

10 months ago

1.0.93

11 months ago

1.0.92

11 months ago

1.0.91

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago