@allstak/wizard 0.1.3 → 0.1.4
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/CHANGELOG.md +14 -1
- package/README.md +296 -47
- package/dist/api/types.d.ts +3 -3
- package/dist/api/types.js +3 -3
- package/dist/util/wizard-version.d.ts +1 -1
- package/dist/util/wizard-version.js +1 -1
- package/docs/architecture/v02-java-host-fix-spec.md +4 -8
- package/docs/beta/README.md +17 -0
- package/docs/beta/ci.md +122 -0
- package/docs/beta/config.md +124 -0
- package/docs/beta/doctor.md +79 -0
- package/docs/beta/known-limitations.md +93 -0
- package/docs/beta/next.md +77 -0
- package/docs/beta/node.md +60 -0
- package/docs/beta/privacy.md +99 -0
- package/docs/beta/quickstart.md +89 -0
- package/docs/beta/react.md +83 -0
- package/docs/beta/restore.md +84 -0
- package/docs/beta/troubleshooting.md +133 -0
- package/docs/errors.md +88 -0
- package/package.json +14 -4
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# React (Vite or CRA)
|
|
2
|
+
|
|
3
|
+
**Stability:** `stable`. Validated end-to-end against fixture and dogfooded
|
|
4
|
+
against AllStak `admin-web` and `web` packages.
|
|
5
|
+
|
|
6
|
+
## What you get
|
|
7
|
+
|
|
8
|
+
- `@allstak/react` SDK installed via your package manager.
|
|
9
|
+
- `.env.local` (Vite) or `.env` (CRA) populated with `ALLSTAK_API_KEY`,
|
|
10
|
+
`ALLSTAK_HOST`, `ALLSTAK_ENVIRONMENT`, and (if configured) `ALLSTAK_RELEASE`.
|
|
11
|
+
- `AllStakProvider` import added to your entry file via AST mutation.
|
|
12
|
+
- Managed-block hint guiding you to wrap `<App />` in the provider.
|
|
13
|
+
- For Vite projects: `@allstak/js/vite` plugin import added to `vite.config.*`.
|
|
14
|
+
|
|
15
|
+
## Run
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Auto-detect:
|
|
19
|
+
npx @allstak/wizard@beta
|
|
20
|
+
|
|
21
|
+
# Explicit:
|
|
22
|
+
npx @allstak/wizard@beta -i react
|
|
23
|
+
|
|
24
|
+
# Non-interactive (CI):
|
|
25
|
+
npx @allstak/wizard@beta -i react -y --api-key $ALLSTAK_API_KEY \
|
|
26
|
+
--org $ORG --project $PROJECT --release $GIT_SHA
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Compatibility
|
|
30
|
+
|
|
31
|
+
- `react >= 16.8`. Older React versions are refused with `E_UNSUPPORTED_VERSION`.
|
|
32
|
+
- Works with Vite 4+ and Create React App. Webpack-only setups get a
|
|
33
|
+
managed-block hint instead of AST mutation (Webpack configs vary too much
|
|
34
|
+
for safe AST patching in v0.1).
|
|
35
|
+
|
|
36
|
+
## Wiring the provider
|
|
37
|
+
|
|
38
|
+
The wizard injects the import but **does not** rewrite your `ReactDOM.createRoot`
|
|
39
|
+
call — too risky across CRA / Vite / RN-Web variants. Wrap your app
|
|
40
|
+
manually:
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { AllStakProvider } from '@allstak/react';
|
|
44
|
+
|
|
45
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
46
|
+
<AllStakProvider
|
|
47
|
+
apiKey={import.meta.env?.VITE_ALLSTAK_API_KEY ?? process.env.ALLSTAK_API_KEY}
|
|
48
|
+
environment="production"
|
|
49
|
+
release={import.meta.env?.VITE_GIT_SHA}
|
|
50
|
+
>
|
|
51
|
+
<App />
|
|
52
|
+
</AllStakProvider>,
|
|
53
|
+
);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Verify
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx @allstak/wizard@beta doctor -i react
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
For an end-to-end ingestion check:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx @allstak/wizard@beta doctor -i react --live-probe \
|
|
66
|
+
--api-key ask_live_... \
|
|
67
|
+
--project-id <project-uuid>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Idempotent
|
|
71
|
+
|
|
72
|
+
Re-running `init` produces byte-identical output. The wizard wraps every
|
|
73
|
+
patch in `// >>> allstak-wizard:v1` markers so subsequent runs replace the
|
|
74
|
+
managed block instead of duplicating it.
|
|
75
|
+
|
|
76
|
+
## Uninstall
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx @allstak/wizard@beta uninstall -i react
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Removes the `@allstak/react` and `@allstak/js` deps, strips the AST import,
|
|
83
|
+
deletes the managed env block, and unwires the Vite plugin.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# `allstak restore`
|
|
2
|
+
|
|
3
|
+
Every wizard mutation is captured in a persistent snapshot under
|
|
4
|
+
`.allstak-wizard/backups/<timestamp>--<integration>--<random>/`. The
|
|
5
|
+
`restore` family lets you inspect and roll back those snapshots.
|
|
6
|
+
|
|
7
|
+
## Subcommands
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @allstak/wizard@beta restore list
|
|
11
|
+
npx @allstak/wizard@beta restore show <id|latest>
|
|
12
|
+
npx @allstak/wizard@beta restore diff <id|latest>
|
|
13
|
+
npx @allstak/wizard@beta restore apply <id|latest> [--files=a,b,c] [--dry-run]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`<id>` is the trailing slug of a backup directory. `latest` always
|
|
17
|
+
resolves to the most recent snapshot.
|
|
18
|
+
|
|
19
|
+
## What's in a snapshot
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
.allstak-wizard/backups/2026-05-07T..--react--abc123/
|
|
23
|
+
manifest.json schemaVersion, integration, files[], dryRun, label
|
|
24
|
+
files/
|
|
25
|
+
src/main.tsx pre-image bytes (UTF-8)
|
|
26
|
+
.env.local pre-image bytes
|
|
27
|
+
.env.local.allstak-deleted marker (file did not exist before)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Manifests and pre-images are plain text — they're safe to inspect with `cat`.
|
|
31
|
+
|
|
32
|
+
## Common workflows
|
|
33
|
+
|
|
34
|
+
### "I made a mess, give me my files back"
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx @allstak/wizard@beta restore apply latest
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Confirms before writing. Pass `-y` to skip confirmation.
|
|
41
|
+
|
|
42
|
+
### "What did the wizard change vs my current state?"
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx @allstak/wizard@beta restore diff latest
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Each file shows one of: `identical`, `modified`, `created-since`, or
|
|
49
|
+
`deleted-since`.
|
|
50
|
+
|
|
51
|
+
### "Restore one file from a specific run"
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx @allstak/wizard@beta restore apply 2026-05-07T..--react--abc123 \
|
|
55
|
+
--files=src/main.tsx,.env.local
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### "What WOULD restore do?"
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx @allstak/wizard@beta restore apply latest --dry-run
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Retention
|
|
65
|
+
|
|
66
|
+
`init` prunes old snapshots after a successful run. The default keeps the
|
|
67
|
+
10 most recent — override with `--snapshot-keep <n>` (0 disables pruning).
|
|
68
|
+
`repair` and `uninstall` also write snapshots but do NOT prune.
|
|
69
|
+
|
|
70
|
+
## Transactional
|
|
71
|
+
|
|
72
|
+
Restoring is itself a transaction — partial failure rolls back to the
|
|
73
|
+
pre-restore state. If a file in the snapshot is missing on disk, the
|
|
74
|
+
restore reports `skipped` for that file and continues.
|
|
75
|
+
|
|
76
|
+
## Limitations
|
|
77
|
+
|
|
78
|
+
- Restoring across wizard major versions is supported but a `manifest.json`
|
|
79
|
+
with a `schemaVersion` higher than the running wizard's is refused.
|
|
80
|
+
- Snapshots live in your repo by default. Add
|
|
81
|
+
`.allstak-wizard/` to `.gitignore` to keep them out of git (the wizard
|
|
82
|
+
does not auto-edit your `.gitignore`).
|
|
83
|
+
- Snapshots are NOT encrypted. Don't store them in a public artifact bucket
|
|
84
|
+
— they contain the original contents of files the wizard touched.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Common failure modes mapped to canonical error codes (see [errors.md](../errors.md)).
|
|
4
|
+
|
|
5
|
+
## "I just ran `allstak login` and got `E_AUTH_FAILED`"
|
|
6
|
+
|
|
7
|
+
- The OTP code expires after ~10 minutes. Run `login` again to request a new one.
|
|
8
|
+
- Codes are 4–8 digits. If you typed an extra space, the wizard rejects with
|
|
9
|
+
the same code.
|
|
10
|
+
- If you see `OTP_RATE_LIMITED` in the subcode, wait a minute and retry.
|
|
11
|
+
|
|
12
|
+
## "`E_AUTH_REQUIRED` from `orgs list` but I am logged in"
|
|
13
|
+
|
|
14
|
+
You were logged in to a different host. The wizard scopes credentials by
|
|
15
|
+
host. Check `allstak whoami --verify` and rerun with the matching `--host`,
|
|
16
|
+
or re-run `login --host <url>`.
|
|
17
|
+
|
|
18
|
+
## "`E_AUTH_EXPIRED` after a long break"
|
|
19
|
+
|
|
20
|
+
The refresh token was probably revoked (server-side logout, password reset,
|
|
21
|
+
or it just expired). Run `allstak logout && allstak login`.
|
|
22
|
+
|
|
23
|
+
## "`E_NETWORK_FAILED` everywhere"
|
|
24
|
+
|
|
25
|
+
- Verify the configured host with `allstak whoami` (it prints the host).
|
|
26
|
+
- Pass `--debug` and re-run; the underlying message includes the URL.
|
|
27
|
+
- For self-hosted: confirm DNS + TLS are working from the wizard's host.
|
|
28
|
+
|
|
29
|
+
## "`E_UNSUPPORTED_FRAMEWORK` even though I'm using React"
|
|
30
|
+
|
|
31
|
+
- `package.json` may not declare `react` directly. The wizard reads
|
|
32
|
+
`dependencies` + `devDependencies`.
|
|
33
|
+
- For monorepos, run the wizard from the **package directory**, not the
|
|
34
|
+
root.
|
|
35
|
+
- Pass `-i react` explicitly if detection is ambiguous.
|
|
36
|
+
|
|
37
|
+
## "`E_UNSUPPORTED_VERSION` but my React/Next is current"
|
|
38
|
+
|
|
39
|
+
The compat engine reads the version range from `package.json`. If you have
|
|
40
|
+
`"react": "*"` it cannot infer a minimum and reports too-old. Pin a real
|
|
41
|
+
version range in `package.json`.
|
|
42
|
+
|
|
43
|
+
## "`E_PACKAGE_MANAGER_CONFLICT`"
|
|
44
|
+
|
|
45
|
+
Two lockfiles in the project root (e.g. both `pnpm-lock.yaml` and
|
|
46
|
+
`package-lock.json`). The wizard refuses to guess. Delete the stale one.
|
|
47
|
+
|
|
48
|
+
## "`E_PATCH_FAILED` mid-run"
|
|
49
|
+
|
|
50
|
+
The transaction layer ALREADY rolled back your files. Re-run with
|
|
51
|
+
`--debug` to see which patcher threw. Common causes:
|
|
52
|
+
|
|
53
|
+
- A pre-existing syntax error in the file we tried to patch — fix the
|
|
54
|
+
syntax first, re-run the wizard.
|
|
55
|
+
- File permissions denied on the entry file or `.env.local`.
|
|
56
|
+
|
|
57
|
+
If rollback itself failed (`E_PATCH_ROLLBACK_FAILED`):
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
allstak restore list
|
|
61
|
+
allstak restore apply <id>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## "`E_RESTORE_FAILED: No snapshot matches "<id>""
|
|
65
|
+
|
|
66
|
+
`allstak restore list` shows what's available. Use the trailing slug
|
|
67
|
+
(e.g. `2026-05-07T..--react--abc123`) or just `latest`.
|
|
68
|
+
|
|
69
|
+
## "`E_INGEST_VERIFY_FAILED` on `--live-probe`"
|
|
70
|
+
|
|
71
|
+
- The probe uses `--api-key` (project-scoped). If the key was issued for
|
|
72
|
+
a different project than `--project-id`, verification will never see the
|
|
73
|
+
event. Check both match.
|
|
74
|
+
- The probe waits 60s by default. Increase via
|
|
75
|
+
`--live-probe-timeout 120000` if your backend is slow.
|
|
76
|
+
- Open the dashboard URL printed in the probe output and look for the
|
|
77
|
+
fingerprint manually. The event id is in the JSON output even when
|
|
78
|
+
polling times out.
|
|
79
|
+
|
|
80
|
+
## "`E_CONFIG_INVALID` after editing `allstak.config.ts`"
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
allstak config validate
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
prints the exact path-to-blame (e.g. `selfHosted.apiHost — expected
|
|
87
|
+
absolute URL, got "api.acme"`). Fix and rerun.
|
|
88
|
+
|
|
89
|
+
## "`E_CONFIG_MIGRATION_FAILED`"
|
|
90
|
+
|
|
91
|
+
The migration runner refuses on:
|
|
92
|
+
|
|
93
|
+
- A `schemaVersion` higher than the wizard supports (subcode
|
|
94
|
+
`E_CONFIG_FUTURE_VERSION`) — upgrade `@allstak/wizard`.
|
|
95
|
+
- A migration that didn't bump the version correctly (subcode
|
|
96
|
+
`E_MIGRATION_NO_BUMP`) — file an issue, this is a wizard bug.
|
|
97
|
+
|
|
98
|
+
## "`E_USER_CANCELLED` in CI"
|
|
99
|
+
|
|
100
|
+
You forgot `-y`. The wizard refuses to apply changes without it in
|
|
101
|
+
non-interactive mode.
|
|
102
|
+
|
|
103
|
+
## "Wizard hung at the login OTP prompt in CI"
|
|
104
|
+
|
|
105
|
+
CI has no TTY, so `@clack/prompts` rejects. Pass `--email` AND `--code` (or
|
|
106
|
+
use a long-lived API key with `--api-key` instead of logging in).
|
|
107
|
+
|
|
108
|
+
## "Telemetry warning showed up in my CI logs"
|
|
109
|
+
|
|
110
|
+
Telemetry is on by default. To silence:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
ALLSTAK_WIZARD_TELEMETRY=0
|
|
114
|
+
# or
|
|
115
|
+
allstak --no-telemetry ...
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## "I see `// >>> allstak-wizard:v1` in my git diff"
|
|
119
|
+
|
|
120
|
+
That's the wizard's idempotency marker. It's intentional — re-runs replace
|
|
121
|
+
the block in place; `uninstall` removes it. Commit it; do not hand-edit
|
|
122
|
+
inside the markers (your edits will be overwritten on the next run).
|
|
123
|
+
|
|
124
|
+
## Last resort: nuke everything
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
allstak uninstall -i react -y # remove SDK + patches
|
|
128
|
+
allstak logout # clear credentials
|
|
129
|
+
rm -rf .allstak-wizard/ # drop persistent snapshots
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The local credential store on macOS may keep the keychain entry until you
|
|
133
|
+
explicitly clear it: `security delete-generic-password -s allstak-wizard`.
|
package/docs/errors.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# `@allstak/wizard` error catalog
|
|
2
|
+
|
|
3
|
+
Every error thrown out of the wizard CLI carries a canonical `code` from this
|
|
4
|
+
catalog. The code is stable across releases (we add new codes; we never
|
|
5
|
+
rename or remove existing ones without a major-version bump). The `subcode`
|
|
6
|
+
field exists for finer-grained internal granularity and is **not** part of
|
|
7
|
+
the public contract — it can change between minors.
|
|
8
|
+
|
|
9
|
+
JSON output (`--json`) and telemetry (when enabled) only include the
|
|
10
|
+
canonical `code` + `stage` + (sanitised) `context`. Raw error messages and
|
|
11
|
+
stack traces are NEVER sent to telemetry.
|
|
12
|
+
|
|
13
|
+
| Code | Stage | What it means | What to try |
|
|
14
|
+
|------|-------|---------------|-------------|
|
|
15
|
+
| `E_AUTH_REQUIRED` | auth | A command needs credentials but none were available. | Run `allstak login`, or pass `--api-key` for ingest-only commands. |
|
|
16
|
+
| `E_AUTH_FAILED` | auth | Credentials were rejected by the AllStak backend. | Verify the email and OTP are correct; check `allstak.config.*` host setting. |
|
|
17
|
+
| `E_AUTH_EXPIRED` | auth | Stored credentials are no longer valid (token revoked or refresh failed). | Run `allstak login` to refresh. |
|
|
18
|
+
| `E_BACKEND_CONTRACT_MISSING` | reachability | The wizard requires a backend endpoint that does not exist on the configured host. | Confirm `--host` points at a current AllStak deployment, or open an issue. |
|
|
19
|
+
| `E_PROJECT_NOT_FOUND` | config | The specified project could not be found. | Run `allstak projects list`. |
|
|
20
|
+
| `E_PROJECT_CREATE_FAILED` | config | Backend rejected the project-create call. | Check the slug is unique and the org has quota. |
|
|
21
|
+
| `E_API_KEY_CREATE_FAILED` | config | Backend refused to mint a new API key. | Check API-key quota for the org's plan. |
|
|
22
|
+
| `E_UNSUPPORTED_FRAMEWORK` | detect | No registered integration matches the project, or detection was ambiguous. | Pass `-i <integration>`. Run `allstak list`. |
|
|
23
|
+
| `E_UNSUPPORTED_VERSION` | detect | Detected framework version is below the supported minimum. | Upgrade the framework, or pin to a wizard version that supports your range. |
|
|
24
|
+
| `E_PACKAGE_MANAGER_CONFLICT` | install | Multiple lockfiles present. | Delete the unused lockfile and re-run. |
|
|
25
|
+
| `E_PATCH_FAILED` | patch | A wizard patch threw mid-transaction; all changes rolled back. | Re-run with `--debug`; consult `allstak doctor`. |
|
|
26
|
+
| `E_PATCH_ROLLBACK_FAILED` | rollback | A patch failed AND the in-process rollback could not restore one or more files. | Use `allstak restore list` then `restore apply <id>`. |
|
|
27
|
+
| `E_RESTORE_FAILED` | restore | A `restore` operation could not complete. | Inspect `.allstak-wizard/backups/<snapshot>/manifest.json`. |
|
|
28
|
+
| `E_CONFIG_INVALID` | config | `allstak.config.*` failed schema validation. | Run `allstak config validate`. |
|
|
29
|
+
| `E_CONFIG_MIGRATION_FAILED` | config | A config-schema migration threw or refused. | Run `allstak config migrate --dry-run`. |
|
|
30
|
+
| `E_DOCTOR_FAILED` | validate | One or more `doctor` stages failed. | Read the per-stage `fix:` lines in the doctor output. |
|
|
31
|
+
| `E_INGEST_VERIFY_FAILED` | event-ingest | Live event probe could not be confirmed. | Verify API-key scope and project id. Increase `--live-probe-timeout`. |
|
|
32
|
+
| `E_SOURCEMAP_VERIFY_FAILED` | source-maps | Source-map upload or symbolication failed. | Run `allstak doctor`, then `allstak repair`. |
|
|
33
|
+
| `E_NETWORK_FAILED` | reachability | A network call timed out, refused, or hit DNS failure. | Check connectivity and the configured `--host`. |
|
|
34
|
+
| `E_PERMISSION_DENIED` | cli | OS-level permission was denied (file write, keychain, secret-tool, etc). | Check filesystem permissions; unlock your OS keychain. |
|
|
35
|
+
| `E_USER_CANCELLED` | cli | The user cancelled the operation. | No action needed. |
|
|
36
|
+
| `E_UNKNOWN` | cli | An unexpected error not yet categorised. | Re-run with `--debug` and open an issue. |
|
|
37
|
+
|
|
38
|
+
## Subcodes
|
|
39
|
+
|
|
40
|
+
Subcodes are an internal grep-aid for support; they are visible in `--debug`
|
|
41
|
+
output and in the wizard's stack traces but are **not** part of the JSON
|
|
42
|
+
contract. Examples currently in use:
|
|
43
|
+
|
|
44
|
+
- `E_NO_EMAIL` / `E_NO_CODE` / `E_2FA_REQUIRED` (under `E_AUTH_REQUIRED`)
|
|
45
|
+
- `E_AUTH_REFRESH_FAILED` (under `E_AUTH_EXPIRED`)
|
|
46
|
+
- `E_NO_DETECT` / `E_AMBIGUOUS` (under `E_UNSUPPORTED_FRAMEWORK`)
|
|
47
|
+
- `E_HTTP_TIMEOUT` / `E_HTTP_NETWORK` (under `E_NETWORK_FAILED`)
|
|
48
|
+
- `E_PATCH_SYNTAX` / `E_TX_ABORT` (under `E_PATCH_FAILED`)
|
|
49
|
+
- `E_KEYCHAIN` / `E_DECRYPT` / `E_SECRET_TOOL` (under `E_PERMISSION_DENIED`)
|
|
50
|
+
- `E_NO_CONFIRM` / `E_CANCELLED` (under `E_USER_CANCELLED`)
|
|
51
|
+
- `E_RESTORE_UNKNOWN_FILES` / `E_NO_SNAPSHOTS` / `E_SNAPSHOT_NOT_FOUND` (under `E_RESTORE_FAILED`)
|
|
52
|
+
|
|
53
|
+
Adding a new subcode does not require a wizard release bump. Adding a new
|
|
54
|
+
canonical code does — this is enforced by the type union in
|
|
55
|
+
`src/util/error-codes.ts`.
|
|
56
|
+
|
|
57
|
+
## Reading wizard errors
|
|
58
|
+
|
|
59
|
+
### Human (default) output
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
✗ E_AUTH_EXPIRED: Stored credentials for https://api.allstak.sa are no longer valid (...)
|
|
63
|
+
› Run `allstak login` to refresh.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `--json` output
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"outcome": "failure",
|
|
71
|
+
"errorCode": "E_AUTH_EXPIRED",
|
|
72
|
+
"data": {
|
|
73
|
+
"error": {
|
|
74
|
+
"code": "E_AUTH_EXPIRED",
|
|
75
|
+
"stage": "auth",
|
|
76
|
+
"subcode": "E_AUTH_REFRESH_FAILED",
|
|
77
|
+
"message": "Stored credentials for https://api.allstak.sa are no longer valid (...)",
|
|
78
|
+
"hint": "Run `allstak login` to refresh."
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### `--debug` output
|
|
85
|
+
|
|
86
|
+
Adds the underlying `originalCause` stack and the `context` bag. Both are
|
|
87
|
+
intentionally limited — `context` keys are checked against a documented
|
|
88
|
+
allowlist (no file paths, no token values, no PII).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allstak/wizard",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "AllStak SDK installation and configuration wizard (public beta). Auto-installs and wires the right @allstak/* SDK for React, Next.js, and Node — with deterministic rollback, persistent snapshots, and a real-event doctor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"allstak-wizard": "./dist/cli.js"
|
|
@@ -40,6 +40,14 @@
|
|
|
40
40
|
"./snapshot": {
|
|
41
41
|
"types": "./dist/snapshot/store.d.ts",
|
|
42
42
|
"import": "./dist/snapshot/store.js"
|
|
43
|
+
},
|
|
44
|
+
"./config": {
|
|
45
|
+
"types": "./dist/config/index.d.ts",
|
|
46
|
+
"import": "./dist/config/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./errors": {
|
|
49
|
+
"types": "./dist/util/error-codes.d.ts",
|
|
50
|
+
"import": "./dist/util/error-codes.js"
|
|
43
51
|
}
|
|
44
52
|
},
|
|
45
53
|
"files": [
|
|
@@ -47,7 +55,9 @@
|
|
|
47
55
|
"README.md",
|
|
48
56
|
"LICENSE",
|
|
49
57
|
"CHANGELOG.md",
|
|
50
|
-
"docs/
|
|
58
|
+
"docs/errors.md",
|
|
59
|
+
"docs/architecture",
|
|
60
|
+
"docs/beta"
|
|
51
61
|
],
|
|
52
62
|
"engines": {
|
|
53
63
|
"node": ">=18"
|
|
@@ -79,7 +89,7 @@
|
|
|
79
89
|
"allstak",
|
|
80
90
|
"wizard",
|
|
81
91
|
"cli",
|
|
82
|
-
"sdk
|
|
92
|
+
"sdk",
|
|
83
93
|
"observability",
|
|
84
94
|
"react",
|
|
85
95
|
"nextjs"
|