@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.
Files changed (2) hide show
  1. package/index.ts +17 -3
  2. 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(command: TemplateStringsArray, ...values: unknown[]) {
67
- const cmd = String.raw(command, ...values);
68
- return $`bunx wrangler ${cmd}`;
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@just-be/deploy",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Deploy static sites to Cloudflare R2 with subdomain routing",
5
5
  "type": "module",
6
6
  "bin": {