@naturalcycles/nodejs-lib 15.77.1 → 15.78.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/util/git2.d.ts
CHANGED
package/dist/util/git2.js
CHANGED
|
@@ -54,6 +54,15 @@ class Git2 {
|
|
|
54
54
|
// console.log(`gitIsAhead: ${stdout}`)
|
|
55
55
|
return Number(stdout) > 0;
|
|
56
56
|
}
|
|
57
|
+
fetch() {
|
|
58
|
+
const cmd = 'git fetch';
|
|
59
|
+
try {
|
|
60
|
+
execSync(cmd, {
|
|
61
|
+
stdio: 'inherit',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
catch { }
|
|
65
|
+
}
|
|
57
66
|
pull() {
|
|
58
67
|
const cmd = 'git pull';
|
|
59
68
|
try {
|
|
@@ -248,13 +248,13 @@ export declare class JsonSchemaObjectBuilder<IN extends AnyObject, OUT extends A
|
|
|
248
248
|
* When set, the validation will not strip away properties that are not specified explicitly in the schema.
|
|
249
249
|
*/
|
|
250
250
|
allowAdditionalProperties(): this;
|
|
251
|
-
extend<P extends Record<string, JsonSchemaAnyBuilder<any, any, any>>>(props: P): JsonSchemaObjectBuilder<RelaxIndexSignature<IN
|
|
251
|
+
extend<P extends Record<string, JsonSchemaAnyBuilder<any, any, any>>>(props: P): JsonSchemaObjectBuilder<RelaxIndexSignature<Override<IN, {
|
|
252
252
|
[K in keyof P]?: P[K] extends JsonSchemaAnyBuilder<infer IN2, any, any> ? IN2 : never;
|
|
253
|
-
}
|
|
253
|
+
}>>, AllowExtraKeys<RelaxIndexSignature<Override<OUT, {
|
|
254
254
|
[K in keyof P as P[K] extends JsonSchemaAnyBuilder<any, any, infer IsOpt> ? IsOpt extends true ? never : K : never]: P[K] extends JsonSchemaAnyBuilder<any, infer OUT2, any> ? OUT2 : never;
|
|
255
255
|
} & {
|
|
256
256
|
[K in keyof P as P[K] extends JsonSchemaAnyBuilder<any, any, infer IsOpt> ? IsOpt extends true ? K : never : never]?: P[K] extends JsonSchemaAnyBuilder<any, infer OUT2, any> ? OUT2 : never;
|
|
257
|
-
}
|
|
257
|
+
}>>>, false>;
|
|
258
258
|
/**
|
|
259
259
|
* Concatenates another schema to the current schema.
|
|
260
260
|
*
|
|
@@ -277,15 +277,15 @@ export declare class JsonSchemaObjectBuilder<IN extends AnyObject, OUT extends A
|
|
|
277
277
|
/**
|
|
278
278
|
* Extends the current schema with `id`, `created` and `updated` according to NC DB conventions.
|
|
279
279
|
*/
|
|
280
|
-
dbEntity(): JsonSchemaObjectBuilder<RelaxIndexSignature<IN
|
|
280
|
+
dbEntity(): JsonSchemaObjectBuilder<RelaxIndexSignature<Override<IN, {
|
|
281
281
|
id?: string | undefined;
|
|
282
282
|
created?: any;
|
|
283
283
|
updated?: any;
|
|
284
|
-
}
|
|
284
|
+
}>>, AllowExtraKeys<RelaxIndexSignature<Override<OUT, {
|
|
285
285
|
id: string;
|
|
286
286
|
created: any;
|
|
287
287
|
updated: any;
|
|
288
|
-
} & {}
|
|
288
|
+
} & {}>>>, false>;
|
|
289
289
|
minProperties(minProperties: number): this;
|
|
290
290
|
maxProperties(maxProperties: number): this;
|
|
291
291
|
exclusiveProperties(propNames: readonly (keyof IN & string)[]): this;
|
|
@@ -459,6 +459,7 @@ type StripIndexSignatureDeep<T> = T extends readonly unknown[] ? T : T extends R
|
|
|
459
459
|
type RelaxIndexSignature<T> = T extends readonly unknown[] ? T : T extends AnyObject ? string extends keyof T ? any : {
|
|
460
460
|
[K in keyof T]: RelaxIndexSignature<T[K]>;
|
|
461
461
|
} : T;
|
|
462
|
+
type Override<T, U> = Omit<T, keyof U> & U;
|
|
462
463
|
declare const allowExtraKeysSymbol: unique symbol;
|
|
463
464
|
type AllowExtraKeys<T> = T & {
|
|
464
465
|
readonly [allowExtraKeysSymbol]?: true;
|
package/package.json
CHANGED
package/src/util/git2.ts
CHANGED
|
@@ -870,27 +870,33 @@ export class JsonSchemaObjectBuilder<
|
|
|
870
870
|
props: P,
|
|
871
871
|
): JsonSchemaObjectBuilder<
|
|
872
872
|
RelaxIndexSignature<
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
873
|
+
Override<
|
|
874
|
+
IN,
|
|
875
|
+
{
|
|
876
|
+
[K in keyof P]?: P[K] extends JsonSchemaAnyBuilder<infer IN2, any, any> ? IN2 : never
|
|
877
|
+
}
|
|
878
|
+
>
|
|
876
879
|
>,
|
|
877
880
|
AllowExtraKeys<
|
|
878
881
|
RelaxIndexSignature<
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
882
|
+
Override<
|
|
883
|
+
OUT,
|
|
884
|
+
{
|
|
885
|
+
// required keys
|
|
886
|
+
[K in keyof P as P[K] extends JsonSchemaAnyBuilder<any, any, infer IsOpt>
|
|
887
|
+
? IsOpt extends true
|
|
888
|
+
? never
|
|
889
|
+
: K
|
|
890
|
+
: never]: P[K] extends JsonSchemaAnyBuilder<any, infer OUT2, any> ? OUT2 : never
|
|
891
|
+
} & {
|
|
892
|
+
// optional keys
|
|
893
|
+
[K in keyof P as P[K] extends JsonSchemaAnyBuilder<any, any, infer IsOpt>
|
|
894
|
+
? IsOpt extends true
|
|
895
|
+
? K
|
|
896
|
+
: never
|
|
897
|
+
: never]?: P[K] extends JsonSchemaAnyBuilder<any, infer OUT2, any> ? OUT2 : never
|
|
898
|
+
}
|
|
899
|
+
>
|
|
894
900
|
>
|
|
895
901
|
>,
|
|
896
902
|
false
|
|
@@ -1461,6 +1467,8 @@ type RelaxIndexSignature<T> = T extends readonly unknown[]
|
|
|
1461
1467
|
: { [K in keyof T]: RelaxIndexSignature<T[K]> }
|
|
1462
1468
|
: T
|
|
1463
1469
|
|
|
1470
|
+
type Override<T, U> = Omit<T, keyof U> & U
|
|
1471
|
+
|
|
1464
1472
|
declare const allowExtraKeysSymbol: unique symbol
|
|
1465
1473
|
|
|
1466
1474
|
type AllowExtraKeys<T> = T & { readonly [allowExtraKeysSymbol]?: true }
|