@smoothbricks/cli 0.11.11 → 0.11.13
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/README.md +104 -20
- package/dist/lib/json.d.ts +51 -0
- package/dist/lib/json.d.ts.map +1 -1
- package/dist/lib/json.js +111 -67
- package/dist/monorepo/cargo-policy.d.ts +25 -1
- package/dist/monorepo/cargo-policy.d.ts.map +1 -1
- package/dist/monorepo/cargo-policy.js +396 -4
- package/dist/monorepo/ci-workflow.d.ts +27 -2
- package/dist/monorepo/ci-workflow.d.ts.map +1 -1
- package/dist/monorepo/ci-workflow.js +151 -11
- package/dist/monorepo/index.d.ts.map +1 -1
- package/dist/monorepo/index.js +5 -1
- package/dist/monorepo/managed-files.d.ts +3 -1
- package/dist/monorepo/managed-files.d.ts.map +1 -1
- package/dist/monorepo/managed-files.js +3 -0
- package/dist/monorepo/packs/index.d.ts.map +1 -1
- package/dist/monorepo/packs/index.js +13 -0
- package/dist/monorepo/publish-workflow.d.ts +8 -1
- package/dist/monorepo/publish-workflow.d.ts.map +1 -1
- package/dist/monorepo/publish-workflow.js +15 -5
- package/managed/raw/tooling/direnv/devenv.smoo.nix +28 -2
- package/managed/raw/tooling/direnv/secret-references.ts +248 -51
- package/managed/templates/github/actions/save-nix-devenv/action.yml +2 -2
- package/managed/templates/github/actions/setup-devenv/action.yml +43 -5
- package/package.json +2 -2
- package/src/lib/json.ts +52 -0
- package/src/monorepo/__tests__/ci-workflow.test.ts +183 -0
- package/src/monorepo/__tests__/publish-workflow.test.ts +29 -0
- package/src/monorepo/cargo-policy.test.ts +206 -3
- package/src/monorepo/cargo-policy.ts +341 -2
- package/src/monorepo/ci-workflow.ts +180 -11
- package/src/monorepo/index.ts +5 -1
- package/src/monorepo/managed-files.ts +6 -0
- package/src/monorepo/packs/index.test.ts +32 -0
- package/src/monorepo/packs/index.ts +13 -0
- package/src/monorepo/publish-workflow.ts +24 -4
- package/src/monorepo/secret-references.test.ts +175 -2
package/dist/lib/json.js
CHANGED
|
@@ -46,7 +46,7 @@ export const parsePackageJsonText = (() => {
|
|
|
46
46
|
return true;
|
|
47
47
|
return true;
|
|
48
48
|
});
|
|
49
|
-
const _io12 = (input, _vctx = {}) => (undefined === input.github || "object" === typeof input.github && null !== input.github && false === Array.isArray(input.github) && _io13(input.github, _vctx)) && (undefined === input.privateNpm || "object" === typeof input.privateNpm && null !== input.privateNpm && _io20(input.privateNpm, _vctx)) && (undefined === input.secrets || "object" === typeof input.secrets && null !== input.secrets && false === Array.isArray(input.secrets) &&
|
|
49
|
+
const _io12 = (input, _vctx = {}) => (undefined === input.github || "object" === typeof input.github && null !== input.github && false === Array.isArray(input.github) && _io13(input.github, _vctx)) && (undefined === input.privateNpm || "object" === typeof input.privateNpm && null !== input.privateNpm && _io20(input.privateNpm, _vctx)) && (undefined === input.remoteCache || "object" === typeof input.remoteCache && null !== input.remoteCache && _io21(input.remoteCache, _vctx)) && (undefined === input.secrets || "object" === typeof input.secrets && null !== input.secrets && false === Array.isArray(input.secrets) && _io22(input.secrets, _vctx));
|
|
50
50
|
const _io13 = (input, _vctx = {}) => (undefined === input.actionsProvider || "forgejo" === input.actionsProvider || "github" === input.actionsProvider) && (undefined === input.pushBranches || Array.isArray(input.pushBranches) && ("string" === typeof input.pushBranches[0] && 1 <= _stringLength_1._stringLength(input.pushBranches[0]) && (Array.isArray(input.pushBranches.slice(1)) && input.pushBranches.slice(1).every(elem => "string" === typeof elem && 1 <= _stringLength_1._stringLength(elem))))) && (null !== input.runsOn && (undefined === input.runsOn || "string" === typeof input.runsOn || Array.isArray(input.runsOn) && input.runsOn.every(elem => "string" === typeof elem))) && (undefined === input.environments || "object" === typeof input.environments && null !== input.environments && false === Array.isArray(input.environments) && _io14(input.environments, _vctx)) && (undefined === input.deploySecrets || "object" === typeof input.deploySecrets && null !== input.deploySecrets && false === Array.isArray(input.deploySecrets) && _io15(input.deploySecrets, _vctx)) && (undefined === input.e2eSecrets || "object" === typeof input.e2eSecrets && null !== input.e2eSecrets && false === Array.isArray(input.e2eSecrets) && _io15(input.e2eSecrets, _vctx)) && (undefined === input.previewUrls || Array.isArray(input.previewUrls) && input.previewUrls.every(elem => "string" === typeof elem && RegExp(".*\\{stage\\}.*").test(elem))) && (null !== input.macosRunsOn && (undefined === input.macosRunsOn || "string" === typeof input.macosRunsOn || Array.isArray(input.macosRunsOn) && input.macosRunsOn.every(elem => "string" === typeof elem))) && (undefined === input.platformProducer || "object" === typeof input.platformProducer && null !== input.platformProducer && _io16(input.platformProducer, _vctx)) && (undefined === input.sourceCheckouts || Array.isArray(input.sourceCheckouts) && input.sourceCheckouts.every(elem => "object" === typeof elem && null !== elem && _io17(elem, _vctx))) && (undefined === input.cargoCredentials || "object" === typeof input.cargoCredentials && null !== input.cargoCredentials && false === Array.isArray(input.cargoCredentials) && _io18(input.cargoCredentials, _vctx));
|
|
51
51
|
const _io14 = (input, _vctx = {}) => (undefined === input.staging || "string" === typeof input.staging) && (undefined === input.production || "string" === typeof input.production);
|
|
52
52
|
const _io15 = (input, _vctx = {}) => Object.keys(input).every(key => {
|
|
@@ -58,7 +58,7 @@ export const parsePackageJsonText = (() => {
|
|
|
58
58
|
const _io16 = (input, _vctx = {}) => "linux-cross" === input.kind && "string" === typeof input.preflight && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io1(input.env, _vctx));
|
|
59
59
|
const _io17 = (input, _vctx = {}) => "string" === typeof input.path && "string" === typeof input.repository && (undefined === input.ref || "string" === typeof input.ref) && (undefined === input.tokenEnv || "string" === typeof input.tokenEnv);
|
|
60
60
|
const _io18 = (input, _vctx = {}) => (undefined === input.gitOrigins || Array.isArray(input.gitOrigins) && input.gitOrigins.every(elem => "object" === typeof elem && null !== elem && _io19(elem, _vctx))) && (undefined === input.registryTokenEnvs || Array.isArray(input.registryTokenEnvs) && input.registryTokenEnvs.every(elem => "string" === typeof elem));
|
|
61
|
-
const _io19 = (input, _vctx = {}) => "string" === typeof input.origin && "string" === typeof input.tokenEnv && (undefined === input.internalMirror || "string" === typeof input.internalMirror);
|
|
61
|
+
const _io19 = (input, _vctx = {}) => "string" === typeof input.origin && "string" === typeof input.tokenEnv && (undefined === input.internalMirror || "string" === typeof input.internalMirror) && (undefined === input.sshOrigins || Array.isArray(input.sshOrigins) && input.sshOrigins.every(elem => "string" === typeof elem));
|
|
62
62
|
const _io2 = (input, _vctx = {}) => (_vctx.io2 || (_vctx.io2 = new WeakSet())).has(input) ? true : (_vctx.io2.add(input), (Object.keys(input).every(key => {
|
|
63
63
|
const value = input[key];
|
|
64
64
|
if (undefined === value)
|
|
@@ -66,13 +66,14 @@ export const parsePackageJsonText = (() => {
|
|
|
66
66
|
return null === value || undefined === value || "string" === typeof value || "object" === typeof value && null !== value && false === Array.isArray(value) && _io2(value, _vctx);
|
|
67
67
|
})) || (_vctx.io2.delete(input), false));
|
|
68
68
|
const _io20 = (input, _vctx = {}) => "string" === typeof input.scope && (undefined === input.readTokenEnv || "string" === typeof input.readTokenEnv) && (undefined === input.publishTokenEnv || "string" === typeof input.publishTokenEnv);
|
|
69
|
-
const _io21 = (input, _vctx = {}) =>
|
|
69
|
+
const _io21 = (input, _vctx = {}) => "string" === typeof input.server && (undefined === input.internalServer || "string" === typeof input.internalServer) && ("string" === typeof input.tokenSecret && (1 <= _stringLength_1._stringLength(input.tokenSecret) && RegExp("^(?![Gg][Ii][Tt][Hh][Uu][Bb]_)").test(input.tokenSecret)));
|
|
70
|
+
const _io22 = (input, _vctx = {}) => Object.keys(input).every(key => {
|
|
70
71
|
const value = input[key];
|
|
71
72
|
if (undefined === value)
|
|
72
73
|
return true;
|
|
73
|
-
return "object" === typeof value && null !== value &&
|
|
74
|
+
return "object" === typeof value && null !== value && _io23(value, _vctx);
|
|
74
75
|
});
|
|
75
|
-
const
|
|
76
|
+
const _io23 = (input, _vctx = {}) => Array.isArray(input.command) && ("string" === typeof input.command[0] && (Array.isArray(input.command.slice(1)) && input.command.slice(1).every(elem => "string" === typeof elem)));
|
|
76
77
|
const _io3 = (input, _vctx = {}) => undefined === input.packages || Array.isArray(input.packages) && input.packages.every(elem => "string" === typeof elem);
|
|
77
78
|
const _io4 = (input, _vctx = {}) => (undefined === input.access || "string" === typeof input.access) && (undefined === input.registry || "string" === typeof input.registry);
|
|
78
79
|
const _io5 = (input, _vctx = {}) => (undefined === input.type || "string" === typeof input.type) && (undefined === input.url || "string" === typeof input.url) && (undefined === input.directory || "string" === typeof input.directory);
|
|
@@ -212,8 +213,8 @@ const validatePackageJsonText = (() => {
|
|
|
212
213
|
path: _path + ".files",
|
|
213
214
|
expected: "(Array<string> | undefined)",
|
|
214
215
|
value: input["files"]
|
|
215
|
-
})) && input["files"].map((elem,
|
|
216
|
-
path: _path + ".files[" +
|
|
216
|
+
})) && input["files"].map((elem, _index19) => "string" === typeof elem || _report(_exceptionable, {
|
|
217
|
+
path: _path + ".files[" + _index19 + "]",
|
|
217
218
|
expected: "string",
|
|
218
219
|
value: elem
|
|
219
220
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -247,8 +248,8 @@ const validatePackageJsonText = (() => {
|
|
|
247
248
|
path: _path + ".workspaces",
|
|
248
249
|
expected: "(Array<string> | PackageWorkspacesObject | undefined)",
|
|
249
250
|
value: input["workspaces"]
|
|
250
|
-
})) && (undefined === input["workspaces"] || (Array.isArray(input["workspaces"]) && input["workspaces"].map((elem,
|
|
251
|
-
path: _path + ".workspaces[" +
|
|
251
|
+
})) && (undefined === input["workspaces"] || (Array.isArray(input["workspaces"]) && input["workspaces"].map((elem, _index20) => "string" === typeof elem || _report(_exceptionable, {
|
|
252
|
+
path: _path + ".workspaces[" + _index20 + "]",
|
|
252
253
|
expected: "string",
|
|
253
254
|
value: elem
|
|
254
255
|
})).every(flag => flag) || "object" === typeof input["workspaces"] && null !== input["workspaces"] && false === Array.isArray(input["workspaces"]) && _vo3(input["workspaces"], _path + ".workspaces", true && _exceptionable, _vctx) || _report(_exceptionable, {
|
|
@@ -377,7 +378,7 @@ const validatePackageJsonText = (() => {
|
|
|
377
378
|
return true;
|
|
378
379
|
return true;
|
|
379
380
|
});
|
|
380
|
-
const _io12 = (input, _vctx = {}) => (undefined === input.github || "object" === typeof input.github && null !== input.github && false === Array.isArray(input.github) && _io13(input.github, _vctx)) && (undefined === input.privateNpm || "object" === typeof input.privateNpm && null !== input.privateNpm && _io20(input.privateNpm, _vctx)) && (undefined === input.secrets || "object" === typeof input.secrets && null !== input.secrets && false === Array.isArray(input.secrets) &&
|
|
381
|
+
const _io12 = (input, _vctx = {}) => (undefined === input.github || "object" === typeof input.github && null !== input.github && false === Array.isArray(input.github) && _io13(input.github, _vctx)) && (undefined === input.privateNpm || "object" === typeof input.privateNpm && null !== input.privateNpm && _io20(input.privateNpm, _vctx)) && (undefined === input.remoteCache || "object" === typeof input.remoteCache && null !== input.remoteCache && _io21(input.remoteCache, _vctx)) && (undefined === input.secrets || "object" === typeof input.secrets && null !== input.secrets && false === Array.isArray(input.secrets) && _io22(input.secrets, _vctx));
|
|
381
382
|
const _io13 = (input, _vctx = {}) => (undefined === input.actionsProvider || "forgejo" === input.actionsProvider || "github" === input.actionsProvider) && (undefined === input.pushBranches || Array.isArray(input.pushBranches) && ("string" === typeof input.pushBranches[0] && 1 <= _stringLength_1._stringLength(input.pushBranches[0]) && (Array.isArray(input.pushBranches.slice(1)) && input.pushBranches.slice(1).every(elem => "string" === typeof elem && 1 <= _stringLength_1._stringLength(elem))))) && (null !== input.runsOn && (undefined === input.runsOn || "string" === typeof input.runsOn || Array.isArray(input.runsOn) && input.runsOn.every(elem => "string" === typeof elem))) && (undefined === input.environments || "object" === typeof input.environments && null !== input.environments && false === Array.isArray(input.environments) && _io14(input.environments, _vctx)) && (undefined === input.deploySecrets || "object" === typeof input.deploySecrets && null !== input.deploySecrets && false === Array.isArray(input.deploySecrets) && _io15(input.deploySecrets, _vctx)) && (undefined === input.e2eSecrets || "object" === typeof input.e2eSecrets && null !== input.e2eSecrets && false === Array.isArray(input.e2eSecrets) && _io15(input.e2eSecrets, _vctx)) && (undefined === input.previewUrls || Array.isArray(input.previewUrls) && input.previewUrls.every(elem => "string" === typeof elem && RegExp(".*\\{stage\\}.*").test(elem))) && (null !== input.macosRunsOn && (undefined === input.macosRunsOn || "string" === typeof input.macosRunsOn || Array.isArray(input.macosRunsOn) && input.macosRunsOn.every(elem => "string" === typeof elem))) && (undefined === input.platformProducer || "object" === typeof input.platformProducer && null !== input.platformProducer && _io16(input.platformProducer, _vctx)) && (undefined === input.sourceCheckouts || Array.isArray(input.sourceCheckouts) && input.sourceCheckouts.every(elem => "object" === typeof elem && null !== elem && _io17(elem, _vctx))) && (undefined === input.cargoCredentials || "object" === typeof input.cargoCredentials && null !== input.cargoCredentials && false === Array.isArray(input.cargoCredentials) && _io18(input.cargoCredentials, _vctx));
|
|
382
383
|
const _io14 = (input, _vctx = {}) => (undefined === input.staging || "string" === typeof input.staging) && (undefined === input.production || "string" === typeof input.production);
|
|
383
384
|
const _io15 = (input, _vctx = {}) => Object.keys(input).every(key => {
|
|
@@ -389,7 +390,7 @@ const validatePackageJsonText = (() => {
|
|
|
389
390
|
const _io16 = (input, _vctx = {}) => "linux-cross" === input.kind && "string" === typeof input.preflight && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io1(input.env, _vctx));
|
|
390
391
|
const _io17 = (input, _vctx = {}) => "string" === typeof input.path && "string" === typeof input.repository && (undefined === input.ref || "string" === typeof input.ref) && (undefined === input.tokenEnv || "string" === typeof input.tokenEnv);
|
|
391
392
|
const _io18 = (input, _vctx = {}) => (undefined === input.gitOrigins || Array.isArray(input.gitOrigins) && input.gitOrigins.every(elem => "object" === typeof elem && null !== elem && _io19(elem, _vctx))) && (undefined === input.registryTokenEnvs || Array.isArray(input.registryTokenEnvs) && input.registryTokenEnvs.every(elem => "string" === typeof elem));
|
|
392
|
-
const _io19 = (input, _vctx = {}) => "string" === typeof input.origin && "string" === typeof input.tokenEnv && (undefined === input.internalMirror || "string" === typeof input.internalMirror);
|
|
393
|
+
const _io19 = (input, _vctx = {}) => "string" === typeof input.origin && "string" === typeof input.tokenEnv && (undefined === input.internalMirror || "string" === typeof input.internalMirror) && (undefined === input.sshOrigins || Array.isArray(input.sshOrigins) && input.sshOrigins.every(elem => "string" === typeof elem));
|
|
393
394
|
const _io2 = (input, _vctx = {}) => (_vctx.io2 || (_vctx.io2 = new WeakSet())).has(input) ? true : (_vctx.io2.add(input), (Object.keys(input).every(key => {
|
|
394
395
|
const value = input[key];
|
|
395
396
|
if (undefined === value)
|
|
@@ -397,13 +398,14 @@ const validatePackageJsonText = (() => {
|
|
|
397
398
|
return null === value || undefined === value || "string" === typeof value || "object" === typeof value && null !== value && false === Array.isArray(value) && _io2(value, _vctx);
|
|
398
399
|
})) || (_vctx.io2.delete(input), false));
|
|
399
400
|
const _io20 = (input, _vctx = {}) => "string" === typeof input.scope && (undefined === input.readTokenEnv || "string" === typeof input.readTokenEnv) && (undefined === input.publishTokenEnv || "string" === typeof input.publishTokenEnv);
|
|
400
|
-
const _io21 = (input, _vctx = {}) =>
|
|
401
|
+
const _io21 = (input, _vctx = {}) => "string" === typeof input.server && (undefined === input.internalServer || "string" === typeof input.internalServer) && ("string" === typeof input.tokenSecret && (1 <= _stringLength_1._stringLength(input.tokenSecret) && RegExp("^(?![Gg][Ii][Tt][Hh][Uu][Bb]_)").test(input.tokenSecret)));
|
|
402
|
+
const _io22 = (input, _vctx = {}) => Object.keys(input).every(key => {
|
|
401
403
|
const value = input[key];
|
|
402
404
|
if (undefined === value)
|
|
403
405
|
return true;
|
|
404
|
-
return "object" === typeof value && null !== value &&
|
|
406
|
+
return "object" === typeof value && null !== value && _io23(value, _vctx);
|
|
405
407
|
});
|
|
406
|
-
const
|
|
408
|
+
const _io23 = (input, _vctx = {}) => Array.isArray(input.command) && ("string" === typeof input.command[0] && (Array.isArray(input.command.slice(1)) && input.command.slice(1).every(elem => "string" === typeof elem)));
|
|
407
409
|
const _io3 = (input, _vctx = {}) => undefined === input.packages || Array.isArray(input.packages) && input.packages.every(elem => "string" === typeof elem);
|
|
408
410
|
const _io4 = (input, _vctx = {}) => (undefined === input.access || "string" === typeof input.access) && (undefined === input.registry || "string" === typeof input.registry);
|
|
409
411
|
const _io5 = (input, _vctx = {}) => (undefined === input.type || "string" === typeof input.type) && (undefined === input.url || "string" === typeof input.url) && (undefined === input.directory || "string" === typeof input.directory);
|
|
@@ -450,11 +452,19 @@ const validatePackageJsonText = (() => {
|
|
|
450
452
|
path: _path + ".privateNpm",
|
|
451
453
|
expected: "(PackagePrivateNpmConfig | undefined)",
|
|
452
454
|
value: input.privateNpm
|
|
455
|
+
}), undefined === input.remoteCache || ("object" === typeof input.remoteCache && null !== input.remoteCache || _report(_exceptionable, {
|
|
456
|
+
path: _path + ".remoteCache",
|
|
457
|
+
expected: "(PackageRemoteCacheConfig | undefined)",
|
|
458
|
+
value: input.remoteCache
|
|
459
|
+
})) && _vo21(input.remoteCache, _path + ".remoteCache", true && _exceptionable, _vctx) || _report(_exceptionable, {
|
|
460
|
+
path: _path + ".remoteCache",
|
|
461
|
+
expected: "(PackageRemoteCacheConfig | undefined)",
|
|
462
|
+
value: input.remoteCache
|
|
453
463
|
}), undefined === input.secrets || ("object" === typeof input.secrets && null !== input.secrets && false === Array.isArray(input.secrets) || _report(_exceptionable, {
|
|
454
464
|
path: _path + ".secrets",
|
|
455
465
|
expected: "(Record<string, PackageSecretCommand> | undefined)",
|
|
456
466
|
value: input.secrets
|
|
457
|
-
})) &&
|
|
467
|
+
})) && _vo22(input.secrets, _path + ".secrets", true && _exceptionable, _vctx) || _report(_exceptionable, {
|
|
458
468
|
path: _path + ".secrets",
|
|
459
469
|
expected: "(Record<string, PackageSecretCommand> | undefined)",
|
|
460
470
|
value: input.secrets
|
|
@@ -481,12 +491,12 @@ const validatePackageJsonText = (() => {
|
|
|
481
491
|
path: _path + ".pushBranches",
|
|
482
492
|
expected: "...(string & MinLength<1>)",
|
|
483
493
|
value: input.pushBranches.slice(1)
|
|
484
|
-
})) && input.pushBranches.slice(1).map((elem,
|
|
485
|
-
path: _path + ".pushBranches[" + (1 +
|
|
494
|
+
})) && input.pushBranches.slice(1).map((elem, _index28) => "string" === typeof elem && (1 <= _stringLength_1._stringLength(elem) || _report(_exceptionable, {
|
|
495
|
+
path: _path + ".pushBranches[" + (1 + _index28) + "]",
|
|
486
496
|
expected: "string & MinLength<1>",
|
|
487
497
|
value: elem
|
|
488
498
|
})) || _report(_exceptionable, {
|
|
489
|
-
path: _path + ".pushBranches[" + (1 +
|
|
499
|
+
path: _path + ".pushBranches[" + (1 + _index28) + "]",
|
|
490
500
|
expected: "(string & MinLength<1>)",
|
|
491
501
|
value: elem
|
|
492
502
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -505,8 +515,8 @@ const validatePackageJsonText = (() => {
|
|
|
505
515
|
path: _path + ".runsOn",
|
|
506
516
|
expected: "(Array<string> | string | undefined)",
|
|
507
517
|
value: input.runsOn
|
|
508
|
-
})) && input.runsOn.map((elem,
|
|
509
|
-
path: _path + ".runsOn[" +
|
|
518
|
+
})) && input.runsOn.map((elem, _index29) => "string" === typeof elem || _report(_exceptionable, {
|
|
519
|
+
path: _path + ".runsOn[" + _index29 + "]",
|
|
510
520
|
expected: "string",
|
|
511
521
|
value: elem
|
|
512
522
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -541,12 +551,12 @@ const validatePackageJsonText = (() => {
|
|
|
541
551
|
path: _path + ".previewUrls",
|
|
542
552
|
expected: "(Array<PreviewUrlTemplate> | undefined)",
|
|
543
553
|
value: input.previewUrls
|
|
544
|
-
})) && input.previewUrls.map((elem,
|
|
545
|
-
path: _path + ".previewUrls[" +
|
|
554
|
+
})) && input.previewUrls.map((elem, _index30) => "string" === typeof elem && (RegExp(".*\\{stage\\}.*").test(elem) || _report(_exceptionable, {
|
|
555
|
+
path: _path + ".previewUrls[" + _index30 + "]",
|
|
546
556
|
expected: "string & Pattern<\".*\\\\{stage\\\\}.*\">",
|
|
547
557
|
value: elem
|
|
548
558
|
})) || _report(_exceptionable, {
|
|
549
|
-
path: _path + ".previewUrls[" +
|
|
559
|
+
path: _path + ".previewUrls[" + _index30 + "]",
|
|
550
560
|
expected: "(string & Pattern<\".*\\\\{stage\\\\}.*\">)",
|
|
551
561
|
value: elem
|
|
552
562
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -561,8 +571,8 @@ const validatePackageJsonText = (() => {
|
|
|
561
571
|
path: _path + ".macosRunsOn",
|
|
562
572
|
expected: "(Array<string> | string | undefined)",
|
|
563
573
|
value: input.macosRunsOn
|
|
564
|
-
})) && input.macosRunsOn.map((elem,
|
|
565
|
-
path: _path + ".macosRunsOn[" +
|
|
574
|
+
})) && input.macosRunsOn.map((elem, _index31) => "string" === typeof elem || _report(_exceptionable, {
|
|
575
|
+
path: _path + ".macosRunsOn[" + _index31 + "]",
|
|
566
576
|
expected: "string",
|
|
567
577
|
value: elem
|
|
568
578
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -581,12 +591,12 @@ const validatePackageJsonText = (() => {
|
|
|
581
591
|
path: _path + ".sourceCheckouts",
|
|
582
592
|
expected: "(Array<PackageSourceCheckoutConfig> | undefined)",
|
|
583
593
|
value: input.sourceCheckouts
|
|
584
|
-
})) && input.sourceCheckouts.map((elem,
|
|
585
|
-
path: _path + ".sourceCheckouts[" +
|
|
594
|
+
})) && input.sourceCheckouts.map((elem, _index32) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
595
|
+
path: _path + ".sourceCheckouts[" + _index32 + "]",
|
|
586
596
|
expected: "PackageSourceCheckoutConfig",
|
|
587
597
|
value: elem
|
|
588
|
-
})) && _vo17(elem, _path + ".sourceCheckouts[" +
|
|
589
|
-
path: _path + ".sourceCheckouts[" +
|
|
598
|
+
})) && _vo17(elem, _path + ".sourceCheckouts[" + _index32 + "]", true && _exceptionable, _vctx) || _report(_exceptionable, {
|
|
599
|
+
path: _path + ".sourceCheckouts[" + _index32 + "]",
|
|
590
600
|
expected: "PackageSourceCheckoutConfig",
|
|
591
601
|
value: elem
|
|
592
602
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -667,12 +677,12 @@ const validatePackageJsonText = (() => {
|
|
|
667
677
|
path: _path + ".gitOrigins",
|
|
668
678
|
expected: "(Array<PackageCargoGitOrigin> | undefined)",
|
|
669
679
|
value: input.gitOrigins
|
|
670
|
-
})) && input.gitOrigins.map((elem,
|
|
671
|
-
path: _path + ".gitOrigins[" +
|
|
680
|
+
})) && input.gitOrigins.map((elem, _index33) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
681
|
+
path: _path + ".gitOrigins[" + _index33 + "]",
|
|
672
682
|
expected: "PackageCargoGitOrigin",
|
|
673
683
|
value: elem
|
|
674
|
-
})) && _vo19(elem, _path + ".gitOrigins[" +
|
|
675
|
-
path: _path + ".gitOrigins[" +
|
|
684
|
+
})) && _vo19(elem, _path + ".gitOrigins[" + _index33 + "]", true && _exceptionable, _vctx) || _report(_exceptionable, {
|
|
685
|
+
path: _path + ".gitOrigins[" + _index33 + "]",
|
|
676
686
|
expected: "PackageCargoGitOrigin",
|
|
677
687
|
value: elem
|
|
678
688
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -683,8 +693,8 @@ const validatePackageJsonText = (() => {
|
|
|
683
693
|
path: _path + ".registryTokenEnvs",
|
|
684
694
|
expected: "(Array<string> | undefined)",
|
|
685
695
|
value: input.registryTokenEnvs
|
|
686
|
-
})) && input.registryTokenEnvs.map((elem,
|
|
687
|
-
path: _path + ".registryTokenEnvs[" +
|
|
696
|
+
})) && input.registryTokenEnvs.map((elem, _index34) => "string" === typeof elem || _report(_exceptionable, {
|
|
697
|
+
path: _path + ".registryTokenEnvs[" + _index34 + "]",
|
|
688
698
|
expected: "string",
|
|
689
699
|
value: elem
|
|
690
700
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -704,6 +714,18 @@ const validatePackageJsonText = (() => {
|
|
|
704
714
|
path: _path + ".internalMirror",
|
|
705
715
|
expected: "(string | undefined)",
|
|
706
716
|
value: input.internalMirror
|
|
717
|
+
}), undefined === input.sshOrigins || (Array.isArray(input.sshOrigins) || _report(_exceptionable, {
|
|
718
|
+
path: _path + ".sshOrigins",
|
|
719
|
+
expected: "(Array<string> | undefined)",
|
|
720
|
+
value: input.sshOrigins
|
|
721
|
+
})) && input.sshOrigins.map((elem, _index35) => "string" === typeof elem || _report(_exceptionable, {
|
|
722
|
+
path: _path + ".sshOrigins[" + _index35 + "]",
|
|
723
|
+
expected: "string",
|
|
724
|
+
value: elem
|
|
725
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
726
|
+
path: _path + ".sshOrigins",
|
|
727
|
+
expected: "(Array<string> | undefined)",
|
|
728
|
+
value: input.sshOrigins
|
|
707
729
|
})].every(flag => flag);
|
|
708
730
|
const _vo2 = (input, _path, _exceptionable = true, _vctx = {}) => (_vctx.vo2 || (_vctx.vo2 = new WeakSet())).has(input) ? true : (_vctx.vo2.add(input), ([false === _exceptionable || Object.keys(input).map(key => {
|
|
709
731
|
const value = input[key];
|
|
@@ -732,7 +754,28 @@ const validatePackageJsonText = (() => {
|
|
|
732
754
|
expected: "(string | undefined)",
|
|
733
755
|
value: input.publishTokenEnv
|
|
734
756
|
})].every(flag => flag);
|
|
735
|
-
const _vo21 = (input, _path, _exceptionable = true, _vctx = {}) => [
|
|
757
|
+
const _vo21 = (input, _path, _exceptionable = true, _vctx = {}) => ["string" === typeof input.server || _report(_exceptionable, {
|
|
758
|
+
path: _path + ".server",
|
|
759
|
+
expected: "string",
|
|
760
|
+
value: input.server
|
|
761
|
+
}), undefined === input.internalServer || "string" === typeof input.internalServer || _report(_exceptionable, {
|
|
762
|
+
path: _path + ".internalServer",
|
|
763
|
+
expected: "(string | undefined)",
|
|
764
|
+
value: input.internalServer
|
|
765
|
+
}), "string" === typeof input.tokenSecret && (1 <= _stringLength_1._stringLength(input.tokenSecret) || _report(_exceptionable, {
|
|
766
|
+
path: _path + ".tokenSecret",
|
|
767
|
+
expected: "string & MinLength<1>",
|
|
768
|
+
value: input.tokenSecret
|
|
769
|
+
})) && (RegExp("^(?![Gg][Ii][Tt][Hh][Uu][Bb]_)").test(input.tokenSecret) || _report(_exceptionable, {
|
|
770
|
+
path: _path + ".tokenSecret",
|
|
771
|
+
expected: "string & Pattern<\"^(?![Gg][Ii][Tt][Hh][Uu][Bb]_)\">",
|
|
772
|
+
value: input.tokenSecret
|
|
773
|
+
})) || _report(_exceptionable, {
|
|
774
|
+
path: _path + ".tokenSecret",
|
|
775
|
+
expected: "(string & MinLength<1> & Pattern<\"^(?![Gg][Ii][Tt][Hh][Uu][Bb]_)\">)",
|
|
776
|
+
value: input.tokenSecret
|
|
777
|
+
})].every(flag => flag);
|
|
778
|
+
const _vo22 = (input, _path, _exceptionable = true, _vctx = {}) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
736
779
|
const value = input[key];
|
|
737
780
|
if (undefined === value)
|
|
738
781
|
return true;
|
|
@@ -740,13 +783,13 @@ const validatePackageJsonText = (() => {
|
|
|
740
783
|
path: _path + __typia_transform__accessExpressionAsString(key),
|
|
741
784
|
expected: "PackageSecretCommand",
|
|
742
785
|
value: value
|
|
743
|
-
})) &&
|
|
786
|
+
})) && _vo23(value, _path + __typia_transform__accessExpressionAsString(key), true && _exceptionable, _vctx) || _report(_exceptionable, {
|
|
744
787
|
path: _path + __typia_transform__accessExpressionAsString(key),
|
|
745
788
|
expected: "PackageSecretCommand",
|
|
746
789
|
value: value
|
|
747
790
|
});
|
|
748
791
|
}).every(flag => flag)].every(flag => flag);
|
|
749
|
-
const
|
|
792
|
+
const _vo23 = (input, _path, _exceptionable = true, _vctx = {}) => [(Array.isArray(input.command) || _report(_exceptionable, {
|
|
750
793
|
path: _path + ".command",
|
|
751
794
|
expected: "NonEmptyArray<string>",
|
|
752
795
|
value: input.command
|
|
@@ -760,8 +803,8 @@ const validatePackageJsonText = (() => {
|
|
|
760
803
|
path: _path + ".command",
|
|
761
804
|
expected: "...string",
|
|
762
805
|
value: input.command.slice(1)
|
|
763
|
-
})) && input.command.slice(1).map((elem,
|
|
764
|
-
path: _path + ".command[" + (1 +
|
|
806
|
+
})) && input.command.slice(1).map((elem, _index36) => "string" === typeof elem || _report(_exceptionable, {
|
|
807
|
+
path: _path + ".command[" + (1 + _index36) + "]",
|
|
765
808
|
expected: "string",
|
|
766
809
|
value: elem
|
|
767
810
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -777,8 +820,8 @@ const validatePackageJsonText = (() => {
|
|
|
777
820
|
path: _path + ".packages",
|
|
778
821
|
expected: "(Array<string> | undefined)",
|
|
779
822
|
value: input.packages
|
|
780
|
-
})) && input.packages.map((elem,
|
|
781
|
-
path: _path + ".packages[" +
|
|
823
|
+
})) && input.packages.map((elem, _index21) => "string" === typeof elem || _report(_exceptionable, {
|
|
824
|
+
path: _path + ".packages[" + _index21 + "]",
|
|
782
825
|
expected: "string",
|
|
783
826
|
value: elem
|
|
784
827
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -812,8 +855,8 @@ const validatePackageJsonText = (() => {
|
|
|
812
855
|
path: _path + ".tags",
|
|
813
856
|
expected: "(Array<string> | undefined)",
|
|
814
857
|
value: input.tags
|
|
815
|
-
})) && input.tags.map((elem,
|
|
816
|
-
path: _path + ".tags[" +
|
|
858
|
+
})) && input.tags.map((elem, _index22) => "string" === typeof elem || _report(_exceptionable, {
|
|
859
|
+
path: _path + ".tags[" + _index22 + "]",
|
|
817
860
|
expected: "string",
|
|
818
861
|
value: elem
|
|
819
862
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -824,8 +867,8 @@ const validatePackageJsonText = (() => {
|
|
|
824
867
|
path: _path + ".includedScripts",
|
|
825
868
|
expected: "(Array<string> | undefined)",
|
|
826
869
|
value: input.includedScripts
|
|
827
|
-
})) && input.includedScripts.map((elem,
|
|
828
|
-
path: _path + ".includedScripts[" +
|
|
870
|
+
})) && input.includedScripts.map((elem, _index23) => "string" === typeof elem || _report(_exceptionable, {
|
|
871
|
+
path: _path + ".includedScripts[" + _index23 + "]",
|
|
829
872
|
expected: "string",
|
|
830
873
|
value: elem
|
|
831
874
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -863,20 +906,20 @@ const validatePackageJsonText = (() => {
|
|
|
863
906
|
path: _path + ".dependsOn",
|
|
864
907
|
expected: "(Array<NxDependsOn> | undefined)",
|
|
865
908
|
value: input.dependsOn
|
|
866
|
-
})) && input.dependsOn.map((elem,
|
|
867
|
-
path: _path + ".dependsOn[" +
|
|
909
|
+
})) && input.dependsOn.map((elem, _index24) => (null !== elem || _report(_exceptionable, {
|
|
910
|
+
path: _path + ".dependsOn[" + _index24 + "]",
|
|
868
911
|
expected: "(NxDependsOnObject | string)",
|
|
869
912
|
value: elem
|
|
870
913
|
})) && (undefined !== elem || _report(_exceptionable, {
|
|
871
|
-
path: _path + ".dependsOn[" +
|
|
914
|
+
path: _path + ".dependsOn[" + _index24 + "]",
|
|
872
915
|
expected: "(NxDependsOnObject | string)",
|
|
873
916
|
value: elem
|
|
874
917
|
})) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
875
|
-
path: _path + ".dependsOn[" +
|
|
918
|
+
path: _path + ".dependsOn[" + _index24 + "]",
|
|
876
919
|
expected: "(NxDependsOnObject | string)",
|
|
877
920
|
value: elem
|
|
878
|
-
})) && _vo9(elem, _path + ".dependsOn[" +
|
|
879
|
-
path: _path + ".dependsOn[" +
|
|
921
|
+
})) && _vo9(elem, _path + ".dependsOn[" + _index24 + "]", true && _exceptionable, _vctx) || _report(_exceptionable, {
|
|
922
|
+
path: _path + ".dependsOn[" + _index24 + "]",
|
|
880
923
|
expected: "(NxDependsOnObject | string)",
|
|
881
924
|
value: elem
|
|
882
925
|
}))).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -887,8 +930,8 @@ const validatePackageJsonText = (() => {
|
|
|
887
930
|
path: _path + ".outputs",
|
|
888
931
|
expected: "(Array<string> | undefined)",
|
|
889
932
|
value: input.outputs
|
|
890
|
-
})) && input.outputs.map((elem,
|
|
891
|
-
path: _path + ".outputs[" +
|
|
933
|
+
})) && input.outputs.map((elem, _index25) => "string" === typeof elem || _report(_exceptionable, {
|
|
934
|
+
path: _path + ".outputs[" + _index25 + "]",
|
|
892
935
|
expected: "string",
|
|
893
936
|
value: elem
|
|
894
937
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -899,20 +942,20 @@ const validatePackageJsonText = (() => {
|
|
|
899
942
|
path: _path + ".inputs",
|
|
900
943
|
expected: "(Array<NxInput> | undefined)",
|
|
901
944
|
value: input.inputs
|
|
902
|
-
})) && input.inputs.map((elem,
|
|
903
|
-
path: _path + ".inputs[" +
|
|
945
|
+
})) && input.inputs.map((elem, _index26) => (null !== elem || _report(_exceptionable, {
|
|
946
|
+
path: _path + ".inputs[" + _index26 + "]",
|
|
904
947
|
expected: "(object | string)",
|
|
905
948
|
value: elem
|
|
906
949
|
})) && (undefined !== elem || _report(_exceptionable, {
|
|
907
|
-
path: _path + ".inputs[" +
|
|
950
|
+
path: _path + ".inputs[" + _index26 + "]",
|
|
908
951
|
expected: "(object | string)",
|
|
909
952
|
value: elem
|
|
910
953
|
})) && ("string" === typeof elem || ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
|
|
911
|
-
path: _path + ".inputs[" +
|
|
954
|
+
path: _path + ".inputs[" + _index26 + "]",
|
|
912
955
|
expected: "(object | string)",
|
|
913
956
|
value: elem
|
|
914
|
-
})) && _vo10(elem, _path + ".inputs[" +
|
|
915
|
-
path: _path + ".inputs[" +
|
|
957
|
+
})) && _vo10(elem, _path + ".inputs[" + _index26 + "]", true && _exceptionable, _vctx) || _report(_exceptionable, {
|
|
958
|
+
path: _path + ".inputs[" + _index26 + "]",
|
|
916
959
|
expected: "(object | string)",
|
|
917
960
|
value: elem
|
|
918
961
|
}))).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -960,8 +1003,8 @@ const validatePackageJsonText = (() => {
|
|
|
960
1003
|
path: _path + ".projects",
|
|
961
1004
|
expected: "(Array<string> | string | undefined)",
|
|
962
1005
|
value: input.projects
|
|
963
|
-
})) && input.projects.map((elem,
|
|
964
|
-
path: _path + ".projects[" +
|
|
1006
|
+
})) && input.projects.map((elem, _index27) => "string" === typeof elem || _report(_exceptionable, {
|
|
1007
|
+
path: _path + ".projects[" + _index27 + "]",
|
|
965
1008
|
expected: "string",
|
|
966
1009
|
value: elem
|
|
967
1010
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1039,7 +1082,7 @@ const isPackageJsonValue = (() => {
|
|
|
1039
1082
|
return true;
|
|
1040
1083
|
return true;
|
|
1041
1084
|
});
|
|
1042
|
-
const _io12 = (input, _vctx = {}) => (undefined === input.github || "object" === typeof input.github && null !== input.github && false === Array.isArray(input.github) && _io13(input.github, _vctx)) && (undefined === input.privateNpm || "object" === typeof input.privateNpm && null !== input.privateNpm && _io20(input.privateNpm, _vctx)) && (undefined === input.secrets || "object" === typeof input.secrets && null !== input.secrets && false === Array.isArray(input.secrets) &&
|
|
1085
|
+
const _io12 = (input, _vctx = {}) => (undefined === input.github || "object" === typeof input.github && null !== input.github && false === Array.isArray(input.github) && _io13(input.github, _vctx)) && (undefined === input.privateNpm || "object" === typeof input.privateNpm && null !== input.privateNpm && _io20(input.privateNpm, _vctx)) && (undefined === input.remoteCache || "object" === typeof input.remoteCache && null !== input.remoteCache && _io21(input.remoteCache, _vctx)) && (undefined === input.secrets || "object" === typeof input.secrets && null !== input.secrets && false === Array.isArray(input.secrets) && _io22(input.secrets, _vctx));
|
|
1043
1086
|
const _io13 = (input, _vctx = {}) => (undefined === input.actionsProvider || "forgejo" === input.actionsProvider || "github" === input.actionsProvider) && (undefined === input.pushBranches || Array.isArray(input.pushBranches) && ("string" === typeof input.pushBranches[0] && 1 <= _stringLength_1._stringLength(input.pushBranches[0]) && (Array.isArray(input.pushBranches.slice(1)) && input.pushBranches.slice(1).every(elem => "string" === typeof elem && 1 <= _stringLength_1._stringLength(elem))))) && (null !== input.runsOn && (undefined === input.runsOn || "string" === typeof input.runsOn || Array.isArray(input.runsOn) && input.runsOn.every(elem => "string" === typeof elem))) && (undefined === input.environments || "object" === typeof input.environments && null !== input.environments && false === Array.isArray(input.environments) && _io14(input.environments, _vctx)) && (undefined === input.deploySecrets || "object" === typeof input.deploySecrets && null !== input.deploySecrets && false === Array.isArray(input.deploySecrets) && _io15(input.deploySecrets, _vctx)) && (undefined === input.e2eSecrets || "object" === typeof input.e2eSecrets && null !== input.e2eSecrets && false === Array.isArray(input.e2eSecrets) && _io15(input.e2eSecrets, _vctx)) && (undefined === input.previewUrls || Array.isArray(input.previewUrls) && input.previewUrls.every(elem => "string" === typeof elem && RegExp(".*\\{stage\\}.*").test(elem))) && (null !== input.macosRunsOn && (undefined === input.macosRunsOn || "string" === typeof input.macosRunsOn || Array.isArray(input.macosRunsOn) && input.macosRunsOn.every(elem => "string" === typeof elem))) && (undefined === input.platformProducer || "object" === typeof input.platformProducer && null !== input.platformProducer && _io16(input.platformProducer, _vctx)) && (undefined === input.sourceCheckouts || Array.isArray(input.sourceCheckouts) && input.sourceCheckouts.every(elem => "object" === typeof elem && null !== elem && _io17(elem, _vctx))) && (undefined === input.cargoCredentials || "object" === typeof input.cargoCredentials && null !== input.cargoCredentials && false === Array.isArray(input.cargoCredentials) && _io18(input.cargoCredentials, _vctx));
|
|
1044
1087
|
const _io14 = (input, _vctx = {}) => (undefined === input.staging || "string" === typeof input.staging) && (undefined === input.production || "string" === typeof input.production);
|
|
1045
1088
|
const _io15 = (input, _vctx = {}) => Object.keys(input).every(key => {
|
|
@@ -1051,7 +1094,7 @@ const isPackageJsonValue = (() => {
|
|
|
1051
1094
|
const _io16 = (input, _vctx = {}) => "linux-cross" === input.kind && "string" === typeof input.preflight && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io1(input.env, _vctx));
|
|
1052
1095
|
const _io17 = (input, _vctx = {}) => "string" === typeof input.path && "string" === typeof input.repository && (undefined === input.ref || "string" === typeof input.ref) && (undefined === input.tokenEnv || "string" === typeof input.tokenEnv);
|
|
1053
1096
|
const _io18 = (input, _vctx = {}) => (undefined === input.gitOrigins || Array.isArray(input.gitOrigins) && input.gitOrigins.every(elem => "object" === typeof elem && null !== elem && _io19(elem, _vctx))) && (undefined === input.registryTokenEnvs || Array.isArray(input.registryTokenEnvs) && input.registryTokenEnvs.every(elem => "string" === typeof elem));
|
|
1054
|
-
const _io19 = (input, _vctx = {}) => "string" === typeof input.origin && "string" === typeof input.tokenEnv && (undefined === input.internalMirror || "string" === typeof input.internalMirror);
|
|
1097
|
+
const _io19 = (input, _vctx = {}) => "string" === typeof input.origin && "string" === typeof input.tokenEnv && (undefined === input.internalMirror || "string" === typeof input.internalMirror) && (undefined === input.sshOrigins || Array.isArray(input.sshOrigins) && input.sshOrigins.every(elem => "string" === typeof elem));
|
|
1055
1098
|
const _io2 = (input, _vctx = {}) => (_vctx.io2 || (_vctx.io2 = new WeakSet())).has(input) ? true : (_vctx.io2.add(input), (Object.keys(input).every(key => {
|
|
1056
1099
|
const value = input[key];
|
|
1057
1100
|
if (undefined === value)
|
|
@@ -1059,13 +1102,14 @@ const isPackageJsonValue = (() => {
|
|
|
1059
1102
|
return null === value || undefined === value || "string" === typeof value || "object" === typeof value && null !== value && false === Array.isArray(value) && _io2(value, _vctx);
|
|
1060
1103
|
})) || (_vctx.io2.delete(input), false));
|
|
1061
1104
|
const _io20 = (input, _vctx = {}) => "string" === typeof input.scope && (undefined === input.readTokenEnv || "string" === typeof input.readTokenEnv) && (undefined === input.publishTokenEnv || "string" === typeof input.publishTokenEnv);
|
|
1062
|
-
const _io21 = (input, _vctx = {}) =>
|
|
1105
|
+
const _io21 = (input, _vctx = {}) => "string" === typeof input.server && (undefined === input.internalServer || "string" === typeof input.internalServer) && ("string" === typeof input.tokenSecret && (1 <= _stringLength_1._stringLength(input.tokenSecret) && RegExp("^(?![Gg][Ii][Tt][Hh][Uu][Bb]_)").test(input.tokenSecret)));
|
|
1106
|
+
const _io22 = (input, _vctx = {}) => Object.keys(input).every(key => {
|
|
1063
1107
|
const value = input[key];
|
|
1064
1108
|
if (undefined === value)
|
|
1065
1109
|
return true;
|
|
1066
|
-
return "object" === typeof value && null !== value &&
|
|
1110
|
+
return "object" === typeof value && null !== value && _io23(value, _vctx);
|
|
1067
1111
|
});
|
|
1068
|
-
const
|
|
1112
|
+
const _io23 = (input, _vctx = {}) => Array.isArray(input.command) && ("string" === typeof input.command[0] && (Array.isArray(input.command.slice(1)) && input.command.slice(1).every(elem => "string" === typeof elem)));
|
|
1069
1113
|
const _io3 = (input, _vctx = {}) => undefined === input.packages || Array.isArray(input.packages) && input.packages.every(elem => "string" === typeof elem);
|
|
1070
1114
|
const _io4 = (input, _vctx = {}) => (undefined === input.access || "string" === typeof input.access) && (undefined === input.registry || "string" === typeof input.registry);
|
|
1071
1115
|
const _io5 = (input, _vctx = {}) => (undefined === input.type || "string" === typeof input.type) && (undefined === input.url || "string" === typeof input.url) && (undefined === input.directory || "string" === typeof input.directory);
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The one command this policy shells out to, behind a seam. `cargo hakari
|
|
3
|
+
* verify` is the only authority on whether a generated workspace-hack still
|
|
4
|
+
* unifies what the workspace resolves today; nothing in these files can answer
|
|
5
|
+
* that. Tests supply their own so the policy stays runnable without the binary.
|
|
6
|
+
*/
|
|
7
|
+
export interface CargoHakariShell {
|
|
8
|
+
run(directory: string, args: readonly string[]): {
|
|
9
|
+
code: number;
|
|
10
|
+
output: string;
|
|
11
|
+
missing: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface CargoPolicyOptions {
|
|
15
|
+
/** Injected in tests; production shells out to the real `cargo hakari`. */
|
|
16
|
+
shell?: CargoHakariShell;
|
|
17
|
+
}
|
|
18
|
+
export declare function validateCargoCachePolicy(root: string, options?: CargoPolicyOptions): number;
|
|
19
|
+
/**
|
|
20
|
+
* The fix `smoo monorepo update` applies for the policy above: write the
|
|
21
|
+
* nightly resolver configuration, or generate and wire the workspace-hack a
|
|
22
|
+
* stable toolchain needs. Both are idempotent — the second run of either does
|
|
23
|
+
* nothing — because update runs on every repository, not only broken ones.
|
|
24
|
+
*/
|
|
25
|
+
export declare function applyCargoFeatureUnification(root: string, options?: CargoPolicyOptions): void;
|
|
2
26
|
//# sourceMappingURL=cargo-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cargo-policy.d.ts","sourceRoot":"","sources":["../../src/monorepo/cargo-policy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cargo-policy.d.ts","sourceRoot":"","sources":["../../src/monorepo/cargo-policy.ts"],"names":[],"mappings":"AAyFA;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;CACrG;AAusBD,MAAM,WAAW,kBAAkB;IACjC,2EAA2E;IAC3E,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,MAAM,CAwD/F;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,IAAI,CA8BjG"}
|