@elinzy/cli 0.1.4 → 0.1.5
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/README.md +26 -24
- package/dist/_virtual/_rolldown/runtime.cjs +12 -8
- package/dist/commands/eslint.cjs +3 -2
- package/dist/commands/eslint.mjs +3 -2
- package/dist/constants/common.cjs +2 -2
- package/dist/constants/common.mjs +2 -2
- package/dist/constants/index.cjs +2 -2
- package/dist/constants/index.mjs +3 -2
- package/dist/helpers/createEslintConfigFile/index.cjs +3 -2
- package/dist/helpers/createEslintConfigFile/index.mjs +3 -2
- package/dist/helpers/getCommands/index.cjs +3 -2
- package/dist/helpers/getCommands/index.mjs +3 -2
- package/dist/helpers/getConfigUrl/index.cjs +3 -2
- package/dist/helpers/getConfigUrl/index.mjs +3 -2
- package/dist/helpers/installPackages/index.cjs +3 -2
- package/dist/helpers/installPackages/index.mjs +3 -2
- package/dist/index.cjs +5 -3
- package/dist/index.d.cts +0 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +3 -2
- package/dist/package.cjs +11 -11
- package/dist/package.mjs +3 -3
- package/dist/utils/functions.cjs +3 -2
- package/dist/utils/functions.mjs +3 -2
- package/package.json +4 -8
package/README.md
CHANGED
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @elinzy/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`e-cli` is a command line tool. It includes release, publish and changelog commands, and more new functions will be added in the future.
|
|
3
|
+
A general-purpose CLI toolkit for the `@elinzy/e` ecosystem.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
9
7
|
```shell
|
|
10
|
-
|
|
8
|
+
# Project dependency
|
|
9
|
+
npm install -D @elinzy/cli
|
|
10
|
+
|
|
11
|
+
# Global
|
|
12
|
+
npm install -g @elinzy/cli
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
## Commands
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
npm install -g @elinzy/e-cli
|
|
17
|
-
```
|
|
17
|
+
### `e eslint`
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Interactive ESLint config scaffolding. Generates an `eslint.config.mjs` with `@elinzy/eslint-config-extended` presets.
|
|
20
20
|
|
|
21
21
|
```shell
|
|
22
|
-
|
|
23
|
-
npx e changelog
|
|
22
|
+
e eslint
|
|
24
23
|
```
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
The wizard will guide you through:
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
1. Config type — Extended (flat config) or Legacy (.eslintrc compat)
|
|
28
|
+
2. Language — TypeScript or JavaScript
|
|
29
|
+
3. Formatter — Prettier or none
|
|
30
|
+
4. Runtime — Node.js / React / Next.js
|
|
31
|
+
5. Strict configs — Import / React / TypeScript
|
|
32
|
+
6. Create file — writes `eslint.config.mjs` to current directory
|
|
33
|
+
7. Skip install — optionally skip `pnpm add` for dependencies
|
|
29
34
|
|
|
30
|
-
|
|
31
|
-
|--------------|-----------------------------------------|--------|------------------|---------------------------------------------------------------------------------------|
|
|
32
|
-
| file | -f --file <file> | string | `CHANGELOG.md` | Specify changelog filename |
|
|
33
|
-
| releaseCount | -n --releaseCount <releaseCount> | number | `0` | Release count |
|
|
34
|
-
| preset | -p --preset <preset> | string | `angular` | Specify changelog preset. Example: `angular, atom, codemirror, conventionalcommits` |
|
|
35
|
+
### `e --help`
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
```shell
|
|
38
|
+
e --help # Show all commands
|
|
39
|
+
e eslint --help # Show eslint subcommand options
|
|
40
|
+
```
|
|
39
41
|
|
|
40
|
-
##
|
|
42
|
+
## License
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
[MIT](https://github.com/Appleec/e/blob/main/LICENSE)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
//#region \0rolldown/runtime.js
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
@@ -7,12 +6,16 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
8
|
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
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) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
return to;
|
|
18
21
|
};
|
|
@@ -20,5 +23,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
23
|
value: mod,
|
|
21
24
|
enumerable: true
|
|
22
25
|
}) : target, mod));
|
|
26
|
+
|
|
23
27
|
//#endregion
|
|
24
|
-
exports.__toESM = __toESM;
|
|
28
|
+
exports.__toESM = __toESM;
|
package/dist/commands/eslint.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
2
|
const require_functions = require("../utils/functions.cjs");
|
|
4
3
|
const require_common = require("../constants/common.cjs");
|
|
@@ -13,6 +12,7 @@ let node_path = require("node:path");
|
|
|
13
12
|
node_path = require_runtime.__toESM(node_path, 1);
|
|
14
13
|
let prompts = require("prompts");
|
|
15
14
|
prompts = require_runtime.__toESM(prompts, 1);
|
|
15
|
+
|
|
16
16
|
//#region src/commands/eslint.ts
|
|
17
17
|
const eslint = async () => {
|
|
18
18
|
process.on("SIGINT", require_functions.handleSigTerm);
|
|
@@ -253,6 +253,7 @@ const eslint = async () => {
|
|
|
253
253
|
}
|
|
254
254
|
console.log();
|
|
255
255
|
};
|
|
256
|
+
|
|
256
257
|
//#endregion
|
|
257
258
|
exports.default = eslint;
|
|
258
|
-
exports.eslint = eslint;
|
|
259
|
+
exports.eslint = eslint;
|
package/dist/commands/eslint.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { handleSigTerm, onCancel, onPromptState } from "../utils/functions.mjs";
|
|
3
2
|
import { configs, defaults, eslintConfigName, formatters, languages, legacyConfigs, runtimes, strictConfigs } from "../constants/common.mjs";
|
|
4
3
|
import "../constants/index.mjs";
|
|
@@ -9,6 +8,7 @@ import { installPackages } from "../helpers/installPackages/index.mjs";
|
|
|
9
8
|
import pc from "ansis";
|
|
10
9
|
import path from "node:path";
|
|
11
10
|
import prompts from "prompts";
|
|
11
|
+
|
|
12
12
|
//#region src/commands/eslint.ts
|
|
13
13
|
const eslint = async () => {
|
|
14
14
|
process.on("SIGINT", handleSigTerm);
|
|
@@ -249,5 +249,6 @@ const eslint = async () => {
|
|
|
249
249
|
}
|
|
250
250
|
console.log();
|
|
251
251
|
};
|
|
252
|
+
|
|
252
253
|
//#endregion
|
|
253
|
-
export { eslint as default, eslint };
|
|
254
|
+
export { eslint as default, eslint };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
//#region src/constants/common.ts
|
|
3
2
|
const configs = {
|
|
4
3
|
EXTENDED: "extended",
|
|
@@ -42,6 +41,7 @@ const subFolders = {
|
|
|
42
41
|
STRICT: "strict"
|
|
43
42
|
};
|
|
44
43
|
const eslintConfigName = "eslint.config.mjs";
|
|
44
|
+
|
|
45
45
|
//#endregion
|
|
46
46
|
exports.configs = configs;
|
|
47
47
|
exports.defaults = defaults;
|
|
@@ -51,4 +51,4 @@ exports.languages = languages;
|
|
|
51
51
|
exports.legacyConfigs = legacyConfigs;
|
|
52
52
|
exports.runtimes = runtimes;
|
|
53
53
|
exports.strictConfigs = strictConfigs;
|
|
54
|
-
exports.subFolders = subFolders;
|
|
54
|
+
exports.subFolders = subFolders;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
//#region src/constants/common.ts
|
|
3
2
|
const configs = {
|
|
4
3
|
EXTENDED: "extended",
|
|
@@ -42,5 +41,6 @@ const subFolders = {
|
|
|
42
41
|
STRICT: "strict"
|
|
43
42
|
};
|
|
44
43
|
const eslintConfigName = "eslint.config.mjs";
|
|
44
|
+
|
|
45
45
|
//#endregion
|
|
46
|
-
export { configs, defaults, eslintConfigName, formatters, languages, legacyConfigs, runtimes, strictConfigs, subFolders };
|
|
46
|
+
export { configs, defaults, eslintConfigName, formatters, languages, legacyConfigs, runtimes, strictConfigs, subFolders };
|
package/dist/constants/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
const require_common = require("./common.cjs");
|
|
2
|
+
|
|
3
3
|
exports.configs = require_common.configs;
|
|
4
4
|
exports.defaults = require_common.defaults;
|
|
5
5
|
exports.eslintConfigName = require_common.eslintConfigName;
|
|
@@ -8,4 +8,4 @@ exports.languages = require_common.languages;
|
|
|
8
8
|
exports.legacyConfigs = require_common.legacyConfigs;
|
|
9
9
|
exports.runtimes = require_common.runtimes;
|
|
10
10
|
exports.strictConfigs = require_common.strictConfigs;
|
|
11
|
-
exports.subFolders = require_common.subFolders;
|
|
11
|
+
exports.subFolders = require_common.subFolders;
|
package/dist/constants/index.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { configs, defaults, eslintConfigName, formatters, languages, legacyConfigs, runtimes, strictConfigs, subFolders } from "./common.mjs";
|
|
2
|
+
|
|
3
|
+
export { configs, defaults, eslintConfigName, formatters, languages, legacyConfigs, runtimes, strictConfigs, subFolders };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
2
|
let node_path = require("node:path");
|
|
4
3
|
node_path = require_runtime.__toESM(node_path, 1);
|
|
5
4
|
let node_fs = require("node:fs");
|
|
6
5
|
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
6
|
+
|
|
7
7
|
//#region src/helpers/createEslintConfigFile/index.ts
|
|
8
8
|
/**
|
|
9
9
|
* Resolve templates directory from the `@elinzy/build-templates` package.
|
|
@@ -33,6 +33,7 @@ const createESLintConfigFile = async (config) => {
|
|
|
33
33
|
console.log(`Template: ${baseGithubUrl}/${configPath}`);
|
|
34
34
|
};
|
|
35
35
|
const baseGithubUrl = "https://github.com/Appleec/e/tree/main/packages/build-templates/templates";
|
|
36
|
+
|
|
36
37
|
//#endregion
|
|
37
38
|
exports.baseGithubUrl = baseGithubUrl;
|
|
38
|
-
exports.createESLintConfigFile = createESLintConfigFile;
|
|
39
|
+
exports.createESLintConfigFile = createESLintConfigFile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import fs from "node:fs";
|
|
3
|
+
|
|
4
4
|
//#region src/helpers/createEslintConfigFile/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* Resolve templates directory from the `@elinzy/build-templates` package.
|
|
@@ -30,5 +30,6 @@ const createESLintConfigFile = async (config) => {
|
|
|
30
30
|
console.log(`Template: ${baseGithubUrl}/${configPath}`);
|
|
31
31
|
};
|
|
32
32
|
const baseGithubUrl = "https://github.com/Appleec/e/tree/main/packages/build-templates/templates";
|
|
33
|
+
|
|
33
34
|
//#endregion
|
|
34
|
-
export { baseGithubUrl, createESLintConfigFile };
|
|
35
|
+
export { baseGithubUrl, createESLintConfigFile };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
const require_common = require("../../constants/common.cjs");
|
|
3
2
|
require("../../constants/index.cjs");
|
|
3
|
+
|
|
4
4
|
//#region src/helpers/getCommands/index.ts
|
|
5
5
|
const getCommands = (args) => {
|
|
6
6
|
const { formatter } = args;
|
|
@@ -16,5 +16,6 @@ const getCommands = (args) => {
|
|
|
16
16
|
if (formatter === require_common.formatters.PRETTIER) commands.push("prettier", "eslint-plugin-prettier", "eslint-config-prettier");
|
|
17
17
|
return commands;
|
|
18
18
|
};
|
|
19
|
+
|
|
19
20
|
//#endregion
|
|
20
|
-
exports.getCommands = getCommands;
|
|
21
|
+
exports.getCommands = getCommands;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { formatters } from "../../constants/common.mjs";
|
|
3
2
|
import "../../constants/index.mjs";
|
|
3
|
+
|
|
4
4
|
//#region src/helpers/getCommands/index.ts
|
|
5
5
|
const getCommands = (args) => {
|
|
6
6
|
const { formatter } = args;
|
|
@@ -16,5 +16,6 @@ const getCommands = (args) => {
|
|
|
16
16
|
if (formatter === formatters.PRETTIER) commands.push("prettier", "eslint-plugin-prettier", "eslint-config-prettier");
|
|
17
17
|
return commands;
|
|
18
18
|
};
|
|
19
|
+
|
|
19
20
|
//#endregion
|
|
20
|
-
export { getCommands };
|
|
21
|
+
export { getCommands };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
const require_common = require("../../constants/common.cjs");
|
|
3
2
|
require("../../constants/index.cjs");
|
|
3
|
+
|
|
4
4
|
//#region src/helpers/getConfigUrl/index.ts
|
|
5
5
|
const getConfigUrl = (args) => {
|
|
6
6
|
const { config, language, formatter, strictConfig, runtime, legacyConfig } = args;
|
|
@@ -21,5 +21,6 @@ const getConfigUrl = (args) => {
|
|
|
21
21
|
require_common.eslintConfigName
|
|
22
22
|
].filter(Boolean).join("/") };
|
|
23
23
|
};
|
|
24
|
+
|
|
24
25
|
//#endregion
|
|
25
|
-
exports.getConfigUrl = getConfigUrl;
|
|
26
|
+
exports.getConfigUrl = getConfigUrl;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { configs, eslintConfigName, formatters, languages, subFolders } from "../../constants/common.mjs";
|
|
3
2
|
import "../../constants/index.mjs";
|
|
3
|
+
|
|
4
4
|
//#region src/helpers/getConfigUrl/index.ts
|
|
5
5
|
const getConfigUrl = (args) => {
|
|
6
6
|
const { config, language, formatter, strictConfig, runtime, legacyConfig } = args;
|
|
@@ -21,5 +21,6 @@ const getConfigUrl = (args) => {
|
|
|
21
21
|
eslintConfigName
|
|
22
22
|
].filter(Boolean).join("/") };
|
|
23
23
|
};
|
|
24
|
+
|
|
24
25
|
//#endregion
|
|
25
|
-
export { getConfigUrl };
|
|
26
|
+
export { getConfigUrl };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
2
|
const require_index = require("../getCommands/index.cjs");
|
|
4
3
|
let cross_spawn = require("cross-spawn");
|
|
5
4
|
cross_spawn = require_runtime.__toESM(cross_spawn, 1);
|
|
5
|
+
|
|
6
6
|
//#region src/helpers/installPackages/index.ts
|
|
7
7
|
const installPackages = async (args) => {
|
|
8
8
|
const [packageManager, ...commands] = require_index.getCommands(args);
|
|
@@ -24,5 +24,6 @@ const installPackages = async (args) => {
|
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
+
|
|
27
28
|
//#endregion
|
|
28
|
-
exports.installPackages = installPackages;
|
|
29
|
+
exports.installPackages = installPackages;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { getCommands } from "../getCommands/index.mjs";
|
|
3
2
|
import spawn from "cross-spawn";
|
|
3
|
+
|
|
4
4
|
//#region src/helpers/installPackages/index.ts
|
|
5
5
|
const installPackages = async (args) => {
|
|
6
6
|
const [packageManager, ...commands] = getCommands(args);
|
|
@@ -22,5 +22,6 @@ const installPackages = async (args) => {
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
+
|
|
25
26
|
//#endregion
|
|
26
|
-
export { installPackages };
|
|
27
|
+
export { installPackages };
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
#!/usr/bin/env node
|
|
3
2
|
const require_functions = require("./utils/functions.cjs");
|
|
4
3
|
const require_package = require("./package.cjs");
|
|
5
4
|
const require_eslint = require("./commands/eslint.cjs");
|
|
5
|
+
let commander = require("commander");
|
|
6
|
+
|
|
6
7
|
//#region src/index.ts
|
|
7
|
-
const program = new
|
|
8
|
+
const program = new commander.Command().name(require_package.name).version(require_package.version, "-v, --version", "Output the current version.").helpOption("-h, --help", "Display help message.");
|
|
8
9
|
program.command("eslint").description("Interactive ESLint config scaffold").action(async () => {
|
|
9
10
|
try {
|
|
10
11
|
await require_eslint.default();
|
|
@@ -14,4 +15,5 @@ program.command("eslint").description("Interactive ESLint config scaffold").acti
|
|
|
14
15
|
}
|
|
15
16
|
});
|
|
16
17
|
program.parse();
|
|
17
|
-
|
|
18
|
+
|
|
19
|
+
//#endregion
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
#!/usr/bin/env node
|
|
3
2
|
import { exit } from "./utils/functions.mjs";
|
|
4
3
|
import { name, version } from "./package.mjs";
|
|
5
4
|
import eslint from "./commands/eslint.mjs";
|
|
6
5
|
import { Command } from "commander";
|
|
6
|
+
|
|
7
7
|
//#region src/index.ts
|
|
8
8
|
const program = new Command().name(name).version(version, "-v, --version", "Output the current version.").helpOption("-h, --help", "Display help message.");
|
|
9
9
|
program.command("eslint").description("Interactive ESLint config scaffold").action(async () => {
|
|
@@ -15,5 +15,6 @@ program.command("eslint").description("Interactive ESLint config scaffold").acti
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
program.parse();
|
|
18
|
+
|
|
18
19
|
//#endregion
|
|
19
|
-
export {};
|
|
20
|
+
export { };
|
package/dist/package.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
//#region package.json
|
|
3
2
|
var name = "@elinzy/cli";
|
|
4
|
-
var version = "0.1.
|
|
3
|
+
var version = "0.1.5";
|
|
4
|
+
|
|
5
5
|
//#endregion
|
|
6
6
|
Object.defineProperty(exports, "name", {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return name;
|
|
10
|
+
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "version", {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return version;
|
|
16
|
+
}
|
|
17
|
+
});
|
package/dist/package.mjs
CHANGED
package/dist/utils/functions.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
2
|
let ansis = require("ansis");
|
|
4
3
|
ansis = require_runtime.__toESM(ansis, 1);
|
|
4
|
+
|
|
5
5
|
//#region src/utils/functions.ts
|
|
6
6
|
const handleSigTerm = () => process.exit(0);
|
|
7
7
|
const onPromptState = (state) => {
|
|
@@ -25,8 +25,9 @@ const exit = (error) => {
|
|
|
25
25
|
else console.log(`${ansis.default.red("Unexpected error. Please report it as a bug:")}\n`, error);
|
|
26
26
|
process.exit(1);
|
|
27
27
|
};
|
|
28
|
+
|
|
28
29
|
//#endregion
|
|
29
30
|
exports.exit = exit;
|
|
30
31
|
exports.handleSigTerm = handleSigTerm;
|
|
31
32
|
exports.onCancel = onCancel;
|
|
32
|
-
exports.onPromptState = onPromptState;
|
|
33
|
+
exports.onPromptState = onPromptState;
|
package/dist/utils/functions.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import pc from "ansis";
|
|
2
|
+
|
|
3
3
|
//#region src/utils/functions.ts
|
|
4
4
|
const handleSigTerm = () => process.exit(0);
|
|
5
5
|
const onPromptState = (state) => {
|
|
@@ -23,5 +23,6 @@ const exit = (error) => {
|
|
|
23
23
|
else console.log(`${pc.red("Unexpected error. Please report it as a bug:")}\n`, error);
|
|
24
24
|
process.exit(1);
|
|
25
25
|
};
|
|
26
|
+
|
|
26
27
|
//#endregion
|
|
27
|
-
export { exit, handleSigTerm, onCancel, onPromptState };
|
|
28
|
+
export { exit, handleSigTerm, onCancel, onPromptState };
|
package/package.json
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elinzy/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "A collection of common scripts and commands for e",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
|
-
"types": "./dist/index.d.
|
|
7
|
+
"types": "./dist/index.d.cts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"types": {
|
|
11
|
-
"import": "./dist/index.d.mts",
|
|
12
|
-
"require": "./dist/index.d.cts"
|
|
13
|
-
},
|
|
14
10
|
"import": "./dist/index.mjs",
|
|
15
11
|
"require": "./dist/index.cjs"
|
|
16
12
|
},
|
|
@@ -24,8 +20,7 @@
|
|
|
24
20
|
"registry": "https://registry.npmjs.org/"
|
|
25
21
|
},
|
|
26
22
|
"bin": {
|
|
27
|
-
"
|
|
28
|
-
"e-cli": "./dist/index.mjs"
|
|
23
|
+
"cli": "./dist/index.mjs"
|
|
29
24
|
},
|
|
30
25
|
"repository": {
|
|
31
26
|
"type": "git",
|
|
@@ -62,6 +57,7 @@
|
|
|
62
57
|
"devDependencies": {
|
|
63
58
|
"tsdown": "^0.23.1"
|
|
64
59
|
},
|
|
60
|
+
"module": "./dist/index.mjs",
|
|
65
61
|
"scripts": {
|
|
66
62
|
"dev": "tsx src/index.ts",
|
|
67
63
|
"build": "tsdown",
|