@tokenoftrust/storefront-runner 2.0.1 → 2.0.3
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/apps/storefront/dev-plugins/tenant-hot-reload.mjs +19 -1
- package/apps/storefront/dev-plugins/tenant-validate-on-save.mjs +78 -0
- package/apps/storefront/src/middleware/index.ts +17 -1
- package/package.json +1 -1
- package/scripts/lib/tenant-dirs.mjs +80 -0
- package/scripts/tenant/lint-embeds.mjs +180 -0
- package/scripts/tenant/materialize-tenant-content.mjs +533 -0
- package/scripts/tenant/validate.mjs +837 -0
- package/apps/storefront/scripts/build-v84-clean-clone-standalone.mjs +0 -68
- package/apps/storefront/scripts/deny-v84-clean-clone-standalone-capabilities.mjs +0 -111
- package/apps/storefront/scripts/deny-v84-dogfood-capabilities.mjs +0 -2
- package/apps/storefront/scripts/deny-v84-lifecycle-capabilities.mjs +0 -247
- package/apps/storefront/scripts/dogfood-v84-nonportable-routes.ts +0 -73
- package/apps/storefront/scripts/fixed-v84-native-install-producer.ts +0 -79
- package/apps/storefront/scripts/generated/v84-clean-clone-replay.bundle.mjs +0 -10982
- package/apps/storefront/scripts/import-v84-through-ws2.ts +0 -38
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling-dependency.ts +0 -2
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling.ts +0 -4
- package/apps/storefront/scripts/install-v84-native-through-ws1.ts +0 -185
- package/apps/storefront/scripts/prove-clone-isolation.ts +0 -506
- package/apps/storefront/scripts/replay-v84-clean-clone-pass.ts +0 -148
- package/apps/storefront/scripts/replay-v84-clean-clone-standalone.ts +0 -35
- package/apps/storefront/scripts/replay-v84-clean-clone.ts +0 -214
- package/apps/storefront/scripts/run-fixed-v84-native-install-producer.mjs +0 -18
- package/apps/storefront/scripts/run-v84-clone-isolation-proof.mjs +0 -18
- package/apps/storefront/scripts/run-v84-clone-lifecycle-proof.mjs +0 -18
- package/apps/storefront/scripts/run-v84-import-through-ws2-proof.mjs +0 -17
- package/apps/storefront/scripts/run-v84-nonportable-route-dogfood.mjs +0 -15
- package/apps/storefront/scripts/sanitize-v84-proof-environment.mjs +0 -21
- package/apps/storefront/scripts/v84CleanCloneGraphPin.ts +0 -42
- package/apps/storefront/scripts/v84CleanCloneSourceGraph.ts +0 -145
- package/apps/storefront/scripts/validate-v84-clone-lifecycle.ts +0 -18
- package/apps/storefront/src/components/admin/AdminAIWorkflowsTab.astro +0 -531
- package/apps/storefront/src/components/admin/AdminBlogDetailRail.astro +0 -878
- package/apps/storefront/src/components/admin/AdminBlogTab.astro +0 -1435
- package/apps/storefront/src/components/admin/AdminCheckoutSettingsPanel.astro +0 -226
- package/apps/storefront/src/components/admin/AdminCustomersTab.astro +0 -593
- package/apps/storefront/src/components/admin/AdminFulfillmentTab.astro +0 -465
- package/apps/storefront/src/components/admin/AdminIntegrationsTab.astro +0 -105
- package/apps/storefront/src/components/admin/AdminProductsTab.astro +0 -901
- package/apps/storefront/src/components/admin/AdminPublishTab.astro +0 -2978
- package/apps/storefront/src/components/admin/AdminReportingTab.astro +0 -435
- package/apps/storefront/src/components/admin/AdminSettingsTab.astro +0 -782
- package/apps/storefront/src/components/admin/AdminSubscriptionsTab.astro +0 -611
- package/apps/storefront/src/components/admin/orders/OrdersWorkspace.astro +0 -1223
- package/apps/storefront/src/lib/dev/cockpitStore.ts +0 -57
- package/apps/storefront/src/lib/publish/adminPublishTab.ts +0 -4625
- package/apps/storefront/src/lib/publish/apex-readiness.ts +0 -360
- package/apps/storefront/src/lib/publish/buildStream.ts +0 -269
- package/apps/storefront/src/lib/publish/collapsePersistence.ts +0 -72
- package/apps/storefront/src/lib/publish/dispatchHealth.ts +0 -267
- package/apps/storefront/src/lib/publish/domainState.ts +0 -360
- package/apps/storefront/src/lib/publish/lifecycleState.ts +0 -369
- package/apps/storefront/src/lib/publish/liveReleaseSummary.ts +0 -29
- package/apps/storefront/src/lib/publish/mergeDoctorOnFailure.ts +0 -78
- package/apps/storefront/src/lib/publish/mergeHealthBanner.ts +0 -62
- package/apps/storefront/src/lib/publish/mergeRowFindings.ts +0 -124
- package/apps/storefront/src/lib/publish/mergeSupportEscalation.ts +0 -75
- package/apps/storefront/src/lib/publish/panelPolling.ts +0 -78
- package/apps/storefront/src/lib/publish/publish-guard.ts +0 -88
- package/apps/storefront/src/lib/publish/publishFormat.ts +0 -165
- package/apps/storefront/src/lib/publish/publishHero.ts +0 -177
- package/apps/storefront/src/lib/publish/reviewRelease/changeState.ts +0 -66
- package/apps/storefront/src/lib/publish/reviewRelease/copy.ts +0 -141
- package/apps/storefront/src/lib/publish/reviewRelease/index.ts +0 -41
- package/apps/storefront/src/lib/publish/reviewRelease/permissions.ts +0 -47
- package/apps/storefront/src/lib/publish/reviewRelease/releaseState.ts +0 -42
- package/apps/storefront/src/lib/publish/reviewRelease/types.ts +0 -59
- package/apps/storefront/src/lib/publish/reviewRelease/viewModel.ts +0 -440
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/actions.ts +0 -161
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/controller.ts +0 -325
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/render.ts +0 -241
- package/apps/storefront/src/lib/publish/shipWorkspace.ts +0 -439
- package/apps/storefront/src/lib/publish/sseRoute.ts +0 -119
- package/apps/storefront/src/lib/publish/stageBundleUpload.ts +0 -215
- package/apps/storefront/src/lib/publish/streamLogConsole.ts +0 -142
- package/apps/storefront/src/lib/publish/versionNumber.ts +0 -52
- package/apps/storefront/src/pages/admin/ops-timeline.astro +0 -420
- package/apps/storefront/src/pages/admin/review-release.astro +0 -265
- package/apps/storefront/src/pages/admin/select.astro +0 -96
- package/apps/storefront/src/pages/admin.astro +0 -568
- package/apps/storefront/src/pages/api/apps/admin/credentials/rotate.ts +0 -86
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration-install.ts +0 -174
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration.ts +0 -96
- package/apps/storefront/src/pages/api/apps/admin/health.ts +0 -44
- package/apps/storefront/src/pages/api/apps/admin/install.ts +0 -125
- package/apps/storefront/src/pages/api/apps/admin/integration-lifecycle.ts +0 -118
- package/apps/storefront/src/pages/api/apps/admin/integrations.ts +0 -89
- package/apps/storefront/src/pages/api/apps/admin/list.ts +0 -26
- package/apps/storefront/src/pages/api/apps/admin/platform-adapters.ts +0 -85
- package/apps/storefront/src/pages/api/apps/admin/resume.ts +0 -79
- package/apps/storefront/src/pages/api/apps/admin/suspend.ts +0 -80
- package/apps/storefront/src/pages/api/apps/admin/uninstall.ts +0 -98
- package/apps/storefront/src/pages/api/apps/admin/update.ts +0 -126
- package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries/[deliveryId]/replay.ts +0 -70
- package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries.ts +0 -51
- package/apps/storefront/src/pages/api/apps/internal/order-forward.ts +0 -255
- package/apps/storefront/src/pages/api/apps/oauth/token.ts +0 -87
- package/apps/storefront/src/pages/api/apps/v1/attribution.ts +0 -162
- package/apps/storefront/src/pages/api/apps/v1/catalog/products/[handle].ts +0 -39
- package/apps/storefront/src/pages/api/apps/v1/catalog/products.ts +0 -49
- package/apps/storefront/src/pages/api/apps/v1/health.ts +0 -32
- package/apps/storefront/src/pages/api/apps/v1/inventory.ts +0 -59
- package/apps/storefront/src/pages/api/apps/v1/orders/[id].ts +0 -48
- package/apps/storefront/src/pages/api/apps/v1/orders.ts +0 -73
- package/apps/storefront/src/pages/api/apps/v1/reports.ts +0 -21
- package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries/[deliveryId]/replay.ts +0 -74
- package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries.ts +0 -47
- package/apps/storefront/src/pages/api/cache-purge.ts +0 -55
- package/apps/storefront/src/pages/api/compliance/tamper.ts +0 -88
- package/apps/storefront/src/pages/api/dashboard/enter-vendor.ts +0 -154
- package/apps/storefront/src/pages/api/dashboard/vendor-search.ts +0 -120
- package/apps/storefront/src/pages/api/integrations/v1/[operation].ts +0 -108
- package/apps/storefront/src/pages/api/publish/stage-bundle.ts +0 -70
- package/apps/storefront/src/pages/api/test/dev-session.ts +0 -133
- package/apps/storefront/src/pages/cockpit.astro +0 -1548
- package/apps/storefront/src/pages/dashboard/[appDomain]/apps/index.astro +0 -119
- package/apps/storefront/src/pages/dashboard/[appDomain]/index.astro +0 -105
- package/apps/storefront/src/pages/dashboard/[appDomain]/team.astro +0 -177
- package/apps/storefront/src/pages/dashboard/index.astro +0 -160
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** Emit deterministic, sanitized WS3 evidence to stdout. No files or services are mutated. */
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import type { GetAdapterDefinitionRequest, GetAdapterDefinitionResponse } from "@tot/public-runtime";
|
|
5
|
-
import { managedAnalyticsAdapterDefinitions } from "../src/lib/apps/managedAnalyticsService.js";
|
|
6
|
-
import { buildV84CloneMigrationEvidence } from "../src/lib/apps/v84CloneMigrationEvidence.js";
|
|
7
|
-
|
|
8
|
-
if (process.argv.length !== 2) {
|
|
9
|
-
process.stderr.write("refused: fixed-input evidence command accepts no arguments\n");
|
|
10
|
-
process.exit(64);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const fixture = readFileSync(
|
|
14
|
-
fileURLToPath(
|
|
15
|
-
new URL(
|
|
16
|
-
"../../../packages/public-runtime/tests/gtm-migration/fixtures/gtm-sample-container-v84.redacted.json",
|
|
17
|
-
import.meta.url,
|
|
18
|
-
),
|
|
19
|
-
),
|
|
20
|
-
"utf8",
|
|
21
|
-
);
|
|
22
|
-
const definitions = managedAnalyticsAdapterDefinitions();
|
|
23
|
-
const catalog = {
|
|
24
|
-
async getAdapterDefinition(request: GetAdapterDefinitionRequest): Promise<GetAdapterDefinitionResponse> {
|
|
25
|
-
const found = definitions.find((definition) => definition.adapterId === request.query.adapterId);
|
|
26
|
-
if (!found) {
|
|
27
|
-
return {
|
|
28
|
-
apiVersion: "v1",
|
|
29
|
-
requestId: "req-v84-not-found",
|
|
30
|
-
error: { code: "not_found", message: "The requested adapter was not found." },
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return { apiVersion: "v1", requestId: "req-v84-catalog", data: found };
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const evidence = await buildV84CloneMigrationEvidence(fixture, catalog);
|
|
38
|
-
process.stdout.write(`${JSON.stringify(evidence, null, 2)}\n`);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/** Pinned inert transform target used to initialize tsx before capabilities close. */
|
|
2
|
-
import { V84_LIFECYCLE_TOOLING_DEPENDENCY_READY } from "./initialize-v84-lifecycle-tooling-dependency.js";
|
|
3
|
-
|
|
4
|
-
export const V84_LIFECYCLE_TOOLING_READY: true = V84_LIFECYCLE_TOOLING_DEPENDENCY_READY;
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/** Fixed-input, offline WS1 review/install evidence. No tenant or service is contacted. */
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import type {
|
|
5
|
-
CreateIntegrationInstallRequest,
|
|
6
|
-
CreateIntegrationInstallResponse,
|
|
7
|
-
CreateMigrationDraftRequest,
|
|
8
|
-
CreateMigrationDraftResponse,
|
|
9
|
-
GetAdapterDefinitionRequest,
|
|
10
|
-
GetAdapterDefinitionResponse,
|
|
11
|
-
GetIntegrationInstallRequest,
|
|
12
|
-
GetIntegrationInstallResponse,
|
|
13
|
-
GetMigrationDraftRequest,
|
|
14
|
-
GetMigrationDraftResponse,
|
|
15
|
-
IntegrationInstall,
|
|
16
|
-
IntegrationRevisionV1,
|
|
17
|
-
MigrationDraftV1,
|
|
18
|
-
ReviseIntegrationInstallRequest,
|
|
19
|
-
ReviseIntegrationInstallResponse,
|
|
20
|
-
} from "@tot/public-runtime";
|
|
21
|
-
import {
|
|
22
|
-
V84_NATIVE_CLONE_TENANT,
|
|
23
|
-
buildV84CloneNativeInstallEvidence,
|
|
24
|
-
v84PublicAdapterDefinitions,
|
|
25
|
-
} from "../src/lib/apps/v84CloneNativeInstallEvidence.js";
|
|
26
|
-
import { buildV84CloneMigrationEvidence } from "../src/lib/apps/v84CloneMigrationEvidence.js";
|
|
27
|
-
import {
|
|
28
|
-
createWs1ManagedAnalyticsClient,
|
|
29
|
-
type Ws1ManagedAnalyticsMigrationClient,
|
|
30
|
-
} from "../src/lib/apps/ws1ManagedAnalyticsClient.js";
|
|
31
|
-
import type { V84CloneMigrationEvidence } from "../src/lib/apps/v84CloneMigrationEvidence.js";
|
|
32
|
-
import {
|
|
33
|
-
sameV84ReplayValue,
|
|
34
|
-
type V84CleanCloneReplayContext,
|
|
35
|
-
} from "../src/lib/apps/v84CleanCloneReplayContext.js";
|
|
36
|
-
|
|
37
|
-
/** Build the fixed native evidence, optionally consuming an in-process import handoff. */
|
|
38
|
-
export async function buildFixedV84NativeInstallEvidence(
|
|
39
|
-
importedHandoff?: V84CloneMigrationEvidence,
|
|
40
|
-
replayContext?: V84CleanCloneReplayContext,
|
|
41
|
-
) {
|
|
42
|
-
const AT = "2026-08-29T00:00:00.000Z";
|
|
43
|
-
const definitions = v84PublicAdapterDefinitions();
|
|
44
|
-
const localDrafts = new Map<string, MigrationDraftV1>();
|
|
45
|
-
let draftSequence = 0;
|
|
46
|
-
let installSequence = 0;
|
|
47
|
-
if (replayContext) {
|
|
48
|
-
const sharedImport = replayContext.read<V84CloneMigrationEvidence>("stage/import/handoff");
|
|
49
|
-
if (!importedHandoff || !sameV84ReplayValue(sharedImport, importedHandoff)) {
|
|
50
|
-
throw new Error("The native proof did not receive the shared import handoff.");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const putDraft = (draft: MigrationDraftV1) => {
|
|
54
|
-
if (replayContext) replayContext.write(`stage/native/drafts/${draft.draftId}`, draft);
|
|
55
|
-
else localDrafts.set(draft.draftId, draft);
|
|
56
|
-
};
|
|
57
|
-
const getDraft = (draftId: string) => replayContext
|
|
58
|
-
? replayContext.read<MigrationDraftV1>(`stage/native/drafts/${draftId}`)
|
|
59
|
-
: localDrafts.get(draftId);
|
|
60
|
-
|
|
61
|
-
const readOk = <T>(requestId: string, data: T) => ({ apiVersion: "v1" as const, requestId, data });
|
|
62
|
-
const mutationOk = <T>(requestId: string, data: T) => ({
|
|
63
|
-
apiVersion: "v1" as const,
|
|
64
|
-
requestId,
|
|
65
|
-
idempotencyReplayed: false,
|
|
66
|
-
data,
|
|
67
|
-
});
|
|
68
|
-
const notFound = (requestId: string) => ({
|
|
69
|
-
apiVersion: "v1" as const,
|
|
70
|
-
requestId,
|
|
71
|
-
error: { code: "not_found" as const, message: "The requested resource was not found." },
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
const backend: Ws1ManagedAnalyticsMigrationClient = {
|
|
75
|
-
async createMigrationDraft(request: CreateMigrationDraftRequest): Promise<CreateMigrationDraftResponse> {
|
|
76
|
-
draftSequence += 1;
|
|
77
|
-
const draft: MigrationDraftV1 = {
|
|
78
|
-
schemaVersion: 1,
|
|
79
|
-
draftId: `draft-v84-${draftSequence}`,
|
|
80
|
-
revision: 1,
|
|
81
|
-
source: "approved-migration",
|
|
82
|
-
status: "draft",
|
|
83
|
-
enabled: false,
|
|
84
|
-
publishes: false,
|
|
85
|
-
proposedAdapterId: request.body.proposedAdapterId,
|
|
86
|
-
proposedConfiguration: { ...request.body.proposedConfiguration },
|
|
87
|
-
findings: [...request.body.findings],
|
|
88
|
-
createdAt: AT,
|
|
89
|
-
updatedAt: AT,
|
|
90
|
-
};
|
|
91
|
-
putDraft(draft);
|
|
92
|
-
return mutationOk(`req-draft-${draftSequence}`, draft);
|
|
93
|
-
},
|
|
94
|
-
async getMigrationDraft(request: GetMigrationDraftRequest): Promise<GetMigrationDraftResponse> {
|
|
95
|
-
const found = getDraft(request.query.draftId);
|
|
96
|
-
return found ? readOk("req-draft-read", found) : notFound("req-draft-missing");
|
|
97
|
-
},
|
|
98
|
-
async getAdapterDefinition(request: GetAdapterDefinitionRequest): Promise<GetAdapterDefinitionResponse> {
|
|
99
|
-
const found = definitions.find((definition) => definition.adapterId === request.query.adapterId);
|
|
100
|
-
return found ? readOk("req-adapter-read", found) : notFound("req-adapter-missing");
|
|
101
|
-
},
|
|
102
|
-
async getIntegrationInstall(_request: GetIntegrationInstallRequest): Promise<GetIntegrationInstallResponse> {
|
|
103
|
-
return notFound("req-install-missing");
|
|
104
|
-
},
|
|
105
|
-
async createIntegrationInstall(request: CreateIntegrationInstallRequest): Promise<CreateIntegrationInstallResponse> {
|
|
106
|
-
installSequence += 1;
|
|
107
|
-
const installId = `install-v84-${installSequence}`;
|
|
108
|
-
const revisionId = `revision-v84-${installSequence}`;
|
|
109
|
-
const install: IntegrationInstall = {
|
|
110
|
-
schemaVersion: 1,
|
|
111
|
-
installId,
|
|
112
|
-
adapterId: request.body.adapterId,
|
|
113
|
-
status: "disabled",
|
|
114
|
-
activeRevisionId: null,
|
|
115
|
-
revision: 1,
|
|
116
|
-
createdAt: AT,
|
|
117
|
-
updatedAt: AT,
|
|
118
|
-
};
|
|
119
|
-
const revision: IntegrationRevisionV1 = {
|
|
120
|
-
schemaVersion: 1,
|
|
121
|
-
revisionId,
|
|
122
|
-
installId,
|
|
123
|
-
adapterId: request.body.adapterId,
|
|
124
|
-
adapterVersion: request.body.adapterVersion,
|
|
125
|
-
sequence: 1,
|
|
126
|
-
status: "draft",
|
|
127
|
-
configuration: { ...request.body.configuration },
|
|
128
|
-
createdAt: AT,
|
|
129
|
-
};
|
|
130
|
-
replayContext?.write(`stage/native/installs/${installId}`, { install, revision });
|
|
131
|
-
return mutationOk(`req-install-${installSequence}`, { install, revision });
|
|
132
|
-
},
|
|
133
|
-
async reviseIntegrationInstall(_request: ReviseIntegrationInstallRequest): Promise<ReviseIntegrationInstallResponse> {
|
|
134
|
-
throw new Error("The fixed-input proof never revises an install.");
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const fetchImpl = async (input: string | URL | Request, init?: RequestInit): Promise<Response> => {
|
|
139
|
-
const url = new URL(String(input));
|
|
140
|
-
const headers = new Headers(init?.headers);
|
|
141
|
-
if (
|
|
142
|
-
url.origin !== "https://ws1.invalid" ||
|
|
143
|
-
headers.get("x-tot-tenant") !== V84_NATIVE_CLONE_TENANT ||
|
|
144
|
-
headers.has("authorization") ||
|
|
145
|
-
init?.method !== "POST"
|
|
146
|
-
) throw new Error("The offline public WS1 client boundary changed.");
|
|
147
|
-
const request = JSON.parse(String(init.body)) as unknown;
|
|
148
|
-
if (/"tenant/i.test(JSON.stringify(request))) throw new Error("A public WS1 request body carried tenant authority.");
|
|
149
|
-
const operation = url.pathname.split("/").at(-1);
|
|
150
|
-
let response: unknown;
|
|
151
|
-
switch (operation) {
|
|
152
|
-
case "createMigrationDraft": response = await backend.createMigrationDraft(request as CreateMigrationDraftRequest); break;
|
|
153
|
-
case "getMigrationDraft": response = await backend.getMigrationDraft(request as GetMigrationDraftRequest); break;
|
|
154
|
-
case "getAdapterDefinition": response = await backend.getAdapterDefinition(request as GetAdapterDefinitionRequest); break;
|
|
155
|
-
case "getIntegrationInstall": response = await backend.getIntegrationInstall(request as GetIntegrationInstallRequest); break;
|
|
156
|
-
case "createIntegrationInstall": response = await backend.createIntegrationInstall(request as CreateIntegrationInstallRequest); break;
|
|
157
|
-
case "reviseIntegrationInstall": response = await backend.reviseIntegrationInstall(request as ReviseIntegrationInstallRequest); break;
|
|
158
|
-
default: throw new Error("The offline public WS1 client called an unexpected operation.");
|
|
159
|
-
}
|
|
160
|
-
return new Response(JSON.stringify(response), { status: 200, headers: { "content-type": "application/json" } });
|
|
161
|
-
};
|
|
162
|
-
const client = createWs1ManagedAnalyticsClient({
|
|
163
|
-
baseUrl: "https://ws1.invalid",
|
|
164
|
-
tenantId: V84_NATIVE_CLONE_TENANT,
|
|
165
|
-
fetchImpl,
|
|
166
|
-
});
|
|
167
|
-
const importEvidence = importedHandoff ?? await buildV84CloneMigrationEvidence(
|
|
168
|
-
readFileSync(fileURLToPath(new URL("../../../packages/public-runtime/tests/gtm-migration/fixtures/gtm-sample-container-v84.redacted.json", import.meta.url)), "utf8"),
|
|
169
|
-
client,
|
|
170
|
-
);
|
|
171
|
-
const evidence = await buildV84CloneNativeInstallEvidence(client, importEvidence);
|
|
172
|
-
replayContext?.write("stage/native/handoff", evidence);
|
|
173
|
-
return evidence;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
const invokedPath = import.meta.url.startsWith("file:") && fileURLToPath(import.meta.url) === process.argv.at(1);
|
|
177
|
-
if (invokedPath) {
|
|
178
|
-
if (process.argv.length !== 2) {
|
|
179
|
-
process.stderr.write("refused: fixed-input evidence command accepts no arguments\n");
|
|
180
|
-
process.exit(64);
|
|
181
|
-
} else {
|
|
182
|
-
const evidence = await buildFixedV84NativeInstallEvidence();
|
|
183
|
-
process.stdout.write(`${JSON.stringify(evidence, null, 2)}\n`);
|
|
184
|
-
}
|
|
185
|
-
}
|