create-mercato-app 0.7.0 → 0.7.1-develop.7103.1.41ff100d93
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/README.md +1 -1
- package/agentic/shared/AGENTS.md.template +3 -3
- package/agentic/shared/ai/harness/README.md +2 -2
- package/agentic/shared/ai/harness/RELEASE.md +8 -6
- package/agentic/shared/ai/harness/cases.json +83 -0
- package/agentic/shared/ai/harness/cases.schema.json +4 -4
- package/agentic/shared/ai/harness/validators.json +1 -1
- package/agentic/shared/scripts/run-agent-harness-release.mjs +37 -11
- package/dist/agentic/guides/module-facts.json +5509 -599
- package/dist/agentic/guides/module-facts.v2.json +5595 -599
- 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/di-registrations-rich.md +11 -0
- package/dist/agentic/guides/modules/api_keys/di-service-tokens.md +11 -0
- package/dist/agentic/guides/modules/api_keys/exact-override-targets.md +1 -0
- package/dist/agentic/guides/modules/api_keys/index.md +4 -2
- package/dist/agentic/guides/modules/attachments/di-registrations-rich.md +6 -5
- package/dist/agentic/guides/modules/attachments/di-service-tokens.md +5 -4
- package/dist/agentic/guides/modules/attachments/exact-override-targets.md +6 -5
- package/dist/agentic/guides/modules/attachments/index.md +2 -2
- package/dist/agentic/guides/modules/audit_logs/index.md +1 -1
- package/dist/agentic/guides/modules/auth/di-registrations-rich.md +3 -2
- package/dist/agentic/guides/modules/auth/di-service-tokens.md +3 -2
- package/dist/agentic/guides/modules/auth/exact-override-targets.md +3 -2
- package/dist/agentic/guides/modules/auth/index.md +1 -1
- package/dist/agentic/guides/modules/business_rules/index.md +1 -1
- package/dist/agentic/guides/modules/catalog/incoming-installed-contributions.md +3 -0
- package/dist/agentic/guides/modules/catalog/index.md +2 -2
- package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
- package/dist/agentic/guides/modules/channel_discord/acl-features.md +13 -0
- package/dist/agentic/guides/modules/channel_discord/ai-agents.md +11 -0
- package/dist/agentic/guides/modules/channel_discord/backend-pages.md +11 -0
- package/dist/agentic/guides/modules/channel_discord/cli-commands.md +13 -0
- package/dist/agentic/guides/modules/channel_discord/contribution-resolutions.md +14 -0
- package/dist/agentic/guides/modules/channel_discord/di-registrations-rich.md +12 -0
- package/dist/agentic/guides/modules/channel_discord/exact-override-targets.md +26 -0
- package/dist/agentic/guides/modules/channel_discord/index.md +22 -0
- package/dist/agentic/guides/modules/channel_discord/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/channel_discord/setup.md +11 -0
- package/dist/agentic/guides/modules/channel_discord/umes-contributions.md +14 -0
- package/dist/agentic/guides/modules/channel_discord/workers.md +12 -0
- 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/checkout/index.md +1 -1
- package/dist/agentic/guides/modules/communication_channels/di-registrations-rich.md +9 -8
- package/dist/agentic/guides/modules/communication_channels/exact-override-targets.md +9 -8
- package/dist/agentic/guides/modules/communication_channels/incoming-installed-contributions.md +2 -0
- package/dist/agentic/guides/modules/communication_channels/index.md +3 -3
- 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/customers/active-extension-bindings.md +6 -3
- package/dist/agentic/guides/modules/customers/contribution-resolutions.md +1 -0
- package/dist/agentic/guides/modules/customers/events.md +2 -1
- package/dist/agentic/guides/modules/customers/incoming-installed-contributions.md +7 -0
- package/dist/agentic/guides/modules/customers/index.md +4 -4
- package/dist/agentic/guides/modules/customers/umes-contributions.md +1 -0
- package/dist/agentic/guides/modules/customers/umes-hosts.md +1 -0
- package/dist/agentic/guides/modules/dashboards/index.md +1 -1
- package/dist/agentic/guides/modules/data_sync/exact-override-targets.md +2 -2
- package/dist/agentic/guides/modules/data_sync/index.md +1 -1
- package/dist/agentic/guides/modules/data_sync/workers.md +2 -2
- 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/di-registrations-rich.md +12 -0
- package/dist/agentic/guides/modules/directory/di-service-tokens.md +12 -0
- package/dist/agentic/guides/modules/directory/exact-override-targets.md +2 -0
- package/dist/agentic/guides/modules/directory/index.md +5 -3
- package/dist/agentic/guides/modules/documents/acl-features.md +17 -0
- package/dist/agentic/guides/modules/documents/backend-pages.md +13 -0
- package/dist/agentic/guides/modules/documents/contribution-resolutions.md +27 -0
- package/dist/agentic/guides/modules/documents/di-registrations-rich.md +21 -0
- package/dist/agentic/guides/modules/documents/domain-commands.md +37 -0
- package/dist/agentic/guides/modules/documents/encryption.md +11 -0
- package/dist/agentic/guides/modules/documents/entities.md +21 -0
- package/dist/agentic/guides/modules/documents/events.md +25 -0
- package/dist/agentic/guides/modules/documents/exact-override-targets.md +39 -0
- package/dist/agentic/guides/modules/documents/index.md +25 -0
- package/dist/agentic/guides/modules/documents/notifications.md +13 -0
- package/dist/agentic/guides/modules/documents/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/documents/setup.md +11 -0
- package/dist/agentic/guides/modules/documents/umes-contributions.md +27 -0
- package/dist/agentic/guides/modules/documents/umes-hosts.md +36 -0
- 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/gateway_stripe/exact-override-targets.md +1 -1
- package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_stripe/workers.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/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/planner/index.md +1 -1
- package/dist/agentic/guides/modules/portal/index.md +1 -1
- package/dist/agentic/guides/modules/progress/index.md +1 -1
- package/dist/agentic/guides/modules/push_notifications/index.md +1 -1
- package/dist/agentic/guides/modules/query_index/index.md +1 -1
- package/dist/agentic/guides/modules/record_locks/index.md +1 -1
- package/dist/agentic/guides/modules/resources/index.md +1 -1
- package/dist/agentic/guides/modules/sales/active-extension-bindings.md +1 -0
- package/dist/agentic/guides/modules/sales/contribution-resolutions.md +1 -0
- package/dist/agentic/guides/modules/sales/exact-override-targets.md +5 -4
- package/dist/agentic/guides/modules/sales/host-extension-points.md +1 -1
- package/dist/agentic/guides/modules/sales/incoming-installed-contributions.md +2 -0
- package/dist/agentic/guides/modules/sales/index.md +3 -3
- package/dist/agentic/guides/modules/sales/setup.md +1 -1
- package/dist/agentic/guides/modules/sales/umes-contributions.md +1 -0
- package/dist/agentic/guides/modules/sales/umes-diagnostics.md +1 -0
- package/dist/agentic/guides/modules/sales/umes-hosts.md +9 -0
- package/dist/agentic/guides/modules/scheduler/cli-commands.md +1 -0
- package/dist/agentic/guides/modules/scheduler/exact-override-targets.md +3 -1
- package/dist/agentic/guides/modules/scheduler/index.md +2 -2
- package/dist/agentic/guides/modules/scheduler/workers.md +2 -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/security/owned-contract-module-metadata.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/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 +2 -2
- package/dist/agentic/guides/reference-modules/example/index.md +1 -1
- package/dist/agentic/guides/upstream/manifest.json +1 -1
- package/dist/agentic/shared/AGENTS.md.template +3 -3
- package/dist/agentic/shared/ai/harness/README.md +2 -2
- package/dist/agentic/shared/ai/harness/RELEASE.md +8 -6
- package/dist/agentic/shared/ai/harness/cases.json +83 -0
- package/dist/agentic/shared/ai/harness/cases.schema.json +4 -4
- package/dist/agentic/shared/ai/harness/validators.json +1 -1
- package/dist/agentic/shared/scripts/run-agent-harness-release.mjs +37 -11
- package/package.json +5 -4
- package/template/.env.example +64 -0
- package/template/.yarnrc.yml.template +9 -5
- package/template/AGENTS.md +3 -3
- package/template/Dockerfile +15 -4
- package/template/docker-compose.fullapp.dev.yml +56 -0
- package/template/docker-compose.fullapp.yml +78 -0
- package/template/next.config.ts +3 -0
- package/template/package.json.template +3 -0
- package/template/src/i18n/de.json +4 -0
- package/template/src/i18n/en.json +4 -0
- package/template/src/i18n/es.json +4 -0
- package/template/src/i18n/ko.json +4 -0
- package/template/src/i18n/pl.json +4 -0
- package/template/src/modules/example/__integration__/TC-EXAMPLE-017-bound-extension-ui.spec.ts +31 -19
- package/template/src/modules/example/components/TodosTable.tsx +2 -0
- package/template/src/modules.ts +12 -0
package/template/.env.example
CHANGED
|
@@ -46,6 +46,33 @@ NEXTAUTH_SECRET=
|
|
|
46
46
|
|
|
47
47
|
# Public URL used in emails and onboarding flows
|
|
48
48
|
APP_URL=http://localhost:3000
|
|
49
|
+
|
|
50
|
+
# Documents realtime collaboration (optional — run `yarn documents:collab`)
|
|
51
|
+
# All collab vars are optional: leave NEXT_PUBLIC_DOCUMENTS_COLLAB_URL unset to
|
|
52
|
+
# disable realtime collaboration; the document editor keeps working in
|
|
53
|
+
# single-user mode. The URL is embedded at app build time; use a
|
|
54
|
+
# browser-reachable wss:// URL in production. App and sidecar must share the
|
|
55
|
+
# v2 secret. When DOCUMENTS_COLLAB_ALLOWED_ORIGINS is unset, the sidecar trusts
|
|
56
|
+
# APP_URL / NEXT_PUBLIC_APP_URL.
|
|
57
|
+
DOCUMENTS_COLLAB_PORT=4101
|
|
58
|
+
DOCUMENTS_COLLAB_REDIS_URL=redis://localhost:6379
|
|
59
|
+
# Required with collaboration Redis in production. Every sidecar replica in one
|
|
60
|
+
# deployment must share this value, and deployments sharing Redis must use
|
|
61
|
+
# different values. Allowed: letters, numbers, dot, underscore, colon, dash.
|
|
62
|
+
DOCUMENTS_COLLAB_REDIS_PREFIX=open-mercato:documents:collab:local
|
|
63
|
+
# Local development example: ws://localhost:4101. Production runtime ignores a
|
|
64
|
+
# loopback value and falls back to single-user editing without failing the build.
|
|
65
|
+
NEXT_PUBLIC_DOCUMENTS_COLLAB_URL=
|
|
66
|
+
# Optional exact comma-separated browser origins; defaults to APP_URL.
|
|
67
|
+
DOCUMENTS_COLLAB_ALLOWED_ORIGINS=
|
|
68
|
+
# Required only when collaboration is enabled; generate a unique high-entropy
|
|
69
|
+
# value containing at least 32 UTF-8 bytes. The sidecar fails closed when the
|
|
70
|
+
# secret is missing or too short.
|
|
71
|
+
DOCUMENTS_COLLAB_JWT_SECRET_V2=
|
|
72
|
+
# Optional v1 rollout secret; when set it must differ from the v2 secret.
|
|
73
|
+
# DOCUMENTS_COLLAB_JWT_SECRET=
|
|
74
|
+
# Standalone sidecars set this to the app root (for example /app in Docker).
|
|
75
|
+
DOCUMENTS_COLLAB_APP_ROOT=.
|
|
49
76
|
# Additional trusted origins for app requests that must pass host validation.
|
|
50
77
|
# APP_URL is required in production for security-sensitive email links.
|
|
51
78
|
# In dev mode these values also govern the HMR WebSocket (/_next/webpack-hmr):
|
|
@@ -112,6 +139,10 @@ OM_SECURITY_WEBAUTHN_RP_NAME=Open Mercato
|
|
|
112
139
|
# Defaults to the hostname from APP_URL / NEXT_PUBLIC_APP_URL when left blank.
|
|
113
140
|
OM_SECURITY_WEBAUTHN_RP_ID=
|
|
114
141
|
OM_SECURITY_RECOVERY_CODE_COUNT=10
|
|
142
|
+
# ⚠️ EMERGENCY BREAK-GLASS ONLY — when true, MFA enforcement is DISABLED platform-wide:
|
|
143
|
+
# all MFA challenges and enrollment redirects are skipped and sudo step-up always falls back
|
|
144
|
+
# to password. Keep false in normal operation; when enabled the app emits a warn-level
|
|
145
|
+
# structured log at startup and on every bypassed challenge so the event is auditable.
|
|
115
146
|
OM_SECURITY_MFA_EMERGENCY_BYPASS=false
|
|
116
147
|
|
|
117
148
|
# Outgoing email sender priority:
|
|
@@ -249,6 +280,11 @@ OM_QUERY_INDEX_AUTO_REINDEX_DEBOUNCE_MS=30000
|
|
|
249
280
|
# Skip immediate coverage recalculation on read (default: false)
|
|
250
281
|
OPTIMIZE_INDEX_COVERAGE_STATS=false
|
|
251
282
|
|
|
283
|
+
# Maximum reported list total (default: 10000). Counting stops after this many
|
|
284
|
+
# matching rows; capped totals render as "10 000+" and responses carry
|
|
285
|
+
# totalIsCapped: true. 0 disables capping and restores exact counts everywhere.
|
|
286
|
+
OM_LIST_COUNT_CAP=10000
|
|
287
|
+
|
|
252
288
|
# Continue serving results from entity indexes when coverage gaps are detected (default: true)
|
|
253
289
|
FORCE_QUERY_INDEX_ON_PARTIAL_INDEXES=true
|
|
254
290
|
|
|
@@ -258,6 +294,11 @@ OM_SEARCH_MIN_LEN=3
|
|
|
258
294
|
OM_SEARCH_ENABLE_PARTIAL=true
|
|
259
295
|
OM_SEARCH_HASH_ALGO=sha256
|
|
260
296
|
OM_SEARCH_STORE_RAW_TOKENS=false
|
|
297
|
+
# Run like/ilike on PLAINTEXT base columns as exact SQL ILIKE instead of the approximate
|
|
298
|
+
# search-token match (encrypted columns always keep the token path). Off by default: token
|
|
299
|
+
# matching avoids the full scan an unanchored ILIKE may need, but it is approximate --
|
|
300
|
+
# fragments shorter than OM_SEARCH_MIN_LEN vanish, so short document numbers over-match.
|
|
301
|
+
OM_SEARCH_USE_ILIKE_FOR_NON_ENCRYPTED_FIELDS=false
|
|
261
302
|
# Bound token fan-out per indexed record (0 disables an individual limit)
|
|
262
303
|
OM_SEARCH_MAX_FIELD_CHARS=20000
|
|
263
304
|
OM_SEARCH_MAX_TOKENS_PER_FIELD=5000
|
|
@@ -269,6 +310,14 @@ OM_SEARCH_MAX_TOKENS_PER_RECORD=20000
|
|
|
269
310
|
# OM_SEARCH_FIELD_BLOCKLIST=body,customers:customer_interaction@notes
|
|
270
311
|
# TTL for the process-level "does this entity have search tokens?" probe cache (ms, 0 disables).
|
|
271
312
|
OM_SEARCH_TOKEN_PRESENCE_CACHE_MS=30000
|
|
313
|
+
# Offer base `customers:customer_entity` rows as search results alongside the person/company
|
|
314
|
+
# profiles. Off by default: a customer is found through their profile, which is what carries the
|
|
315
|
+
# detail-page link, so the base row only adds a second, navigation-less copy of the same customer
|
|
316
|
+
# to global search. Turn it on to restore the previous behavior -- both rows are returned and the
|
|
317
|
+
# presenter enricher merges the pair back into one canonical result. Read-side only: the rows stay
|
|
318
|
+
# in search_tokens either way, because the People/Companies list search and the query engines'
|
|
319
|
+
# encrypted like/ilike rewrite resolve ids through them.
|
|
320
|
+
OM_SEARCH_CUSTOMERS_INDEX_BASE_ENTITY=false
|
|
272
321
|
|
|
273
322
|
# Search module debug logging (Meilisearch, vector search, reindex operations)
|
|
274
323
|
OM_SEARCH_DEBUG=false
|
|
@@ -750,6 +799,21 @@ ACME_EMAIL=
|
|
|
750
799
|
# OM_CHANNEL_IMAP_ALLOW_INTERNAL_HOSTS=false
|
|
751
800
|
# OM_CHANNEL_IMAP_HARD_CAP_PER_POLL=200
|
|
752
801
|
# OM_CHANNEL_IMAP_SOCKET_TIMEOUT_MS=60000
|
|
802
|
+
# Discord bot channel. Normally connected interactively in /backend/integrations;
|
|
803
|
+
# set the three credential vars only for deployment-managed bootstrap. They are
|
|
804
|
+
# applied on tenant creation and can be re-applied with
|
|
805
|
+
# `yarn mercato channel_discord configure-from-env --tenant <id> --org <id>`.
|
|
806
|
+
# OM_CHANNEL_DISCORD_BOT_TOKEN=
|
|
807
|
+
# OM_CHANNEL_DISCORD_APPLICATION_ID=
|
|
808
|
+
# OM_CHANNEL_DISCORD_PUBLIC_KEY=
|
|
809
|
+
# OM_CHANNEL_DISCORD_GUILD_ID=
|
|
810
|
+
# OM_CHANNEL_DISCORD_DEFAULT_CHANNEL_ID=
|
|
811
|
+
# Overwrite credentials that already exist for the tenant (default: keep them).
|
|
812
|
+
# OM_CHANNEL_DISCORD_FORCE_PRECONFIGURE=false
|
|
813
|
+
# Skip opening gateway WebSockets (CI / send-only deployments).
|
|
814
|
+
# OM_CHANNEL_DISCORD_GATEWAY_DISABLED=false
|
|
815
|
+
# Discord REST request timeout in milliseconds.
|
|
816
|
+
# OM_CHANNEL_DISCORD_REQUEST_TIMEOUT_MS=15000
|
|
753
817
|
|
|
754
818
|
# --- Logging (structured logging facade, @open-mercato/shared/lib/logger) ---
|
|
755
819
|
# Docs: https://docs.openmercato.com/framework/runtime/logging
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
nodeLinker: node-modules
|
|
2
2
|
|
|
3
3
|
# Yarn refuses versions younger than `npmMinimalAgeGate` (default 1 day) with
|
|
4
|
-
# "All versions satisfying ... are quarantined".
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
4
|
+
# "All versions satisfying ... are quarantined". Raised to 5 days to close the
|
|
5
|
+
# supply-chain window where a compromised maintainer account pushes a malicious
|
|
6
|
+
# patch before any advisory exists. For urgent patches use --no-time-gate.
|
|
7
|
+
# This app pins the exact @open-mercato release it was scaffolded from, which
|
|
8
|
+
# is usually minutes old, so the first-party scope opts out while every
|
|
9
|
+
# third-party package keeps the cooldown. A per-scope `npmRegistryServer` entry
|
|
10
|
+
# shadows a top-level `npmMinimalAgeGate: 0`, so the opt-out has to be
|
|
11
|
+
# expressed as a preapproval.
|
|
12
|
+
npmMinimalAgeGate: 5d
|
|
9
13
|
npmPreapprovedPackages:
|
|
10
14
|
- "@open-mercato/*"
|
|
11
15
|
{{REGISTRY_CONFIG}}
|
package/template/AGENTS.md
CHANGED
|
@@ -12,7 +12,7 @@ Route first; never probe unmatched context.
|
|
|
12
12
|
- Put entities in `src/modules/<id>/data/entities.ts`; API routes need per-method `metadata` + `openApi`.
|
|
13
13
|
- Editable records expose `updated_at`/`updatedAt`; custom update/delete clients send the version and surface 409s.
|
|
14
14
|
- Run `yarn db:generate`, review scoped SQL/snapshot, and ask before applying it.
|
|
15
|
-
- Run `yarn generate` after discovery files
|
|
15
|
+
- Run `yarn generate` after discovery files/`src/modules.ts`/routes/pages/events/widgets/agents/tools/workflows change.
|
|
16
16
|
- Contract-surface changes (route/schema/ID/export/seam/signature/event payload/CLI) MUST read `.ai/guides/upstream/BACKWARD_COMPATIBILITY.md`; tenant/org scope alone is not a contract.
|
|
17
17
|
- Localize strings; use shared UI/tokens and cover loading/empty/error/conflict/keyboard/a11y.
|
|
18
18
|
|
|
@@ -23,8 +23,8 @@ Route first; never probe unmatched context.
|
|
|
23
23
|
## Never
|
|
24
24
|
|
|
25
25
|
- Never leak tenants, trust payload scope, or treat missing scope as unrestricted.
|
|
26
|
-
- Never edit `node_modules
|
|
27
|
-
- Never use cross-module ORM relations; use IDs/snapshots
|
|
26
|
+
- Never edit `node_modules`/`.mercato/generated/**`/generated facts/shipped migrations.
|
|
27
|
+
- Never use cross-module ORM relations; use IDs/snapshots/events/enrichers/extensions/optional DI.
|
|
28
28
|
- Never use raw admin `fetch`/`<form>`, ad hoc crypto/cache/queues, role-name guards, or direct mutations when helpers exist.
|
|
29
29
|
- Never hard-code user strings/status colors; expose secrets/transcripts; or guess answerable contracts.
|
|
30
30
|
|
package/template/Dockerfile
CHANGED
|
@@ -3,6 +3,8 @@ FROM node:24-alpine AS builder
|
|
|
3
3
|
ENV NEXT_TELEMETRY_DISABLED=1 \
|
|
4
4
|
PATH=/app/node_modules/.bin:$PATH
|
|
5
5
|
ARG OPEN_MERCATO_DOCKER_REGISTRY_HOST=host.docker.internal
|
|
6
|
+
ARG NEXT_PUBLIC_DOCUMENTS_COLLAB_URL
|
|
7
|
+
ENV NEXT_PUBLIC_DOCUMENTS_COLLAB_URL=${NEXT_PUBLIC_DOCUMENTS_COLLAB_URL}
|
|
6
8
|
|
|
7
9
|
WORKDIR /app
|
|
8
10
|
|
|
@@ -58,22 +60,31 @@ COPY docker/scripts/init-or-migrate.sh /app/docker/scripts/init-or-migrate.sh
|
|
|
58
60
|
RUN chmod +x /app/docker/scripts/dev-entrypoint.sh
|
|
59
61
|
RUN chmod +x /app/docker/scripts/init-or-migrate.sh
|
|
60
62
|
|
|
61
|
-
EXPOSE 3000
|
|
63
|
+
EXPOSE 3000 4101
|
|
62
64
|
CMD ["/bin/sh", "/app/docker/scripts/dev-entrypoint.sh"]
|
|
63
65
|
|
|
64
66
|
FROM node:24-alpine AS runner
|
|
65
67
|
|
|
66
68
|
ARG CONTAINER_PORT=3000
|
|
69
|
+
ARG DOCUMENTS_COLLAB_PORT=4101
|
|
67
70
|
ARG OPEN_MERCATO_DOCKER_REGISTRY_HOST=host.docker.internal
|
|
71
|
+
# Chromium backs the Documents PDF export (puppeteer-core). Build with
|
|
72
|
+
# --build-arg INSTALL_CHROMIUM=1 to include it; PDF export otherwise returns 503.
|
|
73
|
+
ARG INSTALL_CHROMIUM=0
|
|
68
74
|
|
|
69
75
|
ENV NODE_ENV=production \
|
|
70
76
|
NEXT_TELEMETRY_DISABLED=1 \
|
|
71
77
|
PATH=/app/node_modules/.bin:$PATH \
|
|
72
|
-
PORT=${CONTAINER_PORT}
|
|
78
|
+
PORT=${CONTAINER_PORT} \
|
|
79
|
+
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
|
73
80
|
|
|
74
81
|
WORKDIR /app
|
|
75
82
|
|
|
76
|
-
RUN
|
|
83
|
+
RUN if [ "$INSTALL_CHROMIUM" = "1" ]; then \
|
|
84
|
+
apk add --no-cache ca-certificates chromium openssl; \
|
|
85
|
+
else \
|
|
86
|
+
apk add --no-cache ca-certificates openssl; \
|
|
87
|
+
fi
|
|
77
88
|
RUN corepack enable
|
|
78
89
|
|
|
79
90
|
COPY package.json yarn.lock .yarnrc.yml ./
|
|
@@ -107,5 +118,5 @@ RUN adduser -D -u 1001 omuser \
|
|
|
107
118
|
|
|
108
119
|
USER omuser
|
|
109
120
|
|
|
110
|
-
EXPOSE ${CONTAINER_PORT}
|
|
121
|
+
EXPOSE ${CONTAINER_PORT} ${DOCUMENTS_COLLAB_PORT}
|
|
111
122
|
CMD ["yarn", "start"]
|
|
@@ -40,6 +40,8 @@ services:
|
|
|
40
40
|
APP_URL: ${APP_URL:-http://localhost:3000}
|
|
41
41
|
# Additional trusted app/dev origins for the Open Mercato origin allowlist (resolveAllowedDevOrigins)
|
|
42
42
|
APP_ALLOWED_ORIGINS: ${APP_ALLOWED_ORIGINS:-}
|
|
43
|
+
NEXT_PUBLIC_DOCUMENTS_COLLAB_URL: ${NEXT_PUBLIC_DOCUMENTS_COLLAB_URL:-}
|
|
44
|
+
DOCUMENTS_COLLAB_JWT_SECRET_V2: ${DOCUMENTS_COLLAB_JWT_SECRET_V2:-dev-only-documents-collab-v2-secret}
|
|
43
45
|
CACHE_REDIS_URL: redis://redis:6379
|
|
44
46
|
CACHE_STRATEGY: ${CACHE_STRATEGY:-redis}
|
|
45
47
|
ENABLE_CRUD_API_CACHE: ${ENABLE_CRUD_API_CACHE:-true}
|
|
@@ -76,6 +78,60 @@ services:
|
|
|
76
78
|
networks:
|
|
77
79
|
- mercato-network-fullapp
|
|
78
80
|
|
|
81
|
+
documents-collab:
|
|
82
|
+
profiles:
|
|
83
|
+
- documents-collab
|
|
84
|
+
build:
|
|
85
|
+
context: .
|
|
86
|
+
target: dev
|
|
87
|
+
args:
|
|
88
|
+
- OPEN_MERCATO_DOCKER_REGISTRY_HOST=host.docker.internal
|
|
89
|
+
extra_hosts:
|
|
90
|
+
- "host.docker.internal:host-gateway"
|
|
91
|
+
command: ["yarn", "documents:collab"]
|
|
92
|
+
working_dir: /app
|
|
93
|
+
# Restart so a first boot that races the shared app build comes back up
|
|
94
|
+
# once its dependencies are present, instead of exiting and staying dead.
|
|
95
|
+
restart: unless-stopped
|
|
96
|
+
volumes:
|
|
97
|
+
- .:/app
|
|
98
|
+
- app_node_modules:/app/node_modules
|
|
99
|
+
ports:
|
|
100
|
+
- "${DOCUMENTS_COLLAB_PORT:-4101}:${DOCUMENTS_COLLAB_PORT:-4101}"
|
|
101
|
+
environment:
|
|
102
|
+
NODE_ENV: development
|
|
103
|
+
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-open-mercato}
|
|
104
|
+
JWT_SECRET: ${JWT_SECRET:-JWT}
|
|
105
|
+
APP_URL: ${APP_URL:-http://localhost:3000}
|
|
106
|
+
NEXT_PUBLIC_APP_URL: ${APP_URL:-http://localhost:3000}
|
|
107
|
+
DOCUMENTS_COLLAB_PORT: ${DOCUMENTS_COLLAB_PORT:-4101}
|
|
108
|
+
DOCUMENTS_COLLAB_REDIS_URL: redis://redis:6379
|
|
109
|
+
DOCUMENTS_COLLAB_REDIS_PREFIX: ${DOCUMENTS_COLLAB_REDIS_PREFIX:-open-mercato:documents:collab:${DEPLOY_ENV:-local}}
|
|
110
|
+
# Same Redis as the app so multi-instance collaboration sync works out of the box
|
|
111
|
+
# (DOCUMENTS_COLLAB_REDIS_URL wins when both are set).
|
|
112
|
+
REDIS_URL: redis://redis:6379
|
|
113
|
+
DOCUMENTS_COLLAB_ALLOWED_ORIGINS: ${DOCUMENTS_COLLAB_ALLOWED_ORIGINS:-http://localhost:3000}
|
|
114
|
+
DOCUMENTS_COLLAB_JWT_SECRET_V2: ${DOCUMENTS_COLLAB_JWT_SECRET_V2:-dev-only-documents-collab-v2-secret}
|
|
115
|
+
DOCUMENTS_COLLAB_JWT_SECRET: ${DOCUMENTS_COLLAB_JWT_SECRET:-}
|
|
116
|
+
DOCUMENTS_COLLAB_APP_ROOT: /app
|
|
117
|
+
# Mirror the app service's tenant-encryption configuration so the sidecar
|
|
118
|
+
# can decrypt the same data as the app.
|
|
119
|
+
TENANT_DATA_ENCRYPTION: ${TENANT_DATA_ENCRYPTION:-true}
|
|
120
|
+
TENANT_DATA_ENCRYPTION_DEBUG: ${TENANT_DATA_ENCRYPTION_DEBUG:-false}
|
|
121
|
+
TENANT_DATA_ENCRYPTION_FALLBACK_KEY: ${TENANT_DATA_ENCRYPTION_FALLBACK_KEY:-dev-tenant-encryption-fallback-key-32chars}
|
|
122
|
+
TENANT_DATA_ENCRYPTION_KEY: ${TENANT_DATA_ENCRYPTION_KEY:-}
|
|
123
|
+
CACHE_REDIS_URL: redis://redis:6379
|
|
124
|
+
CACHE_STRATEGY: ${CACHE_STRATEGY:-redis}
|
|
125
|
+
depends_on:
|
|
126
|
+
app:
|
|
127
|
+
condition: service_started
|
|
128
|
+
postgres:
|
|
129
|
+
condition: service_healthy
|
|
130
|
+
redis:
|
|
131
|
+
condition: service_healthy
|
|
132
|
+
networks:
|
|
133
|
+
- mercato-network-fullapp
|
|
134
|
+
|
|
79
135
|
postgres:
|
|
80
136
|
image: pgvector/pgvector:pg17-trixie
|
|
81
137
|
restart: unless-stopped
|
|
@@ -5,6 +5,12 @@ services:
|
|
|
5
5
|
context: .
|
|
6
6
|
args:
|
|
7
7
|
- CONTAINER_PORT=${CONTAINER_PORT:-3000}
|
|
8
|
+
- INSTALL_CHROMIUM=${INSTALL_CHROMIUM:-0}
|
|
9
|
+
# Optional: browser-reachable ws(s):// endpoint baked in at build time.
|
|
10
|
+
# Leave unset to disable realtime document collaboration (the editor
|
|
11
|
+
# falls back to single-user editing). Invalid production values are
|
|
12
|
+
# ignored at runtime instead of failing the image build.
|
|
13
|
+
- NEXT_PUBLIC_DOCUMENTS_COLLAB_URL=${NEXT_PUBLIC_DOCUMENTS_COLLAB_URL:-}
|
|
8
14
|
- OPEN_MERCATO_DOCKER_REGISTRY_HOST=host.docker.internal
|
|
9
15
|
extra_hosts:
|
|
10
16
|
- "host.docker.internal:host-gateway"
|
|
@@ -53,7 +59,13 @@ services:
|
|
|
53
59
|
JWT_LEGACY_CUTOVER_AT: "${JWT_LEGACY_CUTOVER_AT:-}"
|
|
54
60
|
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-}
|
|
55
61
|
CONSENT_INTEGRITY_SECRET: ${CONSENT_INTEGRITY_SECRET:-}
|
|
62
|
+
# Set APP_URL to the public application origin in production deployments.
|
|
56
63
|
APP_URL: ${APP_URL:-http://localhost:3000}
|
|
64
|
+
# Optional: unset disables realtime document collaboration (single-user editing keeps working).
|
|
65
|
+
NEXT_PUBLIC_DOCUMENTS_COLLAB_URL: ${NEXT_PUBLIC_DOCUMENTS_COLLAB_URL:-}
|
|
66
|
+
# Required only when collaboration is enabled: a unique high-entropy shared secret
|
|
67
|
+
# (>= 32 UTF-8 bytes). The sidecar fails closed at runtime when it is missing or too short.
|
|
68
|
+
DOCUMENTS_COLLAB_JWT_SECRET_V2: ${DOCUMENTS_COLLAB_JWT_SECRET_V2:-}
|
|
57
69
|
# Additional trusted app/dev origins for the Open Mercato origin allowlist (resolveAllowedDevOrigins)
|
|
58
70
|
APP_ALLOWED_ORIGINS: ${APP_ALLOWED_ORIGINS:-}
|
|
59
71
|
REDIS_URL: ${REDIS_URL:-}
|
|
@@ -100,6 +112,72 @@ services:
|
|
|
100
112
|
networks:
|
|
101
113
|
- mercato-network-fullapp
|
|
102
114
|
|
|
115
|
+
documents-collab:
|
|
116
|
+
profiles:
|
|
117
|
+
- documents-collab
|
|
118
|
+
build:
|
|
119
|
+
context: .
|
|
120
|
+
args:
|
|
121
|
+
- CONTAINER_PORT=${CONTAINER_PORT:-3000}
|
|
122
|
+
- DOCUMENTS_COLLAB_PORT=${DOCUMENTS_COLLAB_PORT:-4101}
|
|
123
|
+
- INSTALL_CHROMIUM=${INSTALL_CHROMIUM:-0}
|
|
124
|
+
- NEXT_PUBLIC_DOCUMENTS_COLLAB_URL=${NEXT_PUBLIC_DOCUMENTS_COLLAB_URL:-}
|
|
125
|
+
- OPEN_MERCATO_DOCKER_REGISTRY_HOST=host.docker.internal
|
|
126
|
+
extra_hosts:
|
|
127
|
+
- "host.docker.internal:host-gateway"
|
|
128
|
+
command: ["yarn", "documents:collab"]
|
|
129
|
+
working_dir: /app
|
|
130
|
+
restart: unless-stopped
|
|
131
|
+
ports:
|
|
132
|
+
- "${DOCUMENTS_COLLAB_PORT:-4101}:${DOCUMENTS_COLLAB_PORT:-4101}"
|
|
133
|
+
# Liveness only: any HTTP reply (including 503 when collaboration is not
|
|
134
|
+
# configured) means the process is serving; a connection error means it is
|
|
135
|
+
# down. Readiness would false-negative on the optional collab feature.
|
|
136
|
+
healthcheck:
|
|
137
|
+
test: ["CMD-SHELL", "node -e \"require('http').get('http://127.0.0.1:'+(process.env.DOCUMENTS_COLLAB_PORT||4101)+'/healthz',r=>process.exit(0)).on('error',()=>process.exit(1))\""]
|
|
138
|
+
interval: 30s
|
|
139
|
+
timeout: 5s
|
|
140
|
+
retries: 3
|
|
141
|
+
environment:
|
|
142
|
+
NODE_ENV: production
|
|
143
|
+
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-open-mercato}
|
|
144
|
+
# Same required secret and bounded legacy-token window as the app service:
|
|
145
|
+
# the sidecar boots the app container and must never fall back to a
|
|
146
|
+
# published signing secret either.
|
|
147
|
+
JWT_SECRET: "${JWT_SECRET:?set JWT_SECRET in the .env file next to this compose file - generate one with: openssl rand -hex 32}"
|
|
148
|
+
JWT_LEGACY_GRACE_MINUTES: "${JWT_LEGACY_GRACE_MINUTES:-480}"
|
|
149
|
+
JWT_LEGACY_CUTOVER_AT: "${JWT_LEGACY_CUTOVER_AT:-}"
|
|
150
|
+
APP_URL: ${APP_URL:-http://localhost:3000}
|
|
151
|
+
NEXT_PUBLIC_APP_URL: ${APP_URL:-http://localhost:3000}
|
|
152
|
+
DOCUMENTS_COLLAB_PORT: ${DOCUMENTS_COLLAB_PORT:-4101}
|
|
153
|
+
DOCUMENTS_COLLAB_REDIS_URL: redis://redis:6379
|
|
154
|
+
DOCUMENTS_COLLAB_REDIS_PREFIX: ${DOCUMENTS_COLLAB_REDIS_PREFIX:-open-mercato:documents:collab:${DEPLOY_ENV:-local}}
|
|
155
|
+
# Same Redis as the app so multi-instance collaboration sync works out of the box
|
|
156
|
+
# (DOCUMENTS_COLLAB_REDIS_URL wins when both are set).
|
|
157
|
+
REDIS_URL: redis://redis:6379
|
|
158
|
+
DOCUMENTS_COLLAB_ALLOWED_ORIGINS: ${DOCUMENTS_COLLAB_ALLOWED_ORIGINS:-${APP_URL}}
|
|
159
|
+
# Required only when collaboration is enabled; the sidecar fails closed when missing/too short.
|
|
160
|
+
DOCUMENTS_COLLAB_JWT_SECRET_V2: ${DOCUMENTS_COLLAB_JWT_SECRET_V2:-}
|
|
161
|
+
DOCUMENTS_COLLAB_JWT_SECRET: ${DOCUMENTS_COLLAB_JWT_SECRET:-}
|
|
162
|
+
DOCUMENTS_COLLAB_APP_ROOT: /app
|
|
163
|
+
# Mirror the app service's tenant-encryption configuration so the sidecar
|
|
164
|
+
# can decrypt the same data as the app.
|
|
165
|
+
TENANT_DATA_ENCRYPTION: ${TENANT_DATA_ENCRYPTION:-true}
|
|
166
|
+
TENANT_DATA_ENCRYPTION_DEBUG: ${TENANT_DATA_ENCRYPTION_DEBUG:-false}
|
|
167
|
+
TENANT_DATA_ENCRYPTION_FALLBACK_KEY: ${TENANT_DATA_ENCRYPTION_FALLBACK_KEY:-dev-tenant-encryption-fallback-key-32chars}
|
|
168
|
+
TENANT_DATA_ENCRYPTION_KEY: ${TENANT_DATA_ENCRYPTION_KEY:-}
|
|
169
|
+
CACHE_REDIS_URL: redis://redis:6379
|
|
170
|
+
CACHE_STRATEGY: ${CACHE_STRATEGY:-redis}
|
|
171
|
+
depends_on:
|
|
172
|
+
app:
|
|
173
|
+
condition: service_started
|
|
174
|
+
postgres:
|
|
175
|
+
condition: service_healthy
|
|
176
|
+
redis:
|
|
177
|
+
condition: service_healthy
|
|
178
|
+
networks:
|
|
179
|
+
- mercato-network-fullapp
|
|
180
|
+
|
|
103
181
|
postgres:
|
|
104
182
|
image: pgvector/pgvector:pg17-trixie
|
|
105
183
|
restart: unless-stopped
|
package/template/next.config.ts
CHANGED
|
@@ -59,6 +59,9 @@ const nextConfig: NextConfig & { agentRules?: boolean } = {
|
|
|
59
59
|
'esbuild',
|
|
60
60
|
'@esbuild/darwin-arm64',
|
|
61
61
|
'@open-mercato/cli',
|
|
62
|
+
'puppeteer-core',
|
|
63
|
+
'jszip',
|
|
64
|
+
'yjs',
|
|
62
65
|
// Telemetry: the OTEL SDK + instrumentations must run as real Node modules,
|
|
63
66
|
// not be bundled — the auto-instrumentations (pg/undici) monkey-patch the
|
|
64
67
|
// underlying drivers at runtime. The full list is owned by
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"dev:reset": "node ./scripts/dev-reset.mjs",
|
|
17
17
|
"build": "yarn generate && cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 next build",
|
|
18
18
|
"start": "mercato server start",
|
|
19
|
+
"documents:collab": "node ./node_modules/@open-mercato/documents/dist/server/documents-collab-server.js",
|
|
19
20
|
"lint": "eslint .",
|
|
20
21
|
"ds:check": "node scripts/ds-check.mjs",
|
|
21
22
|
"i18n:check-hardcoded": "node scripts/i18n-check-hardcoded.mjs",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
53
54
|
"@open-mercato/ai-assistant": "{{PACKAGE_VERSION}}",
|
|
54
55
|
"@open-mercato/cache": "{{PACKAGE_VERSION}}",
|
|
56
|
+
"@open-mercato/channel-discord": "{{PACKAGE_VERSION}}",
|
|
55
57
|
"@open-mercato/channel-gmail": "{{PACKAGE_VERSION}}",
|
|
56
58
|
"@open-mercato/channel-imap": "{{PACKAGE_VERSION}}",
|
|
57
59
|
"@open-mercato/channel-apns": "{{PACKAGE_VERSION}}",
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
"@open-mercato/cli": "{{PACKAGE_VERSION}}",
|
|
62
64
|
"@open-mercato/content": "{{PACKAGE_VERSION}}",
|
|
63
65
|
"@open-mercato/core": "{{PACKAGE_VERSION}}",
|
|
66
|
+
"@open-mercato/documents": "{{PACKAGE_VERSION}}",
|
|
64
67
|
"@open-mercato/events": "{{PACKAGE_VERSION}}",
|
|
65
68
|
"@open-mercato/onboarding": "{{PACKAGE_VERSION}}",
|
|
66
69
|
"@open-mercato/queue": "{{PACKAGE_VERSION}}",
|
|
@@ -857,6 +857,9 @@
|
|
|
857
857
|
"ui.dataTable.pagination.previous": "Zurück",
|
|
858
858
|
"ui.dataTable.pagination.previousAriaLabel": "Zur vorherigen Seite",
|
|
859
859
|
"ui.dataTable.pagination.results": "Zeige {start} bis {end} von {total} Ergebnissen",
|
|
860
|
+
"ui.dataTable.pagination.resultsCapped": "Zeige {start} bis {end} von {total}+ Ergebnissen",
|
|
861
|
+
"ui.dataTable.pagination.resultsCappedNoRows": "Keine weiteren Ergebnisse über {total}",
|
|
862
|
+
"ui.dataTable.pagination.resultsCappedWithDuration": "Zeige {start} bis {end} von {total}+ Ergebnissen in {duration}",
|
|
860
863
|
"ui.dataTable.pagination.resultsWithDuration": "Zeige {start} bis {end} von {total} Ergebnissen in {duration}",
|
|
861
864
|
"ui.dataTable.pagination.rowsPerPage": "Rows per page",
|
|
862
865
|
"ui.dataTable.perspectives.allViews": "All views",
|
|
@@ -1022,6 +1025,7 @@
|
|
|
1022
1025
|
"ui.notificationFeed.item.openAriaLabel": "Benachrichtigung öffnen",
|
|
1023
1026
|
"ui.pagination.first.ariaLabel": "Erste Seite",
|
|
1024
1027
|
"ui.pagination.info.pageOf": "Seite {page} von {total}",
|
|
1028
|
+
"ui.pagination.info.pageOfCapped": "Seite {page} von {total}+",
|
|
1025
1029
|
"ui.pagination.itemsPerPage.ariaLabel": "Elemente pro Seite",
|
|
1026
1030
|
"ui.pagination.itemsPerPage.label": "{size} / Seite",
|
|
1027
1031
|
"ui.pagination.landmark.ariaLabel": "Paginierung",
|
|
@@ -857,6 +857,9 @@
|
|
|
857
857
|
"ui.dataTable.pagination.previous": "Previous",
|
|
858
858
|
"ui.dataTable.pagination.previousAriaLabel": "Go to previous page",
|
|
859
859
|
"ui.dataTable.pagination.results": "Showing {start} to {end} of {total} results",
|
|
860
|
+
"ui.dataTable.pagination.resultsCapped": "Showing {start} to {end} of {total}+ results",
|
|
861
|
+
"ui.dataTable.pagination.resultsCappedNoRows": "No further results past {total}",
|
|
862
|
+
"ui.dataTable.pagination.resultsCappedWithDuration": "Showing {start} to {end} of {total}+ results in {duration}",
|
|
860
863
|
"ui.dataTable.pagination.resultsWithDuration": "Showing {start} to {end} of {total} results in {duration}",
|
|
861
864
|
"ui.dataTable.pagination.rowsPerPage": "Rows per page",
|
|
862
865
|
"ui.dataTable.perspectives.allViews": "All views",
|
|
@@ -1022,6 +1025,7 @@
|
|
|
1022
1025
|
"ui.notificationFeed.item.openAriaLabel": "Open notification",
|
|
1023
1026
|
"ui.pagination.first.ariaLabel": "First page",
|
|
1024
1027
|
"ui.pagination.info.pageOf": "Page {page} of {total}",
|
|
1028
|
+
"ui.pagination.info.pageOfCapped": "Page {page} of {total}+",
|
|
1025
1029
|
"ui.pagination.itemsPerPage.ariaLabel": "Items per page",
|
|
1026
1030
|
"ui.pagination.itemsPerPage.label": "{size} / page",
|
|
1027
1031
|
"ui.pagination.landmark.ariaLabel": "Pagination",
|
|
@@ -857,6 +857,9 @@
|
|
|
857
857
|
"ui.dataTable.pagination.previous": "Anterior",
|
|
858
858
|
"ui.dataTable.pagination.previousAriaLabel": "Ir a la página anterior",
|
|
859
859
|
"ui.dataTable.pagination.results": "Mostrando {start} a {end} de {total} resultados",
|
|
860
|
+
"ui.dataTable.pagination.resultsCapped": "Mostrando {start} a {end} de {total}+ resultados",
|
|
861
|
+
"ui.dataTable.pagination.resultsCappedNoRows": "No hay más resultados más allá de {total}",
|
|
862
|
+
"ui.dataTable.pagination.resultsCappedWithDuration": "Mostrando {start} a {end} de {total}+ resultados en {duration}",
|
|
860
863
|
"ui.dataTable.pagination.resultsWithDuration": "Mostrando {start} a {end} de {total} resultados en {duration}",
|
|
861
864
|
"ui.dataTable.pagination.rowsPerPage": "Rows per page",
|
|
862
865
|
"ui.dataTable.perspectives.allViews": "All views",
|
|
@@ -1022,6 +1025,7 @@
|
|
|
1022
1025
|
"ui.notificationFeed.item.openAriaLabel": "Abrir notificación",
|
|
1023
1026
|
"ui.pagination.first.ariaLabel": "Primera página",
|
|
1024
1027
|
"ui.pagination.info.pageOf": "Página {page} de {total}",
|
|
1028
|
+
"ui.pagination.info.pageOfCapped": "Página {page} de {total}+",
|
|
1025
1029
|
"ui.pagination.itemsPerPage.ariaLabel": "Elementos por página",
|
|
1026
1030
|
"ui.pagination.itemsPerPage.label": "{size} / página",
|
|
1027
1031
|
"ui.pagination.landmark.ariaLabel": "Paginación",
|
|
@@ -857,6 +857,9 @@
|
|
|
857
857
|
"ui.dataTable.pagination.previous": "이전",
|
|
858
858
|
"ui.dataTable.pagination.previousAriaLabel": "이전 페이지로 이동",
|
|
859
859
|
"ui.dataTable.pagination.results": "전체 {total}개 중 {start}-{end}개 표시",
|
|
860
|
+
"ui.dataTable.pagination.resultsCapped": "전체 {total}+개 중 {start}-{end}개 표시",
|
|
861
|
+
"ui.dataTable.pagination.resultsCappedNoRows": "{total} 이후 결과 없음",
|
|
862
|
+
"ui.dataTable.pagination.resultsCappedWithDuration": "전체 {total}+개 중 {start}-{end}개 표시 ({duration})",
|
|
860
863
|
"ui.dataTable.pagination.resultsWithDuration": "전체 {total}개 중 {start}-{end}개 표시 ({duration})",
|
|
861
864
|
"ui.dataTable.pagination.rowsPerPage": "페이지당 행 수",
|
|
862
865
|
"ui.dataTable.perspectives.allViews": "모든 보기",
|
|
@@ -1022,6 +1025,7 @@
|
|
|
1022
1025
|
"ui.notificationFeed.item.openAriaLabel": "알림 열기",
|
|
1023
1026
|
"ui.pagination.first.ariaLabel": "첫 페이지",
|
|
1024
1027
|
"ui.pagination.info.pageOf": "{total}페이지 중 {page}페이지",
|
|
1028
|
+
"ui.pagination.info.pageOfCapped": "{total}+페이지 중 {page}페이지",
|
|
1025
1029
|
"ui.pagination.itemsPerPage.ariaLabel": "페이지당 항목 수",
|
|
1026
1030
|
"ui.pagination.itemsPerPage.label": "{size}개 / 페이지",
|
|
1027
1031
|
"ui.pagination.landmark.ariaLabel": "페이지 이동",
|
|
@@ -857,6 +857,9 @@
|
|
|
857
857
|
"ui.dataTable.pagination.previous": "Poprzednia",
|
|
858
858
|
"ui.dataTable.pagination.previousAriaLabel": "Przejdź do poprzedniej strony",
|
|
859
859
|
"ui.dataTable.pagination.results": "Wyświetlanie {start} do {end} z {total} wyników",
|
|
860
|
+
"ui.dataTable.pagination.resultsCapped": "Wyświetlanie {start} do {end} z {total}+ wyników",
|
|
861
|
+
"ui.dataTable.pagination.resultsCappedNoRows": "Brak dalszych wyników powyżej {total}",
|
|
862
|
+
"ui.dataTable.pagination.resultsCappedWithDuration": "Wyświetlanie {start} do {end} z {total}+ wyników w {duration}",
|
|
860
863
|
"ui.dataTable.pagination.resultsWithDuration": "Wyświetlanie {start} do {end} z {total} wyników w {duration}",
|
|
861
864
|
"ui.dataTable.pagination.rowsPerPage": "Wierszy na stronę",
|
|
862
865
|
"ui.dataTable.perspectives.allViews": "Wszystkie widoki",
|
|
@@ -1022,6 +1025,7 @@
|
|
|
1022
1025
|
"ui.notificationFeed.item.openAriaLabel": "Otwórz powiadomienie",
|
|
1023
1026
|
"ui.pagination.first.ariaLabel": "Pierwsza strona",
|
|
1024
1027
|
"ui.pagination.info.pageOf": "Strona {page} z {total}",
|
|
1028
|
+
"ui.pagination.info.pageOfCapped": "Strona {page} z {total}+",
|
|
1025
1029
|
"ui.pagination.itemsPerPage.ariaLabel": "Elementów na stronę",
|
|
1026
1030
|
"ui.pagination.itemsPerPage.label": "{size} / stronę",
|
|
1027
1031
|
"ui.pagination.landmark.ariaLabel": "Paginacja",
|
package/template/src/modules/example/__integration__/TC-EXAMPLE-017-bound-extension-ui.spec.ts
CHANGED
|
@@ -192,6 +192,36 @@ test.describe('TC-EXAMPLE-017: the module\'s bound DataTable and CrudForm hosts,
|
|
|
192
192
|
const logs = collectExampleLifecycleLogs(page)
|
|
193
193
|
let todoId: string | null = null
|
|
194
194
|
|
|
195
|
+
// Interception is installed BEFORE anything this test asserts on, and is never torn
|
|
196
|
+
// down while the page is live. Toggling Playwright's request interception restarts the
|
|
197
|
+
// browser's Fetch domain, and a request issued inside that window is stranded — it is
|
|
198
|
+
// never resumed and no response ever arrives. `CrudForm` fires its post-save
|
|
199
|
+
// `router.push()` microseconds after the create response, so unrouting right after the
|
|
200
|
+
// create (as this test used to) leaves the redirect's RSC fetch hanging and the URL
|
|
201
|
+
// stuck on `/backend/todos/create`. Playwright removes the route at page close, where
|
|
202
|
+
// nothing in flight is asserted on.
|
|
203
|
+
// `holdCreateRequest` keeps the gate armed for exactly one submit — the transform one —
|
|
204
|
+
// so installing the route this early does not change which request is held.
|
|
205
|
+
let holdCreateRequest = false
|
|
206
|
+
let markCreateRequestIntercepted: () => void = () => {}
|
|
207
|
+
let releaseCreateRequest: () => void = () => {}
|
|
208
|
+
const createRequestIntercepted = new Promise<void>((resolve) => {
|
|
209
|
+
markCreateRequestIntercepted = resolve
|
|
210
|
+
})
|
|
211
|
+
const createRequestRelease = new Promise<void>((resolve) => {
|
|
212
|
+
releaseCreateRequest = resolve
|
|
213
|
+
})
|
|
214
|
+
await page.route('**/api/example/todos', async (route) => {
|
|
215
|
+
if (!holdCreateRequest || route.request().method() !== 'POST') {
|
|
216
|
+
await route.continue()
|
|
217
|
+
return
|
|
218
|
+
}
|
|
219
|
+
holdCreateRequest = false
|
|
220
|
+
markCreateRequestIntercepted()
|
|
221
|
+
await createRequestRelease
|
|
222
|
+
await route.continue()
|
|
223
|
+
})
|
|
224
|
+
|
|
195
225
|
try {
|
|
196
226
|
await login(page, 'admin')
|
|
197
227
|
await page.goto('/backend/todos/create', { waitUntil: 'domcontentloaded' })
|
|
@@ -214,24 +244,7 @@ test.describe('TC-EXAMPLE-017: the module\'s bound DataTable and CrudForm hosts,
|
|
|
214
244
|
const rawTitle = `[transform] TC-EXAMPLE-017 ${suffix}`
|
|
215
245
|
const expectedTitle = `TC-EXAMPLE-017 ${suffix} (transformed)`
|
|
216
246
|
await titleInput.fill(rawTitle)
|
|
217
|
-
|
|
218
|
-
let releaseCreateRequest: () => void = () => {}
|
|
219
|
-
const createRequestIntercepted = new Promise<void>((resolve) => {
|
|
220
|
-
markCreateRequestIntercepted = resolve
|
|
221
|
-
})
|
|
222
|
-
const createRequestRelease = new Promise<void>((resolve) => {
|
|
223
|
-
releaseCreateRequest = resolve
|
|
224
|
-
})
|
|
225
|
-
const createRoute = '**/api/example/todos'
|
|
226
|
-
await page.route(createRoute, async (route) => {
|
|
227
|
-
if (route.request().method() !== 'POST') {
|
|
228
|
-
await route.continue()
|
|
229
|
-
return
|
|
230
|
-
}
|
|
231
|
-
markCreateRequestIntercepted()
|
|
232
|
-
await createRequestRelease
|
|
233
|
-
await route.continue()
|
|
234
|
-
})
|
|
247
|
+
holdCreateRequest = true
|
|
235
248
|
const createRequestPromise = page.waitForRequest(
|
|
236
249
|
(candidate) => candidate.url().includes(TODOS_API) && candidate.method() === 'POST',
|
|
237
250
|
)
|
|
@@ -264,7 +277,6 @@ test.describe('TC-EXAMPLE-017: the module\'s bound DataTable and CrudForm hosts,
|
|
|
264
277
|
} finally {
|
|
265
278
|
releaseCreateRequest()
|
|
266
279
|
await submitPromise.catch(() => undefined)
|
|
267
|
-
await page.unroute(createRoute)
|
|
268
280
|
}
|
|
269
281
|
expect(createResponse.ok(), `create failed: ${createResponse.status()}`).toBeTruthy()
|
|
270
282
|
todoId = ((await createResponse.json()) as { id?: string }).id ?? null
|
|
@@ -32,6 +32,7 @@ type TodosResponse = {
|
|
|
32
32
|
page: number
|
|
33
33
|
pageSize: number
|
|
34
34
|
totalPages: number
|
|
35
|
+
totalIsCapped?: boolean
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
type OrganizationsResponse = {
|
|
@@ -338,6 +339,7 @@ export default function TodosTable() {
|
|
|
338
339
|
pageSize: 50,
|
|
339
340
|
total: todosData?.total || 0,
|
|
340
341
|
totalPages: todosData?.totalPages || 0,
|
|
342
|
+
totalIsCapped: todosData?.totalIsCapped === true,
|
|
341
343
|
onPageChange: setPage,
|
|
342
344
|
}}
|
|
343
345
|
isLoading={isLoading}
|
package/template/src/modules.ts
CHANGED
|
@@ -117,6 +117,7 @@ export const enabledModules: ModuleEntry[] = [
|
|
|
117
117
|
{ id: 'inbox_ops', from: '@open-mercato/core' },
|
|
118
118
|
{ id: 'payment_gateways', from: '@open-mercato/core' },
|
|
119
119
|
{ id: 'checkout', from: '@open-mercato/checkout' },
|
|
120
|
+
{ id: 'documents', from: '@open-mercato/documents' },
|
|
120
121
|
{ id: 'gateway_stripe', from: '@open-mercato/gateway-stripe' },
|
|
121
122
|
// Per-user email channels for the Communications Hub (SPEC-045d / email
|
|
122
123
|
// integration spec). Each provider package registers its `ChannelAdapter`
|
|
@@ -129,6 +130,17 @@ export const enabledModules: ModuleEntry[] = [
|
|
|
129
130
|
{ id: 'channel_apns', from: '@open-mercato/channel-apns' },
|
|
130
131
|
{ id: 'channel_expo', from: '@open-mercato/channel-expo' },
|
|
131
132
|
{ id: 'channel_fcm', from: '@open-mercato/channel-fcm' },
|
|
133
|
+
// Discord bot channel (SPEC 2026-06-19). The package ships with the scaffold
|
|
134
|
+
// but stays disabled by default. #4989 removed the hard overflow this used to
|
|
135
|
+
// cause (the generated root now sheds its module-fact index instead), but the
|
|
136
|
+
// headroom is still gone: enabling it puts the generated root at 12,275 of the
|
|
137
|
+
// 12,288-byte target, so the next module enabled after it drops the inline
|
|
138
|
+
// index to pointer form. Enabling is therefore a maintainer call about that
|
|
139
|
+
// budget, not a one-line edit — see
|
|
140
|
+
// packages/create-app/src/lib/agent-instruction-budget.test.ts
|
|
141
|
+
// ('one more template module still fits the root budget with its inline index
|
|
142
|
+
// intact'), and #4983 for the discussion.
|
|
143
|
+
// { id: 'channel_discord', from: '@open-mercato/channel-discord' },
|
|
132
144
|
{ id: 'sync_akeneo', from: '@open-mercato/sync-akeneo' },
|
|
133
145
|
{ id: 'shipping_carriers', from: '@open-mercato/core' },
|
|
134
146
|
{ id: 'eudr', from: '@open-mercato/core' },
|