@synnaxlabs/x 0.41.0 → 0.42.1
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/.turbo/turbo-build.log +23 -23
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +2 -2
- package/dist/{bounds-M-SZ3X1Z.cjs → bounds-BQo7rvs9.cjs} +1 -1
- package/dist/{bounds-DQrjn60Q.js → bounds-Bn5_l4Z3.js} +10 -9
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +1 -1
- package/dist/compare.cjs +1 -1
- package/dist/compare.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +84 -77
- package/dist/{dimensions-PWy5QZoM.cjs → dimensions-D2QGoNXO.cjs} +1 -1
- package/dist/dimensions.cjs +1 -1
- package/dist/{external-CvWr1nhS.cjs → external-DWQITF5_.cjs} +1 -1
- package/dist/index-BywOGO8U.js +1074 -0
- package/dist/index-CYYjI7Uf.cjs +1 -0
- package/dist/index-C_6NXBlg.cjs +3 -0
- package/dist/{index-BVC_8Cg9.js → index-QGplUHuy.js} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +702 -243
- package/dist/record.js +3 -1
- package/dist/{scale-DL9VFGhL.cjs → scale-BtZINJ-A.cjs} +1 -1
- package/dist/{scale-DQwBWnwc.js → scale-DfJe9755.js} +1 -1
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/{series-D0zxMWxP.js → series-B9JERcqi.js} +571 -492
- package/dist/series-DqJ6f97G.cjs +11 -0
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +2 -2
- package/dist/src/binary/{encoder.d.ts → codec.d.ts} +14 -8
- package/dist/src/binary/codec.d.ts.map +1 -0
- package/dist/src/binary/codec.spec.d.ts +2 -0
- package/dist/src/binary/codec.spec.d.ts.map +1 -0
- package/dist/src/binary/index.d.ts +1 -1
- package/dist/src/binary/index.d.ts.map +1 -1
- package/dist/src/breaker/breaker.d.ts +14 -21
- package/dist/src/breaker/breaker.d.ts.map +1 -1
- package/dist/src/change/change.d.ts +5 -18
- package/dist/src/change/change.d.ts.map +1 -1
- package/dist/src/color/color.d.ts +126 -0
- package/dist/src/color/color.d.ts.map +1 -0
- package/dist/src/color/color.spec.d.ts +2 -0
- package/dist/src/color/color.spec.d.ts.map +1 -0
- package/dist/src/color/external.d.ts +5 -0
- package/dist/src/color/external.d.ts.map +1 -0
- package/dist/src/color/gradient.d.ts +18 -0
- package/dist/src/color/gradient.d.ts.map +1 -0
- package/dist/src/color/index.d.ts +2 -0
- package/dist/src/color/index.d.ts.map +1 -0
- package/dist/src/color/palette.d.ts +19 -0
- package/dist/src/color/palette.d.ts.map +1 -0
- package/dist/src/color/transformColorsToHex.d.ts +6 -0
- package/dist/src/color/transformColorsToHex.d.ts.map +1 -0
- package/dist/src/control/control.d.ts +69 -74
- package/dist/src/control/control.d.ts.map +1 -1
- package/dist/src/deep/merge.d.ts +1 -1
- package/dist/src/deep/merge.d.ts.map +1 -1
- package/dist/src/errors/errors.d.ts +127 -7
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/errors/errors.spec.d.ts +2 -0
- package/dist/src/errors/errors.spec.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/jsonrpc/jsonrpc.d.ts +10 -7
- package/dist/src/jsonrpc/jsonrpc.d.ts.map +1 -1
- package/dist/src/kv/types.d.ts +1 -7
- package/dist/src/kv/types.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts +1 -1
- package/dist/src/notation/notation.d.ts +5 -1
- package/dist/src/notation/notation.d.ts.map +1 -1
- package/dist/src/record.d.ts +2 -1
- package/dist/src/record.d.ts.map +1 -1
- package/dist/src/replace.d.ts +2 -0
- package/dist/src/replace.d.ts.map +1 -0
- package/dist/src/runtime/os.d.ts +9 -1
- package/dist/src/runtime/os.d.ts.map +1 -1
- package/dist/src/singleton/define.d.ts +9 -0
- package/dist/src/singleton/define.d.ts.map +1 -0
- package/dist/src/singleton/define.spec.d.ts +2 -0
- package/dist/src/singleton/define.spec.d.ts.map +1 -0
- package/dist/src/singleton/index.d.ts +2 -0
- package/dist/src/singleton/index.d.ts.map +1 -0
- package/dist/src/spatial/base.d.ts +74 -70
- package/dist/src/spatial/base.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +18 -76
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/dimensions/dimensions.d.ts +5 -29
- package/dist/src/spatial/dimensions/dimensions.d.ts.map +1 -1
- package/dist/src/spatial/direction/direction.d.ts +9 -1
- package/dist/src/spatial/direction/direction.d.ts.map +1 -1
- package/dist/src/spatial/location/location.d.ts +43 -22
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +12 -120
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +5 -29
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/sync/index.d.ts +2 -0
- package/dist/src/sync/index.d.ts.map +1 -0
- package/dist/src/sync/mutex.d.ts +8 -0
- package/dist/src/sync/mutex.d.ts.map +1 -0
- package/dist/src/telem/gl.d.ts +4 -1
- package/dist/src/telem/gl.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +46 -125
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +101 -86
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/toArray.d.ts +1 -1
- package/dist/src/toArray.d.ts.map +1 -1
- package/dist/src/zod/util.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/toArray.cjs +1 -1
- package/dist/toArray.js +1 -1
- package/dist/zod.cjs +1 -1
- package/package.json +5 -2
- package/src/binary/codec.spec.ts +370 -0
- package/src/binary/{encoder.ts → codec.ts} +55 -11
- package/src/binary/index.ts +1 -1
- package/src/breaker/breaker.spec.ts +16 -25
- package/src/breaker/breaker.ts +36 -19
- package/src/color/color.spec.ts +673 -0
- package/src/color/color.ts +317 -0
- package/src/color/external.ts +13 -0
- package/src/color/gradient.ts +78 -0
- package/src/color/index.ts +10 -0
- package/src/color/palette.ts +28 -0
- package/src/color/transformColorsToHex.ts +30 -0
- package/src/control/control.ts +30 -22
- package/src/deep/merge.spec.ts +60 -0
- package/src/deep/merge.ts +13 -8
- package/src/errors/errors.spec.ts +152 -0
- package/src/errors/errors.ts +225 -10
- package/src/index.ts +4 -0
- package/src/jsonrpc/jsonrpc.ts +12 -8
- package/src/migrate/migrate.ts +2 -2
- package/src/primitive.ts +1 -1
- package/src/record.ts +5 -1
- package/src/replace.ts +1 -0
- package/src/singleton/define.spec.ts +93 -0
- package/src/singleton/define.ts +27 -0
- package/src/singleton/index.ts +10 -0
- package/src/sync/index.ts +1 -0
- package/src/sync/mutex.ts +16 -0
- package/src/telem/series.spec.ts +32 -0
- package/src/telem/series.ts +54 -19
- package/src/telem/telem.spec.ts +151 -10
- package/src/telem/telem.ts +126 -73
- package/src/toArray.ts +2 -2
- package/src/zod/util.spec.ts +17 -1
- package/src/zod/util.ts +4 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/index-BG3Scw3G.cjs +0 -1
- package/dist/index-C3QzbIwt.js +0 -101
- package/dist/index-CnclyYpG.cjs +0 -3
- package/dist/series-BMma2b5q.cjs +0 -11
- package/dist/src/binary/encoder.d.ts.map +0 -1
- package/dist/src/binary/encoder.spec.d.ts +0 -2
- package/dist/src/binary/encoder.spec.d.ts.map +0 -1
- package/src/binary/encoder.spec.ts +0 -174
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { bounds } from '../spatial';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
3
|
+
export declare const authorityZ: z.ZodNumber;
|
|
4
|
+
export type Authority = z.infer<typeof authorityZ>;
|
|
5
|
+
export declare const ABSOLUTE_AUTHORITY: Authority;
|
|
6
|
+
export declare const ZERO_AUTHORITY: Authority;
|
|
7
|
+
export declare const AUTHORITY_BOUNDS: bounds.Bounds<Authority>;
|
|
9
8
|
export declare const subjectZ: z.ZodObject<{
|
|
10
9
|
name: z.ZodString;
|
|
11
10
|
key: z.ZodString;
|
|
12
|
-
},
|
|
13
|
-
key: string;
|
|
14
|
-
name: string;
|
|
15
|
-
}, {
|
|
16
|
-
key: string;
|
|
17
|
-
name: string;
|
|
18
|
-
}>;
|
|
11
|
+
}, {}>;
|
|
19
12
|
export interface Subject {
|
|
20
13
|
name: string;
|
|
21
14
|
key: string;
|
|
@@ -24,68 +17,10 @@ export declare const stateZ: <T extends z.ZodTypeAny>(r: T) => z.ZodObject<{
|
|
|
24
17
|
subject: z.ZodObject<{
|
|
25
18
|
name: z.ZodString;
|
|
26
19
|
key: z.ZodString;
|
|
27
|
-
},
|
|
28
|
-
key: string;
|
|
29
|
-
name: string;
|
|
30
|
-
}, {
|
|
31
|
-
key: string;
|
|
32
|
-
name: string;
|
|
33
|
-
}>;
|
|
34
|
-
resource: T;
|
|
35
|
-
authority: z.ZodUnion<[z.ZodType<Authority, z.ZodTypeDef, Authority>, z.ZodEffects<z.ZodNumber, Authority, number>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, Authority, Number>]>;
|
|
36
|
-
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
37
|
-
subject: z.ZodObject<{
|
|
38
|
-
name: z.ZodString;
|
|
39
|
-
key: z.ZodString;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
key: string;
|
|
42
|
-
name: string;
|
|
43
|
-
}, {
|
|
44
|
-
key: string;
|
|
45
|
-
name: string;
|
|
46
|
-
}>;
|
|
47
|
-
resource: T;
|
|
48
|
-
authority: z.ZodUnion<[z.ZodType<Authority, z.ZodTypeDef, Authority>, z.ZodEffects<z.ZodNumber, Authority, number>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, Authority, Number>]>;
|
|
49
|
-
}>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
50
|
-
subject: z.ZodObject<{
|
|
51
|
-
name: z.ZodString;
|
|
52
|
-
key: z.ZodString;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
key: string;
|
|
55
|
-
name: string;
|
|
56
|
-
}, {
|
|
57
|
-
key: string;
|
|
58
|
-
name: string;
|
|
59
|
-
}>;
|
|
60
|
-
resource: T;
|
|
61
|
-
authority: z.ZodUnion<[z.ZodType<Authority, z.ZodTypeDef, Authority>, z.ZodEffects<z.ZodNumber, Authority, number>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, Authority, Number>]>;
|
|
62
|
-
}>, any>[k]; } : never, z.baseObjectInputType<{
|
|
63
|
-
subject: z.ZodObject<{
|
|
64
|
-
name: z.ZodString;
|
|
65
|
-
key: z.ZodString;
|
|
66
|
-
}, "strip", z.ZodTypeAny, {
|
|
67
|
-
key: string;
|
|
68
|
-
name: string;
|
|
69
|
-
}, {
|
|
70
|
-
key: string;
|
|
71
|
-
name: string;
|
|
72
|
-
}>;
|
|
73
|
-
resource: T;
|
|
74
|
-
authority: z.ZodUnion<[z.ZodType<Authority, z.ZodTypeDef, Authority>, z.ZodEffects<z.ZodNumber, Authority, number>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, Authority, Number>]>;
|
|
75
|
-
}> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
|
|
76
|
-
subject: z.ZodObject<{
|
|
77
|
-
name: z.ZodString;
|
|
78
|
-
key: z.ZodString;
|
|
79
|
-
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
key: string;
|
|
81
|
-
name: string;
|
|
82
|
-
}, {
|
|
83
|
-
key: string;
|
|
84
|
-
name: string;
|
|
85
|
-
}>;
|
|
20
|
+
}, {}>;
|
|
86
21
|
resource: T;
|
|
87
|
-
authority: z.
|
|
88
|
-
}
|
|
22
|
+
authority: z.ZodNumber;
|
|
23
|
+
}, {}>;
|
|
89
24
|
export interface State<R> {
|
|
90
25
|
subject: Subject;
|
|
91
26
|
resource: R;
|
|
@@ -96,13 +31,73 @@ interface Release<R> {
|
|
|
96
31
|
from: State<R>;
|
|
97
32
|
to?: null;
|
|
98
33
|
}
|
|
34
|
+
export declare const releaseZ: z.ZodObject<{
|
|
35
|
+
from: z.ZodObject<{
|
|
36
|
+
subject: z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
key: z.ZodString;
|
|
39
|
+
}, {}>;
|
|
40
|
+
resource: z.ZodAny;
|
|
41
|
+
authority: z.ZodNumber;
|
|
42
|
+
}, {}>;
|
|
43
|
+
to: z.ZodNull;
|
|
44
|
+
}, {}>;
|
|
99
45
|
interface Acquire<R> {
|
|
100
46
|
from?: null;
|
|
101
47
|
to: State<R>;
|
|
102
48
|
}
|
|
49
|
+
export declare const acquireZ: z.ZodObject<{
|
|
50
|
+
from: z.ZodNull;
|
|
51
|
+
to: z.ZodObject<{
|
|
52
|
+
subject: z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
key: z.ZodString;
|
|
55
|
+
}, {}>;
|
|
56
|
+
resource: z.ZodAny;
|
|
57
|
+
authority: z.ZodNumber;
|
|
58
|
+
}, {}>;
|
|
59
|
+
}, {}>;
|
|
103
60
|
export type Transfer<R> = {
|
|
104
61
|
from: State<R>;
|
|
105
62
|
to: State<R>;
|
|
106
63
|
} | Release<R> | Acquire<R>;
|
|
64
|
+
export declare const transferZ: z.ZodUnion<readonly [z.ZodObject<{
|
|
65
|
+
from: z.ZodObject<{
|
|
66
|
+
subject: z.ZodObject<{
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
key: z.ZodString;
|
|
69
|
+
}, {}>;
|
|
70
|
+
resource: z.ZodAny;
|
|
71
|
+
authority: z.ZodNumber;
|
|
72
|
+
}, {}>;
|
|
73
|
+
to: z.ZodNull;
|
|
74
|
+
}, {}>, z.ZodObject<{
|
|
75
|
+
from: z.ZodNull;
|
|
76
|
+
to: z.ZodObject<{
|
|
77
|
+
subject: z.ZodObject<{
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
key: z.ZodString;
|
|
80
|
+
}, {}>;
|
|
81
|
+
resource: z.ZodAny;
|
|
82
|
+
authority: z.ZodNumber;
|
|
83
|
+
}, {}>;
|
|
84
|
+
}, {}>, z.ZodObject<{
|
|
85
|
+
from: z.ZodObject<{
|
|
86
|
+
subject: z.ZodObject<{
|
|
87
|
+
name: z.ZodString;
|
|
88
|
+
key: z.ZodString;
|
|
89
|
+
}, {}>;
|
|
90
|
+
resource: z.ZodAny;
|
|
91
|
+
authority: z.ZodNumber;
|
|
92
|
+
}, {}>;
|
|
93
|
+
to: z.ZodObject<{
|
|
94
|
+
subject: z.ZodObject<{
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
key: z.ZodString;
|
|
97
|
+
}, {}>;
|
|
98
|
+
resource: z.ZodAny;
|
|
99
|
+
authority: z.ZodNumber;
|
|
100
|
+
}, {}>;
|
|
101
|
+
}, {}>]>;
|
|
107
102
|
export {};
|
|
108
103
|
//# sourceMappingURL=control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../../src/control/control.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,
|
|
1
|
+
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../../src/control/control.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM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CAAC,CAAC,CAAC;CACd,GACD,OAAO,CAAC,CAAC,CAAC,GACV,OAAO,CAAC,CAAC,CAAC,CAAC;AAEf,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAOpB,CAAC"}
|
package/dist/src/deep/merge.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ import { Partial } from './partial';
|
|
|
7
7
|
* @param overrides The object(s) to override the base object with
|
|
8
8
|
*/
|
|
9
9
|
export declare const override: <T>(base: T, ...overrides: Array<Partial<T>>) => T;
|
|
10
|
-
export declare const overrideValidItems: <A, B>(base: A, override: B, schema: z.ZodType<A
|
|
10
|
+
export declare const overrideValidItems: <A, B>(base: A, override: B, schema: z.ZodType<A>) => A;
|
|
11
11
|
//# sourceMappingURL=merge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/deep/merge.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,WAAW,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAG,CAiBtE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,CAAC,EACrC,MAAM,CAAC,EACP,UAAU,CAAC,EACX,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/deep/merge.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,WAAW,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAG,CAiBtE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,CAAC,EACrC,MAAM,CAAC,EACP,UAAU,CAAC,EACX,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KACnB,CAwCF,CAAC"}
|
|
@@ -1,12 +1,132 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @returns general function that returns true if an error matches a set of
|
|
4
|
+
* abstracted criteria
|
|
5
|
+
*/
|
|
6
|
+
export type Matcher = (e: string | Error | unknown) => boolean;
|
|
7
|
+
/** @description an error type that can match against other errors. */
|
|
8
|
+
export interface Matchable {
|
|
9
|
+
/**
|
|
10
|
+
* @returns a function that matches errors of the given type. Returns true if
|
|
11
|
+
* the provided instance of Error or a string message contains the provided error type.
|
|
12
|
+
*/
|
|
13
|
+
matches: Matcher;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @description an error that has a network-portable type, allowing it to be encoded/
|
|
17
|
+
* decoded by freighter. Also allows for simpler matching using @method matches instead
|
|
18
|
+
* of using instanceof, which has a number of caveats.
|
|
19
|
+
*/
|
|
20
|
+
export interface Typed extends Error, Matchable {
|
|
21
|
+
discriminator: "FreighterError";
|
|
22
|
+
/**
|
|
23
|
+
* @description Returns a unique type identifier for the error. Freighter uses this to
|
|
24
|
+
* determine the correct decoder to use on the other end of the freighter.
|
|
25
|
+
*/
|
|
26
|
+
type: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @description a class that, when constructed, implements the TypedError interface.
|
|
30
|
+
* Also provides utilities for matching and creating subclasses.
|
|
31
|
+
*/
|
|
32
|
+
export interface TypedClass extends Matchable {
|
|
33
|
+
/**
|
|
34
|
+
* @description constructs a new TypedError. Identical to the Error constructor.
|
|
35
|
+
* @param message - the error message.
|
|
36
|
+
* @param options - the error options.
|
|
37
|
+
* @returns a new TypedError.
|
|
38
|
+
*/
|
|
39
|
+
new (message?: string, options?: ErrorOptions): Typed;
|
|
40
|
+
/**
|
|
41
|
+
* @description the type of the error.
|
|
42
|
+
*/
|
|
43
|
+
TYPE: string;
|
|
44
|
+
/**
|
|
45
|
+
* @description creates a new subclass of the error that extends its type. So if
|
|
46
|
+
* the type of this class is `dog` and subType is `labrador`, the type of the new
|
|
47
|
+
* class will be `dog.labrador`.
|
|
48
|
+
* @param subType - the type of the new error.
|
|
49
|
+
* @returns a new TypedErrorClass.
|
|
50
|
+
*/
|
|
51
|
+
sub: (subType: string) => TypedClass;
|
|
6
52
|
}
|
|
7
53
|
/**
|
|
8
|
-
*
|
|
54
|
+
* Creates a new class definition that implements the TypedErrorClass interface.
|
|
55
|
+
* @param type - the type of the error.
|
|
56
|
+
* @returns a new TypedErrorClass.
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* class MyError extends createTypedError("my_error") {}
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare const createTyped: (type: string) => TypedClass;
|
|
63
|
+
/**
|
|
64
|
+
* @description Function that decodes an encoded error payload back into an error object
|
|
65
|
+
* @param encoded - The encoded error payload to decode
|
|
66
|
+
* @returns The decoded error object or null if the decoder cannot handle this error type
|
|
67
|
+
*/
|
|
68
|
+
export type Decoder = (encoded: Payload) => Error | null;
|
|
69
|
+
/**
|
|
70
|
+
* @description Function that encodes a typed error into a network-portable payload
|
|
71
|
+
* @param error - The typed error to encode
|
|
72
|
+
* @returns The encoded error payload or null if the encoder cannot handle this error type
|
|
9
73
|
*/
|
|
10
|
-
export
|
|
74
|
+
export type Encoder = (error: Typed) => Payload | null;
|
|
75
|
+
/**
|
|
76
|
+
* @description Checks if an unknown value is a TypedError
|
|
77
|
+
* @param error - The value to check
|
|
78
|
+
* @returns True if the value is a TypedError, false otherwise
|
|
79
|
+
*/
|
|
80
|
+
export declare const isTyped: (error: unknown) => error is Typed;
|
|
81
|
+
/** @description Constant representing an unknown error type */
|
|
82
|
+
export declare const UNKNOWN = "unknown";
|
|
83
|
+
/** @description Constant representing no error (null) */
|
|
84
|
+
export declare const NONE = "nil";
|
|
85
|
+
/**
|
|
86
|
+
* Registers a custom error type with the error registry, which allows it to be
|
|
87
|
+
* encoded/decoded and sent over the network.
|
|
88
|
+
*
|
|
89
|
+
* @param type - A unique string identifier for the error type.
|
|
90
|
+
* @param encode - A function that encodes the error into a string.
|
|
91
|
+
* @param decode - A function that decodes the error from a string.
|
|
92
|
+
*/
|
|
93
|
+
export declare const register: ({ encode, decode, }: {
|
|
94
|
+
encode: Encoder;
|
|
95
|
+
decode: Decoder;
|
|
96
|
+
}) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Encodes an error into a payload that can be sent between a freighter server
|
|
99
|
+
* and client.
|
|
100
|
+
* @param error - The error to encode.
|
|
101
|
+
* @returns The encoded error.
|
|
102
|
+
*/
|
|
103
|
+
export declare const encode: (error: unknown) => Payload;
|
|
104
|
+
/**
|
|
105
|
+
* Decodes an error payload into an exception. If a custom decoder can be found
|
|
106
|
+
* for the error type, it will be used. Otherwise, a generic Error containing
|
|
107
|
+
* the error data is returned.
|
|
108
|
+
*
|
|
109
|
+
* @param payload - The encoded error payload.
|
|
110
|
+
* @returns The decoded error.
|
|
111
|
+
*/
|
|
112
|
+
export declare const decode: (payload?: Payload | null) => Error | null;
|
|
113
|
+
declare const Unknown_base: TypedClass;
|
|
114
|
+
/**
|
|
115
|
+
* @description Generic error for representing unknown errors
|
|
116
|
+
*/
|
|
117
|
+
export declare class Unknown extends Unknown_base {
|
|
118
|
+
}
|
|
119
|
+
/** @description Zod schema for validating error payloads */
|
|
120
|
+
export declare const payloadZ: z.ZodObject<{
|
|
121
|
+
type: z.ZodString;
|
|
122
|
+
data: z.ZodString;
|
|
123
|
+
}, {}>;
|
|
124
|
+
/** @description Network-portable representation of an error */
|
|
125
|
+
export type Payload = z.infer<typeof payloadZ>;
|
|
126
|
+
declare const Canceled_base: TypedClass;
|
|
127
|
+
/** @description Error for representing the cancellation of an operation */
|
|
128
|
+
export declare class Canceled extends Canceled_base {
|
|
129
|
+
}
|
|
130
|
+
export type Return<T> = [T, null] | [null, Error];
|
|
11
131
|
export {};
|
|
12
132
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors/errors.ts"],"names":[],"mappings":"AASA,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors/errors.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,KAAK,OAAO,CAAC;AAE/D,sEAAsE;AACtE,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,KAAM,SAAQ,KAAK,EAAE,SAAS;IAC7C,aAAa,EAAE,gBAAgB,CAAC;IAChC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C;;;;;OAKG;IACH,KAAK,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,UAAU,CAAC;CACtC;AAiBD;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,UAkBxC,CAAC;AAEJ;;;;GAIG;AAC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,6 +3,7 @@ export * from './breaker';
|
|
|
3
3
|
export * from './caseconv';
|
|
4
4
|
export * from './change';
|
|
5
5
|
export * from './clamp/clamp';
|
|
6
|
+
export * from './color';
|
|
6
7
|
export * from './compare';
|
|
7
8
|
export * from './control';
|
|
8
9
|
export * from './debounce/debounce';
|
|
@@ -23,12 +24,15 @@ export * from './optional';
|
|
|
23
24
|
export * from './primitive';
|
|
24
25
|
export * from './record';
|
|
25
26
|
export * from './renderable';
|
|
27
|
+
export * from './replace';
|
|
26
28
|
export * from './runtime';
|
|
27
29
|
export * from './runtime';
|
|
28
30
|
export * from './search';
|
|
29
31
|
export * from './shallowCopy';
|
|
32
|
+
export * from './sleep';
|
|
30
33
|
export * from './spatial';
|
|
31
34
|
export * from './strings';
|
|
35
|
+
export * from './sync';
|
|
32
36
|
export * from './telem';
|
|
33
37
|
export * from './toArray';
|
|
34
38
|
export * from './transform';
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC;AACrB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AA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Ae,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { default as z } from 'zod';
|
|
2
|
+
declare const messageZ: z.ZodObject<{
|
|
3
|
+
jsonrpc: z.ZodString;
|
|
4
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
method: z.ZodOptional<z.ZodString>;
|
|
6
|
+
params: z.ZodOptional<z.ZodUnknown>;
|
|
7
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
8
|
+
}, {}>;
|
|
9
|
+
export type Message = z.infer<typeof messageZ>;
|
|
8
10
|
export interface ChunkParser {
|
|
9
11
|
(chunk: Uint8Array | ArrayBuffer | string): void;
|
|
10
12
|
}
|
|
@@ -33,4 +35,5 @@ export interface ChunkParser {
|
|
|
33
35
|
*/
|
|
34
36
|
export declare const streamDecodeChunks: (onMessage: (message: Message) => void) => ChunkParser;
|
|
35
37
|
export declare const encodeMessage: (message: Message) => string;
|
|
38
|
+
export {};
|
|
36
39
|
//# sourceMappingURL=jsonrpc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonrpc.d.ts","sourceRoot":"","sources":["../../../src/jsonrpc/jsonrpc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsonrpc.d.ts","sourceRoot":"","sources":["../../../src/jsonrpc/jsonrpc.ts"],"names":[],"mappings":"AASA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,QAAA,MAAM,QAAQ;;;;;;MAMZ,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/C,MAAM,WAAW,WAAW;IAC1B,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,kBAAkB,GAC7B,WAAW,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,KACpC,WAoCF,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,OAAO,KAAG,MAKhD,CAAC"}
|
package/dist/src/kv/types.d.ts
CHANGED
|
@@ -34,13 +34,7 @@ export interface Async<R = unknown, W = R> extends AsyncReader<R>, AsyncWriter<W
|
|
|
34
34
|
export declare const stringPairZ: z.ZodObject<{
|
|
35
35
|
key: z.ZodString;
|
|
36
36
|
value: z.ZodString;
|
|
37
|
-
},
|
|
38
|
-
value: string;
|
|
39
|
-
key: string;
|
|
40
|
-
}, {
|
|
41
|
-
value: string;
|
|
42
|
-
key: string;
|
|
43
|
-
}>;
|
|
37
|
+
}, {}>;
|
|
44
38
|
/** A general purpose key-value pair. */
|
|
45
39
|
export interface Pair<V = unknown> {
|
|
46
40
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/kv/types.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,MAAM,CAAC,CAAC,GAAG,OAAO;IACjC,6EAA6E;IAC7E,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,MAAM,CAAC,CAAC,GAAG,OAAO;IACjC,0CAA0C;IAC1C,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE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AAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,CAAC;CACV"}
|
|
@@ -30,7 +30,7 @@ export interface CompareSemVerOptions {
|
|
|
30
30
|
* than B, compare.EQUAL (0) if a is the same as b, and compare.GREATER_THAN (positive)
|
|
31
31
|
* if a is NEWER than b.
|
|
32
32
|
*/
|
|
33
|
-
export declare const compareSemVer: (a: SemVer, b: SemVer, opts?: CompareSemVerOptions) =>
|
|
33
|
+
export declare const compareSemVer: (a: SemVer, b: SemVer, opts?: CompareSemVerOptions) => 0 | 1 | -1;
|
|
34
34
|
/**
|
|
35
35
|
* @returns true if the two semantic versions are equal.
|
|
36
36
|
* @param a - The first semantic version.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const NOTATIONS: readonly ["standard", "scientific", "engineering"];
|
|
3
|
-
export declare const notationZ: z.ZodEnum<
|
|
3
|
+
export declare const notationZ: z.ZodEnum<{
|
|
4
|
+
standard: "standard";
|
|
5
|
+
scientific: "scientific";
|
|
6
|
+
engineering: "engineering";
|
|
7
|
+
}>;
|
|
4
8
|
export type Notation = z.infer<typeof notationZ>;
|
|
5
9
|
/**
|
|
6
10
|
* Converts a number to a string representation with a specified precision and notation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notation.d.ts","sourceRoot":"","sources":["../../../src/notation/notation.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS,oDAAqD,CAAC;AAC5E,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"notation.d.ts","sourceRoot":"","sources":["../../../src/notation/notation.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS,oDAAqD,CAAC;AAC5E,eAAO,MAAM,SAAS;;;;EAAoB,CAAC;AAC3C,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,EACb,WAAW,MAAM,EACjB,UAAU,QAAQ,KACjB,MAcF,CAAC"}
|
package/dist/src/record.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export type Key = string | number;
|
|
3
3
|
export type UnknownRecord = Record<Key, unknown>;
|
|
4
|
+
export type UnknownStringRecord = Record<string, unknown>;
|
|
4
5
|
export interface Keyed<K extends Key> {
|
|
5
6
|
key: K;
|
|
6
7
|
}
|
|
@@ -8,7 +9,7 @@ export interface KeyedNamed<K extends Key = string> {
|
|
|
8
9
|
key: K;
|
|
9
10
|
name: string;
|
|
10
11
|
}
|
|
11
|
-
export declare const unknownRecordZ: z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>;
|
|
12
|
+
export declare const unknownRecordZ: z.ZodRecord<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>;
|
|
12
13
|
export type Entries<T> = Array<{
|
|
13
14
|
[K in keyof T]: [K, T[K]];
|
|
14
15
|
}[keyof T]>;
|
package/dist/src/record.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/record.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAEjD,MAAM,WAAW,KAAK,CAAC,CAAC,SAAS,GAAG;IAClC,GAAG,EAAE,CAAC,CAAC;CACR;AAED,MAAM,WAAW,UAAU,CAAC,C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CAAC,CAGb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC"}
|
package/dist/src/runtime/os.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const OPERATING_SYSTEMS: readonly ["macOS", "Windows", "Linux"];
|
|
3
|
-
export declare const osZ: z.ZodUnion<[z.ZodEnum<
|
|
3
|
+
export declare const osZ: z.ZodUnion<[z.ZodEnum<{
|
|
4
|
+
macOS: "macOS";
|
|
5
|
+
Windows: "Windows";
|
|
6
|
+
Linux: "Linux";
|
|
7
|
+
}>, z.ZodPipe<z.ZodEnum<{
|
|
8
|
+
macos: "macos";
|
|
9
|
+
windows: "windows";
|
|
10
|
+
linux: "linux";
|
|
11
|
+
}>, z.ZodTransform<"macOS" | "Windows" | "Linux", "macos" | "windows" | "linux">>]>;
|
|
4
12
|
export type OS = (typeof OPERATING_SYSTEMS)[number];
|
|
5
13
|
export interface RequiredGetOSProps {
|
|
6
14
|
force?: OS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../../../src/runtime/os.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB,wCAAyC,CAAC;AAWxE,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../../../src/runtime/os.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB,wCAAyC,CAAC;AAWxE,eAAO,MAAM,GAAG;;;;;;;;mFAMb,CAAC;AACJ,MAAM,MAAM,EAAE,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAWpD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,EAAE,CAAC;IACX,OAAO,CAAC,EAAE,EAAE,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,EAAE,CAAC;IACX,OAAO,EAAE,EAAE,CAAC;CACb;AAED,MAAM,MAAM,UAAU,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAIjE,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,EAAE,CAAC;IACjC,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,EAAE,GAAG,SAAS,CAAC;CAC9C;AAED,eAAO,MAAM,KAAK,EAAE,KAMT,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines a new global singleton instance of a value.
|
|
3
|
+
*
|
|
4
|
+
* @param key - The unique identifier for the singleton.
|
|
5
|
+
* @param value - A function that returns the singleton instance.
|
|
6
|
+
* @returns A function that returns the singleton instance.
|
|
7
|
+
*/
|
|
8
|
+
export declare const define: <T>(key: string, value: () => T) => (() => T);
|
|
9
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../../src/singleton/define.ts"],"names":[],"mappings":"AAYA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,KAAK,MAAM,EAAE,OAAO,MAAM,CAAC,KAAG,CAAC,MAAM,CAAC,CAO/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.spec.d.ts","sourceRoot":"","sources":["../../../src/singleton/define.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/singleton/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC"}
|