@imolko/ultra-ddd 1.0.20 → 1.0.21-beta

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 (100) hide show
  1. package/dist-browser/scripts/get-event/constants.d.ts +1 -0
  2. package/dist-browser/scripts/get-event/constants.d.ts.map +1 -1
  3. package/dist-browser/scripts/get-event/constants.js +2 -0
  4. package/dist-browser/scripts/get-event/constants.js.map +1 -1
  5. package/dist-browser/scripts/get-event/generate-track-events.js +2 -2
  6. package/dist-browser/scripts/get-event/generate-track-events.js.map +1 -1
  7. package/dist-browser/scripts/get-event/generate.d.ts.map +1 -1
  8. package/dist-browser/scripts/get-event/generate.js +8 -1
  9. package/dist-browser/scripts/get-event/generate.js.map +1 -1
  10. package/dist-browser/scripts/get-event/get-argv.d.ts.map +1 -1
  11. package/dist-browser/scripts/get-event/get-argv.js +15 -1
  12. package/dist-browser/scripts/get-event/get-argv.js.map +1 -1
  13. package/dist-browser/scripts/get-event/templates/index.d.ts +2 -0
  14. package/dist-browser/scripts/get-event/templates/index.d.ts.map +1 -1
  15. package/dist-browser/scripts/get-event/templates/index.js +2 -0
  16. package/dist-browser/scripts/get-event/templates/index.js.map +1 -1
  17. package/dist-browser/scripts/get-event/templates/package.template.d.ts +8 -0
  18. package/dist-browser/scripts/get-event/templates/package.template.d.ts.map +1 -0
  19. package/dist-browser/scripts/get-event/templates/package.template.js +36 -0
  20. package/dist-browser/scripts/get-event/templates/package.template.js.map +1 -0
  21. package/dist-browser/scripts/get-event/templates/track.template.d.ts +2 -2
  22. package/dist-browser/scripts/get-event/templates/track.template.d.ts.map +1 -1
  23. package/dist-browser/scripts/get-event/templates/track.template.js +4 -4
  24. package/dist-browser/scripts/get-event/templates/track.template.js.map +1 -1
  25. package/dist-browser/scripts/get-event/templates/tsconfig-template.d.ts +3 -0
  26. package/dist-browser/scripts/get-event/templates/tsconfig-template.d.ts.map +1 -0
  27. package/dist-browser/scripts/get-event/templates/tsconfig-template.js +12 -0
  28. package/dist-browser/scripts/get-event/templates/tsconfig-template.js.map +1 -0
  29. package/dist-browser/scripts/get-event/templates/tsconfig.event-track.js.map +1 -1
  30. package/dist-browser/scripts/helpers/create-directory.d.ts +6 -0
  31. package/dist-browser/scripts/helpers/create-directory.d.ts.map +1 -0
  32. package/dist-browser/scripts/helpers/create-directory.js +16 -0
  33. package/dist-browser/scripts/helpers/create-directory.js.map +1 -0
  34. package/dist-browser/scripts/helpers/create-file-one.d.ts +7 -0
  35. package/dist-browser/scripts/helpers/create-file-one.d.ts.map +1 -0
  36. package/dist-browser/scripts/helpers/create-file-one.js +26 -0
  37. package/dist-browser/scripts/helpers/create-file-one.js.map +1 -0
  38. package/dist-browser/scripts/helpers/create-root-file.d.ts.map +1 -1
  39. package/dist-browser/scripts/helpers/create-root-file.js +3 -4
  40. package/dist-browser/scripts/helpers/create-root-file.js.map +1 -1
  41. package/dist-browser/scripts/helpers/get-file.d.ts +5 -0
  42. package/dist-browser/scripts/helpers/get-file.d.ts.map +1 -1
  43. package/dist-browser/scripts/helpers/get-file.js +5 -0
  44. package/dist-browser/scripts/helpers/get-file.js.map +1 -1
  45. package/dist-browser/scripts/helpers/index.d.ts +2 -0
  46. package/dist-browser/scripts/helpers/index.d.ts.map +1 -1
  47. package/dist-browser/scripts/helpers/index.js +2 -0
  48. package/dist-browser/scripts/helpers/index.js.map +1 -1
  49. package/dist-browser/scripts/helpers/update-gitignore.js +3 -3
  50. package/dist-browser/scripts/helpers/update-gitignore.js.map +1 -1
  51. package/dist-node/scripts/get-event/constants.d.ts +1 -0
  52. package/dist-node/scripts/get-event/constants.d.ts.map +1 -1
  53. package/dist-node/scripts/get-event/constants.js +3 -1
  54. package/dist-node/scripts/get-event/constants.js.map +1 -1
  55. package/dist-node/scripts/get-event/generate-track-events.js.map +1 -1
  56. package/dist-node/scripts/get-event/generate.d.ts.map +1 -1
  57. package/dist-node/scripts/get-event/generate.js +10 -0
  58. package/dist-node/scripts/get-event/generate.js.map +1 -1
  59. package/dist-node/scripts/get-event/get-argv.d.ts.map +1 -1
  60. package/dist-node/scripts/get-event/get-argv.js +15 -1
  61. package/dist-node/scripts/get-event/get-argv.js.map +1 -1
  62. package/dist-node/scripts/get-event/templates/index.d.ts +2 -0
  63. package/dist-node/scripts/get-event/templates/index.d.ts.map +1 -1
  64. package/dist-node/scripts/get-event/templates/index.js +2 -0
  65. package/dist-node/scripts/get-event/templates/index.js.map +1 -1
  66. package/dist-node/scripts/get-event/templates/package.template.d.ts +8 -0
  67. package/dist-node/scripts/get-event/templates/package.template.d.ts.map +1 -0
  68. package/dist-node/scripts/get-event/templates/package.template.js +40 -0
  69. package/dist-node/scripts/get-event/templates/package.template.js.map +1 -0
  70. package/dist-node/scripts/get-event/templates/track.template.d.ts +2 -2
  71. package/dist-node/scripts/get-event/templates/track.template.d.ts.map +1 -1
  72. package/dist-node/scripts/get-event/templates/track.template.js +4 -4
  73. package/dist-node/scripts/get-event/templates/track.template.js.map +1 -1
  74. package/dist-node/scripts/get-event/templates/tsconfig-template.d.ts +3 -0
  75. package/dist-node/scripts/get-event/templates/tsconfig-template.d.ts.map +1 -0
  76. package/dist-node/scripts/get-event/templates/tsconfig-template.js +14 -0
  77. package/dist-node/scripts/get-event/templates/tsconfig-template.js.map +1 -0
  78. package/dist-node/scripts/get-event/templates/tsconfig.event-track.js.map +1 -1
  79. package/dist-node/scripts/helpers/create-directory.d.ts +6 -0
  80. package/dist-node/scripts/helpers/create-directory.d.ts.map +1 -0
  81. package/dist-node/scripts/helpers/create-directory.js +43 -0
  82. package/dist-node/scripts/helpers/create-directory.js.map +1 -0
  83. package/dist-node/scripts/helpers/create-file-one.d.ts +7 -0
  84. package/dist-node/scripts/helpers/create-file-one.d.ts.map +1 -0
  85. package/dist-node/scripts/helpers/create-file-one.js +53 -0
  86. package/dist-node/scripts/helpers/create-file-one.js.map +1 -0
  87. package/dist-node/scripts/helpers/create-root-file.d.ts.map +1 -1
  88. package/dist-node/scripts/helpers/create-root-file.js +3 -4
  89. package/dist-node/scripts/helpers/create-root-file.js.map +1 -1
  90. package/dist-node/scripts/helpers/get-file.d.ts +5 -0
  91. package/dist-node/scripts/helpers/get-file.d.ts.map +1 -1
  92. package/dist-node/scripts/helpers/get-file.js +5 -0
  93. package/dist-node/scripts/helpers/get-file.js.map +1 -1
  94. package/dist-node/scripts/helpers/index.d.ts +2 -0
  95. package/dist-node/scripts/helpers/index.d.ts.map +1 -1
  96. package/dist-node/scripts/helpers/index.js +2 -0
  97. package/dist-node/scripts/helpers/index.js.map +1 -1
  98. package/dist-node/scripts/helpers/update-gitignore.js +3 -3
  99. package/dist-node/scripts/helpers/update-gitignore.js.map +1 -1
  100. package/package.json +1 -1
@@ -2,4 +2,5 @@ export declare const DEFAULT_CONTEXT = "default";
2
2
  export declare const OUTPUT_PATH = "./src";
3
3
  export declare const FOLDER_NAME = "events";
4
4
  export declare const TRACK_FILE_NAME = "track-events-script.ts";
5
+ export declare const OUTPUT_PACK = "schemes";
5
6
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,eAAe,2BAA2B,CAAC;AAExD,eAAO,MAAM,WAAW,YAAY,CAAC"}
@@ -6,4 +6,6 @@ export const OUTPUT_PATH = "./src";
6
6
  export const FOLDER_NAME = "events";
7
7
  // Nombre del archivo con el script de eventos
8
8
  export const TRACK_FILE_NAME = 'track-events-script.ts';
9
+ // Ruta en donde se genera el paquete
10
+ export const OUTPUT_PACK = "schemes";
9
11
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/scripts/get-event/constants.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AACzC,0CAA0C;AAC1C,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,kDAAkD;AAClD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC;AACpC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,wBAAwB,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/scripts/get-event/constants.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AACzC,0CAA0C;AAC1C,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,kDAAkD;AAClD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC;AACpC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACxD,qCAAqC;AACrC,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { addImports, createRootFile, ensureDirs, getEventDomain, getNames } from "../helpers";
2
2
  import { DEFAULT_CONTEXT, FOLDER_NAME, TRACK_FILE_NAME } from "./constants";
3
- import template from './templates/track.template';
3
+ import trackTemplate from './templates/track.template';
4
4
  const TEMPLATE = `
5
5
  try {
6
6
  <Artifac>.NAME
@@ -33,7 +33,7 @@ export async function trackEvents(outputPath, contextName = DEFAULT_CONTEXT, fol
33
33
  // Lista de eventos
34
34
  const artifacts = getEventDomain(eventFolder);
35
35
  // Contenido de la plantilla
36
- let templateContent = template;
36
+ let templateContent = trackTemplate;
37
37
  // Reemplazamos el nombre del contexto en la plantilla
38
38
  templateContent = templateContent.replace("<%= context-name %>", contextName.trim());
39
39
  // Reemplazamos los eventos en la plantilla
@@ -1 +1 @@
1
- {"version":3,"file":"generate-track-events.js","sourceRoot":"","sources":["../../../src/scripts/get-event/generate-track-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAElD,MAAM,QAAQ,GAAG;;;;;;UAMP,CAAC;AAEX;;;;;;GAMG;AACH,SAAS,YAAY,CACnB,KAAa,EACb,WAAmB,EACnB,MAAc;IAEd,MAAM,IAAI,GAAG,IAAI,WAAW,QAAQ,MAAM,IAAI,WAAW,IAAI,CAAC;IAC9D,OAAO,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,GAAG,IAAI,wBAAwB,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,UAAkB,EAClB,cAAsB,eAAe,EACrC,aAAqB,WAAW;IAEhC,gCAAgC;IAChC,MAAM,WAAW,GAAG,GAAG,UAAU,IAAI,UAAU,EAAE,CAAC;IAClD,8CAA8C;IAC9C,UAAU,CAAC,WAAW,CAAC,CAAC;IACxB,mBAAmB;IACnB,MAAM,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IAC9C,4BAA4B;IAC5B,IAAI,eAAe,GAAG,QAAQ,CAAC;IAC/B,sDAAsD;IACtD,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,qBAAqB,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IACrF,2CAA2C;IAC3C,KAAK,M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kBAWzB"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/generate.ts"],"names":[],"mappings":";AASA;;;;GAIG;AACH,wBAAsB,IAAI,kBAezB"}
@@ -2,7 +2,10 @@
2
2
  import { getArgv } from "./get-argv";
3
3
  import { trackEvents } from "./generate-track-events";
4
4
  import { copyTsConfig } from "./copy-tsconfig";
5
- import { updateGitignore } from "../helpers";
5
+ import { createFileOnce, updateGitignore } from "../helpers";
6
+ import { OUTPUT_PACK } from "./constants";
7
+ import tsconfigTemplate from "./templates/tsconfig-template";
8
+ import { packageTemplate } from "./templates";
6
9
  /**
7
10
  * Metodo para generar el script para obtener el esquema de los eventos
8
11
  * Genera el script track-events-script.ts y genera el siguiente archivo de configuracion tsconfig.event-track.json
@@ -14,10 +17,14 @@ export async function main() {
14
17
  "**/event-schemes",
15
18
  "**/schemes",
16
19
  "track-events-script.ts",
20
+ "tsconfig.event-track.json"
17
21
  ];
18
22
  const { outputPath, contextName, folderName } = getArgv();
19
23
  await trackEvents(outputPath, contextName, folderName);
20
24
  await copyTsConfig(outputPath);
25
+ createFileOnce(OUTPUT_PACK, tsconfigTemplate, "tsconfig.json");
26
+ const packageContent = packageTemplate(contextName);
27
+ createFileOnce(OUTPUT_PACK, packageContent, "package.json");
21
28
  updateGitignore(pathsToIgnore);
22
29
  }
23
30
  main();
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/scripts/get-event/generate.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI;IACxB,0DAA0D;IAC1D,MAAM,aAAa,GAAG;QACpB,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Ac,EAAE,cAAc,CAAC,CAAA;IAC3D,eAAe,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AACD,IAAI,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-argv.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/get-argv.ts"],"names":[],"mappings":"AAEA,UAAU,UAAU;IAElB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,OAAO,IAAI,UAAU,CAapC"}
1
+ {"version":3,"file":"get-argv.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/get-argv.ts"],"names":[],"mappings":"AAEA,UAAU,UAAU;IAElB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,OAAO,IAAI,UAAU,CA4BpC"}
@@ -4,7 +4,21 @@ import { DEFAULT_CONTEXT, FOLDER_NAME, OUTPUT_PATH } from "./constants";
4
4
  * @returns
5
5
  */
6
6
  export function getArgv() {
7
- let [, , outputPath, contextName, folderName] = process.argv;
7
+ const args = {};
8
+ const argv = process.argv.slice(2); // Obtenemos los argumentos a partir del tercero
9
+ argv.forEach(arg => {
10
+ if (arg.startsWith('--')) {
11
+ const parts = arg.substring(2).split('=');
12
+ if (parts.length === 2 && parts[0]) {
13
+ const key = parts[0];
14
+ const value = parts[1];
15
+ args[key] = value;
16
+ }
17
+ }
18
+ });
19
+ let outputPath = args['output-path'] ? args['output-path'] : args['outputPath'];
20
+ let contextName = args['context-name'] ? args['context-name'] : args['contextName'];
21
+ let folderName = args['folder-name'] ? args['folder-name'] : args['folderName'];
8
22
  // Ruta de salida: por defecto vale ./src
9
23
  outputPath = outputPath ? outputPath : OUTPUT_PATH;
10
24
  // Nombre del contexto
@@ -1 +1 @@
1
- {"version":3,"file":"get-argv.js","sourceRoot":"","sources":["../../../src/scripts/get-event/get-argv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAWxE;;;GAGG;AACH,MAAM,UAAU,OAAO;IACrB,IAAI,CAAC,EAAE,AAAD,EAAG,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7D,yCAAyC;IACzC,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACnD,sBAAsB;IACtB,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC;IAC1D,kDAAkD;IAClD,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACnD,OAAO;QACL,UAAU;QACV,WAAW;QACX,UAAU;KACX,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"get-argv.js","sourceRoot":"","sources":["../../../src/scripts/get-event/get-argv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAWxE;;;GAGG;AACH,MAAM,UAAU,OAAO;IACrB,MAAM,IAAI,GAA0C,EAAE,CAAC;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,gDAAgD;IAEpF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACjB,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnC,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACrB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACpB,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IACH,IAAI,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAChF,IAAI,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACpF,IAAI,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAChF,yCAAyC;IACzC,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACnD,sBAAsB;IACtB,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC;IAC1D,kDAAkD;IAClD,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACnD,OAAO;QACL,UAAU;QACV,WAAW;QACX,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -1,3 +1,5 @@
1
+ export * from './package.template';
1
2
  export * from './track.template';
3
+ export * from './tsconfig-template';
2
4
  export * from './tsconfig.event-track';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"}
@@ -1,3 +1,5 @@
1
+ export * from './package.template';
1
2
  export * from './track.template';
3
+ export * from './tsconfig-template';
2
4
  export * from './tsconfig.event-track';
3
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * genera el contenido del packager.json
3
+ * @param {string} contextName Nombre del contexto
4
+ * @returns {string}
5
+ */
6
+ export declare const packageTemplate: (contextName: string) => string;
7
+ export default packageTemplate;
8
+ //# sourceMappingURL=package.template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.template.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/package.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,eAAe,gBAAiB,MAAM,KAAG,MA4BrD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * genera el contenido del packager.json
3
+ * @param {string} contextName Nombre del contexto
4
+ * @returns {string}
5
+ */
6
+ export const packageTemplate = (contextName) => {
7
+ return `{
8
+ "name": "@imolko/schemes-${contextName}",
9
+ "version": "0.0.0",
10
+ "main": "dist/index.js",
11
+ "module": "dist/index.js",
12
+ "types": "dist/index.d.ts",
13
+ "scripts": {
14
+ "build": "tsc -p tsconfig.json"
15
+ },
16
+ "keywords": ["domain", "schemes", "${contextName}"],
17
+ "author": "Imolko",
18
+ "license": "ISC",
19
+ "description": "Esquemas del dominio ${contextName}",
20
+ "exports": {
21
+ ".": {
22
+ "require": "./dist/index.js",
23
+ "import": "./dist/index.js",
24
+ "types": "./dist/index.d.ts"
25
+ }
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "peerDependencies": {
31
+ "@imolko/ultra-tsconfig": "~1.0.1"
32
+ }
33
+ }`;
34
+ };
35
+ export default packageTemplate;
36
+ //# sourceMappingURL=package.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.template.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/package.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAU,EAAE;IAC7D,OAAO;+BACsB,WAAW;;;;;;;;yCAQD,WAAW;;;2CAGT,WAAW;;;;;;;;;;;;;;IAclD,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,3 +1,3 @@
1
- declare const template: string;
2
- export default template;
1
+ declare const trackTemplate: string;
2
+ export default trackTemplate;
3
3
  //# sourceMappingURL=track.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"track.template.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/track.template.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ,EAAE,MAoDf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"track.template.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/track.template.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,EAAE,MAoDpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,4 +1,4 @@
1
- const template = `
1
+ const trackTemplate = `
2
2
  import { DomainDirectory, EventPublicApi, JsonSchemaForCloudEvent } from "@imolko/ultra-ddd";
3
3
  import * as fs from 'fs';
4
4
  import * as path from 'path';
@@ -43,13 +43,13 @@ export function main() {
43
43
  console.log(\`\\\\nJSON file created in: \${jsonFilePath}\`); // Escapar la barra invertida
44
44
 
45
45
  // Crear el archivo TypeScript dentro de la carpeta schemas
46
- const typesFilePath = path.join(schemasFolderPath, 'schemes.ts');
47
- const typesFileContent = \`export const schemify = \${JSON.stringify(schemify, null, 2)};\`;
46
+ const typesFilePath = path.join(schemasFolderPath, 'index.ts');
47
+ const typesFileContent = \`export const Schemes = \${JSON.stringify(schemify, null, 2)};\`;
48
48
  fs.writeFileSync(typesFilePath, typesFileContent);
49
49
  console.log(\`\\\\nArchivo TypeScript creado en: \${typesFilePath}\`); // Escapar la barra invertida
50
50
  }
51
51
 
52
52
  main();
53
53
  `;
54
- export default template;
54
+ export default trackTemplate;
55
55
  //# sourceMappingURL=track.template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"track.template.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/track.template.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDxB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"track.template.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/track.template.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD7B,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const tsconfigTemplate = "{\n \"files\": [\"index.ts\"],\n \"extends\": \"@imolko/ultra-tsconfig/library/tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"./dist\",\n \"rootDir\": \"./\"\n },\n \"include\": [\"src/**/*\"],\n \"exclude\": [\"node_modules\", \"**/*.test.ts\", \"**/*.spec.ts\", \"dist-*\"]\n}";
2
+ export default tsconfigTemplate;
3
+ //# sourceMappingURL=tsconfig-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-template.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/tsconfig-template.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB,kTASpB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,12 @@
1
+ const tsconfigTemplate = `{
2
+ "files": ["index.ts"],
3
+ "extends": "@imolko/ultra-tsconfig/library/tsconfig.json",
4
+ "compilerOptions": {
5
+ "outDir": "./dist",
6
+ "rootDir": "./"
7
+ },
8
+ "include": ["src/**/*"],
9
+ "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist-*"]
10
+ }`;
11
+ export default tsconfigTemplate;
12
+ //# sourceMappingURL=tsconfig-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-template.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/tsconfig-template.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;EASvB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tsconfig.event-track.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/tsconfig.event-track.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAExF;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,QAAgB,KAAK,EAAW,EAAE,CAAC;;;;;kBAK3D,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;iBAShB,QAAQ,CAAC,KAAK,CAAC;;;;;;uBAMT,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ;;;;;;;kBAOhC,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;;EAU/B,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"tsconfig.event-track.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/tsconfig.event-track.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAEhG;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,QAAgB,KAAK,EAAW,EAAE,CAAC;;;;;kBAK3D,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;iBAShB,QAAQ,CAAC,KAAK,CAAC;;;;;;uBAMT,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ;;;;;;;kBAOhC,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;;EAU/B,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Crear un directorio si no existe
3
+ * @param {string} directoryPath
4
+ */
5
+ export declare function createDirectorySync(directoryPath: string): void;
6
+ //# sourceMappingURL=create-directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-directory.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/create-directory.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAQ/D"}
@@ -0,0 +1,16 @@
1
+ import * as fs from 'fs';
2
+ /**
3
+ * Crear un directorio si no existe
4
+ * @param {string} directoryPath
5
+ */
6
+ export function createDirectorySync(directoryPath) {
7
+ if (!fs.existsSync(directoryPath)) {
8
+ console.log(`\nDirectory "${directoryPath}" does not exist, creating...`);
9
+ fs.mkdirSync(directoryPath, { recursive: true });
10
+ console.log(`Directory "${directoryPath}" created.`);
11
+ }
12
+ else {
13
+ console.log(`\nDirectory "${directoryPath}" exists.`);
14
+ }
15
+ }
16
+ //# sourceMappingURL=create-directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-directory.js","sourceRoot":"","sources":["../../../src/scripts/helpers/create-directory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,aAAqB;IACvD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,gBAAgB,aAAa,+BAA+B,CAAC,CAAC;QAC1E,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,cAAc,aAAa,YAAY,CAAC,CAAC;IACvD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,gBAAgB,aAAa,WAAW,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Crea un archivo una sola vez
3
+ * @param filePath
4
+ * @param content
5
+ */
6
+ export declare function createFileOnce(outputPath: string, content: string, fileName: string): void;
7
+ //# sourceMappingURL=create-file-one.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-file-one.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/create-file-one.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAkB1F"}
@@ -0,0 +1,26 @@
1
+ import * as fs from 'fs';
2
+ import * as path from 'path';
3
+ import { createDirectorySync } from './create-directory';
4
+ /**
5
+ * Crea un archivo una sola vez
6
+ * @param filePath
7
+ * @param content
8
+ */
9
+ export function createFileOnce(outputPath, content, fileName) {
10
+ // Usar process.cwd() para obtener la raíz del proyecto
11
+ const srcFolderPath = process.cwd();
12
+ // Crear la carpeta si no existe
13
+ const schemasFolderPath = path.join(srcFolderPath, outputPath);
14
+ /** Verificamos el directorio */
15
+ createDirectorySync(schemasFolderPath);
16
+ const filePath = path.join(schemasFolderPath, fileName);
17
+ if (!fs.existsSync(filePath)) {
18
+ console.log(`File "${filePath}" does not exist, creating file...`);
19
+ fs.writeFileSync(filePath, content, "utf8");
20
+ console.log(`File created in: ${filePath}`);
21
+ }
22
+ else {
23
+ console.log(`File "${filePath}" already exists.`);
24
+ }
25
+ }
26
+ //# sourceMappingURL=create-file-one.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-file-one.js","sourceRoot":"","sources":["../../../src/scripts/helpers/create-file-one.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,OAAe,EAAE,QAAgB;IAClF,uDAAuD;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAEpC,gCAAgC;IAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC/D,gCAAgC;IAChC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAEvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAExD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,SAAS,QAAQ,oCAAoC,CAAC,CAAC;QACnE,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,QAAQ,mBAAmB,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-root-file.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/create-root-file.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAanF"}
1
+ {"version":3,"file":"create-root-file.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/create-root-file.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAYnF"}
@@ -1,5 +1,6 @@
1
1
  import * as fs from "fs";
2
2
  import * as path from "path";
3
+ import { createDirectorySync } from "./create-directory";
3
4
  /**
4
5
  * Crear archivo en la raiz del proyecto
5
6
  * @param {string} outputPath ruta de salida
@@ -11,10 +12,8 @@ export function createRootFile(outputPath, content, fileName) {
11
12
  const srcFolderPath = process.cwd();
12
13
  // Crear la carpeta si no existe
13
14
  const schemasFolderPath = path.join(srcFolderPath, outputPath);
14
- if (!fs.existsSync(schemasFolderPath)) {
15
- fs.mkdirSync(schemasFolderPath);
16
- console.log(`\nFolder created: ${schemasFolderPath}`);
17
- }
15
+ /** Verificamos el directorio */
16
+ createDirectorySync(schemasFolderPath);
18
17
  const filePath = path.join(schemasFolderPath, fileName);
19
18
  fs.writeFileSync(filePath, content, "utf8");
20
19
  console.log(`\nFile created in: ${filePath}`);
@@ -1 +1 @@
1
- {"version":3,"file":"create-root-file.js","sourceRoot":"","sources":["../../../src/scripts/helpers/create-root-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,OAAe,EAAE,QAAgB;IAClF,uDAAuD;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAEpC,gCAAgC;IAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC/D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACtC,EAAE,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,iBAAiB,EAAE,CAAC,CAAC;IACxD,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IACxD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;AAChD,CAAC"}
1
+ {"version":3,"file":"create-root-file.js","sourceRoot":"","sources":["../../../src/scripts/helpers/create-root-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,OAAe,EAAE,QAAgB;IAClF,uDAAuD;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAEpC,gCAAgC;IAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC/D,gCAAgC;IAChC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAEvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IACxD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;AAChD,CAAC"}
@@ -1,2 +1,7 @@
1
+ /**
2
+ * Obtien el contenido de un archivo
3
+ * @param {string} path
4
+ * @returns {Promise<string>}
5
+ */
1
6
  export declare function getFile(path: string): Promise<string>;
2
7
  //# sourceMappingURL=get-file.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-file.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/get-file.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBrD"}
1
+ {"version":3,"file":"get-file.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/get-file.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBrD"}
@@ -1,4 +1,9 @@
1
1
  import { access, constants, readFile } from 'fs';
2
+ /**
3
+ * Obtien el contenido de un archivo
4
+ * @param {string} path
5
+ * @returns {Promise<string>}
6
+ */
2
7
  export function getFile(path) {
3
8
  return new Promise((resolve, reject) => {
4
9
  access(path, constants.F_OK, (err) => {
@@ -1 +1 @@
1
- {"version":3,"file":"get-file.js","sourceRoot":"","sources":["../../../src/scripts/helpers/get-file.ts"],"names":[],"mappings":"AAAA,OAA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EAAE,CAAC;gBACR,OAAO,CAAC,IAAI,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAC;gBACpD,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;gBAC9B,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;YACrB,CAAC;YACD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBACnC,IAAI,GAAG,EAAE,CAAC;oBACR,OAAO,CAAC,IAAI,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAC;oBAClD,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;oBAC9B,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;gBACrB,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export * from './add-import';
2
+ export * from './create-directory';
3
+ export * from './create-file-one';
2
4
  export * from './create-root-file';
3
5
  export * from './ensure-dirs';
4
6
  export * from './exists-file';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export * from './add-import';
2
+ export * from './create-directory';
3
+ export * from './create-file-one';
2
4
  export * from './create-root-file';
3
5
  export * from './ensure-dirs';
4
6
  export * from './exists-file';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scripts/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scripts/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
@@ -8,10 +8,10 @@ import * as path from 'path';
8
8
  export function updateGitignore(pathsToIgnore) {
9
9
  const gitignorePath = path.join(process.cwd(), ".gitignore");
10
10
  console.log(`\nUpdating .gitignore in ${process.cwd()}...`);
11
- // Check if .gitignore exists
11
+ // Check if .gitignore exists, and create it if not
12
12
  if (!fs.existsSync(gitignorePath)) {
13
- console.error(".gitignore not found in the current project directory.");
14
- return;
13
+ console.log(".gitignore not found, creating it...");
14
+ fs.writeFileSync(gitignorePath, "", "utf-8"); // Create an empty .gitignore file
15
15
  }
16
16
  // Read existing .gitignore content
17
17
  let gitignoreContent = fs.readFileSync(gitignorePath, "utf-8");
@@ -1 +1 @@
1
- {"version":3,"file":"update-gitignore.js","sourceRoot":"","sources":["../../../src/scripts/helpers/update-gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,aAAuB;IACrD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;IAE7D,OAAO,CAAC,GAAG,CAAC,4BAA4B,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAE5D,6BAA6B;IAC7B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QACxE,OAAO;IACT,CAAC;IAED,mCAAmC;IACnC,IAAI,gBAAgB,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC/D,MAAM,cAAc,GAAG,IAAI,GAAG,CAC5B,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CACxD,CAAC;IAEF,yCAAyC;IACzC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,gBAAgB,IAAI,KAAK,IAAI,EAAE,CAAC;Y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AC;IAEF,yCAAyC;IACzC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,gBAAgB,IAAI,KAAK,IAAI,EAAE,CAAC;YAChC,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,gDAAgD;IAChD,IAAI,QAAQ,EAAE,CAAC;QACb,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;IAC5D,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC"}
@@ -2,4 +2,5 @@ export declare const DEFAULT_CONTEXT = "default";
2
2
  export declare const OUTPUT_PATH = "./src";
3
3
  export declare const FOLDER_NAME = "events";
4
4
  export declare const TRACK_FILE_NAME = "track-events-script.ts";
5
+ export declare const OUTPUT_PACK = "schemes";
5
6
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,eAAe,2BAA2B,CAAC;AAExD,eAAO,MAAM,WAAW,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TRACK_FILE_NAME = exports.FOLDER_NAME = exports.OUTPUT_PATH = exports.DEFAULT_CONTEXT = void 0;
3
+ exports.OUTPUT_PACK = exports.TRACK_FILE_NAME = exports.FOLDER_NAME = exports.OUTPUT_PATH = exports.DEFAULT_CONTEXT = void 0;
4
4
  // Nombre del contexto
5
5
  exports.DEFAULT_CONTEXT = "default";
6
6
  // Ruta de la raiz: por defecto vale ./src
@@ -9,4 +9,6 @@ exports.OUTPUT_PATH = "./src";
9
9
  exports.FOLDER_NAME = "events";
10
10
  // Nombre del archivo con el script de eventos
11
11
  exports.TRACK_FILE_NAME = 'track-events-script.ts';
12
+ // Ruta en donde se genera el paquete
13
+ exports.OUTPUT_PACK = "schemes";
12
14
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/scripts/get-event/constants.ts"],"names":[],"mappings":";;;AAAA,sBAAsB;AACT,QAAA,eAAe,GAAG,SAAS,CAAC;AACzC,0CAA0C;AAC7B,QAAA,WAAW,GAAG,OAAO,CAAC;AACnC,kDAAkD;AACrC,QAAA,WAAW,GAAG,QAAQ,CAAC;AACpC,8CAA8C;AACjC,QAAA,eAAe,GAAG,wBAAwB,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/scripts/get-event/constants.ts"],"names":[],"mappings":";;;AAAA,sBAAsB;AACT,QAAA,eAAe,GAAG,SAAS,CAAC;AACzC,0CAA0C;AAC7B,QAAA,WAAW,GAAG,OAAO,CAAC;AACnC,kDAAkD;AACrC,QAAA,WAAW,GAAG,QAAQ,CAAC;AACpC,8CAA8C;AACjC,QAAA,eAAe,GAAG,wBAAwB,CAAC;AACxD,qCAAqC;AACxB,QAAA,WAAW,GAAG,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate-track-events.js","sourceRoot":"","sources":["../../../src/scripts/get-event/generate-track-events.ts"],"names":[],"mappings":";;;;;;AAAA,wCAA8F;AAC9F,2CAA4E;AAC5E,gFAAkD;AAElD,MAAM,QAAQ,GAAG;;;;;;UAMP,CAAC;AAEX;;;;;;GAMG;AACH,SAAS,YAAY,CACnB,KAAa,EACb,WAAmB,EACnB,MAAc;IAEd,MAAM,IAAI,GAAG,IAAI,WAAW,QAAQ,MAAM,IAAI,WAAW,IAAI,CAAC;IAC9D,OAAO,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,GAAG,IAAI,wBAAwB,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,WAAW,CAC/B,UAAkB,EAClB,cAAsB,2BAAe,EACrC,aAAqB,uBAAW;IAEhC,gCAAgC;IAChC,MAAM,WAAW,GAAG,GAAG,UAAU,IAAI,UAAU,EAAE,CAAC;IAClD,8CAA8C;IAC9C,IAAA,oBAAU,EAAC,WAAW,CAAC,CAAC;IACxB,mBAAmB;IACnB,MAAM,SAAS,GAAG,IAAA,wBAAc,EAAC,WAAW,CAAC,CAAC;IAC9C,4BAA4B;IAC5B,IAAI,eAAe,GAAG,wBAAQ,CAAC;IAC/B,sDAAsD;IACtD,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,qBAAqB,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IACrF,2CAA2C;IAC3C,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE,CAAC;QAChC,MAAM,YAAY,GAAG,IAAA,kBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5C,eAAe,GAAG,IAAA,oBAAU,EAC1B,eAAe,EACf,CAAC,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,EAC7B,KAAK,UAAU,IAAI,OAAO,CAAC,IAAI,EAAE,CAClC,CAAC;QAEF,IAAI,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CACrC,YAAY,EACZ,GAAG,YAAY,CAAC,SAAS,EAAE,CAC5B,CAAC;QAEF,eAAe,GAAG,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;QAEzE,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IACzE,CAAC;IACD,qDAAqD;IAErD,+BAA+B;IAC/B,IAAA,wBAAc,EAAC,UAAU,EAAE,eAAe,EAAE,2BAAe,CAAC,CAAC;AAC/D,CAAC;AArCD,kCAqCC"}
1
+ {"version":3,"file":"generate-track-events.js","sourceRoot":"","sources":["../../../src/scripts/get-event/generate-track-events.ts"],"names":[],"mappings":";;;;;;AAAA,wCAA8F;AAC9F,2CAA4E;AAC5E,gFAAuD;AAEvD,MAAM,QAAQ,GAAG;;;;;;UAMP,CAAC;AAEX;;;;;;GAMG;AACH,SAAS,YAAY,CACnB,KAAa,EACb,WAAmB,EACnB,MAAc;IAEd,MAAM,IAAI,GAAG,IAAI,WAAW,QAAQ,MAAM,IAAI,WAAW,IAAI,CAAC;IAC9D,OAAO,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,GAAG,IAAI,wBAAwB,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,WAAW,CAC/B,UAAkB,EAClB,cAAsB,2BAAe,EACrC,aAAqB,uBAAW;IAEhC,gCAAgC;IAChC,MAAM,WAAW,GAAG,GAAG,UAAU,IAAI,UAAU,EAAE,CAAC;IAClD,8CAA8C;IAC9C,IAAA,oBAAU,EAAC,WAAW,CAAC,CAAC;IACxB,mBAAmB;IACnB,MAAM,SAAS,GAAG,IAAA,wBAAc,EAAC,WAAW,CAAC,CAAC;IAC9C,4BAA4B;IAC5B,IAAI,eAAe,GAAG,wBAAa,CAAC;IACpC,sDAAsD;IACtD,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,qBAAqB,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IACrF,2CAA2C;IAC3C,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE,CAAC;QAChC,MAAM,YAAY,GAAG,IAAA,kBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5C,eAAe,GAAG,IAAA,oBAAU,EAC1B,eAAe,EACf,CAAC,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,EAC7B,KAAK,UAAU,IAAI,OAAO,CAAC,IAAI,EAAE,CAClC,CAAC;QAEF,IAAI,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CACrC,YAAY,EACZ,GAAG,YAAY,CAAC,SAAS,EAAE,CAC5B,CAAC;QAEF,eAAe,GAAG,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;QAEzE,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IACzE,CAAC;IACD,qDAAqD;IAErD,+BAA+B;IAC/B,IAAA,wBAAc,EAAC,UAAU,EAAE,eAAe,EAAE,2BAAe,CAAC,CAAC;AAC/D,CAAC;AArCD,kCAqCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/generate.ts"],"names":[],"mappings":";AAMA;;;;GAIG;AACH,wBAAsB,IAAI,kBAWzB"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/generate.ts"],"names":[],"mappings":";AASA;;;;GAIG;AACH,wBAAsB,IAAI,kBAezB"}
@@ -1,11 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
3
6
  Object.defineProperty(exports, "__esModule", { value: true });
4
7
  exports.main = void 0;
5
8
  const get_argv_1 = require("./get-argv");
6
9
  const generate_track_events_1 = require("./generate-track-events");
7
10
  const copy_tsconfig_1 = require("./copy-tsconfig");
8
11
  const helpers_1 = require("../helpers");
12
+ const constants_1 = require("./constants");
13
+ const tsconfig_template_1 = __importDefault(require("./templates/tsconfig-template"));
14
+ const templates_1 = require("./templates");
9
15
  /**
10
16
  * Metodo para generar el script para obtener el esquema de los eventos
11
17
  * Genera el script track-events-script.ts y genera el siguiente archivo de configuracion tsconfig.event-track.json
@@ -17,10 +23,14 @@ async function main() {
17
23
  "**/event-schemes",
18
24
  "**/schemes",
19
25
  "track-events-script.ts",
26
+ "tsconfig.event-track.json"
20
27
  ];
21
28
  const { outputPath, contextName, folderName } = (0, get_argv_1.getArgv)();
22
29
  await (0, generate_track_events_1.trackEvents)(outputPath, contextName, folderName);
23
30
  await (0, copy_tsconfig_1.copyTsConfig)(outputPath);
31
+ (0, helpers_1.createFileOnce)(constants_1.OUTPUT_PACK, tsconfig_template_1.default, "tsconfig.json");
32
+ const packageContent = (0, templates_1.packageTemplate)(contextName);
33
+ (0, helpers_1.createFileOnce)(constants_1.OUTPUT_PACK, packageContent, "package.json");
24
34
  (0, helpers_1.updateGitignore)(pathsToIgnore);
25
35
  }
26
36
  exports.main = main;
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/scripts/get-event/generate.ts"],"names":[],"mappings":";;;;AACA,yCAAqC;AACrC,mEAAsD;AACtD,mDAA+C;AAC/C,wCAA6C;AAE7C;;;;GAIG;AACI,KAAK,UAAU,IAAI;IACxB,0DAA0D;IAC1D,MAAM,aAAa,GAAG;QACpB,kBAAkB;QAClB,YAAY;QACZ,wBAAwB;KACzB,CAAC;IACF,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,IAAA,kBAAO,GAAE,CAAC;IAC1D,MAAM,IAAA,mCAAW,EAAC,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IACvD,MAAM,IAAA,4BAAY,EAAC,UAAU,CAAC,CAAC;IAC/B,IAAA,yBAAe,EAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AAXD,oBAWC;AACD,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/scripts/get-event/generate.ts"],"names":[],"mappings":";;;;;;;AACA,yCAAqC;AACrC,mEAAsD;AACtD,mDAA+C;AAC/C,wCAA6D;AAC7D,2CAA0C;AAC1C,sFAA6D;AAC7D,2CAA8C;AAE9C;;;;GAIG;AACI,KAAK,UAAU,IAAI;IACxB,0DAA0D;IAC1D,MAAM,aAAa,GAAG;QACpB,kBAAkB;QAClB,YAAY;QACZ,wBAAwB;QACxB,2BAA2B;KAC5B,CAAC;IACF,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,IAAA,kBAAO,GAAE,CAAC;IAC1D,MAAM,IAAA,mCAAW,EAAC,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IACvD,MAAM,IAAA,4BAAY,EAAC,UAAU,CAAC,CAAC;IAC/B,IAAA,wBAAc,EAAC,uBAAW,EAAE,2BAAgB,EAAE,eAAe,CAAC,CAAC;IAC/D,MAAM,cAAc,GAAG,IAAA,2BAAe,EAAC,WAAW,CAAC,CAAC;IACpD,IAAA,wBAAc,EAAC,uBAAW,EAAE,cAAc,EAAE,cAAc,CAAC,CAAA;IAC3D,IAAA,yBAAe,EAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AAfD,oBAeC;AACD,IAAI,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-argv.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/get-argv.ts"],"names":[],"mappings":"AAEA,UAAU,UAAU;IAElB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,OAAO,IAAI,UAAU,CAapC"}
1
+ {"version":3,"file":"get-argv.d.ts","sourceRoot":"","sources":["../../../src/scripts/get-event/get-argv.ts"],"names":[],"mappings":"AAEA,UAAU,UAAU;IAElB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,OAAO,IAAI,UAAU,CA4BpC"}
@@ -7,7 +7,21 @@ const constants_1 = require("./constants");
7
7
  * @returns
8
8
  */
9
9
  function getArgv() {
10
- let [, , outputPath, contextName, folderName] = process.argv;
10
+ const args = {};
11
+ const argv = process.argv.slice(2); // Obtenemos los argumentos a partir del tercero
12
+ argv.forEach(arg => {
13
+ if (arg.startsWith('--')) {
14
+ const parts = arg.substring(2).split('=');
15
+ if (parts.length === 2 && parts[0]) {
16
+ const key = parts[0];
17
+ const value = parts[1];
18
+ args[key] = value;
19
+ }
20
+ }
21
+ });
22
+ let outputPath = args['output-path'] ? args['output-path'] : args['outputPath'];
23
+ let contextName = args['context-name'] ? args['context-name'] : args['contextName'];
24
+ let folderName = args['folder-name'] ? args['folder-name'] : args['folderName'];
11
25
  // Ruta de salida: por defecto vale ./src
12
26
  outputPath = outputPath ? outputPath : constants_1.OUTPUT_PATH;
13
27
  // Nombre del contexto
@@ -1 +1 @@
1
- {"version":3,"file":"get-argv.js","sourceRoot":"","sources":["../../../src/scripts/get-event/get-argv.ts"],"names":[],"mappings":";;;AAAA,2CAAwE;AAWxE;;;GAGG;AACH,SAAgB,OAAO;IACrB,IAAI,CAAC,EAAE,AAAD,EAAG,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7D,yCAAyC;IACzC,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,uBAAW,CAAC;IACnD,sBAAsB;IACtB,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,2BAAe,CAAC;IAC1D,kDAAkD;IAClD,UAAU,GAAG,UAAU,CA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AC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAChF,yCAAyC;IACzC,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,uBAAW,CAAC;IACnD,sBAAsB;IACtB,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,2BAAe,CAAC;IAC1D,kDAAkD;IAClD,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,uBAAW,CAAC;IACnD,OAAO;QACL,UAAU;QACV,WAAW;QACX,UAAU;KACX,CAAC;AACJ,CAAC;AA5BD,0BA4BC"}
@@ -1,3 +1,5 @@
1
+ export * from './package.template';
1
2
  export * from './track.template';
3
+ export * from './tsconfig-template';
2
4
  export * from './tsconfig.event-track';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"}
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./package.template"), exports);
17
18
  __exportStar(require("./track.template"), exports);
19
+ __exportStar(require("./tsconfig-template"), exports);
18
20
  __exportStar(require("./tsconfig.event-track"), exports);
19
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,mDAAiC;AACjC,sDAAoC;AACpC,yDAAuC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * genera el contenido del packager.json
3
+ * @param {string} contextName Nombre del contexto
4
+ * @returns {string}
5
+ */
6
+ export declare const packageTemplate: (contextName: string) => string;
7
+ export default packageTemplate;
8
+ //# sourceMappingURL=package.template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.template.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/package.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,eAAe,gBAAiB,MAAM,KAAG,MA4BrD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.packageTemplate = void 0;
4
+ /**
5
+ * genera el contenido del packager.json
6
+ * @param {string} contextName Nombre del contexto
7
+ * @returns {string}
8
+ */
9
+ const packageTemplate = (contextName) => {
10
+ return `{
11
+ "name": "@imolko/schemes-${contextName}",
12
+ "version": "0.0.0",
13
+ "main": "dist/index.js",
14
+ "module": "dist/index.js",
15
+ "types": "dist/index.d.ts",
16
+ "scripts": {
17
+ "build": "tsc -p tsconfig.json"
18
+ },
19
+ "keywords": ["domain", "schemes", "${contextName}"],
20
+ "author": "Imolko",
21
+ "license": "ISC",
22
+ "description": "Esquemas del dominio ${contextName}",
23
+ "exports": {
24
+ ".": {
25
+ "require": "./dist/index.js",
26
+ "import": "./dist/index.js",
27
+ "types": "./dist/index.d.ts"
28
+ }
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "peerDependencies": {
34
+ "@imolko/ultra-tsconfig": "~1.0.1"
35
+ }
36
+ }`;
37
+ };
38
+ exports.packageTemplate = packageTemplate;
39
+ exports.default = exports.packageTemplate;
40
+ //# sourceMappingURL=package.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.template.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/package.template.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACI,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAU,EAAE;IAC7D,OAAO;+BACsB,WAAW;;;;;;;;yCAQD,WAAW;;;2CAGT,WAAW;;;;;;;;;;;;;;IAclD,CAAC;AACL,CAAC,CAAC;AA5BW,QAAA,eAAe,mBA4B1B;AAEF,kBAAe,uBAAe,CAAC"}
@@ -1,3 +1,3 @@
1
- declare const template: string;
2
- export default template;
1
+ declare const trackTemplate: string;
2
+ export default trackTemplate;
3
3
  //# sourceMappingURL=track.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"track.template.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/track.template.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ,EAAE,MAoDf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"track.template.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/track.template.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,EAAE,MAoDpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const template = `
3
+ const trackTemplate = `
4
4
  import { DomainDirectory, EventPublicApi, JsonSchemaForCloudEvent } from "@imolko/ultra-ddd";
5
5
  import * as fs from 'fs';
6
6
  import * as path from 'path';
@@ -45,13 +45,13 @@ export function main() {
45
45
  console.log(\`\\\\nJSON file created in: \${jsonFilePath}\`); // Escapar la barra invertida
46
46
 
47
47
  // Crear el archivo TypeScript dentro de la carpeta schemas
48
- const typesFilePath = path.join(schemasFolderPath, 'schemes.ts');
49
- const typesFileContent = \`export const schemify = \${JSON.stringify(schemify, null, 2)};\`;
48
+ const typesFilePath = path.join(schemasFolderPath, 'index.ts');
49
+ const typesFileContent = \`export const Schemes = \${JSON.stringify(schemify, null, 2)};\`;
50
50
  fs.writeFileSync(typesFilePath, typesFileContent);
51
51
  console.log(\`\\\\nArchivo TypeScript creado en: \${typesFilePath}\`); // Escapar la barra invertida
52
52
  }
53
53
 
54
54
  main();
55
55
  `;
56
- exports.default = template;
56
+ exports.default = trackTemplate;
57
57
  //# sourceMappingURL=track.template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"track.template.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/track.template.ts"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDxB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"track.template.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/track.template.ts"],"names":[],"mappings":";;AAAA,MAAM,aAAa,GAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD7B,CAAC;AAEF,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const tsconfigTemplate = "{\n \"files\": [\"index.ts\"],\n \"extends\": \"@imolko/ultra-tsconfig/library/tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"./dist\",\n \"rootDir\": \"./\"\n },\n \"include\": [\"src/**/*\"],\n \"exclude\": [\"node_modules\", \"**/*.test.ts\", \"**/*.spec.ts\", \"dist-*\"]\n}";
2
+ export default tsconfigTemplate;
3
+ //# sourceMappingURL=tsconfig-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-template.d.ts","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/tsconfig-template.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB,kTASpB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tsconfigTemplate = `{
4
+ "files": ["index.ts"],
5
+ "extends": "@imolko/ultra-tsconfig/library/tsconfig.json",
6
+ "compilerOptions": {
7
+ "outDir": "./dist",
8
+ "rootDir": "./"
9
+ },
10
+ "include": ["src/**/*"],
11
+ "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist-*"]
12
+ }`;
13
+ exports.default = tsconfigTemplate;
14
+ //# sourceMappingURL=tsconfig-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-template.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/tsconfig-template.ts"],"names":[],"mappings":";;AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;EASvB,CAAC;AAEH,kBAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tsconfig.event-track.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/tsconfig.event-track.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAExF;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,QAAgB,KAAK,EAAW,EAAE,CAAC;;;;;kBAK3D,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;iBAShB,QAAQ,CAAC,KAAK,CAAC;;;;;;uBAMT,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ;;;;;;;kBAOhC,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;;EAU/B,CAAC;AAEH,kBAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"tsconfig.event-track.js","sourceRoot":"","sources":["../../../../src/scripts/get-event/templates/tsconfig.event-track.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAEhG;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,QAAgB,KAAK,EAAW,EAAE,CAAC;;;;;kBAK3D,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;iBAShB,QAAQ,CAAC,KAAK,CAAC;;;;;;uBAMT,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ;;;;;;;kBAOhC,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;;EAU/B,CAAC;AAEH,kBAAe,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Crear un directorio si no existe
3
+ * @param {string} directoryPath
4
+ */
5
+ export declare function createDirectorySync(directoryPath: string): void;
6
+ //# sourceMappingURL=create-directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-directory.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/create-directory.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAQ/D"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.createDirectorySync = void 0;
27
+ const fs = __importStar(require("fs"));
28
+ /**
29
+ * Crear un directorio si no existe
30
+ * @param {string} directoryPath
31
+ */
32
+ function createDirectorySync(directoryPath) {
33
+ if (!fs.existsSync(directoryPath)) {
34
+ console.log(`\nDirectory "${directoryPath}" does not exist, creating...`);
35
+ fs.mkdirSync(directoryPath, { recursive: true });
36
+ console.log(`Directory "${directoryPath}" created.`);
37
+ }
38
+ else {
39
+ console.log(`\nDirectory "${directoryPath}" exists.`);
40
+ }
41
+ }
42
+ exports.createDirectorySync = createDirectorySync;
43
+ //# sourceMappingURL=create-directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-directory.js","sourceRoot":"","sources":["../../../src/scripts/helpers/create-directory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AAEzB;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,aAAqB;IACvD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,gBAAgB,aAAa,+BAA+B,CAAC,CAAC;QAC1E,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,cAAc,aAAa,YAAY,CAAC,CAAC;IACvD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,gBAAgB,aAAa,WAAW,CAAC,CAAC;IACxD,CAAC;AACH,CAAC;AARD,kDAQC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Crea un archivo una sola vez
3
+ * @param filePath
4
+ * @param content
5
+ */
6
+ export declare function createFileOnce(outputPath: string, content: string, fileName: string): void;
7
+ //# sourceMappingURL=create-file-one.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-file-one.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/create-file-one.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAkB1F"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.createFileOnce = void 0;
27
+ const fs = __importStar(require("fs"));
28
+ const path = __importStar(require("path"));
29
+ const create_directory_1 = require("./create-directory");
30
+ /**
31
+ * Crea un archivo una sola vez
32
+ * @param filePath
33
+ * @param content
34
+ */
35
+ function createFileOnce(outputPath, content, fileName) {
36
+ // Usar process.cwd() para obtener la raíz del proyecto
37
+ const srcFolderPath = process.cwd();
38
+ // Crear la carpeta si no existe
39
+ const schemasFolderPath = path.join(srcFolderPath, outputPath);
40
+ /** Verificamos el directorio */
41
+ (0, create_directory_1.createDirectorySync)(schemasFolderPath);
42
+ const filePath = path.join(schemasFolderPath, fileName);
43
+ if (!fs.existsSync(filePath)) {
44
+ console.log(`File "${filePath}" does not exist, creating file...`);
45
+ fs.writeFileSync(filePath, content, "utf8");
46
+ console.log(`File created in: ${filePath}`);
47
+ }
48
+ else {
49
+ console.log(`File "${filePath}" already exists.`);
50
+ }
51
+ }
52
+ exports.createFileOnce = createFileOnce;
53
+ //# sourceMappingURL=create-file-one.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-file-one.js","sourceRoot":"","sources":["../../../src/scripts/helpers/create-file-one.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,yDAAyD;AAEzD;;;;GAIG;AACH,SAAgB,cAAc,CAAC,UAAkB,EAAE,OAAe,EAAE,QAAgB;IAClF,uDAAuD;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAEpC,gCAAgC;IAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC/D,gCAAgC;IAChC,IAAA,sCAAmB,EAAC,iBAAiB,CAAC,CAAC;IAEvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAExD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,SAAS,QAAQ,oCAAoC,CAAC,CAAC;QACnE,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,QAAQ,mBAAmB,CAAC,CAAC;IACpD,CAAC;AACH,CAAC;AAlBD,wCAkBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-root-file.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/create-root-file.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAanF"}
1
+ {"version":3,"file":"create-root-file.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/create-root-file.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,QAYnF"}
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.createRootFile = void 0;
27
27
  const fs = __importStar(require("fs"));
28
28
  const path = __importStar(require("path"));
29
+ const create_directory_1 = require("./create-directory");
29
30
  /**
30
31
  * Crear archivo en la raiz del proyecto
31
32
  * @param {string} outputPath ruta de salida
@@ -37,10 +38,8 @@ function createRootFile(outputPath, content, fileName) {
37
38
  const srcFolderPath = process.cwd();
38
39
  // Crear la carpeta si no existe
39
40
  const schemasFolderPath = path.join(srcFolderPath, outputPath);
40
- if (!fs.existsSync(schemasFolderPath)) {
41
- fs.mkdirSync(schemasFolderPath);
42
- console.log(`\nFolder created: ${schemasFolderPath}`);
43
- }
41
+ /** Verificamos el directorio */
42
+ (0, create_directory_1.createDirectorySync)(schemasFolderPath);
44
43
  const filePath = path.join(schemasFolderPath, fileName);
45
44
  fs.writeFileSync(filePath, content, "utf8");
46
45
  console.log(`\nFile created in: ${filePath}`);
@@ -1 +1 @@
1
- {"version":3,"file":"create-root-file.js","sourceRoot":"","sources":["../../../src/scripts/helpers/create-root-file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,UAAkB,EAAE,OAAe,EAAE,QAAgB;IAClF,uDAAuD;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAEpC,gCAAgC;IAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC/D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACtC,EAAE,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,iBAAiB,EAAE,CAAC,CAAC;IACxD,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IACxD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;AAChD,CAAC;AAbD,wCAaC"}
1
+ {"version":3,"file":"create-root-file.js","sourceRoot":"","sources":["../../../src/scripts/helpers/create-root-file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,yDAAyD;AAEzD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,UAAkB,EAAE,OAAe,EAAE,QAAgB;IAClF,uDAAuD;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAEpC,gCAAgC;IAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC/D,gCAAgC;IAChC,IAAA,sCAAmB,EAAC,iBAAiB,CAAC,CAAC;IAEvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IACxD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;AAChD,CAAC;AAZD,wCAYC"}
@@ -1,2 +1,7 @@
1
+ /**
2
+ * Obtien el contenido de un archivo
3
+ * @param {string} path
4
+ * @returns {Promise<string>}
5
+ */
1
6
  export declare function getFile(path: string): Promise<string>;
2
7
  //# sourceMappingURL=get-file.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-file.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/get-file.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBrD"}
1
+ {"version":3,"file":"get-file.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/get-file.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBrD"}
@@ -2,6 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFile = void 0;
4
4
  const fs_1 = require("fs");
5
+ /**
6
+ * Obtien el contenido de un archivo
7
+ * @param {string} path
8
+ * @returns {Promise<string>}
9
+ */
5
10
  function getFile(path) {
6
11
  return new Promise((resolve, reject) => {
7
12
  (0, fs_1.access)(path, fs_1.constants.F_OK, (err) => {
@@ -1 +1 @@
1
- {"version":3,"file":"get-file.js","sourceRoot":"","sources":["../../../src/scripts/helpers/get-file.ts"],"names":[],"mappings":";;;AAAA,2BAAiD;AAEjD,SAAgB,OAAO,CAAC,IAAY;IAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAA,WAAM,EAAC,IAAI,EAAE,cAAS,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;YACnC,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,CAAC,IAAI,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAC;gBACpD,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;gBAC9B,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;YACrB,CAAC;YACD,IAAA,aAAQ,EAAC,IAAI,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBACnC,IAAI,GAAG,EAAE,CAAC;oBACR,OAAO,CAAC,IAAI,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAC;oBAClD,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;oBAC9B,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;gBACrB,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAlBD,0BAkBC"}
1
+ {"version":3,"file":"get-file.js","sourceRoot":"","sources":["../../../src/scripts/helpers/get-file.ts"],"names":[],"mappings":";;;AAAA,2BAAiD;AAEjD;;;;GAIG;AACH,SAAgB,OAAO,CAAC,IAAY;IAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAA,WAAM,EAAC,IAAI,EAAE,cAAS,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;YACnC,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,CAAC,IAAI,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAC;gBACpD,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;gBAC9B,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;YACrB,CAAC;YACD,IAAA,aAAQ,EAAC,IAAI,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBACnC,IAAI,GAAG,EAAE,CAAC;oBACR,OAAO,CAAC,IAAI,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAC;oBAClD,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;oBAC9B,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;gBACrB,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAlBD,0BAkBC"}
@@ -1,4 +1,6 @@
1
1
  export * from './add-import';
2
+ export * from './create-directory';
3
+ export * from './create-file-one';
2
4
  export * from './create-root-file';
3
5
  export * from './ensure-dirs';
4
6
  export * from './exists-file';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scripts/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./add-import"), exports);
18
+ __exportStar(require("./create-directory"), exports);
19
+ __exportStar(require("./create-file-one"), exports);
18
20
  __exportStar(require("./create-root-file"), exports);
19
21
  __exportStar(require("./ensure-dirs"), exports);
20
22
  __exportStar(require("./exists-file"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scripts/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,qDAAmC;AACnC,gDAA8B;AAC9B,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC;AACnC,6CAA2B;AAC3B,8CAA4B;AAC5B,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scripts/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,qDAAmC;AACnC,oDAAkC;AAClC,qDAAmC;AACnC,gDAA8B;AAC9B,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC;AACnC,6CAA2B;AAC3B,8CAA4B;AAC5B,qDAAmC"}
@@ -34,10 +34,10 @@ const path = __importStar(require("path"));
34
34
  function updateGitignore(pathsToIgnore) {
35
35
  const gitignorePath = path.join(process.cwd(), ".gitignore");
36
36
  console.log(`\nUpdating .gitignore in ${process.cwd()}...`);
37
- // Check if .gitignore exists
37
+ // Check if .gitignore exists, and create it if not
38
38
  if (!fs.existsSync(gitignorePath)) {
39
- console.error(".gitignore not found in the current project directory.");
40
- return;
39
+ console.log(".gitignore not found, creating it...");
40
+ fs.writeFileSync(gitignorePath, "", "utf-8"); // Create an empty .gitignore file
41
41
  }
42
42
  // Read existing .gitignore content
43
43
  let gitignoreContent = fs.readFileSync(gitignorePath, "utf-8");
@@ -1 +1 @@
1
- {"version":3,"file":"update-gitignore.js","sourceRoot":"","sources":["../../../src/scripts/helpers/update-gitignore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B;;;;GAIG;AACH,SAAgB,eAAe,CAAC,aAAuB;IACrD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;IAE7D,OAAO,CAAC,GAAG,CAAC,4BAA4B,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAE5D,6BAA6B;IAC7B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QACxE,OAAO;IACT,CAAC;IAED,mCAAmC;IACnC,IAAI,gBAAgB,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC/D,MAAM,cAAc,GAAG,IAAI,GAAG,CAC5B,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CACxD,CAAC;IAEF,yCAAyC;IACzC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,gBAAgB,IAAI,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