@storm-software/config-tools 1.168.1 → 1.169.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunk-PORZT4W3.js +47 -0
- package/dist/chunk-XBNXWUW3.cjs +47 -0
- package/dist/config-file/get-config-file.cjs +4 -1
- package/dist/config-file/get-config-file.js +4 -1
- package/dist/config-file/index.cjs +4 -1
- package/dist/config-file/index.js +4 -1
- package/dist/create-storm-config.cjs +4 -1
- package/dist/create-storm-config.js +4 -1
- package/dist/get-config.cjs +4 -1
- package/dist/get-config.js +4 -1
- package/dist/index.cjs +19 -7
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -5
- package/dist/utilities/index.cjs +16 -2
- package/dist/utilities/index.d.cts +1 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.js +15 -1
- package/dist/utilities/toml.cjs +27 -0
- package/dist/utilities/toml.d.cts +189 -0
- package/dist/utilities/toml.d.ts +189 -0
- package/dist/utilities/toml.js +27 -0
- package/package.json +3 -2
- /package/dist/{chunk-I6MMCLIA.js → chunk-3EVEDCXL.js} +0 -0
- /package/dist/{chunk-UNXQ2AR4.cjs → chunk-KT6HSF26.cjs} +0 -0
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 -->
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
writeError
|
|
3
|
+
} from "./chunk-QJUAU656.js";
|
|
4
|
+
|
|
5
|
+
// src/utilities/toml.ts
|
|
6
|
+
import TOML from "@ltd/j-toml";
|
|
7
|
+
function parseCargoTomlWithTree(tree, projectRoot, projectName) {
|
|
8
|
+
const cargoTomlString = tree.read(`${projectRoot}/Cargo.toml`)?.toString();
|
|
9
|
+
if (!cargoTomlString) {
|
|
10
|
+
writeError(`Cannot find a Cargo.toml file in the ${projectName}`);
|
|
11
|
+
throw new Error();
|
|
12
|
+
}
|
|
13
|
+
return parseCargoToml(cargoTomlString);
|
|
14
|
+
}
|
|
15
|
+
function parseCargoToml(cargoString) {
|
|
16
|
+
if (!cargoString) {
|
|
17
|
+
throw new Error("Cargo.toml is empty");
|
|
18
|
+
}
|
|
19
|
+
return TOML.parse(cargoString, {
|
|
20
|
+
x: { comment: true }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function stringifyCargoToml(cargoToml) {
|
|
24
|
+
const tomlString = TOML.stringify(cargoToml, {
|
|
25
|
+
newlineAround: "section"
|
|
26
|
+
});
|
|
27
|
+
if (Array.isArray(tomlString)) {
|
|
28
|
+
return tomlString.join("\n");
|
|
29
|
+
}
|
|
30
|
+
return tomlString;
|
|
31
|
+
}
|
|
32
|
+
function modifyCargoTable(toml, section, key, value) {
|
|
33
|
+
toml[section] ??= TOML.Section({});
|
|
34
|
+
toml[section][key] = typeof value === "object" && !Array.isArray(value) ? TOML.inline(value) : typeof value === "function" ? value() : value;
|
|
35
|
+
}
|
|
36
|
+
function modifyCargoNestedTable(toml, section, key, value) {
|
|
37
|
+
toml[section] ??= {};
|
|
38
|
+
toml[section][key] = TOML.Section(value);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
parseCargoTomlWithTree,
|
|
43
|
+
parseCargoToml,
|
|
44
|
+
stringifyCargoToml,
|
|
45
|
+
modifyCargoTable,
|
|
46
|
+
modifyCargoNestedTable
|
|
47
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunk7SIKKF62cjs = require('./chunk-7SIKKF62.cjs');
|
|
4
|
+
|
|
5
|
+
// src/utilities/toml.ts
|
|
6
|
+
var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
|
|
7
|
+
function parseCargoTomlWithTree(tree, projectRoot, projectName) {
|
|
8
|
+
const cargoTomlString = _optionalChain([tree, 'access', _ => _.read, 'call', _2 => _2(`${projectRoot}/Cargo.toml`), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
9
|
+
if (!cargoTomlString) {
|
|
10
|
+
_chunk7SIKKF62cjs.writeError.call(void 0, `Cannot find a Cargo.toml file in the ${projectName}`);
|
|
11
|
+
throw new Error();
|
|
12
|
+
}
|
|
13
|
+
return parseCargoToml(cargoTomlString);
|
|
14
|
+
}
|
|
15
|
+
function parseCargoToml(cargoString) {
|
|
16
|
+
if (!cargoString) {
|
|
17
|
+
throw new Error("Cargo.toml is empty");
|
|
18
|
+
}
|
|
19
|
+
return _jtoml2.default.parse(cargoString, {
|
|
20
|
+
x: { comment: true }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function stringifyCargoToml(cargoToml) {
|
|
24
|
+
const tomlString = _jtoml2.default.stringify(cargoToml, {
|
|
25
|
+
newlineAround: "section"
|
|
26
|
+
});
|
|
27
|
+
if (Array.isArray(tomlString)) {
|
|
28
|
+
return tomlString.join("\n");
|
|
29
|
+
}
|
|
30
|
+
return tomlString;
|
|
31
|
+
}
|
|
32
|
+
function modifyCargoTable(toml, section, key, value) {
|
|
33
|
+
toml[section] ??= _jtoml2.default.Section({});
|
|
34
|
+
toml[section][key] = typeof value === "object" && !Array.isArray(value) ? _jtoml2.default.inline(value) : typeof value === "function" ? value() : value;
|
|
35
|
+
}
|
|
36
|
+
function modifyCargoNestedTable(toml, section, key, value) {
|
|
37
|
+
toml[section] ??= {};
|
|
38
|
+
toml[section][key] = _jtoml2.default.Section(value);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
exports.parseCargoTomlWithTree = parseCargoTomlWithTree; exports.parseCargoToml = parseCargoToml; exports.stringifyCargoToml = stringifyCargoToml; exports.modifyCargoTable = modifyCargoTable; exports.modifyCargoNestedTable = modifyCargoNestedTable;
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunk7HCUD67Dcjs = require('../chunk-7HCUD67D.cjs');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-KT6HSF26.cjs');
|
|
6
6
|
require('../chunk-FCWF3I34.cjs');
|
|
7
7
|
require('../chunk-ZGLOKOL3.cjs');
|
|
8
|
+
require('../chunk-XBNXWUW3.cjs');
|
|
8
9
|
require('../chunk-AQ2NOVJF.cjs');
|
|
9
10
|
require('../chunk-T4ZMKMEG.cjs');
|
|
11
|
+
require('../chunk-6D6DEG6Z.cjs');
|
|
12
|
+
require('../chunk-J2LCTMCI.cjs');
|
|
10
13
|
require('../chunk-7SIKKF62.cjs');
|
|
11
14
|
require('../chunk-GIXUQACB.cjs');
|
|
12
15
|
require('../chunk-AEZINHEA.cjs');
|
|
@@ -2,11 +2,14 @@ import {
|
|
|
2
2
|
getConfigFile,
|
|
3
3
|
getConfigFileByName
|
|
4
4
|
} from "../chunk-XO6ICAFH.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-3EVEDCXL.js";
|
|
6
6
|
import "../chunk-ELNIDXR5.js";
|
|
7
7
|
import "../chunk-64DXC5WM.js";
|
|
8
|
+
import "../chunk-PORZT4W3.js";
|
|
8
9
|
import "../chunk-IETV2DPL.js";
|
|
9
10
|
import "../chunk-42TCRG4H.js";
|
|
11
|
+
import "../chunk-XIA6NF6N.js";
|
|
12
|
+
import "../chunk-QDJMKPQQ.js";
|
|
10
13
|
import "../chunk-QJUAU656.js";
|
|
11
14
|
import "../chunk-JX5NLB4S.js";
|
|
12
15
|
import "../chunk-VLWSWYG7.js";
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
var _chunk7HCUD67Dcjs = require('../chunk-7HCUD67D.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-KT6HSF26.cjs');
|
|
7
7
|
require('../chunk-FCWF3I34.cjs');
|
|
8
8
|
require('../chunk-ZGLOKOL3.cjs');
|
|
9
|
+
require('../chunk-XBNXWUW3.cjs');
|
|
9
10
|
require('../chunk-AQ2NOVJF.cjs');
|
|
10
11
|
require('../chunk-T4ZMKMEG.cjs');
|
|
12
|
+
require('../chunk-6D6DEG6Z.cjs');
|
|
13
|
+
require('../chunk-J2LCTMCI.cjs');
|
|
11
14
|
require('../chunk-7SIKKF62.cjs');
|
|
12
15
|
require('../chunk-GIXUQACB.cjs');
|
|
13
16
|
require('../chunk-AEZINHEA.cjs');
|
|
@@ -3,11 +3,14 @@ import {
|
|
|
3
3
|
getConfigFile,
|
|
4
4
|
getConfigFileByName
|
|
5
5
|
} from "../chunk-XO6ICAFH.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-3EVEDCXL.js";
|
|
7
7
|
import "../chunk-ELNIDXR5.js";
|
|
8
8
|
import "../chunk-64DXC5WM.js";
|
|
9
|
+
import "../chunk-PORZT4W3.js";
|
|
9
10
|
import "../chunk-IETV2DPL.js";
|
|
10
11
|
import "../chunk-42TCRG4H.js";
|
|
12
|
+
import "../chunk-XIA6NF6N.js";
|
|
13
|
+
import "../chunk-QDJMKPQQ.js";
|
|
11
14
|
import "../chunk-QJUAU656.js";
|
|
12
15
|
import "../chunk-JX5NLB4S.js";
|
|
13
16
|
import "../chunk-VLWSWYG7.js";
|
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
var _chunkBJ2W75ZOcjs = require('./chunk-BJ2W75ZO.cjs');
|
|
7
7
|
require('./chunk-7HCUD67D.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-KT6HSF26.cjs');
|
|
9
9
|
require('./chunk-FCWF3I34.cjs');
|
|
10
10
|
require('./chunk-ZGLOKOL3.cjs');
|
|
11
|
+
require('./chunk-XBNXWUW3.cjs');
|
|
11
12
|
require('./chunk-AQ2NOVJF.cjs');
|
|
12
13
|
require('./chunk-T4ZMKMEG.cjs');
|
|
14
|
+
require('./chunk-6D6DEG6Z.cjs');
|
|
15
|
+
require('./chunk-J2LCTMCI.cjs');
|
|
13
16
|
require('./chunk-7SIKKF62.cjs');
|
|
14
17
|
require('./chunk-GIXUQACB.cjs');
|
|
15
18
|
require('./chunk-AEZINHEA.cjs');
|
|
@@ -5,11 +5,14 @@ import {
|
|
|
5
5
|
tryLoadStormWorkspaceConfig
|
|
6
6
|
} from "./chunk-WITKEKZ5.js";
|
|
7
7
|
import "./chunk-XO6ICAFH.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3EVEDCXL.js";
|
|
9
9
|
import "./chunk-ELNIDXR5.js";
|
|
10
10
|
import "./chunk-64DXC5WM.js";
|
|
11
|
+
import "./chunk-PORZT4W3.js";
|
|
11
12
|
import "./chunk-IETV2DPL.js";
|
|
12
13
|
import "./chunk-42TCRG4H.js";
|
|
14
|
+
import "./chunk-XIA6NF6N.js";
|
|
15
|
+
import "./chunk-QDJMKPQQ.js";
|
|
13
16
|
import "./chunk-QJUAU656.js";
|
|
14
17
|
import "./chunk-JX5NLB4S.js";
|
|
15
18
|
import "./chunk-VLWSWYG7.js";
|
package/dist/get-config.cjs
CHANGED
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
var _chunkH2GU4JMJcjs = require('./chunk-H2GU4JMJ.cjs');
|
|
6
6
|
require('./chunk-BJ2W75ZO.cjs');
|
|
7
7
|
require('./chunk-7HCUD67D.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-KT6HSF26.cjs');
|
|
9
9
|
require('./chunk-FCWF3I34.cjs');
|
|
10
10
|
require('./chunk-ZGLOKOL3.cjs');
|
|
11
|
+
require('./chunk-XBNXWUW3.cjs');
|
|
11
12
|
require('./chunk-AQ2NOVJF.cjs');
|
|
12
13
|
require('./chunk-T4ZMKMEG.cjs');
|
|
14
|
+
require('./chunk-6D6DEG6Z.cjs');
|
|
15
|
+
require('./chunk-J2LCTMCI.cjs');
|
|
13
16
|
require('./chunk-7SIKKF62.cjs');
|
|
14
17
|
require('./chunk-GIXUQACB.cjs');
|
|
15
18
|
require('./chunk-AEZINHEA.cjs');
|
package/dist/get-config.js
CHANGED
|
@@ -5,11 +5,14 @@ import {
|
|
|
5
5
|
} from "./chunk-BAWQ37NK.js";
|
|
6
6
|
import "./chunk-WITKEKZ5.js";
|
|
7
7
|
import "./chunk-XO6ICAFH.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3EVEDCXL.js";
|
|
9
9
|
import "./chunk-ELNIDXR5.js";
|
|
10
10
|
import "./chunk-64DXC5WM.js";
|
|
11
|
+
import "./chunk-PORZT4W3.js";
|
|
11
12
|
import "./chunk-IETV2DPL.js";
|
|
12
13
|
import "./chunk-42TCRG4H.js";
|
|
14
|
+
import "./chunk-XIA6NF6N.js";
|
|
15
|
+
import "./chunk-QDJMKPQQ.js";
|
|
13
16
|
import "./chunk-QJUAU656.js";
|
|
14
17
|
import "./chunk-JX5NLB4S.js";
|
|
15
18
|
import "./chunk-VLWSWYG7.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkJ2LCTMCIcjs = require('./chunk-J2LCTMCI.cjs');
|
|
5
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
6
2
|
|
|
7
3
|
|
|
8
4
|
|
|
@@ -18,7 +14,7 @@ require('./chunk-E4R6RI5D.cjs');
|
|
|
18
14
|
|
|
19
15
|
|
|
20
16
|
var _chunk7HCUD67Dcjs = require('./chunk-7HCUD67D.cjs');
|
|
21
|
-
require('./chunk-
|
|
17
|
+
require('./chunk-KT6HSF26.cjs');
|
|
22
18
|
|
|
23
19
|
|
|
24
20
|
|
|
@@ -33,12 +29,23 @@ var _chunkZGLOKOL3cjs = require('./chunk-ZGLOKOL3.cjs');
|
|
|
33
29
|
|
|
34
30
|
|
|
35
31
|
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
var _chunkXBNXWUW3cjs = require('./chunk-XBNXWUW3.cjs');
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
36
39
|
var _chunkAQ2NOVJFcjs = require('./chunk-AQ2NOVJF.cjs');
|
|
37
40
|
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
|
|
41
44
|
var _chunkT4ZMKMEGcjs = require('./chunk-T4ZMKMEG.cjs');
|
|
45
|
+
require('./chunk-6D6DEG6Z.cjs');
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
var _chunkJ2LCTMCIcjs = require('./chunk-J2LCTMCI.cjs');
|
|
42
49
|
|
|
43
50
|
|
|
44
51
|
|
|
@@ -172,4 +179,9 @@ var _chunkC5OTFOQBcjs = require('./chunk-C5OTFOQB.cjs');
|
|
|
172
179
|
|
|
173
180
|
|
|
174
181
|
|
|
175
|
-
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
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.modifyCargoNestedTable = _chunkXBNXWUW3cjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunkXBNXWUW3cjs.modifyCargoTable; exports.normalizeString = _chunk4JREL2GQcjs.normalizeString; exports.normalizeWindowsPath = _chunk4JREL2GQcjs.normalizeWindowsPath; exports.parse = _chunk4JREL2GQcjs.parse; exports.parseCargoToml = _chunkXBNXWUW3cjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunkXBNXWUW3cjs.parseCargoTomlWithTree; 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.stringifyCargoToml = _chunkXBNXWUW3cjs.stringifyCargoToml; 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
|
@@ -18,6 +18,7 @@ export { findWorkspaceRoot, findWorkspaceRootSafe } from './utilities/find-works
|
|
|
18
18
|
export { DEFAULT_COLOR_CONFIG, getDefaultConfig } from './utilities/get-default-config.cjs';
|
|
19
19
|
export { exitWithError, exitWithSuccess, handleProcess } from './utilities/process-handler.cjs';
|
|
20
20
|
export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from './utilities/run.cjs';
|
|
21
|
+
export { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from './utilities/toml.cjs';
|
|
21
22
|
import '@storm-software/config';
|
|
22
23
|
import 'c12';
|
|
23
24
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { findWorkspaceRoot, findWorkspaceRootSafe } from './utilities/find-works
|
|
|
18
18
|
export { DEFAULT_COLOR_CONFIG, getDefaultConfig } from './utilities/get-default-config.js';
|
|
19
19
|
export { exitWithError, exitWithSuccess, handleProcess } from './utilities/process-handler.js';
|
|
20
20
|
export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from './utilities/run.js';
|
|
21
|
+
export { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from './utilities/toml.js';
|
|
21
22
|
import '@storm-software/config';
|
|
22
23
|
import 'c12';
|
|
23
24
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import "./chunk-XIA6NF6N.js";
|
|
2
|
-
import {
|
|
3
|
-
createLogger
|
|
4
|
-
} from "./chunk-QDJMKPQQ.js";
|
|
5
1
|
import {
|
|
6
2
|
getConfig,
|
|
7
3
|
getWorkspaceConfig,
|
|
@@ -18,7 +14,7 @@ import {
|
|
|
18
14
|
getConfigFile,
|
|
19
15
|
getConfigFileByName
|
|
20
16
|
} from "./chunk-XO6ICAFH.js";
|
|
21
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-3EVEDCXL.js";
|
|
22
18
|
import {
|
|
23
19
|
exitWithError,
|
|
24
20
|
exitWithSuccess,
|
|
@@ -29,6 +25,13 @@ import {
|
|
|
29
25
|
run,
|
|
30
26
|
runAsync
|
|
31
27
|
} from "./chunk-64DXC5WM.js";
|
|
28
|
+
import {
|
|
29
|
+
modifyCargoNestedTable,
|
|
30
|
+
modifyCargoTable,
|
|
31
|
+
parseCargoToml,
|
|
32
|
+
parseCargoTomlWithTree,
|
|
33
|
+
stringifyCargoToml
|
|
34
|
+
} from "./chunk-PORZT4W3.js";
|
|
32
35
|
import {
|
|
33
36
|
applyWorkspaceBaseTokens,
|
|
34
37
|
applyWorkspaceProjectTokens,
|
|
@@ -39,6 +42,10 @@ import {
|
|
|
39
42
|
findFilePath,
|
|
40
43
|
removeExtension
|
|
41
44
|
} from "./chunk-42TCRG4H.js";
|
|
45
|
+
import "./chunk-XIA6NF6N.js";
|
|
46
|
+
import {
|
|
47
|
+
createLogger
|
|
48
|
+
} from "./chunk-QDJMKPQQ.js";
|
|
42
49
|
import {
|
|
43
50
|
formatLogMessage,
|
|
44
51
|
getLogFn,
|
|
@@ -150,9 +157,13 @@ export {
|
|
|
150
157
|
isVerbose,
|
|
151
158
|
joinPaths,
|
|
152
159
|
loadStormWorkspaceConfig,
|
|
160
|
+
modifyCargoNestedTable,
|
|
161
|
+
modifyCargoTable,
|
|
153
162
|
normalizeString,
|
|
154
163
|
normalizeWindowsPath,
|
|
155
164
|
parse,
|
|
165
|
+
parseCargoToml,
|
|
166
|
+
parseCargoTomlWithTree,
|
|
156
167
|
relative,
|
|
157
168
|
removeExtension,
|
|
158
169
|
resolve,
|
|
@@ -161,6 +172,7 @@ export {
|
|
|
161
172
|
sep,
|
|
162
173
|
setConfigEnv,
|
|
163
174
|
setExtensionEnv,
|
|
175
|
+
stringifyCargoToml,
|
|
164
176
|
toNamespacedPath,
|
|
165
177
|
tryGetWorkspaceConfig,
|
|
166
178
|
tryLoadStormWorkspaceConfig,
|
package/dist/utilities/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-KT6HSF26.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -13,12 +13,21 @@ var _chunkZGLOKOL3cjs = require('../chunk-ZGLOKOL3.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunkXBNXWUW3cjs = require('../chunk-XBNXWUW3.cjs');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
16
23
|
var _chunkAQ2NOVJFcjs = require('../chunk-AQ2NOVJF.cjs');
|
|
17
24
|
|
|
18
25
|
|
|
19
26
|
|
|
20
27
|
|
|
21
28
|
var _chunkT4ZMKMEGcjs = require('../chunk-T4ZMKMEG.cjs');
|
|
29
|
+
require('../chunk-6D6DEG6Z.cjs');
|
|
30
|
+
require('../chunk-J2LCTMCI.cjs');
|
|
22
31
|
require('../chunk-7SIKKF62.cjs');
|
|
23
32
|
|
|
24
33
|
|
|
@@ -82,4 +91,9 @@ require('../chunk-C5OTFOQB.cjs');
|
|
|
82
91
|
|
|
83
92
|
|
|
84
93
|
|
|
85
|
-
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
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.modifyCargoNestedTable = _chunkXBNXWUW3cjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunkXBNXWUW3cjs.modifyCargoTable; exports.normalizeString = _chunk4JREL2GQcjs.normalizeString; exports.normalizeWindowsPath = _chunk4JREL2GQcjs.normalizeWindowsPath; exports.parse = _chunk4JREL2GQcjs.parse; exports.parseCargoToml = _chunkXBNXWUW3cjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunkXBNXWUW3cjs.parseCargoTomlWithTree; 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.stringifyCargoToml = _chunkXBNXWUW3cjs.stringifyCargoToml; exports.toNamespacedPath = _chunk4JREL2GQcjs.toNamespacedPath;
|
|
@@ -5,6 +5,7 @@ export { findWorkspaceRoot, findWorkspaceRootSafe } from './find-workspace-root.
|
|
|
5
5
|
export { DEFAULT_COLOR_CONFIG, getDefaultConfig } from './get-default-config.cjs';
|
|
6
6
|
export { exitWithError, exitWithSuccess, handleProcess } from './process-handler.cjs';
|
|
7
7
|
export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from './run.cjs';
|
|
8
|
+
export { 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';
|
|
8
9
|
import '../types.cjs';
|
|
9
10
|
import '@storm-software/config';
|
|
10
11
|
import 'node:path';
|
|
@@ -5,6 +5,7 @@ export { findWorkspaceRoot, findWorkspaceRootSafe } from './find-workspace-root.
|
|
|
5
5
|
export { DEFAULT_COLOR_CONFIG, getDefaultConfig } from './get-default-config.js';
|
|
6
6
|
export { exitWithError, exitWithSuccess, handleProcess } from './process-handler.js';
|
|
7
7
|
export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from './run.js';
|
|
8
|
+
export { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from './toml.js';
|
|
8
9
|
import '../types.js';
|
|
9
10
|
import '@storm-software/config';
|
|
10
11
|
import 'node:path';
|
package/dist/utilities/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-3EVEDCXL.js";
|
|
2
2
|
import {
|
|
3
3
|
exitWithError,
|
|
4
4
|
exitWithSuccess,
|
|
@@ -9,6 +9,13 @@ import {
|
|
|
9
9
|
run,
|
|
10
10
|
runAsync
|
|
11
11
|
} from "../chunk-64DXC5WM.js";
|
|
12
|
+
import {
|
|
13
|
+
modifyCargoNestedTable,
|
|
14
|
+
modifyCargoTable,
|
|
15
|
+
parseCargoToml,
|
|
16
|
+
parseCargoTomlWithTree,
|
|
17
|
+
stringifyCargoToml
|
|
18
|
+
} from "../chunk-PORZT4W3.js";
|
|
12
19
|
import {
|
|
13
20
|
applyWorkspaceBaseTokens,
|
|
14
21
|
applyWorkspaceProjectTokens,
|
|
@@ -19,6 +26,8 @@ import {
|
|
|
19
26
|
findFilePath,
|
|
20
27
|
removeExtension
|
|
21
28
|
} from "../chunk-42TCRG4H.js";
|
|
29
|
+
import "../chunk-XIA6NF6N.js";
|
|
30
|
+
import "../chunk-QDJMKPQQ.js";
|
|
22
31
|
import "../chunk-QJUAU656.js";
|
|
23
32
|
import {
|
|
24
33
|
DEFAULT_COLOR_CONFIG,
|
|
@@ -72,14 +81,19 @@ export {
|
|
|
72
81
|
handleProcess,
|
|
73
82
|
isAbsolute,
|
|
74
83
|
joinPaths,
|
|
84
|
+
modifyCargoNestedTable,
|
|
85
|
+
modifyCargoTable,
|
|
75
86
|
normalizeString,
|
|
76
87
|
normalizeWindowsPath,
|
|
77
88
|
parse,
|
|
89
|
+
parseCargoToml,
|
|
90
|
+
parseCargoTomlWithTree,
|
|
78
91
|
relative,
|
|
79
92
|
removeExtension,
|
|
80
93
|
resolve,
|
|
81
94
|
run,
|
|
82
95
|
runAsync,
|
|
83
96
|
sep,
|
|
97
|
+
stringifyCargoToml,
|
|
84
98
|
toNamespacedPath
|
|
85
99
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkXBNXWUW3cjs = require('../chunk-XBNXWUW3.cjs');
|
|
8
|
+
require('../chunk-6D6DEG6Z.cjs');
|
|
9
|
+
require('../chunk-J2LCTMCI.cjs');
|
|
10
|
+
require('../chunk-7SIKKF62.cjs');
|
|
11
|
+
require('../chunk-GIXUQACB.cjs');
|
|
12
|
+
require('../chunk-AEZINHEA.cjs');
|
|
13
|
+
require('../chunk-RKGXITNB.cjs');
|
|
14
|
+
require('../chunk-NS5PJ2RM.cjs');
|
|
15
|
+
require('../chunk-PSHJQ2NP.cjs');
|
|
16
|
+
require('../chunk-PLLCZVZO.cjs');
|
|
17
|
+
require('../chunk-QNDF3RQL.cjs');
|
|
18
|
+
require('../chunk-4JREL2GQ.cjs');
|
|
19
|
+
require('../chunk-7BZWQZUV.cjs');
|
|
20
|
+
require('../chunk-C5OTFOQB.cjs');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
exports.modifyCargoNestedTable = _chunkXBNXWUW3cjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunkXBNXWUW3cjs.modifyCargoTable; exports.parseCargoToml = _chunkXBNXWUW3cjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunkXBNXWUW3cjs.parseCargoTomlWithTree; exports.stringifyCargoToml = _chunkXBNXWUW3cjs.stringifyCargoToml;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
interface CargoToml {
|
|
2
|
+
workspace?: {
|
|
3
|
+
members: string[];
|
|
4
|
+
};
|
|
5
|
+
package: any;
|
|
6
|
+
dependencies?: Record<string, string | {
|
|
7
|
+
version: string;
|
|
8
|
+
features?: string[];
|
|
9
|
+
optional?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
"dev-dependencies"?: Record<string, string | {
|
|
12
|
+
version: string;
|
|
13
|
+
features: string[];
|
|
14
|
+
}>;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
interface CargoMetadata {
|
|
18
|
+
packages: Package[];
|
|
19
|
+
workspace_members: string[];
|
|
20
|
+
resolve: Resolve;
|
|
21
|
+
target_directory: string;
|
|
22
|
+
version: number;
|
|
23
|
+
workspace_root: string;
|
|
24
|
+
metadata: Metadata2;
|
|
25
|
+
}
|
|
26
|
+
interface Package {
|
|
27
|
+
name: string;
|
|
28
|
+
version: string;
|
|
29
|
+
id: string;
|
|
30
|
+
license: string;
|
|
31
|
+
license_file: string;
|
|
32
|
+
description: string;
|
|
33
|
+
source: any;
|
|
34
|
+
dependencies: Dependency[];
|
|
35
|
+
targets: Target[];
|
|
36
|
+
features: Features;
|
|
37
|
+
manifest_path: string;
|
|
38
|
+
metadata: Metadata;
|
|
39
|
+
/**
|
|
40
|
+
* From the docs:
|
|
41
|
+
* "List of registries to which this package may be published.
|
|
42
|
+
* Publishing is unrestricted if null, and forbidden if an empty array."
|
|
43
|
+
*
|
|
44
|
+
* Additional observation:
|
|
45
|
+
* false can be used by the end user but it will be converted to an empty
|
|
46
|
+
* array in the cargo metadata output.
|
|
47
|
+
*/
|
|
48
|
+
publish?: string[] | boolean | null;
|
|
49
|
+
authors: string[];
|
|
50
|
+
categories: string[];
|
|
51
|
+
default_run: any;
|
|
52
|
+
rust_version: string;
|
|
53
|
+
keywords: string[];
|
|
54
|
+
readme: string;
|
|
55
|
+
repository: string;
|
|
56
|
+
homepage: string;
|
|
57
|
+
documentation: string;
|
|
58
|
+
edition: string;
|
|
59
|
+
links: any;
|
|
60
|
+
}
|
|
61
|
+
interface Dependency {
|
|
62
|
+
name: string;
|
|
63
|
+
source: string;
|
|
64
|
+
req: string;
|
|
65
|
+
kind: any;
|
|
66
|
+
rename: any;
|
|
67
|
+
optional: boolean;
|
|
68
|
+
uses_default_features: boolean;
|
|
69
|
+
features: any[];
|
|
70
|
+
target: string;
|
|
71
|
+
path: string;
|
|
72
|
+
registry: any;
|
|
73
|
+
workspace: boolean;
|
|
74
|
+
}
|
|
75
|
+
interface Target {
|
|
76
|
+
kind: string[];
|
|
77
|
+
crate_types: string[];
|
|
78
|
+
name: string;
|
|
79
|
+
src_path: string;
|
|
80
|
+
edition: string;
|
|
81
|
+
"required-features": string[];
|
|
82
|
+
doc: boolean;
|
|
83
|
+
doctest: boolean;
|
|
84
|
+
test: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface Features {
|
|
87
|
+
default: string[];
|
|
88
|
+
feat1: any[];
|
|
89
|
+
feat2: any[];
|
|
90
|
+
}
|
|
91
|
+
interface Metadata {
|
|
92
|
+
docs: Docs;
|
|
93
|
+
}
|
|
94
|
+
interface Docs {
|
|
95
|
+
rs: Rs;
|
|
96
|
+
}
|
|
97
|
+
interface Rs {
|
|
98
|
+
"all-features": boolean;
|
|
99
|
+
}
|
|
100
|
+
interface Resolve {
|
|
101
|
+
nodes: Node[];
|
|
102
|
+
root: string;
|
|
103
|
+
}
|
|
104
|
+
interface Node {
|
|
105
|
+
id: string;
|
|
106
|
+
dependencies: string[];
|
|
107
|
+
deps: Dep[];
|
|
108
|
+
features: string[];
|
|
109
|
+
}
|
|
110
|
+
interface Dep {
|
|
111
|
+
name: string;
|
|
112
|
+
pkg: string;
|
|
113
|
+
dep_kinds: DepKind[];
|
|
114
|
+
}
|
|
115
|
+
interface DepKind {
|
|
116
|
+
kind: any;
|
|
117
|
+
target: string;
|
|
118
|
+
}
|
|
119
|
+
interface Metadata2 {
|
|
120
|
+
docs: Docs2;
|
|
121
|
+
}
|
|
122
|
+
interface Docs2 {
|
|
123
|
+
rs: Rs2;
|
|
124
|
+
}
|
|
125
|
+
interface Rs2 {
|
|
126
|
+
"all-features": boolean;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Virtual file system tree.
|
|
130
|
+
*/
|
|
131
|
+
interface Tree {
|
|
132
|
+
/**
|
|
133
|
+
* Root of the workspace. All paths are relative to this.
|
|
134
|
+
*/
|
|
135
|
+
root: string;
|
|
136
|
+
/**
|
|
137
|
+
* Read the contents of a file.
|
|
138
|
+
* @param filePath A path to a file.
|
|
139
|
+
*/
|
|
140
|
+
read(filePath: string): Buffer | null;
|
|
141
|
+
/**
|
|
142
|
+
* Read the contents of a file as string.
|
|
143
|
+
* @param filePath A path to a file.
|
|
144
|
+
* @param encoding the encoding for the result
|
|
145
|
+
*/
|
|
146
|
+
read(filePath: string, encoding: BufferEncoding): string | null;
|
|
147
|
+
/**
|
|
148
|
+
* Update the contents of a file or create a new file.
|
|
149
|
+
*/
|
|
150
|
+
write(filePath: string, content: Buffer | string, options?: any): void;
|
|
151
|
+
/**
|
|
152
|
+
* Check if a file exists.
|
|
153
|
+
*/
|
|
154
|
+
exists(filePath: string): boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Delete the file.
|
|
157
|
+
*/
|
|
158
|
+
delete(filePath: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* Rename the file or the folder.
|
|
161
|
+
*/
|
|
162
|
+
rename(from: string, to: string): void;
|
|
163
|
+
/**
|
|
164
|
+
* Check if this is a file or not.
|
|
165
|
+
*/
|
|
166
|
+
isFile(filePath: string): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Returns the list of children of a folder.
|
|
169
|
+
*/
|
|
170
|
+
children(dirPath: string): string[];
|
|
171
|
+
/**
|
|
172
|
+
* Returns the list of currently recorded changes.
|
|
173
|
+
*/
|
|
174
|
+
listChanges(): any[];
|
|
175
|
+
/**
|
|
176
|
+
* Changes permissions of a file.
|
|
177
|
+
* @param filePath A path to a file.
|
|
178
|
+
* @param mode The permission to be granted on the file, given as a string (e.g `755`) or octal integer (e.g `0o755`).
|
|
179
|
+
* See https://nodejs.org/api/fs.html#fs_file_modes.
|
|
180
|
+
*/
|
|
181
|
+
changePermissions(filePath: string, mode: string): void;
|
|
182
|
+
}
|
|
183
|
+
declare function parseCargoTomlWithTree(tree: Tree, projectRoot: string, projectName: string): CargoToml;
|
|
184
|
+
declare function parseCargoToml(cargoString?: string): CargoToml;
|
|
185
|
+
declare function stringifyCargoToml(cargoToml: CargoToml): string;
|
|
186
|
+
declare function modifyCargoTable(toml: CargoToml, section: string, key: string, value: string | object | any[] | (() => any)): void;
|
|
187
|
+
declare function modifyCargoNestedTable(toml: CargoToml, section: string, key: string, value: object): void;
|
|
188
|
+
|
|
189
|
+
export { type CargoMetadata, type CargoToml, type Dep, type DepKind, type Dependency, type Docs, type Docs2, type Features, type Metadata, type Metadata2, type Node, type Package, type Resolve, type Rs, type Rs2, type Target, type Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
interface CargoToml {
|
|
2
|
+
workspace?: {
|
|
3
|
+
members: string[];
|
|
4
|
+
};
|
|
5
|
+
package: any;
|
|
6
|
+
dependencies?: Record<string, string | {
|
|
7
|
+
version: string;
|
|
8
|
+
features?: string[];
|
|
9
|
+
optional?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
"dev-dependencies"?: Record<string, string | {
|
|
12
|
+
version: string;
|
|
13
|
+
features: string[];
|
|
14
|
+
}>;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
interface CargoMetadata {
|
|
18
|
+
packages: Package[];
|
|
19
|
+
workspace_members: string[];
|
|
20
|
+
resolve: Resolve;
|
|
21
|
+
target_directory: string;
|
|
22
|
+
version: number;
|
|
23
|
+
workspace_root: string;
|
|
24
|
+
metadata: Metadata2;
|
|
25
|
+
}
|
|
26
|
+
interface Package {
|
|
27
|
+
name: string;
|
|
28
|
+
version: string;
|
|
29
|
+
id: string;
|
|
30
|
+
license: string;
|
|
31
|
+
license_file: string;
|
|
32
|
+
description: string;
|
|
33
|
+
source: any;
|
|
34
|
+
dependencies: Dependency[];
|
|
35
|
+
targets: Target[];
|
|
36
|
+
features: Features;
|
|
37
|
+
manifest_path: string;
|
|
38
|
+
metadata: Metadata;
|
|
39
|
+
/**
|
|
40
|
+
* From the docs:
|
|
41
|
+
* "List of registries to which this package may be published.
|
|
42
|
+
* Publishing is unrestricted if null, and forbidden if an empty array."
|
|
43
|
+
*
|
|
44
|
+
* Additional observation:
|
|
45
|
+
* false can be used by the end user but it will be converted to an empty
|
|
46
|
+
* array in the cargo metadata output.
|
|
47
|
+
*/
|
|
48
|
+
publish?: string[] | boolean | null;
|
|
49
|
+
authors: string[];
|
|
50
|
+
categories: string[];
|
|
51
|
+
default_run: any;
|
|
52
|
+
rust_version: string;
|
|
53
|
+
keywords: string[];
|
|
54
|
+
readme: string;
|
|
55
|
+
repository: string;
|
|
56
|
+
homepage: string;
|
|
57
|
+
documentation: string;
|
|
58
|
+
edition: string;
|
|
59
|
+
links: any;
|
|
60
|
+
}
|
|
61
|
+
interface Dependency {
|
|
62
|
+
name: string;
|
|
63
|
+
source: string;
|
|
64
|
+
req: string;
|
|
65
|
+
kind: any;
|
|
66
|
+
rename: any;
|
|
67
|
+
optional: boolean;
|
|
68
|
+
uses_default_features: boolean;
|
|
69
|
+
features: any[];
|
|
70
|
+
target: string;
|
|
71
|
+
path: string;
|
|
72
|
+
registry: any;
|
|
73
|
+
workspace: boolean;
|
|
74
|
+
}
|
|
75
|
+
interface Target {
|
|
76
|
+
kind: string[];
|
|
77
|
+
crate_types: string[];
|
|
78
|
+
name: string;
|
|
79
|
+
src_path: string;
|
|
80
|
+
edition: string;
|
|
81
|
+
"required-features": string[];
|
|
82
|
+
doc: boolean;
|
|
83
|
+
doctest: boolean;
|
|
84
|
+
test: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface Features {
|
|
87
|
+
default: string[];
|
|
88
|
+
feat1: any[];
|
|
89
|
+
feat2: any[];
|
|
90
|
+
}
|
|
91
|
+
interface Metadata {
|
|
92
|
+
docs: Docs;
|
|
93
|
+
}
|
|
94
|
+
interface Docs {
|
|
95
|
+
rs: Rs;
|
|
96
|
+
}
|
|
97
|
+
interface Rs {
|
|
98
|
+
"all-features": boolean;
|
|
99
|
+
}
|
|
100
|
+
interface Resolve {
|
|
101
|
+
nodes: Node[];
|
|
102
|
+
root: string;
|
|
103
|
+
}
|
|
104
|
+
interface Node {
|
|
105
|
+
id: string;
|
|
106
|
+
dependencies: string[];
|
|
107
|
+
deps: Dep[];
|
|
108
|
+
features: string[];
|
|
109
|
+
}
|
|
110
|
+
interface Dep {
|
|
111
|
+
name: string;
|
|
112
|
+
pkg: string;
|
|
113
|
+
dep_kinds: DepKind[];
|
|
114
|
+
}
|
|
115
|
+
interface DepKind {
|
|
116
|
+
kind: any;
|
|
117
|
+
target: string;
|
|
118
|
+
}
|
|
119
|
+
interface Metadata2 {
|
|
120
|
+
docs: Docs2;
|
|
121
|
+
}
|
|
122
|
+
interface Docs2 {
|
|
123
|
+
rs: Rs2;
|
|
124
|
+
}
|
|
125
|
+
interface Rs2 {
|
|
126
|
+
"all-features": boolean;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Virtual file system tree.
|
|
130
|
+
*/
|
|
131
|
+
interface Tree {
|
|
132
|
+
/**
|
|
133
|
+
* Root of the workspace. All paths are relative to this.
|
|
134
|
+
*/
|
|
135
|
+
root: string;
|
|
136
|
+
/**
|
|
137
|
+
* Read the contents of a file.
|
|
138
|
+
* @param filePath A path to a file.
|
|
139
|
+
*/
|
|
140
|
+
read(filePath: string): Buffer | null;
|
|
141
|
+
/**
|
|
142
|
+
* Read the contents of a file as string.
|
|
143
|
+
* @param filePath A path to a file.
|
|
144
|
+
* @param encoding the encoding for the result
|
|
145
|
+
*/
|
|
146
|
+
read(filePath: string, encoding: BufferEncoding): string | null;
|
|
147
|
+
/**
|
|
148
|
+
* Update the contents of a file or create a new file.
|
|
149
|
+
*/
|
|
150
|
+
write(filePath: string, content: Buffer | string, options?: any): void;
|
|
151
|
+
/**
|
|
152
|
+
* Check if a file exists.
|
|
153
|
+
*/
|
|
154
|
+
exists(filePath: string): boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Delete the file.
|
|
157
|
+
*/
|
|
158
|
+
delete(filePath: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* Rename the file or the folder.
|
|
161
|
+
*/
|
|
162
|
+
rename(from: string, to: string): void;
|
|
163
|
+
/**
|
|
164
|
+
* Check if this is a file or not.
|
|
165
|
+
*/
|
|
166
|
+
isFile(filePath: string): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Returns the list of children of a folder.
|
|
169
|
+
*/
|
|
170
|
+
children(dirPath: string): string[];
|
|
171
|
+
/**
|
|
172
|
+
* Returns the list of currently recorded changes.
|
|
173
|
+
*/
|
|
174
|
+
listChanges(): any[];
|
|
175
|
+
/**
|
|
176
|
+
* Changes permissions of a file.
|
|
177
|
+
* @param filePath A path to a file.
|
|
178
|
+
* @param mode The permission to be granted on the file, given as a string (e.g `755`) or octal integer (e.g `0o755`).
|
|
179
|
+
* See https://nodejs.org/api/fs.html#fs_file_modes.
|
|
180
|
+
*/
|
|
181
|
+
changePermissions(filePath: string, mode: string): void;
|
|
182
|
+
}
|
|
183
|
+
declare function parseCargoTomlWithTree(tree: Tree, projectRoot: string, projectName: string): CargoToml;
|
|
184
|
+
declare function parseCargoToml(cargoString?: string): CargoToml;
|
|
185
|
+
declare function stringifyCargoToml(cargoToml: CargoToml): string;
|
|
186
|
+
declare function modifyCargoTable(toml: CargoToml, section: string, key: string, value: string | object | any[] | (() => any)): void;
|
|
187
|
+
declare function modifyCargoNestedTable(toml: CargoToml, section: string, key: string, value: object): void;
|
|
188
|
+
|
|
189
|
+
export { type CargoMetadata, type CargoToml, type Dep, type DepKind, type Dependency, type Docs, type Docs2, type Features, type Metadata, type Metadata2, type Node, type Package, type Resolve, type Rs, type Rs2, type Target, type Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
modifyCargoNestedTable,
|
|
3
|
+
modifyCargoTable,
|
|
4
|
+
parseCargoToml,
|
|
5
|
+
parseCargoTomlWithTree,
|
|
6
|
+
stringifyCargoToml
|
|
7
|
+
} from "../chunk-PORZT4W3.js";
|
|
8
|
+
import "../chunk-XIA6NF6N.js";
|
|
9
|
+
import "../chunk-QDJMKPQQ.js";
|
|
10
|
+
import "../chunk-QJUAU656.js";
|
|
11
|
+
import "../chunk-JX5NLB4S.js";
|
|
12
|
+
import "../chunk-VLWSWYG7.js";
|
|
13
|
+
import "../chunk-RWBPUJIZ.js";
|
|
14
|
+
import "../chunk-T3MUE32G.js";
|
|
15
|
+
import "../chunk-OJP4XIBV.js";
|
|
16
|
+
import "../chunk-R6A4VPC4.js";
|
|
17
|
+
import "../chunk-XEZGYUS2.js";
|
|
18
|
+
import "../chunk-FRR2ZRWD.js";
|
|
19
|
+
import "../chunk-4XRV4CVP.js";
|
|
20
|
+
import "../chunk-3QAWRU2B.js";
|
|
21
|
+
export {
|
|
22
|
+
modifyCargoNestedTable,
|
|
23
|
+
modifyCargoTable,
|
|
24
|
+
parseCargoToml,
|
|
25
|
+
parseCargoTomlWithTree,
|
|
26
|
+
stringifyCargoToml
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.169.1",
|
|
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": {
|
|
@@ -218,7 +218,8 @@
|
|
|
218
218
|
"monorepo"
|
|
219
219
|
],
|
|
220
220
|
"dependencies": {
|
|
221
|
-
"@
|
|
221
|
+
"@ltd/j-toml": "1.38.0",
|
|
222
|
+
"@storm-software/config": "^1.119.1",
|
|
222
223
|
"c12": "^2.0.0-beta.2",
|
|
223
224
|
"chalk": "^4.1.2",
|
|
224
225
|
"commander": "^12.1.0",
|
|
File without changes
|
|
File without changes
|