@storm-software/cloudflare-tools 0.55.18 → 0.55.20
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/{chunk-JYGVCUHY.mjs → chunk-AHEAMC5D.mjs} +5 -5
- package/dist/{chunk-OO2KFXL5.js → chunk-BRNE2OJC.js} +52 -46
- package/dist/{chunk-UYVVVI5O.mjs → chunk-C7LFNTNE.mjs} +40 -26
- package/dist/{chunk-EY654AX3.mjs → chunk-IMI2SM4Q.mjs} +27 -16
- package/dist/{chunk-XU6MTFCV.mjs → chunk-KFNKJP2U.mjs} +1 -1
- package/dist/{chunk-FUEYDPCD.mjs → chunk-LH3QKSDK.mjs} +2 -2
- package/dist/{chunk-CH4HU3UC.mjs → chunk-LI7SJBJ3.mjs} +17 -11
- package/dist/{chunk-23PVXPM6.js → chunk-MUNYIY4Y.js} +16 -16
- package/dist/{chunk-7GVMKVE6.mjs → chunk-PAM7JMC5.mjs} +2 -2
- package/dist/{chunk-QEWY5YJA.mjs → chunk-PDHMNSTI.mjs} +2 -2
- package/dist/{chunk-7HA6AB2O.mjs → chunk-Q3FTEAPJ.mjs} +4 -4
- package/dist/{chunk-NHQOBOKU.js → chunk-QSA4HY26.js} +1 -1
- package/dist/{chunk-KD2ZJ3N4.js → chunk-QYKOXH3J.js} +12 -12
- package/dist/{chunk-57JETFC4.js → chunk-T4IWTHDS.js} +3 -3
- package/dist/{chunk-FNE7DP2D.js → chunk-X6VJDRKI.js} +26 -15
- package/dist/{chunk-A7FFSBE6.mjs → chunk-Y3XZCCPP.mjs} +1 -1
- package/dist/{chunk-TWSVFCGJ.js → chunk-ZO73VQJ6.js} +229 -215
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +8 -8
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +5 -5
- package/dist/index.js +8 -8
- package/dist/index.mjs +10 -10
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
- package/dist/src/executors/serve/executor.d.mts +3 -0
- package/dist/src/executors/serve/executor.d.ts +3 -0
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +5 -5
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +5 -5
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
- package/dist/tsup.config.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
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
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkT4IWTHDSjs = require('./chunk-T4IWTHDS.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkBRNE2OJCjs = require('./chunk-BRNE2OJC.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkX6VJDRKIjs = require('./chunk-X6VJDRKI.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -36,8 +36,8 @@ async function runExecutor(options, context) {
|
|
|
36
36
|
throw new Error("The executor requires projectsConfigurations.");
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
const workspaceRoot =
|
|
40
|
-
const config = await
|
|
39
|
+
const workspaceRoot = _chunkX6VJDRKIjs.findWorkspaceRoot.call(void 0, );
|
|
40
|
+
const config = await _chunkBRNE2OJCjs.getConfig.call(void 0, workspaceRoot);
|
|
41
41
|
const sourceRoot = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.sourceRoot]), () => ( workspaceRoot));
|
|
42
42
|
const projectName = _nullishCoalesce(_optionalChain([context, 'access', _11 => _11.projectsConfigurations, 'access', _12 => _12.projects, 'access', _13 => _13[context.projectName], 'optionalAccess', _14 => _14.name]), () => ( context.projectName));
|
|
43
43
|
const projectDetails = _chunkVTHBMY4Bjs.getPackageInfo.call(void 0, context.projectsConfigurations.projects[context.projectName]);
|
|
@@ -62,7 +62,7 @@ async function runExecutor(options, context) {
|
|
|
62
62
|
if (!projectGraph) {
|
|
63
63
|
throw new Error("No project graph found in cache");
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
_chunkX6VJDRKIjs.writeInfo.call(void 0, `Publishing ${context.projectName} to the Storm Registry at ${endpoint}`);
|
|
66
66
|
const s3Client = new (0, _clients3.S3)({
|
|
67
67
|
region: "auto",
|
|
68
68
|
endpoint,
|
|
@@ -72,12 +72,12 @@ async function runExecutor(options, context) {
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
const version = _optionalChain([projectDetails, 'access', _18 => _18.content, 'optionalAccess', _19 => _19.version]);
|
|
75
|
-
|
|
75
|
+
_chunkX6VJDRKIjs.writeInfo.call(void 0, `Generated component version: ${version}`);
|
|
76
76
|
const files = await _glob.glob.call(void 0, _devkit.joinPathFragments.call(void 0, sourceRoot, "**/*"), {
|
|
77
77
|
ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
|
|
78
78
|
});
|
|
79
79
|
const projectPath = `registry/${context.projectName}`;
|
|
80
|
-
const internalDependencies = await
|
|
80
|
+
const internalDependencies = await _chunkT4IWTHDSjs.getInternalDependencies.call(void 0, context.projectName, projectGraph);
|
|
81
81
|
const dependencies = internalDependencies.filter((projectNode) => !projectNode.data.tags || projectNode.data.tags.every((tag) => tag.toLowerCase() !== "component")).reduce((ret, dep) => {
|
|
82
82
|
if (!ret[dep.name]) {
|
|
83
83
|
ret[dep.name] = "latest";
|
|
@@ -85,14 +85,14 @@ async function runExecutor(options, context) {
|
|
|
85
85
|
return ret;
|
|
86
86
|
}, _nullishCoalesce(projectDetails.content.dependencies, () => ( {})));
|
|
87
87
|
const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
|
|
88
|
-
|
|
88
|
+
_chunkX6VJDRKIjs.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
|
|
89
89
|
if (!isDryRun) {
|
|
90
90
|
const response = await s3Client.listObjects({
|
|
91
91
|
Bucket: options.bucketId,
|
|
92
92
|
Prefix: projectPath
|
|
93
93
|
});
|
|
94
94
|
if (_optionalChain([response, 'optionalAccess', _20 => _20.Contents]) && response.Contents.length > 0) {
|
|
95
|
-
|
|
95
|
+
_chunkX6VJDRKIjs.writeDebug.call(void 0, `Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`);
|
|
96
96
|
await Promise.all(response.Contents.map((item) => s3Client.deleteObjects({
|
|
97
97
|
Bucket: options.bucketId,
|
|
98
98
|
Delete: {
|
|
@@ -105,10 +105,10 @@ async function runExecutor(options, context) {
|
|
|
105
105
|
}
|
|
106
106
|
})));
|
|
107
107
|
} else {
|
|
108
|
-
|
|
108
|
+
_chunkX6VJDRKIjs.writeDebug.call(void 0, `No existing items to delete in the component registry path ${projectPath}`);
|
|
109
109
|
}
|
|
110
110
|
} else {
|
|
111
|
-
|
|
111
|
+
_chunkX6VJDRKIjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
|
|
112
112
|
}
|
|
113
113
|
const meta = {
|
|
114
114
|
name: context.projectName,
|
|
@@ -124,16 +124,16 @@ async function runExecutor(options, context) {
|
|
|
124
124
|
meta.devDependencies = projectDetails.content.devDependencies;
|
|
125
125
|
}
|
|
126
126
|
const metaJson = JSON.stringify(meta);
|
|
127
|
-
|
|
127
|
+
_chunkX6VJDRKIjs.writeInfo.call(void 0, `Generating meta.json file:
|
|
128
128
|
${metaJson}`);
|
|
129
|
-
await
|
|
129
|
+
await _chunkT4IWTHDSjs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, "meta.json", version, metaJson, "application/json", isDryRun);
|
|
130
130
|
await Promise.all(files.map((file) => {
|
|
131
131
|
const fileName = file.replaceAll("\\", "/").replace(sourceRoot.replaceAll("\\", "/"), "");
|
|
132
132
|
return _promises.readFile.call(void 0, file, {
|
|
133
133
|
encoding: "utf8"
|
|
134
|
-
}).then((fileContent) =>
|
|
134
|
+
}).then((fileContent) => _chunkT4IWTHDSjs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, fileName, version, fileContent, "text/plain", isDryRun));
|
|
135
135
|
}));
|
|
136
|
-
|
|
136
|
+
_chunkX6VJDRKIjs.writeSuccess.call(void 0, `Successfully uploaded the ${projectName} component to the Cyclone Registry`, config);
|
|
137
137
|
return {
|
|
138
138
|
success: true
|
|
139
139
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeDebug,
|
|
3
3
|
writeWarning
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IMI2SM4Q.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__name
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y3XZCCPP.mjs";
|
|
8
8
|
|
|
9
9
|
// src/utils/r2-bucket-helpers.ts
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KFNKJP2U.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__name,
|
|
6
6
|
__require
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y3XZCCPP.mjs";
|
|
8
8
|
|
|
9
9
|
// src/executors/cloudflare-publish/executor.ts
|
|
10
10
|
import { joinPathFragments } from "@nx/devkit";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generator_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LH3QKSDK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LI7SJBJ3.mjs";
|
|
7
7
|
import {
|
|
8
8
|
findWorkspaceRoot,
|
|
9
9
|
getStopwatch,
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
writeFatal,
|
|
13
13
|
writeInfo,
|
|
14
14
|
writeTrace
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IMI2SM4Q.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__dirname,
|
|
18
18
|
__name
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Y3XZCCPP.mjs";
|
|
20
20
|
|
|
21
21
|
// src/generators/worker/generator.ts
|
|
22
22
|
import { convertNxGenerator, ensurePackage, formatFiles, generateFiles, joinPathFragments, names, readProjectConfiguration, runTasksInSerial, updateJson, updateProjectConfiguration } from "@nx/devkit";
|
|
@@ -8,7 +8,7 @@ var require_package = _chunkJ5SB6L2Ljs.__commonJS.call(void 0, {
|
|
|
8
8
|
"package.json"(exports, module) {
|
|
9
9
|
module.exports = {
|
|
10
10
|
name: "@storm-software/cloudflare-tools",
|
|
11
|
-
version: "0.55.
|
|
11
|
+
version: "0.55.20",
|
|
12
12
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
13
13
|
repository: {
|
|
14
14
|
type: "github",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQSA4HY26js = require('./chunk-QSA4HY26.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBRNE2OJCjs = require('./chunk-BRNE2OJC.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ var _chunkOO2KFXL5js = require('./chunk-OO2KFXL5.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkX6VJDRKIjs = require('./chunk-X6VJDRKI.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -38,21 +38,21 @@ var vitestScript = `"test": "vitest run"`;
|
|
|
38
38
|
|
|
39
39
|
// src/generators/worker/generator.ts
|
|
40
40
|
async function applicationGenerator(tree, schema) {
|
|
41
|
-
const stopwatch =
|
|
41
|
+
const stopwatch = _chunkX6VJDRKIjs.getStopwatch.call(void 0, "Storm Worker generator");
|
|
42
42
|
let config;
|
|
43
43
|
try {
|
|
44
|
-
|
|
44
|
+
_chunkX6VJDRKIjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
|
|
45
45
|
|
|
46
46
|
`, config);
|
|
47
|
-
const workspaceRoot =
|
|
48
|
-
|
|
47
|
+
const workspaceRoot = _chunkX6VJDRKIjs.findWorkspaceRoot.call(void 0, );
|
|
48
|
+
_chunkX6VJDRKIjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.json file...
|
|
49
49
|
- workspaceRoot: ${workspaceRoot}`, config);
|
|
50
|
-
config = await
|
|
51
|
-
|
|
50
|
+
config = await _chunkBRNE2OJCjs.getConfig.call(void 0, workspaceRoot);
|
|
51
|
+
_chunkX6VJDRKIjs.writeTrace.call(void 0, `Loaded Storm config into env:
|
|
52
52
|
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`, config);
|
|
53
53
|
const options = await normalizeOptions(tree, schema, config);
|
|
54
54
|
const tasks = [];
|
|
55
|
-
tasks.push(await
|
|
55
|
+
tasks.push(await _chunkQSA4HY26js.generator_default.call(void 0, tree, {
|
|
56
56
|
...options,
|
|
57
57
|
skipFormat: true
|
|
58
58
|
}));
|
|
@@ -107,8 +107,8 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
|
|
|
107
107
|
return _devkit.runTasksInSerial.call(void 0, ...tasks);
|
|
108
108
|
} catch (error) {
|
|
109
109
|
return () => {
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
_chunkX6VJDRKIjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
111
|
+
_chunkX6VJDRKIjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
112
112
|
- Details: ${error.message}
|
|
113
113
|
- Stacktrace: ${error.stack}`, config);
|
|
114
114
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkX6VJDRKIjs = require('./chunk-X6VJDRKI.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -11,7 +11,7 @@ var _crypto = require('crypto');
|
|
|
11
11
|
var r2UploadFile = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (client, bucketName, projectPath, fileName, version, fileContent, contentType = "text/plain", isDryRun = false) => {
|
|
12
12
|
const checksum = _crypto.createHash.call(void 0, "sha256").update(fileContent).digest("base64");
|
|
13
13
|
const fileKey = `${projectPath}/${fileName.startsWith("/") ? fileName.substring(1) : fileName}`;
|
|
14
|
-
|
|
14
|
+
_chunkX6VJDRKIjs.writeDebug.call(void 0, `Uploading file: ${fileKey}`);
|
|
15
15
|
if (!isDryRun) {
|
|
16
16
|
await client.putObject({
|
|
17
17
|
Bucket: bucketName,
|
|
@@ -24,7 +24,7 @@ var r2UploadFile = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (c
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
} else {
|
|
27
|
-
|
|
27
|
+
_chunkX6VJDRKIjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
|
|
28
28
|
}
|
|
29
29
|
}, "r2UploadFile");
|
|
30
30
|
var getInternalDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (projectName, graph) => {
|
|
@@ -134,14 +134,17 @@ var _fs = require('fs');
|
|
|
134
134
|
var _path = require('path');
|
|
135
135
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
136
136
|
var depth = 0;
|
|
137
|
-
function findFolderUp(startPath, endFileNames) {
|
|
137
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
138
138
|
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
139
|
+
if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
|
|
140
|
+
return _startPath;
|
|
141
|
+
}
|
|
139
142
|
if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
|
|
140
143
|
return _startPath;
|
|
141
144
|
}
|
|
142
145
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
143
146
|
const parent = _path.join.call(void 0, _startPath, "..");
|
|
144
|
-
return findFolderUp(parent, endFileNames);
|
|
147
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
145
148
|
}
|
|
146
149
|
return void 0;
|
|
147
150
|
}
|
|
@@ -149,17 +152,17 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
|
149
152
|
|
|
150
153
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
151
154
|
var rootFiles = [
|
|
152
|
-
"storm.json",
|
|
153
|
-
"storm.json",
|
|
154
|
-
"storm.yaml",
|
|
155
|
-
"storm.yml",
|
|
156
|
-
"storm.js",
|
|
157
|
-
"storm.ts",
|
|
158
|
-
".storm.json",
|
|
159
|
-
".storm.yaml",
|
|
160
|
-
".storm.yml",
|
|
161
|
-
".storm.js",
|
|
162
|
-
".storm.ts",
|
|
155
|
+
"storm-workspace.json",
|
|
156
|
+
"storm-workspace.json",
|
|
157
|
+
"storm-workspace.yaml",
|
|
158
|
+
"storm-workspace.yml",
|
|
159
|
+
"storm-workspace.js",
|
|
160
|
+
"storm-workspace.ts",
|
|
161
|
+
".storm-workspace.json",
|
|
162
|
+
".storm-workspace.yaml",
|
|
163
|
+
".storm-workspace.yml",
|
|
164
|
+
".storm-workspace.js",
|
|
165
|
+
".storm-workspace.ts",
|
|
163
166
|
"lerna.json",
|
|
164
167
|
"nx.json",
|
|
165
168
|
"turbo.json",
|
|
@@ -183,11 +186,18 @@ var rootFiles = [
|
|
|
183
186
|
"pnpm-lock.yml",
|
|
184
187
|
"bun.lockb"
|
|
185
188
|
];
|
|
189
|
+
var rootDirectories = [
|
|
190
|
+
".storm-workspace",
|
|
191
|
+
".nx",
|
|
192
|
+
".github",
|
|
193
|
+
".vscode",
|
|
194
|
+
".verdaccio"
|
|
195
|
+
];
|
|
186
196
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
187
197
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
188
198
|
return correctPaths(_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
|
|
189
199
|
}
|
|
190
|
-
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
|
|
200
|
+
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
|
|
191
201
|
}
|
|
192
202
|
_chunkJ5SB6L2Ljs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
193
203
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -329,7 +339,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
329
339
|
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
330
340
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
331
341
|
var StormConfigSchema = _zod2.default.object({
|
|
332
|
-
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
342
|
+
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
333
343
|
extends: ExtendsSchema.optional(),
|
|
334
344
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
335
345
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -371,6 +381,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
371
381
|
"trace",
|
|
372
382
|
"all"
|
|
373
383
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
384
|
+
skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
374
385
|
registry: RegistryConfigSchema,
|
|
375
386
|
configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
376
387
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -11,7 +11,7 @@ var __commonJS = (cb, mod) => function __require2() {
|
|
|
11
11
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.
|
|
14
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.2_@types+node@22.13.0__@swc+core@1.7.26_@swc+helpers_kupakjppxzf7wv7pnek6irqjpq/node_modules/tsup/assets/esm_shims.js
|
|
15
15
|
import { fileURLToPath } from "url";
|
|
16
16
|
import path from "path";
|
|
17
17
|
var getFilename = /* @__PURE__ */ __name(() => fileURLToPath(import.meta.url), "getFilename");
|