@nxtedition/types 23.0.21 → 23.0.22
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/app.d.ts +4 -0
- package/dist/app.js +25 -9
- package/dist/domains/media.d.ts +1 -0
- package/dist/domains/media.js +27 -10
- package/dist/domains/pipeline.d.ts +1 -0
- package/dist/domains/pipeline.js +43 -6
- package/dist/rpc.d.ts +3 -3
- package/dist/rpc.js +59 -50
- package/dist/schema.json +14 -0
- package/package.json +13 -13
package/dist/app.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ export declare const assertGuardElectronHubApiClipboard: __AssertionGuard<Electr
|
|
|
39
39
|
export declare const stringifyElectronHubApiClipboard: (input: ElectronHubApiClipboard) => string;
|
|
40
40
|
export declare const assertStringifyElectronHubApiClipboard: (input: unknown) => string;
|
|
41
41
|
export interface DownloadFileOptions {
|
|
42
|
+
/**
|
|
43
|
+
* Unique ID of the download, to be used to control and track the download progress.
|
|
44
|
+
*/
|
|
45
|
+
id?: string;
|
|
42
46
|
/**
|
|
43
47
|
* URL of the resource to download.
|
|
44
48
|
*/
|
package/dist/app.js
CHANGED
|
@@ -428,18 +428,22 @@ export const assertStringifyElectronHubApiClipboard = (input, errorFactory) => {
|
|
|
428
428
|
return $so0(input);
|
|
429
429
|
}; return stringify(assert(input, errorFactory)); };
|
|
430
430
|
export const isDownloadFileOptions = input => {
|
|
431
|
-
const $io0 = input => "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
431
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
432
432
|
return "object" === typeof input && null !== input && $io0(input);
|
|
433
433
|
};
|
|
434
434
|
export const assertDownloadFileOptions = (input, errorFactory) => {
|
|
435
435
|
const __is = input => {
|
|
436
|
-
const $io0 = input => "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
436
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
437
437
|
return "object" === typeof input && null !== input && $io0(input);
|
|
438
438
|
};
|
|
439
439
|
if (false === __is(input))
|
|
440
440
|
((input, _path, _exceptionable = true) => {
|
|
441
441
|
const $guard = __typia.createAssert.guard;
|
|
442
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.
|
|
442
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.id || "string" === typeof input.id || $guard(_exceptionable, {
|
|
443
|
+
path: _path + ".id",
|
|
444
|
+
expected: "(string | undefined)",
|
|
445
|
+
value: input.id
|
|
446
|
+
}, errorFactory)) && ("string" === typeof input.url || $guard(_exceptionable, {
|
|
443
447
|
path: _path + ".url",
|
|
444
448
|
expected: "string",
|
|
445
449
|
value: input.url
|
|
@@ -472,6 +476,10 @@ export const randomDownloadFileOptions = generator => {
|
|
|
472
476
|
const $generator = __typia.createRandom.generator;
|
|
473
477
|
const $pick = __typia.createRandom.pick;
|
|
474
478
|
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
479
|
+
id: $pick([
|
|
480
|
+
() => undefined,
|
|
481
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
482
|
+
])(),
|
|
475
483
|
url: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
476
484
|
filename: $pick([
|
|
477
485
|
() => undefined,
|
|
@@ -490,13 +498,17 @@ export const randomDownloadFileOptions = generator => {
|
|
|
490
498
|
};
|
|
491
499
|
export const assertGuardDownloadFileOptions = (input, errorFactory) => {
|
|
492
500
|
const __is = input => {
|
|
493
|
-
const $io0 = input => "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
501
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
494
502
|
return "object" === typeof input && null !== input && $io0(input);
|
|
495
503
|
};
|
|
496
504
|
if (false === __is(input))
|
|
497
505
|
((input, _path, _exceptionable = true) => {
|
|
498
506
|
const $guard = __typia.createAssertGuard.guard;
|
|
499
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.
|
|
507
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.id || "string" === typeof input.id || $guard(_exceptionable, {
|
|
508
|
+
path: _path + ".id",
|
|
509
|
+
expected: "(string | undefined)",
|
|
510
|
+
value: input.id
|
|
511
|
+
}, errorFactory)) && ("string" === typeof input.url || $guard(_exceptionable, {
|
|
500
512
|
path: _path + ".url",
|
|
501
513
|
expected: "string",
|
|
502
514
|
value: input.url
|
|
@@ -526,18 +538,22 @@ export const assertGuardDownloadFileOptions = (input, errorFactory) => {
|
|
|
526
538
|
};
|
|
527
539
|
export const stringifyDownloadFileOptions = input => {
|
|
528
540
|
const $string = __typia.json.createStringify.string;
|
|
529
|
-
const $so0 = input => `{${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}"url":${$string(input.url)}}`;
|
|
541
|
+
const $so0 = input => `{${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}"url":${$string(input.url)}}`;
|
|
530
542
|
return $so0(input);
|
|
531
543
|
};
|
|
532
544
|
export const assertStringifyDownloadFileOptions = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
533
545
|
const __is = input => {
|
|
534
|
-
const $io0 = input => "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
546
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
535
547
|
return "object" === typeof input && null !== input && $io0(input);
|
|
536
548
|
};
|
|
537
549
|
if (false === __is(input))
|
|
538
550
|
((input, _path, _exceptionable = true) => {
|
|
539
551
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
540
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.
|
|
552
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.id || "string" === typeof input.id || $guard(_exceptionable, {
|
|
553
|
+
path: _path + ".id",
|
|
554
|
+
expected: "(string | undefined)",
|
|
555
|
+
value: input.id
|
|
556
|
+
}, errorFactory)) && ("string" === typeof input.url || $guard(_exceptionable, {
|
|
541
557
|
path: _path + ".url",
|
|
542
558
|
expected: "string",
|
|
543
559
|
value: input.url
|
|
@@ -567,6 +583,6 @@ export const assertStringifyDownloadFileOptions = (input, errorFactory) => { con
|
|
|
567
583
|
return input;
|
|
568
584
|
}; const stringify = input => {
|
|
569
585
|
const $string = __typia.json.createAssertStringify.string;
|
|
570
|
-
const $so0 = input => `{${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}"url":${$string(input.url)}}`;
|
|
586
|
+
const $so0 = input => `{${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}"url":${$string(input.url)}}`;
|
|
571
587
|
return $so0(input);
|
|
572
588
|
}; return stringify(assert(input, errorFactory)); };
|
package/dist/domains/media.d.ts
CHANGED
|
@@ -117,6 +117,7 @@ export declare const assertGuardMediaRestrictionsRecord: __AssertionGuard<MediaR
|
|
|
117
117
|
export declare const stringifyMediaRestrictionsRecord: (input: MediaRestrictionsRecord) => string;
|
|
118
118
|
export declare const assertStringifyMediaRestrictionsRecord: (input: unknown) => string;
|
|
119
119
|
export interface MediaProbeRecord {
|
|
120
|
+
duration?: number | null;
|
|
120
121
|
error: NxtError | null;
|
|
121
122
|
type: MediaType;
|
|
122
123
|
}
|
package/dist/domains/media.js
CHANGED
|
@@ -3028,7 +3028,7 @@ export const assertStringifyMediaRestrictionsRecord = (input, errorFactory) => {
|
|
|
3028
3028
|
return $so0(input);
|
|
3029
3029
|
}; return stringify(assert(input, errorFactory)); };
|
|
3030
3030
|
export const isMediaProbeRecord = input => {
|
|
3031
|
-
const $io0 = input => (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3031
|
+
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3032
3032
|
const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3033
3033
|
const $io2 = input => Object.keys(input).every(key => {
|
|
3034
3034
|
const value = input[key];
|
|
@@ -3041,7 +3041,7 @@ export const isMediaProbeRecord = input => {
|
|
|
3041
3041
|
};
|
|
3042
3042
|
export const assertMediaProbeRecord = (input, errorFactory) => {
|
|
3043
3043
|
const __is = input => {
|
|
3044
|
-
const $io0 = input => (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3044
|
+
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3045
3045
|
const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3046
3046
|
const $io2 = input => Object.keys(input).every(key => {
|
|
3047
3047
|
const value = input[key];
|
|
@@ -3056,7 +3056,11 @@ export const assertMediaProbeRecord = (input, errorFactory) => {
|
|
|
3056
3056
|
((input, _path, _exceptionable = true) => {
|
|
3057
3057
|
const $guard = __typia.createAssert.guard;
|
|
3058
3058
|
const $join = __typia.createAssert.join;
|
|
3059
|
-
const $ao0 = (input, _path, _exceptionable = true) => (null === input.
|
|
3059
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.duration || undefined === input.duration || "number" === typeof input.duration || $guard(_exceptionable, {
|
|
3060
|
+
path: _path + ".duration",
|
|
3061
|
+
expected: "(null | number | undefined)",
|
|
3062
|
+
value: input.duration
|
|
3063
|
+
}, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
|
|
3060
3064
|
path: _path + ".error",
|
|
3061
3065
|
expected: "(NxtError | null)",
|
|
3062
3066
|
value: input.error
|
|
@@ -3158,9 +3162,14 @@ export const assertMediaProbeRecord = (input, errorFactory) => {
|
|
|
3158
3162
|
return input;
|
|
3159
3163
|
};
|
|
3160
3164
|
export const randomMediaProbeRecord = generator => {
|
|
3161
|
-
const $pick = __typia.createRandom.pick;
|
|
3162
3165
|
const $generator = __typia.createRandom.generator;
|
|
3166
|
+
const $pick = __typia.createRandom.pick;
|
|
3163
3167
|
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
3168
|
+
duration: $pick([
|
|
3169
|
+
() => undefined,
|
|
3170
|
+
() => null,
|
|
3171
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
3172
|
+
])(),
|
|
3164
3173
|
error: $pick([
|
|
3165
3174
|
() => null,
|
|
3166
3175
|
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
@@ -3222,7 +3231,7 @@ export const randomMediaProbeRecord = generator => {
|
|
|
3222
3231
|
};
|
|
3223
3232
|
export const assertGuardMediaProbeRecord = (input, errorFactory) => {
|
|
3224
3233
|
const __is = input => {
|
|
3225
|
-
const $io0 = input => (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3234
|
+
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3226
3235
|
const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3227
3236
|
const $io2 = input => Object.keys(input).every(key => {
|
|
3228
3237
|
const value = input[key];
|
|
@@ -3237,7 +3246,11 @@ export const assertGuardMediaProbeRecord = (input, errorFactory) => {
|
|
|
3237
3246
|
((input, _path, _exceptionable = true) => {
|
|
3238
3247
|
const $guard = __typia.createAssertGuard.guard;
|
|
3239
3248
|
const $join = __typia.createAssertGuard.join;
|
|
3240
|
-
const $ao0 = (input, _path, _exceptionable = true) => (null === input.
|
|
3249
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.duration || undefined === input.duration || "number" === typeof input.duration || $guard(_exceptionable, {
|
|
3250
|
+
path: _path + ".duration",
|
|
3251
|
+
expected: "(null | number | undefined)",
|
|
3252
|
+
value: input.duration
|
|
3253
|
+
}, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
|
|
3241
3254
|
path: _path + ".error",
|
|
3242
3255
|
expected: "(NxtError | null)",
|
|
3243
3256
|
value: input.error
|
|
@@ -3348,7 +3361,7 @@ export const stringifyMediaProbeRecord = input => {
|
|
|
3348
3361
|
const $io3 = input => true;
|
|
3349
3362
|
const $string = __typia.json.createStringify.string;
|
|
3350
3363
|
const $throws = __typia.json.createStringify.throws;
|
|
3351
|
-
const $so0 = input => `{"error":${null !== input.error ? $so1(input.error) : "null"},"type":${(() => {
|
|
3364
|
+
const $so0 = input => `{${undefined === input.duration ? "" : `"duration":${undefined !== input.duration ? null !== input.duration ? input.duration : "null" : undefined},`}"error":${null !== input.error ? $so1(input.error) : "null"},"type":${(() => {
|
|
3352
3365
|
if ("string" === typeof input.type)
|
|
3353
3366
|
return $string(input.type);
|
|
3354
3367
|
if ("string" === typeof input.type)
|
|
@@ -3365,7 +3378,7 @@ export const stringifyMediaProbeRecord = input => {
|
|
|
3365
3378
|
};
|
|
3366
3379
|
export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
3367
3380
|
const __is = input => {
|
|
3368
|
-
const $io0 = input => (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3381
|
+
const $io0 = input => (null === input.duration || undefined === input.duration || "number" === typeof input.duration && !Number.isNaN(input.duration)) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3369
3382
|
const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3370
3383
|
const $io2 = input => Object.keys(input).every(key => {
|
|
3371
3384
|
const value = input[key];
|
|
@@ -3380,7 +3393,11 @@ export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const
|
|
|
3380
3393
|
((input, _path, _exceptionable = true) => {
|
|
3381
3394
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
3382
3395
|
const $join = __typia.json.createAssertStringify.join;
|
|
3383
|
-
const $ao0 = (input, _path, _exceptionable = true) => (null === input.
|
|
3396
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.duration || undefined === input.duration || "number" === typeof input.duration && !Number.isNaN(input.duration) || $guard(_exceptionable, {
|
|
3397
|
+
path: _path + ".duration",
|
|
3398
|
+
expected: "(null | number | undefined)",
|
|
3399
|
+
value: input.duration
|
|
3400
|
+
}, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
|
|
3384
3401
|
path: _path + ".error",
|
|
3385
3402
|
expected: "(NxtError | null)",
|
|
3386
3403
|
value: input.error
|
|
@@ -3491,7 +3508,7 @@ export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const
|
|
|
3491
3508
|
const $io3 = input => true;
|
|
3492
3509
|
const $string = __typia.json.createAssertStringify.string;
|
|
3493
3510
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
3494
|
-
const $so0 = input => `{"error":${null !== input.error ? $so1(input.error) : "null"},"type":${(() => {
|
|
3511
|
+
const $so0 = input => `{${undefined === input.duration ? "" : `"duration":${undefined !== input.duration ? null !== input.duration ? input.duration : "null" : undefined},`}"error":${null !== input.error ? $so1(input.error) : "null"},"type":${(() => {
|
|
3495
3512
|
if ("string" === typeof input.type)
|
|
3496
3513
|
return $string(input.type);
|
|
3497
3514
|
if ("string" === typeof input.type)
|
package/dist/domains/pipeline.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isPipelineDomainRecord = input => {
|
|
3
|
-
const $io0 = input => (undefined === input.dummy || "boolean" === typeof input.dummy) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.color || "string" === typeof input.color) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.type || "string" === typeof input.type) && (undefined === input.bookmarkId || "string" === typeof input.bookmarkId) && (undefined === input.hiddenCreateMenuItems || "object" === typeof input.hiddenCreateMenuItems && null !== input.hiddenCreateMenuItems && false === Array.isArray(input.hiddenCreateMenuItems) && $io1(input.hiddenCreateMenuItems));
|
|
3
|
+
const $io0 = input => (undefined === input.dummy || "boolean" === typeof input.dummy) && (undefined === input.assetType || "pipeline" === input.assetType || "collection" === input.assetType) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.color || "string" === typeof input.color) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.type || "string" === typeof input.type) && (undefined === input.bookmarkId || "string" === typeof input.bookmarkId) && (undefined === input.hiddenCreateMenuItems || "object" === typeof input.hiddenCreateMenuItems && null !== input.hiddenCreateMenuItems && false === Array.isArray(input.hiddenCreateMenuItems) && $io1(input.hiddenCreateMenuItems));
|
|
4
4
|
const $io1 = input => Object.keys(input).every(key => {
|
|
5
5
|
const value = input[key];
|
|
6
6
|
if (undefined === value)
|
|
@@ -11,7 +11,7 @@ export const isPipelineDomainRecord = input => {
|
|
|
11
11
|
};
|
|
12
12
|
export const assertPipelineDomainRecord = (input, errorFactory) => {
|
|
13
13
|
const __is = input => {
|
|
14
|
-
const $io0 = input => (undefined === input.dummy || "boolean" === typeof input.dummy) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.color || "string" === typeof input.color) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.type || "string" === typeof input.type) && (undefined === input.bookmarkId || "string" === typeof input.bookmarkId) && (undefined === input.hiddenCreateMenuItems || "object" === typeof input.hiddenCreateMenuItems && null !== input.hiddenCreateMenuItems && false === Array.isArray(input.hiddenCreateMenuItems) && $io1(input.hiddenCreateMenuItems));
|
|
14
|
+
const $io0 = input => (undefined === input.dummy || "boolean" === typeof input.dummy) && (undefined === input.assetType || "pipeline" === input.assetType || "collection" === input.assetType) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.color || "string" === typeof input.color) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.type || "string" === typeof input.type) && (undefined === input.bookmarkId || "string" === typeof input.bookmarkId) && (undefined === input.hiddenCreateMenuItems || "object" === typeof input.hiddenCreateMenuItems && null !== input.hiddenCreateMenuItems && false === Array.isArray(input.hiddenCreateMenuItems) && $io1(input.hiddenCreateMenuItems));
|
|
15
15
|
const $io1 = input => Object.keys(input).every(key => {
|
|
16
16
|
const value = input[key];
|
|
17
17
|
if (undefined === value)
|
|
@@ -28,6 +28,10 @@ export const assertPipelineDomainRecord = (input, errorFactory) => {
|
|
|
28
28
|
path: _path + ".dummy",
|
|
29
29
|
expected: "(boolean | undefined)",
|
|
30
30
|
value: input.dummy
|
|
31
|
+
}, errorFactory)) && (undefined === input.assetType || "pipeline" === input.assetType || "collection" === input.assetType || $guard(_exceptionable, {
|
|
32
|
+
path: _path + ".assetType",
|
|
33
|
+
expected: "(\"collection\" | \"pipeline\" | undefined)",
|
|
34
|
+
value: input.assetType
|
|
31
35
|
}, errorFactory)) && (undefined === input.preset || "string" === typeof input.preset || $guard(_exceptionable, {
|
|
32
36
|
path: _path + ".preset",
|
|
33
37
|
expected: "(string | undefined)",
|
|
@@ -91,6 +95,11 @@ export const randomPipelineDomainRecord = generator => {
|
|
|
91
95
|
() => undefined,
|
|
92
96
|
() => (generator?.boolean ?? $generator.boolean)()
|
|
93
97
|
])(),
|
|
98
|
+
assetType: $pick([
|
|
99
|
+
() => undefined,
|
|
100
|
+
() => "pipeline",
|
|
101
|
+
() => "collection"
|
|
102
|
+
])(),
|
|
94
103
|
preset: $pick([
|
|
95
104
|
() => undefined,
|
|
96
105
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
@@ -125,7 +134,7 @@ export const randomPipelineDomainRecord = generator => {
|
|
|
125
134
|
};
|
|
126
135
|
export const assertGuardPipelineDomainRecord = (input, errorFactory) => {
|
|
127
136
|
const __is = input => {
|
|
128
|
-
const $io0 = input => (undefined === input.dummy || "boolean" === typeof input.dummy) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.color || "string" === typeof input.color) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.type || "string" === typeof input.type) && (undefined === input.bookmarkId || "string" === typeof input.bookmarkId) && (undefined === input.hiddenCreateMenuItems || "object" === typeof input.hiddenCreateMenuItems && null !== input.hiddenCreateMenuItems && false === Array.isArray(input.hiddenCreateMenuItems) && $io1(input.hiddenCreateMenuItems));
|
|
137
|
+
const $io0 = input => (undefined === input.dummy || "boolean" === typeof input.dummy) && (undefined === input.assetType || "pipeline" === input.assetType || "collection" === input.assetType) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.color || "string" === typeof input.color) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.type || "string" === typeof input.type) && (undefined === input.bookmarkId || "string" === typeof input.bookmarkId) && (undefined === input.hiddenCreateMenuItems || "object" === typeof input.hiddenCreateMenuItems && null !== input.hiddenCreateMenuItems && false === Array.isArray(input.hiddenCreateMenuItems) && $io1(input.hiddenCreateMenuItems));
|
|
129
138
|
const $io1 = input => Object.keys(input).every(key => {
|
|
130
139
|
const value = input[key];
|
|
131
140
|
if (undefined === value)
|
|
@@ -142,6 +151,10 @@ export const assertGuardPipelineDomainRecord = (input, errorFactory) => {
|
|
|
142
151
|
path: _path + ".dummy",
|
|
143
152
|
expected: "(boolean | undefined)",
|
|
144
153
|
value: input.dummy
|
|
154
|
+
}, errorFactory)) && (undefined === input.assetType || "pipeline" === input.assetType || "collection" === input.assetType || $guard(_exceptionable, {
|
|
155
|
+
path: _path + ".assetType",
|
|
156
|
+
expected: "(\"collection\" | \"pipeline\" | undefined)",
|
|
157
|
+
value: input.assetType
|
|
145
158
|
}, errorFactory)) && (undefined === input.preset || "string" === typeof input.preset || $guard(_exceptionable, {
|
|
146
159
|
path: _path + ".preset",
|
|
147
160
|
expected: "(string | undefined)",
|
|
@@ -204,15 +217,25 @@ export const stringifyPipelineDomainRecord = input => {
|
|
|
204
217
|
return true;
|
|
205
218
|
});
|
|
206
219
|
const $string = __typia.json.createStringify.string;
|
|
220
|
+
const $throws = __typia.json.createStringify.throws;
|
|
207
221
|
const $tail = __typia.json.createStringify.tail;
|
|
208
|
-
const $so0 = input => `{${$tail(`${undefined === input.dummy ? "" : `"dummy":${undefined !== input.dummy ? input.dummy : undefined},`}${undefined === input.
|
|
222
|
+
const $so0 = input => `{${$tail(`${undefined === input.dummy ? "" : `"dummy":${undefined !== input.dummy ? input.dummy : undefined},`}${undefined === input.assetType ? "" : `"assetType":${undefined !== input.assetType ? (() => {
|
|
223
|
+
if ("string" === typeof input.assetType)
|
|
224
|
+
return $string(input.assetType);
|
|
225
|
+
if ("string" === typeof input.assetType)
|
|
226
|
+
return "\"" + input.assetType + "\"";
|
|
227
|
+
$throws({
|
|
228
|
+
expected: "(\"collection\" | \"pipeline\" | undefined)",
|
|
229
|
+
value: input.assetType
|
|
230
|
+
});
|
|
231
|
+
})() : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.color ? "" : `"color":${undefined !== input.color ? $string(input.color) : undefined},`}${undefined === input.tags ? "" : `"tags":${undefined !== input.tags ? `[${input.tags.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.bookmarkId ? "" : `"bookmarkId":${undefined !== input.bookmarkId ? $string(input.bookmarkId) : undefined},`}${undefined === input.hiddenCreateMenuItems ? "" : `"hiddenCreateMenuItems":${undefined !== input.hiddenCreateMenuItems ? $so1(input.hiddenCreateMenuItems) : undefined}`}`)}}`;
|
|
209
232
|
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
210
233
|
return ""; return `${JSON.stringify(key)}:${undefined !== value ? JSON.stringify(value) : undefined}`; }).filter(str => "" !== str).join(",")}}`;
|
|
211
234
|
return $so0(input);
|
|
212
235
|
};
|
|
213
236
|
export const assertStringifyPipelineDomainRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
214
237
|
const __is = input => {
|
|
215
|
-
const $io0 = input => (undefined === input.dummy || "boolean" === typeof input.dummy) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.color || "string" === typeof input.color) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.type || "string" === typeof input.type) && (undefined === input.bookmarkId || "string" === typeof input.bookmarkId) && (undefined === input.hiddenCreateMenuItems || "object" === typeof input.hiddenCreateMenuItems && null !== input.hiddenCreateMenuItems && false === Array.isArray(input.hiddenCreateMenuItems) && $io1(input.hiddenCreateMenuItems));
|
|
238
|
+
const $io0 = input => (undefined === input.dummy || "boolean" === typeof input.dummy) && (undefined === input.assetType || "pipeline" === input.assetType || "collection" === input.assetType) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.color || "string" === typeof input.color) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.type || "string" === typeof input.type) && (undefined === input.bookmarkId || "string" === typeof input.bookmarkId) && (undefined === input.hiddenCreateMenuItems || "object" === typeof input.hiddenCreateMenuItems && null !== input.hiddenCreateMenuItems && false === Array.isArray(input.hiddenCreateMenuItems) && $io1(input.hiddenCreateMenuItems));
|
|
216
239
|
const $io1 = input => Object.keys(input).every(key => {
|
|
217
240
|
const value = input[key];
|
|
218
241
|
if (undefined === value)
|
|
@@ -229,6 +252,10 @@ export const assertStringifyPipelineDomainRecord = (input, errorFactory) => { co
|
|
|
229
252
|
path: _path + ".dummy",
|
|
230
253
|
expected: "(boolean | undefined)",
|
|
231
254
|
value: input.dummy
|
|
255
|
+
}, errorFactory)) && (undefined === input.assetType || "pipeline" === input.assetType || "collection" === input.assetType || $guard(_exceptionable, {
|
|
256
|
+
path: _path + ".assetType",
|
|
257
|
+
expected: "(\"collection\" | \"pipeline\" | undefined)",
|
|
258
|
+
value: input.assetType
|
|
232
259
|
}, errorFactory)) && (undefined === input.preset || "string" === typeof input.preset || $guard(_exceptionable, {
|
|
233
260
|
path: _path + ".preset",
|
|
234
261
|
expected: "(string | undefined)",
|
|
@@ -291,8 +318,18 @@ export const assertStringifyPipelineDomainRecord = (input, errorFactory) => { co
|
|
|
291
318
|
return true;
|
|
292
319
|
});
|
|
293
320
|
const $string = __typia.json.createAssertStringify.string;
|
|
321
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
294
322
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
295
|
-
const $so0 = input => `{${$tail(`${undefined === input.dummy ? "" : `"dummy":${undefined !== input.dummy ? input.dummy : undefined},`}${undefined === input.
|
|
323
|
+
const $so0 = input => `{${$tail(`${undefined === input.dummy ? "" : `"dummy":${undefined !== input.dummy ? input.dummy : undefined},`}${undefined === input.assetType ? "" : `"assetType":${undefined !== input.assetType ? (() => {
|
|
324
|
+
if ("string" === typeof input.assetType)
|
|
325
|
+
return $string(input.assetType);
|
|
326
|
+
if ("string" === typeof input.assetType)
|
|
327
|
+
return "\"" + input.assetType + "\"";
|
|
328
|
+
$throws({
|
|
329
|
+
expected: "(\"collection\" | \"pipeline\" | undefined)",
|
|
330
|
+
value: input.assetType
|
|
331
|
+
});
|
|
332
|
+
})() : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.color ? "" : `"color":${undefined !== input.color ? $string(input.color) : undefined},`}${undefined === input.tags ? "" : `"tags":${undefined !== input.tags ? `[${input.tags.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.bookmarkId ? "" : `"bookmarkId":${undefined !== input.bookmarkId ? $string(input.bookmarkId) : undefined},`}${undefined === input.hiddenCreateMenuItems ? "" : `"hiddenCreateMenuItems":${undefined !== input.hiddenCreateMenuItems ? $so1(input.hiddenCreateMenuItems) : undefined}`}`)}}`;
|
|
296
333
|
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
297
334
|
return ""; return `${JSON.stringify(key)}:${undefined !== value ? JSON.stringify(value) : undefined}`; }).filter(str => "" !== str).join(",")}}`;
|
|
298
335
|
return $so0(input);
|
package/dist/rpc.d.ts
CHANGED
|
@@ -45,11 +45,11 @@ export declare const stringifyNxtImportMode: (input: NxtImportMode) => string;
|
|
|
45
45
|
export declare const assertStringifyNxtImportMode: (input: unknown) => string;
|
|
46
46
|
export interface NxtExport {
|
|
47
47
|
version: number;
|
|
48
|
-
date
|
|
49
|
-
root
|
|
48
|
+
date?: string;
|
|
49
|
+
root?: string[];
|
|
50
50
|
assets: {
|
|
51
51
|
[assetId: string]: {
|
|
52
|
-
_children
|
|
52
|
+
_children?: string[];
|
|
53
53
|
[domain: string]: unknown;
|
|
54
54
|
};
|
|
55
55
|
};
|
package/dist/rpc.js
CHANGED
|
@@ -81,14 +81,14 @@ export const assertStringifyNxtImportMode = (input, errorFactory) => { const ass
|
|
|
81
81
|
})();
|
|
82
82
|
}; return stringify(assert(input, errorFactory)); };
|
|
83
83
|
export const isNxtExport = input => {
|
|
84
|
-
const $io0 = input => "number" === typeof input.version && "string" === typeof input.date && (Array.isArray(input.root) && input.root.every(elem => "string" === typeof elem)) && ("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) && $io1(input.assets)) && (undefined === input.files || Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem));
|
|
84
|
+
const $io0 = input => "number" === typeof input.version && (undefined === input.date || "string" === typeof input.date) && (undefined === input.root || Array.isArray(input.root) && input.root.every(elem => "string" === typeof elem)) && ("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) && $io1(input.assets)) && (undefined === input.files || Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem));
|
|
85
85
|
const $io1 = input => Object.keys(input).every(key => {
|
|
86
86
|
const value = input[key];
|
|
87
87
|
if (undefined === value)
|
|
88
88
|
return true;
|
|
89
|
-
return "object" === typeof value && null !== value && $io2(value);
|
|
89
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io2(value);
|
|
90
90
|
});
|
|
91
|
-
const $io2 = input => Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem) && Object.keys(input).every(key => {
|
|
91
|
+
const $io2 = input => (undefined === input._children || Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem)) && Object.keys(input).every(key => {
|
|
92
92
|
if (["_children"].some(prop => key === prop))
|
|
93
93
|
return true;
|
|
94
94
|
const value = input[key];
|
|
@@ -100,14 +100,14 @@ export const isNxtExport = input => {
|
|
|
100
100
|
};
|
|
101
101
|
export const assertNxtExport = (input, errorFactory) => {
|
|
102
102
|
const __is = input => {
|
|
103
|
-
const $io0 = input => "number" === typeof input.version && "string" === typeof input.date && (Array.isArray(input.root) && input.root.every(elem => "string" === typeof elem)) && ("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) && $io1(input.assets)) && (undefined === input.files || Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem));
|
|
103
|
+
const $io0 = input => "number" === typeof input.version && (undefined === input.date || "string" === typeof input.date) && (undefined === input.root || Array.isArray(input.root) && input.root.every(elem => "string" === typeof elem)) && ("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) && $io1(input.assets)) && (undefined === input.files || Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem));
|
|
104
104
|
const $io1 = input => Object.keys(input).every(key => {
|
|
105
105
|
const value = input[key];
|
|
106
106
|
if (undefined === value)
|
|
107
107
|
return true;
|
|
108
|
-
return "object" === typeof value && null !== value && $io2(value);
|
|
108
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io2(value);
|
|
109
109
|
});
|
|
110
|
-
const $io2 = input => Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem) && Object.keys(input).every(key => {
|
|
110
|
+
const $io2 = input => (undefined === input._children || Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem)) && Object.keys(input).every(key => {
|
|
111
111
|
if (["_children"].some(prop => key === prop))
|
|
112
112
|
return true;
|
|
113
113
|
const value = input[key];
|
|
@@ -125,13 +125,13 @@ export const assertNxtExport = (input, errorFactory) => {
|
|
|
125
125
|
path: _path + ".version",
|
|
126
126
|
expected: "number",
|
|
127
127
|
value: input.version
|
|
128
|
-
}, errorFactory)) && ("string" === typeof input.date || $guard(_exceptionable, {
|
|
128
|
+
}, errorFactory)) && (undefined === input.date || "string" === typeof input.date || $guard(_exceptionable, {
|
|
129
129
|
path: _path + ".date",
|
|
130
|
-
expected: "string",
|
|
130
|
+
expected: "(string | undefined)",
|
|
131
131
|
value: input.date
|
|
132
|
-
}, errorFactory)) && ((Array.isArray(input.root) || $guard(_exceptionable, {
|
|
132
|
+
}, errorFactory)) && (undefined === input.root || (Array.isArray(input.root) || $guard(_exceptionable, {
|
|
133
133
|
path: _path + ".root",
|
|
134
|
-
expected: "Array<string>",
|
|
134
|
+
expected: "(Array<string> | undefined)",
|
|
135
135
|
value: input.root
|
|
136
136
|
}, errorFactory)) && input.root.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
137
137
|
path: _path + ".root[" + _index1 + "]",
|
|
@@ -139,7 +139,7 @@ export const assertNxtExport = (input, errorFactory) => {
|
|
|
139
139
|
value: elem
|
|
140
140
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
141
141
|
path: _path + ".root",
|
|
142
|
-
expected: "Array<string>",
|
|
142
|
+
expected: "(Array<string> | undefined)",
|
|
143
143
|
value: input.root
|
|
144
144
|
}, errorFactory)) && (("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) || $guard(_exceptionable, {
|
|
145
145
|
path: _path + ".assets",
|
|
@@ -166,7 +166,7 @@ export const assertNxtExport = (input, errorFactory) => {
|
|
|
166
166
|
const value = input[key];
|
|
167
167
|
if (undefined === value)
|
|
168
168
|
return true;
|
|
169
|
-
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
169
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
170
170
|
path: _path + $join(key),
|
|
171
171
|
expected: "__type.o1",
|
|
172
172
|
value: value
|
|
@@ -176,9 +176,9 @@ export const assertNxtExport = (input, errorFactory) => {
|
|
|
176
176
|
value: value
|
|
177
177
|
}, errorFactory);
|
|
178
178
|
});
|
|
179
|
-
const $ao2 = (input, _path, _exceptionable = true) => ((Array.isArray(input._children) || $guard(_exceptionable, {
|
|
179
|
+
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input._children || (Array.isArray(input._children) || $guard(_exceptionable, {
|
|
180
180
|
path: _path + "._children",
|
|
181
|
-
expected: "Array<string>",
|
|
181
|
+
expected: "(Array<string> | undefined)",
|
|
182
182
|
value: input._children
|
|
183
183
|
}, errorFactory)) && input._children.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
|
|
184
184
|
path: _path + "._children[" + _index3 + "]",
|
|
@@ -186,7 +186,7 @@ export const assertNxtExport = (input, errorFactory) => {
|
|
|
186
186
|
value: elem
|
|
187
187
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
188
188
|
path: _path + "._children",
|
|
189
|
-
expected: "Array<string>",
|
|
189
|
+
expected: "(Array<string> | undefined)",
|
|
190
190
|
value: input._children
|
|
191
191
|
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
192
192
|
if (["_children"].some(prop => key === prop))
|
|
@@ -213,8 +213,14 @@ export const randomNxtExport = generator => {
|
|
|
213
213
|
const $pick = __typia.createRandom.pick;
|
|
214
214
|
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
215
215
|
version: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
216
|
-
date:
|
|
217
|
-
|
|
216
|
+
date: $pick([
|
|
217
|
+
() => undefined,
|
|
218
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
219
|
+
])(),
|
|
220
|
+
root: $pick([
|
|
221
|
+
() => undefined,
|
|
222
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
223
|
+
])(),
|
|
218
224
|
assets: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
|
|
219
225
|
files: $pick([
|
|
220
226
|
() => undefined,
|
|
@@ -228,7 +234,10 @@ export const randomNxtExport = generator => {
|
|
|
228
234
|
};
|
|
229
235
|
const $ro2 = (_recursive = false, _depth = 0) => {
|
|
230
236
|
const output = {
|
|
231
|
-
_children:
|
|
237
|
+
_children: $pick([
|
|
238
|
+
() => undefined,
|
|
239
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
240
|
+
])()
|
|
232
241
|
};
|
|
233
242
|
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = "any type used...", (generator?.integer ?? $generator.integer)(0, 3));
|
|
234
243
|
return output;
|
|
@@ -237,14 +246,14 @@ export const randomNxtExport = generator => {
|
|
|
237
246
|
};
|
|
238
247
|
export const assertGuardNxtExport = (input, errorFactory) => {
|
|
239
248
|
const __is = input => {
|
|
240
|
-
const $io0 = input => "number" === typeof input.version && "string" === typeof input.date && (Array.isArray(input.root) && input.root.every(elem => "string" === typeof elem)) && ("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) && $io1(input.assets)) && (undefined === input.files || Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem));
|
|
249
|
+
const $io0 = input => "number" === typeof input.version && (undefined === input.date || "string" === typeof input.date) && (undefined === input.root || Array.isArray(input.root) && input.root.every(elem => "string" === typeof elem)) && ("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) && $io1(input.assets)) && (undefined === input.files || Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem));
|
|
241
250
|
const $io1 = input => Object.keys(input).every(key => {
|
|
242
251
|
const value = input[key];
|
|
243
252
|
if (undefined === value)
|
|
244
253
|
return true;
|
|
245
|
-
return "object" === typeof value && null !== value && $io2(value);
|
|
254
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io2(value);
|
|
246
255
|
});
|
|
247
|
-
const $io2 = input => Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem) && Object.keys(input).every(key => {
|
|
256
|
+
const $io2 = input => (undefined === input._children || Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem)) && Object.keys(input).every(key => {
|
|
248
257
|
if (["_children"].some(prop => key === prop))
|
|
249
258
|
return true;
|
|
250
259
|
const value = input[key];
|
|
@@ -262,13 +271,13 @@ export const assertGuardNxtExport = (input, errorFactory) => {
|
|
|
262
271
|
path: _path + ".version",
|
|
263
272
|
expected: "number",
|
|
264
273
|
value: input.version
|
|
265
|
-
}, errorFactory)) && ("string" === typeof input.date || $guard(_exceptionable, {
|
|
274
|
+
}, errorFactory)) && (undefined === input.date || "string" === typeof input.date || $guard(_exceptionable, {
|
|
266
275
|
path: _path + ".date",
|
|
267
|
-
expected: "string",
|
|
276
|
+
expected: "(string | undefined)",
|
|
268
277
|
value: input.date
|
|
269
|
-
}, errorFactory)) && ((Array.isArray(input.root) || $guard(_exceptionable, {
|
|
278
|
+
}, errorFactory)) && (undefined === input.root || (Array.isArray(input.root) || $guard(_exceptionable, {
|
|
270
279
|
path: _path + ".root",
|
|
271
|
-
expected: "Array<string>",
|
|
280
|
+
expected: "(Array<string> | undefined)",
|
|
272
281
|
value: input.root
|
|
273
282
|
}, errorFactory)) && input.root.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
274
283
|
path: _path + ".root[" + _index1 + "]",
|
|
@@ -276,7 +285,7 @@ export const assertGuardNxtExport = (input, errorFactory) => {
|
|
|
276
285
|
value: elem
|
|
277
286
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
278
287
|
path: _path + ".root",
|
|
279
|
-
expected: "Array<string>",
|
|
288
|
+
expected: "(Array<string> | undefined)",
|
|
280
289
|
value: input.root
|
|
281
290
|
}, errorFactory)) && (("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) || $guard(_exceptionable, {
|
|
282
291
|
path: _path + ".assets",
|
|
@@ -303,7 +312,7 @@ export const assertGuardNxtExport = (input, errorFactory) => {
|
|
|
303
312
|
const value = input[key];
|
|
304
313
|
if (undefined === value)
|
|
305
314
|
return true;
|
|
306
|
-
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
315
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
307
316
|
path: _path + $join(key),
|
|
308
317
|
expected: "__type.o1",
|
|
309
318
|
value: value
|
|
@@ -313,9 +322,9 @@ export const assertGuardNxtExport = (input, errorFactory) => {
|
|
|
313
322
|
value: value
|
|
314
323
|
}, errorFactory);
|
|
315
324
|
});
|
|
316
|
-
const $ao2 = (input, _path, _exceptionable = true) => ((Array.isArray(input._children) || $guard(_exceptionable, {
|
|
325
|
+
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input._children || (Array.isArray(input._children) || $guard(_exceptionable, {
|
|
317
326
|
path: _path + "._children",
|
|
318
|
-
expected: "Array<string>",
|
|
327
|
+
expected: "(Array<string> | undefined)",
|
|
319
328
|
value: input._children
|
|
320
329
|
}, errorFactory)) && input._children.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
|
|
321
330
|
path: _path + "._children[" + _index3 + "]",
|
|
@@ -323,7 +332,7 @@ export const assertGuardNxtExport = (input, errorFactory) => {
|
|
|
323
332
|
value: elem
|
|
324
333
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
325
334
|
path: _path + "._children",
|
|
326
|
-
expected: "Array<string>",
|
|
335
|
+
expected: "(Array<string> | undefined)",
|
|
327
336
|
value: input._children
|
|
328
337
|
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
329
338
|
if (["_children"].some(prop => key === prop))
|
|
@@ -349,9 +358,9 @@ export const stringifyNxtExport = input => {
|
|
|
349
358
|
const value = input[key];
|
|
350
359
|
if (undefined === value)
|
|
351
360
|
return true;
|
|
352
|
-
return "object" === typeof value && null !== value && $io2(value);
|
|
361
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io2(value);
|
|
353
362
|
});
|
|
354
|
-
const $io2 = input => Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem) && Object.keys(input).every(key => {
|
|
363
|
+
const $io2 = input => (undefined === input._children || Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem)) && Object.keys(input).every(key => {
|
|
355
364
|
if (["_children"].some(prop => key === prop))
|
|
356
365
|
return true;
|
|
357
366
|
const value = input[key];
|
|
@@ -361,24 +370,24 @@ export const stringifyNxtExport = input => {
|
|
|
361
370
|
});
|
|
362
371
|
const $string = __typia.json.createStringify.string;
|
|
363
372
|
const $tail = __typia.json.createStringify.tail;
|
|
364
|
-
const $so0 = input => `{${undefined === input.
|
|
373
|
+
const $so0 = input => `{${undefined === input.date ? "" : `"date":${undefined !== input.date ? $string(input.date) : undefined},`}${undefined === input.root ? "" : `"root":${undefined !== input.root ? `[${input.root.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.files ? "" : `"files":${undefined !== input.files ? `[${input.files.map(elem => $string(elem)).join(",")}]` : undefined},`}"version":${input.version},"assets":${$so1(input.assets)}}`;
|
|
365
374
|
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
366
375
|
return ""; return `${JSON.stringify(key)}:${$so2(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
367
|
-
const $so2 = input => `{${$tail(`"_children":${`[${input._children.map(elem => $string(elem)).join(",")}]`}
|
|
376
|
+
const $so2 = input => `{${$tail(`${undefined === input._children ? "" : `"_children":${undefined !== input._children ? `[${input._children.map(elem => $string(elem)).join(",")}]` : undefined},`}${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
368
377
|
return ""; if (["_children"].some(regular => regular === key))
|
|
369
378
|
return ""; return `${JSON.stringify(key)}:${undefined !== value ? JSON.stringify(value) : undefined}`; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
370
379
|
return $so0(input);
|
|
371
380
|
};
|
|
372
381
|
export const assertStringifyNxtExport = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
373
382
|
const __is = input => {
|
|
374
|
-
const $io0 = input => "number" === typeof input.version && !Number.isNaN(input.version) && "string" === typeof input.date && (Array.isArray(input.root) && input.root.every(elem => "string" === typeof elem)) && ("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) && $io1(input.assets)) && (undefined === input.files || Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem));
|
|
383
|
+
const $io0 = input => "number" === typeof input.version && !Number.isNaN(input.version) && (undefined === input.date || "string" === typeof input.date) && (undefined === input.root || Array.isArray(input.root) && input.root.every(elem => "string" === typeof elem)) && ("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) && $io1(input.assets)) && (undefined === input.files || Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem));
|
|
375
384
|
const $io1 = input => Object.keys(input).every(key => {
|
|
376
385
|
const value = input[key];
|
|
377
386
|
if (undefined === value)
|
|
378
387
|
return true;
|
|
379
|
-
return "object" === typeof value && null !== value && $io2(value);
|
|
388
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io2(value);
|
|
380
389
|
});
|
|
381
|
-
const $io2 = input => Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem) && Object.keys(input).every(key => {
|
|
390
|
+
const $io2 = input => (undefined === input._children || Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem)) && Object.keys(input).every(key => {
|
|
382
391
|
if (["_children"].some(prop => key === prop))
|
|
383
392
|
return true;
|
|
384
393
|
const value = input[key];
|
|
@@ -396,13 +405,13 @@ export const assertStringifyNxtExport = (input, errorFactory) => { const assert
|
|
|
396
405
|
path: _path + ".version",
|
|
397
406
|
expected: "number",
|
|
398
407
|
value: input.version
|
|
399
|
-
}, errorFactory)) && ("string" === typeof input.date || $guard(_exceptionable, {
|
|
408
|
+
}, errorFactory)) && (undefined === input.date || "string" === typeof input.date || $guard(_exceptionable, {
|
|
400
409
|
path: _path + ".date",
|
|
401
|
-
expected: "string",
|
|
410
|
+
expected: "(string | undefined)",
|
|
402
411
|
value: input.date
|
|
403
|
-
}, errorFactory)) && ((Array.isArray(input.root) || $guard(_exceptionable, {
|
|
412
|
+
}, errorFactory)) && (undefined === input.root || (Array.isArray(input.root) || $guard(_exceptionable, {
|
|
404
413
|
path: _path + ".root",
|
|
405
|
-
expected: "Array<string>",
|
|
414
|
+
expected: "(Array<string> | undefined)",
|
|
406
415
|
value: input.root
|
|
407
416
|
}, errorFactory)) && input.root.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
408
417
|
path: _path + ".root[" + _index1 + "]",
|
|
@@ -410,7 +419,7 @@ export const assertStringifyNxtExport = (input, errorFactory) => { const assert
|
|
|
410
419
|
value: elem
|
|
411
420
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
412
421
|
path: _path + ".root",
|
|
413
|
-
expected: "Array<string>",
|
|
422
|
+
expected: "(Array<string> | undefined)",
|
|
414
423
|
value: input.root
|
|
415
424
|
}, errorFactory)) && (("object" === typeof input.assets && null !== input.assets && false === Array.isArray(input.assets) || $guard(_exceptionable, {
|
|
416
425
|
path: _path + ".assets",
|
|
@@ -437,7 +446,7 @@ export const assertStringifyNxtExport = (input, errorFactory) => { const assert
|
|
|
437
446
|
const value = input[key];
|
|
438
447
|
if (undefined === value)
|
|
439
448
|
return true;
|
|
440
|
-
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
449
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
441
450
|
path: _path + $join(key),
|
|
442
451
|
expected: "__type.o1",
|
|
443
452
|
value: value
|
|
@@ -447,9 +456,9 @@ export const assertStringifyNxtExport = (input, errorFactory) => { const assert
|
|
|
447
456
|
value: value
|
|
448
457
|
}, errorFactory);
|
|
449
458
|
});
|
|
450
|
-
const $ao2 = (input, _path, _exceptionable = true) => ((Array.isArray(input._children) || $guard(_exceptionable, {
|
|
459
|
+
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input._children || (Array.isArray(input._children) || $guard(_exceptionable, {
|
|
451
460
|
path: _path + "._children",
|
|
452
|
-
expected: "Array<string>",
|
|
461
|
+
expected: "(Array<string> | undefined)",
|
|
453
462
|
value: input._children
|
|
454
463
|
}, errorFactory)) && input._children.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
|
|
455
464
|
path: _path + "._children[" + _index3 + "]",
|
|
@@ -457,7 +466,7 @@ export const assertStringifyNxtExport = (input, errorFactory) => { const assert
|
|
|
457
466
|
value: elem
|
|
458
467
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
459
468
|
path: _path + "._children",
|
|
460
|
-
expected: "Array<string>",
|
|
469
|
+
expected: "(Array<string> | undefined)",
|
|
461
470
|
value: input._children
|
|
462
471
|
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
463
472
|
if (["_children"].some(prop => key === prop))
|
|
@@ -483,9 +492,9 @@ export const assertStringifyNxtExport = (input, errorFactory) => { const assert
|
|
|
483
492
|
const value = input[key];
|
|
484
493
|
if (undefined === value)
|
|
485
494
|
return true;
|
|
486
|
-
return "object" === typeof value && null !== value && $io2(value);
|
|
495
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io2(value);
|
|
487
496
|
});
|
|
488
|
-
const $io2 = input => Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem) && Object.keys(input).every(key => {
|
|
497
|
+
const $io2 = input => (undefined === input._children || Array.isArray(input._children) && input._children.every(elem => "string" === typeof elem)) && Object.keys(input).every(key => {
|
|
489
498
|
if (["_children"].some(prop => key === prop))
|
|
490
499
|
return true;
|
|
491
500
|
const value = input[key];
|
|
@@ -495,10 +504,10 @@ export const assertStringifyNxtExport = (input, errorFactory) => { const assert
|
|
|
495
504
|
});
|
|
496
505
|
const $string = __typia.json.createAssertStringify.string;
|
|
497
506
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
498
|
-
const $so0 = input => `{${undefined === input.
|
|
507
|
+
const $so0 = input => `{${undefined === input.date ? "" : `"date":${undefined !== input.date ? $string(input.date) : undefined},`}${undefined === input.root ? "" : `"root":${undefined !== input.root ? `[${input.root.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.files ? "" : `"files":${undefined !== input.files ? `[${input.files.map(elem => $string(elem)).join(",")}]` : undefined},`}"version":${input.version},"assets":${$so1(input.assets)}}`;
|
|
499
508
|
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
500
509
|
return ""; return `${JSON.stringify(key)}:${$so2(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
501
|
-
const $so2 = input => `{${$tail(`"_children":${`[${input._children.map(elem => $string(elem)).join(",")}]`}
|
|
510
|
+
const $so2 = input => `{${$tail(`${undefined === input._children ? "" : `"_children":${undefined !== input._children ? `[${input._children.map(elem => $string(elem)).join(",")}]` : undefined},`}${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
502
511
|
return ""; if (["_children"].some(regular => regular === key))
|
|
503
512
|
return ""; return `${JSON.stringify(key)}:${undefined !== value ? JSON.stringify(value) : undefined}`; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
504
513
|
return $so0(input);
|
package/dist/schema.json
CHANGED
|
@@ -1570,6 +1570,10 @@
|
|
|
1570
1570
|
"filename": {
|
|
1571
1571
|
"type": "string"
|
|
1572
1572
|
},
|
|
1573
|
+
"id": {
|
|
1574
|
+
"description": "Unique ID of the download, to be used to control and track the download progress.",
|
|
1575
|
+
"type": "string"
|
|
1576
|
+
},
|
|
1573
1577
|
"path": {
|
|
1574
1578
|
"description": "If present, filename and directory will be ignored.",
|
|
1575
1579
|
"type": "string"
|
|
@@ -2377,6 +2381,9 @@
|
|
|
2377
2381
|
"MediaProbeRecord": {
|
|
2378
2382
|
"additionalProperties": false,
|
|
2379
2383
|
"properties": {
|
|
2384
|
+
"duration": {
|
|
2385
|
+
"type": "number"
|
|
2386
|
+
},
|
|
2380
2387
|
"error": {
|
|
2381
2388
|
"$ref": "#/definitions/NxtError"
|
|
2382
2389
|
},
|
|
@@ -4239,6 +4246,13 @@
|
|
|
4239
4246
|
"PipelineDomainRecord": {
|
|
4240
4247
|
"additionalProperties": false,
|
|
4241
4248
|
"properties": {
|
|
4249
|
+
"assetType": {
|
|
4250
|
+
"enum": [
|
|
4251
|
+
"collection",
|
|
4252
|
+
"pipeline"
|
|
4253
|
+
],
|
|
4254
|
+
"type": "string"
|
|
4255
|
+
},
|
|
4242
4256
|
"bookmarkId": {
|
|
4243
4257
|
"type": "string"
|
|
4244
4258
|
},
|
package/package.json
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/types",
|
|
3
|
-
"version": "23.0.
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "23.0.22",
|
|
5
4
|
"license": "MIT",
|
|
6
|
-
"
|
|
7
|
-
"prepare": "ts-patch install && typia patch",
|
|
8
|
-
"prebuild": "rimraf dist",
|
|
9
|
-
"build": "tspc",
|
|
10
|
-
"postbuild": "yarn generate-schema",
|
|
11
|
-
"generate-schema": "typescript-json-schema \"dist/**/*.d.ts\" \"*\" --out dist/schema.json --noExtraProps --required",
|
|
12
|
-
"lint": "npx eslint ./src",
|
|
13
|
-
"prepublishOnly": "yarn lint && yarn build && yarn test",
|
|
14
|
-
"test": "tspc && node --test",
|
|
15
|
-
"benchmark": "tspc && node ./test/benchmark.mjs"
|
|
16
|
-
},
|
|
5
|
+
"type": "module",
|
|
17
6
|
"exports": {
|
|
18
7
|
".": "./dist/index.js",
|
|
19
8
|
"./common/*": "./dist/common/*",
|
|
@@ -23,6 +12,17 @@
|
|
|
23
12
|
"files": [
|
|
24
13
|
"dist"
|
|
25
14
|
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"benchmark": "tspc && node ./test/benchmark.mjs",
|
|
17
|
+
"prebuild": "rimraf dist",
|
|
18
|
+
"build": "tspc",
|
|
19
|
+
"postbuild": "yarn generate-schema",
|
|
20
|
+
"generate-schema": "typescript-json-schema \"dist/**/*.d.ts\" \"*\" --out dist/schema.json --noExtraProps --required",
|
|
21
|
+
"lint": "npx eslint ./src",
|
|
22
|
+
"prepare": "ts-patch install && typia patch",
|
|
23
|
+
"prepublishOnly": "yarn lint && yarn build && yarn test",
|
|
24
|
+
"test": "tspc && node --test"
|
|
25
|
+
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"rfc6902": "^5.1.1",
|
|
28
28
|
"type-fest": "^4.23.0",
|