@storm-software/cloudflare-tools 0.71.2 → 0.71.3
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 +13 -0
- package/dist/{chunk-7ESZB4KW.mjs → chunk-4EEXR4IG.mjs} +10 -11
- package/dist/chunk-5CMG7SUH.mjs +43 -0
- package/dist/{chunk-TUJUSMGX.mjs → chunk-AOKOPGTD.mjs} +4 -4
- package/dist/{chunk-VHMJXOF4.js → chunk-BAINZIOH.js} +24 -25
- package/dist/{chunk-W5IPHIXB.js → chunk-EKIV24FH.js} +165 -165
- package/dist/{chunk-NEODNLL5.js → chunk-GPR55JRG.js} +4 -4
- package/dist/{chunk-HQWL5NAU.js → chunk-I7SRDPE3.js} +12 -12
- package/dist/{chunk-C6B32MBV.mjs → chunk-NYGOCQMG.mjs} +6 -6
- package/dist/{chunk-PTTJW7MW.mjs → chunk-SGTAZO2Q.mjs} +3 -171
- package/dist/{chunk-6MATO2MJ.mjs → chunk-TPNHSNNZ.mjs} +171 -1
- package/dist/{chunk-FFOLWRMA.js → chunk-UAKLE2QO.js} +11 -12
- package/dist/{chunk-5YJKWRBZ.mjs → chunk-UXRPB254.mjs} +3 -3
- package/dist/{chunk-EQXEFXCV.js → chunk-VKMAYBQX.js} +48 -216
- package/dist/{chunk-4BWM53AA.js → chunk-Z2WQB55R.js} +171 -1
- package/dist/executors.d.mts +1 -1
- package/dist/executors.d.ts +1 -1
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +5 -5
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/{schema.d-elsO8UQp.d.mts → schema.d-Dcq3Apw7.d.mts} +2 -2
- package/dist/{schema.d-elsO8UQp.d.ts → schema.d-Dcq3Apw7.d.ts} +2 -2
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.d.mts +1 -1
- package/dist/src/executors/r2-upload-publish/executor.d.ts +1 -1
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/r2-upload-publish/schema.d.ts +2 -2
- package/dist/src/executors/r2-upload-publish/schema.json +2 -2
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +3 -3
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +4 -4
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +2 -2
- package/dist/src/utils/r2-bucket-helpers.d.mts +21 -2
- package/dist/src/utils/r2-bucket-helpers.d.ts +21 -2
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
- package/docs/api/executors/r2-upload-publish/schema.md +2 -2
- package/package.json +5 -5
- package/dist/chunk-5N2NVDKX.mjs +0 -44
|
@@ -5,173 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _chunk4BWM53AAjs = require('./chunk-4BWM53AA.js');
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
function normalizeWindowsPath(input = "") {
|
|
13
|
-
if (!input) {
|
|
14
|
-
return input;
|
|
15
|
-
}
|
|
16
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
17
|
-
}
|
|
18
|
-
var _UNC_REGEX = /^[/\\]{2}/;
|
|
19
|
-
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
20
|
-
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
21
|
-
var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
22
|
-
var correctPaths = function(path) {
|
|
23
|
-
if (!path || path.length === 0) {
|
|
24
|
-
return ".";
|
|
25
|
-
}
|
|
26
|
-
path = normalizeWindowsPath(path);
|
|
27
|
-
const isUNCPath = _optionalChain([path, 'optionalAccess', _ => _.match, 'call', _2 => _2(_UNC_REGEX)]);
|
|
28
|
-
const isPathAbsolute = isAbsolute(path);
|
|
29
|
-
const trailingSeparator = path[path.length - 1] === "/";
|
|
30
|
-
path = normalizeString(path, !isPathAbsolute);
|
|
31
|
-
if (path.length === 0) {
|
|
32
|
-
if (isPathAbsolute) {
|
|
33
|
-
return "/";
|
|
34
|
-
}
|
|
35
|
-
return trailingSeparator ? "./" : ".";
|
|
36
|
-
}
|
|
37
|
-
if (trailingSeparator) {
|
|
38
|
-
path += "/";
|
|
39
|
-
}
|
|
40
|
-
if (_DRIVE_LETTER_RE.test(path)) {
|
|
41
|
-
path += "/";
|
|
42
|
-
}
|
|
43
|
-
if (isUNCPath) {
|
|
44
|
-
if (!isPathAbsolute) {
|
|
45
|
-
return `//./${path}`;
|
|
46
|
-
}
|
|
47
|
-
return `//${path}`;
|
|
48
|
-
}
|
|
49
|
-
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
50
|
-
};
|
|
51
|
-
var joinPaths = function(...segments) {
|
|
52
|
-
let path = "";
|
|
53
|
-
for (const seg of segments) {
|
|
54
|
-
if (!seg) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (path.length > 0) {
|
|
58
|
-
const pathTrailing = path[path.length - 1] === "/";
|
|
59
|
-
const segLeading = seg[0] === "/";
|
|
60
|
-
const both = pathTrailing && segLeading;
|
|
61
|
-
if (both) {
|
|
62
|
-
path += seg.slice(1);
|
|
63
|
-
} else {
|
|
64
|
-
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
path += seg;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return correctPaths(path);
|
|
71
|
-
};
|
|
72
|
-
function cwd() {
|
|
73
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
74
|
-
return process.cwd().replace(/\\/g, "/");
|
|
75
|
-
}
|
|
76
|
-
return "/";
|
|
77
|
-
}
|
|
78
|
-
var resolve = function(...arguments_) {
|
|
79
|
-
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
80
|
-
let resolvedPath = "";
|
|
81
|
-
let resolvedAbsolute = false;
|
|
82
|
-
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
83
|
-
const path = index >= 0 ? arguments_[index] : cwd();
|
|
84
|
-
if (!path || path.length === 0) {
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
88
|
-
resolvedAbsolute = isAbsolute(path);
|
|
89
|
-
}
|
|
90
|
-
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
91
|
-
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
92
|
-
return `/${resolvedPath}`;
|
|
93
|
-
}
|
|
94
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
95
|
-
};
|
|
96
|
-
function normalizeString(path, allowAboveRoot) {
|
|
97
|
-
let res = "";
|
|
98
|
-
let lastSegmentLength = 0;
|
|
99
|
-
let lastSlash = -1;
|
|
100
|
-
let dots = 0;
|
|
101
|
-
let char = null;
|
|
102
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
103
|
-
if (index < path.length) {
|
|
104
|
-
char = path[index];
|
|
105
|
-
} else if (char === "/") {
|
|
106
|
-
break;
|
|
107
|
-
} else {
|
|
108
|
-
char = "/";
|
|
109
|
-
}
|
|
110
|
-
if (char === "/") {
|
|
111
|
-
if (lastSlash === index - 1 || dots === 1) {
|
|
112
|
-
} else if (dots === 2) {
|
|
113
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
114
|
-
if (res.length > 2) {
|
|
115
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
116
|
-
if (lastSlashIndex === -1) {
|
|
117
|
-
res = "";
|
|
118
|
-
lastSegmentLength = 0;
|
|
119
|
-
} else {
|
|
120
|
-
res = res.slice(0, lastSlashIndex);
|
|
121
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
122
|
-
}
|
|
123
|
-
lastSlash = index;
|
|
124
|
-
dots = 0;
|
|
125
|
-
continue;
|
|
126
|
-
} else if (res.length > 0) {
|
|
127
|
-
res = "";
|
|
128
|
-
lastSegmentLength = 0;
|
|
129
|
-
lastSlash = index;
|
|
130
|
-
dots = 0;
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
if (allowAboveRoot) {
|
|
135
|
-
res += res.length > 0 ? "/.." : "..";
|
|
136
|
-
lastSegmentLength = 2;
|
|
137
|
-
}
|
|
138
|
-
} else {
|
|
139
|
-
if (res.length > 0) {
|
|
140
|
-
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
141
|
-
} else {
|
|
142
|
-
res = path.slice(lastSlash + 1, index);
|
|
143
|
-
}
|
|
144
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
145
|
-
}
|
|
146
|
-
lastSlash = index;
|
|
147
|
-
dots = 0;
|
|
148
|
-
} else if (char === "." && dots !== -1) {
|
|
149
|
-
++dots;
|
|
150
|
-
} else {
|
|
151
|
-
dots = -1;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return res;
|
|
155
|
-
}
|
|
156
|
-
var isAbsolute = function(p) {
|
|
157
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
158
|
-
};
|
|
159
|
-
var relative = function(from, to) {
|
|
160
|
-
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
161
|
-
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
162
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
163
|
-
return _to.join("/");
|
|
164
|
-
}
|
|
165
|
-
const _fromCopy = [..._from];
|
|
166
|
-
for (const segment of _fromCopy) {
|
|
167
|
-
if (_to[0] !== segment) {
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
_from.shift();
|
|
171
|
-
_to.shift();
|
|
172
|
-
}
|
|
173
|
-
return [..._from.map(() => ".."), ..._to].join("/");
|
|
174
|
-
};
|
|
9
|
+
|
|
10
|
+
var _chunkZ2WQB55Rjs = require('./chunk-Z2WQB55R.js');
|
|
175
11
|
|
|
176
12
|
// ../config-tools/src/utilities/find-up.ts
|
|
177
13
|
var _fs = require('fs');
|
|
@@ -242,11 +78,11 @@ var rootDirectories = [
|
|
|
242
78
|
];
|
|
243
79
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
244
80
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
245
|
-
return correctPaths(
|
|
81
|
+
return _chunkZ2WQB55Rjs.correctPaths.call(void 0,
|
|
246
82
|
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
247
83
|
);
|
|
248
84
|
}
|
|
249
|
-
return correctPaths(
|
|
85
|
+
return _chunkZ2WQB55Rjs.correctPaths.call(void 0,
|
|
250
86
|
findFolderUp(
|
|
251
87
|
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
252
88
|
rootFiles,
|
|
@@ -883,7 +719,7 @@ async function getPackageJsonConfig(root) {
|
|
|
883
719
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
884
720
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
885
721
|
const file = await _promises.readFile.call(void 0,
|
|
886
|
-
joinPaths(workspaceRoot, "package.json"),
|
|
722
|
+
_chunkZ2WQB55Rjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
887
723
|
"utf8"
|
|
888
724
|
);
|
|
889
725
|
if (file) {
|
|
@@ -946,7 +782,7 @@ function applyDefaultConfig(config) {
|
|
|
946
782
|
if (!config.contact) {
|
|
947
783
|
config.contact = `${config.homepage}/contact`;
|
|
948
784
|
}
|
|
949
|
-
if (!_optionalChain([config, 'access',
|
|
785
|
+
if (!_optionalChain([config, 'access', _ => _.error, 'optionalAccess', _2 => _2.codesFile]) || !_optionalChain([config, 'optionalAccess', _3 => _3.error, 'optionalAccess', _4 => _4.url])) {
|
|
950
786
|
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
951
787
|
if (config.homepage) {
|
|
952
788
|
config.error.url ??= `${config.homepage}/errors`;
|
|
@@ -964,10 +800,10 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
964
800
|
cwd: workspacePath,
|
|
965
801
|
packageJson: true,
|
|
966
802
|
name: fileName,
|
|
967
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
803
|
+
envName: _optionalChain([fileName, 'optionalAccess', _5 => _5.toUpperCase, 'call', _6 => _6()]),
|
|
968
804
|
jitiOptions: {
|
|
969
805
|
debug: false,
|
|
970
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
806
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkZ2WQB55Rjs.joinPaths.call(void 0,
|
|
971
807
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
972
808
|
"jiti"
|
|
973
809
|
)
|
|
@@ -978,10 +814,10 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
978
814
|
cwd: workspacePath,
|
|
979
815
|
packageJson: true,
|
|
980
816
|
name: fileName,
|
|
981
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
817
|
+
envName: _optionalChain([fileName, 'optionalAccess', _7 => _7.toUpperCase, 'call', _8 => _8()]),
|
|
982
818
|
jitiOptions: {
|
|
983
819
|
debug: false,
|
|
984
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
820
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkZ2WQB55Rjs.joinPaths.call(void 0,
|
|
985
821
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
986
822
|
"jiti"
|
|
987
823
|
)
|
|
@@ -998,7 +834,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
998
834
|
let config = result.config;
|
|
999
835
|
const configFile = result.configFile;
|
|
1000
836
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
1001
|
-
|
|
837
|
+
_chunkZ2WQB55Rjs.writeTrace.call(void 0,
|
|
1002
838
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
1003
839
|
{
|
|
1004
840
|
logLevel: "all"
|
|
@@ -1012,9 +848,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1012
848
|
)
|
|
1013
849
|
);
|
|
1014
850
|
for (const result2 of results) {
|
|
1015
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
851
|
+
if (_optionalChain([result2, 'optionalAccess', _9 => _9.config]) && _optionalChain([result2, 'optionalAccess', _10 => _10.configFile]) && Object.keys(result2.config).length > 0) {
|
|
1016
852
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
1017
|
-
|
|
853
|
+
_chunkZ2WQB55Rjs.writeTrace.call(void 0,
|
|
1018
854
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
1019
855
|
{
|
|
1020
856
|
logLevel: "all"
|
|
@@ -1094,15 +930,15 @@ var getConfigEnv = () => {
|
|
|
1094
930
|
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1095
931
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1096
932
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1097
|
-
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? correctPaths(process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
1098
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
933
|
+
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
934
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
1099
935
|
directories: {
|
|
1100
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
1101
|
-
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
1102
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
1103
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
1104
|
-
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
1105
|
-
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
936
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
937
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
938
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
939
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
940
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
941
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkZ2WQB55Rjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
1106
942
|
},
|
|
1107
943
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
1108
944
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -1126,7 +962,7 @@ var getConfigEnv = () => {
|
|
|
1126
962
|
},
|
|
1127
963
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
1128
964
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1129
|
-
) ?
|
|
965
|
+
) ? _chunkZ2WQB55Rjs.getLogLevelLabel.call(void 0,
|
|
1130
966
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1131
967
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
1132
968
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
@@ -1248,16 +1084,16 @@ var getBaseThemeColorsEnv = (prefix) => {
|
|
|
1248
1084
|
var setExtensionEnv = (extensionName, extension) => {
|
|
1249
1085
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
1250
1086
|
if (extension[key]) {
|
|
1251
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
1087
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _11 => _11.replace, 'call', _12 => _12(
|
|
1252
1088
|
/([A-Z])+/g,
|
|
1253
|
-
(input) => input ? _optionalChain([input, 'access',
|
|
1254
|
-
), 'access',
|
|
1089
|
+
(input) => input ? _optionalChain([input, 'access', _13 => _13[0], 'optionalAccess', _14 => _14.toUpperCase, 'call', _15 => _15()]) + input.slice(1) : ""
|
|
1090
|
+
), 'access', _16 => _16.split, 'call', _17 => _17(/(?=[A-Z])|[.\-\s_]/), 'access', _18 => _18.map, 'call', _19 => _19((x) => x.toLowerCase())]), () => ( []));
|
|
1255
1091
|
let extensionKey;
|
|
1256
1092
|
if (result.length === 0) {
|
|
1257
1093
|
return;
|
|
1258
1094
|
}
|
|
1259
1095
|
if (result.length === 1) {
|
|
1260
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
1096
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _20 => _20[0], 'optionalAccess', _21 => _21.toUpperCase, 'call', _22 => _22()]), () => ( ""));
|
|
1261
1097
|
} else {
|
|
1262
1098
|
extensionKey = result.reduce((ret, part) => {
|
|
1263
1099
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -1392,42 +1228,42 @@ var setConfigEnv = (config) => {
|
|
|
1392
1228
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1393
1229
|
}
|
|
1394
1230
|
if (config.configFile) {
|
|
1395
|
-
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths(
|
|
1231
|
+
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkZ2WQB55Rjs.correctPaths.call(void 0,
|
|
1396
1232
|
config.configFile
|
|
1397
1233
|
);
|
|
1398
1234
|
}
|
|
1399
1235
|
if (config.workspaceRoot) {
|
|
1400
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config.workspaceRoot);
|
|
1401
|
-
process.env.NX_WORKSPACE_ROOT = correctPaths(config.workspaceRoot);
|
|
1402
|
-
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
|
|
1236
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkZ2WQB55Rjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1237
|
+
process.env.NX_WORKSPACE_ROOT = _chunkZ2WQB55Rjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1238
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkZ2WQB55Rjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1403
1239
|
}
|
|
1404
1240
|
if (config.directories) {
|
|
1405
1241
|
if (!config.skipCache && config.directories.cache) {
|
|
1406
|
-
process.env[`${prefix}CACHE_DIR`] = correctPaths(
|
|
1242
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkZ2WQB55Rjs.correctPaths.call(void 0,
|
|
1407
1243
|
config.directories.cache
|
|
1408
1244
|
);
|
|
1409
1245
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1410
1246
|
}
|
|
1411
1247
|
if (config.directories.data) {
|
|
1412
|
-
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
1248
|
+
process.env[`${prefix}DATA_DIR`] = _chunkZ2WQB55Rjs.correctPaths.call(void 0, config.directories.data);
|
|
1413
1249
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1414
1250
|
}
|
|
1415
1251
|
if (config.directories.config) {
|
|
1416
|
-
process.env[`${prefix}CONFIG_DIR`] = correctPaths(
|
|
1252
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkZ2WQB55Rjs.correctPaths.call(void 0,
|
|
1417
1253
|
config.directories.config
|
|
1418
1254
|
);
|
|
1419
1255
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1420
1256
|
}
|
|
1421
1257
|
if (config.directories.temp) {
|
|
1422
|
-
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
1258
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkZ2WQB55Rjs.correctPaths.call(void 0, config.directories.temp);
|
|
1423
1259
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1424
1260
|
}
|
|
1425
1261
|
if (config.directories.log) {
|
|
1426
|
-
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
1262
|
+
process.env[`${prefix}LOG_DIR`] = _chunkZ2WQB55Rjs.correctPaths.call(void 0, config.directories.log);
|
|
1427
1263
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1428
1264
|
}
|
|
1429
1265
|
if (config.directories.build) {
|
|
1430
|
-
process.env[`${prefix}BUILD_DIR`] = correctPaths(
|
|
1266
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkZ2WQB55Rjs.correctPaths.call(void 0,
|
|
1431
1267
|
config.directories.build
|
|
1432
1268
|
);
|
|
1433
1269
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -1445,7 +1281,7 @@ var setConfigEnv = (config) => {
|
|
|
1445
1281
|
process.env.NODE_ENV = config.mode;
|
|
1446
1282
|
process.env.ENVIRONMENT = config.mode;
|
|
1447
1283
|
}
|
|
1448
|
-
if (_optionalChain([config, 'access',
|
|
1284
|
+
if (_optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24.base, 'optionalAccess', _25 => _25.light]) || _optionalChain([config, 'access', _26 => _26.colors, 'optionalAccess', _27 => _27.base, 'optionalAccess', _28 => _28.dark])) {
|
|
1449
1285
|
for (const key of Object.keys(config.colors)) {
|
|
1450
1286
|
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1451
1287
|
}
|
|
@@ -1489,9 +1325,9 @@ var setConfigEnv = (config) => {
|
|
|
1489
1325
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1490
1326
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1491
1327
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
1492
|
-
|
|
1328
|
+
_chunkZ2WQB55Rjs.getLogLevel.call(void 0, config.logLevel) >= _chunkZ2WQB55Rjs.LogLevel.DEBUG ? true : false
|
|
1493
1329
|
);
|
|
1494
|
-
process.env.RUST_BACKTRACE =
|
|
1330
|
+
process.env.RUST_BACKTRACE = _chunkZ2WQB55Rjs.getLogLevel.call(void 0, config.logLevel) >= _chunkZ2WQB55Rjs.LogLevel.DEBUG ? "full" : "none";
|
|
1495
1331
|
}
|
|
1496
1332
|
if (config.skipConfigLogging !== void 0) {
|
|
1497
1333
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -1506,7 +1342,7 @@ var setConfigEnv = (config) => {
|
|
|
1506
1342
|
}
|
|
1507
1343
|
};
|
|
1508
1344
|
var setThemeColorsEnv = (prefix, config) => {
|
|
1509
|
-
return _optionalChain([config, 'optionalAccess',
|
|
1345
|
+
return _optionalChain([config, 'optionalAccess', _29 => _29.light, 'optionalAccess', _30 => _30.brand]) || _optionalChain([config, 'optionalAccess', _31 => _31.dark, 'optionalAccess', _32 => _32.brand]) ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
1510
1346
|
};
|
|
1511
1347
|
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
1512
1348
|
if (config.dark) {
|
|
@@ -1618,7 +1454,7 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
|
1618
1454
|
var _static_cache = void 0;
|
|
1619
1455
|
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
1620
1456
|
let result;
|
|
1621
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
1457
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _33 => _33.data]) || !_optionalChain([_static_cache, 'optionalAccess', _34 => _34.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1622
1458
|
let _workspaceRoot = workspaceRoot;
|
|
1623
1459
|
if (!_workspaceRoot) {
|
|
1624
1460
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -1627,7 +1463,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1627
1463
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1628
1464
|
if (!configFile) {
|
|
1629
1465
|
if (!skipLogs) {
|
|
1630
|
-
|
|
1466
|
+
_chunkZ2WQB55Rjs.writeWarning.call(void 0,
|
|
1631
1467
|
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
1632
1468
|
{ logLevel: "all" }
|
|
1633
1469
|
);
|
|
@@ -1643,7 +1479,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1643
1479
|
defaultConfig
|
|
1644
1480
|
);
|
|
1645
1481
|
if (!configInput.variant) {
|
|
1646
|
-
configInput.variant = _fs.existsSync.call(void 0, joinPaths(_workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, joinPaths(_workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, joinPaths(_workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, joinPaths(_workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
|
|
1482
|
+
configInput.variant = _fs.existsSync.call(void 0, _chunkZ2WQB55Rjs.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunkZ2WQB55Rjs.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunkZ2WQB55Rjs.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunkZ2WQB55Rjs.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
|
|
1647
1483
|
}
|
|
1648
1484
|
try {
|
|
1649
1485
|
result = applyDefaultConfig(
|
|
@@ -1652,9 +1488,9 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1652
1488
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1653
1489
|
} catch (error) {
|
|
1654
1490
|
throw new Error(
|
|
1655
|
-
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess',
|
|
1491
|
+
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _35 => _35.message]) ? `: ${error.message}` : ""}
|
|
1656
1492
|
|
|
1657
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
1493
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkZ2WQB55Rjs.formatLogMessage.call(void 0,
|
|
1658
1494
|
configInput
|
|
1659
1495
|
)}`,
|
|
1660
1496
|
{
|
|
@@ -1699,9 +1535,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
1699
1535
|
);
|
|
1700
1536
|
setConfigEnv(config);
|
|
1701
1537
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1702
|
-
|
|
1538
|
+
_chunkZ2WQB55Rjs.writeTrace.call(void 0,
|
|
1703
1539
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1704
|
-
${
|
|
1540
|
+
${_chunkZ2WQB55Rjs.formatLogMessage.call(void 0, config)}`,
|
|
1705
1541
|
config
|
|
1706
1542
|
);
|
|
1707
1543
|
}
|
|
@@ -1726,8 +1562,4 @@ function getWorkspaceConfig(skipLogs = true, options = {}) {
|
|
|
1726
1562
|
|
|
1727
1563
|
|
|
1728
1564
|
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.isAbsolute = isAbsolute; exports.relative = relative; exports.findWorkspaceRoot = findWorkspaceRoot; exports.schemaRegistry = schemaRegistry; exports.workspaceConfigSchema = workspaceConfigSchema; exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig;
|
|
1565
|
+
exports.findWorkspaceRoot = findWorkspaceRoot; exports.schemaRegistry = schemaRegistry; exports.workspaceConfigSchema = workspaceConfigSchema; exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig;
|
|
@@ -297,6 +297,176 @@ var _isFunction = (value) => {
|
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
299
|
|
|
300
|
+
// ../config-tools/src/utilities/correct-paths.ts
|
|
301
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
302
|
+
function normalizeWindowsPath(input = "") {
|
|
303
|
+
if (!input) {
|
|
304
|
+
return input;
|
|
305
|
+
}
|
|
306
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
307
|
+
}
|
|
308
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
309
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
310
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
311
|
+
var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
312
|
+
var correctPaths = function(path) {
|
|
313
|
+
if (!path || path.length === 0) {
|
|
314
|
+
return ".";
|
|
315
|
+
}
|
|
316
|
+
path = normalizeWindowsPath(path);
|
|
317
|
+
const isUNCPath = _optionalChain([path, 'optionalAccess', _27 => _27.match, 'call', _28 => _28(_UNC_REGEX)]);
|
|
318
|
+
const isPathAbsolute = isAbsolute(path);
|
|
319
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
320
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
321
|
+
if (path.length === 0) {
|
|
322
|
+
if (isPathAbsolute) {
|
|
323
|
+
return "/";
|
|
324
|
+
}
|
|
325
|
+
return trailingSeparator ? "./" : ".";
|
|
326
|
+
}
|
|
327
|
+
if (trailingSeparator) {
|
|
328
|
+
path += "/";
|
|
329
|
+
}
|
|
330
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
331
|
+
path += "/";
|
|
332
|
+
}
|
|
333
|
+
if (isUNCPath) {
|
|
334
|
+
if (!isPathAbsolute) {
|
|
335
|
+
return `//./${path}`;
|
|
336
|
+
}
|
|
337
|
+
return `//${path}`;
|
|
338
|
+
}
|
|
339
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
340
|
+
};
|
|
341
|
+
var joinPaths = function(...segments) {
|
|
342
|
+
let path = "";
|
|
343
|
+
for (const seg of segments) {
|
|
344
|
+
if (!seg) {
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
if (path.length > 0) {
|
|
348
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
349
|
+
const segLeading = seg[0] === "/";
|
|
350
|
+
const both = pathTrailing && segLeading;
|
|
351
|
+
if (both) {
|
|
352
|
+
path += seg.slice(1);
|
|
353
|
+
} else {
|
|
354
|
+
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
355
|
+
}
|
|
356
|
+
} else {
|
|
357
|
+
path += seg;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return correctPaths(path);
|
|
361
|
+
};
|
|
362
|
+
function cwd() {
|
|
363
|
+
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
364
|
+
return process.cwd().replace(/\\/g, "/");
|
|
365
|
+
}
|
|
366
|
+
return "/";
|
|
367
|
+
}
|
|
368
|
+
var resolve = function(...arguments_) {
|
|
369
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
370
|
+
let resolvedPath = "";
|
|
371
|
+
let resolvedAbsolute = false;
|
|
372
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
373
|
+
const path = index >= 0 ? arguments_[index] : cwd();
|
|
374
|
+
if (!path || path.length === 0) {
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
378
|
+
resolvedAbsolute = isAbsolute(path);
|
|
379
|
+
}
|
|
380
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
381
|
+
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
382
|
+
return `/${resolvedPath}`;
|
|
383
|
+
}
|
|
384
|
+
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
385
|
+
};
|
|
386
|
+
function normalizeString(path, allowAboveRoot) {
|
|
387
|
+
let res = "";
|
|
388
|
+
let lastSegmentLength = 0;
|
|
389
|
+
let lastSlash = -1;
|
|
390
|
+
let dots = 0;
|
|
391
|
+
let char = null;
|
|
392
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
393
|
+
if (index < path.length) {
|
|
394
|
+
char = path[index];
|
|
395
|
+
} else if (char === "/") {
|
|
396
|
+
break;
|
|
397
|
+
} else {
|
|
398
|
+
char = "/";
|
|
399
|
+
}
|
|
400
|
+
if (char === "/") {
|
|
401
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
402
|
+
} else if (dots === 2) {
|
|
403
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
404
|
+
if (res.length > 2) {
|
|
405
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
406
|
+
if (lastSlashIndex === -1) {
|
|
407
|
+
res = "";
|
|
408
|
+
lastSegmentLength = 0;
|
|
409
|
+
} else {
|
|
410
|
+
res = res.slice(0, lastSlashIndex);
|
|
411
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
412
|
+
}
|
|
413
|
+
lastSlash = index;
|
|
414
|
+
dots = 0;
|
|
415
|
+
continue;
|
|
416
|
+
} else if (res.length > 0) {
|
|
417
|
+
res = "";
|
|
418
|
+
lastSegmentLength = 0;
|
|
419
|
+
lastSlash = index;
|
|
420
|
+
dots = 0;
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (allowAboveRoot) {
|
|
425
|
+
res += res.length > 0 ? "/.." : "..";
|
|
426
|
+
lastSegmentLength = 2;
|
|
427
|
+
}
|
|
428
|
+
} else {
|
|
429
|
+
if (res.length > 0) {
|
|
430
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
431
|
+
} else {
|
|
432
|
+
res = path.slice(lastSlash + 1, index);
|
|
433
|
+
}
|
|
434
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
435
|
+
}
|
|
436
|
+
lastSlash = index;
|
|
437
|
+
dots = 0;
|
|
438
|
+
} else if (char === "." && dots !== -1) {
|
|
439
|
+
++dots;
|
|
440
|
+
} else {
|
|
441
|
+
dots = -1;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
return res;
|
|
445
|
+
}
|
|
446
|
+
var isAbsolute = function(p) {
|
|
447
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
448
|
+
};
|
|
449
|
+
var relative = function(from, to) {
|
|
450
|
+
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
451
|
+
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
452
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
453
|
+
return _to.join("/");
|
|
454
|
+
}
|
|
455
|
+
const _fromCopy = [..._from];
|
|
456
|
+
for (const segment of _fromCopy) {
|
|
457
|
+
if (_to[0] !== segment) {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
_from.shift();
|
|
461
|
+
_to.shift();
|
|
462
|
+
}
|
|
463
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
300
470
|
|
|
301
471
|
|
|
302
472
|
|
|
@@ -310,4 +480,4 @@ var _isFunction = (value) => {
|
|
|
310
480
|
|
|
311
481
|
|
|
312
482
|
|
|
313
|
-
exports.LogLevel = LogLevel; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
|
|
483
|
+
exports.LogLevel = LogLevel; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.isAbsolute = isAbsolute; exports.relative = relative;
|
package/dist/executors.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { C as CloudflarePublishExecutorSchema } from './schema.d-DgA16PUG.mjs';
|
|
2
|
-
export { R as R2UploadPublishExecutorSchema } from './schema.d-
|
|
2
|
+
export { R as R2UploadPublishExecutorSchema } from './schema.d-Dcq3Apw7.mjs';
|
package/dist/executors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { C as CloudflarePublishExecutorSchema } from './schema.d-DgA16PUG.js';
|
|
2
|
-
export { R as R2UploadPublishExecutorSchema } from './schema.d-
|
|
2
|
+
export { R as R2UploadPublishExecutorSchema } from './schema.d-Dcq3Apw7.js';
|
package/dist/executors.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";require('./chunk-XO66D74Z.js');
|
|
2
2
|
require('./chunk-IRORGRVZ.js');
|
|
3
|
-
require('./chunk-
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
require('./chunk-EKIV24FH.js');
|
|
4
|
+
require('./chunk-BAINZIOH.js');
|
|
5
|
+
require('./chunk-UAKLE2QO.js');
|
|
6
6
|
require('./chunk-NU34IEWN.js');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-VKMAYBQX.js');
|
|
8
|
+
require('./chunk-Z2WQB55R.js');
|
|
9
9
|
require('./chunk-MCKGQKYU.js');
|