@allstak/wizard 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -3
- package/LICENSE +191 -0
- package/README.md +35 -32
- package/dist/api/http.d.ts +2 -0
- package/dist/api/http.d.ts.map +1 -1
- package/dist/api/http.js +6 -0
- package/dist/api/http.js.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/certification/fixtures.d.ts +4 -0
- package/dist/certification/fixtures.d.ts.map +1 -0
- package/dist/certification/fixtures.js +109 -0
- package/dist/certification/fixtures.js.map +1 -0
- package/dist/certification/gates.d.ts +10 -0
- package/dist/certification/gates.d.ts.map +1 -0
- package/dist/certification/gates.js +20 -0
- package/dist/certification/gates.js.map +1 -0
- package/dist/certification/index.d.ts +6 -0
- package/dist/certification/index.d.ts.map +1 -0
- package/dist/certification/index.js +5 -0
- package/dist/certification/index.js.map +1 -0
- package/dist/certification/live-backend.d.ts +50 -0
- package/dist/certification/live-backend.d.ts.map +1 -0
- package/dist/certification/live-backend.js +422 -0
- package/dist/certification/live-backend.js.map +1 -0
- package/dist/certification/packages.d.ts +3 -0
- package/dist/certification/packages.d.ts.map +1 -0
- package/dist/certification/packages.js +49 -0
- package/dist/certification/packages.js.map +1 -0
- package/dist/certification/process.d.ts +8 -0
- package/dist/certification/process.d.ts.map +1 -0
- package/dist/certification/process.js +77 -0
- package/dist/certification/process.js.map +1 -0
- package/dist/certification/report.d.ts +3 -0
- package/dist/certification/report.d.ts.map +1 -0
- package/dist/certification/report.js +38 -0
- package/dist/certification/report.js.map +1 -0
- package/dist/certification/runner.d.ts +3 -0
- package/dist/certification/runner.d.ts.map +1 -0
- package/dist/certification/runner.js +299 -0
- package/dist/certification/runner.js.map +1 -0
- package/dist/certification/runtime.d.ts +11 -0
- package/dist/certification/runtime.d.ts.map +1 -0
- package/dist/certification/runtime.js +60 -0
- package/dist/certification/runtime.js.map +1 -0
- package/dist/certification/types.d.ts +73 -0
- package/dist/certification/types.d.ts.map +1 -0
- package/dist/certification/types.js +2 -0
- package/dist/certification/types.js.map +1 -0
- package/dist/cli.js +70 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/certify.d.ts +18 -0
- package/dist/commands/certify.d.ts.map +1 -0
- package/dist/commands/certify.js +27 -0
- package/dist/commands/certify.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.d.ts +5 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +9 -3
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/security-snapshot.d.ts +24 -0
- package/dist/commands/security-snapshot.d.ts.map +1 -0
- package/dist/commands/security-snapshot.js +113 -0
- package/dist/commands/security-snapshot.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/_scaffold.d.ts +2 -1
- package/dist/integrations/_scaffold.d.ts.map +1 -1
- package/dist/integrations/_scaffold.js +36 -13
- package/dist/integrations/_scaffold.js.map +1 -1
- package/dist/integrations/_simple-scaffold.d.ts +5 -2
- package/dist/integrations/_simple-scaffold.d.ts.map +1 -1
- package/dist/integrations/_simple-scaffold.js +3 -0
- package/dist/integrations/_simple-scaffold.js.map +1 -1
- package/dist/integrations/dotnet.d.ts.map +1 -1
- package/dist/integrations/dotnet.js +3 -0
- package/dist/integrations/dotnet.js.map +1 -1
- package/dist/integrations/expo/detect.d.ts +13 -0
- package/dist/integrations/expo/detect.d.ts.map +1 -0
- package/dist/integrations/expo/detect.js +38 -0
- package/dist/integrations/expo/detect.js.map +1 -0
- package/dist/integrations/expo/doctor.d.ts +6 -0
- package/dist/integrations/expo/doctor.d.ts.map +1 -0
- package/dist/integrations/expo/doctor.js +136 -0
- package/dist/integrations/expo/doctor.js.map +1 -0
- package/dist/integrations/expo/files.d.ts +15 -0
- package/dist/integrations/expo/files.d.ts.map +1 -0
- package/dist/integrations/expo/files.js +62 -0
- package/dist/integrations/expo/files.js.map +1 -0
- package/dist/integrations/expo/index.d.ts +24 -0
- package/dist/integrations/expo/index.d.ts.map +1 -0
- package/dist/integrations/expo/index.js +68 -0
- package/dist/integrations/expo/index.js.map +1 -0
- package/dist/integrations/expo/manifest.d.ts +3 -0
- package/dist/integrations/expo/manifest.d.ts.map +1 -0
- package/dist/integrations/expo/manifest.js +39 -0
- package/dist/integrations/expo/manifest.js.map +1 -0
- package/dist/integrations/expo/patch.d.ts +13 -0
- package/dist/integrations/expo/patch.d.ts.map +1 -0
- package/dist/integrations/expo/patch.js +215 -0
- package/dist/integrations/expo/patch.js.map +1 -0
- package/dist/integrations/expo/uninstall.d.ts +4 -0
- package/dist/integrations/expo/uninstall.d.ts.map +1 -0
- package/dist/integrations/expo/uninstall.js +77 -0
- package/dist/integrations/expo/uninstall.js.map +1 -0
- package/dist/integrations/expo.d.ts +8 -1
- package/dist/integrations/expo.d.ts.map +1 -1
- package/dist/integrations/expo.js +8 -11
- package/dist/integrations/expo.js.map +1 -1
- package/dist/integrations/fastify/detect.d.ts +3 -0
- package/dist/integrations/fastify/detect.d.ts.map +1 -0
- package/dist/integrations/fastify/detect.js +12 -0
- package/dist/integrations/fastify/detect.js.map +1 -0
- package/dist/integrations/fastify/doctor.d.ts +3 -0
- package/dist/integrations/fastify/doctor.d.ts.map +1 -0
- package/dist/integrations/fastify/doctor.js +81 -0
- package/dist/integrations/fastify/doctor.js.map +1 -0
- package/dist/integrations/fastify/files.d.ts +17 -0
- package/dist/integrations/fastify/files.d.ts.map +1 -0
- package/dist/integrations/fastify/files.js +51 -0
- package/dist/integrations/fastify/files.js.map +1 -0
- package/dist/integrations/fastify/index.d.ts +3 -0
- package/dist/integrations/fastify/index.d.ts.map +1 -0
- package/dist/integrations/fastify/index.js +47 -0
- package/dist/integrations/fastify/index.js.map +1 -0
- package/dist/integrations/fastify/manifest.d.ts +3 -0
- package/dist/integrations/fastify/manifest.d.ts.map +1 -0
- package/dist/integrations/fastify/manifest.js +34 -0
- package/dist/integrations/fastify/manifest.js.map +1 -0
- package/dist/integrations/fastify/patch.d.ts +27 -0
- package/dist/integrations/fastify/patch.d.ts.map +1 -0
- package/dist/integrations/fastify/patch.js +91 -0
- package/dist/integrations/fastify/patch.js.map +1 -0
- package/dist/integrations/fastify/uninstall.d.ts +4 -0
- package/dist/integrations/fastify/uninstall.d.ts.map +1 -0
- package/dist/integrations/fastify/uninstall.js +18 -0
- package/dist/integrations/fastify/uninstall.js.map +1 -0
- package/dist/integrations/fastify.d.ts +5 -1
- package/dist/integrations/fastify.d.ts.map +1 -1
- package/dist/integrations/fastify.js +5 -9
- package/dist/integrations/fastify.js.map +1 -1
- package/dist/integrations/flutter.d.ts.map +1 -1
- package/dist/integrations/flutter.js +3 -0
- package/dist/integrations/flutter.js.map +1 -1
- package/dist/integrations/go/index.d.ts +3 -0
- package/dist/integrations/go/index.d.ts.map +1 -0
- package/dist/integrations/go/index.js +199 -0
- package/dist/integrations/go/index.js.map +1 -0
- package/dist/integrations/go.d.ts.map +1 -1
- package/dist/integrations/go.js +5 -2
- package/dist/integrations/go.js.map +1 -1
- package/dist/integrations/java/index.d.ts +3 -0
- package/dist/integrations/java/index.d.ts.map +1 -0
- package/dist/integrations/java/index.js +472 -0
- package/dist/integrations/java/index.js.map +1 -0
- package/dist/integrations/java.d.ts.map +1 -1
- package/dist/integrations/java.js +5 -2
- package/dist/integrations/java.js.map +1 -1
- package/dist/integrations/js/manifest.d.ts.map +1 -1
- package/dist/integrations/js/manifest.js +3 -0
- package/dist/integrations/js/manifest.js.map +1 -1
- package/dist/integrations/nestjs/detect.d.ts +3 -0
- package/dist/integrations/nestjs/detect.d.ts.map +1 -0
- package/dist/integrations/nestjs/detect.js +12 -0
- package/dist/integrations/nestjs/detect.js.map +1 -0
- package/dist/integrations/nestjs/doctor.d.ts +3 -0
- package/dist/integrations/nestjs/doctor.d.ts.map +1 -0
- package/dist/integrations/nestjs/doctor.js +76 -0
- package/dist/integrations/nestjs/doctor.js.map +1 -0
- package/dist/integrations/nestjs/files.d.ts +18 -0
- package/dist/integrations/nestjs/files.d.ts.map +1 -0
- package/dist/integrations/nestjs/files.js +39 -0
- package/dist/integrations/nestjs/files.js.map +1 -0
- package/dist/integrations/nestjs/index.d.ts +3 -0
- package/dist/integrations/nestjs/index.d.ts.map +1 -0
- package/dist/integrations/nestjs/index.js +43 -0
- package/dist/integrations/nestjs/index.js.map +1 -0
- package/dist/integrations/nestjs/manifest.d.ts +3 -0
- package/dist/integrations/nestjs/manifest.d.ts.map +1 -0
- package/dist/integrations/nestjs/manifest.js +32 -0
- package/dist/integrations/nestjs/manifest.js.map +1 -0
- package/dist/integrations/nestjs/patch.d.ts +25 -0
- package/dist/integrations/nestjs/patch.d.ts.map +1 -0
- package/dist/integrations/nestjs/patch.js +66 -0
- package/dist/integrations/nestjs/patch.js.map +1 -0
- package/dist/integrations/nestjs/uninstall.d.ts +4 -0
- package/dist/integrations/nestjs/uninstall.d.ts.map +1 -0
- package/dist/integrations/nestjs/uninstall.js +18 -0
- package/dist/integrations/nestjs/uninstall.js.map +1 -0
- package/dist/integrations/nestjs.d.ts +5 -1
- package/dist/integrations/nestjs.d.ts.map +1 -1
- package/dist/integrations/nestjs.js +5 -9
- package/dist/integrations/nestjs.js.map +1 -1
- package/dist/integrations/next/index.js +2 -2
- package/dist/integrations/next/index.js.map +1 -1
- package/dist/integrations/next/manifest.d.ts.map +1 -1
- package/dist/integrations/next/manifest.js +4 -1
- package/dist/integrations/next/manifest.js.map +1 -1
- package/dist/integrations/next/patch.js +8 -3
- package/dist/integrations/next/patch.js.map +1 -1
- package/dist/integrations/next/uninstall.d.ts.map +1 -1
- package/dist/integrations/next/uninstall.js +10 -1
- package/dist/integrations/next/uninstall.js.map +1 -1
- package/dist/integrations/otel.d.ts.map +1 -1
- package/dist/integrations/otel.js +4 -1
- package/dist/integrations/otel.js.map +1 -1
- package/dist/integrations/php.d.ts.map +1 -1
- package/dist/integrations/php.js +16 -3
- package/dist/integrations/php.js.map +1 -1
- package/dist/integrations/python/index.d.ts +3 -0
- package/dist/integrations/python/index.d.ts.map +1 -0
- package/dist/integrations/python/index.js +222 -0
- package/dist/integrations/python/index.js.map +1 -0
- package/dist/integrations/python.d.ts.map +1 -1
- package/dist/integrations/python.js +5 -2
- package/dist/integrations/python.js.map +1 -1
- package/dist/integrations/react/doctor.d.ts.map +1 -1
- package/dist/integrations/react/doctor.js +41 -8
- package/dist/integrations/react/doctor.js.map +1 -1
- package/dist/integrations/react/index.d.ts.map +1 -1
- package/dist/integrations/react/index.js +1 -4
- package/dist/integrations/react/index.js.map +1 -1
- package/dist/integrations/react/manifest.d.ts.map +1 -1
- package/dist/integrations/react/manifest.js +4 -1
- package/dist/integrations/react/manifest.js.map +1 -1
- package/dist/integrations/react/patch.d.ts.map +1 -1
- package/dist/integrations/react/patch.js +120 -8
- package/dist/integrations/react/patch.js.map +1 -1
- package/dist/integrations/react/uninstall.d.ts.map +1 -1
- package/dist/integrations/react/uninstall.js +20 -1
- package/dist/integrations/react/uninstall.js.map +1 -1
- package/dist/integrations/react-native.d.ts.map +1 -1
- package/dist/integrations/react-native.js +3 -0
- package/dist/integrations/react-native.js.map +1 -1
- package/dist/integrations/ruby.d.ts.map +1 -1
- package/dist/integrations/ruby.js +3 -0
- package/dist/integrations/ruby.js.map +1 -1
- package/dist/output/human.d.ts.map +1 -1
- package/dist/output/human.js +38 -7
- package/dist/output/human.js.map +1 -1
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +9 -23
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest.d.ts +8 -0
- package/dist/registry/manifest.d.ts.map +1 -1
- package/dist/security-snapshot/builder.d.ts +3 -0
- package/dist/security-snapshot/builder.d.ts.map +1 -0
- package/dist/security-snapshot/builder.js +343 -0
- package/dist/security-snapshot/builder.js.map +1 -0
- package/dist/security-snapshot/client.d.ts +3 -0
- package/dist/security-snapshot/client.d.ts.map +1 -0
- package/dist/security-snapshot/client.js +38 -0
- package/dist/security-snapshot/client.js.map +1 -0
- package/dist/security-snapshot/index.d.ts +4 -0
- package/dist/security-snapshot/index.d.ts.map +1 -0
- package/dist/security-snapshot/index.js +3 -0
- package/dist/security-snapshot/index.js.map +1 -0
- package/dist/security-snapshot/types.d.ts +57 -0
- package/dist/security-snapshot/types.d.ts.map +1 -0
- package/dist/security-snapshot/types.js +2 -0
- package/dist/security-snapshot/types.js.map +1 -0
- package/dist/sourcemaps/next.js +3 -3
- package/dist/sourcemaps/next.js.map +1 -1
- package/dist/sourcemaps/vite.d.ts.map +1 -1
- package/dist/sourcemaps/vite.js +92 -9
- package/dist/sourcemaps/vite.js.map +1 -1
- package/docs/architecture/v02-sourcemaps-e2e-spec.md +1 -1
- package/docs/beta/expo.md +69 -0
- package/docs/beta/fastify.md +62 -0
- package/docs/beta/known-limitations.md +14 -14
- package/docs/beta/nestjs.md +69 -0
- package/docs/beta/next.md +7 -8
- package/docs/beta/react.md +23 -15
- package/docs/beta/reliability.md +33 -0
- package/package.json +11 -3
package/dist/sourcemaps/vite.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { patchJsModule, ensureImport, removeImport } from '../patchers/js-ast.js';
|
|
4
|
-
import {
|
|
5
|
-
const PKG = '@allstak/
|
|
6
|
-
const
|
|
4
|
+
import { removeManagedSourceBlock } from '../patchers/source-block.js';
|
|
5
|
+
const PKG = '@allstak/react/vite';
|
|
6
|
+
const LEGACY_PKG = '@allstak/js/vite';
|
|
7
|
+
const PKG_NAMED = 'allstakSourcemaps';
|
|
7
8
|
function locate(projectRoot) {
|
|
8
9
|
for (const c of ['vite.config.ts', 'vite.config.mjs', 'vite.config.js']) {
|
|
9
10
|
const full = resolve(projectRoot, c);
|
|
@@ -26,16 +27,18 @@ export const viteSourceMapProvider = {
|
|
|
26
27
|
await patchJsModule(tx, cfg, (mod) => {
|
|
27
28
|
ensureImport(mod, { from: PKG, named: [PKG_NAMED] });
|
|
28
29
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const src = readFileSync(cfg, 'utf8');
|
|
31
|
+
const next = ensureVitePluginConfigured(src, ctx);
|
|
32
|
+
if (next !== src) {
|
|
33
|
+
await tx.write(cfg, next);
|
|
34
|
+
}
|
|
33
35
|
},
|
|
34
36
|
async unwire(ctx, tx) {
|
|
35
37
|
const cfg = locate(ctx.projectRoot);
|
|
36
38
|
if (!cfg)
|
|
37
39
|
return;
|
|
38
40
|
await patchJsModule(tx, cfg, (mod) => removeImport(mod, PKG));
|
|
41
|
+
await patchJsModule(tx, cfg, (mod) => removeImport(mod, LEGACY_PKG));
|
|
39
42
|
await removeManagedSourceBlock(tx, cfg, 'slash');
|
|
40
43
|
},
|
|
41
44
|
async status(ctx) {
|
|
@@ -43,10 +46,10 @@ export const viteSourceMapProvider = {
|
|
|
43
46
|
if (!cfg)
|
|
44
47
|
return { provider: 'vite', state: 'missing', configFile: null };
|
|
45
48
|
const src = readFileSync(cfg, 'utf8');
|
|
46
|
-
const wired = src.includes(PKG);
|
|
49
|
+
const wired = src.includes(PKG) || src.includes(LEGACY_PKG);
|
|
47
50
|
if (!wired)
|
|
48
51
|
return { provider: 'vite', state: 'missing', configFile: cfg };
|
|
49
|
-
if (!src.includes(PKG_NAMED)) {
|
|
52
|
+
if (!src.includes(PKG_NAMED) && !src.includes('allstakVitePlugin')) {
|
|
50
53
|
return {
|
|
51
54
|
provider: 'vite',
|
|
52
55
|
state: 'drifted',
|
|
@@ -54,7 +57,87 @@ export const viteSourceMapProvider = {
|
|
|
54
57
|
reason: `${PKG} imported but ${PKG_NAMED} not referenced — plugin may not be invoked`,
|
|
55
58
|
};
|
|
56
59
|
}
|
|
60
|
+
if (!/plugins\s*:\s*\[[\s\S]*allstak(?:Sourcemaps|VitePlugin)\s*\(/.test(src)) {
|
|
61
|
+
return {
|
|
62
|
+
provider: 'vite',
|
|
63
|
+
state: 'drifted',
|
|
64
|
+
configFile: cfg,
|
|
65
|
+
reason: 'source-map helper is imported but not present in the Vite plugins array',
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (!/build\s*:\s*\{[\s\S]*sourcemap\s*:\s*true/.test(src)) {
|
|
69
|
+
return {
|
|
70
|
+
provider: 'vite',
|
|
71
|
+
state: 'drifted',
|
|
72
|
+
configFile: cfg,
|
|
73
|
+
reason: 'Vite build.sourcemap is not enabled',
|
|
74
|
+
};
|
|
75
|
+
}
|
|
57
76
|
return { provider: 'vite', state: 'wired', configFile: cfg };
|
|
58
77
|
},
|
|
59
78
|
};
|
|
79
|
+
function ensureVitePluginConfigured(src, ctx) {
|
|
80
|
+
let next = src;
|
|
81
|
+
if (!next.includes(`${PKG_NAMED}(`)) {
|
|
82
|
+
next = insertIntoPluginsArray(next, [
|
|
83
|
+
`${PKG_NAMED}({`,
|
|
84
|
+
` release: process.env.ALLSTAK_RELEASE ?? '${ctx.release ?? ''}',`,
|
|
85
|
+
` token: process.env.ALLSTAK_UPLOAD_TOKEN,`,
|
|
86
|
+
` dist: process.env.ALLSTAK_DIST ?? 'web',`,
|
|
87
|
+
` silent: process.env.CI !== 'true',`,
|
|
88
|
+
` })`,
|
|
89
|
+
].join('\n '));
|
|
90
|
+
}
|
|
91
|
+
next = ensureSourcemapEnabled(next);
|
|
92
|
+
return next;
|
|
93
|
+
}
|
|
94
|
+
function insertIntoPluginsArray(src, pluginExpr) {
|
|
95
|
+
const match = /plugins\s*:\s*\[/.exec(src);
|
|
96
|
+
if (!match || match.index === undefined)
|
|
97
|
+
return src;
|
|
98
|
+
const open = src.indexOf('[', match.index);
|
|
99
|
+
const close = findMatching(src, open, '[', ']');
|
|
100
|
+
if (close < 0)
|
|
101
|
+
return src;
|
|
102
|
+
const beforeClose = src.slice(0, close).trimEnd();
|
|
103
|
+
const needsComma = !beforeClose.endsWith('[') && !beforeClose.endsWith(',');
|
|
104
|
+
const insertion = `${needsComma ? ',' : ''}\n ${pluginExpr},`;
|
|
105
|
+
return `${src.slice(0, close)}${insertion}${src.slice(close)}`;
|
|
106
|
+
}
|
|
107
|
+
function ensureSourcemapEnabled(src) {
|
|
108
|
+
if (/build\s*:\s*\{[\s\S]*sourcemap\s*:\s*true/.test(src))
|
|
109
|
+
return src;
|
|
110
|
+
const match = /build\s*:\s*\{/.exec(src);
|
|
111
|
+
if (!match || match.index === undefined)
|
|
112
|
+
return src;
|
|
113
|
+
const open = src.indexOf('{', match.index);
|
|
114
|
+
return `${src.slice(0, open + 1)}\n sourcemap: true,${src.slice(open + 1)}`;
|
|
115
|
+
}
|
|
116
|
+
function findMatching(src, openIndex, openChar, closeChar) {
|
|
117
|
+
if (openIndex < 0 || src[openIndex] !== openChar)
|
|
118
|
+
return -1;
|
|
119
|
+
let depth = 0;
|
|
120
|
+
let quote = null;
|
|
121
|
+
for (let i = openIndex; i < src.length; i += 1) {
|
|
122
|
+
const ch = src[i];
|
|
123
|
+
const prev = src[i - 1];
|
|
124
|
+
if (quote) {
|
|
125
|
+
if (ch === quote && prev !== '\\')
|
|
126
|
+
quote = null;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (ch === '"' || ch === "'" || ch === '`') {
|
|
130
|
+
quote = ch;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (ch === openChar)
|
|
134
|
+
depth += 1;
|
|
135
|
+
if (ch === closeChar) {
|
|
136
|
+
depth -= 1;
|
|
137
|
+
if (depth === 0)
|
|
138
|
+
return i;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return -1;
|
|
142
|
+
}
|
|
60
143
|
//# sourceMappingURL=vite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.js","sourceRoot":"","sources":["../../src/sourcemaps/vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"vite.js","sourceRoot":"","sources":["../../src/sourcemaps/vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,MAAM,GAAG,GAAG,qBAAqB,CAAC;AAClC,MAAM,UAAU,GAAG,kBAAkB,CAAC;AACtC,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC,SAAS,MAAM,CAAC,WAAmB;IACjC,KAAK,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAE,CAAC;QACxE,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACrC,IAAI,UAAU,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IACpC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,EAAE,EAAE,MAAM;IACV,KAAK,EAAE,wBAAwB;IAC/B,aAAa,EAAE,GAAG;IAElB,KAAK,CAAC,MAAM,CAAC,GAAG;QACd,OAAO,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC1C,CAAC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AI,CAAC;YAChD,SAAS;QACX,CAAC;QACD,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YAC3C,KAAK,GAAG,EAAE,CAAC;YACX,SAAS;QACX,CAAC;QACD,IAAI,EAAE,KAAK,QAAQ;YAAE,KAAK,IAAI,CAAC,CAAC;QAChC,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;YACrB,KAAK,IAAI,CAAC,CAAC;YACX,IAAI,KAAK,KAAK,CAAC;gBAAE,OAAO,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
|
@@ -8,7 +8,7 @@ against the live backend. This spec documents what v0.2 must add.
|
|
|
8
8
|
|
|
9
9
|
## What works today (v0.1.x)
|
|
10
10
|
|
|
11
|
-
- `vite` provider:
|
|
11
|
+
- `vite` provider: imports `allstakSourcemaps` from `@allstak/react/vite`, adds it to the real Vite `plugins` array, and enables `build.sourcemap`.
|
|
12
12
|
- `next` provider: managed-block hint pointing the user at `withAllStak`.
|
|
13
13
|
- `webpack` provider: managed-block hint only.
|
|
14
14
|
- `metro` provider: intentionally inert; `detect()` returns false.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Expo (React Native)
|
|
2
|
+
|
|
3
|
+
**Stability:** internal experimental. Managed workflow only. The wizard refuses to run on
|
|
4
|
+
projects that have already prebuilt to native (i.e. an `ios/` or `android/`
|
|
5
|
+
directory at the project root) — bare-via-prebuild has too many failure
|
|
6
|
+
modes for an unattended patcher and remains `unsupported` in v0.1.
|
|
7
|
+
|
|
8
|
+
## What you get
|
|
9
|
+
|
|
10
|
+
- `@allstak/react-native` installed.
|
|
11
|
+
- `.env` populated with `ALLSTAK_API_KEY` (and the standard companions).
|
|
12
|
+
- `app.json` gets the AllStak Expo plugin appended to `expo.plugins[]`
|
|
13
|
+
(idempotent — re-running does not duplicate the entry).
|
|
14
|
+
- `App.tsx` gets:
|
|
15
|
+
- An AST-injected `import { AllStakProvider } from '@allstak/react-native'`.
|
|
16
|
+
- A managed-block hint reminding you to wrap your root component in
|
|
17
|
+
`<AllStakProvider>…</AllStakProvider>`.
|
|
18
|
+
- `app.config.{js,ts}` gets the same managed-block hint if it exists.
|
|
19
|
+
|
|
20
|
+
## Run
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @allstak/wizard@beta -i expo
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Compatibility
|
|
27
|
+
|
|
28
|
+
- `expo >= 50`. Older versions refused with `E_UNSUPPORTED_VERSION`.
|
|
29
|
+
- `react-native >= 0.73`.
|
|
30
|
+
- **Managed workflow only.** Bare/prebuilt projects (`ios/` or `android/`
|
|
31
|
+
present) are refused with a clear error. To use AllStak in a bare RN
|
|
32
|
+
app, follow the SDK README directly — the wizard will not patch native
|
|
33
|
+
Xcode/Gradle config in v0.1.
|
|
34
|
+
|
|
35
|
+
## Wiring `<AllStakProvider>`
|
|
36
|
+
|
|
37
|
+
The wizard cannot safely AST-edit your component tree (App.tsx shapes
|
|
38
|
+
vary too much — function/class/forwardRef/HOC). It places a managed-block
|
|
39
|
+
hint and you wire the provider yourself:
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { AllStakProvider } from '@allstak/react-native';
|
|
43
|
+
|
|
44
|
+
export default function App() {
|
|
45
|
+
return (
|
|
46
|
+
<AllStakProvider apiKey={process.env.EXPO_PUBLIC_ALLSTAK_API_KEY}>
|
|
47
|
+
{/* your app */}
|
|
48
|
+
</AllStakProvider>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`doctor` reports `warn` on `provider-wired` until the live call is detected
|
|
54
|
+
(comments inside the managed-block hint are stripped before matching, so
|
|
55
|
+
the example above does not produce a false positive).
|
|
56
|
+
|
|
57
|
+
## Capabilities the wizard does NOT claim
|
|
58
|
+
|
|
59
|
+
- **No source-map upload wiring.** Metro source-maps are deferred to v0.2
|
|
60
|
+
(no-op `skip` in `doctor`).
|
|
61
|
+
- **No native edits.** No Podfile / Gradle / Info.plist / AndroidManifest
|
|
62
|
+
changes. EAS Build users get the plugin reference in `app.json` and Expo
|
|
63
|
+
takes care of the rest.
|
|
64
|
+
|
|
65
|
+
## Verify
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx @allstak/wizard@beta doctor -i expo
|
|
69
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Fastify
|
|
2
|
+
|
|
3
|
+
**Stability:** internal experimental. AST-safe import (ESM only) + managed-block hint.
|
|
4
|
+
The wizard branches on module system: ESM entries get an AST-injected
|
|
5
|
+
`import { allstakFastify }`; CJS entries get the managed-block hint only
|
|
6
|
+
(the wizard does NOT inject `require()` calls, which interact badly with
|
|
7
|
+
top-of-file conditional/dynamic require patterns).
|
|
8
|
+
|
|
9
|
+
## What you get
|
|
10
|
+
|
|
11
|
+
- `@allstak/fastify` installed.
|
|
12
|
+
- `.env` populated with `ALLSTAK_API_KEY`.
|
|
13
|
+
- Entry file (resolved from `package.json:scripts.start`,
|
|
14
|
+
`package.json:main`, or conventional `src/server.{ts,js,mjs}` /
|
|
15
|
+
`src/index.{ts,js,mjs}`):
|
|
16
|
+
- **ESM** (`type: module` / `.mjs` / `import` syntax in the file):
|
|
17
|
+
AST-injected import.
|
|
18
|
+
- **CJS**: import skipped, hint-only.
|
|
19
|
+
- Both: a managed-block hint demonstrating
|
|
20
|
+
`app.register(allstakFastify, { ... })`.
|
|
21
|
+
|
|
22
|
+
## Run
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @allstak/wizard@beta -i fastify
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Compatibility
|
|
29
|
+
|
|
30
|
+
- `fastify >= 4`. Older versions refused with `E_UNSUPPORTED_VERSION`.
|
|
31
|
+
|
|
32
|
+
## Wiring `app.register`
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import Fastify from 'fastify';
|
|
36
|
+
import { allstakFastify } from '@allstak/fastify';
|
|
37
|
+
|
|
38
|
+
const app = Fastify({ logger: true });
|
|
39
|
+
await app.register(allstakFastify, {
|
|
40
|
+
apiKey: process.env.ALLSTAK_API_KEY,
|
|
41
|
+
});
|
|
42
|
+
// … your routes
|
|
43
|
+
await app.listen({ port: 3000 });
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`doctor` reports `warn` on `plugin-registered` until a non-comment
|
|
47
|
+
`app.register(allstakFastify, ...)` call is detected (line comments
|
|
48
|
+
are stripped before matching so the wizard's own hint does not satisfy
|
|
49
|
+
the check).
|
|
50
|
+
|
|
51
|
+
## Capabilities the wizard does NOT claim
|
|
52
|
+
|
|
53
|
+
- **No source-map upload wiring.** Deferred to v0.2.
|
|
54
|
+
- **No CJS AST patching.** CJS users wire the `require(...)` and
|
|
55
|
+
`app.register(...)` calls per the managed-block hint.
|
|
56
|
+
- **No bundler integration** (esbuild/tsup/etc.) — out of scope for v0.1.
|
|
57
|
+
|
|
58
|
+
## Verify
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx @allstak/wizard@beta doctor -i fastify
|
|
62
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Known limitations
|
|
1
|
+
# Known limitations
|
|
2
2
|
|
|
3
3
|
This page is the **honest** list of what the wizard does and doesn't do
|
|
4
4
|
today. Read it before making the wizard part of a critical onboarding
|
|
@@ -9,29 +9,25 @@ path.
|
|
|
9
9
|
| Integration | Stability | Notes |
|
|
10
10
|
|-------------|-----------|-------|
|
|
11
11
|
| `react` (Vite or CRA) | ✅ stable | Validated end-to-end; dogfooded against `admin-web` and `web`. |
|
|
12
|
-
| `next` (13
|
|
12
|
+
| `next` (13/14/15, app + pages router) | ✅ stable | Disposable live-backend certification passed for App Router 15 and pages-router onboarding; Edge Runtime and Server Actions are not certified. |
|
|
13
13
|
| `js` (vanilla Node) | ✅ stable | Validated end-to-end. |
|
|
14
|
+
| `expo` (managed workflow, ≥50) | internal experimental | Hidden from normal public setup; requires `--experimental`. Real device/emulator runtime proof is incomplete. |
|
|
15
|
+
| `nestjs` (≥9) | internal experimental | Runtime SDK fail-open is verified, but wizard auto-wiring is not Stable. Requires `--experimental`. |
|
|
16
|
+
| `fastify` (≥4) | internal experimental | Runtime SDK fail-open is verified, but wizard auto-wiring is not Stable. Requires `--experimental`. |
|
|
14
17
|
|
|
15
18
|
Everything else is `experimental` (refuses without `--experimental`) or
|
|
16
19
|
`unsupported` (refuses always).
|
|
17
20
|
|
|
18
|
-
## Explicitly NOT supported
|
|
21
|
+
## Explicitly NOT supported
|
|
19
22
|
|
|
20
23
|
| Target | Why |
|
|
21
24
|
|--------|-----|
|
|
22
25
|
| **Astro** | The wizard's framework detector falls through to `js`, which writes env vars but does not wire Astro middleware. Real Astro support is on the v0.2 roadmap. Until then: do the setup manually following the SDK README. |
|
|
23
|
-
| **Bare React Native** | Podfile + Gradle patching cannot be validated without iOS sim + Android emulator builds. The wizard refuses with `E_UNSUPPORTED_FRAMEWORK`. Use the Expo path
|
|
26
|
+
| **Bare React Native** | Podfile + Gradle patching cannot be validated without iOS sim + Android emulator builds. The wizard refuses with `E_UNSUPPORTED_FRAMEWORK`. Use the Expo managed path if you can; otherwise follow the manual setup. |
|
|
27
|
+
| **Expo prebuilt / bare-via-prebuild** | If `ios/` or `android/` already exist, the wizard refuses (same reason as bare RN). Run `expo prebuild --clean` later if you need native edits, but the wizard will not patch the native projects in v0.1. |
|
|
28
|
+
| **NestJS / Fastify auto-registration** | Wizard injects the import + a managed-block hint. It does NOT mutate `bootstrap()` to call `useGlobalFilters` or `app.register` — entry-point shapes vary too widely (factories, hybrid apps, custom adapters) and the blast radius is too high. `doctor` reports `warn` until you wire the call yourself. |
|
|
24
29
|
| **Flutter source maps** | The Flutter SDK itself does not yet ship source-map upload tooling. Wizard's Flutter integration is `experimental` and only writes env vars. |
|
|
25
|
-
| **Backend SDK auto-wiring** (
|
|
26
|
-
|
|
27
|
-
## Java self-hosted: blocked by SDK
|
|
28
|
-
|
|
29
|
-
`allstak-java-sdk` currently hardcodes its host to `https://api.allstak.sa`.
|
|
30
|
-
Until the SDK adds a configurable `host` field on `AllStakConfig`, the
|
|
31
|
-
wizard's `--host` / `--ingest-host` flags are a **no-op for Java users**.
|
|
32
|
-
The wizard will warn when `-i java` runs against a non-default host.
|
|
33
|
-
|
|
34
|
-
Tracking spec: `docs/architecture/v02-java-host-fix-spec.md`.
|
|
30
|
+
| **Backend SDK auto-wiring** (OTel, Spring Boot, Django, Flask, Rails, .NET, Go, PHP) | Each is `experimental`. Install + env-var writing is supported under `--experimental`; framework wiring is NOT — too many entry-point shapes to AST-patch safely without per-framework fixture validation. v0.2 roadmap. |
|
|
35
31
|
|
|
36
32
|
## Auth specifics
|
|
37
33
|
|
|
@@ -74,6 +70,10 @@ Tracking spec: `docs/architecture/v02-java-host-fix-spec.md`.
|
|
|
74
70
|
- React + CRA onboarding flows (without source-map upload — manual wiring).
|
|
75
71
|
- Vanilla Node entry-point patching.
|
|
76
72
|
- Next.js with manual `next.config.js` follow-up.
|
|
73
|
+
- Expo managed workflow (`app.json` plugin entry + provider hint).
|
|
74
|
+
- NestJS / Fastify install + env wiring + managed-block hint, with a manual
|
|
75
|
+
`useGlobalFilters` / `app.register` call as documented in the per-framework
|
|
76
|
+
beta page.
|
|
77
77
|
- All commands in their `--dry-run` form (no disk writes anywhere).
|
|
78
78
|
- `restore` / snapshot inspection (read-only ops).
|
|
79
79
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# NestJS
|
|
2
|
+
|
|
3
|
+
**Stability:** internal experimental. AST-safe import + managed-block hint. The wizard
|
|
4
|
+
does NOT auto-mutate `bootstrap()` to call `app.useGlobalFilters(...)` —
|
|
5
|
+
Nest entry shapes vary too much (factory functions, custom adapters,
|
|
6
|
+
hybrid microservice apps) and registration mid-bootstrap has high blast
|
|
7
|
+
radius. The wizard places the import and a hint; you wire the call.
|
|
8
|
+
|
|
9
|
+
## What you get
|
|
10
|
+
|
|
11
|
+
- `@allstak/nestjs` installed.
|
|
12
|
+
- `.env` populated with `ALLSTAK_API_KEY`.
|
|
13
|
+
- `src/main.ts` (or the entry pointed to by `package.json:scripts.start`)
|
|
14
|
+
gets:
|
|
15
|
+
- An AST-injected
|
|
16
|
+
`import { AllStakNestExceptionFilter, AllStakNestInterceptor } from '@allstak/nestjs'`.
|
|
17
|
+
- A managed-block hint demonstrating the registration call inside
|
|
18
|
+
a `//`-comment block. `doctor` strips line comments before
|
|
19
|
+
matching the live registration, so the hint itself does not
|
|
20
|
+
produce a false-positive `pass`.
|
|
21
|
+
|
|
22
|
+
## Run
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @allstak/wizard@beta -i nestjs
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Compatibility
|
|
29
|
+
|
|
30
|
+
- `@nestjs/core >= 9`. Older versions refused with `E_UNSUPPORTED_VERSION`.
|
|
31
|
+
|
|
32
|
+
## Wiring `useGlobalFilters` / `useGlobalInterceptors`
|
|
33
|
+
|
|
34
|
+
Inside your `bootstrap()` after `NestFactory.create(...)`:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { NestFactory } from '@nestjs/core';
|
|
38
|
+
import {
|
|
39
|
+
AllStakNestExceptionFilter,
|
|
40
|
+
AllStakNestInterceptor,
|
|
41
|
+
} from '@allstak/nestjs';
|
|
42
|
+
import { AppModule } from './app.module';
|
|
43
|
+
|
|
44
|
+
async function bootstrap() {
|
|
45
|
+
const app = await NestFactory.create(AppModule);
|
|
46
|
+
app.useGlobalFilters(new AllStakNestExceptionFilter());
|
|
47
|
+
app.useGlobalInterceptors(new AllStakNestInterceptor());
|
|
48
|
+
await app.listen(3000);
|
|
49
|
+
}
|
|
50
|
+
bootstrap();
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`doctor` reports `warn` on `filter-registered` until at least one of
|
|
54
|
+
`useGlobalFilters(...AllStakNestExceptionFilter` or
|
|
55
|
+
`useGlobalInterceptors(...AllStakNestInterceptor` is detected in
|
|
56
|
+
non-comment source.
|
|
57
|
+
|
|
58
|
+
## Capabilities the wizard does NOT claim
|
|
59
|
+
|
|
60
|
+
- **No source-map upload wiring.** Deferred to v0.2.
|
|
61
|
+
- **No registration-call auto-injection.** See the rationale above.
|
|
62
|
+
- **No microservice / hybrid-app wiring.** The hint targets the standard
|
|
63
|
+
HTTP bootstrap; for hybrid apps register filters per-microservice.
|
|
64
|
+
|
|
65
|
+
## Verify
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx @allstak/wizard@beta doctor -i nestjs
|
|
69
|
+
```
|
package/docs/beta/next.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Next.js
|
|
2
2
|
|
|
3
|
-
**Stability:**
|
|
4
|
-
|
|
5
|
-
|
|
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
6
|
|
|
7
7
|
## What you get
|
|
8
8
|
|
|
9
|
-
- `@allstak/next
|
|
9
|
+
- `@allstak/next` + `@allstak/js` installed.
|
|
10
10
|
- `.env.local` populated with **both** `ALLSTAK_API_KEY` and `ALLSTAK_DSN`
|
|
11
|
-
(
|
|
11
|
+
(`ALLSTAK_DSN` is still written during the env-var transition).
|
|
12
12
|
- `instrumentation.ts` created at the project root if missing, otherwise a
|
|
13
13
|
managed-block hint appended to the existing one. The wizard does NOT
|
|
14
14
|
modify the body of an existing `register()` function.
|
|
@@ -62,13 +62,12 @@ The wizard does NOT auto-mutate `next.config.*` for you — Next configs use
|
|
|
62
62
|
many factory shapes (`module.exports = (phase, { defaultConfig }) => …`) and
|
|
63
63
|
auto-mutation has too high a blast-radius. Follow the managed-block hint.
|
|
64
64
|
|
|
65
|
-
## Known
|
|
65
|
+
## Known limitations
|
|
66
66
|
|
|
67
67
|
- Live `doctor --live-probe` works for Next-emitted events only when your
|
|
68
68
|
Next app runs in a place the wizard can reach. (No magic — the SDK posts
|
|
69
69
|
to `/ingest/v1/errors` and the wizard polls `/api/v1/errors`.)
|
|
70
|
-
-
|
|
71
|
-
to wire the plugin; the SDK + dashboard own upload + symbolication).
|
|
70
|
+
- Edge Runtime and Server Actions are not certified.
|
|
72
71
|
|
|
73
72
|
## Verify
|
|
74
73
|
|
package/docs/beta/react.md
CHANGED
|
@@ -9,8 +9,9 @@ against AllStak `admin-web` and `web` packages.
|
|
|
9
9
|
- `.env.local` (Vite) or `.env` (CRA) populated with `ALLSTAK_API_KEY`,
|
|
10
10
|
`ALLSTAK_HOST`, `ALLSTAK_ENVIRONMENT`, and (if configured) `ALLSTAK_RELEASE`.
|
|
11
11
|
- `AllStakProvider` import added to your entry file via AST mutation.
|
|
12
|
-
-
|
|
13
|
-
|
|
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.*`.
|
|
14
15
|
|
|
15
16
|
## Run
|
|
16
17
|
|
|
@@ -35,24 +36,32 @@ npx @allstak/wizard@beta -i react -y --api-key $ALLSTAK_API_KEY \
|
|
|
35
36
|
|
|
36
37
|
## Wiring the provider
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
call — too risky across CRA / Vite / RN-Web variants. Wrap your app
|
|
40
|
-
manually:
|
|
39
|
+
For standard Vite/CRA entry files, the wizard rewrites the root render tree:
|
|
41
40
|
|
|
42
41
|
```tsx
|
|
42
|
+
import type { ReactNode } from 'react';
|
|
43
43
|
import { AllStakProvider } from '@allstak/react';
|
|
44
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
|
+
|
|
45
55
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
46
|
-
<
|
|
47
|
-
apiKey={import.meta.env?.VITE_ALLSTAK_API_KEY ?? process.env.ALLSTAK_API_KEY}
|
|
48
|
-
environment="production"
|
|
49
|
-
release={import.meta.env?.VITE_GIT_SHA}
|
|
50
|
-
>
|
|
56
|
+
<AllStakRoot>
|
|
51
57
|
<App />
|
|
52
|
-
</
|
|
58
|
+
</AllStakRoot>,
|
|
53
59
|
);
|
|
54
60
|
```
|
|
55
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
|
+
|
|
56
65
|
## Verify
|
|
57
66
|
|
|
58
67
|
```bash
|
|
@@ -69,9 +78,8 @@ npx @allstak/wizard@beta doctor -i react --live-probe \
|
|
|
69
78
|
|
|
70
79
|
## Idempotent
|
|
71
80
|
|
|
72
|
-
Re-running `init`
|
|
73
|
-
|
|
74
|
-
managed block instead of duplicating it.
|
|
81
|
+
Re-running `init` is idempotent. The wizard detects existing
|
|
82
|
+
`AllStakProvider`/`AllStakRoot` setup and does not double-wrap the tree.
|
|
75
83
|
|
|
76
84
|
## Uninstall
|
|
77
85
|
|
|
@@ -79,5 +87,5 @@ managed block instead of duplicating it.
|
|
|
79
87
|
npx @allstak/wizard@beta uninstall -i react
|
|
80
88
|
```
|
|
81
89
|
|
|
82
|
-
Removes the `@allstak/react`
|
|
90
|
+
Removes the `@allstak/react` dependency, strips the AST import,
|
|
83
91
|
deletes the managed env block, and unwires the Vite plugin.
|
|
@@ -0,0 +1,33 @@
|
|
|
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allstak/wizard",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "AllStak SDK installation and configuration wizard
|
|
3
|
+
"version": "0.1.5",
|
|
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
7
|
"allstak-wizard": "./dist/cli.js"
|
|
@@ -41,6 +41,14 @@
|
|
|
41
41
|
"types": "./dist/snapshot/store.d.ts",
|
|
42
42
|
"import": "./dist/snapshot/store.js"
|
|
43
43
|
},
|
|
44
|
+
"./security-snapshot": {
|
|
45
|
+
"types": "./dist/security-snapshot/index.d.ts",
|
|
46
|
+
"import": "./dist/security-snapshot/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./certification": {
|
|
49
|
+
"types": "./dist/certification/index.d.ts",
|
|
50
|
+
"import": "./dist/certification/index.js"
|
|
51
|
+
},
|
|
44
52
|
"./config": {
|
|
45
53
|
"types": "./dist/config/index.d.ts",
|
|
46
54
|
"import": "./dist/config/index.js"
|
|
@@ -65,7 +73,7 @@
|
|
|
65
73
|
"scripts": {
|
|
66
74
|
"build": "tsc -p tsconfig.json",
|
|
67
75
|
"type-check": "tsc -p tsconfig.json --noEmit",
|
|
68
|
-
"test": "node --test --test-concurrency=1 --import tsx test/markers.test.mts test/transaction.test.mts test/patchers.test.mts test/detect.test.mts test/integration-react.test.mts test/integration-next.test.mts test/integration-js.test.mts test/snapshot.test.mts test/compat.test.mts test/lifecycle.test.mts test/sourcemaps.test.mts test/migrations.test.mts test/output.test.mts test/config.test.mts test/credentials.test.mts test/restore.test.mts test/error-codes.test.mts test/telemetry.test.mts test/config-migrations.test.mts",
|
|
76
|
+
"test": "node --test --test-concurrency=1 --import tsx test/markers.test.mts test/transaction.test.mts test/patchers.test.mts test/detect.test.mts test/security-snapshot.test.mts test/certification.test.mts test/integration-react.test.mts test/integration-next.test.mts test/integration-js.test.mts test/integration-expo.test.mts test/integration-nestjs.test.mts test/integration-fastify.test.mts test/integration-java.test.mts test/integration-php.test.mts test/integration-python.test.mts test/integration-go.test.mts test/snapshot.test.mts test/compat.test.mts test/lifecycle.test.mts test/sourcemaps.test.mts test/migrations.test.mts test/output.test.mts test/config.test.mts test/credentials.test.mts test/restore.test.mts test/error-codes.test.mts test/telemetry.test.mts test/config-migrations.test.mts test/sensitive-data-masking.test.mts",
|
|
69
77
|
"test:integration": "node --test --test-concurrency=1 --import tsx test/integration-*.test.mts",
|
|
70
78
|
"wizard": "tsx src/cli.ts",
|
|
71
79
|
"prepublishOnly": "npm run type-check && npm run test && npm run build"
|