@open-mercato/cli 0.11.1-develop.8910.1.d07a49d70a → 0.11.1-develop.8920.1.d3c2cc4681

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.
Files changed (101) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/agentic/guides/module-facts.json +180 -194
  3. package/dist/agentic/guides/module-facts.v2.json +180 -194
  4. package/dist/agentic/guides/modules/agent_orchestrator/index.md +1 -1
  5. package/dist/agentic/guides/modules/ai_assistant/index.md +1 -1
  6. package/dist/agentic/guides/modules/api_docs/index.md +1 -1
  7. package/dist/agentic/guides/modules/api_keys/index.md +1 -1
  8. package/dist/agentic/guides/modules/assisted_selling/index.md +1 -1
  9. package/dist/agentic/guides/modules/attachments/index.md +1 -1
  10. package/dist/agentic/guides/modules/audit_logs/index.md +1 -1
  11. package/dist/agentic/guides/modules/auth/index.md +1 -1
  12. package/dist/agentic/guides/modules/availability/index.md +1 -1
  13. package/dist/agentic/guides/modules/backups/index.md +1 -1
  14. package/dist/agentic/guides/modules/business_rules/index.md +1 -1
  15. package/dist/agentic/guides/modules/carrier_inpost/index.md +1 -1
  16. package/dist/agentic/guides/modules/cart/index.md +1 -1
  17. package/dist/agentic/guides/modules/catalog/domain-commands.md +0 -1
  18. package/dist/agentic/guides/modules/catalog/index.md +1 -1
  19. package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
  20. package/dist/agentic/guides/modules/channel_discord/index.md +1 -1
  21. package/dist/agentic/guides/modules/channel_expo/index.md +1 -1
  22. package/dist/agentic/guides/modules/channel_fcm/index.md +1 -1
  23. package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
  24. package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
  25. package/dist/agentic/guides/modules/channel_ms365/index.md +1 -1
  26. package/dist/agentic/guides/modules/channel_resend/index.md +1 -1
  27. package/dist/agentic/guides/modules/channel_ses/index.md +1 -1
  28. package/dist/agentic/guides/modules/channel_smtp/index.md +1 -1
  29. package/dist/agentic/guides/modules/checkout/index.md +1 -1
  30. package/dist/agentic/guides/modules/communication_channels/index.md +1 -1
  31. package/dist/agentic/guides/modules/configs/index.md +1 -1
  32. package/dist/agentic/guides/modules/content/index.md +1 -1
  33. package/dist/agentic/guides/modules/currencies/index.md +1 -1
  34. package/dist/agentic/guides/modules/customer_accounts/index.md +1 -1
  35. package/dist/agentic/guides/modules/customer_groups/index.md +1 -1
  36. package/dist/agentic/guides/modules/customers/index.md +1 -1
  37. package/dist/agentic/guides/modules/dashboards/index.md +1 -1
  38. package/dist/agentic/guides/modules/data_sync/index.md +1 -1
  39. package/dist/agentic/guides/modules/design_system/index.md +1 -1
  40. package/dist/agentic/guides/modules/devices/index.md +1 -1
  41. package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
  42. package/dist/agentic/guides/modules/directory/index.md +1 -1
  43. package/dist/agentic/guides/modules/documents/index.md +1 -1
  44. package/dist/agentic/guides/modules/ecommerce/index.md +1 -1
  45. package/dist/agentic/guides/modules/entities/index.md +1 -1
  46. package/dist/agentic/guides/modules/eudr/index.md +1 -1
  47. package/dist/agentic/guides/modules/events/index.md +1 -1
  48. package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
  49. package/dist/agentic/guides/modules/forms/index.md +1 -1
  50. package/dist/agentic/guides/modules/gateway_autopay/index.md +1 -1
  51. package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
  52. package/dist/agentic/guides/modules/gateway_tpay/index.md +1 -1
  53. package/dist/agentic/guides/modules/generators/index.md +1 -1
  54. package/dist/agentic/guides/modules/gus_regon/index.md +1 -1
  55. package/dist/agentic/guides/modules/inbox_ops/index.md +1 -1
  56. package/dist/agentic/guides/modules/integrations/index.md +1 -1
  57. package/dist/agentic/guides/modules/ledger/index.md +1 -1
  58. package/dist/agentic/guides/modules/maintenance/index.md +1 -1
  59. package/dist/agentic/guides/modules/messages/index.md +1 -1
  60. package/dist/agentic/guides/modules/notifications/index.md +1 -1
  61. package/dist/agentic/guides/modules/onboarding/index.md +1 -1
  62. package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
  63. package/dist/agentic/guides/modules/perspectives/index.md +1 -1
  64. package/dist/agentic/guides/modules/phone_calls/index.md +1 -1
  65. package/dist/agentic/guides/modules/planner/index.md +1 -1
  66. package/dist/agentic/guides/modules/portal/index.md +1 -1
  67. package/dist/agentic/guides/modules/progress/index.md +1 -1
  68. package/dist/agentic/guides/modules/promotions/index.md +1 -1
  69. package/dist/agentic/guides/modules/push_notifications/index.md +1 -1
  70. package/dist/agentic/guides/modules/query_index/index.md +1 -1
  71. package/dist/agentic/guides/modules/record_locks/index.md +1 -1
  72. package/dist/agentic/guides/modules/resources/index.md +1 -1
  73. package/dist/agentic/guides/modules/sales/index.md +1 -1
  74. package/dist/agentic/guides/modules/sales_invoices_gl_posting/index.md +1 -1
  75. package/dist/agentic/guides/modules/scheduler/index.md +1 -1
  76. package/dist/agentic/guides/modules/search/index.md +1 -1
  77. package/dist/agentic/guides/modules/security/index.md +1 -1
  78. package/dist/agentic/guides/modules/seeds/index.md +1 -1
  79. package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
  80. package/dist/agentic/guides/modules/sso/index.md +1 -1
  81. package/dist/agentic/guides/modules/staff/index.md +1 -1
  82. package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
  83. package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
  84. package/dist/agentic/guides/modules/sync_excel/index.md +1 -1
  85. package/dist/agentic/guides/modules/sync_shopify/index.md +1 -1
  86. package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
  87. package/dist/agentic/guides/modules/telemetry/index.md +1 -1
  88. package/dist/agentic/guides/modules/tillio/index.md +1 -1
  89. package/dist/agentic/guides/modules/translations/index.md +1 -1
  90. package/dist/agentic/guides/modules/upgrade_actions/index.md +1 -1
  91. package/dist/agentic/guides/modules/warranty_claims/index.md +1 -1
  92. package/dist/agentic/guides/modules/webhooks/index.md +1 -1
  93. package/dist/agentic/guides/modules/wms/index.md +1 -1
  94. package/dist/agentic/guides/modules/workflows/index.md +1 -1
  95. package/dist/agentic/guides/reference-module-facts.json +1 -1
  96. package/dist/agentic/guides/upstream/manifest.json +1 -1
  97. package/dist/lib/server-start-lock.js +120 -21
  98. package/dist/lib/server-start-lock.js.map +2 -2
  99. package/package.json +7 -7
  100. package/src/lib/__tests__/server-start-lock.test.ts +400 -0
  101. package/src/lib/server-start-lock.ts +170 -19
@@ -1,5 +1,5 @@
1
1
  # sales — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/core 0.11.1-develop.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/sales
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # sales_invoices_gl_posting — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/core 0.11.1-develop.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/sales_invoices_gl_posting
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # scheduler — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/scheduler 0.11.1-develop.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/scheduler 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/scheduler/src/modules/scheduler
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # search — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/search 0.11.1-develop.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/search 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/enterprise 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/enterprise 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/storage-s3 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/sync-akeneo 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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
  # sync_shopify — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/sync-shopify 0.11.1-develop.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/sync-shopify 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/sync-shopify/src/modules/sync_shopify
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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/enterprise 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/telemetry 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/tillio 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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
  # upgrade_actions — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/upgrade-actions 0.11.1-develop.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/upgrade-actions 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/upgrade-actions/src/modules/upgrade_actions
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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/webhooks 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — 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.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/wms
4
4
 
5
5
  ## Sections
@@ -1,5 +1,5 @@
1
1
  # workflows — module facts (generated, do not edit)
2
- <!-- generated from @open-mercato/core 0.11.1-develop.8910.1.d07a49d70a; core 0.11.1-develop.8910.1.d07a49d70a — R1 staleness stamp -->
2
+ <!-- generated from @open-mercato/core 0.11.1-develop.8920.1.d3c2cc4681; core 0.11.1-develop.8920.1.d3c2cc4681 — R1 staleness stamp -->
3
3
  Source root: node_modules/@open-mercato/core/src/modules/workflows
4
4
 
5
5
  ## Sections
@@ -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.8910.1.d07a49d70a",
1194
+ "coreVersion": "0.11.1-develop.8920.1.d3c2cc4681",
1195
1195
  "sourcePackage": null,
1196
1196
  "sourceVersion": null,
1197
1197
  "sourceRoot": "src/modules/example",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "generator": "@open-mercato/cli@0.11.1-develop.8910.1.d07a49d70a",
3
+ "generator": "@open-mercato/cli@0.11.1-develop.8920.1.d3c2cc4681",
4
4
  "files": {
5
5
  "AGENTS.md": "b5dc75ec890c2e8cc834cf36861be3b7b78ab1a714ecb83c8160f3d3e8834140",
6
6
  "BACKWARD_COMPATIBILITY.md": "ded01a2a24e7a97dbe0883ebeee4358ba05d85eb0906ac097d7a22c4a5b18883"
@@ -1,8 +1,25 @@
1
+ import { createHash, randomUUID } from "node:crypto";
1
2
  import fs from "node:fs";
2
3
  import path from "node:path";
3
- function readServerStartLock(lockPath) {
4
+ const BOOT_ID_PATH = "/proc/sys/kernel/random/boot_id";
5
+ const STAT_FIRST_FIELD_AFTER_COMMAND = 3;
6
+ const STAT_START_TIME_FIELD = 22;
7
+ const TAKEOVER_BUSY_WAIT_MS = 25;
8
+ const MAX_TAKEOVER_ATTEMPTS = 400;
9
+ function readOptionalString(value) {
10
+ return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
11
+ }
12
+ function readRawFile(filePath) {
13
+ try {
14
+ return fs.readFileSync(filePath, "utf8");
15
+ } catch (error) {
16
+ if (error.code === "ENOENT") return null;
17
+ throw error;
18
+ }
19
+ }
20
+ function parseServerStartLock(raw) {
21
+ if (raw === null) return null;
4
22
  try {
5
- const raw = fs.readFileSync(lockPath, "utf8");
6
23
  const parsed = JSON.parse(raw);
7
24
  if (typeof parsed.pid !== "number" || !Number.isInteger(parsed.pid) || parsed.pid <= 0) {
8
25
  return null;
@@ -10,12 +27,34 @@ function readServerStartLock(lockPath) {
10
27
  return {
11
28
  pid: parsed.pid,
12
29
  port: typeof parsed.port === "string" && parsed.port.trim().length > 0 ? parsed.port : null,
13
- startedAt: typeof parsed.startedAt === "string" ? parsed.startedAt : ""
30
+ startedAt: typeof parsed.startedAt === "string" ? parsed.startedAt : "",
31
+ processStartTime: readOptionalString(parsed.processStartTime),
32
+ bootId: readOptionalString(parsed.bootId),
33
+ token: readOptionalString(parsed.token)
14
34
  };
15
35
  } catch {
16
36
  return null;
17
37
  }
18
38
  }
39
+ function readProcessStartTime(pid) {
40
+ try {
41
+ const stat = fs.readFileSync(`/proc/${pid}/stat`, "utf8");
42
+ const commandEnd = stat.lastIndexOf(")");
43
+ if (commandEnd < 0) return null;
44
+ const fields = stat.slice(commandEnd + 1).trim().split(/\s+/);
45
+ const startTime = fields[STAT_START_TIME_FIELD - STAT_FIRST_FIELD_AFTER_COMMAND];
46
+ return startTime && /^\d+$/.test(startTime) ? startTime : null;
47
+ } catch {
48
+ return null;
49
+ }
50
+ }
51
+ function readBootId() {
52
+ try {
53
+ return readOptionalString(fs.readFileSync(BOOT_ID_PATH, "utf8"));
54
+ } catch {
55
+ return null;
56
+ }
57
+ }
19
58
  function isProcessAlive(pid) {
20
59
  try {
21
60
  process.kill(pid, 0);
@@ -24,6 +63,61 @@ function isProcessAlive(pid) {
24
63
  return error.code === "EPERM";
25
64
  }
26
65
  }
66
+ function isLockOwnerAlive(lock) {
67
+ if (!isProcessAlive(lock.pid)) return false;
68
+ if (lock.bootId) {
69
+ const currentBootId = readBootId();
70
+ if (currentBootId && currentBootId !== lock.bootId) return false;
71
+ }
72
+ if (lock.processStartTime) {
73
+ const currentStartTime = readProcessStartTime(lock.pid);
74
+ if (currentStartTime && currentStartTime !== lock.processStartTime) return false;
75
+ }
76
+ return true;
77
+ }
78
+ function isHeldByAnotherLiveProcess(record) {
79
+ return record !== null && record.pid !== process.pid && isLockOwnerAlive(record);
80
+ }
81
+ function publishExclusive(target, content) {
82
+ const tempPath = `${target}.${process.pid}.${randomUUID()}.tmp`;
83
+ fs.writeFileSync(tempPath, content, { encoding: "utf8", flag: "wx" });
84
+ try {
85
+ fs.linkSync(tempPath, target);
86
+ return true;
87
+ } catch (error) {
88
+ if (error.code === "EEXIST") return false;
89
+ throw error;
90
+ } finally {
91
+ fs.rmSync(tempPath, { force: true });
92
+ }
93
+ }
94
+ function sleepSync(ms) {
95
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
96
+ }
97
+ function removeStaleGeneration(lockPath, staleRaw, ownRaw) {
98
+ const generation = createHash("sha256").update(staleRaw).digest("hex").slice(0, 16);
99
+ const skippedGuards = [];
100
+ let ownedGuard = null;
101
+ try {
102
+ for (let slot = 0; ; slot += 1) {
103
+ const guardPath = `${lockPath}.${generation}.${slot}.takeover`;
104
+ if (publishExclusive(guardPath, ownRaw)) {
105
+ ownedGuard = guardPath;
106
+ break;
107
+ }
108
+ const guardRaw = readRawFile(guardPath);
109
+ if (guardRaw === null || isHeldByAnotherLiveProcess(parseServerStartLock(guardRaw))) return false;
110
+ skippedGuards.push(guardPath);
111
+ }
112
+ if (readRawFile(lockPath) === staleRaw) {
113
+ fs.rmSync(lockPath, { force: true });
114
+ }
115
+ for (const guardPath of skippedGuards) fs.rmSync(guardPath, { force: true });
116
+ return true;
117
+ } finally {
118
+ if (ownedGuard !== null) fs.rmSync(ownedGuard, { force: true });
119
+ }
120
+ }
27
121
  function getServerStartLockPath(appDir) {
28
122
  return path.join(appDir, ".mercato", "server-start.lock");
29
123
  }
@@ -32,34 +126,38 @@ function acquireServerStartLock(appDir, options = {}) {
32
126
  const lockRecord = {
33
127
  pid: process.pid,
34
128
  port: typeof options.port === "string" && options.port.trim().length > 0 ? options.port.trim() : null,
35
- startedAt: (/* @__PURE__ */ new Date()).toISOString()
129
+ startedAt: (/* @__PURE__ */ new Date()).toISOString(),
130
+ processStartTime: readProcessStartTime(process.pid),
131
+ bootId: readBootId(),
132
+ token: randomUUID()
36
133
  };
134
+ const ownRaw = JSON.stringify(lockRecord);
37
135
  fs.mkdirSync(path.dirname(lockPath), { recursive: true });
38
- for (; ; ) {
39
- try {
40
- fs.writeFileSync(lockPath, JSON.stringify(lockRecord), { encoding: "utf8", flag: "wx" });
41
- break;
42
- } catch (error) {
43
- const writeError = error;
44
- if (writeError.code !== "EEXIST") {
45
- throw writeError;
46
- }
47
- const existingLock = readServerStartLock(lockPath);
48
- if (existingLock && existingLock.pid !== process.pid && isProcessAlive(existingLock.pid)) {
49
- const portSuffix = existingLock.port ? ` on port ${existingLock.port}` : "";
136
+ for (let attempt = 0; !publishExclusive(lockPath, ownRaw); attempt += 1) {
137
+ const existingRaw = readRawFile(lockPath);
138
+ if (existingRaw === null) continue;
139
+ const existingLock = parseServerStartLock(existingRaw);
140
+ if (isHeldByAnotherLiveProcess(existingLock)) {
141
+ const portSuffix = existingLock.port ? ` on port ${existingLock.port}` : "";
142
+ throw new Error(
143
+ `[server] Another Open Mercato production server is already running for ${appDir} (pid ${existingLock.pid}${portSuffix}). Stop it before starting another instance.`
144
+ );
145
+ }
146
+ if (!removeStaleGeneration(lockPath, existingRaw, ownRaw)) {
147
+ if (attempt >= MAX_TAKEOVER_ATTEMPTS) {
50
148
  throw new Error(
51
- `[server] Another Open Mercato production server is already running for ${appDir} (pid ${existingLock.pid}${portSuffix}). Stop it before starting another instance.`
149
+ `[server] Another process is still replacing the stale server start lock for ${appDir}. Try again.`
52
150
  );
53
151
  }
54
- fs.rmSync(lockPath, { force: true });
152
+ sleepSync(TAKEOVER_BUSY_WAIT_MS);
55
153
  }
56
154
  }
57
155
  let released = false;
58
156
  const release = () => {
59
157
  if (released) return;
60
158
  released = true;
61
- const currentLock = readServerStartLock(lockPath);
62
- if (currentLock?.pid === process.pid) {
159
+ const currentLock = parseServerStartLock(readRawFile(lockPath));
160
+ if (currentLock?.token === lockRecord.token) {
63
161
  fs.rmSync(lockPath, { force: true });
64
162
  }
65
163
  };
@@ -71,6 +169,7 @@ function acquireServerStartLock(appDir, options = {}) {
71
169
  }
72
170
  export {
73
171
  acquireServerStartLock,
74
- getServerStartLockPath
172
+ getServerStartLockPath,
173
+ readProcessStartTime
75
174
  };
76
175
  //# sourceMappingURL=server-start-lock.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/lib/server-start-lock.ts"],
4
- "sourcesContent": ["import fs from 'node:fs'\nimport path from 'node:path'\n\ntype ServerStartLockRecord = {\n pid: number\n port: string | null\n startedAt: string\n}\n\nexport type ServerStartLockHandle = {\n lockPath: string\n release: () => void\n}\n\nfunction readServerStartLock(lockPath: string): ServerStartLockRecord | null {\n try {\n const raw = fs.readFileSync(lockPath, 'utf8')\n const parsed = JSON.parse(raw) as Partial<ServerStartLockRecord>\n if (typeof parsed.pid !== 'number' || !Number.isInteger(parsed.pid) || parsed.pid <= 0) {\n return null\n }\n return {\n pid: parsed.pid,\n port: typeof parsed.port === 'string' && parsed.port.trim().length > 0 ? parsed.port : null,\n startedAt: typeof parsed.startedAt === 'string' ? parsed.startedAt : '',\n }\n } catch {\n return null\n }\n}\n\nfunction isProcessAlive(pid: number): boolean {\n try {\n process.kill(pid, 0)\n return true\n } catch (error) {\n return (error as NodeJS.ErrnoException).code === 'EPERM'\n }\n}\n\nexport function getServerStartLockPath(appDir: string): string {\n return path.join(appDir, '.mercato', 'server-start.lock')\n}\n\nexport function acquireServerStartLock(\n appDir: string,\n options: { port?: string | null } = {},\n): ServerStartLockHandle {\n const lockPath = getServerStartLockPath(appDir)\n const lockRecord: ServerStartLockRecord = {\n pid: process.pid,\n port: typeof options.port === 'string' && options.port.trim().length > 0 ? options.port.trim() : null,\n startedAt: new Date().toISOString(),\n }\n\n fs.mkdirSync(path.dirname(lockPath), { recursive: true })\n\n for (;;) {\n try {\n fs.writeFileSync(lockPath, JSON.stringify(lockRecord), { encoding: 'utf8', flag: 'wx' })\n break\n } catch (error) {\n const writeError = error as NodeJS.ErrnoException\n if (writeError.code !== 'EEXIST') {\n throw writeError\n }\n\n const existingLock = readServerStartLock(lockPath)\n if (existingLock && existingLock.pid !== process.pid && isProcessAlive(existingLock.pid)) {\n const portSuffix = existingLock.port ? ` on port ${existingLock.port}` : ''\n throw new Error(\n `[server] Another Open Mercato production server is already running for ${appDir} (pid ${existingLock.pid}${portSuffix}). Stop it before starting another instance.`,\n )\n }\n\n fs.rmSync(lockPath, { force: true })\n }\n }\n\n let released = false\n const release = () => {\n if (released) return\n released = true\n\n const currentLock = readServerStartLock(lockPath)\n if (currentLock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AAK,UAAU,UAAU,GAAG,EAAE,UAAU,QAAQ,MAAM,KAAK,CAAC;AACvF;AAAA,IACF,SAAS,OAAO;AACd,YAAM,aAAa;AACnB,UAAI,WAAW,SAAS,UAAU;AAChC,cAAM;AAAA,MACR;AAEA,YAAM,eAAe,oBAAoB,QAAQ;AACjD,UAAI,gBAAgB,aAAa,QAAQ,QAAQ,OAAO,eAAe,aAAa,GAAG,GAAG;AACxF,cAAM,aAAa,aAAa,OAAO,YAAY,aAAa,IAAI,KAAK;AACzE,cAAM,IAAI;AAAA,UACR,0EAA0E,MAAM,SAAS,aAAa,GAAG,GAAG,UAAU;AAAA,QACxH;AAAA,MACF;AAEA,SAAG,OAAO,UAAU,EAAE,OAAO,KAAK,CAAC;AAAA,IACrC;AAAA,EACF;AAEA,MAAI,WAAW;AACf,QAAM,UAAU,MAAM;AACpB,QAAI,SAAU;AACd,eAAW;AAEX,UAAM,cAAc,oBAAoB,QAAQ;AAChD,QAAI,aAAa,QAAQ,QAAQ,KAAK;AACpC,SAAG,OAAO,UAAU,EAAE,OAAO,KAAK,CAAC;AAAA,IACrC;AAAA,EACF;AAEA,UAAQ,KAAK,QAAQ,OAAO;AAE5B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { createHash, randomUUID } from 'node:crypto'\nimport fs from 'node:fs'\nimport path from 'node:path'\n\ntype ServerStartLockRecord = {\n pid: number\n port: string | null\n startedAt: string\n processStartTime: string | null\n bootId: string | null\n token: string | null\n}\n\nexport type ServerStartLockHandle = {\n lockPath: string\n release: () => void\n}\n\nconst BOOT_ID_PATH = '/proc/sys/kernel/random/boot_id'\nconst STAT_FIRST_FIELD_AFTER_COMMAND = 3\nconst STAT_START_TIME_FIELD = 22\nconst TAKEOVER_BUSY_WAIT_MS = 25\nconst MAX_TAKEOVER_ATTEMPTS = 400\n\nfunction readOptionalString(value: unknown): string | null {\n return typeof value === 'string' && value.trim().length > 0 ? value.trim() : null\n}\n\nfunction readRawFile(filePath: string): string | null {\n try {\n return fs.readFileSync(filePath, 'utf8')\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return null\n throw error\n }\n}\n\nfunction parseServerStartLock(raw: string | null): ServerStartLockRecord | null {\n if (raw === null) return null\n try {\n const parsed = JSON.parse(raw) as Partial<ServerStartLockRecord>\n if (typeof parsed.pid !== 'number' || !Number.isInteger(parsed.pid) || parsed.pid <= 0) {\n return null\n }\n return {\n pid: parsed.pid,\n port: typeof parsed.port === 'string' && parsed.port.trim().length > 0 ? parsed.port : null,\n startedAt: typeof parsed.startedAt === 'string' ? parsed.startedAt : '',\n processStartTime: readOptionalString(parsed.processStartTime),\n bootId: readOptionalString(parsed.bootId),\n token: readOptionalString(parsed.token),\n }\n } catch {\n return null\n }\n}\n\n/**\n * Reads the start time of `pid` (field 22 of `/proc/<pid>/stat`). The command name\n * in field 2 may contain spaces or parentheses, so only the text after the last `)`\n * is split. Returns `null` when the platform has no `/proc` (macOS, Windows) or the\n * entry cannot be read or parsed.\n */\nexport function readProcessStartTime(pid: number): string | null {\n try {\n const stat = fs.readFileSync(`/proc/${pid}/stat`, 'utf8')\n const commandEnd = stat.lastIndexOf(')')\n if (commandEnd < 0) return null\n const fields = stat.slice(commandEnd + 1).trim().split(/\\s+/)\n const startTime = fields[STAT_START_TIME_FIELD - STAT_FIRST_FIELD_AFTER_COMMAND]\n return startTime && /^\\d+$/.test(startTime) ? startTime : null\n } catch {\n return null\n }\n}\n\nfunction readBootId(): string | null {\n try {\n return readOptionalString(fs.readFileSync(BOOT_ID_PATH, 'utf8'))\n } catch {\n return null\n }\n}\n\nfunction isProcessAlive(pid: number): boolean {\n try {\n process.kill(pid, 0)\n return true\n } catch (error) {\n return (error as NodeJS.ErrnoException).code === 'EPERM'\n }\n}\n\n/**\n * A lock is held only while the process that wrote it is still running. A live pid\n * alone is not enough: the lock file sits in the app directory and survives a\n * container restart, while pid numbering starts again, so the recorded pid soon\n * belongs to an unrelated process. When the lock carries the boot id and the\n * process start time, both must still match. When either side cannot be read\n * (old lock format, no `/proc`), the pid check alone decides, as before.\n */\nfunction isLockOwnerAlive(lock: ServerStartLockRecord): boolean {\n if (!isProcessAlive(lock.pid)) return false\n\n if (lock.bootId) {\n const currentBootId = readBootId()\n if (currentBootId && currentBootId !== lock.bootId) return false\n }\n\n if (lock.processStartTime) {\n const currentStartTime = readProcessStartTime(lock.pid)\n if (currentStartTime && currentStartTime !== lock.processStartTime) return false\n }\n\n return true\n}\n\n/**\n * Treats a record written by this very pid as dead: this process never holds a\n * lock or a takeover guard while it inspects one, so a matching pid can only come\n * from a previous run (pid numbering restarts with the container).\n */\nfunction isHeldByAnotherLiveProcess(record: ServerStartLockRecord | null): record is ServerStartLockRecord {\n return record !== null && record.pid !== process.pid && isLockOwnerAlive(record)\n}\n\n/**\n * Creates `target` with `content` only if it does not exist yet. The content is\n * written to a private temporary file first and hard-linked into place, so other\n * processes never observe a half-written file. Returns `false` when `target`\n * already exists.\n */\nfunction publishExclusive(target: string, content: string): boolean {\n const tempPath = `${target}.${process.pid}.${randomUUID()}.tmp`\n fs.writeFileSync(tempPath, content, { encoding: 'utf8', flag: 'wx' })\n try {\n fs.linkSync(tempPath, target)\n return true\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'EEXIST') return false\n throw error\n } finally {\n fs.rmSync(tempPath, { force: true })\n }\n}\n\nfunction sleepSync(ms: number): void {\n Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms)\n}\n\n/**\n * Removes the stale lock generation `staleRaw` unless another process has already\n * replaced it. Several starts can inspect the same stale lock at once, and a plain\n * unlink would let a late one delete the lock a faster one has just written. Only\n * the process that exclusively creates the takeover guard for this generation may\n * remove it, and it re-reads the lock under the guard first. A guard left behind\n * by a process that died mid-takeover is skipped in favour of the next slot.\n *\n * Returns `false` when a live process holds the guard and the caller must retry.\n */\nfunction removeStaleGeneration(lockPath: string, staleRaw: string, ownRaw: string): boolean {\n const generation = createHash('sha256').update(staleRaw).digest('hex').slice(0, 16)\n const skippedGuards: string[] = []\n let ownedGuard: string | null = null\n try {\n for (let slot = 0; ; slot += 1) {\n const guardPath = `${lockPath}.${generation}.${slot}.takeover`\n if (publishExclusive(guardPath, ownRaw)) {\n ownedGuard = guardPath\n break\n }\n const guardRaw = readRawFile(guardPath)\n if (guardRaw === null || isHeldByAnotherLiveProcess(parseServerStartLock(guardRaw))) return false\n skippedGuards.push(guardPath)\n }\n if (readRawFile(lockPath) === staleRaw) {\n fs.rmSync(lockPath, { force: true })\n }\n for (const guardPath of skippedGuards) fs.rmSync(guardPath, { force: true })\n return true\n } finally {\n if (ownedGuard !== null) fs.rmSync(ownedGuard, { force: true })\n }\n}\n\nexport function getServerStartLockPath(appDir: string): string {\n return path.join(appDir, '.mercato', 'server-start.lock')\n}\n\nexport function acquireServerStartLock(\n appDir: string,\n options: { port?: string | null } = {},\n): ServerStartLockHandle {\n const lockPath = getServerStartLockPath(appDir)\n const lockRecord: ServerStartLockRecord = {\n pid: process.pid,\n port: typeof options.port === 'string' && options.port.trim().length > 0 ? options.port.trim() : null,\n startedAt: new Date().toISOString(),\n processStartTime: readProcessStartTime(process.pid),\n bootId: readBootId(),\n token: randomUUID(),\n }\n const ownRaw = JSON.stringify(lockRecord)\n\n fs.mkdirSync(path.dirname(lockPath), { recursive: true })\n\n for (let attempt = 0; !publishExclusive(lockPath, ownRaw); attempt += 1) {\n const existingRaw = readRawFile(lockPath)\n if (existingRaw === null) continue\n\n const existingLock = parseServerStartLock(existingRaw)\n if (isHeldByAnotherLiveProcess(existingLock)) {\n const portSuffix = existingLock.port ? ` on port ${existingLock.port}` : ''\n throw new Error(\n `[server] Another Open Mercato production server is already running for ${appDir} (pid ${existingLock.pid}${portSuffix}). Stop it before starting another instance.`,\n )\n }\n\n if (!removeStaleGeneration(lockPath, existingRaw, ownRaw)) {\n if (attempt >= MAX_TAKEOVER_ATTEMPTS) {\n throw new Error(\n `[server] Another process is still replacing the stale server start lock for ${appDir}. Try again.`,\n )\n }\n sleepSync(TAKEOVER_BUSY_WAIT_MS)\n }\n }\n\n let released = false\n const release = () => {\n if (released) return\n released = true\n\n // Compare the token, not the pid: after a takeover the file belongs to\n // another process even if it reuses this pid in a later container run.\n const currentLock = parseServerStartLock(readRawFile(lockPath))\n if (currentLock?.token === lockRecord.token) {\n fs.rmSync(lockPath, { force: true })\n }\n }\n\n process.once('exit', release)\n\n return {\n lockPath,\n release,\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,YAAY,kBAAkB;AACvC,OAAO,QAAQ;AACf,OAAO,UAAU;AAgBjB,MAAM,eAAe;AACrB,MAAM,iCAAiC;AACvC,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;AAE9B,SAAS,mBAAmB,OAA+B;AACzD,SAAO,OAAO,UAAU,YAAY,MAAM,KAAK,EAAE,SAAS,IAAI,MAAM,KAAK,IAAI;AAC/E;AAEA,SAAS,YAAY,UAAiC;AACpD,MAAI;AACF,WAAO,GAAG,aAAa,UAAU,MAAM;AAAA,EACzC,SAAS,OAAO;AACd,QAAK,MAAgC,SAAS,SAAU,QAAO;AAC/D,UAAM;AAAA,EACR;AACF;AAEA,SAAS,qBAAqB,KAAkD;AAC9E,MAAI,QAAQ,KAAM,QAAO;AACzB,MAAI;AACF,UAAM,SAAS,KAAK,MAAM,GAAG;AAC7B,QAAI,OAAO,OAAO,QAAQ,YAAY,CAAC,OAAO,UAAU,OAAO,GAAG,KAAK,OAAO,OAAO,GAAG;AACtF,aAAO;AAAA,IACT;AACA,WAAO;AAAA,MACL,KAAK,OAAO;AAAA,MACZ,MAAM,OAAO,OAAO,SAAS,YAAY,OAAO,KAAK,KAAK,EAAE,SAAS,IAAI,OAAO,OAAO;AAAA,MACvF,WAAW,OAAO,OAAO,cAAc,WAAW,OAAO,YAAY;AAAA,MACrE,kBAAkB,mBAAmB,OAAO,gBAAgB;AAAA,MAC5D,QAAQ,mBAAmB,OAAO,MAA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EAAE,OAAO,KAAK,CAAC;AAAA,IACrC;AAAA,EACF;AAEA,UAAQ,KAAK,QAAQ,OAAO;AAE5B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;",
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.8910.1.d07a49d70a",
3
+ "version": "0.11.1-develop.8920.1.d3c2cc4681",
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.8910.1.d07a49d70a",
64
- "@open-mercato/queue": "0.11.1-develop.8910.1.d07a49d70a",
65
- "@open-mercato/shared": "0.11.1-develop.8910.1.d07a49d70a",
66
- "@open-mercato/telemetry": "0.11.1-develop.8910.1.d07a49d70a",
63
+ "@open-mercato/events": "0.11.1-develop.8920.1.d3c2cc4681",
64
+ "@open-mercato/queue": "0.11.1-develop.8920.1.d3c2cc4681",
65
+ "@open-mercato/shared": "0.11.1-develop.8920.1.d3c2cc4681",
66
+ "@open-mercato/telemetry": "0.11.1-develop.8920.1.d3c2cc4681",
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.8910.1.d07a49d70a"
78
+ "@open-mercato/shared": "0.11.1-develop.8920.1.d3c2cc4681"
79
79
  },
80
80
  "devDependencies": {
81
- "@open-mercato/shared": "0.11.1-develop.8910.1.d07a49d70a",
81
+ "@open-mercato/shared": "0.11.1-develop.8920.1.d3c2cc4681",
82
82
  "@types/jest": "^30.0.0",
83
83
  "jest": "^30.4.2",
84
84
  "ts-jest": "^29.4.12"