@lambdaorm/cli 1.4.9

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 (240) hide show
  1. package/LICENSE/home/runner/work/core/core/LICENSE +9 -0
  2. package/README.md +337 -0
  3. package/application/cli.d.ts +17 -0
  4. package/application/cli.d.ts.map +1 -0
  5. package/application/cli.js +22 -0
  6. package/application/cli.js.map +1 -0
  7. package/application/helper.d.ts +16 -0
  8. package/application/helper.d.ts.map +1 -0
  9. package/application/helper.js +51 -0
  10. package/application/helper.js.map +1 -0
  11. package/application/index.d.ts +28 -0
  12. package/application/index.d.ts.map +1 -0
  13. package/application/index.js +44 -0
  14. package/application/index.js.map +1 -0
  15. package/application/ports/language.d.ts +7 -0
  16. package/application/ports/language.d.ts.map +1 -0
  17. package/application/ports/language.js +3 -0
  18. package/application/ports/language.js.map +1 -0
  19. package/application/ports/orm.d.ts +97 -0
  20. package/application/ports/orm.d.ts.map +1 -0
  21. package/application/ports/orm.js +3 -0
  22. package/application/ports/orm.js.map +1 -0
  23. package/application/ports/workspace.d.ts +8 -0
  24. package/application/ports/workspace.d.ts.map +1 -0
  25. package/application/ports/workspace.js +3 -0
  26. package/application/ports/workspace.js.map +1 -0
  27. package/application/services/languages.d.ts +8 -0
  28. package/application/services/languages.d.ts.map +1 -0
  29. package/application/services/languages.js +21 -0
  30. package/application/services/languages.js.map +1 -0
  31. package/application/services/outputService.d.ts +6 -0
  32. package/application/services/outputService.d.ts.map +1 -0
  33. package/application/services/outputService.js +48 -0
  34. package/application/services/outputService.js.map +1 -0
  35. package/application/useCases/build.d.ts +8 -0
  36. package/application/useCases/build.d.ts.map +1 -0
  37. package/application/useCases/build.js +20 -0
  38. package/application/useCases/build.js.map +1 -0
  39. package/application/useCases/constraints.d.ts +7 -0
  40. package/application/useCases/constraints.d.ts.map +1 -0
  41. package/application/useCases/constraints.js +29 -0
  42. package/application/useCases/constraints.js.map +1 -0
  43. package/application/useCases/drop.d.ts +7 -0
  44. package/application/useCases/drop.d.ts.map +1 -0
  45. package/application/useCases/drop.js +27 -0
  46. package/application/useCases/drop.js.map +1 -0
  47. package/application/useCases/execute.d.ts +7 -0
  48. package/application/useCases/execute.d.ts.map +1 -0
  49. package/application/useCases/execute.js +31 -0
  50. package/application/useCases/execute.js.map +1 -0
  51. package/application/useCases/export.d.ts +7 -0
  52. package/application/useCases/export.d.ts.map +1 -0
  53. package/application/useCases/export.js +31 -0
  54. package/application/useCases/export.js.map +1 -0
  55. package/application/useCases/fetch.d.ts +7 -0
  56. package/application/useCases/fetch.d.ts.map +1 -0
  57. package/application/useCases/fetch.js +26 -0
  58. package/application/useCases/fetch.js.map +1 -0
  59. package/application/useCases/import.d.ts +7 -0
  60. package/application/useCases/import.d.ts.map +1 -0
  61. package/application/useCases/import.js +30 -0
  62. package/application/useCases/import.js.map +1 -0
  63. package/application/useCases/incorporate.d.ts +7 -0
  64. package/application/useCases/incorporate.d.ts.map +1 -0
  65. package/application/useCases/incorporate.js +31 -0
  66. package/application/useCases/incorporate.js.map +1 -0
  67. package/application/useCases/init.d.ts +8 -0
  68. package/application/useCases/init.d.ts.map +1 -0
  69. package/application/useCases/init.js +15 -0
  70. package/application/useCases/init.js.map +1 -0
  71. package/application/useCases/introspect.d.ts +7 -0
  72. package/application/useCases/introspect.d.ts.map +1 -0
  73. package/application/useCases/introspect.js +31 -0
  74. package/application/useCases/introspect.js.map +1 -0
  75. package/application/useCases/metadata.d.ts +7 -0
  76. package/application/useCases/metadata.d.ts.map +1 -0
  77. package/application/useCases/metadata.js +29 -0
  78. package/application/useCases/metadata.js.map +1 -0
  79. package/application/useCases/model.d.ts +7 -0
  80. package/application/useCases/model.d.ts.map +1 -0
  81. package/application/useCases/model.js +29 -0
  82. package/application/useCases/model.js.map +1 -0
  83. package/application/useCases/parameters.d.ts +7 -0
  84. package/application/useCases/parameters.d.ts.map +1 -0
  85. package/application/useCases/parameters.js +29 -0
  86. package/application/useCases/parameters.js.map +1 -0
  87. package/application/useCases/plan.d.ts +7 -0
  88. package/application/useCases/plan.d.ts.map +1 -0
  89. package/application/useCases/plan.js +30 -0
  90. package/application/useCases/plan.js.map +1 -0
  91. package/application/useCases/pull.d.ts +7 -0
  92. package/application/useCases/pull.d.ts.map +1 -0
  93. package/application/useCases/pull.js +26 -0
  94. package/application/useCases/pull.js.map +1 -0
  95. package/application/useCases/push.d.ts +7 -0
  96. package/application/useCases/push.d.ts.map +1 -0
  97. package/application/useCases/push.js +27 -0
  98. package/application/useCases/push.js.map +1 -0
  99. package/application/useCases/schema.d.ts +7 -0
  100. package/application/useCases/schema.d.ts.map +1 -0
  101. package/application/useCases/schema.js +83 -0
  102. package/application/useCases/schema.js.map +1 -0
  103. package/application/useCases/version.d.ts +7 -0
  104. package/application/useCases/version.d.ts.map +1 -0
  105. package/application/useCases/version.js +15 -0
  106. package/application/useCases/version.js.map +1 -0
  107. package/application/useCases/versionGlobal.d.ts +7 -0
  108. package/application/useCases/versionGlobal.d.ts.map +1 -0
  109. package/application/useCases/versionGlobal.js +14 -0
  110. package/application/useCases/versionGlobal.js.map +1 -0
  111. package/doc.index.d.ts +2 -0
  112. package/doc.index.d.ts.map +1 -0
  113. package/doc.index.js +18 -0
  114. package/doc.index.js.map +1 -0
  115. package/index.d.ts +3 -0
  116. package/index.d.ts.map +1 -0
  117. package/index.js +39 -0
  118. package/index.js.map +1 -0
  119. package/infrastructure/builders/facade.d.ts +6 -0
  120. package/infrastructure/builders/facade.d.ts.map +1 -0
  121. package/infrastructure/builders/facade.js +31 -0
  122. package/infrastructure/builders/facade.js.map +1 -0
  123. package/infrastructure/builders/usesCases.d.ts +21 -0
  124. package/infrastructure/builders/usesCases.d.ts.map +1 -0
  125. package/infrastructure/builders/usesCases.js +26 -0
  126. package/infrastructure/builders/usesCases.js.map +1 -0
  127. package/infrastructure/command/build.d.ts +26 -0
  128. package/infrastructure/command/build.d.ts.map +1 -0
  129. package/infrastructure/command/build.js +82 -0
  130. package/infrastructure/command/build.js.map +1 -0
  131. package/infrastructure/command/constraints.d.ts +18 -0
  132. package/infrastructure/command/constraints.d.ts.map +1 -0
  133. package/infrastructure/command/constraints.js +57 -0
  134. package/infrastructure/command/constraints.js.map +1 -0
  135. package/infrastructure/command/drop.d.ts +20 -0
  136. package/infrastructure/command/drop.d.ts.map +1 -0
  137. package/infrastructure/command/drop.js +66 -0
  138. package/infrastructure/command/drop.js.map +1 -0
  139. package/infrastructure/command/execute.d.ts +22 -0
  140. package/infrastructure/command/execute.d.ts.map +1 -0
  141. package/infrastructure/command/execute.js +67 -0
  142. package/infrastructure/command/execute.js.map +1 -0
  143. package/infrastructure/command/export.d.ts +20 -0
  144. package/infrastructure/command/export.d.ts.map +1 -0
  145. package/infrastructure/command/export.js +56 -0
  146. package/infrastructure/command/export.js.map +1 -0
  147. package/infrastructure/command/fetch.d.ts +18 -0
  148. package/infrastructure/command/fetch.d.ts.map +1 -0
  149. package/infrastructure/command/fetch.js +51 -0
  150. package/infrastructure/command/fetch.js.map +1 -0
  151. package/infrastructure/command/import.d.ts +18 -0
  152. package/infrastructure/command/import.d.ts.map +1 -0
  153. package/infrastructure/command/import.js +52 -0
  154. package/infrastructure/command/import.js.map +1 -0
  155. package/infrastructure/command/incorporate.d.ts +20 -0
  156. package/infrastructure/command/incorporate.d.ts.map +1 -0
  157. package/infrastructure/command/incorporate.js +56 -0
  158. package/infrastructure/command/incorporate.js.map +1 -0
  159. package/infrastructure/command/init.d.ts +20 -0
  160. package/infrastructure/command/init.d.ts.map +1 -0
  161. package/infrastructure/command/init.js +58 -0
  162. package/infrastructure/command/init.js.map +1 -0
  163. package/infrastructure/command/introspect.d.ts +20 -0
  164. package/infrastructure/command/introspect.d.ts.map +1 -0
  165. package/infrastructure/command/introspect.js +56 -0
  166. package/infrastructure/command/introspect.js.map +1 -0
  167. package/infrastructure/command/metadata.d.ts +18 -0
  168. package/infrastructure/command/metadata.d.ts.map +1 -0
  169. package/infrastructure/command/metadata.js +57 -0
  170. package/infrastructure/command/metadata.js.map +1 -0
  171. package/infrastructure/command/model.d.ts +18 -0
  172. package/infrastructure/command/model.d.ts.map +1 -0
  173. package/infrastructure/command/model.js +57 -0
  174. package/infrastructure/command/model.js.map +1 -0
  175. package/infrastructure/command/parameters.d.ts +18 -0
  176. package/infrastructure/command/parameters.d.ts.map +1 -0
  177. package/infrastructure/command/parameters.js +57 -0
  178. package/infrastructure/command/parameters.js.map +1 -0
  179. package/infrastructure/command/plan.d.ts +20 -0
  180. package/infrastructure/command/plan.d.ts.map +1 -0
  181. package/infrastructure/command/plan.js +62 -0
  182. package/infrastructure/command/plan.js.map +1 -0
  183. package/infrastructure/command/pull.d.ts +16 -0
  184. package/infrastructure/command/pull.d.ts.map +1 -0
  185. package/infrastructure/command/pull.js +46 -0
  186. package/infrastructure/command/pull.js.map +1 -0
  187. package/infrastructure/command/push.d.ts +18 -0
  188. package/infrastructure/command/push.d.ts.map +1 -0
  189. package/infrastructure/command/push.js +51 -0
  190. package/infrastructure/command/push.js.map +1 -0
  191. package/infrastructure/command/schema.d.ts +18 -0
  192. package/infrastructure/command/schema.d.ts.map +1 -0
  193. package/infrastructure/command/schema.js +51 -0
  194. package/infrastructure/command/schema.js.map +1 -0
  195. package/infrastructure/command/version.d.ts +12 -0
  196. package/infrastructure/command/version.d.ts.map +1 -0
  197. package/infrastructure/command/version.js +42 -0
  198. package/infrastructure/command/version.js.map +1 -0
  199. package/infrastructure/index.d.ts +18 -0
  200. package/infrastructure/index.d.ts.map +1 -0
  201. package/infrastructure/index.js +34 -0
  202. package/infrastructure/index.js.map +1 -0
  203. package/infrastructure/languages/clientNode.d.ts +10 -0
  204. package/infrastructure/languages/clientNode.d.ts.map +1 -0
  205. package/infrastructure/languages/clientNode.js +95 -0
  206. package/infrastructure/languages/clientNode.js.map +1 -0
  207. package/infrastructure/languages/index.d.ts +3 -0
  208. package/infrastructure/languages/index.d.ts.map +1 -0
  209. package/infrastructure/languages/index.js +19 -0
  210. package/infrastructure/languages/index.js.map +1 -0
  211. package/infrastructure/languages/node.d.ts +55 -0
  212. package/infrastructure/languages/node.d.ts.map +1 -0
  213. package/infrastructure/languages/node.js +313 -0
  214. package/infrastructure/languages/node.js.map +1 -0
  215. package/infrastructure/orm/adapters/lib.d.ts +64 -0
  216. package/infrastructure/orm/adapters/lib.d.ts.map +1 -0
  217. package/infrastructure/orm/adapters/lib.js +166 -0
  218. package/infrastructure/orm/adapters/lib.js.map +1 -0
  219. package/infrastructure/orm/adapters/rest.d.ts +64 -0
  220. package/infrastructure/orm/adapters/rest.d.ts.map +1 -0
  221. package/infrastructure/orm/adapters/rest.js +191 -0
  222. package/infrastructure/orm/adapters/rest.js.map +1 -0
  223. package/infrastructure/orm/factory.d.ts +6 -0
  224. package/infrastructure/orm/factory.d.ts.map +1 -0
  225. package/infrastructure/orm/factory.js +18 -0
  226. package/infrastructure/orm/factory.js.map +1 -0
  227. package/infrastructure/workspace/adapters/client.d.ts +11 -0
  228. package/infrastructure/workspace/adapters/client.d.ts.map +1 -0
  229. package/infrastructure/workspace/adapters/client.js +38 -0
  230. package/infrastructure/workspace/adapters/client.js.map +1 -0
  231. package/infrastructure/workspace/adapters/local.d.ts +10 -0
  232. package/infrastructure/workspace/adapters/local.d.ts.map +1 -0
  233. package/infrastructure/workspace/adapters/local.js +26 -0
  234. package/infrastructure/workspace/adapters/local.js.map +1 -0
  235. package/infrastructure/workspace/factory.d.ts +9 -0
  236. package/infrastructure/workspace/factory.d.ts.map +1 -0
  237. package/infrastructure/workspace/factory.js +20 -0
  238. package/infrastructure/workspace/factory.js.map +1 -0
  239. package/jest-config.json +24 -0
  240. package/package.json +48 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/import.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,qDAA+C;AAC/C,oDAA2B;AAE3B,MAAa,aAAa;IAA1B;QACC,YAAO,GAAG,QAAQ,CAAA;QAClB,aAAQ,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AG,CAAC,CAAA;IACnD,CAAC;CACD;AAzCD,sCAyCC"}
@@ -0,0 +1,20 @@
1
+ import { CommandModule, Argv, Arguments } from 'yargs';
2
+ export declare class IncorporateCommand implements CommandModule {
3
+ command: string;
4
+ describe: string;
5
+ builder(args: Argv): Argv<{
6
+ w: unknown;
7
+ } & {
8
+ u: unknown;
9
+ } & {
10
+ s: unknown;
11
+ } & {
12
+ e: unknown;
13
+ } & {
14
+ d: unknown;
15
+ } & {
16
+ n: unknown;
17
+ }>;
18
+ handler(args: Arguments): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=incorporate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incorporate.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/incorporate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,qBAAa,kBAAmB,YAAW,aAAa;IACvD,OAAO,SAAgB;IACvB,QAAQ,SAAmD;IAE3D,OAAO,CAAE,IAAI,EAAE,IAAI;;;;;;;;;;;;;IA4Bb,OAAO,CAAE,IAAI,EAAE,SAAS;CAY9B"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.IncorporateCommand = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const usesCases_1 = require("../builders/usesCases");
9
+ class IncorporateCommand {
10
+ constructor() {
11
+ this.command = 'incorporate';
12
+ this.describe = 'Update schema and push source and import data.';
13
+ }
14
+ builder(args) {
15
+ return args
16
+ .option('w', {
17
+ alias: 'workspace',
18
+ describe: 'project path'
19
+ })
20
+ .option('u', {
21
+ alias: 'url',
22
+ describe: 'Url of service'
23
+ })
24
+ .option('s', {
25
+ alias: 'stage',
26
+ describe: 'Name of stage'
27
+ })
28
+ .option('e', {
29
+ alias: 'envfile',
30
+ describe: 'Read in a file of environment variables'
31
+ })
32
+ .option('d', {
33
+ alias: 'data',
34
+ describe: 'Data file to incorporate'
35
+ })
36
+ .option('n', {
37
+ alias: 'name',
38
+ describe: 'Name of root entity'
39
+ });
40
+ }
41
+ async handler(args) {
42
+ const workspace = path_1.default.resolve(process.cwd(), args.workspace || '.');
43
+ const url = args.url;
44
+ const stage = args.stage;
45
+ const data = args.data || {};
46
+ const name = args.name;
47
+ try {
48
+ await usesCases_1.incorporate.execute(workspace, data, name, stage, url);
49
+ }
50
+ catch (error) {
51
+ console.error(`error: ${error}`);
52
+ }
53
+ }
54
+ }
55
+ exports.IncorporateCommand = IncorporateCommand;
56
+ //# sourceMappingURL=incorporate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incorporate.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/incorporate.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,qDAAmD;AAEnD,MAAa,kBAAkB;IAA/B;QACC,YAAO,GAAG,aAAa,CAAA;QACvB,aAAQ,GAAG,gDAAgD,CAAA;IA0C5D,CAAC;IAxCA,OAAO,CAAE,IAAU;QAClB,OAAO,IAAI;aACT,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,cAAc;SACxB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,gBAAgB;SAC1B,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,eAAe;SACzB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,yCAAyC;SACnD,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,0BAA0B;SACpC,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,qBAAqB;SAC/B,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAE,IAAe;QAC7B,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,SAAmB,IAAI,GAAG,CAAC,CAAA;QAC9E,MAAM,GAAG,GAAG,IAAI,CAAC,GAAuB,CAAA;QACxC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAA;QAClC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAA;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAA;QAChC,IAAI,CAAC;YACJ,MAAM,uBAAW,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;QAC7D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAA;QACjC,CAAC;IACF,CAAC;CACD;AA5CD,gDA4CC"}
@@ -0,0 +1,20 @@
1
+ import { CommandModule, Argv, Arguments } from 'yargs';
2
+ export declare class InitCommand implements CommandModule {
3
+ command: string;
4
+ describe: string;
5
+ builder(args: Argv): Argv<{
6
+ w: string;
7
+ } & {
8
+ s: unknown;
9
+ } & {
10
+ d: unknown;
11
+ } & {
12
+ c: unknown;
13
+ } & {
14
+ "data-path": unknown;
15
+ } & {
16
+ u: unknown;
17
+ }>;
18
+ handler(args: Arguments): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,qBAAa,WAAY,YAAW,aAAa;IAChD,OAAO,SAAS;IAChB,QAAQ,SAA2C;IAEnD,OAAO,CAAE,IAAI,EAAE,IAAI;;;;;;;;;;;;;IA6Bb,OAAO,CAAE,IAAI,EAAE,SAAS;CAc9B"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InitCommand = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const usesCases_1 = require("../builders/usesCases");
9
+ class InitCommand {
10
+ constructor() {
11
+ this.command = 'init';
12
+ this.describe = 'Generates lambdaorm project structure.';
13
+ }
14
+ builder(args) {
15
+ return args
16
+ .option('w', {
17
+ alias: 'workspace',
18
+ default: 'my-project',
19
+ describe: 'project path.'
20
+ })
21
+ .option('s', {
22
+ alias: 'source',
23
+ describe: 'Name of data source.'
24
+ })
25
+ .option('d', {
26
+ alias: 'dialect',
27
+ describe: 'Database type you\'ll use in your project.'
28
+ })
29
+ .option('c', {
30
+ alias: 'connection',
31
+ describe: 'string connection to database'
32
+ })
33
+ .option('data-path', {
34
+ alias: 'dataPath',
35
+ describe: 'relative data path in workspace'
36
+ })
37
+ .option('u', {
38
+ alias: 'url',
39
+ describe: 'Url of service.'
40
+ });
41
+ }
42
+ async handler(args) {
43
+ try {
44
+ const workspace = path_1.default.resolve(process.cwd(), args.workspace || '.');
45
+ const source = args.source;
46
+ const dialect = args.dialect;
47
+ const connection = args.connection;
48
+ const dataPath = args.dataPath;
49
+ const url = args.url;
50
+ await usesCases_1.init.execute({ workspace, source, dialect: dialect, connection, dataPath, url });
51
+ }
52
+ catch (error) {
53
+ console.error(`error: ${error}`);
54
+ }
55
+ }
56
+ }
57
+ exports.InitCommand = InitCommand;
58
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","s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AAC,GAAuB,CAAA;YAExC,MAAM,gBAAI,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAG,OAAmB,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;QACpG,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAA;QACjC,CAAC;IACF,CAAC;CACD;AA/CD,kCA+CC"}
@@ -0,0 +1,20 @@
1
+ import { CommandModule, Argv, Arguments } from 'yargs';
2
+ export declare class IntrospectCommand implements CommandModule {
3
+ command: string;
4
+ describe: string;
5
+ builder(args: Argv): Argv<{
6
+ w: unknown;
7
+ } & {
8
+ u: unknown;
9
+ } & {
10
+ s: unknown;
11
+ } & {
12
+ e: unknown;
13
+ } & {
14
+ d: unknown;
15
+ } & {
16
+ n: unknown;
17
+ }>;
18
+ handler(args: Arguments): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=introspect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspect.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/introspect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,qBAAa,iBAAkB,YAAW,aAAa;IACtD,OAAO,SAAe;IACtB,QAAQ,SAA6C;IAErD,OAAO,CAAE,IAAI,EAAE,IAAI;;;;;;;;;;;;;IA4Bb,OAAO,CAAE,IAAI,EAAE,SAAS;CAY9B"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.IntrospectCommand = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const usesCases_1 = require("../builders/usesCases");
9
+ class IntrospectCommand {
10
+ constructor() {
11
+ this.command = 'introspect';
12
+ this.describe = 'Read and analyze data and update schemas';
13
+ }
14
+ builder(args) {
15
+ return args
16
+ .option('w', {
17
+ alias: 'workspace',
18
+ describe: 'project path'
19
+ })
20
+ .option('u', {
21
+ alias: 'url',
22
+ describe: 'Url of service.'
23
+ })
24
+ .option('s', {
25
+ alias: 'stage',
26
+ describe: 'Name of stage'
27
+ })
28
+ .option('e', {
29
+ alias: 'envfile',
30
+ describe: 'Read in a file of environment variables'
31
+ })
32
+ .option('d', {
33
+ alias: 'data',
34
+ describe: 'Data file to introspect.'
35
+ })
36
+ .option('n', {
37
+ alias: 'name',
38
+ describe: 'Name of root entity'
39
+ });
40
+ }
41
+ async handler(args) {
42
+ const workspace = path_1.default.resolve(process.cwd(), args.workspace || '.');
43
+ const data = args.data || {};
44
+ const name = args.name;
45
+ const url = args.url;
46
+ const stage = args.stage;
47
+ try {
48
+ await usesCases_1.introspect.execute(workspace, data, name, stage, url);
49
+ }
50
+ catch (error) {
51
+ console.error(`error: ${error}`);
52
+ }
53
+ }
54
+ }
55
+ exports.IntrospectCommand = IntrospectCommand;
56
+ //# sourceMappingURL=introspect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspect.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/introspect.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,qDAAkD;AAElD,MAAa,iBAAiB;IAA9B;QACC,YAAO,GAAG,YAAY,CAAA;QACtB,aAAQ,GAAG,0CAA0C,CAAA;IA0CtD,CAAC;IAxCA,OAAO,CAAE,IAAU;QAClB,OAAO,IAAI;aACT,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,cAAc;SACxB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,iBAAiB;SAC3B,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,eAAe;SACzB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,yCAAyC;SACnD,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,0BAA0B;SACpC,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,qBAAqB;SAC/B,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAE,IAAe;QAC7B,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,SAAmB,IAAI,GAAG,CAAC,CAAA;QAC9E,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAA;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAA;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAuB,CAAA;QACxC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAA;QAClC,IAAI,CAAC;YACJ,MAAM,sBAAU,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;QAC5D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAA;QACjC,CAAC;IACF,CAAC;CACD;AA5CD,8CA4CC"}
@@ -0,0 +1,18 @@
1
+ import { CommandModule, Argv, Arguments } from 'yargs';
2
+ export declare class MetadataCommand implements CommandModule {
3
+ command: string;
4
+ describe: string;
5
+ builder(args: Argv): Argv<{
6
+ w: unknown;
7
+ } & {
8
+ q: unknown;
9
+ } & {
10
+ e: unknown;
11
+ } & {
12
+ o: unknown;
13
+ } & {
14
+ u: unknown;
15
+ }>;
16
+ handler(args: Arguments): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/metadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtD,qBAAa,eAAgB,YAAW,aAAa;IACpD,OAAO,SAAa;IACpB,QAAQ,SAA8C;IAEtD,OAAO,CAAE,IAAI,EAAE,IAAI;;;;;;;;;;;IAwBb,OAAO,CAAE,IAAI,EAAE,SAAS;CAiB9B"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MetadataCommand = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const usesCases_1 = require("../builders/usesCases");
9
+ const dotenv_1 = __importDefault(require("dotenv"));
10
+ class MetadataCommand {
11
+ constructor() {
12
+ this.command = 'metadata';
13
+ this.describe = 'Return metadata associated with the query';
14
+ }
15
+ builder(args) {
16
+ return args
17
+ .option('w', {
18
+ alias: 'workspace',
19
+ describe: 'project path'
20
+ })
21
+ .option('q', {
22
+ alias: 'query',
23
+ describe: 'Query expression'
24
+ })
25
+ .option('e', {
26
+ alias: 'envfile',
27
+ describe: 'Read in a file of environment variables'
28
+ })
29
+ .option('o', {
30
+ alias: 'output',
31
+ describe: 'Generates an output according to the following possible values [json|beautiful|light|yaml]'
32
+ })
33
+ .option('u', {
34
+ alias: 'url',
35
+ describe: 'Url of service.'
36
+ });
37
+ }
38
+ async handler(args) {
39
+ const workspace = path_1.default.resolve(process.cwd(), args.workspace || '.');
40
+ const query = args.query;
41
+ const output = args.output;
42
+ const envfile = args.envfile;
43
+ const url = args.url;
44
+ if (envfile) {
45
+ const fullPath = path_1.default.resolve(process.cwd(), envfile);
46
+ dotenv_1.default.config({ path: fullPath, override: true });
47
+ }
48
+ try {
49
+ await usesCases_1.metadata.execute(workspace, query, output, url);
50
+ }
51
+ catch (error) {
52
+ console.error(`error: ${error}`);
53
+ }
54
+ }
55
+ }
56
+ exports.MetadataCommand = MetadataCommand;
57
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/metadata.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,qDAAgD;AAChD,oDAA2B;AAE3B,MAAa,eAAe;IAA5B;QACC,YAAO,GAAG,UAAU,CAAA;QACpB,aAAQ,GAAG,2CAA2C,CAAA;IA2CvD,CAAC;IAzCA,OAAO,CAAE,IAAU;QAClB,OAAO,IAAI;aACT,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,cAAc;SACxB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,kBAAkB;SAC5B,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,yCAAyC;SACnD,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,4FAA4F;SACtG,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,iBAAiB;SAC3B,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAE,IAAe;QAC7B,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,SAAmB,IAAI,GAAG,CAAC,CAAA;QAC9E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAA;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAiB,CAAA;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAuB,CAAA;QAExC,IAAI,OAAO,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAA;YACrD,gBAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;QAClD,CAAC;QACD,IAAI,CAAC;YACJ,MAAM,oBAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAA;QACjC,CAAC;IACF,CAAC;CACD;AA7CD,0CA6CC"}
@@ -0,0 +1,18 @@
1
+ import { CommandModule, Argv, Arguments } from 'yargs';
2
+ export declare class ModelCommand implements CommandModule {
3
+ command: string;
4
+ describe: string;
5
+ builder(args: Argv): Argv<{
6
+ w: unknown;
7
+ } & {
8
+ q: unknown;
9
+ } & {
10
+ e: unknown;
11
+ } & {
12
+ o: unknown;
13
+ } & {
14
+ u: unknown;
15
+ }>;
16
+ handler(args: Arguments): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtD,qBAAa,YAAa,YAAW,aAAa;IACjD,OAAO,SAAU;IACjB,QAAQ,SAA8D;IAEtE,OAAO,CAAE,IAAI,EAAE,IAAI;;;;;;;;;;;IAwBb,OAAO,CAAE,IAAI,EAAE,SAAS;CAiB9B"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ModelCommand = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const usesCases_1 = require("../builders/usesCases");
9
+ const dotenv_1 = __importDefault(require("dotenv"));
10
+ class ModelCommand {
11
+ constructor() {
12
+ this.command = 'model';
13
+ this.describe = 'Return model that will be returned in the query execution';
14
+ }
15
+ builder(args) {
16
+ return args
17
+ .option('w', {
18
+ alias: 'workspace',
19
+ describe: 'project path'
20
+ })
21
+ .option('q', {
22
+ alias: 'query',
23
+ describe: 'Query expression'
24
+ })
25
+ .option('e', {
26
+ alias: 'envfile',
27
+ describe: 'Read in a file of environment variables'
28
+ })
29
+ .option('o', {
30
+ alias: 'output',
31
+ describe: 'Generates an output according to the following possible values [json|beautiful|light|yaml]'
32
+ })
33
+ .option('u', {
34
+ alias: 'url',
35
+ describe: 'Url of service.'
36
+ });
37
+ }
38
+ async handler(args) {
39
+ const workspace = path_1.default.resolve(process.cwd(), args.workspace || '.');
40
+ const query = args.query;
41
+ const output = args.output;
42
+ const envfile = args.envfile;
43
+ const url = args.url;
44
+ if (envfile) {
45
+ const fullPath = path_1.default.resolve(process.cwd(), envfile);
46
+ dotenv_1.default.config({ path: fullPath, override: true });
47
+ }
48
+ try {
49
+ await usesCases_1.model.execute(workspace, query, output, url);
50
+ }
51
+ catch (error) {
52
+ console.error(`error: ${error}`);
53
+ }
54
+ }
55
+ }
56
+ exports.ModelCommand = ModelCommand;
57
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/model.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,qDAA6C;AAC7C,oDAA2B;AAE3B,MAAa,YAAY;IAA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,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAA;QACjC,CAAC;IACF,CAAC;CACD;AA7CD,oCA6CC"}
@@ -0,0 +1,18 @@
1
+ import { CommandModule, Argv, Arguments } from 'yargs';
2
+ export declare class ParametersCommand implements CommandModule {
3
+ command: string;
4
+ describe: string;
5
+ builder(args: Argv): Argv<{
6
+ w: unknown;
7
+ } & {
8
+ q: unknown;
9
+ } & {
10
+ e: unknown;
11
+ } & {
12
+ o: unknown;
13
+ } & {
14
+ u: unknown;
15
+ }>;
16
+ handler(args: Arguments): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/parameters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtD,qBAAa,iBAAkB,YAAW,aAAa;IACtD,OAAO,SAAe;IACtB,QAAQ,SAAgD;IAExD,OAAO,CAAE,IAAI,EAAE,IAAI;;;;;;;;;;;IAwBb,OAAO,CAAE,IAAI,EAAE,SAAS;CAiB9B"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ParametersCommand = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const usesCases_1 = require("../builders/usesCases");
9
+ const dotenv_1 = __importDefault(require("dotenv"));
10
+ class ParametersCommand {
11
+ constructor() {
12
+ this.command = 'parameters';
13
+ this.describe = 'Return parameters associated with the query';
14
+ }
15
+ builder(args) {
16
+ return args
17
+ .option('w', {
18
+ alias: 'workspace',
19
+ describe: 'project path'
20
+ })
21
+ .option('q', {
22
+ alias: 'query',
23
+ describe: 'Query expression'
24
+ })
25
+ .option('e', {
26
+ alias: 'envfile',
27
+ describe: 'Read in a file of environment variables'
28
+ })
29
+ .option('o', {
30
+ alias: 'output',
31
+ describe: 'Generates an output according to the following possible values [json|beautiful|light|yaml]'
32
+ })
33
+ .option('u', {
34
+ alias: 'url',
35
+ describe: 'Url of service.'
36
+ });
37
+ }
38
+ async handler(args) {
39
+ const workspace = path_1.default.resolve(process.cwd(), args.workspace || '.');
40
+ const query = args.query;
41
+ const output = args.output;
42
+ const envfile = args.envfile;
43
+ const url = args.url;
44
+ if (envfile) {
45
+ const fullPath = path_1.default.resolve(process.cwd(), envfile);
46
+ dotenv_1.default.config({ path: fullPath, override: true });
47
+ }
48
+ try {
49
+ await usesCases_1.parameters.execute(workspace, query, output, url);
50
+ }
51
+ catch (error) {
52
+ console.error(`error: ${error}`);
53
+ }
54
+ }
55
+ }
56
+ exports.ParametersCommand = ParametersCommand;
57
+ //# sourceMappingURL=parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/parameters.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,qDAAkD;AAClD,oDAA2B;AAE3B,MAAa,iBAAiB;IAA9B;QACC,YAAO,GAAG,YAAY,CAAA;QACtB,aAAQ,GAAG,6CAA6C,CAAA;IA2CzD,CAAC;IAzCA,OAAO,CAAE,IAAU;QAClB,OAAO,IAAI;aACT,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,cAAc;SACxB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,kBAAkB;SAC5B,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,yCAAyC;SACnD,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,4FAA4F;SACtG,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,iBAAiB;SAC3B,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAE,IAAe;QAC7B,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,SAAmB,IAAI,GAAG,CAAC,CAAA;QAC9E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAA;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAiB,CAAA;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAuB,CAAA;QAExC,IAAI,OAAO,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAA;YACrD,gBAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;QAClD,CAAC;QACD,IAAI,CAAC;YACJ,MAAM,sBAAU,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;QACxD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAA;QACjC,CAAC;IACF,CAAC;CACD;AA7CD,8CA6CC"}
@@ -0,0 +1,20 @@
1
+ import { CommandModule, Argv, Arguments } from 'yargs';
2
+ export declare class PlanCommand implements CommandModule {
3
+ command: string;
4
+ describe: string;
5
+ builder(args: Argv): Argv<{
6
+ w: unknown;
7
+ } & {
8
+ s: unknown;
9
+ } & {
10
+ q: unknown;
11
+ } & {
12
+ e: unknown;
13
+ } & {
14
+ o: unknown;
15
+ } & {
16
+ u: unknown;
17
+ }>;
18
+ handler(args: Arguments): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/plan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtD,qBAAa,WAAY,YAAW,aAAa;IAChD,OAAO,SAAS;IAChB,QAAQ,SAAmC;IAE3C,OAAO,CAAE,IAAI,EAAE,IAAI;;;;;;;;;;;;;IA4Bb,OAAO,CAAE,IAAI,EAAE,SAAS;CAkB9B"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PlanCommand = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const usesCases_1 = require("../builders/usesCases");
9
+ const dotenv_1 = __importDefault(require("dotenv"));
10
+ class PlanCommand {
11
+ constructor() {
12
+ this.command = 'plan';
13
+ this.describe = 'Return plan execution of query';
14
+ }
15
+ builder(args) {
16
+ return args
17
+ .option('w', {
18
+ alias: 'workspace',
19
+ describe: 'project path'
20
+ })
21
+ .option('s', {
22
+ alias: 'stage',
23
+ describe: 'Name of stage'
24
+ })
25
+ .option('q', {
26
+ alias: 'query',
27
+ describe: 'Query expression'
28
+ })
29
+ .option('e', {
30
+ alias: 'envfile',
31
+ describe: 'Read in a file of environment variables'
32
+ })
33
+ .option('o', {
34
+ alias: 'output',
35
+ describe: 'Generates an output according to the following possible values [json|beautiful|light|yaml]'
36
+ })
37
+ .option('u', {
38
+ alias: 'url',
39
+ describe: 'Url of service.'
40
+ });
41
+ }
42
+ async handler(args) {
43
+ const workspace = path_1.default.resolve(process.cwd(), args.workspace || '.');
44
+ const query = args.query;
45
+ const stage = args.stage;
46
+ const output = args.output;
47
+ const envfile = args.envfile;
48
+ const url = args.url;
49
+ if (envfile) {
50
+ const fullPath = path_1.default.resolve(process.cwd(), envfile);
51
+ dotenv_1.default.config({ path: fullPath, override: true });
52
+ }
53
+ try {
54
+ await usesCases_1.plan.execute(workspace, query, stage, output, url);
55
+ }
56
+ catch (error) {
57
+ console.error(`error: ${error}`);
58
+ }
59
+ }
60
+ }
61
+ exports.PlanCommand = PlanCommand;
62
+ //# sourceMappingURL=plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/plan.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,qDAA4C;AAC5C,oDAA2B;AAE3B,MAAa,WAAW;IAAxB;QACC,YAAO,GAAG,MAAM,CAAA;QAChB,aAAQ,GAAG,gCAAgC,CAAA;IAgD5C,CAAC;IA9CA,OAAO,CAAE,IAAU;QAClB,OAAO,IAAI;aACT,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,cAAc;SACxB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,eAAe;SACzB,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,kBAAkB;SAC5B,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,yCAAyC;SACnD,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,4FAA4F;SACtG,CAAC;aACD,MAAM,CAAC,GAAG,EAAE;YACZ,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,iBAAiB;SAC3B,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAE,IAAe;QAC7B,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,SAAmB,IAAI,GAAG,CAAC,CAAA;QAC9E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAA;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAA;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAiB,CAAA;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAuB,CAAA;QAExC,IAAI,OAAO,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAA;YACrD,gBAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;QAClD,CAAC;QACD,IAAI,CAAC;YACJ,MAAM,gBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;QACzD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAA;QACjC,CAAC;IACF,CAAC;CACD;AAlDD,kCAkDC"}
@@ -0,0 +1,16 @@
1
+ import { CommandModule, Argv, Arguments } from 'yargs';
2
+ export declare class PullCommand implements CommandModule {
3
+ command: string;
4
+ describe: string;
5
+ builder(args: Argv): Argv<{
6
+ w: unknown;
7
+ } & {
8
+ u: unknown;
9
+ } & {
10
+ e: unknown;
11
+ } & {
12
+ s: unknown;
13
+ }>;
14
+ handler(args: Arguments): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=pull.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../../src/lib/infrastructure/command/pull.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,qBAAa,WAAY,YAAW,aAAa;IAChD,OAAO,SAAS;IAChB,QAAQ,SAAoC;IAE5C,OAAO,CAAE,IAAI,EAAE,IAAI;;;;;;;;;IAoBb,OAAO,CAAE,IAAI,EAAE,SAAS;CAU9B"}