affect-cli 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -12
- package/dist/index.js +2034 -305
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,25 +10,23 @@ bunx --no-install affect --help
|
|
|
10
10
|
Run commands from the application repository root:
|
|
11
11
|
|
|
12
12
|
- `affect env` prints shell exports from `env/{development,preview,production,ci}/.env`. It requires the matching `DOTENV_PRIVATE_KEY` when that file exists. Treat its output as secrets.
|
|
13
|
+
- `affect run -- <command> [args...]` loads that environment and runs a command. Existing environment values take precedence; arguments, standard I/O, and exit codes are preserved.
|
|
13
14
|
- `affect dotenvx -- …` forwards arguments to the bundled native dotenvx CLI, for example `affect dotenvx -- encrypt -f env/development/.env --no-armor --no-native`.
|
|
14
15
|
- `affect setup` initializes an anonymous local Convex backend only for a fresh project, or retries its environment import. It preserves existing linked deployments and credentials.
|
|
15
|
-
- `affect deploy` uses Convex's native deploy/build sequence, imports the selected backend environment, and builds the frontend.
|
|
16
|
+
- `affect deploy` uses Convex's native deploy/build sequence, imports the selected backend environment, and builds the frontend. Vercel supplies `VERCEL_ENV=preview|production` and the preview branch name automatically; put the matching deploy key in the encrypted file. `--build` is its internal Convex callback.
|
|
16
17
|
|
|
17
18
|
Selection uses `VERCEL_ENV`, then `ci` for GitHub Actions/CI, otherwise `development`. Files stay in the application; cryptography stays in dotenvx. Deployment follows Affect's `apps/web` layout.
|
|
18
19
|
|
|
19
|
-
For
|
|
20
|
+
For example, an application's package scripts can load their environment automatically:
|
|
20
21
|
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
run = "bun install --frozen-lockfile && bunx --no-install affect setup"
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "affect run -- convex dev --start \"bun run dev:web\""
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
The Bash bridge only exports the CLI's output into the parent shell. It does not change backend state.
|
|
31
|
-
|
|
32
30
|
## Development and releases
|
|
33
31
|
|
|
34
32
|
```sh
|
|
@@ -39,4 +37,4 @@ bun run changeset version
|
|
|
39
37
|
bun run release
|
|
40
38
|
```
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
For automated releases, commit a changeset with each releasable change. The release workflow opens a version PR; merging it publishes to npm. Configure npm's GitHub trusted publisher for `ludicroushq/affect-cli`, workflow `release.yml`, with direct publishing enabled. No npm token is needed. `bun run release` remains available for an intentional manual release.
|