@builderbot/cli 0.3.0-alpha.0 → 1.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Leifer Mendez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -8,10 +8,11 @@ export interface ProviderWithoutHint {
8
8
  label: string;
9
9
  }
10
10
  export type Provider = ProviderWithHint | ProviderWithoutHint;
11
- export interface ProviderData {
11
+ export interface ValueLabel {
12
12
  value: string;
13
13
  label: string;
14
14
  }
15
15
  export declare const PROVIDER_LIST: Provider[];
16
- export declare const PROVIDER_DATA: ProviderData[];
16
+ export declare const PROVIDER_DATA: ValueLabel[];
17
+ export declare const AVAILABLE_LANGUAGES: ValueLabel[];
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configuration/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,QAAQ,GAAG,gBAAgB,GAAG,mBAAmB,CAAA;AAE7D,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,QAAQ,EAOnC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,YAAY,EAMvC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configuration/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,QAAQ,GAAG,gBAAgB,GAAG,mBAAmB,CAAA;AAE7D,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,QAAQ,EAOnC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,UAAU,EAMrC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,UAAU,EAG3C,CAAA"}
package/dist/index.cjs CHANGED
@@ -252,6 +252,10 @@ const PROVIDER_DATA = [
252
252
  { value: 'mysql', label: 'MySQL' },
253
253
  { value: 'postgres', label: 'PostgreSQL' },
254
254
  ];
255
+ const AVAILABLE_LANGUAGES = [
256
+ { value: 'ts', label: 'TypeScript' },
257
+ { value: 'js', label: 'JavaScript' }
258
+ ];
255
259
 
256
260
  var fs$h = {};
257
261
 
@@ -9186,12 +9190,20 @@ const startInteractive = async () => {
9186
9190
  ue('Operacion cancelada');
9187
9191
  return process.exit(0);
9188
9192
  }
9193
+ const stepLanguage = await ie({
9194
+ message: '¿Que lenguaje prefieres usar?',
9195
+ options: AVAILABLE_LANGUAGES,
9196
+ });
9197
+ if (eD(stepLanguage)) {
9198
+ ue('Operacion cancelada');
9199
+ return process.exit(0);
9200
+ }
9189
9201
  const s = de();
9190
9202
  s.start('Comprobando requerimientos');
9191
9203
  await systemRequirements();
9192
9204
  s.stop('Comprobando requerimientos');
9193
9205
  s.start(`Creando proyecto`);
9194
- const NAME_DIR = ['base', stepProvider, stepDatabase].join('-');
9206
+ const NAME_DIR = ['base', stepLanguage, stepProvider, stepDatabase].join('-');
9195
9207
  await createApp(NAME_DIR);
9196
9208
  s.stop(`Creando proyecto`);
9197
9209
  bannerDone(NAME_DIR);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactive/index.ts"],"names":[],"mappings":"AAiEA,QAAA,MAAM,gBAAgB,QAAa,QAAQ,IAAI,CA0D9C,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactive/index.ts"],"names":[],"mappings":"AAiEA,QAAA,MAAM,gBAAgB,QAAa,QAAQ,IAAI,CAoE9C,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builderbot/cli",
3
- "version": "0.3.0-alpha.0",
3
+ "version": "1.0.1-alpha.0",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs",
6
6
  "types": "dist/index.d.ts",
@@ -42,5 +42,5 @@
42
42
  "type": "git",
43
43
  "url": "https://github.com/codigoencasa/bot-whatsapp/tree/main/packages/cli"
44
44
  },
45
- "gitHead": "f21e49621dffad2a1226aecea535668016f07b14"
45
+ "gitHead": "696830134bd0e801a9231b0ff24d265d7849b5c0"
46
46
  }