clawfire 0.6.11 → 0.6.13

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/dist/cli.js CHANGED
@@ -269,7 +269,7 @@ async function runDevServer() {
269
269
  const port = portArg ? parseInt(portArg.split("=")[1], 10) : 3e3;
270
270
  const apiPort = apiPortArg ? parseInt(apiPortArg.split("=")[1], 10) : 3456;
271
271
  const noHotReload = args.includes("--no-hot-reload");
272
- const { startDevServer } = await import("./dev-server-FNRFWJD3.js");
272
+ const { startDevServer } = await import("./dev-server-O6MKAB6R.js");
273
273
  await startDevServer({
274
274
  projectDir,
275
275
  port,
@@ -3113,14 +3113,11 @@ var FirebaseSetup = class {
3113
3113
  if (!existsSync5(pkgPath)) {
3114
3114
  return { success: false, message: "functions/package.json not found." };
3115
3115
  }
3116
- const nodeModulesPath = resolve4(functionsDir, "node_modules");
3117
- if (!existsSync5(nodeModulesPath)) {
3118
- try {
3119
- await this.execTimeout("npm", ["install"], 12e4, functionsDir);
3120
- } catch (err) {
3121
- const msg = err instanceof Error ? err.message : "Unknown error";
3122
- return { success: false, message: `npm install in functions/ failed: ${msg}` };
3123
- }
3116
+ try {
3117
+ await this.execTimeout("npm", ["install"], 12e4, functionsDir);
3118
+ } catch (err) {
3119
+ const msg = err instanceof Error ? err.message : "Unknown error";
3120
+ return { success: false, message: `npm install in functions/ failed: ${msg}` };
3124
3121
  }
3125
3122
  try {
3126
3123
  const pkg = JSON.parse(readFileSync4(pkgPath, "utf-8"));
@@ -4607,9 +4604,18 @@ ${liveReloadScript}
4607
4604
  steps.push("Functions build failed \u2014 hosting only");
4608
4605
  }
4609
4606
  }
4610
- const targets = deployFunctions ? "hosting,functions" : "hosting";
4607
+ let targets = deployFunctions ? "hosting,functions" : "hosting";
4611
4608
  console.log(` Deploying ${targets}...`);
4612
- const result = await this.firebaseSetup.deployHosting(targets);
4609
+ let result = await this.firebaseSetup.deployHosting(targets);
4610
+ if (!result.success && deployFunctions) {
4611
+ const msg = result.message.toLowerCase();
4612
+ if (msg.includes("blaze") || msg.includes("pay-as-you-go") || msg.includes("upgrade") || msg.includes("billing") || msg.includes("artifactregistry")) {
4613
+ console.log(" \x1B[33m\u26A0\x1B[0m Functions require Blaze plan. Deploying hosting only...");
4614
+ steps.push("Functions skipped (requires Blaze plan)");
4615
+ targets = "hosting";
4616
+ result = await this.firebaseSetup.deployHosting(targets);
4617
+ }
4618
+ }
4613
4619
  clearFirebaseStatusCache();
4614
4620
  sendJson({
4615
4621
  ...result,
package/dist/dev.cjs CHANGED
@@ -3525,14 +3525,11 @@ var FirebaseSetup = class {
3525
3525
  if (!(0, import_node_fs4.existsSync)(pkgPath)) {
3526
3526
  return { success: false, message: "functions/package.json not found." };
3527
3527
  }
3528
- const nodeModulesPath = (0, import_node_path4.resolve)(functionsDir, "node_modules");
3529
- if (!(0, import_node_fs4.existsSync)(nodeModulesPath)) {
3530
- try {
3531
- await this.execTimeout("npm", ["install"], 12e4, functionsDir);
3532
- } catch (err) {
3533
- const msg = err instanceof Error ? err.message : "Unknown error";
3534
- return { success: false, message: `npm install in functions/ failed: ${msg}` };
3535
- }
3528
+ try {
3529
+ await this.execTimeout("npm", ["install"], 12e4, functionsDir);
3530
+ } catch (err) {
3531
+ const msg = err instanceof Error ? err.message : "Unknown error";
3532
+ return { success: false, message: `npm install in functions/ failed: ${msg}` };
3536
3533
  }
3537
3534
  try {
3538
3535
  const pkg = JSON.parse((0, import_node_fs4.readFileSync)(pkgPath, "utf-8"));
@@ -5019,9 +5016,18 @@ ${liveReloadScript}
5019
5016
  steps.push("Functions build failed \u2014 hosting only");
5020
5017
  }
5021
5018
  }
5022
- const targets = deployFunctions ? "hosting,functions" : "hosting";
5019
+ let targets = deployFunctions ? "hosting,functions" : "hosting";
5023
5020
  console.log(` Deploying ${targets}...`);
5024
- const result = await this.firebaseSetup.deployHosting(targets);
5021
+ let result = await this.firebaseSetup.deployHosting(targets);
5022
+ if (!result.success && deployFunctions) {
5023
+ const msg = result.message.toLowerCase();
5024
+ if (msg.includes("blaze") || msg.includes("pay-as-you-go") || msg.includes("upgrade") || msg.includes("billing") || msg.includes("artifactregistry")) {
5025
+ console.log(" \x1B[33m\u26A0\x1B[0m Functions require Blaze plan. Deploying hosting only...");
5026
+ steps.push("Functions skipped (requires Blaze plan)");
5027
+ targets = "hosting";
5028
+ result = await this.firebaseSetup.deployHosting(targets);
5029
+ }
5030
+ }
5025
5031
  clearFirebaseStatusCache();
5026
5032
  sendJson({
5027
5033
  ...result,