@storm-software/config-tools 1.148.2 → 1.148.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/README.md +1 -1
- package/dist/config-file/get-config-file.cjs +66 -22
- package/dist/config-file/get-config-file.js +65 -21
- package/dist/config-file/index.cjs +1 -27
- package/dist/config-file/index.js +1 -27
- package/dist/create-storm-config.cjs +68 -26
- package/dist/create-storm-config.js +67 -25
- package/dist/env/get-env.cjs +152 -9
- package/dist/env/get-env.js +151 -8
- package/dist/env/index.cjs +2 -20
- package/dist/env/index.js +2 -20
- package/dist/env/set-env.cjs +259 -8
- package/dist/env/set-env.js +258 -7
- package/dist/get-config.cjs +9 -25
- package/dist/get-config.js +9 -25
- package/dist/index.cjs +7 -171
- package/dist/index.js +7 -171
- package/dist/logger/chalk.cjs +30 -4
- package/dist/logger/chalk.js +29 -3
- package/dist/logger/console-icons.cjs +15 -5
- package/dist/logger/console-icons.js +15 -5
- package/dist/logger/console.cjs +126 -38
- package/dist/logger/console.js +112 -24
- package/dist/logger/create-logger.cjs +31 -16
- package/dist/logger/create-logger.js +30 -15
- package/dist/logger/format-timestamp.cjs +5 -3
- package/dist/logger/format-timestamp.js +5 -3
- package/dist/logger/get-log-level.cjs +56 -6
- package/dist/logger/get-log-level.js +56 -6
- package/dist/logger/index.cjs +7 -62
- package/dist/logger/index.js +7 -62
- package/dist/logger/is-unicode-supported.cjs +16 -4
- package/dist/logger/is-unicode-supported.js +15 -3
- package/dist/types.cjs +24 -6
- package/dist/types.js +22 -4
- package/dist/utilities/apply-workspace-tokens.cjs +55 -9
- package/dist/utilities/apply-workspace-tokens.js +54 -8
- package/dist/utilities/correct-paths.cjs +242 -33
- package/dist/utilities/correct-paths.js +225 -16
- package/dist/utilities/file-path-utils.cjs +18 -5
- package/dist/utilities/file-path-utils.js +17 -4
- package/dist/utilities/find-up.cjs +22 -4
- package/dist/utilities/find-up.js +21 -3
- package/dist/utilities/find-workspace-root.cjs +64 -7
- package/dist/utilities/find-workspace-root.js +63 -6
- package/dist/utilities/get-default-config.cjs +79 -8
- package/dist/utilities/get-default-config.js +79 -8
- package/dist/utilities/index.cjs +7 -85
- package/dist/utilities/index.js +7 -85
- package/dist/utilities/process-handler.cjs +35 -17
- package/dist/utilities/process-handler.js +35 -17
- package/dist/utilities/run.cjs +34 -6
- package/dist/utilities/run.js +33 -5
- package/package.json +1 -1
- package/dist/chunk-2AVLCXLT.js +0 -0
- package/dist/chunk-2IKEUEGY.cjs +0 -94
- package/dist/chunk-2ZXJS2DW.js +0 -49
- package/dist/chunk-3557WSPY.js +0 -168
- package/dist/chunk-3NWKPYIG.cjs +0 -68
- package/dist/chunk-4DLP6LZY.cjs +0 -65
- package/dist/chunk-65SWKEHV.cjs +0 -1
- package/dist/chunk-6OM23J4N.js +0 -65
- package/dist/chunk-6T3V5XJK.js +0 -180
- package/dist/chunk-7CYF3NP3.cjs +0 -19
- package/dist/chunk-7NSHGJWY.cjs +0 -12
- package/dist/chunk-7PV6L7I7.cjs +0 -1
- package/dist/chunk-B7WWBK5Z.cjs +0 -93
- package/dist/chunk-BHZFTVXN.js +0 -42
- package/dist/chunk-C3W5DCMU.js +0 -19
- package/dist/chunk-DD3HX2NX.cjs +0 -1
- package/dist/chunk-GKI43HTL.cjs +0 -44
- package/dist/chunk-GZFXEQPB.js +0 -94
- package/dist/chunk-HESFC24Z.cjs +0 -245
- package/dist/chunk-HI33NNPB.js +0 -68
- package/dist/chunk-HSCCBYAV.js +0 -25
- package/dist/chunk-IRCFHYKZ.cjs +0 -28
- package/dist/chunk-IUT7Y2UY.js +0 -26
- package/dist/chunk-IWD6YQKX.cjs +0 -1
- package/dist/chunk-J2TOMCZU.cjs +0 -168
- package/dist/chunk-JHJGK3T7.js +0 -272
- package/dist/chunk-KNLWLA7O.cjs +0 -75
- package/dist/chunk-L6UNTUC4.js +0 -0
- package/dist/chunk-LOSUA6RB.js +0 -79
- package/dist/chunk-M7ASNATT.js +0 -142
- package/dist/chunk-MLUBD3PU.js +0 -245
- package/dist/chunk-NJVL3GF4.js +0 -0
- package/dist/chunk-OIEEXHKO.js +0 -75
- package/dist/chunk-POXTJ6GF.js +0 -28
- package/dist/chunk-PR7RQHRE.js +0 -12
- package/dist/chunk-QBS3OCHH.js +0 -22
- package/dist/chunk-QNYJXMP3.cjs +0 -79
- package/dist/chunk-RRKB32OH.js +0 -0
- package/dist/chunk-RVM5N5ZI.cjs +0 -22
- package/dist/chunk-SLGVSUEV.cjs +0 -36
- package/dist/chunk-SVQE7WVB.cjs +0 -180
- package/dist/chunk-SWX2MJHI.cjs +0 -28
- package/dist/chunk-TCTVN2ED.js +0 -44
- package/dist/chunk-U34AT42J.cjs +0 -49
- package/dist/chunk-ULZULP7Q.cjs +0 -142
- package/dist/chunk-XAJB3BSF.cjs +0 -25
- package/dist/chunk-XDBACKKN.cjs +0 -42
- package/dist/chunk-XQPQRRG3.js +0 -28
- package/dist/chunk-XY2LDOQ4.cjs +0 -26
- package/dist/chunk-XZ2SIQVM.js +0 -93
- package/dist/chunk-YBGTC6FM.cjs +0 -272
- package/dist/chunk-ZA4IO7YJ.js +0 -36
package/dist/chunk-SVQE7WVB.cjs
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// ../config/src/constants.ts
|
|
2
|
-
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
3
|
-
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
4
|
-
var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
|
|
5
|
-
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
6
|
-
|
|
7
|
-
// ../config/src/schema.ts
|
|
8
|
-
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
9
|
-
var DarkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
10
|
-
var LightColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
11
|
-
var BrandColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
|
|
12
|
-
var AlternateColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The alternate brand specific color of the workspace");
|
|
13
|
-
var AccentColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
|
|
14
|
-
var LinkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The color used to display hyperlink text");
|
|
15
|
-
var HelpColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
|
|
16
|
-
var SuccessColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#12B66A").describe("The success color of the workspace");
|
|
17
|
-
var InfoColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0070E0").describe("The informational color of the workspace");
|
|
18
|
-
var WarningColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
19
|
-
var DangerColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#D8314A").describe("The danger color of the workspace");
|
|
20
|
-
var FatalColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
|
|
21
|
-
var PositiveColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#4ade80").describe("The positive number color of the workspace");
|
|
22
|
-
var NegativeColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ef4444").describe("The negative number color of the workspace");
|
|
23
|
-
var DarkThemeColorConfigSchema = _zod2.default.object({
|
|
24
|
-
foreground: LightColorSchema,
|
|
25
|
-
background: DarkColorSchema,
|
|
26
|
-
brand: BrandColorSchema,
|
|
27
|
-
alternate: AlternateColorSchema,
|
|
28
|
-
accent: AccentColorSchema,
|
|
29
|
-
link: LinkColorSchema,
|
|
30
|
-
help: HelpColorSchema,
|
|
31
|
-
success: SuccessColorSchema,
|
|
32
|
-
info: InfoColorSchema,
|
|
33
|
-
warning: WarningColorSchema,
|
|
34
|
-
danger: DangerColorSchema,
|
|
35
|
-
fatal: FatalColorSchema,
|
|
36
|
-
positive: PositiveColorSchema,
|
|
37
|
-
negative: NegativeColorSchema
|
|
38
|
-
});
|
|
39
|
-
var LightThemeColorConfigSchema = _zod2.default.object({
|
|
40
|
-
foreground: DarkColorSchema,
|
|
41
|
-
background: LightColorSchema,
|
|
42
|
-
brand: BrandColorSchema,
|
|
43
|
-
alternate: AlternateColorSchema,
|
|
44
|
-
accent: AccentColorSchema,
|
|
45
|
-
link: LinkColorSchema,
|
|
46
|
-
help: HelpColorSchema,
|
|
47
|
-
success: SuccessColorSchema,
|
|
48
|
-
info: InfoColorSchema,
|
|
49
|
-
warning: WarningColorSchema,
|
|
50
|
-
danger: DangerColorSchema,
|
|
51
|
-
fatal: FatalColorSchema,
|
|
52
|
-
positive: PositiveColorSchema,
|
|
53
|
-
negative: NegativeColorSchema
|
|
54
|
-
});
|
|
55
|
-
var MultiThemeColorConfigSchema = _zod2.default.object({
|
|
56
|
-
dark: DarkThemeColorConfigSchema,
|
|
57
|
-
light: LightThemeColorConfigSchema
|
|
58
|
-
});
|
|
59
|
-
var SingleThemeColorConfigSchema = _zod2.default.object({
|
|
60
|
-
dark: DarkColorSchema,
|
|
61
|
-
light: LightColorSchema,
|
|
62
|
-
brand: BrandColorSchema,
|
|
63
|
-
alternate: AlternateColorSchema,
|
|
64
|
-
accent: AccentColorSchema,
|
|
65
|
-
link: LinkColorSchema,
|
|
66
|
-
help: HelpColorSchema,
|
|
67
|
-
success: SuccessColorSchema,
|
|
68
|
-
info: InfoColorSchema,
|
|
69
|
-
warning: WarningColorSchema,
|
|
70
|
-
danger: DangerColorSchema,
|
|
71
|
-
fatal: FatalColorSchema,
|
|
72
|
-
positive: PositiveColorSchema,
|
|
73
|
-
negative: NegativeColorSchema
|
|
74
|
-
});
|
|
75
|
-
var RegistryUrlConfigSchema = _zod2.default.string().trim().toLowerCase().url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
76
|
-
var RegistryConfigSchema = _zod2.default.object({
|
|
77
|
-
github: RegistryUrlConfigSchema,
|
|
78
|
-
npm: RegistryUrlConfigSchema,
|
|
79
|
-
cargo: RegistryUrlConfigSchema,
|
|
80
|
-
cyclone: RegistryUrlConfigSchema,
|
|
81
|
-
container: RegistryUrlConfigSchema
|
|
82
|
-
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
83
|
-
var ColorConfigSchema = SingleThemeColorConfigSchema.or(MultiThemeColorConfigSchema).describe("Colors used for various workspace elements");
|
|
84
|
-
var ColorConfigMapSchema = _zod2.default.union([
|
|
85
|
-
_zod2.default.object({
|
|
86
|
-
"base": ColorConfigSchema
|
|
87
|
-
}),
|
|
88
|
-
_zod2.default.record(_zod2.default.string(), ColorConfigSchema)
|
|
89
|
-
]);
|
|
90
|
-
var ExtendsItemSchema = _zod2.default.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
91
|
-
var ExtendsSchema = ExtendsItemSchema.or(_zod2.default.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
92
|
-
var WorkspaceBotConfigSchema = _zod2.default.object({
|
|
93
|
-
name: _zod2.default.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
94
|
-
email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
95
|
-
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
96
|
-
var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
97
|
-
cache: _zod2.default.string().trim().optional().describe("The directory used to store the environment's cached file data"),
|
|
98
|
-
data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
99
|
-
config: _zod2.default.string().trim().optional().describe("The directory used to store the environment's configuration files"),
|
|
100
|
-
temp: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
101
|
-
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
102
|
-
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
103
|
-
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
104
|
-
var StormConfigSchema = _zod2.default.object({
|
|
105
|
-
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
106
|
-
extends: ExtendsSchema.optional(),
|
|
107
|
-
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
108
|
-
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
109
|
-
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
110
|
-
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
111
|
-
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
112
|
-
homepage: _zod2.default.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
113
|
-
docs: _zod2.default.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
114
|
-
licensing: _zod2.default.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
115
|
-
branch: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
|
|
116
|
-
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
117
|
-
owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
118
|
-
bot: WorkspaceBotConfigSchema,
|
|
119
|
-
env: _zod2.default.enum([
|
|
120
|
-
"development",
|
|
121
|
-
"staging",
|
|
122
|
-
"production"
|
|
123
|
-
]).default("production").describe("The current runtime environment name for the package"),
|
|
124
|
-
workspaceRoot: _zod2.default.string().trim().default("").describe("The root directory of the workspace"),
|
|
125
|
-
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
126
|
-
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
127
|
-
directories: WorkspaceDirectoryConfigSchema,
|
|
128
|
-
packageManager: _zod2.default.enum([
|
|
129
|
-
"npm",
|
|
130
|
-
"yarn",
|
|
131
|
-
"pnpm",
|
|
132
|
-
"bun"
|
|
133
|
-
]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
|
|
134
|
-
timezone: _zod2.default.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
135
|
-
locale: _zod2.default.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
136
|
-
logLevel: _zod2.default.enum([
|
|
137
|
-
"silent",
|
|
138
|
-
"fatal",
|
|
139
|
-
"error",
|
|
140
|
-
"warn",
|
|
141
|
-
"success",
|
|
142
|
-
"info",
|
|
143
|
-
"debug",
|
|
144
|
-
"trace",
|
|
145
|
-
"all"
|
|
146
|
-
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
147
|
-
skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
148
|
-
registry: RegistryConfigSchema,
|
|
149
|
-
configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
150
|
-
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
151
|
-
extensions: _zod2.default.record(_zod2.default.any()).optional().default({}).describe("Configuration of each used extension")
|
|
152
|
-
}).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");
|
|
153
|
-
|
|
154
|
-
// ../config/src/types.ts
|
|
155
|
-
var COLOR_KEYS = [
|
|
156
|
-
"dark",
|
|
157
|
-
"light",
|
|
158
|
-
"base",
|
|
159
|
-
"brand",
|
|
160
|
-
"alternate",
|
|
161
|
-
"accent",
|
|
162
|
-
"link",
|
|
163
|
-
"success",
|
|
164
|
-
"help",
|
|
165
|
-
"info",
|
|
166
|
-
"warning",
|
|
167
|
-
"danger",
|
|
168
|
-
"fatal",
|
|
169
|
-
"positive",
|
|
170
|
-
"negative"
|
|
171
|
-
];
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.STORM_DEFAULT_LICENSE = STORM_DEFAULT_LICENSE; exports.StormConfigSchema = StormConfigSchema; exports.COLOR_KEYS = COLOR_KEYS;
|
package/dist/chunk-SWX2MJHI.cjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
-
|
|
3
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
-
|
|
5
|
-
// src/utilities/find-up.ts
|
|
6
|
-
var _fs = require('fs');
|
|
7
|
-
var _path = require('path');
|
|
8
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
9
|
-
var depth = 0;
|
|
10
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
11
|
-
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
12
|
-
if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
|
|
13
|
-
return _startPath;
|
|
14
|
-
}
|
|
15
|
-
if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
|
|
16
|
-
return _startPath;
|
|
17
|
-
}
|
|
18
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
19
|
-
const parent = _path.join.call(void 0, _startPath, "..");
|
|
20
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
21
|
-
}
|
|
22
|
-
return void 0;
|
|
23
|
-
}
|
|
24
|
-
_chunkUSNT2KNTcjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports.findFolderUp = findFolderUp;
|
package/dist/chunk-TCTVN2ED.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getLogFn,
|
|
3
|
-
getStopwatch
|
|
4
|
-
} from "./chunk-M7ASNATT.js";
|
|
5
|
-
import {
|
|
6
|
-
findWorkspaceRoot
|
|
7
|
-
} from "./chunk-OIEEXHKO.js";
|
|
8
|
-
import {
|
|
9
|
-
LogLevel
|
|
10
|
-
} from "./chunk-POXTJ6GF.js";
|
|
11
|
-
import {
|
|
12
|
-
__name
|
|
13
|
-
} from "./chunk-SHUYVCID.js";
|
|
14
|
-
|
|
15
|
-
// src/logger/create-logger.ts
|
|
16
|
-
import chalk from "chalk";
|
|
17
|
-
async function createLogger(config) {
|
|
18
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
19
|
-
if (!workspaceRoot) {
|
|
20
|
-
throw new Error("Cannot find workspace root");
|
|
21
|
-
}
|
|
22
|
-
const writeFatal = getLogFn(LogLevel.FATAL, config, chalk);
|
|
23
|
-
const writeError = getLogFn(LogLevel.ERROR, config, chalk);
|
|
24
|
-
const writeWarning = getLogFn(LogLevel.WARN, config, chalk);
|
|
25
|
-
const writeInfo = getLogFn(LogLevel.INFO, config, chalk);
|
|
26
|
-
const writeSuccess = getLogFn(LogLevel.SUCCESS, config, chalk);
|
|
27
|
-
const writeDebug = getLogFn(LogLevel.DEBUG, config, chalk);
|
|
28
|
-
const writeTrace = getLogFn(LogLevel.DEBUG, config, chalk);
|
|
29
|
-
return {
|
|
30
|
-
fatal: writeFatal,
|
|
31
|
-
error: writeError,
|
|
32
|
-
warning: writeWarning,
|
|
33
|
-
info: writeInfo,
|
|
34
|
-
success: writeSuccess,
|
|
35
|
-
debug: writeDebug,
|
|
36
|
-
trace: writeTrace,
|
|
37
|
-
getStopwatch
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
__name(createLogger, "createLogger");
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
createLogger
|
|
44
|
-
};
|
package/dist/chunk-U34AT42J.cjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkULZULP7Qcjs = require('./chunk-ULZULP7Q.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
10
|
-
|
|
11
|
-
// src/utilities/process-handler.ts
|
|
12
|
-
var exitWithError = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config) => {
|
|
13
|
-
_chunkULZULP7Qcjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
|
|
14
|
-
process.exit(1);
|
|
15
|
-
}, "exitWithError");
|
|
16
|
-
var exitWithSuccess = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config) => {
|
|
17
|
-
_chunkULZULP7Qcjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
|
|
18
|
-
process.exit(0);
|
|
19
|
-
}, "exitWithSuccess");
|
|
20
|
-
var handleProcess = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config) => {
|
|
21
|
-
_chunkULZULP7Qcjs.writeTrace.call(void 0, `Using the following arguments to process the script: ${process.argv.join(", ")}`, config);
|
|
22
|
-
process.on("unhandledRejection", (error) => {
|
|
23
|
-
_chunkULZULP7Qcjs.writeError.call(void 0, `An Unhandled Rejection occurred while running the program: ${error}`, config);
|
|
24
|
-
exitWithError(config);
|
|
25
|
-
});
|
|
26
|
-
process.on("uncaughtException", (error) => {
|
|
27
|
-
_chunkULZULP7Qcjs.writeError.call(void 0, `An Uncaught Exception occurred while running the program: ${error.message}
|
|
28
|
-
Stacktrace: ${error.stack}`, config);
|
|
29
|
-
exitWithError(config);
|
|
30
|
-
});
|
|
31
|
-
process.on("SIGTERM", (signal) => {
|
|
32
|
-
_chunkULZULP7Qcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
33
|
-
exitWithError(config);
|
|
34
|
-
});
|
|
35
|
-
process.on("SIGINT", (signal) => {
|
|
36
|
-
_chunkULZULP7Qcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
37
|
-
exitWithError(config);
|
|
38
|
-
});
|
|
39
|
-
process.on("SIGHUP", (signal) => {
|
|
40
|
-
_chunkULZULP7Qcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
41
|
-
exitWithError(config);
|
|
42
|
-
});
|
|
43
|
-
}, "handleProcess");
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
exports.exitWithError = exitWithError; exports.exitWithSuccess = exitWithSuccess; exports.handleProcess = handleProcess;
|
package/dist/chunk-ULZULP7Q.cjs
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
-
|
|
3
|
-
var _chunkSLGVSUEVcjs = require('./chunk-SLGVSUEV.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkXY2LDOQ4cjs = require('./chunk-XY2LDOQ4.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunk7NSHGJWYcjs = require('./chunk-7NSHGJWY.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunk2IKEUEGYcjs = require('./chunk-2IKEUEGY.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _chunk3NWKPYIGcjs = require('./chunk-3NWKPYIG.cjs');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
23
|
-
|
|
24
|
-
// src/logger/console.ts
|
|
25
|
-
var getLogFn = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (logLevel = _chunkIRCFHYKZcjs.LogLevel.INFO, config = {}, _chalk = _chunkSLGVSUEVcjs.getChalk.call(void 0, )) => {
|
|
26
|
-
const colors = !_optionalChain([config, 'access', _2 => _2.colors, 'optionalAccess', _3 => _3.dark]) && !_optionalChain([config, 'access', _4 => _4.colors, 'optionalAccess', _5 => _5["base"]]) && !_optionalChain([config, 'access', _6 => _6.colors, 'optionalAccess', _7 => _7["base"], 'optionalAccess', _8 => _8.dark]) ? _chunk2IKEUEGYcjs.DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) ? _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"]]) : _chunk2IKEUEGYcjs.DEFAULT_COLOR_CONFIG;
|
|
27
|
-
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || _chunkIRCFHYKZcjs.LogLevelLabel.INFO;
|
|
28
|
-
if (logLevel > _chunk3NWKPYIGcjs.getLogLevel.call(void 0, configLogLevel) || logLevel <= _chunkIRCFHYKZcjs.LogLevel.SILENT || _chunk3NWKPYIGcjs.getLogLevel.call(void 0, configLogLevel) <= _chunkIRCFHYKZcjs.LogLevel.SILENT) {
|
|
29
|
-
return (_) => {
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.FATAL >= logLevel) {
|
|
33
|
-
return (message) => {
|
|
34
|
-
console.error(`
|
|
35
|
-
${_chalk.gray(_chunk7NSHGJWYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${_chunkXY2LDOQ4cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
36
|
-
`);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.ERROR >= logLevel) {
|
|
40
|
-
return (message) => {
|
|
41
|
-
console.error(`
|
|
42
|
-
${_chalk.gray(_chunk7NSHGJWYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${_chunkXY2LDOQ4cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
43
|
-
`);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.WARN >= logLevel) {
|
|
47
|
-
return (message) => {
|
|
48
|
-
console.warn(`
|
|
49
|
-
${_chalk.gray(_chunk7NSHGJWYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${_chunkXY2LDOQ4cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
50
|
-
`);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.SUCCESS >= logLevel) {
|
|
54
|
-
return (message) => {
|
|
55
|
-
console.info(`
|
|
56
|
-
${_chalk.gray(_chunk7NSHGJWYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${_chunkXY2LDOQ4cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
57
|
-
`);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.INFO >= logLevel) {
|
|
61
|
-
return (message) => {
|
|
62
|
-
console.info(`
|
|
63
|
-
${_chalk.gray(_chunk7NSHGJWYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${_chunkXY2LDOQ4cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
64
|
-
`);
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.DEBUG >= logLevel) {
|
|
68
|
-
return (message) => {
|
|
69
|
-
console.debug(`
|
|
70
|
-
${_chalk.gray(_chunk7NSHGJWYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkXY2LDOQ4cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
71
|
-
`);
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.TRACE >= logLevel) {
|
|
75
|
-
return (message) => {
|
|
76
|
-
console.debug(`
|
|
77
|
-
${_chalk.gray(_chunk7NSHGJWYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkXY2LDOQ4cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.TRACE]} Trace]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
78
|
-
`);
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
return (message) => {
|
|
82
|
-
console.log(`
|
|
83
|
-
${_chalk.gray(_chunk7NSHGJWYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkXY2LDOQ4cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
84
|
-
`);
|
|
85
|
-
};
|
|
86
|
-
}, "getLogFn");
|
|
87
|
-
var writeFatal = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.FATAL, config)(message), "writeFatal");
|
|
88
|
-
var writeError = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.ERROR, config)(message), "writeError");
|
|
89
|
-
var writeWarning = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.WARN, config)(message), "writeWarning");
|
|
90
|
-
var writeInfo = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.INFO, config)(message), "writeInfo");
|
|
91
|
-
var writeSuccess = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.SUCCESS, config)(message), "writeSuccess");
|
|
92
|
-
var writeDebug = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.DEBUG, config)(message), "writeDebug");
|
|
93
|
-
var writeTrace = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.TRACE, config)(message), "writeTrace");
|
|
94
|
-
var writeSystem = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.ALL, config)(message), "writeSystem");
|
|
95
|
-
var getStopwatch = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (name) => {
|
|
96
|
-
const start = process.hrtime();
|
|
97
|
-
return () => {
|
|
98
|
-
const end = process.hrtime(start);
|
|
99
|
-
console.info(`
|
|
100
|
-
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
|
|
101
|
-
|
|
102
|
-
`);
|
|
103
|
-
};
|
|
104
|
-
}, "getStopwatch");
|
|
105
|
-
var MAX_DEPTH = 4;
|
|
106
|
-
var formatLogMessage = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, options = {}, depth = 0) => {
|
|
107
|
-
if (depth > MAX_DEPTH) {
|
|
108
|
-
return "<max depth>";
|
|
109
|
-
}
|
|
110
|
-
const prefix = _nullishCoalesce(options.prefix, () => ( "-"));
|
|
111
|
-
const skip = _nullishCoalesce(options.skip, () => ( []));
|
|
112
|
-
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
113
|
-
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
|
|
114
|
-
prefix: `${prefix}-`,
|
|
115
|
-
skip
|
|
116
|
-
}, depth + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
117
|
-
${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], {
|
|
118
|
-
prefix: `${prefix}-`,
|
|
119
|
-
skip
|
|
120
|
-
}, depth + 1) : message[key]}`).join("\n")}` : message;
|
|
121
|
-
}, "formatLogMessage");
|
|
122
|
-
var _isFunction = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (value) => {
|
|
123
|
-
try {
|
|
124
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _18 => _18.constructor]) && _optionalChain([value, 'optionalAccess', _19 => _19.call]) && _optionalChain([value, 'optionalAccess', _20 => _20.apply]));
|
|
125
|
-
} catch (e) {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
}, "_isFunction");
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
exports.getLogFn = getLogFn; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.writeSystem = writeSystem; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
|
package/dist/chunk-XAJB3BSF.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
-
|
|
3
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
-
|
|
5
|
-
// src/utilities/file-path-utils.ts
|
|
6
|
-
var _path = require('path');
|
|
7
|
-
var removeExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (filePath) => {
|
|
8
|
-
const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
9
|
-
if (result.startsWith("./")) {
|
|
10
|
-
return result.substring(2);
|
|
11
|
-
}
|
|
12
|
-
if (result.startsWith(".") || result.startsWith("/")) {
|
|
13
|
-
return result.substring(1);
|
|
14
|
-
}
|
|
15
|
-
return result;
|
|
16
|
-
}, "removeExtension");
|
|
17
|
-
function findFileName(filePath) {
|
|
18
|
-
return _nullishCoalesce(_optionalChain([filePath, 'optionalAccess', _ => _.split, 'call', _2 => _2(_optionalChain([filePath, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4(_path.sep)]) ? _path.sep : _optionalChain([filePath, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6("/")]) ? "/" : "\\"), 'optionalAccess', _7 => _7.pop, 'call', _8 => _8()]), () => ( ""));
|
|
19
|
-
}
|
|
20
|
-
_chunkUSNT2KNTcjs.__name.call(void 0, findFileName, "findFileName");
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
exports.removeExtension = removeExtension; exports.findFileName = findFileName;
|
package/dist/chunk-XDBACKKN.cjs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
-
|
|
3
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
-
|
|
5
|
-
// src/utilities/run.ts
|
|
6
|
-
var _child_process = require('child_process');
|
|
7
|
-
var LARGE_BUFFER = 1024 * 1e6;
|
|
8
|
-
var run = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), stdio = "inherit", env = process.env) => {
|
|
9
|
-
return _child_process.execSync.call(void 0, command, {
|
|
10
|
-
cwd,
|
|
11
|
-
env: {
|
|
12
|
-
...process.env,
|
|
13
|
-
...env,
|
|
14
|
-
CLICOLOR: "true",
|
|
15
|
-
FORCE_COLOR: "true"
|
|
16
|
-
},
|
|
17
|
-
windowsHide: true,
|
|
18
|
-
stdio,
|
|
19
|
-
maxBuffer: LARGE_BUFFER,
|
|
20
|
-
killSignal: "SIGTERM"
|
|
21
|
-
});
|
|
22
|
-
}, "run");
|
|
23
|
-
var runAsync = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), env = process.env) => {
|
|
24
|
-
return _child_process.exec.call(void 0, command, {
|
|
25
|
-
cwd,
|
|
26
|
-
env: {
|
|
27
|
-
...process.env,
|
|
28
|
-
...env,
|
|
29
|
-
CLICOLOR: "true",
|
|
30
|
-
FORCE_COLOR: "true"
|
|
31
|
-
},
|
|
32
|
-
windowsHide: true,
|
|
33
|
-
maxBuffer: LARGE_BUFFER,
|
|
34
|
-
killSignal: "SIGTERM"
|
|
35
|
-
});
|
|
36
|
-
}, "runAsync");
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
exports.LARGE_BUFFER = LARGE_BUFFER; exports.run = run; exports.runAsync = runAsync;
|
package/dist/chunk-XQPQRRG3.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-SHUYVCID.js";
|
|
4
|
-
|
|
5
|
-
// src/utilities/find-up.ts
|
|
6
|
-
import { existsSync } from "node:fs";
|
|
7
|
-
import { join } from "node:path";
|
|
8
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
9
|
-
var depth = 0;
|
|
10
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
11
|
-
const _startPath = startPath ?? process.cwd();
|
|
12
|
-
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
|
|
13
|
-
return _startPath;
|
|
14
|
-
}
|
|
15
|
-
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
16
|
-
return _startPath;
|
|
17
|
-
}
|
|
18
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
19
|
-
const parent = join(_startPath, "..");
|
|
20
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
21
|
-
}
|
|
22
|
-
return void 0;
|
|
23
|
-
}
|
|
24
|
-
__name(findFolderUp, "findFolderUp");
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
findFolderUp
|
|
28
|
-
};
|
package/dist/chunk-XY2LDOQ4.cjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkRVM5N5ZIcjs = require('./chunk-RVM5N5ZI.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
10
|
-
|
|
11
|
-
// src/logger/console-icons.ts
|
|
12
|
-
var useIcon = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (c, fallback) => _chunkRVM5N5ZIcjs.isUnicodeSupported.call(void 0, ) ? c : fallback, "useIcon");
|
|
13
|
-
var CONSOLE_ICONS = {
|
|
14
|
-
[_chunkIRCFHYKZcjs.LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
15
|
-
[_chunkIRCFHYKZcjs.LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
16
|
-
[_chunkIRCFHYKZcjs.LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
17
|
-
[_chunkIRCFHYKZcjs.LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
18
|
-
[_chunkIRCFHYKZcjs.LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
19
|
-
[_chunkIRCFHYKZcjs.LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
20
|
-
[_chunkIRCFHYKZcjs.LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
|
|
21
|
-
[_chunkIRCFHYKZcjs.LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
exports.CONSOLE_ICONS = CONSOLE_ICONS;
|