@ai-matrx/associations 0.5.2 → 0.6.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.
- package/CHANGELOG.md +109 -0
- package/README.md +51 -13
- package/dist/CommentThread-E0zSQBbc.d.cts +1905 -0
- package/dist/CommentThread-E0zSQBbc.d.ts +1905 -0
- package/dist/core/index.cjs +23 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +18 -5
- package/dist/core/index.d.ts +18 -5
- package/dist/core/index.js +23 -6
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -17
- package/dist/index.d.ts +66 -17
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +1039 -451
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +79 -1854
- package/dist/react/index.d.ts +79 -1854
- package/dist/react/index.js +1064 -465
- package/dist/react/index.js.map +1 -1
- package/dist/react/lazy/index.cjs +89 -0
- package/dist/react/lazy/index.cjs.map +1 -0
- package/dist/react/lazy/index.d.cts +17 -0
- package/dist/react/lazy/index.d.ts +17 -0
- package/dist/react/lazy/index.js +59 -0
- package/dist/react/lazy/index.js.map +1 -0
- package/package.json +18 -4
package/dist/core/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ __export(core_exports, {
|
|
|
34
34
|
createCandidatesService: () => createCandidatesService,
|
|
35
35
|
createCategoriesService: () => createCategoriesService,
|
|
36
36
|
createCommentsService: () => createCommentsService,
|
|
37
|
+
createDefaultErrorSink: () => createDefaultErrorSink,
|
|
37
38
|
createEntityRegistry: () => createEntityRegistry,
|
|
38
39
|
createEntityRowsService: () => createEntityRowsService,
|
|
39
40
|
createFavoritesService: () => createFavoritesService,
|
|
@@ -57,6 +58,24 @@ function isAssociationsRpcErr(r) {
|
|
|
57
58
|
return r.ok === false;
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
// src/core/defaultErrorSink.ts
|
|
62
|
+
var REMEDY = "Bind the `errorSink` port on createAssociationsStore({ errorSink }) to route these into your diagnostics surface; until then they only reach the console.";
|
|
63
|
+
function createDefaultErrorSink() {
|
|
64
|
+
let announced = false;
|
|
65
|
+
return (event) => {
|
|
66
|
+
if (!announced) {
|
|
67
|
+
announced = true;
|
|
68
|
+
console.error(
|
|
69
|
+
"[associations] no errorSink port bound \u2014 using the package default. " + REMEDY
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
console.error(
|
|
73
|
+
`[associations] ${event.code}: ${event.message}`,
|
|
74
|
+
event.context ?? {}
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
60
79
|
// src/entity-types.generated.ts
|
|
61
80
|
var ENTITY_TYPE_METADATA = {
|
|
62
81
|
"access_request": { token: "access_request", schema: "iam", table: "access_requests", label: "Access Request", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: "System", referencePickable: false, titleColumn: null, contentRole: "utility", referenceCategory: null },
|
|
@@ -173,6 +192,7 @@ var ENTITY_TYPE_METADATA = {
|
|
|
173
192
|
"commerce_marketplace_site": { token: "commerce_marketplace_site", schema: "commerce", table: "marketplace_site", label: "Marketplace Site", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
|
|
174
193
|
"commerce_marketplace_sync_run": { token: "commerce_marketplace_sync_run", schema: "commerce", table: "marketplace_sync_run", label: "Marketplace Sync Run", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
|
|
175
194
|
"commerce_prediction_outcome": { token: "commerce_prediction_outcome", schema: "commerce", table: "prediction_outcome", label: "Prediction Outcome", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
|
|
195
|
+
"commerce_print_order": { token: "commerce_print_order", schema: "commerce", table: "print_order", label: "Print Order", baseTier: 1, isComponent: false, isModule: false, isListed: true, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
|
|
176
196
|
"commerce_product": { token: "commerce_product", schema: "commerce", table: "product", label: "Product", baseTier: 1, isComponent: false, isModule: false, isListed: true, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
|
|
177
197
|
"commerce_product_channel_ref": { token: "commerce_product_channel_ref", schema: "commerce", table: "product_channel_ref", label: "Product Channel Reference", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
|
|
178
198
|
"commerce_product_media": { token: "commerce_product_media", schema: "commerce", table: "product_media", label: "Product Media", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
|
|
@@ -830,6 +850,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
830
850
|
"commerce_marketplace_site",
|
|
831
851
|
"commerce_marketplace_sync_run",
|
|
832
852
|
"commerce_prediction_outcome",
|
|
853
|
+
"commerce_print_order",
|
|
833
854
|
"commerce_product",
|
|
834
855
|
"commerce_product_channel_ref",
|
|
835
856
|
"commerce_product_media",
|
|
@@ -2866,12 +2887,7 @@ function createAssociationsStore(config) {
|
|
|
2866
2887
|
"@ai-matrx/associations: the REQUIRED identity port is missing (need requireUserId(): string that THROWS when unauthenticated). Identity never comes from a store import."
|
|
2867
2888
|
);
|
|
2868
2889
|
}
|
|
2869
|
-
|
|
2870
|
-
throw new Error(
|
|
2871
|
-
"@ai-matrx/associations: the REQUIRED errorSink port is missing. Recovery layers must scream somewhere \u2014 bind a sink."
|
|
2872
|
-
);
|
|
2873
|
-
}
|
|
2874
|
-
const errorSink = config.errorSink;
|
|
2890
|
+
const errorSink = typeof config.errorSink === "function" ? config.errorSink : createDefaultErrorSink();
|
|
2875
2891
|
const registry = createEntityRegistry(errorSink, config.entityOverlay);
|
|
2876
2892
|
const deps = {
|
|
2877
2893
|
dataSource: config.dataSource,
|
|
@@ -3257,6 +3273,7 @@ function createAssociationsStore(config) {
|
|
|
3257
3273
|
services: { associations, categories, comments },
|
|
3258
3274
|
registerEntityOverlay: registry.registerEntityOverlay,
|
|
3259
3275
|
errorSink,
|
|
3276
|
+
dataSource: config.dataSource,
|
|
3260
3277
|
identity: config.identity
|
|
3261
3278
|
};
|
|
3262
3279
|
}
|