@kalada/core 0.0.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/README.md +10 -0
- package/THIRD_PARTY_NOTICES.md +42 -0
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/kuery-v1/callback-promise.cjs +79 -0
- package/dist/kuery-v1/callback-promise.cjs.map +1 -0
- package/dist/kuery-v1/callback-promise.d.cts +4 -0
- package/dist/kuery-v1/callback-promise.d.ts +4 -0
- package/dist/kuery-v1/callback-promise.js +77 -0
- package/dist/kuery-v1/callback-promise.js.map +1 -0
- package/dist/kuery-v1/canonicalize.cjs +181 -0
- package/dist/kuery-v1/canonicalize.cjs.map +1 -0
- package/dist/kuery-v1/canonicalize.d.cts +7 -0
- package/dist/kuery-v1/canonicalize.d.ts +7 -0
- package/dist/kuery-v1/canonicalize.js +178 -0
- package/dist/kuery-v1/canonicalize.js.map +1 -0
- package/dist/kuery-v1/compile.cjs +53 -0
- package/dist/kuery-v1/compile.cjs.map +1 -0
- package/dist/kuery-v1/compile.d.cts +10 -0
- package/dist/kuery-v1/compile.d.ts +10 -0
- package/dist/kuery-v1/compile.js +51 -0
- package/dist/kuery-v1/compile.js.map +1 -0
- package/dist/kuery-v1/dependencies.cjs +32 -0
- package/dist/kuery-v1/dependencies.cjs.map +1 -0
- package/dist/kuery-v1/dependencies.d.cts +7 -0
- package/dist/kuery-v1/dependencies.d.ts +7 -0
- package/dist/kuery-v1/dependencies.js +29 -0
- package/dist/kuery-v1/dependencies.js.map +1 -0
- package/dist/kuery-v1/evaluate.cjs +174 -0
- package/dist/kuery-v1/evaluate.cjs.map +1 -0
- package/dist/kuery-v1/evaluate.d.cts +6 -0
- package/dist/kuery-v1/evaluate.d.ts +6 -0
- package/dist/kuery-v1/evaluate.js +172 -0
- package/dist/kuery-v1/evaluate.js.map +1 -0
- package/dist/kuery-v1/index.cjs +54 -0
- package/dist/kuery-v1/index.cjs.map +1 -0
- package/dist/kuery-v1/index.d.cts +8 -0
- package/dist/kuery-v1/index.d.ts +8 -0
- package/dist/kuery-v1/index.js +9 -0
- package/dist/kuery-v1/index.js.map +1 -0
- package/dist/kuery-v1/inspect.cjs +167 -0
- package/dist/kuery-v1/inspect.cjs.map +1 -0
- package/dist/kuery-v1/inspect.d.cts +17 -0
- package/dist/kuery-v1/inspect.d.ts +17 -0
- package/dist/kuery-v1/inspect.js +160 -0
- package/dist/kuery-v1/inspect.js.map +1 -0
- package/dist/kuery-v1/json-schema.cjs +108 -0
- package/dist/kuery-v1/json-schema.cjs.map +1 -0
- package/dist/kuery-v1/json-schema.d.cts +10 -0
- package/dist/kuery-v1/json-schema.d.ts +10 -0
- package/dist/kuery-v1/json-schema.js +105 -0
- package/dist/kuery-v1/json-schema.js.map +1 -0
- package/dist/kuery-v1/limits.cjs +35 -0
- package/dist/kuery-v1/limits.cjs.map +1 -0
- package/dist/kuery-v1/limits.d.cts +6 -0
- package/dist/kuery-v1/limits.d.ts +6 -0
- package/dist/kuery-v1/limits.js +32 -0
- package/dist/kuery-v1/limits.js.map +1 -0
- package/dist/kuery-v1/profile.cjs +224 -0
- package/dist/kuery-v1/profile.cjs.map +1 -0
- package/dist/kuery-v1/profile.d.cts +48 -0
- package/dist/kuery-v1/profile.d.ts +48 -0
- package/dist/kuery-v1/profile.js +219 -0
- package/dist/kuery-v1/profile.js.map +1 -0
- package/dist/kuery-v1/result.cjs +44 -0
- package/dist/kuery-v1/result.cjs.map +1 -0
- package/dist/kuery-v1/result.d.cts +12 -0
- package/dist/kuery-v1/result.d.ts +12 -0
- package/dist/kuery-v1/result.js +39 -0
- package/dist/kuery-v1/result.js.map +1 -0
- package/dist/kuery-v1/standard-profile.cjs +173 -0
- package/dist/kuery-v1/standard-profile.cjs.map +1 -0
- package/dist/kuery-v1/standard-profile.d.cts +7 -0
- package/dist/kuery-v1/standard-profile.d.ts +7 -0
- package/dist/kuery-v1/standard-profile.js +171 -0
- package/dist/kuery-v1/standard-profile.js.map +1 -0
- package/dist/kuery-v1/types.cjs +4 -0
- package/dist/kuery-v1/types.cjs.map +1 -0
- package/dist/kuery-v1/types.d.cts +65 -0
- package/dist/kuery-v1/types.d.ts +65 -0
- package/dist/kuery-v1/types.js +3 -0
- package/dist/kuery-v1/types.js.map +1 -0
- package/dist/program-v1.cjs +72 -0
- package/dist/program-v1.cjs.map +1 -0
- package/dist/program-v1.d.cts +17 -0
- package/dist/program-v1.d.ts +17 -0
- package/dist/program-v1.js +68 -0
- package/dist/program-v1.js.map +1 -0
- package/package.json +51 -0
- package/provenance/kuery-2.1.0.json +93 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** JSON data accepted and produced by the strict expression API. */
|
|
2
|
+
type JsonPrimitive = null | boolean | number | string;
|
|
3
|
+
type JsonValue = JsonPrimitive | JsonArray | JsonObject;
|
|
4
|
+
type JsonArray = readonly JsonValue[];
|
|
5
|
+
type JsonObject = {
|
|
6
|
+
readonly [key: string]: JsonValue;
|
|
7
|
+
};
|
|
8
|
+
/** A literal, opaque reference, or operator application. */
|
|
9
|
+
type ValueExpression<R extends JsonValue = string> = {
|
|
10
|
+
readonly kind: "literal";
|
|
11
|
+
readonly value: JsonValue;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: "ref";
|
|
14
|
+
readonly ref: R;
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: "op";
|
|
17
|
+
readonly op: string;
|
|
18
|
+
readonly args: readonly ValueExpression<R>[];
|
|
19
|
+
};
|
|
20
|
+
type ExpressionPath = readonly (string | number)[];
|
|
21
|
+
type ExpressionDiagnosticCode = "EXPRESSION_INVALID_INPUT" | "EXPRESSION_LIMIT_EXCEEDED" | "EXPRESSION_INVALID_REFERENCE" | "EXPRESSION_UNKNOWN_OPERATOR" | "EXPRESSION_INVALID_ARITY" | "EXPRESSION_TYPE_MISMATCH" | "EXPRESSION_DIVISION_BY_ZERO" | "EXPRESSION_NON_FINITE_RESULT" | "EXPRESSION_REFERENCE_ERROR" | "EXPRESSION_REFERENCE_MISSING" | "EXPRESSION_REFERENCE_DENIED" | "EXPRESSION_OPERATOR_ERROR" | "EXPRESSION_ASYNC_UNSUPPORTED" | "EXPRESSION_EVALUATION_LIMIT" | "EXPRESSION_INVALID_RESULT";
|
|
22
|
+
interface ExpressionDiagnostic {
|
|
23
|
+
readonly code: ExpressionDiagnosticCode;
|
|
24
|
+
readonly path: ExpressionPath;
|
|
25
|
+
readonly message: string;
|
|
26
|
+
}
|
|
27
|
+
type Result<T> = {
|
|
28
|
+
readonly ok: true;
|
|
29
|
+
readonly value: T;
|
|
30
|
+
} | {
|
|
31
|
+
readonly ok: false;
|
|
32
|
+
readonly diagnostic: ExpressionDiagnostic;
|
|
33
|
+
};
|
|
34
|
+
interface ExpressionLimits {
|
|
35
|
+
readonly maxDepth: number;
|
|
36
|
+
readonly maxNodes: number;
|
|
37
|
+
readonly maxArgs: number;
|
|
38
|
+
readonly maxStringLength: number;
|
|
39
|
+
readonly maxReferenceLength: number;
|
|
40
|
+
readonly maxEvaluationSteps: number;
|
|
41
|
+
}
|
|
42
|
+
interface ReferenceCodec<R extends JsonValue> {
|
|
43
|
+
readonly validate: (input: unknown) => input is R;
|
|
44
|
+
readonly canonicalize?: (reference: R) => R;
|
|
45
|
+
}
|
|
46
|
+
interface CanonicalizeExpressionOptions<R extends JsonValue> {
|
|
47
|
+
readonly reference?: ReferenceCodec<R>;
|
|
48
|
+
readonly limits?: Partial<ExpressionLimits>;
|
|
49
|
+
}
|
|
50
|
+
type ReferenceResolution = {
|
|
51
|
+
readonly found: true;
|
|
52
|
+
readonly value: JsonValue;
|
|
53
|
+
} | {
|
|
54
|
+
readonly found: false;
|
|
55
|
+
readonly reason?: "missing" | "denied" | undefined;
|
|
56
|
+
};
|
|
57
|
+
/** Trusted host callback. Throwing and asynchronous outcomes are contained as diagnostics. */
|
|
58
|
+
type ReferenceResolver<R extends JsonValue> = (reference: R) => ReferenceResolution;
|
|
59
|
+
interface CompiledExpression<R extends JsonValue> {
|
|
60
|
+
readonly expression: ValueExpression<R>;
|
|
61
|
+
readonly dependencies: readonly R[];
|
|
62
|
+
evaluate(resolve: ReferenceResolver<R>): Result<JsonValue>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type { CanonicalizeExpressionOptions, CompiledExpression, ExpressionDiagnostic, ExpressionDiagnosticCode, ExpressionLimits, ExpressionPath, JsonArray, JsonObject, JsonPrimitive, JsonValue, ReferenceCodec, ReferenceResolution, ReferenceResolver, Result, ValueExpression };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var canonicalize_js = require('./kuery-v1/canonicalize.js');
|
|
4
|
+
var result_js = require('./kuery-v1/result.js');
|
|
5
|
+
|
|
6
|
+
const PROGRAM_KEYS = /* @__PURE__ */ new Set(["format", "version", "profile", "expression"]);
|
|
7
|
+
function canonicalizeKaladaProgramV1(input, options = {}) {
|
|
8
|
+
const fields = readProgramFields(input);
|
|
9
|
+
if (!fields.ok) return fields;
|
|
10
|
+
if (fields.value.format !== "kalada-program" || fields.value.version !== 1 || fields.value.profile !== "standard-v1") {
|
|
11
|
+
return result_js.failure("EXPRESSION_INVALID_INPUT", []);
|
|
12
|
+
}
|
|
13
|
+
const expression = canonicalize_js.canonicalizeExpression(fields.value.expression, options);
|
|
14
|
+
if (!expression.ok) return prefixExpressionPath(expression.diagnostic);
|
|
15
|
+
return result_js.success(
|
|
16
|
+
Object.freeze({
|
|
17
|
+
format: "kalada-program",
|
|
18
|
+
version: 1,
|
|
19
|
+
profile: "standard-v1",
|
|
20
|
+
expression: expression.value
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function fromKueryExpression(expression, options = {}) {
|
|
25
|
+
return canonicalizeKaladaProgramV1(
|
|
26
|
+
{ format: "kalada-program", version: 1, profile: "standard-v1", expression },
|
|
27
|
+
options
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function toKueryExpression(program, options = {}) {
|
|
31
|
+
const canonical = canonicalizeKaladaProgramV1(program, options);
|
|
32
|
+
return canonical.ok ? result_js.success(canonical.value.expression) : canonical;
|
|
33
|
+
}
|
|
34
|
+
function readProgramFields(input) {
|
|
35
|
+
if (!isPlainObject(input)) return result_js.failure("EXPRESSION_INVALID_INPUT", []);
|
|
36
|
+
try {
|
|
37
|
+
const keys = Reflect.ownKeys(input);
|
|
38
|
+
if (keys.length !== PROGRAM_KEYS.size) return result_js.failure("EXPRESSION_INVALID_INPUT", []);
|
|
39
|
+
const fields = {};
|
|
40
|
+
for (const key of keys) {
|
|
41
|
+
if (typeof key !== "string" || !PROGRAM_KEYS.has(key)) {
|
|
42
|
+
return result_js.failure("EXPRESSION_INVALID_INPUT", []);
|
|
43
|
+
}
|
|
44
|
+
const descriptor = Object.getOwnPropertyDescriptor(input, key);
|
|
45
|
+
if (!descriptor || !("value" in descriptor) || !descriptor.enumerable) {
|
|
46
|
+
return result_js.failure("EXPRESSION_INVALID_INPUT", [key]);
|
|
47
|
+
}
|
|
48
|
+
fields[key] = descriptor.value;
|
|
49
|
+
}
|
|
50
|
+
return result_js.success(fields);
|
|
51
|
+
} catch {
|
|
52
|
+
return result_js.failure("EXPRESSION_INVALID_INPUT", []);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function isPlainObject(input) {
|
|
56
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) return false;
|
|
57
|
+
try {
|
|
58
|
+
const prototype = Object.getPrototypeOf(input);
|
|
59
|
+
return prototype === Object.prototype || prototype === null;
|
|
60
|
+
} catch {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function prefixExpressionPath(diagnostic) {
|
|
65
|
+
return result_js.failure(diagnostic.code, ["expression", ...diagnostic.path]);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
exports.canonicalizeKaladaProgramV1 = canonicalizeKaladaProgramV1;
|
|
69
|
+
exports.fromKueryExpression = fromKueryExpression;
|
|
70
|
+
exports.toKueryExpression = toKueryExpression;
|
|
71
|
+
//# sourceMappingURL=program-v1.cjs.map
|
|
72
|
+
//# sourceMappingURL=program-v1.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/program-v1.ts"],"names":["failure","canonicalizeExpression","success"],"mappings":"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","file":"program-v1.cjs","sourcesContent":["import { canonicalizeExpression } from \"./kuery-v1/canonicalize.js\";\nimport { failure, success } from \"./kuery-v1/result.js\";\nimport type {\n CanonicalizeExpressionOptions,\n ExpressionDiagnostic,\n JsonValue,\n Result,\n ValueExpression,\n} from \"./kuery-v1/types.js\";\n\nexport interface KaladaProgramV1<R extends JsonValue = string> {\n readonly format: \"kalada-program\";\n readonly version: 1;\n readonly profile: \"standard-v1\";\n readonly expression: ValueExpression<R>;\n}\n\nexport type KaladaProgramV1Options<R extends JsonValue = string> = CanonicalizeExpressionOptions<R>;\nexport type KaladaProgramV1Result<R extends JsonValue = string> = Result<KaladaProgramV1<R>>;\nexport type KueryExpressionV1<R extends JsonValue = string> = ValueExpression<R>;\nexport type KaladaProgramDiagnostic = ExpressionDiagnostic;\n\nconst PROGRAM_KEYS = new Set([\"format\", \"version\", \"profile\", \"expression\"]);\n\nexport function canonicalizeKaladaProgramV1<R extends JsonValue = string>(\n input: unknown,\n options: KaladaProgramV1Options<R> = {},\n): KaladaProgramV1Result<R> {\n const fields = readProgramFields(input);\n if (!fields.ok) return fields;\n if (\n fields.value.format !== \"kalada-program\" ||\n fields.value.version !== 1 ||\n fields.value.profile !== \"standard-v1\"\n ) {\n return failure(\"EXPRESSION_INVALID_INPUT\", []);\n }\n const expression = canonicalizeExpression<R>(fields.value.expression, options);\n if (!expression.ok) return prefixExpressionPath(expression.diagnostic);\n return success(\n Object.freeze({\n format: \"kalada-program\",\n version: 1,\n profile: \"standard-v1\",\n expression: expression.value,\n }),\n );\n}\n\nexport function fromKueryExpression<R extends JsonValue = string>(\n expression: unknown,\n options: KaladaProgramV1Options<R> = {},\n): KaladaProgramV1Result<R> {\n return canonicalizeKaladaProgramV1(\n { format: \"kalada-program\", version: 1, profile: \"standard-v1\", expression },\n options,\n );\n}\n\nexport function toKueryExpression<R extends JsonValue = string>(\n program: unknown,\n options: KaladaProgramV1Options<R> = {},\n): Result<ValueExpression<R>> {\n const canonical = canonicalizeKaladaProgramV1<R>(program, options);\n return canonical.ok ? success(canonical.value.expression) : canonical;\n}\n\nfunction readProgramFields(input: unknown): Result<Readonly<Record<string, unknown>>> {\n if (!isPlainObject(input)) return failure(\"EXPRESSION_INVALID_INPUT\", []);\n try {\n const keys = Reflect.ownKeys(input);\n if (keys.length !== PROGRAM_KEYS.size) return failure(\"EXPRESSION_INVALID_INPUT\", []);\n const fields: Record<string, unknown> = {};\n for (const key of keys) {\n if (typeof key !== \"string\" || !PROGRAM_KEYS.has(key)) {\n return failure(\"EXPRESSION_INVALID_INPUT\", []);\n }\n const descriptor = Object.getOwnPropertyDescriptor(input, key);\n if (!descriptor || !(\"value\" in descriptor) || !descriptor.enumerable) {\n return failure(\"EXPRESSION_INVALID_INPUT\", [key]);\n }\n fields[key] = descriptor.value;\n }\n return success(fields);\n } catch {\n return failure(\"EXPRESSION_INVALID_INPUT\", []);\n }\n}\n\nfunction isPlainObject(input: unknown): input is object {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) return false;\n try {\n const prototype = Object.getPrototypeOf(input);\n return prototype === Object.prototype || prototype === null;\n } catch {\n return false;\n }\n}\n\nfunction prefixExpressionPath<R extends JsonValue>(\n diagnostic: ExpressionDiagnostic,\n): KaladaProgramV1Result<R> {\n return failure(diagnostic.code, [\"expression\", ...diagnostic.path]);\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ExpressionDiagnostic, JsonValue, ValueExpression, CanonicalizeExpressionOptions, Result } from './kuery-v1/types.cjs';
|
|
2
|
+
|
|
3
|
+
interface KaladaProgramV1<R extends JsonValue = string> {
|
|
4
|
+
readonly format: "kalada-program";
|
|
5
|
+
readonly version: 1;
|
|
6
|
+
readonly profile: "standard-v1";
|
|
7
|
+
readonly expression: ValueExpression<R>;
|
|
8
|
+
}
|
|
9
|
+
type KaladaProgramV1Options<R extends JsonValue = string> = CanonicalizeExpressionOptions<R>;
|
|
10
|
+
type KaladaProgramV1Result<R extends JsonValue = string> = Result<KaladaProgramV1<R>>;
|
|
11
|
+
type KueryExpressionV1<R extends JsonValue = string> = ValueExpression<R>;
|
|
12
|
+
type KaladaProgramDiagnostic = ExpressionDiagnostic;
|
|
13
|
+
declare function canonicalizeKaladaProgramV1<R extends JsonValue = string>(input: unknown, options?: KaladaProgramV1Options<R>): KaladaProgramV1Result<R>;
|
|
14
|
+
declare function fromKueryExpression<R extends JsonValue = string>(expression: unknown, options?: KaladaProgramV1Options<R>): KaladaProgramV1Result<R>;
|
|
15
|
+
declare function toKueryExpression<R extends JsonValue = string>(program: unknown, options?: KaladaProgramV1Options<R>): Result<ValueExpression<R>>;
|
|
16
|
+
|
|
17
|
+
export { type KaladaProgramDiagnostic, type KaladaProgramV1, type KaladaProgramV1Options, type KaladaProgramV1Result, type KueryExpressionV1, canonicalizeKaladaProgramV1, fromKueryExpression, toKueryExpression };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ExpressionDiagnostic, JsonValue, ValueExpression, CanonicalizeExpressionOptions, Result } from './kuery-v1/types.js';
|
|
2
|
+
|
|
3
|
+
interface KaladaProgramV1<R extends JsonValue = string> {
|
|
4
|
+
readonly format: "kalada-program";
|
|
5
|
+
readonly version: 1;
|
|
6
|
+
readonly profile: "standard-v1";
|
|
7
|
+
readonly expression: ValueExpression<R>;
|
|
8
|
+
}
|
|
9
|
+
type KaladaProgramV1Options<R extends JsonValue = string> = CanonicalizeExpressionOptions<R>;
|
|
10
|
+
type KaladaProgramV1Result<R extends JsonValue = string> = Result<KaladaProgramV1<R>>;
|
|
11
|
+
type KueryExpressionV1<R extends JsonValue = string> = ValueExpression<R>;
|
|
12
|
+
type KaladaProgramDiagnostic = ExpressionDiagnostic;
|
|
13
|
+
declare function canonicalizeKaladaProgramV1<R extends JsonValue = string>(input: unknown, options?: KaladaProgramV1Options<R>): KaladaProgramV1Result<R>;
|
|
14
|
+
declare function fromKueryExpression<R extends JsonValue = string>(expression: unknown, options?: KaladaProgramV1Options<R>): KaladaProgramV1Result<R>;
|
|
15
|
+
declare function toKueryExpression<R extends JsonValue = string>(program: unknown, options?: KaladaProgramV1Options<R>): Result<ValueExpression<R>>;
|
|
16
|
+
|
|
17
|
+
export { type KaladaProgramDiagnostic, type KaladaProgramV1, type KaladaProgramV1Options, type KaladaProgramV1Result, type KueryExpressionV1, canonicalizeKaladaProgramV1, fromKueryExpression, toKueryExpression };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { canonicalizeExpression } from './kuery-v1/canonicalize.js';
|
|
2
|
+
import { failure, success } from './kuery-v1/result.js';
|
|
3
|
+
|
|
4
|
+
const PROGRAM_KEYS = /* @__PURE__ */ new Set(["format", "version", "profile", "expression"]);
|
|
5
|
+
function canonicalizeKaladaProgramV1(input, options = {}) {
|
|
6
|
+
const fields = readProgramFields(input);
|
|
7
|
+
if (!fields.ok) return fields;
|
|
8
|
+
if (fields.value.format !== "kalada-program" || fields.value.version !== 1 || fields.value.profile !== "standard-v1") {
|
|
9
|
+
return failure("EXPRESSION_INVALID_INPUT", []);
|
|
10
|
+
}
|
|
11
|
+
const expression = canonicalizeExpression(fields.value.expression, options);
|
|
12
|
+
if (!expression.ok) return prefixExpressionPath(expression.diagnostic);
|
|
13
|
+
return success(
|
|
14
|
+
Object.freeze({
|
|
15
|
+
format: "kalada-program",
|
|
16
|
+
version: 1,
|
|
17
|
+
profile: "standard-v1",
|
|
18
|
+
expression: expression.value
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function fromKueryExpression(expression, options = {}) {
|
|
23
|
+
return canonicalizeKaladaProgramV1(
|
|
24
|
+
{ format: "kalada-program", version: 1, profile: "standard-v1", expression },
|
|
25
|
+
options
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function toKueryExpression(program, options = {}) {
|
|
29
|
+
const canonical = canonicalizeKaladaProgramV1(program, options);
|
|
30
|
+
return canonical.ok ? success(canonical.value.expression) : canonical;
|
|
31
|
+
}
|
|
32
|
+
function readProgramFields(input) {
|
|
33
|
+
if (!isPlainObject(input)) return failure("EXPRESSION_INVALID_INPUT", []);
|
|
34
|
+
try {
|
|
35
|
+
const keys = Reflect.ownKeys(input);
|
|
36
|
+
if (keys.length !== PROGRAM_KEYS.size) return failure("EXPRESSION_INVALID_INPUT", []);
|
|
37
|
+
const fields = {};
|
|
38
|
+
for (const key of keys) {
|
|
39
|
+
if (typeof key !== "string" || !PROGRAM_KEYS.has(key)) {
|
|
40
|
+
return failure("EXPRESSION_INVALID_INPUT", []);
|
|
41
|
+
}
|
|
42
|
+
const descriptor = Object.getOwnPropertyDescriptor(input, key);
|
|
43
|
+
if (!descriptor || !("value" in descriptor) || !descriptor.enumerable) {
|
|
44
|
+
return failure("EXPRESSION_INVALID_INPUT", [key]);
|
|
45
|
+
}
|
|
46
|
+
fields[key] = descriptor.value;
|
|
47
|
+
}
|
|
48
|
+
return success(fields);
|
|
49
|
+
} catch {
|
|
50
|
+
return failure("EXPRESSION_INVALID_INPUT", []);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function isPlainObject(input) {
|
|
54
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) return false;
|
|
55
|
+
try {
|
|
56
|
+
const prototype = Object.getPrototypeOf(input);
|
|
57
|
+
return prototype === Object.prototype || prototype === null;
|
|
58
|
+
} catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function prefixExpressionPath(diagnostic) {
|
|
63
|
+
return failure(diagnostic.code, ["expression", ...diagnostic.path]);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { canonicalizeKaladaProgramV1, fromKueryExpression, toKueryExpression };
|
|
67
|
+
//# sourceMappingURL=program-v1.js.map
|
|
68
|
+
//# sourceMappingURL=program-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/program-v1.ts"],"names":[],"mappings":"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","file":"program-v1.js","sourcesContent":["import { canonicalizeExpression } from \"./kuery-v1/canonicalize.js\";\nimport { failure, success } from \"./kuery-v1/result.js\";\nimport type {\n CanonicalizeExpressionOptions,\n ExpressionDiagnostic,\n JsonValue,\n Result,\n ValueExpression,\n} from \"./kuery-v1/types.js\";\n\nexport interface KaladaProgramV1<R extends JsonValue = string> {\n readonly format: \"kalada-program\";\n readonly version: 1;\n readonly profile: \"standard-v1\";\n readonly expression: ValueExpression<R>;\n}\n\nexport type KaladaProgramV1Options<R extends JsonValue = string> = CanonicalizeExpressionOptions<R>;\nexport type KaladaProgramV1Result<R extends JsonValue = string> = Result<KaladaProgramV1<R>>;\nexport type KueryExpressionV1<R extends JsonValue = string> = ValueExpression<R>;\nexport type KaladaProgramDiagnostic = ExpressionDiagnostic;\n\nconst PROGRAM_KEYS = new Set([\"format\", \"version\", \"profile\", \"expression\"]);\n\nexport function canonicalizeKaladaProgramV1<R extends JsonValue = string>(\n input: unknown,\n options: KaladaProgramV1Options<R> = {},\n): KaladaProgramV1Result<R> {\n const fields = readProgramFields(input);\n if (!fields.ok) return fields;\n if (\n fields.value.format !== \"kalada-program\" ||\n fields.value.version !== 1 ||\n fields.value.profile !== \"standard-v1\"\n ) {\n return failure(\"EXPRESSION_INVALID_INPUT\", []);\n }\n const expression = canonicalizeExpression<R>(fields.value.expression, options);\n if (!expression.ok) return prefixExpressionPath(expression.diagnostic);\n return success(\n Object.freeze({\n format: \"kalada-program\",\n version: 1,\n profile: \"standard-v1\",\n expression: expression.value,\n }),\n );\n}\n\nexport function fromKueryExpression<R extends JsonValue = string>(\n expression: unknown,\n options: KaladaProgramV1Options<R> = {},\n): KaladaProgramV1Result<R> {\n return canonicalizeKaladaProgramV1(\n { format: \"kalada-program\", version: 1, profile: \"standard-v1\", expression },\n options,\n );\n}\n\nexport function toKueryExpression<R extends JsonValue = string>(\n program: unknown,\n options: KaladaProgramV1Options<R> = {},\n): Result<ValueExpression<R>> {\n const canonical = canonicalizeKaladaProgramV1<R>(program, options);\n return canonical.ok ? success(canonical.value.expression) : canonical;\n}\n\nfunction readProgramFields(input: unknown): Result<Readonly<Record<string, unknown>>> {\n if (!isPlainObject(input)) return failure(\"EXPRESSION_INVALID_INPUT\", []);\n try {\n const keys = Reflect.ownKeys(input);\n if (keys.length !== PROGRAM_KEYS.size) return failure(\"EXPRESSION_INVALID_INPUT\", []);\n const fields: Record<string, unknown> = {};\n for (const key of keys) {\n if (typeof key !== \"string\" || !PROGRAM_KEYS.has(key)) {\n return failure(\"EXPRESSION_INVALID_INPUT\", []);\n }\n const descriptor = Object.getOwnPropertyDescriptor(input, key);\n if (!descriptor || !(\"value\" in descriptor) || !descriptor.enumerable) {\n return failure(\"EXPRESSION_INVALID_INPUT\", [key]);\n }\n fields[key] = descriptor.value;\n }\n return success(fields);\n } catch {\n return failure(\"EXPRESSION_INVALID_INPUT\", []);\n }\n}\n\nfunction isPlainObject(input: unknown): input is object {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) return false;\n try {\n const prototype = Object.getPrototypeOf(input);\n return prototype === Object.prototype || prototype === null;\n } catch {\n return false;\n }\n}\n\nfunction prefixExpressionPath<R extends JsonValue>(\n diagnostic: ExpressionDiagnostic,\n): KaladaProgramV1Result<R> {\n return failure(diagnostic.code, [\"expression\", ...diagnostic.path]);\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kalada/core",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Canonical runtime contracts for the Kalada expression language",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"provenance",
|
|
11
|
+
"README.md",
|
|
12
|
+
"THIRD_PARTY_NOTICES.md"
|
|
13
|
+
],
|
|
14
|
+
"main": "./dist/index.cjs",
|
|
15
|
+
"module": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"require": {
|
|
24
|
+
"types": "./dist/index.d.cts",
|
|
25
|
+
"default": "./dist/index.cjs"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"./kuery-v1": {
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./dist/kuery-v1/index.d.ts",
|
|
31
|
+
"default": "./dist/kuery-v1/index.js"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./dist/kuery-v1/index.d.cts",
|
|
35
|
+
"default": "./dist/kuery-v1/index.cjs"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsup",
|
|
42
|
+
"test": "vitest run src",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=22.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"upstream": {
|
|
3
|
+
"package": "kuery@2.1.0",
|
|
4
|
+
"tag": "v2.1.0",
|
|
5
|
+
"releaseCommit": "732eb12b1deacd85bb1421b92169c9af20a98962",
|
|
6
|
+
"sourceTree": "be5951e00aa227d3f6c4009700fe5920e786b66c",
|
|
7
|
+
"treeListingSha256": "6bf36f342a26b2021a51f12b8421e6e8b5be630cee53e99e3142e81fafaf78c9",
|
|
8
|
+
"npmIntegrity": "sha512-L7H1oOAJApFQvgAuwBGvUsUcYmqsg04LxfpiCHSrYqDKecOzPDT4X2Yz5YrqrJDJevlZTCmsafV3JcBvAdxnJA=="
|
|
9
|
+
},
|
|
10
|
+
"productionFiles": [
|
|
11
|
+
[
|
|
12
|
+
"callback-promise.ts",
|
|
13
|
+
"7178b9cd936d317eaaec786932c1c251656fbb79",
|
|
14
|
+
"076faae096ce36ccfbc1e82a23c66f561b9af008514c4230bea1d5a7bba61d21"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"canonicalize.ts",
|
|
18
|
+
"8b92e931c62855f7e677a93f1563cbcc5103d78c",
|
|
19
|
+
"aff37b07cf2b3cf6096e63208fc3cd4db5dcb2db9411cf111c708350af236eb1"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"compile.ts",
|
|
23
|
+
"f3f5125cfbcc96bbc6cdd70af3d20528558cf044",
|
|
24
|
+
"b68b30cbcf4328f84a6f612c8f72808ba795f627f37109eb8d8d9abb4aef13e9"
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
"dependencies.ts",
|
|
28
|
+
"09da4c7f3fe418257fd77607e8a977edd43a6be9",
|
|
29
|
+
"68f24956a37692d19a87fb1a54c4293f9c47a8d89b459a3b9bf97437ab2070dd"
|
|
30
|
+
],
|
|
31
|
+
[
|
|
32
|
+
"evaluate.ts",
|
|
33
|
+
"e99d3e5d7b7531bf968828c2dad9f73e3a1b5cd9",
|
|
34
|
+
"2d3faf5f31717b2a8930ed27f7af54066816a8734a293d1743ff53c6d129376c"
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
"index.ts",
|
|
38
|
+
"e747100518abce0ddf58139cf5a075a3b48a609b",
|
|
39
|
+
"2a975ea636eb0377c295c9e2296b65a0a100b34af8c90dde91a36c0c7d005ccd"
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"inspect.ts",
|
|
43
|
+
"abb662b632a836395a061f217b456b7691588158",
|
|
44
|
+
"05386e1a47cdb907f3da624be4e451c9e1ca50076d87912bb8da432856db94a3"
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"json-schema.ts",
|
|
48
|
+
"8c24f1d359bd2b0e7c8eb52b20fd7ec5e6f2b884",
|
|
49
|
+
"91f4894acf7701410727b5fd2e919e7c1bb67b546cdc7abca346805e9c49ee5a"
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
"limits.ts",
|
|
53
|
+
"4ce94b35a92d3f3757625c9e692e371a6b926770",
|
|
54
|
+
"9a05f3f16f5d44746d4dbc8ffe09dee4415b95fec798bbd714fb3bee876f338b"
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
"profile.ts",
|
|
58
|
+
"81d40b568f12ff09cac3121825a3e36ffa594367",
|
|
59
|
+
"6c5f8dadb87160ae2e1c9a544c099653000d77c6f8b51b7a2f1eda30219312bd"
|
|
60
|
+
],
|
|
61
|
+
[
|
|
62
|
+
"result.ts",
|
|
63
|
+
"a1cf6072df5c05be80fcae3691fd2ff09c3a6fd7",
|
|
64
|
+
"12e4a4848b6c6337a45afed49c23f85d7dc53cdf052f6630fe92cf0e71377dca"
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
"standard-profile.ts",
|
|
68
|
+
"b820f6c2b1f2a29bc01eab9184a3252f570c94ec",
|
|
69
|
+
"75ecb1cf7e552033243e0fdfb3bb8b944b2c3105f4d56e7b541e2408175eec0a"
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"types.ts",
|
|
73
|
+
"29eaacffbe92dca89a28a334ec4521bdea1b1374",
|
|
74
|
+
"702f11f74b602afe3c73cae364fc48b5cda705b1dec52d267c1599f17bd4b14c"
|
|
75
|
+
]
|
|
76
|
+
],
|
|
77
|
+
"productionSourcePrefix": "src/expression/",
|
|
78
|
+
"productionDestinationPrefix": "packages/core/src/kuery-v1/",
|
|
79
|
+
"productionClassification": "verbatim source before repository formatting; formatting/import/type syntax, explicit fields replacing parameter properties, strict annotations, one local rename, and one cohesive helper extraction only",
|
|
80
|
+
"tests": {
|
|
81
|
+
"source": "src/expression/__tests__/expression.test.ts",
|
|
82
|
+
"blob": "7b3e2dcda1bbe43e09119cb6f9b7f32ee3e3678c",
|
|
83
|
+
"sha256": "0d63e399e0e64326f752e573617c57e8955e2dd6490ffb5abd76b5cd8759c239",
|
|
84
|
+
"destinations": [
|
|
85
|
+
"packages/core/src/kuery-v1/__tests__/canonicalize.test.ts",
|
|
86
|
+
"packages/core/src/kuery-v1/__tests__/standard-profile.test.ts",
|
|
87
|
+
"packages/core/src/kuery-v1/__tests__/compiled.test.ts",
|
|
88
|
+
"packages/core/src/kuery-v1/__tests__/profiles.test.ts",
|
|
89
|
+
"packages/core/src/kuery-v1/__tests__/json-schema.test.ts"
|
|
90
|
+
],
|
|
91
|
+
"classification": "split by top-level suite; imports formatted; strict annotations added; shared fixture constructors extracted"
|
|
92
|
+
}
|
|
93
|
+
}
|