@genesislcap/build-kit 14.173.1 → 14.173.2

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.
@@ -1,6 +1,6 @@
1
1
  import inquirer from 'inquirer';
2
2
  export declare const runPrompts: (prompts: any, prevAns?: any) => Promise<any>;
3
- export declare const validateSeedData: (data: any, validators: any) => any[];
3
+ export declare const validateSeedData: (data: any, validators: any, defaults: any) => any[];
4
4
  export declare const getPromptDefaults: (prompts: any) => Promise<inquirer.Question<inquirer.Answers>>;
5
5
  export declare const getPromptValidators: (prompts: any) => Promise<inquirer.Question<inquirer.Answers>>;
6
6
  export declare const getData: (persistedAnswers: any, prompts: any, details: any, defaults: any, validate: any, params: any, dir: any, skipOptionalPrompts: any, seedMeta: any) => Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC,eAAO,MAAM,UAAU,YAAmB,GAAG,YAAW,GAAG,iBAAoC,CAAC;AAEhG,eAAO,MAAM,gBAAgB,uCAkB5B,CAAC;AAwBF,eAAO,MAAM,iBAAiB,gEAqB7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,gEAS/B,CAAC;AA8CF,eAAO,MAAM,OAAO,mKA+BnB,CAAC"}
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC,eAAO,MAAM,UAAU,YAAmB,GAAG,YAAW,GAAG,iBAAoC,CAAC;AAEhG,eAAO,MAAM,gBAAgB,sDAkB5B,CAAC;AAwBF,eAAO,MAAM,iBAAiB,gEAqB7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,gEAS/B,CAAC;AA8CF,eAAO,MAAM,OAAO,mKA+BnB,CAAC"}
@@ -8,14 +8,14 @@ const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
8
8
  const console_1 = require("./console");
9
9
  const runPrompts = (prompts, prevAns = {}) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return prompts(inquirer_1.default, prevAns); });
10
10
  exports.runPrompts = runPrompts;
11
- const validateSeedData = (data, validators) => {
11
+ const validateSeedData = (data, validators, defaults) => {
12
12
  const errors = [];
13
13
  Object.keys(data).forEach((key) => {
14
14
  const value = data[key];
15
15
  if (typeof value === 'undefined') {
16
16
  errors.push({ message: `${key} is undefined` });
17
17
  }
18
- else if (value === '') {
18
+ else if (value === '' && defaults[key] !== '') {
19
19
  errors.push({ message: `${key} is empty` });
20
20
  }
21
21
  else if (validators[key]) {
@@ -12,7 +12,7 @@ const loadSeed = (dir) => tslib_1.__awaiter(void 0, void 0, void 0, function* ()
12
12
  const { prompts, configure, details } = require(genxConfigPath);
13
13
  const defaults = yield (0, prompts_1.getPromptDefaults)(prompts());
14
14
  const validators = yield (0, prompts_1.getPromptValidators)(prompts());
15
- const validate = (data) => (0, prompts_1.validateSeedData)(data, validators);
15
+ const validate = (data) => (0, prompts_1.validateSeedData)(data, validators, defaults);
16
16
  return {
17
17
  prompts: prompts(),
18
18
  configure: configure(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/build-kit",
3
3
  "description": "Build utilities & types",
4
- "version": "14.173.1",
4
+ "version": "14.173.2",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@esbuild-kit/cjs-loader": "2.4.2",
39
- "@genesislcap/foundation-testing": "14.173.1",
39
+ "@genesislcap/foundation-testing": "14.173.2",
40
40
  "@types/http-proxy": "^1.17.8",
41
41
  "@types/node": "^20.8.7",
42
42
  "tsm": "^2.2.1",
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "f5103964572a3612e77c069dd8b41cec6980d89f"
54
+ "gitHead": "71fc144405128ebf0c1009b8cce36ec0df8252e8"
55
55
  }