@astrale-os/kernel-dsl 0.2.0-beta.47 → 0.2.0-beta.49

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.
Files changed (142) hide show
  1. package/dist/v1/addressing/patterns.d.ts +0 -5
  2. package/dist/v1/addressing/patterns.js +5 -5
  3. package/dist/v1/builder/callable/authoring.d.ts +1 -1
  4. package/dist/v1/builder/class/authoring.d.ts +0 -12
  5. package/dist/v1/builder/class/property.d.ts +1 -1
  6. package/dist/v1/builder/index.d.ts +1 -1
  7. package/dist/v1/builder/lowering/callable.d.ts +2 -1
  8. package/dist/v1/builder/lowering/core.d.ts +3 -2
  9. package/dist/v1/builder/lowering/schema/compile.js +14 -1
  10. package/dist/v1/builder/lowering/value/zod.d.ts +3 -2
  11. package/dist/v1/builder/lowering/view.d.ts +2 -1
  12. package/dist/v1/builder/schema/define.d.ts +4 -2
  13. package/dist/v1/builder/schema/handle.d.ts +2 -1
  14. package/dist/v1/builder/schema/input.d.ts +8 -0
  15. package/dist/v1/builder/schema/projection/callable.d.ts +51 -0
  16. package/dist/v1/builder/schema/projection/callable.js +1 -0
  17. package/dist/v1/builder/schema/projection/class.d.ts +89 -0
  18. package/dist/v1/builder/schema/projection/class.js +1 -0
  19. package/dist/v1/builder/schema/projection/core-input.d.ts +32 -0
  20. package/dist/v1/builder/schema/projection/core-input.js +1 -0
  21. package/dist/v1/builder/schema/projection/domain.d.ts +59 -0
  22. package/dist/v1/builder/schema/projection/domain.js +1 -0
  23. package/dist/v1/builder/schema/projection/identity.d.ts +39 -0
  24. package/dist/v1/builder/schema/projection/identity.js +1 -0
  25. package/dist/v1/builder/schema/projection/model.d.ts +59 -0
  26. package/dist/v1/builder/schema/projection/model.js +1 -0
  27. package/dist/v1/builder/schema/projection/property.d.ts +32 -0
  28. package/dist/v1/builder/schema/projection/property.js +1 -0
  29. package/dist/v1/builder/schema/projection/resolved-class.d.ts +76 -0
  30. package/dist/v1/builder/schema/projection/resolved-class.js +1 -0
  31. package/dist/v1/builder/schema/projection.d.ts +4 -375
  32. package/dist/v1/bundle/structure.d.ts +2 -1
  33. package/dist/v1/compiled/admission/accept.d.ts +1 -1
  34. package/dist/v1/compiled/admission/accept.js +7 -1005
  35. package/dist/v1/compiled/admission/closure.d.ts +3 -0
  36. package/dist/v1/compiled/admission/closure.js +173 -0
  37. package/dist/v1/compiled/admission/diagnostic.d.ts +7 -0
  38. package/dist/v1/compiled/admission/diagnostic.js +13 -0
  39. package/dist/v1/compiled/admission/revision.js +2 -0
  40. package/dist/v1/compiled/admission/semantics/cardinality.d.ts +5 -0
  41. package/dist/v1/compiled/admission/semantics/cardinality.js +113 -0
  42. package/dist/v1/compiled/admission/semantics/class.d.ts +5 -0
  43. package/dist/v1/compiled/admission/semantics/class.js +125 -0
  44. package/dist/v1/compiled/admission/semantics/context.d.ts +60 -0
  45. package/dist/v1/compiled/admission/semantics/context.js +81 -0
  46. package/dist/v1/compiled/admission/semantics/core.d.ts +35 -0
  47. package/dist/v1/compiled/admission/semantics/core.js +123 -0
  48. package/dist/v1/compiled/admission/semantics/edge.d.ts +8 -0
  49. package/dist/v1/compiled/admission/semantics/edge.js +89 -0
  50. package/dist/v1/compiled/admission/semantics/policy/admit.d.ts +4 -0
  51. package/dist/v1/compiled/admission/semantics/policy/admit.js +57 -0
  52. package/dist/v1/compiled/admission/semantics/policy/callable.d.ts +5 -0
  53. package/dist/v1/compiled/admission/semantics/policy/callable.js +72 -0
  54. package/dist/v1/compiled/admission/semantics/policy/contracts.d.ts +24 -0
  55. package/dist/v1/compiled/admission/semantics/policy/contracts.js +45 -0
  56. package/dist/v1/compiled/admission/semantics/policy/equality.d.ts +8 -0
  57. package/dist/v1/compiled/admission/semantics/policy/equality.js +27 -0
  58. package/dist/v1/compiled/admission/semantics/policy/measure.d.ts +9 -0
  59. package/dist/v1/compiled/admission/semantics/policy/measure.js +81 -0
  60. package/dist/v1/compiled/admission/semantics/policy/parity.d.ts +4 -0
  61. package/dist/v1/compiled/admission/semantics/policy/parity.js +126 -0
  62. package/dist/v1/compiled/admission/semantics/policy/pattern.d.ts +8 -0
  63. package/dist/v1/compiled/admission/semantics/policy/pattern.js +78 -0
  64. package/dist/v1/compiled/admission/semantics/policy/typing.d.ts +28 -0
  65. package/dist/v1/compiled/admission/semantics/policy/typing.js +206 -0
  66. package/dist/v1/compiled/admission/semantics/policy/variants.d.ts +10 -0
  67. package/dist/v1/compiled/admission/semantics/policy/variants.js +65 -0
  68. package/dist/v1/compiled/admission/semantics.d.ts +1 -1
  69. package/dist/v1/compiled/admission/semantics.js +8 -1222
  70. package/dist/v1/compiled/admission/wire/callable.d.ts +6 -0
  71. package/dist/v1/compiled/admission/wire/callable.js +90 -0
  72. package/dist/v1/compiled/admission/wire/class.d.ts +4 -0
  73. package/dist/v1/compiled/admission/wire/class.js +117 -0
  74. package/dist/v1/compiled/admission/wire/core.d.ts +5 -0
  75. package/dist/v1/compiled/admission/wire/core.js +32 -0
  76. package/dist/v1/compiled/admission/wire/dependency.d.ts +14 -0
  77. package/dist/v1/compiled/admission/wire/dependency.js +43 -0
  78. package/dist/v1/compiled/admission/wire/entry.d.ts +5 -0
  79. package/dist/v1/compiled/admission/wire/entry.js +100 -0
  80. package/dist/v1/compiled/admission/wire/pattern.d.ts +12 -0
  81. package/dist/v1/compiled/admission/wire/pattern.js +111 -0
  82. package/dist/v1/compiled/admission/wire/policy.d.ts +5 -0
  83. package/dist/v1/compiled/admission/wire/policy.js +168 -0
  84. package/dist/v1/compiled/admission/wire/program.d.ts +4 -0
  85. package/dist/v1/compiled/admission/wire/program.js +52 -0
  86. package/dist/v1/compiled/admission/wire/property.d.ts +4 -0
  87. package/dist/v1/compiled/admission/wire/property.js +74 -0
  88. package/dist/v1/compiled/admission/wire/reference.d.ts +8 -0
  89. package/dist/v1/compiled/admission/wire/reference.js +33 -0
  90. package/dist/v1/compiled/admission/wire/value.d.ts +29 -0
  91. package/dist/v1/compiled/admission/wire/value.js +98 -0
  92. package/dist/v1/compiled/admission/wire/view.d.ts +3 -0
  93. package/dist/v1/compiled/admission/wire/view.js +17 -0
  94. package/dist/v1/compiled/compiler/compile.js +2 -0
  95. package/dist/v1/compiled/model/schema.d.ts +5 -1
  96. package/dist/v1/domain/projection/classes.js +2 -9
  97. package/dist/v1/index.d.ts +1 -1
  98. package/dist/v1/language/class/inheritance.d.ts +12 -0
  99. package/dist/v1/language/class/inheritance.js +25 -0
  100. package/dist/v1/language/class/resolved.d.ts +5 -1
  101. package/dist/v1/language/definition/metadata.d.ts +8 -0
  102. package/dist/v1/language/definition/metadata.js +12 -0
  103. package/dist/v1/language/value/model/blob.d.ts +0 -2
  104. package/dist/v1/language/value/model/blob.js +2 -2
  105. package/dist/v1/language/value/model/instant.d.ts +0 -2
  106. package/dist/v1/language/value/model/instant.js +1 -1
  107. package/dist/v1/language/value/model/schema.d.ts +2 -1
  108. package/dist/v1/language/value/model/schema.js +1 -5
  109. package/dist/v1/language/value/reference/registry.d.ts +2 -1
  110. package/dist/v1/language/value/regexp/syntax.d.ts +2 -1
  111. package/dist/v1/language/view/model/view.d.ts +2 -10
  112. package/dist/v1/schema/analysis/class.d.ts +2 -1
  113. package/dist/v1/schema/canonical/revision.d.ts +2 -1
  114. package/dist/v1/schema/compatibility/comparators/classes.d.ts +2 -1
  115. package/dist/v1/schema/compatibility/coordinate.d.ts +2 -1
  116. package/dist/v1/schema/compatibility/references.js +1 -10
  117. package/dist/v1/schema/compatibility/report.d.ts +2 -1
  118. package/dist/v1/schema/compatibility/scope.d.ts +0 -4
  119. package/dist/v1/schema/compatibility/scope.js +1 -1
  120. package/dist/v1/schema/diagnostic.d.ts +1 -1
  121. package/dist/v1/schema/model/schema.d.ts +5 -1
  122. package/dist/v1/schema/normalization/domain.js +11 -6
  123. package/dist/v1/schema/resolution/definition.index.d.ts +1 -2
  124. package/dist/v1/schema/resolution/definition.index.js +0 -3
  125. package/dist/v1/schema/resolution/origins.d.ts +1 -1
  126. package/dist/v1/schema/resolution/origins.js +0 -5
  127. package/dist/v1/schema/validation/class.js +10 -50
  128. package/dist/v1/schema/validation/core.js +1 -27
  129. package/dist/v1/schema/validation/domain.d.ts +2 -1
  130. package/dist/v1/schema/validation/domain.structure.d.ts +0 -2
  131. package/dist/v1/schema/validation/domain.structure.js +8 -8
  132. package/dist/v1/schema/validation/policy/context.js +5 -16
  133. package/dist/v1/schema/validation/view.js +14 -9
  134. package/dist/value/accept.d.ts +1 -1
  135. package/dist/value/accept.js +32 -6
  136. package/dist/value/canonical.js +10 -2
  137. package/dist/value/immutable.optimization.d.ts +4 -1
  138. package/dist/value/immutable.optimization.js +8 -2
  139. package/dist/value/limits.d.ts +1 -1
  140. package/dist/value/unicode.d.ts +3 -0
  141. package/dist/value/unicode.js +27 -0
  142. package/package.json +1 -1
@@ -6,7 +6,7 @@ import { type Options } from './limits.js';
6
6
  * Every source property is obtained from one descriptor snapshot. Accessors are never invoked.
7
7
  */
8
8
  export declare function accept(input: unknown, options?: Options): Value;
9
- /** Admit unknown data into a deeply immutable snapshot; owned subtrees may be shared. */
9
+ /** Admit a canonically byte-bounded immutable snapshot; owned subtrees may be shared. */
10
10
  export declare function acceptImmutable(input: unknown, options?: Options): Value;
11
11
  /** Admit a read-only snapshot, sharing owned immutable subtrees without freezing new wrappers. */
12
12
  export declare function acceptForRead(input: unknown, options?: Options): Value;
@@ -1,7 +1,7 @@
1
1
  import { BoundaryError } from './error.js';
2
2
  import { includeSnapshot, retainImmutableSnapshot, reusableSnapshot, } from './immutable.optimization.js';
3
3
  import { limitsFor } from './limits.js';
4
- import { assertHostString } from './unicode.js';
4
+ import { assertHostString, canonicalPrimitiveBytes } from './unicode.js';
5
5
  /**
6
6
  * Admit an unknown host value and return a detached portable snapshot.
7
7
  *
@@ -10,7 +10,7 @@ import { assertHostString } from './unicode.js';
10
10
  export function accept(input, options) {
11
11
  return snapshot(input, options, 'copy');
12
12
  }
13
- /** Admit unknown data into a deeply immutable snapshot; owned subtrees may be shared. */
13
+ /** Admit a canonically byte-bounded immutable snapshot; owned subtrees may be shared. */
14
14
  export function acceptImmutable(input, options) {
15
15
  const captured = { propertyRoots: false };
16
16
  const value = snapshot(input, options, 'immutable', captured);
@@ -35,9 +35,10 @@ function snapshot(input, options, mode, captured) {
35
35
  active: new WeakSet(),
36
36
  limits: limitsFor(options),
37
37
  members: 0,
38
+ bytes: mode === 'immutable' && !captured?.propertyRoots ? 0 : undefined,
38
39
  mode,
39
40
  summary: mode === 'immutable' && !captured?.propertyRoots
40
- ? { members: 0, depth: 0, stringBytes: 0 }
41
+ ? { members: 0, depth: 0, stringBytes: 0, canonicalBytes: 0 }
41
42
  : undefined,
42
43
  summaryDepth: 0,
43
44
  propertyRoots: captured?.propertyRoots ?? false,
@@ -55,8 +56,10 @@ function snapshot(input, options, mode, captured) {
55
56
  }
56
57
  }
57
58
  function admit(input, pointer, depth, state) {
58
- if (input === null || typeof input === 'boolean')
59
+ if (input === null || typeof input === 'boolean') {
60
+ addCanonicalBytes(state, input === false ? 5 : 4, pointer);
59
61
  return input;
62
+ }
60
63
  if (typeof input === 'number') {
61
64
  if (!Number.isFinite(input)) {
62
65
  throw new BoundaryError('VALUE_NUMBER', 'Expected a finite IEEE-754 binary64 number', pointer);
@@ -64,6 +67,8 @@ function admit(input, pointer, depth, state) {
64
67
  if (Object.is(input, -0)) {
65
68
  throw new BoundaryError('VALUE_NUMBER', 'Negative zero is outside portable JSON', pointer);
66
69
  }
70
+ if (state.summary !== undefined || state.bytes !== undefined)
71
+ addCanonicalBytes(state, canonicalPrimitiveBytes(input), pointer);
67
72
  return input;
68
73
  }
69
74
  if (typeof input === 'string') {
@@ -74,9 +79,10 @@ function admit(input, pointer, depth, state) {
74
79
  throw new BoundaryError('VALUE_TYPE', 'Expected a portable value', pointer);
75
80
  }
76
81
  if (state.mode !== 'copy' && !(state.propertyRoots && depth === 0)) {
77
- const summary = reusableSnapshot(input, state.limits, depth, state.members);
82
+ const summary = reusableSnapshot(input, state.limits, depth, state.members, state.bytes);
78
83
  if (summary !== undefined) {
79
84
  state.members += summary.members;
85
+ chargeCanonicalBytes(state, summary.canonicalBytes, pointer);
80
86
  includeSnapshot(state.summary, summary, depth - state.summaryDepth);
81
87
  return input;
82
88
  }
@@ -92,7 +98,7 @@ function admit(input, pointer, depth, state) {
92
98
  const parentDepth = state.summaryDepth;
93
99
  const propertyRoot = state.mode === 'immutable' && state.propertyRoots && depth === 1;
94
100
  if (propertyRoot) {
95
- state.summary = { members: 0, depth: 0, stringBytes: 0 };
101
+ state.summary = { members: 0, depth: 0, stringBytes: 0, canonicalBytes: 0 };
96
102
  state.summaryDepth = depth;
97
103
  }
98
104
  if (state.summary !== undefined) {
@@ -129,6 +135,9 @@ function admitArray(input, pointer, depth, state) {
129
135
  if (keys.length !== size + 1 || keys.some((key) => typeof key === 'symbol')) {
130
136
  throw new BoundaryError('VALUE_ARRAY', 'Expected a dense Array with no symbol or non-index properties', pointer);
131
137
  }
138
+ // Every portable item needs at least one byte; refuse before the detached Array allocation.
139
+ requireCanonicalRoom(state, size === 0 ? 2 : size * 2 + 1, pointer);
140
+ addCanonicalBytes(state, 2 + Math.max(0, size - 1), pointer);
132
141
  const output = Array.from({ length: size }, () => null);
133
142
  for (let index = 0; index < size; index += 1) {
134
143
  const name = String(index);
@@ -151,6 +160,7 @@ function admitObject(input, pointer, depth, state) {
151
160
  const descriptors = reflect(() => Object.getOwnPropertyDescriptors(input), pointer, 'Cannot snapshot Object descriptors');
152
161
  const keys = Reflect.ownKeys(descriptors);
153
162
  addMembers(state, keys.length, pointer);
163
+ addCanonicalBytes(state, 2 + Math.max(0, keys.length - 1) + keys.length, pointer);
154
164
  const output = {};
155
165
  for (const key of keys) {
156
166
  if (typeof key === 'symbol') {
@@ -191,6 +201,22 @@ function admitString(value, pointer, state) {
191
201
  if (state.summary !== undefined) {
192
202
  state.summary.stringBytes = Math.max(state.summary.stringBytes, bytes);
193
203
  }
204
+ if (state.summary !== undefined || state.bytes !== undefined)
205
+ addCanonicalBytes(state, canonicalPrimitiveBytes(value), pointer);
206
+ }
207
+ function requireCanonicalRoom(state, bytes, pointer) {
208
+ if (state.bytes !== undefined && bytes > state.limits.maxBytes - state.bytes)
209
+ throw new BoundaryError('VALUE_LIMIT', `Canonical JSON exceeds the ${state.limits.maxBytes}-byte limit`, pointer);
210
+ }
211
+ function chargeCanonicalBytes(state, bytes, pointer) {
212
+ requireCanonicalRoom(state, bytes, pointer);
213
+ if (state.bytes !== undefined)
214
+ state.bytes += bytes;
215
+ }
216
+ function addCanonicalBytes(state, bytes, pointer) {
217
+ chargeCanonicalBytes(state, bytes, pointer);
218
+ if (state.summary !== undefined)
219
+ state.summary.canonicalBytes += bytes;
194
220
  }
195
221
  function reflect(operation, pointer, message) {
196
222
  try {
@@ -1,7 +1,8 @@
1
1
  import { acceptForRead } from './accept.js';
2
2
  import { BoundaryError } from './error.js';
3
+ import { immutableSnapshotBytes } from './immutable.optimization.js';
3
4
  import { defaultLimits, limitsFor } from './limits.js';
4
- import { utf8Length } from './unicode.js';
5
+ import { canonicalPrimitiveBytes, utf8Length } from './unicode.js';
5
6
  const encoder = new TextEncoder();
6
7
  /** RFC 8785 canonical JSON for one admitted portable snapshot. */
7
8
  export function serialize(input, options) {
@@ -13,9 +14,16 @@ export function serializeAdmitted(input) {
13
14
  return serializeSnapshot(input, defaultLimits.maxBytes);
14
15
  }
15
16
  function serializeSnapshot(input, maxBytes) {
17
+ const bytes = input !== null && typeof input === 'object'
18
+ ? immutableSnapshotBytes(input)
19
+ : canonicalPrimitiveBytes(input);
20
+ if (bytes !== undefined && bytes > maxBytes)
21
+ throw new BoundaryError('VALUE_LIMIT', `Canonical JSON exceeds the ${maxBytes}-byte limit`);
16
22
  const output = serializeValue(input);
17
23
  // Scalar text uses at most three UTF-8 bytes per UTF-16 code unit, including JSON escapes.
18
- if (output.length > maxBytes / 3 && utf8Length(output, maxBytes) > maxBytes) {
24
+ if (bytes === undefined &&
25
+ output.length > maxBytes / 3 &&
26
+ utf8Length(output, maxBytes) > maxBytes) {
19
27
  throw new BoundaryError('VALUE_LIMIT', `Canonical JSON exceeds the ${maxBytes}-byte limit`);
20
28
  }
21
29
  return output;
@@ -3,10 +3,13 @@ export interface SnapshotSummary {
3
3
  members: number;
4
4
  depth: number;
5
5
  stringBytes: number;
6
+ canonicalBytes: number;
6
7
  }
7
8
  export declare function isImmutableSnapshot(value: object): boolean;
9
+ /** Exact complete representation size, only for roots retained by this admission owner. */
10
+ export declare function immutableSnapshotBytes(value: object): number | undefined;
8
11
  /** Called only after admission has constructed and deeply frozen this container. */
9
12
  export declare function retainImmutableSnapshot(value: object, summary: SnapshotSummary): void;
10
13
  export declare function includeSnapshot(parent: SnapshotSummary | undefined, child: SnapshotSummary, depth: number): void;
11
14
  /** A failed fit must use normal admission, preserving its exact error pointer. */
12
- export declare function reusableSnapshot(value: object, limits: Limits, depth: number, members: number): SnapshotSummary | undefined;
15
+ export declare function reusableSnapshot(value: object, limits: Limits, depth: number, members: number, bytes: number | undefined): SnapshotSummary | undefined;
@@ -4,6 +4,10 @@ const snapshots = new WeakMap();
4
4
  export function isImmutableSnapshot(value) {
5
5
  return snapshots.has(value);
6
6
  }
7
+ /** Exact complete representation size, only for roots retained by this admission owner. */
8
+ export function immutableSnapshotBytes(value) {
9
+ return snapshots.get(value)?.canonicalBytes;
10
+ }
7
11
  /** Called only after admission has constructed and deeply frozen this container. */
8
12
  export function retainImmutableSnapshot(value, summary) {
9
13
  if (!snapshots.has(value))
@@ -15,14 +19,16 @@ export function includeSnapshot(parent, child, depth) {
15
19
  parent.members += child.members;
16
20
  parent.depth = Math.max(parent.depth, depth + child.depth);
17
21
  parent.stringBytes = Math.max(parent.stringBytes, child.stringBytes);
22
+ parent.canonicalBytes += child.canonicalBytes;
18
23
  }
19
24
  /** A failed fit must use normal admission, preserving its exact error pointer. */
20
- export function reusableSnapshot(value, limits, depth, members) {
25
+ export function reusableSnapshot(value, limits, depth, members, bytes) {
21
26
  const summary = snapshots.get(value);
22
27
  if (summary === undefined ||
23
28
  summary.members > limits.maxMembers - members ||
24
29
  summary.depth > limits.maxDepth - depth ||
25
- summary.stringBytes > limits.maxStringBytes)
30
+ summary.stringBytes > limits.maxStringBytes ||
31
+ (bytes !== undefined && summary.canonicalBytes > limits.maxBytes - bytes))
26
32
  return undefined;
27
33
  return summary;
28
34
  }
@@ -1,5 +1,5 @@
1
1
  export interface Limits {
2
- /** Maximum UTF-8 size accepted from or emitted to a wire boundary. */
2
+ /** Maximum wire UTF-8 size, also bounding the complete canonical immutable capture. */
3
3
  readonly maxBytes: number;
4
4
  /** Maximum number of nested Array/Object containers, with a root container at depth one. */
5
5
  readonly maxDepth: number;
@@ -1,3 +1,6 @@
1
+ import type { Primitive } from './types.js';
2
+ /** Exact canonical scalar spelling after the same owner has established portable input. */
3
+ export declare function canonicalPrimitiveBytes(value: Primitive): number;
1
4
  export declare function utf8Length(value: string, max?: number): number;
2
5
  export declare function assertHostString(value: string, pointer: string, maxBytes: number): number;
3
6
  export declare function assertDecodedString(value: string, offset: number, maxBytes: number): void;
@@ -1,4 +1,31 @@
1
1
  import { BoundaryError, DecodeError } from './error.js';
2
+ /** Exact canonical scalar spelling after the same owner has established portable input. */
3
+ export function canonicalPrimitiveBytes(value) {
4
+ if (typeof value !== 'string') {
5
+ if (typeof value === 'number')
6
+ return JSON.stringify(value).length;
7
+ return value === false ? 5 : 4;
8
+ }
9
+ let bytes = 2;
10
+ for (let index = 0; index < value.length; index += 1) {
11
+ const unit = value.charCodeAt(index);
12
+ if (unit < 0x20)
13
+ bytes += unit === 8 || unit === 9 || unit === 10 || unit === 12 || unit === 13 ? 2 : 6;
14
+ else if (unit === 0x22 || unit === 0x5c)
15
+ bytes += 2;
16
+ else if (unit <= 0x7f)
17
+ bytes += 1;
18
+ else if (unit <= 0x7ff)
19
+ bytes += 2;
20
+ else if (isHighSurrogate(unit)) {
21
+ bytes += 4;
22
+ index += 1;
23
+ }
24
+ else
25
+ bytes += 3;
26
+ }
27
+ return bytes;
28
+ }
2
29
  export function utf8Length(value, max = Number.MAX_SAFE_INTEGER) {
3
30
  let bytes = 0;
4
31
  for (let index = 0; index < value.length; index += 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/kernel-dsl",
3
- "version": "0.2.0-beta.47",
3
+ "version": "0.2.0-beta.49",
4
4
  "description": "Astrale Kernel DSL - Schema authoring, inference, and IR serialization",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {