@happyvertical/smrt-products 0.43.9 → 0.43.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/chunks/__smrt-register__-DKIfYUyR.js +6 -0
- package/dist/lib/chunks/__smrt-register__-DKIfYUyR.js.map +1 -0
- package/dist/lib/chunks/{collections-ZfPwFdA6.js → collections-M7Nh08CL.js} +2 -2
- package/dist/lib/chunks/{collections-ZfPwFdA6.js.map → collections-M7Nh08CL.js.map} +1 -1
- package/dist/lib/chunks/{generated-BqmNqcnz.js → generated-CWukcXs1.js} +2 -2
- package/dist/lib/chunks/{generated-BqmNqcnz.js.map → generated-CWukcXs1.js.map} +1 -1
- package/dist/lib/chunks/models-DWhn3JNY.js +2 -0
- package/dist/lib/collections.js +1 -1
- package/dist/lib/generated.js +1 -1
- package/dist/lib/index.js +4 -4
- package/dist/lib/manifest.json +106 -4
- package/dist/lib/models.js +1 -1
- package/dist/lib/smrt-knowledge.json +69 -6
- package/package.json +9 -9
- package/dist/lib/chunks/__smrt-register__-C84FdoxI.js +0 -6
- package/dist/lib/chunks/__smrt-register__-C84FdoxI.js.map +0 -1
- package/dist/lib/chunks/models-DIla2tE9.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections-
|
|
1
|
+
{"version":3,"file":"collections-M7Nh08CL.js","names":[],"sources":["../../../src/lib/collections/CategoryCollection.ts","../../../src/lib/collections/MaterialCollection.ts","../../../src/lib/collections/ProductVariantCollection.ts","../../../src/lib/collections/SkuCollection.ts"],"sourcesContent":["/**\n * CategoryCollection — Collection manager for {@link Category} objects.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { Category } from '../models/Category';\n\nexport class CategoryCollection extends SmrtCollection<Category> {\n static readonly _itemClass = Category;\n\n /**\n * Return every top-level category. `parentId` on `Category` is typed\n * `string | undefined`; SMRT serializes undefined string fields as `''`\n * rather than `NULL`, so a category created without an explicit\n * `parentId` lands in the DB with `parent_id = ''`, not `parent_id IS NULL`.\n *\n * We accept both shapes — historical data, migrations, and direct DB\n * imports can produce either — so consumers don't have to normalize\n * `parentId` on write to be discoverable as a root. SQL's `IN` operator\n * does NOT match `NULL` (NULL is not equal to anything, including itself\n * inside an IN list), so the empty-string and NULL cases must run as\n * separate queries and merge.\n */\n async getRootCategories(): Promise<Category[]> {\n const [emptyParents, nullParents] = await Promise.all([\n this.list({ where: { parentId: '' } }),\n this.list({ where: { parentId: null } }),\n ]);\n\n if (emptyParents.length === 0) return nullParents;\n if (nullParents.length === 0) return emptyParents;\n\n // De-dupe by id in case a row somehow shows up in both lists.\n const seen = new Set<string>();\n const merged: Category[] = [];\n for (const row of [...emptyParents, ...nullParents]) {\n const id = row.id ?? '';\n if (!id || seen.has(id)) continue;\n seen.add(id);\n merged.push(row);\n }\n return merged;\n }\n}\n","/**\n * MaterialCollection — Collection manager for {@link Material} objects.\n *\n * STI framework auto-filters by `_meta_type` to return only Material rows\n * from the shared `products` table.\n */\n\nimport { Material } from '../models/Material';\nimport type { MaterialKind } from '../models/types';\nimport { ProductCollection } from './ProductCollection';\n\nexport class MaterialCollection extends ProductCollection {\n static override readonly _itemClass = Material;\n\n /**\n * Find every {@link Material} with the given kind.\n *\n * `materialKind` is an `@meta()` field — it lives inside the shared\n * `_meta_data` JSON column on `products`, not as its own SQL column.\n * That means a naive `list({ where: { materialKind } })` would generate\n * a WHERE on a non-existent column. We list every Material STI row and\n * filter the hydrated instances in JS.\n *\n * For very large catalogs, consumers should add a generated column or\n * an expression index over the JSON path and override this helper.\n */\n async findByKind(materialKind: MaterialKind): Promise<Material[]> {\n const items = (await this.list({})) as Material[];\n return items.filter((m) => m.materialKind === materialKind);\n }\n}\n","/**\n * ProductVariantCollection — read helpers for {@link ProductVariant} rows.\n *\n * {@link ProductVariant} is a standalone model (not a Product STI subtype),\n * so this collection drives its own table (`product_variants`). Helper\n * methods cover the two common query patterns: \"what axes does this\n * product vary along?\" and \"tell me about the size axis specifically.\"\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { ProductVariant } from '../models/ProductVariant';\n\nexport class ProductVariantCollection extends SmrtCollection<ProductVariant> {\n static readonly _itemClass = ProductVariant;\n\n /** Every axis declaration for a given product, in display order. */\n async findForProduct(productId: string): Promise<ProductVariant[]> {\n return this.list({\n where: { productId },\n orderBy: 'sortOrder ASC',\n });\n }\n\n /** The axis declaration for a `(productId, axisName)` pair, or null. */\n async findAxis(\n productId: string,\n axisName: string,\n ): Promise<ProductVariant | null> {\n const matches = await this.list({\n where: { productId, axisName },\n limit: 1,\n });\n return matches[0] ?? null;\n }\n}\n","/**\n * SkuCollection — query helpers for {@link Sku} rows.\n *\n * @packageDocumentation\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { Sku } from '../models/Sku';\n\nexport class SkuCollection extends SmrtCollection<Sku> {\n static readonly _itemClass = Sku;\n\n /**\n * Look up a SKU by its tenant-scoped `code` (UPC, internal part\n * number, etc.). Returns `null` when no row matches.\n */\n async findByCode(code: string): Promise<Sku | null> {\n const matches = await this.list({ where: { code }, limit: 1 });\n return matches[0] ?? null;\n }\n\n /**\n * Look up a SKU by its scannable barcode. Returns `null` when no row\n * matches; pass `''` to skip the query early.\n */\n async findByBarcode(barcode: string): Promise<Sku | null> {\n if (!barcode) return null;\n const matches = await this.list({ where: { barcode }, limit: 1 });\n return matches[0] ?? null;\n }\n\n /**\n * Find every SKU pointing at the given `Product` id (or any Product\n * STI subtype id — `Material` upstream, vertical subtypes defined in\n * templates). Useful for listing the SKUs that back a single product\n * card.\n */\n async findByProduct(productId: string): Promise<Sku[]> {\n return this.list({ where: { productId }, orderBy: 'code ASC' });\n }\n\n /**\n * Find every SKU that is a component of the given parent SKU (for\n * bundles / kits). Returns an empty array when the parent has no\n * children.\n */\n async findByParent(parentSkuId: string): Promise<Sku[]> {\n return this.list({ where: { parentSkuId }, orderBy: 'code ASC' });\n }\n\n /** Find every active SKU, optionally narrowed by parent product id. */\n async findActive(productId?: string): Promise<Sku[]> {\n const where: Record<string, unknown> = { active: true };\n if (productId) where.productId = productId;\n return this.list({ where, orderBy: 'code ASC' });\n }\n}\n"],"mappings":";;;;;;;;;AAOA,IAAa,qBAAb,cAAwC,eAAyB;CAC/D,OAAgB,aAAa;;;;;;;;;;;;;;CAe7B,MAAM,oBAAyC;EAC7C,MAAM,CAAC,cAAc,eAAe,MAAM,QAAQ,IAAI,CACpD,KAAK,KAAK,EAAE,OAAO,EAAE,UAAU,GAAG,EAAE,CAAC,GACrC,KAAK,KAAK,EAAE,OAAO,EAAE,UAAU,KAAK,EAAE,CAAC,CACzC,CAAC;EAED,IAAI,aAAa,WAAW,GAAG,OAAO;EACtC,IAAI,YAAY,WAAW,GAAG,OAAO;EAGrC,MAAM,uBAAO,IAAI,IAAY;EAC7B,MAAM,SAAqB,CAAC;EAC5B,KAAK,MAAM,OAAO,CAAC,GAAG,cAAc,GAAG,WAAW,GAAG;GACnD,MAAM,KAAK,IAAI,MAAM;GACrB,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE,GAAG;GACzB,KAAK,IAAI,EAAE;GACX,OAAO,KAAK,GAAG;EACjB;EACA,OAAO;CACT;AACF;;;;;;;;;AChCA,IAAa,qBAAb,cAAwC,kBAAkB;CACxD,OAAyB,aAAa;;;;;;;;;;;;;CActC,MAAM,WAAW,cAAiD;EAEhE,QAAO,MADc,KAAK,KAAK,CAAC,CAAC,EAAA,CACpB,QAAQ,MAAM,EAAE,iBAAiB,YAAY;CAC5D;AACF;;;;;;;;;;;AClBA,IAAa,2BAAb,cAA8C,eAA+B;CAC3E,OAAgB,aAAa;;CAG7B,MAAM,eAAe,WAA8C;EACjE,OAAO,KAAK,KAAK;GACf,OAAO,EAAE,UAAU;GACnB,SAAS;EACX,CAAC;CACH;;CAGA,MAAM,SACJ,WACA,UACgC;EAKhC,QAAO,MAJe,KAAK,KAAK;GAC9B,OAAO;IAAE;IAAW;GAAS;GAC7B,OAAO;EACT,CAAC,EAAA,CACc,MAAM;CACvB;AACF;;;;;;;;ACzBA,IAAa,gBAAb,cAAmC,eAAoB;CACrD,OAAgB,aAAa;;;;;CAM7B,MAAM,WAAW,MAAmC;EAElD,QAAO,MADe,KAAK,KAAK;GAAE,OAAO,EAAE,KAAK;GAAG,OAAO;EAAE,CAAC,EAAA,CAC9C,MAAM;CACvB;;;;;CAMA,MAAM,cAAc,SAAsC;EACxD,IAAI,CAAC,SAAS,OAAO;EAErB,QAAO,MADe,KAAK,KAAK;GAAE,OAAO,EAAE,QAAQ;GAAG,OAAO;EAAE,CAAC,EAAA,CACjD,MAAM;CACvB;;;;;;;CAQA,MAAM,cAAc,WAAmC;EACrD,OAAO,KAAK,KAAK;GAAE,OAAO,EAAE,UAAU;GAAG,SAAS;EAAW,CAAC;CAChE;;;;;;CAOA,MAAM,aAAa,aAAqC;EACtD,OAAO,KAAK,KAAK;GAAE,OAAO,EAAE,YAAY;GAAG,SAAS;EAAW,CAAC;CAClE;;CAGA,MAAM,WAAW,WAAoC;EACnD,MAAM,QAAiC,EAAE,QAAQ,KAAK;EACtD,IAAI,WAAW,MAAM,YAAY;EACjC,OAAO,KAAK,KAAK;GAAE;GAAO,SAAS;EAAW,CAAC;CACjD;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./__smrt-register__-
|
|
1
|
+
import "./__smrt-register__-DKIfYUyR.js";
|
|
2
2
|
//#region src/lib/generated/index.ts
|
|
3
3
|
var autoGeneratedComponents = {};
|
|
4
4
|
//#endregion
|
|
5
5
|
export { autoGeneratedComponents as t };
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=generated-
|
|
7
|
+
//# sourceMappingURL=generated-CWukcXs1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-
|
|
1
|
+
{"version":3,"file":"generated-CWukcXs1.js","names":[],"sources":["../../../src/lib/generated/index.ts"],"sourcesContent":["/**\n * Auto-generated SMRT Components\n *\n * This file is automatically generated by the SMRT Vite plugin.\n * It exports UI components that are auto-generated from @smrt() decorated classes.\n *\n * DO NOT EDIT THIS FILE MANUALLY - it will be overwritten.\n */\n\n// Self-register this package's manifest for consumers that import via this\n// subpath without the main entry. See src/__smrt-register__.ts (issue #1132).\nimport '../../__smrt-register__.js';\n\n// Auto-generated components will be exported here by the SMRT Vite plugin\n// Examples:\n// export { default as SmrtProductForm } from './SmrtProductForm.svelte';\n// export { default as SmrtProductTable } from './SmrtProductTable.svelte';\n// export { default as SmrtCategoryForm } from './SmrtCategoryForm.svelte';\n\n// For now, export an empty object to prevent import errors\nexport const autoGeneratedComponents = {};\n"],"mappings":";;AAoBA,IAAa,0BAA0B,CAAC"}
|
package/dist/lib/collections.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as CategoryCollection, n as ProductVariantCollection, r as MaterialCollection, t as SkuCollection } from "./chunks/collections-
|
|
1
|
+
import { i as CategoryCollection, n as ProductVariantCollection, r as MaterialCollection, t as SkuCollection } from "./chunks/collections-M7Nh08CL.js";
|
|
2
2
|
import { t as ProductCollection } from "./chunks/ProductCollection-CiRifn2i.js";
|
|
3
3
|
import { t as ProductAssetCollection } from "./chunks/ProductAssetCollection-kErZwsTl.js";
|
|
4
4
|
export { CategoryCollection, MaterialCollection, ProductAssetCollection, ProductCollection, ProductVariantCollection, SkuCollection };
|
package/dist/lib/generated.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as autoGeneratedComponents } from "./chunks/generated-
|
|
1
|
+
import { t as autoGeneratedComponents } from "./chunks/generated-CWukcXs1.js";
|
|
2
2
|
export { autoGeneratedComponents };
|
package/dist/lib/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunks/rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import "./chunks/__smrt-register__-
|
|
2
|
+
import "./chunks/__smrt-register__-DKIfYUyR.js";
|
|
3
3
|
import { a as Product, i as Material, n as ProductVariant, o as ProductType, r as ProductAsset, s as Category, t as Sku } from "./chunks/Sku-DAZUXG7E.js";
|
|
4
|
-
import { i as CategoryCollection, n as ProductVariantCollection, r as MaterialCollection, t as SkuCollection } from "./chunks/collections-
|
|
4
|
+
import { i as CategoryCollection, n as ProductVariantCollection, r as MaterialCollection, t as SkuCollection } from "./chunks/collections-M7Nh08CL.js";
|
|
5
5
|
import { t as ProductCollection } from "./chunks/ProductCollection-CiRifn2i.js";
|
|
6
6
|
import { t as ProductAssetCollection } from "./chunks/ProductAssetCollection-kErZwsTl.js";
|
|
7
7
|
import { n as ProductCard, t as ProductForm } from "./chunks/components-C6VpNVcg.js";
|
|
8
|
-
import { t as autoGeneratedComponents } from "./chunks/generated-
|
|
9
|
-
import "./chunks/models-
|
|
8
|
+
import { t as autoGeneratedComponents } from "./chunks/generated-CWukcXs1.js";
|
|
9
|
+
import "./chunks/models-DWhn3JNY.js";
|
|
10
10
|
import { n as productStore, t as ProductStoreClass } from "./chunks/stores-CB0SI1c5.js";
|
|
11
11
|
import { i as slugify, n as formatPrice, r as generateId, t as formatDate } from "./chunks/utils-BgTqlQoH.js";
|
|
12
12
|
import { startRestServer } from "@happyvertical/smrt-core";
|
package/dist/lib/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-products",
|
|
5
|
-
"packageVersion": "0.43.
|
|
5
|
+
"packageVersion": "0.43.10",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-products:CategoryCollection": {
|
|
8
8
|
"name": "categorycollection",
|
|
@@ -952,6 +952,20 @@
|
|
|
952
952
|
"isStatic": false,
|
|
953
953
|
"isPublic": true
|
|
954
954
|
},
|
|
955
|
+
"withTransaction": {
|
|
956
|
+
"name": "withTransaction",
|
|
957
|
+
"async": true,
|
|
958
|
+
"parameters": [
|
|
959
|
+
{
|
|
960
|
+
"name": "operation",
|
|
961
|
+
"type": "Function",
|
|
962
|
+
"optional": false
|
|
963
|
+
}
|
|
964
|
+
],
|
|
965
|
+
"returnType": "Promise<T>",
|
|
966
|
+
"isStatic": false,
|
|
967
|
+
"isPublic": true
|
|
968
|
+
},
|
|
955
969
|
"initialize": {
|
|
956
970
|
"name": "initialize",
|
|
957
971
|
"async": true,
|
|
@@ -1047,11 +1061,31 @@
|
|
|
1047
1061
|
"save": {
|
|
1048
1062
|
"name": "save",
|
|
1049
1063
|
"async": true,
|
|
1050
|
-
"parameters": [
|
|
1064
|
+
"parameters": [
|
|
1065
|
+
{
|
|
1066
|
+
"name": "options",
|
|
1067
|
+
"type": "SmrtSaveOptions",
|
|
1068
|
+
"optional": true
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1051
1071
|
"returnType": "any",
|
|
1052
1072
|
"isStatic": false,
|
|
1053
1073
|
"isPublic": true
|
|
1054
1074
|
},
|
|
1075
|
+
"claimRevision": {
|
|
1076
|
+
"name": "claimRevision",
|
|
1077
|
+
"async": true,
|
|
1078
|
+
"parameters": [
|
|
1079
|
+
{
|
|
1080
|
+
"name": "expectedUpdatedAt",
|
|
1081
|
+
"type": "Date | string",
|
|
1082
|
+
"optional": false
|
|
1083
|
+
}
|
|
1084
|
+
],
|
|
1085
|
+
"returnType": "Promise",
|
|
1086
|
+
"isStatic": false,
|
|
1087
|
+
"isPublic": true
|
|
1088
|
+
},
|
|
1055
1089
|
"classifyConstraintError": {
|
|
1056
1090
|
"name": "classifyConstraintError",
|
|
1057
1091
|
"async": false,
|
|
@@ -1723,6 +1757,20 @@
|
|
|
1723
1757
|
"isStatic": false,
|
|
1724
1758
|
"isPublic": true
|
|
1725
1759
|
},
|
|
1760
|
+
"withTransaction": {
|
|
1761
|
+
"name": "withTransaction",
|
|
1762
|
+
"async": true,
|
|
1763
|
+
"parameters": [
|
|
1764
|
+
{
|
|
1765
|
+
"name": "operation",
|
|
1766
|
+
"type": "Function",
|
|
1767
|
+
"optional": false
|
|
1768
|
+
}
|
|
1769
|
+
],
|
|
1770
|
+
"returnType": "Promise<T>",
|
|
1771
|
+
"isStatic": false,
|
|
1772
|
+
"isPublic": true
|
|
1773
|
+
},
|
|
1726
1774
|
"initialize": {
|
|
1727
1775
|
"name": "initialize",
|
|
1728
1776
|
"async": true,
|
|
@@ -1818,11 +1866,31 @@
|
|
|
1818
1866
|
"save": {
|
|
1819
1867
|
"name": "save",
|
|
1820
1868
|
"async": true,
|
|
1821
|
-
"parameters": [
|
|
1869
|
+
"parameters": [
|
|
1870
|
+
{
|
|
1871
|
+
"name": "options",
|
|
1872
|
+
"type": "SmrtSaveOptions",
|
|
1873
|
+
"optional": true
|
|
1874
|
+
}
|
|
1875
|
+
],
|
|
1822
1876
|
"returnType": "any",
|
|
1823
1877
|
"isStatic": false,
|
|
1824
1878
|
"isPublic": true
|
|
1825
1879
|
},
|
|
1880
|
+
"claimRevision": {
|
|
1881
|
+
"name": "claimRevision",
|
|
1882
|
+
"async": true,
|
|
1883
|
+
"parameters": [
|
|
1884
|
+
{
|
|
1885
|
+
"name": "expectedUpdatedAt",
|
|
1886
|
+
"type": "Date | string",
|
|
1887
|
+
"optional": false
|
|
1888
|
+
}
|
|
1889
|
+
],
|
|
1890
|
+
"returnType": "Promise",
|
|
1891
|
+
"isStatic": false,
|
|
1892
|
+
"isPublic": true
|
|
1893
|
+
},
|
|
1826
1894
|
"classifyConstraintError": {
|
|
1827
1895
|
"name": "classifyConstraintError",
|
|
1828
1896
|
"async": false,
|
|
@@ -2555,6 +2623,20 @@
|
|
|
2555
2623
|
"isStatic": false,
|
|
2556
2624
|
"isPublic": true
|
|
2557
2625
|
},
|
|
2626
|
+
"withTransaction": {
|
|
2627
|
+
"name": "withTransaction",
|
|
2628
|
+
"async": true,
|
|
2629
|
+
"parameters": [
|
|
2630
|
+
{
|
|
2631
|
+
"name": "operation",
|
|
2632
|
+
"type": "Function",
|
|
2633
|
+
"optional": false
|
|
2634
|
+
}
|
|
2635
|
+
],
|
|
2636
|
+
"returnType": "Promise<T>",
|
|
2637
|
+
"isStatic": false,
|
|
2638
|
+
"isPublic": true
|
|
2639
|
+
},
|
|
2558
2640
|
"initialize": {
|
|
2559
2641
|
"name": "initialize",
|
|
2560
2642
|
"async": true,
|
|
@@ -2650,11 +2732,31 @@
|
|
|
2650
2732
|
"save": {
|
|
2651
2733
|
"name": "save",
|
|
2652
2734
|
"async": true,
|
|
2653
|
-
"parameters": [
|
|
2735
|
+
"parameters": [
|
|
2736
|
+
{
|
|
2737
|
+
"name": "options",
|
|
2738
|
+
"type": "SmrtSaveOptions",
|
|
2739
|
+
"optional": true
|
|
2740
|
+
}
|
|
2741
|
+
],
|
|
2654
2742
|
"returnType": "any",
|
|
2655
2743
|
"isStatic": false,
|
|
2656
2744
|
"isPublic": true
|
|
2657
2745
|
},
|
|
2746
|
+
"claimRevision": {
|
|
2747
|
+
"name": "claimRevision",
|
|
2748
|
+
"async": true,
|
|
2749
|
+
"parameters": [
|
|
2750
|
+
{
|
|
2751
|
+
"name": "expectedUpdatedAt",
|
|
2752
|
+
"type": "Date | string",
|
|
2753
|
+
"optional": false
|
|
2754
|
+
}
|
|
2755
|
+
],
|
|
2756
|
+
"returnType": "Promise",
|
|
2757
|
+
"isStatic": false,
|
|
2758
|
+
"isPublic": true
|
|
2759
|
+
},
|
|
2658
2760
|
"classifyConstraintError": {
|
|
2659
2761
|
"name": "classifyConstraintError",
|
|
2660
2762
|
"async": false,
|
package/dist/lib/models.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as Product, i as Material, n as ProductVariant, o as ProductType, r as ProductAsset, s as Category, t as Sku } from "./chunks/Sku-DAZUXG7E.js";
|
|
2
|
-
import "./chunks/models-
|
|
2
|
+
import "./chunks/models-DWhn3JNY.js";
|
|
3
3
|
export { Category, Material, Product, ProductAsset, ProductType, ProductVariant, Sku };
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-products",
|
|
6
|
-
"packageVersion": "0.43.
|
|
6
|
+
"packageVersion": "0.43.10",
|
|
7
7
|
"sourceManifestPath": "dist/lib/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "75ba5d65c1eeebbf895b063226714e2789e340c43613f5a2c5da0ab610ab85c0",
|
|
11
|
+
"packageJson": "627eac64323b066c32de458521bcb62d91a4e144714c2a5ee74a24d5b97959d7",
|
|
12
12
|
"agents": "4ddde01c48baf13de773cdb57353a148f3fe3b93d21e99d8ac57677cda809e26"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -484,6 +484,7 @@
|
|
|
484
484
|
],
|
|
485
485
|
"methods": [
|
|
486
486
|
"_setLoadedRelationship",
|
|
487
|
+
"claimRevision",
|
|
487
488
|
"classifyConstraintError",
|
|
488
489
|
"clearEmbeddings",
|
|
489
490
|
"delete",
|
|
@@ -524,7 +525,8 @@
|
|
|
524
525
|
"toJSON",
|
|
525
526
|
"toPlainObject",
|
|
526
527
|
"toPublicJSON",
|
|
527
|
-
"withDatabase"
|
|
528
|
+
"withDatabase",
|
|
529
|
+
"withTransaction"
|
|
528
530
|
],
|
|
529
531
|
"methodSignatures": [
|
|
530
532
|
{
|
|
@@ -535,6 +537,14 @@
|
|
|
535
537
|
],
|
|
536
538
|
"returns": "void"
|
|
537
539
|
},
|
|
540
|
+
{
|
|
541
|
+
"name": "claimRevision",
|
|
542
|
+
"async": true,
|
|
543
|
+
"params": [
|
|
544
|
+
"expectedUpdatedAt: Date | string"
|
|
545
|
+
],
|
|
546
|
+
"returns": "Promise"
|
|
547
|
+
},
|
|
538
548
|
{
|
|
539
549
|
"name": "classifyConstraintError",
|
|
540
550
|
"static": true,
|
|
@@ -766,6 +776,9 @@
|
|
|
766
776
|
{
|
|
767
777
|
"name": "save",
|
|
768
778
|
"async": true,
|
|
779
|
+
"params": [
|
|
780
|
+
"options?: SmrtSaveOptions"
|
|
781
|
+
],
|
|
769
782
|
"returns": "any"
|
|
770
783
|
},
|
|
771
784
|
{
|
|
@@ -799,6 +812,14 @@
|
|
|
799
812
|
"operation: Function"
|
|
800
813
|
],
|
|
801
814
|
"returns": "Promise<T>"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"name": "withTransaction",
|
|
818
|
+
"async": true,
|
|
819
|
+
"params": [
|
|
820
|
+
"operation: Function"
|
|
821
|
+
],
|
|
822
|
+
"returns": "Promise<T>"
|
|
802
823
|
}
|
|
803
824
|
],
|
|
804
825
|
"tenant": {
|
|
@@ -1009,6 +1030,7 @@
|
|
|
1009
1030
|
"methods": [
|
|
1010
1031
|
"_setLoadedRelationship",
|
|
1011
1032
|
"addAsset",
|
|
1033
|
+
"claimRevision",
|
|
1012
1034
|
"classifyConstraintError",
|
|
1013
1035
|
"clearEmbeddings",
|
|
1014
1036
|
"delete",
|
|
@@ -1053,7 +1075,8 @@
|
|
|
1053
1075
|
"toPlainObject",
|
|
1054
1076
|
"toPublicJSON",
|
|
1055
1077
|
"updateSpecification",
|
|
1056
|
-
"withDatabase"
|
|
1078
|
+
"withDatabase",
|
|
1079
|
+
"withTransaction"
|
|
1057
1080
|
],
|
|
1058
1081
|
"methodSignatures": [
|
|
1059
1082
|
{
|
|
@@ -1074,6 +1097,14 @@
|
|
|
1074
1097
|
],
|
|
1075
1098
|
"returns": "Promise<void>"
|
|
1076
1099
|
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "claimRevision",
|
|
1102
|
+
"async": true,
|
|
1103
|
+
"params": [
|
|
1104
|
+
"expectedUpdatedAt: Date | string"
|
|
1105
|
+
],
|
|
1106
|
+
"returns": "Promise"
|
|
1107
|
+
},
|
|
1077
1108
|
{
|
|
1078
1109
|
"name": "classifyConstraintError",
|
|
1079
1110
|
"static": true,
|
|
@@ -1330,6 +1361,9 @@
|
|
|
1330
1361
|
{
|
|
1331
1362
|
"name": "save",
|
|
1332
1363
|
"async": true,
|
|
1364
|
+
"params": [
|
|
1365
|
+
"options?: SmrtSaveOptions"
|
|
1366
|
+
],
|
|
1333
1367
|
"returns": "any"
|
|
1334
1368
|
},
|
|
1335
1369
|
{
|
|
@@ -1372,6 +1406,14 @@
|
|
|
1372
1406
|
"operation: Function"
|
|
1373
1407
|
],
|
|
1374
1408
|
"returns": "Promise<T>"
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
"name": "withTransaction",
|
|
1412
|
+
"async": true,
|
|
1413
|
+
"params": [
|
|
1414
|
+
"operation: Function"
|
|
1415
|
+
],
|
|
1416
|
+
"returns": "Promise<T>"
|
|
1375
1417
|
}
|
|
1376
1418
|
],
|
|
1377
1419
|
"tenant": {
|
|
@@ -1557,6 +1599,7 @@
|
|
|
1557
1599
|
"methods": [
|
|
1558
1600
|
"_setLoadedRelationship",
|
|
1559
1601
|
"addAsset",
|
|
1602
|
+
"claimRevision",
|
|
1560
1603
|
"classifyConstraintError",
|
|
1561
1604
|
"clearEmbeddings",
|
|
1562
1605
|
"delete",
|
|
@@ -1601,7 +1644,8 @@
|
|
|
1601
1644
|
"toPlainObject",
|
|
1602
1645
|
"toPublicJSON",
|
|
1603
1646
|
"updateSpecification",
|
|
1604
|
-
"withDatabase"
|
|
1647
|
+
"withDatabase",
|
|
1648
|
+
"withTransaction"
|
|
1605
1649
|
],
|
|
1606
1650
|
"methodSignatures": [
|
|
1607
1651
|
{
|
|
@@ -1622,6 +1666,14 @@
|
|
|
1622
1666
|
],
|
|
1623
1667
|
"returns": "Promise<void>"
|
|
1624
1668
|
},
|
|
1669
|
+
{
|
|
1670
|
+
"name": "claimRevision",
|
|
1671
|
+
"async": true,
|
|
1672
|
+
"params": [
|
|
1673
|
+
"expectedUpdatedAt: Date | string"
|
|
1674
|
+
],
|
|
1675
|
+
"returns": "Promise"
|
|
1676
|
+
},
|
|
1625
1677
|
{
|
|
1626
1678
|
"name": "classifyConstraintError",
|
|
1627
1679
|
"static": true,
|
|
@@ -1878,6 +1930,9 @@
|
|
|
1878
1930
|
{
|
|
1879
1931
|
"name": "save",
|
|
1880
1932
|
"async": true,
|
|
1933
|
+
"params": [
|
|
1934
|
+
"options?: SmrtSaveOptions"
|
|
1935
|
+
],
|
|
1881
1936
|
"returns": "any"
|
|
1882
1937
|
},
|
|
1883
1938
|
{
|
|
@@ -1920,6 +1975,14 @@
|
|
|
1920
1975
|
"operation: Function"
|
|
1921
1976
|
],
|
|
1922
1977
|
"returns": "Promise<T>"
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
"name": "withTransaction",
|
|
1981
|
+
"async": true,
|
|
1982
|
+
"params": [
|
|
1983
|
+
"operation: Function"
|
|
1984
|
+
],
|
|
1985
|
+
"returns": "Promise<T>"
|
|
1923
1986
|
}
|
|
1924
1987
|
],
|
|
1925
1988
|
"tenant": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-products",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.10",
|
|
4
4
|
"description": "SMRT products module: triple-purpose microservice template for standalone apps, federated modules, and NPM libraries",
|
|
5
5
|
"author": "HappyVertical",
|
|
6
6
|
"type": "module",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"@happyvertical/utils": "^0.89.4",
|
|
61
61
|
"cors": "^2.8.6",
|
|
62
62
|
"express": "^5.2.1",
|
|
63
|
-
"@happyvertical/smrt-assets": "0.43.
|
|
64
|
-
"@happyvertical/smrt-core": "0.43.
|
|
65
|
-
"@happyvertical/smrt-
|
|
66
|
-
"@happyvertical/smrt-
|
|
67
|
-
"@happyvertical/smrt-tenancy": "0.43.
|
|
68
|
-
"@happyvertical/smrt-ui": "0.43.
|
|
69
|
-
"@happyvertical/smrt-web": "0.43.
|
|
63
|
+
"@happyvertical/smrt-assets": "0.43.10",
|
|
64
|
+
"@happyvertical/smrt-core": "0.43.10",
|
|
65
|
+
"@happyvertical/smrt-svelte": "0.43.10",
|
|
66
|
+
"@happyvertical/smrt-scanner": "0.43.10",
|
|
67
|
+
"@happyvertical/smrt-tenancy": "0.43.10",
|
|
68
|
+
"@happyvertical/smrt-ui": "0.43.10",
|
|
69
|
+
"@happyvertical/smrt-web": "0.43.10"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"svelte": "^5.56.4"
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"typescript": "5.9.3",
|
|
90
90
|
"vite": "8.1.4",
|
|
91
91
|
"vitest": "4.1.10",
|
|
92
|
-
"@happyvertical/smrt-vitest": "0.43.
|
|
92
|
+
"@happyvertical/smrt-vitest": "0.43.10"
|
|
93
93
|
},
|
|
94
94
|
"keywords": [
|
|
95
95
|
"smrt",
|