@open-mercato/cli 0.11.1-develop.8687.1.adb16f62b3 → 0.11.1-develop.8724.1.beb07a9e96
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 +1 -1
- package/dist/agentic/guides/module-facts.json +233 -190
- package/dist/agentic/guides/module-facts.v2.json +233 -190
- 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/index.md +1 -1
- 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/index.md +1 -1
- package/dist/agentic/guides/modules/backups/index.md +1 -1
- 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/index.md +1 -1
- 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/index.md +1 -1
- package/dist/agentic/guides/modules/customer_groups/index.md +1 -1
- package/dist/agentic/guides/modules/customers/index.md +1 -1
- 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/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/exact-override-targets.md +1 -1
- package/dist/agentic/guides/modules/events/index.md +1 -1
- package/dist/agentic/guides/modules/events/workers.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/index.md +1 -1
- package/dist/agentic/guides/modules/ledger/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/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/index.md +1 -1
- package/dist/agentic/guides/modules/sales/index.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/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/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/di-registrations-rich.md +11 -10
- package/dist/agentic/guides/modules/workflows/di-service-tokens.md +11 -10
- package/dist/agentic/guides/modules/workflows/exact-override-targets.md +11 -10
- package/dist/agentic/guides/modules/workflows/index.md +1 -1
- package/dist/agentic/guides/reference-module-facts.json +2 -2
- package/dist/agentic/guides/reference-modules/example/index.md +1 -1
- package/dist/agentic/guides/upstream/AGENTS.md +4 -4
- package/dist/agentic/guides/upstream/manifest.json +2 -2
- package/dist/agentic/shared/ai/harness/cases.json +1 -1
- package/dist/lib/worker-job-handler.js +7 -1
- package/dist/lib/worker-job-handler.js.map +2 -2
- package/package.json +7 -7
- package/src/lib/__tests__/worker-job-handler.test.ts +30 -0
- package/src/lib/scaffold/__tests__/fixtures/typescript-toolchain.cjs +5 -0
- package/src/lib/scaffold/__tests__/scaffold-ds-contract.test.ts +31 -4
- package/src/lib/worker-job-handler.ts +17 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# search — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/search 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/search 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/search/src/modules/search
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# security — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/enterprise 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/enterprise 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/enterprise/src/modules/security
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# seeds — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/seeds
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# shipping_carriers — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/shipping_carriers
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# sso — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/enterprise 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/enterprise 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/enterprise/src/modules/sso
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# staff — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/staff
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# storage_s3 — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/storage-s3 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/storage-s3 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/storage-s3/src/modules/storage_s3
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# sync_akeneo — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/sync-akeneo 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/sync-akeneo 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/sync-akeneo/src/modules/sync_akeneo
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# sync_excel — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/sync_excel
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# system_status_overlays — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/enterprise 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/enterprise 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/enterprise/src/modules/system_status_overlays
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# telemetry — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/telemetry 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/telemetry 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/telemetry/src/modules/telemetry
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# tillio — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/tillio 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/tillio 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/tillio/src/modules/tillio
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# translations — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/translations
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# warranty_claims — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/warranty_claims
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# webhooks — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/webhooks 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/webhooks 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/webhooks/src/modules/webhooks
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# wms — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/wms
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -6,15 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
| Token | Kind | Lifetime | Injection | Provider | Source |
|
|
8
8
|
|---|---|---|---|---|---|
|
|
9
|
-
| activityExecutor | function | scoped | — | — | [di.ts:
|
|
10
|
-
| conditionHandler | function | scoped | — | — | [di.ts:
|
|
11
|
-
| eventLogger | function | scoped | — | — | [di.ts:
|
|
12
|
-
| signalHandler | function | scoped | — | — | [di.ts:
|
|
13
|
-
| stepHandler | function | scoped | — | — | [di.ts:
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
9
|
+
| activityExecutor | function | scoped | — | — | [di.ts:61](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L61) |
|
|
10
|
+
| conditionHandler | function | scoped | — | — | [di.ts:65](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L65) |
|
|
11
|
+
| eventLogger | function | scoped | — | — | [di.ts:62](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L62) |
|
|
12
|
+
| signalHandler | function | scoped | — | — | [di.ts:63](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L63) |
|
|
13
|
+
| stepHandler | function | scoped | — | — | [di.ts:59](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L59) |
|
|
14
|
+
| taskCompletionGuards | function | scoped | — | — | [di.ts:69](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L69) |
|
|
15
|
+
| taskHandler | function | scoped | — | — | [di.ts:66](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L66) |
|
|
16
|
+
| timerHandler | function | scoped | — | — | [di.ts:64](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L64) |
|
|
17
|
+
| transitionHandler | function | scoped | — | — | [di.ts:60](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L60) |
|
|
18
|
+
| workflowExecutor | function | scoped | — | — | [di.ts:58](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L58) |
|
|
19
|
+
| workInboxService | function | scoped | — | — | [di.ts:70](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L70) |
|
|
19
20
|
|
|
20
21
|
<!-- end module facts section: workflows/di-registrations-rich -->
|
|
@@ -6,15 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
| Token | Source |
|
|
8
8
|
|---|---|
|
|
9
|
-
| workflowExecutor | [di.ts:
|
|
10
|
-
| stepHandler | [di.ts:
|
|
11
|
-
| transitionHandler | [di.ts:
|
|
12
|
-
| activityExecutor | [di.ts:
|
|
13
|
-
| eventLogger | [di.ts:
|
|
14
|
-
| signalHandler | [di.ts:
|
|
15
|
-
| timerHandler | [di.ts:
|
|
16
|
-
| conditionHandler | [di.ts:
|
|
17
|
-
| taskHandler | [di.ts:
|
|
18
|
-
|
|
|
9
|
+
| workflowExecutor | [di.ts:58](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L58) |
|
|
10
|
+
| stepHandler | [di.ts:59](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L59) |
|
|
11
|
+
| transitionHandler | [di.ts:60](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L60) |
|
|
12
|
+
| activityExecutor | [di.ts:61](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L61) |
|
|
13
|
+
| eventLogger | [di.ts:62](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L62) |
|
|
14
|
+
| signalHandler | [di.ts:63](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L63) |
|
|
15
|
+
| timerHandler | [di.ts:64](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L64) |
|
|
16
|
+
| conditionHandler | [di.ts:65](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L65) |
|
|
17
|
+
| taskHandler | [di.ts:66](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L66) |
|
|
18
|
+
| taskCompletionGuards | [di.ts:69](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L69) |
|
|
19
|
+
| workInboxService | [di.ts:70](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L70) |
|
|
19
20
|
|
|
20
21
|
<!-- end module facts section: workflows/di-service-tokens -->
|
|
@@ -49,16 +49,17 @@
|
|
|
49
49
|
| cli | `overrides.cli["seed-sales-pipeline"]` | disable-replace | cliCommands:seed-sales-pipeline | [cli.ts](../../../../node_modules/@open-mercato/core/src/modules/workflows/cli.ts) |
|
|
50
50
|
| cli | `overrides.cli["seed-simple-approval"]` | disable-replace | cliCommands:seed-simple-approval | [cli.ts](../../../../node_modules/@open-mercato/core/src/modules/workflows/cli.ts) |
|
|
51
51
|
| cli | `overrides.cli["start-worker"]` | disable-replace | cliCommands:start-worker | [cli.ts](../../../../node_modules/@open-mercato/core/src/modules/workflows/cli.ts) |
|
|
52
|
-
| di | `overrides.di["activityExecutor"]` | disable-replace | ownedContracts.di-registration:activityExecutor | [di.ts:
|
|
53
|
-
| di | `overrides.di["conditionHandler"]` | disable-replace | ownedContracts.di-registration:conditionHandler | [di.ts:
|
|
54
|
-
| di | `overrides.di["eventLogger"]` | disable-replace | ownedContracts.di-registration:eventLogger | [di.ts:
|
|
55
|
-
| di | `overrides.di["signalHandler"]` | disable-replace | ownedContracts.di-registration:signalHandler | [di.ts:
|
|
56
|
-
| di | `overrides.di["stepHandler"]` | disable-replace | ownedContracts.di-registration:stepHandler | [di.ts:
|
|
57
|
-
| di | `overrides.di["
|
|
58
|
-
| di | `overrides.di["
|
|
59
|
-
| di | `overrides.di["
|
|
60
|
-
| di | `overrides.di["
|
|
61
|
-
| di | `overrides.di["
|
|
52
|
+
| di | `overrides.di["activityExecutor"]` | disable-replace | ownedContracts.di-registration:activityExecutor | [di.ts:61](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L61) |
|
|
53
|
+
| di | `overrides.di["conditionHandler"]` | disable-replace | ownedContracts.di-registration:conditionHandler | [di.ts:65](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L65) |
|
|
54
|
+
| di | `overrides.di["eventLogger"]` | disable-replace | ownedContracts.di-registration:eventLogger | [di.ts:62](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L62) |
|
|
55
|
+
| di | `overrides.di["signalHandler"]` | disable-replace | ownedContracts.di-registration:signalHandler | [di.ts:63](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L63) |
|
|
56
|
+
| di | `overrides.di["stepHandler"]` | disable-replace | ownedContracts.di-registration:stepHandler | [di.ts:59](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L59) |
|
|
57
|
+
| di | `overrides.di["taskCompletionGuards"]` | disable-replace | ownedContracts.di-registration:taskCompletionGuards | [di.ts:69](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L69) |
|
|
58
|
+
| di | `overrides.di["taskHandler"]` | disable-replace | ownedContracts.di-registration:taskHandler | [di.ts:66](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L66) |
|
|
59
|
+
| di | `overrides.di["timerHandler"]` | disable-replace | ownedContracts.di-registration:timerHandler | [di.ts:64](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L64) |
|
|
60
|
+
| di | `overrides.di["transitionHandler"]` | disable-replace | ownedContracts.di-registration:transitionHandler | [di.ts:60](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L60) |
|
|
61
|
+
| di | `overrides.di["workflowExecutor"]` | disable-replace | ownedContracts.di-registration:workflowExecutor | [di.ts:58](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L58) |
|
|
62
|
+
| di | `overrides.di["workInboxService"]` | disable-replace | ownedContracts.di-registration:workInboxService | [di.ts:70](../../../../node_modules/@open-mercato/core/src/modules/workflows/di.ts#L70) |
|
|
62
63
|
| events | `overrides.events.subscribers["workflows:event-trigger"]` | disable-replace | extensionSurfaces.contributions:workflows:event-trigger | [subscribers/event-trigger.ts](../../../../node_modules/@open-mercato/core/src/modules/workflows/subscribers/event-trigger.ts) |
|
|
63
64
|
| events | `overrides.events.subscribers["workflows:task-assigned-notification"]` | disable-replace | extensionSurfaces.contributions:workflows:task-assigned-notification | [subscribers/task-assigned-notification.ts](../../../../node_modules/@open-mercato/core/src/modules/workflows/subscribers/task-assigned-notification.ts) |
|
|
64
65
|
| events | `overrides.events.subscribers["workflows:task-deadline-breached-notification"]` | disable-replace | extensionSurfaces.contributions:workflows:task-deadline-breached-notification | [subscribers/task-deadline-breached-notification.ts](../../../../node_modules/@open-mercato/core/src/modules/workflows/subscribers/task-deadline-breached-notification.ts) |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# workflows — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.11.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.11.1-develop.8724.1.beb07a9e96; core 0.11.1-develop.8724.1.beb07a9e96 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/workflows
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"projectionKind": "activated-reference",
|
|
5
5
|
"sourceKind": "local-reference",
|
|
6
6
|
"runtimeSelected": false,
|
|
7
|
-
"sourceFingerprint": "
|
|
7
|
+
"sourceFingerprint": "001cfc8d6ef80756d3ebfb1de83a42d54327056506c0181867b86de73a5cc27e",
|
|
8
8
|
"taxonomyFingerprint": "f9c9e58b7468bdba5ab0361dd1a6f95e1e102c6ebe6a2b6d5f7f634e8eec6a74",
|
|
9
9
|
"factCoverage": [
|
|
10
10
|
{
|
|
@@ -1191,7 +1191,7 @@
|
|
|
1191
1191
|
"facts": {
|
|
1192
1192
|
"title": "Example Module",
|
|
1193
1193
|
"description": "Demonstrates pages, APIs, entities and DI.",
|
|
1194
|
-
"coreVersion": "0.11.1-develop.
|
|
1194
|
+
"coreVersion": "0.11.1-develop.8724.1.beb07a9e96",
|
|
1195
1195
|
"sourcePackage": null,
|
|
1196
1196
|
"sourceVersion": null,
|
|
1197
1197
|
"sourceRoot": "src/modules/example",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# example — module facts (generated reference projection, do not edit)
|
|
2
|
-
<!-- generated from local reference src/modules/example; source-fingerprint
|
|
2
|
+
<!-- generated from local reference src/modules/example; source-fingerprint 001cfc8d6ef80756d3ebfb1de83a42d54327056506c0181867b86de73a5cc27e; taxonomy-fingerprint f9c9e58b7468bdba5ab0361dd1a6f95e1e102c6ebe6a2b6d5f7f634e8eec6a74 — R1 staleness stamp -->
|
|
3
3
|
> Reference projection: `example` is not selected by the current runtime. Its activations and exact override targets describe behavior only after opt-in in `src/modules.ts`.
|
|
4
4
|
Source root: src/modules/example
|
|
5
5
|
|
|
@@ -149,15 +149,15 @@ Most `om-*` skills come from the shared [open-mercato/skills](https://github.com
|
|
|
149
149
|
|
|
150
150
|
## PR Workflow
|
|
151
151
|
|
|
152
|
-
Full policy
|
|
152
|
+
Full policy (labels, priority/risk inference, pipeline moves, QA exemption, self-QA, batch QA, claims): [`.ai/docs/pr-workflow.md`](.ai/docs/pr-workflow.md). The boundaries:
|
|
153
153
|
|
|
154
154
|
- Pipeline labels are mutually exclusive: `review`, `changes-requested`, `qa`, `qa-failed`, `merge-queue`, `blocked`, `do-not-merge`. A ready non-draft PR carries `review` unless it is already in another pipeline state.
|
|
155
|
-
- Category (`bug`, `feature`, `refactor`, `security`, `dependencies`, `enterprise`, `documentation`) and meta (`needs-qa`, `skip-qa`, `qa-approved`, `qa-self-verified`, `in-progress`, `ci-monitoring`, `screenshots`) labels are additive.
|
|
155
|
+
- Category (`bug`, `feature`, `refactor`, `security`, `dependencies`, `enterprise`, `documentation`) and meta (`needs-qa`, `needs-human-qa`, `qa-batch-check`, `skip-qa`, `qa-approved`, `qa-self-verified`, `in-progress`, `ci-monitoring`, `screenshots`) labels are additive.
|
|
156
156
|
- Every non-draft PR carries **exactly one** priority label (`priority-low|medium|high|extreme`, urgency) and **exactly one** risk label (`risk-low|medium|high`, blast radius). They are orthogonal; when signals conflict pick the higher one and say why in the label comment.
|
|
157
|
-
- **QA-approval merge gate (hard rule): a PR carrying `needs-qa` MUST NOT be merged unless it also carries `qa-approved`**, even when every other check is green. `skip-qa` is the explicit opt-out; never combine it with `needs-qa`/`qa-approved`. `qa-failed`, `do-not-merge` and `blocked` are likewise hard merge blocks.
|
|
157
|
+
- **QA-approval merge gate (hard rule): a PR carrying `needs-human-qa` MUST NOT be merged unless it also carries `qa-approved`**, even when every other check is green; `needs-qa`/`qa-batch-check` never gate it. `skip-qa` is the explicit opt-out; never combine it with `needs-qa`/`qa-approved`. `qa-failed`, `do-not-merge` and `blocked` are likewise hard merge blocks.
|
|
158
158
|
- **Automated-verification exemption:** a change touching no UI-rendering file (no `.tsx` outside tests, nothing under `packages/ui/src/` or `**/components/**`) takes `skip-qa` — **but only** with the database structure and API surface unchanged, no `BACKWARD_COMPATIBILITY.md` contract broken, and automated tests for the changed behavior in the same PR; otherwise it keeps `needs-qa`.
|
|
159
159
|
- `qa-approved`/`qa-self-verified` are label writes: a `read`-permission contributor posts the QA evidence comment and a maintainer applies the labels; a skill that cannot apply them MUST report it stopped there.
|
|
160
|
-
- The `qa` pipeline label means manual QA is **in progress** and is set by QA reviewers only — `om-auto-*` skills request QA with
|
|
160
|
+
- The `qa` pipeline label means manual QA is **in progress** and is set by QA reviewers only — `om-auto-*` skills request QA with labels and never touch `qa`.
|
|
161
161
|
- Auto-skills claim a PR/issue with all three signals (assignee, `in-progress` label, claim comment), release `in-progress` even on failure, and comment the rationale whenever they change a pipeline/meta label.
|
|
162
162
|
- `ci-monitoring` is a meta label, **not** a claim signal: it means the work is finished and reported and only CI is still being watched. A PR carrying it without `in-progress`, a non-self assignee or a fresh claim comment MUST NOT be treated as in progress — it is free to claim.
|
|
163
163
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generator": "@open-mercato/cli@0.11.1-develop.
|
|
3
|
+
"generator": "@open-mercato/cli@0.11.1-develop.8724.1.beb07a9e96",
|
|
4
4
|
"files": {
|
|
5
|
-
"AGENTS.md": "
|
|
5
|
+
"AGENTS.md": "2e0de80ef0f9cf20218170aa7401edc49067ae4a9f69cf4b4818b3d45a5140d8",
|
|
6
6
|
"BACKWARD_COMPATIBILITY.md": "d05210af6f38ee3469e2340b757e9c1aebad7e6653079466c8eff9fb113b12cb"
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -22126,7 +22126,7 @@
|
|
|
22126
22126
|
"patterns.forbidden"
|
|
22127
22127
|
],
|
|
22128
22128
|
"maxContextFiles": 16,
|
|
22129
|
-
"maxInitialContextBytes":
|
|
22129
|
+
"maxInitialContextBytes": 77824,
|
|
22130
22130
|
"maxTotalContextBytes": 385024,
|
|
22131
22131
|
"relatedCases": [
|
|
22132
22132
|
"OMH-030",
|
|
@@ -16,7 +16,13 @@ function createPerJobWorkerHandler(workers, createContainer) {
|
|
|
16
16
|
operation: worker.id,
|
|
17
17
|
resourceId: worker.id
|
|
18
18
|
},
|
|
19
|
-
() => runWithRequestScopeContainer(container, () => worker.handler(job, {
|
|
19
|
+
() => runWithRequestScopeContainer(container, () => worker.handler(job, {
|
|
20
|
+
...ctx,
|
|
21
|
+
resolve: container.resolve.bind(container),
|
|
22
|
+
// See `WorkerJobContainer.register`'s own doc — present only when the
|
|
23
|
+
// factory handed back a real container, never a `{ resolve }`-only one.
|
|
24
|
+
container: typeof container.register === "function" ? container : void 0
|
|
25
|
+
}))
|
|
20
26
|
);
|
|
21
27
|
}
|
|
22
28
|
} finally {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/lib/worker-job-handler.ts"],
|
|
4
|
-
"sourcesContent": ["import type { JobContext, JobHandler } from '@open-mercato/queue'\nimport type { ModuleWorker } from '@open-mercato/shared/modules/registry'\nimport {\n inferModuleIdFromResourceId,\n withModuleResourceUsage,\n} from '@open-mercato/shared/lib/modules/resource-usage'\nimport { bindRequestScopeContainer, runInOwnedRequestScope, runWithRequestScopeContainer } from '@open-mercato/shared/lib/di/request-scope'\n\nexport type WorkerJobContainer = {\n resolve: <T = unknown>(name: string) => T\n}\n\nexport type WorkerJobContainerFactory = () => Promise<WorkerJobContainer>\n\ntype ClearableEntityManager = {\n clear?: () => void\n}\n\n/**\n * Builds a queue job handler that isolates every job in its own request\n * container, instead of sharing a single process-wide `EntityManager` fork\n * across all concurrent jobs.\n *\n * Under the async (BullMQ) strategy jobs run with real concurrency, so a\n * shared EM would interleave unit-of-work flushes between unrelated jobs and\n * never release its identity map. Creating one container per job removes both\n * the cross-job flush race and the unbounded identity-map growth, while\n * keeping the `ctx.resolve` contract and DI keys unchanged. See issue #2970.\n */\nexport function createPerJobWorkerHandler(\n workers: ModuleWorker[],\n createContainer: WorkerJobContainerFactory,\n): JobHandler {\n return (job, ctx: JobContext) => runInOwnedRequestScope(async (): Promise<void> => {\n const container = await createContainer()\n bindRequestScopeContainer(container)\n try {\n for (const worker of workers) {\n await withModuleResourceUsage(\n {\n moduleId: worker.moduleId ?? inferModuleIdFromResourceId(worker.id),\n surface: 'worker',\n operation: worker.id,\n resourceId: worker.id,\n },\n () => runWithRequestScopeContainer(container, () => worker.handler(job, {
|
|
5
|
-
"mappings": "AAEA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,2BAA2B,wBAAwB,oCAAoC;
|
|
4
|
+
"sourcesContent": ["import type { JobContext, JobHandler } from '@open-mercato/queue'\nimport type { ModuleWorker } from '@open-mercato/shared/modules/registry'\nimport {\n inferModuleIdFromResourceId,\n withModuleResourceUsage,\n} from '@open-mercato/shared/lib/modules/resource-usage'\nimport { bindRequestScopeContainer, runInOwnedRequestScope, runWithRequestScopeContainer } from '@open-mercato/shared/lib/di/request-scope'\n\nexport type WorkerJobContainer = {\n resolve: <T = unknown>(name: string) => T\n /**\n * #8268 review Major 1 (re-review): optional \u2014 the factory's real container,\n * when it has one, so a worker that needs `.register()` (several command\n * phases override the trusted `auth` scope for nested resolution, e.g. before\n * resolving `promotionsService`) can use the SAME container a module's\n * `register(container)` call closed over, rather than a `{ resolve }`-only\n * shim whose overrides are invisible to an already-constructed dependent\n * service holding its own reference to the original container.\n */\n register?: (registrations: Record<string, unknown>) => void\n}\n\nexport type WorkerJobContainerFactory = () => Promise<WorkerJobContainer>\n\ntype ClearableEntityManager = {\n clear?: () => void\n}\n\n/**\n * Builds a queue job handler that isolates every job in its own request\n * container, instead of sharing a single process-wide `EntityManager` fork\n * across all concurrent jobs.\n *\n * Under the async (BullMQ) strategy jobs run with real concurrency, so a\n * shared EM would interleave unit-of-work flushes between unrelated jobs and\n * never release its identity map. Creating one container per job removes both\n * the cross-job flush race and the unbounded identity-map growth, while\n * keeping the `ctx.resolve` contract and DI keys unchanged. See issue #2970.\n */\nexport function createPerJobWorkerHandler(\n workers: ModuleWorker[],\n createContainer: WorkerJobContainerFactory,\n): JobHandler {\n return (job, ctx: JobContext) => runInOwnedRequestScope(async (): Promise<void> => {\n const container = await createContainer()\n bindRequestScopeContainer(container)\n try {\n for (const worker of workers) {\n await withModuleResourceUsage(\n {\n moduleId: worker.moduleId ?? inferModuleIdFromResourceId(worker.id),\n surface: 'worker',\n operation: worker.id,\n resourceId: worker.id,\n },\n () => runWithRequestScopeContainer(container, () => worker.handler(job, {\n ...ctx,\n resolve: container.resolve.bind(container),\n // See `WorkerJobContainer.register`'s own doc \u2014 present only when the\n // factory handed back a real container, never a `{ resolve }`-only one.\n container: typeof container.register === 'function' ? container : undefined,\n })),\n )\n }\n } finally {\n try {\n const em = container.resolve('em') as ClearableEntityManager | null\n em?.clear?.()\n } catch {\n // Best-effort: clearing the identity map is a memory optimization and\n // must never mask a job's own outcome.\n }\n }\n })\n}\n"],
|
|
5
|
+
"mappings": "AAEA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,2BAA2B,wBAAwB,oCAAoC;AAiCzF,SAAS,0BACd,SACA,iBACY;AACZ,SAAO,CAAC,KAAK,QAAoB,uBAAuB,YAA2B;AACjF,UAAM,YAAY,MAAM,gBAAgB;AACxC,8BAA0B,SAAS;AACnC,QAAI;AACF,iBAAW,UAAU,SAAS;AAC5B,cAAM;AAAA,UACJ;AAAA,YACE,UAAU,OAAO,YAAY,4BAA4B,OAAO,EAAE;AAAA,YAClE,SAAS;AAAA,YACT,WAAW,OAAO;AAAA,YAClB,YAAY,OAAO;AAAA,UACrB;AAAA,UACA,MAAM,6BAA6B,WAAW,MAAM,OAAO,QAAQ,KAAK;AAAA,YACtE,GAAG;AAAA,YACH,SAAS,UAAU,QAAQ,KAAK,SAAS;AAAA;AAAA;AAAA,YAGzC,WAAW,OAAO,UAAU,aAAa,aAAa,YAAY;AAAA,UACpE,CAAC,CAAC;AAAA,QACJ;AAAA,MACF;AAAA,IACF,UAAE;AACA,UAAI;AACF,cAAM,KAAK,UAAU,QAAQ,IAAI;AACjC,YAAI,QAAQ;AAAA,MACd,QAAQ;AAAA,MAGR;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/cli",
|
|
3
|
-
"version": "0.11.1-develop.
|
|
3
|
+
"version": "0.11.1-develop.8724.1.beb07a9e96",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"@mikro-orm/decorators": "^7.1.14",
|
|
61
61
|
"@mikro-orm/migrations": "^7.1.14",
|
|
62
62
|
"@mikro-orm/postgresql": "^7.1.14",
|
|
63
|
-
"@open-mercato/events": "0.11.1-develop.
|
|
64
|
-
"@open-mercato/queue": "0.11.1-develop.
|
|
65
|
-
"@open-mercato/shared": "0.11.1-develop.
|
|
66
|
-
"@open-mercato/telemetry": "0.11.1-develop.
|
|
63
|
+
"@open-mercato/events": "0.11.1-develop.8724.1.beb07a9e96",
|
|
64
|
+
"@open-mercato/queue": "0.11.1-develop.8724.1.beb07a9e96",
|
|
65
|
+
"@open-mercato/shared": "0.11.1-develop.8724.1.beb07a9e96",
|
|
66
|
+
"@open-mercato/telemetry": "0.11.1-develop.8724.1.beb07a9e96",
|
|
67
67
|
"cross-spawn": "^7.0.6",
|
|
68
68
|
"minisearch": "7.2.0",
|
|
69
69
|
"pg": "8.23.0",
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"typescript-js": "npm:typescript@6.0.3"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@open-mercato/shared": "0.11.1-develop.
|
|
78
|
+
"@open-mercato/shared": "0.11.1-develop.8724.1.beb07a9e96"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@open-mercato/shared": "0.11.1-develop.
|
|
81
|
+
"@open-mercato/shared": "0.11.1-develop.8724.1.beb07a9e96",
|
|
82
82
|
"@types/jest": "^30.0.0",
|
|
83
83
|
"jest": "^30.4.2",
|
|
84
84
|
"ts-jest": "^29.4.12"
|
|
@@ -74,6 +74,36 @@ describe('createPerJobWorkerHandler', () => {
|
|
|
74
74
|
expect(seenEms[0]).not.toBe(seenEms[1])
|
|
75
75
|
})
|
|
76
76
|
|
|
77
|
+
it('passes the job container itself as ctx.container when it supports register()', async () => {
|
|
78
|
+
const register = jest.fn()
|
|
79
|
+
const realContainer: WorkerJobContainer = {
|
|
80
|
+
resolve: <T = unknown>(): T => undefined as unknown as T,
|
|
81
|
+
register,
|
|
82
|
+
}
|
|
83
|
+
const seen: unknown[] = []
|
|
84
|
+
const worker = makeWorker('w', (_job, ctx) => {
|
|
85
|
+
seen.push((ctx as { container?: unknown }).container)
|
|
86
|
+
})
|
|
87
|
+
const handler = createPerJobWorkerHandler([worker], async () => realContainer)
|
|
88
|
+
|
|
89
|
+
await handler({ id: 'a' }, { ...baseCtx, jobId: 'a' })
|
|
90
|
+
|
|
91
|
+
expect(seen).toEqual([realContainer])
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
it('leaves ctx.container undefined when the job container only resolves', async () => {
|
|
95
|
+
const { factory } = makeContainerFactory()
|
|
96
|
+
const seen: unknown[] = []
|
|
97
|
+
const worker = makeWorker('w', (_job, ctx) => {
|
|
98
|
+
seen.push((ctx as { container?: unknown }).container)
|
|
99
|
+
})
|
|
100
|
+
const handler = createPerJobWorkerHandler([worker], factory)
|
|
101
|
+
|
|
102
|
+
await handler({ id: 'a' }, { ...baseCtx, jobId: 'a' })
|
|
103
|
+
|
|
104
|
+
expect(seen).toEqual([undefined])
|
|
105
|
+
})
|
|
106
|
+
|
|
77
107
|
it('isolates concurrent jobs in distinct containers (no shared EntityManager)', async () => {
|
|
78
108
|
const { factory, containers } = makeContainerFactory()
|
|
79
109
|
let release: (() => void) | null = null
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const resolutionDirectory = process.argv[2]
|
|
2
|
+
const typeScriptPath = require.resolve('typescript', { paths: [resolutionDirectory] })
|
|
3
|
+
const typeScript = require(typeScriptPath)
|
|
4
|
+
|
|
5
|
+
console.log(`${typeScriptPath} v${typeScript.version} Extension=${typeof typeScript.Extension}`)
|
|
@@ -70,6 +70,14 @@ function codeFiles(): Array<[string, string]> {
|
|
|
70
70
|
return [...tree.entries()].filter(([relPath]) => relPath.endsWith('.ts') || relPath.endsWith('.tsx'))
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
function readTypeScriptToolchain(resolutionDirectory: string) {
|
|
74
|
+
return spawnSync(
|
|
75
|
+
process.execPath,
|
|
76
|
+
[path.join(__dirname, 'fixtures', 'typescript-toolchain.cjs'), resolutionDirectory],
|
|
77
|
+
{ encoding: 'utf8', timeout: 30_000 },
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
describe('DS lint gate (repo eslint.ds config, programmatic run)', () => {
|
|
74
82
|
it('generated pages produce zero errors and zero warnings', () => {
|
|
75
83
|
// TS7-native root: eslint's parser needs the JS compiler API, which only
|
|
@@ -97,10 +105,8 @@ describe('DS lint gate (repo eslint.ds config, programmatic run)', () => {
|
|
|
97
105
|
)
|
|
98
106
|
expect(result.error).toBeUndefined()
|
|
99
107
|
if (result.status !== 0 && result.status !== 1) {
|
|
100
|
-
const toolchain =
|
|
101
|
-
|
|
102
|
-
['-p', `(() => { const p = require.resolve('typescript', { paths: [${JSON.stringify(path.join(REPO_ROOT, 'node_modules', '@typescript-eslint', 'typescript-estree'))}] }); const ts = require(p); return p + ' v' + ts.version + ' Extension=' + typeof ts.Extension })()`],
|
|
103
|
-
{ encoding: 'utf8', timeout: 30_000 },
|
|
108
|
+
const toolchain = readTypeScriptToolchain(
|
|
109
|
+
path.join(REPO_ROOT, 'node_modules', '@typescript-eslint', 'typescript-estree'),
|
|
104
110
|
)
|
|
105
111
|
throw new Error(
|
|
106
112
|
`[internal] eslint exited with ${result.status}\nstderr: ${result.stderr}\nstdout: ${result.stdout}\ntoolchain: ${toolchain.stdout || toolchain.stderr}`,
|
|
@@ -126,6 +132,27 @@ describe('DS lint gate (repo eslint.ds config, programmatic run)', () => {
|
|
|
126
132
|
})
|
|
127
133
|
})
|
|
128
134
|
|
|
135
|
+
describe('TypeScript toolchain diagnostic', () => {
|
|
136
|
+
it('passes a directory containing spaces and apostrophes as a process argument', () => {
|
|
137
|
+
const resolutionDirectory = path.join(tmpDir, "parser's resolution directory")
|
|
138
|
+
const typeScriptDirectory = path.join(resolutionDirectory, 'node_modules', 'typescript')
|
|
139
|
+
const typeScriptEntry = path.join(typeScriptDirectory, 'index.js')
|
|
140
|
+
fs.mkdirSync(typeScriptDirectory, { recursive: true })
|
|
141
|
+
fs.writeFileSync(
|
|
142
|
+
typeScriptEntry,
|
|
143
|
+
'module.exports = { version: JSON.stringify(process.argv.slice(2)), Extension: {} }\n',
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
const result = readTypeScriptToolchain(resolutionDirectory)
|
|
147
|
+
|
|
148
|
+
expect(result.error).toBeUndefined()
|
|
149
|
+
expect(result.status).toBe(0)
|
|
150
|
+
expect(result.stdout.trim()).toBe(
|
|
151
|
+
`${fs.realpathSync(typeScriptEntry)} v${JSON.stringify([resolutionDirectory])} Extension=object`,
|
|
152
|
+
)
|
|
153
|
+
})
|
|
154
|
+
})
|
|
155
|
+
|
|
129
156
|
describe('guardian checklist markers', () => {
|
|
130
157
|
it('list page renders EmptyState and passes isLoading to DataTable', () => {
|
|
131
158
|
const listPage = fileOrThrow('backend/inventory_items/page.tsx')
|
|
@@ -8,6 +8,16 @@ import { bindRequestScopeContainer, runInOwnedRequestScope, runWithRequestScopeC
|
|
|
8
8
|
|
|
9
9
|
export type WorkerJobContainer = {
|
|
10
10
|
resolve: <T = unknown>(name: string) => T
|
|
11
|
+
/**
|
|
12
|
+
* #8268 review Major 1 (re-review): optional — the factory's real container,
|
|
13
|
+
* when it has one, so a worker that needs `.register()` (several command
|
|
14
|
+
* phases override the trusted `auth` scope for nested resolution, e.g. before
|
|
15
|
+
* resolving `promotionsService`) can use the SAME container a module's
|
|
16
|
+
* `register(container)` call closed over, rather than a `{ resolve }`-only
|
|
17
|
+
* shim whose overrides are invisible to an already-constructed dependent
|
|
18
|
+
* service holding its own reference to the original container.
|
|
19
|
+
*/
|
|
20
|
+
register?: (registrations: Record<string, unknown>) => void
|
|
11
21
|
}
|
|
12
22
|
|
|
13
23
|
export type WorkerJobContainerFactory = () => Promise<WorkerJobContainer>
|
|
@@ -43,7 +53,13 @@ export function createPerJobWorkerHandler(
|
|
|
43
53
|
operation: worker.id,
|
|
44
54
|
resourceId: worker.id,
|
|
45
55
|
},
|
|
46
|
-
() => runWithRequestScopeContainer(container, () => worker.handler(job, {
|
|
56
|
+
() => runWithRequestScopeContainer(container, () => worker.handler(job, {
|
|
57
|
+
...ctx,
|
|
58
|
+
resolve: container.resolve.bind(container),
|
|
59
|
+
// See `WorkerJobContainer.register`'s own doc — present only when the
|
|
60
|
+
// factory handed back a real container, never a `{ resolve }`-only one.
|
|
61
|
+
container: typeof container.register === 'function' ? container : undefined,
|
|
62
|
+
})),
|
|
47
63
|
)
|
|
48
64
|
}
|
|
49
65
|
} finally {
|