@genesislcap/foundation-cli 14.436.0-FUI-2489.2 → 14.437.0
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/plop/generators/dslApp/create.d.ts.map +1 -1
- package/dist/plop/generators/dslApp/create.js +2 -1
- package/dist/plop/generators/generatorChain.d.ts.map +1 -1
- package/dist/plop/generators/generatorChain.js +1 -2
- package/dist/plop/prompts/app.d.ts.map +1 -1
- package/dist/plop/prompts/app.js +3 -2
- package/dist/plop/prompts/dsl.d.ts.map +1 -1
- package/dist/plop/prompts/dsl.js +2 -1
- package/dist/plop/validators/index.d.ts.map +1 -1
- package/dist/plop/validators/index.js +5 -5
- package/dist/task-runtime/task.d.ts.map +1 -1
- package/dist/task-runtime/task.js +15 -10
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/plop/generators/dslApp/create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/plop/generators/dslApp/create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAyBhD,eAAO,MAAM,qBAAqB,EAAE,mBAqDnC,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.createDslAppGenerator = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
6
|
const types_1 = require("../../../types");
|
|
7
|
+
const types_2 = require("../../../types");
|
|
7
8
|
const utils_1 = require("../../../utils");
|
|
8
9
|
const fileSystem_1 = require("../../actions/fileSystem");
|
|
9
10
|
const npm_1 = require("../../actions/npm");
|
|
@@ -31,7 +32,7 @@ exports.createDslAppGenerator = {
|
|
|
31
32
|
prevAns = applyRuntimeArgs(prevAns);
|
|
32
33
|
const seedList = (yield (0, tasks_1.downloadSeedList)('apps')).filter((seed) => { var _a; return (_a = seed.tags) === null || _a === void 0 ? void 0 : _a.includes(types_1.DslTag); });
|
|
33
34
|
if (seedList.length === 0) {
|
|
34
|
-
throw new Error(`No compatible ${
|
|
35
|
+
throw new Error(`No compatible ${types_2.dslName.toLowerCase()} seeds found, unable to proceed.`);
|
|
35
36
|
}
|
|
36
37
|
let { appDirectory, appName, appSeed } = yield (0, dsl_1.default)(inquirer, prevAns, seedList);
|
|
37
38
|
appSeed = yield (0, normalizers_1.seedSelectionNormalizer)(inquirer, appSeed);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatorChain.d.ts","sourceRoot":"","sources":["../../../src/plop/generators/generatorChain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGtE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,WAAW,EACjB,aAAa,MAAM,EACnB,YAAY,mBAAmB,EAAE,EACjC,SAAS,MAAM,EAAE,EACjB,UAAS,OAAoB,KAC5B,
|
|
1
|
+
{"version":3,"file":"generatorChain.d.ts","sourceRoot":"","sources":["../../../src/plop/generators/generatorChain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGtE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,WAAW,EACjB,aAAa,MAAM,EACnB,YAAY,mBAAmB,EAAE,EACjC,SAAS,MAAM,EAAE,EACjB,UAAS,OAAoB,KAC5B,mBAoBF,CAAC;AAKF,eAAO,MAAM,sBAAsB,GAAI,WAAW,mBAAmB,wBAAc,CAAC"}
|
|
@@ -23,15 +23,14 @@ const generatorChain = (plop, description, generators, bypass, actions = [' Done
|
|
|
23
23
|
/**
|
|
24
24
|
* The answers from one iteration are used as previous answers input to the next, so we need to turn this rule off.
|
|
25
25
|
*/
|
|
26
|
+
/* eslint-disable no-await-in-loop */
|
|
26
27
|
prompts(inquirer_1) {
|
|
27
28
|
return tslib_1.__awaiter(this, arguments, void 0, function* (inquirer, prevAns = {}) {
|
|
28
29
|
let allAns = Object.assign({}, prevAns);
|
|
29
|
-
/* oxlint-disable no-await-in-loop -- plop generators must run in order with merged answers */
|
|
30
30
|
for (const generator of generators) {
|
|
31
31
|
const [data, outcome] = yield generator_1.GeneratorActions.run(generator, allAns, plop, bypass);
|
|
32
32
|
allAns = Object.assign(Object.assign({}, allAns), data);
|
|
33
33
|
}
|
|
34
|
-
/* oxlint-enable no-await-in-loop */
|
|
35
34
|
return allAns;
|
|
36
35
|
});
|
|
37
36
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/plop/prompts/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAc,WAAW,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/plop/prompts/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAc,WAAW,EAAE,MAAM,aAAa,CAAC;AAOtD,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;yBAGC,UAAU,QAAQ,EAClB,SAAS,OAAO,CAAC,OAAO,CAAM,EAC9B,UAAU,WAAW,EAAE,KACtB,OAAO,CAAC,OAAO,CAAC;AAJnB,wBA0DE"}
|
package/dist/plop/prompts/app.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const seeds_1 = require("../../seeds");
|
|
5
|
+
const seeds_2 = require("../../seeds");
|
|
5
6
|
const store_1 = require("../../store");
|
|
6
7
|
const utils_1 = require("../../utils");
|
|
7
8
|
const messages_1 = require("../messages");
|
|
@@ -40,8 +41,8 @@ exports.default = (inquirer_1, ...args_1) => tslib_1.__awaiter(void 0, [inquirer
|
|
|
40
41
|
name: 'seedDelivery',
|
|
41
42
|
type: 'list',
|
|
42
43
|
message: 'Seed delivery (Cloning requires an SSH key with a blank passphrase configured for your account)',
|
|
43
|
-
default:
|
|
44
|
-
choices: [
|
|
44
|
+
default: seeds_2.SeedDelivery.download,
|
|
45
|
+
choices: [seeds_2.SeedDelivery.download, seeds_2.SeedDelivery.clone],
|
|
45
46
|
when: (data) => !store_1.configStore.values.external && data.appSeed.type !== seeds_1.SeedSource.local,
|
|
46
47
|
},
|
|
47
48
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsl.d.ts","sourceRoot":"","sources":["../../../src/plop/prompts/dsl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"dsl.d.ts","sourceRoot":"","sources":["../../../src/plop/prompts/dsl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;CACtB;yBAGC,UAAU,QAAQ,EAClB,SAAS,OAAO,CAAC,OAAO,CAAM,EAC9B,UAAU,WAAW,EAAE,KACtB,OAAO,CAAC,OAAO,CAAC;AAJnB,wBA+CE"}
|
package/dist/plop/prompts/dsl.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const utils_1 = require("../../utils");
|
|
5
|
+
const utils_2 = require("../../utils");
|
|
5
6
|
const messages_1 = require("../messages");
|
|
6
7
|
const validators_1 = require("../validators");
|
|
7
8
|
exports.default = (inquirer_1, ...args_1) => tslib_1.__awaiter(void 0, [inquirer_1, ...args_1], void 0, function* (inquirer, prevAns = {}, seedList) {
|
|
@@ -32,7 +33,7 @@ exports.default = (inquirer_1, ...args_1) => tslib_1.__awaiter(void 0, [inquirer
|
|
|
32
33
|
name: 'appSeed',
|
|
33
34
|
type: 'list',
|
|
34
35
|
message: 'App seed',
|
|
35
|
-
choices: (0,
|
|
36
|
+
choices: (0, utils_2.mapToSeedChoices)(seedList),
|
|
36
37
|
},
|
|
37
38
|
]);
|
|
38
39
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plop/validators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plop/validators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,CAAC;AAajD,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,KAAG,iBACwD,CAAC;AAElG,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,iBAW3C,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,OAAO,EAAE,KAAG,iBACS,CAAC;AAE1D,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,KAAG,iBAGL,CAAC;AAElD,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,KAAG,iBACU,CAAC;AAElE,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,KAAG,iBAEuE,CAAC;AAEjH,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,iBACI,CAAC;AAExD,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,iBACY,CAAC;AAE/D,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,iBACM,CAAC;AAE3D,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,KAAG,iBACkB,CAAC"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.baseDsPackageValidator = exports.npmPackageValidator = exports.npmTokenValidator = exports.websocketValidator = exports.password = exports.jfrogUsernameValidator = exports.githubUsernameOrEmail = exports.atLeastOne = exports.dslSafeName = exports.safeName = void 0;
|
|
4
4
|
const reservedWords_1 = require("./reservedWords");
|
|
5
|
-
const safeNameRegex = /^([a-zA-Z0-9
|
|
5
|
+
const safeNameRegex = /^([a-zA-Z0-9\-]+)$/;
|
|
6
6
|
const leadingNumberRegex = /^([0-9])/;
|
|
7
7
|
const githubUsernameRegex = /^([a-z\d]+-)*[a-z\d]+$/i;
|
|
8
|
-
const jfrogUsernameRegex = /^([a-zA-Z0-
|
|
9
|
-
const emailAddressRegex = /^([\w_
|
|
8
|
+
const jfrogUsernameRegex = /^([a-zA-Z0-9\_\-\.\@]+)$/i;
|
|
9
|
+
const emailAddressRegex = /^([\w_\.\-\+])+\@([\w\-]+\.)+([\w]{2,10})+$/;
|
|
10
10
|
const passwordRegex = /((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/;
|
|
11
|
-
const websocketRegex = /wss?:\/\/[-a-zA-Z0-9@:%._
|
|
12
|
-
const npmTokenRegex = /^([a-zA-Z0-
|
|
11
|
+
const websocketRegex = /wss?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\b\/*$/;
|
|
12
|
+
const npmTokenRegex = /^([a-zA-Z0-9\_]+)$/;
|
|
13
13
|
const npmPackageRegex = /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;
|
|
14
14
|
const safeName = (value) => safeNameRegex.test(value) || 'Name cannot have spaces or special characters other than dashes.';
|
|
15
15
|
exports.safeName = safeName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/task-runtime/task.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,qBAAa,IAAI;IAOb,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAPvB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA8C;IAClE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IAEnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAGd,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,QAAQ,EAC/B,OAAO,GAAE,MAAM,EAAO;IA8CxB;;OAEG;IACH,OAAO,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/task-runtime/task.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,qBAAa,IAAI;IAOb,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAPvB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA8C;IAClE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IAEnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAGd,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,QAAQ,EAC/B,OAAO,GAAE,MAAM,EAAO;IA8CxB;;OAEG;IACH,OAAO,CAAC,OAAO;IAyCf;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAmBrB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAsC1B;;OAEG;IACH,OAAO,KAAK,QAAQ,GAEnB;IAED,OAAO,CAAC,GAAG;IAIX,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,KAAK;IAoCb,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,cAAc;CAQvB"}
|
|
@@ -68,12 +68,17 @@ class Task {
|
|
|
68
68
|
for (const exec of execs) {
|
|
69
69
|
let hasError = false;
|
|
70
70
|
const cwd = step.cwd;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
try {
|
|
72
|
+
const result = this.shell({
|
|
73
|
+
command: exec.command,
|
|
74
|
+
label: exec.label,
|
|
75
|
+
cwd,
|
|
76
|
+
});
|
|
77
|
+
hasError = result.status !== 0;
|
|
78
|
+
}
|
|
79
|
+
catch (e) {
|
|
80
|
+
throw e;
|
|
81
|
+
}
|
|
77
82
|
if (hasError) {
|
|
78
83
|
throw new Error(`Task "${this.fullname}" failed when executing command "${exec.command}" (cwd: ${(0, path_1.resolve)(cwd !== null && cwd !== void 0 ? cwd : this.workdir)})`);
|
|
79
84
|
}
|
|
@@ -111,14 +116,14 @@ class Task {
|
|
|
111
116
|
* command and obtaining its result.
|
|
112
117
|
*/
|
|
113
118
|
resolveEnvironment(parents) {
|
|
114
|
-
var _a, _b, _c, _d;
|
|
119
|
+
var _a, _b, _c, _d, _e, _f;
|
|
115
120
|
let env = (_a = this.runtime.manifest.env) !== null && _a !== void 0 ? _a : {};
|
|
116
121
|
// add env from all parent tasks one by one
|
|
117
122
|
for (const parent of parents) {
|
|
118
|
-
env = Object.assign(Object.assign({}, env), (_b = this.runtime.tryFindTask(parent)) === null || _b === void 0 ? void 0 : _b.env);
|
|
123
|
+
env = Object.assign(Object.assign({}, env), ((_c = (_b = this.runtime.tryFindTask(parent)) === null || _b === void 0 ? void 0 : _b.env) !== null && _c !== void 0 ? _c : {}));
|
|
119
124
|
}
|
|
120
125
|
// apply the task's environment last
|
|
121
|
-
env = Object.assign(Object.assign({}, env), this.task.env);
|
|
126
|
+
env = Object.assign(Object.assign({}, env), ((_d = this.task.env) !== null && _d !== void 0 ? _d : {}));
|
|
122
127
|
const output = {};
|
|
123
128
|
for (const [key, value] of Object.entries(env !== null && env !== void 0 ? env : {})) {
|
|
124
129
|
if (value.startsWith('$(') && value.endsWith(')')) {
|
|
@@ -127,7 +132,7 @@ class Task {
|
|
|
127
132
|
if (result.status !== 0) {
|
|
128
133
|
const error = result.error
|
|
129
134
|
? result.error.stack
|
|
130
|
-
: ((
|
|
135
|
+
: ((_f = (_e = result.stderr) === null || _e === void 0 ? void 0 : _e.toString()) !== null && _f !== void 0 ? _f : 'unknown error');
|
|
131
136
|
throw new Error(`unable to evaluate environment variable ${key}=${value}: ${error}`);
|
|
132
137
|
}
|
|
133
138
|
output[key] = result.stdout.toString('utf-8').trim();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-cli",
|
|
3
3
|
"description": "Genesis Foundation CLI",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.437.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"foundation-cli": "./bin/foundation-cli.js"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@genesislcap/foundation-ui": "14.
|
|
25
|
+
"@genesislcap/foundation-ui": "14.437.0",
|
|
26
26
|
"@types/configstore": "^5.0.1",
|
|
27
27
|
"@types/fs-extra": "^9.0.12",
|
|
28
28
|
"@types/klaw-sync": "^6.0.1",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "c30c777f0ab5e45f4e931a9cc1200ac85bcace35"
|
|
73
73
|
}
|