@fjell/core 4.4.77 → 4.4.79

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/LICENSE CHANGED
@@ -187,7 +187,7 @@
187
187
  same "printed page" as the copyright notice for easier
188
188
  identification within third-party archives.
189
189
 
190
- Copyright 2025 Fjell Project
190
+ Copyright 2026 Tim O'Brien
191
191
 
192
192
  Licensed under the Apache License, Version 2.0 (the "License");
193
193
  you may not use this file except in compliance with the License.
package/dist/index.js CHANGED
@@ -6,10 +6,10 @@ var logger_default = LibLogger;
6
6
  // src/key/KUtils.ts
7
7
  var logger = logger_default.get("KUtils");
8
8
  var isComKey = (key) => {
9
- return key !== null && typeof key === "object" && "kt" in key && "pk" in key && "loc" in key && Array.isArray(key.loc) && key.loc.length > 0;
9
+ return key !== null && typeof key === "object" && "kt" in key && "pk" in key && "loc" in key && Array.isArray(key.loc);
10
10
  };
11
11
  var isPriKey = (key) => {
12
- return key !== null && typeof key === "object" && "kt" in key && "pk" in key && (!("loc" in key) || !key.loc || Array.isArray(key.loc) && key.loc.length === 0);
12
+ return key !== null && typeof key === "object" && "kt" in key && "pk" in key && (!("loc" in key) || key.loc === void 0 || key.loc === null);
13
13
  };
14
14
  var normalizeKeyValue = (value) => {
15
15
  return String(value);
@@ -264,9 +264,9 @@ var isValidItemKey = (key) => {
264
264
  };
265
265
  var lkaToIK = locKeyArrayToItemKey;
266
266
 
267
- // node_modules/@fjell/types/dist/chunk-5M6KJZFD.js
267
+ // node_modules/@fjell/types/dist/chunk-C37JAZMK.js
268
268
  var isCondition = (condition) => {
269
- return (typeof condition.column === "string" && (Array.isArray(condition.value) && condition.value.every((item) => typeof item === "string")) || Array.isArray(condition.value) && condition.value.every((item) => typeof item === "number") || typeof condition.value === "string" || typeof condition.value === "number" || typeof condition.value === "boolean" || condition.value instanceof Date || condition.value === null) && (condition.operator ? typeof condition.operator === "string" : true);
269
+ return typeof condition.column === "string" && (Array.isArray(condition.value) && condition.value.every((item) => typeof item === "string") || Array.isArray(condition.value) && condition.value.every((item) => typeof item === "number") || typeof condition.value === "string" || typeof condition.value === "number" || typeof condition.value === "boolean" || condition.value instanceof Date || condition.value === null) && (condition.operator ? typeof condition.operator === "string" : true);
270
270
  };
271
271
 
272
272
  // src/item/IQFactory.ts
package/guide/index.md ADDED
@@ -0,0 +1,30 @@
1
+ # @fjell/core - Agentic Guide
2
+
3
+ ## Purpose
4
+
5
+ Core Item/Key framework and base abstractions used by higher-level Fjell libraries.
6
+
7
+ This guide is optimized for AI-assisted code generation and integration workflows.
8
+
9
+ ## Documentation
10
+
11
+ - **[Usage Guide](./usage.md)** - API-oriented usage patterns and model-safe examples
12
+ - **[Integration Guide](./integration.md)** - Architecture placement, composition rules, and implementation guidance
13
+
14
+ ## Key Capabilities
15
+
16
+ - Provides item factories and coordinate creation helpers
17
+ - Defines shared dictionaries, operation contracts, and event abstractions
18
+ - Supplies reusable primitives consumed by @fjell/lib and providers
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install @fjell/core
24
+ ```
25
+
26
+ ## Public API Highlights
27
+
28
+ - `IQFactory`, `IFactory`, and `AItemService`
29
+ - `createCoordinate` and dictionary exports
30
+ - Shared errors, operations, and event exports
@@ -0,0 +1,32 @@
1
+ # Integration Guide
2
+
3
+ Guide for integrating `@fjell/core` into larger Fjell-based systems.
4
+
5
+ ## Where It Fits
6
+
7
+ Core Item/Key framework and base abstractions used by higher-level Fjell libraries.
8
+
9
+ ## Recommended Integration Pattern
10
+
11
+ - Use @fjell/core when building new storage adapters or framework extensions
12
+ - Keep coordinate conventions consistent with backend libraries to avoid key mismatches
13
+ - Use shared errors/events to keep telemetry and retry behavior uniform
14
+
15
+ ## System Composition Checklist
16
+
17
+ - Define package boundaries: schema/types, transport, operations, adapters, and UI.
18
+ - Keep contracts stable by sharing @fjell/types interfaces where applicable.
19
+ - Centralize retries/timeouts/logging around infrastructure-facing operations.
20
+ - Validate inputs at API boundaries before invoking persistence or provider layers.
21
+ - Add contract and integration tests for every generated workflow.
22
+
23
+ ## Cross-Library Pairings
24
+
25
+ - Pair with @fjell/types for shared contracts.
26
+ - Pair with @fjell/validation for input and schema checks.
27
+ - Pair with @fjell/logging for observability in integration flows.
28
+ - Pair with storage/router/provider packages based on your runtime architecture.
29
+
30
+ ## Integration Example Shape
31
+
32
+ Use this package behind an application service layer that exposes stable domain methods. Generated code should call those service methods, not raw infrastructure primitives, unless your architecture intentionally keeps infrastructure at the edge.
package/guide/usage.md ADDED
@@ -0,0 +1,43 @@
1
+ # Usage Guide
2
+
3
+ Comprehensive usage guidance for `@fjell/core`.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @fjell/core
9
+ ```
10
+
11
+ ## API Highlights
12
+
13
+ - `IQFactory`, `IFactory`, and `AItemService`
14
+ - `createCoordinate` and dictionary exports
15
+ - Shared errors, operations, and event exports
16
+
17
+ ## Quick Example
18
+
19
+ ```ts
20
+ import { createCoordinate, IFactory } from "@fjell/core";
21
+
22
+ const coordinate = createCoordinate({
23
+ scope: "widget",
24
+ itemType: ["tenant", "widget"],
25
+ });
26
+
27
+ const factory = new IFactory();
28
+ const key = factory.key({ tenantId: "t1", widgetId: "w1" }, coordinate);
29
+ ```
30
+
31
+ ## Model Consumption Rules
32
+
33
+ 1. Import from the package root (`@fjell/core`) instead of deep-internal paths unless explicitly documented.
34
+ 2. Keep usage aligned with exported public symbols listed in this guide.
35
+ 3. Prefer explicit typing at package boundaries so generated code remains robust during upgrades.
36
+ 4. Keep error handling deterministic and map infrastructure failures into domain-level errors.
37
+ 5. Co-locate integration wrappers in your app so model-generated code has one canonical entry point.
38
+
39
+ ## Best Practices
40
+
41
+ - Keep examples and abstractions consistent with existing Fjell package conventions.
42
+ - Favor composable wrappers over one-off inline integration logic.
43
+ - Add targeted tests around generated integration code paths.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fjell/core",
3
3
  "description": "Core Item and Key Framework for Fjell",
4
- "version": "4.4.77",
4
+ "version": "4.4.79",
5
5
  "keywords": [
6
6
  "core",
7
7
  "fjell"
@@ -36,16 +36,16 @@
36
36
  "docs:test": "cd docs && npm run test"
37
37
  },
38
38
  "dependencies": {
39
- "@fjell/logging": "^4.4.67",
40
- "@fjell/types": "4.4.7",
41
- "@fjell/validation": "4.4.4",
39
+ "@fjell/logging": "^4.4.72",
40
+ "@fjell/types": "^4.4.9",
41
+ "@fjell/validation": "^4.4.6",
42
42
  "deepmerge": "^4.3.1",
43
43
  "luxon": "^3.7.2"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@eslint/eslintrc": "^3.3.1",
47
47
  "@eslint/js": "^9.39.1",
48
- "@fjell/common-config": "^1.1.37",
48
+ "@fjell/common-config": "^1.1.38",
49
49
  "@swc/core": "^1.15.2",
50
50
  "@tsconfig/recommended": "^1.0.13",
51
51
  "@types/luxon": "^3.7.1",