yaml-flow 2.6.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/ingest-board.js +296 -0
- package/browser/live-cards.js +303 -0
- package/browser/live-cards.schema.json +22 -2
- package/dist/card-compute/index.cjs +6751 -0
- package/dist/card-compute/index.cjs.map +1 -1
- package/dist/card-compute/index.d.cts +24 -1
- package/dist/card-compute/index.d.ts +24 -1
- package/dist/card-compute/index.js +6747 -1
- package/dist/card-compute/index.js.map +1 -1
- package/dist/index.cjs +6750 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6746 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/schema/live-cards.schema.json +22 -2
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* schema-validator — Full JSON Schema validation for LiveCards nodes.
|
|
3
|
+
*
|
|
4
|
+
* Uses AJV to validate against the published live-cards.schema.json.
|
|
5
|
+
* For a lightweight sync check without AJV, use `CardCompute.validate()` instead.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { validateLiveCardSchema } from 'yaml-flow/card-compute';
|
|
10
|
+
*
|
|
11
|
+
* const result = validateLiveCardSchema(node);
|
|
12
|
+
* if (!result.ok) console.error(result.errors);
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Validate a node against the full LiveCards JSON Schema (draft-07).
|
|
18
|
+
*
|
|
19
|
+
* Requires `ajv` and `ajv-formats` to be installed.
|
|
20
|
+
* Returns the same `ValidationResult` shape as `CardCompute.validate()`.
|
|
21
|
+
*/
|
|
22
|
+
declare function validateLiveCardSchema(node: unknown): ValidationResult;
|
|
23
|
+
|
|
1
24
|
/**
|
|
2
25
|
* card-compute — Pure JSON expression evaluator for node-based cards.
|
|
3
26
|
*
|
|
@@ -82,4 +105,4 @@ declare const CardCompute: {
|
|
|
82
105
|
readonly functions: Record<string, ComputeFn>;
|
|
83
106
|
};
|
|
84
107
|
|
|
85
|
-
export { CardCompute, type ComputeExpr, type ComputeFn, type ComputeNode, type EvalFn, type ValidationResult, CardCompute as default };
|
|
108
|
+
export { CardCompute, type ComputeExpr, type ComputeFn, type ComputeNode, type EvalFn, type ValidationResult, CardCompute as default, validateLiveCardSchema };
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* schema-validator — Full JSON Schema validation for LiveCards nodes.
|
|
3
|
+
*
|
|
4
|
+
* Uses AJV to validate against the published live-cards.schema.json.
|
|
5
|
+
* For a lightweight sync check without AJV, use `CardCompute.validate()` instead.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { validateLiveCardSchema } from 'yaml-flow/card-compute';
|
|
10
|
+
*
|
|
11
|
+
* const result = validateLiveCardSchema(node);
|
|
12
|
+
* if (!result.ok) console.error(result.errors);
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Validate a node against the full LiveCards JSON Schema (draft-07).
|
|
18
|
+
*
|
|
19
|
+
* Requires `ajv` and `ajv-formats` to be installed.
|
|
20
|
+
* Returns the same `ValidationResult` shape as `CardCompute.validate()`.
|
|
21
|
+
*/
|
|
22
|
+
declare function validateLiveCardSchema(node: unknown): ValidationResult;
|
|
23
|
+
|
|
1
24
|
/**
|
|
2
25
|
* card-compute — Pure JSON expression evaluator for node-based cards.
|
|
3
26
|
*
|
|
@@ -82,4 +105,4 @@ declare const CardCompute: {
|
|
|
82
105
|
readonly functions: Record<string, ComputeFn>;
|
|
83
106
|
};
|
|
84
107
|
|
|
85
|
-
export { CardCompute, type ComputeExpr, type ComputeFn, type ComputeNode, type EvalFn, type ValidationResult, CardCompute as default };
|
|
108
|
+
export { CardCompute, type ComputeExpr, type ComputeFn, type ComputeNode, type EvalFn, type ValidationResult, CardCompute as default, validateLiveCardSchema };
|