@jigx/sdk-tools 1.2.0-next.1 → 1.2.0-next.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 +16 -51
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,69 +1,34 @@
|
|
|
1
1
|
# @jigx/sdk-tools
|
|
2
2
|
|
|
3
|
-
CLI for solution
|
|
3
|
+
`jigx` CLI for solution designers to scaffold, build, and deploy Jigx Applications (backed by `@jigx/core-sdk` builders).
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Node.js >=22. `jigx create` runs `npm install` in the new project; swap to yarn/pnpm afterwards if preferred.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Onboarding
|
|
9
|
+
## Quick start
|
|
12
10
|
|
|
13
11
|
```bash
|
|
14
|
-
npm i -g @jigx/sdk-tools@next #
|
|
15
|
-
jigx create #
|
|
12
|
+
npm i -g @jigx/sdk-tools@next # once per machine
|
|
13
|
+
jigx create # scaffolds <cwd>/<applicationName>
|
|
16
14
|
cd <applicationName>
|
|
17
|
-
jigx deploy #
|
|
15
|
+
jigx deploy # first run: login + init inline, then deploy to prod
|
|
18
16
|
```
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
1. Detects no cached **RefreshToken** and runs `jigx login` inline (Cognito email + password). Stores the refresh token at `~/.jigx/refresh-tokens.json`.
|
|
23
|
-
2. Detects no **OrganizationBinding** in `<projectRoot>/jigx.json` and runs `jigx init` inline (Organization picker). Writes the binding to `jigx.json`.
|
|
24
|
-
3. Builds, then deploys content to the prod environment.
|
|
25
|
-
|
|
26
|
-
Subsequent deploys reuse both artifacts and skip straight to build + deploy. Pass `--env dev` to target staging, `--env clf-dev` for the Cloudflare dev stamp, or `--env clf-prod` for the Cloudflare prod stamp.
|
|
27
|
-
|
|
28
|
-
## Commands
|
|
29
|
-
|
|
30
|
-
| Command | What it does |
|
|
31
|
-
| --- | --- |
|
|
32
|
-
| `jigx create` | Prompts for Title → Name → Type, scaffolds a new Application project, runs `npm install`. |
|
|
33
|
-
| `jigx build` | Compiles `src/app.ts` into `build/output.json` plus the canonical Builder folder layout under `build/app/` for inspection. |
|
|
34
|
-
| `jigx login` | Signs in to Cognito (interactive email + password) and caches a refresh token in `~/.jigx/refresh-tokens.json`. |
|
|
35
|
-
| `jigx init` | Picks an Organization for the current environment and writes the binding to `<projectRoot>/jigx.json`. |
|
|
36
|
-
| `jigx deploy` | Builds, then deploys content. Defaults to prod. Pass `--env dev` for staging, `--env clf-dev` for the Cloudflare dev stamp, or `--env clf-prod` for the Cloudflare prod stamp. Auto-runs `jigx login` and `jigx init` if needed (TTY only). |
|
|
37
|
-
| `jigx whoami` | Prints the live User identity and the project's Organization binding for the chosen environment. |
|
|
38
|
-
| `jigx logout` | Clears cached refresh tokens for one env or all envs. |
|
|
39
|
-
|
|
40
|
-
## Auth model
|
|
41
|
-
|
|
42
|
-
Three commands compose the auth flow:
|
|
18
|
+
Commands: `create`, `build`, `login`, `init`, `deploy`, `whoami`, `logout`. Run `jigx --help` for options.
|
|
43
19
|
|
|
44
|
-
|
|
45
|
-
2. **`jigx init`** — picks an Organization from the User's memberships and writes `<projectRoot>/jigx.json` (`{ "<env>": { "organizationId": "..." } }`). `jigx.json` is a per-project, per-environment binding and is intentionally committable — multiple developers on the same project share the same Organization mapping.
|
|
46
|
-
3. **`jigx deploy`** — refreshes a Cognito ID token from the cached refresh token, looks up the Organization in `jigx.json`, and `Bearer`s the ID token at the Strata API.
|
|
20
|
+
`--env dev` (staging), `--env clf-dev`, `--env clf-prod` target other environments; default is prod. `jigx init --org <id>` skips the Organization picker.
|
|
47
21
|
|
|
48
|
-
|
|
22
|
+
## Auth
|
|
49
23
|
|
|
50
|
-
|
|
24
|
+
- `jigx login`: Cognito email + password; refresh token cached at `~/.jigx/refresh-tokens.json` (keyed per env).
|
|
25
|
+
- `jigx init`: writes the Organization binding to `<projectRoot>/jigx.json` (per env, safe to commit).
|
|
26
|
+
- `jigx deploy` runs login/init inline when missing (TTY only). Non-TTY (CI) fails with the command to run.
|
|
51
27
|
|
|
52
|
-
|
|
53
|
-
- **No SSO.** Users whose Jigx accounts are managed by an external IdP cannot use `jigx login` today.
|
|
54
|
-
|
|
55
|
-
See [ADR-0002](../../docs/adr/0002-sdk-tools-cognito-only-auth.md) for the rationale.
|
|
28
|
+
Limitations: no CI/non-interactive auth (pre-populate `~/.jigx/refresh-tokens.json` from an interactive login), no SSO. Rationale: [ADR-0002](../../docs/adr/0002-sdk-tools-cognito-only-auth.md).
|
|
56
29
|
|
|
57
30
|
## Troubleshooting
|
|
58
31
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### `Not authenticated. Run jigx login.`
|
|
64
|
-
|
|
65
|
-
`~/.jigx/refresh-tokens.json` is missing or the cached refresh token has expired/been revoked. Run `jigx login` (add `--env dev` for staging or `--env clf-dev` for the Cloudflare dev stamp) and retry.
|
|
66
|
-
|
|
67
|
-
### `No Organization configured for env "<env>".`
|
|
68
|
-
|
|
69
|
-
`<projectRoot>/jigx.json` has no binding for the requested environment. Run `jigx init` (add `--env dev` for staging or `--env clf-dev` for the Cloudflare dev stamp, optionally `--org <id>` to skip the picker).
|
|
32
|
+
- `jigx: command not found`: install globally (above).
|
|
33
|
+
- `Not authenticated. Run jigx login.`: refresh token missing/expired/revoked; run `jigx login` (with the same `--env`).
|
|
34
|
+
- `No Organization configured for env "<env>".`: run `jigx init` (with the same `--env`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jigx/sdk-tools",
|
|
3
|
-
"version": "1.2.0-next.
|
|
3
|
+
"version": "1.2.0-next.3",
|
|
4
4
|
"description": "Jigx SDK toolkit (jigx CLI) — scaffold, build, and publish Jigx Application projects",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"oxfmt": "*",
|
|
69
69
|
"oxlint": "*",
|
|
70
70
|
"typescript": "^7.0.2",
|
|
71
|
-
"vitest": "^4.1.
|
|
71
|
+
"vitest": "^4.1.11"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public",
|