task-script-support-cli 0.2.3 → 0.2.4
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/dist/package.json +2 -1
- package/dist/src/commands/about.d.ts +2 -2
- package/dist/src/commands/about.d.ts.map +1 -1
- package/dist/src/commands/about.js +2 -2
- package/dist/src/commands/about.js.map +1 -1
- package/dist/src/commands/configure.d.ts +8 -0
- package/dist/src/commands/configure.d.ts.map +1 -0
- package/dist/src/commands/configure.js +25 -0
- package/dist/src/commands/configure.js.map +1 -0
- package/dist/src/commands/gen.d.ts +8 -8
- package/dist/src/commands/gen.d.ts.map +1 -1
- package/dist/src/commands/gen.js +9 -9
- package/dist/src/commands/gen.js.map +1 -1
- package/dist/src/commands/new.d.ts +2 -2
- package/dist/src/commands/new.d.ts.map +1 -1
- package/dist/src/commands/new.js +2 -2
- package/dist/src/commands/new.js.map +1 -1
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/services/file-service.d.ts +3 -1
- package/dist/src/services/file-service.d.ts.map +1 -1
- package/dist/src/services/file-service.js +22 -4
- package/dist/src/services/file-service.js.map +1 -1
- package/dist/src/services/log-service.d.ts +1 -0
- package/dist/src/services/log-service.d.ts.map +1 -1
- package/dist/src/services/log-service.js +7 -0
- package/dist/src/services/log-service.js.map +1 -1
- package/dist/src/services/project-service.d.ts +1 -1
- package/dist/src/services/project-service.d.ts.map +1 -1
- package/dist/src/services/project-service.js +5 -3
- package/dist/src/services/project-service.js.map +1 -1
- package/dist/src/services/prompt-service.d.ts +7 -0
- package/dist/src/services/prompt-service.d.ts.map +1 -1
- package/dist/src/services/prompt-service.js +16 -3
- package/dist/src/services/prompt-service.js.map +1 -1
- package/dist/src/tasks/configure.d.ts +44 -0
- package/dist/src/tasks/configure.d.ts.map +1 -0
- package/dist/src/tasks/configure.js +102 -0
- package/dist/src/tasks/configure.js.map +1 -0
- package/dist/src/tasks/create-new-project.d.ts +1 -1
- package/dist/src/tasks/create-new-project.js +1 -1
- package/dist/src/tasks/{generate-command.d.ts → generate/generate-command.d.ts} +6 -6
- package/dist/src/tasks/generate/generate-command.d.ts.map +1 -0
- package/dist/src/tasks/{generate-command.js → generate/generate-command.js} +10 -10
- package/dist/src/tasks/generate/generate-command.js.map +1 -0
- package/dist/src/tasks/{generate-service.d.ts → generate/generate-service.d.ts} +4 -4
- package/dist/src/tasks/generate/generate-service.d.ts.map +1 -0
- package/dist/src/tasks/{generate-service.js → generate/generate-service.js} +7 -7
- package/dist/src/tasks/generate/generate-service.js.map +1 -0
- package/dist/src/tasks/{generate-task.d.ts → generate/generate-task.d.ts} +4 -4
- package/dist/src/tasks/generate/generate-task.d.ts.map +1 -0
- package/dist/src/tasks/{generate-task.js → generate/generate-task.js} +7 -7
- package/dist/src/tasks/generate/generate-task.js.map +1 -0
- package/dist/src/tasks/{select-gen-target-name.d.ts → generate/select-gen-target-name.d.ts} +3 -3
- package/dist/src/tasks/generate/select-gen-target-name.d.ts.map +1 -0
- package/dist/src/tasks/{select-gen-target-name.js → generate/select-gen-target-name.js} +6 -5
- package/dist/src/tasks/generate/select-gen-target-name.js.map +1 -0
- package/dist/src/tasks/generate/select-gen-target.d.ts +14 -0
- package/dist/src/tasks/generate/select-gen-target.d.ts.map +1 -0
- package/dist/src/tasks/{select-gen-target.js → generate/select-gen-target.js} +13 -11
- package/dist/src/tasks/generate/select-gen-target.js.map +1 -0
- package/dist/src/tasks/{print-about-information.d.ts → stdout/print-about-information.d.ts} +1 -1
- package/dist/src/tasks/stdout/print-about-information.d.ts.map +1 -0
- package/dist/src/tasks/{print-about-information.js → stdout/print-about-information.js} +2 -2
- package/dist/src/tasks/stdout/print-about-information.js.map +1 -0
- package/dist/src/tasks/stdout/print-banner.d.ts +12 -0
- package/dist/src/tasks/stdout/print-banner.d.ts.map +1 -0
- package/dist/src/tasks/{print-banner.js → stdout/print-banner.js} +4 -4
- package/dist/src/tasks/stdout/print-banner.js.map +1 -0
- package/dist/src/tasks/{print-generated-results.d.ts → stdout/print-generated-results.d.ts} +2 -2
- package/dist/src/tasks/stdout/print-generated-results.d.ts.map +1 -0
- package/dist/src/tasks/{print-generated-results.js → stdout/print-generated-results.js} +4 -3
- package/dist/src/tasks/stdout/print-generated-results.js.map +1 -0
- package/dist/src/tasks/sync-configuration.d.ts +6 -2
- package/dist/src/tasks/sync-configuration.d.ts.map +1 -1
- package/dist/src/tasks/sync-configuration.js +27 -22
- package/dist/src/tasks/sync-configuration.js.map +1 -1
- package/dist/src/wrappers/app-task.d.ts +1 -0
- package/dist/src/wrappers/app-task.d.ts.map +1 -1
- package/dist/src/wrappers/app-task.js +4 -0
- package/dist/src/wrappers/app-task.js.map +1 -1
- package/package.json +2 -1
- package/src/commands/about.ts +2 -2
- package/src/commands/configure.ts +10 -0
- package/src/commands/gen.ts +8 -8
- package/src/commands/new.ts +2 -2
- package/src/index.ts +5 -0
- package/src/services/file-service.ts +28 -4
- package/src/services/log-service.ts +8 -0
- package/src/services/project-service.ts +6 -3
- package/src/services/prompt-service.ts +14 -3
- package/src/tasks/configure.ts +105 -0
- package/src/tasks/create-new-project.ts +1 -1
- package/src/tasks/{generate-command.ts → generate/generate-command.ts} +10 -14
- package/src/tasks/{generate-service.ts → generate/generate-service.ts} +7 -7
- package/src/tasks/{generate-task.ts → generate/generate-task.ts} +7 -7
- package/src/tasks/{select-gen-target-name.ts → generate/select-gen-target-name.ts} +6 -6
- package/src/tasks/{select-gen-target.ts → generate/select-gen-target.ts} +10 -8
- package/src/tasks/{print-about-information.ts → stdout/print-about-information.ts} +2 -2
- package/src/tasks/{print-banner.ts → stdout/print-banner.ts} +4 -4
- package/src/tasks/{print-generated-results.ts → stdout/print-generated-results.ts} +4 -3
- package/src/tasks/sync-configuration.ts +31 -23
- package/src/wrappers/app-task.ts +5 -0
- package/dist/src/tasks/generate-command.d.ts.map +0 -1
- package/dist/src/tasks/generate-command.js.map +0 -1
- package/dist/src/tasks/generate-service.d.ts.map +0 -1
- package/dist/src/tasks/generate-service.js.map +0 -1
- package/dist/src/tasks/generate-task.d.ts.map +0 -1
- package/dist/src/tasks/generate-task.js.map +0 -1
- package/dist/src/tasks/print-about-information.d.ts.map +0 -1
- package/dist/src/tasks/print-about-information.js.map +0 -1
- package/dist/src/tasks/print-banner.d.ts +0 -12
- package/dist/src/tasks/print-banner.d.ts.map +0 -1
- package/dist/src/tasks/print-banner.js.map +0 -1
- package/dist/src/tasks/print-generated-results.d.ts.map +0 -1
- package/dist/src/tasks/print-generated-results.js.map +0 -1
- package/dist/src/tasks/select-gen-target-name.d.ts.map +0 -1
- package/dist/src/tasks/select-gen-target-name.js.map +0 -1
- package/dist/src/tasks/select-gen-target.d.ts +0 -14
- package/dist/src/tasks/select-gen-target.d.ts.map +0 -1
- package/dist/src/tasks/select-gen-target.js.map +0 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "task-script-support-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"preferGlobal": true,
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"dotenv": "^17.2.3",
|
|
38
38
|
"figlet": "^1.9.4",
|
|
39
39
|
"immutable": "^5.1.4",
|
|
40
|
+
"inquirer-sortable-checkbox": "^1.0.1",
|
|
40
41
|
"lodash": "^4.18.1",
|
|
41
42
|
"node-persist": "^4.0.4",
|
|
42
43
|
"reflect-metadata": "^0.2.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from "../wrappers/command";
|
|
2
|
-
import PrintAboutInformation from "../tasks/print-about-information";
|
|
3
|
-
import PrintBanner from "../tasks/print-banner";
|
|
2
|
+
import PrintAboutInformation from "../tasks/stdout/print-about-information";
|
|
3
|
+
import PrintBanner from "../tasks/stdout/print-banner";
|
|
4
4
|
export declare class AboutCommand extends Command {
|
|
5
5
|
tasks: (typeof PrintAboutInformation | typeof PrintBanner)[];
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"about.d.ts","sourceRoot":"./src/","sources":["src/commands/about.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,qBAAqB,MAAM,
|
|
1
|
+
{"version":3,"file":"about.d.ts","sourceRoot":"./src/","sources":["src/commands/about.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,qBAAqB,MAAM,yCAAyC,CAAC;AAC5E,OAAO,WAAW,MAAM,8BAA8B,CAAC;AAEvD,qBACa,YAAa,SAAQ,OAAO;IACvC,KAAK,wDAAwC;CAC9C"}
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AboutCommand = void 0;
|
|
13
13
|
const tsyringe_1 = require("tsyringe");
|
|
14
14
|
const command_1 = require("../wrappers/command");
|
|
15
|
-
const print_about_information_1 = __importDefault(require("../tasks/print-about-information"));
|
|
16
|
-
const print_banner_1 = __importDefault(require("../tasks/print-banner"));
|
|
15
|
+
const print_about_information_1 = __importDefault(require("../tasks/stdout/print-about-information"));
|
|
16
|
+
const print_banner_1 = __importDefault(require("../tasks/stdout/print-banner"));
|
|
17
17
|
let AboutCommand = class AboutCommand extends command_1.Command {
|
|
18
18
|
tasks = [print_banner_1.default, print_about_information_1.default];
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"about.js","sourceRoot":"./src/","sources":["src/commands/about.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAqC;AACrC,iDAA8C;AAC9C
|
|
1
|
+
{"version":3,"file":"about.js","sourceRoot":"./src/","sources":["src/commands/about.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAqC;AACrC,iDAA8C;AAC9C,sGAA4E;AAC5E,gFAAuD;AAGhD,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,iBAAO;IACvC,KAAK,GAAG,CAAC,sBAAW,EAAE,iCAAqB,CAAC,CAAC;CAC9C,CAAA;AAFY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,oBAAS,GAAE;GACC,YAAY,CAExB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Command } from "../wrappers/command";
|
|
2
|
+
import CheckEnv from "../tasks/check-env";
|
|
3
|
+
import ConfigureCache from "../tasks/configure";
|
|
4
|
+
import PrintBanner from "../tasks/stdout/print-banner";
|
|
5
|
+
export declare class ConfigureCommand extends Command {
|
|
6
|
+
tasks: (typeof PrintBanner | typeof CheckEnv | typeof ConfigureCache)[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=configure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"./src/","sources":["src/commands/configure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,WAAW,MAAM,8BAA8B,CAAC;AAEvD,qBACa,gBAAiB,SAAQ,OAAO;IAC3C,KAAK,mEAA2C;CACjD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ConfigureCommand = void 0;
|
|
13
|
+
const tsyringe_1 = require("tsyringe");
|
|
14
|
+
const command_1 = require("../wrappers/command");
|
|
15
|
+
const check_env_1 = __importDefault(require("../tasks/check-env"));
|
|
16
|
+
const configure_1 = __importDefault(require("../tasks/configure"));
|
|
17
|
+
const print_banner_1 = __importDefault(require("../tasks/stdout/print-banner"));
|
|
18
|
+
let ConfigureCommand = class ConfigureCommand extends command_1.Command {
|
|
19
|
+
tasks = [print_banner_1.default, check_env_1.default, configure_1.default];
|
|
20
|
+
};
|
|
21
|
+
exports.ConfigureCommand = ConfigureCommand;
|
|
22
|
+
exports.ConfigureCommand = ConfigureCommand = __decorate([
|
|
23
|
+
(0, tsyringe_1.singleton)()
|
|
24
|
+
], ConfigureCommand);
|
|
25
|
+
//# sourceMappingURL=configure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"./src/","sources":["src/commands/configure.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAqC;AACrC,iDAA8C;AAC9C,mEAA0C;AAC1C,mEAAgD;AAChD,gFAAuD;AAGhD,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,iBAAO;IAC3C,KAAK,GAAG,CAAC,sBAAW,EAAE,mBAAQ,EAAE,mBAAc,CAAC,CAAC;CACjD,CAAA;AAFY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,oBAAS,GAAE;GACC,gBAAgB,CAE5B"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Command } from "../wrappers/command";
|
|
2
2
|
import CheckEnvironment from "../tasks/check-env";
|
|
3
|
-
import PrintBanner from "../tasks/print-banner";
|
|
4
|
-
import SelectGenTarget from "../tasks/select-gen-target";
|
|
5
|
-
import GenerateService from "../tasks/generate-service";
|
|
6
|
-
import GenerateCommand from "../tasks/generate-command";
|
|
7
|
-
import GenerateTask from "../tasks/generate-task";
|
|
8
|
-
import PrintGeneratedResults from "../tasks/print-generated-results";
|
|
9
|
-
import
|
|
10
|
-
import SelectGenTargetName from "../tasks/select-gen-target-name";
|
|
3
|
+
import PrintBanner from "../tasks/stdout/print-banner";
|
|
4
|
+
import SelectGenTarget from "../tasks/generate/select-gen-target";
|
|
5
|
+
import GenerateService from "../tasks/generate/generate-service";
|
|
6
|
+
import GenerateCommand from "../tasks/generate/generate-command";
|
|
7
|
+
import GenerateTask from "../tasks/generate/generate-task";
|
|
8
|
+
import PrintGeneratedResults from "../tasks/stdout/print-generated-results";
|
|
9
|
+
import SyncConfiguration from "../tasks/sync-configuration";
|
|
10
|
+
import SelectGenTargetName from "../tasks/generate/select-gen-target-name";
|
|
11
11
|
export declare class GenCommand extends Command {
|
|
12
12
|
tasks: (typeof PrintBanner | typeof CheckEnvironment | typeof SelectGenTarget | typeof PrintGeneratedResults | typeof SyncConfiguration | typeof SelectGenTargetName | (typeof GenerateService | typeof GenerateCommand | typeof GenerateTask)[])[];
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen.d.ts","sourceRoot":"./src/","sources":["src/commands/gen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,WAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"gen.d.ts","sourceRoot":"./src/","sources":["src/commands/gen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,eAAe,MAAM,qCAAqC,CAAC;AAClE,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,YAAY,MAAM,iCAAiC,CAAC;AAC3D,OAAO,qBAAqB,MAAM,yCAAyC,CAAC;AAC5E,OAAO,iBAAiB,MAAM,6BAA6B,CAAC;AAC5D,OAAO,mBAAmB,MAAM,0CAA0C,CAAC;AAE3E,qBACa,UAAW,SAAQ,OAAO;IACrC,KAAK,+OAQH;CACH"}
|
package/dist/src/commands/gen.js
CHANGED
|
@@ -13,20 +13,20 @@ exports.GenCommand = void 0;
|
|
|
13
13
|
const tsyringe_1 = require("tsyringe");
|
|
14
14
|
const command_1 = require("../wrappers/command");
|
|
15
15
|
const check_env_1 = __importDefault(require("../tasks/check-env"));
|
|
16
|
-
const print_banner_1 = __importDefault(require("../tasks/print-banner"));
|
|
17
|
-
const select_gen_target_1 = __importDefault(require("../tasks/select-gen-target"));
|
|
18
|
-
const generate_service_1 = __importDefault(require("../tasks/generate-service"));
|
|
19
|
-
const generate_command_1 = __importDefault(require("../tasks/generate-command"));
|
|
20
|
-
const generate_task_1 = __importDefault(require("../tasks/generate-task"));
|
|
21
|
-
const print_generated_results_1 = __importDefault(require("../tasks/print-generated-results"));
|
|
22
|
-
const sync_configuration_1 = require("../tasks/sync-configuration");
|
|
23
|
-
const select_gen_target_name_1 = __importDefault(require("../tasks/select-gen-target-name"));
|
|
16
|
+
const print_banner_1 = __importDefault(require("../tasks/stdout/print-banner"));
|
|
17
|
+
const select_gen_target_1 = __importDefault(require("../tasks/generate/select-gen-target"));
|
|
18
|
+
const generate_service_1 = __importDefault(require("../tasks/generate/generate-service"));
|
|
19
|
+
const generate_command_1 = __importDefault(require("../tasks/generate/generate-command"));
|
|
20
|
+
const generate_task_1 = __importDefault(require("../tasks/generate/generate-task"));
|
|
21
|
+
const print_generated_results_1 = __importDefault(require("../tasks/stdout/print-generated-results"));
|
|
22
|
+
const sync_configuration_1 = __importDefault(require("../tasks/sync-configuration"));
|
|
23
|
+
const select_gen_target_name_1 = __importDefault(require("../tasks/generate/select-gen-target-name"));
|
|
24
24
|
let GenCommand = class GenCommand extends command_1.Command {
|
|
25
25
|
tasks = [
|
|
26
26
|
print_banner_1.default,
|
|
27
27
|
check_env_1.default,
|
|
28
28
|
select_gen_target_1.default,
|
|
29
|
-
sync_configuration_1.
|
|
29
|
+
sync_configuration_1.default,
|
|
30
30
|
select_gen_target_name_1.default,
|
|
31
31
|
[generate_command_1.default, generate_service_1.default, generate_task_1.default],
|
|
32
32
|
print_generated_results_1.default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen.js","sourceRoot":"./src/","sources":["src/commands/gen.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAqC;AACrC,iDAA8C;AAC9C,mEAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"gen.js","sourceRoot":"./src/","sources":["src/commands/gen.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAqC;AACrC,iDAA8C;AAC9C,mEAAkD;AAClD,gFAAuD;AACvD,4FAAkE;AAClE,0FAAiE;AACjE,0FAAiE;AACjE,oFAA2D;AAC3D,sGAA4E;AAC5E,qFAA4D;AAC5D,sGAA2E;AAGpE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,iBAAO;IACrC,KAAK,GAAG;QACN,sBAAW;QACX,mBAAgB;QAChB,2BAAe;QACf,4BAAiB;QACjB,gCAAmB;QACnB,CAAC,0BAAe,EAAE,0BAAe,EAAE,uBAAY,CAAC;QAChD,iCAAqB;KACtB,CAAC;CACH,CAAA;AAVY,gCAAU;qBAAV,UAAU;IADtB,IAAA,oBAAS,GAAE;GACC,UAAU,CAUtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "../wrappers/command";
|
|
2
|
-
import PrintBanner from "../tasks/print-banner";
|
|
2
|
+
import PrintBanner from "../tasks/stdout/print-banner";
|
|
3
3
|
import CreateNewProject from "../tasks/create-new-project";
|
|
4
|
-
import PrintGeneratedResults from "../tasks/print-generated-results";
|
|
4
|
+
import PrintGeneratedResults from "../tasks/stdout/print-generated-results";
|
|
5
5
|
export declare class NewCommand extends Command {
|
|
6
6
|
tasks: (typeof PrintBanner | typeof PrintGeneratedResults | typeof CreateNewProject)[];
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.d.ts","sourceRoot":"./src/","sources":["src/commands/new.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,WAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"new.d.ts","sourceRoot":"./src/","sources":["src/commands/new.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,qBAAqB,MAAM,yCAAyC,CAAC;AAE5E,qBACa,UAAW,SAAQ,OAAO;IACrC,KAAK,kFAA0D;CAChE"}
|
package/dist/src/commands/new.js
CHANGED
|
@@ -12,9 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.NewCommand = void 0;
|
|
13
13
|
const tsyringe_1 = require("tsyringe");
|
|
14
14
|
const command_1 = require("../wrappers/command");
|
|
15
|
-
const print_banner_1 = __importDefault(require("../tasks/print-banner"));
|
|
15
|
+
const print_banner_1 = __importDefault(require("../tasks/stdout/print-banner"));
|
|
16
16
|
const create_new_project_1 = __importDefault(require("../tasks/create-new-project"));
|
|
17
|
-
const print_generated_results_1 = __importDefault(require("../tasks/print-generated-results"));
|
|
17
|
+
const print_generated_results_1 = __importDefault(require("../tasks/stdout/print-generated-results"));
|
|
18
18
|
let NewCommand = class NewCommand extends command_1.Command {
|
|
19
19
|
tasks = [print_banner_1.default, create_new_project_1.default, print_generated_results_1.default];
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.js","sourceRoot":"./src/","sources":["src/commands/new.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAqC;AACrC,iDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"new.js","sourceRoot":"./src/","sources":["src/commands/new.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAqC;AACrC,iDAA8C;AAC9C,gFAAuD;AACvD,qFAA2D;AAC3D,sGAA4E;AAGrE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,iBAAO;IACrC,KAAK,GAAG,CAAC,sBAAW,EAAE,4BAAgB,EAAE,iCAAqB,CAAC,CAAC;CAChE,CAAA;AAFY,gCAAU;qBAAV,UAAU;IADtB,IAAA,oBAAS,GAAE;GACC,UAAU,CAEtB"}
|
package/dist/src/index.js
CHANGED
|
@@ -14,6 +14,7 @@ util_service_1.UtilService.initializeDependencies();
|
|
|
14
14
|
const about_1 = require("./commands/about");
|
|
15
15
|
const gen_1 = require("./commands/gen");
|
|
16
16
|
const new_1 = require("./commands/new");
|
|
17
|
+
const configure_1 = require("./commands/configure");
|
|
17
18
|
const { program } = commander_1.default;
|
|
18
19
|
const name = util_service_1.UtilService.getAppName();
|
|
19
20
|
const version = util_service_1.UtilService.getAppVersion();
|
|
@@ -36,5 +37,8 @@ program
|
|
|
36
37
|
.option("-n, --name <name>", "Name of the New Project")
|
|
37
38
|
// .option("-d, --dest", "target destination path")
|
|
38
39
|
.action(tsyringe_1.container.resolve(new_1.NewCommand).handler);
|
|
40
|
+
program
|
|
41
|
+
.command("configure")
|
|
42
|
+
.action(tsyringe_1.container.resolve(configure_1.ConfigureCommand).handler);
|
|
39
43
|
program.parse(process.argv);
|
|
40
44
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"./src/","sources":["src/index.ts"],"names":[],"mappings":";;;;;AAAA,4BAA0B;AAE1B,oDAA4B;AAC5B,uCAAqC;AACrC,0DAAkC;AAElC,gBAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAE/B,0DAAsD;AAEtD,gCAAgC;AAChC,0BAAW,CAAC,sBAAsB,EAAE,CAAC;AAErC,4CAAgD;AAChD,wCAA4C;AAC5C,wCAA4C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"./src/","sources":["src/index.ts"],"names":[],"mappings":";;;;;AAAA,4BAA0B;AAE1B,oDAA4B;AAC5B,uCAAqC;AACrC,0DAAkC;AAElC,gBAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAE/B,0DAAsD;AAEtD,gCAAgC;AAChC,0BAAW,CAAC,sBAAsB,EAAE,CAAC;AAErC,4CAAgD;AAChD,wCAA4C;AAC5C,wCAA4C;AAC5C,oDAAwD;AAExD,MAAM,EAAE,OAAO,EAAE,GAAG,mBAAS,CAAC;AAC9B,MAAM,IAAI,GAAG,0BAAW,CAAC,UAAU,EAAE,CAAC;AACtC,MAAM,OAAO,GAAG,0BAAW,CAAC,aAAa,EAAE,CAAC;AAE5C,OAAO;KACJ,OAAO,CAAC,GAAG,IAAI,aAAa,OAAO,EAAE,EAAE,eAAe,CAAC;KACvD,WAAW,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,0BAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAEhF,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,MAAM,CAAC,oBAAS,CAAC,OAAO,CAAC,oBAAY,CAAC,CAAC,OAAO,CAAC;KAC/C,MAAM,CAAC,qBAAqB,EAAE,kCAAkC,CAAC,CAAC;AAErE,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,MAAM,CAAC,0BAA0B,EAAE,0BAA0B,CAAC;KAC9D,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC;KAC7C,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC;KAC7C,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAAC;KACvC,MAAM,CAAC,oBAAS,CAAC,OAAO,CAAC,gBAAU,CAAC,CAAC,OAAO,CAAC,CAAC;AAEjD,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;IACvD,mDAAmD;KAClD,MAAM,CAAC,oBAAS,CAAC,OAAO,CAAC,gBAAU,CAAC,CAAC,OAAO,CAAC,CAAC;AAEjD,OAAO;KACJ,OAAO,CAAC,WAAW,CAAC;KACpB,MAAM,CAAC,oBAAS,CAAC,OAAO,CAAC,4BAAgB,CAAC,CAAC,OAAO,CAAC,CAAC;AAEvD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ export declare class FileService {
|
|
|
3
3
|
join(path1: string, path2: string): string;
|
|
4
4
|
toRelativePath(fromPath: string, toPath: string): string;
|
|
5
5
|
toFullPath(relativePath: string): string;
|
|
6
|
+
getFilename: (somePath: string) => string;
|
|
6
7
|
getFilenameNoExt(somePath: string): string;
|
|
7
8
|
getFilesInDir(dirPath: string): string[];
|
|
8
9
|
getRunnerRootDir(): string;
|
|
@@ -11,6 +12,7 @@ export declare class FileService {
|
|
|
11
12
|
getCommandDirs(startPath: string): string[];
|
|
12
13
|
writeFile(filePath: string, content: string): void;
|
|
13
14
|
private findDirsByName;
|
|
14
|
-
private
|
|
15
|
+
private getDirectoriesRecursively;
|
|
16
|
+
private getFilesRecursively;
|
|
15
17
|
}
|
|
16
18
|
//# sourceMappingURL=file-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-service.d.ts","sourceRoot":"./src/","sources":["src/services/file-service.ts"],"names":[],"mappings":"AAOA,qBACa,WAAW;IACtB,YAAY,IAAI,MAAM;IAItB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAI/C,UAAU,CAAC,YAAY,EAAE,MAAM;IAI/B,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAKjC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"file-service.d.ts","sourceRoot":"./src/","sources":["src/services/file-service.ts"],"names":[],"mappings":"AAOA,qBACa,WAAW;IACtB,YAAY,IAAI,MAAM;IAItB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAIjC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAI/C,UAAU,CAAC,YAAY,EAAE,MAAM;IAI/B,WAAW,GAAI,UAAU,MAAM,YAA6B;IAC5D,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAKjC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IASxC,gBAAgB,IAAI,MAAM;IAa1B,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE;IAIxC,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE;IAI3C,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE;IAI3C,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAWlD,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,yBAAyB;IAejC,OAAO,CAAC,mBAAmB;CAiB5B"}
|
|
@@ -28,6 +28,7 @@ let FileService = class FileService {
|
|
|
28
28
|
toFullPath(relativePath) {
|
|
29
29
|
return node_path_1.default.resolve(relativePath);
|
|
30
30
|
}
|
|
31
|
+
getFilename = (somePath) => node_path_1.default.basename(somePath);
|
|
31
32
|
getFilenameNoExt(somePath) {
|
|
32
33
|
const filename = node_path_1.default.basename(somePath);
|
|
33
34
|
return filename.includes(".") ? filename.split(".")[0] || "" : filename;
|
|
@@ -36,7 +37,9 @@ let FileService = class FileService {
|
|
|
36
37
|
if (!node_fs_1.default.existsSync(dirPath) || !node_fs_1.default.statSync(dirPath).isDirectory()) {
|
|
37
38
|
throw new Error(`Directory not found: ${dirPath}`);
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
const files = [];
|
|
41
|
+
this.getFilesRecursively(dirPath, (file) => files.push(file));
|
|
42
|
+
return files;
|
|
40
43
|
}
|
|
41
44
|
getRunnerRootDir() {
|
|
42
45
|
let currentDir = this.getRunnerDir();
|
|
@@ -69,25 +72,40 @@ let FileService = class FileService {
|
|
|
69
72
|
}
|
|
70
73
|
findDirsByName(dirPath, dirNameSuffix) {
|
|
71
74
|
const dirs = [];
|
|
72
|
-
this.
|
|
75
|
+
this.getDirectoriesRecursively(dirPath, (dir) => {
|
|
73
76
|
if (node_path_1.default.basename(dir).includes(dirNameSuffix) && !dirs.includes(dir)) {
|
|
74
77
|
dirs.push(dir);
|
|
75
78
|
}
|
|
76
79
|
});
|
|
77
80
|
return dirs;
|
|
78
81
|
}
|
|
79
|
-
|
|
82
|
+
getDirectoriesRecursively(dirPath, callback) {
|
|
80
83
|
const entries = node_fs_1.default.readdirSync(dirPath, { withFileTypes: true });
|
|
81
84
|
for (const entry of entries) {
|
|
82
85
|
const fullPath = node_path_1.default.join(dirPath, entry.name);
|
|
83
86
|
if (entry.isDirectory() && !ignoredDirectories.has(entry.name)) {
|
|
84
|
-
this.
|
|
87
|
+
this.getDirectoriesRecursively(fullPath, callback);
|
|
85
88
|
}
|
|
86
89
|
else {
|
|
87
90
|
callback(node_path_1.default.dirname(fullPath));
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
}
|
|
94
|
+
getFilesRecursively(dirPath, callback) {
|
|
95
|
+
const entries = node_fs_1.default.readdirSync(dirPath, { withFileTypes: true });
|
|
96
|
+
for (const entry of entries) {
|
|
97
|
+
if (ignoredDirectories.has(entry.name)) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
const fullPath = node_path_1.default.join(dirPath, entry.name);
|
|
101
|
+
if (entry.isDirectory()) {
|
|
102
|
+
this.getFilesRecursively(fullPath, callback);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
callback(fullPath);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
91
109
|
};
|
|
92
110
|
exports.FileService = FileService;
|
|
93
111
|
exports.FileService = FileService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-service.js","sourceRoot":"./src/","sources":["src/services/file-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0B;AAC1B,sDAAyB;AACzB,0DAA6B;AAC7B,uCAAqC;AAErC,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;AAGtD,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YAAY;QACV,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,KAAa,EAAE,KAAa;QAC/B,OAAO,mBAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,cAAc,CAAC,QAAgB,EAAE,MAAc;QAC7C,OAAO,mBAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,UAAU,CAAC,YAAoB;QAC7B,OAAO,mBAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;IAED,gBAAgB,CAAC,QAAgB;QAC/B,MAAM,QAAQ,GAAG,mBAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAA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ParentInstance?: pino.Logger;
|
|
7
7
|
constructor(pinoLogger: PinoLogger);
|
|
8
|
+
flush(): Promise<void>;
|
|
8
9
|
setPrefix(prefix: string): void;
|
|
9
10
|
info(msg: string, obj?: unknown): void;
|
|
10
11
|
error(err: Error | string, msg?: string, obj?: unknown): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-service.d.ts","sourceRoot":"./src/","sources":["src/services/log-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,qBACa,UAAU;IAKa,OAAO,CAAC,UAAU;IAJpD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;IAEpB,MAAM,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;gBAEM,UAAU,EAAE,UAAU;IAShE,SAAS,CAAC,MAAM,EAAE,MAAM;IASjB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;IAItC,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;IAQ7D,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;IAItC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;CAG/C"}
|
|
1
|
+
{"version":3,"file":"log-service.d.ts","sourceRoot":"./src/","sources":["src/services/log-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,qBACa,UAAU;IAKa,OAAO,CAAC,UAAU;IAJpD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;IAEpB,MAAM,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;gBAEM,UAAU,EAAE,UAAU;IAShE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQtB,SAAS,CAAC,MAAM,EAAE,MAAM;IASjB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;IAItC,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;IAQ7D,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;IAItC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;CAG/C"}
|
|
@@ -31,6 +31,13 @@ let LogService = class LogService {
|
|
|
31
31
|
this.logger = LogService_1.ParentInstance.child({});
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
flush() {
|
|
35
|
+
return new Promise((res, rej) => {
|
|
36
|
+
this.logger.flush((err) => {
|
|
37
|
+
return err ? rej(err) : res();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
34
41
|
setPrefix(prefix) {
|
|
35
42
|
if (!LogService_1.ParentInstance) {
|
|
36
43
|
this.logger = this.pinoLogger.getLogger(prefix);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-service.js","sourceRoot":"./src/","sources":["src/services/log-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAA8C;AAC9C,6DAAiD;AAI1C,IAAM,UAAU,GAAhB,MAAM,UAAU;;IAKqB;IAJ1C,MAAM,CAAc;IAEpB,MAAM,CAAC,cAAc,CAAe;IAEpC,YAA0C,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QAC9D,IAAI,CAAC,YAAU,CAAC,cAAc,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM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AAM,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,GAAG,YAAU,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;IAEM,IAAI,CAAC,GAAW,EAAE,GAAa;QACpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,GAAmB,EAAE,GAAY,EAAE,GAAa;QAC3D,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,IAAI,gBAAgB,CAAC,CAAC;QAC3E,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAEM,IAAI,CAAC,GAAW,EAAE,GAAa;QACpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,GAAW,EAAE,GAAa;QACrC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;CACF,CAAA;AAlDY,gCAAU;qBAAV,UAAU;IADtB,IAAA,qBAAU,GAAE;IAME,WAAA,IAAA,iBAAM,EAAC,YAAY,CAAC,CAAA;qCAAqB,gCAAU;GALrD,UAAU,CAkDtB"}
|
|
@@ -23,7 +23,7 @@ export declare class ProjectService {
|
|
|
23
23
|
* the first found convention or the default one if it can't be detected.
|
|
24
24
|
*
|
|
25
25
|
* @param existingFiles the files to check for a convention on.
|
|
26
|
-
* @returns
|
|
26
|
+
* @returns the first found case type convention or the default one
|
|
27
27
|
*/
|
|
28
28
|
getConvention(): CaseType;
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-service.d.ts","sourceRoot":"./src/","sources":["src/services/project-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBACa,cAAc;IASvB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,WAAW;IATrB,MAAM,CAAC,QAAQ;;;;;MAKb;gBAGQ,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW;IAGlC;;;;OAIG;IACH,YAAY;IAQZ,OAAO,CAAC,cAAc;IAgBtB;;;;;;OAMG;IACH,aAAa,IAAI,QAAQ;
|
|
1
|
+
{"version":3,"file":"project-service.d.ts","sourceRoot":"./src/","sources":["src/services/project-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBACa,cAAc;IASvB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,WAAW;IATrB,MAAM,CAAC,QAAQ;;;;;MAKb;gBAGQ,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW;IAGlC;;;;OAIG;IACH,YAAY;IAQZ,OAAO,CAAC,cAAc;IAgBtB;;;;;;OAMG;IACH,aAAa,IAAI,QAAQ;CAiB1B;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,cAAc,CAAC,QAAQ,CAAC"}
|
|
@@ -59,15 +59,17 @@ let ProjectService = class ProjectService {
|
|
|
59
59
|
* the first found convention or the default one if it can't be detected.
|
|
60
60
|
*
|
|
61
61
|
* @param existingFiles the files to check for a convention on.
|
|
62
|
-
* @returns
|
|
62
|
+
* @returns the first found case type convention or the default one
|
|
63
63
|
*/
|
|
64
64
|
getConvention() {
|
|
65
65
|
const existingFiles = this.getSourceFiles();
|
|
66
|
-
if (!existingFiles || !existingFiles.length)
|
|
66
|
+
if (!existingFiles || !existingFiles.length) {
|
|
67
67
|
return ProjectService_1.defaults.convention;
|
|
68
|
+
}
|
|
68
69
|
let convention = null;
|
|
69
70
|
for (const file of existingFiles) {
|
|
70
|
-
|
|
71
|
+
const filename = this.fileService.getFilename(file);
|
|
72
|
+
convention = this.utilService.detectCase(filename);
|
|
71
73
|
if (convention !== null) {
|
|
72
74
|
break;
|
|
73
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-service.js","sourceRoot":"./src/","sources":["src/services/project-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,uCAA0C;AAC1C,iDAA6C;AAC7C,4CAA2C;AAC3C,iDAA6C;AAGtC,IAAM,cAAc,GAApB,MAAM,cAAc;;IASf;IACA;IATV,MAAM,CAAC,QAAQ,GAAG;QAChB,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,iBAAQ,CAAC,WAAW;QAChC,SAAS,EAAE,KAAK;KACjB,CAAC;IAEF,YACU,WAAwB,EACxB,WAAwB;QADxB,gBAAW,GAAX,WAAW,CAAa;QACxB,gBAAW,GAAX,WAAW,CAAa;IAC/B,CAAC;IAEJ;;;;OAIG;IACH,YAAY;QACV,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC;QACvD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAE7D,kCAAkC;QAClC,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,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AAoB,IAAI,CAAC;QACvC,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;YACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACpD,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACnD,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;gBACxB,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,UAAU,IAAI,gBAAc,CAAC,QAAQ,CAAC,UAAU,CAAC;IAC1D,CAAC;;AAjEU,wCAAc;yBAAd,cAAc;IAD1B,IAAA,yBAAc,GAAE;qCAUQ,0BAAW;QACX,0BAAW;GAVvB,cAAc,CAkE1B"}
|
|
@@ -11,6 +11,13 @@ export declare class PromptService {
|
|
|
11
11
|
* @returns the selected choice value
|
|
12
12
|
*/
|
|
13
13
|
select(message: string, options: string[]): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* Get a simple input string from the user.
|
|
16
|
+
*
|
|
17
|
+
* @param message the message to prompt the user with
|
|
18
|
+
* @param required whether or not to throw an error on empty input.
|
|
19
|
+
* @returns the read input string or undefined if not required
|
|
20
|
+
*/
|
|
14
21
|
getInput(message: string, required?: boolean): Promise<any>;
|
|
15
22
|
/**
|
|
16
23
|
* Prompt with multi-select options returning the array of selections.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-service.d.ts","sourceRoot":"./src/","sources":["src/services/prompt-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-service.d.ts","sourceRoot":"./src/","sources":["src/services/prompt-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO7C,qBACa,aAAa;IACZ,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAE5C;;;;;;;OAOG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;IAqB/C;;;;;;OAMG;IACG,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAc;IAKxD;;;;;;OAMG;IACG,YAAY,CAAC,CAAC,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,CAAC,CAAA;KAAE,EAAE,GACpC,OAAO,CAAC,CAAC,EAAE,CAAC;CAOhB"}
|
|
@@ -8,12 +8,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.PromptService = void 0;
|
|
13
16
|
const tsyringe_1 = require("tsyringe");
|
|
14
17
|
const util_service_1 = require("./util-service");
|
|
18
|
+
const inquirer_sortable_checkbox_1 = __importDefault(require("inquirer-sortable-checkbox"));
|
|
15
19
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
16
|
-
const { search, input
|
|
20
|
+
const { search, input } = require("@inquirer/prompts");
|
|
17
21
|
let PromptService = class PromptService {
|
|
18
22
|
utilService;
|
|
19
23
|
constructor(utilService) {
|
|
@@ -29,7 +33,7 @@ let PromptService = class PromptService {
|
|
|
29
33
|
*/
|
|
30
34
|
async select(message, options) {
|
|
31
35
|
// wait for logging to catch up before prompting
|
|
32
|
-
await this.utilService.sleep(
|
|
36
|
+
await this.utilService.sleep(800);
|
|
33
37
|
const choices = options.map((opt) => ({ value: opt }));
|
|
34
38
|
const answer = await search({
|
|
35
39
|
message,
|
|
@@ -42,7 +46,15 @@ let PromptService = class PromptService {
|
|
|
42
46
|
});
|
|
43
47
|
return answer;
|
|
44
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Get a simple input string from the user.
|
|
51
|
+
*
|
|
52
|
+
* @param message the message to prompt the user with
|
|
53
|
+
* @param required whether or not to throw an error on empty input.
|
|
54
|
+
* @returns the read input string or undefined if not required
|
|
55
|
+
*/
|
|
45
56
|
async getInput(message, required = true) {
|
|
57
|
+
await this.utilService.sleep(800);
|
|
46
58
|
return await input({ message, required });
|
|
47
59
|
}
|
|
48
60
|
/**
|
|
@@ -53,7 +65,8 @@ let PromptService = class PromptService {
|
|
|
53
65
|
* @returns the selected optoins array
|
|
54
66
|
*/
|
|
55
67
|
async pickMultiple(message, options) {
|
|
56
|
-
|
|
68
|
+
await this.utilService.sleep(800);
|
|
69
|
+
return await (0, inquirer_sortable_checkbox_1.default)({
|
|
57
70
|
message,
|
|
58
71
|
choices: options,
|
|
59
72
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-service.js","sourceRoot":"./src/","sources":["src/services/prompt-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompt-service.js","sourceRoot":"./src/","sources":["src/services/prompt-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uCAA0C;AAC1C,iDAA6C;AAE7C,4FAA0D;AAE1D,iEAAiE;AACjE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAGhD,IAAM,aAAa,GAAnB,MAAM,aAAa;IACJ;IAApB,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IAAG,CAAC;IAEhD;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,OAAiB;QAC7C,gDAAgD;QAChD,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAElC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QAEvD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC;YAC1B,OAAO;YACP,MAAM,EAAE,KAAK,EAAE,KAAoB,EAAE,EAAE;gBACrC,IAAI,CAAC,KAAK,EAAE,CAAC;oBACX,OAAO,OAAO,CAAC;gBACjB,CAAC;gBACD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1B,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CACpD,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAe,EAAE,WAAoB,IAAI;QACtD,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,YAAY,CAChB,OAAe,EACf,OAAqC;QAErC,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,IAAA,oCAAgB,EAAC;YAC5B,OAAO;YACP,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA7DY,sCAAa;wBAAb,aAAa;IADzB,IAAA,yBAAc,GAAE;qCAEkB,0BAAW;GADjC,aAAa,CA6DzB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AppTask } from "../wrappers/app-task";
|
|
2
|
+
import { PromptService } from "../services/prompt-service";
|
|
3
|
+
import { CacheService } from "../services/cache-service";
|
|
4
|
+
import { UtilService } from "../services/util-service";
|
|
5
|
+
/**
|
|
6
|
+
* Configures the Project Settings Cache in a Proactive way.
|
|
7
|
+
* Prompts for each resource type destination if not
|
|
8
|
+
* yet configured and multiple directories are found.
|
|
9
|
+
*/
|
|
10
|
+
export default class ConfigureCache extends AppTask {
|
|
11
|
+
private promptService;
|
|
12
|
+
private cacheService;
|
|
13
|
+
private utilService;
|
|
14
|
+
loggerName: string;
|
|
15
|
+
constructor(promptService: PromptService, cacheService: CacheService, utilService: UtilService);
|
|
16
|
+
/**
|
|
17
|
+
* Configure each resource type's output destination directory. Allows
|
|
18
|
+
* the user to reset these values if their project has changed since
|
|
19
|
+
* last cached.
|
|
20
|
+
*/
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Prints the target destination path string
|
|
24
|
+
*
|
|
25
|
+
* @param dest the destination path to log
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
logDestination: (dest?: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the destination path for generating resources by resource type.
|
|
31
|
+
* If only one resource destination folder was found it is returned
|
|
32
|
+
* otherwise the user is prompted to select one from the found folders.
|
|
33
|
+
*
|
|
34
|
+
* @param keyType the type of destination to resolve
|
|
35
|
+
* @returns the path of the resolved destination
|
|
36
|
+
*/
|
|
37
|
+
getDestination(keyType: "command" | "task" | "service"): Promise<string>;
|
|
38
|
+
preRun(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Check we have all the required state set
|
|
41
|
+
*/
|
|
42
|
+
verifyState(): void;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=configure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"./src/","sources":["src/tasks/configure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAI/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;;;GAIG;AAEH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IAI/C,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,WAAW;IALrB,UAAU,SAAe;gBAGf,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW;IAKlC;;;;OAIG;IACG,GAAG;IAiBT;;;;;OAKG;IACH,cAAc,GAAI,OAAM,MAAW,UAC8B;IAEjE;;;;;;;OAOG;IACG,cAAc,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS;IAyBtD,MAAM;IAIZ;;OAEG;IACH,WAAW;CAOZ"}
|