@storm-software/config-tools 1.190.119 → 1.190.121
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/bin/config.cjs +1213 -1558
- package/bin/config.mjs +1271 -0
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/config-file/get-config-file.cjs +67 -28
- package/dist/config-file/get-config-file.d.cts +5 -5
- package/dist/config-file/{get-config-file.d.ts → get-config-file.d.mts} +7 -5
- package/dist/config-file/get-config-file.mjs +66 -0
- package/dist/config-file/index.cjs +4 -29
- package/dist/config-file/index.d.cts +2 -3
- package/dist/config-file/index.d.mts +4 -0
- package/dist/config-file/index.mjs +5 -0
- package/dist/create-storm-config.cjs +115 -34
- package/dist/create-storm-config.d.cts +5 -5
- package/dist/{create-storm-config.d.ts → create-storm-config.d.mts} +7 -5
- package/dist/create-storm-config.mjs +113 -0
- package/dist/env/get-env.cjs +202 -11
- package/dist/env/get-env.d.cts +5 -5
- package/dist/env/{get-env.d.ts → get-env.d.mts} +7 -5
- package/dist/env/get-env.mjs +203 -0
- package/dist/env/index.cjs +7 -18
- package/dist/env/index.d.cts +3 -4
- package/dist/env/index.d.mts +5 -0
- package/dist/env/index.mjs +6 -0
- package/dist/env/set-env.cjs +230 -11
- package/dist/env/set-env.d.cts +8 -8
- package/dist/env/{set-env.d.ts → set-env.d.mts} +10 -8
- package/dist/env/set-env.mjs +231 -0
- package/dist/get-config.cjs +46 -34
- package/dist/get-config.d.cts +18 -18
- package/dist/{get-config.d.ts → get-config.d.mts} +20 -18
- package/dist/get-config.mjs +46 -0
- package/dist/index.cjs +98 -201
- package/dist/index.d.cts +27 -28
- package/dist/index.d.mts +29 -0
- package/dist/index.mjs +26 -0
- package/dist/logger/chalk.cjs +43 -6
- package/dist/logger/chalk.d.cts +18 -17
- package/dist/logger/chalk.d.mts +37 -0
- package/dist/logger/chalk.mjs +43 -0
- package/dist/logger/console-icons.cjs +18 -8
- package/dist/logger/console-icons.d.cts +5 -8
- package/dist/logger/console-icons.d.mts +7 -0
- package/dist/logger/console-icons.mjs +20 -0
- package/dist/logger/console.cjs +195 -37
- package/dist/logger/console.d.cts +25 -25
- package/dist/logger/{console.d.ts → console.d.mts} +27 -25
- package/dist/logger/console.mjs +185 -0
- package/dist/logger/create-logger.cjs +34 -14
- package/dist/logger/create-logger.d.cts +5 -6
- package/dist/logger/{create-logger.d.ts → create-logger.d.mts} +7 -6
- package/dist/logger/create-logger.mjs +34 -0
- package/dist/logger/format-timestamp.cjs +14 -6
- package/dist/logger/format-timestamp.d.cts +3 -2
- package/dist/logger/{format-timestamp.d.ts → format-timestamp.d.mts} +5 -2
- package/dist/logger/format-timestamp.mjs +16 -0
- package/dist/logger/get-log-level.cjs +54 -11
- package/dist/logger/get-log-level.d.cts +4 -5
- package/dist/logger/{get-log-level.d.ts → get-log-level.d.mts} +6 -5
- package/dist/logger/get-log-level.mjs +54 -0
- package/dist/logger/index.cjs +29 -61
- package/dist/logger/index.d.cts +8 -10
- package/dist/logger/index.d.mts +10 -0
- package/dist/logger/index.mjs +11 -0
- package/dist/logger/is-unicode-supported.cjs +8 -6
- package/dist/logger/is-unicode-supported.d.cts +3 -2
- package/dist/logger/is-unicode-supported.d.mts +6 -0
- package/dist/logger/is-unicode-supported.mjs +10 -0
- package/dist/types.cjs +29 -8
- package/dist/types.d.cts +39 -41
- package/dist/types.d.mts +53 -0
- package/dist/types.mjs +30 -0
- package/dist/utilities/apply-workspace-tokens.cjs +37 -13
- package/dist/utilities/apply-workspace-tokens.d.cts +4 -5
- package/dist/utilities/{apply-workspace-tokens.d.ts → apply-workspace-tokens.d.mts} +6 -5
- package/dist/utilities/apply-workspace-tokens.mjs +37 -0
- package/dist/utilities/colors.cjs +98 -12
- package/dist/utilities/colors.d.cts +4 -4
- package/dist/utilities/{colors.d.ts → colors.d.mts} +6 -4
- package/dist/utilities/colors.mjs +97 -0
- package/dist/utilities/correct-paths.cjs +201 -32
- package/dist/utilities/correct-paths.d.cts +4 -4
- package/dist/utilities/{correct-paths.d.ts → correct-paths.d.mts} +6 -4
- package/dist/utilities/correct-paths.mjs +190 -0
- package/dist/utilities/file-path-utils.cjs +48 -11
- package/dist/utilities/file-path-utils.d.cts +15 -14
- package/dist/utilities/{file-path-utils.d.ts → file-path-utils.d.mts} +17 -14
- package/dist/utilities/file-path-utils.mjs +48 -0
- package/dist/utilities/find-up.cjs +17 -6
- package/dist/utilities/find-up.d.cts +3 -2
- package/dist/utilities/{find-up.d.ts → find-up.d.mts} +5 -2
- package/dist/utilities/find-up.mjs +19 -0
- package/dist/utilities/find-workspace-root.cjs +72 -10
- package/dist/utilities/find-workspace-root.d.cts +3 -2
- package/dist/utilities/{find-workspace-root.d.ts → find-workspace-root.d.mts} +5 -2
- package/dist/utilities/find-workspace-root.mjs +73 -0
- package/dist/utilities/get-default-config.cjs +73 -11
- package/dist/utilities/get-default-config.d.cts +4 -4
- package/dist/utilities/{get-default-config.d.ts → get-default-config.d.mts} +6 -4
- package/dist/utilities/get-default-config.mjs +74 -0
- package/dist/utilities/index.cjs +49 -109
- package/dist/utilities/index.d.cts +10 -14
- package/dist/utilities/index.d.mts +12 -0
- package/dist/utilities/index.mjs +13 -0
- package/dist/utilities/process-handler.cjs +38 -18
- package/dist/utilities/process-handler.d.cts +4 -4
- package/dist/utilities/process-handler.d.mts +9 -0
- package/dist/utilities/process-handler.mjs +38 -0
- package/dist/utilities/run.cjs +64 -10
- package/dist/utilities/run.d.cts +5 -6
- package/dist/utilities/{run.d.ts → run.d.mts} +7 -6
- package/dist/utilities/run.mjs +64 -0
- package/dist/utilities/toml.cjs +37 -24
- package/dist/utilities/toml.d.cts +148 -147
- package/dist/utilities/toml.d.mts +192 -0
- package/dist/utilities/toml.mjs +33 -0
- package/package.json +106 -158
- package/bin/config.js +0 -1616
- package/dist/chunk-24B36RDB.cjs +0 -81
- package/dist/chunk-27N3QEX5.js +0 -40
- package/dist/chunk-2AVLCXLT.js +0 -0
- package/dist/chunk-2RLMTBVZ.js +0 -233
- package/dist/chunk-2WBD2G3E.cjs +0 -38
- package/dist/chunk-3COHMHPU.cjs +0 -1
- package/dist/chunk-4Q45WJYQ.js +0 -165
- package/dist/chunk-5C7PIENF.js +0 -92
- package/dist/chunk-5J2SS4QU.js +0 -83
- package/dist/chunk-65SWKEHV.cjs +0 -1
- package/dist/chunk-6Y623TCS.cjs +0 -40
- package/dist/chunk-7PV6L7I7.cjs +0 -1
- package/dist/chunk-7QBTVNMR.cjs +0 -30
- package/dist/chunk-BDATZ3UB.cjs +0 -233
- package/dist/chunk-BZRTSWH4.cjs +0 -395
- package/dist/chunk-D3FRXXDE.js +0 -947
- package/dist/chunk-DTGT4OI3.cjs +0 -14
- package/dist/chunk-EC2KPWRG.cjs +0 -24
- package/dist/chunk-EENQN6N2.js +0 -40
- package/dist/chunk-ENI4UUSK.cjs +0 -35
- package/dist/chunk-FJNXECWU.js +0 -395
- package/dist/chunk-FMDVBSP6.cjs +0 -83
- package/dist/chunk-G2MK47WL.js +0 -14
- package/dist/chunk-HFS7WJVW.js +0 -81
- package/dist/chunk-HVVJHTFS.js +0 -36
- package/dist/chunk-IWD6YQKX.cjs +0 -1
- package/dist/chunk-IWQRXQ4N.cjs +0 -84
- package/dist/chunk-JK4TT5IV.js +0 -35
- package/dist/chunk-JWLDCEBZ.cjs +0 -70
- package/dist/chunk-JZAYHDV3.js +0 -8
- package/dist/chunk-KSMN3HSC.js +0 -38
- package/dist/chunk-L6UNTUC4.js +0 -0
- package/dist/chunk-LOY6ICHZ.cjs +0 -36
- package/dist/chunk-MBG2FTBL.cjs +0 -47
- package/dist/chunk-MQG74XF7.js +0 -102
- package/dist/chunk-MSAQEGBK.cjs +0 -92
- package/dist/chunk-NJFLUTGH.cjs +0 -25
- package/dist/chunk-PCYB64MB.cjs +0 -40
- package/dist/chunk-RALMUN5C.js +0 -30
- package/dist/chunk-RRKB32OH.js +0 -0
- package/dist/chunk-RUKM6FCF.js +0 -25
- package/dist/chunk-SIW7AXUG.js +0 -56
- package/dist/chunk-SLICWTO2.cjs +0 -165
- package/dist/chunk-SO3FWVXC.js +0 -84
- package/dist/chunk-SXPH7ILL.js +0 -70
- package/dist/chunk-T7YISGRS.cjs +0 -102
- package/dist/chunk-TZZRLM5J.cjs +0 -947
- package/dist/chunk-UJ77IBHD.cjs +0 -233
- package/dist/chunk-UKGRDKIH.js +0 -0
- package/dist/chunk-V3GMJ4TX.js +0 -233
- package/dist/chunk-WQJYIPSL.cjs +0 -8
- package/dist/chunk-YBVOKYAM.cjs +0 -56
- package/dist/chunk-YX4736HU.js +0 -47
- package/dist/chunk-ZFNAUMQS.js +0 -24
- package/dist/config-file/get-config-file.js +0 -28
- package/dist/config-file/index.d.ts +0 -3
- package/dist/config-file/index.js +0 -29
- package/dist/create-storm-config.js +0 -35
- package/dist/env/get-env.js +0 -11
- package/dist/env/index.d.ts +0 -4
- package/dist/env/index.js +0 -18
- package/dist/env/set-env.js +0 -11
- package/dist/get-config.js +0 -34
- package/dist/index.d.ts +0 -28
- package/dist/index.js +0 -201
- package/dist/logger/chalk.d.ts +0 -34
- package/dist/logger/chalk.js +0 -6
- package/dist/logger/console-icons.d.ts +0 -8
- package/dist/logger/console-icons.js +0 -8
- package/dist/logger/console.js +0 -37
- package/dist/logger/create-logger.js +0 -14
- package/dist/logger/format-timestamp.js +0 -6
- package/dist/logger/get-log-level.js +0 -11
- package/dist/logger/index.d.ts +0 -10
- package/dist/logger/index.js +0 -61
- package/dist/logger/is-unicode-supported.d.ts +0 -3
- package/dist/logger/is-unicode-supported.js +0 -6
- package/dist/types.d.ts +0 -53
- package/dist/types.js +0 -8
- package/dist/utilities/apply-workspace-tokens.js +0 -13
- package/dist/utilities/colors.js +0 -12
- package/dist/utilities/correct-paths.js +0 -32
- package/dist/utilities/file-path-utils.js +0 -11
- package/dist/utilities/find-up.js +0 -6
- package/dist/utilities/find-workspace-root.js +0 -10
- package/dist/utilities/get-default-config.js +0 -11
- package/dist/utilities/index.d.ts +0 -14
- package/dist/utilities/index.js +0 -109
- package/dist/utilities/process-handler.d.ts +0 -7
- package/dist/utilities/process-handler.js +0 -18
- package/dist/utilities/run.js +0 -10
- package/dist/utilities/toml.d.ts +0 -189
- package/dist/utilities/toml.js +0 -24
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
//#region src/utilities/find-up.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Gets the nearest "node_modules" folder by walking up from start path.
|
|
3
4
|
*/
|
|
4
5
|
declare function findFolderUp(startPath: string, endFileNames?: string[], endDirectoryNames?: string[]): string | undefined;
|
|
5
|
-
|
|
6
|
-
export { findFolderUp };
|
|
6
|
+
//#endregion
|
|
7
|
+
export { findFolderUp };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
//#region src/utilities/find-up.d.ts
|
|
1
4
|
/**
|
|
2
5
|
* Gets the nearest "node_modules" folder by walking up from start path.
|
|
3
6
|
*/
|
|
4
7
|
declare function findFolderUp(startPath: string, endFileNames?: string[], endDirectoryNames?: string[]): string | undefined;
|
|
5
|
-
|
|
6
|
-
export { findFolderUp };
|
|
8
|
+
//#endregion
|
|
9
|
+
export { findFolderUp };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
//#region src/utilities/find-up.ts
|
|
7
|
+
const MAX_PATH_SEARCH_DEPTH = 30;
|
|
8
|
+
let depth = 0;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the nearest "node_modules" folder by walking up from start path.
|
|
11
|
+
*/
|
|
12
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
13
|
+
const _startPath = startPath ?? process.cwd();
|
|
14
|
+
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) return _startPath;
|
|
15
|
+
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) return _startPath;
|
|
16
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) return findFolderUp(join(_startPath, ".."), endFileNames, endDirectoryNames);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { findFolderUp };
|
|
@@ -1,10 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utilities_correct_paths = require("./correct-paths.cjs");
|
|
3
|
+
const require_utilities_find_up = require("./find-up.cjs");
|
|
4
|
+
//#region src/utilities/find-workspace-root.ts
|
|
5
|
+
const rootFiles = [
|
|
6
|
+
"storm-workspace.json",
|
|
7
|
+
"storm-workspace.yaml",
|
|
8
|
+
"storm-workspace.yml",
|
|
9
|
+
"storm-workspace.js",
|
|
10
|
+
"storm-workspace.ts",
|
|
11
|
+
".storm-workspace.json",
|
|
12
|
+
".storm-workspace.yaml",
|
|
13
|
+
".storm-workspace.yml",
|
|
14
|
+
".storm-workspace.js",
|
|
15
|
+
".storm-workspace.ts",
|
|
16
|
+
"lerna.json",
|
|
17
|
+
"nx.json",
|
|
18
|
+
"turbo.json",
|
|
19
|
+
"npm-workspace.json",
|
|
20
|
+
"yarn-workspace.json",
|
|
21
|
+
"pnpm-workspace.json",
|
|
22
|
+
"npm-workspace.yaml",
|
|
23
|
+
"yarn-workspace.yaml",
|
|
24
|
+
"pnpm-workspace.yaml",
|
|
25
|
+
"npm-workspace.yml",
|
|
26
|
+
"yarn-workspace.yml",
|
|
27
|
+
"pnpm-workspace.yml",
|
|
28
|
+
"npm-lock.json",
|
|
29
|
+
"yarn-lock.json",
|
|
30
|
+
"pnpm-lock.json",
|
|
31
|
+
"npm-lock.yaml",
|
|
32
|
+
"yarn-lock.yaml",
|
|
33
|
+
"pnpm-lock.yaml",
|
|
34
|
+
"npm-lock.yml",
|
|
35
|
+
"yarn-lock.yml",
|
|
36
|
+
"pnpm-lock.yml",
|
|
37
|
+
"bun.lockb",
|
|
38
|
+
"bun.lock",
|
|
39
|
+
"bunfig.toml"
|
|
40
|
+
];
|
|
41
|
+
const rootDirectories = [
|
|
42
|
+
".storm-workspace",
|
|
43
|
+
".nx",
|
|
44
|
+
".git",
|
|
45
|
+
".github",
|
|
46
|
+
".vscode",
|
|
47
|
+
".verdaccio"
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* Find the monorepo root directory, searching upwards from `path`.
|
|
51
|
+
*
|
|
52
|
+
* @param pathInsideMonorepo - The path inside the monorepo to start searching from
|
|
53
|
+
* @returns The monorepo root directory
|
|
54
|
+
*/
|
|
55
|
+
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
56
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) return require_utilities_correct_paths.correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
57
|
+
return require_utilities_correct_paths.correctPaths(require_utilities_find_up.findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Find the monorepo root directory, searching upwards from `path`.
|
|
61
|
+
*
|
|
62
|
+
* @param pathInsideMonorepo - The path inside the monorepo to start searching from
|
|
63
|
+
* @returns The monorepo root directory
|
|
64
|
+
*/
|
|
65
|
+
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
66
|
+
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
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
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
exports.findWorkspaceRoot = findWorkspaceRoot;
|
|
72
|
+
exports.findWorkspaceRootSafe = findWorkspaceRootSafe;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/utilities/find-workspace-root.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Find the monorepo root directory, searching upwards from `path`.
|
|
3
4
|
*
|
|
@@ -12,5 +13,5 @@ declare function findWorkspaceRootSafe(pathInsideMonorepo?: string): string | un
|
|
|
12
13
|
* @returns The monorepo root directory
|
|
13
14
|
*/
|
|
14
15
|
declare function findWorkspaceRoot(pathInsideMonorepo?: string): string;
|
|
15
|
-
|
|
16
|
-
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
|
16
|
+
//#endregion
|
|
17
|
+
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
//#region src/utilities/find-workspace-root.d.ts
|
|
1
4
|
/**
|
|
2
5
|
* Find the monorepo root directory, searching upwards from `path`.
|
|
3
6
|
*
|
|
@@ -12,5 +15,5 @@ declare function findWorkspaceRootSafe(pathInsideMonorepo?: string): string | un
|
|
|
12
15
|
* @returns The monorepo root directory
|
|
13
16
|
*/
|
|
14
17
|
declare function findWorkspaceRoot(pathInsideMonorepo?: string): string;
|
|
15
|
-
|
|
16
|
-
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
|
18
|
+
//#endregion
|
|
19
|
+
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { correctPaths } from "./correct-paths.mjs";
|
|
5
|
+
import { findFolderUp } from "./find-up.mjs";
|
|
6
|
+
//#region src/utilities/find-workspace-root.ts
|
|
7
|
+
const rootFiles = [
|
|
8
|
+
"storm-workspace.json",
|
|
9
|
+
"storm-workspace.yaml",
|
|
10
|
+
"storm-workspace.yml",
|
|
11
|
+
"storm-workspace.js",
|
|
12
|
+
"storm-workspace.ts",
|
|
13
|
+
".storm-workspace.json",
|
|
14
|
+
".storm-workspace.yaml",
|
|
15
|
+
".storm-workspace.yml",
|
|
16
|
+
".storm-workspace.js",
|
|
17
|
+
".storm-workspace.ts",
|
|
18
|
+
"lerna.json",
|
|
19
|
+
"nx.json",
|
|
20
|
+
"turbo.json",
|
|
21
|
+
"npm-workspace.json",
|
|
22
|
+
"yarn-workspace.json",
|
|
23
|
+
"pnpm-workspace.json",
|
|
24
|
+
"npm-workspace.yaml",
|
|
25
|
+
"yarn-workspace.yaml",
|
|
26
|
+
"pnpm-workspace.yaml",
|
|
27
|
+
"npm-workspace.yml",
|
|
28
|
+
"yarn-workspace.yml",
|
|
29
|
+
"pnpm-workspace.yml",
|
|
30
|
+
"npm-lock.json",
|
|
31
|
+
"yarn-lock.json",
|
|
32
|
+
"pnpm-lock.json",
|
|
33
|
+
"npm-lock.yaml",
|
|
34
|
+
"yarn-lock.yaml",
|
|
35
|
+
"pnpm-lock.yaml",
|
|
36
|
+
"npm-lock.yml",
|
|
37
|
+
"yarn-lock.yml",
|
|
38
|
+
"pnpm-lock.yml",
|
|
39
|
+
"bun.lockb",
|
|
40
|
+
"bun.lock",
|
|
41
|
+
"bunfig.toml"
|
|
42
|
+
];
|
|
43
|
+
const rootDirectories = [
|
|
44
|
+
".storm-workspace",
|
|
45
|
+
".nx",
|
|
46
|
+
".git",
|
|
47
|
+
".github",
|
|
48
|
+
".vscode",
|
|
49
|
+
".verdaccio"
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* Find the monorepo root directory, searching upwards from `path`.
|
|
53
|
+
*
|
|
54
|
+
* @param pathInsideMonorepo - The path inside the monorepo to start searching from
|
|
55
|
+
* @returns The monorepo root directory
|
|
56
|
+
*/
|
|
57
|
+
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
58
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
59
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Find the monorepo root directory, searching upwards from `path`.
|
|
63
|
+
*
|
|
64
|
+
* @param pathInsideMonorepo - The path inside the monorepo to start searching from
|
|
65
|
+
* @returns The monorepo root directory
|
|
66
|
+
*/
|
|
67
|
+
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
68
|
+
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
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
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { findWorkspaceRoot, findWorkspaceRootSafe };
|
|
@@ -1,11 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require(
|
|
6
|
-
require(
|
|
7
|
-
require(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utilities_correct_paths = require("./correct-paths.cjs");
|
|
3
|
+
const require_utilities_find_workspace_root = require("./find-workspace-root.cjs");
|
|
4
|
+
let node_fs = require("node:fs");
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
let _storm_software_config = require("@storm-software/config");
|
|
7
|
+
let node_fs_promises = require("node:fs/promises");
|
|
8
|
+
//#region src/utilities/get-default-config.ts
|
|
9
|
+
/**
|
|
10
|
+
* Get the default Storm config values used during various dev-ops processes
|
|
11
|
+
*
|
|
12
|
+
* @returns The default Storm config values
|
|
13
|
+
*/
|
|
14
|
+
async function getPackageJsonConfig(root) {
|
|
15
|
+
let license = _storm_software_config.STORM_DEFAULT_LICENSE;
|
|
16
|
+
let homepage = void 0;
|
|
17
|
+
let support = void 0;
|
|
18
|
+
let name = void 0;
|
|
19
|
+
let namespace = void 0;
|
|
20
|
+
let repository = void 0;
|
|
21
|
+
const workspaceRoot = require_utilities_find_workspace_root.findWorkspaceRoot(root);
|
|
22
|
+
if ((0, node_fs.existsSync)((0, node_path.join)(workspaceRoot, "package.json"))) {
|
|
23
|
+
const file = await (0, node_fs_promises.readFile)(require_utilities_correct_paths.joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
24
|
+
if (file) {
|
|
25
|
+
const packageJson = JSON.parse(file);
|
|
26
|
+
if (packageJson.name) name = packageJson.name;
|
|
27
|
+
if (packageJson.namespace) namespace = packageJson.namespace;
|
|
28
|
+
if (packageJson.repository) {
|
|
29
|
+
if (typeof packageJson.repository === "string") repository = packageJson.repository;
|
|
30
|
+
else if (packageJson.repository.url) repository = packageJson.repository.url;
|
|
31
|
+
}
|
|
32
|
+
if (packageJson.license) license = packageJson.license;
|
|
33
|
+
if (packageJson.homepage) homepage = packageJson.homepage;
|
|
34
|
+
if (packageJson.bugs) {
|
|
35
|
+
if (typeof packageJson.bugs === "string") support = packageJson.bugs;
|
|
36
|
+
else if (packageJson.bugs.url) support = packageJson.bugs.url;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
workspaceRoot,
|
|
42
|
+
name,
|
|
43
|
+
namespace,
|
|
44
|
+
repository,
|
|
45
|
+
license,
|
|
46
|
+
homepage,
|
|
47
|
+
support
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Apply default config values to the given config object
|
|
52
|
+
*
|
|
53
|
+
* @param config - The config object to apply defaults to
|
|
54
|
+
* @returns The config object with defaults applied
|
|
55
|
+
*/
|
|
56
|
+
function applyDefaultConfig(config) {
|
|
57
|
+
if (!config.support && config.contact) config.support = config.contact;
|
|
58
|
+
if (!config.contact && config.support) config.contact = config.support;
|
|
59
|
+
if (config.homepage) {
|
|
60
|
+
if (!config.docs) config.docs = `${config.homepage}/docs`;
|
|
61
|
+
if (!config.license) config.license = `${config.homepage}/license`;
|
|
62
|
+
if (!config.support) config.support = `${config.homepage}/support`;
|
|
63
|
+
if (!config.contact) config.contact = `${config.homepage}/contact`;
|
|
64
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
65
|
+
config.error ??= { codesFile: _storm_software_config.STORM_DEFAULT_ERROR_CODES_FILE };
|
|
66
|
+
if (config.homepage) config.error.url ??= `${config.homepage}/errors`;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return config;
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
exports.applyDefaultConfig = applyDefaultConfig;
|
|
73
|
+
exports.getPackageJsonConfig = getPackageJsonConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StormWorkspaceConfig } from
|
|
2
|
-
|
|
1
|
+
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
2
|
+
//#region src/utilities/get-default-config.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Get the default Storm config values used during various dev-ops processes
|
|
5
5
|
*
|
|
@@ -13,5 +13,5 @@ declare function getPackageJsonConfig(root?: string): Promise<Pick<StormWorkspac
|
|
|
13
13
|
* @returns The config object with defaults applied
|
|
14
14
|
*/
|
|
15
15
|
declare function applyDefaultConfig(config: Partial<StormWorkspaceConfig>): Partial<StormWorkspaceConfig>;
|
|
16
|
-
|
|
17
|
-
export { applyDefaultConfig, getPackageJsonConfig };
|
|
16
|
+
//#endregion
|
|
17
|
+
export { applyDefaultConfig, getPackageJsonConfig };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
4
|
+
//#region src/utilities/get-default-config.d.ts
|
|
3
5
|
/**
|
|
4
6
|
* Get the default Storm config values used during various dev-ops processes
|
|
5
7
|
*
|
|
@@ -13,5 +15,5 @@ declare function getPackageJsonConfig(root?: string): Promise<Pick<StormWorkspac
|
|
|
13
15
|
* @returns The config object with defaults applied
|
|
14
16
|
*/
|
|
15
17
|
declare function applyDefaultConfig(config: Partial<StormWorkspaceConfig>): Partial<StormWorkspaceConfig>;
|
|
16
|
-
|
|
17
|
-
export { applyDefaultConfig, getPackageJsonConfig };
|
|
18
|
+
//#endregion
|
|
19
|
+
export { applyDefaultConfig, getPackageJsonConfig };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { joinPaths } from "./correct-paths.mjs";
|
|
5
|
+
import { findWorkspaceRoot } from "./find-workspace-root.mjs";
|
|
6
|
+
import { existsSync } from "node:fs";
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
import { STORM_DEFAULT_ERROR_CODES_FILE, STORM_DEFAULT_LICENSE } from "@storm-software/config";
|
|
9
|
+
import { readFile } from "node:fs/promises";
|
|
10
|
+
//#region src/utilities/get-default-config.ts
|
|
11
|
+
/**
|
|
12
|
+
* Get the default Storm config values used during various dev-ops processes
|
|
13
|
+
*
|
|
14
|
+
* @returns The default Storm config values
|
|
15
|
+
*/
|
|
16
|
+
async function getPackageJsonConfig(root) {
|
|
17
|
+
let license = STORM_DEFAULT_LICENSE;
|
|
18
|
+
let homepage = void 0;
|
|
19
|
+
let support = void 0;
|
|
20
|
+
let name = void 0;
|
|
21
|
+
let namespace = void 0;
|
|
22
|
+
let repository = void 0;
|
|
23
|
+
const workspaceRoot = findWorkspaceRoot(root);
|
|
24
|
+
if (existsSync(join(workspaceRoot, "package.json"))) {
|
|
25
|
+
const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
26
|
+
if (file) {
|
|
27
|
+
const packageJson = JSON.parse(file);
|
|
28
|
+
if (packageJson.name) name = packageJson.name;
|
|
29
|
+
if (packageJson.namespace) namespace = packageJson.namespace;
|
|
30
|
+
if (packageJson.repository) {
|
|
31
|
+
if (typeof packageJson.repository === "string") repository = packageJson.repository;
|
|
32
|
+
else if (packageJson.repository.url) repository = packageJson.repository.url;
|
|
33
|
+
}
|
|
34
|
+
if (packageJson.license) license = packageJson.license;
|
|
35
|
+
if (packageJson.homepage) homepage = packageJson.homepage;
|
|
36
|
+
if (packageJson.bugs) {
|
|
37
|
+
if (typeof packageJson.bugs === "string") support = packageJson.bugs;
|
|
38
|
+
else if (packageJson.bugs.url) support = packageJson.bugs.url;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
workspaceRoot,
|
|
44
|
+
name,
|
|
45
|
+
namespace,
|
|
46
|
+
repository,
|
|
47
|
+
license,
|
|
48
|
+
homepage,
|
|
49
|
+
support
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Apply default config values to the given config object
|
|
54
|
+
*
|
|
55
|
+
* @param config - The config object to apply defaults to
|
|
56
|
+
* @returns The config object with defaults applied
|
|
57
|
+
*/
|
|
58
|
+
function applyDefaultConfig(config) {
|
|
59
|
+
if (!config.support && config.contact) config.support = config.contact;
|
|
60
|
+
if (!config.contact && config.support) config.contact = config.support;
|
|
61
|
+
if (config.homepage) {
|
|
62
|
+
if (!config.docs) config.docs = `${config.homepage}/docs`;
|
|
63
|
+
if (!config.license) config.license = `${config.homepage}/license`;
|
|
64
|
+
if (!config.support) config.support = `${config.homepage}/support`;
|
|
65
|
+
if (!config.contact) config.contact = `${config.homepage}/contact`;
|
|
66
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
67
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
68
|
+
if (config.homepage) config.error.url ??= `${config.homepage}/errors`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return config;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { applyDefaultConfig, getPackageJsonConfig };
|
package/dist/utilities/index.cjs
CHANGED
|
@@ -1,109 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
require('../chunk-WQJYIPSL.cjs');
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var _chunkBDATZ3UBcjs = require('../chunk-BDATZ3UB.cjs');
|
|
67
|
-
require('../chunk-JWLDCEBZ.cjs');
|
|
68
|
-
require('../chunk-7QBTVNMR.cjs');
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
exports.DEFAULT_COLOR_CONFIG = _chunkFMDVBSP6cjs.DEFAULT_COLOR_CONFIG; exports.LARGE_BUFFER = _chunk6Y623TCScjs.LARGE_BUFFER; exports.applyDefaultConfig = _chunkT7YISGRScjs.applyDefaultConfig; exports.applyWorkspaceBaseTokens = _chunk24B36RDBcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunk24B36RDBcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunk24B36RDBcjs.applyWorkspaceTokens; exports.basename = _chunkBDATZ3UBcjs.basename; exports.correctPaths = _chunkBDATZ3UBcjs.correctPaths; exports.dirname = _chunkBDATZ3UBcjs.dirname; exports.exitWithError = _chunkYBVOKYAMcjs.exitWithError; exports.exitWithSuccess = _chunkYBVOKYAMcjs.exitWithSuccess; exports.extname = _chunkBDATZ3UBcjs.extname; exports.findFileName = _chunk2WBD2G3Ecjs.findFileName; exports.findFilePath = _chunk2WBD2G3Ecjs.findFilePath; exports.findWorkspaceRoot = _chunkIWQRXQ4Ncjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunkIWQRXQ4Ncjs.findWorkspaceRootSafe; exports.format = _chunkBDATZ3UBcjs.format; exports.getColor = _chunkFMDVBSP6cjs.getColor; exports.getColors = _chunkFMDVBSP6cjs.getColors; exports.getGradient = _chunkFMDVBSP6cjs.getGradient; exports.getPackageJsonConfig = _chunkT7YISGRScjs.getPackageJsonConfig; exports.handleProcess = _chunkYBVOKYAMcjs.handleProcess; exports.isAbsolute = _chunkBDATZ3UBcjs.isAbsolute; exports.joinPaths = _chunkBDATZ3UBcjs.joinPaths; exports.modifyCargoNestedTable = _chunkMBG2FTBLcjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunkMBG2FTBLcjs.modifyCargoTable; exports.normalizeString = _chunkBDATZ3UBcjs.normalizeString; exports.normalizeWindowsPath = _chunkBDATZ3UBcjs.normalizeWindowsPath; exports.parse = _chunkBDATZ3UBcjs.parse; exports.parseCargoToml = _chunkMBG2FTBLcjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunkMBG2FTBLcjs.parseCargoTomlWithTree; exports.relative = _chunkBDATZ3UBcjs.relative; exports.removeExtension = _chunk2WBD2G3Ecjs.removeExtension; exports.resolve = _chunkBDATZ3UBcjs.resolve; exports.run = _chunk6Y623TCScjs.run; exports.runAsync = _chunk6Y623TCScjs.runAsync; exports.sep = _chunkBDATZ3UBcjs.sep; exports.stringifyCargoToml = _chunkMBG2FTBLcjs.stringifyCargoToml; exports.toNamespacedPath = _chunkBDATZ3UBcjs.toNamespacedPath;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utilities_colors = require("./colors.cjs");
|
|
3
|
+
const require_utilities_correct_paths = require("./correct-paths.cjs");
|
|
4
|
+
const require_utilities_find_workspace_root = require("./find-workspace-root.cjs");
|
|
5
|
+
const require_utilities_apply_workspace_tokens = require("./apply-workspace-tokens.cjs");
|
|
6
|
+
const require_utilities_file_path_utils = require("./file-path-utils.cjs");
|
|
7
|
+
const require_utilities_get_default_config = require("./get-default-config.cjs");
|
|
8
|
+
const require_utilities_process_handler = require("./process-handler.cjs");
|
|
9
|
+
const require_utilities_run = require("./run.cjs");
|
|
10
|
+
const require_utilities_toml = require("./toml.cjs");
|
|
11
|
+
exports.DEFAULT_COLOR_CONFIG = require_utilities_colors.DEFAULT_COLOR_CONFIG;
|
|
12
|
+
exports.LARGE_BUFFER = require_utilities_run.LARGE_BUFFER;
|
|
13
|
+
exports.applyDefaultConfig = require_utilities_get_default_config.applyDefaultConfig;
|
|
14
|
+
exports.applyWorkspaceBaseTokens = require_utilities_apply_workspace_tokens.applyWorkspaceBaseTokens;
|
|
15
|
+
exports.applyWorkspaceProjectTokens = require_utilities_apply_workspace_tokens.applyWorkspaceProjectTokens;
|
|
16
|
+
exports.applyWorkspaceTokens = require_utilities_apply_workspace_tokens.applyWorkspaceTokens;
|
|
17
|
+
exports.basename = require_utilities_correct_paths.basename;
|
|
18
|
+
exports.correctPaths = require_utilities_correct_paths.correctPaths;
|
|
19
|
+
exports.dirname = require_utilities_correct_paths.dirname;
|
|
20
|
+
exports.exitWithError = require_utilities_process_handler.exitWithError;
|
|
21
|
+
exports.exitWithSuccess = require_utilities_process_handler.exitWithSuccess;
|
|
22
|
+
exports.extname = require_utilities_correct_paths.extname;
|
|
23
|
+
exports.findFileName = require_utilities_file_path_utils.findFileName;
|
|
24
|
+
exports.findFilePath = require_utilities_file_path_utils.findFilePath;
|
|
25
|
+
exports.findWorkspaceRoot = require_utilities_find_workspace_root.findWorkspaceRoot;
|
|
26
|
+
exports.findWorkspaceRootSafe = require_utilities_find_workspace_root.findWorkspaceRootSafe;
|
|
27
|
+
exports.format = require_utilities_correct_paths.format;
|
|
28
|
+
exports.getColor = require_utilities_colors.getColor;
|
|
29
|
+
exports.getColors = require_utilities_colors.getColors;
|
|
30
|
+
exports.getGradient = require_utilities_colors.getGradient;
|
|
31
|
+
exports.getPackageJsonConfig = require_utilities_get_default_config.getPackageJsonConfig;
|
|
32
|
+
exports.handleProcess = require_utilities_process_handler.handleProcess;
|
|
33
|
+
exports.isAbsolute = require_utilities_correct_paths.isAbsolute;
|
|
34
|
+
exports.joinPaths = require_utilities_correct_paths.joinPaths;
|
|
35
|
+
exports.modifyCargoNestedTable = require_utilities_toml.modifyCargoNestedTable;
|
|
36
|
+
exports.modifyCargoTable = require_utilities_toml.modifyCargoTable;
|
|
37
|
+
exports.normalizeString = require_utilities_correct_paths.normalizeString;
|
|
38
|
+
exports.normalizeWindowsPath = require_utilities_correct_paths.normalizeWindowsPath;
|
|
39
|
+
exports.parse = require_utilities_correct_paths.parse;
|
|
40
|
+
exports.parseCargoToml = require_utilities_toml.parseCargoToml;
|
|
41
|
+
exports.parseCargoTomlWithTree = require_utilities_toml.parseCargoTomlWithTree;
|
|
42
|
+
exports.relative = require_utilities_correct_paths.relative;
|
|
43
|
+
exports.removeExtension = require_utilities_file_path_utils.removeExtension;
|
|
44
|
+
exports.resolve = require_utilities_correct_paths.resolve;
|
|
45
|
+
exports.run = require_utilities_run.run;
|
|
46
|
+
exports.runAsync = require_utilities_run.runAsync;
|
|
47
|
+
exports.sep = require_utilities_correct_paths.sep;
|
|
48
|
+
exports.stringifyCargoToml = require_utilities_toml.stringifyCargoToml;
|
|
49
|
+
exports.toNamespacedPath = require_utilities_correct_paths.toNamespacedPath;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import '@storm-software/config';
|
|
12
|
-
import '@storm-software/config/types';
|
|
13
|
-
import 'node:path';
|
|
14
|
-
import 'node:child_process';
|
|
1
|
+
import { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from "./apply-workspace-tokens.cjs";
|
|
2
|
+
import { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient } from "./colors.cjs";
|
|
3
|
+
import { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from "./correct-paths.cjs";
|
|
4
|
+
import { FindFileNameOptions, findFileName, findFilePath, removeExtension } from "./file-path-utils.cjs";
|
|
5
|
+
import { findWorkspaceRoot, findWorkspaceRootSafe } from "./find-workspace-root.cjs";
|
|
6
|
+
import { applyDefaultConfig, getPackageJsonConfig } from "./get-default-config.cjs";
|
|
7
|
+
import { exitWithError, exitWithSuccess, handleProcess } from "./process-handler.cjs";
|
|
8
|
+
import { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from "./run.cjs";
|
|
9
|
+
import { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from "./toml.cjs";
|
|
10
|
+
export { CargoMetadata, CargoToml, DEFAULT_COLOR_CONFIG, Dep, DepKind, Dependency, Docs, Docs2, Features, FindFileNameOptions, IOType, LARGE_BUFFER, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, StdioOptions, Target, Tree, applyDefaultConfig, applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens, basename, correctPaths, dirname, exitWithError, exitWithSuccess, extname, findFileName, findFilePath, findWorkspaceRoot, findWorkspaceRootSafe, format, getColor, getColors, getGradient, getPackageJsonConfig, handleProcess, isAbsolute, joinPaths, modifyCargoNestedTable, modifyCargoTable, normalizeString, normalizeWindowsPath, parse, parseCargoToml, parseCargoTomlWithTree, relative, removeExtension, resolve, run, runAsync, sep, stringifyCargoToml, toNamespacedPath };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
import { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from "./apply-workspace-tokens.mjs";
|
|
4
|
+
import { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient } from "./colors.mjs";
|
|
5
|
+
import { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from "./correct-paths.mjs";
|
|
6
|
+
import { FindFileNameOptions, findFileName, findFilePath, removeExtension } from "./file-path-utils.mjs";
|
|
7
|
+
import { findWorkspaceRoot, findWorkspaceRootSafe } from "./find-workspace-root.mjs";
|
|
8
|
+
import { applyDefaultConfig, getPackageJsonConfig } from "./get-default-config.mjs";
|
|
9
|
+
import { exitWithError, exitWithSuccess, handleProcess } from "./process-handler.mjs";
|
|
10
|
+
import { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from "./run.mjs";
|
|
11
|
+
import { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from "./toml.mjs";
|
|
12
|
+
export { CargoMetadata, CargoToml, DEFAULT_COLOR_CONFIG, Dep, DepKind, Dependency, Docs, Docs2, Features, FindFileNameOptions, IOType, LARGE_BUFFER, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, StdioOptions, Target, Tree, applyDefaultConfig, applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens, basename, correctPaths, dirname, exitWithError, exitWithSuccess, extname, findFileName, findFilePath, findWorkspaceRoot, findWorkspaceRootSafe, format, getColor, getColors, getGradient, getPackageJsonConfig, handleProcess, isAbsolute, joinPaths, modifyCargoNestedTable, modifyCargoTable, normalizeString, normalizeWindowsPath, parse, parseCargoToml, parseCargoTomlWithTree, relative, removeExtension, resolve, run, runAsync, sep, stringifyCargoToml, toNamespacedPath };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient } from "./colors.mjs";
|
|
5
|
+
import { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from "./correct-paths.mjs";
|
|
6
|
+
import { findWorkspaceRoot, findWorkspaceRootSafe } from "./find-workspace-root.mjs";
|
|
7
|
+
import { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from "./apply-workspace-tokens.mjs";
|
|
8
|
+
import { findFileName, findFilePath, removeExtension } from "./file-path-utils.mjs";
|
|
9
|
+
import { applyDefaultConfig, getPackageJsonConfig } from "./get-default-config.mjs";
|
|
10
|
+
import { exitWithError, exitWithSuccess, handleProcess } from "./process-handler.mjs";
|
|
11
|
+
import { LARGE_BUFFER, run, runAsync } from "./run.mjs";
|
|
12
|
+
import { modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from "./toml.mjs";
|
|
13
|
+
export { DEFAULT_COLOR_CONFIG, LARGE_BUFFER, applyDefaultConfig, applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens, basename, correctPaths, dirname, exitWithError, exitWithSuccess, extname, findFileName, findFilePath, findWorkspaceRoot, findWorkspaceRootSafe, format, getColor, getColors, getGradient, getPackageJsonConfig, handleProcess, isAbsolute, joinPaths, modifyCargoNestedTable, modifyCargoTable, normalizeString, normalizeWindowsPath, parse, parseCargoToml, parseCargoTomlWithTree, relative, removeExtension, resolve, run, runAsync, sep, stringifyCargoToml, toNamespacedPath };
|