@base44-preview/cli 0.1.7-pr.584.c04fce8 → 0.1.7-pr.585.92ac4a7

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/index.js CHANGED
@@ -120385,7 +120385,7 @@ function skipVoid(str, ptr, banNewLines, banComments) {
120385
120385
  ptr++;
120386
120386
  return banComments || c24 !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines);
120387
120387
  }
120388
- function skipUntil(str, ptr, sep2, end, banNewLines = false) {
120388
+ function skipUntil(str, ptr, sep, end, banNewLines = false) {
120389
120389
  if (!end) {
120390
120390
  ptr = indexOfNewline(str, ptr);
120391
120391
  return ptr < 0 ? str.length : ptr;
@@ -120394,7 +120394,7 @@ function skipUntil(str, ptr, sep2, end, banNewLines = false) {
120394
120394
  let c24 = str[i5];
120395
120395
  if (c24 === "#") {
120396
120396
  i5 = indexOfNewline(str, i5);
120397
- } else if (c24 === sep2) {
120397
+ } else if (c24 === sep) {
120398
120398
  return i5 + 1;
120399
120399
  } else if (c24 === end || banNewLines && (c24 === `
120400
120400
  ` || c24 === "\r" && str[i5 + 1] === `
@@ -121174,7 +121174,7 @@ function getDataProtocolModuleFormat(parsed) {
121174
121174
  const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [null, null, null];
121175
121175
  return mimeToFormat(mime);
121176
121176
  }
121177
- function extname2(url3) {
121177
+ function extname(url3) {
121178
121178
  const pathname = url3.pathname;
121179
121179
  let index = pathname.length;
121180
121180
  while (index--) {
@@ -121189,7 +121189,7 @@ function extname2(url3) {
121189
121189
  return "";
121190
121190
  }
121191
121191
  function getFileProtocolModuleFormat(url3, _context, ignoreErrors) {
121192
- const value = extname2(url3);
121192
+ const value = extname(url3);
121193
121193
  if (value === ".js") {
121194
121194
  const packageType = getPackageType(url3);
121195
121195
  if (packageType !== "none") {
@@ -123904,14 +123904,14 @@ async function printToDoc(originalText, options8) {
123904
123904
  async function printDocToString2(doc2, options8) {
123905
123905
  return printDocToStringWithoutNormalizeOptions(doc2, await normalize_format_options_default(options8));
123906
123906
  }
123907
- function createParsersAndPrinters(modules2) {
123907
+ function createParsersAndPrinters(modules) {
123908
123908
  const parsers2 = /* @__PURE__ */ Object.create(null);
123909
123909
  const printers2 = /* @__PURE__ */ Object.create(null);
123910
123910
  for (const {
123911
123911
  importPlugin: importPlugin2,
123912
123912
  parsers: parserNames = [],
123913
123913
  printers: printerNames = []
123914
- } of modules2) {
123914
+ } of modules) {
123915
123915
  const loadPlugin2 = async () => {
123916
123916
  const plugin = await importPlugin2();
123917
123917
  Object.assign(parsers2, plugin.parsers);
@@ -138287,11 +138287,11 @@ var require_prettier = __commonJS((exports, module) => {
138287
138287
  var require_formatter = __commonJS((exports) => {
138288
138288
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
138289
138289
  function adopt(value) {
138290
- return value instanceof P9 ? value : new P9(function(resolve15) {
138291
- resolve15(value);
138290
+ return value instanceof P9 ? value : new P9(function(resolve13) {
138291
+ resolve13(value);
138292
138292
  });
138293
138293
  }
138294
- return new (P9 || (P9 = Promise))(function(resolve15, reject) {
138294
+ return new (P9 || (P9 = Promise))(function(resolve13, reject) {
138295
138295
  function fulfilled(value) {
138296
138296
  try {
138297
138297
  step(generator.next(value));
@@ -138307,7 +138307,7 @@ var require_formatter = __commonJS((exports) => {
138307
138307
  }
138308
138308
  }
138309
138309
  function step(result) {
138310
- result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
138310
+ result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
138311
138311
  }
138312
138312
  step((generator = generator.apply(thisArg, _arguments || [])).next());
138313
138313
  });
@@ -142960,7 +142960,7 @@ var require_url = __commonJS((exports) => {
142960
142960
  };
142961
142961
  Object.defineProperty(exports, "__esModule", { value: true });
142962
142962
  exports.parse = undefined;
142963
- exports.resolve = resolve15;
142963
+ exports.resolve = resolve13;
142964
142964
  exports.cwd = cwd;
142965
142965
  exports.getProtocol = getProtocol;
142966
142966
  exports.getExtension = getExtension;
@@ -142972,7 +142972,7 @@ var require_url = __commonJS((exports) => {
142972
142972
  exports.fromFileSystemPath = fromFileSystemPath;
142973
142973
  exports.toFileSystemPath = toFileSystemPath;
142974
142974
  exports.safePointerToPath = safePointerToPath;
142975
- exports.relative = relative5;
142975
+ exports.relative = relative4;
142976
142976
  var convert_path_to_posix_1 = __importDefault(require_convert_path_to_posix());
142977
142977
  var path_1 = __importStar(__require("path"));
142978
142978
  var forwardSlashPattern = /\//g;
@@ -142988,7 +142988,7 @@ var require_url = __commonJS((exports) => {
142988
142988
  var urlDecodePatterns = [/%23/g, "#", /%24/g, "$", /%26/g, "&", /%2C/g, ",", /%40/g, "@"];
142989
142989
  var parse11 = (u4) => new URL(u4);
142990
142990
  exports.parse = parse11;
142991
- function resolve15(from, to5) {
142991
+ function resolve13(from, to5) {
142992
142992
  const fromUrl = new URL((0, convert_path_to_posix_1.default)(from), "https://aaa.nonexistanturl.com");
142993
142993
  const resolvedUrl = new URL((0, convert_path_to_posix_1.default)(to5), fromUrl);
142994
142994
  const endSpaces = to5.match(/(\s*)$/)?.[1] || "";
@@ -143122,9 +143122,9 @@ var require_url = __commonJS((exports) => {
143122
143122
  return decodeURIComponent(value).replace(jsonPointerSlash, "/").replace(jsonPointerTilde, "~");
143123
143123
  });
143124
143124
  }
143125
- function relative5(from, to5) {
143125
+ function relative4(from, to5) {
143126
143126
  if (!isFileSystemPath(from) || !isFileSystemPath(to5)) {
143127
- return resolve15(from, to5);
143127
+ return resolve13(from, to5);
143128
143128
  }
143129
143129
  const fromDir = path_1.default.dirname(stripHash(from));
143130
143130
  const toPath4 = stripHash(to5);
@@ -143800,7 +143800,7 @@ var require_plugins = __commonJS((exports) => {
143800
143800
  let plugin;
143801
143801
  let lastError;
143802
143802
  let index = 0;
143803
- return new Promise((resolve15, reject) => {
143803
+ return new Promise((resolve13, reject) => {
143804
143804
  runNextPlugin();
143805
143805
  function runNextPlugin() {
143806
143806
  plugin = plugins[index++];
@@ -143828,7 +143828,7 @@ var require_plugins = __commonJS((exports) => {
143828
143828
  }
143829
143829
  }
143830
143830
  function onSuccess(result) {
143831
- resolve15({
143831
+ resolve13({
143832
143832
  plugin,
143833
143833
  result
143834
143834
  });
@@ -145161,11 +145161,11 @@ var require_lib3 = __commonJS((exports) => {
145161
145161
  var require_resolver = __commonJS((exports) => {
145162
145162
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
145163
145163
  function adopt(value) {
145164
- return value instanceof P9 ? value : new P9(function(resolve15) {
145165
- resolve15(value);
145164
+ return value instanceof P9 ? value : new P9(function(resolve13) {
145165
+ resolve13(value);
145166
145166
  });
145167
145167
  }
145168
- return new (P9 || (P9 = Promise))(function(resolve15, reject) {
145168
+ return new (P9 || (P9 = Promise))(function(resolve13, reject) {
145169
145169
  function fulfilled(value) {
145170
145170
  try {
145171
145171
  step(generator.next(value));
@@ -145181,7 +145181,7 @@ var require_resolver = __commonJS((exports) => {
145181
145181
  }
145182
145182
  }
145183
145183
  function step(result) {
145184
- result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
145184
+ result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
145185
145185
  }
145186
145186
  step((generator = generator.apply(thisArg, _arguments || [])).next());
145187
145187
  });
@@ -145302,11 +145302,11 @@ var require_optionValidator = __commonJS((exports) => {
145302
145302
  var require_src3 = __commonJS((exports) => {
145303
145303
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
145304
145304
  function adopt(value) {
145305
- return value instanceof P9 ? value : new P9(function(resolve15) {
145306
- resolve15(value);
145305
+ return value instanceof P9 ? value : new P9(function(resolve13) {
145306
+ resolve13(value);
145307
145307
  });
145308
145308
  }
145309
- return new (P9 || (P9 = Promise))(function(resolve15, reject) {
145309
+ return new (P9 || (P9 = Promise))(function(resolve13, reject) {
145310
145310
  function fulfilled(value) {
145311
145311
  try {
145312
145312
  step(generator.next(value));
@@ -145322,7 +145322,7 @@ var require_src3 = __commonJS((exports) => {
145322
145322
  }
145323
145323
  }
145324
145324
  function step(result) {
145325
- result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
145325
+ result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
145326
145326
  }
145327
145327
  step((generator = generator.apply(thisArg, _arguments || [])).next());
145328
145328
  });
@@ -146451,7 +146451,7 @@ var require_depd = __commonJS((exports, module) => {
146451
146451
  * Copyright(c) 2014-2018 Douglas Christopher Wilson
146452
146452
  * MIT Licensed
146453
146453
  */
146454
- var relative5 = __require("path").relative;
146454
+ var relative4 = __require("path").relative;
146455
146455
  module.exports = depd;
146456
146456
  var basePath = process.cwd();
146457
146457
  function containsNamespace(str, namespace) {
@@ -146647,7 +146647,7 @@ var require_depd = __commonJS((exports, module) => {
146647
146647
  return formatted;
146648
146648
  }
146649
146649
  function formatLocation(callSite) {
146650
- return relative5(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
146650
+ return relative4(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
146651
146651
  }
146652
146652
  function getStack() {
146653
146653
  var limit = Error.stackTraceLimit;
@@ -150643,7 +150643,7 @@ var require_dbcs_data = __commonJS((exports, module) => {
150643
150643
  // ../../node_modules/iconv-lite/encodings/index.js
150644
150644
  var require_encodings = __commonJS((exports, module) => {
150645
150645
  var mergeModules = require_merge_exports();
150646
- var modules2 = [
150646
+ var modules = [
150647
150647
  require_internal(),
150648
150648
  require_utf32(),
150649
150649
  require_utf16(),
@@ -150654,8 +150654,8 @@ var require_encodings = __commonJS((exports, module) => {
150654
150654
  require_dbcs_codec(),
150655
150655
  require_dbcs_data()
150656
150656
  ];
150657
- for (i5 = 0;i5 < modules2.length; i5++) {
150658
- module = modules2[i5];
150657
+ for (i5 = 0;i5 < modules.length; i5++) {
150658
+ module = modules[i5];
150659
150659
  mergeModules(exports, module);
150660
150660
  }
150661
150661
  var module;
@@ -150984,11 +150984,11 @@ var require_raw_body = __commonJS((exports, module) => {
150984
150984
  if (done) {
150985
150985
  return readStream(stream, encoding, length, limit, wrap(done));
150986
150986
  }
150987
- return new Promise(function executor(resolve15, reject) {
150987
+ return new Promise(function executor(resolve13, reject) {
150988
150988
  readStream(stream, encoding, length, limit, function onRead2(err, buf) {
150989
150989
  if (err)
150990
150990
  return reject(err);
150991
- resolve15(buf);
150991
+ resolve13(buf);
150992
150992
  });
150993
150993
  });
150994
150994
  }
@@ -160792,7 +160792,7 @@ var require_mime_types = __commonJS((exports) => {
160792
160792
  * MIT Licensed
160793
160793
  */
160794
160794
  var db2 = require_db();
160795
- var extname3 = __require("path").extname;
160795
+ var extname2 = __require("path").extname;
160796
160796
  var mimeScore = require_mimeScore();
160797
160797
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
160798
160798
  var TEXT_TYPE_REGEXP = /^text\//i;
@@ -160849,7 +160849,7 @@ var require_mime_types = __commonJS((exports) => {
160849
160849
  if (!path18 || typeof path18 !== "string") {
160850
160850
  return false;
160851
160851
  }
160852
- var extension2 = extname3("x." + path18).toLowerCase().slice(1);
160852
+ var extension2 = extname2("x." + path18).toLowerCase().slice(1);
160853
160853
  if (!extension2) {
160854
160854
  return false;
160855
160855
  }
@@ -164109,16 +164109,16 @@ var require_view = __commonJS((exports, module) => {
164109
164109
  var debug = require_src4()("express:view");
164110
164110
  var path18 = __require("node:path");
164111
164111
  var fs28 = __require("node:fs");
164112
- var dirname21 = path18.dirname;
164112
+ var dirname20 = path18.dirname;
164113
164113
  var basename6 = path18.basename;
164114
- var extname3 = path18.extname;
164114
+ var extname2 = path18.extname;
164115
164115
  var join29 = path18.join;
164116
- var resolve15 = path18.resolve;
164116
+ var resolve13 = path18.resolve;
164117
164117
  module.exports = View;
164118
164118
  function View(name2, options8) {
164119
164119
  var opts = options8 || {};
164120
164120
  this.defaultEngine = opts.defaultEngine;
164121
- this.ext = extname3(name2);
164121
+ this.ext = extname2(name2);
164122
164122
  this.name = name2;
164123
164123
  this.root = opts.root;
164124
164124
  if (!this.ext && !this.defaultEngine) {
@@ -164147,8 +164147,8 @@ var require_view = __commonJS((exports, module) => {
164147
164147
  debug('lookup "%s"', name2);
164148
164148
  for (var i5 = 0;i5 < roots.length && !path19; i5++) {
164149
164149
  var root2 = roots[i5];
164150
- var loc = resolve15(root2, name2);
164151
- var dir = dirname21(loc);
164150
+ var loc = resolve13(root2, name2);
164151
+ var dir = dirname20(loc);
164152
164152
  var file2 = basename6(loc);
164153
164153
  path19 = this.resolve(dir, file2);
164154
164154
  }
@@ -164172,16 +164172,16 @@ var require_view = __commonJS((exports, module) => {
164172
164172
  });
164173
164173
  sync = false;
164174
164174
  };
164175
- View.prototype.resolve = function resolve16(dir, file2) {
164175
+ View.prototype.resolve = function resolve14(dir, file2) {
164176
164176
  var ext = this.ext;
164177
164177
  var path19 = join29(dir, file2);
164178
- var stat4 = tryStat(path19);
164179
- if (stat4 && stat4.isFile()) {
164178
+ var stat3 = tryStat(path19);
164179
+ if (stat3 && stat3.isFile()) {
164180
164180
  return path19;
164181
164181
  }
164182
164182
  path19 = join29(dir, basename6(file2, ext), "index" + ext);
164183
- stat4 = tryStat(path19);
164184
- if (stat4 && stat4.isFile()) {
164183
+ stat3 = tryStat(path19);
164184
+ if (stat3 && stat3.isFile()) {
164185
164185
  return path19;
164186
164186
  }
164187
164187
  };
@@ -164232,9 +164232,9 @@ var require_etag = __commonJS((exports, module) => {
164232
164232
  }
164233
164233
  return obj && typeof obj === "object" && "ctime" in obj && toString2.call(obj.ctime) === "[object Date]" && "mtime" in obj && toString2.call(obj.mtime) === "[object Date]" && "ino" in obj && typeof obj.ino === "number" && "size" in obj && typeof obj.size === "number";
164234
164234
  }
164235
- function stattag(stat4) {
164236
- var mtime = stat4.mtime.getTime().toString(16);
164237
- var size = stat4.size.toString(16);
164235
+ function stattag(stat3) {
164236
+ var mtime = stat3.mtime.getTime().toString(16);
164237
+ var size = stat3.size.toString(16);
164238
164238
  return '"' + size + "-" + mtime + '"';
164239
164239
  }
164240
164240
  });
@@ -166331,7 +166331,7 @@ var require_application = __commonJS((exports, module) => {
166331
166331
  var compileETag = require_utils10().compileETag;
166332
166332
  var compileQueryParser = require_utils10().compileQueryParser;
166333
166333
  var compileTrust = require_utils10().compileTrust;
166334
- var resolve15 = __require("node:path").resolve;
166334
+ var resolve13 = __require("node:path").resolve;
166335
166335
  var once9 = require_once();
166336
166336
  var Router = require_router();
166337
166337
  var slice = Array.prototype.slice;
@@ -166385,7 +166385,7 @@ var require_application = __commonJS((exports, module) => {
166385
166385
  this.mountpath = "/";
166386
166386
  this.locals.settings = this.settings;
166387
166387
  this.set("view", View);
166388
- this.set("views", resolve15("views"));
166388
+ this.set("views", resolve13("views"));
166389
166389
  this.set("jsonp callback name", "callback");
166390
166390
  if (env4 === "production") {
166391
166391
  this.enable("view cache");
@@ -167873,11 +167873,11 @@ var require_send = __commonJS((exports, module) => {
167873
167873
  var statuses = require_statuses();
167874
167874
  var Stream2 = __require("stream");
167875
167875
  var util2 = __require("util");
167876
- var extname3 = path18.extname;
167876
+ var extname2 = path18.extname;
167877
167877
  var join29 = path18.join;
167878
167878
  var normalize2 = path18.normalize;
167879
- var resolve15 = path18.resolve;
167880
- var sep2 = path18.sep;
167879
+ var resolve13 = path18.resolve;
167880
+ var sep = path18.sep;
167881
167881
  var BYTES_RANGE_REGEXP = /^ *bytes=/;
167882
167882
  var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000;
167883
167883
  var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
@@ -167905,7 +167905,7 @@ var require_send = __commonJS((exports, module) => {
167905
167905
  this._maxage = opts.maxAge || opts.maxage;
167906
167906
  this._maxage = typeof this._maxage === "string" ? ms9(this._maxage) : Number(this._maxage);
167907
167907
  this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0;
167908
- this._root = opts.root ? resolve15(opts.root) : null;
167908
+ this._root = opts.root ? resolve13(opts.root) : null;
167909
167909
  }
167910
167910
  util2.inherits(SendStream, Stream2);
167911
167911
  SendStream.prototype.error = function error48(status, err) {
@@ -168038,14 +168038,14 @@ var require_send = __commonJS((exports, module) => {
168038
168038
  var parts;
168039
168039
  if (root2 !== null) {
168040
168040
  if (path19) {
168041
- path19 = normalize2("." + sep2 + path19);
168041
+ path19 = normalize2("." + sep + path19);
168042
168042
  }
168043
168043
  if (UP_PATH_REGEXP.test(path19)) {
168044
168044
  debug('malicious path "%s"', path19);
168045
168045
  this.error(403);
168046
168046
  return res;
168047
168047
  }
168048
- parts = path19.split(sep2);
168048
+ parts = path19.split(sep);
168049
168049
  path19 = normalize2(join29(root2, path19));
168050
168050
  } else {
168051
168051
  if (UP_PATH_REGEXP.test(path19)) {
@@ -168053,8 +168053,8 @@ var require_send = __commonJS((exports, module) => {
168053
168053
  this.error(403);
168054
168054
  return res;
168055
168055
  }
168056
- parts = normalize2(path19).split(sep2);
168057
- path19 = resolve15(path19);
168056
+ parts = normalize2(path19).split(sep);
168057
+ path19 = resolve13(path19);
168058
168058
  }
168059
168059
  if (containsDotFile(parts)) {
168060
168060
  debug('%s dotfile "%s"', this._dotfiles, path19);
@@ -168077,8 +168077,8 @@ var require_send = __commonJS((exports, module) => {
168077
168077
  this.sendFile(path19);
168078
168078
  return res;
168079
168079
  };
168080
- SendStream.prototype.send = function send2(path19, stat4) {
168081
- var len = stat4.size;
168080
+ SendStream.prototype.send = function send2(path19, stat3) {
168081
+ var len = stat3.size;
168082
168082
  var options8 = this.options;
168083
168083
  var opts = {};
168084
168084
  var res = this.res;
@@ -168090,7 +168090,7 @@ var require_send = __commonJS((exports, module) => {
168090
168090
  return;
168091
168091
  }
168092
168092
  debug('pipe "%s"', path19);
168093
- this.setHeader(path19, stat4);
168093
+ this.setHeader(path19, stat3);
168094
168094
  this.type(path19);
168095
168095
  if (this.isConditionalGET()) {
168096
168096
  if (this.isPreconditionFailure()) {
@@ -168147,19 +168147,19 @@ var require_send = __commonJS((exports, module) => {
168147
168147
  var i5 = 0;
168148
168148
  var self2 = this;
168149
168149
  debug('stat "%s"', path19);
168150
- fs28.stat(path19, function onstat(err, stat4) {
168151
- var pathEndsWithSep = path19[path19.length - 1] === sep2;
168152
- if (err && err.code === "ENOENT" && !extname3(path19) && !pathEndsWithSep) {
168150
+ fs28.stat(path19, function onstat(err, stat3) {
168151
+ var pathEndsWithSep = path19[path19.length - 1] === sep;
168152
+ if (err && err.code === "ENOENT" && !extname2(path19) && !pathEndsWithSep) {
168153
168153
  return next(err);
168154
168154
  }
168155
168155
  if (err)
168156
168156
  return self2.onStatError(err);
168157
- if (stat4.isDirectory())
168157
+ if (stat3.isDirectory())
168158
168158
  return self2.redirect(path19);
168159
168159
  if (pathEndsWithSep)
168160
168160
  return self2.error(404);
168161
- self2.emit("file", path19, stat4);
168162
- self2.send(path19, stat4);
168161
+ self2.emit("file", path19, stat3);
168162
+ self2.send(path19, stat3);
168163
168163
  });
168164
168164
  function next(err) {
168165
168165
  if (self2._extensions.length <= i5) {
@@ -168167,13 +168167,13 @@ var require_send = __commonJS((exports, module) => {
168167
168167
  }
168168
168168
  var p4 = path19 + "." + self2._extensions[i5++];
168169
168169
  debug('stat "%s"', p4);
168170
- fs28.stat(p4, function(err2, stat4) {
168170
+ fs28.stat(p4, function(err2, stat3) {
168171
168171
  if (err2)
168172
168172
  return next(err2);
168173
- if (stat4.isDirectory())
168173
+ if (stat3.isDirectory())
168174
168174
  return next();
168175
- self2.emit("file", p4, stat4);
168176
- self2.send(p4, stat4);
168175
+ self2.emit("file", p4, stat3);
168176
+ self2.send(p4, stat3);
168177
168177
  });
168178
168178
  }
168179
168179
  };
@@ -168188,13 +168188,13 @@ var require_send = __commonJS((exports, module) => {
168188
168188
  }
168189
168189
  var p4 = join29(path19, self2._index[i5]);
168190
168190
  debug('stat "%s"', p4);
168191
- fs28.stat(p4, function(err2, stat4) {
168191
+ fs28.stat(p4, function(err2, stat3) {
168192
168192
  if (err2)
168193
168193
  return next(err2);
168194
- if (stat4.isDirectory())
168194
+ if (stat3.isDirectory())
168195
168195
  return next();
168196
- self2.emit("file", p4, stat4);
168197
- self2.send(p4, stat4);
168196
+ self2.emit("file", p4, stat3);
168197
+ self2.send(p4, stat3);
168198
168198
  });
168199
168199
  }
168200
168200
  next();
@@ -168221,14 +168221,14 @@ var require_send = __commonJS((exports, module) => {
168221
168221
  var res = this.res;
168222
168222
  if (res.getHeader("Content-Type"))
168223
168223
  return;
168224
- var ext = extname3(path19);
168224
+ var ext = extname2(path19);
168225
168225
  var type2 = mime.contentType(ext) || "application/octet-stream";
168226
168226
  debug("content-type %s", type2);
168227
168227
  res.setHeader("Content-Type", type2);
168228
168228
  };
168229
- SendStream.prototype.setHeader = function setHeader(path19, stat4) {
168229
+ SendStream.prototype.setHeader = function setHeader(path19, stat3) {
168230
168230
  var res = this.res;
168231
- this.emit("headers", res, path19, stat4);
168231
+ this.emit("headers", res, path19, stat3);
168232
168232
  if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
168233
168233
  debug("accept ranges");
168234
168234
  res.setHeader("Accept-Ranges", "bytes");
@@ -168242,12 +168242,12 @@ var require_send = __commonJS((exports, module) => {
168242
168242
  res.setHeader("Cache-Control", cacheControl);
168243
168243
  }
168244
168244
  if (this._lastModified && !res.getHeader("Last-Modified")) {
168245
- var modified = stat4.mtime.toUTCString();
168245
+ var modified = stat3.mtime.toUTCString();
168246
168246
  debug("modified %s", modified);
168247
168247
  res.setHeader("Last-Modified", modified);
168248
168248
  }
168249
168249
  if (this._etag && !res.getHeader("ETag")) {
168250
- var val = etag(stat4);
168250
+ var val = etag(stat3);
168251
168251
  debug("etag %s", val);
168252
168252
  res.setHeader("ETag", val);
168253
168253
  }
@@ -168381,8 +168381,8 @@ var require_response = __commonJS((exports, module) => {
168381
168381
  var setCharset = require_utils10().setCharset;
168382
168382
  var cookie = require_cookie();
168383
168383
  var send = require_send();
168384
- var extname3 = path18.extname;
168385
- var resolve15 = path18.resolve;
168384
+ var extname2 = path18.extname;
168385
+ var resolve13 = path18.resolve;
168386
168386
  var vary = require_vary();
168387
168387
  var { Buffer: Buffer7 } = __require("node:buffer");
168388
168388
  var res = Object.create(http.ServerResponse.prototype);
@@ -168591,7 +168591,7 @@ var require_response = __commonJS((exports, module) => {
168591
168591
  }
168592
168592
  opts = Object.create(opts);
168593
168593
  opts.headers = headers;
168594
- var fullPath = !opts.root ? resolve15(path19) : path19;
168594
+ var fullPath = !opts.root ? resolve13(path19) : path19;
168595
168595
  return this.sendFile(fullPath, opts, done);
168596
168596
  };
168597
168597
  res.contentType = res.type = function contentType(type) {
@@ -168622,7 +168622,7 @@ var require_response = __commonJS((exports, module) => {
168622
168622
  };
168623
168623
  res.attachment = function attachment(filename) {
168624
168624
  if (filename) {
168625
- this.type(extname3(filename));
168625
+ this.type(extname2(filename));
168626
168626
  }
168627
168627
  this.set("Content-Disposition", contentDisposition(filename));
168628
168628
  return this;
@@ -168852,7 +168852,7 @@ var require_serve_static = __commonJS((exports, module) => {
168852
168852
  var encodeUrl = require_encodeurl();
168853
168853
  var escapeHtml = require_escape_html();
168854
168854
  var parseUrl = require_parseurl();
168855
- var resolve15 = __require("path").resolve;
168855
+ var resolve13 = __require("path").resolve;
168856
168856
  var send = require_send();
168857
168857
  var url3 = __require("url");
168858
168858
  module.exports = serveStatic;
@@ -168871,7 +168871,7 @@ var require_serve_static = __commonJS((exports, module) => {
168871
168871
  throw new TypeError("option setHeaders must be function");
168872
168872
  }
168873
168873
  opts.maxage = opts.maxage || opts.maxAge || 0;
168874
- opts.root = resolve15(root2);
168874
+ opts.root = resolve13(root2);
168875
168875
  var onDirectory = redirect ? createRedirectDirectoryListener() : createNotFoundDirectoryListener();
168876
168876
  return function serveStatic2(req, res, next) {
168877
168877
  if (req.method !== "GET" && req.method !== "HEAD") {
@@ -169795,8 +169795,8 @@ var require_follow_redirects = __commonJS((exports, module) => {
169795
169795
  }
169796
169796
  return parsed;
169797
169797
  }
169798
- function resolveUrl(relative5, base) {
169799
- return useNativeURL ? new URL2(relative5, base) : parseUrl(url3.resolve(base, relative5));
169798
+ function resolveUrl(relative4, base) {
169799
+ return useNativeURL ? new URL2(relative4, base) : parseUrl(url3.resolve(base, relative4));
169800
169800
  }
169801
169801
  function validateUrl(input) {
169802
169802
  if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -172245,8 +172245,8 @@ var require_executor = __commonJS((exports, module) => {
172245
172245
  }
172246
172246
  resetBuffer() {
172247
172247
  this.buffer = new Waterfall;
172248
- this.buffer.chain(new Promise((resolve15) => {
172249
- this._triggerBuffer = resolve15;
172248
+ this.buffer.chain(new Promise((resolve13) => {
172249
+ this._triggerBuffer = resolve13;
172250
172250
  }));
172251
172251
  if (this.ready)
172252
172252
  this._triggerBuffer();
@@ -173266,7 +173266,7 @@ var require_storage = __commonJS((exports, module) => {
173266
173266
  throw e8;
173267
173267
  }
173268
173268
  };
173269
- var writeFileLinesAsync = (filename, lines, mode = DEFAULT_FILE_MODE) => new Promise((resolve15, reject) => {
173269
+ var writeFileLinesAsync = (filename, lines, mode = DEFAULT_FILE_MODE) => new Promise((resolve13, reject) => {
173270
173270
  try {
173271
173271
  const stream = writeFileStream(filename, { mode });
173272
173272
  const readable2 = Readable6.from(lines);
@@ -173283,7 +173283,7 @@ var require_storage = __commonJS((exports, module) => {
173283
173283
  if (err)
173284
173284
  reject(err);
173285
173285
  else
173286
- resolve15();
173286
+ resolve13();
173287
173287
  });
173288
173288
  });
173289
173289
  readable2.on("error", (err) => {
@@ -173454,7 +173454,7 @@ var require_persistence = __commonJS((exports, module) => {
173454
173454
  return { data: tdata, indexes };
173455
173455
  }
173456
173456
  treatRawStreamAsync(rawStream) {
173457
- return new Promise((resolve15, reject) => {
173457
+ return new Promise((resolve13, reject) => {
173458
173458
  const dataById = {};
173459
173459
  const indexes = {};
173460
173460
  let corruptItems = 0;
@@ -173497,7 +173497,7 @@ var require_persistence = __commonJS((exports, module) => {
173497
173497
  }
173498
173498
  }
173499
173499
  const data = Object.values(dataById);
173500
- resolve15({ data, indexes });
173500
+ resolve13({ data, indexes });
173501
173501
  });
173502
173502
  lineStream.on("error", function(err) {
173503
173503
  reject(err, null);
@@ -183030,7 +183030,7 @@ var require_mime_types2 = __commonJS((exports) => {
183030
183030
  * MIT Licensed
183031
183031
  */
183032
183032
  var db2 = require_db2();
183033
- var extname3 = __require("path").extname;
183033
+ var extname2 = __require("path").extname;
183034
183034
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
183035
183035
  var TEXT_TYPE_REGEXP = /^text\//i;
183036
183036
  exports.charset = charset;
@@ -183085,7 +183085,7 @@ var require_mime_types2 = __commonJS((exports) => {
183085
183085
  if (!path18 || typeof path18 !== "string") {
183086
183086
  return false;
183087
183087
  }
183088
- var extension2 = extname3("x." + path18).toLowerCase().substr(1);
183088
+ var extension2 = extname2("x." + path18).toLowerCase().substr(1);
183089
183089
  if (!extension2) {
183090
183090
  return false;
183091
183091
  }
@@ -193077,7 +193077,7 @@ var require_mime_types3 = __commonJS((exports) => {
193077
193077
  * MIT Licensed
193078
193078
  */
193079
193079
  var db2 = require_db3();
193080
- var extname3 = __require("path").extname;
193080
+ var extname2 = __require("path").extname;
193081
193081
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
193082
193082
  var TEXT_TYPE_REGEXP = /^text\//i;
193083
193083
  exports.charset = charset;
@@ -193132,7 +193132,7 @@ var require_mime_types3 = __commonJS((exports) => {
193132
193132
  if (!path18 || typeof path18 !== "string") {
193133
193133
  return false;
193134
193134
  }
193135
- var extension2 = extname3("x." + path18).toLowerCase().substr(1);
193135
+ var extension2 = extname2("x." + path18).toLowerCase().substr(1);
193136
193136
  if (!extension2) {
193137
193137
  return false;
193138
193138
  }
@@ -199108,13 +199108,13 @@ var require_broadcast_operator = __commonJS((exports) => {
199108
199108
  return true;
199109
199109
  }
199110
199110
  emitWithAck(ev2, ...args) {
199111
- return new Promise((resolve15, reject) => {
199111
+ return new Promise((resolve13, reject) => {
199112
199112
  args.push((err, responses) => {
199113
199113
  if (err) {
199114
199114
  err.responses = responses;
199115
199115
  return reject(err);
199116
199116
  } else {
199117
- return resolve15(responses);
199117
+ return resolve13(responses);
199118
199118
  }
199119
199119
  });
199120
199120
  this.emit(ev2, ...args);
@@ -199302,12 +199302,12 @@ var require_socket2 = __commonJS((exports) => {
199302
199302
  }
199303
199303
  emitWithAck(ev2, ...args) {
199304
199304
  const withErr = this.flags.timeout !== undefined;
199305
- return new Promise((resolve15, reject) => {
199305
+ return new Promise((resolve13, reject) => {
199306
199306
  args.push((arg1, arg2) => {
199307
199307
  if (withErr) {
199308
- return arg1 ? reject(arg1) : resolve15(arg2);
199308
+ return arg1 ? reject(arg1) : resolve13(arg2);
199309
199309
  } else {
199310
- return resolve15(arg1);
199310
+ return resolve13(arg1);
199311
199311
  }
199312
199312
  });
199313
199313
  this.emit(ev2, ...args);
@@ -199762,13 +199762,13 @@ var require_namespace = __commonJS((exports) => {
199762
199762
  return true;
199763
199763
  }
199764
199764
  serverSideEmitWithAck(ev2, ...args) {
199765
- return new Promise((resolve15, reject) => {
199765
+ return new Promise((resolve13, reject) => {
199766
199766
  args.push((err, responses) => {
199767
199767
  if (err) {
199768
199768
  err.responses = responses;
199769
199769
  return reject(err);
199770
199770
  } else {
199771
- return resolve15(responses);
199771
+ return resolve13(responses);
199772
199772
  }
199773
199773
  });
199774
199774
  this.serverSideEmit(ev2, ...args);
@@ -203303,7 +203303,7 @@ var require_cluster_adapter = __commonJS((exports) => {
203303
203303
  return localSockets;
203304
203304
  }
203305
203305
  const requestId = randomId();
203306
- return new Promise((resolve15, reject) => {
203306
+ return new Promise((resolve13, reject) => {
203307
203307
  const timeout3 = setTimeout(() => {
203308
203308
  const storedRequest2 = this.requests.get(requestId);
203309
203309
  if (storedRequest2) {
@@ -203313,7 +203313,7 @@ var require_cluster_adapter = __commonJS((exports) => {
203313
203313
  }, opts.flags.timeout || DEFAULT_TIMEOUT);
203314
203314
  const storedRequest = {
203315
203315
  type: MessageType.FETCH_SOCKETS,
203316
- resolve: resolve15,
203316
+ resolve: resolve13,
203317
203317
  timeout: timeout3,
203318
203318
  current: 0,
203319
203319
  expected: expectedResponseCount,
@@ -203523,7 +203523,7 @@ var require_cluster_adapter = __commonJS((exports) => {
203523
203523
  return localSockets;
203524
203524
  }
203525
203525
  const requestId = randomId();
203526
- return new Promise((resolve15, reject) => {
203526
+ return new Promise((resolve13, reject) => {
203527
203527
  const timeout3 = setTimeout(() => {
203528
203528
  const storedRequest2 = this.customRequests.get(requestId);
203529
203529
  if (storedRequest2) {
@@ -203533,7 +203533,7 @@ var require_cluster_adapter = __commonJS((exports) => {
203533
203533
  }, opts.flags.timeout || DEFAULT_TIMEOUT);
203534
203534
  const storedRequest = {
203535
203535
  type: MessageType.FETCH_SOCKETS,
203536
- resolve: resolve15,
203536
+ resolve: resolve13,
203537
203537
  timeout: timeout3,
203538
203538
  missingUids: new Set([...this.nodesMap.keys()]),
203539
203539
  responses: localSockets
@@ -204262,13 +204262,13 @@ var require_dist4 = __commonJS((exports, module) => {
204262
204262
  this.engine.close();
204263
204263
  (0, uws_1.restoreAdapter)();
204264
204264
  if (this.httpServer) {
204265
- return new Promise((resolve15) => {
204265
+ return new Promise((resolve13) => {
204266
204266
  this.httpServer.close((err) => {
204267
204267
  fn9 && fn9(err);
204268
204268
  if (err) {
204269
204269
  debug("server was not running");
204270
204270
  }
204271
- resolve15();
204271
+ resolve13();
204272
204272
  });
204273
204273
  });
204274
204274
  } else {
@@ -213004,7 +213004,7 @@ var require_mime_types4 = __commonJS((exports) => {
213004
213004
  * MIT Licensed
213005
213005
  */
213006
213006
  var db2 = require_db4();
213007
- var extname3 = __require("path").extname;
213007
+ var extname2 = __require("path").extname;
213008
213008
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
213009
213009
  var TEXT_TYPE_REGEXP = /^text\//i;
213010
213010
  exports.charset = charset;
@@ -213059,7 +213059,7 @@ var require_mime_types4 = __commonJS((exports) => {
213059
213059
  if (!path18 || typeof path18 !== "string") {
213060
213060
  return false;
213061
213061
  }
213062
- var extension2 = extname3("x." + path18).toLowerCase().substr(1);
213062
+ var extension2 = extname2("x." + path18).toLowerCase().substr(1);
213063
213063
  if (!extension2) {
213064
213064
  return false;
213065
213065
  }
@@ -217391,8 +217391,8 @@ var require_mkdirp = __commonJS((exports, module) => {
217391
217391
  });
217392
217392
  break;
217393
217393
  default:
217394
- xfs.stat(p4, function(er22, stat4) {
217395
- if (er22 || !stat4.isDirectory())
217394
+ xfs.stat(p4, function(er22, stat3) {
217395
+ if (er22 || !stat3.isDirectory())
217396
217396
  cb2(er10, made);
217397
217397
  else
217398
217398
  cb2(null, made);
@@ -217423,13 +217423,13 @@ var require_mkdirp = __commonJS((exports, module) => {
217423
217423
  sync(p4, opts, made);
217424
217424
  break;
217425
217425
  default:
217426
- var stat4;
217426
+ var stat3;
217427
217427
  try {
217428
- stat4 = xfs.statSync(p4);
217428
+ stat3 = xfs.statSync(p4);
217429
217429
  } catch (err1) {
217430
217430
  throw err0;
217431
217431
  }
217432
- if (!stat4.isDirectory())
217432
+ if (!stat3.isDirectory())
217433
217433
  throw err0;
217434
217434
  break;
217435
217435
  }
@@ -218930,14 +218930,14 @@ var require_async_iterator = __commonJS((exports, module) => {
218930
218930
  };
218931
218931
  }
218932
218932
  function readAndResolve(iter) {
218933
- var resolve15 = iter[kLastResolve];
218934
- if (resolve15 !== null) {
218933
+ var resolve13 = iter[kLastResolve];
218934
+ if (resolve13 !== null) {
218935
218935
  var data = iter[kStream].read();
218936
218936
  if (data !== null) {
218937
218937
  iter[kLastPromise] = null;
218938
218938
  iter[kLastResolve] = null;
218939
218939
  iter[kLastReject] = null;
218940
- resolve15(createIterResult(data, false));
218940
+ resolve13(createIterResult(data, false));
218941
218941
  }
218942
218942
  }
218943
218943
  }
@@ -218945,13 +218945,13 @@ var require_async_iterator = __commonJS((exports, module) => {
218945
218945
  process.nextTick(readAndResolve, iter);
218946
218946
  }
218947
218947
  function wrapForNext(lastPromise, iter) {
218948
- return function(resolve15, reject) {
218948
+ return function(resolve13, reject) {
218949
218949
  lastPromise.then(function() {
218950
218950
  if (iter[kEnded]) {
218951
- resolve15(createIterResult(undefined, true));
218951
+ resolve13(createIterResult(undefined, true));
218952
218952
  return;
218953
218953
  }
218954
- iter[kHandlePromise](resolve15, reject);
218954
+ iter[kHandlePromise](resolve13, reject);
218955
218955
  }, reject);
218956
218956
  };
218957
218957
  }
@@ -218970,12 +218970,12 @@ var require_async_iterator = __commonJS((exports, module) => {
218970
218970
  return Promise.resolve(createIterResult(undefined, true));
218971
218971
  }
218972
218972
  if (this[kStream].destroyed) {
218973
- return new Promise(function(resolve15, reject) {
218973
+ return new Promise(function(resolve13, reject) {
218974
218974
  process.nextTick(function() {
218975
218975
  if (_this[kError]) {
218976
218976
  reject(_this[kError]);
218977
218977
  } else {
218978
- resolve15(createIterResult(undefined, true));
218978
+ resolve13(createIterResult(undefined, true));
218979
218979
  }
218980
218980
  });
218981
218981
  });
@@ -218998,13 +218998,13 @@ var require_async_iterator = __commonJS((exports, module) => {
218998
218998
  return this;
218999
218999
  }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
219000
219000
  var _this2 = this;
219001
- return new Promise(function(resolve15, reject) {
219001
+ return new Promise(function(resolve13, reject) {
219002
219002
  _this2[kStream].destroy(null, function(err) {
219003
219003
  if (err) {
219004
219004
  reject(err);
219005
219005
  return;
219006
219006
  }
219007
- resolve15(createIterResult(undefined, true));
219007
+ resolve13(createIterResult(undefined, true));
219008
219008
  });
219009
219009
  });
219010
219010
  }), _Object$setPrototypeO), AsyncIteratorPrototype);
@@ -219026,15 +219026,15 @@ var require_async_iterator = __commonJS((exports, module) => {
219026
219026
  value: stream._readableState.endEmitted,
219027
219027
  writable: true
219028
219028
  }), _defineProperty(_Object$create, kHandlePromise, {
219029
- value: function value(resolve15, reject) {
219029
+ value: function value(resolve13, reject) {
219030
219030
  var data = iterator[kStream].read();
219031
219031
  if (data) {
219032
219032
  iterator[kLastPromise] = null;
219033
219033
  iterator[kLastResolve] = null;
219034
219034
  iterator[kLastReject] = null;
219035
- resolve15(createIterResult(data, false));
219035
+ resolve13(createIterResult(data, false));
219036
219036
  } else {
219037
- iterator[kLastResolve] = resolve15;
219037
+ iterator[kLastResolve] = resolve13;
219038
219038
  iterator[kLastReject] = reject;
219039
219039
  }
219040
219040
  },
@@ -219053,12 +219053,12 @@ var require_async_iterator = __commonJS((exports, module) => {
219053
219053
  iterator[kError] = err;
219054
219054
  return;
219055
219055
  }
219056
- var resolve15 = iterator[kLastResolve];
219057
- if (resolve15 !== null) {
219056
+ var resolve13 = iterator[kLastResolve];
219057
+ if (resolve13 !== null) {
219058
219058
  iterator[kLastPromise] = null;
219059
219059
  iterator[kLastResolve] = null;
219060
219060
  iterator[kLastReject] = null;
219061
- resolve15(createIterResult(undefined, true));
219061
+ resolve13(createIterResult(undefined, true));
219062
219062
  }
219063
219063
  iterator[kEnded] = true;
219064
219064
  });
@@ -219070,7 +219070,7 @@ var require_async_iterator = __commonJS((exports, module) => {
219070
219070
 
219071
219071
  // ../../node_modules/readable-stream/lib/internal/streams/from.js
219072
219072
  var require_from = __commonJS((exports, module) => {
219073
- function asyncGeneratorStep(gen, resolve15, reject, _next, _throw, key2, arg) {
219073
+ function asyncGeneratorStep(gen, resolve13, reject, _next, _throw, key2, arg) {
219074
219074
  try {
219075
219075
  var info = gen[key2](arg);
219076
219076
  var value = info.value;
@@ -219079,7 +219079,7 @@ var require_from = __commonJS((exports, module) => {
219079
219079
  return;
219080
219080
  }
219081
219081
  if (info.done) {
219082
- resolve15(value);
219082
+ resolve13(value);
219083
219083
  } else {
219084
219084
  Promise.resolve(value).then(_next, _throw);
219085
219085
  }
@@ -219087,13 +219087,13 @@ var require_from = __commonJS((exports, module) => {
219087
219087
  function _asyncToGenerator(fn9) {
219088
219088
  return function() {
219089
219089
  var self2 = this, args = arguments;
219090
- return new Promise(function(resolve15, reject) {
219090
+ return new Promise(function(resolve13, reject) {
219091
219091
  var gen = fn9.apply(self2, args);
219092
219092
  function _next(value) {
219093
- asyncGeneratorStep(gen, resolve15, reject, _next, _throw, "next", value);
219093
+ asyncGeneratorStep(gen, resolve13, reject, _next, _throw, "next", value);
219094
219094
  }
219095
219095
  function _throw(err) {
219096
- asyncGeneratorStep(gen, resolve15, reject, _next, _throw, "throw", err);
219096
+ asyncGeneratorStep(gen, resolve13, reject, _next, _throw, "throw", err);
219097
219097
  }
219098
219098
  _next(undefined);
219099
219099
  });
@@ -221220,7 +221220,7 @@ var require_dist5 = __commonJS((exports, module) => {
221220
221220
  determineAgent: () => determineAgent
221221
221221
  });
221222
221222
  module.exports = __toCommonJS2(src_exports);
221223
- var import_promises26 = __require("node:fs/promises");
221223
+ var import_promises25 = __require("node:fs/promises");
221224
221224
  var import_node_fs24 = __require("node:fs");
221225
221225
  var DEVIN_LOCAL_PATH = "/opt/.devin";
221226
221226
  var CURSOR2 = "cursor";
@@ -221278,7 +221278,7 @@ var require_dist5 = __commonJS((exports, module) => {
221278
221278
  return { isAgent: true, agent: { name: REPLIT } };
221279
221279
  }
221280
221280
  try {
221281
- await (0, import_promises26.access)(DEVIN_LOCAL_PATH, import_node_fs24.constants.F_OK);
221281
+ await (0, import_promises25.access)(DEVIN_LOCAL_PATH, import_node_fs24.constants.F_OK);
221282
221282
  return { isAgent: true, agent: { name: DEVIN } };
221283
221283
  } catch (error48) {}
221284
221284
  return { isAgent: false, agent: undefined };
@@ -237049,7 +237049,7 @@ function normalizeBase44Env() {
237049
237049
  loadProjectEnvFiles();
237050
237050
 
237051
237051
  // src/cli/index.ts
237052
- import { dirname as dirname26, join as join36 } from "node:path";
237052
+ import { dirname as dirname25, join as join36 } from "node:path";
237053
237053
  import { fileURLToPath as fileURLToPath6 } from "node:url";
237054
237054
 
237055
237055
  // ../../node_modules/@clack/core/dist/index.mjs
@@ -238257,7 +238257,7 @@ var {
238257
238257
  } = import__.default;
238258
238258
 
238259
238259
  // src/cli/commands/agent-skills/pull.ts
238260
- import { dirname as dirname11, join as join17 } from "node:path";
238260
+ import { dirname as dirname10, join as join17 } from "node:path";
238261
238261
  // ../../node_modules/chalk/source/vendor/ansi-styles/index.js
238262
238262
  var ANSI_BACKGROUND_OFFSET = 10;
238263
238263
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -247439,7 +247439,7 @@ async function createProjectFilesForExistingProject(options) {
247439
247439
  };
247440
247440
  }
247441
247441
  // src/core/project/deploy.ts
247442
- import { resolve as resolve6 } from "node:path";
247442
+ import { resolve as resolve4 } from "node:path";
247443
247443
 
247444
247444
  // src/core/site/api.ts
247445
247445
  async function uploadSite(archivePath) {
@@ -247507,23 +247507,33 @@ async function createArchive(pathToArchive, targetArchivePath) {
247507
247507
  }, ["."]);
247508
247508
  }
247509
247509
  // src/core/site/deploy-app.ts
247510
- import { resolve as resolve5 } from "node:path";
247511
-
247512
- // src/core/deployments/api.ts
247513
- import { readFile as readFile2 } from "node:fs/promises";
247510
+ import { resolve as resolve3 } from "node:path";
247514
247511
 
247515
247512
  // src/core/deployments/schema.ts
247516
247513
  var GIT_HASH_PATTERN = /^[a-fA-F0-9]{7,64}$/;
247517
247514
  var CreateDeploymentResponseSchema = exports_external.object({
247518
247515
  deployment_id: exports_external.string(),
247519
- asset_buckets: exports_external.array(exports_external.array(exports_external.string()))
247516
+ asset_uploads: exports_external.object({
247517
+ type: exports_external.literal("s3"),
247518
+ uploads: exports_external.array(exports_external.object({
247519
+ path: exports_external.string(),
247520
+ content_type: exports_external.string(),
247521
+ content_length: exports_external.number(),
247522
+ url: exports_external.string()
247523
+ }))
247524
+ }).nullable().optional()
247520
247525
  }).transform((data) => ({
247521
247526
  deploymentId: data.deployment_id,
247522
- assetBuckets: data.asset_buckets
247527
+ assetUploads: data.asset_uploads == null ? null : {
247528
+ type: "s3",
247529
+ uploads: data.asset_uploads.uploads.map((upload) => ({
247530
+ path: upload.path,
247531
+ contentType: upload.content_type,
247532
+ contentLength: upload.content_length,
247533
+ url: upload.url
247534
+ }))
247535
+ }
247523
247536
  }));
247524
- var AssetUploadResponseSchema = exports_external.looseObject({
247525
- result: exports_external.looseObject({ jwt: exports_external.string().nullable().optional() }).nullable().optional()
247526
- });
247527
247537
  var FinalizeDeploymentResponseSchema = exports_external.object({
247528
247538
  deployment_id: exports_external.string()
247529
247539
  }).transform((data) => ({
@@ -247531,13 +247541,6 @@ var FinalizeDeploymentResponseSchema = exports_external.object({
247531
247541
  }));
247532
247542
 
247533
247543
  // src/core/deployments/api.ts
247534
- var MODULE_CONTENT_TYPES = {
247535
- esm: "application/javascript+module",
247536
- sourcemap: "application/source-map",
247537
- wasm: "application/wasm",
247538
- text: "text/plain",
247539
- data: "application/octet-stream"
247540
- };
247541
247544
  async function createDeployment(request) {
247542
247545
  const appClient = getAppClient();
247543
247546
  let response;
@@ -247555,28 +247558,13 @@ async function createDeployment(request) {
247555
247558
  }
247556
247559
  return result.data;
247557
247560
  }
247558
- async function uploadAssetBucket(deploymentId, formData) {
247559
- const appClient = getAppClient();
247560
- const response = await appClient.post(`deployments/${encodeURIComponent(deploymentId)}/assets`, {
247561
- searchParams: { base64: "true" },
247562
- body: formData,
247563
- timeout: 120000,
247564
- retry: 0
247565
- });
247566
- const parsed = AssetUploadResponseSchema.safeParse(await response.json());
247567
- const jwt3 = parsed.success ? parsed.data.result?.jwt : null;
247568
- return jwt3 || null;
247561
+ async function finalizeStaticDeployment(deploymentId, indexHtml) {
247562
+ const formData = new FormData;
247563
+ formData.append("index.html", new File([indexHtml], "index.html", { type: "text/html" }));
247564
+ return await postFinalize(deploymentId, formData);
247569
247565
  }
247570
- async function finalizeDeployment(deploymentId, completionJwt, modules) {
247566
+ async function postFinalize(deploymentId, formData) {
247571
247567
  const appClient = getAppClient();
247572
- const formData = new FormData;
247573
- formData.append("payload", JSON.stringify({ completion_jwt: completionJwt }));
247574
- for (const module of modules) {
247575
- const content = await readFile2(module.absolutePath);
247576
- formData.append(module.name, new File([new Uint8Array(content)], module.name, {
247577
- type: MODULE_CONTENT_TYPES[module.type]
247578
- }));
247579
- }
247580
247568
  let response;
247581
247569
  try {
247582
247570
  response = await appClient.post(`deployments/${encodeURIComponent(deploymentId)}/finalize`, { body: formData, timeout: 180000 });
@@ -254085,10 +254073,34 @@ var {
254085
254073
  getCancelSignal: getCancelSignal2
254086
254074
  } = getIpcExport();
254087
254075
 
254076
+ // src/core/deployments/git-hash.ts
254077
+ async function resolveGitHash(projectRoot, explicit) {
254078
+ const hash2 = explicit ?? await gitHead(projectRoot);
254079
+ if (!hash2 || !GIT_HASH_PATTERN.test(hash2)) {
254080
+ throw new InvalidInputError(explicit ? `'${explicit}' is not a git commit hash.` : "Deployments are addressed by the commit that produced the build, and no git commit was found.", {
254081
+ hints: [
254082
+ {
254083
+ message: "Run the deploy from a git checkout, or pass the commit explicitly with --git-hash."
254084
+ }
254085
+ ]
254086
+ });
254087
+ }
254088
+ return hash2;
254089
+ }
254090
+ async function gitHead(projectRoot) {
254091
+ try {
254092
+ const { stdout } = await execa("git", ["rev-parse", "HEAD"], {
254093
+ cwd: projectRoot
254094
+ });
254095
+ return stdout.trim();
254096
+ } catch {
254097
+ return null;
254098
+ }
254099
+ }
254088
254100
  // src/core/deployments/manifest.ts
254089
254101
  import { createHash } from "node:crypto";
254090
- import { readdir as readdir2, readFile as readFile3, stat } from "node:fs/promises";
254091
- import { extname, join as join15 } from "node:path";
254102
+ import { readdir as readdir2, readFile as readFile2, stat } from "node:fs/promises";
254103
+ import { join as join15 } from "node:path";
254092
254104
  var MAX_ASSET_SIZE_BYTES = 25 * 1024 * 1024;
254093
254105
  var MAX_ASSET_COUNT = 1e5;
254094
254106
  var ASSETS_IGNORE_FILE = ".assetsignore";
@@ -254097,39 +254109,6 @@ var ALWAYS_SKIPPED_FILES = new Set([
254097
254109
  "wrangler.json",
254098
254110
  ".dev.vars"
254099
254111
  ]);
254100
- var MIME_TYPES = {
254101
- ".html": "text/html",
254102
- ".htm": "text/html",
254103
- ".css": "text/css",
254104
- ".js": "text/javascript",
254105
- ".mjs": "text/javascript",
254106
- ".json": "application/json",
254107
- ".map": "application/json",
254108
- ".txt": "text/plain",
254109
- ".xml": "application/xml",
254110
- ".svg": "image/svg+xml",
254111
- ".png": "image/png",
254112
- ".jpg": "image/jpeg",
254113
- ".jpeg": "image/jpeg",
254114
- ".gif": "image/gif",
254115
- ".webp": "image/webp",
254116
- ".avif": "image/avif",
254117
- ".ico": "image/x-icon",
254118
- ".woff": "font/woff",
254119
- ".woff2": "font/woff2",
254120
- ".ttf": "font/ttf",
254121
- ".otf": "font/otf",
254122
- ".eot": "application/vnd.ms-fontobject",
254123
- ".mp3": "audio/mpeg",
254124
- ".mp4": "video/mp4",
254125
- ".webm": "video/webm",
254126
- ".pdf": "application/pdf",
254127
- ".wasm": "application/wasm",
254128
- ".webmanifest": "application/manifest+json"
254129
- };
254130
- function getMimeType(filePath) {
254131
- return MIME_TYPES[extname(filePath).toLowerCase()] ?? "application/octet-stream";
254132
- }
254133
254112
  function hashAsset(appId, content) {
254134
254113
  return createHash("sha256").update(Buffer.from(appId, "utf8")).update(content).digest("hex").slice(0, 32);
254135
254114
  }
@@ -254199,16 +254178,11 @@ async function buildAssetManifest(assetsDir, appId) {
254199
254178
  if (size > MAX_ASSET_SIZE_BYTES) {
254200
254179
  throw new InvalidInputError(`Static asset "${relativePath}" is ${size} bytes, which exceeds the 25 MiB per-file limit.`);
254201
254180
  }
254202
- const content = await readFile3(absolutePath);
254181
+ const content = await readFile2(absolutePath);
254203
254182
  const hash2 = hashAsset(appId, content);
254204
254183
  manifest[`/${relativePath}`] = { hash: hash2, size };
254205
254184
  if (!filesByHash.has(hash2)) {
254206
- filesByHash.set(hash2, {
254207
- absolutePath,
254208
- hash: hash2,
254209
- size,
254210
- contentType: getMimeType(absolutePath)
254211
- });
254185
+ filesByHash.set(hash2, { absolutePath, hash: hash2, size });
254212
254186
  }
254213
254187
  }
254214
254188
  return { manifest, filesByHash };
@@ -254234,388 +254208,109 @@ async function collectFilePaths(dir, relativeDir, isIgnored) {
254234
254208
  }
254235
254209
  return results;
254236
254210
  }
254237
-
254238
- // src/core/deployments/modules.ts
254239
- import { stat as stat2 } from "node:fs/promises";
254240
- import { relative as relative3, resolve as resolve3, sep } from "node:path";
254241
- var MAX_TOTAL_MODULE_BYTES = 40 * 1024 * 1024;
254242
- var MODULE_IGNORE = ["wrangler.json", ".dev.vars"];
254243
- var RULE_TYPE_TO_MODULE_TYPE = {
254244
- ESModule: "esm",
254245
- CompiledWasm: "wasm",
254246
- Text: "text",
254247
- Data: "data"
254248
- };
254249
- function toPosix(path16) {
254250
- return path16.split(sep).join("/");
254251
- }
254252
- async function collectModules(config9) {
254253
- const entryPath = resolve3(config9.configDir, config9.main);
254254
- if (!await pathExists(entryPath)) {
254255
- throw new InvalidInputError(`Worker entry module does not exist: ${entryPath} (from "main" in ${config9.configPath})`, {
254256
- hints: [{ message: "Rebuild the project to regenerate the artifact" }]
254257
- });
254258
- }
254259
- const modulesByName = new Map;
254260
- const entryName = toPosix(relative3(config9.configDir, entryPath));
254261
- modulesByName.set(entryName, {
254262
- name: entryName,
254263
- absolutePath: entryPath,
254264
- size: 0,
254265
- type: "esm"
254266
- });
254267
- const ignore = [...MODULE_IGNORE];
254268
- if (config9.assetsDirectory?.startsWith(config9.configDir + sep)) {
254269
- ignore.push(`${toPosix(relative3(config9.configDir, config9.assetsDirectory))}/**`);
254270
- }
254271
- for (const rule of config9.rules) {
254272
- const type = RULE_TYPE_TO_MODULE_TYPE[rule.type];
254273
- if (!type) {
254274
- throw new InvalidInputError(`Unsupported module rule type "${rule.type}" in ${config9.configPath}. Supported: ${Object.keys(RULE_TYPE_TO_MODULE_TYPE).join(", ")}.`);
254275
- }
254276
- const matches = await globby(rule.globs, {
254277
- cwd: config9.configDir,
254278
- onlyFiles: true,
254279
- dot: true,
254280
- ignore
254281
- });
254282
- for (const match of matches.sort()) {
254283
- if (!modulesByName.has(match)) {
254284
- modulesByName.set(match, {
254285
- name: match,
254286
- absolutePath: resolve3(config9.configDir, match),
254287
- size: 0,
254288
- type
254289
- });
254290
- }
254291
- }
254292
- }
254293
- if (config9.uploadSourceMaps) {
254294
- const maps = await globby("**/*.map", {
254295
- cwd: config9.configDir,
254296
- onlyFiles: true,
254297
- dot: true,
254298
- ignore
254299
- });
254300
- for (const map2 of maps.sort()) {
254301
- addSourcemap(modulesByName, config9.configDir, map2);
254302
- }
254303
- } else {
254304
- for (const name2 of [...modulesByName.keys()]) {
254305
- const mapName = `${name2}.map`;
254306
- if (await pathExists(resolve3(config9.configDir, mapName))) {
254307
- addSourcemap(modulesByName, config9.configDir, mapName);
254308
- }
254309
- }
254310
- }
254311
- const modules = [...modulesByName.values()];
254312
- let totalBytes = 0;
254313
- for (const module of modules) {
254314
- module.size = (await stat2(module.absolutePath)).size;
254315
- totalBytes += module.size;
254316
- }
254317
- if (totalBytes > MAX_TOTAL_MODULE_BYTES) {
254318
- throw new InvalidInputError(`Worker modules total ${totalBytes} bytes, which exceeds the 40 MB limit for Base44 full-stack deploys.`);
254319
- }
254320
- return modules;
254321
- }
254322
- function addSourcemap(modulesByName, configDir, name2) {
254323
- if (modulesByName.has(name2))
254324
- return;
254325
- modulesByName.set(name2, {
254326
- name: name2,
254327
- absolutePath: resolve3(configDir, name2),
254328
- size: 0,
254329
- type: "sourcemap"
254330
- });
254331
- }
254211
+ // src/core/deployments/static-site.ts
254212
+ import { readFile as readFile4 } from "node:fs/promises";
254213
+ import { join as join16 } from "node:path";
254332
254214
 
254333
254215
  // src/core/deployments/upload.ts
254334
- import { readFile as readFile4 } from "node:fs/promises";
254335
- var BUCKET_CONCURRENCY = 3;
254336
- var MAX_ATTEMPTS_PER_BUCKET = 3;
254216
+ import { readFile as readFile3 } from "node:fs/promises";
254217
+ var UPLOAD_CONCURRENCY = 3;
254218
+ var MAX_ATTEMPTS_PER_UPLOAD = 3;
254337
254219
  var RETRY_BASE_DELAY_MS = 500;
254338
- var MAX_RATE_LIMIT_WAITS = 10;
254339
- var RATE_LIMIT_DELAY_MS = 15000;
254340
- async function uploadAssetBuckets(deploymentId, buckets, filesByHash, onProgress) {
254341
- if (buckets.length === 0) {
254342
- return null;
254343
- }
254344
- const totalFiles = buckets.reduce((sum, bucket) => sum + bucket.length, 0);
254220
+ async function uploadPresignedAssets(uploads, assets, onProgress) {
254345
254221
  let uploadedFiles = 0;
254346
- let completedBuckets = 0;
254347
- let completionJwt = null;
254348
- let nextBucket = 0;
254222
+ let nextUpload = 0;
254349
254223
  const worker = async () => {
254350
- while (nextBucket < buckets.length) {
254351
- const bucket = buckets[nextBucket++];
254352
- const jwt3 = await uploadBucketWithRetry(deploymentId, bucket, filesByHash);
254353
- if (jwt3) {
254354
- completionJwt = jwt3;
254355
- }
254356
- uploadedFiles += bucket.length;
254357
- completedBuckets++;
254358
- onProgress?.({
254359
- uploadedFiles,
254360
- totalFiles,
254361
- completedBuckets,
254362
- totalBuckets: buckets.length
254363
- });
254224
+ while (nextUpload < uploads.length) {
254225
+ const upload = uploads[nextUpload++];
254226
+ await uploadPresignedAssetWithRetry(upload, assets);
254227
+ uploadedFiles++;
254228
+ onProgress?.({ uploadedFiles, totalFiles: uploads.length });
254364
254229
  }
254365
254230
  };
254366
- await Promise.all(Array.from({ length: Math.min(BUCKET_CONCURRENCY, buckets.length) }, worker));
254367
- if (!completionJwt) {
254368
- throw new ApiError("Asset upload finished but the server did not return a completion token.");
254369
- }
254370
- return completionJwt;
254231
+ await Promise.all(Array.from({ length: Math.min(UPLOAD_CONCURRENCY, uploads.length) }, worker));
254371
254232
  }
254372
- async function uploadBucketWithRetry(deploymentId, bucket, filesByHash) {
254233
+ async function uploadPresignedAssetWithRetry(upload, assets) {
254234
+ const entry = assets.manifest[upload.path];
254235
+ const file2 = entry && assets.filesByHash.get(entry.hash);
254236
+ if (!file2) {
254237
+ throw new InternalError(`Server requested upload of unknown asset path: ${upload.path}`);
254238
+ }
254239
+ const content = await readFile3(file2.absolutePath);
254373
254240
  let lastError;
254374
- let rateLimitWaits = 0;
254375
- const formData = await buildBucketForm(bucket, filesByHash);
254376
- for (let attempt = 0;attempt < MAX_ATTEMPTS_PER_BUCKET; attempt++) {
254241
+ for (let attempt = 0;attempt < MAX_ATTEMPTS_PER_UPLOAD; attempt++) {
254377
254242
  if (attempt > 0) {
254378
254243
  await sleep3(RETRY_BASE_DELAY_MS * 2 ** (attempt - 1));
254379
254244
  }
254380
254245
  try {
254381
- return await uploadAssetBucket(deploymentId, formData);
254246
+ await distribution_default.put(upload.url, {
254247
+ body: new Uint8Array(content),
254248
+ headers: { "Content-Type": upload.contentType },
254249
+ timeout: 120000,
254250
+ retry: 0
254251
+ });
254252
+ return;
254382
254253
  } catch (error48) {
254383
- if (error48 instanceof HTTPError && error48.response.status === 429 && rateLimitWaits < MAX_RATE_LIMIT_WAITS) {
254384
- rateLimitWaits++;
254385
- attempt--;
254386
- await sleep3(RATE_LIMIT_DELAY_MS);
254387
- continue;
254388
- }
254389
254254
  lastError = error48;
254390
254255
  }
254391
254256
  }
254392
- if (lastError instanceof HTTPError && lastError.response.status === 409) {
254393
- throw new ApiError("This deploy's upload session has expired — rerun deploy. Already-uploaded assets are skipped on the next attempt.", { statusCode: 409, cause: lastError });
254394
- }
254395
254257
  throw await ApiError.fromHttpError(lastError, "uploading static assets");
254396
254258
  }
254397
- async function buildBucketForm(bucket, filesByHash) {
254398
- const formData = new FormData;
254399
- for (const hash2 of bucket) {
254400
- const file2 = filesByHash.get(hash2);
254401
- if (!file2) {
254402
- throw new InternalError(`Server requested upload of unknown asset hash: ${hash2}`);
254403
- }
254404
- const content = await readFile4(file2.absolutePath);
254405
- formData.append(hash2, new File([content.toString("base64")], hash2, { type: file2.contentType }));
254406
- }
254407
- return formData;
254408
- }
254409
254259
  function sleep3(ms) {
254410
- return new Promise((resolve4) => setTimeout(resolve4, ms));
254411
- }
254412
-
254413
- // src/core/deployments/wrangler-config.ts
254414
- import { dirname as dirname10, join as join16, resolve as resolve4 } from "node:path";
254415
- var WRANGLER_REDIRECT_PATH = join16(".wrangler", "deploy", "config.json");
254416
- var RedirectConfigSchema = exports_external.looseObject({
254417
- configPath: exports_external.string().min(1)
254418
- });
254419
- var WranglerConfigSchema = exports_external.looseObject({
254420
- main: exports_external.string().min(1, "wrangler config is missing a 'main' entry module"),
254421
- no_bundle: exports_external.boolean().optional(),
254422
- rules: exports_external.array(exports_external.looseObject({ type: exports_external.string(), globs: exports_external.array(exports_external.string()) })).optional(),
254423
- assets: exports_external.looseObject({
254424
- directory: exports_external.string().optional(),
254425
- html_handling: exports_external.string().optional(),
254426
- not_found_handling: exports_external.string().optional(),
254427
- run_worker_first: exports_external.union([exports_external.boolean(), exports_external.array(exports_external.string())]).optional(),
254428
- headers: exports_external.string().optional(),
254429
- redirects: exports_external.string().optional()
254430
- }).optional(),
254431
- compatibility_date: exports_external.string().optional(),
254432
- compatibility_flags: exports_external.array(exports_external.string()).optional(),
254433
- vars: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
254434
- upload_source_maps: exports_external.boolean().optional()
254435
- });
254436
- async function detectFullStackArtifact(projectRoot) {
254437
- const redirectPath = join16(projectRoot, WRANGLER_REDIRECT_PATH);
254438
- if (await pathExists(redirectPath)) {
254439
- return { source: "redirect", path: redirectPath };
254440
- }
254441
- for (const name2 of ["wrangler.jsonc", "wrangler.json"]) {
254442
- const configPath = join16(projectRoot, name2);
254443
- if (await pathExists(configPath)) {
254444
- return { source: "root-config", path: configPath };
254445
- }
254446
- }
254447
- const tomlPath = join16(projectRoot, "wrangler.toml");
254448
- if (await pathExists(tomlPath)) {
254449
- return { source: "toml", path: tomlPath };
254450
- }
254451
- return null;
254452
- }
254453
- async function resolveWranglerConfig(projectRoot) {
254454
- const artifact = await detectFullStackArtifact(projectRoot);
254455
- if (!artifact) {
254456
- throw new InvalidInputError("No full-stack build artifact found. Expected a .wrangler/deploy/config.json redirect file or a root wrangler.jsonc.", {
254457
- hints: [{ message: "Run your framework's build command first" }]
254458
- });
254459
- }
254460
- if (artifact.source === "toml") {
254461
- throw new InvalidInputError("wrangler.toml is not supported for Base44 full-stack deploys. Convert your config to wrangler.jsonc.");
254462
- }
254463
- const configPath = artifact.source === "redirect" ? await resolveRedirectedConfigPath(artifact.path) : artifact.path;
254464
- const parsed = await readJsonFile(configPath);
254465
- const result = WranglerConfigSchema.safeParse(parsed);
254466
- if (!result.success) {
254467
- throw new ConfigInvalidError(`Invalid wrangler config: ${exports_external.prettifyError(result.error)}`, configPath);
254468
- }
254469
- const config9 = result.data;
254470
- if (config9.no_bundle !== true) {
254471
- throw new InvalidInputError("This framework's output requires bundling; not yet supported. Base44 full-stack deploys only support pre-bundled Workers output (no_bundle: true).");
254472
- }
254473
- const configDir = dirname10(configPath);
254474
- const assetsDirectory = config9.assets?.directory ? resolve4(configDir, config9.assets.directory) : null;
254475
- return {
254476
- configPath,
254477
- configDir,
254478
- main: config9.main,
254479
- assetsDirectory,
254480
- assetsConfig: config9.assets ? toResolvedAssetsConfig(config9.assets) : null,
254481
- compatibilityDate: config9.compatibility_date ?? null,
254482
- compatibilityFlags: config9.compatibility_flags ?? [],
254483
- vars: config9.vars ?? {},
254484
- rules: (config9.rules ?? []).map((rule) => ({
254485
- type: rule.type,
254486
- globs: rule.globs
254487
- })),
254488
- uploadSourceMaps: config9.upload_source_maps ?? false
254489
- };
254490
- }
254491
- async function resolveRedirectedConfigPath(redirectPath) {
254492
- const parsed = await readJsonFile(redirectPath);
254493
- const result = RedirectConfigSchema.safeParse(parsed);
254494
- if (!result.success) {
254495
- throw new ConfigInvalidError(`Invalid deploy redirect file: ${exports_external.prettifyError(result.error)}`, redirectPath);
254496
- }
254497
- const configPath = resolve4(dirname10(redirectPath), result.data.configPath);
254498
- if (!await pathExists(configPath)) {
254499
- throw new ConfigInvalidError(`Wrangler config referenced by ${redirectPath} does not exist: ${configPath}`, redirectPath, {
254500
- hints: [{ message: "Rebuild the project to regenerate the artifact" }]
254501
- });
254502
- }
254503
- return configPath;
254504
- }
254505
- function toResolvedAssetsConfig(assets) {
254506
- return {
254507
- htmlHandling: assets.html_handling,
254508
- notFoundHandling: assets.not_found_handling,
254509
- runWorkerFirst: assets.run_worker_first,
254510
- headers: assets.headers,
254511
- redirects: assets.redirects
254512
- };
254260
+ return new Promise((resolve3) => setTimeout(resolve3, ms));
254513
254261
  }
254514
254262
 
254515
- // src/core/deployments/deploy.ts
254516
- async function resolveGitHash(projectRoot, explicit) {
254517
- const hash2 = explicit ?? await gitHead(projectRoot);
254518
- if (!hash2 || !GIT_HASH_PATTERN.test(hash2)) {
254519
- throw new InvalidInputError(explicit ? `'${explicit}' is not a git commit hash.` : "Full-stack deployments are addressed by the commit that produced the build, and no git commit was found.", {
254520
- hints: [
254521
- {
254522
- message: "Run the deploy from a git checkout, or pass the commit explicitly with --git-hash."
254523
- }
254524
- ]
254525
- });
254526
- }
254527
- return hash2;
254528
- }
254529
- async function gitHead(projectRoot) {
254530
- try {
254531
- const { stdout } = await execa("git", ["rev-parse", "HEAD"], {
254532
- cwd: projectRoot
254533
- });
254534
- return stdout.trim();
254535
- } catch {
254536
- return null;
254537
- }
254263
+ // src/core/deployments/static-site.ts
254264
+ var STATIC_DEPLOYMENTS_ENV = "BASE44_STATIC_DEPLOYMENTS";
254265
+ function staticDeploymentsEnabled(env2 = process.env) {
254266
+ const value = env2[STATIC_DEPLOYMENTS_ENV];
254267
+ return value === "1" || value === "true";
254538
254268
  }
254539
- async function deployFullStack(options) {
254540
- const { projectRoot, gitHash, progress } = options;
254541
- const config9 = await resolveWranglerConfig(projectRoot);
254542
- if (!config9.compatibilityFlags.includes("nodejs_compat")) {
254543
- progress?.onWarning?.("The wrangler config has no 'nodejs_compat' compatibility flag; Node.js built-ins will be unavailable at runtime. Enable it in your framework's Cloudflare adapter settings if your server code needs Node APIs.");
254544
- }
254545
- if (config9.vars && Object.keys(config9.vars).length > 0) {
254546
- progress?.onWarning?.("wrangler 'vars' are not supported and were ignored — a worker's environment comes from the app's secrets (base44 secrets set).");
254547
- }
254548
- const modules = await collectModules(config9);
254549
- let assets = { manifest: {}, filesByHash: new Map };
254550
- if (config9.assetsDirectory && await pathExists(config9.assetsDirectory)) {
254551
- assets = await buildAssetManifest(config9.assetsDirectory, getAppContext().id);
254269
+ async function deployStaticSite(options) {
254270
+ const { outputDir, gitHash, progress } = options;
254271
+ const assets = await buildAssetManifest(outputDir, getAppContext().id);
254272
+ if (!assets.manifest["/index.html"]) {
254273
+ throw new InvalidInputError(`No index.html found in "${outputDir}" a static site needs one at the output directory root.`);
254552
254274
  }
254553
254275
  const created = await createDeployment({
254554
254276
  git_hash: gitHash,
254555
- config: {
254556
- main: config9.main,
254557
- compatibility_date: config9.compatibilityDate,
254558
- compatibility_flags: config9.compatibilityFlags,
254559
- assets: buildAssetsConfig(config9.assetsConfig, progress)
254560
- },
254561
254277
  asset_manifest: assets.manifest
254562
254278
  });
254563
254279
  const totalAssets = Object.keys(assets.manifest).length;
254564
- const newAssets = new Set(created.assetBuckets.flat()).size;
254565
- progress?.onAssets?.({ totalAssets, newAssets });
254566
- const completionJwt = await uploadAssetBuckets(created.deploymentId, created.assetBuckets, assets.filesByHash, progress?.onAssetUpload);
254567
- progress?.onWorker?.({ moduleCount: modules.length });
254568
- const finalized = await finalizeDeployment(created.deploymentId, completionJwt, modules);
254569
- return { deploymentId: finalized.deploymentId, gitHash };
254570
- }
254571
- function buildAssetsConfig(assetsConfig, progress) {
254572
- if (!assetsConfig)
254573
- return null;
254574
- if (assetsConfig.headers || assetsConfig.redirects) {
254575
- progress?.onWarning?.("_headers/_redirects files are not supported yet and were ignored for this deploy.");
254576
- }
254577
- let runWorkerFirst;
254578
- if (Array.isArray(assetsConfig.runWorkerFirst)) {
254579
- progress?.onWarning?.("'run_worker_first' route patterns are not supported yet and were ignored for this deploy.");
254580
- } else {
254581
- runWorkerFirst = assetsConfig.runWorkerFirst;
254280
+ progress?.onAssets?.({
254281
+ totalAssets,
254282
+ newAssets: created.assetUploads?.uploads.length ?? 0
254283
+ });
254284
+ if (created.assetUploads) {
254285
+ await uploadPresignedAssets(created.assetUploads.uploads, assets, progress?.onAssetUpload);
254582
254286
  }
254583
- return {
254584
- html_handling: assetsConfig.htmlHandling,
254585
- not_found_handling: assetsConfig.notFoundHandling,
254586
- run_worker_first: runWorkerFirst
254587
- };
254287
+ const indexHtml = await readFile4(join16(outputDir, "index.html"));
254288
+ const finalized = await finalizeStaticDeployment(created.deploymentId, new Uint8Array(indexHtml));
254289
+ return { deploymentId: finalized.deploymentId, gitHash };
254588
254290
  }
254589
254291
  // src/core/site/deploy-app.ts
254590
254292
  async function planAppDeploy(target) {
254591
- if (await detectFullStackArtifact(target.root)) {
254592
- return { kind: "full-stack" };
254593
- }
254594
254293
  const outputDirectory = target.site?.outputDirectory;
254595
- return outputDirectory ? { kind: "static", outputDir: resolve5(target.root, outputDirectory) } : { kind: "none" };
254294
+ if (!outputDirectory) {
254295
+ return { kind: "none" };
254296
+ }
254297
+ const outputDir = resolve3(target.root, outputDirectory);
254298
+ return staticDeploymentsEnabled() ? { kind: "static-deployment", outputDir } : { kind: "static", outputDir };
254596
254299
  }
254597
254300
  async function detectAppDeployKind(target) {
254598
254301
  return (await planAppDeploy(target)).kind;
254599
254302
  }
254600
- async function hasBuiltArtifact(target) {
254601
- const plan = await planAppDeploy(target);
254602
- if (plan.kind === "full-stack")
254603
- return true;
254604
- if (plan.kind === "none")
254605
- return false;
254606
- return await pathExists(plan.outputDir);
254607
- }
254608
254303
  async function deployAppSite(target, options = {}) {
254609
254304
  const plan = await planAppDeploy(target);
254610
254305
  switch (plan.kind) {
254611
- case "full-stack": {
254306
+ case "static-deployment": {
254612
254307
  const gitHash = await resolveGitHash(target.root, options.gitHash);
254613
- const { deploymentId } = await deployFullStack({
254614
- projectRoot: target.root,
254308
+ const { deploymentId } = await deployStaticSite({
254309
+ outputDir: plan.outputDir,
254615
254310
  gitHash,
254616
254311
  progress: options.progress
254617
254312
  });
254618
- return { kind: "full-stack", deploymentId, gitHash };
254313
+ return { kind: "static-deployment", deploymentId, gitHash };
254619
254314
  }
254620
254315
  case "static": {
254621
254316
  const { appUrl } = await deploySite(plan.outputDir);
@@ -254671,7 +254366,7 @@ async function deployAll(projectData, options) {
254671
254366
  const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
254672
254367
  const connectorResults = skipConnectorSync ? [] : (await pushConnectors(connectors)).results;
254673
254368
  if ((options?.site ?? true) && project.site?.outputDirectory) {
254674
- const outputDir = resolve6(project.root, project.site.outputDirectory);
254369
+ const outputDir = resolve4(project.root, project.site.outputDirectory);
254675
254370
  const { appUrl } = await deploySite(outputDir);
254676
254371
  return { appUrl, connectorResults };
254677
254372
  }
@@ -255425,7 +255120,7 @@ async function pullAction({
255425
255120
  runTask: runTask2
255426
255121
  }) {
255427
255122
  const { project: project2 } = await readProjectConfig();
255428
- const dir = join17(dirname11(project2.configPath), project2.agentSkillsDir);
255123
+ const dir = join17(dirname10(project2.configPath), project2.agentSkillsDir);
255429
255124
  const remote = await runTask2("Fetching agent skills from Base44", () => fetchAgentSkills(), {
255430
255125
  successMessage: "Agent skills fetched successfully",
255431
255126
  errorMessage: "Failed to fetch agent skills"
@@ -255481,13 +255176,13 @@ function getAgentSkillsCommand() {
255481
255176
  }
255482
255177
 
255483
255178
  // src/cli/commands/agents/pull.ts
255484
- import { dirname as dirname12, join as join18 } from "node:path";
255179
+ import { dirname as dirname11, join as join18 } from "node:path";
255485
255180
  async function pullAgentsAction({
255486
255181
  log,
255487
255182
  runTask: runTask2
255488
255183
  }) {
255489
255184
  const { project: project2 } = await readProjectConfig();
255490
- const configDir = dirname12(project2.configPath);
255185
+ const configDir = dirname11(project2.configPath);
255491
255186
  const agentsDir = join18(configDir, project2.agentsDir);
255492
255187
  const remoteAgents = await runTask2("Fetching agents from Base44", async () => {
255493
255188
  return await fetchAgents();
@@ -255558,11 +255253,11 @@ function getAgentsCommand() {
255558
255253
  }
255559
255254
 
255560
255255
  // src/cli/commands/auth/password-login.ts
255561
- import { dirname as dirname13, join as join19 } from "node:path";
255256
+ import { dirname as dirname12, join as join19 } from "node:path";
255562
255257
  async function passwordLoginAction({ log, runTask: runTask2 }, action) {
255563
255258
  const shouldEnable = action === "enable";
255564
255259
  const { project: project2 } = await readProjectConfig();
255565
- const configDir = dirname13(project2.configPath);
255260
+ const configDir = dirname12(project2.configPath);
255566
255261
  const authDir = join19(configDir, project2.authDir);
255567
255262
  const updated = await runTask2("Updating local auth config", async () => {
255568
255263
  const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
@@ -255583,13 +255278,13 @@ function getPasswordLoginCommand() {
255583
255278
  }
255584
255279
 
255585
255280
  // src/cli/commands/auth/pull.ts
255586
- import { dirname as dirname14, join as join20 } from "node:path";
255281
+ import { dirname as dirname13, join as join20 } from "node:path";
255587
255282
  async function pullAuthAction({
255588
255283
  log,
255589
255284
  runTask: runTask2
255590
255285
  }) {
255591
255286
  const { project: project2 } = await readProjectConfig();
255592
- const configDir = dirname14(project2.configPath);
255287
+ const configDir = dirname13(project2.configPath);
255593
255288
  const authDir = join20(configDir, project2.authDir);
255594
255289
  const remoteConfig = await runTask2("Fetching auth config from Base44", async () => {
255595
255290
  return await pullAuthConfig();
@@ -255654,7 +255349,7 @@ function getAuthPushCommand() {
255654
255349
  }
255655
255350
 
255656
255351
  // src/cli/commands/auth/social-login.ts
255657
- import { dirname as dirname15, join as join21, resolve as resolve7 } from "node:path";
255352
+ import { dirname as dirname14, join as join21, resolve as resolve5 } from "node:path";
255658
255353
  var PROVIDER_LABELS = {
255659
255354
  google: "Google",
255660
255355
  microsoft: "Microsoft",
@@ -255694,7 +255389,7 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
255694
255389
  let clientSecret;
255695
255390
  if (useCustomOAuth && oauth && oauthCli && hasSecretOptions(options)) {
255696
255391
  if (options.envFile) {
255697
- const secrets = await parseEnvFile(resolve7(options.envFile));
255392
+ const secrets = await parseEnvFile(resolve5(options.envFile));
255698
255393
  const value = secrets[oauthCli.envVar];
255699
255394
  if (!value) {
255700
255395
  throw new InvalidInputError(`Key "${oauthCli.envVar}" not found in ${options.envFile}.`);
@@ -255724,7 +255419,7 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
255724
255419
  }
255725
255420
  }
255726
255421
  const { project: project2 } = await readProjectConfig();
255727
- const configDir = dirname15(project2.configPath);
255422
+ const configDir = dirname14(project2.configPath);
255728
255423
  const authDir = join21(configDir, project2.authDir);
255729
255424
  const { config: updated } = await runTask2("Updating local auth config", async () => updateSocialLoginConfig(authDir, provider, shouldEnable, useCustomOAuth && options.clientId ? { clientId: options.clientId } : undefined));
255730
255425
  if (clientSecret) {
@@ -255750,7 +255445,7 @@ function getSocialLoginCommand() {
255750
255445
  }
255751
255446
 
255752
255447
  // src/cli/commands/auth/sso.ts
255753
- import { dirname as dirname16, join as join22, resolve as resolve8 } from "node:path";
255448
+ import { dirname as dirname15, join as join22, resolve as resolve6 } from "node:path";
255754
255449
  var SSOConfigFileSchema = exports_external.object({
255755
255450
  provider: exports_external.enum(Object.values(KNOWN_SSO_PROVIDERS)),
255756
255451
  clientId: exports_external.string(),
@@ -255766,7 +255461,7 @@ var SSOConfigFileSchema = exports_external.object({
255766
255461
  ssoName: exports_external.string().optional()
255767
255462
  });
255768
255463
  async function loadSSOConfigFile(filePath) {
255769
- const resolved = resolve8(filePath);
255464
+ const resolved = resolve6(filePath);
255770
255465
  const raw2 = await readJsonFile(resolved);
255771
255466
  const result = SSOConfigFileSchema.safeParse(raw2);
255772
255467
  if (!result.success) {
@@ -255854,7 +255549,7 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
255854
255549
  }
255855
255550
  let clientSecret;
255856
255551
  if (merged.envFile && !merged.clientSecret) {
255857
- const secrets2 = await parseEnvFile(resolve8(merged.envFile));
255552
+ const secrets2 = await parseEnvFile(resolve6(merged.envFile));
255858
255553
  const value = secrets2.sso_client_secret;
255859
255554
  if (!value) {
255860
255555
  throw new InvalidInputError(`Key "sso_client_secret" not found in ${merged.envFile}.`);
@@ -255913,7 +255608,7 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
255913
255608
  throw error48;
255914
255609
  }
255915
255610
  const { project: project2 } = await readProjectConfig();
255916
- const configDir = dirname16(project2.configPath);
255611
+ const configDir = dirname15(project2.configPath);
255917
255612
  const authDir = join22(configDir, project2.authDir);
255918
255613
  await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, provider, true));
255919
255614
  await runTask2("Saving SSO credentials", async () => pushSSOSecrets(secrets));
@@ -255929,7 +255624,7 @@ async function ssoDisableAction({ log, runTask: runTask2 }, options) {
255929
255624
  throw new InvalidInputError("Configuration options cannot be used with disable. To disable SSO: base44 auth sso disable");
255930
255625
  }
255931
255626
  const { project: project2 } = await readProjectConfig();
255932
- const configDir = dirname16(project2.configPath);
255627
+ const configDir = dirname15(project2.configPath);
255933
255628
  const authDir = join22(configDir, project2.authDir);
255934
255629
  const updated = await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, null, false));
255935
255630
  await runTask2("Removing SSO credentials", async () => deleteSSOSecrets());
@@ -256492,19 +256187,19 @@ var baseOpen = async (options) => {
256492
256187
  }
256493
256188
  const subprocess = childProcess3.spawn(command2, cliArguments, childProcessOptions);
256494
256189
  if (options.wait) {
256495
- return new Promise((resolve9, reject) => {
256190
+ return new Promise((resolve7, reject) => {
256496
256191
  subprocess.once("error", reject);
256497
256192
  subprocess.once("close", (exitCode) => {
256498
256193
  if (!options.allowNonzeroExitCode && exitCode !== 0) {
256499
256194
  reject(new Error(`Exited with code ${exitCode}`));
256500
256195
  return;
256501
256196
  }
256502
- resolve9(subprocess);
256197
+ resolve7(subprocess);
256503
256198
  });
256504
256199
  });
256505
256200
  }
256506
256201
  if (isFallbackAttempt) {
256507
- return new Promise((resolve9, reject) => {
256202
+ return new Promise((resolve7, reject) => {
256508
256203
  subprocess.once("error", reject);
256509
256204
  subprocess.once("spawn", () => {
256510
256205
  subprocess.once("close", (exitCode) => {
@@ -256514,17 +256209,17 @@ var baseOpen = async (options) => {
256514
256209
  return;
256515
256210
  }
256516
256211
  subprocess.unref();
256517
- resolve9(subprocess);
256212
+ resolve7(subprocess);
256518
256213
  });
256519
256214
  });
256520
256215
  });
256521
256216
  }
256522
256217
  subprocess.unref();
256523
- return new Promise((resolve9, reject) => {
256218
+ return new Promise((resolve7, reject) => {
256524
256219
  subprocess.once("error", reject);
256525
256220
  subprocess.once("spawn", () => {
256526
256221
  subprocess.off("error", reject);
256527
- resolve9(subprocess);
256222
+ resolve7(subprocess);
256528
256223
  });
256529
256224
  });
256530
256225
  };
@@ -256787,13 +256482,13 @@ function getConnectorsListAvailableCommand() {
256787
256482
  }
256788
256483
 
256789
256484
  // src/cli/commands/connectors/pull.ts
256790
- import { dirname as dirname17, join as join23, resolve as resolve9 } from "node:path";
256485
+ import { dirname as dirname16, join as join23, resolve as resolve7 } from "node:path";
256791
256486
  async function resolveConnectorsDir(options) {
256792
256487
  if (!getAppContext().projectRoot) {
256793
- return resolve9(options.dir ?? "connectors");
256488
+ return resolve7(options.dir ?? "connectors");
256794
256489
  }
256795
256490
  const { project: project2 } = await readProjectConfig();
256796
- return join23(dirname17(project2.configPath), project2.connectorsDir);
256491
+ return join23(dirname16(project2.configPath), project2.connectorsDir);
256797
256492
  }
256798
256493
  async function pullConnectorsAction({ log, runTask: runTask2, jsonMode }, options) {
256799
256494
  const connectorsDir = await resolveConnectorsDir(options);
@@ -256834,10 +256529,10 @@ function getConnectorsPullCommand() {
256834
256529
  }
256835
256530
 
256836
256531
  // src/cli/commands/connectors/push.ts
256837
- import { resolve as resolve10 } from "node:path";
256532
+ import { resolve as resolve8 } from "node:path";
256838
256533
  async function readConnectorsToPush(options) {
256839
256534
  if (!getAppContext().projectRoot) {
256840
- return readAllConnectors(resolve10(options.dir ?? "connectors"));
256535
+ return readAllConnectors(resolve8(options.dir ?? "connectors"));
256841
256536
  }
256842
256537
  const { connectors } = await readProjectConfig();
256843
256538
  return connectors;
@@ -257201,10 +256896,10 @@ function getListCommand() {
257201
256896
  }
257202
256897
 
257203
256898
  // src/cli/commands/functions/pull.ts
257204
- import { dirname as dirname18, join as join24 } from "node:path";
256899
+ import { dirname as dirname17, join as join24 } from "node:path";
257205
256900
  async function pullFunctionsAction({ log, runTask: runTask2 }, name2) {
257206
256901
  const { project: project2, functions } = await readProjectConfig();
257207
- const configDir = dirname18(project2.configPath);
256902
+ const configDir = dirname17(project2.configPath);
257208
256903
  const functionsDir = join24(configDir, project2.functionsDir);
257209
256904
  const pluginFunctionNames = new Set(functions.filter((fn) => fn.source.type === "plugin").map((fn) => fn.name));
257210
256905
  const remoteFunctions = await runTask2("Fetching functions from Base44", async () => {
@@ -257263,8 +256958,82 @@ function getFunctionsCommand() {
257263
256958
  return new Command("functions").description("Manage backend functions").addCommand(getDeployCommand()).addCommand(getDeleteCommand()).addCommand(getListCommand()).addCommand(getPullCommand());
257264
256959
  }
257265
256960
 
256961
+ // src/cli/commands/project/site-build.ts
256962
+ async function runSiteBuild({ runTask: runTask2 }, { root, buildCommand, appId }) {
256963
+ if (!buildCommand) {
256964
+ throw new ConfigNotFoundError("No site build command found.", {
256965
+ hints: [
256966
+ {
256967
+ message: `Add 'site.buildCommand' to your config.jsonc (e.g., "site": { "buildCommand": "npm run build" })`
256968
+ }
256969
+ ]
256970
+ });
256971
+ }
256972
+ await runTask2("Building site...", () => execa({
256973
+ cwd: root,
256974
+ shell: true,
256975
+ env: { VITE_BASE44_APP_ID: appId }
256976
+ })`${buildCommand}`, {
256977
+ successMessage: "Site built successfully",
256978
+ errorMessage: "Build failed"
256979
+ });
256980
+ }
256981
+ async function maybeBuildBeforeDeploy(ctx, project2, build) {
256982
+ if (!ctx.app) {
256983
+ return;
256984
+ }
256985
+ if (build === true) {
256986
+ await runSiteBuild(ctx, {
256987
+ root: project2.root,
256988
+ buildCommand: project2.site?.buildCommand,
256989
+ appId: ctx.app.id
256990
+ });
256991
+ return;
256992
+ }
256993
+ if (build === false || !project2.site?.outputDirectory) {
256994
+ return;
256995
+ }
256996
+ const shouldBuild = await shouldAskToBuild(ctx.isNonInteractive, project2.site.buildCommand);
256997
+ if (shouldBuild) {
256998
+ await runSiteBuild(ctx, {
256999
+ root: project2.root,
257000
+ buildCommand: project2.site.buildCommand,
257001
+ appId: ctx.app.id
257002
+ });
257003
+ }
257004
+ }
257005
+ async function shouldAskToBuild(isNonInteractive, buildCommand) {
257006
+ if (!buildCommand || isNonInteractive) {
257007
+ return false;
257008
+ }
257009
+ const answer = await Re({
257010
+ message: `Build the site first? (runs '${buildCommand}' with your app id)`
257011
+ });
257012
+ return !Ct(answer) && answer;
257013
+ }
257014
+
257015
+ // src/cli/commands/project/build.ts
257016
+ async function buildAction(ctx) {
257017
+ const { app } = ctx;
257018
+ if (!app?.projectRoot) {
257019
+ throw new ConfigInvalidError("base44 build requires a linked local project. Run it from a project with base44/.app.jsonc.");
257020
+ }
257021
+ const { project: project2 } = await readProjectConfig(app.projectRoot);
257022
+ await runSiteBuild(ctx, {
257023
+ root: project2.root,
257024
+ buildCommand: project2.site?.buildCommand,
257025
+ appId: app.id
257026
+ });
257027
+ return {
257028
+ outroMessage: `Site built with app id ${theme.styles.bold(app.id)}`
257029
+ };
257030
+ }
257031
+ function getBuildCommand() {
257032
+ return new Base44Command("build").description("Build the site with the Base44 app id injected").action(buildAction);
257033
+ }
257034
+
257266
257035
  // src/cli/commands/project/create.ts
257267
- import { basename as basename4, resolve as resolve11 } from "node:path";
257036
+ import { basename as basename4, resolve as resolve9 } from "node:path";
257268
257037
  var import_kebabCase = __toESM(require_kebabCase(), 1);
257269
257038
 
257270
257039
  // src/cli/commands/project/scaffold-shared.ts
@@ -257285,7 +257054,7 @@ async function completeProjectSetup({
257285
257054
  projectId,
257286
257055
  name: name2,
257287
257056
  resolvedPath,
257288
- deploy: deploy6,
257057
+ deploy: deploy5,
257289
257058
  skills,
257290
257059
  isInteractive
257291
257060
  }, { runTask: runTask2 }) {
@@ -257299,7 +257068,7 @@ async function completeProjectSetup({
257299
257068
  });
257300
257069
  shouldPushEntities = !Ct(result) && result;
257301
257070
  } else {
257302
- shouldPushEntities = !!deploy6;
257071
+ shouldPushEntities = !!deploy5;
257303
257072
  }
257304
257073
  if (shouldPushEntities) {
257305
257074
  await runTask2(`Pushing ${entities.length} data models to Base44...`, async () => {
@@ -257319,7 +257088,7 @@ async function completeProjectSetup({
257319
257088
  });
257320
257089
  shouldDeploy = !Ct(result) && result;
257321
257090
  } else {
257322
- shouldDeploy = !!deploy6;
257091
+ shouldDeploy = !!deploy5;
257323
257092
  }
257324
257093
  if (shouldDeploy && installCommand && buildCommand && outputDirectory) {
257325
257094
  const { appUrl } = await runTask2("Installing dependencies...", async (updateMessage) => {
@@ -257456,7 +257225,7 @@ async function createInteractive(options, ctx) {
257456
257225
  }, ctx);
257457
257226
  }
257458
257227
  async function createNonInteractive(options, ctx) {
257459
- ctx.log.info(`Creating a new project at ${resolve11(options.path)}`);
257228
+ ctx.log.info(`Creating a new project at ${resolve9(options.path)}`);
257460
257229
  const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
257461
257230
  return await executeCreate({
257462
257231
  template: template2,
@@ -257473,14 +257242,14 @@ async function executeCreate({
257473
257242
  name: rawName,
257474
257243
  description,
257475
257244
  projectPath,
257476
- deploy: deploy6,
257245
+ deploy: deploy5,
257477
257246
  skills,
257478
257247
  workspaceId: flagWorkspaceId,
257479
257248
  isInteractive
257480
257249
  }, ctx) {
257481
257250
  const { log, runTask: runTask2 } = ctx;
257482
257251
  const name2 = rawName.trim();
257483
- const resolvedPath = resolve11(projectPath);
257252
+ const resolvedPath = resolve9(projectPath);
257484
257253
  const organizationId = await resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive);
257485
257254
  const { projectId } = await runTask2("Setting up your project...", async () => {
257486
257255
  return await createProjectFiles({
@@ -257495,7 +257264,7 @@ async function executeCreate({
257495
257264
  errorMessage: "Failed to create project"
257496
257265
  });
257497
257266
  setAppContext({ id: projectId, projectRoot: resolvedPath });
257498
- const summary = await completeProjectSetup({ projectId, name: name2, resolvedPath, deploy: deploy6, skills, isInteractive }, ctx);
257267
+ const summary = await completeProjectSetup({ projectId, name: name2, resolvedPath, deploy: deploy5, skills, isInteractive }, ctx);
257499
257268
  printProjectSummary(summary, log);
257500
257269
  return { outroMessage: "Your project is set up and ready to use" };
257501
257270
  }
@@ -257531,14 +257300,26 @@ Examples:
257531
257300
  }
257532
257301
 
257533
257302
  // src/cli/commands/site/run-app-deploy.ts
257303
+ var TASK_LABELS = {
257304
+ "static-deployment": {
257305
+ start: "Deploying site...",
257306
+ success: "Site deployed",
257307
+ error: "Site deploy failed"
257308
+ },
257309
+ static: {
257310
+ start: "Creating archive and deploying site...",
257311
+ success: "Site deployed successfully",
257312
+ error: "Deployment failed"
257313
+ }
257314
+ };
257534
257315
  async function runAppSiteDeploy({ runTask: runTask2, log }, target, options = {}) {
257535
257316
  const kind = await detectAppDeployKind(target);
257536
257317
  if (kind === "none")
257537
257318
  return { kind: "none" };
257538
- const isFullStack = kind === "full-stack";
257319
+ const labels = TASK_LABELS[kind];
257539
257320
  const progressLines = [];
257540
257321
  const warnings = [];
257541
- const result = await runTask2(isFullStack ? "Deploying full-stack app..." : "Creating archive and deploying site...", async (updateMessage) => await deployAppSite(target, {
257322
+ const result = await runTask2(labels.start, async (updateMessage) => await deployAppSite(target, {
257542
257323
  gitHash: options.gitHash,
257543
257324
  progress: {
257544
257325
  onWarning: (message) => {
@@ -257551,14 +257332,11 @@ async function runAppSiteDeploy({ runTask: runTask2, log }, target, options = {}
257551
257332
  },
257552
257333
  onAssetUpload: ({ uploadedFiles, totalFiles }) => {
257553
257334
  updateMessage(`Uploaded ${uploadedFiles} of ${totalFiles} assets`);
257554
- },
257555
- onWorker: ({ moduleCount }) => {
257556
- updateMessage(`Deploying worker (${moduleCount} modules)…`);
257557
257335
  }
257558
257336
  }
257559
257337
  }), {
257560
- successMessage: isFullStack ? theme.colors.base44Orange("Full-stack app deployed") : "Site deployed successfully",
257561
- errorMessage: isFullStack ? "Full-stack deploy failed" : "Deployment failed"
257338
+ successMessage: labels.success,
257339
+ errorMessage: labels.error
257562
257340
  });
257563
257341
  for (const line of progressLines) {
257564
257342
  log.message(theme.styles.dim(line));
@@ -257575,9 +257353,6 @@ async function deployAction(ctx, options = {}) {
257575
257353
  if (isNonInteractive && !options.yes) {
257576
257354
  throw new InvalidInputError("--yes is required in non-interactive mode");
257577
257355
  }
257578
- if (options.build && options.prebuilt) {
257579
- throw new InvalidInputError("--build and --prebuilt cannot be combined.");
257580
- }
257581
257356
  const projectData = await readProjectConfig(options.projectRoot);
257582
257357
  const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
257583
257358
  const plannedSite = await detectAppDeployKind(project2);
@@ -257605,9 +257380,7 @@ async function deployAction(ctx, options = {}) {
257605
257380
  if (project2.visibility) {
257606
257381
  summaryLines.push(` - Visibility: ${project2.visibility}`);
257607
257382
  }
257608
- if (plannedSite === "full-stack") {
257609
- summaryLines.push(" - Full-stack app");
257610
- } else if (project2.site?.outputDirectory) {
257383
+ if (project2.site?.outputDirectory) {
257611
257384
  summaryLines.push(` - Site from ${project2.site.outputDirectory}`);
257612
257385
  }
257613
257386
  if (!options.yes) {
@@ -257625,6 +257398,7 @@ ${summaryLines.join(`
257625
257398
  ${summaryLines.join(`
257626
257399
  `)}`);
257627
257400
  }
257401
+ await maybeBuildBeforeDeploy(ctx, project2, options.build);
257628
257402
  let functionCompleted = 0;
257629
257403
  const functionTotal = functions.length;
257630
257404
  const result = await deployAll(projectData, {
@@ -257641,7 +257415,6 @@ ${summaryLines.join(`
257641
257415
  formatDeployResult(r, log);
257642
257416
  }
257643
257417
  });
257644
- await buildSiteIfNeeded(ctx, projectData, options);
257645
257418
  const siteResult = await runAppSiteDeploy(ctx, project2, {
257646
257419
  gitHash: options.gitHash
257647
257420
  });
@@ -257655,41 +257428,24 @@ ${summaryLines.join(`
257655
257428
  if (siteResult.kind === "static") {
257656
257429
  log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(siteResult.appUrl)}`);
257657
257430
  }
257658
- if (siteResult.kind === "full-stack") {
257659
- printFullStackSummary(siteResult, log);
257431
+ const deployment = siteResult.kind === "static-deployment" ? siteResult : undefined;
257432
+ if (deployment) {
257433
+ printDeploymentSummary(deployment, log);
257660
257434
  }
257661
257435
  return {
257662
257436
  outroMessage: "App deployed successfully",
257663
- stdout: ctx.jsonMode && siteResult.kind === "full-stack" ? `${JSON.stringify({
257664
- deploymentId: siteResult.deploymentId,
257665
- gitHash: siteResult.gitHash
257437
+ stdout: ctx.jsonMode && deployment ? `${JSON.stringify({
257438
+ deploymentId: deployment.deploymentId,
257439
+ gitHash: deployment.gitHash
257666
257440
  }, null, 2)}
257667
257441
  ` : undefined
257668
257442
  };
257669
257443
  }
257670
- async function buildSiteIfNeeded({ runTask: runTask2 }, { project: project2 }, options) {
257671
- const site2 = project2.site;
257672
- if (!site2?.buildCommand || options.prebuilt)
257673
- return;
257674
- if (await hasBuiltArtifact(project2) && !options.build)
257675
- return;
257676
- const { installCommand, buildCommand } = site2;
257677
- await runTask2(installCommand ? "Installing dependencies..." : "Building project...", async (updateMessage) => {
257678
- if (installCommand) {
257679
- await execa({ cwd: project2.root, shell: true })`${installCommand}`;
257680
- updateMessage("Building project...");
257681
- }
257682
- await execa({ cwd: project2.root, shell: true })`${buildCommand}`;
257683
- }, {
257684
- successMessage: "Project built successfully",
257685
- errorMessage: "Failed to build project"
257686
- });
257687
- }
257688
- function printFullStackSummary(deployment, log) {
257444
+ function printDeploymentSummary(deployment, log) {
257689
257445
  log.message(`${theme.styles.header("Deployment")}: ${deployment.deploymentId} ${theme.styles.dim(`(commit ${deployment.gitHash.slice(0, 12)})`)}`);
257690
257446
  }
257691
257447
  function getDeployCommand2() {
257692
- return new Base44Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").option("--git-hash <hash>", "Commit the full-stack build came from (defaults to the checkout's HEAD)").option("--build", "Run the configured install/build commands before deploying, even when a build artifact already exists").option("--prebuilt", "Skip the build step and deploy the existing artifact").action(deployAction);
257448
+ return new Base44Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").option("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").option("--build", "Build the site before deploying (skips the prompt)").option("--no-build", "Deploy without building (skips the prompt)").action(deployAction);
257693
257449
  }
257694
257450
  async function handleOAuthConnectors(connectorResults, isNonInteractive, options, log) {
257695
257451
  const needsOAuth = filterPendingOAuth(connectorResults);
@@ -257967,7 +257723,7 @@ async function followLogs(functionNames, options, availableFunctionNames, jsonMo
257967
257723
  for (const entry of fresh)
257968
257724
  writeFollowLine(entry, jsonMode);
257969
257725
  first = false;
257970
- await new Promise((resolve12) => setTimeout(resolve12, 2000));
257726
+ await new Promise((resolve10) => setTimeout(resolve10, 2000));
257971
257727
  }
257972
257728
  }
257973
257729
  function formatLogs(entries, env3) {
@@ -258081,7 +257837,7 @@ function getLogsCommand() {
258081
257837
  }
258082
257838
 
258083
257839
  // src/cli/commands/project/scaffold.ts
258084
- import { basename as basename5, resolve as resolve12 } from "node:path";
257840
+ import { basename as basename5, resolve as resolve10 } from "node:path";
258085
257841
  function resolveAppId(options) {
258086
257842
  const appId = options.appId;
258087
257843
  if (!appId) {
@@ -258097,7 +257853,7 @@ function resolveAppId(options) {
258097
257853
  async function scaffoldAction(ctx, name2, options, command2) {
258098
257854
  const { log, runTask: runTask2 } = ctx;
258099
257855
  const appId = resolveAppId(command2.optsWithGlobals());
258100
- const resolvedPath = resolve12("./");
257856
+ const resolvedPath = resolve10("./");
258101
257857
  const projectName = (name2 ?? basename5(resolvedPath)).trim();
258102
257858
  const template2 = await getTemplateById("backend-only");
258103
257859
  log.info(`Scaffolding project at ${resolvedPath}`);
@@ -258494,7 +258250,7 @@ function getSecretsListCommand() {
258494
258250
  }
258495
258251
 
258496
258252
  // src/cli/commands/secrets/set.ts
258497
- import { resolve as resolve13 } from "node:path";
258253
+ import { resolve as resolve11 } from "node:path";
258498
258254
  function parseEntries(entries) {
258499
258255
  const secrets = {};
258500
258256
  for (const entry of entries) {
@@ -258525,7 +258281,7 @@ async function setSecretsAction({ log, runTask: runTask2 }, entries, options) {
258525
258281
  validateInput(entries, options);
258526
258282
  let secrets;
258527
258283
  if (options.envFile) {
258528
- secrets = await parseEnvFile(resolve13(options.envFile));
258284
+ secrets = await parseEnvFile(resolve11(options.envFile));
258529
258285
  if (Object.keys(secrets).length === 0) {
258530
258286
  throw new InvalidInputError("The env file contains no valid KEY=VALUE entries.");
258531
258287
  }
@@ -258566,25 +258322,23 @@ async function deployAction2(ctx, options) {
258566
258322
  hints: [
258567
258323
  {
258568
258324
  message: `Add 'site.outputDirectory' to your config.jsonc (e.g., "site": { "outputDirectory": "dist" })`
258569
- },
258570
- {
258571
- message: "Full-stack apps ship from their build artifact — run your framework's build first"
258572
258325
  }
258573
258326
  ]
258574
258327
  });
258575
258328
  }
258576
258329
  if (!options.yes) {
258577
258330
  const shouldDeploy = await Re({
258578
- message: kind === "full-stack" ? "Deploy full-stack app?" : `Deploy site from ${project2.site?.outputDirectory}?`
258331
+ message: `Deploy site from ${project2.site?.outputDirectory}?`
258579
258332
  });
258580
258333
  if (Ct(shouldDeploy) || !shouldDeploy) {
258581
258334
  return { outroMessage: "Deployment cancelled" };
258582
258335
  }
258583
258336
  }
258337
+ await maybeBuildBeforeDeploy(ctx, project2, options.build);
258584
258338
  const result = await runAppSiteDeploy(ctx, project2, {
258585
258339
  gitHash: options.gitHash
258586
258340
  });
258587
- if (result.kind === "full-stack") {
258341
+ if (result.kind === "static-deployment") {
258588
258342
  return {
258589
258343
  outroMessage: `Deployment ${result.deploymentId} (commit ${result.gitHash.slice(0, 12)})`,
258590
258344
  stdout: ctx.jsonMode ? `${JSON.stringify({ deploymentId: result.deploymentId, gitHash: result.gitHash }, null, 2)}
@@ -258597,7 +258351,7 @@ async function deployAction2(ctx, options) {
258597
258351
  return { outroMessage: "Nothing to deploy" };
258598
258352
  }
258599
258353
  function getSiteDeployCommand() {
258600
- return new Base44Command("deploy").description("Deploy the built site to Base44 hosting (full-stack apps deploy their Workers build)").option("-y, --yes", "Skip confirmation prompt").option("--git-hash <hash>", "Commit the full-stack build came from (defaults to the checkout's HEAD)").action(deployAction2);
258354
+ return new Base44Command("deploy").description("Deploy the built site to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").option("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").option("--build", "Build the site before deploying (skips the prompt)").option("--no-build", "Deploy without building (skips the prompt)").action(deployAction2);
258601
258355
  }
258602
258356
 
258603
258357
  // src/cli/commands/site/open.ts
@@ -258942,7 +258696,7 @@ function createDevLogger(label2, labelColor = theme.styles.dim) {
258942
258696
  // src/cli/dev/dev-server/main.ts
258943
258697
  var import_cors = __toESM(require_lib4(), 1);
258944
258698
  var import_express6 = __toESM(require_express(), 1);
258945
- import { dirname as dirname24, join as join35 } from "node:path";
258699
+ import { dirname as dirname23, join as join35 } from "node:path";
258946
258700
 
258947
258701
  // ../../node_modules/get-port/index.js
258948
258702
  import net from "node:net";
@@ -258969,14 +258723,14 @@ var getLocalHosts = () => {
258969
258723
  }
258970
258724
  return results;
258971
258725
  };
258972
- var checkAvailablePort = (options8) => new Promise((resolve15, reject) => {
258726
+ var checkAvailablePort = (options8) => new Promise((resolve13, reject) => {
258973
258727
  const server = net.createServer();
258974
258728
  server.unref();
258975
258729
  server.on("error", reject);
258976
258730
  server.listen(options8, () => {
258977
258731
  const { port } = server.address();
258978
258732
  server.close(() => {
258979
- resolve15(port);
258733
+ resolve13(port);
258980
258734
  });
258981
258735
  });
258982
258736
  });
@@ -259077,7 +258831,7 @@ var $setGracefulCleanup = tmp.setGracefulCleanup;
259077
258831
 
259078
258832
  // src/cli/dev/dev-server/function-manager.ts
259079
258833
  import { spawn as spawn2 } from "node:child_process";
259080
- import { dirname as dirname21, join as join29 } from "node:path";
258834
+ import { dirname as dirname20, join as join29 } from "node:path";
259081
258835
  import { pathToFileURL } from "node:url";
259082
258836
 
259083
258837
  // src/cli/dev/dev-server/base-function-manager.ts
@@ -259182,7 +258936,7 @@ class FunctionManager extends BaseFunctionManager {
259182
258936
  }
259183
258937
  spawnFunction(func, port) {
259184
258938
  this.logger.log(`Spawning function "${func.name}" on port ${port}`);
259185
- const importMapPath = join29(dirname21(this.wrapperPath), "import-map.json");
258939
+ const importMapPath = join29(dirname20(this.wrapperPath), "import-map.json");
259186
258940
  const process23 = spawn2("deno", ["run", "--allow-all", "--import-map", importMapPath, this.wrapperPath], {
259187
258941
  env: {
259188
258942
  ...globalThis.process.env,
@@ -259221,7 +258975,7 @@ class FunctionManager extends BaseFunctionManager {
259221
258975
  });
259222
258976
  }
259223
258977
  waitForReady(name2, runningFunc) {
259224
- return new Promise((resolve15, reject) => {
258978
+ return new Promise((resolve13, reject) => {
259225
258979
  runningFunc.process.on("exit", (code2) => {
259226
258980
  if (!runningFunc.ready) {
259227
258981
  clearTimeout(timeout3);
@@ -259244,7 +258998,7 @@ class FunctionManager extends BaseFunctionManager {
259244
258998
  runningFunc.ready = true;
259245
258999
  clearTimeout(timeout3);
259246
259000
  runningFunc.process.stdout?.off("data", onData);
259247
- resolve15(runningFunc.port);
259001
+ resolve13(runningFunc.port);
259248
259002
  }
259249
259003
  };
259250
259004
  runningFunc.process.stdout?.on("data", onData);
@@ -260830,16 +260584,16 @@ function createCustomIntegrationRoutes(remoteProxy, logger2) {
260830
260584
 
260831
260585
  // src/cli/dev/dev-server/watcher.ts
260832
260586
  import { EventEmitter as EventEmitter4 } from "node:events";
260833
- import { relative as relative7 } from "node:path";
260587
+ import { relative as relative6 } from "node:path";
260834
260588
 
260835
260589
  // ../../node_modules/chokidar/index.js
260836
260590
  import { EventEmitter as EventEmitter3 } from "node:events";
260837
260591
  import { stat as statcb, Stats } from "node:fs";
260838
- import { readdir as readdir4, stat as stat6 } from "node:fs/promises";
260592
+ import { readdir as readdir4, stat as stat5 } from "node:fs/promises";
260839
260593
  import * as sp3 from "node:path";
260840
260594
 
260841
260595
  // ../../node_modules/readdirp/index.js
260842
- import { lstat as lstat2, readdir as readdir3, realpath, stat as stat4 } from "node:fs/promises";
260596
+ import { lstat as lstat2, readdir as readdir3, realpath, stat as stat3 } from "node:fs/promises";
260843
260597
  import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
260844
260598
  import { Readable as Readable6 } from "node:stream";
260845
260599
  var EntryTypes = {
@@ -260921,7 +260675,7 @@ class ReaddirpStream extends Readable6 {
260921
260675
  const { root: root2, type } = opts;
260922
260676
  this._fileFilter = normalizeFilter(opts.fileFilter);
260923
260677
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
260924
- const statMethod = opts.lstat ? lstat2 : stat4;
260678
+ const statMethod = opts.lstat ? lstat2 : stat3;
260925
260679
  if (wantBigintFsStats) {
260926
260680
  this._stat = (path19) => statMethod(path19, { bigint: true });
260927
260681
  } else {
@@ -261074,7 +260828,7 @@ function readdirp(root2, options8 = {}) {
261074
260828
 
261075
260829
  // ../../node_modules/chokidar/handler.js
261076
260830
  import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
261077
- import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat5 } from "node:fs/promises";
260831
+ import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat4 } from "node:fs/promises";
261078
260832
  import { type as osType } from "node:os";
261079
260833
  import * as sp2 from "node:path";
261080
260834
  var STR_DATA = "data";
@@ -261100,7 +260854,7 @@ var EVENTS = {
261100
260854
  };
261101
260855
  var EV = EVENTS;
261102
260856
  var THROTTLE_MODE_WATCH = "watch";
261103
- var statMethods = { lstat: lstat3, stat: stat5 };
260857
+ var statMethods = { lstat: lstat3, stat: stat4 };
261104
260858
  var KEY_LISTENERS = "listeners";
261105
260859
  var KEY_ERR = "errHandlers";
261106
260860
  var KEY_RAW = "rawEmitters";
@@ -261560,9 +261314,9 @@ class NodeFsHandler {
261560
261314
  if (this.fsw.closed) {
261561
261315
  return;
261562
261316
  }
261563
- const dirname23 = sp2.dirname(file2);
261317
+ const dirname22 = sp2.dirname(file2);
261564
261318
  const basename7 = sp2.basename(file2);
261565
- const parent = this.fsw._getWatchedDir(dirname23);
261319
+ const parent = this.fsw._getWatchedDir(dirname22);
261566
261320
  let prevStats = stats;
261567
261321
  if (parent.has(basename7))
261568
261322
  return;
@@ -261571,7 +261325,7 @@ class NodeFsHandler {
261571
261325
  return;
261572
261326
  if (!newStats || newStats.mtimeMs === 0) {
261573
261327
  try {
261574
- const newStats2 = await stat5(file2);
261328
+ const newStats2 = await stat4(file2);
261575
261329
  if (this.fsw.closed)
261576
261330
  return;
261577
261331
  const at13 = newStats2.atimeMs;
@@ -261589,7 +261343,7 @@ class NodeFsHandler {
261589
261343
  prevStats = newStats2;
261590
261344
  }
261591
261345
  } catch (error48) {
261592
- this.fsw._remove(dirname23, basename7);
261346
+ this.fsw._remove(dirname22, basename7);
261593
261347
  }
261594
261348
  } else if (parent.has(basename7)) {
261595
261349
  const at13 = newStats.atimeMs;
@@ -261678,7 +261432,7 @@ class NodeFsHandler {
261678
261432
  this._addToNodeFs(path19, initialAdd, wh2, depth + 1);
261679
261433
  }
261680
261434
  }).on(EV.ERROR, this._boundHandleError);
261681
- return new Promise((resolve16, reject) => {
261435
+ return new Promise((resolve14, reject) => {
261682
261436
  if (!stream)
261683
261437
  return reject();
261684
261438
  stream.once(STR_END, () => {
@@ -261687,7 +261441,7 @@ class NodeFsHandler {
261687
261441
  return;
261688
261442
  }
261689
261443
  const wasThrottled = throttler ? throttler.clear() : false;
261690
- resolve16(undefined);
261444
+ resolve14(undefined);
261691
261445
  previous.getChildren().filter((item) => {
261692
261446
  return item !== directory && !current.has(item);
261693
261447
  }).forEach((item) => {
@@ -261812,11 +261566,11 @@ function createPattern(matcher) {
261812
261566
  if (matcher.path === string4)
261813
261567
  return true;
261814
261568
  if (matcher.recursive) {
261815
- const relative7 = sp3.relative(matcher.path, string4);
261816
- if (!relative7) {
261569
+ const relative6 = sp3.relative(matcher.path, string4);
261570
+ if (!relative6) {
261817
261571
  return false;
261818
261572
  }
261819
- return !relative7.startsWith("..") && !sp3.isAbsolute(relative7);
261573
+ return !relative6.startsWith("..") && !sp3.isAbsolute(relative6);
261820
261574
  }
261821
261575
  return false;
261822
261576
  };
@@ -262243,7 +261997,7 @@ class FSWatcher extends EventEmitter3 {
262243
261997
  const fullPath = opts.cwd ? sp3.join(opts.cwd, path19) : path19;
262244
261998
  let stats2;
262245
261999
  try {
262246
- stats2 = await stat6(fullPath);
262000
+ stats2 = await stat5(fullPath);
262247
262001
  } catch (err) {}
262248
262002
  if (!stats2 || this.closed)
262249
262003
  return;
@@ -262347,8 +262101,8 @@ class FSWatcher extends EventEmitter3 {
262347
262101
  }
262348
262102
  return this._userIgnored(path19, stats);
262349
262103
  }
262350
- _isntIgnored(path19, stat7) {
262351
- return !this._isIgnored(path19, stat7);
262104
+ _isntIgnored(path19, stat6) {
262105
+ return !this._isIgnored(path19, stat6);
262352
262106
  }
262353
262107
  _getWatchHelpers(path19) {
262354
262108
  return new WatchHelper(path19, this.options.followSymlinks, this);
@@ -262515,7 +262269,7 @@ class WatchBase44 extends EventEmitter4 {
262515
262269
  ignoreInitial: true
262516
262270
  });
262517
262271
  watcher.on("all", import_debounce.default(async (_event, path19) => {
262518
- this.emit("change", name2, relative7(targetPath, path19));
262272
+ this.emit("change", name2, relative6(targetPath, path19));
262519
262273
  }, WATCH_DEBOUNCE_MS));
262520
262274
  watcher.on("error", (err) => {
262521
262275
  this.logger.error(`Watch handler failed for ${targetPath}`, err);
@@ -262604,7 +262358,7 @@ async function createDevServer(options8) {
262604
262358
  }
262605
262359
  remoteProxy(req, res, next);
262606
262360
  });
262607
- const server = await new Promise((resolve17, reject) => {
262361
+ const server = await new Promise((resolve15, reject) => {
262608
262362
  const s5 = app.listen(port, "127.0.0.1", (err) => {
262609
262363
  if (err) {
262610
262364
  if ("code" in err && err.code === "EADDRINUSE") {
@@ -262613,7 +262367,7 @@ async function createDevServer(options8) {
262613
262367
  reject(err);
262614
262368
  }
262615
262369
  } else {
262616
- resolve17(s5);
262370
+ resolve15(s5);
262617
262371
  }
262618
262372
  });
262619
262373
  });
@@ -262622,8 +262376,8 @@ async function createDevServer(options8) {
262622
262376
  broadcastEntityEvent(io6, appId, entityName, event);
262623
262377
  };
262624
262378
  const base44ConfigWatcher = new WatchBase44({
262625
- functions: join35(dirname24(project2.configPath), project2.functionsDir),
262626
- entities: join35(dirname24(project2.configPath), project2.entitiesDir)
262379
+ functions: join35(dirname23(project2.configPath), project2.functionsDir),
262380
+ entities: join35(dirname23(project2.configPath), project2.entitiesDir)
262627
262381
  }, devLogger);
262628
262382
  base44ConfigWatcher.on("change", async (name2) => {
262629
262383
  try {
@@ -262663,13 +262417,13 @@ async function createDevServer(options8) {
262663
262417
  if (!server.listening) {
262664
262418
  return;
262665
262419
  }
262666
- await new Promise((resolve17, reject) => {
262420
+ await new Promise((resolve15, reject) => {
262667
262421
  server.close((error48) => {
262668
262422
  if (error48) {
262669
262423
  reject(error48);
262670
262424
  return;
262671
262425
  }
262672
- resolve17();
262426
+ resolve15();
262673
262427
  });
262674
262428
  });
262675
262429
  };
@@ -262740,15 +262494,15 @@ class ServeRunner {
262740
262494
  return;
262741
262495
  }
262742
262496
  this.stopping = true;
262743
- const exited = new Promise((resolve17) => child.once("exit", () => resolve17()));
262497
+ const exited = new Promise((resolve15) => child.once("exit", () => resolve15()));
262744
262498
  if (process23.platform === "win32" && child.pid) {
262745
262499
  const taskkill = spawn3("taskkill", ["/pid", String(child.pid), "/T", "/F"], {
262746
262500
  stdio: "ignore",
262747
262501
  windowsHide: true
262748
262502
  });
262749
- await new Promise((resolve17) => {
262750
- taskkill.once("exit", () => resolve17());
262751
- taskkill.once("error", () => resolve17());
262503
+ await new Promise((resolve15) => {
262504
+ taskkill.once("exit", () => resolve15());
262505
+ taskkill.once("error", () => resolve15());
262752
262506
  });
262753
262507
  } else if (child.pid) {
262754
262508
  try {
@@ -262918,13 +262672,13 @@ async function runScript(options8) {
262918
262672
  }
262919
262673
  // src/cli/commands/exec.ts
262920
262674
  function readStdin2() {
262921
- return new Promise((resolve17, reject) => {
262675
+ return new Promise((resolve15, reject) => {
262922
262676
  let data = "";
262923
262677
  process.stdin.setEncoding("utf-8");
262924
262678
  process.stdin.on("data", (chunk) => {
262925
262679
  data += chunk;
262926
262680
  });
262927
- process.stdin.on("end", () => resolve17(data));
262681
+ process.stdin.on("end", () => resolve15(data));
262928
262682
  process.stdin.on("error", reject);
262929
262683
  });
262930
262684
  }
@@ -262995,7 +262749,7 @@ Examples:
262995
262749
  }
262996
262750
 
262997
262751
  // src/cli/commands/project/eject.ts
262998
- import { resolve as resolve17 } from "node:path";
262752
+ import { resolve as resolve15 } from "node:path";
262999
262753
  var import_kebabCase2 = __toESM(require_kebabCase(), 1);
263000
262754
  async function eject(ctx, options8, command2) {
263001
262755
  const { log, runTask: runTask2, isNonInteractive } = ctx;
@@ -263059,7 +262813,7 @@ async function eject(ctx, options8, command2) {
263059
262813
  Ne("Operation cancelled.");
263060
262814
  throw new CLIExitError(0);
263061
262815
  }
263062
- const resolvedPath = resolve17(selectedPath);
262816
+ const resolvedPath = resolve15(selectedPath);
263063
262817
  await runTask2("Downloading your project's code...", async (updateMessage) => {
263064
262818
  await createProjectFilesForExistingProject({
263065
262819
  projectId,
@@ -263092,7 +262846,11 @@ async function eject(ctx, options8, command2) {
263092
262846
  successMessage: theme.colors.base44Orange("Project built successfully"),
263093
262847
  errorMessage: "Failed to build project"
263094
262848
  });
263095
- await deployAction(ctx, { yes: true, projectRoot: resolvedPath });
262849
+ await deployAction(ctx, {
262850
+ yes: true,
262851
+ build: false,
262852
+ projectRoot: resolvedPath
262853
+ });
263096
262854
  }
263097
262855
  }
263098
262856
  return { outroMessage: "Your new project is set and ready to use" };
@@ -263121,6 +262879,7 @@ function createProgram(context) {
263121
262879
  program2.addCommand(getCreateCommand());
263122
262880
  program2.addCommand(getScaffoldCommand());
263123
262881
  program2.addCommand(getDashboardCommand());
262882
+ program2.addCommand(getBuildCommand());
263124
262883
  program2.addCommand(getDeployCommand2());
263125
262884
  program2.addCommand(getVisibilityCommand());
263126
262885
  program2.addCommand(getLinkCommand());
@@ -263147,7 +262906,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
263147
262906
  import { release, type } from "node:os";
263148
262907
 
263149
262908
  // ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
263150
- import { dirname as dirname25, posix, sep as sep2 } from "path";
262909
+ import { dirname as dirname24, posix, sep } from "path";
263151
262910
  function createModulerModifier() {
263152
262911
  const getModuleFromFileName = createGetModuleFromFilename();
263153
262912
  return async (frames) => {
@@ -263156,7 +262915,7 @@ function createModulerModifier() {
263156
262915
  return frames;
263157
262916
  };
263158
262917
  }
263159
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname25(process.argv[1]) : process.cwd(), isWindows5 = sep2 === "\\") {
262918
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname24(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
263160
262919
  const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
263161
262920
  return (filename) => {
263162
262921
  if (!filename)
@@ -265434,14 +265193,14 @@ async function addSourceContext(frames) {
265434
265193
  return frames;
265435
265194
  }
265436
265195
  function getContextLinesFromFile(path19, ranges, output) {
265437
- return new Promise((resolve18) => {
265196
+ return new Promise((resolve16) => {
265438
265197
  const stream = createReadStream2(path19);
265439
265198
  const lineReaded = createInterface2({
265440
265199
  input: stream
265441
265200
  });
265442
265201
  function destroyStreamAndResolve() {
265443
265202
  stream.destroy();
265444
- resolve18();
265203
+ resolve16();
265445
265204
  }
265446
265205
  let lineNumber = 0;
265447
265206
  let currentRangeIndex = 0;
@@ -266553,15 +266312,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
266553
266312
  return true;
266554
266313
  if (this.featureFlagsPoller === undefined)
266555
266314
  return false;
266556
- return new Promise((resolve18) => {
266315
+ return new Promise((resolve16) => {
266557
266316
  const timeout3 = setTimeout(() => {
266558
266317
  cleanup();
266559
- resolve18(false);
266318
+ resolve16(false);
266560
266319
  }, timeoutMs);
266561
266320
  const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
266562
266321
  clearTimeout(timeout3);
266563
266322
  cleanup();
266564
- resolve18(count2 > 0);
266323
+ resolve16(count2 > 0);
266565
266324
  });
266566
266325
  });
266567
266326
  }
@@ -267345,7 +267104,7 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
267345
267104
  });
267346
267105
  }
267347
267106
  // src/cli/index.ts
267348
- var __dirname4 = dirname26(fileURLToPath6(import.meta.url));
267107
+ var __dirname4 = dirname25(fileURLToPath6(import.meta.url));
267349
267108
  async function runCLI(options8) {
267350
267109
  ensureNpmAssets(join36(__dirname4, "../assets"));
267351
267110
  const errorReporter = new ErrorReporter;
@@ -267386,4 +267145,4 @@ export {
267386
267145
  CLIExitError
267387
267146
  };
267388
267147
 
267389
- //# debugId=FB9E6446856AEBA564756E2164756E21
267148
+ //# debugId=90CE1A1AA8C5C92664756E2164756E21