@ja-platform/parser-type-system 0.0.0-dev-20261019214152
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/dist/@types/ArrayType.d.ts +17 -0
- package/dist/@types/BooleanType.d.ts +10 -0
- package/dist/@types/Formatter.d.ts +6 -0
- package/dist/@types/IntegerType.d.ts +10 -0
- package/dist/@types/NumberType.d.ts +11 -0
- package/dist/@types/ObjectType.d.ts +9 -0
- package/dist/@types/ScalarType.d.ts +8 -0
- package/dist/@types/TextType.d.ts +10 -0
- package/dist/@types/Type.d.ts +18 -0
- package/dist/@types/UnknownType.d.ts +9 -0
- package/dist/@types/index.d.ts +10 -0
- package/dist/ArrayType.js +27 -0
- package/dist/ArrayType.js.map +1 -0
- package/dist/BooleanType.js +33 -0
- package/dist/BooleanType.js.map +1 -0
- package/dist/Formatter.js +3 -0
- package/dist/Formatter.js.map +1 -0
- package/dist/IntegerType.js +23 -0
- package/dist/IntegerType.js.map +1 -0
- package/dist/NumberType.js +62 -0
- package/dist/NumberType.js.map +1 -0
- package/dist/ObjectType.js +18 -0
- package/dist/ObjectType.js.map +1 -0
- package/dist/ScalarType.js +11 -0
- package/dist/ScalarType.js.map +1 -0
- package/dist/TextType.js +22 -0
- package/dist/TextType.js.map +1 -0
- package/dist/Type.js +35 -0
- package/dist/Type.js.map +1 -0
- package/dist/UnknownType.js +16 -0
- package/dist/UnknownType.js.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +28 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Type } from './Type';
|
|
2
|
+
/**
|
|
3
|
+
* An array whose items share a value type.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ArrayType extends Type {
|
|
6
|
+
readonly itemType: Type;
|
|
7
|
+
readonly _typeName = "array";
|
|
8
|
+
readonly name = "array";
|
|
9
|
+
readonly isCollection = true;
|
|
10
|
+
constructor(itemType: Type);
|
|
11
|
+
static isInstanceOf(type: Type | null): type is ArrayType;
|
|
12
|
+
stringify(): string;
|
|
13
|
+
toJSON(): {
|
|
14
|
+
type: string;
|
|
15
|
+
object: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Type } from './Type';
|
|
2
|
+
import { ScalarType } from './ScalarType';
|
|
3
|
+
export declare class BooleanType extends ScalarType<boolean> {
|
|
4
|
+
static readonly TYPE = "boolean";
|
|
5
|
+
static isInstanceOf(type: Type | null): type is BooleanType;
|
|
6
|
+
constructor();
|
|
7
|
+
is(value: unknown): value is boolean;
|
|
8
|
+
parse(value: unknown): boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const booleanType: BooleanType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Type } from './Type';
|
|
2
|
+
import { ScalarType } from './ScalarType';
|
|
3
|
+
export declare class IntegerType extends ScalarType<number> {
|
|
4
|
+
static readonly TYPE = "integer";
|
|
5
|
+
static isInstanceOf(type: Type | null): type is IntegerType;
|
|
6
|
+
constructor();
|
|
7
|
+
is(value: unknown): value is number;
|
|
8
|
+
parse(value: unknown): number;
|
|
9
|
+
}
|
|
10
|
+
export declare const integerType: IntegerType;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Type } from './Type';
|
|
2
|
+
import { ScalarType } from './ScalarType';
|
|
3
|
+
export declare class NumberType extends ScalarType<number> {
|
|
4
|
+
static readonly TYPE = "number";
|
|
5
|
+
static isInstanceOf(type: Type | null): type is NumberType;
|
|
6
|
+
constructor();
|
|
7
|
+
is(value: unknown): value is number;
|
|
8
|
+
parse(value: unknown): number;
|
|
9
|
+
format(value: any, format?: string): string;
|
|
10
|
+
}
|
|
11
|
+
export declare const numberType: NumberType;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Type } from './Type';
|
|
2
|
+
/**
|
|
3
|
+
* A structured value whose declared fields can be resolved independently of values.
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class ObjectType extends Type {
|
|
6
|
+
readonly _typeName: string;
|
|
7
|
+
abstract getField(name: string): Type | null;
|
|
8
|
+
static isInstanceOf(type: Type | null): type is ObjectType;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Type } from './Type';
|
|
2
|
+
import { ScalarType } from './ScalarType';
|
|
3
|
+
export declare class TextType extends ScalarType<string> {
|
|
4
|
+
static readonly TYPE = "text";
|
|
5
|
+
static isInstanceOf(type: Type | null): type is TextType;
|
|
6
|
+
constructor();
|
|
7
|
+
is(value: unknown): value is string;
|
|
8
|
+
parse(value: unknown): string;
|
|
9
|
+
}
|
|
10
|
+
export declare const textType: TextType;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Formatter } from './Formatter';
|
|
2
|
+
/**
|
|
3
|
+
* Describes a value independently of the scope that declares or references it.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Type<T = any> implements Formatter {
|
|
6
|
+
name: string;
|
|
7
|
+
readonly _typeName: string;
|
|
8
|
+
constructor(name: string);
|
|
9
|
+
/**
|
|
10
|
+
* Types without a value restriction retain the existing pass-through behavior.
|
|
11
|
+
*/
|
|
12
|
+
is(_value: unknown): boolean;
|
|
13
|
+
parse(value: unknown): T;
|
|
14
|
+
stringify(): string;
|
|
15
|
+
valueOf(): string;
|
|
16
|
+
toJSON(): object;
|
|
17
|
+
format(value: any, format?: string): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './Type';
|
|
2
|
+
export * from './Formatter';
|
|
3
|
+
export * from './ObjectType';
|
|
4
|
+
export * from './ArrayType';
|
|
5
|
+
export * from './UnknownType';
|
|
6
|
+
export * from './ScalarType';
|
|
7
|
+
export * from './TextType';
|
|
8
|
+
export * from './NumberType';
|
|
9
|
+
export * from './IntegerType';
|
|
10
|
+
export * from './BooleanType';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArrayType = void 0;
|
|
4
|
+
const Type_1 = require("./Type");
|
|
5
|
+
/**
|
|
6
|
+
* An array whose items share a value type.
|
|
7
|
+
*/
|
|
8
|
+
class ArrayType extends Type_1.Type {
|
|
9
|
+
constructor(itemType) {
|
|
10
|
+
super('array');
|
|
11
|
+
this.itemType = itemType;
|
|
12
|
+
this._typeName = 'array';
|
|
13
|
+
this.name = 'array';
|
|
14
|
+
this.isCollection = true;
|
|
15
|
+
}
|
|
16
|
+
static isInstanceOf(type) {
|
|
17
|
+
return (type === null || type === void 0 ? void 0 : type._typeName) === 'array';
|
|
18
|
+
}
|
|
19
|
+
stringify() {
|
|
20
|
+
return `${this.name}:${this.itemType.name}`;
|
|
21
|
+
}
|
|
22
|
+
toJSON() {
|
|
23
|
+
return { type: this.name, object: this.itemType.name };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.ArrayType = ArrayType;
|
|
27
|
+
//# sourceMappingURL=ArrayType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayType.js","sourceRoot":"","sources":["../src/ArrayType.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B;;GAEG;AACH,eAAuB,SAAQ,WAAI;IAKjC,YAAqB,QAAc;QACjC,KAAK,CAAC,OAAO,CAAC,CAAC;QADI,aAAQ,GAAR,QAAQ,CAAM;QAJ1B,cAAS,GAAG,OAAO,CAAC;QACpB,SAAI,GAAG,OAAO,CAAC;QACf,iBAAY,GAAG,IAAI,CAAC;IAI7B,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,IAAiB;QACnC,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,MAAK,OAAO,CAAC;IACrC,CAAC;IAED,SAAS;QACP,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,MAAM;QACJ,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzD,CAAC;CACF","sourcesContent":["import { Type } from './Type';\n\n/**\n * An array whose items share a value type.\n */\nexport class ArrayType extends Type {\n readonly _typeName = 'array';\n readonly name = 'array';\n readonly isCollection = true;\n\n constructor(readonly itemType: Type) {\n super('array');\n }\n\n static isInstanceOf(type: Type | null): type is ArrayType {\n return type?._typeName === 'array';\n }\n\n stringify(): string {\n return `${this.name}:${this.itemType.name}`;\n }\n\n toJSON() {\n return { type: this.name, object: this.itemType.name };\n }\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.booleanType = exports.BooleanType = void 0;
|
|
4
|
+
const ScalarType_1 = require("./ScalarType");
|
|
5
|
+
class BooleanType extends ScalarType_1.ScalarType {
|
|
6
|
+
static isInstanceOf(type) {
|
|
7
|
+
return (type === null || type === void 0 ? void 0 : type._typeName) === this.TYPE;
|
|
8
|
+
}
|
|
9
|
+
constructor() {
|
|
10
|
+
super('boolean');
|
|
11
|
+
}
|
|
12
|
+
is(value) {
|
|
13
|
+
return typeof value === 'boolean';
|
|
14
|
+
}
|
|
15
|
+
parse(value) {
|
|
16
|
+
if (typeof value === 'boolean')
|
|
17
|
+
return value;
|
|
18
|
+
if (typeof value === 'string') {
|
|
19
|
+
const text = value.trim();
|
|
20
|
+
if (text === 'true' || text === 'false')
|
|
21
|
+
return text === 'true';
|
|
22
|
+
if (text !== '' && Number.isFinite(Number(text)))
|
|
23
|
+
return Number(text) !== 0;
|
|
24
|
+
}
|
|
25
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
26
|
+
return value !== 0;
|
|
27
|
+
throw new SyntaxError('Expected a boolean or finite number.');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.BooleanType = BooleanType;
|
|
31
|
+
BooleanType.TYPE = 'boolean';
|
|
32
|
+
exports.booleanType = new BooleanType();
|
|
33
|
+
//# sourceMappingURL=BooleanType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanType.js","sourceRoot":"","sources":["../src/BooleanType.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAE1C,iBAAyB,SAAQ,uBAAmB;IAGlD,MAAM,CAAC,YAAY,CAAC,IAAiB;QACnC,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,MAAK,IAAI,CAAC,IAAI,CAAC;IACvC,CAAC;IAED;QACE,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IAED,EAAE,CAAC,KAAc;QACf,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,KAAc;QAClB,IAAI,OAAO,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;YAC1B,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,OAAO;gBAAE,OAAO,IAAI,KAAK,MAAM,CAAC;YAChE,IAAI,IAAI,KAAK,EAAE,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAE,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9E,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,KAAK,CAAC,CAAC;QAC5E,MAAM,IAAI,WAAW,CAAC,sCAAsC,CAAC,CAAC;IAChE,CAAC;CACF;;AAxBiB,gBAAI,GAAG,SAAS,CAAC;AA0BtB,QAAA,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC","sourcesContent":["import { Type } from './Type';\nimport { ScalarType } from './ScalarType';\n\nexport class BooleanType extends ScalarType<boolean> {\n static readonly TYPE = 'boolean';\n\n static isInstanceOf(type: Type | null): type is BooleanType {\n return type?._typeName === this.TYPE;\n }\n\n constructor() {\n super('boolean');\n }\n\n is(value: unknown): value is boolean {\n return typeof value === 'boolean';\n }\n\n parse(value: unknown): boolean {\n if (typeof value === 'boolean') return value;\n if (typeof value === 'string') {\n const text = value.trim();\n if (text === 'true' || text === 'false') return text === 'true';\n if (text !== '' && Number.isFinite(Number(text))) return Number(text) !== 0;\n }\n if (typeof value === 'number' && Number.isFinite(value)) return value !== 0;\n throw new SyntaxError('Expected a boolean or finite number.');\n }\n}\n\nexport const booleanType = new BooleanType();\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Formatter.js","sourceRoot":"","sources":["../src/Formatter.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Format a value with an optional format specifier.\n */\nexport interface Formatter {\n format(value: any, format?: string): string;\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.integerType = exports.IntegerType = void 0;
|
|
4
|
+
const ScalarType_1 = require("./ScalarType");
|
|
5
|
+
const NumberType_1 = require("./NumberType");
|
|
6
|
+
class IntegerType extends ScalarType_1.ScalarType {
|
|
7
|
+
static isInstanceOf(type) {
|
|
8
|
+
return (type === null || type === void 0 ? void 0 : type._typeName) === this.TYPE;
|
|
9
|
+
}
|
|
10
|
+
constructor() {
|
|
11
|
+
super(IntegerType.TYPE);
|
|
12
|
+
}
|
|
13
|
+
is(value) {
|
|
14
|
+
return typeof value === 'number' && Number.isInteger(value);
|
|
15
|
+
}
|
|
16
|
+
parse(value) {
|
|
17
|
+
return Math.floor(NumberType_1.numberType.parse(value));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.IntegerType = IntegerType;
|
|
21
|
+
IntegerType.TYPE = 'integer';
|
|
22
|
+
exports.integerType = new IntegerType();
|
|
23
|
+
//# sourceMappingURL=IntegerType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegerType.js","sourceRoot":"","sources":["../src/IntegerType.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAC1C,6CAA0C;AAE1C,iBAAyB,SAAQ,uBAAkB;IAGjD,MAAM,CAAC,YAAY,CAAC,IAAiB;QACnC,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,MAAK,IAAI,CAAC,IAAI,CAAC;IACvC,CAAC;IAED;QACE,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,EAAE,CAAC,KAAc;QACf,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,KAAc;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,uBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;CACF;;AAjBiB,gBAAI,GAAG,SAAS,CAAC;AAmBtB,QAAA,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC","sourcesContent":["import { Type } from './Type';\nimport { ScalarType } from './ScalarType';\nimport { numberType } from './NumberType';\n\nexport class IntegerType extends ScalarType<number> {\n static readonly TYPE = 'integer';\n\n static isInstanceOf(type: Type | null): type is IntegerType {\n return type?._typeName === this.TYPE;\n }\n\n constructor() {\n super(IntegerType.TYPE);\n }\n\n is(value: unknown): value is number {\n return typeof value === 'number' && Number.isInteger(value);\n }\n\n parse(value: unknown): number {\n return Math.floor(numberType.parse(value));\n }\n}\n\nexport const integerType = new IntegerType();\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.numberType = exports.NumberType = void 0;
|
|
4
|
+
const ScalarType_1 = require("./ScalarType");
|
|
5
|
+
class NumberType extends ScalarType_1.ScalarType {
|
|
6
|
+
static isInstanceOf(type) {
|
|
7
|
+
return (type === null || type === void 0 ? void 0 : type._typeName) === this.TYPE;
|
|
8
|
+
}
|
|
9
|
+
constructor() {
|
|
10
|
+
super('number');
|
|
11
|
+
}
|
|
12
|
+
is(value) {
|
|
13
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
14
|
+
}
|
|
15
|
+
parse(value) {
|
|
16
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
17
|
+
return value;
|
|
18
|
+
if (typeof value === 'string' && value.trim() !== '') {
|
|
19
|
+
const number = Number(value);
|
|
20
|
+
if (Number.isFinite(number))
|
|
21
|
+
return number;
|
|
22
|
+
}
|
|
23
|
+
throw new SyntaxError('Expected a finite number.');
|
|
24
|
+
}
|
|
25
|
+
format(value, format) {
|
|
26
|
+
if (typeof value != 'number') {
|
|
27
|
+
return 'NaN';
|
|
28
|
+
}
|
|
29
|
+
if (format == null) {
|
|
30
|
+
const variable = value.toString();
|
|
31
|
+
const fixed = value.toFixed(6);
|
|
32
|
+
if (variable.length < fixed.length) {
|
|
33
|
+
if (variable.indexOf('.') == -1 && variable.indexOf(',') == -1) {
|
|
34
|
+
// We want to append .0 to integers
|
|
35
|
+
return value.toFixed(1);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return variable;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return fixed;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
if (format.length >= 3 && format[0] == '.' && format[format.length - 1] == 'f') {
|
|
47
|
+
var digits = parseInt(format.substring(1, format.length - 1), 10);
|
|
48
|
+
if (digits >= 0 && digits < 20) {
|
|
49
|
+
return value.toFixed(digits);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return value.toFixed(6);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return value.toString();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.NumberType = NumberType;
|
|
60
|
+
NumberType.TYPE = 'number';
|
|
61
|
+
exports.numberType = new NumberType();
|
|
62
|
+
//# sourceMappingURL=NumberType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberType.js","sourceRoot":"","sources":["../src/NumberType.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAE1C,gBAAwB,SAAQ,uBAAkB;IAGhD,MAAM,CAAC,YAAY,CAAC,IAAiB;QACnC,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,MAAK,IAAI,CAAC,IAAI,CAAC;IACvC,CAAC;IAED;QACE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClB,CAAC;IAED,EAAE,CAAC,KAAc;QACf,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,KAAc;QAClB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QACtE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACrD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC7B,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,OAAO,MAAM,CAAC;QAC7C,CAAC;QACD,MAAM,IAAI,WAAW,CAAC,2BAA2B,CAAC,CAAC;IACrD,CAAC;IACD,MAAM,CAAC,KAAU,EAAE,MAAe;QAChC,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;YAClC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,QAAQ,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBACnC,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;oBAC/D,mCAAmC;oBACnC,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC1B,CAAC;qBAAM,CAAC;oBACN,OAAO,QAAQ,CAAC;gBAClB,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;gBAC/E,IAAI,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAClE,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,EAAE,EAAE,CAAC;oBAC/B,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAC/B,CAAC;qBAAM,CAAC;oBACN,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC1B,CAAC;YACH,CAAC;YACD,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC1B,CAAC;IACH,CAAC;CACF;;AAnDiB,eAAI,GAAG,QAAQ,CAAC;AAqDrB,QAAA,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC","sourcesContent":["import { Type } from './Type';\nimport { ScalarType } from './ScalarType';\n\nexport class NumberType extends ScalarType<number> {\n static readonly TYPE = 'number';\n\n static isInstanceOf(type: Type | null): type is NumberType {\n return type?._typeName === this.TYPE;\n }\n\n constructor() {\n super('number');\n }\n\n is(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value);\n }\n\n parse(value: unknown): number {\n if (typeof value === 'number' && Number.isFinite(value)) return value;\n if (typeof value === 'string' && value.trim() !== '') {\n const number = Number(value);\n if (Number.isFinite(number)) return number;\n }\n throw new SyntaxError('Expected a finite number.');\n }\n format(value: any, format?: string): string {\n if (typeof value != 'number') {\n return 'NaN';\n }\n if (format == null) {\n const variable = value.toString();\n const fixed = value.toFixed(6);\n if (variable.length < fixed.length) {\n if (variable.indexOf('.') == -1 && variable.indexOf(',') == -1) {\n // We want to append .0 to integers\n return value.toFixed(1);\n } else {\n return variable;\n }\n } else {\n return fixed;\n }\n } else {\n if (format.length >= 3 && format[0] == '.' && format[format.length - 1] == 'f') {\n var digits = parseInt(format.substring(1, format.length - 1), 10);\n if (digits >= 0 && digits < 20) {\n return value.toFixed(digits);\n } else {\n return value.toFixed(6);\n }\n }\n return value.toString();\n }\n }\n}\n\nexport const numberType = new NumberType();\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObjectType = void 0;
|
|
4
|
+
const Type_1 = require("./Type");
|
|
5
|
+
/**
|
|
6
|
+
* A structured value whose declared fields can be resolved independently of values.
|
|
7
|
+
*/
|
|
8
|
+
class ObjectType extends Type_1.Type {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this._typeName = 'object';
|
|
12
|
+
}
|
|
13
|
+
static isInstanceOf(type) {
|
|
14
|
+
return (type === null || type === void 0 ? void 0 : type._typeName) === 'object';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ObjectType = ObjectType;
|
|
18
|
+
//# sourceMappingURL=ObjectType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectType.js","sourceRoot":"","sources":["../src/ObjectType.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B;;GAEG;AACH,gBAAiC,SAAQ,WAAI;IAA7C;;QACW,cAAS,GAAW,QAAQ,CAAC;IAMxC,CAAC;IAHC,MAAM,CAAC,YAAY,CAAC,IAAiB;QACnC,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,MAAK,QAAQ,CAAC;IACtC,CAAC;CACF","sourcesContent":["import { Type } from './Type';\n\n/**\n * A structured value whose declared fields can be resolved independently of values.\n */\nexport abstract class ObjectType extends Type {\n readonly _typeName: string = 'object';\n abstract getField(name: string): Type | null;\n\n static isInstanceOf(type: Type | null): type is ObjectType {\n return type?._typeName === 'object';\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScalarType = void 0;
|
|
4
|
+
const Type_1 = require("./Type");
|
|
5
|
+
/**
|
|
6
|
+
* Parse a value explicitly and check its resolved representation.
|
|
7
|
+
*/
|
|
8
|
+
class ScalarType extends Type_1.Type {
|
|
9
|
+
}
|
|
10
|
+
exports.ScalarType = ScalarType;
|
|
11
|
+
//# sourceMappingURL=ScalarType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarType.js","sourceRoot":"","sources":["../src/ScalarType.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B;;GAEG;AACH,gBAAoC,SAAQ,WAAO;CAGlD","sourcesContent":["import { Type } from './Type';\n\n/**\n * Parse a value explicitly and check its resolved representation.\n */\nexport abstract class ScalarType<T> extends Type<T> {\n abstract is(value: unknown): value is T;\n abstract parse(value: unknown): T;\n}\n"]}
|
package/dist/TextType.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.textType = exports.TextType = void 0;
|
|
4
|
+
const ScalarType_1 = require("./ScalarType");
|
|
5
|
+
class TextType extends ScalarType_1.ScalarType {
|
|
6
|
+
static isInstanceOf(type) {
|
|
7
|
+
return (type === null || type === void 0 ? void 0 : type._typeName) === this.TYPE;
|
|
8
|
+
}
|
|
9
|
+
constructor() {
|
|
10
|
+
super('text');
|
|
11
|
+
}
|
|
12
|
+
is(value) {
|
|
13
|
+
return typeof value === 'string';
|
|
14
|
+
}
|
|
15
|
+
parse(value) {
|
|
16
|
+
return String(value !== null && value !== void 0 ? value : '');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.TextType = TextType;
|
|
20
|
+
TextType.TYPE = 'text';
|
|
21
|
+
exports.textType = new TextType();
|
|
22
|
+
//# sourceMappingURL=TextType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextType.js","sourceRoot":"","sources":["../src/TextType.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAE1C,cAAsB,SAAQ,uBAAkB;IAG9C,MAAM,CAAC,YAAY,CAAC,IAAiB;QACnC,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,MAAK,IAAI,CAAC,IAAI,CAAC;IACvC,CAAC;IAED;QACE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,KAAc;QACf,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,KAAc;QAClB,OAAO,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC;IAC7B,CAAC;CACF;;AAjBiB,aAAI,GAAG,MAAM,CAAC;AAmBnB,QAAA,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC","sourcesContent":["import { Type } from './Type';\nimport { ScalarType } from './ScalarType';\n\nexport class TextType extends ScalarType<string> {\n static readonly TYPE = 'text';\n\n static isInstanceOf(type: Type | null): type is TextType {\n return type?._typeName === this.TYPE;\n }\n\n constructor() {\n super('text');\n }\n\n is(value: unknown): value is string {\n return typeof value === 'string';\n }\n\n parse(value: unknown): string {\n return String(value ?? '');\n }\n}\n\nexport const textType = new TextType();\n"]}
|
package/dist/Type.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Type = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Describes a value independently of the scope that declares or references it.
|
|
6
|
+
*/
|
|
7
|
+
class Type {
|
|
8
|
+
constructor(name) {
|
|
9
|
+
this.name = name;
|
|
10
|
+
this._typeName = name;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Types without a value restriction retain the existing pass-through behavior.
|
|
14
|
+
*/
|
|
15
|
+
is(_value) {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
parse(value) {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
stringify() {
|
|
22
|
+
return this.name;
|
|
23
|
+
}
|
|
24
|
+
valueOf() {
|
|
25
|
+
return this.name;
|
|
26
|
+
}
|
|
27
|
+
toJSON() {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
format(value, format) {
|
|
31
|
+
return value.toString();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.Type = Type;
|
|
35
|
+
//# sourceMappingURL=Type.js.map
|
package/dist/Type.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Type.js","sourceRoot":"","sources":["../src/Type.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH;IAGE,YAAmB,IAAY;oBAAZ,IAAI;QACrB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,EAAE,CAAC,MAAe;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,KAAc;QAClB,OAAO,KAAU,CAAC;IACpB,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,CAAC,KAAU,EAAE,MAAe;QAChC,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;CACF","sourcesContent":["import type { Formatter } from './Formatter';\n\n/**\n * Describes a value independently of the scope that declares or references it.\n */\nexport class Type<T = any> implements Formatter {\n readonly _typeName: string;\n\n constructor(public name: string) {\n this._typeName = name;\n }\n\n /**\n * Types without a value restriction retain the existing pass-through behavior.\n */\n is(_value: unknown): boolean {\n return true;\n }\n\n parse(value: unknown): T {\n return value as T;\n }\n\n stringify(): string {\n return this.name;\n }\n\n valueOf(): string {\n return this.name;\n }\n\n toJSON(): object {\n return {};\n }\n\n format(value: any, format?: string): string {\n return value.toString();\n }\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnknownType = void 0;
|
|
4
|
+
const Type_1 = require("./Type");
|
|
5
|
+
/**
|
|
6
|
+
* A value whose type is unknown, distinct from an undeclared reference.
|
|
7
|
+
*/
|
|
8
|
+
class UnknownType extends Type_1.Type {
|
|
9
|
+
constructor() {
|
|
10
|
+
super('unknown');
|
|
11
|
+
this._typeName = 'unknown';
|
|
12
|
+
this.name = 'unknown';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.UnknownType = UnknownType;
|
|
16
|
+
//# sourceMappingURL=UnknownType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnknownType.js","sourceRoot":"","sources":["../src/UnknownType.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B;;GAEG;AACH,iBAAyB,SAAQ,WAAI;IAInC;QACE,KAAK,CAAC,SAAS,CAAC,CAAC;QAJV,cAAS,GAAG,SAAS,CAAC;QACtB,SAAI,GAAG,SAAS,CAAC;IAI1B,CAAC;CACF","sourcesContent":["import { Type } from './Type';\n\n/**\n * A value whose type is unknown, distinct from an undeclared reference.\n */\nexport class UnknownType extends Type {\n readonly _typeName = 'unknown';\n readonly name = 'unknown';\n\n constructor() {\n super('unknown');\n }\n}\n"]}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Type"), exports);
|
|
18
|
+
__exportStar(require("./Formatter"), exports);
|
|
19
|
+
__exportStar(require("./ObjectType"), exports);
|
|
20
|
+
__exportStar(require("./ArrayType"), exports);
|
|
21
|
+
__exportStar(require("./UnknownType"), exports);
|
|
22
|
+
__exportStar(require("./ScalarType"), exports);
|
|
23
|
+
__exportStar(require("./TextType"), exports);
|
|
24
|
+
__exportStar(require("./NumberType"), exports);
|
|
25
|
+
__exportStar(require("./IntegerType"), exports);
|
|
26
|
+
__exportStar(require("./BooleanType"), exports);
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B;AAC9B,+CAA6B;AAC7B,6CAA2B;AAC3B,+CAA6B;AAC7B,gDAA8B;AAC9B,gDAA8B","sourcesContent":["export * from './Type';\nexport * from './Formatter';\nexport * from './ObjectType';\nexport * from './ArrayType';\nexport * from './UnknownType';\nexport * from './ScalarType';\nexport * from './TextType';\nexport * from './NumberType';\nexport * from './IntegerType';\nexport * from './BooleanType';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"7.0.2","root":[[89,99]],"packageJsons":["../package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../src/Formatter.ts","../src/Type.ts","../src/ArrayType.ts","../src/ScalarType.ts","../src/BooleanType.ts","../src/NumberType.ts","../src/IntegerType.ts","../src/ObjectType.ts","../src/TextType.ts","../src/UnknownType.ts","../src/index.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dc5e36cb2817592e44ae3a5bf75940cb","signature":"e5fb7990b84f5089ba92554ea3614810","impliedNodeFormat":1},{"version":"7a7a02395127847fec67df040a0027b5","signature":"770ee32ef332fd48bfef508442b30edb","impliedNodeFormat":1},{"version":"846574c6086304a0874e7c1b9afe2a60","signature":"822b842ad7efa3485d65fbeb2f919865","impliedNodeFormat":1},{"version":"6d8419b8605e0cc9e4296fc0051b8791","signature":"26302a8b72d74f944dcf8f6452e54f7c","impliedNodeFormat":1},{"version":"3aac2b065660ede2bf50975456b603d4","signature":"2c96eeb69afb823580d4e1e5f1b188e0","impliedNodeFormat":1},{"version":"e9f8cfe1e31acc70240574b51a9bef8d","signature":"90125a76f2ae701181f7e09dea41f3ad","impliedNodeFormat":1},{"version":"3e20abc2f0cc5c912e45020abf905b34","signature":"ac52bb76ccad935a013384d2a71ab267","impliedNodeFormat":1},{"version":"0ed8853ffd5c9a7d1db4fa21fd021728","signature":"5c1b5931ee0c894699ca56f5b573f88a","impliedNodeFormat":1},{"version":"4f6e9047791e7cfd7a4e0d08b47b5ffe","signature":"bc95bdb594a5aece18248fbf4387dd2e","impliedNodeFormat":1},{"version":"196615c8817cf3b99581ba4605d18884","signature":"89b6053090a8d01f57cb8f521fae777d","impliedNodeFormat":1},"c06213bcb24cd658dfcd1239777159bd"],"fileIdsList":[[90],[90,92],[90,92,94],[89],[89,90,91,92,93,94,95,96,97,98]],"options":{"composite":true,"declaration":true,"declarationDir":"./@types","inlineSources":true,"module":199,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":false,"stripInternal":true,"sourceMap":true,"target":4,"tsBuildInfoFile":"./tsconfig.tsbuildinfo","esModuleInterop":true},"referencedMap":[[91,1],[93,2],[95,3],[94,2],[96,1],[92,1],[97,2],[90,4],[98,1],[99,5]],"latestChangedDtsFile":"./@types/index.d.ts"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ja-platform/parser-type-system",
|
|
3
|
+
"version": "0.0.0-dev-20261019214152",
|
|
4
|
+
"description": "Journey value types",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"typings": "./dist/@types/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"registry": "https://registry.npmjs.org/",
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/journeyapps-platform/parser.git",
|
|
17
|
+
"directory": "packages/type-system"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": "^22.19.0 || ^24.11.0 || >=26.0.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"vitest": "^5.0.5"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "vitest run --configLoader runner --config vitest.config.unit.ts"
|
|
27
|
+
}
|
|
28
|
+
}
|