@requence/service 1.0.0-alpha.10 → 1.0.0-alpha.12
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/CHANGELOG.md +12 -0
- package/build/{chunk-zv4znr75.js → chunk-fa95vcc4.js} +4 -22
- package/build/{chunk-zv4znr75.js.map → chunk-fa95vcc4.js.map} +3 -3
- package/build/cli.js +1 -1
- package/build/cli.js.map +1 -1
- package/build/index.js +185 -6284
- package/build/index.js.map +12 -79
- package/build/types/helpers/src/context/context.d.ts +156 -0
- package/build/types/helpers/src/context/context.d.ts.map +1 -0
- package/build/types/helpers/src/context/index.d.ts +2 -0
- package/build/types/helpers/src/context/index.d.ts.map +1 -0
- package/build/types/helpers/src/files/RequenceFile.d.ts +40 -0
- package/build/types/helpers/src/files/RequenceFile.d.ts.map +1 -0
- package/build/types/helpers/src/files/RequenceStream.d.ts +32 -0
- package/build/types/helpers/src/files/RequenceStream.d.ts.map +1 -0
- package/build/types/helpers/src/files/index.d.ts +48 -0
- package/build/types/helpers/src/files/index.d.ts.map +1 -0
- package/build/types/helpers/src/files/isValidMimeType.d.ts +5 -0
- package/build/types/helpers/src/files/isValidMimeType.d.ts.map +1 -0
- package/build/types/helpers/src/files/mapOutput.d.ts +7 -0
- package/build/types/helpers/src/files/mapOutput.d.ts.map +1 -0
- package/build/types/helpers/src/files/types.d.ts +4 -0
- package/build/types/helpers/src/files/types.d.ts.map +1 -0
- package/build/types/helpers/src/jsonschema/mapSchema.d.ts +20 -0
- package/build/types/helpers/src/jsonschema/mapSchema.d.ts.map +1 -0
- package/build/types/helpers/src/jsonschema/types.d.ts +11 -0
- package/build/types/helpers/src/jsonschema/types.d.ts.map +1 -0
- package/build/types/helpers/src/jsonschema/validate.d.ts +27 -0
- package/build/types/helpers/src/jsonschema/validate.d.ts.map +1 -0
- package/build/types/helpers/src/jsonschema/zod.d.ts +20 -0
- package/build/types/helpers/src/jsonschema/zod.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/command.d.ts +1969 -0
- package/build/types/helpers/src/protocol/command.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/createNodeMaps.d.ts +10 -0
- package/build/types/helpers/src/protocol/createNodeMaps.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/getCycles.d.ts +3 -0
- package/build/types/helpers/src/protocol/getCycles.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/getNodeOutputs.d.ts +4 -0
- package/build/types/helpers/src/protocol/getNodeOutputs.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/getPossiblePaths.d.ts +9 -0
- package/build/types/helpers/src/protocol/getPossiblePaths.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/identifyNode.d.ts +4 -0
- package/build/types/helpers/src/protocol/identifyNode.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/index.d.ts +10 -0
- package/build/types/helpers/src/protocol/index.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/node.d.ts +1014 -0
- package/build/types/helpers/src/protocol/node.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/nodes.d.ts +801 -0
- package/build/types/helpers/src/protocol/nodes.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/update.d.ts +3087 -0
- package/build/types/helpers/src/protocol/update.d.ts.map +1 -0
- package/build/types/service/src/helpers.d.ts +7 -7
- package/build/types/service/src/index.d.ts +1 -1
- package/build/types/service/src/index.d.ts.map +1 -1
- package/build/types/service/src/mapInput.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Nodes } from '../protocol/nodes.ts';
|
|
3
|
+
export declare const contextSchema: z.ZodObject<{
|
|
4
|
+
input: z.ZodAny;
|
|
5
|
+
meta: z.ZodAny;
|
|
6
|
+
tenant: z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
}, {
|
|
11
|
+
name: string;
|
|
12
|
+
}>;
|
|
13
|
+
data: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
14
|
+
errors: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
15
|
+
dates: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
errors: Record<string, string>;
|
|
18
|
+
data: Record<string, any>;
|
|
19
|
+
tenant: {
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
dates: Record<string, string>;
|
|
23
|
+
meta?: any;
|
|
24
|
+
input?: any;
|
|
25
|
+
}, {
|
|
26
|
+
errors: Record<string, string>;
|
|
27
|
+
data: Record<string, any>;
|
|
28
|
+
tenant: {
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
dates: Record<string, string>;
|
|
32
|
+
meta?: any;
|
|
33
|
+
input?: any;
|
|
34
|
+
}>;
|
|
35
|
+
export type Context = z.infer<typeof contextSchema>;
|
|
36
|
+
declare const internalKey: "internal";
|
|
37
|
+
export declare function getInternalContext(contextHelper: ContextHelper): {
|
|
38
|
+
results: Map<string, {
|
|
39
|
+
node: {
|
|
40
|
+
type: "entry";
|
|
41
|
+
id: "__entry__";
|
|
42
|
+
output: import("../protocol/node.ts").Output[];
|
|
43
|
+
inputSchema: import("json-schema").JSONSchema7;
|
|
44
|
+
metaSchema: import("json-schema").JSONSchema7;
|
|
45
|
+
meta?: Record<string, any> | undefined;
|
|
46
|
+
} | {
|
|
47
|
+
type: "service";
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
output: import("../protocol/node.ts").Output[];
|
|
51
|
+
inputSchema: ({
|
|
52
|
+
type: "object";
|
|
53
|
+
} & import("json-schema").JSONSchema7) | {
|
|
54
|
+
type: "null";
|
|
55
|
+
};
|
|
56
|
+
version: string;
|
|
57
|
+
configurationSchema: import("json-schema").JSONSchema7;
|
|
58
|
+
meta?: Record<string, any> | undefined;
|
|
59
|
+
configuration?: any;
|
|
60
|
+
alias?: string | undefined;
|
|
61
|
+
ttl?: number | undefined;
|
|
62
|
+
retry?: number | undefined;
|
|
63
|
+
retryDelay?: number | undefined;
|
|
64
|
+
} | {
|
|
65
|
+
type: "catch";
|
|
66
|
+
id: string;
|
|
67
|
+
output: import("../protocol/node.ts").Output[];
|
|
68
|
+
subject: string;
|
|
69
|
+
meta?: Record<string, any> | undefined;
|
|
70
|
+
} | {
|
|
71
|
+
type: "logic";
|
|
72
|
+
id: string;
|
|
73
|
+
output: import("../protocol/node.ts").Output[];
|
|
74
|
+
script: string;
|
|
75
|
+
concurrency: boolean;
|
|
76
|
+
language: "javascript" | "python" | "typescript";
|
|
77
|
+
maxExecutionTime: number;
|
|
78
|
+
meta?: Record<string, any> | undefined;
|
|
79
|
+
alias?: string | undefined;
|
|
80
|
+
} | {
|
|
81
|
+
type: "or";
|
|
82
|
+
id: string;
|
|
83
|
+
output: import("../protocol/node.ts").Output[];
|
|
84
|
+
meta?: Record<string, any> | undefined;
|
|
85
|
+
alias?: string | undefined;
|
|
86
|
+
};
|
|
87
|
+
executionDate: Date | null;
|
|
88
|
+
data: any;
|
|
89
|
+
error: string;
|
|
90
|
+
}>;
|
|
91
|
+
};
|
|
92
|
+
export declare function createContextHelper(context: Context, nodes: Nodes): {
|
|
93
|
+
internal: {
|
|
94
|
+
results: Map<string, {
|
|
95
|
+
node: {
|
|
96
|
+
type: "entry";
|
|
97
|
+
id: "__entry__";
|
|
98
|
+
output: import("../protocol/node.ts").Output[];
|
|
99
|
+
inputSchema: import("json-schema").JSONSchema7;
|
|
100
|
+
metaSchema: import("json-schema").JSONSchema7;
|
|
101
|
+
meta?: Record<string, any> | undefined;
|
|
102
|
+
} | {
|
|
103
|
+
type: "service";
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
output: import("../protocol/node.ts").Output[];
|
|
107
|
+
inputSchema: ({
|
|
108
|
+
type: "object";
|
|
109
|
+
} & import("json-schema").JSONSchema7) | {
|
|
110
|
+
type: "null";
|
|
111
|
+
};
|
|
112
|
+
version: string;
|
|
113
|
+
configurationSchema: import("json-schema").JSONSchema7;
|
|
114
|
+
meta?: Record<string, any> | undefined;
|
|
115
|
+
configuration?: any;
|
|
116
|
+
alias?: string | undefined;
|
|
117
|
+
ttl?: number | undefined;
|
|
118
|
+
retry?: number | undefined;
|
|
119
|
+
retryDelay?: number | undefined;
|
|
120
|
+
} | {
|
|
121
|
+
type: "catch";
|
|
122
|
+
id: string;
|
|
123
|
+
output: import("../protocol/node.ts").Output[];
|
|
124
|
+
subject: string;
|
|
125
|
+
meta?: Record<string, any> | undefined;
|
|
126
|
+
} | {
|
|
127
|
+
type: "logic";
|
|
128
|
+
id: string;
|
|
129
|
+
output: import("../protocol/node.ts").Output[];
|
|
130
|
+
script: string;
|
|
131
|
+
concurrency: boolean;
|
|
132
|
+
language: "javascript" | "python" | "typescript";
|
|
133
|
+
maxExecutionTime: number;
|
|
134
|
+
meta?: Record<string, any> | undefined;
|
|
135
|
+
alias?: string | undefined;
|
|
136
|
+
} | {
|
|
137
|
+
type: "or";
|
|
138
|
+
id: string;
|
|
139
|
+
output: import("../protocol/node.ts").Output[];
|
|
140
|
+
meta?: Record<string, any> | undefined;
|
|
141
|
+
alias?: string | undefined;
|
|
142
|
+
};
|
|
143
|
+
executionDate: Date | null;
|
|
144
|
+
data: any;
|
|
145
|
+
error: string;
|
|
146
|
+
}>;
|
|
147
|
+
};
|
|
148
|
+
getInput(): unknown;
|
|
149
|
+
getMeta(): unknown;
|
|
150
|
+
getData(alias?: string): any;
|
|
151
|
+
getError(alias: string): string | null;
|
|
152
|
+
};
|
|
153
|
+
type InternalContextHelper = ReturnType<typeof createContextHelper>;
|
|
154
|
+
export type ContextHelper = Omit<InternalContextHelper, typeof internalKey>;
|
|
155
|
+
export {};
|
|
156
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/context/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAMnD,QAAA,MAAM,WAAW,EAAwC,UAAU,CAAA;AAEnE,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9D;AAgBD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA8ClD,OAAO;eAGR,OAAO;oBAGF,MAAM;oBAsCN,MAAM;EAWzB;AAED,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACnE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,qBAAqB,EAAE,OAAO,WAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { FileObject } from './index.ts';
|
|
2
|
+
import type { MainMimeType, SubMimeType, ValidMimeType } from './types.ts';
|
|
3
|
+
interface RequenceFilePropertyBag<T> extends Omit<BlobPropertyBag, 'type'> {
|
|
4
|
+
type: T;
|
|
5
|
+
}
|
|
6
|
+
export interface RequenceFileType<A, B> {
|
|
7
|
+
size: number;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
mainMimeType: A;
|
|
10
|
+
subMimeType: B;
|
|
11
|
+
text(): Promise<string>;
|
|
12
|
+
json(): Promise<unknown>;
|
|
13
|
+
blob(): Promise<Blob>;
|
|
14
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
15
|
+
}
|
|
16
|
+
export declare class RequenceFile<T extends `${string}/${string}` = '*/*', A = MainMimeType<T>, B = SubMimeType<T>> implements RequenceFileType<A, B> {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(blobParts: BlobPart[], options?: RequenceFilePropertyBag<ValidMimeType<T>>);
|
|
19
|
+
/** @internal */
|
|
20
|
+
static fromFileObject<T extends `${string}/${string}`>(file: FileObject): RequenceFile<T>;
|
|
21
|
+
/** @internal */
|
|
22
|
+
get fileObject(): {
|
|
23
|
+
size: number;
|
|
24
|
+
mime: string;
|
|
25
|
+
url: string;
|
|
26
|
+
__REQUENCE_type: "RequenceFile";
|
|
27
|
+
} | null;
|
|
28
|
+
get size(): number;
|
|
29
|
+
get mimeType(): string;
|
|
30
|
+
get mainMimeType(): A;
|
|
31
|
+
get subMimeType(): B;
|
|
32
|
+
text(): Promise<string>;
|
|
33
|
+
json(): Promise<any>;
|
|
34
|
+
blob(): Promise<Blob>;
|
|
35
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
36
|
+
toString(): string;
|
|
37
|
+
toJSON(): string;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=RequenceFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequenceFile.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/RequenceFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1E,UAAU,uBAAuB,CAAC,CAAC,CAAE,SAAQ,IAAI,CA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MimeType } from './types.ts';
|
|
3
|
+
export interface RequenceStreamType<A, B> {
|
|
4
|
+
mimeType: string;
|
|
5
|
+
mainMimeType: A;
|
|
6
|
+
subMimeType: B;
|
|
7
|
+
stream(): ReadableStream;
|
|
8
|
+
}
|
|
9
|
+
interface RequenceStreamOptions<T> {
|
|
10
|
+
type: T;
|
|
11
|
+
}
|
|
12
|
+
export declare class RequenceStream<T extends `${string}/${string}` = '*/*', A = MainMimeType<T>, B = SubMimeType<T>> implements RequenceStreamType<A, B> {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(stream: ReadableStream, options: RequenceStreamOptions<ValidMimeType<T>>);
|
|
15
|
+
/** @internal */
|
|
16
|
+
static fromStreamObject<T extends `${string}/${string}`>(stream: StreamObject): RequenceStream<T>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
get streamObject(): {
|
|
19
|
+
mime: string;
|
|
20
|
+
url: string;
|
|
21
|
+
__REQUENCE_type: "RequenceStream";
|
|
22
|
+
} | null;
|
|
23
|
+
get mimeType(): any;
|
|
24
|
+
get mainMimeType(): A;
|
|
25
|
+
get subMimeType(): B;
|
|
26
|
+
stream(): ReadableStream<any>;
|
|
27
|
+
asyncIterable(): AsyncIterable<Uint8Array>;
|
|
28
|
+
toString(): string;
|
|
29
|
+
toJSON(): string;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=RequenceStream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequenceStream.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/RequenceStream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1E,MAAM,WAAW,kBAAkB,CAAC,CAAC,EAAE,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,CAAC,CAAA;IACf,WAAW,EAAE,CAAC,CAAA;IACd,MAAM,IAAI,cAAc,CAAA;CACzB;AAED,UAAU,qBAAqB,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAA;CACR;AAED,qBAAa,cAAc,CACzB,CAAC,SAAS,GAAG,MAAM,IAAI,MAAM,EAAE,GAAG,KAAK,EACvC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,EACnB,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAClB,YAAW,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC;;gBAOjC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAMlD,gBAAgB;IAChB,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,GAAG,MAAM,IAAI,MAAM,EAAE,EACrD,MAAM,EAAE,YAAY,GAMU,cAAc,CAAC,CAAC,CAAC;IAGjD,gBAAgB;IAChB,IAAI,YAAY;;;;aAEf;IAED,IAAI,QAAQ,QAEX;IAED,IAAI,YAAY,IACwB,CAAC,CACxC;IAED,IAAI,WAAW,IACyB,CAAC,CACxC;IAED,MAAM;IAaN,aAAa,IAAI,aAAa,CAAC,UAAU,CAAC;IAmB1C,QAAQ;IAIR,MAAM;CAGP"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export * from './mapOutput.ts';
|
|
3
|
+
export * from './isValidMimeType.ts';
|
|
4
|
+
export * from './RequenceFile.ts';
|
|
5
|
+
export * from './RequenceStream.ts';
|
|
6
|
+
declare const fileObjectSchema: z.ZodObject<{
|
|
7
|
+
size: z.ZodNumber;
|
|
8
|
+
mime: z.ZodString;
|
|
9
|
+
url: z.ZodString;
|
|
10
|
+
__REQUENCE_type: z.ZodLiteral<"RequenceFile">;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
size: number;
|
|
13
|
+
mime: string;
|
|
14
|
+
url: string;
|
|
15
|
+
__REQUENCE_type: "RequenceFile";
|
|
16
|
+
}, {
|
|
17
|
+
size: number;
|
|
18
|
+
mime: string;
|
|
19
|
+
url: string;
|
|
20
|
+
__REQUENCE_type: "RequenceFile";
|
|
21
|
+
}>;
|
|
22
|
+
export type FileObject = z.infer<typeof fileObjectSchema>;
|
|
23
|
+
export declare function toFileObject(fileInfo: {
|
|
24
|
+
size: number;
|
|
25
|
+
mime: string;
|
|
26
|
+
url: string;
|
|
27
|
+
}): FileObject;
|
|
28
|
+
export declare function isFileObject(data: unknown): data is FileObject;
|
|
29
|
+
declare const streamObjectSchema: z.ZodObject<{
|
|
30
|
+
mime: z.ZodString;
|
|
31
|
+
url: z.ZodString;
|
|
32
|
+
__REQUENCE_type: z.ZodLiteral<"RequenceStream">;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
mime: string;
|
|
35
|
+
url: string;
|
|
36
|
+
__REQUENCE_type: "RequenceStream";
|
|
37
|
+
}, {
|
|
38
|
+
mime: string;
|
|
39
|
+
url: string;
|
|
40
|
+
__REQUENCE_type: "RequenceStream";
|
|
41
|
+
}>;
|
|
42
|
+
export type StreamObject = z.infer<typeof streamObjectSchema>;
|
|
43
|
+
export declare function toStreamObject(streamInfo: {
|
|
44
|
+
mime: string;
|
|
45
|
+
url: string;
|
|
46
|
+
}): StreamObject;
|
|
47
|
+
export declare function isStreamObject(data: unknown): data is StreamObject;
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AAEnC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;EAKpB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,wBAAgB,YAAY,CAAC,QAAQ,EAAE;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,UAAU,CAKb;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,UAAU,CAE9D;AAED,QAAA,MAAM,kBAAkB;;;;;;;;;;;;EAItB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,wBAAgB,cAAc,CAAC,UAAU,EAAE;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,YAAY,CAKf;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,YAAY,CAElE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isValidMimeType.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/isValidMimeType.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAC7B,QAAQ,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACxC,MAAM,EAAE,MAAM,WA6Bf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NodeOptions } from '../protocol/command.ts';
|
|
2
|
+
export declare function mapOutput(value: unknown, nodeOptions: NodeOptions, eventHandlers?: {
|
|
3
|
+
onFail?: (error: Error) => void;
|
|
4
|
+
onSkip?: () => void;
|
|
5
|
+
onDone?: () => void;
|
|
6
|
+
}): Promise<unknown>;
|
|
7
|
+
//# sourceMappingURL=mapOutput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapOutput.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/mapOutput.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAsEzD,wBAAsB,SAAS,CAC7B,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,CAAC,EAAE;IACd,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,oBAiFF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type MainMimeType<T extends string> = T extends `${infer V}/${string}` ? V extends '*' ? any : V : any;
|
|
2
|
+
export type SubMimeType<T extends string> = T extends `${string}/${infer V}` ? V extends '*' ? any : V : any;
|
|
3
|
+
export type ValidMimeType<T extends `${string}/${string}`> = T extends `${infer A}/${infer B}` ? A extends '*' | '' | '/' ? never : B extends '*' | '' | '/' ? never : T : never;
|
|
4
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,EAAE,GACzE,CAAC,SAAS,GAAG,GACX,GAAG,GACH,CAAC,GACH,GAAG,CAAA;AAEP,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,MAAM,CAAC,EAAE,GACxE,CAAC,SAAS,GAAG,GACX,GAAG,GACH,CAAC,GACH,GAAG,CAAA;AAEP,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,GAAG,MAAM,IAAI,MAAM,EAAE,IACvD,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,GAC7B,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,GAAG,GACtB,KAAK,GACL,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,GAAG,GACtB,KAAK,GACL,CAAC,GACL,KAAK,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { JSONSchema7Definition } from 'json-schema';
|
|
2
|
+
import type { JSONSchema7 } from './types.ts';
|
|
3
|
+
interface Visitor {
|
|
4
|
+
String?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
5
|
+
Integer?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
6
|
+
Boolean?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
7
|
+
Null?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
8
|
+
Number?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
9
|
+
Array?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
10
|
+
Object?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
11
|
+
AnyOf?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
12
|
+
AllOf?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
13
|
+
OneOf?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
14
|
+
$ref?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
15
|
+
Enum?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
16
|
+
RequenceType?: (schema: JSONSchema7) => JSONSchema7 | void;
|
|
17
|
+
}
|
|
18
|
+
export default function mapSchema<T extends JSONSchema7Definition>(rawSchema: T, visitor: Visitor): T;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=mapSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapSchema.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/jsonschema/mapSchema.ts"],"names":[],"mappings":"AAAA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AC,EACZ,OAAO,EAAE,OAAO,GACf,CAAC,CAuFH"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSONSchema7, JSONSchema7TypeName } from 'json-schema';
|
|
2
|
+
declare module 'json-schema' {
|
|
3
|
+
interface JSONSchema7 {
|
|
4
|
+
requenceType?: 'file' | 'stream';
|
|
5
|
+
maxByteLength?: number;
|
|
6
|
+
instanceOf?: string;
|
|
7
|
+
accept?: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type { JSONSchema7, JSONSchema7TypeName };
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/jsonschema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEnE,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,WAAW;QACnB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAChC,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB;CACF;AAED,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Ajv as BaseAjv, type KeywordDefinition, type Options } from 'ajv';
|
|
2
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
3
|
+
export declare class ValidationError extends Error {
|
|
4
|
+
readonly property?: string | undefined;
|
|
5
|
+
constructor(message: string, property?: string | undefined);
|
|
6
|
+
}
|
|
7
|
+
export declare const acceptKeyword: KeywordDefinition;
|
|
8
|
+
export declare const acceptKeywordEnforced: KeywordDefinition;
|
|
9
|
+
export declare const requenceTypeKeywords: KeywordDefinition;
|
|
10
|
+
export declare const instanceOfKeyword: KeywordDefinition;
|
|
11
|
+
export declare const maxByteLengthKeyword: KeywordDefinition;
|
|
12
|
+
export declare const maxByteLengthKeywordEnforced: KeywordDefinition;
|
|
13
|
+
export declare class Ajv extends BaseAjv {
|
|
14
|
+
constructor(options?: Options & {
|
|
15
|
+
enforeFileKeywords?: boolean;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export declare function validate<T extends JSONSchema7>(options: {
|
|
19
|
+
schema: T;
|
|
20
|
+
value: unknown;
|
|
21
|
+
property?: string;
|
|
22
|
+
allowAdditionalProperties?: boolean;
|
|
23
|
+
enforeFileKeywords?: boolean;
|
|
24
|
+
}): {
|
|
25
|
+
[x: string]: {};
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/jsonschema/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,IAAI,OAAO,EAEd,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACb,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAS9C,qBAAa,eAAgB,SAAQ,KAAK;aAGtB,QAAQ,CAAC,EAAE,MAAM;gBADjC,OAAO,EAAE,MAAM,EACC,QAAQ,CAAC,EAAE,MAAM,YAAA;CAIpC;AAED,eAAO,MAAM,aAAa,EAAE,iBAQ3B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,iBAkBnC,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAKlC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAkB/B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAOlC,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,iBAmB1C,CAAA;AAED,qBAAa,GAAI,SAAQ,OAAO;gBAClB,OAAO,CAAC,EAAE,OAAO,GAAG;QAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;KAAE;CAajE;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE;IACvD,MAAM,EAAE,CAAC,CAAA;IACT,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yBAAyB,CAAC,EAAE,OAAO,CAAA;IACnC,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;;EA6BA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { JSONSchema7 } from './types.ts';
|
|
3
|
+
export declare const jsonSchema7Schema: z.ZodType<JSONSchema7, z.ZodTypeDef, JSONSchema7>;
|
|
4
|
+
export declare const jsonSchema7ObjectSchema: z.ZodIntersection<z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<"object">;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
type: "object";
|
|
8
|
+
}, {
|
|
9
|
+
type: "object";
|
|
10
|
+
}>, z.ZodType<JSONSchema7, z.ZodTypeDef, JSONSchema7>>;
|
|
11
|
+
export declare const jsonSchema7NullSchema: z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<"null">;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
type: "null";
|
|
15
|
+
}, {
|
|
16
|
+
type: "null";
|
|
17
|
+
}>;
|
|
18
|
+
export type JSONSchema7Object = z.infer<typeof jsonSchema7ObjectSchema>;
|
|
19
|
+
export type JSONSchema7Null = z.infer<typeof jsonSchema7NullSchema>;
|
|
20
|
+
//# sourceMappingURL=zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/jsonschema/zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAG7C,eAAO,MAAM,iBAAiB,mDAM7B,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;;;sDAIX,CAAA;AAEzB,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AACvE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|