@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
|
@@ -8,18 +8,39 @@ export function buildScaffold(opts) {
|
|
|
8
8
|
throw new NotValidatedError(opts.manifest.id, opts.reason);
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
-
const defaultDoctor = async () =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
const defaultDoctor = async () => {
|
|
12
|
+
if (opts.manifest.runtimeStatus === 'stable' && opts.manifest.wizardAutomation === 'manual') {
|
|
13
|
+
return {
|
|
14
|
+
integration: opts.manifest.id,
|
|
15
|
+
summary: 'degraded',
|
|
16
|
+
checks: [
|
|
17
|
+
{
|
|
18
|
+
name: 'runtime-status',
|
|
19
|
+
status: 'pass',
|
|
20
|
+
detail: `Runtime SDK "${opts.manifest.id}" is Stable.`,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'wizard-automation',
|
|
24
|
+
status: 'warn',
|
|
25
|
+
detail: 'Wizard automation is manual/light setup only.',
|
|
26
|
+
fix: opts.reason,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
integration: opts.manifest.id,
|
|
33
|
+
summary: 'broken',
|
|
34
|
+
checks: [
|
|
35
|
+
{
|
|
36
|
+
name: 'integration-validated',
|
|
37
|
+
status: 'fail',
|
|
38
|
+
detail: `Integration "${opts.manifest.id}" is at stability="${opts.manifest.stability}".`,
|
|
39
|
+
fix: opts.reason,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
};
|
|
23
44
|
return {
|
|
24
45
|
id: opts.manifest.id,
|
|
25
46
|
manifest: opts.manifest,
|
|
@@ -31,7 +52,9 @@ export function buildScaffold(opts) {
|
|
|
31
52
|
async plan(ctx) {
|
|
32
53
|
if (opts.plan)
|
|
33
54
|
return opts.plan(ctx);
|
|
34
|
-
|
|
55
|
+
const runtime = opts.manifest.runtimeStatus ?? opts.manifest.stability;
|
|
56
|
+
const automation = opts.manifest.wizardAutomation ?? opts.manifest.stability;
|
|
57
|
+
return [`Runtime: ${runtime}; wizard automation: ${automation}. ${opts.reason}`];
|
|
35
58
|
},
|
|
36
59
|
async install(ctx) {
|
|
37
60
|
guard(ctx);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_scaffold.js","sourceRoot":"","sources":["../../src/integrations/_scaffold.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"_scaffold.js","sourceRoot":"","sources":["../../src/integrations/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E,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC5C,CAAC;QAED,KAAK,CAAC,QAAQ,CAAC,GAAG;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC;QAC7C,CAAC;QAED,KAAK,CAAC,SAAS,CAAC,GAAG;YACjB,KAAK,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QAED,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE;YAClB,KAAK,CAAC,GAAG,CAAC,CAAC;YACX,IAAI,IAAI,CAAC,KAAK;gBAAE,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC5C,CAAC;QAED,KAAK,CAAC,MAAM,CAAC,GAAG;YACd,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC;QAC7C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IntegrationId, PackageManager } from '../detect/index.js';
|
|
2
|
-
import type { Capability, StabilityLevel } from '../registry/manifest.js';
|
|
2
|
+
import type { Capability, RuntimeStatus, StabilityLevel, WizardAutomationStatus } from '../registry/manifest.js';
|
|
3
3
|
import type { Integration } from '../registry/types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Light wrapper that builds a scaffold integration from a small bag of fields,
|
|
@@ -10,7 +10,10 @@ export declare function simpleScaffold(opts: {
|
|
|
10
10
|
title: string;
|
|
11
11
|
sdkPackage: string;
|
|
12
12
|
reason: string;
|
|
13
|
-
stability:
|
|
13
|
+
stability: StabilityLevel;
|
|
14
|
+
runtimeStatus?: RuntimeStatus;
|
|
15
|
+
wizardAutomation?: WizardAutomationStatus;
|
|
16
|
+
public?: boolean;
|
|
14
17
|
capabilities?: readonly Capability[];
|
|
15
18
|
unsupportedCapabilities?: readonly Capability[];
|
|
16
19
|
supportedPackageManagers?: readonly PackageManager[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_simple-scaffold.d.ts","sourceRoot":"","sources":["../../src/integrations/_simple-scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"_simple-scaffold.d.ts","sourceRoot":"","sources":["../../src/integrations/_simple-scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAuB,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,EAAE,EAAE,aAAa,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,cAAc,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACrC,uBAAuB,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAChD,wBAAwB,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,WAAW,CAmBd"}
|
|
@@ -10,6 +10,9 @@ export function simpleScaffold(opts) {
|
|
|
10
10
|
sdkPackage: opts.sdkPackage,
|
|
11
11
|
additionalPackages: [],
|
|
12
12
|
stability: opts.stability,
|
|
13
|
+
runtimeStatus: opts.runtimeStatus ?? (opts.stability === 'stable' ? 'stable' : opts.stability === 'beta' ? 'beta' : opts.stability === 'unsupported' ? 'unsupported' : 'experimental'),
|
|
14
|
+
wizardAutomation: opts.wizardAutomation ?? (opts.stability === 'stable' || opts.stability === 'beta' ? 'assisted' : opts.stability === 'unsupported' ? 'unsupported' : 'experimental'),
|
|
15
|
+
public: opts.public ?? (opts.stability === 'stable' || opts.stability === 'beta'),
|
|
13
16
|
stabilityNote: opts.reason,
|
|
14
17
|
capabilities: opts.capabilities ?? ['write-env'],
|
|
15
18
|
unsupportedCapabilities: opts.unsupportedCapabilities ?? [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_simple-scaffold.js","sourceRoot":"","sources":["../../src/integrations/_simple-scaffold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"_simple-scaffold.js","sourceRoot":"","sources":["../../src/integrations/_simple-scaffold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAa9B;IACC,MAAM,QAAQ,GAAwB;QACpC,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,kBAAkB,EAAE,EAAE;QACtB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC;QACtL,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC;QACtL,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC;QACjF,aAAa,EAAE,IAAI,CAAC,MAAM;QAC1B,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,CAAC,WAAW,CAAC;QAChD,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,IAAI,EAAE;QAC3D,aAAa,EAAE,EAAE;QACjB,KAAK,EAAE,EAAE;QACT,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,IAAI,EAAE;QAC7D,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;KAC9B,CAAC;IACF,OAAO,aAAa,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dotnet.d.ts","sourceRoot":"","sources":["../../src/integrations/dotnet.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"dotnet.d.ts","sourceRoot":"","sources":["../../src/integrations/dotnet.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,mCAU5B,CAAC"}
|
|
@@ -4,6 +4,9 @@ export const dotnetIntegration = simpleScaffold({
|
|
|
4
4
|
title: '.NET / ASP.NET Core',
|
|
5
5
|
sdkPackage: 'AllStak (NuGet)',
|
|
6
6
|
stability: 'experimental',
|
|
7
|
+
runtimeStatus: 'experimental',
|
|
8
|
+
wizardAutomation: 'experimental',
|
|
9
|
+
public: false,
|
|
7
10
|
reason: '.NET scaffolding writes env vars only. *.csproj mutation and Program.cs patching are not auto-applied in v0.1 (Roslyn dependency would significantly expand the wizard footprint).',
|
|
8
11
|
});
|
|
9
12
|
//# sourceMappingURL=dotnet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dotnet.js","sourceRoot":"","sources":["../../src/integrations/dotnet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;IAC9C,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,qBAAqB;IAC5B,UAAU,EAAE,iBAAiB;IAC7B,SAAS,EAAE,cAAc;IACzB,MAAM,EACJ,oLAAoL;CACvL,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"dotnet.js","sourceRoot":"","sources":["../../src/integrations/dotnet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;IAC9C,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,qBAAqB;IAC5B,UAAU,EAAE,iBAAiB;IAC7B,SAAS,EAAE,cAAc;IACzB,aAAa,EAAE,cAAc;IAC7B,gBAAgB,EAAE,cAAc;IAChC,MAAM,EAAE,KAAK;IACb,MAAM,EACJ,oLAAoL;CACvL,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WizardContext, CompatibilityCheck } from '../../registry/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Expo detection.
|
|
4
|
+
*
|
|
5
|
+
* Refuses:
|
|
6
|
+
* - Projects without an `expo` dependency.
|
|
7
|
+
* - Bare-via-prebuild projects (presence of ios/ or android/ directories).
|
|
8
|
+
*
|
|
9
|
+
* The wizard's bare-RN integration is unsupported separately. This integration
|
|
10
|
+
* is strictly for the managed workflow — config-plugin path only.
|
|
11
|
+
*/
|
|
12
|
+
export declare function detectExpo(ctx: WizardContext): Promise<CompatibilityCheck>;
|
|
13
|
+
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../src/integrations/expo/detect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKjF;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA0BhF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { evaluateCompatibility } from '../../compat/engine.js';
|
|
2
|
+
import { expoManifest } from './manifest.js';
|
|
3
|
+
import { isBareWorkflow, locateAppConfig, locateAppJson } from './files.js';
|
|
4
|
+
/**
|
|
5
|
+
* Expo detection.
|
|
6
|
+
*
|
|
7
|
+
* Refuses:
|
|
8
|
+
* - Projects without an `expo` dependency.
|
|
9
|
+
* - Bare-via-prebuild projects (presence of ios/ or android/ directories).
|
|
10
|
+
*
|
|
11
|
+
* The wizard's bare-RN integration is unsupported separately. This integration
|
|
12
|
+
* is strictly for the managed workflow — config-plugin path only.
|
|
13
|
+
*/
|
|
14
|
+
export async function detectExpo(ctx) {
|
|
15
|
+
const pj = ctx.detected.packageJson;
|
|
16
|
+
if (!pj)
|
|
17
|
+
return { ok: false, reason: 'no package.json found' };
|
|
18
|
+
// Compat: requires `expo`.
|
|
19
|
+
const verdict = evaluateCompatibility(expoManifest, pj);
|
|
20
|
+
if (!verdict.ok)
|
|
21
|
+
return { ok: false, reason: verdict.reason };
|
|
22
|
+
// Refuse bare-via-prebuild — clearly differentiates managed vs bare.
|
|
23
|
+
if (isBareWorkflow(ctx.projectRoot)) {
|
|
24
|
+
return {
|
|
25
|
+
ok: false,
|
|
26
|
+
reason: 'Detected `ios/` or `android/` directory — this looks like an Expo project that has been prebuilt to bare. Bare React Native is unsupported in this wizard release; use the SDK README to wire it manually, or revert the prebuild.',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
// Need at least one Expo config form (app.json or app.config.*).
|
|
30
|
+
if (!locateAppJson(ctx.projectRoot) && !locateAppConfig(ctx.projectRoot)) {
|
|
31
|
+
return {
|
|
32
|
+
ok: false,
|
|
33
|
+
reason: 'No app.json or app.config.{js,ts,mjs} found. Expo managed projects require one — create it before running the wizard.',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return { ok: true };
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=detect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.js","sourceRoot":"","sources":["../../../src/integrations/expo/detect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAkB;IACjD,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;IACpC,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAE/D,2BAA2B;IAC3B,MAAM,OAAO,GAAG,qBAAqB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IACxD,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;IAE9D,qEAAqE;IACrE,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QACpC,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EACJ,oOAAoO;SACvO,CAAC;IACJ,CAAC;IAED,iEAAiE;IACjE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QACzE,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EACJ,uHAAuH;SAC1H,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/integrations/expo/doctor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAe,MAAM,yBAAyB,CAAC;AAMxF;;GAEG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAgH1E"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { isBareWorkflow, locateAppConfig, locateAppEntry, locateAppJson } from './files.js';
|
|
4
|
+
import { PLUGIN_SPECIFIER } from './patch.js';
|
|
5
|
+
const PKG = '@allstak/react-native';
|
|
6
|
+
/**
|
|
7
|
+
* Read-only Expo health check.
|
|
8
|
+
*/
|
|
9
|
+
export async function doctorExpo(ctx) {
|
|
10
|
+
const checks = [];
|
|
11
|
+
const pj = ctx.detected.packageJson;
|
|
12
|
+
// Workflow guard — if `ios/` or `android/` exist we're in bare territory.
|
|
13
|
+
if (isBareWorkflow(ctx.projectRoot)) {
|
|
14
|
+
checks.push({
|
|
15
|
+
name: 'workflow',
|
|
16
|
+
status: 'fail',
|
|
17
|
+
detail: 'Detected bare-via-prebuild project (ios/ or android/ present).',
|
|
18
|
+
fix: 'Bare RN is unsupported in this wizard release. Revert prebuild or follow the SDK README manually.',
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
checks.push({ name: 'workflow', status: 'pass', detail: 'managed' });
|
|
23
|
+
}
|
|
24
|
+
const installed = !!(pj?.dependencies?.[PKG] ?? pj?.devDependencies?.[PKG]);
|
|
25
|
+
checks.push({
|
|
26
|
+
name: 'sdk-installed',
|
|
27
|
+
status: installed ? 'pass' : 'fail',
|
|
28
|
+
detail: installed ? PKG : `${PKG} is not in dependencies`,
|
|
29
|
+
fix: installed ? undefined : 'Run: allstak-wizard -i expo --experimental',
|
|
30
|
+
});
|
|
31
|
+
const envPath = resolve(ctx.projectRoot, '.env');
|
|
32
|
+
const envOk = existsSync(envPath) && readFileSync(envPath, 'utf8').includes('ALLSTAK_API_KEY');
|
|
33
|
+
checks.push({
|
|
34
|
+
name: 'env-vars',
|
|
35
|
+
status: envOk ? 'pass' : 'warn',
|
|
36
|
+
detail: envOk ? '.env has ALLSTAK_API_KEY' : 'ALLSTAK_API_KEY not found in .env',
|
|
37
|
+
});
|
|
38
|
+
const jsonPath = locateAppJson(ctx.projectRoot);
|
|
39
|
+
const cfgPath = locateAppConfig(ctx.projectRoot);
|
|
40
|
+
if (jsonPath) {
|
|
41
|
+
let pluginPresent = false;
|
|
42
|
+
try {
|
|
43
|
+
const json = JSON.parse(readFileSync(jsonPath, 'utf8'));
|
|
44
|
+
const plugins = json.expo?.plugins ?? [];
|
|
45
|
+
pluginPresent = plugins.some((p) => {
|
|
46
|
+
if (typeof p === 'string')
|
|
47
|
+
return p === PLUGIN_SPECIFIER;
|
|
48
|
+
if (Array.isArray(p) && typeof p[0] === 'string')
|
|
49
|
+
return p[0] === PLUGIN_SPECIFIER;
|
|
50
|
+
return false;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
pluginPresent = false;
|
|
55
|
+
}
|
|
56
|
+
checks.push({
|
|
57
|
+
name: 'expo-plugin',
|
|
58
|
+
status: pluginPresent ? 'pass' : 'fail',
|
|
59
|
+
detail: pluginPresent ? `app.json plugins includes ${PLUGIN_SPECIFIER}` : `app.json plugins does not include ${PLUGIN_SPECIFIER}`,
|
|
60
|
+
fix: pluginPresent ? undefined : 'Run: allstak-wizard repair -i expo --experimental',
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else if (cfgPath) {
|
|
64
|
+
checks.push({
|
|
65
|
+
name: 'expo-plugin',
|
|
66
|
+
status: 'warn',
|
|
67
|
+
detail: 'Project uses app.config.* — wizard cannot inspect dynamic configs reliably',
|
|
68
|
+
fix: 'Verify the AllStak plugin is in your config\'s plugins array.',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
checks.push({ name: 'expo-plugin', status: 'fail', detail: 'No app.json or app.config.* found' });
|
|
73
|
+
}
|
|
74
|
+
const entry = locateAppEntry(ctx.projectRoot);
|
|
75
|
+
if (entry) {
|
|
76
|
+
const src = readFileSync(entry, 'utf8');
|
|
77
|
+
const semantic = inspectExpoEntry(src);
|
|
78
|
+
checks.push({
|
|
79
|
+
name: 'runtime-init',
|
|
80
|
+
status: semantic.hasInit ? 'pass' : 'fail',
|
|
81
|
+
detail: semantic.hasInit
|
|
82
|
+
? 'AllStak runtime init/provider found'
|
|
83
|
+
: `${entry} does not configure AllStak runtime`,
|
|
84
|
+
fix: semantic.hasInit ? undefined : 'Run: allstak-wizard repair -i expo --experimental',
|
|
85
|
+
});
|
|
86
|
+
checks.push({
|
|
87
|
+
name: 'provider-boundary',
|
|
88
|
+
status: semantic.hasProvider ? 'pass' : semantic.hasManualInit ? 'warn' : 'fail',
|
|
89
|
+
detail: semantic.hasProvider
|
|
90
|
+
? 'AllStakProvider wraps the Expo root'
|
|
91
|
+
: semantic.hasManualInit
|
|
92
|
+
? 'Manual AllStak.init found, but no provider/error boundary wrapper is configured'
|
|
93
|
+
: `${entry} does not include AllStakProvider`,
|
|
94
|
+
fix: semantic.hasProvider || semantic.hasManualInit ? undefined : 'Run: allstak-wizard repair -i expo --experimental',
|
|
95
|
+
});
|
|
96
|
+
checks.push({
|
|
97
|
+
name: 'duplicate-setup',
|
|
98
|
+
status: semantic.duplicateSetup ? 'warn' : 'pass',
|
|
99
|
+
detail: semantic.duplicateSetup
|
|
100
|
+
? 'Multiple AllStak providers/root wrappers detected; review for duplicate setup'
|
|
101
|
+
: 'No duplicate Expo root setup detected',
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
checks.push({ name: 'entry-detected', status: 'warn', detail: 'No App.tsx/App.js detected' });
|
|
106
|
+
}
|
|
107
|
+
// Source-maps capability is intentionally NOT supported in v0.1 for Expo —
|
|
108
|
+
// the wizard does not wire the Hermes/Metro upload path. Surface this so
|
|
109
|
+
// users don't expect doctor pass to imply working sourcemap upload.
|
|
110
|
+
checks.push({
|
|
111
|
+
name: 'source-maps',
|
|
112
|
+
status: 'skip',
|
|
113
|
+
detail: 'Hermes/Metro source-map upload not wired by wizard in v0.1 (deferred to v0.2).',
|
|
114
|
+
});
|
|
115
|
+
const summary = checks.some((c) => c.status === 'fail')
|
|
116
|
+
? 'broken'
|
|
117
|
+
: checks.some((c) => c.status === 'warn')
|
|
118
|
+
? 'degraded'
|
|
119
|
+
: 'ok';
|
|
120
|
+
return { integration: 'expo', checks, summary };
|
|
121
|
+
}
|
|
122
|
+
function inspectExpoEntry(src) {
|
|
123
|
+
const semantic = src.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\/\/.*$/gm, '');
|
|
124
|
+
const providerTags = semantic.match(/<AllStakProvider\b/g)?.length ?? 0;
|
|
125
|
+
const rootTags = semantic.match(/<AllStakMobileRoot\b/g)?.length ?? 0;
|
|
126
|
+
const providerImport = /from\s+['"]@allstak\/react-native['"]/.test(semantic)
|
|
127
|
+
&& /\bAllStakProvider\b/.test(semantic);
|
|
128
|
+
const manualInit = /AllStak\.init\s*\(/.test(semantic);
|
|
129
|
+
return {
|
|
130
|
+
hasInit: manualInit || (providerImport && providerTags > 0),
|
|
131
|
+
hasProvider: providerImport && providerTags > 0,
|
|
132
|
+
hasManualInit: manualInit,
|
|
133
|
+
duplicateSetup: providerTags + rootTags > 2,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/integrations/expo/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,GAAG,GAAG,uBAAuB,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAkB;IACjD,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;IAEpC,0EAA0E;IAC1E,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,gEAAgE;YACxE,GAAG,EAAE,mGAAmG;SACzG,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACvE,CAAC;IA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O;QACL,OAAO,EAAE,UAAU,IAAI,CAAC,cAAc,IAAI,YAAY,GAAG,CAAC,CAAC;QAC3D,WAAW,EAAE,cAAc,IAAI,YAAY,GAAG,CAAC;QAC/C,aAAa,EAAE,UAAU;QACzB,cAAc,EAAE,YAAY,GAAG,QAAQ,GAAG,CAAC;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function locateAppJson(projectRoot: string): string | null;
|
|
2
|
+
export declare function locateAppConfig(projectRoot: string): string | null;
|
|
3
|
+
export declare function locateAppEntry(projectRoot: string): string | null;
|
|
4
|
+
/**
|
|
5
|
+
* True when the project is "bare-via-prebuild" Expo — i.e. `expo prebuild`
|
|
6
|
+
* has been run and `ios/` + `android/` exist. The wizard refuses to operate
|
|
7
|
+
* on these (the bare integration is unsupported in v0.1.x).
|
|
8
|
+
*/
|
|
9
|
+
export declare function isBareWorkflow(projectRoot: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Read the Expo SDK declaration from `app.json` if present. Returns null when
|
|
12
|
+
* the file doesn't exist, can't be parsed, or doesn't declare an SDK.
|
|
13
|
+
*/
|
|
14
|
+
export declare function readExpoSdkVersion(projectRoot: string): string | null;
|
|
15
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/integrations/expo/files.ts"],"names":[],"mappings":"AAcA,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGhE;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMlE;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWjE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWrE"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* File location helpers for the Expo integration. Pure-data — no I/O beyond
|
|
5
|
+
* existsSync. Shared between detect/patch/uninstall/doctor so the lookup
|
|
6
|
+
* order is single-source.
|
|
7
|
+
*/
|
|
8
|
+
const APP_JSON = 'app.json';
|
|
9
|
+
const APP_CONFIG_JS = 'app.config.js';
|
|
10
|
+
const APP_CONFIG_TS = 'app.config.ts';
|
|
11
|
+
const APP_CONFIG_MJS = 'app.config.mjs';
|
|
12
|
+
export function locateAppJson(projectRoot) {
|
|
13
|
+
const candidate = resolve(projectRoot, APP_JSON);
|
|
14
|
+
return existsSync(candidate) ? candidate : null;
|
|
15
|
+
}
|
|
16
|
+
export function locateAppConfig(projectRoot) {
|
|
17
|
+
for (const c of [APP_CONFIG_TS, APP_CONFIG_JS, APP_CONFIG_MJS]) {
|
|
18
|
+
const full = resolve(projectRoot, c);
|
|
19
|
+
if (existsSync(full))
|
|
20
|
+
return full;
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
export function locateAppEntry(projectRoot) {
|
|
25
|
+
for (const c of ['App.tsx', 'App.jsx', 'App.ts', 'App.js']) {
|
|
26
|
+
const full = resolve(projectRoot, c);
|
|
27
|
+
if (existsSync(full))
|
|
28
|
+
return full;
|
|
29
|
+
}
|
|
30
|
+
// Some Expo projects use src/App.tsx
|
|
31
|
+
for (const c of ['src/App.tsx', 'src/App.jsx', 'src/App.js']) {
|
|
32
|
+
const full = resolve(projectRoot, c);
|
|
33
|
+
if (existsSync(full))
|
|
34
|
+
return full;
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* True when the project is "bare-via-prebuild" Expo — i.e. `expo prebuild`
|
|
40
|
+
* has been run and `ios/` + `android/` exist. The wizard refuses to operate
|
|
41
|
+
* on these (the bare integration is unsupported in v0.1.x).
|
|
42
|
+
*/
|
|
43
|
+
export function isBareWorkflow(projectRoot) {
|
|
44
|
+
return existsSync(resolve(projectRoot, 'ios')) || existsSync(resolve(projectRoot, 'android'));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Read the Expo SDK declaration from `app.json` if present. Returns null when
|
|
48
|
+
* the file doesn't exist, can't be parsed, or doesn't declare an SDK.
|
|
49
|
+
*/
|
|
50
|
+
export function readExpoSdkVersion(projectRoot) {
|
|
51
|
+
const path = locateAppJson(projectRoot);
|
|
52
|
+
if (!path)
|
|
53
|
+
return null;
|
|
54
|
+
try {
|
|
55
|
+
const json = JSON.parse(readFileSync(path, 'utf8'));
|
|
56
|
+
return json.expo?.sdkVersion ?? null;
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/integrations/expo/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;GAIG;AAEH,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,aAAa,GAAG,eAAe,CAAC;AACtC,MAAM,aAAa,GAAG,eAAe,CAAC;AACtC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAExC,MAAM,UAAU,aAAa,CAAC,WAAmB;IAC/C,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACjD,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,I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,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAEjD,CAAC;QACF,OAAO,IAAI,CAAC,IAAI,EAAE,UAAU,IAAI,IAAI,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Integration } from '../../registry/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Expo integration — beta (managed workflow only).
|
|
4
|
+
*
|
|
5
|
+
* What it does:
|
|
6
|
+
* - installs `@allstak/react-native`
|
|
7
|
+
* - writes ALLSTAK_* to `.env`
|
|
8
|
+
* - adds the AllStak Expo plugin to `app.json:expo.plugins[]` (idempotent)
|
|
9
|
+
* OR appends a managed-block hint to `app.config.*` if the project uses
|
|
10
|
+
* a dynamic config (we never AST-mutate dynamic configs)
|
|
11
|
+
* - AST-injects `AllStakProvider` import into `App.tsx`
|
|
12
|
+
* - appends a managed-block hint guiding the user to wrap the root component
|
|
13
|
+
*
|
|
14
|
+
* What it does NOT do:
|
|
15
|
+
* - touch `ios/` or `android/`
|
|
16
|
+
* - run `expo prebuild`
|
|
17
|
+
* - wire Hermes / Metro source-map upload
|
|
18
|
+
* - send live verification events
|
|
19
|
+
*
|
|
20
|
+
* If `ios/` or `android/` exist, detect() refuses with a pointer to the
|
|
21
|
+
* unsupported bare-RN integration.
|
|
22
|
+
*/
|
|
23
|
+
export declare const expoIntegration: Integration;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/expo/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAS3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,EAAE,WA6C7B,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { runPackageInstall } from '../_shared.js';
|
|
2
|
+
import { expoManifest } from './manifest.js';
|
|
3
|
+
import { detectExpo } from './detect.js';
|
|
4
|
+
import { patchExpo } from './patch.js';
|
|
5
|
+
import { uninstallExpo } from './uninstall.js';
|
|
6
|
+
import { doctorExpo } from './doctor.js';
|
|
7
|
+
import { locateAppConfig, locateAppEntry, locateAppJson } from './files.js';
|
|
8
|
+
/**
|
|
9
|
+
* Expo integration — beta (managed workflow only).
|
|
10
|
+
*
|
|
11
|
+
* What it does:
|
|
12
|
+
* - installs `@allstak/react-native`
|
|
13
|
+
* - writes ALLSTAK_* to `.env`
|
|
14
|
+
* - adds the AllStak Expo plugin to `app.json:expo.plugins[]` (idempotent)
|
|
15
|
+
* OR appends a managed-block hint to `app.config.*` if the project uses
|
|
16
|
+
* a dynamic config (we never AST-mutate dynamic configs)
|
|
17
|
+
* - AST-injects `AllStakProvider` import into `App.tsx`
|
|
18
|
+
* - appends a managed-block hint guiding the user to wrap the root component
|
|
19
|
+
*
|
|
20
|
+
* What it does NOT do:
|
|
21
|
+
* - touch `ios/` or `android/`
|
|
22
|
+
* - run `expo prebuild`
|
|
23
|
+
* - wire Hermes / Metro source-map upload
|
|
24
|
+
* - send live verification events
|
|
25
|
+
*
|
|
26
|
+
* If `ios/` or `android/` exist, detect() refuses with a pointer to the
|
|
27
|
+
* unsupported bare-RN integration.
|
|
28
|
+
*/
|
|
29
|
+
export const expoIntegration = {
|
|
30
|
+
id: 'expo',
|
|
31
|
+
manifest: expoManifest,
|
|
32
|
+
async detect(ctx) {
|
|
33
|
+
return detectExpo(ctx);
|
|
34
|
+
},
|
|
35
|
+
async plan(ctx) {
|
|
36
|
+
const lines = [];
|
|
37
|
+
lines.push(`install ${expoManifest.sdkPackage} (${ctx.pm})`);
|
|
38
|
+
lines.push(`write ALLSTAK_* to .env`);
|
|
39
|
+
if (locateAppJson(ctx.projectRoot)) {
|
|
40
|
+
lines.push(`add allstak plugin to app.json:expo.plugins[]`);
|
|
41
|
+
}
|
|
42
|
+
else if (locateAppConfig(ctx.projectRoot)) {
|
|
43
|
+
lines.push(`append managed-block hint to app.config.* (manual plugin wiring required)`);
|
|
44
|
+
}
|
|
45
|
+
const entry = locateAppEntry(ctx.projectRoot);
|
|
46
|
+
lines.push(entry ? `patch entry: ${entry}` : `no App entry detected — skip provider hint`);
|
|
47
|
+
return lines;
|
|
48
|
+
},
|
|
49
|
+
async install(ctx) {
|
|
50
|
+
await runPackageInstall(ctx, [expoManifest.sdkPackage]);
|
|
51
|
+
},
|
|
52
|
+
async patch(ctx, tx) {
|
|
53
|
+
await patchExpo(ctx, tx);
|
|
54
|
+
},
|
|
55
|
+
async validate(ctx) {
|
|
56
|
+
return doctorExpo(ctx);
|
|
57
|
+
},
|
|
58
|
+
async uninstall(ctx, tx) {
|
|
59
|
+
await uninstallExpo(ctx, tx);
|
|
60
|
+
},
|
|
61
|
+
async repair(ctx, tx) {
|
|
62
|
+
await patchExpo(ctx, tx);
|
|
63
|
+
},
|
|
64
|
+
async doctor(ctx) {
|
|
65
|
+
return doctorExpo(ctx);
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/expo/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,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zB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE;QACrB,MAAM,aAAa,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE;QAClB,MAAM,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAG;QACd,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/integrations/expo/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,eAAO,MAAM,YAAY,EAAE,mBAsC1B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const expoManifest = {
|
|
2
|
+
id: 'expo',
|
|
3
|
+
title: 'Expo (managed workflow)',
|
|
4
|
+
sdkPackage: '@allstak/react-native',
|
|
5
|
+
additionalPackages: [],
|
|
6
|
+
stability: 'experimental',
|
|
7
|
+
runtimeStatus: 'experimental',
|
|
8
|
+
wizardAutomation: 'experimental',
|
|
9
|
+
public: false,
|
|
10
|
+
stabilityNote: 'Internal experimental only. Managed workflow patching exists, but real Expo/Hermes runtime request continuity and device/emulator fail-open certification are not complete. Bare-via-prebuild is intentionally refused.',
|
|
11
|
+
capabilities: [
|
|
12
|
+
'install-package',
|
|
13
|
+
'write-env',
|
|
14
|
+
'patch-entry',
|
|
15
|
+
'wire-expo-config-plugin',
|
|
16
|
+
],
|
|
17
|
+
unsupportedCapabilities: [
|
|
18
|
+
'wire-source-maps',
|
|
19
|
+
'wire-native-ios',
|
|
20
|
+
'wire-native-android',
|
|
21
|
+
'live-validate-event',
|
|
22
|
+
],
|
|
23
|
+
compatibility: [
|
|
24
|
+
{ name: 'expo', minVersion: '49', maxMajorExclusive: null, required: true },
|
|
25
|
+
{ name: 'react-native', minVersion: '0.72', maxMajorExclusive: null, required: false },
|
|
26
|
+
],
|
|
27
|
+
files: [
|
|
28
|
+
{ path: 'app.json', kind: 'optional', description: 'Expo config (plugins[] gains the AllStak plugin)' },
|
|
29
|
+
{ path: 'app.config.js', kind: 'optional', description: 'JavaScript Expo config (plugins[] gains the AllStak plugin)' },
|
|
30
|
+
{ path: 'app.config.ts', kind: 'optional' },
|
|
31
|
+
{ path: 'App.tsx', kind: 'optional', description: 'Entry component (managed-block hint appended)' },
|
|
32
|
+
{ path: 'App.jsx', kind: 'optional' },
|
|
33
|
+
{ path: 'App.js', kind: 'optional' },
|
|
34
|
+
{ path: '.env', kind: 'created', description: 'AllStak env vars (consumed via Expo public-env or app.config.js read)' },
|
|
35
|
+
],
|
|
36
|
+
supportedPackageManagers: ['npm', 'pnpm', 'yarn', 'yarn-berry', 'bun'],
|
|
37
|
+
docsUrl: 'https://github.com/allstak-io/sdks/tree/main/allstak-wizard/docs/beta/expo.md',
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/integrations/expo/manifest.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAwB;IAC/C,EAAE,EAAE,MAAM;IACV,KAAK,EAAE,yBAAyB;IAChC,UAAU,EAAE,uBAAuB;IACnC,kBAAkB,EAAE,EAAE;IACtB,SAAS,EAAE,cAAc;IACzB,aAAa,EAAE,cAAc;IAC7B,gBAAgB,EAAE,cAAc;IAChC,MAAM,EAAE,KAAK;IACb,aAAa,EACX,yNAAyN;IAC3N,YAAY,EAAE;QACZ,iBAAiB;QACjB,WAAW;QACX,aAAa;QACb,yBAAyB;KAC1B;IACD,uBAAuB,EAAE;QACvB,kBAAkB;QAClB,iBAAiB;QACjB,qBAAqB;QACrB,qBAAqB;KACtB;IACD,aAAa,EAAE;QACb,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3E,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;KACvF;IACD,KAAK,EAAE;QACL,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,kDAAkD,EAAE;QACvG,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,6DAA6D,EAAE;QACvH,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,+CAA+C,EAAE;QACnG,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE;QACrC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE;QACpC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,uEAAuE,EAAE;KACxH;IACD,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC;IACtE,OAAO,EAAE,+EAA+E;CACzF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Transaction } from '../../transaction/tx.js';
|
|
2
|
+
import type { WizardContext } from '../../registry/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The plugin reference shape the SDK exposes. The Expo CLI accepts either
|
|
5
|
+
* the bare module specifier ("@allstak/react-native") which it resolves to
|
|
6
|
+
* `node_modules/@allstak/react-native/app.plugin.js`, or an explicit
|
|
7
|
+
* `["@allstak/react-native/app.plugin"]` form. We use the bare form so the
|
|
8
|
+
* SDK can move its plugin entry point without breaking us.
|
|
9
|
+
*/
|
|
10
|
+
declare const PLUGIN_SPECIFIER = "@allstak/react-native";
|
|
11
|
+
export declare function patchExpo(ctx: WizardContext, tx: Transaction): Promise<void>;
|
|
12
|
+
export { PLUGIN_SPECIFIER };
|
|
13
|
+
//# sourceMappingURL=patch.d.ts.map
|