@apextelemed/partner-core 0.1.0

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 (114) hide show
  1. package/LICENSE +64 -0
  2. package/README.md +363 -0
  3. package/dist/api/index.d.ts +12 -0
  4. package/dist/api/index.js +8 -0
  5. package/dist/api/index.js.map +1 -0
  6. package/dist/api/index.jsx +127 -0
  7. package/dist/cart-CBH8Em8f.d.ts +189 -0
  8. package/dist/cart-D4mVX_zx.d.ts +66 -0
  9. package/dist/chunk/2OXI5TKO.jsx +249 -0
  10. package/dist/chunk/3A3MF7R2.jsx +1 -0
  11. package/dist/chunk/3VEOP7TZ.jsx +16679 -0
  12. package/dist/chunk/5XGPFYIJ.js +26 -0
  13. package/dist/chunk/5XGPFYIJ.js.map +1 -0
  14. package/dist/chunk/67KHO66G.js +26 -0
  15. package/dist/chunk/67KHO66G.js.map +1 -0
  16. package/dist/chunk/6TFBQECC.jsx +135 -0
  17. package/dist/chunk/AN3WPMEP.js +3 -0
  18. package/dist/chunk/AN3WPMEP.js.map +1 -0
  19. package/dist/chunk/DHII7L5Y.js +686 -0
  20. package/dist/chunk/DHII7L5Y.js.map +1 -0
  21. package/dist/chunk/DS4E7FAI.js +132 -0
  22. package/dist/chunk/DS4E7FAI.js.map +1 -0
  23. package/dist/chunk/DY5BJ6UG.js +1195 -0
  24. package/dist/chunk/DY5BJ6UG.js.map +1 -0
  25. package/dist/chunk/E7722UPF.js +378 -0
  26. package/dist/chunk/E7722UPF.js.map +1 -0
  27. package/dist/chunk/HLXKWRRW.js +16774 -0
  28. package/dist/chunk/HLXKWRRW.js.map +1 -0
  29. package/dist/chunk/I46Y2J5W.jsx +144 -0
  30. package/dist/chunk/J63XPQP4.jsx +21 -0
  31. package/dist/chunk/J6KNY37T.js +122 -0
  32. package/dist/chunk/J6KNY37T.js.map +1 -0
  33. package/dist/chunk/KNTZTYXE.jsx +3315 -0
  34. package/dist/chunk/KZZSQ7LP.jsx +409 -0
  35. package/dist/chunk/L46OKCKG.jsx +733 -0
  36. package/dist/chunk/LDZIUFDM.jsx +31 -0
  37. package/dist/chunk/LZWA44KD.js +3 -0
  38. package/dist/chunk/LZWA44KD.js.map +1 -0
  39. package/dist/chunk/NVRAOAVV.js +3 -0
  40. package/dist/chunk/NVRAOAVV.js.map +1 -0
  41. package/dist/chunk/O3QK7YZR.jsx +1 -0
  42. package/dist/chunk/UZCST66N.jsx +21 -0
  43. package/dist/chunk/V42CGY2S.jsx +1229 -0
  44. package/dist/chunk/YJEHCCLY.js +467 -0
  45. package/dist/chunk/YJEHCCLY.js.map +1 -0
  46. package/dist/chunk/ZMOG2IIC.js +3194 -0
  47. package/dist/chunk/ZMOG2IIC.js.map +1 -0
  48. package/dist/client-BzSg2DEK.d.ts +1539 -0
  49. package/dist/config/index.d.ts +55 -0
  50. package/dist/config/index.js +3 -0
  51. package/dist/config/index.js.map +1 -0
  52. package/dist/config/index.jsx +11 -0
  53. package/dist/flows/index.d.ts +1322 -0
  54. package/dist/flows/index.js +9 -0
  55. package/dist/flows/index.js.map +1 -0
  56. package/dist/flows/index.jsx +124 -0
  57. package/dist/index/index.d.ts +71 -0
  58. package/dist/index/index.js +15 -0
  59. package/dist/index/index.js.map +1 -0
  60. package/dist/index/index.jsx +311 -0
  61. package/dist/pages/index.d.ts +617 -0
  62. package/dist/pages/index.js +10 -0
  63. package/dist/pages/index.js.map +1 -0
  64. package/dist/pages/index.jsx +50 -0
  65. package/dist/primitives/default/index.d.ts +6 -0
  66. package/dist/primitives/default/index.js +3 -0
  67. package/dist/primitives/default/index.js.map +1 -0
  68. package/dist/primitives/default/index.jsx +7 -0
  69. package/dist/primitives/index.d.ts +122 -0
  70. package/dist/primitives/index.js +3 -0
  71. package/dist/primitives/index.js.map +1 -0
  72. package/dist/primitives/index.jsx +9 -0
  73. package/dist/stores/index.d.ts +48 -0
  74. package/dist/stores/index.js +6 -0
  75. package/dist/stores/index.js.map +1 -0
  76. package/dist/stores/index.jsx +16 -0
  77. package/dist/surveyV2-BgQHK0GE.d.ts +48 -0
  78. package/dist/testing/adapter.d.ts +104 -0
  79. package/dist/testing/adapter.d.ts.map +1 -0
  80. package/dist/testing/adapter.js +14 -0
  81. package/dist/testing/adapter.js.map +1 -0
  82. package/dist/testing/env.d.ts +29 -0
  83. package/dist/testing/env.d.ts.map +1 -0
  84. package/dist/testing/env.js +42 -0
  85. package/dist/testing/env.js.map +1 -0
  86. package/dist/testing/fixtures.d.ts +70 -0
  87. package/dist/testing/fixtures.d.ts.map +1 -0
  88. package/dist/testing/fixtures.js +74 -0
  89. package/dist/testing/fixtures.js.map +1 -0
  90. package/dist/testing/index.d.ts +15 -0
  91. package/dist/testing/index.d.ts.map +1 -0
  92. package/dist/testing/index.js +14 -0
  93. package/dist/testing/index.js.map +1 -0
  94. package/dist/testing/mocks.d.ts +53 -0
  95. package/dist/testing/mocks.d.ts.map +1 -0
  96. package/dist/testing/mocks.js +90 -0
  97. package/dist/testing/mocks.js.map +1 -0
  98. package/dist/testing/seam-suite.d.ts +39 -0
  99. package/dist/testing/seam-suite.d.ts.map +1 -0
  100. package/dist/testing/seam-suite.js +196 -0
  101. package/dist/testing/seam-suite.js.map +1 -0
  102. package/dist/testing/storage.d.ts +40 -0
  103. package/dist/testing/storage.d.ts.map +1 -0
  104. package/dist/testing/storage.js +71 -0
  105. package/dist/testing/storage.js.map +1 -0
  106. package/dist/theme/admin.css +579 -0
  107. package/dist/theme/affiliate.css +191 -0
  108. package/dist/theme/flow.css +497 -0
  109. package/dist/theme/index.d.ts +84 -0
  110. package/dist/theme/index.js +94 -0
  111. package/dist/theme/index.js.map +1 -0
  112. package/dist/theme/index.jsx +97 -0
  113. package/dist/theme/member-portal.css +1762 -0
  114. package/package.json +199 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Test kit for sites consuming this package.
3
+ *
4
+ * Imported from Playwright specs only — never from application code. It is
5
+ * published as compiled JS (see `npm run build:testing`) rather than the TS
6
+ * source the rest of the package ships, because Playwright's runner refuses to
7
+ * strip types from files under node_modules.
8
+ */
9
+ export { defineSeamSuite, type SeamRunner } from './seam-suite.js';
10
+ export { assertSeamEnv, SEAM_NODE_OPTION } from './env.js';
11
+ export type { SiteSeamAdapter, SeamRoutes, SeamNav, SeamUser, SeamLoginForm, SeamCheck, } from './adapter.js';
12
+ export { mockCoreApi, failOnUnmockedApi, seedAuth, seedCart, storageKeys, routeGlob, type CoreMockOptions, } from './mocks.js';
13
+ export { MOCK_USER, MOCK_ADMIN, MOCK_TOKENS, MOCK_PRODUCTS, MOCK_CART_ITEM, type MockTokens, } from './fixtures.js';
14
+ export { CORE_STORAGE_SUFFIXES, CORE_STORAGE_SUFFIX_PATTERNS, coreStorageKey, coreStorageKeys, isCoreStorageKey, isUnprefixedCoreKey, type CoreStorageSuffix, } from './storage.js';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EACV,eAAe,EACf,UAAU,EACV,OAAO,EACP,QAAQ,EACR,aAAa,EACb,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,EACT,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,aAAa,EACb,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Test kit for sites consuming this package.
3
+ *
4
+ * Imported from Playwright specs only — never from application code. It is
5
+ * published as compiled JS (see `npm run build:testing`) rather than the TS
6
+ * source the rest of the package ships, because Playwright's runner refuses to
7
+ * strip types from files under node_modules.
8
+ */
9
+ export { defineSeamSuite } from './seam-suite.js';
10
+ export { assertSeamEnv, SEAM_NODE_OPTION } from './env.js';
11
+ export { mockCoreApi, failOnUnmockedApi, seedAuth, seedCart, storageKeys, routeGlob, } from './mocks.js';
12
+ export { MOCK_USER, MOCK_ADMIN, MOCK_TOKENS, MOCK_PRODUCTS, MOCK_CART_ITEM, } from './fixtures.js';
13
+ export { CORE_STORAGE_SUFFIXES, CORE_STORAGE_SUFFIX_PATTERNS, coreStorageKey, coreStorageKeys, isCoreStorageKey, isUnprefixedCoreKey, } from './storage.js';
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAmB,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAS3D,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,GAEV,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,aAAa,EACb,cAAc,GAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,mBAAmB,GAEpB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Playwright route mocks for the endpoints this package calls.
3
+ *
4
+ * Shipped from here rather than re-derived per site: the endpoint list is a
5
+ * property of `src/api/client.ts`, so a site that hand-rolls its own mocks is
6
+ * maintaining a guess about someone else's module. When core adds a call on
7
+ * boot, every site's suite starts hitting the network (or hanging) until each
8
+ * one notices independently — exactly the drift this package is meant to absorb.
9
+ *
10
+ * These are only good enough to boot a page and exercise a seam. Anything that
11
+ * needs a truthful backend response belongs in core's own live suite
12
+ * (`npm run test:e2e`), which drives real HTTP against dev.
13
+ */
14
+ import type { Page } from '@playwright/test';
15
+ import { MOCK_PRODUCTS, MOCK_USER } from './fixtures.js';
16
+ import type { MockTokens } from './fixtures.js';
17
+ /**
18
+ * Builds the glob Playwright matches a request against.
19
+ *
20
+ * `apiBase` may be a path (`/api`) or absolute (`https://api.acme.com/api`);
21
+ * either way only the path portion can be matched reliably, because a site can
22
+ * be served from any origin in CI. Leading `**` covers both.
23
+ */
24
+ export declare function routeGlob(apiBase: string, endpoint: string): string;
25
+ export interface CoreMockOptions {
26
+ apiBase: string;
27
+ /** null → the member endpoints answer 401, i.e. a logged-out visitor. */
28
+ user?: typeof MOCK_USER | null;
29
+ products?: typeof MOCK_PRODUCTS;
30
+ tokens?: MockTokens;
31
+ }
32
+ /**
33
+ * Registers a mock for every endpoint the package touches while booting a page.
34
+ *
35
+ * Call BEFORE `page.goto()`. Registered narrowest-first: Playwright matches
36
+ * routes most-recently-registered-first, so the catch-all guard goes on last.
37
+ */
38
+ export declare function mockCoreApi(page: Page, opts: CoreMockOptions): Promise<void>;
39
+ /**
40
+ * Fails the spec on any unmocked call to the backend.
41
+ *
42
+ * Opt-in via the adapter's `strictNetwork`. Without it an endpoint added to
43
+ * core shows up downstream as a flake or a hang; with it, it shows up as a
44
+ * named failure telling the site which route to add.
45
+ */
46
+ export declare function failOnUnmockedApi(page: Page, apiBase: string): Promise<void>;
47
+ /** Seed auth tokens so the app boots logged-in. Call before `page.goto()`. */
48
+ export declare function seedAuth(page: Page, storagePrefix: string, tokens: MockTokens): Promise<void>;
49
+ /** Seed cart contents so the app boots with a non-empty cart. */
50
+ export declare function seedCart(page: Page, storagePrefix: string, items: readonly unknown[]): Promise<void>;
51
+ /** Every localStorage key currently set, sorted. */
52
+ export declare function storageKeys(page: Page): Promise<string[]>;
53
+ //# sourceMappingURL=mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/testing/mocks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,IAAI,EAAS,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMnE;AAOD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,IAAI,CAAC,EAAE,OAAO,SAAS,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,aAAa,CAAC;IAChC,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAwClF;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUlF;AAED,8EAA8E;AAC9E,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,iEAAiE;AACjE,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,SAAS,OAAO,EAAE,GACxB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,oDAAoD;AACpD,wBAAsB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAE/D"}
@@ -0,0 +1,90 @@
1
+ import { MOCK_PRODUCTS, MOCK_USER } from './fixtures.js';
2
+ /**
3
+ * Builds the glob Playwright matches a request against.
4
+ *
5
+ * `apiBase` may be a path (`/api`) or absolute (`https://api.acme.com/api`);
6
+ * either way only the path portion can be matched reliably, because a site can
7
+ * be served from any origin in CI. Leading `**` covers both.
8
+ */
9
+ export function routeGlob(apiBase, endpoint) {
10
+ let path = apiBase;
11
+ const schemeless = /^https?:\/\/[^/]+(\/.*)?$/.exec(apiBase);
12
+ if (schemeless)
13
+ path = schemeless[1] ?? '';
14
+ path = path.replace(/\/$/, '');
15
+ return `**${path}${endpoint}`;
16
+ }
17
+ function json(body, status = 200) {
18
+ return (route) => route.fulfill({ status, contentType: 'application/json', body: JSON.stringify(body) });
19
+ }
20
+ /**
21
+ * Registers a mock for every endpoint the package touches while booting a page.
22
+ *
23
+ * Call BEFORE `page.goto()`. Registered narrowest-first: Playwright matches
24
+ * routes most-recently-registered-first, so the catch-all guard goes on last.
25
+ */
26
+ export async function mockCoreApi(page, opts) {
27
+ const { apiBase, user = MOCK_USER, products = MOCK_PRODUCTS, tokens } = opts;
28
+ const g = (endpoint) => routeGlob(apiBase, endpoint);
29
+ const unauthorized = json({ error: 'unauthorized' }, 401);
30
+ // Identity. `/users/me` is the boot call almost every page makes.
31
+ await page.route(g('/users/me'), user ? json({ user }) : unauthorized);
32
+ await page.route(g('/members/me'), user ? json({ member: user }) : unauthorized);
33
+ // Token refresh — the transport retries a 401 through this once. Without a
34
+ // mock, a logged-out spec hangs on a real network call to a dead host.
35
+ await page.route(g('/auth/refresh'), (route) => {
36
+ if (route.request().method() !== 'POST')
37
+ return route.fallback();
38
+ if (!tokens)
39
+ return unauthorized(route);
40
+ return json({
41
+ uid: tokens.userId,
42
+ idToken: tokens.accessToken,
43
+ refreshToken: tokens.refreshToken,
44
+ expiresIn: 3600,
45
+ })(route);
46
+ });
47
+ // Catalog.
48
+ await page.route(g('/products'), json({ products }));
49
+ await page.route(g('/products/categories'), json({ categories: [] }));
50
+ // Member surfaces the portal/dashboard reads on mount.
51
+ await page.route(g('/subscriptions'), json({ subscriptions: [] }));
52
+ await page.route(g('/apex/requests'), json({ requests: [] }));
53
+ await page.route(g('/members/me/requests'), json({ requests: [] }));
54
+ await page.route(g('/members/me/surveys'), json({ surveys: [] }));
55
+ await page.route(g('/messages/unread-count'), json({ count: 0 }));
56
+ await page.route(g('/support/unread-count'), json({ count: 0 }));
57
+ // Payment config gates the Continue button on any payment step.
58
+ await page.route(g('/config/payment'), json({ apiLoginId: 'seam-login-id', clientKey: 'seam-client-key', environment: 'sandbox' }));
59
+ }
60
+ /**
61
+ * Fails the spec on any unmocked call to the backend.
62
+ *
63
+ * Opt-in via the adapter's `strictNetwork`. Without it an endpoint added to
64
+ * core shows up downstream as a flake or a hang; with it, it shows up as a
65
+ * named failure telling the site which route to add.
66
+ */
67
+ export async function failOnUnmockedApi(page, apiBase) {
68
+ await page.route(routeGlob(apiBase, '/**'), (route) => {
69
+ return route.fulfill({
70
+ status: 599,
71
+ contentType: 'application/json',
72
+ body: JSON.stringify({
73
+ error: `seam-suite: unmocked backend call to ${route.request().url()}`,
74
+ }),
75
+ });
76
+ });
77
+ }
78
+ /** Seed auth tokens so the app boots logged-in. Call before `page.goto()`. */
79
+ export async function seedAuth(page, storagePrefix, tokens) {
80
+ await page.addInitScript(({ key, value }) => window.localStorage.setItem(key, JSON.stringify(value)), { key: `${storagePrefix}-auth`, value: tokens });
81
+ }
82
+ /** Seed cart contents so the app boots with a non-empty cart. */
83
+ export async function seedCart(page, storagePrefix, items) {
84
+ await page.addInitScript(({ key, value }) => window.localStorage.setItem(key, JSON.stringify(value)), { key: `${storagePrefix}-cart`, value: items });
85
+ }
86
+ /** Every localStorage key currently set, sorted. */
87
+ export async function storageKeys(page) {
88
+ return page.evaluate(() => Object.keys(window.localStorage).sort());
89
+ }
90
+ //# sourceMappingURL=mocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../src/testing/mocks.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAGzD;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,OAAe,EAAE,QAAgB;IACzD,IAAI,IAAI,GAAG,OAAO,CAAC;IACnB,MAAM,UAAU,GAAG,2BAA2B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7D,IAAI,UAAU;QAAE,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/B,OAAO,KAAK,IAAI,GAAG,QAAQ,EAAE,CAAC;AAChC,CAAC;AAED,SAAS,IAAI,CAAC,IAAa,EAAE,MAAM,GAAG,GAAG;IACvC,OAAO,CAAC,KAAY,EAAE,EAAE,CACtB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3F,CAAC;AAUD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAU,EAAE,IAAqB;IACjE,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,SAAS,EAAE,QAAQ,GAAG,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC7E,MAAM,CAAC,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE7D,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,KAAK,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S,CAAC;gBACnB,KAAK,EAAE,wCAAwC,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;aACvE,CAAC;SACH,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,IAAU,EACV,aAAqB,EACrB,MAAkB;IAElB,MAAM,IAAI,CAAC,aAAa,CACtB,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAC3E,EAAE,GAAG,EAAE,GAAG,aAAa,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAChD,CAAC;AACJ,CAAC;AAED,iEAAiE;AACjE,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,IAAU,EACV,aAAqB,EACrB,KAAyB;IAEzB,MAAM,IAAI,CAAC,aAAa,CACtB,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAC3E,EAAE,GAAG,EAAE,GAAG,aAAa,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAC/C,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAU;IAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The suite every consumer site runs against its own app.
3
+ *
4
+ * Scope rule, and the reason this stays small enough that nobody disables it:
5
+ * it tests the SEAM, not the funnel. Whether signup charges correctly against a
6
+ * real backend is proved once, here, by core's own live suite. What no core
7
+ * test can prove is whether a *particular site* wired the package up correctly
8
+ * — and that is a narrow, fast, hermetic set of questions:
9
+ *
10
+ * config - did `configure()` run before anything read it?
11
+ * boot - does a stored session survive a page load?
12
+ * storage - is every key namespaced, with no bare pre-migration writers?
13
+ * singleton - does the site's chrome see the package's auth state?
14
+ *
15
+ * Everything is mocked, so this needs no credentials and touches no backend.
16
+ * That is a design requirement, not a convenience: a suite that needs secrets
17
+ * can't run on a fork PR, can't be a required check, and therefore won't be
18
+ * the thing that stops a broken wiring from shipping.
19
+ */
20
+ import type { expect as ExpectApi, test as TestApi } from '@playwright/test';
21
+ import type { SiteSeamAdapter } from './adapter.js';
22
+ /**
23
+ * The caller's own `test` and `expect`.
24
+ *
25
+ * Passed in rather than imported here, and this is load-bearing: consumer sites
26
+ * depend on this package through `file:../the-frontend`, which npm installs as
27
+ * a symlink. Node resolves a symlinked module's imports from its REAL path, so
28
+ * an `import ... from '@playwright/test'` inside this file loads the copy in
29
+ * the package's own node_modules — a second instance, which Playwright rejects
30
+ * outright ("Requiring @playwright/test second time"). Taking the runner as an
31
+ * argument keeps the shipped JS free of any Playwright import at all; the type
32
+ * import above is erased at build time.
33
+ */
34
+ export interface SeamRunner {
35
+ test: typeof TestApi;
36
+ expect: typeof ExpectApi;
37
+ }
38
+ export declare function defineSeamSuite(adapter: SiteSeamAdapter, runner: SeamRunner): void;
39
+ //# sourceMappingURL=seam-suite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seam-suite.d.ts","sourceRoot":"","sources":["../../src/testing/seam-suite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAQ,MAAM,IAAI,SAAS,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAInF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,SAAS,CAAC;CAC1B;AA2BD,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CA6NlF"}
@@ -0,0 +1,196 @@
1
+ import { MOCK_CART_ITEM, MOCK_TOKENS, MOCK_USER } from './fixtures.js';
2
+ import { failOnUnmockedApi, mockCoreApi, seedAuth, seedCart, storageKeys } from './mocks.js';
3
+ import { isCoreStorageKey, isUnprefixedCoreKey } from './storage.js';
4
+ /**
5
+ * The error `getConfig()` throws when a store or api module is used before the
6
+ * host called `configure()`. Matched on a substring so a reworded message
7
+ * doesn't quietly turn this check into a no-op — but if config.ts's wording
8
+ * changes, update it here too.
9
+ */
10
+ const UNCONFIGURED = 'must be called before any API or store is used';
11
+ /**
12
+ * Collects uncaught exceptions for the life of a page.
13
+ *
14
+ * Uncaught only — not `console.error`. Sites legitimately log errors (a failed
15
+ * optional fetch, a third-party script), and folding those in would make this
16
+ * fail for reasons the site can't act on.
17
+ */
18
+ function collectPageErrors(page) {
19
+ const errors = [];
20
+ page.on('pageerror', (err) => errors.push(String(err)));
21
+ return errors;
22
+ }
23
+ function declaredRoutes(a) {
24
+ return Object.entries(a.routes).filter(([, path]) => typeof path === 'string');
25
+ }
26
+ export function defineSeamSuite(adapter, runner) {
27
+ const { test, expect } = runner;
28
+ const apiBase = adapter.apiBase ?? '/api';
29
+ const { storagePrefix, siteName } = adapter;
30
+ const skip = adapter.skip ?? {};
31
+ test.describe(`core seam · ${siteName}`, () => {
32
+ // ── routes ────────────────────────────────────────────────────
33
+ //
34
+ // Every declared route boots without throwing and renders something.
35
+ //
36
+ // This is the cheapest check and the one that needs nothing from the site,
37
+ // so it is also the one most likely to catch a wiring mistake nobody
38
+ // predicted: a route whose component crashes on mount, a missing provider,
39
+ // a page that renders an empty shell because its data hook threw.
40
+ //
41
+ // It deliberately watches uncaught exceptions rather than console output.
42
+ // Console noise (third-party scripts, dev warnings) would make this flaky,
43
+ // and a flaky required check gets disabled — at which point it protects
44
+ // nothing.
45
+ test.describe('every route boots', () => {
46
+ test.skip(!!skip.routes, skip.routes ?? '');
47
+ for (const [name, path] of declaredRoutes(adapter)) {
48
+ test(`${name} (${path}) renders without throwing`, async ({ page }) => {
49
+ const errors = collectPageErrors(page);
50
+ await mockCoreApi(page, { apiBase, user: null });
51
+ await page.goto(path);
52
+ await page.waitForLoadState('networkidle');
53
+ // Specific and free: if the package is used before configure() ran
54
+ // and the throw escapes, say so precisely rather than as a generic
55
+ // uncaught error.
56
+ const unconfigured = errors.filter((e) => e.includes(UNCONFIGURED));
57
+ expect(unconfigured, `${path} used the package before configure() ran. The site's ` +
58
+ 'configure() call must be imported for its side effect BEFORE any ' +
59
+ "module that imports the package's stores or api — including " +
60
+ 'transitively through a route component.').toEqual([]);
61
+ expect(errors, `${path} threw while booting`).toEqual([]);
62
+ // A route that "loads" but renders nothing is broken in a way no
63
+ // error surfaces — the usual cause is a crashed top-level component
64
+ // swallowed by an error boundary.
65
+ const rendered = await page.evaluate(() => (document.body.textContent ?? '').trim().length);
66
+ expect(rendered, `${path} rendered an empty document`).toBeGreaterThan(0);
67
+ });
68
+ }
69
+ });
70
+ // ── boot ──────────────────────────────────────────────────────
71
+ //
72
+ // The refresh-drops-the-session regression, reproduced directly: put a
73
+ // session and a cart in storage the way a returning visitor would have
74
+ // them, load the app cold, and require both to still be there afterwards.
75
+ test.describe('a stored session survives a cold load', () => {
76
+ test.skip(!!skip.boot, skip.boot ?? '');
77
+ test('auth and cart are still in storage after boot', async ({ page }) => {
78
+ await mockCoreApi(page, { apiBase, user: MOCK_USER, tokens: MOCK_TOKENS });
79
+ await seedAuth(page, storagePrefix, MOCK_TOKENS);
80
+ await seedCart(page, storagePrefix, [MOCK_CART_ITEM]);
81
+ await page.goto(adapter.routes.dashboard ?? adapter.routes.home);
82
+ await page.waitForLoadState('networkidle');
83
+ const keys = await storageKeys(page);
84
+ expect(keys, 'the stored session was dropped during boot — the usual cause is a ' +
85
+ 'store module loading before configure(), snapshotting an empty ' +
86
+ 'prefix and never re-reading').toContain(`${storagePrefix}-auth`);
87
+ expect(keys).toContain(`${storagePrefix}-cart`);
88
+ });
89
+ test('the app renders as authenticated', async ({ page }) => {
90
+ test.skip(!adapter.authedMarker, 'adapter supplies no authedMarker');
91
+ await mockCoreApi(page, { apiBase, user: MOCK_USER, tokens: MOCK_TOKENS });
92
+ await seedAuth(page, storagePrefix, MOCK_TOKENS);
93
+ await page.goto(adapter.routes.dashboard ?? adapter.routes.home);
94
+ await expect(page.locator(adapter.authedMarker)).toBeVisible();
95
+ });
96
+ });
97
+ // ── storage ───────────────────────────────────────────────────
98
+ //
99
+ // Audited against the package's own key list rather than a copy kept by the
100
+ // site, so a key added to core is covered downstream on the next bump.
101
+ test.describe('storage namespace', () => {
102
+ test.skip(!!skip.storage, skip.storage ?? '');
103
+ test('every key is namespaced, and no bare package key is written', async ({ page }) => {
104
+ await mockCoreApi(page, { apiBase, user: MOCK_USER, tokens: MOCK_TOKENS });
105
+ if (adapter.strictNetwork)
106
+ await failOnUnmockedApi(page, apiBase);
107
+ await seedAuth(page, storagePrefix, MOCK_TOKENS);
108
+ await seedCart(page, storagePrefix, [MOCK_CART_ITEM]);
109
+ // Walk the site so the drafts and session keys actually get written.
110
+ for (const [, path] of declaredRoutes(adapter)) {
111
+ await page.goto(path);
112
+ await page.waitForLoadState('networkidle');
113
+ }
114
+ const keys = await storageKeys(page);
115
+ const allowed = adapter.allowStorageKeys ?? [];
116
+ const isAllowed = (k) => allowed.some((rule) => (typeof rule === 'string' ? rule === k : rule.test(k)));
117
+ // A package key written without the site prefix means two stores are
118
+ // fighting over one browser. Called out separately — it is a bug, where
119
+ // an unknown key is usually just a third-party script.
120
+ const bare = keys.filter((k) => isUnprefixedCoreKey(k) && !isAllowed(k));
121
+ expect(bare, 'these are package storage keys written WITHOUT this site\'s prefix, ' +
122
+ 'so the site and the package are reading different storage').toEqual([]);
123
+ const foreign = keys.filter((k) => !k.startsWith(`${storagePrefix}-`) && !isAllowed(k));
124
+ expect(foreign, 'unrecognised localStorage keys. If the site owns these, declare them ' +
125
+ 'in the adapter\'s allowStorageKeys.').toEqual([]);
126
+ // Anything prefixed but not a key the package declares is either a site
127
+ // key that should be declared, or a core key missing from the contract.
128
+ const prefixedUnknown = keys.filter((k) => k.startsWith(`${storagePrefix}-`) && !isCoreStorageKey(storagePrefix, k) && !isAllowed(k));
129
+ expect(prefixedUnknown, 'prefixed keys the package does not declare — add them to the ' +
130
+ 'adapter\'s allowStorageKeys if the site writes them').toEqual([]);
131
+ });
132
+ });
133
+ // ── singleton ─────────────────────────────────────────────────
134
+ //
135
+ // The package's auth store is a module singleton. If a site's bundle ends
136
+ // up with two copies (a duplicated dependency, a mis-aliased import), login
137
+ // updates one and the chrome reads the other: no error, just a nav that
138
+ // never notices you signed in.
139
+ test.describe('site chrome shares the package auth store', () => {
140
+ test.skip(!!skip.singleton, skip.singleton ?? '');
141
+ test.skip(!adapter.nav, 'adapter supplies no nav config');
142
+ test('login updates the nav in the same tab, logout reverts it', async ({ page }) => {
143
+ const nav = adapter.nav;
144
+ const creds = adapter.patient;
145
+ test.skip(!creds, 'adapter supplies no patient credentials');
146
+ await mockCoreApi(page, { apiBase, user: null, tokens: MOCK_TOKENS });
147
+ // Login has to succeed for the propagation to be observable at all.
148
+ await page.route(`**/auth/login`, (route) => route.fulfill({
149
+ status: 200,
150
+ contentType: 'application/json',
151
+ body: JSON.stringify({
152
+ uid: MOCK_TOKENS.userId,
153
+ idToken: MOCK_TOKENS.accessToken,
154
+ refreshToken: MOCK_TOKENS.refreshToken,
155
+ expiresIn: 3600,
156
+ user: MOCK_USER,
157
+ }),
158
+ }));
159
+ await page.goto(adapter.routes.home);
160
+ const chrome = page.locator(nav.selector ?? 'nav').first();
161
+ // `.first()` throughout: a responsive nav usually renders a desktop and
162
+ // a mobile copy of the same link, and this check is about whether the
163
+ // chrome reacted at all, not about how many times it says so.
164
+ await expect(chrome.getByText(nav.loggedOutText).first()).toBeVisible();
165
+ // Real UI login, not a storage injection: injecting storage would skip
166
+ // the very propagation path this test exists to prove.
167
+ const form = adapter.login ?? {};
168
+ await page.goto(adapter.routes.login);
169
+ await page.locator(form.email ?? 'input[type="email"]').first().fill(creds.email);
170
+ await page.locator(form.password ?? 'input[type="password"]').first().fill(creds.password);
171
+ await page.locator(form.submit ?? 'button[type="submit"]').first().click();
172
+ // Re-authed user reads come back authenticated from here on.
173
+ await page.route(routeFor(apiBase, '/users/me'), (route) => route.fulfill({
174
+ status: 200,
175
+ contentType: 'application/json',
176
+ body: JSON.stringify({ user: MOCK_USER }),
177
+ }));
178
+ await expect(chrome.getByText(nav.loggedInText).first(), 'the nav did not react to login without a reload — the site and the ' +
179
+ 'package are probably holding two copies of the auth store').toBeVisible();
180
+ await chrome.getByText(nav.logOutText).first().click();
181
+ await expect(chrome.getByText(nav.loggedOutText).first()).toBeVisible();
182
+ const auth = await page.evaluate((key) => window.localStorage.getItem(key), `${storagePrefix}-auth`);
183
+ expect(auth, 'logout left the session in storage').toBeNull();
184
+ });
185
+ });
186
+ });
187
+ }
188
+ /** Local copy of mocks.routeGlob, kept private to avoid widening the surface. */
189
+ function routeFor(apiBase, endpoint) {
190
+ let path = apiBase;
191
+ const m = /^https?:\/\/[^/]+(\/.*)?$/.exec(apiBase);
192
+ if (m)
193
+ path = m[1] ?? '';
194
+ return `**${path.replace(/\/$/, '')}${endpoint}`;
195
+ }
196
+ //# sourceMappingURL=seam-suite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seam-suite.js","sourceRoot":"","sources":["../../src/testing/seam-suite.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAA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@ -0,0 +1,40 @@
1
+ /**
2
+ * The localStorage keys this package writes, as a contract consumer sites can
3
+ * assert against.
4
+ *
5
+ * Every key is `${storagePrefix}-${suffix}` — the prefix comes from the host's
6
+ * `configure()` call, the suffix is owned here. A site that mis-wires the boot
7
+ * order, or whose own chrome writes a bare unprefixed key, ends up with two
8
+ * apps disagreeing about where the session lives; that failure is invisible
9
+ * until a refresh drops the cart. `seamSuite`'s storage checks exist to make it
10
+ * visible on a PR instead.
11
+ *
12
+ * This list is kept honest by storage.contract.test.ts, which scans src/ for
13
+ * `${getConfig().storagePrefix}-...` templates and fails if one isn't declared
14
+ * here. Add the suffix here in the same commit that adds the key, or CI stops
15
+ * you — a stale list would silently narrow every consumer's audit.
16
+ */
17
+ /** Fixed suffixes. `${prefix}-${suffix}` is the full key. */
18
+ export declare const CORE_STORAGE_SUFFIXES: readonly ["auth", "affiliate-auth", "affiliate-ref", "cart", "cart-promo", "cart-id", "signup-draft", "register-draft", "survey-draft", "subscription-intake-draft", "funnel-session", "funnel-email-done"];
19
+ export type CoreStorageSuffix = (typeof CORE_STORAGE_SUFFIXES)[number];
20
+ /**
21
+ * Suffixes with a caller-supplied tail (an idempotency scope). Matched by
22
+ * pattern because the tail is a cart/request id known only at runtime.
23
+ */
24
+ export declare const CORE_STORAGE_SUFFIX_PATTERNS: readonly RegExp[];
25
+ /** Full key for a fixed suffix, e.g. `coreStorageKey('acme', 'cart')`. */
26
+ export declare function coreStorageKey(storagePrefix: string, suffix: CoreStorageSuffix): string;
27
+ /** Every fixed key this package can write for a given prefix. */
28
+ export declare function coreStorageKeys(storagePrefix: string): string[];
29
+ /** True when `key` is one this package owns under `storagePrefix`. */
30
+ export declare function isCoreStorageKey(storagePrefix: string, key: string): boolean;
31
+ /**
32
+ * True when `key` looks like one of ours written WITHOUT the site's prefix.
33
+ *
34
+ * This is the specific regression the storage audit hunts: a site whose chrome
35
+ * kept its own pre-migration `cart`/`auth` writer now has two stores fighting
36
+ * over one browser. Reported separately from "unknown key" because the fix is
37
+ * different — that one is a bug, an unknown key is usually just a third party.
38
+ */
39
+ export declare function isUnprefixedCoreKey(key: string): boolean;
40
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/testing/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,6DAA6D;AAC7D,eAAO,MAAM,qBAAqB,6MAaxB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAGzD,CAAC;AAEF,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAEvF;AAED,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,CAE/D;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAM5E;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGxD"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * The localStorage keys this package writes, as a contract consumer sites can
3
+ * assert against.
4
+ *
5
+ * Every key is `${storagePrefix}-${suffix}` — the prefix comes from the host's
6
+ * `configure()` call, the suffix is owned here. A site that mis-wires the boot
7
+ * order, or whose own chrome writes a bare unprefixed key, ends up with two
8
+ * apps disagreeing about where the session lives; that failure is invisible
9
+ * until a refresh drops the cart. `seamSuite`'s storage checks exist to make it
10
+ * visible on a PR instead.
11
+ *
12
+ * This list is kept honest by storage.contract.test.ts, which scans src/ for
13
+ * `${getConfig().storagePrefix}-...` templates and fails if one isn't declared
14
+ * here. Add the suffix here in the same commit that adds the key, or CI stops
15
+ * you — a stale list would silently narrow every consumer's audit.
16
+ */
17
+ /** Fixed suffixes. `${prefix}-${suffix}` is the full key. */
18
+ export const CORE_STORAGE_SUFFIXES = [
19
+ 'auth',
20
+ 'affiliate-auth',
21
+ 'affiliate-ref',
22
+ 'cart',
23
+ 'cart-promo',
24
+ 'cart-id',
25
+ 'signup-draft',
26
+ 'register-draft',
27
+ 'survey-draft',
28
+ 'subscription-intake-draft',
29
+ 'funnel-session',
30
+ 'funnel-email-done',
31
+ ];
32
+ /**
33
+ * Suffixes with a caller-supplied tail (an idempotency scope). Matched by
34
+ * pattern because the tail is a cart/request id known only at runtime.
35
+ */
36
+ export const CORE_STORAGE_SUFFIX_PATTERNS = [
37
+ /^rx-checkout-key-.+$/,
38
+ /^cart-checkout-key-.+$/,
39
+ ];
40
+ /** Full key for a fixed suffix, e.g. `coreStorageKey('acme', 'cart')`. */
41
+ export function coreStorageKey(storagePrefix, suffix) {
42
+ return `${storagePrefix}-${suffix}`;
43
+ }
44
+ /** Every fixed key this package can write for a given prefix. */
45
+ export function coreStorageKeys(storagePrefix) {
46
+ return CORE_STORAGE_SUFFIXES.map((s) => coreStorageKey(storagePrefix, s));
47
+ }
48
+ /** True when `key` is one this package owns under `storagePrefix`. */
49
+ export function isCoreStorageKey(storagePrefix, key) {
50
+ const prefix = `${storagePrefix}-`;
51
+ if (!key.startsWith(prefix))
52
+ return false;
53
+ const suffix = key.slice(prefix.length);
54
+ if (CORE_STORAGE_SUFFIXES.includes(suffix))
55
+ return true;
56
+ return CORE_STORAGE_SUFFIX_PATTERNS.some((re) => re.test(suffix));
57
+ }
58
+ /**
59
+ * True when `key` looks like one of ours written WITHOUT the site's prefix.
60
+ *
61
+ * This is the specific regression the storage audit hunts: a site whose chrome
62
+ * kept its own pre-migration `cart`/`auth` writer now has two stores fighting
63
+ * over one browser. Reported separately from "unknown key" because the fix is
64
+ * different — that one is a bug, an unknown key is usually just a third party.
65
+ */
66
+ export function isUnprefixedCoreKey(key) {
67
+ if (CORE_STORAGE_SUFFIXES.includes(key))
68
+ return true;
69
+ return CORE_STORAGE_SUFFIX_PATTERNS.some((re) => re.test(key));
70
+ }
71
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/testing/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,6DAA6D;AAC7D,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM;IACN,gBAAgB;IAChB,eAAe;IACf,MAAM;IACN,YAAY;IACZ,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,2BAA2B;IAC3B,gBAAgB;IAChB,mBAAmB;CACX,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAsB;IAC7D,sBAAsB;IACtB,wBAAwB;CACzB,CAAC;AAEF,0EAA0E;AAC1E,MAAM,UAAU,cAAc,CAAC,aAAqB,EAAE,MAAyB;IAC7E,OAAO,GAAG,aAAa,IAAI,MAAM,EAAE,CAAC;AACtC,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,eAAe,CAAC,aAAqB;IACnD,OAAO,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,gBAAgB,CAAC,aAAqB,EAAE,GAAW;IACjE,MAAM,MAAM,GAAG,GAAG,aAAa,GAAG,CAAC;IACnC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1C,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxC,IAAK,qBAA2C,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/E,OAA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