@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.
Files changed (50) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{chunk-7ESZB4KW.mjs → chunk-4EEXR4IG.mjs} +10 -11
  3. package/dist/chunk-5CMG7SUH.mjs +43 -0
  4. package/dist/{chunk-TUJUSMGX.mjs → chunk-AOKOPGTD.mjs} +4 -4
  5. package/dist/{chunk-VHMJXOF4.js → chunk-BAINZIOH.js} +24 -25
  6. package/dist/{chunk-W5IPHIXB.js → chunk-EKIV24FH.js} +165 -165
  7. package/dist/{chunk-NEODNLL5.js → chunk-GPR55JRG.js} +4 -4
  8. package/dist/{chunk-HQWL5NAU.js → chunk-I7SRDPE3.js} +12 -12
  9. package/dist/{chunk-C6B32MBV.mjs → chunk-NYGOCQMG.mjs} +6 -6
  10. package/dist/{chunk-PTTJW7MW.mjs → chunk-SGTAZO2Q.mjs} +3 -171
  11. package/dist/{chunk-6MATO2MJ.mjs → chunk-TPNHSNNZ.mjs} +171 -1
  12. package/dist/{chunk-FFOLWRMA.js → chunk-UAKLE2QO.js} +11 -12
  13. package/dist/{chunk-5YJKWRBZ.mjs → chunk-UXRPB254.mjs} +3 -3
  14. package/dist/{chunk-EQXEFXCV.js → chunk-VKMAYBQX.js} +48 -216
  15. package/dist/{chunk-4BWM53AA.js → chunk-Z2WQB55R.js} +171 -1
  16. package/dist/executors.d.mts +1 -1
  17. package/dist/executors.d.ts +1 -1
  18. package/dist/executors.js +5 -5
  19. package/dist/executors.mjs +5 -5
  20. package/dist/generators.js +5 -5
  21. package/dist/generators.mjs +4 -4
  22. package/dist/index.d.mts +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +8 -8
  25. package/dist/index.mjs +7 -7
  26. package/dist/{schema.d-elsO8UQp.d.mts → schema.d-Dcq3Apw7.d.mts} +2 -2
  27. package/dist/{schema.d-elsO8UQp.d.ts → schema.d-Dcq3Apw7.d.ts} +2 -2
  28. package/dist/src/executors/cloudflare-publish/executor.js +3 -3
  29. package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
  30. package/dist/src/executors/r2-upload-publish/executor.d.mts +1 -1
  31. package/dist/src/executors/r2-upload-publish/executor.d.ts +1 -1
  32. package/dist/src/executors/r2-upload-publish/executor.js +5 -5
  33. package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
  34. package/dist/src/executors/r2-upload-publish/schema.d.ts +2 -2
  35. package/dist/src/executors/r2-upload-publish/schema.json +2 -2
  36. package/dist/src/executors/serve/executor.js +4 -4
  37. package/dist/src/executors/serve/executor.mjs +3 -3
  38. package/dist/src/generators/init/generator.js +2 -2
  39. package/dist/src/generators/init/generator.mjs +1 -1
  40. package/dist/src/generators/worker/generator.js +5 -5
  41. package/dist/src/generators/worker/generator.mjs +4 -4
  42. package/dist/src/utils/index.js +3 -3
  43. package/dist/src/utils/index.mjs +2 -2
  44. package/dist/src/utils/r2-bucket-helpers.d.mts +21 -2
  45. package/dist/src/utils/r2-bucket-helpers.d.ts +21 -2
  46. package/dist/src/utils/r2-bucket-helpers.js +3 -3
  47. package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
  48. package/docs/api/executors/r2-upload-publish/schema.md +2 -2
  49. package/package.json +5 -5
  50. package/dist/chunk-5N2NVDKX.mjs +0 -44
@@ -7,7 +7,7 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
7
7
  "package.json"(exports, module) {
8
8
  module.exports = {
9
9
  name: "@storm-software/cloudflare-tools",
10
- version: "0.71.1",
10
+ version: "0.71.2",
11
11
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
12
12
  repository: {
13
13
  type: "github",
@@ -136,9 +136,9 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
136
136
  "@nx/js": "catalog:",
137
137
  "@nx/node": "catalog:",
138
138
  "@nx/web": "catalog:",
139
- "@storm-software/config": "1.134.52",
140
- "@storm-software/config-tools": "1.188.52",
141
- "@storm-software/workspace-tools": "1.293.22",
139
+ "@storm-software/config": "1.134.53",
140
+ "@storm-software/config-tools": "1.188.53",
141
+ "@storm-software/workspace-tools": "1.293.23",
142
142
  nx: "catalog:",
143
143
  tsup: "catalog:",
144
144
  wrangler: ">=3.58.0"
@@ -1,10 +1,10 @@
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 _chunkNEODNLL5js = require('./chunk-NEODNLL5.js');
3
+ var _chunkGPR55JRGjs = require('./chunk-GPR55JRG.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkEQXEFXCVjs = require('./chunk-EQXEFXCV.js');
7
+ var _chunkVKMAYBQXjs = require('./chunk-VKMAYBQX.js');
8
8
 
9
9
 
10
10
 
@@ -12,7 +12,7 @@ var _chunkEQXEFXCVjs = require('./chunk-EQXEFXCV.js');
12
12
 
13
13
 
14
14
 
15
- var _chunk4BWM53AAjs = require('./chunk-4BWM53AA.js');
15
+ var _chunkZ2WQB55Rjs = require('./chunk-Z2WQB55R.js');
16
16
 
17
17
  // src/generators/worker/generator.ts
18
18
 
@@ -45,20 +45,20 @@ var vitestScript = `"test": "vitest run"`;
45
45
 
46
46
  // src/generators/worker/generator.ts
47
47
  async function applicationGenerator(tree, schema) {
48
- const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, "Storm Worker generator");
48
+ const stopwatch = _chunkZ2WQB55Rjs.getStopwatch.call(void 0, "Storm Worker generator");
49
49
  let config;
50
50
  try {
51
- _chunk4BWM53AAjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
51
+ _chunkZ2WQB55Rjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
52
52
 
53
53
  `, config);
54
- const workspaceRoot = _chunkEQXEFXCVjs.findWorkspaceRoot.call(void 0, );
55
- _chunk4BWM53AAjs.writeDebug.call(void 0,
54
+ const workspaceRoot = _chunkVKMAYBQXjs.findWorkspaceRoot.call(void 0, );
55
+ _chunkZ2WQB55Rjs.writeDebug.call(void 0,
56
56
  `Loading the Storm Config from environment variables and storm.json file...
57
57
  - workspaceRoot: ${workspaceRoot}`,
58
58
  config
59
59
  );
60
- config = await _chunkEQXEFXCVjs.getConfig.call(void 0, workspaceRoot);
61
- _chunk4BWM53AAjs.writeTrace.call(void 0,
60
+ config = await _chunkVKMAYBQXjs.getConfig.call(void 0, workspaceRoot);
61
+ _chunkZ2WQB55Rjs.writeTrace.call(void 0,
62
62
  `Loaded Storm config into env:
63
63
  ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
64
64
  config
@@ -66,7 +66,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
66
66
  const options = await normalizeOptions(tree, schema, config);
67
67
  const tasks = [];
68
68
  tasks.push(
69
- await _chunkNEODNLL5js.generator_default.call(void 0, tree, {
69
+ await _chunkGPR55JRGjs.generator_default.call(void 0, tree, {
70
70
  ...options,
71
71
  skipFormat: true
72
72
  })
@@ -134,11 +134,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
134
134
  return _devkit.runTasksInSerial.call(void 0, ...tasks);
135
135
  } catch (error) {
136
136
  return () => {
137
- _chunk4BWM53AAjs.writeFatal.call(void 0,
137
+ _chunkZ2WQB55Rjs.writeFatal.call(void 0,
138
138
  "A fatal error occurred while running the generator - the process was forced to terminate",
139
139
  config
140
140
  );
141
- _chunk4BWM53AAjs.writeError.call(void 0,
141
+ _chunkZ2WQB55Rjs.writeError.call(void 0,
142
142
  `An exception was thrown in the generator's process
143
143
  - Details: ${error.message}
144
144
  - Stacktrace: ${error.stack}`,
@@ -3,19 +3,19 @@ import {
3
3
  addProjectTag
4
4
  } from "./chunk-PH3DHY4Q.mjs";
5
5
  import {
6
- correctPaths,
7
6
  findWorkspaceRoot,
8
7
  getConfig,
9
8
  getWorkspaceConfig,
10
- isAbsolute,
11
- joinPaths,
12
- relative,
13
9
  schemaRegistry,
14
10
  workspaceConfigSchema
15
- } from "./chunk-PTTJW7MW.mjs";
11
+ } from "./chunk-SGTAZO2Q.mjs";
16
12
  import {
13
+ correctPaths,
17
14
  formatLogMessage,
18
15
  getStopwatch,
16
+ isAbsolute,
17
+ joinPaths,
18
+ relative,
19
19
  writeDebug,
20
20
  writeError,
21
21
  writeFatal,
@@ -23,7 +23,7 @@ import {
23
23
  writeSuccess,
24
24
  writeTrace,
25
25
  writeWarning
26
- } from "./chunk-6MATO2MJ.mjs";
26
+ } from "./chunk-TPNHSNNZ.mjs";
27
27
  import {
28
28
  __dirname
29
29
  } from "./chunk-QN6OKPMU.mjs";
@@ -1,177 +1,13 @@
1
1
  import {
2
2
  LogLevel,
3
+ correctPaths,
3
4
  formatLogMessage,
4
5
  getLogLevel,
5
6
  getLogLevelLabel,
7
+ joinPaths,
6
8
  writeTrace,
7
9
  writeWarning
8
- } from "./chunk-6MATO2MJ.mjs";
9
-
10
- // ../config-tools/src/utilities/correct-paths.ts
11
- var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
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 = path?.match(_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
- };
10
+ } from "./chunk-TPNHSNNZ.mjs";
175
11
 
176
12
  // ../config-tools/src/utilities/find-up.ts
177
13
  import { existsSync } from "node:fs";
@@ -1721,10 +1557,6 @@ function getWorkspaceConfig(skipLogs = true, options = {}) {
1721
1557
  }
1722
1558
 
1723
1559
  export {
1724
- correctPaths,
1725
- joinPaths,
1726
- isAbsolute,
1727
- relative,
1728
1560
  findWorkspaceRoot,
1729
1561
  schemaRegistry,
1730
1562
  workspaceConfigSchema,
@@ -297,6 +297,172 @@ 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 = path?.match(_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
+
300
466
  export {
301
467
  LogLevel,
302
468
  getLogLevel,
@@ -309,5 +475,9 @@ export {
309
475
  writeDebug,
310
476
  writeTrace,
311
477
  getStopwatch,
312
- formatLogMessage
478
+ formatLogMessage,
479
+ correctPaths,
480
+ joinPaths,
481
+ isAbsolute,
482
+ relative
313
483
  };
@@ -1,30 +1,29 @@
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 _chunk4BWM53AAjs = require('./chunk-4BWM53AA.js');
4
+
5
+ var _chunkZ2WQB55Rjs = require('./chunk-Z2WQB55R.js');
5
6
 
6
7
  // src/utils/r2-bucket-helpers.ts
7
8
  var _crypto = require('crypto');
8
- var r2UploadFile = async (client, bucketName, projectPath, fileName, version, fileContent, contentType = "text/plain", isDryRun = false) => {
9
- const checksum = _crypto.createHash.call(void 0, "sha256").update(fileContent).digest("base64");
10
- const fileKey = `${projectPath}/${fileName.startsWith("/") ? fileName.substring(1) : fileName}`;
11
- _chunk4BWM53AAjs.writeDebug.call(void 0, `Uploading file: ${fileKey}`);
9
+ async function r2UploadFile(client, bucketName, bucketPath, fileName, version, fileContent, contentType = "application/octet-stream", isDryRun = false) {
10
+ _chunkZ2WQB55Rjs.writeDebug.call(void 0, `Uploading file: ${_chunkZ2WQB55Rjs.joinPaths.call(void 0, bucketPath, fileName)}`);
12
11
  if (!isDryRun) {
13
12
  await client.putObject({
14
13
  Bucket: bucketName,
15
- Key: fileKey,
16
- Body: fileContent.replaceAll(' from "@cyclone-ui/', ' from "../'),
14
+ Key: _chunkZ2WQB55Rjs.joinPaths.call(void 0, bucketPath, fileName),
15
+ Body: fileContent,
17
16
  ContentType: contentType,
18
17
  Metadata: {
19
18
  version,
20
- checksum
19
+ checksum: _crypto.createHash.call(void 0, "sha256").update(fileContent).digest("base64")
21
20
  }
22
21
  });
23
22
  } else {
24
- _chunk4BWM53AAjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
23
+ _chunkZ2WQB55Rjs.writeWarning.call(void 0, "[Dry run]: Skipping upload to the R2 bucket.");
25
24
  }
26
- };
27
- var getInternalDependencies = (projectName, graph) => {
25
+ }
26
+ function getInternalDependencies(projectName, graph) {
28
27
  const allDeps = _nullishCoalesce(graph.dependencies[projectName], () => ( []));
29
28
  return Array.from(
30
29
  allDeps.reduce(
@@ -36,7 +35,7 @@ var getInternalDependencies = (projectName, graph) => {
36
35
  []
37
36
  )
38
37
  );
39
- };
38
+ }
40
39
 
41
40
 
42
41
 
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  generator_default
3
- } from "./chunk-TUJUSMGX.mjs";
3
+ } from "./chunk-AOKOPGTD.mjs";
4
4
  import {
5
5
  findWorkspaceRoot,
6
6
  getConfig
7
- } from "./chunk-PTTJW7MW.mjs";
7
+ } from "./chunk-SGTAZO2Q.mjs";
8
8
  import {
9
9
  getStopwatch,
10
10
  writeDebug,
@@ -12,7 +12,7 @@ import {
12
12
  writeFatal,
13
13
  writeInfo,
14
14
  writeTrace
15
- } from "./chunk-6MATO2MJ.mjs";
15
+ } from "./chunk-TPNHSNNZ.mjs";
16
16
  import {
17
17
  __dirname
18
18
  } from "./chunk-QN6OKPMU.mjs";