@allstak/wizard 0.1.6 → 0.1.8
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 +74 -267
- package/dist/cli.js +8 -0
- package/dist/commands/_context.d.ts +1 -0
- package/dist/commands/_context.js +80 -5
- package/dist/registry/index.js +4 -0
- package/dist/util/wizard-version.d.ts +1 -1
- package/dist/util/wizard-version.js +1 -1
- package/package.json +5 -5
- package/dist/api/auth-client.d.ts.map +0 -1
- package/dist/api/auth-client.js.map +0 -1
- package/dist/api/auth.d.ts.map +0 -1
- package/dist/api/auth.js.map +0 -1
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/client.js.map +0 -1
- package/dist/api/http.d.ts.map +0 -1
- package/dist/api/http.js.map +0 -1
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js.map +0 -1
- package/dist/api/orgs-client.d.ts.map +0 -1
- package/dist/api/orgs-client.js.map +0 -1
- package/dist/api/projects-client.d.ts.map +0 -1
- package/dist/api/projects-client.js.map +0 -1
- package/dist/api/setup-doctor-client.d.ts.map +0 -1
- package/dist/api/setup-doctor-client.js.map +0 -1
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js.map +0 -1
- package/dist/certification/fixtures.d.ts.map +0 -1
- package/dist/certification/fixtures.js.map +0 -1
- package/dist/certification/gates.d.ts.map +0 -1
- package/dist/certification/gates.js.map +0 -1
- package/dist/certification/index.d.ts.map +0 -1
- package/dist/certification/index.js.map +0 -1
- package/dist/certification/live-backend.d.ts.map +0 -1
- package/dist/certification/live-backend.js.map +0 -1
- package/dist/certification/packages.d.ts.map +0 -1
- package/dist/certification/packages.js.map +0 -1
- package/dist/certification/process.d.ts.map +0 -1
- package/dist/certification/process.js.map +0 -1
- package/dist/certification/report.d.ts.map +0 -1
- package/dist/certification/report.js.map +0 -1
- package/dist/certification/runner.d.ts.map +0 -1
- package/dist/certification/runner.js.map +0 -1
- package/dist/certification/runtime.d.ts.map +0 -1
- package/dist/certification/runtime.js.map +0 -1
- package/dist/certification/types.d.ts.map +0 -1
- package/dist/certification/types.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/_context.d.ts.map +0 -1
- package/dist/commands/_context.js.map +0 -1
- package/dist/commands/certify.d.ts.map +0 -1
- package/dist/commands/certify.js.map +0 -1
- package/dist/commands/config-cmd.d.ts.map +0 -1
- package/dist/commands/config-cmd.js.map +0 -1
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/login.d.ts.map +0 -1
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/logout.d.ts.map +0 -1
- package/dist/commands/logout.js.map +0 -1
- package/dist/commands/orgs.d.ts.map +0 -1
- package/dist/commands/orgs.js.map +0 -1
- package/dist/commands/projects.d.ts.map +0 -1
- package/dist/commands/projects.js.map +0 -1
- package/dist/commands/repair.d.ts.map +0 -1
- package/dist/commands/repair.js.map +0 -1
- package/dist/commands/restore.d.ts.map +0 -1
- package/dist/commands/restore.js.map +0 -1
- package/dist/commands/security-snapshot.d.ts.map +0 -1
- package/dist/commands/security-snapshot.js.map +0 -1
- package/dist/commands/uninstall.d.ts.map +0 -1
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/commands/whoami.d.ts.map +0 -1
- package/dist/commands/whoami.js.map +0 -1
- package/dist/compat/engine.d.ts.map +0 -1
- package/dist/compat/engine.js.map +0 -1
- package/dist/config/define.d.ts.map +0 -1
- package/dist/config/define.js.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/config/loader.js.map +0 -1
- package/dist/config/migrations.d.ts.map +0 -1
- package/dist/config/migrations.js.map +0 -1
- package/dist/config/precedence.d.ts.map +0 -1
- package/dist/config/precedence.js.map +0 -1
- package/dist/config/schema.d.ts.map +0 -1
- package/dist/config/schema.js.map +0 -1
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js.map +0 -1
- package/dist/credentials/encrypted-file.d.ts.map +0 -1
- package/dist/credentials/encrypted-file.js.map +0 -1
- package/dist/credentials/error.d.ts.map +0 -1
- package/dist/credentials/error.js.map +0 -1
- package/dist/credentials/index.d.ts.map +0 -1
- package/dist/credentials/index.js.map +0 -1
- package/dist/credentials/keychain-darwin.d.ts.map +0 -1
- package/dist/credentials/keychain-darwin.js.map +0 -1
- package/dist/credentials/keychain-linux.d.ts.map +0 -1
- package/dist/credentials/keychain-linux.js.map +0 -1
- package/dist/credentials/keychain-win.d.ts.map +0 -1
- package/dist/credentials/keychain-win.js.map +0 -1
- package/dist/credentials/types.d.ts.map +0 -1
- package/dist/credentials/types.js.map +0 -1
- package/dist/detect/framework.d.ts.map +0 -1
- package/dist/detect/framework.js.map +0 -1
- package/dist/detect/index.d.ts.map +0 -1
- package/dist/detect/index.js.map +0 -1
- package/dist/detect/monorepo.d.ts.map +0 -1
- package/dist/detect/monorepo.js.map +0 -1
- package/dist/detect/package-manager.d.ts.map +0 -1
- package/dist/detect/package-manager.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/integrations/_scaffold.d.ts.map +0 -1
- package/dist/integrations/_scaffold.js.map +0 -1
- package/dist/integrations/_shared.d.ts.map +0 -1
- package/dist/integrations/_shared.js.map +0 -1
- package/dist/integrations/_simple-scaffold.d.ts.map +0 -1
- package/dist/integrations/_simple-scaffold.js.map +0 -1
- package/dist/integrations/dotnet.d.ts.map +0 -1
- package/dist/integrations/dotnet.js.map +0 -1
- package/dist/integrations/expo/detect.d.ts.map +0 -1
- package/dist/integrations/expo/detect.js.map +0 -1
- package/dist/integrations/expo/doctor.d.ts.map +0 -1
- package/dist/integrations/expo/doctor.js.map +0 -1
- package/dist/integrations/expo/files.d.ts.map +0 -1
- package/dist/integrations/expo/files.js.map +0 -1
- package/dist/integrations/expo/index.d.ts.map +0 -1
- package/dist/integrations/expo/index.js.map +0 -1
- package/dist/integrations/expo/manifest.d.ts.map +0 -1
- package/dist/integrations/expo/manifest.js.map +0 -1
- package/dist/integrations/expo/patch.d.ts.map +0 -1
- package/dist/integrations/expo/patch.js.map +0 -1
- package/dist/integrations/expo/uninstall.d.ts.map +0 -1
- package/dist/integrations/expo/uninstall.js.map +0 -1
- package/dist/integrations/expo.d.ts.map +0 -1
- package/dist/integrations/expo.js.map +0 -1
- package/dist/integrations/fastify/detect.d.ts.map +0 -1
- package/dist/integrations/fastify/detect.js.map +0 -1
- package/dist/integrations/fastify/doctor.d.ts.map +0 -1
- package/dist/integrations/fastify/doctor.js.map +0 -1
- package/dist/integrations/fastify/files.d.ts.map +0 -1
- package/dist/integrations/fastify/files.js.map +0 -1
- package/dist/integrations/fastify/index.d.ts.map +0 -1
- package/dist/integrations/fastify/index.js.map +0 -1
- package/dist/integrations/fastify/manifest.d.ts.map +0 -1
- package/dist/integrations/fastify/manifest.js.map +0 -1
- package/dist/integrations/fastify/patch.d.ts.map +0 -1
- package/dist/integrations/fastify/patch.js.map +0 -1
- package/dist/integrations/fastify/uninstall.d.ts.map +0 -1
- package/dist/integrations/fastify/uninstall.js.map +0 -1
- package/dist/integrations/fastify.d.ts.map +0 -1
- package/dist/integrations/fastify.js.map +0 -1
- package/dist/integrations/flutter.d.ts.map +0 -1
- package/dist/integrations/flutter.js.map +0 -1
- package/dist/integrations/go/index.d.ts.map +0 -1
- package/dist/integrations/go/index.js.map +0 -1
- package/dist/integrations/go.d.ts.map +0 -1
- package/dist/integrations/go.js.map +0 -1
- package/dist/integrations/java/index.d.ts.map +0 -1
- package/dist/integrations/java/index.js.map +0 -1
- package/dist/integrations/java.d.ts.map +0 -1
- package/dist/integrations/java.js.map +0 -1
- package/dist/integrations/js/detect.d.ts.map +0 -1
- package/dist/integrations/js/detect.js.map +0 -1
- package/dist/integrations/js/doctor.d.ts.map +0 -1
- package/dist/integrations/js/doctor.js.map +0 -1
- package/dist/integrations/js/files.d.ts.map +0 -1
- package/dist/integrations/js/files.js.map +0 -1
- package/dist/integrations/js/index.d.ts.map +0 -1
- package/dist/integrations/js/index.js.map +0 -1
- package/dist/integrations/js/manifest.d.ts.map +0 -1
- package/dist/integrations/js/manifest.js.map +0 -1
- package/dist/integrations/js/patch.d.ts.map +0 -1
- package/dist/integrations/js/patch.js.map +0 -1
- package/dist/integrations/js/uninstall.d.ts.map +0 -1
- package/dist/integrations/js/uninstall.js.map +0 -1
- package/dist/integrations/nestjs/detect.d.ts.map +0 -1
- package/dist/integrations/nestjs/detect.js.map +0 -1
- package/dist/integrations/nestjs/doctor.d.ts.map +0 -1
- package/dist/integrations/nestjs/doctor.js.map +0 -1
- package/dist/integrations/nestjs/files.d.ts.map +0 -1
- package/dist/integrations/nestjs/files.js.map +0 -1
- package/dist/integrations/nestjs/index.d.ts.map +0 -1
- package/dist/integrations/nestjs/index.js.map +0 -1
- package/dist/integrations/nestjs/manifest.d.ts.map +0 -1
- package/dist/integrations/nestjs/manifest.js.map +0 -1
- package/dist/integrations/nestjs/patch.d.ts.map +0 -1
- package/dist/integrations/nestjs/patch.js.map +0 -1
- package/dist/integrations/nestjs/uninstall.d.ts.map +0 -1
- package/dist/integrations/nestjs/uninstall.js.map +0 -1
- package/dist/integrations/nestjs.d.ts.map +0 -1
- package/dist/integrations/nestjs.js.map +0 -1
- package/dist/integrations/next/detect.d.ts.map +0 -1
- package/dist/integrations/next/detect.js.map +0 -1
- package/dist/integrations/next/doctor.d.ts.map +0 -1
- package/dist/integrations/next/doctor.js.map +0 -1
- package/dist/integrations/next/files.d.ts.map +0 -1
- package/dist/integrations/next/files.js.map +0 -1
- package/dist/integrations/next/index.d.ts.map +0 -1
- package/dist/integrations/next/index.js.map +0 -1
- package/dist/integrations/next/manifest.d.ts.map +0 -1
- package/dist/integrations/next/manifest.js.map +0 -1
- package/dist/integrations/next/patch.d.ts.map +0 -1
- package/dist/integrations/next/patch.js.map +0 -1
- package/dist/integrations/next/uninstall.d.ts.map +0 -1
- package/dist/integrations/next/uninstall.js.map +0 -1
- package/dist/integrations/otel.d.ts.map +0 -1
- package/dist/integrations/otel.js.map +0 -1
- package/dist/integrations/php.d.ts.map +0 -1
- package/dist/integrations/php.js.map +0 -1
- package/dist/integrations/python/index.d.ts.map +0 -1
- package/dist/integrations/python/index.js.map +0 -1
- package/dist/integrations/python.d.ts.map +0 -1
- package/dist/integrations/python.js.map +0 -1
- package/dist/integrations/react/detect.d.ts.map +0 -1
- package/dist/integrations/react/detect.js.map +0 -1
- package/dist/integrations/react/doctor.d.ts.map +0 -1
- package/dist/integrations/react/doctor.js.map +0 -1
- package/dist/integrations/react/files.d.ts.map +0 -1
- package/dist/integrations/react/files.js.map +0 -1
- package/dist/integrations/react/index.d.ts.map +0 -1
- package/dist/integrations/react/index.js.map +0 -1
- package/dist/integrations/react/manifest.d.ts.map +0 -1
- package/dist/integrations/react/manifest.js.map +0 -1
- package/dist/integrations/react/patch.d.ts.map +0 -1
- package/dist/integrations/react/patch.js.map +0 -1
- package/dist/integrations/react/uninstall.d.ts.map +0 -1
- package/dist/integrations/react/uninstall.js.map +0 -1
- package/dist/integrations/react-native.d.ts.map +0 -1
- package/dist/integrations/react-native.js.map +0 -1
- package/dist/integrations/ruby.d.ts.map +0 -1
- package/dist/integrations/ruby.js.map +0 -1
- package/dist/lifecycle/hooks.d.ts.map +0 -1
- package/dist/lifecycle/hooks.js.map +0 -1
- package/dist/migrations/builtin/dsn-to-api-key.d.ts.map +0 -1
- package/dist/migrations/builtin/dsn-to-api-key.js.map +0 -1
- package/dist/migrations/engine.d.ts.map +0 -1
- package/dist/migrations/engine.js.map +0 -1
- package/dist/migrations/index.d.ts.map +0 -1
- package/dist/migrations/index.js.map +0 -1
- package/dist/output/human.d.ts.map +0 -1
- package/dist/output/human.js.map +0 -1
- package/dist/output/index.d.ts.map +0 -1
- package/dist/output/index.js.map +0 -1
- package/dist/output/json.d.ts.map +0 -1
- package/dist/output/json.js.map +0 -1
- package/dist/output/types.d.ts.map +0 -1
- package/dist/output/types.js.map +0 -1
- package/dist/patchers/env-file.d.ts.map +0 -1
- package/dist/patchers/env-file.js.map +0 -1
- package/dist/patchers/js-ast.d.ts.map +0 -1
- package/dist/patchers/js-ast.js.map +0 -1
- package/dist/patchers/json-file.d.ts.map +0 -1
- package/dist/patchers/json-file.js.map +0 -1
- package/dist/patchers/markers.d.ts.map +0 -1
- package/dist/patchers/markers.js.map +0 -1
- package/dist/patchers/source-block.d.ts.map +0 -1
- package/dist/patchers/source-block.js.map +0 -1
- package/dist/registry/index.d.ts.map +0 -1
- package/dist/registry/index.js.map +0 -1
- package/dist/registry/manifest.d.ts.map +0 -1
- package/dist/registry/manifest.js.map +0 -1
- package/dist/registry/registry.d.ts.map +0 -1
- package/dist/registry/registry.js.map +0 -1
- package/dist/registry/types.d.ts.map +0 -1
- package/dist/registry/types.js.map +0 -1
- package/dist/security-snapshot/builder.d.ts.map +0 -1
- package/dist/security-snapshot/builder.js.map +0 -1
- package/dist/security-snapshot/client.d.ts.map +0 -1
- package/dist/security-snapshot/client.js.map +0 -1
- package/dist/security-snapshot/index.d.ts.map +0 -1
- package/dist/security-snapshot/index.js.map +0 -1
- package/dist/security-snapshot/types.d.ts.map +0 -1
- package/dist/security-snapshot/types.js.map +0 -1
- package/dist/snapshot/restore.d.ts.map +0 -1
- package/dist/snapshot/restore.js.map +0 -1
- package/dist/snapshot/store.d.ts.map +0 -1
- package/dist/snapshot/store.js.map +0 -1
- package/dist/sourcemaps/index.d.ts.map +0 -1
- package/dist/sourcemaps/index.js.map +0 -1
- package/dist/sourcemaps/metro.d.ts.map +0 -1
- package/dist/sourcemaps/metro.js.map +0 -1
- package/dist/sourcemaps/next.d.ts.map +0 -1
- package/dist/sourcemaps/next.js.map +0 -1
- package/dist/sourcemaps/provider.d.ts.map +0 -1
- package/dist/sourcemaps/provider.js.map +0 -1
- package/dist/sourcemaps/vite.d.ts.map +0 -1
- package/dist/sourcemaps/vite.js.map +0 -1
- package/dist/sourcemaps/webpack.d.ts.map +0 -1
- package/dist/sourcemaps/webpack.js.map +0 -1
- package/dist/telemetry/cli-wrap.d.ts.map +0 -1
- package/dist/telemetry/cli-wrap.js.map +0 -1
- package/dist/telemetry/http-provider.d.ts.map +0 -1
- package/dist/telemetry/http-provider.js.map +0 -1
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/telemetry/index.js.map +0 -1
- package/dist/telemetry/install-id.d.ts.map +0 -1
- package/dist/telemetry/install-id.js.map +0 -1
- package/dist/telemetry/payload.d.ts.map +0 -1
- package/dist/telemetry/payload.js.map +0 -1
- package/dist/telemetry/provider.d.ts.map +0 -1
- package/dist/telemetry/provider.js.map +0 -1
- package/dist/telemetry/runtime.d.ts.map +0 -1
- package/dist/telemetry/runtime.js.map +0 -1
- package/dist/transaction/tx.d.ts.map +0 -1
- package/dist/transaction/tx.js.map +0 -1
- package/dist/util/error-codes.d.ts.map +0 -1
- package/dist/util/error-codes.js.map +0 -1
- package/dist/util/errors.d.ts.map +0 -1
- package/dist/util/errors.js.map +0 -1
- package/dist/util/log.d.ts.map +0 -1
- package/dist/util/log.js.map +0 -1
- package/dist/util/paths.d.ts.map +0 -1
- package/dist/util/paths.js.map +0 -1
- package/dist/util/version.d.ts.map +0 -1
- package/dist/util/version.js.map +0 -1
- package/dist/util/wizard-version.d.ts.map +0 -1
- package/dist/util/wizard-version.js.map +0 -1
- package/docs/architecture/README.md +0 -58
- package/docs/architecture/dry-run.md +0 -34
- package/docs/architecture/integration-lifecycle.md +0 -77
- package/docs/architecture/patch-pipeline.md +0 -58
- package/docs/architecture/registry.md +0 -52
- package/docs/architecture/rollback.md +0 -47
- package/docs/architecture/sourcemaps.md +0 -53
- package/docs/architecture/stability-levels.md +0 -35
- package/docs/architecture/transaction.md +0 -51
- package/docs/architecture/v02-bare-react-native-spec.md +0 -92
- package/docs/architecture/v02-java-host-fix-spec.md +0 -121
- package/docs/architecture/v02-sourcemaps-e2e-spec.md +0 -157
- package/docs/beta/README.md +0 -17
- package/docs/beta/ci.md +0 -122
- package/docs/beta/config.md +0 -124
- package/docs/beta/doctor.md +0 -79
- package/docs/beta/expo.md +0 -69
- package/docs/beta/fastify.md +0 -62
- package/docs/beta/known-limitations.md +0 -93
- package/docs/beta/nestjs.md +0 -69
- package/docs/beta/next.md +0 -76
- package/docs/beta/node.md +0 -60
- package/docs/beta/privacy.md +0 -99
- package/docs/beta/quickstart.md +0 -89
- package/docs/beta/react.md +0 -91
- package/docs/beta/reliability.md +0 -33
- package/docs/beta/restore.md +0 -84
- package/docs/beta/troubleshooting.md +0 -133
package/docs/beta/next.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Next.js
|
|
2
|
-
|
|
3
|
-
**Stability:** stable. Runtime fail-open behavior and disposable live-backend
|
|
4
|
-
certification have passed for supported Next.js paths. Edge Runtime and Server
|
|
5
|
-
Actions are not certified.
|
|
6
|
-
|
|
7
|
-
## What you get
|
|
8
|
-
|
|
9
|
-
- `@allstak/next` + `@allstak/js` installed.
|
|
10
|
-
- `.env.local` populated with **both** `ALLSTAK_API_KEY` and `ALLSTAK_DSN`
|
|
11
|
-
(`ALLSTAK_DSN` is still written during the env-var transition).
|
|
12
|
-
- `instrumentation.ts` created at the project root if missing, otherwise a
|
|
13
|
-
managed-block hint appended to the existing one. The wizard does NOT
|
|
14
|
-
modify the body of an existing `register()` function.
|
|
15
|
-
- `next.config.{js,mjs,ts}` gains a managed-block hint reminding you to
|
|
16
|
-
wrap with `withAllStak` and enable `productionBrowserSourceMaps: true`.
|
|
17
|
-
|
|
18
|
-
## Run
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npx @allstak/wizard@beta -i next
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Compatibility
|
|
25
|
-
|
|
26
|
-
- `next >= 13`. Both app router and pages router supported.
|
|
27
|
-
- Older Next versions refused with `E_UNSUPPORTED_VERSION`.
|
|
28
|
-
|
|
29
|
-
## Wiring `register()`
|
|
30
|
-
|
|
31
|
-
Wizard creates this if `instrumentation.ts` did not exist:
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
import { initAllStakNext } from '@allstak/next';
|
|
35
|
-
|
|
36
|
-
export function register() {
|
|
37
|
-
initAllStakNext({
|
|
38
|
-
dsn: process.env.ALLSTAK_DSN,
|
|
39
|
-
endpoint: process.env.ALLSTAK_HOST ?? 'https://api.allstak.sa',
|
|
40
|
-
release: process.env.ALLSTAK_RELEASE,
|
|
41
|
-
environment: process.env.ALLSTAK_ENVIRONMENT ?? 'production',
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
If you already have `register()`, copy the body of `initAllStakNext({ ... })`
|
|
47
|
-
into it.
|
|
48
|
-
|
|
49
|
-
## Source maps
|
|
50
|
-
|
|
51
|
-
Wrap `next.config.*` with `withAllStak`:
|
|
52
|
-
|
|
53
|
-
```js
|
|
54
|
-
const { withAllStak } = require('@allstak/js/next');
|
|
55
|
-
module.exports = withAllStak({
|
|
56
|
-
...nextConfig,
|
|
57
|
-
productionBrowserSourceMaps: true,
|
|
58
|
-
});
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
The wizard does NOT auto-mutate `next.config.*` for you — Next configs use
|
|
62
|
-
many factory shapes (`module.exports = (phase, { defaultConfig }) => …`) and
|
|
63
|
-
auto-mutation has too high a blast-radius. Follow the managed-block hint.
|
|
64
|
-
|
|
65
|
-
## Known limitations
|
|
66
|
-
|
|
67
|
-
- Live `doctor --live-probe` works for Next-emitted events only when your
|
|
68
|
-
Next app runs in a place the wizard can reach. (No magic — the SDK posts
|
|
69
|
-
to `/ingest/v1/errors` and the wizard polls `/api/v1/errors`.)
|
|
70
|
-
- Edge Runtime and Server Actions are not certified.
|
|
71
|
-
|
|
72
|
-
## Verify
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
npx @allstak/wizard@beta doctor -i next
|
|
76
|
-
```
|
package/docs/beta/node.md
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Vanilla Node.js (`@allstak/js`)
|
|
2
|
-
|
|
3
|
-
**Stability:** `stable`. Validated against fixture and dogfooded.
|
|
4
|
-
|
|
5
|
-
## What you get
|
|
6
|
-
|
|
7
|
-
- `@allstak/js` SDK installed.
|
|
8
|
-
- `.env` populated with the standard `ALLSTAK_*` vars.
|
|
9
|
-
- AST-injected `import { AllStak } from '@allstak/js'` in your entry file.
|
|
10
|
-
- Managed-block call to `AllStak.init({...})` appended to the entry.
|
|
11
|
-
|
|
12
|
-
## Run
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npx @allstak/wizard@beta -i js
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Entry detection
|
|
19
|
-
|
|
20
|
-
The wizard looks at `package.json:scripts.start` for a `node X.js` pattern,
|
|
21
|
-
then falls back to:
|
|
22
|
-
|
|
23
|
-
- `src/index.ts` / `src/index.js`
|
|
24
|
-
- `index.ts` / `index.js`
|
|
25
|
-
- `app.ts` / `app.js`
|
|
26
|
-
- `server.ts` / `server.js`
|
|
27
|
-
|
|
28
|
-
If none match, the wizard skips entry patching and reports
|
|
29
|
-
`config-only run` — env vars are still written; you need to call
|
|
30
|
-
`AllStak.init(...)` manually.
|
|
31
|
-
|
|
32
|
-
## What the patched entry looks like
|
|
33
|
-
|
|
34
|
-
After `init`, the bottom of your entry file gains:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
// >>> allstak-wizard:v1 (do not edit) >>>
|
|
38
|
-
AllStak.init({
|
|
39
|
-
apiKey: process.env.ALLSTAK_API_KEY,
|
|
40
|
-
host: process.env.ALLSTAK_HOST ?? 'https://api.allstak.sa',
|
|
41
|
-
environment: process.env.ALLSTAK_ENVIRONMENT ?? 'production',
|
|
42
|
-
release: process.env.ALLSTAK_RELEASE,
|
|
43
|
-
});
|
|
44
|
-
// <<< allstak-wizard:v1 <<<
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Re-running the wizard replaces this block in place. `uninstall` removes it.
|
|
48
|
-
|
|
49
|
-
## Compatibility
|
|
50
|
-
|
|
51
|
-
- Node 18+ required by the wizard itself.
|
|
52
|
-
- The `@allstak/js` SDK supports Node 16+.
|
|
53
|
-
- Works with TypeScript entries via `tsx`/`bun`/`deno run` toolchains.
|
|
54
|
-
|
|
55
|
-
## What this integration does NOT do
|
|
56
|
-
|
|
57
|
-
- No bundler-level source-map wiring — Node is interpreted, not bundled.
|
|
58
|
-
- No express/fastify/hono middleware registration — those are framework-
|
|
59
|
-
specific and live in their own integrations (`fastify` is `experimental`
|
|
60
|
-
for now; nest/express integrations are deferred).
|
package/docs/beta/privacy.md
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# Privacy & telemetry
|
|
2
|
-
|
|
3
|
-
The wizard ships a minimal anonymous-usage telemetry channel. This page
|
|
4
|
-
documents **exactly** what is sent and how to disable it.
|
|
5
|
-
|
|
6
|
-
## What we send
|
|
7
|
-
|
|
8
|
-
| Field | Example | Why |
|
|
9
|
-
|-------|---------|-----|
|
|
10
|
-
| `schemaVersion` | `1` | Stable version of this payload shape. |
|
|
11
|
-
| `installId` | `b9c4...` | Anonymous v4 UUID stored at `~/.config/allstak/install-id`. Coalesces events for the same install. Rotate by deleting the file. |
|
|
12
|
-
| `wizardVersion` | `0.1.3` | The wizard's own version. |
|
|
13
|
-
| `command` | `init`, `doctor`, `restore-apply`, … | Which wizard command ran. |
|
|
14
|
-
| `integration` | `react`, `next`, `js`, `null` | Selected integration (`null` for commands that don't have one — `login`, `restore-list`, etc.). |
|
|
15
|
-
| `stability` | `stable`, `beta`, `experimental`, `unsupported`, `null` | Stability level of the active integration. |
|
|
16
|
-
| `os.family` | `darwin`, `linux`, `win32` | Node's `process.platform`. |
|
|
17
|
-
| `os.majorRelease` | `23`, `5`, `10` | Major version of the OS kernel. |
|
|
18
|
-
| `os.arch` | `x64`, `arm64` | Process architecture. |
|
|
19
|
-
| `node.major` | `20`, `22` | Major Node version. |
|
|
20
|
-
| `packageManager` | `npm`, `pnpm`, `yarn`, `yarn-berry`, `bun`, `null` | Detected package manager. |
|
|
21
|
-
| `outcome` | `success`, `failure`, `cancelled`, `noop` | Final state. |
|
|
22
|
-
| `stage` | `auth`, `patch`, `restore`, … | Stage at termination. |
|
|
23
|
-
| `errorCode` | `E_PATCH_FAILED`, `null` | Canonical error code; never message text. |
|
|
24
|
-
| `rollbackTriggered` | `true`/`false` | Did an in-process rollback fire? |
|
|
25
|
-
| `durationMs` | `4231` | Wall-clock duration. |
|
|
26
|
-
|
|
27
|
-
That's the entire payload. There are no opaque "metadata" or "extras"
|
|
28
|
-
fields.
|
|
29
|
-
|
|
30
|
-
## What we NEVER send
|
|
31
|
-
|
|
32
|
-
The TypeScript type in `src/telemetry/payload.ts` is the contract. The
|
|
33
|
-
wizard CANNOT send any of the following — there is no field for them:
|
|
34
|
-
|
|
35
|
-
- API keys, DSNs, OAuth tokens, refresh tokens.
|
|
36
|
-
- Org names, project names, project ids, org ids.
|
|
37
|
-
- File paths (absolute or relative).
|
|
38
|
-
- `process.env` values.
|
|
39
|
-
- Source code from your repo.
|
|
40
|
-
- Error message text or stack frames.
|
|
41
|
-
- Email addresses, IP addresses, hostnames.
|
|
42
|
-
|
|
43
|
-
The error code `E_PATCH_FAILED` reaches us; the patcher's stack trace and
|
|
44
|
-
the file path it failed on do not.
|
|
45
|
-
|
|
46
|
-
## How to disable
|
|
47
|
-
|
|
48
|
-
Three independent ways, any one of them is sufficient:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# Per-run flag:
|
|
52
|
-
npx @allstak/wizard@beta --no-telemetry ...
|
|
53
|
-
|
|
54
|
-
# Process env:
|
|
55
|
-
ALLSTAK_WIZARD_TELEMETRY=0 npx @allstak/wizard@beta ...
|
|
56
|
-
|
|
57
|
-
# Globally for your shell:
|
|
58
|
-
export ALLSTAK_WIZARD_TELEMETRY=0
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Disabling does NOT disable the wizard's local audit trail (snapshots in
|
|
62
|
-
`.allstak-wizard/backups/`). Those are local-only and never sent anywhere.
|
|
63
|
-
|
|
64
|
-
## How to inspect what would be sent
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
npx @allstak/wizard@beta --telemetry-debug -i react --dry-run
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
`--telemetry-debug` prints the would-be payload to stderr instead of
|
|
71
|
-
sending it, regardless of the gate state.
|
|
72
|
-
|
|
73
|
-
## Where the data goes
|
|
74
|
-
|
|
75
|
-
- **Default provider** is `noop` — the wizard does NOT phone home in beta.
|
|
76
|
-
`noopTelemetry` is selected unless an operator (or you) explicitly wires
|
|
77
|
-
in `httpTelemetry({ endpoint })`. This is a deliberate beta-period
|
|
78
|
-
posture: build the abstraction, don't quietly start collecting.
|
|
79
|
-
- When configured: HTTPS POST of the JSON payload with a 1.5s timeout,
|
|
80
|
-
failures swallowed.
|
|
81
|
-
|
|
82
|
-
## Credentials
|
|
83
|
-
|
|
84
|
-
`allstak login` stores your JWT pair in your OS keychain (macOS / libsecret)
|
|
85
|
-
or an AES-256-GCM encrypted file fallback. Never sent to telemetry. See
|
|
86
|
-
`src/credentials/` for the implementation.
|
|
87
|
-
|
|
88
|
-
## Anonymous install id
|
|
89
|
-
|
|
90
|
-
Stored at `~/.config/allstak/install-id` (or the platform equivalent).
|
|
91
|
-
Generated lazily on first telemetry-emitting run. Delete the file to
|
|
92
|
-
rotate. Telemetry-disabled runs do NOT generate or read it.
|
|
93
|
-
|
|
94
|
-
## Audit
|
|
95
|
-
|
|
96
|
-
The complete payload type is at `src/telemetry/payload.ts`. The unit-test
|
|
97
|
-
suite asserts that the runtime payload contains EXACTLY the documented
|
|
98
|
-
fields (no more, no fewer) — adding a field requires updating both the
|
|
99
|
-
type and this doc, and the test fails until you do.
|
package/docs/beta/quickstart.md
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# Quickstart — `@allstak/wizard@beta`
|
|
2
|
-
|
|
3
|
-
> Status: **public beta**. The wizard is honest about what works and what
|
|
4
|
-
> doesn't — see [known limitations](./known-limitations.md) for the gaps you
|
|
5
|
-
> need to know about before adopting.
|
|
6
|
-
|
|
7
|
-
## Install + run in one command
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# React (Vite or CRA)
|
|
11
|
-
npx @allstak/wizard@beta -i react
|
|
12
|
-
|
|
13
|
-
# Next.js (app or pages router; 13+)
|
|
14
|
-
npx @allstak/wizard@beta -i next
|
|
15
|
-
|
|
16
|
-
# Vanilla Node
|
|
17
|
-
npx @allstak/wizard@beta -i js
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The wizard auto-detects your framework if you omit `-i`.
|
|
21
|
-
|
|
22
|
-
## Five-minute first run
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
# 1. Authenticate against AllStak (email OTP).
|
|
26
|
-
npx @allstak/wizard@beta login
|
|
27
|
-
|
|
28
|
-
# 2. List your orgs and projects.
|
|
29
|
-
npx @allstak/wizard@beta orgs list
|
|
30
|
-
npx @allstak/wizard@beta projects list
|
|
31
|
-
|
|
32
|
-
# 3. Create a project + mint an API key in one go.
|
|
33
|
-
npx @allstak/wizard@beta projects create \
|
|
34
|
-
--name "My App" --slug my-app \
|
|
35
|
-
--with-api-key
|
|
36
|
-
|
|
37
|
-
# 4. Run the wizard against your project.
|
|
38
|
-
cd /path/to/my/app
|
|
39
|
-
npx @allstak/wizard@beta # auto-detect
|
|
40
|
-
# or:
|
|
41
|
-
npx @allstak/wizard@beta -i next
|
|
42
|
-
|
|
43
|
-
# 5. Verify the setup with a real test event.
|
|
44
|
-
npx @allstak/wizard@beta doctor --live-probe \
|
|
45
|
-
--api-key ask_live_... \
|
|
46
|
-
--project-id <project-uuid>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## What the wizard does (in order)
|
|
50
|
-
|
|
51
|
-
1. Detects your framework + package manager.
|
|
52
|
-
2. Loads `allstak.config.*` if present.
|
|
53
|
-
3. Verifies framework version compatibility.
|
|
54
|
-
4. **Asks for confirmation** before any disk write (skip with `-y`).
|
|
55
|
-
5. Installs the right `@allstak/*` package via your package manager.
|
|
56
|
-
6. Writes env vars to `.env.local` / `.env` — never overwrites your values.
|
|
57
|
-
7. Patches your entry file (AST-injects the import; appends a managed-block
|
|
58
|
-
hint).
|
|
59
|
-
8. Wires the source-map plugin into `vite.config.*` / `next.config.*`.
|
|
60
|
-
9. Snapshots every touched file to `.allstak-wizard/backups/<id>/`.
|
|
61
|
-
10. Runs a doctor pass and reports the result.
|
|
62
|
-
|
|
63
|
-
## Always reversible
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# Roll back the latest snapshot.
|
|
67
|
-
npx @allstak/wizard@beta restore apply latest
|
|
68
|
-
|
|
69
|
-
# Or fully uninstall.
|
|
70
|
-
npx @allstak/wizard@beta uninstall -i react
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Dry-run before committing
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
npx @allstak/wizard@beta -i react --dry-run --json | jq '.diff'
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The dry-run never touches disk.
|
|
80
|
-
|
|
81
|
-
## Next reads
|
|
82
|
-
|
|
83
|
-
- [`react.md`](./react.md), [`next.md`](./next.md), [`node.md`](./node.md) — per-integration guides.
|
|
84
|
-
- [`config.md`](./config.md) — `allstak.config.ts` precedence + migrations.
|
|
85
|
-
- [`doctor.md`](./doctor.md) — diagnosing a setup.
|
|
86
|
-
- [`restore.md`](./restore.md) — restoring snapshots.
|
|
87
|
-
- [`privacy.md`](./privacy.md) — telemetry contract.
|
|
88
|
-
- [`troubleshooting.md`](./troubleshooting.md) — common errors and fixes.
|
|
89
|
-
- [`known-limitations.md`](./known-limitations.md) — what's NOT supported in beta.
|
package/docs/beta/react.md
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
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
|
-
- Root render tree wrapped with a guarded `AllStakRoot` component when the
|
|
13
|
-
wizard recognizes a standard `createRoot(...).render(...)` entry.
|
|
14
|
-
- For Vite projects: `@allstak/react/vite` source-map helper is added to `vite.config.*`.
|
|
15
|
-
|
|
16
|
-
## Run
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
# Auto-detect:
|
|
20
|
-
npx @allstak/wizard@beta
|
|
21
|
-
|
|
22
|
-
# Explicit:
|
|
23
|
-
npx @allstak/wizard@beta -i react
|
|
24
|
-
|
|
25
|
-
# Non-interactive (CI):
|
|
26
|
-
npx @allstak/wizard@beta -i react -y --api-key $ALLSTAK_API_KEY \
|
|
27
|
-
--org $ORG --project $PROJECT --release $GIT_SHA
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Compatibility
|
|
31
|
-
|
|
32
|
-
- `react >= 16.8`. Older React versions are refused with `E_UNSUPPORTED_VERSION`.
|
|
33
|
-
- Works with Vite 4+ and Create React App. Webpack-only setups get a
|
|
34
|
-
managed-block hint instead of AST mutation (Webpack configs vary too much
|
|
35
|
-
for safe AST patching in v0.1).
|
|
36
|
-
|
|
37
|
-
## Wiring the provider
|
|
38
|
-
|
|
39
|
-
For standard Vite/CRA entry files, the wizard rewrites the root render tree:
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
import type { ReactNode } from 'react';
|
|
43
|
-
import { AllStakProvider } from '@allstak/react';
|
|
44
|
-
|
|
45
|
-
function AllStakRoot({ children }: { children: ReactNode }) {
|
|
46
|
-
const apiKey = import.meta.env.VITE_ALLSTAK_API_KEY;
|
|
47
|
-
if (!apiKey) return <>{children}</>;
|
|
48
|
-
return (
|
|
49
|
-
<AllStakProvider apiKey={apiKey} environment="production">
|
|
50
|
-
{children}
|
|
51
|
-
</AllStakProvider>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
56
|
-
<AllStakRoot>
|
|
57
|
-
<App />
|
|
58
|
-
</AllStakRoot>,
|
|
59
|
-
);
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
If the wizard cannot safely identify the render call, it leaves a manual-review
|
|
63
|
-
hint instead of risking a broken app.
|
|
64
|
-
|
|
65
|
-
## Verify
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npx @allstak/wizard@beta doctor -i react
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
For an end-to-end ingestion check:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
npx @allstak/wizard@beta doctor -i react --live-probe \
|
|
75
|
-
--api-key ask_live_... \
|
|
76
|
-
--project-id <project-uuid>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Idempotent
|
|
80
|
-
|
|
81
|
-
Re-running `init` is idempotent. The wizard detects existing
|
|
82
|
-
`AllStakProvider`/`AllStakRoot` setup and does not double-wrap the tree.
|
|
83
|
-
|
|
84
|
-
## Uninstall
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
npx @allstak/wizard@beta uninstall -i react
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Removes the `@allstak/react` dependency, strips the AST import,
|
|
91
|
-
deletes the managed env block, and unwires the Vite plugin.
|
package/docs/beta/reliability.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# SDK Reliability and Fail-Open Behavior
|
|
2
|
-
|
|
3
|
-
AllStak SDKs must be fail-open. A customer application must keep running when
|
|
4
|
-
AllStak ingest is slow, down, rate-limited, under maintenance, or unreachable.
|
|
5
|
-
|
|
6
|
-
Default runtime guarantees for wizard-generated integrations:
|
|
7
|
-
|
|
8
|
-
- SDK initialization should not block app startup.
|
|
9
|
-
- Runtime telemetry delivery is best-effort and should not throw into customer code.
|
|
10
|
-
- Browser and mobile telemetry uses short timeouts, bounded memory queues, and drops telemetry before it can harm app performance.
|
|
11
|
-
- Server middleware should never wait on AllStak before returning the customer response.
|
|
12
|
-
- HTTP instrumentation must preserve the original request behavior. If telemetry capture fails, the customer request still succeeds or fails only because of the customer system.
|
|
13
|
-
- AllStak ingest endpoints are ignored by instrumentation to prevent recursive telemetry loops.
|
|
14
|
-
- Source-map upload and setup-doctor failures affect CI only when the developer explicitly configures a fail-on-error build mode.
|
|
15
|
-
|
|
16
|
-
Operational behavior during AllStak incidents:
|
|
17
|
-
|
|
18
|
-
- DNS/TLS/connectivity failures are swallowed internally.
|
|
19
|
-
- 5xx and 503 maintenance responses back off and eventually drop telemetry.
|
|
20
|
-
- 429 responses should back off and avoid retry storms.
|
|
21
|
-
- Queue overflow drops telemetry rather than growing memory without bounds.
|
|
22
|
-
- Debug logging is opt-in. Normal applications should not see noisy AllStak transport errors.
|
|
23
|
-
|
|
24
|
-
Current public status:
|
|
25
|
-
|
|
26
|
-
- Stable runtime SDKs with fail-open certification: JavaScript, React, Next.js runtime, Java/Spring, Python, and Go.
|
|
27
|
-
- Runtime SDKs with useful work but incomplete Stable proof are internal experimental only and must not appear as normal public supported SDKs.
|
|
28
|
-
- React Native/Expo remains internal experimental until real SDK-generated mobile request continuity, emulator/device runtime proof, and mobile session timeline proof are complete.
|
|
29
|
-
- Laravel/PHP is hidden from public Stable status. Plain PHP cannot provide the same async worker guarantees without framework/deferred queue fixtures, and Laravel middleware fixtures are not yet certified.
|
|
30
|
-
- Flutter is hidden from public Stable status until HTTP wrapper, native crash, lifecycle hook, and app-runtime fail-open fixtures pass.
|
|
31
|
-
- Non-JS OpenTelemetry bridges were not found in this SDK workspace. They must not be advertised as supported.
|
|
32
|
-
|
|
33
|
-
When in doubt, the wizard and docs must prefer data loss over application risk.
|
package/docs/beta/restore.md
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
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.
|
|
@@ -1,133 +0,0 @@
|
|
|
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`.
|