@shell-shock/preset-script 0.6.71 → 0.6.73
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/components/command-entry.cjs +1 -1
- package/dist/components/command-entry.mjs +1 -1
- package/dist/components/exit-function-declaration.cjs +7 -14
- package/dist/components/exit-function-declaration.d.cts.map +1 -1
- package/dist/components/exit-function-declaration.mjs +3 -10
- package/dist/helpers/get-global-options.cjs +4 -2
- package/dist/helpers/get-global-options.mjs +4 -2
- package/package.json +7 -7
|
@@ -13,8 +13,8 @@ let _stryke_path_replace = require("@stryke/path/replace");
|
|
|
13
13
|
let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
|
|
14
14
|
let defu = require("defu");
|
|
15
15
|
defu = require_runtime.__toESM(defu);
|
|
16
|
-
let _shell_shock_core_components_helpers = require("@shell-shock/core/components/helpers");
|
|
17
16
|
let _shell_shock_core_components_command_validation_logic = require("@shell-shock/core/components/command-validation-logic");
|
|
17
|
+
let _shell_shock_core_components_helpers = require("@shell-shock/core/components/helpers");
|
|
18
18
|
let _shell_shock_core_components_options_parser_logic = require("@shell-shock/core/components/options-parser-logic");
|
|
19
19
|
let _stryke_path_find = require("@stryke/path/find");
|
|
20
20
|
let _stryke_path_join = require("@stryke/path/join");
|
|
@@ -10,8 +10,8 @@ import { getAppBin, getDynamicPathSegmentName, isDynamicPathSegment } from "@she
|
|
|
10
10
|
import { replaceExtension } from "@stryke/path/replace";
|
|
11
11
|
import { pascalCase } from "@stryke/string-format/pascal-case";
|
|
12
12
|
import defu from "defu";
|
|
13
|
-
import { IsDebug } from "@shell-shock/core/components/helpers";
|
|
14
13
|
import { CommandValidationLogic } from "@shell-shock/core/components/command-validation-logic";
|
|
14
|
+
import { IsDebug } from "@shell-shock/core/components/helpers";
|
|
15
15
|
import { CommandParserLogic, OptionsInterfaceDeclaration } from "@shell-shock/core/components/options-parser-logic";
|
|
16
16
|
import { findFilePath, relativePath } from "@stryke/path/find";
|
|
17
17
|
import { joinPaths } from "@stryke/path/join";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
4
3
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
5
4
|
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
6
5
|
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
7
6
|
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
8
|
-
let
|
|
7
|
+
let _powerlines_plugin_alloy_core_helpers_code = require("@powerlines/plugin-alloy/core/helpers/code");
|
|
9
8
|
|
|
10
9
|
//#region src/components/exit-function-declaration.tsx
|
|
11
10
|
/**
|
|
@@ -62,19 +61,19 @@ function ExitFunctionDeclaration() {
|
|
|
62
61
|
"let": true,
|
|
63
62
|
name: "isExiting",
|
|
64
63
|
type: "boolean",
|
|
65
|
-
initializer:
|
|
64
|
+
initializer: _powerlines_plugin_alloy_core_helpers_code.code`false;`
|
|
66
65
|
}),
|
|
67
66
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
68
67
|
"const": true,
|
|
69
68
|
name: "callbackAsyncQueue",
|
|
70
69
|
type: "Array<[(code: number | string) => Promise<void> | void, number]>",
|
|
71
|
-
initializer:
|
|
70
|
+
initializer: _powerlines_plugin_alloy_core_helpers_code.code`[];`
|
|
72
71
|
}),
|
|
73
72
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
74
73
|
"const": true,
|
|
75
74
|
name: "callbackSyncQueue",
|
|
76
75
|
type: "Array<(code: number | string) => void>",
|
|
77
|
-
initializer:
|
|
76
|
+
initializer: _powerlines_plugin_alloy_core_helpers_code.code`[];`
|
|
78
77
|
}),
|
|
79
78
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
80
79
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -88,7 +87,7 @@ function ExitFunctionDeclaration() {
|
|
|
88
87
|
}],
|
|
89
88
|
get children() {
|
|
90
89
|
return [
|
|
91
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() =>
|
|
90
|
+
(0, _alloy_js_core_jsx_runtime.memo)(() => _powerlines_plugin_alloy_core_helpers_code.code`
|
|
92
91
|
try {
|
|
93
92
|
if (isExiting) {
|
|
94
93
|
return;
|
|
@@ -110,15 +109,9 @@ function ExitFunctionDeclaration() {
|
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
const terminate = (force = false) => { `),
|
|
113
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
114
|
-
get condition() {
|
|
115
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_core_components_helpers.IsVerbose, {});
|
|
116
|
-
},
|
|
117
|
-
children: _alloy_js_core.code`writeLine("");`
|
|
118
|
-
}),
|
|
119
112
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
120
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() =>
|
|
121
|
-
verbose(\`The ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} application exited \${options.exception ? \`early due to an exception\` : "successfully"}\${options.startDate ? \`. Total
|
|
113
|
+
(0, _alloy_js_core_jsx_runtime.memo)(() => _powerlines_plugin_alloy_core_helpers_code.code`
|
|
114
|
+
verbose(\`The ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} application exited \${options.exception ? \`early due to an exception\` : "successfully"}\${options.startDate ? \`. Total run time is \${Date.now() - options.startDate.getTime() > 5000 ? Math.floor((Date.now() - options.startDate.getTime()) / 1000) : Date.now() - options.startDate.getTime()} \${Date.now() - options.startDate.getTime() > 5000 ? "seconds" : "milliseconds"}\` : ""}...\`);
|
|
122
115
|
if (!options.skipProcessExit) {
|
|
123
116
|
process.nextTick(() => process.exit(exitCode));
|
|
124
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit-function-declaration.d.cts","names":[],"sources":["../../src/components/exit-function-declaration.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"exit-function-declaration.d.cts","names":[],"sources":["../../src/components/exit-function-declaration.tsx"],"mappings":";;AAiCA;;iBAAgB,uBAAA,6BAAuB,QAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { FunctionDeclaration, IfStatement, InterfaceDeclaration, InterfaceMember, VarDeclaration } from "@alloy-js/typescript";
|
|
2
|
+
import { FunctionDeclaration, InterfaceDeclaration, InterfaceMember, VarDeclaration } from "@alloy-js/typescript";
|
|
4
3
|
import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
|
|
5
4
|
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
6
5
|
import { getAppTitle } from "@shell-shock/core/plugin-utils";
|
|
7
|
-
import {
|
|
6
|
+
import { code } from "@powerlines/plugin-alloy/core/helpers/code";
|
|
8
7
|
|
|
9
8
|
//#region src/components/exit-function-declaration.tsx
|
|
10
9
|
/**
|
|
@@ -109,15 +108,9 @@ function ExitFunctionDeclaration() {
|
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
const terminate = (force = false) => { `),
|
|
112
|
-
createComponent(IfStatement, {
|
|
113
|
-
get condition() {
|
|
114
|
-
return createComponent(IsVerbose, {});
|
|
115
|
-
},
|
|
116
|
-
children: code`writeLine("");`
|
|
117
|
-
}),
|
|
118
111
|
createIntrinsic("hbr", {}),
|
|
119
112
|
memo(() => code`
|
|
120
|
-
verbose(\`The ${getAppTitle(context, true)} application exited \${options.exception ? \`early due to an exception\` : "successfully"}\${options.startDate ? \`. Total
|
|
113
|
+
verbose(\`The ${getAppTitle(context, true)} application exited \${options.exception ? \`early due to an exception\` : "successfully"}\${options.startDate ? \`. Total run time is \${Date.now() - options.startDate.getTime() > 5000 ? Math.floor((Date.now() - options.startDate.getTime()) / 1000) : Date.now() - options.startDate.getTime()} \${Date.now() - options.startDate.getTime() > 5000 ? "seconds" : "milliseconds"}\` : ""}...\`);
|
|
121
114
|
if (!options.skipProcessExit) {
|
|
122
115
|
process.nextTick(() => process.exit(exitCode));
|
|
123
116
|
}
|
|
@@ -51,9 +51,10 @@ function getGlobalOptions() {
|
|
|
51
51
|
env: "COLOR",
|
|
52
52
|
alias: ["colors"],
|
|
53
53
|
type: "boolean",
|
|
54
|
+
default: false,
|
|
54
55
|
required: false,
|
|
55
56
|
variadic: false,
|
|
56
|
-
|
|
57
|
+
isNegativeOf: "no-color"
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
name: "no-color",
|
|
@@ -62,9 +63,10 @@ function getGlobalOptions() {
|
|
|
62
63
|
env: "NO_COLOR",
|
|
63
64
|
alias: ["no-colors"],
|
|
64
65
|
type: "boolean",
|
|
66
|
+
default: false,
|
|
65
67
|
required: false,
|
|
66
68
|
variadic: false,
|
|
67
|
-
|
|
69
|
+
isNegativeOf: "color"
|
|
68
70
|
},
|
|
69
71
|
{
|
|
70
72
|
name: "no-banner",
|
|
@@ -49,9 +49,10 @@ function getGlobalOptions() {
|
|
|
49
49
|
env: "COLOR",
|
|
50
50
|
alias: ["colors"],
|
|
51
51
|
type: "boolean",
|
|
52
|
+
default: false,
|
|
52
53
|
required: false,
|
|
53
54
|
variadic: false,
|
|
54
|
-
|
|
55
|
+
isNegativeOf: "no-color"
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
name: "no-color",
|
|
@@ -60,9 +61,10 @@ function getGlobalOptions() {
|
|
|
60
61
|
env: "NO_COLOR",
|
|
61
62
|
alias: ["no-colors"],
|
|
62
63
|
type: "boolean",
|
|
64
|
+
default: false,
|
|
63
65
|
required: false,
|
|
64
66
|
variadic: false,
|
|
65
|
-
|
|
67
|
+
isNegativeOf: "color"
|
|
66
68
|
},
|
|
67
69
|
{
|
|
68
70
|
name: "no-banner",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/preset-script",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.73",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Shell Shock preset that generates a fully-featured script application.",
|
|
6
6
|
"keywords": [
|
|
@@ -198,11 +198,11 @@
|
|
|
198
198
|
"@powerlines/deepkit": "^0.9.81",
|
|
199
199
|
"@powerlines/plugin-alloy": "^0.26.220",
|
|
200
200
|
"@powerlines/plugin-plugin": "^0.12.539",
|
|
201
|
-
"@shell-shock/core": "0.17.
|
|
202
|
-
"@shell-shock/plugin-banner": "0.1.
|
|
203
|
-
"@shell-shock/plugin-console": "0.2.
|
|
204
|
-
"@shell-shock/plugin-help": "0.2.
|
|
205
|
-
"@shell-shock/plugin-theme": "0.4.
|
|
201
|
+
"@shell-shock/core": "0.17.18",
|
|
202
|
+
"@shell-shock/plugin-banner": "0.1.45",
|
|
203
|
+
"@shell-shock/plugin-console": "0.2.22",
|
|
204
|
+
"@shell-shock/plugin-help": "0.2.36",
|
|
205
|
+
"@shell-shock/plugin-theme": "0.4.31",
|
|
206
206
|
"@stryke/helpers": "^0.10.24",
|
|
207
207
|
"@stryke/path": "^0.29.11",
|
|
208
208
|
"@stryke/string-format": "^0.17.26",
|
|
@@ -211,5 +211,5 @@
|
|
|
211
211
|
},
|
|
212
212
|
"devDependencies": { "@types/node": "^25.9.2" },
|
|
213
213
|
"publishConfig": { "access": "public" },
|
|
214
|
-
"gitHead": "
|
|
214
|
+
"gitHead": "4ca0ac0ff9ada03aea6667c89a04b54dc73ff40b"
|
|
215
215
|
}
|