@storm-software/config-tools 1.163.26 → 1.164.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 -2
- package/dist/chunk-42TCRG4H.js +38 -0
- package/dist/{chunk-D3TDPGPG.cjs → chunk-T4ZMKMEG.cjs} +23 -7
- package/dist/config-file/get-config-file.cjs +1 -1
- package/dist/config-file/get-config-file.js +1 -1
- package/dist/config-file/index.cjs +1 -1
- package/dist/config-file/index.js +1 -1
- package/dist/create-storm-config.cjs +1 -1
- package/dist/create-storm-config.js +1 -1
- package/dist/get-config.cjs +1 -1
- package/dist/get-config.js +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/utilities/file-path-utils.cjs +5 -2
- package/dist/utilities/file-path-utils.d.cts +42 -2
- package/dist/utilities/file-path-utils.d.ts +42 -2
- package/dist/utilities/file-path-utils.js +4 -1
- package/dist/utilities/index.cjs +4 -2
- package/dist/utilities/index.d.cts +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +3 -1
- package/package.json +45 -15
- package/dist/chunk-4OOVR2GZ.js +0 -22
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -40,7 +40,6 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
40
40
|
|
|
41
41
|
<!-- START doctoc -->
|
|
42
42
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
43
|
-
|
|
44
43
|
## Table of Contents
|
|
45
44
|
|
|
46
45
|
- [Storm Configuration Tools](#storm-configuration-tools)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeWindowsPath
|
|
3
|
+
} from "./chunk-FRR2ZRWD.js";
|
|
4
|
+
|
|
5
|
+
// src/utilities/file-path-utils.ts
|
|
6
|
+
var removeExtension = (filePath) => {
|
|
7
|
+
const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
8
|
+
if (result.startsWith("./")) {
|
|
9
|
+
return result.substring(2);
|
|
10
|
+
}
|
|
11
|
+
if (result.startsWith(".") || result.startsWith("/")) {
|
|
12
|
+
return result.substring(1);
|
|
13
|
+
}
|
|
14
|
+
return result;
|
|
15
|
+
};
|
|
16
|
+
function findFileName(filePath, { requireExtension, withExtension } = {}) {
|
|
17
|
+
const result = normalizeWindowsPath(filePath)?.split(filePath?.includes("\\") ? "\\" : "/")?.pop() ?? "";
|
|
18
|
+
if (requireExtension === true && !result.includes(".")) {
|
|
19
|
+
return "";
|
|
20
|
+
}
|
|
21
|
+
if (withExtension === false && result.includes(".")) {
|
|
22
|
+
return result.split(".").slice(-1).join(".") || "";
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
function findFilePath(filePath) {
|
|
27
|
+
const normalizedPath = normalizeWindowsPath(filePath);
|
|
28
|
+
return normalizedPath.replace(
|
|
29
|
+
findFileName(normalizedPath, { requireExtension: true }),
|
|
30
|
+
""
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
removeExtension,
|
|
36
|
+
findFileName,
|
|
37
|
+
findFilePath
|
|
38
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
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
|
-
|
|
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 _chunk4JREL2GQcjs = require('./chunk-4JREL2GQ.cjs');
|
|
4
|
+
|
|
5
|
+
// src/utilities/file-path-utils.ts
|
|
3
6
|
var removeExtension = (filePath) => {
|
|
4
7
|
const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
5
8
|
if (result.startsWith("./")) {
|
|
@@ -10,13 +13,26 @@ var removeExtension = (filePath) => {
|
|
|
10
13
|
}
|
|
11
14
|
return result;
|
|
12
15
|
};
|
|
13
|
-
function findFileName(filePath) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
function findFileName(filePath, { requireExtension, withExtension } = {}) {
|
|
17
|
+
const result = _nullishCoalesce(_optionalChain([_chunk4JREL2GQcjs.normalizeWindowsPath.call(void 0, filePath), 'optionalAccess', _ => _.split, 'call', _2 => _2(_optionalChain([filePath, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4("\\")]) ? "\\" : "/"), 'optionalAccess', _5 => _5.pop, 'call', _6 => _6()]), () => ( ""));
|
|
18
|
+
if (requireExtension === true && !result.includes(".")) {
|
|
19
|
+
return "";
|
|
20
|
+
}
|
|
21
|
+
if (withExtension === false && result.includes(".")) {
|
|
22
|
+
return result.split(".").slice(-1).join(".") || "";
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
function findFilePath(filePath) {
|
|
27
|
+
const normalizedPath = _chunk4JREL2GQcjs.normalizeWindowsPath.call(void 0, filePath);
|
|
28
|
+
return normalizedPath.replace(
|
|
29
|
+
findFileName(normalizedPath, { requireExtension: true }),
|
|
30
|
+
""
|
|
31
|
+
);
|
|
17
32
|
}
|
|
18
33
|
|
|
19
34
|
|
|
20
35
|
|
|
21
36
|
|
|
22
|
-
|
|
37
|
+
|
|
38
|
+
exports.removeExtension = removeExtension; exports.findFileName = findFileName; exports.findFilePath = findFilePath;
|
|
@@ -6,7 +6,7 @@ require('../chunk-UNXQ2AR4.cjs');
|
|
|
6
6
|
require('../chunk-FCWF3I34.cjs');
|
|
7
7
|
require('../chunk-ZGLOKOL3.cjs');
|
|
8
8
|
require('../chunk-AQ2NOVJF.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-T4ZMKMEG.cjs');
|
|
10
10
|
require('../chunk-7SIKKF62.cjs');
|
|
11
11
|
require('../chunk-GIXUQACB.cjs');
|
|
12
12
|
require('../chunk-AEZINHEA.cjs');
|
|
@@ -6,7 +6,7 @@ import "../chunk-I6MMCLIA.js";
|
|
|
6
6
|
import "../chunk-ELNIDXR5.js";
|
|
7
7
|
import "../chunk-64DXC5WM.js";
|
|
8
8
|
import "../chunk-IETV2DPL.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-42TCRG4H.js";
|
|
10
10
|
import "../chunk-QJUAU656.js";
|
|
11
11
|
import "../chunk-JX5NLB4S.js";
|
|
12
12
|
import "../chunk-VLWSWYG7.js";
|
|
@@ -7,7 +7,7 @@ require('../chunk-UNXQ2AR4.cjs');
|
|
|
7
7
|
require('../chunk-FCWF3I34.cjs');
|
|
8
8
|
require('../chunk-ZGLOKOL3.cjs');
|
|
9
9
|
require('../chunk-AQ2NOVJF.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-T4ZMKMEG.cjs');
|
|
11
11
|
require('../chunk-7SIKKF62.cjs');
|
|
12
12
|
require('../chunk-GIXUQACB.cjs');
|
|
13
13
|
require('../chunk-AEZINHEA.cjs');
|
|
@@ -7,7 +7,7 @@ import "../chunk-I6MMCLIA.js";
|
|
|
7
7
|
import "../chunk-ELNIDXR5.js";
|
|
8
8
|
import "../chunk-64DXC5WM.js";
|
|
9
9
|
import "../chunk-IETV2DPL.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-42TCRG4H.js";
|
|
11
11
|
import "../chunk-QJUAU656.js";
|
|
12
12
|
import "../chunk-JX5NLB4S.js";
|
|
13
13
|
import "../chunk-VLWSWYG7.js";
|
|
@@ -9,7 +9,7 @@ require('./chunk-UNXQ2AR4.cjs');
|
|
|
9
9
|
require('./chunk-FCWF3I34.cjs');
|
|
10
10
|
require('./chunk-ZGLOKOL3.cjs');
|
|
11
11
|
require('./chunk-AQ2NOVJF.cjs');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-T4ZMKMEG.cjs');
|
|
13
13
|
require('./chunk-7SIKKF62.cjs');
|
|
14
14
|
require('./chunk-GIXUQACB.cjs');
|
|
15
15
|
require('./chunk-AEZINHEA.cjs');
|
|
@@ -9,7 +9,7 @@ import "./chunk-I6MMCLIA.js";
|
|
|
9
9
|
import "./chunk-ELNIDXR5.js";
|
|
10
10
|
import "./chunk-64DXC5WM.js";
|
|
11
11
|
import "./chunk-IETV2DPL.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-42TCRG4H.js";
|
|
13
13
|
import "./chunk-QJUAU656.js";
|
|
14
14
|
import "./chunk-JX5NLB4S.js";
|
|
15
15
|
import "./chunk-VLWSWYG7.js";
|
package/dist/get-config.cjs
CHANGED
|
@@ -9,7 +9,7 @@ require('./chunk-UNXQ2AR4.cjs');
|
|
|
9
9
|
require('./chunk-FCWF3I34.cjs');
|
|
10
10
|
require('./chunk-ZGLOKOL3.cjs');
|
|
11
11
|
require('./chunk-AQ2NOVJF.cjs');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-T4ZMKMEG.cjs');
|
|
13
13
|
require('./chunk-7SIKKF62.cjs');
|
|
14
14
|
require('./chunk-GIXUQACB.cjs');
|
|
15
15
|
require('./chunk-AEZINHEA.cjs');
|
package/dist/get-config.js
CHANGED
|
@@ -9,7 +9,7 @@ import "./chunk-I6MMCLIA.js";
|
|
|
9
9
|
import "./chunk-ELNIDXR5.js";
|
|
10
10
|
import "./chunk-64DXC5WM.js";
|
|
11
11
|
import "./chunk-IETV2DPL.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-42TCRG4H.js";
|
|
13
13
|
import "./chunk-QJUAU656.js";
|
|
14
14
|
import "./chunk-JX5NLB4S.js";
|
|
15
15
|
import "./chunk-VLWSWYG7.js";
|
package/dist/index.cjs
CHANGED
|
@@ -37,7 +37,8 @@ var _chunkAQ2NOVJFcjs = require('./chunk-AQ2NOVJF.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
|
|
41
|
+
var _chunkT4ZMKMEGcjs = require('./chunk-T4ZMKMEG.cjs');
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
@@ -170,4 +171,5 @@ var _chunkC5OTFOQBcjs = require('./chunk-C5OTFOQB.cjs');
|
|
|
170
171
|
|
|
171
172
|
|
|
172
173
|
|
|
173
|
-
|
|
174
|
+
|
|
175
|
+
exports.CONSOLE_ICONS = _chunkPSHJQ2NPcjs.CONSOLE_ICONS; exports.DEFAULT_COLOR_CONFIG = _chunkGIXUQACBcjs.DEFAULT_COLOR_CONFIG; exports.LARGE_BUFFER = _chunkZGLOKOL3cjs.LARGE_BUFFER; exports.LogLevel = _chunkC5OTFOQBcjs.LogLevel; exports.LogLevelLabel = _chunkC5OTFOQBcjs.LogLevelLabel; exports.applyWorkspaceBaseTokens = _chunkAQ2NOVJFcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunkAQ2NOVJFcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunkAQ2NOVJFcjs.applyWorkspaceTokens; exports.basename = _chunk4JREL2GQcjs.basename; exports.correctPaths = _chunk4JREL2GQcjs.correctPaths; exports.createConfigExtension = _chunkBJ2W75ZOcjs.createConfigExtension; exports.createLogger = _chunkJ2LCTMCIcjs.createLogger; exports.createStormWorkspaceConfig = _chunkBJ2W75ZOcjs.createStormWorkspaceConfig; exports.dirname = _chunk4JREL2GQcjs.dirname; exports.exitWithError = _chunkFCWF3I34cjs.exitWithError; exports.exitWithSuccess = _chunkFCWF3I34cjs.exitWithSuccess; exports.extname = _chunk4JREL2GQcjs.extname; exports.findFileName = _chunkT4ZMKMEGcjs.findFileName; exports.findFilePath = _chunkT4ZMKMEGcjs.findFilePath; exports.findWorkspaceRoot = _chunkAEZINHEAcjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunkAEZINHEAcjs.findWorkspaceRootSafe; exports.format = _chunk4JREL2GQcjs.format; exports.formatLogMessage = _chunk7SIKKF62cjs.formatLogMessage; exports.formatTimestamp = _chunkQNDF3RQLcjs.formatTimestamp; exports.getChalk = _chunkNS5PJ2RMcjs.getChalk; exports.getConfig = _chunkH2GU4JMJcjs.getConfig; exports.getConfigEnv = _chunk56NGBR4Scjs.getConfigEnv; exports.getConfigFile = _chunk7HCUD67Dcjs.getConfigFile; exports.getConfigFileByName = _chunk7HCUD67Dcjs.getConfigFileByName; exports.getDefaultConfig = _chunkGIXUQACBcjs.getDefaultConfig; exports.getExtensionEnv = _chunk56NGBR4Scjs.getExtensionEnv; exports.getLogFn = _chunk7SIKKF62cjs.getLogFn; exports.getLogLevel = _chunk7BZWQZUVcjs.getLogLevel; exports.getLogLevelLabel = _chunk7BZWQZUVcjs.getLogLevelLabel; exports.getStopwatch = _chunk7SIKKF62cjs.getStopwatch; exports.getWorkspaceConfig = _chunkH2GU4JMJcjs.getWorkspaceConfig; exports.handleProcess = _chunkFCWF3I34cjs.handleProcess; exports.isAbsolute = _chunk4JREL2GQcjs.isAbsolute; exports.isUnicodeSupported = _chunkPLLCZVZOcjs.isUnicodeSupported; exports.isVerbose = _chunk7BZWQZUVcjs.isVerbose; exports.joinPaths = _chunk4JREL2GQcjs.joinPaths; exports.loadStormWorkspaceConfig = _chunkBJ2W75ZOcjs.loadStormWorkspaceConfig; exports.normalizeString = _chunk4JREL2GQcjs.normalizeString; exports.normalizeWindowsPath = _chunk4JREL2GQcjs.normalizeWindowsPath; exports.parse = _chunk4JREL2GQcjs.parse; exports.relative = _chunk4JREL2GQcjs.relative; exports.removeExtension = _chunkT4ZMKMEGcjs.removeExtension; exports.resolve = _chunk4JREL2GQcjs.resolve; exports.run = _chunkZGLOKOL3cjs.run; exports.runAsync = _chunkZGLOKOL3cjs.runAsync; exports.sep = _chunk4JREL2GQcjs.sep; exports.setConfigEnv = _chunkH425P7G5cjs.setConfigEnv; exports.setExtensionEnv = _chunkH425P7G5cjs.setExtensionEnv; exports.toNamespacedPath = _chunk4JREL2GQcjs.toNamespacedPath; exports.tryGetWorkspaceConfig = _chunkH2GU4JMJcjs.tryGetWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = _chunkBJ2W75ZOcjs.tryLoadStormWorkspaceConfig; exports.writeDebug = _chunk7SIKKF62cjs.writeDebug; exports.writeError = _chunk7SIKKF62cjs.writeError; exports.writeFatal = _chunk7SIKKF62cjs.writeFatal; exports.writeInfo = _chunk7SIKKF62cjs.writeInfo; exports.writeSuccess = _chunk7SIKKF62cjs.writeSuccess; exports.writeSystem = _chunk7SIKKF62cjs.writeSystem; exports.writeTrace = _chunk7SIKKF62cjs.writeTrace; exports.writeWarning = _chunk7SIKKF62cjs.writeWarning;
|
package/dist/index.d.cts
CHANGED
|
@@ -13,7 +13,7 @@ export { isUnicodeSupported } from './logger/is-unicode-supported.cjs';
|
|
|
13
13
|
export { BaseTokenizerOptions, DeepPartial, LogLevel, LogLevelLabel, Logger, ProjectTokenizerOptions } from './types.cjs';
|
|
14
14
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './utilities/apply-workspace-tokens.cjs';
|
|
15
15
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './utilities/correct-paths.cjs';
|
|
16
|
-
export { findFileName, removeExtension } from './utilities/file-path-utils.cjs';
|
|
16
|
+
export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './utilities/file-path-utils.cjs';
|
|
17
17
|
export { findWorkspaceRoot, findWorkspaceRootSafe } from './utilities/find-workspace-root.cjs';
|
|
18
18
|
export { DEFAULT_COLOR_CONFIG, getDefaultConfig } from './utilities/get-default-config.cjs';
|
|
19
19
|
export { exitWithError, exitWithSuccess, handleProcess } from './utilities/process-handler.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { isUnicodeSupported } from './logger/is-unicode-supported.js';
|
|
|
13
13
|
export { BaseTokenizerOptions, DeepPartial, LogLevel, LogLevelLabel, Logger, ProjectTokenizerOptions } from './types.js';
|
|
14
14
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './utilities/apply-workspace-tokens.js';
|
|
15
15
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './utilities/correct-paths.js';
|
|
16
|
-
export { findFileName, removeExtension } from './utilities/file-path-utils.js';
|
|
16
|
+
export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './utilities/file-path-utils.js';
|
|
17
17
|
export { findWorkspaceRoot, findWorkspaceRootSafe } from './utilities/find-workspace-root.js';
|
|
18
18
|
export { DEFAULT_COLOR_CONFIG, getDefaultConfig } from './utilities/get-default-config.js';
|
|
19
19
|
export { exitWithError, exitWithSuccess, handleProcess } from './utilities/process-handler.js';
|
package/dist/index.js
CHANGED
|
@@ -36,8 +36,9 @@ import {
|
|
|
36
36
|
} from "./chunk-IETV2DPL.js";
|
|
37
37
|
import {
|
|
38
38
|
findFileName,
|
|
39
|
+
findFilePath,
|
|
39
40
|
removeExtension
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-42TCRG4H.js";
|
|
41
42
|
import {
|
|
42
43
|
formatLogMessage,
|
|
43
44
|
getLogFn,
|
|
@@ -125,6 +126,7 @@ export {
|
|
|
125
126
|
exitWithSuccess,
|
|
126
127
|
extname,
|
|
127
128
|
findFileName,
|
|
129
|
+
findFilePath,
|
|
128
130
|
findWorkspaceRoot,
|
|
129
131
|
findWorkspaceRootSafe,
|
|
130
132
|
format,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var _chunkD3TDPGPGcjs = require('../chunk-D3TDPGPG.cjs');
|
|
5
4
|
|
|
5
|
+
var _chunkT4ZMKMEGcjs = require('../chunk-T4ZMKMEG.cjs');
|
|
6
|
+
require('../chunk-4JREL2GQ.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.findFileName = _chunkT4ZMKMEGcjs.findFileName; exports.findFilePath = _chunkT4ZMKMEGcjs.findFilePath; exports.removeExtension = _chunkT4ZMKMEGcjs.removeExtension;
|
|
@@ -1,4 +1,44 @@
|
|
|
1
1
|
declare const removeExtension: (filePath?: string) => string;
|
|
2
|
-
|
|
2
|
+
interface FindFileNameOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Require the file extension to be present in the file name.
|
|
5
|
+
*
|
|
6
|
+
* @defaultValue false
|
|
7
|
+
*/
|
|
8
|
+
requireExtension?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Return the file extension as part of the full file name result.
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue true
|
|
13
|
+
*/
|
|
14
|
+
withExtension?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Find the file name from a file path.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const fileName = findFileName("C:\\Users\\user\\Documents\\file.txt");
|
|
22
|
+
* // fileName = "file.txt"
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param filePath - The file path to process
|
|
26
|
+
* @param options - The options to use when processing the file name
|
|
27
|
+
* @returns The file name
|
|
28
|
+
*/
|
|
29
|
+
declare function findFileName(filePath: string, { requireExtension, withExtension }?: FindFileNameOptions): string;
|
|
30
|
+
/**
|
|
31
|
+
* Find the full file path's directories from a file path.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const folderPath = findFilePath("C:\\Users\\user\\Documents\\file.txt");
|
|
36
|
+
* // folderPath = "C:\\Users\\user\\Documents"
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @param filePath - The file path to process
|
|
40
|
+
* @returns The full file path's directories
|
|
41
|
+
*/
|
|
42
|
+
declare function findFilePath(filePath: string): string;
|
|
3
43
|
|
|
4
|
-
export { findFileName, removeExtension };
|
|
44
|
+
export { type FindFileNameOptions, findFileName, findFilePath, removeExtension };
|
|
@@ -1,4 +1,44 @@
|
|
|
1
1
|
declare const removeExtension: (filePath?: string) => string;
|
|
2
|
-
|
|
2
|
+
interface FindFileNameOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Require the file extension to be present in the file name.
|
|
5
|
+
*
|
|
6
|
+
* @defaultValue false
|
|
7
|
+
*/
|
|
8
|
+
requireExtension?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Return the file extension as part of the full file name result.
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue true
|
|
13
|
+
*/
|
|
14
|
+
withExtension?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Find the file name from a file path.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const fileName = findFileName("C:\\Users\\user\\Documents\\file.txt");
|
|
22
|
+
* // fileName = "file.txt"
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param filePath - The file path to process
|
|
26
|
+
* @param options - The options to use when processing the file name
|
|
27
|
+
* @returns The file name
|
|
28
|
+
*/
|
|
29
|
+
declare function findFileName(filePath: string, { requireExtension, withExtension }?: FindFileNameOptions): string;
|
|
30
|
+
/**
|
|
31
|
+
* Find the full file path's directories from a file path.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const folderPath = findFilePath("C:\\Users\\user\\Documents\\file.txt");
|
|
36
|
+
* // folderPath = "C:\\Users\\user\\Documents"
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @param filePath - The file path to process
|
|
40
|
+
* @returns The full file path's directories
|
|
41
|
+
*/
|
|
42
|
+
declare function findFilePath(filePath: string): string;
|
|
3
43
|
|
|
4
|
-
export { findFileName, removeExtension };
|
|
44
|
+
export { type FindFileNameOptions, findFileName, findFilePath, removeExtension };
|
package/dist/utilities/index.cjs
CHANGED
|
@@ -17,7 +17,8 @@ var _chunkAQ2NOVJFcjs = require('../chunk-AQ2NOVJF.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
var _chunkT4ZMKMEGcjs = require('../chunk-T4ZMKMEG.cjs');
|
|
21
22
|
require('../chunk-7SIKKF62.cjs');
|
|
22
23
|
|
|
23
24
|
|
|
@@ -80,4 +81,5 @@ require('../chunk-C5OTFOQB.cjs');
|
|
|
80
81
|
|
|
81
82
|
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
|
|
85
|
+
exports.DEFAULT_COLOR_CONFIG = _chunkGIXUQACBcjs.DEFAULT_COLOR_CONFIG; exports.LARGE_BUFFER = _chunkZGLOKOL3cjs.LARGE_BUFFER; exports.applyWorkspaceBaseTokens = _chunkAQ2NOVJFcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunkAQ2NOVJFcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunkAQ2NOVJFcjs.applyWorkspaceTokens; exports.basename = _chunk4JREL2GQcjs.basename; exports.correctPaths = _chunk4JREL2GQcjs.correctPaths; exports.dirname = _chunk4JREL2GQcjs.dirname; exports.exitWithError = _chunkFCWF3I34cjs.exitWithError; exports.exitWithSuccess = _chunkFCWF3I34cjs.exitWithSuccess; exports.extname = _chunk4JREL2GQcjs.extname; exports.findFileName = _chunkT4ZMKMEGcjs.findFileName; exports.findFilePath = _chunkT4ZMKMEGcjs.findFilePath; exports.findWorkspaceRoot = _chunkAEZINHEAcjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunkAEZINHEAcjs.findWorkspaceRootSafe; exports.format = _chunk4JREL2GQcjs.format; exports.getDefaultConfig = _chunkGIXUQACBcjs.getDefaultConfig; exports.handleProcess = _chunkFCWF3I34cjs.handleProcess; exports.isAbsolute = _chunk4JREL2GQcjs.isAbsolute; exports.joinPaths = _chunk4JREL2GQcjs.joinPaths; exports.normalizeString = _chunk4JREL2GQcjs.normalizeString; exports.normalizeWindowsPath = _chunk4JREL2GQcjs.normalizeWindowsPath; exports.parse = _chunk4JREL2GQcjs.parse; exports.relative = _chunk4JREL2GQcjs.relative; exports.removeExtension = _chunkT4ZMKMEGcjs.removeExtension; exports.resolve = _chunk4JREL2GQcjs.resolve; exports.run = _chunkZGLOKOL3cjs.run; exports.runAsync = _chunkZGLOKOL3cjs.runAsync; exports.sep = _chunk4JREL2GQcjs.sep; exports.toNamespacedPath = _chunk4JREL2GQcjs.toNamespacedPath;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './apply-workspace-tokens.cjs';
|
|
2
2
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './correct-paths.cjs';
|
|
3
|
-
export { findFileName, removeExtension } from './file-path-utils.cjs';
|
|
3
|
+
export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './file-path-utils.cjs';
|
|
4
4
|
export { findWorkspaceRoot, findWorkspaceRootSafe } from './find-workspace-root.cjs';
|
|
5
5
|
export { DEFAULT_COLOR_CONFIG, getDefaultConfig } from './get-default-config.cjs';
|
|
6
6
|
export { exitWithError, exitWithSuccess, handleProcess } from './process-handler.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './apply-workspace-tokens.js';
|
|
2
2
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './correct-paths.js';
|
|
3
|
-
export { findFileName, removeExtension } from './file-path-utils.js';
|
|
3
|
+
export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './file-path-utils.js';
|
|
4
4
|
export { findWorkspaceRoot, findWorkspaceRootSafe } from './find-workspace-root.js';
|
|
5
5
|
export { DEFAULT_COLOR_CONFIG, getDefaultConfig } from './get-default-config.js';
|
|
6
6
|
export { exitWithError, exitWithSuccess, handleProcess } from './process-handler.js';
|
package/dist/utilities/index.js
CHANGED
|
@@ -16,8 +16,9 @@ import {
|
|
|
16
16
|
} from "../chunk-IETV2DPL.js";
|
|
17
17
|
import {
|
|
18
18
|
findFileName,
|
|
19
|
+
findFilePath,
|
|
19
20
|
removeExtension
|
|
20
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-42TCRG4H.js";
|
|
21
22
|
import "../chunk-QJUAU656.js";
|
|
22
23
|
import {
|
|
23
24
|
DEFAULT_COLOR_CONFIG,
|
|
@@ -63,6 +64,7 @@ export {
|
|
|
63
64
|
exitWithSuccess,
|
|
64
65
|
extname,
|
|
65
66
|
findFileName,
|
|
67
|
+
findFilePath,
|
|
66
68
|
findWorkspaceRoot,
|
|
67
69
|
findWorkspaceRootSafe,
|
|
68
70
|
format,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.164.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
|
|
6
6
|
"repository": {
|
|
@@ -41,28 +41,46 @@
|
|
|
41
41
|
"exports": {
|
|
42
42
|
"./package.json": "./package.json",
|
|
43
43
|
"./types": {
|
|
44
|
-
"import": {
|
|
44
|
+
"import": {
|
|
45
|
+
"types": "./dist/types.d.ts",
|
|
46
|
+
"default": "./dist/types.js"
|
|
47
|
+
},
|
|
45
48
|
"require": {
|
|
46
49
|
"types": "./dist/types.d.cts",
|
|
47
50
|
"default": "./dist/types.cjs"
|
|
48
51
|
},
|
|
49
|
-
"default": {
|
|
52
|
+
"default": {
|
|
53
|
+
"types": "./dist/types.d.ts",
|
|
54
|
+
"default": "./dist/types.js"
|
|
55
|
+
}
|
|
50
56
|
},
|
|
51
57
|
"./index": {
|
|
52
|
-
"import": {
|
|
58
|
+
"import": {
|
|
59
|
+
"types": "./dist/index.d.ts",
|
|
60
|
+
"default": "./dist/index.js"
|
|
61
|
+
},
|
|
53
62
|
"require": {
|
|
54
63
|
"types": "./dist/index.d.cts",
|
|
55
64
|
"default": "./dist/index.cjs"
|
|
56
65
|
},
|
|
57
|
-
"default": {
|
|
66
|
+
"default": {
|
|
67
|
+
"types": "./dist/index.d.ts",
|
|
68
|
+
"default": "./dist/index.js"
|
|
69
|
+
}
|
|
58
70
|
},
|
|
59
71
|
".": {
|
|
60
|
-
"import": {
|
|
72
|
+
"import": {
|
|
73
|
+
"types": "./dist/index.d.ts",
|
|
74
|
+
"default": "./dist/index.js"
|
|
75
|
+
},
|
|
61
76
|
"require": {
|
|
62
77
|
"types": "./dist/index.d.cts",
|
|
63
78
|
"default": "./dist/index.cjs"
|
|
64
79
|
},
|
|
65
|
-
"default": {
|
|
80
|
+
"default": {
|
|
81
|
+
"types": "./dist/index.d.ts",
|
|
82
|
+
"default": "./dist/index.js"
|
|
83
|
+
}
|
|
66
84
|
},
|
|
67
85
|
"./create-storm-config": {
|
|
68
86
|
"import": {
|
|
@@ -135,12 +153,18 @@
|
|
|
135
153
|
}
|
|
136
154
|
},
|
|
137
155
|
"./env/*": {
|
|
138
|
-
"import": {
|
|
156
|
+
"import": {
|
|
157
|
+
"types": "./dist/env/*.d.ts",
|
|
158
|
+
"default": "./dist/env/*.js"
|
|
159
|
+
},
|
|
139
160
|
"require": {
|
|
140
161
|
"types": "./dist/env/*.d.cts",
|
|
141
162
|
"default": "./dist/env/*.cjs"
|
|
142
163
|
},
|
|
143
|
-
"default": {
|
|
164
|
+
"default": {
|
|
165
|
+
"types": "./dist/env/*.d.ts",
|
|
166
|
+
"default": "./dist/env/*.js"
|
|
167
|
+
}
|
|
144
168
|
},
|
|
145
169
|
"./logger": {
|
|
146
170
|
"import": {
|
|
@@ -200,7 +224,9 @@
|
|
|
200
224
|
}
|
|
201
225
|
},
|
|
202
226
|
"types": "./dist/index.d.ts",
|
|
203
|
-
"files": [
|
|
227
|
+
"files": [
|
|
228
|
+
"dist/**/*"
|
|
229
|
+
],
|
|
204
230
|
"keywords": [
|
|
205
231
|
"storm-stack",
|
|
206
232
|
"storm-software",
|
|
@@ -217,9 +243,8 @@
|
|
|
217
243
|
"sullivanpj",
|
|
218
244
|
"monorepo"
|
|
219
245
|
],
|
|
220
|
-
"peerDependencies": { "@storm-software/config": "workspace:*" },
|
|
221
|
-
"peerDependenciesMeta": { "@storm-software/config": { "optional": false } },
|
|
222
246
|
"dependencies": {
|
|
247
|
+
"@storm-software/config": "1.114.4",
|
|
223
248
|
"c12": "^2.0.0-beta.2",
|
|
224
249
|
"chalk": "^4.1.2",
|
|
225
250
|
"commander": "^12.1.0",
|
|
@@ -229,7 +254,12 @@
|
|
|
229
254
|
"sqlite": "^5.1.1",
|
|
230
255
|
"zod": "^3.24.0"
|
|
231
256
|
},
|
|
232
|
-
"devDependencies": {
|
|
233
|
-
|
|
257
|
+
"devDependencies": {
|
|
258
|
+
"@types/node": "^22.10.2",
|
|
259
|
+
"tsup": "8.4.0"
|
|
260
|
+
},
|
|
261
|
+
"publishConfig": {
|
|
262
|
+
"access": "public"
|
|
263
|
+
},
|
|
234
264
|
"sideEffects": false
|
|
235
|
-
}
|
|
265
|
+
}
|
package/dist/chunk-4OOVR2GZ.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// src/utilities/file-path-utils.ts
|
|
2
|
-
import { sep } from "node:path";
|
|
3
|
-
var removeExtension = (filePath) => {
|
|
4
|
-
const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
5
|
-
if (result.startsWith("./")) {
|
|
6
|
-
return result.substring(2);
|
|
7
|
-
}
|
|
8
|
-
if (result.startsWith(".") || result.startsWith("/")) {
|
|
9
|
-
return result.substring(1);
|
|
10
|
-
}
|
|
11
|
-
return result;
|
|
12
|
-
};
|
|
13
|
-
function findFileName(filePath) {
|
|
14
|
-
return filePath?.split(
|
|
15
|
-
filePath?.includes(sep) ? sep : filePath?.includes("/") ? "/" : "\\"
|
|
16
|
-
)?.pop() ?? "";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
removeExtension,
|
|
21
|
-
findFileName
|
|
22
|
-
};
|