@open-mercato/cli 0.8.1-develop.7296.1.2111d779db → 0.9.0
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/.turbo/turbo-build.log +8 -2
- package/AGENTS.md +2 -0
- package/dist/agentic/guides/module-facts.json +7612 -848
- package/dist/agentic/guides/module-facts.v2.json +7612 -848
- package/dist/agentic/guides/modules/agent_orchestrator/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/agent_orchestrator/index.md +1 -1
- package/dist/agentic/guides/modules/ai_assistant/encryption.md +13 -0
- package/dist/agentic/guides/modules/ai_assistant/exact-override-targets.md +3 -0
- package/dist/agentic/guides/modules/ai_assistant/index.md +4 -3
- package/dist/agentic/guides/modules/api_docs/index.md +1 -1
- package/dist/agentic/guides/modules/api_keys/domain-commands.md +12 -0
- package/dist/agentic/guides/modules/api_keys/index.md +3 -2
- package/dist/agentic/guides/modules/attachments/index.md +1 -1
- package/dist/agentic/guides/modules/audit_logs/index.md +1 -1
- package/dist/agentic/guides/modules/auth/index.md +1 -1
- package/dist/agentic/guides/modules/availability/acl-features.md +13 -0
- package/dist/agentic/guides/modules/availability/backend-pages.md +14 -0
- package/dist/agentic/guides/modules/availability/di-registrations-rich.md +11 -0
- package/dist/agentic/guides/modules/availability/domain-commands.md +13 -0
- package/dist/agentic/guides/modules/availability/entities.md +11 -0
- package/dist/agentic/guides/modules/availability/events.md +13 -0
- package/dist/agentic/guides/modules/availability/exact-override-targets.md +19 -0
- package/dist/agentic/guides/modules/availability/host-extension-points.md +10 -0
- package/dist/agentic/guides/modules/availability/index.md +22 -0
- package/dist/agentic/guides/modules/availability/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/availability/setup.md +11 -0
- package/dist/agentic/guides/modules/availability/umes-hosts.md +14 -0
- package/dist/agentic/guides/modules/business_rules/index.md +1 -1
- package/dist/agentic/guides/modules/catalog/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/catalog/di-registrations-rich.md +1 -0
- package/dist/agentic/guides/modules/catalog/exact-override-targets.md +3 -0
- package/dist/agentic/guides/modules/catalog/index.md +1 -1
- package/dist/agentic/guides/modules/catalog/workers.md +2 -0
- package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
- package/dist/agentic/guides/modules/channel_discord/index.md +1 -1
- package/dist/agentic/guides/modules/channel_expo/index.md +1 -1
- package/dist/agentic/guides/modules/channel_fcm/index.md +1 -1
- package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
- package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
- package/dist/agentic/guides/modules/channel_resend/index.md +1 -1
- package/dist/agentic/guides/modules/channel_ses/index.md +1 -1
- package/dist/agentic/guides/modules/checkout/index.md +1 -1
- package/dist/agentic/guides/modules/communication_channels/acl-features.md +2 -1
- package/dist/agentic/guides/modules/communication_channels/contribution-resolutions.md +1 -0
- package/dist/agentic/guides/modules/communication_channels/di-registrations-rich.md +11 -10
- package/dist/agentic/guides/modules/communication_channels/domain-commands.md +1 -0
- package/dist/agentic/guides/modules/communication_channels/events.md +2 -1
- package/dist/agentic/guides/modules/communication_channels/exact-override-targets.md +12 -10
- package/dist/agentic/guides/modules/communication_channels/incoming-installed-contributions.md +1 -0
- package/dist/agentic/guides/modules/communication_channels/index.md +2 -2
- package/dist/agentic/guides/modules/communication_channels/umes-contributions.md +1 -0
- package/dist/agentic/guides/modules/communication_channels/umes-hosts.md +1 -0
- package/dist/agentic/guides/modules/configs/index.md +1 -1
- package/dist/agentic/guides/modules/content/index.md +1 -1
- package/dist/agentic/guides/modules/currencies/index.md +1 -1
- package/dist/agentic/guides/modules/customer_accounts/index.md +1 -1
- package/dist/agentic/guides/modules/customer_groups/acl-features.md +16 -0
- package/dist/agentic/guides/modules/customer_groups/active-extension-bindings.md +13 -0
- package/dist/agentic/guides/modules/customer_groups/backend-pages.md +14 -0
- package/dist/agentic/guides/modules/customer_groups/cli-commands.md +11 -0
- package/dist/agentic/guides/modules/customer_groups/contribution-resolutions.md +13 -0
- package/dist/agentic/guides/modules/customer_groups/di-registrations-rich.md +13 -0
- package/dist/agentic/guides/modules/customer_groups/di-service-tokens.md +11 -0
- package/dist/agentic/guides/modules/customer_groups/domain-commands.md +11 -0
- package/dist/agentic/guides/modules/customer_groups/entities.md +13 -0
- package/dist/agentic/guides/modules/customer_groups/events.md +17 -0
- package/dist/agentic/guides/modules/customer_groups/exact-override-targets.md +27 -0
- package/dist/agentic/guides/modules/customer_groups/index.md +26 -0
- package/dist/agentic/guides/modules/customer_groups/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/customer_groups/setup.md +11 -0
- package/dist/agentic/guides/modules/customer_groups/umes-contributions.md +13 -0
- package/dist/agentic/guides/modules/customer_groups/umes-hosts.md +21 -0
- package/dist/agentic/guides/modules/customers/acl-features.md +2 -1
- package/dist/agentic/guides/modules/customers/active-extension-bindings.md +8 -7
- package/dist/agentic/guides/modules/customers/contribution-resolutions.md +1 -0
- package/dist/agentic/guides/modules/customers/domain-commands.md +1 -0
- package/dist/agentic/guides/modules/customers/entities.md +1 -0
- package/dist/agentic/guides/modules/customers/events.md +2 -1
- package/dist/agentic/guides/modules/customers/exact-override-targets.md +2 -0
- package/dist/agentic/guides/modules/customers/index.md +3 -3
- package/dist/agentic/guides/modules/customers/umes-contributions.md +1 -0
- package/dist/agentic/guides/modules/customers/umes-hosts.md +3 -0
- package/dist/agentic/guides/modules/dashboards/index.md +1 -1
- package/dist/agentic/guides/modules/data_sync/index.md +1 -1
- package/dist/agentic/guides/modules/design_system/index.md +1 -1
- package/dist/agentic/guides/modules/devices/index.md +1 -1
- package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
- package/dist/agentic/guides/modules/directory/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/directory/index.md +1 -1
- package/dist/agentic/guides/modules/documents/index.md +1 -1
- package/dist/agentic/guides/modules/entities/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/entities/index.md +1 -1
- package/dist/agentic/guides/modules/eudr/index.md +1 -1
- package/dist/agentic/guides/modules/events/index.md +1 -1
- package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
- package/dist/agentic/guides/modules/forms/acl-features.md +16 -0
- package/dist/agentic/guides/modules/forms/active-extension-bindings.md +14 -0
- package/dist/agentic/guides/modules/forms/backend-pages.md +17 -0
- package/dist/agentic/guides/modules/forms/contribution-resolutions.md +21 -0
- package/dist/agentic/guides/modules/forms/di-registrations-rich.md +27 -0
- package/dist/agentic/guides/modules/forms/di-service-tokens.md +19 -0
- package/dist/agentic/guides/modules/forms/domain-commands.md +30 -0
- package/dist/agentic/guides/modules/forms/encryption.md +11 -0
- package/dist/agentic/guides/modules/forms/entities.md +21 -0
- package/dist/agentic/guides/modules/forms/events.md +28 -0
- package/dist/agentic/guides/modules/forms/exact-override-targets.md +59 -0
- package/dist/agentic/guides/modules/forms/frontend-pages.md +16 -0
- package/dist/agentic/guides/modules/forms/index.md +28 -0
- package/dist/agentic/guides/modules/forms/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/forms/setup.md +11 -0
- package/dist/agentic/guides/modules/forms/umes-contributions.md +21 -0
- package/dist/agentic/guides/modules/forms/umes-hosts.md +43 -0
- package/dist/agentic/guides/modules/forms/workers.md +12 -0
- package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
- package/dist/agentic/guides/modules/generators/index.md +1 -1
- package/dist/agentic/guides/modules/inbox_ops/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/inbox_ops/index.md +1 -1
- package/dist/agentic/guides/modules/integrations/di-registrations-rich.md +8 -8
- package/dist/agentic/guides/modules/integrations/di-service-tokens.md +4 -4
- package/dist/agentic/guides/modules/integrations/exact-override-targets.md +8 -8
- package/dist/agentic/guides/modules/integrations/index.md +1 -1
- package/dist/agentic/guides/modules/messages/index.md +1 -1
- package/dist/agentic/guides/modules/notifications/index.md +1 -1
- package/dist/agentic/guides/modules/onboarding/index.md +1 -1
- package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
- package/dist/agentic/guides/modules/perspectives/index.md +1 -1
- package/dist/agentic/guides/modules/phone_calls/index.md +1 -1
- package/dist/agentic/guides/modules/planner/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/planner/index.md +1 -1
- package/dist/agentic/guides/modules/portal/index.md +1 -1
- package/dist/agentic/guides/modules/progress/index.md +1 -1
- package/dist/agentic/guides/modules/push_notifications/index.md +1 -1
- package/dist/agentic/guides/modules/query_index/index.md +1 -1
- package/dist/agentic/guides/modules/record_locks/index.md +1 -1
- package/dist/agentic/guides/modules/resources/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/resources/index.md +1 -1
- package/dist/agentic/guides/modules/sales/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/sales/exact-override-targets.md +4 -4
- package/dist/agentic/guides/modules/sales/index.md +1 -1
- package/dist/agentic/guides/modules/sales/setup.md +1 -1
- package/dist/agentic/guides/modules/scheduler/index.md +1 -1
- package/dist/agentic/guides/modules/search/index.md +1 -1
- package/dist/agentic/guides/modules/security/index.md +1 -1
- package/dist/agentic/guides/modules/seeds/index.md +1 -1
- package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
- package/dist/agentic/guides/modules/sso/index.md +1 -1
- package/dist/agentic/guides/modules/staff/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/staff/index.md +1 -1
- package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
- package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
- package/dist/agentic/guides/modules/sync_excel/active-extension-bindings.md +11 -0
- package/dist/agentic/guides/modules/sync_excel/index.md +3 -2
- package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
- package/dist/agentic/guides/modules/telemetry/index.md +1 -1
- package/dist/agentic/guides/modules/tillio/index.md +1 -1
- package/dist/agentic/guides/modules/translations/index.md +1 -1
- package/dist/agentic/guides/modules/warranty_claims/index.md +1 -1
- package/dist/agentic/guides/modules/webhooks/index.md +1 -1
- package/dist/agentic/guides/modules/wms/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/wms/contribution-resolutions.md +3 -0
- package/dist/agentic/guides/modules/wms/di-registrations-rich.md +8 -8
- package/dist/agentic/guides/modules/wms/exact-override-targets.md +11 -8
- package/dist/agentic/guides/modules/wms/index.md +3 -3
- package/dist/agentic/guides/modules/wms/umes-contributions.md +3 -0
- package/dist/agentic/guides/modules/workflows/active-extension-bindings.md +3 -3
- package/dist/agentic/guides/modules/workflows/index.md +1 -1
- package/dist/agentic/guides/reference-module-facts.json +1 -1
- package/dist/agentic/guides/upstream/BACKWARD_COMPATIBILITY.md +73 -1
- package/dist/agentic/guides/upstream/manifest.json +2 -2
- package/dist/agentic/shared/ai/skills/om-auto-upgrade-0.8.0-to-0.9.0/SKILL.md +112 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/sensitive-data.md +1 -1
- package/dist/agentic/shared/ai/skills/tiers.json +2 -1
- package/dist/bin.js +2 -2
- package/dist/bin.js.map +2 -2
- package/dist/lib/db/commands.js +84 -5
- package/dist/lib/db/commands.js.map +2 -2
- package/dist/lib/db/encryption-backfill-check.js +112 -0
- package/dist/lib/db/encryption-backfill-check.js.map +7 -0
- package/dist/lib/db/migration-reindex.js +2 -1
- package/dist/lib/db/migration-reindex.js.map +2 -2
- package/dist/lib/events-single-delivery.js.map +2 -2
- package/dist/lib/flush-before-exit.js +19 -0
- package/dist/lib/flush-before-exit.js.map +7 -0
- package/dist/lib/generate-watch-structure.js +113 -19
- package/dist/lib/generate-watch-structure.js.map +3 -3
- package/dist/lib/generators/module-registry.js +4 -2
- package/dist/lib/generators/module-registry.js.map +2 -2
- package/dist/lib/generators/web-research-adapters.js +32 -11
- package/dist/lib/generators/web-research-adapters.js.map +2 -2
- package/dist/lib/telemetry-init.js +69 -11
- package/dist/lib/telemetry-init.js.map +3 -3
- package/dist/lib/testing/integration.js +29 -2
- package/dist/lib/testing/integration.js.map +2 -2
- package/package.json +8 -8
- package/src/bin.ts +4 -4
- package/src/lib/__tests__/flush-before-exit.test.ts +32 -0
- package/src/lib/__tests__/generate-watch-structure.test.ts +261 -3
- package/src/lib/__tests__/telemetry-init.test.ts +89 -0
- package/src/lib/db/__tests__/commands.test.ts +43 -0
- package/src/lib/db/__tests__/dynamic-import-specifier.test.ts +36 -0
- package/src/lib/db/__tests__/encryption-backfill-check.test.ts +146 -0
- package/src/lib/db/__tests__/migration-reindex.test.ts +48 -3
- package/src/lib/db/commands.ts +113 -10
- package/src/lib/db/encryption-backfill-check.ts +163 -0
- package/src/lib/db/migration-reindex.ts +2 -1
- package/src/lib/events-single-delivery.ts +5 -2
- package/src/lib/flush-before-exit.ts +39 -0
- package/src/lib/generate-watch-structure.ts +134 -19
- package/src/lib/generators/__tests__/module-facts.customers.fixture.test.ts +14 -3
- package/src/lib/generators/__tests__/module-package-sources.test.ts +2 -2
- package/src/lib/generators/__tests__/registry-variant-parity.test.ts +16 -0
- package/src/lib/generators/__tests__/web-research-adapters.test.ts +141 -0
- package/src/lib/generators/module-registry.ts +2 -0
- package/src/lib/generators/web-research-adapters.ts +41 -20
- package/src/lib/telemetry-init.ts +68 -11
- package/src/lib/testing/__tests__/integration.test.ts +26 -0
- package/src/lib/testing/integration.ts +32 -2
|
@@ -4,6 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import {
|
|
5
5
|
MODULE_CODE_EXTENSIONS,
|
|
6
6
|
SCAN_CONFIGS,
|
|
7
|
+
resolveStandaloneSourceMirrorBase,
|
|
7
8
|
scanModuleDir,
|
|
8
9
|
stripModuleCodeExtension
|
|
9
10
|
} from "./generators/scanner.js";
|
|
@@ -60,6 +61,12 @@ const ROUTE_SHAPE_SCAN_CONFIGS = [
|
|
|
60
61
|
function checksum(value) {
|
|
61
62
|
return crypto.createHash("md5").update(value).digest("hex");
|
|
62
63
|
}
|
|
64
|
+
function moduleRootIdentity(roots) {
|
|
65
|
+
return JSON.stringify([
|
|
66
|
+
roots.pkgBase.replace(/\\/g, "/"),
|
|
67
|
+
roots.appBase.replace(/\\/g, "/")
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
63
70
|
function fileRecord(filePath, base, mode) {
|
|
64
71
|
if (!fs.existsSync(filePath)) return null;
|
|
65
72
|
let stat;
|
|
@@ -79,6 +86,10 @@ function fileRecord(filePath, base, mode) {
|
|
|
79
86
|
return `file:${rel}:unreadable`;
|
|
80
87
|
}
|
|
81
88
|
}
|
|
89
|
+
function addFileRecord(records, prefix, filePath, base, mode) {
|
|
90
|
+
const record = fileRecord(filePath, base, mode);
|
|
91
|
+
if (record) records.push(`${prefix}:${record}`);
|
|
92
|
+
}
|
|
82
93
|
function resolveCodeFile(base, relativePath) {
|
|
83
94
|
const stripped = stripModuleCodeExtension(relativePath);
|
|
84
95
|
const candidates = MODULE_CODE_EXTENSIONS.map((extension) => `${stripped}${extension}`);
|
|
@@ -88,6 +99,11 @@ function resolveCodeFile(base, relativePath) {
|
|
|
88
99
|
}
|
|
89
100
|
return null;
|
|
90
101
|
}
|
|
102
|
+
function resolveRuntimeCounterpart(pkgBase, sourceBase, sourceFile) {
|
|
103
|
+
if (sourceBase === pkgBase) return null;
|
|
104
|
+
const relativePath = path.relative(sourceBase, sourceFile).replace(/\\/g, "/");
|
|
105
|
+
return resolveCodeFile(pkgBase, relativePath);
|
|
106
|
+
}
|
|
91
107
|
function hasInlinePageMetadata(filePath) {
|
|
92
108
|
try {
|
|
93
109
|
const source = fs.readFileSync(filePath, "utf8");
|
|
@@ -97,43 +113,118 @@ function hasInlinePageMetadata(filePath) {
|
|
|
97
113
|
}
|
|
98
114
|
}
|
|
99
115
|
function addConventionRecords(records, roots) {
|
|
116
|
+
const packageSourceBase = resolveStandaloneSourceMirrorBase(roots.pkgBase) ?? roots.pkgBase;
|
|
100
117
|
for (const base of [roots.pkgBase, roots.appBase]) {
|
|
101
118
|
records.push(`module-root:${base}:${fs.existsSync(base) ? "present" : "missing"}`);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
119
|
+
}
|
|
120
|
+
if (packageSourceBase !== roots.pkgBase) {
|
|
121
|
+
records.push(
|
|
122
|
+
`module-root:${packageSourceBase}:${fs.existsSync(packageSourceBase) ? "present" : "missing"}`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
for (const relativePath of STRUCTURAL_CONVENTION_FILES) {
|
|
126
|
+
const appFile = resolveCodeFile(roots.appBase, relativePath);
|
|
127
|
+
if (appFile) {
|
|
128
|
+
addFileRecord(records, "convention:app", appFile, roots.appBase, "content");
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const sourceFile = resolveCodeFile(packageSourceBase, relativePath);
|
|
132
|
+
if (!sourceFile) {
|
|
133
|
+
const runtimeFile2 = packageSourceBase === roots.pkgBase ? null : resolveCodeFile(roots.pkgBase, relativePath);
|
|
134
|
+
if (runtimeFile2) {
|
|
135
|
+
addFileRecord(records, "convention:package-runtime", runtimeFile2, roots.pkgBase, "content");
|
|
136
|
+
} else {
|
|
137
|
+
records.push(`convention:missing:${relativePath}`);
|
|
107
138
|
}
|
|
108
|
-
|
|
109
|
-
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
const packagePrefix = packageSourceBase === roots.pkgBase ? "package" : "package-source";
|
|
142
|
+
addFileRecord(records, `convention:${packagePrefix}`, sourceFile, packageSourceBase, "content");
|
|
143
|
+
const runtimeFile = resolveRuntimeCounterpart(roots.pkgBase, packageSourceBase, sourceFile);
|
|
144
|
+
if (runtimeFile) {
|
|
145
|
+
addFileRecord(records, "convention:package-runtime", runtimeFile, roots.pkgBase, "content");
|
|
146
|
+
} else if (packageSourceBase !== roots.pkgBase) {
|
|
147
|
+
records.push(`convention:package-runtime:missing:${relativePath}`);
|
|
110
148
|
}
|
|
111
149
|
}
|
|
112
150
|
}
|
|
113
151
|
function addScannedRecords(records, roots) {
|
|
152
|
+
const packageSourceBase = resolveStandaloneSourceMirrorBase(roots.pkgBase) ?? roots.pkgBase;
|
|
114
153
|
for (const config of CONTENT_SENSITIVE_SCAN_CONFIGS) {
|
|
115
154
|
for (const scanned of scanModuleDir(roots, config)) {
|
|
116
|
-
const base = scanned.fromApp ? roots.appBase :
|
|
155
|
+
const base = scanned.fromApp ? roots.appBase : packageSourceBase;
|
|
117
156
|
const filePath = path.join(base, ...config.folder.split("/"), ...scanned.relPath.split("/"));
|
|
118
|
-
|
|
119
|
-
if (
|
|
157
|
+
let sourceOrigin = "app";
|
|
158
|
+
if (!scanned.fromApp) {
|
|
159
|
+
sourceOrigin = packageSourceBase === roots.pkgBase ? "package" : "package-source";
|
|
160
|
+
}
|
|
161
|
+
addFileRecord(records, `${config.folder}:${sourceOrigin}`, filePath, base, "content");
|
|
162
|
+
if (!scanned.fromApp && packageSourceBase !== roots.pkgBase) {
|
|
163
|
+
const runtimeFile = resolveRuntimeCounterpart(roots.pkgBase, packageSourceBase, filePath);
|
|
164
|
+
if (runtimeFile) {
|
|
165
|
+
addFileRecord(
|
|
166
|
+
records,
|
|
167
|
+
`${config.folder}:package-runtime`,
|
|
168
|
+
runtimeFile,
|
|
169
|
+
roots.pkgBase,
|
|
170
|
+
"content"
|
|
171
|
+
);
|
|
172
|
+
} else {
|
|
173
|
+
records.push(`${config.folder}:package-runtime:missing:${scanned.relPath}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
120
176
|
}
|
|
121
177
|
}
|
|
122
178
|
for (const config of ROUTE_SHAPE_SCAN_CONFIGS) {
|
|
123
179
|
for (const scanned of scanModuleDir(roots, config)) {
|
|
124
|
-
const base = scanned.fromApp ? roots.appBase :
|
|
180
|
+
const base = scanned.fromApp ? roots.appBase : packageSourceBase;
|
|
125
181
|
const folderPath = path.join(base, ...config.folder.split("/"));
|
|
126
182
|
const filePath = path.join(folderPath, ...scanned.relPath.split("/"));
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
|
|
183
|
+
let sourceOrigin = "app";
|
|
184
|
+
if (!scanned.fromApp) {
|
|
185
|
+
sourceOrigin = packageSourceBase === roots.pkgBase ? "package" : "package-source";
|
|
186
|
+
}
|
|
187
|
+
addFileRecord(
|
|
188
|
+
records,
|
|
189
|
+
`${config.folder}:${sourceOrigin}`,
|
|
190
|
+
filePath,
|
|
191
|
+
base,
|
|
192
|
+
hasInlinePageMetadata(filePath) ? "content" : "shape"
|
|
193
|
+
);
|
|
194
|
+
let runtimeFile = null;
|
|
195
|
+
if (!scanned.fromApp && packageSourceBase !== roots.pkgBase) {
|
|
196
|
+
runtimeFile = resolveRuntimeCounterpart(roots.pkgBase, packageSourceBase, filePath);
|
|
197
|
+
if (runtimeFile) {
|
|
198
|
+
addFileRecord(
|
|
199
|
+
records,
|
|
200
|
+
`${config.folder}:package-runtime`,
|
|
201
|
+
runtimeFile,
|
|
202
|
+
roots.pkgBase,
|
|
203
|
+
hasInlinePageMetadata(runtimeFile) ? "content" : "shape"
|
|
204
|
+
);
|
|
205
|
+
} else {
|
|
206
|
+
records.push(`${config.folder}:package-runtime:missing:${scanned.relPath}`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
130
209
|
const stem = stripModuleCodeExtension(path.basename(filePath));
|
|
131
210
|
const metaCandidates = stem === "page" ? ["page.meta", "meta"] : [`${stem}.meta`, "meta"];
|
|
132
211
|
for (const candidate of metaCandidates) {
|
|
133
|
-
const metaPath = resolveCodeFile(
|
|
212
|
+
const metaPath = resolveCodeFile(path.dirname(filePath), candidate);
|
|
134
213
|
if (!metaPath) continue;
|
|
135
|
-
|
|
136
|
-
|
|
214
|
+
addFileRecord(records, `${config.folder}:meta:${sourceOrigin}`, metaPath, base, "content");
|
|
215
|
+
}
|
|
216
|
+
if (runtimeFile) {
|
|
217
|
+
for (const candidate of metaCandidates) {
|
|
218
|
+
const runtimeMetaPath = resolveCodeFile(path.dirname(runtimeFile), candidate);
|
|
219
|
+
if (!runtimeMetaPath) continue;
|
|
220
|
+
addFileRecord(
|
|
221
|
+
records,
|
|
222
|
+
`${config.folder}:meta:package-runtime`,
|
|
223
|
+
runtimeMetaPath,
|
|
224
|
+
roots.pkgBase,
|
|
225
|
+
"content"
|
|
226
|
+
);
|
|
227
|
+
}
|
|
137
228
|
}
|
|
138
229
|
}
|
|
139
230
|
}
|
|
@@ -143,8 +234,11 @@ function calculateGenerateWatchStructureChecksum(options) {
|
|
|
143
234
|
const modulesRecord = fileRecord(options.modulesFile, path.dirname(options.modulesFile), "content");
|
|
144
235
|
records.push(modulesRecord ?? `missing:${options.modulesFile}`);
|
|
145
236
|
for (const roots of options.moduleRoots) {
|
|
146
|
-
|
|
147
|
-
|
|
237
|
+
const moduleRecords = [];
|
|
238
|
+
addConventionRecords(moduleRecords, roots);
|
|
239
|
+
addScannedRecords(moduleRecords, roots);
|
|
240
|
+
const rootIdentity = moduleRootIdentity(roots);
|
|
241
|
+
records.push(...moduleRecords.map((record) => `${rootIdentity}:${record}`));
|
|
148
242
|
}
|
|
149
243
|
return checksum(records.sort((a, b) => a.localeCompare(b)).join("\n"));
|
|
150
244
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/lib/generate-watch-structure.ts"],
|
|
4
|
-
"sourcesContent": ["import crypto from 'node:crypto'\nimport fs from 'node:fs'\nimport path from 'node:path'\nimport {\n MODULE_CODE_EXTENSIONS,\n SCAN_CONFIGS,\n scanModuleDir,\n stripModuleCodeExtension,\n type ModuleRoots,\n} from './generators/scanner'\n\nconst STRUCTURAL_CONVENTION_FILES = [\n 'index.ts',\n 'cli.ts',\n 'di.ts',\n 'acl.ts',\n 'setup.ts',\n 'runtime.ts',\n 'encryption.ts',\n 'ce.ts',\n 'search.ts',\n 'events.ts',\n 'notifications.ts',\n 'notifications.client.ts',\n 'notifications.handlers.ts',\n 'translations.ts',\n 'generators.ts',\n 'ai-tools.ts',\n 'ai-agents.ts',\n 'analytics.ts',\n 'workflows.ts',\n 'inbox-actions.ts',\n 'message-types.ts',\n 'message-objects.ts',\n 'integration.ts',\n 'security.mfa-providers.ts',\n 'security.sudo.ts',\n 'data/entities.ts',\n 'data/extensions.ts',\n 'data/fields.ts',\n 'data/enrichers.ts',\n 'data/guards.ts',\n 'api/interceptors.ts',\n 'commands/interceptors.ts',\n 'widgets/components.ts',\n 'widgets/injection-table.ts',\n 'frontend/middleware.ts',\n 'backend/middleware.ts',\n] as const\n\nconst CONTENT_SENSITIVE_SCAN_CONFIGS = [\n SCAN_CONFIGS.apiRoutes,\n SCAN_CONFIGS.apiPlainFiles,\n SCAN_CONFIGS.subscribers,\n SCAN_CONFIGS.workers,\n SCAN_CONFIGS.dashboardWidgets,\n SCAN_CONFIGS.injectionWidgets,\n] as const\n\nconst ROUTE_SHAPE_SCAN_CONFIGS = [\n SCAN_CONFIGS.frontendPages,\n SCAN_CONFIGS.backendPages,\n] as const\n\nfunction checksum(value: string): string {\n return crypto.createHash('md5').update(value).digest('hex')\n}\n\nfunction fileRecord(filePath: string, base: string, mode: 'content' | 'shape'): string | null {\n if (!fs.existsSync(filePath)) return null\n let stat: fs.Stats\n try {\n stat = fs.statSync(filePath)\n } catch {\n return null\n }\n if (!stat.isFile()) return null\n const rel = path.relative(base, filePath).replace(/\\\\/g, '/')\n if (mode === 'shape') {\n return `file:${rel}`\n }\n try {\n return `file:${rel}:${stat.size}:${checksum(fs.readFileSync(filePath, 'utf8'))}`\n } catch {\n return `file:${rel}:unreadable`\n }\n}\n\nfunction resolveCodeFile(base: string, relativePath: string): string | null {\n const stripped = stripModuleCodeExtension(relativePath)\n const candidates = MODULE_CODE_EXTENSIONS.map((extension) => `${stripped}${extension}`)\n for (const candidate of candidates) {\n const filePath = path.join(base, ...candidate.split('/'))\n if (fs.existsSync(filePath)) return filePath\n }\n return null\n}\n\nfunction hasInlinePageMetadata(filePath: string): boolean {\n try {\n const source = fs.readFileSync(filePath, 'utf8')\n return /\\bexport\\s+(?:const|let|var|function|class)\\s+metadata\\b/.test(source)\n || /\\bexport\\s+\\{[^}]*\\bmetadata\\b[^}]*\\}/.test(source)\n } catch {\n return false\n }\n}\n\nfunction addConventionRecords(records: string[], roots: ModuleRoots): void {\n for (const base of [roots.pkgBase, roots.appBase]) {\n records.push(`module-root:${base}:${fs.existsSync(base) ? 'present' : 'missing'}`)\n for (const relativePath of STRUCTURAL_CONVENTION_FILES) {\n const
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,MAAM,8BAA8B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,iCAAiC;AAAA,EACrC,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AACf;AAEA,MAAM,2BAA2B;AAAA,EAC/B,aAAa;AAAA,EACb,aAAa;AACf;AAEA,SAAS,SAAS,OAAuB;AACvC,SAAO,OAAO,WAAW,KAAK,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK;AAC5D;AAEA,SAAS,WAAW,UAAkB,MAAc,MAA0C;AAC5F,MAAI,CAAC,GAAG,WAAW,QAAQ,EAAG,QAAO;AACrC,MAAI;AACJ,MAAI;AACF,WAAO,GAAG,SAAS,QAAQ;AAAA,EAC7B,QAAQ;AACN,WAAO;AAAA,EACT;AACA,MAAI,CAAC,KAAK,OAAO,EAAG,QAAO;AAC3B,QAAM,MAAM,KAAK,SAAS,MAAM,QAAQ,EAAE,QAAQ,OAAO,GAAG;AAC5D,MAAI,SAAS,SAAS;AACpB,WAAO,QAAQ,GAAG;AAAA,EACpB;AACA,MAAI;AACF,WAAO,QAAQ,GAAG,IAAI,KAAK,IAAI,IAAI,SAAS,GAAG,aAAa,UAAU,MAAM,CAAC,CAAC;AAAA,EAChF,QAAQ;AACN,WAAO,QAAQ,GAAG;AAAA,EACpB;AACF;AAEA,SAAS,gBAAgB,MAAc,cAAqC;AAC1E,QAAM,WAAW,yBAAyB,YAAY;AACtD,QAAM,aAAa,uBAAuB,IAAI,CAAC,cAAc,GAAG,QAAQ,GAAG,SAAS,EAAE;AACtF,aAAW,aAAa,YAAY;AAClC,UAAM,WAAW,KAAK,KAAK,MAAM,GAAG,UAAU,MAAM,GAAG,CAAC;AACxD,QAAI,GAAG,WAAW,QAAQ,EAAG,QAAO;AAAA,EACtC;AACA,SAAO;AACT;AAEA,SAAS,sBAAsB,UAA2B;AACxD,MAAI;AACF,UAAM,SAAS,GAAG,aAAa,UAAU,MAAM;AAC/C,WAAO,2DAA2D,KAAK,MAAM,KACxE,wCAAwC,KAAK,MAAM;AAAA,EAC1D,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,qBAAqB,SAAmB,OAA0B;AACzE,aAAW,QAAQ,CAAC,MAAM,SAAS,MAAM,OAAO,GAAG;AACjD,YAAQ,KAAK,eAAe,IAAI,IAAI,GAAG,WAAW,IAAI,IAAI,YAAY,SAAS,EAAE;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import crypto from 'node:crypto'\nimport fs from 'node:fs'\nimport path from 'node:path'\nimport {\n MODULE_CODE_EXTENSIONS,\n SCAN_CONFIGS,\n resolveStandaloneSourceMirrorBase,\n scanModuleDir,\n stripModuleCodeExtension,\n type ModuleRoots,\n} from './generators/scanner'\n\nconst STRUCTURAL_CONVENTION_FILES = [\n 'index.ts',\n 'cli.ts',\n 'di.ts',\n 'acl.ts',\n 'setup.ts',\n 'runtime.ts',\n 'encryption.ts',\n 'ce.ts',\n 'search.ts',\n 'events.ts',\n 'notifications.ts',\n 'notifications.client.ts',\n 'notifications.handlers.ts',\n 'translations.ts',\n 'generators.ts',\n 'ai-tools.ts',\n 'ai-agents.ts',\n 'analytics.ts',\n 'workflows.ts',\n 'inbox-actions.ts',\n 'message-types.ts',\n 'message-objects.ts',\n 'integration.ts',\n 'security.mfa-providers.ts',\n 'security.sudo.ts',\n 'data/entities.ts',\n 'data/extensions.ts',\n 'data/fields.ts',\n 'data/enrichers.ts',\n 'data/guards.ts',\n 'api/interceptors.ts',\n 'commands/interceptors.ts',\n 'widgets/components.ts',\n 'widgets/injection-table.ts',\n 'frontend/middleware.ts',\n 'backend/middleware.ts',\n] as const\n\nconst CONTENT_SENSITIVE_SCAN_CONFIGS = [\n SCAN_CONFIGS.apiRoutes,\n SCAN_CONFIGS.apiPlainFiles,\n SCAN_CONFIGS.subscribers,\n SCAN_CONFIGS.workers,\n SCAN_CONFIGS.dashboardWidgets,\n SCAN_CONFIGS.injectionWidgets,\n] as const\n\nconst ROUTE_SHAPE_SCAN_CONFIGS = [\n SCAN_CONFIGS.frontendPages,\n SCAN_CONFIGS.backendPages,\n] as const\n\nfunction checksum(value: string): string {\n return crypto.createHash('md5').update(value).digest('hex')\n}\n\nfunction moduleRootIdentity(roots: ModuleRoots): string {\n return JSON.stringify([\n roots.pkgBase.replace(/\\\\/g, '/'),\n roots.appBase.replace(/\\\\/g, '/'),\n ])\n}\n\nfunction fileRecord(filePath: string, base: string, mode: 'content' | 'shape'): string | null {\n if (!fs.existsSync(filePath)) return null\n let stat: fs.Stats\n try {\n stat = fs.statSync(filePath)\n } catch {\n return null\n }\n if (!stat.isFile()) return null\n const rel = path.relative(base, filePath).replace(/\\\\/g, '/')\n if (mode === 'shape') {\n return `file:${rel}`\n }\n try {\n return `file:${rel}:${stat.size}:${checksum(fs.readFileSync(filePath, 'utf8'))}`\n } catch {\n return `file:${rel}:unreadable`\n }\n}\n\nfunction addFileRecord(\n records: string[],\n prefix: string,\n filePath: string,\n base: string,\n mode: 'content' | 'shape',\n): void {\n const record = fileRecord(filePath, base, mode)\n if (record) records.push(`${prefix}:${record}`)\n}\n\nfunction resolveCodeFile(base: string, relativePath: string): string | null {\n const stripped = stripModuleCodeExtension(relativePath)\n const candidates = MODULE_CODE_EXTENSIONS.map((extension) => `${stripped}${extension}`)\n for (const candidate of candidates) {\n const filePath = path.join(base, ...candidate.split('/'))\n if (fs.existsSync(filePath)) return filePath\n }\n return null\n}\n\nfunction resolveRuntimeCounterpart(\n pkgBase: string,\n sourceBase: string,\n sourceFile: string,\n): string | null {\n if (sourceBase === pkgBase) return null\n const relativePath = path.relative(sourceBase, sourceFile).replace(/\\\\/g, '/')\n return resolveCodeFile(pkgBase, relativePath)\n}\n\nfunction hasInlinePageMetadata(filePath: string): boolean {\n try {\n const source = fs.readFileSync(filePath, 'utf8')\n return /\\bexport\\s+(?:const|let|var|function|class)\\s+metadata\\b/.test(source)\n || /\\bexport\\s+\\{[^}]*\\bmetadata\\b[^}]*\\}/.test(source)\n } catch {\n return false\n }\n}\n\nfunction addConventionRecords(records: string[], roots: ModuleRoots): void {\n const packageSourceBase = resolveStandaloneSourceMirrorBase(roots.pkgBase) ?? roots.pkgBase\n for (const base of [roots.pkgBase, roots.appBase]) {\n records.push(`module-root:${base}:${fs.existsSync(base) ? 'present' : 'missing'}`)\n }\n if (packageSourceBase !== roots.pkgBase) {\n records.push(\n `module-root:${packageSourceBase}:${fs.existsSync(packageSourceBase) ? 'present' : 'missing'}`,\n )\n }\n\n for (const relativePath of STRUCTURAL_CONVENTION_FILES) {\n const appFile = resolveCodeFile(roots.appBase, relativePath)\n if (appFile) {\n addFileRecord(records, 'convention:app', appFile, roots.appBase, 'content')\n continue\n }\n\n const sourceFile = resolveCodeFile(packageSourceBase, relativePath)\n if (!sourceFile) {\n const runtimeFile = packageSourceBase === roots.pkgBase\n ? null\n : resolveCodeFile(roots.pkgBase, relativePath)\n if (runtimeFile) {\n addFileRecord(records, 'convention:package-runtime', runtimeFile, roots.pkgBase, 'content')\n } else {\n records.push(`convention:missing:${relativePath}`)\n }\n continue\n }\n\n const packagePrefix = packageSourceBase === roots.pkgBase ? 'package' : 'package-source'\n addFileRecord(records, `convention:${packagePrefix}`, sourceFile, packageSourceBase, 'content')\n const runtimeFile = resolveRuntimeCounterpart(roots.pkgBase, packageSourceBase, sourceFile)\n if (runtimeFile) {\n addFileRecord(records, 'convention:package-runtime', runtimeFile, roots.pkgBase, 'content')\n } else if (packageSourceBase !== roots.pkgBase) {\n records.push(`convention:package-runtime:missing:${relativePath}`)\n }\n }\n}\n\nfunction addScannedRecords(records: string[], roots: ModuleRoots): void {\n const packageSourceBase = resolveStandaloneSourceMirrorBase(roots.pkgBase) ?? roots.pkgBase\n for (const config of CONTENT_SENSITIVE_SCAN_CONFIGS) {\n for (const scanned of scanModuleDir(roots, config)) {\n const base = scanned.fromApp ? roots.appBase : packageSourceBase\n const filePath = path.join(base, ...config.folder.split('/'), ...scanned.relPath.split('/'))\n let sourceOrigin = 'app'\n if (!scanned.fromApp) {\n sourceOrigin = packageSourceBase === roots.pkgBase ? 'package' : 'package-source'\n }\n addFileRecord(records, `${config.folder}:${sourceOrigin}`, filePath, base, 'content')\n\n if (!scanned.fromApp && packageSourceBase !== roots.pkgBase) {\n const runtimeFile = resolveRuntimeCounterpart(roots.pkgBase, packageSourceBase, filePath)\n if (runtimeFile) {\n addFileRecord(\n records,\n `${config.folder}:package-runtime`,\n runtimeFile,\n roots.pkgBase,\n 'content',\n )\n } else {\n records.push(`${config.folder}:package-runtime:missing:${scanned.relPath}`)\n }\n }\n }\n }\n\n for (const config of ROUTE_SHAPE_SCAN_CONFIGS) {\n for (const scanned of scanModuleDir(roots, config)) {\n const base = scanned.fromApp ? roots.appBase : packageSourceBase\n const folderPath = path.join(base, ...config.folder.split('/'))\n const filePath = path.join(folderPath, ...scanned.relPath.split('/'))\n let sourceOrigin = 'app'\n if (!scanned.fromApp) {\n sourceOrigin = packageSourceBase === roots.pkgBase ? 'package' : 'package-source'\n }\n addFileRecord(\n records,\n `${config.folder}:${sourceOrigin}`,\n filePath,\n base,\n hasInlinePageMetadata(filePath) ? 'content' : 'shape',\n )\n\n let runtimeFile: string | null = null\n if (!scanned.fromApp && packageSourceBase !== roots.pkgBase) {\n runtimeFile = resolveRuntimeCounterpart(roots.pkgBase, packageSourceBase, filePath)\n if (runtimeFile) {\n addFileRecord(\n records,\n `${config.folder}:package-runtime`,\n runtimeFile,\n roots.pkgBase,\n hasInlinePageMetadata(runtimeFile) ? 'content' : 'shape',\n )\n } else {\n records.push(`${config.folder}:package-runtime:missing:${scanned.relPath}`)\n }\n }\n\n const stem = stripModuleCodeExtension(path.basename(filePath))\n const metaCandidates = stem === 'page'\n ? ['page.meta', 'meta']\n : [`${stem}.meta`, 'meta']\n for (const candidate of metaCandidates) {\n const metaPath = resolveCodeFile(path.dirname(filePath), candidate)\n if (!metaPath) continue\n addFileRecord(records, `${config.folder}:meta:${sourceOrigin}`, metaPath, base, 'content')\n }\n\n if (runtimeFile) {\n for (const candidate of metaCandidates) {\n const runtimeMetaPath = resolveCodeFile(path.dirname(runtimeFile), candidate)\n if (!runtimeMetaPath) continue\n addFileRecord(\n records,\n `${config.folder}:meta:package-runtime`,\n runtimeMetaPath,\n roots.pkgBase,\n 'content',\n )\n }\n }\n }\n }\n}\n\nexport function calculateGenerateWatchStructureChecksum(options: {\n modulesFile: string\n moduleRoots: ModuleRoots[]\n}): string {\n const records: string[] = []\n const modulesRecord = fileRecord(options.modulesFile, path.dirname(options.modulesFile), 'content')\n records.push(modulesRecord ?? `missing:${options.modulesFile}`)\n\n for (const roots of options.moduleRoots) {\n const moduleRecords: string[] = []\n addConventionRecords(moduleRecords, roots)\n addScannedRecords(moduleRecords, roots)\n const rootIdentity = moduleRootIdentity(roots)\n records.push(...moduleRecords.map((record) => `${rootIdentity}:${record}`))\n }\n\n return checksum(records.sort((a, b) => a.localeCompare(b)).join('\\n'))\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,MAAM,8BAA8B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,iCAAiC;AAAA,EACrC,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AACf;AAEA,MAAM,2BAA2B;AAAA,EAC/B,aAAa;AAAA,EACb,aAAa;AACf;AAEA,SAAS,SAAS,OAAuB;AACvC,SAAO,OAAO,WAAW,KAAK,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK;AAC5D;AAEA,SAAS,mBAAmB,OAA4B;AACtD,SAAO,KAAK,UAAU;AAAA,IACpB,MAAM,QAAQ,QAAQ,OAAO,GAAG;AAAA,IAChC,MAAM,QAAQ,QAAQ,OAAO,GAAG;AAAA,EAClC,CAAC;AACH;AAEA,SAAS,WAAW,UAAkB,MAAc,MAA0C;AAC5F,MAAI,CAAC,GAAG,WAAW,QAAQ,EAAG,QAAO;AACrC,MAAI;AACJ,MAA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,gBAA0B,CAAC;AACjC,yBAAqB,eAAe,KAAK;AACzC,sBAAkB,eAAe,KAAK;AACtC,UAAM,eAAe,mBAAmB,KAAK;AAC7C,YAAQ,KAAK,GAAG,cAAc,IAAI,CAAC,WAAW,GAAG,YAAY,IAAI,MAAM,EAAE,CAAC;AAAA,EAC5E;AAEA,SAAO,SAAS,QAAQ,KAAK,CAAC,GAAG,MAAM,EAAE,cAAc,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC;AACvE;",
|
|
6
|
+
"names": ["runtimeFile"]
|
|
7
7
|
}
|
|
@@ -3631,7 +3631,8 @@ async function generateModuleRegistryAppFromDiscovery(options) {
|
|
|
3631
3631
|
value: namespaceFallback({
|
|
3632
3632
|
importName: moduleRuntimeImportName,
|
|
3633
3633
|
members: ["default", "runtime"],
|
|
3634
|
-
fallback: identifier("undefined")
|
|
3634
|
+
fallback: identifier("undefined"),
|
|
3635
|
+
castType: "Module['runtime']"
|
|
3635
3636
|
})
|
|
3636
3637
|
});
|
|
3637
3638
|
}
|
|
@@ -3984,7 +3985,8 @@ async function generateModuleRegistryCliFromDiscovery(options) {
|
|
|
3984
3985
|
value: namespaceFallback({
|
|
3985
3986
|
importName: moduleRuntimeImportName,
|
|
3986
3987
|
members: ["default", "runtime"],
|
|
3987
|
-
fallback: identifier("undefined")
|
|
3988
|
+
fallback: identifier("undefined"),
|
|
3989
|
+
castType: "Module['runtime']"
|
|
3988
3990
|
})
|
|
3989
3991
|
});
|
|
3990
3992
|
}
|