@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/README.md
CHANGED
|
@@ -1,147 +1,71 @@
|
|
|
1
1
|
# @allstak/wizard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@allstak/wizard)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
your project with one command where automation is complete, and shows
|
|
7
|
-
Manual/light setup guidance where the runtime is Stable but automation is not
|
|
8
|
-
finished. Designed to be **honest by default**: runtime stability and wizard
|
|
9
|
-
automation maturity are separate claims.
|
|
10
|
-
|
|
11
|
-
## Public SDK Status
|
|
12
|
-
|
|
13
|
-
| Integration | Runtime status | Wizard status | Notes |
|
|
14
|
-
|-------------|----------------|-------------------|-------|
|
|
15
|
-
| `js` (JavaScript / TypeScript) | Stable | Stable | Validated end-to-end; wizard can install and wire init. |
|
|
16
|
-
| `react` (Vite or CRA) | Stable | Stable | Validated end-to-end; wizard can install and wire common app entry patterns. |
|
|
17
|
-
| `react-native` (Expo + bare RN) | Stable | Manual/light | Runtime is Stable; wizard provides setup guidance. |
|
|
18
|
-
| `next` (13+, app + pages router) | Beta | Beta | Runtime is Beta (certification score 32); wizard provides App Router and pages-router onboarding. Edge Runtime and Server Actions are not certified. |
|
|
19
|
-
| `java` (Java / Spring Boot) | Beta | Manual/light | Runtime is Beta (certification score 34); wizard provides setup guidance. |
|
|
20
|
-
| `python` | Beta | Manual/light | Runtime is Beta (certification score 34); wizard provides setup guidance. |
|
|
21
|
-
| `go` | Beta | Manual/light | Runtime is Beta (certification score 33); wizard provides setup guidance. |
|
|
22
|
-
|
|
23
|
-
`allstak-wizard list` prints public runtime SDKs and makes wizard maturity
|
|
24
|
-
explicit. Manual/light entries are setup guidance, not full automation.
|
|
25
|
-
|
|
26
|
-
## Install + run
|
|
7
|
+
One command to install and configure AllStak in any project.
|
|
27
8
|
|
|
28
9
|
```bash
|
|
29
|
-
# Show help (also fetches and runs the package via npx).
|
|
30
|
-
npx @allstak/wizard --help
|
|
31
|
-
|
|
32
|
-
# Authenticate against AllStak (email OTP, optional 2FA).
|
|
33
|
-
npx @allstak/wizard login
|
|
34
|
-
|
|
35
|
-
# Configure your project (auto-detects React / Next / Node).
|
|
36
10
|
npx @allstak/wizard -i react
|
|
37
|
-
|
|
38
|
-
# Verify with a real test event roundtrip.
|
|
39
|
-
npx @allstak/wizard doctor --live-probe \
|
|
40
|
-
--api-key ask_live_... \
|
|
41
|
-
--project-id <project-uuid>
|
|
42
11
|
```
|
|
43
12
|
|
|
44
|
-
|
|
13
|
+
## Features
|
|
45
14
|
|
|
46
|
-
|
|
15
|
+
- **Auto-detection** -- detects your framework and wires the right SDK automatically
|
|
16
|
+
- **Safe mutations** -- every file change is snapshotted and fully reversible
|
|
17
|
+
- **Doctor** -- diagnoses connectivity, config, and integration health in seconds
|
|
18
|
+
- **Dry-run mode** -- preview every change before writing a single file
|
|
19
|
+
- **CI-friendly** -- supports API key auth and `--json` output for automation
|
|
20
|
+
- **Self-hosted ready** -- configurable API, ingest, and dashboard endpoints
|
|
47
21
|
|
|
48
|
-
|
|
49
|
-
`/api/v1/auth/*` endpoints on `api.allstak.sa`.
|
|
22
|
+
## Quickstart
|
|
50
23
|
|
|
51
24
|
```bash
|
|
52
|
-
|
|
53
|
-
allstak
|
|
54
|
-
allstak-wizard logout # revoke session + clear local credentials
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Supports:
|
|
58
|
-
|
|
59
|
-
- **Email OTP** primary flow (`/api/v1/auth/request-otp` → `/api/v1/auth/verify-otp`).
|
|
60
|
-
- **TOTP** second factor when enabled on the account.
|
|
61
|
-
- **JWT refresh** with proactive 60s pre-expiry refresh + token rotation.
|
|
62
|
-
- **CI mode** via `--api-key` / `ALLSTAK_API_KEY` (skip login entirely).
|
|
63
|
-
- **Cross-platform credential storage**: macOS Keychain, Linux Secret
|
|
64
|
-
Service (`secret-tool`), AES-256-GCM encrypted-file fallback.
|
|
65
|
-
|
|
66
|
-
`--api-key` is for project-scoped data-plane operations (sending events).
|
|
67
|
-
The user JWT is for control-plane operations (orgs, projects, doctor). The
|
|
68
|
-
two are NOT interchangeable — that mirrors the backend's design.
|
|
69
|
-
|
|
70
|
-
## Commands
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
init [-i <integration>] [--api-key|--org|--project|--release|...] [--dry-run] [-y]
|
|
74
|
-
doctor [-i <integration>] [--live-probe --api-key --project-id <uuid>]
|
|
75
|
-
repair -i <integration> [--dry-run]
|
|
76
|
-
uninstall -i <integration> [-y] [--dry-run]
|
|
77
|
-
list
|
|
78
|
-
|
|
79
|
-
login [--email <e> --code <c>] [--totp <c>]
|
|
80
|
-
logout [--local-only]
|
|
81
|
-
whoami [--verify]
|
|
82
|
-
|
|
83
|
-
orgs list
|
|
84
|
-
projects list [--org <id>]
|
|
85
|
-
projects create [--name --slug --platform --with-api-key]
|
|
86
|
-
|
|
87
|
-
restore list
|
|
88
|
-
restore show <id|latest>
|
|
89
|
-
restore apply <id|latest> [--files=a,b,c] [--dry-run] [-y]
|
|
90
|
-
restore diff <id|latest>
|
|
91
|
-
|
|
92
|
-
config validate
|
|
93
|
-
config migrate [--dry-run]
|
|
94
|
-
```
|
|
25
|
+
# 1. Authenticate
|
|
26
|
+
npx @allstak/wizard login
|
|
95
27
|
|
|
96
|
-
|
|
28
|
+
# 2. Install an SDK into your project
|
|
29
|
+
npx @allstak/wizard -i react
|
|
97
30
|
|
|
31
|
+
# 3. Verify the setup
|
|
32
|
+
npx @allstak/wizard doctor
|
|
98
33
|
```
|
|
99
|
-
--debug verbose debug logging
|
|
100
|
-
--json machine-readable output to stdout (status text → stderr)
|
|
101
|
-
--no-telemetry disable anonymous usage telemetry for this run
|
|
102
|
-
--telemetry-debug print the telemetry payload to stderr without sending
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Telemetry & privacy
|
|
106
34
|
|
|
107
|
-
|
|
108
|
-
beta. An HTTP provider exists (`httpTelemetry({ endpoint })`) for operators
|
|
109
|
-
to wire in once a backend telemetry endpoint is decided on.
|
|
110
|
-
|
|
111
|
-
Three independent ways to opt out, any one suffices:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
npx @allstak/wizard --no-telemetry ...
|
|
115
|
-
ALLSTAK_WIZARD_TELEMETRY=0 npx @allstak/wizard ...
|
|
116
|
-
# Or: leave the default noop provider in place (no operator config).
|
|
117
|
-
```
|
|
35
|
+
The wizard installs the SDK, patches your entry files, and configures source maps. Run `doctor` at any time to validate the integration.
|
|
118
36
|
|
|
119
|
-
|
|
37
|
+
## Supported Integrations
|
|
120
38
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
39
|
+
| Integration | Runtime | Wizard |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `js` (JavaScript / TypeScript) | Stable | Stable |
|
|
42
|
+
| `react` (Vite or CRA) | Stable | Stable |
|
|
43
|
+
| `react-native` (Expo + bare RN) | Stable | Setup guide |
|
|
44
|
+
| `next` (13+, App + Pages router) | Beta | Beta |
|
|
45
|
+
| `java` (Spring Boot) | Beta | Setup guide |
|
|
46
|
+
| `python` | Beta | Setup guide |
|
|
47
|
+
| `go` | Beta | Setup guide |
|
|
124
48
|
|
|
125
|
-
|
|
126
|
-
collect:
|
|
49
|
+
Run `npx @allstak/wizard list` to see all available integrations.
|
|
127
50
|
|
|
128
|
-
|
|
129
|
-
- Org names, project names, project ids, org ids
|
|
130
|
-
- File paths (absolute or relative)
|
|
131
|
-
- Env-var values
|
|
132
|
-
- Source code, error message text, stack frames
|
|
133
|
-
- Email addresses, IP addresses, hostnames
|
|
51
|
+
## Commands
|
|
134
52
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
53
|
+
| Command | Description |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `login` | Authenticate via email OTP (with optional TOTP) |
|
|
56
|
+
| `init -i <integration>` | Install and configure an SDK |
|
|
57
|
+
| `doctor` | Run diagnostic checks on your setup |
|
|
58
|
+
| `repair -i <integration>` | Fix a broken integration in place |
|
|
59
|
+
| `uninstall -i <integration>` | Cleanly remove an SDK |
|
|
60
|
+
| `restore list / apply / diff` | Browse and restore file snapshots |
|
|
61
|
+
| `config validate` | Check your project config file |
|
|
62
|
+
| `whoami` | Show the current authenticated user |
|
|
138
63
|
|
|
139
|
-
|
|
64
|
+
All commands support `--dry-run`, `--json`, and `--debug`. See `npx @allstak/wizard --help` for the full reference.
|
|
140
65
|
|
|
141
|
-
##
|
|
66
|
+
## Configuration
|
|
142
67
|
|
|
143
|
-
|
|
144
|
-
`--host`, etc. on every wizard invocation.
|
|
68
|
+
Create an optional `allstak.config.ts` (or `.mjs`, `.js`, `.cjs`, `.json`) to avoid repeating flags:
|
|
145
69
|
|
|
146
70
|
```ts
|
|
147
71
|
import { defineConfig } from '@allstak/wizard/config';
|
|
@@ -152,180 +76,63 @@ export default defineConfig({
|
|
|
152
76
|
project: 'my-project',
|
|
153
77
|
environment: 'production',
|
|
154
78
|
release: process.env.GIT_SHA,
|
|
155
|
-
sourceMaps: {
|
|
156
|
-
enabled: true,
|
|
157
|
-
ignore: ['node_modules'],
|
|
158
|
-
},
|
|
159
|
-
selfHosted: {
|
|
160
|
-
apiHost: 'https://api.allstak.example',
|
|
161
|
-
ingestHost: 'https://api.allstak.example',
|
|
162
|
-
dashboardHost: 'https://app.allstak.example',
|
|
163
|
-
},
|
|
79
|
+
sourceMaps: { enabled: true, ignore: ['node_modules'] },
|
|
164
80
|
});
|
|
165
81
|
```
|
|
166
82
|
|
|
167
|
-
|
|
83
|
+
Precedence: CLI flag > environment variable > config file > built-in default.
|
|
168
84
|
|
|
169
|
-
|
|
85
|
+
Full reference: [docs/config.md](./docs/beta/config.md)
|
|
170
86
|
|
|
171
|
-
|
|
172
|
-
allstak-wizard config validate
|
|
173
|
-
```
|
|
87
|
+
## Doctor
|
|
174
88
|
|
|
175
|
-
|
|
89
|
+
Doctor runs a fixed sequence of checks -- auth, reachability, config, integration, event ingest, release linkage, and source maps -- and reports `pass`, `warn`, `fail`, or `skip` with an actionable fix for each.
|
|
176
90
|
|
|
177
91
|
```bash
|
|
178
|
-
|
|
179
|
-
allstak
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Full reference: [`docs/beta/config.md`](./docs/beta/config.md).
|
|
92
|
+
# Offline checks only
|
|
93
|
+
npx @allstak/wizard doctor
|
|
183
94
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
```bash
|
|
187
|
-
allstak-wizard doctor # offline check
|
|
188
|
-
allstak-wizard doctor --live-probe \ # send + verify a real event
|
|
95
|
+
# Full live verification (sends a test event and confirms ingestion)
|
|
96
|
+
npx @allstak/wizard doctor --live-probe \
|
|
189
97
|
--api-key ask_live_... --project-id <uuid>
|
|
190
98
|
```
|
|
191
99
|
|
|
192
|
-
|
|
193
|
-
integration → event-ingest → release-linkage → source-maps`. Each stage
|
|
194
|
-
reports `pass`/`warn`/`fail`/`skip` with an actionable fix. Live probe POSTs
|
|
195
|
-
to `/ingest/v1/errors`, polls `/api/v1/errors`, and prints the dashboard URL
|
|
196
|
-
of the captured event.
|
|
100
|
+
Full reference: [docs/doctor.md](./docs/beta/doctor.md)
|
|
197
101
|
|
|
198
|
-
|
|
102
|
+
## Privacy
|
|
199
103
|
|
|
200
|
-
|
|
201
|
-
[`docs/beta/reliability.md`](./docs/beta/reliability.md). Wizard-generated
|
|
202
|
-
runtime integrations must be fail-open: AllStak ingest outages should drop or
|
|
203
|
-
delay telemetry, not break the host application.
|
|
104
|
+
The wizard collects minimal anonymous usage telemetry (version, command, OS family, outcome). It never collects API keys, file paths, source code, or personally identifiable information.
|
|
204
105
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
Every wizard mutation is captured under
|
|
208
|
-
`.allstak-wizard/backups/<id>/manifest.json` plus per-file pre-images.
|
|
106
|
+
Opt out with any of:
|
|
209
107
|
|
|
210
108
|
```bash
|
|
211
|
-
allstak
|
|
212
|
-
allstak
|
|
213
|
-
allstak-wizard restore diff latest
|
|
214
|
-
allstak-wizard restore apply latest [--files=src/main.tsx]
|
|
109
|
+
npx @allstak/wizard --no-telemetry ...
|
|
110
|
+
ALLSTAK_WIZARD_TELEMETRY=0 npx @allstak/wizard ...
|
|
215
111
|
```
|
|
216
112
|
|
|
217
|
-
Full
|
|
113
|
+
Full policy: [docs/privacy.md](./docs/beta/privacy.md)
|
|
218
114
|
|
|
219
|
-
##
|
|
220
|
-
|
|
221
|
-
22 canonical error codes — stable across releases (added; never renamed).
|
|
222
|
-
Both human and `--json` output expose `{code, stage, subcode?, message,
|
|
223
|
-
hint}`. Catalog: [`docs/errors.md`](./docs/errors.md).
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
$ allstak-wizard --json -i react -y --skip-deps
|
|
227
|
-
{
|
|
228
|
-
"outcome": "failure",
|
|
229
|
-
"errorCode": "E_AUTH_REQUIRED",
|
|
230
|
-
"data": { "error": {
|
|
231
|
-
"code": "E_AUTH_REQUIRED",
|
|
232
|
-
"stage": "auth",
|
|
233
|
-
"subcode": "E_MISSING_KEY",
|
|
234
|
-
"message": "...",
|
|
235
|
-
"hint": "Pass --api-key or run `allstak login`."
|
|
236
|
-
} }
|
|
237
|
-
}
|
|
238
|
-
```
|
|
115
|
+
## Self-Hosted Deployments
|
|
239
116
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
## Self-hosted
|
|
243
|
-
|
|
244
|
-
Pass `--host`, `--ingest-host`, `--dashboard-host` directly, or set
|
|
245
|
-
`selfHosted.*` in `allstak.config.*`. The wizard never assumes
|
|
246
|
-
`api.allstak.sa`.
|
|
247
|
-
|
|
248
|
-
**Caveat:** `allstak-java-sdk` currently hardcodes its host. Until that
|
|
249
|
-
SDK ships a configurable `host` field, the wizard's `--host` flag is a
|
|
250
|
-
no-op for `-i java`. Spec for the SDK fix:
|
|
251
|
-
[`docs/architecture/v02-java-host-fix-spec.md`](./docs/architecture/v02-java-host-fix-spec.md).
|
|
252
|
-
|
|
253
|
-
## Architecture
|
|
254
|
-
|
|
255
|
-
- **Registry** — every integration is an `Integration` object with
|
|
256
|
-
`detect`, `plan`, `install`, `patch`, `validate`, `uninstall`, `repair`,
|
|
257
|
-
`doctor` methods. New integrations register themselves; the CLI is
|
|
258
|
-
integration-agnostic.
|
|
259
|
-
- **Transaction** — every file mutation snapshots before write, syntax-
|
|
260
|
-
validates after write, and rolls back the entire batch on any failure.
|
|
261
|
-
- **Persistent snapshots** — alongside in-memory rollback, every run
|
|
262
|
-
writes a backup under `.allstak-wizard/backups/<id>/` for cross-run
|
|
263
|
-
recovery via `restore`.
|
|
264
|
-
- **Markers** — every injected region wrapped with `>>> allstak-wizard:v1`
|
|
265
|
-
markers. Re-runs replace in place (idempotent). `uninstall` removes the
|
|
266
|
-
block cleanly.
|
|
267
|
-
- **AST patching** — `magicast` (recast under the hood) for JS/TS imports;
|
|
268
|
-
managed-block hints for non-AST patches (Vite plugins, Next config).
|
|
269
|
-
- **Dry-run** — every command supports `--dry-run`; transaction layer
|
|
270
|
-
captures the diff and skips disk writes.
|
|
271
|
-
- **Source-map providers** — pluggable abstraction (`vite`, `webpack`,
|
|
272
|
-
`next`, `metro`); integrations select a provider by id.
|
|
273
|
-
- **Lifecycle hooks** — `beforeInstall`/`afterInstall`/`beforePatch`/
|
|
274
|
-
`afterPatch`/`beforeRollback`/`afterRollback`/`beforeUninstall`/
|
|
275
|
-
`afterUninstall` for telemetry + plugin extensions.
|
|
276
|
-
|
|
277
|
-
Full design docs: [`docs/architecture/`](./docs/architecture/).
|
|
278
|
-
|
|
279
|
-
## Development from source
|
|
117
|
+
Point the wizard at your own AllStak instance:
|
|
280
118
|
|
|
281
119
|
```bash
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
npm run build # emits dist/ with .d.ts + source maps
|
|
287
|
-
npx tsx src/cli.ts --help # run from source
|
|
288
|
-
|
|
289
|
-
# Smoke against a fixture (no network, no SDK install):
|
|
290
|
-
cd fixtures/react-vite
|
|
291
|
-
ALLSTAK_API_KEY=ask_test \
|
|
292
|
-
npx --prefix ../.. tsx ../../src/cli.ts -i react --dry-run -y --skip-deps
|
|
120
|
+
npx @allstak/wizard -i react \
|
|
121
|
+
--host https://api.allstak.example \
|
|
122
|
+
--ingest-host https://api.allstak.example \
|
|
123
|
+
--dashboard-host https://app.allstak.example
|
|
293
124
|
```
|
|
294
125
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
| Status | Count |
|
|
298
|
-
|--------|-------|
|
|
299
|
-
| Type-check | clean |
|
|
300
|
-
| Unit + integration tests | **157 / 157** passing |
|
|
301
|
-
| Build | clean (.js + .d.ts + source maps) |
|
|
302
|
-
|
|
303
|
-
Tests run on temp-dir fixtures (no network, no real SDK install) and
|
|
304
|
-
validate idempotency, rollback, dry-run, restore round-trip, error catalog
|
|
305
|
-
coverage, telemetry payload contract, and config migration plumbing.
|
|
126
|
+
Or set `selfHosted` in your config file. See [docs/config.md](./docs/beta/config.md) for details.
|
|
306
127
|
|
|
307
|
-
##
|
|
128
|
+
## Links
|
|
308
129
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
2. **Source-maps end-to-end** — upload + symbolication round-trip against
|
|
315
|
-
`/api/v1/sourcemaps/upload`. Spec:
|
|
316
|
-
[`docs/architecture/v02-sourcemaps-e2e-spec.md`](./docs/architecture/v02-sourcemaps-e2e-spec.md).
|
|
317
|
-
3. **Astro support** — currently falls through to `js` (env vars only).
|
|
318
|
-
4. **Java SDK host fix** — coordinate with `allstak-java-sdk` to make
|
|
319
|
-
host configurable.
|
|
320
|
-
5. **Backend SDK framework wiring** — NestJS `main.ts`, Spring Boot
|
|
321
|
-
`application.yml`, Django/FastAPI/Flask/Rails/.NET/Go/PHP entry-point
|
|
322
|
-
patching with per-framework fixture validation.
|
|
323
|
-
6. **Telemetry HTTP endpoint** — backend contract pending.
|
|
130
|
+
- [Documentation](https://docs.allstak.sa)
|
|
131
|
+
- [Dashboard](https://app.allstak.sa)
|
|
132
|
+
- [Issues](https://github.com/allstak-io/sdks/issues)
|
|
133
|
+
- [Architecture](./docs/architecture/)
|
|
134
|
+
- [Changelog](./CHANGELOG.md)
|
|
324
135
|
|
|
325
136
|
## License
|
|
326
137
|
|
|
327
|
-
Apache-2.0
|
|
328
|
-
|
|
329
|
-
## Issues
|
|
330
|
-
|
|
331
|
-
[github.com/allstak-io/sdks/issues](https://github.com/allstak-io/sdks/issues)
|
|
138
|
+
Apache-2.0 -- see [LICENSE](./LICENSE).
|
package/dist/cli.js
CHANGED
|
@@ -44,6 +44,13 @@ function reporterFor(parent) {
|
|
|
44
44
|
const json = parent.optsWithGlobals().json === true || parent.opts().json === true;
|
|
45
45
|
return createReporter(json ? 'json' : 'human');
|
|
46
46
|
}
|
|
47
|
+
function isNonInteractive() {
|
|
48
|
+
if (process.env.CI === 'true' || process.env.CI === '1')
|
|
49
|
+
return true;
|
|
50
|
+
if (!process.stdin.isTTY)
|
|
51
|
+
return true;
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
47
54
|
// ─── init / doctor / repair / uninstall (project-level commands) ────────────
|
|
48
55
|
program
|
|
49
56
|
.command('init', { isDefault: true })
|
|
@@ -79,6 +86,7 @@ program
|
|
|
79
86
|
skipDeps: opts.skipDeps,
|
|
80
87
|
skipSourceMaps: opts.skipSourceMaps,
|
|
81
88
|
yes: opts.yes,
|
|
89
|
+
nonInteractive: isNonInteractive(),
|
|
82
90
|
snapshotKeep: Number(opts.snapshotKeep),
|
|
83
91
|
reporter: reporterFor(cmd.parent),
|
|
84
92
|
}));
|
|
@@ -31,6 +31,7 @@ export interface BuiltContext {
|
|
|
31
31
|
* - allstak.config.* discovery + load
|
|
32
32
|
* - precedence resolution: CLI > env > config > defaults
|
|
33
33
|
* - api-key resolution (with apiKeyOptional for read-only commands)
|
|
34
|
+
* - interactive project/key selection when logged in but no key provided
|
|
34
35
|
* - lifecycle emitter creation
|
|
35
36
|
*/
|
|
36
37
|
export declare function buildContext(opts: BuildContextOptions): Promise<BuiltContext>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import * as p from '@clack/prompts';
|
|
1
2
|
import { findProjectRoot } from '../util/paths.js';
|
|
2
3
|
import { detectFramework } from '../detect/index.js';
|
|
3
4
|
import { LifecycleEmitter } from '../lifecycle/hooks.js';
|
|
4
|
-
import { resolveApiKey } from '../api/auth.js';
|
|
5
|
+
import { resolveApiKey, loadUserCredentials } from '../api/auth.js';
|
|
6
|
+
import { listProjects, listApiKeys, createProject, createApiKey } from '../api/projects-client.js';
|
|
5
7
|
import { loadConfig, resolveConfig } from '../config/index.js';
|
|
8
|
+
import { WizardError } from '../util/errors.js';
|
|
6
9
|
/**
|
|
7
10
|
* Shared context factory used by every command. Centralises:
|
|
8
11
|
* - project-root detection
|
|
@@ -10,6 +13,7 @@ import { loadConfig, resolveConfig } from '../config/index.js';
|
|
|
10
13
|
* - allstak.config.* discovery + load
|
|
11
14
|
* - precedence resolution: CLI > env > config > defaults
|
|
12
15
|
* - api-key resolution (with apiKeyOptional for read-only commands)
|
|
16
|
+
* - interactive project/key selection when logged in but no key provided
|
|
13
17
|
* - lifecycle emitter creation
|
|
14
18
|
*/
|
|
15
19
|
export async function buildContext(opts) {
|
|
@@ -30,19 +34,34 @@ export async function buildContext(opts) {
|
|
|
30
34
|
};
|
|
31
35
|
const resolvedConfig = resolveConfig(loaded?.config ?? null, cliInputs);
|
|
32
36
|
let apiKey = '';
|
|
37
|
+
let resolvedProject = resolvedConfig.project ?? '';
|
|
38
|
+
let resolvedOrg = resolvedConfig.organization ?? '';
|
|
33
39
|
try {
|
|
34
40
|
apiKey = resolveApiKey({ apiKey: opts.apiKey });
|
|
35
41
|
}
|
|
36
42
|
catch (err) {
|
|
37
|
-
if (
|
|
38
|
-
|
|
43
|
+
if (opts.apiKeyOptional) {
|
|
44
|
+
// Read-only commands don't need an API key.
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
// No explicit API key — try interactive project selection via stored credentials.
|
|
48
|
+
const host = resolvedConfig.hosts.api;
|
|
49
|
+
const resolved = await resolveApiKeyInteractively(host);
|
|
50
|
+
if (resolved) {
|
|
51
|
+
apiKey = resolved.apiKey;
|
|
52
|
+
resolvedProject = resolved.projectSlug;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
throw err;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
39
58
|
}
|
|
40
59
|
const ctx = {
|
|
41
60
|
projectRoot,
|
|
42
61
|
cwd,
|
|
43
62
|
apiKey,
|
|
44
|
-
org:
|
|
45
|
-
project:
|
|
63
|
+
org: resolvedOrg,
|
|
64
|
+
project: resolvedProject,
|
|
46
65
|
environment: resolvedConfig.environment,
|
|
47
66
|
release: resolvedConfig.release,
|
|
48
67
|
host: resolvedConfig.hosts.api,
|
|
@@ -58,4 +77,60 @@ export async function buildContext(opts) {
|
|
|
58
77
|
};
|
|
59
78
|
return { ctx, resolvedConfig, configSource: loaded?.source ?? null };
|
|
60
79
|
}
|
|
80
|
+
async function resolveApiKeyInteractively(host) {
|
|
81
|
+
if (!process.stdin.isTTY)
|
|
82
|
+
return null;
|
|
83
|
+
const creds = await loadUserCredentials(host);
|
|
84
|
+
if (!creds)
|
|
85
|
+
return null;
|
|
86
|
+
const projects = await listProjects(host, creds.accessToken);
|
|
87
|
+
if (projects.items.length === 0) {
|
|
88
|
+
const shouldCreate = await p.confirm({ message: 'No projects found. Create one?' });
|
|
89
|
+
if (p.isCancel(shouldCreate) || !shouldCreate)
|
|
90
|
+
return null;
|
|
91
|
+
const name = await p.text({
|
|
92
|
+
message: 'Project name:',
|
|
93
|
+
validate: (v) => (v.length >= 2 ? undefined : 'min 2 chars'),
|
|
94
|
+
});
|
|
95
|
+
if (p.isCancel(name))
|
|
96
|
+
return null;
|
|
97
|
+
const nameStr = String(name);
|
|
98
|
+
const slug = nameStr.toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-|-$/g, '');
|
|
99
|
+
const proj = await createProject(host, creds.accessToken, { name: nameStr, slug });
|
|
100
|
+
const key = await createApiKey(host, creds.accessToken, proj.id, 'wizard-default');
|
|
101
|
+
if (!key.key) {
|
|
102
|
+
throw new WizardError('E_AUTH_REQUIRED', 'Created project but backend did not return an API key.', { subcode: 'E_KEY_CREATE_FAILED' });
|
|
103
|
+
}
|
|
104
|
+
return { apiKey: key.key, projectSlug: proj.slug };
|
|
105
|
+
}
|
|
106
|
+
let projectId;
|
|
107
|
+
let projectSlug;
|
|
108
|
+
if (projects.items.length === 1) {
|
|
109
|
+
projectId = projects.items[0].id;
|
|
110
|
+
projectSlug = projects.items[0].slug;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const choice = await p.select({
|
|
114
|
+
message: 'Select a project:',
|
|
115
|
+
options: projects.items.map((proj) => ({
|
|
116
|
+
value: proj.id,
|
|
117
|
+
label: proj.name,
|
|
118
|
+
hint: proj.slug,
|
|
119
|
+
})),
|
|
120
|
+
});
|
|
121
|
+
if (p.isCancel(choice))
|
|
122
|
+
return null;
|
|
123
|
+
projectId = choice;
|
|
124
|
+
projectSlug = projects.items.find((proj) => proj.id === projectId)?.slug ?? 'unknown';
|
|
125
|
+
}
|
|
126
|
+
const keys = await listApiKeys(host, creds.accessToken, projectId);
|
|
127
|
+
if (keys.items.length > 0) {
|
|
128
|
+
// Existing keys don't include the raw value — create a new one.
|
|
129
|
+
}
|
|
130
|
+
const key = await createApiKey(host, creds.accessToken, projectId, 'wizard-default');
|
|
131
|
+
if (!key.key) {
|
|
132
|
+
throw new WizardError('E_AUTH_REQUIRED', 'Backend did not return an API key. Check project API key quota.', { subcode: 'E_KEY_CREATE_FAILED' });
|
|
133
|
+
}
|
|
134
|
+
return { apiKey: key.key, projectSlug };
|
|
135
|
+
}
|
|
61
136
|
//# sourceMappingURL=_context.js.map
|
package/dist/registry/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import { javaIntegration } from '../integrations/java/index.js';
|
|
|
6
6
|
import { pythonIntegration } from '../integrations/python/index.js';
|
|
7
7
|
import { goIntegration } from '../integrations/go/index.js';
|
|
8
8
|
import { expoIntegration } from '../integrations/expo/index.js';
|
|
9
|
+
import { fastifyIntegration } from '../integrations/fastify/index.js';
|
|
10
|
+
import { nestjsIntegration } from '../integrations/nestjs/index.js';
|
|
9
11
|
let bootstrapped = false;
|
|
10
12
|
export function bootstrapRegistry() {
|
|
11
13
|
if (bootstrapped)
|
|
@@ -17,6 +19,8 @@ export function bootstrapRegistry() {
|
|
|
17
19
|
registry.register(javaIntegration);
|
|
18
20
|
registry.register(pythonIntegration);
|
|
19
21
|
registry.register(goIntegration);
|
|
22
|
+
registry.register(fastifyIntegration);
|
|
23
|
+
registry.register(nestjsIntegration);
|
|
20
24
|
// Registered but hidden from default public lists via `public: false`.
|
|
21
25
|
// This keeps explicit doctor/repair paths real without presenting Expo/RN
|
|
22
26
|
// as Stable before device/runtime certification is complete.
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Single source of truth for the wizard's own version string. Bumping `package.json`
|
|
3
3
|
* does NOT auto-update this constant — keep them in sync. Tests assert equality.
|
|
4
4
|
*/
|
|
5
|
-
export declare const WIZARD_VERSION = "0.1.
|
|
5
|
+
export declare const WIZARD_VERSION = "0.1.8";
|
|
6
6
|
//# sourceMappingURL=wizard-version.d.ts.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Single source of truth for the wizard's own version string. Bumping `package.json`
|
|
3
3
|
* does NOT auto-update this constant — keep them in sync. Tests assert equality.
|
|
4
4
|
*/
|
|
5
|
-
export const WIZARD_VERSION = '0.1.
|
|
5
|
+
export const WIZARD_VERSION = '0.1.8';
|
|
6
6
|
//# sourceMappingURL=wizard-version.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allstak/wizard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "AllStak SDK installation and configuration wizard. Lists public Stable runtimes, fully/assisted-wires JS, React, and Next.js, and keeps manual-light server SDK setup honest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"allstak-wizard": "./dist/cli.js"
|
|
7
|
+
"allstak-wizard": "./dist/cli.js",
|
|
8
|
+
"allstak": "./dist/cli.js"
|
|
8
9
|
},
|
|
9
10
|
"main": "./dist/index.js",
|
|
10
11
|
"types": "./dist/index.d.ts",
|
|
@@ -60,12 +61,11 @@
|
|
|
60
61
|
},
|
|
61
62
|
"files": [
|
|
62
63
|
"dist",
|
|
64
|
+
"!dist/**/*.map",
|
|
63
65
|
"README.md",
|
|
64
66
|
"LICENSE",
|
|
65
67
|
"CHANGELOG.md",
|
|
66
|
-
"docs/errors.md"
|
|
67
|
-
"docs/architecture",
|
|
68
|
-
"docs/beta"
|
|
68
|
+
"docs/errors.md"
|
|
69
69
|
],
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": ">=18"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-client.d.ts","sourceRoot":"","sources":["../../src/api/auth-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MA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,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE;KAC7C,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAY,EAAE,WAAmB;IAC5D,MAAM,GAAG,GAAG,MAAM,UAAU,CAAa,IAAI,EAAE;QAC7C,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE;KAC7C,CAAC,CAAC;IACH,OAAO,GAAG,CAAC,IAAI,CAAC;AAClB,CAAC"}
|
package/dist/api/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/api/auth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAgB9D;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CA6BnF;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAc/E"}
|
package/dist/api/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/api/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EA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sB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAgBnG"}
|
package/dist/api/client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,GAAW,EAAE,UAAkC,EAAE;IAC3E,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAC3B,MAAM,EAAE,KAAK;YACb,OAAO;YACP,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;SAClC,CAAC,CAAC;QACH,OAAO;YACL,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE;SAC/E,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAClD,CAAC;AACH,CAAC"}
|
package/dist/api/http.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/api/http.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EA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