@storm-software/config-tools 1.190.151 → 1.190.152
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/bin/config.cjs +20 -40
- package/bin/config.mjs +19 -38
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/config-file/get-config-file.cjs +1 -2
- package/dist/config-file/get-config-file.d.cts +0 -2
- package/dist/config-file/get-config-file.d.mts +0 -2
- package/dist/config-file/get-config-file.mjs +1 -2
- package/dist/create-storm-config.cjs +1 -2
- package/dist/create-storm-config.d.cts +0 -2
- package/dist/create-storm-config.d.mts +0 -2
- package/dist/create-storm-config.mjs +1 -2
- package/dist/env/get-env.cjs +1 -2
- package/dist/env/get-env.d.cts +0 -2
- package/dist/env/get-env.d.mts +0 -2
- package/dist/env/get-env.mjs +1 -2
- package/dist/env/set-env.cjs +1 -2
- package/dist/env/set-env.d.cts +0 -2
- package/dist/env/set-env.d.mts +0 -2
- package/dist/env/set-env.mjs +1 -2
- package/dist/get-config.cjs +1 -2
- package/dist/get-config.d.cts +0 -2
- package/dist/get-config.d.mts +0 -2
- package/dist/get-config.mjs +1 -2
- package/dist/logger/chalk.cjs +1 -2
- package/dist/logger/chalk.d.cts +0 -2
- package/dist/logger/chalk.d.mts +0 -2
- package/dist/logger/chalk.mjs +1 -2
- package/dist/logger/console-icons.cjs +1 -2
- package/dist/logger/console-icons.d.cts +0 -2
- package/dist/logger/console-icons.d.mts +0 -2
- package/dist/logger/console-icons.mjs +1 -2
- package/dist/logger/console.cjs +1 -2
- package/dist/logger/console.d.cts +0 -2
- package/dist/logger/console.d.mts +0 -2
- package/dist/logger/console.mjs +1 -2
- package/dist/logger/create-logger.cjs +1 -2
- package/dist/logger/create-logger.d.cts +0 -2
- package/dist/logger/create-logger.d.mts +0 -2
- package/dist/logger/create-logger.mjs +1 -2
- package/dist/logger/format-timestamp.cjs +1 -2
- package/dist/logger/format-timestamp.d.cts +0 -2
- package/dist/logger/format-timestamp.d.mts +0 -2
- package/dist/logger/format-timestamp.mjs +1 -2
- package/dist/logger/get-log-level.cjs +1 -2
- package/dist/logger/get-log-level.d.cts +0 -2
- package/dist/logger/get-log-level.d.mts +0 -2
- package/dist/logger/get-log-level.mjs +1 -2
- package/dist/logger/is-unicode-supported.cjs +1 -2
- package/dist/logger/is-unicode-supported.d.cts +0 -2
- package/dist/logger/is-unicode-supported.d.mts +0 -2
- package/dist/logger/is-unicode-supported.mjs +1 -2
- package/dist/types.cjs +1 -2
- package/dist/types.d.cts +0 -2
- package/dist/types.d.mts +0 -2
- package/dist/types.mjs +1 -2
- package/dist/utilities/apply-workspace-tokens.cjs +1 -2
- package/dist/utilities/apply-workspace-tokens.d.cts +0 -2
- package/dist/utilities/apply-workspace-tokens.d.mts +0 -2
- package/dist/utilities/apply-workspace-tokens.mjs +1 -2
- package/dist/utilities/colors.cjs +1 -2
- package/dist/utilities/colors.d.cts +0 -2
- package/dist/utilities/colors.d.mts +0 -2
- package/dist/utilities/colors.mjs +1 -2
- package/dist/utilities/correct-paths.cjs +1 -2
- package/dist/utilities/correct-paths.d.cts +0 -2
- package/dist/utilities/correct-paths.d.mts +0 -2
- package/dist/utilities/correct-paths.mjs +1 -2
- package/dist/utilities/file-path-utils.cjs +1 -2
- package/dist/utilities/file-path-utils.d.cts +0 -2
- package/dist/utilities/file-path-utils.d.mts +0 -2
- package/dist/utilities/file-path-utils.mjs +1 -2
- package/dist/utilities/find-up.cjs +1 -2
- package/dist/utilities/find-up.d.cts +0 -2
- package/dist/utilities/find-up.d.mts +0 -2
- package/dist/utilities/find-up.mjs +1 -2
- package/dist/utilities/find-workspace-root.cjs +1 -2
- package/dist/utilities/find-workspace-root.d.cts +0 -2
- package/dist/utilities/find-workspace-root.d.mts +0 -2
- package/dist/utilities/find-workspace-root.mjs +1 -2
- package/dist/utilities/format-error-message.cjs +1 -2
- package/dist/utilities/format-error-message.d.cts +0 -2
- package/dist/utilities/format-error-message.d.mts +0 -2
- package/dist/utilities/format-error-message.mjs +1 -2
- package/dist/utilities/get-default-config.cjs +1 -2
- package/dist/utilities/get-default-config.d.cts +0 -2
- package/dist/utilities/get-default-config.d.mts +0 -2
- package/dist/utilities/get-default-config.mjs +1 -2
- package/dist/utilities/process-handler.cjs +1 -2
- package/dist/utilities/process-handler.d.cts +0 -2
- package/dist/utilities/process-handler.d.mts +0 -2
- package/dist/utilities/process-handler.mjs +1 -2
- package/dist/utilities/run.cjs +1 -2
- package/dist/utilities/run.d.cts +0 -2
- package/dist/utilities/run.d.mts +0 -2
- package/dist/utilities/run.mjs +1 -2
- package/dist/utilities/toml.cjs +1 -2
- package/dist/utilities/toml.d.cts +0 -2
- package/dist/utilities/toml.d.mts +0 -2
- package/dist/utilities/toml.mjs +1 -2
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/utilities/correct-paths.ts
|
|
5
5
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
6
6
|
function normalizeWindowsPath(input = "") {
|
|
7
7
|
if (!input) return input;
|
|
@@ -186,5 +186,4 @@ const parse = function(p) {
|
|
|
186
186
|
name: base.slice(0, base.length - extension.length)
|
|
187
187
|
};
|
|
188
188
|
};
|
|
189
|
-
//#endregion
|
|
190
189
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_utilities_correct_paths = require("./correct-paths.cjs");
|
|
3
|
-
|
|
3
|
+
// src/utilities/file-path-utils.ts
|
|
4
4
|
const removeExtension = (filePath) => {
|
|
5
5
|
const result = !filePath || (filePath?.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
6
6
|
if (result.startsWith("./")) return result.substring(2);
|
|
@@ -42,7 +42,6 @@ function findFilePath(filePath) {
|
|
|
42
42
|
const normalizedPath = require_utilities_correct_paths.normalizeWindowsPath(filePath);
|
|
43
43
|
return normalizedPath.replace(findFileName(normalizedPath, { requireExtension: true }), "");
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
exports.findFileName = findFileName;
|
|
47
46
|
exports.findFilePath = findFilePath;
|
|
48
47
|
exports.removeExtension = removeExtension;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utilities/file-path-utils.d.ts
|
|
2
1
|
declare const removeExtension: (filePath?: string) => string;
|
|
3
2
|
interface FindFileNameOptions {
|
|
4
3
|
/**
|
|
@@ -41,5 +40,4 @@ declare function findFileName(filePath: string, { requireExtension, withExtensio
|
|
|
41
40
|
* @returns The full file path's directories
|
|
42
41
|
*/
|
|
43
42
|
declare function findFilePath(filePath: string): string;
|
|
44
|
-
//#endregion
|
|
45
43
|
export { FindFileNameOptions, findFileName, findFilePath, removeExtension };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/utilities/file-path-utils.d.ts
|
|
4
3
|
declare const removeExtension: (filePath?: string) => string;
|
|
5
4
|
interface FindFileNameOptions {
|
|
6
5
|
/**
|
|
@@ -43,5 +42,4 @@ declare function findFileName(filePath: string, { requireExtension, withExtensio
|
|
|
43
42
|
* @returns The full file path's directories
|
|
44
43
|
*/
|
|
45
44
|
declare function findFilePath(filePath: string): string;
|
|
46
|
-
//#endregion
|
|
47
45
|
export { FindFileNameOptions, findFileName, findFilePath, removeExtension };
|
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { normalizeWindowsPath } from "./correct-paths.mjs";
|
|
5
|
-
|
|
5
|
+
// src/utilities/file-path-utils.ts
|
|
6
6
|
const removeExtension = (filePath) => {
|
|
7
7
|
const result = !filePath || (filePath?.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
8
8
|
if (result.startsWith("./")) return result.substring(2);
|
|
@@ -44,5 +44,4 @@ function findFilePath(filePath) {
|
|
|
44
44
|
const normalizedPath = normalizeWindowsPath(filePath);
|
|
45
45
|
return normalizedPath.replace(findFileName(normalizedPath, { requireExtension: true }), "");
|
|
46
46
|
}
|
|
47
|
-
//#endregion
|
|
48
47
|
export { findFileName, findFilePath, removeExtension };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let node_fs = require("node:fs");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
|
-
|
|
4
|
+
// src/utilities/find-up.ts
|
|
5
5
|
const MAX_PATH_SEARCH_DEPTH = 30;
|
|
6
6
|
let depth = 0;
|
|
7
7
|
/**
|
|
@@ -13,5 +13,4 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
13
13
|
if (endFileNames.some((endFileName) => (0, node_fs.existsSync)((0, node_path.join)(_startPath, endFileName)))) return _startPath;
|
|
14
14
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) return findFolderUp((0, node_path.join)(_startPath, ".."), endFileNames, endDirectoryNames);
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
exports.findFolderUp = findFolderUp;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
//#region src/utilities/find-up.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Gets the nearest "node_modules" folder by walking up from start path.
|
|
4
3
|
*/
|
|
5
4
|
declare function findFolderUp(startPath: string, endFileNames?: string[], endDirectoryNames?: string[]): string | undefined;
|
|
6
|
-
//#endregion
|
|
7
5
|
export { findFolderUp };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/utilities/find-up.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Gets the nearest "node_modules" folder by walking up from start path.
|
|
6
5
|
*/
|
|
7
6
|
declare function findFolderUp(startPath: string, endFileNames?: string[], endDirectoryNames?: string[]): string | undefined;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { findFolderUp };
|
|
@@ -2,7 +2,7 @@ import { join } from "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
|
-
|
|
5
|
+
// src/utilities/find-up.ts
|
|
6
6
|
const MAX_PATH_SEARCH_DEPTH = 30;
|
|
7
7
|
let depth = 0;
|
|
8
8
|
/**
|
|
@@ -14,5 +14,4 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
14
14
|
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) return _startPath;
|
|
15
15
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) return findFolderUp(join(_startPath, ".."), endFileNames, endDirectoryNames);
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { findFolderUp };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_utilities_correct_paths = require("./correct-paths.cjs");
|
|
3
3
|
const require_utilities_find_up = require("./find-up.cjs");
|
|
4
|
-
|
|
4
|
+
// src/utilities/find-workspace-root.ts
|
|
5
5
|
const rootFiles = [
|
|
6
6
|
"storm-workspace.json",
|
|
7
7
|
"storm-workspace.yaml",
|
|
@@ -67,6 +67,5 @@ function findWorkspaceRoot(pathInsideMonorepo) {
|
|
|
67
67
|
if (!result) throw new Error(`Cannot find workspace root upwards from known path. Files search list includes: \n${rootFiles.join("\n")}\nPath: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
68
68
|
return result;
|
|
69
69
|
}
|
|
70
|
-
//#endregion
|
|
71
70
|
exports.findWorkspaceRoot = findWorkspaceRoot;
|
|
72
71
|
exports.findWorkspaceRootSafe = findWorkspaceRootSafe;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utilities/find-workspace-root.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Find the monorepo root directory, searching upwards from `path`.
|
|
4
3
|
*
|
|
@@ -13,5 +12,4 @@ declare function findWorkspaceRootSafe(pathInsideMonorepo?: string): string | un
|
|
|
13
12
|
* @returns The monorepo root directory
|
|
14
13
|
*/
|
|
15
14
|
declare function findWorkspaceRoot(pathInsideMonorepo?: string): string;
|
|
16
|
-
//#endregion
|
|
17
15
|
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/utilities/find-workspace-root.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Find the monorepo root directory, searching upwards from `path`.
|
|
6
5
|
*
|
|
@@ -15,5 +14,4 @@ declare function findWorkspaceRootSafe(pathInsideMonorepo?: string): string | un
|
|
|
15
14
|
* @returns The monorepo root directory
|
|
16
15
|
*/
|
|
17
16
|
declare function findWorkspaceRoot(pathInsideMonorepo?: string): string;
|
|
18
|
-
//#endregion
|
|
19
17
|
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { correctPaths } from "./correct-paths.mjs";
|
|
5
5
|
import { findFolderUp } from "./find-up.mjs";
|
|
6
|
-
|
|
6
|
+
// src/utilities/find-workspace-root.ts
|
|
7
7
|
const rootFiles = [
|
|
8
8
|
"storm-workspace.json",
|
|
9
9
|
"storm-workspace.yaml",
|
|
@@ -69,5 +69,4 @@ function findWorkspaceRoot(pathInsideMonorepo) {
|
|
|
69
69
|
if (!result) throw new Error(`Cannot find workspace root upwards from known path. Files search list includes: \n${rootFiles.join("\n")}\nPath: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
70
70
|
return result;
|
|
71
71
|
}
|
|
72
|
-
//#endregion
|
|
73
72
|
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/utilities/format-error-message.ts
|
|
3
3
|
/**
|
|
4
4
|
* Format an unknown error value into a human-readable message.
|
|
5
5
|
*
|
|
@@ -24,5 +24,4 @@ function formatErrorMessage(error) {
|
|
|
24
24
|
return String(error);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
exports.formatErrorMessage = formatErrorMessage;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utilities/format-error-message.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Format an unknown error value into a human-readable message.
|
|
4
3
|
*
|
|
@@ -6,5 +5,4 @@
|
|
|
6
5
|
* @returns A formatted error message string.
|
|
7
6
|
*/
|
|
8
7
|
declare function formatErrorMessage(error: unknown): string;
|
|
9
|
-
//#endregion
|
|
10
8
|
export { formatErrorMessage };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/utilities/format-error-message.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Format an unknown error value into a human-readable message.
|
|
6
5
|
*
|
|
@@ -8,5 +7,4 @@ import __tsdown_shims_url from 'node:url';
|
|
|
8
7
|
* @returns A formatted error message string.
|
|
9
8
|
*/
|
|
10
9
|
declare function formatErrorMessage(error: unknown): string;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { formatErrorMessage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/utilities/format-error-message.ts
|
|
5
5
|
/**
|
|
6
6
|
* Format an unknown error value into a human-readable message.
|
|
7
7
|
*
|
|
@@ -26,5 +26,4 @@ function formatErrorMessage(error) {
|
|
|
26
26
|
return String(error);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { formatErrorMessage };
|
|
@@ -5,7 +5,7 @@ let node_fs = require("node:fs");
|
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
let _storm_software_config = require("@storm-software/config");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
|
-
|
|
8
|
+
// src/utilities/get-default-config.ts
|
|
9
9
|
/**
|
|
10
10
|
* Get the default Storm config values used during various dev-ops processes
|
|
11
11
|
*
|
|
@@ -68,6 +68,5 @@ function applyDefaultConfig(config) {
|
|
|
68
68
|
}
|
|
69
69
|
return config;
|
|
70
70
|
}
|
|
71
|
-
//#endregion
|
|
72
71
|
exports.applyDefaultConfig = applyDefaultConfig;
|
|
73
72
|
exports.getPackageJsonConfig = getPackageJsonConfig;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
2
|
-
//#region src/utilities/get-default-config.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Get the default Storm config values used during various dev-ops processes
|
|
5
4
|
*
|
|
@@ -13,5 +12,4 @@ declare function getPackageJsonConfig(root?: string): Promise<Pick<StormWorkspac
|
|
|
13
12
|
* @returns The config object with defaults applied
|
|
14
13
|
*/
|
|
15
14
|
declare function applyDefaultConfig(config: Partial<StormWorkspaceConfig>): Partial<StormWorkspaceConfig>;
|
|
16
|
-
//#endregion
|
|
17
15
|
export { applyDefaultConfig, getPackageJsonConfig };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
4
|
-
//#region src/utilities/get-default-config.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Get the default Storm config values used during various dev-ops processes
|
|
7
6
|
*
|
|
@@ -15,5 +14,4 @@ declare function getPackageJsonConfig(root?: string): Promise<Pick<StormWorkspac
|
|
|
15
14
|
* @returns The config object with defaults applied
|
|
16
15
|
*/
|
|
17
16
|
declare function applyDefaultConfig(config: Partial<StormWorkspaceConfig>): Partial<StormWorkspaceConfig>;
|
|
18
|
-
//#endregion
|
|
19
17
|
export { applyDefaultConfig, getPackageJsonConfig };
|
|
@@ -6,7 +6,7 @@ import { findWorkspaceRoot } from "./find-workspace-root.mjs";
|
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
7
7
|
import { STORM_DEFAULT_ERROR_CODES_FILE, STORM_DEFAULT_LICENSE } from "@storm-software/config";
|
|
8
8
|
import { readFile } from "node:fs/promises";
|
|
9
|
-
|
|
9
|
+
// src/utilities/get-default-config.ts
|
|
10
10
|
/**
|
|
11
11
|
* Get the default Storm config values used during various dev-ops processes
|
|
12
12
|
*
|
|
@@ -69,5 +69,4 @@ function applyDefaultConfig(config) {
|
|
|
69
69
|
}
|
|
70
70
|
return config;
|
|
71
71
|
}
|
|
72
|
-
//#endregion
|
|
73
72
|
export { applyDefaultConfig, getPackageJsonConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_logger_console = require("../logger/console.cjs");
|
|
3
|
-
|
|
3
|
+
// src/utilities/process-handler.ts
|
|
4
4
|
const exitWithError = (config) => {
|
|
5
5
|
require_logger_console.writeFatal("Exiting script with an error status...", config);
|
|
6
6
|
process.exit(1);
|
|
@@ -32,7 +32,6 @@ const handleProcess = (config) => {
|
|
|
32
32
|
exitWithError(config);
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
exports.exitWithError = exitWithError;
|
|
37
36
|
exports.exitWithSuccess = exitWithSuccess;
|
|
38
37
|
exports.handleProcess = handleProcess;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
2
|
-
//#region src/utilities/process-handler.d.ts
|
|
3
2
|
declare const exitWithError: (config?: Partial<StormWorkspaceConfig>) => never;
|
|
4
3
|
declare const exitWithSuccess: (config?: Partial<StormWorkspaceConfig>) => never;
|
|
5
4
|
declare const handleProcess: (config?: Partial<StormWorkspaceConfig>) => void;
|
|
6
|
-
//#endregion
|
|
7
5
|
export { exitWithError, exitWithSuccess, handleProcess };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
4
|
-
//#region src/utilities/process-handler.d.ts
|
|
5
4
|
declare const exitWithError: (config?: Partial<StormWorkspaceConfig>) => never;
|
|
6
5
|
declare const exitWithSuccess: (config?: Partial<StormWorkspaceConfig>) => never;
|
|
7
6
|
declare const handleProcess: (config?: Partial<StormWorkspaceConfig>) => void;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { exitWithError, exitWithSuccess, handleProcess };
|
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { writeError, writeFatal, writeSuccess, writeTrace } from "../logger/console.mjs";
|
|
5
|
-
|
|
5
|
+
// src/utilities/process-handler.ts
|
|
6
6
|
const exitWithError = (config) => {
|
|
7
7
|
writeFatal("Exiting script with an error status...", config);
|
|
8
8
|
process.exit(1);
|
|
@@ -34,5 +34,4 @@ const handleProcess = (config) => {
|
|
|
34
34
|
exitWithError(config);
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
//#endregion
|
|
38
37
|
export { exitWithError, exitWithSuccess, handleProcess };
|
package/dist/utilities/run.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let node_child_process = require("node:child_process");
|
|
3
|
-
|
|
3
|
+
// src/utilities/run.ts
|
|
4
4
|
const LARGE_BUFFER = 1024e6;
|
|
5
5
|
/**
|
|
6
6
|
* Run a command line process
|
|
@@ -58,7 +58,6 @@ const runAsync = (config, command, cwd = config.workspaceRoot ?? process.cwd(),
|
|
|
58
58
|
encoding: "utf8"
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
|
-
//#endregion
|
|
62
61
|
exports.LARGE_BUFFER = LARGE_BUFFER;
|
|
63
62
|
exports.run = run;
|
|
64
63
|
exports.runAsync = runAsync;
|
package/dist/utilities/run.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
2
|
-
//#region src/utilities/run.d.ts
|
|
3
2
|
declare const LARGE_BUFFER: number;
|
|
4
3
|
type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
|
|
5
4
|
type StdioOptions = IOType | Array<IOType | "ipc" | number | null | undefined>;
|
|
@@ -30,5 +29,4 @@ declare const run: (config: Partial<StormWorkspaceConfig>, command: string, cwd?
|
|
|
30
29
|
* @returns A promise with the result of the command
|
|
31
30
|
*/
|
|
32
31
|
declare const runAsync: (config: Partial<StormWorkspaceConfig>, command: string, cwd?: string, env?: NodeJS.ProcessEnv) => import("node:child_process").ChildProcess;
|
|
33
|
-
//#endregion
|
|
34
32
|
export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync };
|
package/dist/utilities/run.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
4
|
-
//#region src/utilities/run.d.ts
|
|
5
4
|
declare const LARGE_BUFFER: number;
|
|
6
5
|
type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
|
|
7
6
|
type StdioOptions = IOType | Array<IOType | "ipc" | number | null | undefined>;
|
|
@@ -32,5 +31,4 @@ declare const run: (config: Partial<StormWorkspaceConfig>, command: string, cwd?
|
|
|
32
31
|
* @returns A promise with the result of the command
|
|
33
32
|
*/
|
|
34
33
|
declare const runAsync: (config: Partial<StormWorkspaceConfig>, command: string, cwd?: string, env?: NodeJS.ProcessEnv) => import("node:child_process").ChildProcess;
|
|
35
|
-
//#endregion
|
|
36
34
|
export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync };
|
package/dist/utilities/run.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { exec, execSync } from "node:child_process";
|
|
5
|
-
|
|
5
|
+
// src/utilities/run.ts
|
|
6
6
|
const LARGE_BUFFER = 1024e6;
|
|
7
7
|
/**
|
|
8
8
|
* Run a command line process
|
|
@@ -60,5 +60,4 @@ const runAsync = (config, command, cwd = config.workspaceRoot ?? process.cwd(),
|
|
|
60
60
|
encoding: "utf8"
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
-
//#endregion
|
|
64
63
|
export { LARGE_BUFFER, run, runAsync };
|
package/dist/utilities/toml.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
|
3
3
|
const require_logger_console = require("../logger/console.cjs");
|
|
4
4
|
let _ltd_j_toml = require("@ltd/j-toml");
|
|
5
5
|
_ltd_j_toml = require_runtime.__toESM(_ltd_j_toml, 1);
|
|
6
|
-
|
|
6
|
+
// src/utilities/toml.ts
|
|
7
7
|
function parseCargoTomlWithTree(tree, projectRoot, projectName) {
|
|
8
8
|
const cargoTomlString = tree.read(`${projectRoot}/Cargo.toml`)?.toString();
|
|
9
9
|
if (!cargoTomlString) {
|
|
@@ -29,7 +29,6 @@ function modifyCargoNestedTable(toml, section, key, value) {
|
|
|
29
29
|
toml[section] ??= {};
|
|
30
30
|
toml[section][key] = _ltd_j_toml.default.Section(value);
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
exports.modifyCargoNestedTable = modifyCargoNestedTable;
|
|
34
33
|
exports.modifyCargoTable = modifyCargoTable;
|
|
35
34
|
exports.parseCargoToml = parseCargoToml;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utilities/toml.d.ts
|
|
2
1
|
interface CargoToml {
|
|
3
2
|
workspace?: {
|
|
4
3
|
members: string[];
|
|
@@ -186,5 +185,4 @@ declare function parseCargoToml(cargoString?: string): CargoToml;
|
|
|
186
185
|
declare function stringifyCargoToml(cargoToml: CargoToml): string;
|
|
187
186
|
declare function modifyCargoTable(toml: CargoToml, section: string, key: string, value: string | object | any[] | (() => any)): void;
|
|
188
187
|
declare function modifyCargoNestedTable(toml: CargoToml, section: string, key: string, value: object): void;
|
|
189
|
-
//#endregion
|
|
190
188
|
export { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/utilities/toml.d.ts
|
|
4
3
|
interface CargoToml {
|
|
5
4
|
workspace?: {
|
|
6
5
|
members: string[];
|
|
@@ -188,5 +187,4 @@ declare function parseCargoToml(cargoString?: string): CargoToml;
|
|
|
188
187
|
declare function stringifyCargoToml(cargoToml: CargoToml): string;
|
|
189
188
|
declare function modifyCargoTable(toml: CargoToml, section: string, key: string, value: string | object | any[] | (() => any)): void;
|
|
190
189
|
declare function modifyCargoNestedTable(toml: CargoToml, section: string, key: string, value: object): void;
|
|
191
|
-
//#endregion
|
|
192
190
|
export { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml };
|
package/dist/utilities/toml.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { writeError } from "../logger/console.mjs";
|
|
5
5
|
import TOML from "@ltd/j-toml";
|
|
6
|
-
|
|
6
|
+
// src/utilities/toml.ts
|
|
7
7
|
function parseCargoTomlWithTree(tree, projectRoot, projectName) {
|
|
8
8
|
const cargoTomlString = tree.read(`${projectRoot}/Cargo.toml`)?.toString();
|
|
9
9
|
if (!cargoTomlString) {
|
|
@@ -29,5 +29,4 @@ function modifyCargoNestedTable(toml, section, key, value) {
|
|
|
29
29
|
toml[section] ??= {};
|
|
30
30
|
toml[section][key] = TOML.Section(value);
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.190.
|
|
3
|
+
"version": "1.190.152",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing various utilities to support custom workspace configurations and environment management for Storm Software projects, including configuration file handling, environment variable management, and logging utilities.",
|
|
6
6
|
"keywords": [
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"files": ["dist"],
|
|
165
165
|
"dependencies": {
|
|
166
166
|
"@ltd/j-toml": "1.38.0",
|
|
167
|
-
"@storm-software/config": "1.138.
|
|
167
|
+
"@storm-software/config": "1.138.88",
|
|
168
168
|
"c12": "^2.0.4",
|
|
169
169
|
"chalk": "^4.1.2",
|
|
170
170
|
"commander": "^12.1.0",
|
|
@@ -182,5 +182,5 @@
|
|
|
182
182
|
"peerDependencies": { "zod": "^3.25.0 || ^4.0.0" },
|
|
183
183
|
"peerDependenciesMeta": { "zod": { "optional": false } },
|
|
184
184
|
"publishConfig": { "access": "public" },
|
|
185
|
-
"gitHead": "
|
|
185
|
+
"gitHead": "3024fb5d376756064c200c95f2bc9978735d2a71"
|
|
186
186
|
}
|