@open-mercato/cli 0.11.1-develop.8593.1.50784dae35 → 0.11.1-develop.8665.1.2455b2503c
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 +4 -2
- package/AGENTS.md +2 -0
- package/dist/agentic/guides/architecture.md +2 -2
- package/dist/agentic/guides/extensions.md +7 -2
- package/dist/agentic/guides/framework-extension-points.md +1 -0
- package/dist/agentic/guides/infrastructure-providers.md +20 -0
- package/dist/agentic/guides/integrations.md +2 -2
- package/dist/agentic/guides/module-facts.json +2564 -265
- package/dist/agentic/guides/module-facts.v2.json +2580 -265
- package/dist/agentic/guides/modules/agent_orchestrator/index.md +1 -1
- package/dist/agentic/guides/modules/ai_assistant/index.md +1 -1
- package/dist/agentic/guides/modules/api_docs/index.md +1 -1
- package/dist/agentic/guides/modules/api_keys/index.md +1 -1
- package/dist/agentic/guides/modules/assisted_selling/acl-features.md +16 -0
- package/dist/agentic/guides/modules/assisted_selling/contribution-resolutions.md +21 -0
- package/dist/agentic/guides/modules/assisted_selling/domain-commands.md +11 -0
- package/dist/agentic/guides/modules/assisted_selling/entities.md +11 -0
- package/dist/agentic/guides/modules/assisted_selling/events.md +22 -0
- package/dist/agentic/guides/modules/assisted_selling/exact-override-targets.md +17 -0
- package/dist/agentic/guides/modules/assisted_selling/index.md +21 -0
- package/dist/agentic/guides/modules/assisted_selling/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/assisted_selling/setup.md +11 -0
- package/dist/agentic/guides/modules/assisted_selling/umes-contributions.md +21 -0
- package/dist/agentic/guides/modules/assisted_selling/umes-hosts.md +23 -0
- package/dist/agentic/guides/modules/attachments/exact-override-targets.md +1 -1
- package/dist/agentic/guides/modules/attachments/index.md +1 -1
- package/dist/agentic/guides/modules/attachments/workers.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/index.md +1 -1
- package/dist/agentic/guides/modules/backups/di-registrations-rich.md +11 -0
- package/dist/agentic/guides/modules/backups/di-service-tokens.md +11 -0
- package/dist/agentic/guides/modules/backups/exact-override-targets.md +11 -0
- package/dist/agentic/guides/modules/backups/index.md +5 -2
- package/dist/agentic/guides/modules/business_rules/index.md +1 -1
- package/dist/agentic/guides/modules/carrier_inpost/index.md +1 -1
- package/dist/agentic/guides/modules/cart/index.md +1 -1
- package/dist/agentic/guides/modules/catalog/acl-features.md +2 -1
- package/dist/agentic/guides/modules/catalog/active-extension-bindings.md +2 -0
- package/dist/agentic/guides/modules/catalog/backend-pages.md +1 -0
- package/dist/agentic/guides/modules/catalog/contribution-resolutions.md +5 -0
- package/dist/agentic/guides/modules/catalog/di-registrations-rich.md +8 -7
- package/dist/agentic/guides/modules/catalog/di-service-tokens.md +5 -4
- package/dist/agentic/guides/modules/catalog/domain-commands.md +2 -0
- package/dist/agentic/guides/modules/catalog/entities.md +1 -0
- package/dist/agentic/guides/modules/catalog/events.md +4 -1
- package/dist/agentic/guides/modules/catalog/exact-override-targets.md +13 -7
- package/dist/agentic/guides/modules/catalog/index.md +9 -9
- package/dist/agentic/guides/modules/catalog/umes-contributions.md +5 -0
- package/dist/agentic/guides/modules/catalog/umes-hosts.md +4 -0
- package/dist/agentic/guides/modules/catalog/workers.md +1 -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/channel_smtp/index.md +1 -1
- package/dist/agentic/guides/modules/checkout/index.md +1 -1
- package/dist/agentic/guides/modules/communication_channels/index.md +1 -1
- 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/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/customer_accounts/exact-override-targets.md +2 -0
- package/dist/agentic/guides/modules/customer_accounts/index.md +2 -2
- package/dist/agentic/guides/modules/customer_accounts/workers.md +2 -0
- package/dist/agentic/guides/modules/customer_groups/index.md +1 -1
- package/dist/agentic/guides/modules/customers/active-extension-bindings.md +2 -1
- package/dist/agentic/guides/modules/customers/incoming-installed-contributions.md +1 -0
- package/dist/agentic/guides/modules/customers/index.md +3 -3
- package/dist/agentic/guides/modules/customers/umes-hosts.md +1 -0
- package/dist/agentic/guides/modules/dashboards/active-extension-bindings.md +0 -1
- package/dist/agentic/guides/modules/dashboards/cli-commands.md +1 -0
- package/dist/agentic/guides/modules/dashboards/exact-override-targets.md +1 -0
- package/dist/agentic/guides/modules/dashboards/index.md +2 -3
- 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/index.md +1 -1
- package/dist/agentic/guides/modules/documents/index.md +1 -1
- package/dist/agentic/guides/modules/ecommerce/index.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/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_autopay/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_tpay/index.md +1 -1
- package/dist/agentic/guides/modules/generators/index.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 +14 -12
- package/dist/agentic/guides/modules/integrations/index.md +2 -2
- package/dist/agentic/guides/modules/integrations/setup.md +1 -1
- package/dist/agentic/guides/modules/integrations/workers.md +3 -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/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/promotions/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/exact-override-targets.md +3 -3
- package/dist/agentic/guides/modules/resources/index.md +1 -1
- package/dist/agentic/guides/modules/resources/owned-contract-module-metadata.md +1 -1
- package/dist/agentic/guides/modules/resources/setup.md +1 -1
- package/dist/agentic/guides/modules/sales/contribution-resolutions.md +1 -0
- package/dist/agentic/guides/modules/sales/exact-override-targets.md +1 -0
- package/dist/agentic/guides/modules/sales/index.md +3 -3
- package/dist/agentic/guides/modules/sales/umes-contributions.md +1 -0
- 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/contribution-resolutions.md +1 -1
- package/dist/agentic/guides/modules/staff/exact-override-targets.md +1 -1
- package/dist/agentic/guides/modules/staff/index.md +1 -1
- package/dist/agentic/guides/modules/staff/workers.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/index.md +1 -1
- 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/index.md +1 -1
- package/dist/agentic/guides/modules/workflows/index.md +1 -1
- package/dist/agentic/guides/reference-module-facts.json +811 -21
- package/dist/agentic/guides/reference-modules/example/active-extension-bindings.md +1 -0
- package/dist/agentic/guides/reference-modules/example/backend-pages.md +2 -0
- package/dist/agentic/guides/reference-modules/example/contribution-resolutions.md +3 -1
- package/dist/agentic/guides/reference-modules/example/di-registrations-rich.md +3 -3
- package/dist/agentic/guides/reference-modules/example/di-service-tokens.md +1 -1
- package/dist/agentic/guides/reference-modules/example/entities.md +2 -0
- package/dist/agentic/guides/reference-modules/example/events.md +2 -1
- package/dist/agentic/guides/reference-modules/example/exact-override-targets.md +25 -8
- package/dist/agentic/guides/reference-modules/example/index.md +7 -7
- package/dist/agentic/guides/reference-modules/example/notifications.md +1 -0
- package/dist/agentic/guides/reference-modules/example/setup.md +1 -1
- package/dist/agentic/guides/reference-modules/example/umes-contributions.md +3 -1
- package/dist/agentic/guides/reference-modules/example/umes-hosts.md +4 -0
- package/dist/agentic/guides/upstream/AGENTS.md +5 -4
- package/dist/agentic/guides/upstream/BACKWARD_COMPATIBILITY.md +37 -20
- package/dist/agentic/guides/upstream/manifest.json +3 -3
- package/dist/agentic/shared/AGENTS.md.template +11 -15
- package/dist/agentic/shared/ai/harness/README.md +4 -2
- package/dist/agentic/shared/ai/harness/RELEASE.md +4 -4
- package/dist/agentic/shared/ai/harness/cases.json +1420 -41
- package/dist/agentic/shared/ai/harness/cases.schema.json +4 -4
- package/dist/agentic/shared/ai/harness/design-system-inventory.json +640 -142
- package/dist/agentic/shared/ai/harness/source-link-inventory.json +223 -16
- package/dist/agentic/shared/ai/harness/validators.json +1 -1
- package/dist/agentic/shared/ai/skills/om-system-extension/SKILL.md +1 -1
- package/dist/agentic/shared/ai/skills/om-system-extension/references/extension-branches.md +25 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/mechanism-selector.md +1 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/unified-overrides.md +2 -0
- package/dist/agentic/shared/scripts/run-agent-harness-release.mjs +21 -1
- package/dist/lib/cache-provider-manifest.js +9 -0
- package/dist/lib/cache-provider-manifest.js.map +7 -0
- package/dist/lib/generate-watch-plan.js +4 -0
- package/dist/lib/generate-watch-plan.js.map +2 -2
- package/dist/lib/generate-watch-runner.js +1 -0
- package/dist/lib/generate-watch-runner.js.map +2 -2
- package/dist/lib/generate-watch-structure.js +2 -0
- package/dist/lib/generate-watch-structure.js.map +2 -2
- package/dist/lib/generators/ast/writers.js +5 -1
- package/dist/lib/generators/ast/writers.js.map +2 -2
- package/dist/lib/generators/cache-providers.js +80 -0
- package/dist/lib/generators/cache-providers.js.map +7 -0
- package/dist/lib/generators/form-section-ast.js +156 -0
- package/dist/lib/generators/form-section-ast.js.map +7 -0
- package/dist/lib/generators/form-section-extension-compiler.js +568 -0
- package/dist/lib/generators/form-section-extension-compiler.js.map +7 -0
- package/dist/lib/generators/form-section-extension-source.js +245 -0
- package/dist/lib/generators/form-section-extension-source.js.map +7 -0
- package/dist/lib/generators/form-section-runtime-revisions.js +184 -0
- package/dist/lib/generators/form-section-runtime-revisions.js.map +7 -0
- package/dist/lib/generators/form-sections.js +773 -0
- package/dist/lib/generators/form-sections.js.map +7 -0
- package/dist/lib/generators/index.js +2 -0
- package/dist/lib/generators/index.js.map +2 -2
- package/dist/lib/generators/module-entities.js +21 -2
- package/dist/lib/generators/module-entities.js.map +2 -2
- package/dist/lib/generators/module-extension-facts.js +2 -1
- package/dist/lib/generators/module-extension-facts.js.map +2 -2
- package/dist/lib/generators/module-facts.js +30 -1
- package/dist/lib/generators/module-facts.js.map +2 -2
- package/dist/lib/generators/module-override-targets.js +24 -2
- package/dist/lib/generators/module-override-targets.js.map +2 -2
- package/dist/lib/generators/module-registry.js +75 -3
- package/dist/lib/generators/module-registry.js.map +2 -2
- package/dist/lib/generators/openapi.js +27 -17
- package/dist/lib/generators/openapi.js.map +2 -2
- package/dist/lib/post-generate-invalidation.js +20 -1
- package/dist/lib/post-generate-invalidation.js.map +2 -2
- package/dist/lib/resolver.js +195 -1
- package/dist/lib/resolver.js.map +3 -3
- package/dist/lib/single-instance-strategy-guard.js +26 -3
- package/dist/lib/single-instance-strategy-guard.js.map +2 -2
- package/dist/mercato.js +34 -6
- package/dist/mercato.js.map +2 -2
- package/jest.config.cjs +2 -0
- package/package.json +7 -7
- package/src/__tests__/mercato.test.ts +18 -0
- package/src/__tests__/rotation-json-output.test.ts +52 -0
- package/src/lib/__tests__/cache-provider-manifest.test.ts +76 -0
- package/src/lib/__tests__/generate-watch-plan.test.ts +3 -2
- package/src/lib/__tests__/generate-watch-runner.test.ts +13 -1
- package/src/lib/__tests__/generate-watch-structure.test.ts +34 -0
- package/src/lib/__tests__/post-generate-invalidation.test.ts +108 -0
- package/src/lib/__tests__/resolver.form-section-gates.test.ts +82 -0
- package/src/lib/__tests__/single-instance-strategy-guard.test.ts +129 -0
- package/src/lib/cache-provider-manifest.ts +8 -0
- package/src/lib/generate-watch-plan.ts +6 -3
- package/src/lib/generate-watch-runner.ts +1 -0
- package/src/lib/generate-watch-structure.ts +5 -1
- package/src/lib/generators/__tests__/cache-providers.test.ts +102 -0
- package/src/lib/generators/__tests__/derived-crud-route-collisions.test.ts +85 -0
- package/src/lib/generators/__tests__/form-section-outbox.test.ts +53 -0
- package/src/lib/generators/__tests__/form-sections.test.ts +896 -0
- package/src/lib/generators/__tests__/module-extension-facts.test.ts +1 -0
- package/src/lib/generators/__tests__/module-facts.bc-guard.test.ts +8 -6
- package/src/lib/generators/__tests__/module-facts.example-fact-coverage.test.ts +37 -13
- package/src/lib/generators/__tests__/module-facts.local-reference.test.ts +13 -0
- package/src/lib/generators/__tests__/module-override-targets.test.ts +2 -3
- package/src/lib/generators/__tests__/module-subset.test.ts +1 -1
- package/src/lib/generators/__tests__/openapi.test.ts +60 -13
- package/src/lib/generators/__tests__/structural-contracts.test.ts +2 -2
- package/src/lib/generators/ast/writers.ts +6 -1
- package/src/lib/generators/cache-providers.ts +111 -0
- package/src/lib/generators/form-section-ast.ts +166 -0
- package/src/lib/generators/form-section-extension-compiler.ts +632 -0
- package/src/lib/generators/form-section-extension-source.ts +308 -0
- package/src/lib/generators/form-section-runtime-revisions.ts +211 -0
- package/src/lib/generators/form-sections.ts +896 -0
- package/src/lib/generators/index.ts +1 -0
- package/src/lib/generators/module-entities.ts +22 -4
- package/src/lib/generators/module-extension-facts.ts +1 -0
- package/src/lib/generators/module-facts.ts +40 -0
- package/src/lib/generators/module-override-targets.ts +19 -0
- package/src/lib/generators/module-registry.ts +80 -4
- package/src/lib/generators/openapi.ts +31 -20
- package/src/lib/post-generate-invalidation.ts +28 -1
- package/src/lib/resolver.ts +218 -0
- package/src/lib/single-instance-strategy-guard.ts +51 -1
- package/src/mercato.ts +32 -4
- package/dist/agentic/guides/modules/dashboards/incoming-installed-contributions.md +0 -11
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import ts from "typescript-js";
|
|
4
|
+
import { MODULE_CODE_EXTENSIONS, stripModuleCodeExtension } from "./scanner.js";
|
|
5
|
+
function unwrap(expression) {
|
|
6
|
+
while (ts.isParenthesizedExpression(expression) || ts.isAsExpression(expression) || ts.isSatisfiesExpression(expression)) {
|
|
7
|
+
expression = expression.expression;
|
|
8
|
+
}
|
|
9
|
+
return expression;
|
|
10
|
+
}
|
|
11
|
+
function exportedDeclaration(source, name) {
|
|
12
|
+
const exportedNames = /* @__PURE__ */ new Set();
|
|
13
|
+
for (const statement of source.statements) {
|
|
14
|
+
if (!ts.isExportDeclaration(statement) || statement.isTypeOnly || statement.moduleSpecifier || !statement.exportClause) continue;
|
|
15
|
+
if (!ts.isNamedExports(statement.exportClause)) continue;
|
|
16
|
+
for (const entry of statement.exportClause.elements) {
|
|
17
|
+
if (!entry.isTypeOnly && entry.name.text === name) exportedNames.add((entry.propertyName ?? entry.name).text);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
for (const statement of source.statements) {
|
|
21
|
+
if (!ts.isVariableStatement(statement)) continue;
|
|
22
|
+
const direct = statement.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword);
|
|
23
|
+
for (const declaration of statement.declarationList.declarations) {
|
|
24
|
+
if (!ts.isIdentifier(declaration.name)) continue;
|
|
25
|
+
if (direct && declaration.name.text === name || exportedNames.has(declaration.name.text)) return declaration.initializer;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
function fieldsOf(node, invalid) {
|
|
31
|
+
const literal = unwrap(node);
|
|
32
|
+
if (!ts.isObjectLiteralExpression(literal)) return invalid("expected an object literal");
|
|
33
|
+
const fields = /* @__PURE__ */ new Map();
|
|
34
|
+
for (const property of literal.properties) {
|
|
35
|
+
if (!ts.isPropertyAssignment(property) || !(ts.isIdentifier(property.name) || ts.isStringLiteral(property.name))) {
|
|
36
|
+
return invalid("expected literal property assignments");
|
|
37
|
+
}
|
|
38
|
+
const name = property.name.text;
|
|
39
|
+
if (fields.has(name)) return invalid(`duplicate property "${name}"`);
|
|
40
|
+
fields.set(name, property.initializer);
|
|
41
|
+
}
|
|
42
|
+
return fields;
|
|
43
|
+
}
|
|
44
|
+
function literalData(node, invalid) {
|
|
45
|
+
const value = unwrap(node);
|
|
46
|
+
if (ts.isStringLiteralLike(value)) return value.text;
|
|
47
|
+
if (ts.isNumericLiteral(value)) return Number(value.text);
|
|
48
|
+
if (value.kind === ts.SyntaxKind.NullKeyword) return null;
|
|
49
|
+
if (value.kind === ts.SyntaxKind.TrueKeyword) return true;
|
|
50
|
+
if (value.kind === ts.SyntaxKind.FalseKeyword) return false;
|
|
51
|
+
if (ts.isArrayLiteralExpression(value)) return value.elements.map((element) => literalData(element, invalid));
|
|
52
|
+
if (ts.isObjectLiteralExpression(value)) {
|
|
53
|
+
return Object.fromEntries([...fieldsOf(value, invalid)].map(([key, entry]) => [key, literalData(entry, invalid)]));
|
|
54
|
+
}
|
|
55
|
+
return invalid("expected JSON-serializable client facts");
|
|
56
|
+
}
|
|
57
|
+
function literalValue(node, name, invalid) {
|
|
58
|
+
if (!node) return invalid(`missing literal ${name}`);
|
|
59
|
+
const literal = unwrap(node);
|
|
60
|
+
if (!ts.isStringLiteralLike(literal) || !literal.text) return invalid(`expected a non-empty literal ${name}`);
|
|
61
|
+
return literal.text;
|
|
62
|
+
}
|
|
63
|
+
function readIdentity(fields, invalid) {
|
|
64
|
+
const id = literalValue(fields.get("id"), "id", invalid);
|
|
65
|
+
const roundTripId = literalValue(fields.get("roundTripId"), "roundTripId", invalid);
|
|
66
|
+
const separator = roundTripId.lastIndexOf("@v");
|
|
67
|
+
if (separator < 0 || roundTripId.slice(0, separator) !== id || !/^[1-9][0-9]*$/.test(roundTripId.slice(separator + 2))) {
|
|
68
|
+
return invalid(`roundTripId "${roundTripId}" must be "${id}@v<positive-integer>"`);
|
|
69
|
+
}
|
|
70
|
+
return { id, roundTripId };
|
|
71
|
+
}
|
|
72
|
+
function arrayField(fields, name, invalid) {
|
|
73
|
+
const initializer = fields.get(name);
|
|
74
|
+
if (!initializer) return [];
|
|
75
|
+
const literal = unwrap(initializer);
|
|
76
|
+
if (!ts.isArrayLiteralExpression(literal)) return invalid(`expected a literal ${name} array`);
|
|
77
|
+
return literal.elements;
|
|
78
|
+
}
|
|
79
|
+
function helperArgument(node, name, invalid) {
|
|
80
|
+
const call = unwrap(node);
|
|
81
|
+
if (!ts.isCallExpression(call) || !ts.isIdentifier(call.expression) || call.expression.text !== name || call.arguments.length !== 1) {
|
|
82
|
+
return invalid(`expected ${name} with one argument`);
|
|
83
|
+
}
|
|
84
|
+
return call.arguments[0];
|
|
85
|
+
}
|
|
86
|
+
function getLocalSectionInitializer(source, name) {
|
|
87
|
+
for (const statement of source.statements) {
|
|
88
|
+
if (!ts.isVariableStatement(statement)) continue;
|
|
89
|
+
for (const declaration of statement.declarationList.declarations) {
|
|
90
|
+
if (ts.isIdentifier(declaration.name) && declaration.name.text === name) return declaration.initializer;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return void 0;
|
|
94
|
+
}
|
|
95
|
+
function readSectionBuilder(node, invalid) {
|
|
96
|
+
const call = unwrap(node);
|
|
97
|
+
if (!ts.isCallExpression(call)) return invalid("expected a section builder call");
|
|
98
|
+
const builder = call.expression;
|
|
99
|
+
if (ts.isIdentifier(builder)) return { name: builder.text, args: call.arguments };
|
|
100
|
+
if (ts.isPropertyAccessExpression(builder) && ts.isIdentifier(builder.expression)) {
|
|
101
|
+
return { name: builder.expression.text + "." + builder.name.text, args: call.arguments };
|
|
102
|
+
}
|
|
103
|
+
return invalid("expected a named section builder");
|
|
104
|
+
}
|
|
105
|
+
function readSectionRuntimeFields(initializer, source, invalid, seen = /* @__PURE__ */ new Set(), sourceRoot) {
|
|
106
|
+
const value = unwrap(initializer);
|
|
107
|
+
if (ts.isIdentifier(value)) {
|
|
108
|
+
const key = source.fileName + ":" + value.text;
|
|
109
|
+
if (seen.has(key)) return invalid(`cyclic section runtime "${value.text}"`);
|
|
110
|
+
const visited = /* @__PURE__ */ new Set([...seen, key]);
|
|
111
|
+
const local = getLocalSectionInitializer(source, value.text);
|
|
112
|
+
if (local) return readSectionRuntimeFields(local, source, invalid, visited, sourceRoot);
|
|
113
|
+
if (sourceRoot) {
|
|
114
|
+
for (const statement of source.statements) {
|
|
115
|
+
if (!ts.isImportDeclaration(statement) || statement.importClause?.isTypeOnly || !ts.isStringLiteral(statement.moduleSpecifier)) continue;
|
|
116
|
+
const bindings = statement.importClause?.namedBindings;
|
|
117
|
+
if (!bindings || !ts.isNamedImports(bindings)) continue;
|
|
118
|
+
const imported = bindings.elements.find(({ name: name2, isTypeOnly }) => !isTypeOnly && name2.text === value.text);
|
|
119
|
+
if (!imported) continue;
|
|
120
|
+
const specifier = statement.moduleSpecifier.text;
|
|
121
|
+
if (!specifier.startsWith("./") || !stripModuleCodeExtension(specifier).endsWith(".client")) break;
|
|
122
|
+
const base = path.resolve(path.dirname(source.fileName), stripModuleCodeExtension(specifier));
|
|
123
|
+
const candidate = MODULE_CODE_EXTENSIONS.map((extension) => base + extension).find((filename2) => fs.statSync(filename2, { throwIfNoEntry: false })?.isFile());
|
|
124
|
+
if (!candidate) break;
|
|
125
|
+
const filename = fs.realpathSync(candidate);
|
|
126
|
+
const relative = path.relative(fs.realpathSync(sourceRoot), filename);
|
|
127
|
+
if (relative.startsWith(".." + path.sep) || path.isAbsolute(relative)) break;
|
|
128
|
+
const dependency = ts.createSourceFile(filename, fs.readFileSync(filename, "utf8"), ts.ScriptTarget.Latest, true);
|
|
129
|
+
const declaration = exportedDeclaration(dependency, (imported.propertyName ?? imported.name).text);
|
|
130
|
+
if (declaration) return readSectionRuntimeFields(declaration, dependency, invalid, visited, sourceRoot);
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return invalid(`section runtime "${value.text}" must have a local static declaration`);
|
|
135
|
+
}
|
|
136
|
+
if (!ts.isCallExpression(value)) return fieldsOf(value, invalid);
|
|
137
|
+
const { name, args } = readSectionBuilder(value, invalid);
|
|
138
|
+
if (!["defineCrudFormSectionRuntime", "defineCrudFormFieldGranularSection"].includes(name) || args.length !== 1) {
|
|
139
|
+
return invalid("expected a supported static base section runtime");
|
|
140
|
+
}
|
|
141
|
+
return fieldsOf(args[0], invalid);
|
|
142
|
+
}
|
|
143
|
+
export {
|
|
144
|
+
arrayField,
|
|
145
|
+
exportedDeclaration,
|
|
146
|
+
fieldsOf,
|
|
147
|
+
getLocalSectionInitializer,
|
|
148
|
+
helperArgument,
|
|
149
|
+
literalData,
|
|
150
|
+
literalValue,
|
|
151
|
+
readIdentity,
|
|
152
|
+
readSectionBuilder,
|
|
153
|
+
readSectionRuntimeFields,
|
|
154
|
+
unwrap
|
|
155
|
+
};
|
|
156
|
+
//# sourceMappingURL=form-section-ast.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/generators/form-section-ast.ts"],
|
|
4
|
+
"sourcesContent": ["import fs from 'node:fs'\nimport path from 'node:path'\nimport ts from 'typescript-js'\nimport { MODULE_CODE_EXTENSIONS, stripModuleCodeExtension } from './scanner'\n\nexport function unwrap(expression: ts.Expression): ts.Expression {\n while (ts.isParenthesizedExpression(expression) || ts.isAsExpression(expression) || ts.isSatisfiesExpression(expression)) {\n expression = expression.expression\n }\n return expression\n}\n\nexport function exportedDeclaration(source: ts.SourceFile, name: string): ts.Expression | undefined {\n const exportedNames = new Set<string>()\n for (const statement of source.statements) {\n if (!ts.isExportDeclaration(statement) || statement.isTypeOnly || statement.moduleSpecifier || !statement.exportClause) continue\n if (!ts.isNamedExports(statement.exportClause)) continue\n for (const entry of statement.exportClause.elements) {\n if (!entry.isTypeOnly && entry.name.text === name) exportedNames.add((entry.propertyName ?? entry.name).text)\n }\n }\n for (const statement of source.statements) {\n if (!ts.isVariableStatement(statement)) continue\n const direct = statement.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword)\n for (const declaration of statement.declarationList.declarations) {\n if (!ts.isIdentifier(declaration.name)) continue\n if ((direct && declaration.name.text === name) || exportedNames.has(declaration.name.text)) return declaration.initializer\n }\n }\n return undefined\n}\n\nexport function fieldsOf(node: ts.Expression, invalid: (reason: string) => never): Map<string, ts.Expression> {\n const literal = unwrap(node)\n if (!ts.isObjectLiteralExpression(literal)) return invalid('expected an object literal')\n const fields = new Map<string, ts.Expression>()\n for (const property of literal.properties) {\n if (!ts.isPropertyAssignment(property) || !(ts.isIdentifier(property.name) || ts.isStringLiteral(property.name))) {\n return invalid('expected literal property assignments')\n }\n const name = property.name.text\n if (fields.has(name)) return invalid(`duplicate property \"${name}\"`)\n fields.set(name, property.initializer)\n }\n return fields\n}\n\nexport function literalData(node: ts.Expression, invalid: (reason: string) => never): unknown {\n const value = unwrap(node)\n if (ts.isStringLiteralLike(value)) return value.text\n if (ts.isNumericLiteral(value)) return Number(value.text)\n if (value.kind === ts.SyntaxKind.NullKeyword) return null\n if (value.kind === ts.SyntaxKind.TrueKeyword) return true\n if (value.kind === ts.SyntaxKind.FalseKeyword) return false\n if (ts.isArrayLiteralExpression(value)) return value.elements.map((element) => literalData(element, invalid))\n if (ts.isObjectLiteralExpression(value)) {\n return Object.fromEntries([...fieldsOf(value, invalid)]\n .map(([key, entry]) => [key, literalData(entry, invalid)]))\n }\n return invalid('expected JSON-serializable client facts')\n}\n\nexport function literalValue(node: ts.Expression | undefined, name: string, invalid: (reason: string) => never): string {\n if (!node) return invalid(`missing literal ${name}`)\n const literal = unwrap(node)\n if (!ts.isStringLiteralLike(literal) || !literal.text) return invalid(`expected a non-empty literal ${name}`)\n return literal.text\n}\n\nexport function readIdentity(fields: ReadonlyMap<string, ts.Expression>, invalid: (reason: string) => never) {\n const id = literalValue(fields.get('id'), 'id', invalid)\n const roundTripId = literalValue(fields.get('roundTripId'), 'roundTripId', invalid)\n const separator = roundTripId.lastIndexOf('@v')\n if (separator < 0 || roundTripId.slice(0, separator) !== id || !/^[1-9][0-9]*$/.test(roundTripId.slice(separator + 2))) {\n return invalid(`roundTripId \"${roundTripId}\" must be \"${id}@v<positive-integer>\"`)\n }\n return { id, roundTripId }\n}\n\nexport function arrayField(\n fields: ReadonlyMap<string, ts.Expression>,\n name: string,\n invalid: (reason: string) => never,\n): readonly ts.Expression[] {\n const initializer = fields.get(name)\n if (!initializer) return []\n const literal = unwrap(initializer)\n if (!ts.isArrayLiteralExpression(literal)) return invalid(`expected a literal ${name} array`)\n return literal.elements\n}\n\nexport function helperArgument(node: ts.Expression, name: string, invalid: (reason: string) => never): ts.Expression {\n const call = unwrap(node)\n if (!ts.isCallExpression(call) || !ts.isIdentifier(call.expression) || call.expression.text !== name || call.arguments.length !== 1) {\n return invalid(`expected ${name} with one argument`)\n }\n return call.arguments[0]\n}\n\nexport function getLocalSectionInitializer(source: ts.SourceFile, name: string): ts.Expression | undefined {\n for (const statement of source.statements) {\n if (!ts.isVariableStatement(statement)) continue\n for (const declaration of statement.declarationList.declarations) {\n if (ts.isIdentifier(declaration.name) && declaration.name.text === name) return declaration.initializer\n }\n }\n return undefined\n}\n\nexport function readSectionBuilder(node: ts.Expression, invalid: (reason: string) => never): {\n name: string\n args: readonly ts.Expression[]\n} {\n const call = unwrap(node)\n if (!ts.isCallExpression(call)) return invalid('expected a section builder call')\n const builder = call.expression\n if (ts.isIdentifier(builder)) return { name: builder.text, args: call.arguments }\n if (ts.isPropertyAccessExpression(builder) && ts.isIdentifier(builder.expression)) {\n return { name: builder.expression.text + '.' + builder.name.text, args: call.arguments }\n }\n return invalid('expected a named section builder')\n}\n\nexport function readSectionRuntimeFields(\n initializer: ts.Expression, source: ts.SourceFile, invalid: (reason: string) => never, seen: ReadonlySet<string> = new Set(),\n sourceRoot?: string,\n): Map<string, ts.Expression> {\n const value = unwrap(initializer)\n if (ts.isIdentifier(value)) {\n const key = source.fileName + ':' + value.text\n if (seen.has(key)) return invalid(`cyclic section runtime \"${value.text}\"`)\n const visited = new Set([...seen, key])\n const local = getLocalSectionInitializer(source, value.text)\n if (local) return readSectionRuntimeFields(local, source, invalid, visited, sourceRoot)\n if (sourceRoot) {\n for (const statement of source.statements) {\n if (!ts.isImportDeclaration(statement) || statement.importClause?.isTypeOnly\n || !ts.isStringLiteral(statement.moduleSpecifier)) continue\n const bindings = statement.importClause?.namedBindings\n if (!bindings || !ts.isNamedImports(bindings)) continue\n const imported = bindings.elements.find(({ name, isTypeOnly }) => !isTypeOnly && name.text === value.text)\n if (!imported) continue\n const specifier = statement.moduleSpecifier.text\n if (!specifier.startsWith('./') || !stripModuleCodeExtension(specifier).endsWith('.client')) break\n const base = path.resolve(path.dirname(source.fileName), stripModuleCodeExtension(specifier))\n const candidate = MODULE_CODE_EXTENSIONS.map((extension) => base + extension)\n .find((filename) => fs.statSync(filename, { throwIfNoEntry: false })?.isFile())\n if (!candidate) break\n const filename = fs.realpathSync(candidate)\n const relative = path.relative(fs.realpathSync(sourceRoot), filename)\n if (relative.startsWith('..' + path.sep) || path.isAbsolute(relative)) break\n const dependency = ts.createSourceFile(filename, fs.readFileSync(filename, 'utf8'), ts.ScriptTarget.Latest, true)\n const declaration = exportedDeclaration(dependency, (imported.propertyName ?? imported.name).text)\n if (declaration) return readSectionRuntimeFields(declaration, dependency, invalid, visited, sourceRoot)\n break\n }\n }\n return invalid(`section runtime \"${value.text}\" must have a local static declaration`)\n }\n if (!ts.isCallExpression(value)) return fieldsOf(value, invalid)\n const { name, args } = readSectionBuilder(value, invalid)\n if (!['defineCrudFormSectionRuntime', 'defineCrudFormFieldGranularSection'].includes(name) || args.length !== 1) {\n return invalid('expected a supported static base section runtime')\n }\n return fieldsOf(args[0], invalid)\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf,SAAS,wBAAwB,gCAAgC;AAE1D,SAAS,OAAO,YAA0C;AAC/D,SAAO,GAAG,0BAA0B,UAAU,KAAK,GAAG,eAAe,UAAU,KAAK,GAAG,sBAAsB,UAAU,GAAG;AACxH,iBAAa,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