@just-be/deploy 0.6.0 → 0.7.0
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/index.ts +17 -3
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -62,10 +62,24 @@ const DEBUG = process.env.DEBUG === "1" || process.env.DEBUG === "true";
|
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Run wrangler command using bunx to ensure it resolves from package dependencies
|
|
65
|
+
* Splits command into array so each part is passed as a separate argument
|
|
65
66
|
*/
|
|
66
|
-
function wrangler(
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
function wrangler(strings: TemplateStringsArray, ...values: unknown[]) {
|
|
68
|
+
// Build an array by interleaving string parts and values
|
|
69
|
+
const parts = [];
|
|
70
|
+
for (let i = 0; i < strings.length; i++) {
|
|
71
|
+
// Split string part on whitespace and add non-empty parts
|
|
72
|
+
const words = strings[i].trim().split(/\s+/).filter(Boolean);
|
|
73
|
+
parts.push(...words);
|
|
74
|
+
|
|
75
|
+
// Add the value as a separate argument
|
|
76
|
+
if (i < values.length) {
|
|
77
|
+
parts.push(String(values[i]));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Bun's shell will treat array elements as separate arguments
|
|
82
|
+
return $`bunx wrangler ${parts}`;
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
/**
|