configorama 0.9.12 → 0.9.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.
Files changed (39) hide show
  1. package/README.md +1 -0
  2. package/cli.js +46 -8
  3. package/package.json +1 -17
  4. package/src/main.js +23 -9
  5. package/src/parsers/index.js +3 -1
  6. package/src/parsers/markdown.js +69 -0
  7. package/src/parsers/markdown.test.js +132 -0
  8. package/src/resolvers/valueFromGit.js +27 -24
  9. package/src/resolvers/valueFromNumber.js +10 -1
  10. package/src/types.d.ts +1 -1
  11. package/src/utils/handleSignalEvents.js +1 -5
  12. package/src/utils/lodash.js +72 -18
  13. package/src/utils/parsing/cloudformationSchema.js +5 -10
  14. package/src/utils/parsing/getValueAtPath.js +111 -0
  15. package/src/utils/parsing/getValueAtPath.test.js +152 -0
  16. package/src/utils/parsing/parse.js +21 -0
  17. package/src/utils/regex/index.js +5 -0
  18. package/src/utils/ui/configWizard.js +4 -4
  19. package/src/utils/validation/warnIfNotFound.js +5 -1
  20. package/src/utils/variables/cleanVariable.js +1 -3
  21. package/types/src/main.d.ts +2 -0
  22. package/types/src/main.d.ts.map +1 -1
  23. package/types/src/parsers/markdown.d.ts +17 -0
  24. package/types/src/parsers/markdown.d.ts.map +1 -0
  25. package/types/src/resolvers/valueFromGit.d.ts.map +1 -1
  26. package/types/src/resolvers/valueFromNumber.d.ts +10 -2
  27. package/types/src/resolvers/valueFromNumber.d.ts.map +1 -1
  28. package/types/src/utils/handleSignalEvents.d.ts.map +1 -1
  29. package/types/src/utils/lodash.d.ts +50 -3
  30. package/types/src/utils/lodash.d.ts.map +1 -1
  31. package/types/src/utils/parsing/getValueAtPath.d.ts +18 -0
  32. package/types/src/utils/parsing/getValueAtPath.d.ts.map +1 -0
  33. package/types/src/utils/parsing/parse.d.ts.map +1 -1
  34. package/types/src/utils/regex/index.d.ts +2 -0
  35. package/types/src/utils/regex/index.d.ts.map +1 -1
  36. package/types/src/utils/validation/warnIfNotFound.d.ts +4 -0
  37. package/types/src/utils/validation/warnIfNotFound.d.ts.map +1 -1
  38. package/types/src/utils/variables/cleanVariable.d.ts +1 -1
  39. package/types/src/utils/variables/cleanVariable.d.ts.map +1 -1
@@ -0,0 +1,18 @@
1
+ export = getValueAtPath;
2
+ /**
3
+ * Get value from object/array at jq-style path
4
+ * @param {*} data - Object or array to extract from
5
+ * @param {string} path - jq-style path like '.foo.bar[0]'
6
+ * @returns {*} Value at path or undefined if not found
7
+ */
8
+ declare function getValueAtPath(data: any, path: string): any;
9
+ declare namespace getValueAtPath {
10
+ export { parsePath };
11
+ }
12
+ /**
13
+ * Parse a jq-style path string into an array of keys/indices
14
+ * @param {string} path - jq-style path like '.foo.bar[0]' or '.["key"]'
15
+ * @returns {(string|number)[]} Array of path segments
16
+ */
17
+ declare function parsePath(path: string): (string | number)[];
18
+ //# sourceMappingURL=getValueAtPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getValueAtPath.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/getValueAtPath.js"],"names":[],"mappings":";AAwEA;;;;;GAKG;AACH,sCAJW,GAAC,QACD,MAAM,GACJ,GAAC,CA+Bb;;;;AAzGD;;;;GAIG;AACH,iCAHW,MAAM,GACJ,CAAC,MAAM,GAAC,MAAM,CAAC,EAAE,CAiE7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/parse.js"],"names":[],"mappings":";;;;cAgBc,MAAM;;;;cACN,MAAM;;;;eACN,MAAM;;;;kBACN,cAAe;;;;;;eA8Gf,MAAM;;;;kBACN,cAAe;;AApH7B;;;;;;GAMG;AAEH;;;;GAIG;AACH,iFAHW,YAAY,OAqGtB;AAED;;;;GAIG;AAEH;;;;;GAKG;AACH,oCAJW,MAAM,SACN,gBAAgB,OAW1B"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/utils/parsing/parse.js"],"names":[],"mappings":";;;;cAgBc,MAAM;;;;cACN,MAAM;;;;eACN,MAAM;;;;kBACN,cAAe;;;;;;eAmIf,MAAM;;;;kBACN,cAAe;;AAzI7B;;;;;;GAMG;AAEH;;;;GAIG;AACH,iFAHW,YAAY,OA0HtB;AAED;;;;GAIG;AAEH;;;;;GAKG;AACH,oCAJW,MAAM,SACN,gBAAgB,OAW1B"}
@@ -10,6 +10,8 @@ export namespace funcRegex {
10
10
  export const funcRegexSimple: RegExp;
11
11
  export const funcStartOfLineRegex: RegExp;
12
12
  export const subFunctionRegex: RegExp;
13
+ export const fileRefSyntax: RegExp;
14
+ export const textRefSyntax: RegExp;
13
15
  /**
14
16
  * Combine multiple regex patterns into single OR pattern
15
17
  * @param {RegExp[]} regexes - Array of regex patterns to combine
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/regex/index.js"],"names":[],"mappings":";;IA+EQ,wCAAwC;;IAGpC,mCAAkC;;AAlF9C;;GAEG;AAGH,qCAA0D;AAC1D,0CAAgE;AAChE,sCAAiE;AA8EjE;;;;GAIG;AACH,wCAHW,MAAM,EAAE,GACN,MAAM,CAKlB;AApFD;;;;;;GAMG;AACH,uCAHW,MAAM,GACJ,GAAG,CAyDf"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/regex/index.js"],"names":[],"mappings":";;IA+EQ,wCAAwC;;IAGpC,mCAAkC;;AAlF9C;;GAEG;AAGH,qCAA0D;AAC1D,0CAAgE;AAChE,sCAAiE;AAwFjE,mCAA2E;AAC3E,mCAA2E;AAX3E;;;;GAIG;AACH,wCAHW,MAAM,EAAE,GACN,MAAM,CAKlB;AApFD;;;;;;GAMG;AACH,uCAHW,MAAM,GACJ,GAAG,CAyDf"}
@@ -11,5 +11,9 @@ export function warnIfNotFound(variableString: string, valueToPopulate: any, opt
11
11
  patterns?: object;
12
12
  debug?: boolean;
13
13
  }): any;
14
+ /**
15
+ * @param {*} val
16
+ * @returns {boolean}
17
+ */
14
18
  export function isValidValue(val: any): boolean;
15
19
  //# sourceMappingURL=warnIfNotFound.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"warnIfNotFound.d.ts","sourceRoot":"","sources":["../../../../src/utils/validation/warnIfNotFound.js"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AACH,+CAPW,MAAM,mBACN,GAAC,YAET;IAAyB,QAAQ,GAAzB,MAAM;IACY,KAAK,GAAvB,OAAO;CACf,GAAU,GAAC,CA2Bb;AAzCD,gDAKC"}
1
+ {"version":3,"file":"warnIfNotFound.d.ts","sourceRoot":"","sources":["../../../../src/utils/validation/warnIfNotFound.js"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AACH,+CAPW,MAAM,mBACN,GAAC,YAET;IAAyB,QAAQ,GAAzB,MAAM;IACY,KAAK,GAAvB,OAAO;CACf,GAAU,GAAC,CA2Bb;AA7CD;;;GAGG;AACH,kCAHW,GAAC,GACC,OAAO,CAOnB"}
@@ -1,3 +1,3 @@
1
- declare function _exports(match: any, variableSyntax: any, simple: any, caller: any, recursive?: boolean): any;
1
+ declare function _exports(match: any, variableSyntax: any, simple: any, caller: any, recursive?: boolean): string;
2
2
  export = _exports;
3
3
  //# sourceMappingURL=cleanVariable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cleanVariable.d.ts","sourceRoot":"","sources":["../../../../src/utils/variables/cleanVariable.js"],"names":[],"mappings":"AAYiB,+GAuEhB"}
1
+ {"version":3,"file":"cleanVariable.d.ts","sourceRoot":"","sources":["../../../../src/utils/variables/cleanVariable.js"],"names":[],"mappings":"AAUiB,2GAFJ,MAAM,CAyElB"}