@pristine-ts/cli 0.0.317 → 0.0.318
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/lib/cjs/managers/console.manager.js +45 -0
- package/dist/lib/cjs/managers/console.manager.js.map +1 -1
- package/dist/lib/esm/managers/console.manager.js +22 -0
- package/dist/lib/esm/managers/console.manager.js.map +1 -1
- package/dist/types/managers/console.manager.d.ts +2 -0
- package/package.json +7 -7
|
@@ -1,15 +1,49 @@
|
|
|
1
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
|
+
});
|
|
2
18
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
20
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
21
|
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
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
23
|
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
32
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
33
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
34
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
35
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
36
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
37
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
8
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
41
|
exports.ConsoleManager = void 0;
|
|
10
42
|
const tsyringe_1 = require("tsyringe");
|
|
11
43
|
const common_1 = require("@pristine-ts/common");
|
|
12
44
|
const cli_module_keyname_1 = require("../cli.module.keyname");
|
|
45
|
+
const readline = __importStar(require("node:readline/promises"));
|
|
46
|
+
const node_process_1 = require("node:process");
|
|
13
47
|
let ConsoleManager = class ConsoleManager {
|
|
14
48
|
write(message) {
|
|
15
49
|
process.stdout.write(message);
|
|
@@ -17,6 +51,17 @@ let ConsoleManager = class ConsoleManager {
|
|
|
17
51
|
writeLine(message) {
|
|
18
52
|
this.write(message + "\n");
|
|
19
53
|
}
|
|
54
|
+
read() {
|
|
55
|
+
return process.stdin.read();
|
|
56
|
+
}
|
|
57
|
+
readLine(question) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const rl = readline.createInterface({ input: node_process_1.stdin, output: node_process_1.stdout });
|
|
60
|
+
const answer = yield rl.question(question);
|
|
61
|
+
rl.close();
|
|
62
|
+
return answer;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
20
65
|
};
|
|
21
66
|
exports.ConsoleManager = ConsoleManager;
|
|
22
67
|
exports.ConsoleManager = ConsoleManager = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.manager.js","sourceRoot":"","sources":["../../../../src/managers/console.manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"console.manager.js","sourceRoot":"","sources":["../../../../src/managers/console.manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoC;AACpC,gDAAiD;AACjD,8DAAuD;AACvD,iEAAmD;AACnD,+CAAgE;AAIzD,IAAM,cAAc,GAApB,MAAM,cAAc;IACvB,KAAK,CAAC,OAAe;QACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,SAAS,CAAC,OAAe;QACrB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI;QACA,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAY,CAAC;IAC1C,CAAC;IAEK,QAAQ,CAAC,QAAgB;;YAC3B,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAL,oBAAK,EAAE,MAAM,EAAN,qBAAM,EAAE,CAAC,CAAC;YAEvD,MAAM,MAAM,GAAW,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAEnD,EAAE,CAAC,KAAK,EAAE,CAAC;YAEX,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ,CAAA;AAtBY,wCAAc;yBAAd,cAAc;IAF1B,IAAA,qBAAU,GAAE;IACZ,IAAA,qBAAY,EAAC,qCAAgB,CAAC;GAClB,cAAc,CAsB1B"}
|
|
@@ -4,9 +4,20 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
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;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
+
});
|
|
15
|
+
};
|
|
7
16
|
import { injectable } from "tsyringe";
|
|
8
17
|
import { moduleScoped } from "@pristine-ts/common";
|
|
9
18
|
import { CliModuleKeyname } from "../cli.module.keyname";
|
|
19
|
+
import * as readline from 'node:readline/promises';
|
|
20
|
+
import { stdin as input, stdout as output } from 'node:process';
|
|
10
21
|
let ConsoleManager = class ConsoleManager {
|
|
11
22
|
write(message) {
|
|
12
23
|
process.stdout.write(message);
|
|
@@ -14,6 +25,17 @@ let ConsoleManager = class ConsoleManager {
|
|
|
14
25
|
writeLine(message) {
|
|
15
26
|
this.write(message + "\n");
|
|
16
27
|
}
|
|
28
|
+
read() {
|
|
29
|
+
return process.stdin.read();
|
|
30
|
+
}
|
|
31
|
+
readLine(question) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const rl = readline.createInterface({ input, output });
|
|
34
|
+
const answer = yield rl.question(question);
|
|
35
|
+
rl.close();
|
|
36
|
+
return answer;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
17
39
|
};
|
|
18
40
|
ConsoleManager = __decorate([
|
|
19
41
|
injectable(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.manager.js","sourceRoot":"","sources":["../../../../src/managers/console.manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"console.manager.js","sourceRoot":"","sources":["../../../../src/managers/console.manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAIzD,IAAM,cAAc,GAApB,MAAM,cAAc;IACvB,KAAK,CAAC,OAAe;QACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,SAAS,CAAC,OAAe;QACrB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI;QACA,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAY,CAAC;IAC1C,CAAC;IAEK,QAAQ,CAAC,QAAgB;;YAC3B,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;YAEvD,MAAM,MAAM,GAAW,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAEnD,EAAE,CAAC,KAAK,EAAE,CAAC;YAEX,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;CACJ,CAAA;AAtBY,cAAc;IAF1B,UAAU,EAAE;IACZ,YAAY,CAAC,gBAAgB,CAAC;GAClB,cAAc,CAsB1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pristine-ts/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.318",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "dist/lib/esm/cli.module.js",
|
|
6
6
|
"main": "dist/lib/cjs/cli.module.js",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@pristine-ts/common": "^0.0.
|
|
28
|
-
"@pristine-ts/core": "^0.0.
|
|
29
|
-
"@pristine-ts/file": "^0.0.
|
|
30
|
-
"@pristine-ts/logging": "^0.0.
|
|
31
|
-
"@pristine-ts/validation": "^0.0.
|
|
27
|
+
"@pristine-ts/common": "^0.0.318",
|
|
28
|
+
"@pristine-ts/core": "^0.0.318",
|
|
29
|
+
"@pristine-ts/file": "^0.0.318",
|
|
30
|
+
"@pristine-ts/logging": "^0.0.318",
|
|
31
|
+
"@pristine-ts/validation": "^0.0.318",
|
|
32
32
|
"class-transformer": "^0.5.1"
|
|
33
33
|
},
|
|
34
34
|
"jest": {
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"src/*.{js,ts}"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "4d08f2dc61153b65ba70c72d4b33249e5262df55"
|
|
69
69
|
}
|