@fayz-ai/sdk 0.9.0 → 0.10.1

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 (56) hide show
  1. package/README.md +2 -2
  2. package/dist/ai-builder.js +1 -1
  3. package/dist/{chunk-2YJXKDHO.js → chunk-6UZOXHGJ.js} +11 -6
  4. package/dist/chunk-6UZOXHGJ.js.map +1 -0
  5. package/dist/{chunk-V4GWI7WH.js → chunk-7UXTYT6I.js} +65 -4
  6. package/dist/chunk-7UXTYT6I.js.map +1 -0
  7. package/dist/{chunk-7XM4LONE.js → chunk-BJFMBVMP.js} +2 -2
  8. package/dist/chunk-BJFMBVMP.js.map +1 -0
  9. package/dist/chunk-HA5O3CW7.js +181 -0
  10. package/dist/chunk-HA5O3CW7.js.map +1 -0
  11. package/dist/chunk-KVMRRT3O.js +135 -0
  12. package/dist/chunk-KVMRRT3O.js.map +1 -0
  13. package/dist/deprecations.d.ts +98 -0
  14. package/dist/deprecations.d.ts.map +1 -0
  15. package/dist/deprecations.js +3 -0
  16. package/dist/deprecations.js.map +1 -0
  17. package/dist/deprecations.json +119 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +5 -4
  21. package/dist/release-channels.js +1 -1
  22. package/dist/release-channels.json +103 -0
  23. package/dist/shop.d.ts +32 -0
  24. package/dist/shop.d.ts.map +1 -1
  25. package/dist/shop.js +2 -1
  26. package/dist/supported-surface.d.ts +8 -1
  27. package/dist/supported-surface.d.ts.map +1 -1
  28. package/dist/supported-surface.js +1 -1
  29. package/{src → dist}/supported-surface.json +5 -3
  30. package/dist/vite.d.ts +30 -1
  31. package/dist/vite.d.ts.map +1 -1
  32. package/dist/vite.js +10 -2
  33. package/dist/vite.js.map +1 -1
  34. package/package.json +10 -17
  35. package/dist/chunk-2YJXKDHO.js.map +0 -1
  36. package/dist/chunk-7XM4LONE.js.map +0 -1
  37. package/dist/chunk-GQPVDQEB.js +0 -135
  38. package/dist/chunk-GQPVDQEB.js.map +0 -1
  39. package/dist/chunk-V4GWI7WH.js.map +0 -1
  40. package/src/agent.test.ts +0 -114
  41. package/src/agent.ts +0 -335
  42. package/src/ai-builder.ts +0 -115
  43. package/src/app-params.ts +0 -69
  44. package/src/client.test.ts +0 -176
  45. package/src/client.ts +0 -229
  46. package/src/index.ts +0 -94
  47. package/src/release-channels.json +0 -103
  48. package/src/release-channels.test.ts +0 -41
  49. package/src/release-channels.ts +0 -41
  50. package/src/runtime.test.ts +0 -123
  51. package/src/runtime.ts +0 -211
  52. package/src/shop.test.ts +0 -114
  53. package/src/shop.ts +0 -1118
  54. package/src/supported-surface.ts +0 -33
  55. package/src/types.ts +0 -67
  56. package/src/vite.ts +0 -121
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deprecations.json","../src/deprecations.ts"],"names":[],"mappings":";AAAA,IAAA,oBAAA,GAAA;AAAA,EACE,eAAA,EAAmB,CAAA;AAAA,EACnB,MAAA,EAAU;AAAA,IACR,sBAAA,EAA0B,CAAA;AAAA,IAC1B,OAAA,EAAW;AAAA,GACb;AAAA,EACA,YAAA,EAAgB;AAAA,IACd;AAAA,MACE,EAAA,EAAM,oBAAA;AAAA,MACN,OAAA,EAAW,eAAA;AAAA,MACX,OAAA,EAAW,cAAA;AAAA,MACX,KAAA,EAAS,gCAAA;AAAA,MACT,YAAA,EAAgB,QAAA;AAAA,MAChB,QAAA,EAAY,QAAA;AAAA,MACZ,WAAA,EAAe,sNAAA;AAAA,MACf,IAAA,EAAQ,mSAAA;AAAA,MACR,KAAA,EAAS,CAAC,4BAAA,EAA8B,4BAAA,EAA8B,0BAA0B,CAAA;AAAA,MAChG,MAAA,EAAU,uGAAA;AAAA,MACV,OAAA,EAAW,2BAAA;AAAA,MACX,SAAA,EAAa;AAAA,KACf;AAAA,IACA;AAAA,MACE,EAAA,EAAM,+BAAA;AAAA,MACN,OAAA,EAAW,cAAA;AAAA,MACX,OAAA,EAAW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A;AACjC,EAAA,IAAI,GAAG,KAAA,KAAU,IAAA,CAAK,OAAO,OAAO,EAAA,CAAG,QAAQ,IAAA,CAAK,KAAA;AACpD,EAAA,OAAO,EAAA,CAAG,QAAQ,IAAA,CAAK,KAAA;AACzB;AAGO,SAAS,wBAAwB,GAAA,EAA8B;AACpE,EAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,GAAA,CAAI,YAAY,CAAA;AACrC,EAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,GAAA,CAAI,QAAQ,CAAA;AAG/B,EAAA,IAAI,EAAA,CAAG,KAAA,GAAQ,IAAA,CAAK,KAAA,SAAc,MAAA,CAAO,iBAAA;AACzC,EAAA,OAAO,EAAA,CAAG,QAAQ,IAAA,CAAK,KAAA;AACzB","file":"chunk-HA5O3CW7.js","sourcesContent":["{\n \"registryVersion\": 1,\n \"policy\": {\n \"minMinorsBeforeRemoval\": 2,\n \"summary\": \"Nothing is removed without a shim, and the deprecation is enumerable (spine I10). A deprecation is ANNOUNCED in a minor release and REMOVED no earlier than two minor releases later, so a store always has one whole release in which both the old and the new input work. Every shim's warning names its replacement (I2). Every row here carries a codemod id; a codemod that cannot be safe refuses and names the decision a human must make.\"\n },\n \"deprecations\": [\n {\n \"id\": \"admin.package.saas\",\n \"package\": \"@fayz-ai/saas\",\n \"surface\": \"package-name\",\n \"title\": \"the @fayz-ai/saas package name\",\n \"deprecatedIn\": \"0.10.0\",\n \"removeIn\": \"0.12.0\",\n \"replacement\": \"@fayz-ai/admin — same exports, same subpaths (/ui, /db, /org, /billing, /permissions), renamed because the package is the admin surface (shell, CRUD engine, org, billing, permissions), not the business model\",\n \"shim\": \"packages/saas is now a thin package that re-exports @fayz-ai/admin, so an app that has not migrated builds and runs unchanged. What it costs is a second package in the graph and one console warning per entry point per session. It ships no implementation, so there is no behaviour to drift.\",\n \"where\": [\"packages/saas/src/index.ts\", \"packages/saas/package.json\", \"packages/sdk/src/vite.ts\"],\n \"detect\": \"The app's package.json depends on @fayz-ai/saas, or any file under src/ imports from '@fayz-ai/saas'.\",\n \"codemod\": \"admin.saas-package-rename\",\n \"reference\": \"packages/saas/README.md\"\n },\n {\n \"id\": \"shop.provider.productMetadata\",\n \"package\": \"@fayz-ai/sdk\",\n \"surface\": \"provider-option\",\n \"title\": \"createFayzShopProvider({ productMetadata })\",\n \"deprecatedIn\": \"0.9.0\",\n \"removeIn\": \"0.11.0\",\n \"replacement\": \"product variants — plg_shop_product_variants, read through products.bySlug / getProductVariants (admin > product > variants)\",\n \"shim\": \"The overlay is still merged into each product's metadata for DISPLAY, so a store passing it keeps rendering. What it no longer does is define the option axes checkout sells: 0028 variants are the sellable unit and 0029 prices and names an order line from them. An axis that exists only in the overlay renders a picker that resolves to no variant.\",\n \"where\": [\"packages/sdk/src/shop.ts\", \"packages/storefront/src/data/product-options.ts\"],\n \"detect\": \"The app passes `productMetadata` to createFayzShopProvider (usually src/config/shop.ts), or the running provider warns once per session.\",\n \"codemod\": \"shop.product-metadata-overlay\",\n \"reference\": \"docs/storefront/storefront-architecture-spine.md (M5), docs/storefront/storefront-contract.md\"\n },\n {\n \"id\": \"storefront.commerce.discounts\",\n \"package\": \"@fayz-ai/storefront\",\n \"surface\": \"document-field\",\n \"title\": \"config.discounts / commerce.discounts (percent coupon codes)\",\n \"deprecatedIn\": \"0.9.0\",\n \"removeIn\": \"0.11.0\",\n \"replacement\": \"promotions.promotions — a rule-engine Promotion with an eligibility rule on `code` and a percentage application method (spine M6, I8)\",\n \"shim\": \"The provider still honours the legacy path: every `{code, percent}` entry is translated by storefrontDiscountToPromotion and evaluated by the ONE rule engine, so the money is identical. What the legacy shape cannot express is everything the engine exists for — buy-N-get-M, tiers, minimum subtotal, product/category scoping, automatic application.\",\n \"where\": [\n \"packages/shop/src/rules/adapter.ts\",\n \"packages/storefront/src/hooks/use-discount-validator.ts\",\n \"packages/storefront/src/document/sections.ts\"\n ],\n \"detect\": \"commerce.discounts is present in the Store Document (config.discounts in a config-derived document).\",\n \"codemod\": \"commerce.discounts-to-promotions\",\n \"reference\": \"docs/storefront/storefront-architecture-spine.md (M6, I8), docs/storefront/storefront-contract.md\"\n },\n {\n \"id\": \"shop.inventory.directCountWrite\",\n \"package\": \"@fayz-ai/shop\",\n \"surface\": \"sql-column-write\",\n \"title\": \"direct writes to plg_shop_product_variants.inventory_count (and plg_shop_products.inventory_count)\",\n \"deprecatedIn\": \"0.9.0\",\n \"removeIn\": \"0.11.0\",\n \"replacement\": \"insert a plg_shop_stock_movements row (receipt / adjustment / loss / count) — the ledger is the truth and inventory_count is its mirror\",\n \"shim\": \"0036 turns a direct write to a VARIANT count into an `adjustment` movement with reason `legacy_write`, and 0037 forwards a write to the PRODUCT count to that product's default variant the same way. Both RAISE a WARNING. The quantities are exact; the taxonomy is not — the shim is told a number changed and never why, so a sale arriving this way is recorded as an adjustment with no order_id.\",\n \"where\": [\n \"packages/shop/migrations/0036_inventory_count_mirror.sql\",\n \"packages/shop/migrations/0037_default_variant.sql\"\n ],\n \"signals\": [\n \"DEPRECATED (I10): direct write to plg_shop_product_variants.inventory_count\",\n \"DEPRECATED (I10): direct write to plg_shop_products.inventory_count\"\n ],\n \"detect\": \"Not visible in a store's repo: it is a property of the callers writing to a pool. Count the `legacy_write` reason in plg_shop_stock_movements — that count IS the migration backlog.\",\n \"codemod\": \"shop.inventory-count-write\",\n \"reference\": \"docs/storefront/inventory-model.md §6, §9 step 3\"\n },\n {\n \"id\": \"shop.placeOrder.variantless\",\n \"package\": \"@fayz-ai/shop\",\n \"surface\": \"sql-code-path\",\n \"title\": \"the variantless leg of shop_place_order\",\n \"deprecatedIn\": \"0.9.0\",\n \"removeIn\": \"0.11.0\",\n \"replacement\": \"every product gets a default variant (migration 0037), and the variant is the universal sellable unit — the order line resolves a variant and the sale reaches the ledger\",\n \"shim\": \"0039 keeps the leg: a line whose product has no variant at all still sells, guarded against the product-level inventory_count exactly as before 0034. It emits one enumerable NOTICE per order naming the products that took it, so the deprecation is countable rather than silent. Such a sale does NOT reach the stock ledger, so it answers none of the questions inventory-model.md §0 exists for.\",\n \"where\": [\"packages/shop/migrations/0039_place_order_ledger.sql\"],\n \"signals\": [\"shop_place_order: DEPRECATED variantless stock path used for\"],\n \"detect\": \"Not visible in a store's repo: it is pool state. Its exit condition is in 0039's header — the count of products with no variant must read 0 on every pool.\",\n \"codemod\": \"shop.place-order-variantless\",\n \"reference\": \"docs/storefront/inventory-model.md §10 q6, packages/shop/migrations/0039_place_order_ledger.sql (header)\"\n },\n {\n \"id\": \"storefront.backend.supabaseUrl\",\n \"package\": \"@fayz-ai/storefront\",\n \"surface\": \"document-field\",\n \"title\": \"config.supabaseUrl / backend.supabaseUrl\",\n \"deprecatedIn\": \"0.9.0\",\n \"removeIn\": \"0.11.0\",\n \"replacement\": \"auth.supabase.url\",\n \"shim\": \"The legacy field still rides in the backend section so an old config round-trips losslessly, and hydrateStoreDocument still sets config.supabaseUrl from it.\",\n \"where\": [\"packages/storefront/src/document/sections.ts\", \"packages/storefront/src/document/round-trip.ts\"],\n \"detect\": \"backend.supabaseUrl is present in the Store Document.\",\n \"codemod\": \"backend.supabase-to-auth\",\n \"reference\": \"docs/storefront/storefront-contract.md\"\n },\n {\n \"id\": \"storefront.backend.supabaseAnonKey\",\n \"package\": \"@fayz-ai/storefront\",\n \"surface\": \"document-field\",\n \"title\": \"config.supabaseAnonKey / backend.supabaseAnonKey\",\n \"deprecatedIn\": \"0.9.0\",\n \"removeIn\": \"0.11.0\",\n \"replacement\": \"auth.supabase.anonKey\",\n \"shim\": \"The legacy field still rides in the backend section so an old config round-trips losslessly, and hydrateStoreDocument still sets config.supabaseAnonKey from it.\",\n \"where\": [\"packages/storefront/src/document/sections.ts\", \"packages/storefront/src/document/round-trip.ts\"],\n \"detect\": \"backend.supabaseAnonKey is present in the Store Document.\",\n \"codemod\": \"backend.supabase-to-auth\",\n \"reference\": \"docs/storefront/storefront-contract.md\"\n }\n ]\n}\n","import registry from './deprecations.json'\n\n// ---------------------------------------------------------------------------\n// The deprecation registry — spine I10, as ROWS.\n//\n// \"Nothing is removed without a shim, and the deprecation is enumerable.\" The\n// enumerable half is this file. WooCommerce keeps 60 deprecated hooks alive\n// through a DECLARED map dispatched at runtime; the reason that works at their\n// scale is that the map is data one tool can read. Ours is\n// `deprecations.json`, and it lives here for the same reason\n// `supported-surface.json` and `release-channels.json` do: @fayz-ai/sdk has no\n// dependencies, so every package, the CLI and a generated app can all read the\n// same table without anyone taking a dependency to do it.\n//\n// Two properties are load-bearing, and both are tested:\n//\n// 1. EVERY warning names its replacement (I2). A shim that can import this\n// module builds its message with `deprecationMessage(id)`, so the warning\n// and the row cannot drift. A shim that CANNOT — PL/pgSQL cannot import\n// JSON — declares its literal marker text in the row's `signals`, and a\n// test asserts that text really occurs in the named migration.\n// 2. EVERY row carries a codemod id. `fayz upgrade` either transforms the\n// document or REFUSES and names the decision a human must make. A\n// deprecation with no answer at all is the thing this registry exists to\n// make impossible.\n//\n// The policy is a number, not a promise: a deprecation announced in 0.9 is\n// removed no earlier than 0.11, so a fleet always has one whole release in\n// which both the old and the new input work.\n// ---------------------------------------------------------------------------\n\n/** Where a deprecated thing lives, which is also what can detect it. */\nexport type FayzDeprecationSurface =\n /** A field of the Store Document (and of the config it is derived from). */\n | 'document-field'\n /** An option passed to a provider factory in the store's own code. */\n | 'provider-option'\n /** A write to a column that is no longer the truth. */\n | 'sql-column-write'\n /** A branch of a SQL function kept alive for data that has not migrated. */\n | 'sql-code-path'\n /** A package name kept alive by a re-export after the package was renamed. */\n | 'package-name'\n\nexport interface FayzDeprecation {\n /** Stable dotted id. The key everything else references. */\n id: string\n /** Package that owns the surface. */\n package: string\n surface: FayzDeprecationSurface\n /** What is deprecated, in the words the author would recognize. */\n title: string\n /** SDK minor in which the deprecation was ANNOUNCED. */\n deprecatedIn: string\n /** SDK minor in which the shim is REMOVED. */\n removeIn: string\n /** What to use instead. Every warning for this id names it (I2). */\n replacement: string\n /** What keeps working during the window, and precisely what it costs. */\n shim: string\n /** Repo paths where the shim lives — the registry has to be auditable. */\n where: string[]\n /**\n * Literal marker text the shim emits at runtime, for shims that cannot build\n * their message from this row (PL/pgSQL). Asserted against the real file by\n * packages/shop/src/deprecations.test.ts.\n */\n signals?: string[]\n /** How `fayz upgrade` finds it in a store — including \"you cannot, here is\n * the query that counts it in the pool instead\". */\n detect: string\n /** Codemod id that retires it. Never empty: a codemod that cannot be safe\n * exists anyway and refuses, naming the human decision. */\n codemod: string\n /** The design record. */\n reference: string\n}\n\nexport interface FayzDeprecationPolicy {\n /** Minimum number of minor releases between announcement and removal. */\n minMinorsBeforeRemoval: number\n summary: string\n}\n\nexport interface FayzDeprecationRegistry {\n registryVersion: number\n policy: FayzDeprecationPolicy\n deprecations: FayzDeprecation[]\n}\n\nconst table = registry as unknown as FayzDeprecationRegistry\n\nexport const fayzDeprecationPolicy: FayzDeprecationPolicy = table.policy\n\n/** Every deprecation, in declaration order. */\nexport function listDeprecations(): FayzDeprecation[] {\n return table.deprecations.map((row) => ({ ...row, where: [...row.where], signals: row.signals ? [...row.signals] : undefined }))\n}\n\n/** One row by id. Unknown ids throw and name the valid set (I2). */\nexport function getDeprecation(id: string): FayzDeprecation {\n const row = table.deprecations.find((entry) => entry.id === id)\n if (!row) {\n throw new Error(\n `Unknown deprecation id \"${id}\". Valid: ${table.deprecations.map((entry) => entry.id).join(', ')}`,\n )\n }\n return row\n}\n\nexport function hasDeprecation(id: string): boolean {\n return table.deprecations.some((entry) => entry.id === id)\n}\n\n/** Deprecation ids a given codemod retires. */\nexport function deprecationsForCodemod(codemod: string): FayzDeprecation[] {\n return table.deprecations.filter((entry) => entry.codemod === codemod)\n}\n\n/** Every codemod id the registry references, deduped, in declaration order. */\nexport function listDeprecationCodemods(): string[] {\n return [...new Set(table.deprecations.map((entry) => entry.codemod))]\n}\n\n/**\n * The warning text for a deprecation — the ONE place its prose is built.\n *\n * `context` is the caller's specifics (\"on variant abc\", \"at commerce.discounts[0]\");\n * it is appended, never substituted, so no caller can drop the replacement.\n */\nexport function deprecationMessage(id: string, context?: string): string {\n const row = getDeprecation(id)\n const where = context ? ` ${context}` : ''\n return (\n `DEPRECATED (${row.id}):${where} ${row.title} is deprecated since ${row.deprecatedIn} ` +\n `and is REMOVED in ${row.removeIn}. Use instead: ${row.replacement}. ` +\n `Migrate with \\`fayz upgrade\\` (codemod ${row.codemod}).`\n )\n}\n\nconst warned = new Set<string>()\n\n/**\n * Warn once per id per session.\n *\n * Once, because the alternative is one line per request, which buries the\n * signal this exists to produce. The dedupe key is the ID ALONE, not\n * (id, context): a shim whose context varies per call would otherwise\n * re-warn forever and reintroduce exactly the flood the once-ness exists to\n * prevent. Returns true when it actually warned, so a shim is testable\n * without reading the console.\n */\nexport function warnDeprecated(id: string, context?: string): boolean {\n if (warned.has(id)) return false\n warned.add(id)\n console.warn(deprecationMessage(id, context))\n return true\n}\n\n/** Test seam — re-arms every once-per-session deprecation warning. */\nexport function resetDeprecationWarnings(): void {\n warned.clear()\n}\n\nfunction minorOf(version: string): { major: number; minor: number } {\n const [major = '0', minor = '0'] = version.split('.')\n return { major: Number(major), minor: Number(minor) }\n}\n\n/**\n * Does `version` still get the shim?\n *\n * The question every consumer actually asks, answered from the table rather\n * than from a comment. Compared on (major, minor) because the policy is stated\n * in minors — a patch never removes anything.\n */\nexport function isDeprecationShimmed(id: string, version: string): boolean {\n const row = getDeprecation(id)\n const at = minorOf(version)\n const gone = minorOf(row.removeIn)\n if (at.major !== gone.major) return at.major < gone.major\n return at.minor < gone.minor\n}\n\n/** Minors between announcement and removal — the policy's unit. */\nexport function deprecationWindowMinors(row: FayzDeprecation): number {\n const from = minorOf(row.deprecatedIn)\n const to = minorOf(row.removeIn)\n // Majors are not commensurable with minors; a major bump is treated as\n // \"far beyond the window\", which is the only safe reading.\n if (to.major > from.major) return Number.POSITIVE_INFINITY\n return to.minor - from.minor\n}\n\nexport { table as fayzDeprecationRegistry }\n"]}
@@ -0,0 +1,135 @@
1
+ // src/release-channels.json
2
+ var release_channels_default = {
3
+ channels: {
4
+ stable: {
5
+ "@fayz-ai/sdk": "^0.10.1",
6
+ "@fayz-ai/admin": "^0.10.0",
7
+ "@fayz-ai/core": "^0.10.0",
8
+ "@fayz-ai/auth": "^0.10.0",
9
+ "@fayz-ai/ui": "^0.10.1",
10
+ "@fayz-ai/shop": "^0.10.0",
11
+ "@fayz-ai/storefront": "^0.10.0",
12
+ "@fayz-ai/portal": "^0.10.0",
13
+ "@fayz-ai/courses": "^0.10.0",
14
+ "@fayz-ai/db": "^0.10.0",
15
+ "@fayz-ai/plugin-agenda": "^0.9.1",
16
+ "@fayz-ai/plugin-auth": "^0.9.1",
17
+ "@fayz-ai/plugin-automations": "^0.9.1",
18
+ "@fayz-ai/plugin-blog": "^0.10.0",
19
+ "@fayz-ai/plugin-conversations": "^0.9.1",
20
+ "@fayz-ai/plugin-courses": "^0.9.1",
21
+ "@fayz-ai/plugin-crm": "^0.9.1",
22
+ "@fayz-ai/plugin-dashboard": "^0.9.1",
23
+ "@fayz-ai/plugin-financial": "^0.9.1",
24
+ "@fayz-ai/plugin-forms": "^0.9.1",
25
+ "@fayz-ai/plugin-inventory": "^0.9.1",
26
+ "@fayz-ai/plugin-marketing": "^0.9.1",
27
+ "@fayz-ai/plugin-menu": "^0.9.1",
28
+ "@fayz-ai/plugin-orders": "^0.9.1",
29
+ "@fayz-ai/plugin-payments": "^0.9.1",
30
+ "@fayz-ai/plugin-reports": "^0.9.1",
31
+ "@fayz-ai/plugin-reputation": "^0.9.1",
32
+ "@fayz-ai/plugin-shop": "^0.9.1",
33
+ "@fayz-ai/plugin-sites": "^0.9.1",
34
+ "@fayz-ai/plugin-tables": "^0.9.1",
35
+ "@fayz-ai/plugin-tasks": "^0.9.1"
36
+ },
37
+ latest: {
38
+ "@fayz-ai/sdk": "^0.10.1",
39
+ "@fayz-ai/admin": "^0.10.0",
40
+ "@fayz-ai/core": "^0.10.0",
41
+ "@fayz-ai/auth": "^0.10.0",
42
+ "@fayz-ai/ui": "^0.10.1",
43
+ "@fayz-ai/shop": "^0.10.0",
44
+ "@fayz-ai/storefront": "^0.10.0",
45
+ "@fayz-ai/portal": "^0.10.0",
46
+ "@fayz-ai/courses": "^0.10.0",
47
+ "@fayz-ai/db": "^0.10.0",
48
+ "@fayz-ai/plugin-agenda": "^0.9.1",
49
+ "@fayz-ai/plugin-auth": "^0.9.1",
50
+ "@fayz-ai/plugin-automations": "^0.9.1",
51
+ "@fayz-ai/plugin-blog": "^0.10.0",
52
+ "@fayz-ai/plugin-conversations": "^0.9.1",
53
+ "@fayz-ai/plugin-courses": "^0.9.1",
54
+ "@fayz-ai/plugin-crm": "^0.9.1",
55
+ "@fayz-ai/plugin-dashboard": "^0.9.1",
56
+ "@fayz-ai/plugin-financial": "^0.9.1",
57
+ "@fayz-ai/plugin-forms": "^0.9.1",
58
+ "@fayz-ai/plugin-inventory": "^0.9.1",
59
+ "@fayz-ai/plugin-marketing": "^0.9.1",
60
+ "@fayz-ai/plugin-menu": "^0.9.1",
61
+ "@fayz-ai/plugin-orders": "^0.9.1",
62
+ "@fayz-ai/plugin-payments": "^0.9.1",
63
+ "@fayz-ai/plugin-reports": "^0.9.1",
64
+ "@fayz-ai/plugin-reputation": "^0.9.1",
65
+ "@fayz-ai/plugin-shop": "^0.9.1",
66
+ "@fayz-ai/plugin-sites": "^0.9.1",
67
+ "@fayz-ai/plugin-tables": "^0.9.1",
68
+ "@fayz-ai/plugin-tasks": "^0.9.1"
69
+ },
70
+ preview: {
71
+ "@fayz-ai/sdk": "^0.10.1",
72
+ "@fayz-ai/admin": "^0.10.0",
73
+ "@fayz-ai/core": "^0.10.0",
74
+ "@fayz-ai/auth": "^0.10.0",
75
+ "@fayz-ai/ui": "^0.10.1",
76
+ "@fayz-ai/shop": "^0.10.0",
77
+ "@fayz-ai/storefront": "^0.10.0",
78
+ "@fayz-ai/portal": "^0.10.0",
79
+ "@fayz-ai/courses": "^0.10.0",
80
+ "@fayz-ai/db": "^0.10.0",
81
+ "@fayz-ai/plugin-agenda": "^0.9.1",
82
+ "@fayz-ai/plugin-auth": "^0.9.1",
83
+ "@fayz-ai/plugin-automations": "^0.9.1",
84
+ "@fayz-ai/plugin-blog": "^0.10.0",
85
+ "@fayz-ai/plugin-conversations": "^0.9.1",
86
+ "@fayz-ai/plugin-courses": "^0.9.1",
87
+ "@fayz-ai/plugin-crm": "^0.9.1",
88
+ "@fayz-ai/plugin-dashboard": "^0.9.1",
89
+ "@fayz-ai/plugin-financial": "^0.9.1",
90
+ "@fayz-ai/plugin-forms": "^0.9.1",
91
+ "@fayz-ai/plugin-inventory": "^0.9.1",
92
+ "@fayz-ai/plugin-marketing": "^0.9.1",
93
+ "@fayz-ai/plugin-menu": "^0.9.1",
94
+ "@fayz-ai/plugin-orders": "^0.9.1",
95
+ "@fayz-ai/plugin-payments": "^0.9.1",
96
+ "@fayz-ai/plugin-reports": "^0.9.1",
97
+ "@fayz-ai/plugin-reputation": "^0.9.1",
98
+ "@fayz-ai/plugin-shop": "^0.9.1",
99
+ "@fayz-ai/plugin-sites": "^0.9.1",
100
+ "@fayz-ai/plugin-tables": "^0.9.1",
101
+ "@fayz-ai/plugin-tasks": "^0.9.1"
102
+ }
103
+ }
104
+ };
105
+
106
+ // src/release-channels.ts
107
+ var releaseChannelPackages = release_channels_default.channels;
108
+ function buildVersionSet(channel) {
109
+ return {
110
+ channel,
111
+ packages: { ...releaseChannelPackages[channel] }
112
+ };
113
+ }
114
+ var fayzPackageVersionSets = {
115
+ stable: buildVersionSet("stable"),
116
+ latest: buildVersionSet("latest"),
117
+ preview: buildVersionSet("preview")
118
+ };
119
+ function resolveFayzPackageVersions(channel = "stable") {
120
+ return fayzPackageVersionSets[channel];
121
+ }
122
+ function resolveFayzPackageDependencies(channel = "stable") {
123
+ return { ...resolveFayzPackageVersions(channel).packages };
124
+ }
125
+ function resolveFayzPackageVersion(packageName, channel = "stable") {
126
+ const version = resolveFayzPackageVersions(channel).packages[packageName];
127
+ if (!version) {
128
+ throw new Error(`No Fayz package version configured for ${packageName} in ${channel} channel`);
129
+ }
130
+ return version;
131
+ }
132
+
133
+ export { fayzPackageVersionSets, resolveFayzPackageDependencies, resolveFayzPackageVersion, resolveFayzPackageVersions };
134
+ //# sourceMappingURL=chunk-KVMRRT3O.js.map
135
+ //# sourceMappingURL=chunk-KVMRRT3O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/release-channels.json","../src/release-channels.ts"],"names":[],"mappings":";AAAA,IAAA,wBAAA,GAAA;AAAA,EACE,QAAA,EAAY;AAAA,IACV,MAAA,EAAU;AAAA,MACR,cAAA,EAAgB,SAAA;AAAA,MAChB,gBAAA,EAAkB,SAAA;AAAA,MAClB,eAAA,EAAiB,SAAA;AAAA,MACjB,eAAA,EAAiB,SAAA;AAAA,MACjB,aAAA,EAAe,SAAA;AAAA,MACf,eAAA,EAAiB,SAAA;AAAA,MACjB,qBAAA,EAAuB,SAAA;AAAA,MACvB,iBAAA,EAAmB,SAAA;AAAA,MACnB,kBAAA,EAAoB,SAAA;AAAA,MACpB,aAAA,EAAe,SAAA;AAAA,MACf,wBAAA,EAA0B,QAAA;AAAA,MAC1B,sBAAA,EAAwB,QAAA;AAAA,MACxB,6BAAA,EAA+B,QAAA;AAAA,MAC/B,sBAAA,EAAwB,SAAA;AAAA,MACxB,+BAAA,EAAiC,QAAA;AAAA,MACjC,yBAAA,EAA2B,QAAA;AAAA,MAC3B,qBAAA,EAAuB,QAAA;AAAA,MACvB,2BAAA,EAA6B,QAAA;AAAA,MAC7B,2BAAA,EAA6B,QAAA;AAAA,MAC7B,uBAAA,EAAyB,QAAA;AAAA,MACzB,2BAAA,EAA6B,QAAA;AAAA,MAC7B,2BAAA,EAA6B,QAAA;AAAA,MAC7B,sBAAA,EAAwB,QAAA;AAAA,MACxB,wBAAA,EAA0B,QAAA;AAAA,MAC1B,0BAAA,EAA4B,QAAA;AAAA,MAC5B,yBAAA,EAA2B,QAAA;AAAA,MAC3B,4BAAA,EAA8B,QAAA;AAAA,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AQ,gBAAgB,QAAQ,CAAA;AAAA,EAChC,MAAA,EAAQ,gBAAgB,QAAQ,CAAA;AAAA,EAChC,OAAA,EAAS,gBAAgB,SAAS;AACpC;AAEO,SAAS,0BAAA,CAA2B,UAA8B,QAAA,EAAiC;AACxG,EAAA,OAAO,uBAAuB,OAAO,CAAA;AACvC;AAEO,SAAS,8BAAA,CAA+B,UAA8B,QAAA,EAAkC;AAC7G,EAAA,OAAO,EAAE,GAAG,0BAAA,CAA2B,OAAO,EAAE,QAAA,EAAS;AAC3D;AAEO,SAAS,yBAAA,CAA0B,WAAA,EAAqB,OAAA,GAA8B,QAAA,EAAkB;AAC7G,EAAA,MAAM,OAAA,GAAU,0BAAA,CAA2B,OAAO,CAAA,CAAE,SAAS,WAAW,CAAA;AAExE,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,uCAAA,EAA0C,WAAW,CAAA,IAAA,EAAO,OAAO,CAAA,QAAA,CAAU,CAAA;AAAA,EAC/F;AAEA,EAAA,OAAO,OAAA;AACT","file":"chunk-KVMRRT3O.js","sourcesContent":["{\n \"channels\": {\n \"stable\": {\n \"@fayz-ai/sdk\": \"^0.10.1\",\n \"@fayz-ai/admin\": \"^0.10.0\",\n \"@fayz-ai/core\": \"^0.10.0\",\n \"@fayz-ai/auth\": \"^0.10.0\",\n \"@fayz-ai/ui\": \"^0.10.1\",\n \"@fayz-ai/shop\": \"^0.10.0\",\n \"@fayz-ai/storefront\": \"^0.10.0\",\n \"@fayz-ai/portal\": \"^0.10.0\",\n \"@fayz-ai/courses\": \"^0.10.0\",\n \"@fayz-ai/db\": \"^0.10.0\",\n \"@fayz-ai/plugin-agenda\": \"^0.9.1\",\n \"@fayz-ai/plugin-auth\": \"^0.9.1\",\n \"@fayz-ai/plugin-automations\": \"^0.9.1\",\n \"@fayz-ai/plugin-blog\": \"^0.10.0\",\n \"@fayz-ai/plugin-conversations\": \"^0.9.1\",\n \"@fayz-ai/plugin-courses\": \"^0.9.1\",\n \"@fayz-ai/plugin-crm\": \"^0.9.1\",\n \"@fayz-ai/plugin-dashboard\": \"^0.9.1\",\n \"@fayz-ai/plugin-financial\": \"^0.9.1\",\n \"@fayz-ai/plugin-forms\": \"^0.9.1\",\n \"@fayz-ai/plugin-inventory\": \"^0.9.1\",\n \"@fayz-ai/plugin-marketing\": \"^0.9.1\",\n \"@fayz-ai/plugin-menu\": \"^0.9.1\",\n \"@fayz-ai/plugin-orders\": \"^0.9.1\",\n \"@fayz-ai/plugin-payments\": \"^0.9.1\",\n \"@fayz-ai/plugin-reports\": \"^0.9.1\",\n \"@fayz-ai/plugin-reputation\": \"^0.9.1\",\n \"@fayz-ai/plugin-shop\": \"^0.9.1\",\n \"@fayz-ai/plugin-sites\": \"^0.9.1\",\n \"@fayz-ai/plugin-tables\": \"^0.9.1\",\n \"@fayz-ai/plugin-tasks\": \"^0.9.1\"\n },\n \"latest\": {\n \"@fayz-ai/sdk\": \"^0.10.1\",\n \"@fayz-ai/admin\": \"^0.10.0\",\n \"@fayz-ai/core\": \"^0.10.0\",\n \"@fayz-ai/auth\": \"^0.10.0\",\n \"@fayz-ai/ui\": \"^0.10.1\",\n \"@fayz-ai/shop\": \"^0.10.0\",\n \"@fayz-ai/storefront\": \"^0.10.0\",\n \"@fayz-ai/portal\": \"^0.10.0\",\n \"@fayz-ai/courses\": \"^0.10.0\",\n \"@fayz-ai/db\": \"^0.10.0\",\n \"@fayz-ai/plugin-agenda\": \"^0.9.1\",\n \"@fayz-ai/plugin-auth\": \"^0.9.1\",\n \"@fayz-ai/plugin-automations\": \"^0.9.1\",\n \"@fayz-ai/plugin-blog\": \"^0.10.0\",\n \"@fayz-ai/plugin-conversations\": \"^0.9.1\",\n \"@fayz-ai/plugin-courses\": \"^0.9.1\",\n \"@fayz-ai/plugin-crm\": \"^0.9.1\",\n \"@fayz-ai/plugin-dashboard\": \"^0.9.1\",\n \"@fayz-ai/plugin-financial\": \"^0.9.1\",\n \"@fayz-ai/plugin-forms\": \"^0.9.1\",\n \"@fayz-ai/plugin-inventory\": \"^0.9.1\",\n \"@fayz-ai/plugin-marketing\": \"^0.9.1\",\n \"@fayz-ai/plugin-menu\": \"^0.9.1\",\n \"@fayz-ai/plugin-orders\": \"^0.9.1\",\n \"@fayz-ai/plugin-payments\": \"^0.9.1\",\n \"@fayz-ai/plugin-reports\": \"^0.9.1\",\n \"@fayz-ai/plugin-reputation\": \"^0.9.1\",\n \"@fayz-ai/plugin-shop\": \"^0.9.1\",\n \"@fayz-ai/plugin-sites\": \"^0.9.1\",\n \"@fayz-ai/plugin-tables\": \"^0.9.1\",\n \"@fayz-ai/plugin-tasks\": \"^0.9.1\"\n },\n \"preview\": {\n \"@fayz-ai/sdk\": \"^0.10.1\",\n \"@fayz-ai/admin\": \"^0.10.0\",\n \"@fayz-ai/core\": \"^0.10.0\",\n \"@fayz-ai/auth\": \"^0.10.0\",\n \"@fayz-ai/ui\": \"^0.10.1\",\n \"@fayz-ai/shop\": \"^0.10.0\",\n \"@fayz-ai/storefront\": \"^0.10.0\",\n \"@fayz-ai/portal\": \"^0.10.0\",\n \"@fayz-ai/courses\": \"^0.10.0\",\n \"@fayz-ai/db\": \"^0.10.0\",\n \"@fayz-ai/plugin-agenda\": \"^0.9.1\",\n \"@fayz-ai/plugin-auth\": \"^0.9.1\",\n \"@fayz-ai/plugin-automations\": \"^0.9.1\",\n \"@fayz-ai/plugin-blog\": \"^0.10.0\",\n \"@fayz-ai/plugin-conversations\": \"^0.9.1\",\n \"@fayz-ai/plugin-courses\": \"^0.9.1\",\n \"@fayz-ai/plugin-crm\": \"^0.9.1\",\n \"@fayz-ai/plugin-dashboard\": \"^0.9.1\",\n \"@fayz-ai/plugin-financial\": \"^0.9.1\",\n \"@fayz-ai/plugin-forms\": \"^0.9.1\",\n \"@fayz-ai/plugin-inventory\": \"^0.9.1\",\n \"@fayz-ai/plugin-marketing\": \"^0.9.1\",\n \"@fayz-ai/plugin-menu\": \"^0.9.1\",\n \"@fayz-ai/plugin-orders\": \"^0.9.1\",\n \"@fayz-ai/plugin-payments\": \"^0.9.1\",\n \"@fayz-ai/plugin-reports\": \"^0.9.1\",\n \"@fayz-ai/plugin-reputation\": \"^0.9.1\",\n \"@fayz-ai/plugin-shop\": \"^0.9.1\",\n \"@fayz-ai/plugin-sites\": \"^0.9.1\",\n \"@fayz-ai/plugin-tables\": \"^0.9.1\",\n \"@fayz-ai/plugin-tasks\": \"^0.9.1\"\n }\n }\n}\n","import releaseChannels from './release-channels.json'\n\nexport type FayzPackageChannel = 'stable' | 'latest' | 'preview'\n\nexport interface FayzPackageVersionSet {\n channel: FayzPackageChannel\n packages: Record<string, string>\n}\n\nconst releaseChannelPackages = releaseChannels.channels as Record<FayzPackageChannel, Record<string, string>>\n\nfunction buildVersionSet(channel: FayzPackageChannel): FayzPackageVersionSet {\n return {\n channel,\n packages: { ...releaseChannelPackages[channel] },\n }\n}\n\nexport const fayzPackageVersionSets: Record<FayzPackageChannel, FayzPackageVersionSet> = {\n stable: buildVersionSet('stable'),\n latest: buildVersionSet('latest'),\n preview: buildVersionSet('preview'),\n}\n\nexport function resolveFayzPackageVersions(channel: FayzPackageChannel = 'stable'): FayzPackageVersionSet {\n return fayzPackageVersionSets[channel]\n}\n\nexport function resolveFayzPackageDependencies(channel: FayzPackageChannel = 'stable'): Record<string, string> {\n return { ...resolveFayzPackageVersions(channel).packages }\n}\n\nexport function resolveFayzPackageVersion(packageName: string, channel: FayzPackageChannel = 'stable'): string {\n const version = resolveFayzPackageVersions(channel).packages[packageName]\n\n if (!version) {\n throw new Error(`No Fayz package version configured for ${packageName} in ${channel} channel`)\n }\n\n return version\n}\n"]}
@@ -0,0 +1,98 @@
1
+ /** Where a deprecated thing lives, which is also what can detect it. */
2
+ export type FayzDeprecationSurface =
3
+ /** A field of the Store Document (and of the config it is derived from). */
4
+ 'document-field'
5
+ /** An option passed to a provider factory in the store's own code. */
6
+ | 'provider-option'
7
+ /** A write to a column that is no longer the truth. */
8
+ | 'sql-column-write'
9
+ /** A branch of a SQL function kept alive for data that has not migrated. */
10
+ | 'sql-code-path'
11
+ /** A package name kept alive by a re-export after the package was renamed. */
12
+ | 'package-name';
13
+ export interface FayzDeprecation {
14
+ /** Stable dotted id. The key everything else references. */
15
+ id: string;
16
+ /** Package that owns the surface. */
17
+ package: string;
18
+ surface: FayzDeprecationSurface;
19
+ /** What is deprecated, in the words the author would recognize. */
20
+ title: string;
21
+ /** SDK minor in which the deprecation was ANNOUNCED. */
22
+ deprecatedIn: string;
23
+ /** SDK minor in which the shim is REMOVED. */
24
+ removeIn: string;
25
+ /** What to use instead. Every warning for this id names it (I2). */
26
+ replacement: string;
27
+ /** What keeps working during the window, and precisely what it costs. */
28
+ shim: string;
29
+ /** Repo paths where the shim lives — the registry has to be auditable. */
30
+ where: string[];
31
+ /**
32
+ * Literal marker text the shim emits at runtime, for shims that cannot build
33
+ * their message from this row (PL/pgSQL). Asserted against the real file by
34
+ * packages/shop/src/deprecations.test.ts.
35
+ */
36
+ signals?: string[];
37
+ /** How `fayz upgrade` finds it in a store — including "you cannot, here is
38
+ * the query that counts it in the pool instead". */
39
+ detect: string;
40
+ /** Codemod id that retires it. Never empty: a codemod that cannot be safe
41
+ * exists anyway and refuses, naming the human decision. */
42
+ codemod: string;
43
+ /** The design record. */
44
+ reference: string;
45
+ }
46
+ export interface FayzDeprecationPolicy {
47
+ /** Minimum number of minor releases between announcement and removal. */
48
+ minMinorsBeforeRemoval: number;
49
+ summary: string;
50
+ }
51
+ export interface FayzDeprecationRegistry {
52
+ registryVersion: number;
53
+ policy: FayzDeprecationPolicy;
54
+ deprecations: FayzDeprecation[];
55
+ }
56
+ declare const table: FayzDeprecationRegistry;
57
+ export declare const fayzDeprecationPolicy: FayzDeprecationPolicy;
58
+ /** Every deprecation, in declaration order. */
59
+ export declare function listDeprecations(): FayzDeprecation[];
60
+ /** One row by id. Unknown ids throw and name the valid set (I2). */
61
+ export declare function getDeprecation(id: string): FayzDeprecation;
62
+ export declare function hasDeprecation(id: string): boolean;
63
+ /** Deprecation ids a given codemod retires. */
64
+ export declare function deprecationsForCodemod(codemod: string): FayzDeprecation[];
65
+ /** Every codemod id the registry references, deduped, in declaration order. */
66
+ export declare function listDeprecationCodemods(): string[];
67
+ /**
68
+ * The warning text for a deprecation — the ONE place its prose is built.
69
+ *
70
+ * `context` is the caller's specifics ("on variant abc", "at commerce.discounts[0]");
71
+ * it is appended, never substituted, so no caller can drop the replacement.
72
+ */
73
+ export declare function deprecationMessage(id: string, context?: string): string;
74
+ /**
75
+ * Warn once per id per session.
76
+ *
77
+ * Once, because the alternative is one line per request, which buries the
78
+ * signal this exists to produce. The dedupe key is the ID ALONE, not
79
+ * (id, context): a shim whose context varies per call would otherwise
80
+ * re-warn forever and reintroduce exactly the flood the once-ness exists to
81
+ * prevent. Returns true when it actually warned, so a shim is testable
82
+ * without reading the console.
83
+ */
84
+ export declare function warnDeprecated(id: string, context?: string): boolean;
85
+ /** Test seam — re-arms every once-per-session deprecation warning. */
86
+ export declare function resetDeprecationWarnings(): void;
87
+ /**
88
+ * Does `version` still get the shim?
89
+ *
90
+ * The question every consumer actually asks, answered from the table rather
91
+ * than from a comment. Compared on (major, minor) because the policy is stated
92
+ * in minors — a patch never removes anything.
93
+ */
94
+ export declare function isDeprecationShimmed(id: string, version: string): boolean;
95
+ /** Minors between announcement and removal — the policy's unit. */
96
+ export declare function deprecationWindowMinors(row: FayzDeprecation): number;
97
+ export { table as fayzDeprecationRegistry };
98
+ //# sourceMappingURL=deprecations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecations.d.ts","sourceRoot":"","sources":["../src/deprecations.ts"],"names":[],"mappings":"AA+BA,wEAAwE;AACxE,MAAM,MAAM,sBAAsB;AAChC,4EAA4E;AAC1E,gBAAgB;AAClB,sEAAsE;GACpE,iBAAiB;AACnB,uDAAuD;GACrD,kBAAkB;AACpB,4EAA4E;GAC1E,eAAe;AACjB,8EAA8E;GAC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G,eAAe,EAAE,CAEzE;AAED,+EAA+E;AAC/E,wBAAgB,uBAAuB,IAAI,MAAM,EAAE,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAQvE;AAID;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAKpE;AAED,sEAAsE;AACtE,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C;AAOD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAMzE;AAED,mEAAmE;AACnE,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAOpE;AAED,OAAO,EAAE,KAAK,IAAI,uBAAuB,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { deprecationMessage, deprecationWindowMinors, deprecationsForCodemod, fayzDeprecationPolicy, table as fayzDeprecationRegistry, getDeprecation, hasDeprecation, isDeprecationShimmed, listDeprecationCodemods, listDeprecations, resetDeprecationWarnings, warnDeprecated } from './chunk-HA5O3CW7.js';
2
+ //# sourceMappingURL=deprecations.js.map
3
+ //# sourceMappingURL=deprecations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"deprecations.js"}
@@ -0,0 +1,119 @@
1
+ {
2
+ "registryVersion": 1,
3
+ "policy": {
4
+ "minMinorsBeforeRemoval": 2,
5
+ "summary": "Nothing is removed without a shim, and the deprecation is enumerable (spine I10). A deprecation is ANNOUNCED in a minor release and REMOVED no earlier than two minor releases later, so a store always has one whole release in which both the old and the new input work. Every shim's warning names its replacement (I2). Every row here carries a codemod id; a codemod that cannot be safe refuses and names the decision a human must make."
6
+ },
7
+ "deprecations": [
8
+ {
9
+ "id": "admin.package.saas",
10
+ "package": "@fayz-ai/saas",
11
+ "surface": "package-name",
12
+ "title": "the @fayz-ai/saas package name",
13
+ "deprecatedIn": "0.10.0",
14
+ "removeIn": "0.12.0",
15
+ "replacement": "@fayz-ai/admin — same exports, same subpaths (/ui, /db, /org, /billing, /permissions), renamed because the package is the admin surface (shell, CRUD engine, org, billing, permissions), not the business model",
16
+ "shim": "packages/saas is now a thin package that re-exports @fayz-ai/admin, so an app that has not migrated builds and runs unchanged. What it costs is a second package in the graph and one console warning per entry point per session. It ships no implementation, so there is no behaviour to drift.",
17
+ "where": ["packages/saas/src/index.ts", "packages/saas/package.json", "packages/sdk/src/vite.ts"],
18
+ "detect": "The app's package.json depends on @fayz-ai/saas, or any file under src/ imports from '@fayz-ai/saas'.",
19
+ "codemod": "admin.saas-package-rename",
20
+ "reference": "packages/saas/README.md"
21
+ },
22
+ {
23
+ "id": "shop.provider.productMetadata",
24
+ "package": "@fayz-ai/sdk",
25
+ "surface": "provider-option",
26
+ "title": "createFayzShopProvider({ productMetadata })",
27
+ "deprecatedIn": "0.9.0",
28
+ "removeIn": "0.11.0",
29
+ "replacement": "product variants — plg_shop_product_variants, read through products.bySlug / getProductVariants (admin > product > variants)",
30
+ "shim": "The overlay is still merged into each product's metadata for DISPLAY, so a store passing it keeps rendering. What it no longer does is define the option axes checkout sells: 0028 variants are the sellable unit and 0029 prices and names an order line from them. An axis that exists only in the overlay renders a picker that resolves to no variant.",
31
+ "where": ["packages/sdk/src/shop.ts", "packages/storefront/src/data/product-options.ts"],
32
+ "detect": "The app passes `productMetadata` to createFayzShopProvider (usually src/config/shop.ts), or the running provider warns once per session.",
33
+ "codemod": "shop.product-metadata-overlay",
34
+ "reference": "docs/storefront/storefront-architecture-spine.md (M5), docs/storefront/storefront-contract.md"
35
+ },
36
+ {
37
+ "id": "storefront.commerce.discounts",
38
+ "package": "@fayz-ai/storefront",
39
+ "surface": "document-field",
40
+ "title": "config.discounts / commerce.discounts (percent coupon codes)",
41
+ "deprecatedIn": "0.9.0",
42
+ "removeIn": "0.11.0",
43
+ "replacement": "promotions.promotions — a rule-engine Promotion with an eligibility rule on `code` and a percentage application method (spine M6, I8)",
44
+ "shim": "The provider still honours the legacy path: every `{code, percent}` entry is translated by storefrontDiscountToPromotion and evaluated by the ONE rule engine, so the money is identical. What the legacy shape cannot express is everything the engine exists for — buy-N-get-M, tiers, minimum subtotal, product/category scoping, automatic application.",
45
+ "where": [
46
+ "packages/shop/src/rules/adapter.ts",
47
+ "packages/storefront/src/hooks/use-discount-validator.ts",
48
+ "packages/storefront/src/document/sections.ts"
49
+ ],
50
+ "detect": "commerce.discounts is present in the Store Document (config.discounts in a config-derived document).",
51
+ "codemod": "commerce.discounts-to-promotions",
52
+ "reference": "docs/storefront/storefront-architecture-spine.md (M6, I8), docs/storefront/storefront-contract.md"
53
+ },
54
+ {
55
+ "id": "shop.inventory.directCountWrite",
56
+ "package": "@fayz-ai/shop",
57
+ "surface": "sql-column-write",
58
+ "title": "direct writes to plg_shop_product_variants.inventory_count (and plg_shop_products.inventory_count)",
59
+ "deprecatedIn": "0.9.0",
60
+ "removeIn": "0.11.0",
61
+ "replacement": "insert a plg_shop_stock_movements row (receipt / adjustment / loss / count) — the ledger is the truth and inventory_count is its mirror",
62
+ "shim": "0036 turns a direct write to a VARIANT count into an `adjustment` movement with reason `legacy_write`, and 0037 forwards a write to the PRODUCT count to that product's default variant the same way. Both RAISE a WARNING. The quantities are exact; the taxonomy is not — the shim is told a number changed and never why, so a sale arriving this way is recorded as an adjustment with no order_id.",
63
+ "where": [
64
+ "packages/shop/migrations/0036_inventory_count_mirror.sql",
65
+ "packages/shop/migrations/0037_default_variant.sql"
66
+ ],
67
+ "signals": [
68
+ "DEPRECATED (I10): direct write to plg_shop_product_variants.inventory_count",
69
+ "DEPRECATED (I10): direct write to plg_shop_products.inventory_count"
70
+ ],
71
+ "detect": "Not visible in a store's repo: it is a property of the callers writing to a pool. Count the `legacy_write` reason in plg_shop_stock_movements — that count IS the migration backlog.",
72
+ "codemod": "shop.inventory-count-write",
73
+ "reference": "docs/storefront/inventory-model.md §6, §9 step 3"
74
+ },
75
+ {
76
+ "id": "shop.placeOrder.variantless",
77
+ "package": "@fayz-ai/shop",
78
+ "surface": "sql-code-path",
79
+ "title": "the variantless leg of shop_place_order",
80
+ "deprecatedIn": "0.9.0",
81
+ "removeIn": "0.11.0",
82
+ "replacement": "every product gets a default variant (migration 0037), and the variant is the universal sellable unit — the order line resolves a variant and the sale reaches the ledger",
83
+ "shim": "0039 keeps the leg: a line whose product has no variant at all still sells, guarded against the product-level inventory_count exactly as before 0034. It emits one enumerable NOTICE per order naming the products that took it, so the deprecation is countable rather than silent. Such a sale does NOT reach the stock ledger, so it answers none of the questions inventory-model.md §0 exists for.",
84
+ "where": ["packages/shop/migrations/0039_place_order_ledger.sql"],
85
+ "signals": ["shop_place_order: DEPRECATED variantless stock path used for"],
86
+ "detect": "Not visible in a store's repo: it is pool state. Its exit condition is in 0039's header — the count of products with no variant must read 0 on every pool.",
87
+ "codemod": "shop.place-order-variantless",
88
+ "reference": "docs/storefront/inventory-model.md §10 q6, packages/shop/migrations/0039_place_order_ledger.sql (header)"
89
+ },
90
+ {
91
+ "id": "storefront.backend.supabaseUrl",
92
+ "package": "@fayz-ai/storefront",
93
+ "surface": "document-field",
94
+ "title": "config.supabaseUrl / backend.supabaseUrl",
95
+ "deprecatedIn": "0.9.0",
96
+ "removeIn": "0.11.0",
97
+ "replacement": "auth.supabase.url",
98
+ "shim": "The legacy field still rides in the backend section so an old config round-trips losslessly, and hydrateStoreDocument still sets config.supabaseUrl from it.",
99
+ "where": ["packages/storefront/src/document/sections.ts", "packages/storefront/src/document/round-trip.ts"],
100
+ "detect": "backend.supabaseUrl is present in the Store Document.",
101
+ "codemod": "backend.supabase-to-auth",
102
+ "reference": "docs/storefront/storefront-contract.md"
103
+ },
104
+ {
105
+ "id": "storefront.backend.supabaseAnonKey",
106
+ "package": "@fayz-ai/storefront",
107
+ "surface": "document-field",
108
+ "title": "config.supabaseAnonKey / backend.supabaseAnonKey",
109
+ "deprecatedIn": "0.9.0",
110
+ "removeIn": "0.11.0",
111
+ "replacement": "auth.supabase.anonKey",
112
+ "shim": "The legacy field still rides in the backend section so an old config round-trips losslessly, and hydrateStoreDocument still sets config.supabaseAnonKey from it.",
113
+ "where": ["packages/storefront/src/document/sections.ts", "packages/storefront/src/document/round-trip.ts"],
114
+ "detect": "backend.supabaseAnonKey is present in the Store Document.",
115
+ "codemod": "backend.supabase-to-auth",
116
+ "reference": "docs/storefront/storefront-contract.md"
117
+ }
118
+ ]
119
+ }
package/dist/index.d.ts CHANGED
@@ -5,6 +5,8 @@ export { fayzPackageVersionSets, resolveFayzPackageDependencies, resolveFayzPack
5
5
  export type { FayzPackageChannel, FayzPackageVersionSet } from './release-channels';
6
6
  export { getSupportedPackages, getInternalPackages, isSupportedPackage, fayzSupportedSurface, } from './supported-surface';
7
7
  export type { FayzPackageTier, FayzSupportedSurface } from './supported-surface';
8
+ export { deprecationMessage, deprecationWindowMinors, deprecationsForCodemod, fayzDeprecationPolicy, fayzDeprecationRegistry, getDeprecation, hasDeprecation, isDeprecationShimmed, listDeprecationCodemods, listDeprecations, resetDeprecationWarnings, warnDeprecated, } from './deprecations';
9
+ export type { FayzDeprecation, FayzDeprecationPolicy, FayzDeprecationRegistry, FayzDeprecationSurface, } from './deprecations';
8
10
  export { AI_BUILDER_REQUEST_CLASSES, AI_BUILDER_REQUEST_CLASS_IDS, isAllowedRequestClass, } from './ai-builder';
9
11
  export type { FayzLayer, AiBuilderRequestClass, AiBuilderRequestClassDef, } from './ai-builder';
10
12
  export { createFayzRuntimeClient, FayzRuntimeError, } from './runtime';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE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AAM,QAAQ,CAAA;AACf,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,WAAW,CAAA;AAClB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,eAAe,GAChB,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC/D,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AACnF,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAChF,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,GACf,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,SAAS,EACT,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC/D,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,sBAAsB,EACtB,aAAa,GACd,MAAM,QAAQ,CAAA;AACf,YAAY,EACV,uBAAuB,EACvB,8BAA8B,EAC9B,2BAA2B,EAC3B,yBAAyB,EACzB,4BAA4B,EAC5B,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,QAAQ,CAAA;AACf,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,WAAW,CAAA;AAClB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,eAAe,GAChB,MAAM,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
+ export { AI_BUILDER_REQUEST_CLASSES, AI_BUILDER_REQUEST_CLASS_IDS, isAllowedRequestClass } from './chunk-BJFMBVMP.js';
1
2
  export { FayzApiError, createFayzClient, fayz } from './chunk-UWOQAD5A.js';
2
3
  export { FayzRuntimeError, createFayzRuntimeClient } from './chunk-FRIOW6KW.js';
3
4
  export { appParams, resolveAppParams } from './chunk-YGX37DT3.js';
4
5
  export { FayzAgentError, createFayzAgentClient } from './chunk-LSBVNW75.js';
5
- export { FayzShopError, createFayzShopProvider } from './chunk-V4GWI7WH.js';
6
- export { fayzPackageVersionSets, resolveFayzPackageDependencies, resolveFayzPackageVersion, resolveFayzPackageVersions } from './chunk-GQPVDQEB.js';
7
- export { surface as fayzSupportedSurface, getInternalPackages, getSupportedPackages, isSupportedPackage } from './chunk-2YJXKDHO.js';
8
- export { AI_BUILDER_REQUEST_CLASSES, AI_BUILDER_REQUEST_CLASS_IDS, isAllowedRequestClass } from './chunk-7XM4LONE.js';
6
+ export { FayzShopError, createFayzShopProvider } from './chunk-7UXTYT6I.js';
7
+ export { deprecationMessage, deprecationWindowMinors, deprecationsForCodemod, fayzDeprecationPolicy, table as fayzDeprecationRegistry, getDeprecation, hasDeprecation, isDeprecationShimmed, listDeprecationCodemods, listDeprecations, resetDeprecationWarnings, warnDeprecated } from './chunk-HA5O3CW7.js';
8
+ export { fayzPackageVersionSets, resolveFayzPackageDependencies, resolveFayzPackageVersion, resolveFayzPackageVersions } from './chunk-KVMRRT3O.js';
9
+ export { surface as fayzSupportedSurface, getInternalPackages, getSupportedPackages, isSupportedPackage } from './chunk-6UZOXHGJ.js';
9
10
  //# sourceMappingURL=index.js.map
10
11
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export { fayzPackageVersionSets, resolveFayzPackageDependencies, resolveFayzPackageVersion, resolveFayzPackageVersions } from './chunk-GQPVDQEB.js';
1
+ export { fayzPackageVersionSets, resolveFayzPackageDependencies, resolveFayzPackageVersion, resolveFayzPackageVersions } from './chunk-KVMRRT3O.js';
2
2
  //# sourceMappingURL=release-channels.js.map
3
3
  //# sourceMappingURL=release-channels.js.map
@@ -0,0 +1,103 @@
1
+ {
2
+ "channels": {
3
+ "stable": {
4
+ "@fayz-ai/sdk": "^0.10.1",
5
+ "@fayz-ai/admin": "^0.10.0",
6
+ "@fayz-ai/core": "^0.10.0",
7
+ "@fayz-ai/auth": "^0.10.0",
8
+ "@fayz-ai/ui": "^0.10.1",
9
+ "@fayz-ai/shop": "^0.10.0",
10
+ "@fayz-ai/storefront": "^0.10.0",
11
+ "@fayz-ai/portal": "^0.10.0",
12
+ "@fayz-ai/courses": "^0.10.0",
13
+ "@fayz-ai/db": "^0.10.0",
14
+ "@fayz-ai/plugin-agenda": "^0.9.1",
15
+ "@fayz-ai/plugin-auth": "^0.9.1",
16
+ "@fayz-ai/plugin-automations": "^0.9.1",
17
+ "@fayz-ai/plugin-blog": "^0.10.0",
18
+ "@fayz-ai/plugin-conversations": "^0.9.1",
19
+ "@fayz-ai/plugin-courses": "^0.9.1",
20
+ "@fayz-ai/plugin-crm": "^0.9.1",
21
+ "@fayz-ai/plugin-dashboard": "^0.9.1",
22
+ "@fayz-ai/plugin-financial": "^0.9.1",
23
+ "@fayz-ai/plugin-forms": "^0.9.1",
24
+ "@fayz-ai/plugin-inventory": "^0.9.1",
25
+ "@fayz-ai/plugin-marketing": "^0.9.1",
26
+ "@fayz-ai/plugin-menu": "^0.9.1",
27
+ "@fayz-ai/plugin-orders": "^0.9.1",
28
+ "@fayz-ai/plugin-payments": "^0.9.1",
29
+ "@fayz-ai/plugin-reports": "^0.9.1",
30
+ "@fayz-ai/plugin-reputation": "^0.9.1",
31
+ "@fayz-ai/plugin-shop": "^0.9.1",
32
+ "@fayz-ai/plugin-sites": "^0.9.1",
33
+ "@fayz-ai/plugin-tables": "^0.9.1",
34
+ "@fayz-ai/plugin-tasks": "^0.9.1"
35
+ },
36
+ "latest": {
37
+ "@fayz-ai/sdk": "^0.10.1",
38
+ "@fayz-ai/admin": "^0.10.0",
39
+ "@fayz-ai/core": "^0.10.0",
40
+ "@fayz-ai/auth": "^0.10.0",
41
+ "@fayz-ai/ui": "^0.10.1",
42
+ "@fayz-ai/shop": "^0.10.0",
43
+ "@fayz-ai/storefront": "^0.10.0",
44
+ "@fayz-ai/portal": "^0.10.0",
45
+ "@fayz-ai/courses": "^0.10.0",
46
+ "@fayz-ai/db": "^0.10.0",
47
+ "@fayz-ai/plugin-agenda": "^0.9.1",
48
+ "@fayz-ai/plugin-auth": "^0.9.1",
49
+ "@fayz-ai/plugin-automations": "^0.9.1",
50
+ "@fayz-ai/plugin-blog": "^0.10.0",
51
+ "@fayz-ai/plugin-conversations": "^0.9.1",
52
+ "@fayz-ai/plugin-courses": "^0.9.1",
53
+ "@fayz-ai/plugin-crm": "^0.9.1",
54
+ "@fayz-ai/plugin-dashboard": "^0.9.1",
55
+ "@fayz-ai/plugin-financial": "^0.9.1",
56
+ "@fayz-ai/plugin-forms": "^0.9.1",
57
+ "@fayz-ai/plugin-inventory": "^0.9.1",
58
+ "@fayz-ai/plugin-marketing": "^0.9.1",
59
+ "@fayz-ai/plugin-menu": "^0.9.1",
60
+ "@fayz-ai/plugin-orders": "^0.9.1",
61
+ "@fayz-ai/plugin-payments": "^0.9.1",
62
+ "@fayz-ai/plugin-reports": "^0.9.1",
63
+ "@fayz-ai/plugin-reputation": "^0.9.1",
64
+ "@fayz-ai/plugin-shop": "^0.9.1",
65
+ "@fayz-ai/plugin-sites": "^0.9.1",
66
+ "@fayz-ai/plugin-tables": "^0.9.1",
67
+ "@fayz-ai/plugin-tasks": "^0.9.1"
68
+ },
69
+ "preview": {
70
+ "@fayz-ai/sdk": "^0.10.1",
71
+ "@fayz-ai/admin": "^0.10.0",
72
+ "@fayz-ai/core": "^0.10.0",
73
+ "@fayz-ai/auth": "^0.10.0",
74
+ "@fayz-ai/ui": "^0.10.1",
75
+ "@fayz-ai/shop": "^0.10.0",
76
+ "@fayz-ai/storefront": "^0.10.0",
77
+ "@fayz-ai/portal": "^0.10.0",
78
+ "@fayz-ai/courses": "^0.10.0",
79
+ "@fayz-ai/db": "^0.10.0",
80
+ "@fayz-ai/plugin-agenda": "^0.9.1",
81
+ "@fayz-ai/plugin-auth": "^0.9.1",
82
+ "@fayz-ai/plugin-automations": "^0.9.1",
83
+ "@fayz-ai/plugin-blog": "^0.10.0",
84
+ "@fayz-ai/plugin-conversations": "^0.9.1",
85
+ "@fayz-ai/plugin-courses": "^0.9.1",
86
+ "@fayz-ai/plugin-crm": "^0.9.1",
87
+ "@fayz-ai/plugin-dashboard": "^0.9.1",
88
+ "@fayz-ai/plugin-financial": "^0.9.1",
89
+ "@fayz-ai/plugin-forms": "^0.9.1",
90
+ "@fayz-ai/plugin-inventory": "^0.9.1",
91
+ "@fayz-ai/plugin-marketing": "^0.9.1",
92
+ "@fayz-ai/plugin-menu": "^0.9.1",
93
+ "@fayz-ai/plugin-orders": "^0.9.1",
94
+ "@fayz-ai/plugin-payments": "^0.9.1",
95
+ "@fayz-ai/plugin-reports": "^0.9.1",
96
+ "@fayz-ai/plugin-reputation": "^0.9.1",
97
+ "@fayz-ai/plugin-shop": "^0.9.1",
98
+ "@fayz-ai/plugin-sites": "^0.9.1",
99
+ "@fayz-ai/plugin-tables": "^0.9.1",
100
+ "@fayz-ai/plugin-tasks": "^0.9.1"
101
+ }
102
+ }
103
+ }