@open-mercato/core 0.6.6-develop.5651.1.c43359070c → 0.6.6-develop.5654.1.ca21e35f26

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.
@@ -65,12 +65,12 @@ async function expectConflictBody(response) {
65
65
  expect(body.code, "body.code should be the optimistic-lock conflict code").toBe(OPTIMISTIC_LOCK_CONFLICT_CODE);
66
66
  return body;
67
67
  }
68
- async function expectConflictBanner(page) {
68
+ async function expectConflictBanner(page, options) {
69
69
  const conflictSurface = page.getByTestId(CONFLICT_BANNER_TESTID).or(page.getByTestId(CONFLICT_DIALOG_TESTID));
70
70
  await expect(
71
71
  conflictSurface.first(),
72
72
  "a conflict surface (OSS bar or record_locks dialog) should appear after a stale save"
73
- ).toBeVisible({ timeout: 1e4 });
73
+ ).toBeVisible({ timeout: options?.timeout ?? 1e4 });
74
74
  }
75
75
  async function expectNoConflictBanner(page) {
76
76
  await expect(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/integration/optimisticLockUi.ts"],
4
- "sourcesContent": ["import { expect, type APIRequestContext, type Page } from '@playwright/test'\nimport {\n OPTIMISTIC_LOCK_HEADER_NAME,\n OPTIMISTIC_LOCK_CONFLICT_CODE,\n} from '@open-mercato/shared/lib/crud/optimistic-lock-headers'\n\n/**\n * Shared helpers for the browser-driven optimistic-lock specs\n * (`TC-LOCK-OSS-014..046`). They make the conflict deterministic without two\n * real tabs or sleeps: the spec loads an edit page in the browser (the form\n * captures the record's `updated_at`), then advances `updated_at` out-of-band\n * via a header-less API PUT (additive path, always succeeds), and finally edits\n * + saves in the browser so the now-stale header triggers the 409 \u2192 conflict bar.\n *\n * See `packages/core/src/modules/sales/__integration__/__concurrent_edit_pattern.md`\n * and the conflict bar component\n * `packages/ui/src/backend/conflicts/RecordConflictBanner.tsx`\n * (`data-testid=\"record-conflict-banner\"`).\n */\n\nconst BASE_URL = process.env.BASE_URL?.trim() || ''\n\nexport function resolveApiUrl(path: string): string {\n return BASE_URL ? `${BASE_URL}${path}` : path\n}\n\nexport const CONFLICT_BANNER_TESTID = 'record-conflict-banner'\n\n/**\n * The enterprise `record_locks` module (enabled in CI via\n * `OM_ENABLE_ENTERPRISE_MODULES=true`) supersedes the OSS banner with a richer\n * \"Conflict detected\" resolution dialog. Both are valid surfaces for \"the stale\n * write was refused\": on a CrudForm edit page either one can win depending on\n * whether the record_locks incoming-changes SSE (fired by the out-of-band bump)\n * is processed before the browser's stale save reaches the server. Asserting one\n * fixed surface is therefore racy; we wait for whichever conflict surface appears.\n * (List-delete / non-form flows have no record_locks lock and only ever surface\n * the OSS banner, so matching either surface is safe there too.)\n */\nexport const CONFLICT_DIALOG_TESTID = 'record-lock-conflict-dialog'\n\nfunction authHeaders(token: string, lockValue?: string): Record<string, string> {\n const headers: Record<string, string> = {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n }\n if (lockValue !== undefined) headers[OPTIMISTIC_LOCK_HEADER_NAME] = lockValue\n return headers\n}\n\n/**\n * Read a record's current `updated_at` from a list-shaped CRUD GET\n * (`GET <basePath>?id=<id>` \u2192 `items[0].updated_at`), normalized to ISO.\n * Works for the `makeCrudRoute` list responses (snake or camel case).\n */\nexport async function readUpdatedAt(\n request: APIRequestContext,\n token: string,\n basePath: string,\n id: string,\n idParam = 'id',\n): Promise<string> {\n const response = await request.fetch(\n resolveApiUrl(`${basePath}?${idParam}=${encodeURIComponent(id)}`),\n { method: 'GET', headers: authHeaders(token) },\n )\n expect(response.status(), `GET ${basePath}?${idParam}=... should be 200`).toBe(200)\n const body = (await response.json()) as\n | { items?: Array<Record<string, unknown>> }\n | Record<string, unknown>\n const item = Array.isArray((body as { items?: unknown[] }).items)\n ? (body as { items: Array<Record<string, unknown>> }).items[0]\n : (body as Record<string, unknown>)\n expect(item, `response should include the record for id=${id}`).toBeTruthy()\n const raw = (item?.updated_at ?? item?.updatedAt) as string | undefined\n expect(typeof raw, `record should expose updated_at, got ${String(raw)}`).toBe('string')\n const ms = Date.parse(raw as string)\n expect(Number.isFinite(ms), `updated_at should parse, got ${String(raw)}`).toBe(true)\n return new Date(ms).toISOString()\n}\n\n/**\n * Advance a record's `updated_at` out-of-band so the browser's loaded form now\n * holds a stale token. Uses a **header-less** PUT (the strictly-additive path\n * always succeeds and bumps `updated_at`). Returns the new ISO `updated_at`.\n */\nexport async function bumpRecordViaApi(\n request: APIRequestContext,\n token: string,\n basePath: string,\n putBody: Record<string, unknown>,\n opts: { idParam?: string; method?: 'PUT' | 'PATCH' } = {},\n): Promise<string | null> {\n const response = await request.fetch(resolveApiUrl(basePath), {\n method: opts.method ?? 'PUT',\n headers: authHeaders(token),\n data: putBody,\n })\n expect(\n response.status(),\n `out-of-band ${opts.method ?? 'PUT'} ${basePath} should succeed (additive path), got ${response.status()}`,\n ).toBeLessThan(300)\n const id = putBody[opts.idParam ?? 'id']\n if (typeof id === 'string') {\n try {\n return await readUpdatedAt(request, token, basePath, id, opts.idParam)\n } catch {\n return null\n }\n }\n return null\n}\n\n/** Direct API helpers to assert the 409 contract body (used by the negative/UX specs). */\nexport async function putWithLock(\n request: APIRequestContext,\n token: string,\n basePath: string,\n body: Record<string, unknown>,\n lockValue: string,\n) {\n return request.fetch(resolveApiUrl(basePath), {\n method: 'PUT',\n headers: authHeaders(token, lockValue),\n data: body,\n })\n}\n\nexport async function expectConflictBody(response: { status(): number; json(): Promise<unknown> }) {\n expect(response.status(), 'stale write should be 409').toBe(409)\n const body = (await response.json()) as { code?: string; currentUpdatedAt?: string; expectedUpdatedAt?: string }\n expect(body.code, 'body.code should be the optimistic-lock conflict code').toBe(OPTIMISTIC_LOCK_CONFLICT_CODE)\n return body\n}\n\n/**\n * Assert a stale save was refused and surfaced as a conflict. Matches EITHER the\n * OSS `record-conflict-banner` OR the enterprise record_locks \"Conflict detected\"\n * dialog \u2014 see `CONFLICT_DIALOG_TESTID` for why both are valid and why pinning one\n * is racy when enterprise modules are enabled.\n */\nexport async function expectConflictBanner(page: Page): Promise<void> {\n const conflictSurface = page\n .getByTestId(CONFLICT_BANNER_TESTID)\n .or(page.getByTestId(CONFLICT_DIALOG_TESTID))\n await expect(\n conflictSurface.first(),\n 'a conflict surface (OSS bar or record_locks dialog) should appear after a stale save',\n ).toBeVisible({ timeout: 10_000 })\n}\n\n/** Assert no conflict surface is present (a clean single-tab save must not 409). */\nexport async function expectNoConflictBanner(page: Page): Promise<void> {\n await expect(\n page.getByTestId(CONFLICT_BANNER_TESTID),\n 'a clean save must not surface a false-positive conflict bar',\n ).toHaveCount(0)\n await expect(\n page.getByTestId(CONFLICT_DIALOG_TESTID),\n 'a clean save must not surface a false-positive conflict dialog',\n ).toHaveCount(0)\n}\n\n/** Click the conflict bar's Refresh button. */\nexport async function clickConflictRefresh(page: Page): Promise<void> {\n await page.getByTestId(CONFLICT_BANNER_TESTID).getByRole('button', { name: /refresh/i }).click()\n}\n\n/** Dismiss the conflict bar via its close (X) button. */\nexport async function dismissConflictBanner(page: Page): Promise<void> {\n await page.getByTestId(CONFLICT_BANNER_TESTID).getByRole('button', { name: /dismiss/i }).click()\n}\n"],
5
- "mappings": "AAAA,SAAS,cAAiD;AAC1D;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAgBP,MAAM,WAAW,QAAQ,IAAI,UAAU,KAAK,KAAK;AAE1C,SAAS,cAAc,MAAsB;AAClD,SAAO,WAAW,GAAG,QAAQ,GAAG,IAAI,KAAK;AAC3C;AAEO,MAAM,yBAAyB;AAa/B,MAAM,yBAAyB;AAEtC,SAAS,YAAY,OAAe,WAA4C;AAC9E,QAAM,UAAkC;AAAA,IACtC,eAAe,UAAU,KAAK;AAAA,IAC9B,gBAAgB;AAAA,EAClB;AACA,MAAI,cAAc,OAAW,SAAQ,2BAA2B,IAAI;AACpE,SAAO;AACT;AAOA,eAAsB,cACpB,SACA,OACA,UACA,IACA,UAAU,MACO;AACjB,QAAM,WAAW,MAAM,QAAQ;AAAA,IAC7B,cAAc,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ACpB,SACA,OACA,UACA,MACA,WACA;AACA,SAAO,QAAQ,MAAM,cAAc,QAAQ,GAAG;AAAA,IAC5C,QAAQ;AAAA,IACR,SAAS,YAAY,OAAO,SAAS;AAAA,IACrC,MAAM;AAAA,EACR,CAAC;AACH;AAEA,eAAsB,mBAAmB,UAA0D;AACjG,SAAO,SAAS,OAAO,GAAG,2BAA2B,EAAE,KAAK,GAAG;AAC/D,QAAM,OAAQ,MAAM,SAAS,KAAK;AAClC,SAAO,KAAK,MAAM,uDAAuD,EAAE,KAAK,6BAA6B;AAC7G,SAAO;AACT;AAQA,eAAsB,qBAAqB,MAA2B;AACpE,QAAM,kBAAkB,KACrB,YAAY,sBAAsB,EAClC,GAAG,KAAK,YAAY,sBAAsB,CAAC;AAC9C,QAAM;AAAA,IACJ,gBAAgB,MAAM;AAAA,IACtB;AAAA,EACF,EAAE,YAAY,EAAE,SAAS,IAAO,CAAC;AACnC;AAGA,eAAsB,uBAAuB,MAA2B;AACtE,QAAM;AAAA,IACJ,KAAK,YAAY,sBAAsB;AAAA,IACvC;AAAA,EACF,EAAE,YAAY,CAAC;AACf,QAAM;AAAA,IACJ,KAAK,YAAY,sBAAsB;AAAA,IACvC;AAAA,EACF,EAAE,YAAY,CAAC;AACjB;AAGA,eAAsB,qBAAqB,MAA2B;AACpE,QAAM,KAAK,YAAY,sBAAsB,EAAE,UAAU,UAAU,EAAE,MAAM,WAAW,CAAC,EAAE,MAAM;AACjG;AAGA,eAAsB,sBAAsB,MAA2B;AACrE,QAAM,KAAK,YAAY,sBAAsB,EAAE,UAAU,UAAU,EAAE,MAAM,WAAW,CAAC,EAAE,MAAM;AACjG;",
4
+ "sourcesContent": ["import { expect, type APIRequestContext, type Page } from '@playwright/test'\nimport {\n OPTIMISTIC_LOCK_HEADER_NAME,\n OPTIMISTIC_LOCK_CONFLICT_CODE,\n} from '@open-mercato/shared/lib/crud/optimistic-lock-headers'\n\n/**\n * Shared helpers for the browser-driven optimistic-lock specs\n * (`TC-LOCK-OSS-014..046`). They make the conflict deterministic without two\n * real tabs or sleeps: the spec loads an edit page in the browser (the form\n * captures the record's `updated_at`), then advances `updated_at` out-of-band\n * via a header-less API PUT (additive path, always succeeds), and finally edits\n * + saves in the browser so the now-stale header triggers the 409 \u2192 conflict bar.\n *\n * See `packages/core/src/modules/sales/__integration__/__concurrent_edit_pattern.md`\n * and the conflict bar component\n * `packages/ui/src/backend/conflicts/RecordConflictBanner.tsx`\n * (`data-testid=\"record-conflict-banner\"`).\n */\n\nconst BASE_URL = process.env.BASE_URL?.trim() || ''\n\nexport function resolveApiUrl(path: string): string {\n return BASE_URL ? `${BASE_URL}${path}` : path\n}\n\nexport const CONFLICT_BANNER_TESTID = 'record-conflict-banner'\n\n/**\n * The enterprise `record_locks` module (enabled in CI via\n * `OM_ENABLE_ENTERPRISE_MODULES=true`) supersedes the OSS banner with a richer\n * \"Conflict detected\" resolution dialog. Both are valid surfaces for \"the stale\n * write was refused\": on a CrudForm edit page either one can win depending on\n * whether the record_locks incoming-changes SSE (fired by the out-of-band bump)\n * is processed before the browser's stale save reaches the server. Asserting one\n * fixed surface is therefore racy; we wait for whichever conflict surface appears.\n * (List-delete / non-form flows have no record_locks lock and only ever surface\n * the OSS banner, so matching either surface is safe there too.)\n */\nexport const CONFLICT_DIALOG_TESTID = 'record-lock-conflict-dialog'\n\nfunction authHeaders(token: string, lockValue?: string): Record<string, string> {\n const headers: Record<string, string> = {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n }\n if (lockValue !== undefined) headers[OPTIMISTIC_LOCK_HEADER_NAME] = lockValue\n return headers\n}\n\n/**\n * Read a record's current `updated_at` from a list-shaped CRUD GET\n * (`GET <basePath>?id=<id>` \u2192 `items[0].updated_at`), normalized to ISO.\n * Works for the `makeCrudRoute` list responses (snake or camel case).\n */\nexport async function readUpdatedAt(\n request: APIRequestContext,\n token: string,\n basePath: string,\n id: string,\n idParam = 'id',\n): Promise<string> {\n const response = await request.fetch(\n resolveApiUrl(`${basePath}?${idParam}=${encodeURIComponent(id)}`),\n { method: 'GET', headers: authHeaders(token) },\n )\n expect(response.status(), `GET ${basePath}?${idParam}=... should be 200`).toBe(200)\n const body = (await response.json()) as\n | { items?: Array<Record<string, unknown>> }\n | Record<string, unknown>\n const item = Array.isArray((body as { items?: unknown[] }).items)\n ? (body as { items: Array<Record<string, unknown>> }).items[0]\n : (body as Record<string, unknown>)\n expect(item, `response should include the record for id=${id}`).toBeTruthy()\n const raw = (item?.updated_at ?? item?.updatedAt) as string | undefined\n expect(typeof raw, `record should expose updated_at, got ${String(raw)}`).toBe('string')\n const ms = Date.parse(raw as string)\n expect(Number.isFinite(ms), `updated_at should parse, got ${String(raw)}`).toBe(true)\n return new Date(ms).toISOString()\n}\n\n/**\n * Advance a record's `updated_at` out-of-band so the browser's loaded form now\n * holds a stale token. Uses a **header-less** PUT (the strictly-additive path\n * always succeeds and bumps `updated_at`). Returns the new ISO `updated_at`.\n */\nexport async function bumpRecordViaApi(\n request: APIRequestContext,\n token: string,\n basePath: string,\n putBody: Record<string, unknown>,\n opts: { idParam?: string; method?: 'PUT' | 'PATCH' } = {},\n): Promise<string | null> {\n const response = await request.fetch(resolveApiUrl(basePath), {\n method: opts.method ?? 'PUT',\n headers: authHeaders(token),\n data: putBody,\n })\n expect(\n response.status(),\n `out-of-band ${opts.method ?? 'PUT'} ${basePath} should succeed (additive path), got ${response.status()}`,\n ).toBeLessThan(300)\n const id = putBody[opts.idParam ?? 'id']\n if (typeof id === 'string') {\n try {\n return await readUpdatedAt(request, token, basePath, id, opts.idParam)\n } catch {\n return null\n }\n }\n return null\n}\n\n/** Direct API helpers to assert the 409 contract body (used by the negative/UX specs). */\nexport async function putWithLock(\n request: APIRequestContext,\n token: string,\n basePath: string,\n body: Record<string, unknown>,\n lockValue: string,\n) {\n return request.fetch(resolveApiUrl(basePath), {\n method: 'PUT',\n headers: authHeaders(token, lockValue),\n data: body,\n })\n}\n\nexport async function expectConflictBody(response: { status(): number; json(): Promise<unknown> }) {\n expect(response.status(), 'stale write should be 409').toBe(409)\n const body = (await response.json()) as { code?: string; currentUpdatedAt?: string; expectedUpdatedAt?: string }\n expect(body.code, 'body.code should be the optimistic-lock conflict code').toBe(OPTIMISTIC_LOCK_CONFLICT_CODE)\n return body\n}\n\n/**\n * Assert a stale save was refused and surfaced as a conflict. Matches EITHER the\n * OSS `record-conflict-banner` OR the enterprise record_locks \"Conflict detected\"\n * dialog \u2014 see `CONFLICT_DIALOG_TESTID` for why both are valid and why pinning one\n * is racy when enterprise modules are enabled.\n */\nexport async function expectConflictBanner(\n page: Page,\n options?: { timeout?: number },\n): Promise<void> {\n const conflictSurface = page\n .getByTestId(CONFLICT_BANNER_TESTID)\n .or(page.getByTestId(CONFLICT_DIALOG_TESTID))\n await expect(\n conflictSurface.first(),\n 'a conflict surface (OSS bar or record_locks dialog) should appear after a stale save',\n ).toBeVisible({ timeout: options?.timeout ?? 10_000 })\n}\n\n/** Assert no conflict surface is present (a clean single-tab save must not 409). */\nexport async function expectNoConflictBanner(page: Page): Promise<void> {\n await expect(\n page.getByTestId(CONFLICT_BANNER_TESTID),\n 'a clean save must not surface a false-positive conflict bar',\n ).toHaveCount(0)\n await expect(\n page.getByTestId(CONFLICT_DIALOG_TESTID),\n 'a clean save must not surface a false-positive conflict dialog',\n ).toHaveCount(0)\n}\n\n/** Click the conflict bar's Refresh button. */\nexport async function clickConflictRefresh(page: Page): Promise<void> {\n await page.getByTestId(CONFLICT_BANNER_TESTID).getByRole('button', { name: /refresh/i }).click()\n}\n\n/** Dismiss the conflict bar via its close (X) button. */\nexport async function dismissConflictBanner(page: Page): Promise<void> {\n await page.getByTestId(CONFLICT_BANNER_TESTID).getByRole('button', { name: /dismiss/i }).click()\n}\n"],
5
+ "mappings": "AAAA,SAAS,cAAiD;AAC1D;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAgBP,MAAM,WAAW,QAAQ,IAAI,UAAU,KAAK,KAAK;AAE1C,SAAS,cAAc,MAAsB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AAE,UAAU,UAAU,EAAE,MAAM,WAAW,CAAC,EAAE,MAAM;AACjG;AAGA,eAAsB,sBAAsB,MAA2B;AACrE,QAAM,KAAK,YAAY,sBAAsB,EAAE,UAAU,UAAU,EAAE,MAAM,WAAW,CAAC,EAAE,MAAM;AACjG;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/core",
3
- "version": "0.6.6-develop.5651.1.c43359070c",
3
+ "version": "0.6.6-develop.5654.1.ca21e35f26",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -245,16 +245,16 @@
245
245
  "zod": "^4.4.3"
246
246
  },
247
247
  "peerDependencies": {
248
- "@open-mercato/ai-assistant": "0.6.6-develop.5651.1.c43359070c",
249
- "@open-mercato/shared": "0.6.6-develop.5651.1.c43359070c",
250
- "@open-mercato/ui": "0.6.6-develop.5651.1.c43359070c",
248
+ "@open-mercato/ai-assistant": "0.6.6-develop.5654.1.ca21e35f26",
249
+ "@open-mercato/shared": "0.6.6-develop.5654.1.ca21e35f26",
250
+ "@open-mercato/ui": "0.6.6-develop.5654.1.ca21e35f26",
251
251
  "react": "^19.0.0",
252
252
  "react-dom": "^19.0.0"
253
253
  },
254
254
  "devDependencies": {
255
- "@open-mercato/ai-assistant": "0.6.6-develop.5651.1.c43359070c",
256
- "@open-mercato/shared": "0.6.6-develop.5651.1.c43359070c",
257
- "@open-mercato/ui": "0.6.6-develop.5651.1.c43359070c",
255
+ "@open-mercato/ai-assistant": "0.6.6-develop.5654.1.ca21e35f26",
256
+ "@open-mercato/shared": "0.6.6-develop.5654.1.ca21e35f26",
257
+ "@open-mercato/ui": "0.6.6-develop.5654.1.ca21e35f26",
258
258
  "@testing-library/dom": "^10.4.1",
259
259
  "@testing-library/jest-dom": "^6.9.1",
260
260
  "@testing-library/react": "^16.3.1",
@@ -139,14 +139,17 @@ export async function expectConflictBody(response: { status(): number; json(): P
139
139
  * dialog — see `CONFLICT_DIALOG_TESTID` for why both are valid and why pinning one
140
140
  * is racy when enterprise modules are enabled.
141
141
  */
142
- export async function expectConflictBanner(page: Page): Promise<void> {
142
+ export async function expectConflictBanner(
143
+ page: Page,
144
+ options?: { timeout?: number },
145
+ ): Promise<void> {
143
146
  const conflictSurface = page
144
147
  .getByTestId(CONFLICT_BANNER_TESTID)
145
148
  .or(page.getByTestId(CONFLICT_DIALOG_TESTID))
146
149
  await expect(
147
150
  conflictSurface.first(),
148
151
  'a conflict surface (OSS bar or record_locks dialog) should appear after a stale save',
149
- ).toBeVisible({ timeout: 10_000 })
152
+ ).toBeVisible({ timeout: options?.timeout ?? 10_000 })
150
153
  }
151
154
 
152
155
  /** Assert no conflict surface is present (a clean single-tab save must not 409). */