create-moost 0.5.21 → 0.5.23

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 moostjs
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.
package/dist/index.cjs CHANGED
@@ -1,312 +1,301 @@
1
- 'use strict';
2
-
3
- var eventCli = require('@moostjs/event-cli');
4
- var eventCli$1 = require('@wooksjs/event-cli');
5
- var moost = require('moost');
6
- var fs = require('fs');
7
- var prompts = require('prompts');
8
- var rewrite = require('@prostojs/rewrite');
9
- var path = require('path');
10
-
11
- /******************************************************************************
12
- Copyright (c) Microsoft Corporation.
13
-
14
- Permission to use, copy, modify, and/or distribute this software for any
15
- purpose with or without fee is hereby granted.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
18
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
20
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
21
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23
- PERFORMANCE OF THIS SOFTWARE.
24
- ***************************************************************************** */
25
- /* global Reflect, Promise, SuppressedError, Symbol */
26
-
27
-
28
- function __decorate(decorators, target, key, desc) {
29
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33
- }
34
-
35
- function __param(paramIndex, decorator) {
36
- return function (target, key) { decorator(target, key, paramIndex); }
37
- }
38
-
39
- function __metadata(metadataKey, metadataValue) {
40
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
41
- }
42
-
43
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
44
- var e = new Error(message);
45
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1
+ "use strict";
2
+ //#region rolldown:runtime
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
46
18
  };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+
24
+ //#endregion
25
+ const __moostjs_event_cli = __toESM(require("@moostjs/event-cli"));
26
+ const __wooksjs_event_cli = __toESM(require("@wooksjs/event-cli"));
27
+ const fs = __toESM(require("fs"));
28
+ const prompts = __toESM(require("prompts"));
29
+ const __prostojs_rewrite = __toESM(require("@prostojs/rewrite"));
30
+ const path = __toESM(require("path"));
47
31
 
48
- const defaultProjectName = 'moost-app';
32
+ //#region packages/create-moost/src/prompts.ts
33
+ const defaultProjectName = "moost-app";
49
34
  async function getPrompts(inputs) {
50
- const predefined = {
51
- targetDir: inputs.name || '',
52
- projectName: inputs.name || '',
53
- packageName: inputs.name || '',
54
- };
55
- try {
56
- const results = await prompts([
57
- {
58
- name: 'projectName',
59
- type: predefined.targetDir ? null : 'text',
60
- message: 'Project name:',
61
- initial: defaultProjectName,
62
- onState: (state) => (predefined.targetDir = String(state.value).trim() || defaultProjectName),
63
- },
64
- {
65
- name: 'overwrite',
66
- type: () => (canSkipEmptying(predefined.targetDir) || inputs.force ? null : 'confirm'),
67
- message: () => {
68
- const dirForPrompt = predefined.targetDir === '.'
69
- ? 'Current directory'
70
- : `Target directory "${predefined.targetDir}"`;
71
- return `${dirForPrompt} is not empty. Remove existing files and continue?`;
72
- },
73
- },
74
- {
75
- name: 'overwriteChecker',
76
- type: (prev, values) => {
77
- if (values.overwrite === false) {
78
- throw new Error('Operation cancelled');
79
- }
80
- return null;
81
- },
82
- },
83
- {
84
- name: 'type',
85
- type: () => {
86
- if (inputs.cli && !inputs.http) {
87
- predefined.type = 'cli';
88
- return null;
89
- }
90
- if (!inputs.cli && inputs.http) {
91
- predefined.type = 'http';
92
- return null;
93
- }
94
- return 'select';
95
- },
96
- message: 'Moost Adapter:',
97
- choices: [
98
- { title: 'HTTP (Web) Application', value: 'http' },
99
- { title: 'CLI Application', value: 'cli' },
100
- ],
101
- },
102
- {
103
- name: 'packageName',
104
- type: () => (isValidPackageName(predefined.targetDir) ? null : 'text'),
105
- message: 'Package name:',
106
- initial: () => toValidPackageName(predefined.targetDir),
107
- validate: (dir) => isValidPackageName(dir) || 'Invalid package.json name',
108
- },
109
- {
110
- name: 'wf',
111
- type: () => (inputs.wf ? null : 'toggle'),
112
- message: 'Add Moost Workflows Example?',
113
- initial: false,
114
- active: 'Yes',
115
- inactive: 'No',
116
- },
117
- {
118
- name: 'domelint',
119
- type: () => (inputs.domelint ? null : 'toggle'),
120
- message: 'Add do-me-lint (smart eslint installer)?',
121
- initial: false,
122
- active: 'Yes',
123
- inactive: 'No',
124
- },
125
- ], {
126
- onCancel: () => {
127
- throw new Error('Operation cancelled');
128
- },
129
- });
130
- return {
131
- ...predefined,
132
- ...results,
133
- packageName: (results.packageName || results.targetDir || predefined.targetDir),
134
- };
135
- }
136
- catch (error) {
137
- console.log(error.message);
138
- process.exit(1);
139
- }
35
+ const predefined = {
36
+ targetDir: inputs.name || "",
37
+ projectName: inputs.name || "",
38
+ packageName: inputs.name || ""
39
+ };
40
+ try {
41
+ const results = await (0, prompts.default)([
42
+ {
43
+ name: "projectName",
44
+ type: predefined.targetDir ? null : "text",
45
+ message: "Project name:",
46
+ initial: defaultProjectName,
47
+ onState: (state) => predefined.targetDir = String(state.value).trim() || defaultProjectName
48
+ },
49
+ {
50
+ name: "overwrite",
51
+ type: () => canSkipEmptying(predefined.targetDir) || inputs.force ? null : "confirm",
52
+ message: () => {
53
+ const dirForPrompt = predefined.targetDir === "." ? "Current directory" : `Target directory "${predefined.targetDir}"`;
54
+ return `${dirForPrompt} is not empty. Remove existing files and continue?`;
55
+ }
56
+ },
57
+ {
58
+ name: "overwriteChecker",
59
+ type: (prev, values) => {
60
+ if (values.overwrite === false) throw new Error("Operation cancelled");
61
+ return null;
62
+ }
63
+ },
64
+ {
65
+ name: "type",
66
+ type: () => {
67
+ if (inputs.cli && !inputs.http) {
68
+ predefined.type = "cli";
69
+ return null;
70
+ }
71
+ if (!inputs.cli && inputs.http) {
72
+ predefined.type = "http";
73
+ return null;
74
+ }
75
+ return "select";
76
+ },
77
+ message: "Moost Adapter:",
78
+ choices: [{
79
+ title: "HTTP (Web) Application",
80
+ value: "http"
81
+ }, {
82
+ title: "CLI Application",
83
+ value: "cli"
84
+ }]
85
+ },
86
+ {
87
+ name: "packageName",
88
+ type: () => isValidPackageName(predefined.targetDir) ? null : "text",
89
+ message: "Package name:",
90
+ initial: () => toValidPackageName(predefined.targetDir),
91
+ validate: (dir) => isValidPackageName(dir) || "Invalid package.json name"
92
+ },
93
+ {
94
+ name: "wf",
95
+ type: (prev, values) => inputs.wf || values.type === "cli" || inputs.cli ? null : "toggle",
96
+ message: "Add Moost Workflows Example?",
97
+ initial: false,
98
+ active: "Yes",
99
+ inactive: "No"
100
+ },
101
+ {
102
+ name: "domelint",
103
+ type: () => inputs.domelint ? null : "toggle",
104
+ message: "Add do-me-lint (smart eslint installer)?",
105
+ initial: false,
106
+ active: "Yes",
107
+ inactive: "No"
108
+ }
109
+ ], { onCancel: () => {
110
+ throw new Error("Operation cancelled");
111
+ } });
112
+ return {
113
+ ...predefined,
114
+ ...results,
115
+ packageName: results.packageName || results.targetDir || predefined.targetDir
116
+ };
117
+ } catch (error) {
118
+ console.log(error.message);
119
+ process.exit(1);
120
+ }
140
121
  }
141
122
  function canSkipEmptying(dir) {
142
- if (!fs.existsSync(dir)) {
143
- return true;
144
- }
145
- const files = fs.readdirSync(dir);
146
- if (files.length === 0) {
147
- return true;
148
- }
149
- if (files.length === 1 && files[0] === '.git') {
150
- return true;
151
- }
152
- return false;
123
+ if (!(0, fs.existsSync)(dir)) return true;
124
+ const files = (0, fs.readdirSync)(dir);
125
+ if (files.length === 0) return true;
126
+ if (files.length === 1 && files[0] === ".git") return true;
127
+ return false;
153
128
  }
154
129
  function isValidPackageName(projectName) {
155
- return /^(?:@[\d*a-z~-][\d*._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*$/.test(projectName);
130
+ return /^(?:@[\d*a-z~-][\d*._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*$/.test(projectName);
156
131
  }
157
132
  function toValidPackageName(projectName) {
158
- return projectName
159
- .trim()
160
- .toLowerCase()
161
- .replace(/\s+/g, '-')
162
- .replace(/^[._]/, '')
163
- .replace(/[^\da-z~-]+/g, '-');
133
+ return projectName.trim().toLowerCase().replace(/\s+/g, "-").replace(/^[._]/, "").replace(/[^\da-z~-]+/g, "-");
164
134
  }
165
135
 
166
- const rw = new rewrite.ProstoRewrite({
167
- textPattern: [
168
- '*.{js,jsx,ts,tsx,txt,json,jsonc,yml,yaml,md,ini,css,html}',
169
- 'Dockerfile',
170
- '*config',
171
- '.gitignore',
172
- '.eslintrc.json',
173
- '.prettierignore',
174
- '.prettierrc',
175
- ],
176
- });
136
+ //#endregion
137
+ //#region packages/create-moost/src/scaffold.ts
138
+ const rw = new __prostojs_rewrite.ProstoRewrite({ textPattern: [
139
+ "*.{js,jsx,ts,tsx,txt,json,jsonc,yml,yaml,md,ini,css,html}",
140
+ "Dockerfile",
141
+ "*config",
142
+ ".gitignore",
143
+ ".eslintrc.json",
144
+ ".prettierignore",
145
+ ".prettierrc"
146
+ ] });
177
147
  const root = process.cwd();
178
- const { version } = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')).toString());
148
+ const { version } = JSON.parse((0, fs.readFileSync)((0, path.join)(__dirname, "../package.json")).toString());
179
149
  async function scaffold(data) {
180
- const projectDir = path.join(root, data.targetDir);
181
- if (fs.existsSync(projectDir)) {
182
- if (data.overwrite) {
183
- emptyDirectorySync(projectDir);
184
- }
185
- }
186
- else {
187
- fs.mkdirSync(projectDir);
188
- }
189
- const templatePath = path.join(__dirname, '../templates', data.type);
190
- const commonPath = path.join(__dirname, '../templates/common');
191
- const wfPath = path.join(__dirname, '../templates/wf');
192
- const context = { ...data, version };
193
- const excludeCommon = [];
194
- if (!data.domelint) {
195
- excludeCommon.push('.domelintrc.yml');
196
- }
197
- await rw.rewriteDir({
198
- baseDir: templatePath,
199
- output: projectDir,
200
- }, context);
201
- await rw.rewriteDir({
202
- baseDir: commonPath,
203
- output: projectDir,
204
- exclude: excludeCommon,
205
- renameFile(filename) {
206
- if (filename.endsWith('.jsonc')) {
207
- return filename.replace(/c$/, '');
208
- }
209
- return filename;
210
- },
211
- }, context);
212
- if (data.wf) {
213
- await rw.rewriteDir({
214
- baseDir: wfPath,
215
- output: projectDir,
216
- }, context);
217
- }
150
+ const projectDir = (0, path.join)(root, data.targetDir);
151
+ if ((0, fs.existsSync)(projectDir)) {
152
+ if (data.overwrite) emptyDirectorySync(projectDir);
153
+ } else (0, fs.mkdirSync)(projectDir);
154
+ const templatePath = (0, path.join)(__dirname, "../templates", data.type);
155
+ const commonPath = (0, path.join)(__dirname, "../templates/common");
156
+ const wfPath = (0, path.join)(__dirname, "../templates/wf");
157
+ const context = {
158
+ ...data,
159
+ version
160
+ };
161
+ const excludeCommon = [];
162
+ if (!data.domelint) excludeCommon.push(".domelintrc.yml");
163
+ await rw.rewriteDir({
164
+ baseDir: templatePath,
165
+ output: projectDir,
166
+ renameFile(filename) {
167
+ if (filename.endsWith(".jsonc")) return filename.replace(/c$/, "");
168
+ return filename;
169
+ }
170
+ }, context);
171
+ await rw.rewriteDir({
172
+ baseDir: commonPath,
173
+ output: projectDir,
174
+ exclude: excludeCommon,
175
+ renameFile(filename) {
176
+ if (filename.endsWith(".jsonc")) return filename.replace(/c$/, "");
177
+ return filename;
178
+ }
179
+ }, context);
180
+ if (data.wf) await rw.rewriteDir({
181
+ baseDir: wfPath,
182
+ output: projectDir,
183
+ renameFile(filename) {
184
+ if (filename.endsWith(".jsonc")) return filename.replace(/c$/, "");
185
+ return filename;
186
+ }
187
+ }, context);
218
188
  }
219
189
  function emptyDirectorySync(directory) {
220
- if (fs.existsSync(directory)) {
221
- fs.readdirSync(directory).forEach(file => {
222
- const currentPath = path.join(directory, file);
223
- if (fs.lstatSync(currentPath).isDirectory()) {
224
- emptyDirectorySync(currentPath);
225
- fs.rmdirSync(currentPath);
226
- }
227
- else {
228
- fs.unlinkSync(currentPath);
229
- }
230
- });
231
- }
190
+ if ((0, fs.existsSync)(directory)) (0, fs.readdirSync)(directory).forEach((file) => {
191
+ const currentPath = (0, path.join)(directory, file);
192
+ if ((0, fs.lstatSync)(currentPath).isDirectory()) {
193
+ emptyDirectorySync(currentPath);
194
+ (0, fs.rmdirSync)(currentPath);
195
+ } else (0, fs.unlinkSync)(currentPath);
196
+ });
232
197
  }
233
198
 
234
- let CliController = class CliController extends moost.Moost {
235
- root() {
236
- return this.execute();
237
- }
238
- withName(name) {
239
- return this.execute(name);
240
- }
241
- async execute(name) {
242
- eventCli$1.useAutoHelp() && process.exit(0);
243
- const prompts = await getPrompts({
244
- name,
245
- http: !!eventCli$1.useCliOption('http'),
246
- cli: !!eventCli$1.useCliOption('cli'),
247
- wf: !!eventCli$1.useCliOption('wf'),
248
- domelint: !!eventCli$1.useCliOption('domelint'),
249
- force: !!eventCli$1.useCliOption('force'),
250
- });
251
- console.log('\nScaffolding a new project...');
252
- await scaffold(prompts);
253
- const cli = prompts.type === 'cli';
254
- return `
255
- ${'' + ''}Success! ${''}Your new "${prompts.projectName}" project has been created successfully. ${''}
199
+ //#endregion
200
+ //#region packages/create-moost/src/index.ts
201
+ function _ts_decorate(decorators, target, key, desc) {
202
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
203
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
204
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
205
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
206
+ }
207
+ function _ts_metadata(k, v) {
208
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
209
+ }
210
+ function _ts_param(paramIndex, decorator) {
211
+ return function(target, key) {
212
+ decorator(target, key, paramIndex);
213
+ };
214
+ }
215
+ let Commands = class Commands$1 extends __moostjs_event_cli.CliApp {
216
+ root() {
217
+ return this.execute();
218
+ }
219
+ withName(name) {
220
+ return this.execute(name);
221
+ }
222
+ async execute(name) {
223
+ (0, __wooksjs_event_cli.useAutoHelp)() && process.exit(0);
224
+ const prompts$2 = await getPrompts({
225
+ name,
226
+ http: !!(0, __wooksjs_event_cli.useCliOption)("http"),
227
+ cli: !!(0, __wooksjs_event_cli.useCliOption)("cli"),
228
+ wf: !!(0, __wooksjs_event_cli.useCliOption)("wf"),
229
+ domelint: !!(0, __wooksjs_event_cli.useCliOption)("domelint"),
230
+ force: !!(0, __wooksjs_event_cli.useCliOption)("force")
231
+ });
232
+ console.log("\nScaffolding a new project...");
233
+ await scaffold(prompts$2);
234
+ const cli = prompts$2.type === "cli";
235
+ return `
236
+ ${"\x1B[97m\x1B[1m"}Success! ${"\x1B[22m"}Your new "${prompts$2.projectName}" project has been created successfully. ${"\x1B[39m"}
256
237
 
257
238
  Follow these next steps to start your development server:
258
239
 
259
240
  1. Navigate to your new project:
260
- ${''}cd ${prompts.targetDir} ${''}
241
+ ${"\x1B[36m"}cd ${prompts$2.targetDir} ${"\x1B[39m"}
261
242
 
262
243
  2. Install the dependencies:
263
- ${''}npm install ${''}
264
- ${cli
265
- ? `
244
+ ${"\x1B[36m"}npm install ${"\x1B[39m"}
245
+ ${cli ? `
266
246
  3. Make bin.js executable:
267
- ${''}chmod +x ./bin.js ${''}
268
- `
269
- : ''}
270
- ${cli ? '4' : '3'}. Start the development server:
271
- ${''}npm run dev${cli ? ' -- hello World' : ''}${''}
247
+ ${"\x1B[36m"}chmod +x ./bin.js ${"\x1B[39m"}
248
+ ` : ""}
249
+ ${cli ? "4" : "3"}. Start the development server:
250
+ ${"\x1B[36m"}npm run dev${cli ? " -- hello World" : ""}${"\x1B[39m"}
272
251
 
273
- ${''}You're all set! The development server will help you in building your application.
274
- Enjoy coding, and build something amazing!${''}
252
+ ${"\x1B[32m"}You're all set! The development server will help you in building your application.
253
+ Enjoy coding, and build something amazing!${"\x1B[39m"}
275
254
  `;
276
- }
255
+ }
277
256
  };
278
- __decorate([
279
- eventCli.Cli(''),
280
- __metadata("design:type", Function),
281
- __metadata("design:paramtypes", []),
282
- __metadata("design:returntype", void 0)
283
- ], CliController.prototype, "root", null);
284
- __decorate([
285
- eventCli.Cli(':name'),
286
- __param(0, moost.Param('name')),
287
- __metadata("design:type", Function),
288
- __metadata("design:paramtypes", [String]),
289
- __metadata("design:returntype", void 0)
290
- ], CliController.prototype, "withName", null);
291
- CliController = __decorate([
292
- moost.Controller()
293
- ], CliController);
257
+ _ts_decorate([
258
+ (0, __moostjs_event_cli.Cli)(""),
259
+ _ts_metadata("design:type", Function),
260
+ _ts_metadata("design:paramtypes", []),
261
+ _ts_metadata("design:returntype", void 0)
262
+ ], Commands.prototype, "root", null);
263
+ _ts_decorate([
264
+ (0, __moostjs_event_cli.Cli)(":name"),
265
+ _ts_param(0, (0, __moostjs_event_cli.Param)("name")),
266
+ _ts_metadata("design:type", Function),
267
+ _ts_metadata("design:paramtypes", [String]),
268
+ _ts_metadata("design:returntype", void 0)
269
+ ], Commands.prototype, "withName", null);
294
270
  function run() {
295
- const app = new CliController();
296
- app.adapter(new eventCli.MoostCli({
297
- globalCliOptions: [
298
- { keys: ['http'], description: 'Use Moost HTTP', type: Boolean },
299
- { keys: ['cli'], description: 'Use Moost CLI', type: Boolean },
300
- { keys: ['wf'], description: 'Add Workflow Adapter', type: Boolean },
301
- {
302
- keys: ['domelint'],
303
- description: 'Add do-me-lint (smart eslint installer)',
304
- type: Boolean,
305
- },
306
- { keys: ['force'], description: 'Force Overwrite', type: Boolean },
307
- ],
308
- }));
309
- void app.init();
271
+ new Commands().useOptions([
272
+ {
273
+ keys: ["http"],
274
+ description: "Use Moost HTTP",
275
+ type: Boolean
276
+ },
277
+ {
278
+ keys: ["cli"],
279
+ description: "Use Moost CLI",
280
+ type: Boolean
281
+ },
282
+ {
283
+ keys: ["wf"],
284
+ description: "Add Workflow Adapter",
285
+ type: Boolean
286
+ },
287
+ {
288
+ keys: ["domelint"],
289
+ description: "Add do-me-lint (smart eslint installer)",
290
+ type: Boolean
291
+ },
292
+ {
293
+ keys: ["force"],
294
+ description: "Force Overwrite",
295
+ type: Boolean
296
+ }
297
+ ]).start();
310
298
  }
311
299
 
312
- exports.run = run;
300
+ //#endregion
301
+ exports.run = run