@base44-preview/cli 0.2.2-pr.674.03ac2f7 → 0.2.2-pr.675.788aed1

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
@@ -228838,7 +228838,7 @@ function normalizeBase44Env() {
228838
228838
  loadProjectEnvFiles();
228839
228839
 
228840
228840
  // src/cli/index.ts
228841
- import { dirname as dirname31, join as join41 } from "node:path";
228841
+ import { dirname as dirname30, join as join41 } from "node:path";
228842
228842
  import { fileURLToPath as fileURLToPath7 } from "node:url";
228843
228843
 
228844
228844
  // ../../node_modules/@clack/core/dist/index.mjs
@@ -230718,9 +230718,6 @@ import { randomUUID as randomUUID2 } from "node:crypto";
230718
230718
 
230719
230719
  // src/core/auth/config.ts
230720
230720
  var import_jsonwebtoken = __toESM(require_jsonwebtoken(), 1);
230721
- import { mkdir as mkdir2, open, stat, unlink as unlink2 } from "node:fs/promises";
230722
- import { dirname as dirname4 } from "node:path";
230723
- import { setTimeout as sleep3 } from "node:timers/promises";
230724
230721
 
230725
230722
  // src/core/config.ts
230726
230723
  import { homedir } from "node:os";
@@ -230834,8 +230831,6 @@ function getTestOverrides() {
230834
230831
  // src/core/auth/config.ts
230835
230832
  var TOKEN_REFRESH_BUFFER_MS = 60 * 1000;
230836
230833
  var WORKSPACE_API_KEY_PREFIX = "b44k_";
230837
- var REFRESH_LOCK_STALE_MS = 30 * 1000;
230838
- var REFRESH_LOCK_RETRY_MS = 50;
230839
230834
  var refreshPromise = null;
230840
230835
  function getWorkspaceApiKeyFromEnv() {
230841
230836
  const key = process.env.BASE44_API_KEY?.trim();
@@ -230905,56 +230900,23 @@ async function deleteAuth() {
230905
230900
  function isTokenExpired(auth) {
230906
230901
  return Date.now() >= auth.expiresAt - TOKEN_REFRESH_BUFFER_MS;
230907
230902
  }
230908
- async function withRefreshLock(fn) {
230909
- const lockPath = `${getAuthFilePath()}.lock`;
230910
- await mkdir2(dirname4(lockPath), { recursive: true });
230911
- for (;; ) {
230912
- try {
230913
- await (await open(lockPath, "wx")).close();
230914
- break;
230915
- } catch (error) {
230916
- if (error.code !== "EEXIST") {
230917
- throw error;
230918
- }
230919
- const lock = await stat(lockPath).catch(() => null);
230920
- if (lock && Date.now() - lock.mtimeMs > REFRESH_LOCK_STALE_MS) {
230921
- await unlink2(lockPath).catch(() => {});
230922
- } else {
230923
- await sleep3(REFRESH_LOCK_RETRY_MS);
230924
- }
230925
- }
230926
- }
230927
- try {
230928
- return await fn();
230929
- } finally {
230930
- await unlink2(lockPath).catch(() => {});
230931
- }
230932
- }
230933
230903
  async function refreshAndSaveTokens() {
230934
230904
  if (refreshPromise) {
230935
230905
  return refreshPromise;
230936
230906
  }
230937
230907
  refreshPromise = (async () => {
230938
230908
  try {
230939
- const staleRefreshToken = (await readAuth()).refreshToken;
230940
- return await withRefreshLock(async () => {
230941
- const auth = await readAuth();
230942
- if (auth.refreshToken !== staleRefreshToken) {
230943
- return auth.accessToken;
230944
- }
230945
- const tokenResponse = await renewAccessToken(auth.refreshToken);
230946
- await writeAuth({
230947
- ...auth,
230948
- accessToken: tokenResponse.accessToken,
230949
- refreshToken: tokenResponse.refreshToken,
230950
- expiresAt: Date.now() + tokenResponse.expiresIn * 1000
230951
- });
230952
- return tokenResponse.accessToken;
230909
+ const auth = await readAuth();
230910
+ const tokenResponse = await renewAccessToken(auth.refreshToken);
230911
+ await writeAuth({
230912
+ ...auth,
230913
+ accessToken: tokenResponse.accessToken,
230914
+ refreshToken: tokenResponse.refreshToken,
230915
+ expiresAt: Date.now() + tokenResponse.expiresIn * 1000
230953
230916
  });
230954
- } catch (error) {
230955
- if (error instanceof ApiError && (error.statusCode === 400 || error.statusCode === 401)) {
230956
- await deleteAuth();
230957
- }
230917
+ return tokenResponse.accessToken;
230918
+ } catch {
230919
+ await deleteAuth();
230958
230920
  return null;
230959
230921
  } finally {
230960
230922
  refreshPromise = null;
@@ -232026,7 +231988,7 @@ import path6 from "node:path";
232026
231988
 
232027
231989
  // ../../node_modules/tar/dist/esm/list.js
232028
231990
  import fs5 from "node:fs";
232029
- import { dirname as dirname5, parse as parse7 } from "path";
231991
+ import { dirname as dirname4, parse as parse7 } from "path";
232030
231992
 
232031
231993
  // ../../node_modules/tar/dist/esm/options.js
232032
231994
  var argmap = new Map([
@@ -233602,7 +233564,7 @@ var filesFilter = (opt, files) => {
233602
233564
  if (m !== undefined) {
233603
233565
  ret = m;
233604
233566
  } else {
233605
- ret = mapHas(dirname5(file), root);
233567
+ ret = mapHas(dirname4(file), root);
233606
233568
  }
233607
233569
  }
233608
233570
  map.set(file, ret);
@@ -235281,7 +235243,7 @@ var checkCwd = (dir, cb) => {
235281
235243
  cb(er);
235282
235244
  });
235283
235245
  };
235284
- var mkdir3 = (dir, opt, cb) => {
235246
+ var mkdir2 = (dir, opt, cb) => {
235285
235247
  dir = normalizeWindowsPath(dir);
235286
235248
  const umask = opt.umask ?? 18;
235287
235249
  const mode = opt.mode | 448;
@@ -235826,7 +235788,7 @@ class Unpack extends Parser {
235826
235788
  }
235827
235789
  }
235828
235790
  [MKDIR](dir, mode, cb) {
235829
- mkdir3(normalizeWindowsPath(dir), {
235791
+ mkdir2(normalizeWindowsPath(dir), {
235830
235792
  uid: this.uid,
235831
235793
  gid: this.gid,
235832
235794
  processUid: this.processUid,
@@ -236749,7 +236711,7 @@ async function getSiteUrl() {
236749
236711
  }
236750
236712
  // src/core/project/config.ts
236751
236713
  import { existsSync } from "node:fs";
236752
- import { dirname as dirname11, join as join12 } from "node:path";
236714
+ import { dirname as dirname10, join as join12 } from "node:path";
236753
236715
 
236754
236716
  // src/core/project/fallback.ts
236755
236717
  var DEFAULT_SITE = Object.freeze({
@@ -236818,13 +236780,13 @@ function isPlainObject2(value) {
236818
236780
 
236819
236781
  // src/core/project/plugins.ts
236820
236782
  import { createRequire as createRequire2 } from "node:module";
236821
- import { dirname as dirname6, isAbsolute as isAbsolute2, join as join4, resolve } from "node:path";
236783
+ import { dirname as dirname5, isAbsolute as isAbsolute2, join as join4, resolve } from "node:path";
236822
236784
  function resolvePluginRoot(pluginSource, fromRoot) {
236823
236785
  if (pluginSource.startsWith(".") || isAbsolute2(pluginSource)) {
236824
236786
  return resolve(fromRoot, pluginSource);
236825
236787
  }
236826
236788
  const req = createRequire2(join4(fromRoot, "package.json"));
236827
- return dirname6(req.resolve(`${pluginSource}/package.json`));
236789
+ return dirname5(req.resolve(`${pluginSource}/package.json`));
236828
236790
  }
236829
236791
  function requirePluginNamespace(project, pluginSource, configPath) {
236830
236792
  if (!project.plugin?.namespace) {
@@ -236917,7 +236879,7 @@ async function deleteSingleActor(name) {
236917
236879
  return result.data;
236918
236880
  }
236919
236881
  // src/core/resources/actor/config.ts
236920
- import { basename as basename3, dirname as dirname7, join as join5, relative } from "node:path";
236882
+ import { basename as basename3, dirname as dirname6, join as join5, relative } from "node:path";
236921
236883
  async function readAllActors(actorsDir) {
236922
236884
  if (!await pathExists(actorsDir))
236923
236885
  return [];
@@ -236929,7 +236891,7 @@ async function readAllActors(actorsDir) {
236929
236891
  const actors = [];
236930
236892
  const names = new Set;
236931
236893
  for (const entryPath of entries.sort()) {
236932
- const actorDir = dirname7(entryPath);
236894
+ const actorDir = dirname6(entryPath);
236933
236895
  const name = relative(actorsDir, actorDir).split(/[/\\]/).join("/");
236934
236896
  if (!name) {
236935
236897
  throw new InvalidInputError("entry.ts or entry.js found directly in the actors directory — it must be inside a named subfolder");
@@ -236955,7 +236917,7 @@ async function readAllActors(actorsDir) {
236955
236917
  return actors;
236956
236918
  }
236957
236919
  // src/core/resources/actor/deploy.ts
236958
- import { dirname as dirname8, relative as relative2 } from "node:path";
236920
+ import { dirname as dirname7, relative as relative2 } from "node:path";
236959
236921
  function actorOperationError(name, error) {
236960
236922
  return {
236961
236923
  name,
@@ -236976,7 +236938,7 @@ function describeActorResult(result) {
236976
236938
  async function deployOne(actor) {
236977
236939
  const start = Date.now();
236978
236940
  try {
236979
- const actorDir = dirname8(actor.entryPath);
236941
+ const actorDir = dirname7(actor.entryPath);
236980
236942
  const files = await Promise.all(actor.filePaths.map(async (filePath) => ({
236981
236943
  path: relative2(actorDir, filePath).split(/[/\\]/).join("/"),
236982
236944
  content: await readTextFile(filePath)
@@ -238807,7 +238769,7 @@ async function fetchFunctionLogs(functionName, filters = {}) {
238807
238769
  return result.data;
238808
238770
  }
238809
238771
  // src/core/resources/function/config.ts
238810
- import { basename as basename4, dirname as dirname9, join as join10, relative as relative3, resolve as resolve2 } from "node:path";
238772
+ import { basename as basename4, dirname as dirname8, join as join10, relative as relative3, resolve as resolve2 } from "node:path";
238811
238773
  async function readSharedFiles(functionsDir) {
238812
238774
  const sharedDir = resolve2(functionsDir, "..", "shared");
238813
238775
  if (!await pathExists(sharedDir)) {
@@ -238825,7 +238787,7 @@ async function readFunctionConfig(configPath) {
238825
238787
  }
238826
238788
  async function readFunction(configPath, sharedFiles) {
238827
238789
  const config = await readFunctionConfig(configPath);
238828
- const functionDir = dirname9(configPath);
238790
+ const functionDir = dirname8(configPath);
238829
238791
  const entryPath = join10(functionDir, config.entry);
238830
238792
  if (!await pathExists(entryPath)) {
238831
238793
  throw new InvalidInputError(`Function entry file not found: ${entryPath} (referenced in ${configPath})`, {
@@ -238858,12 +238820,12 @@ async function readAllFunctions(functionsDir) {
238858
238820
  absolute: true,
238859
238821
  ignore: ENTRY_IGNORE_DOT_PATHS
238860
238822
  });
238861
- const configFilesDirs = new Set(configFiles.map((f) => dirname9(f)));
238862
- const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(dirname9(entryFile)));
238823
+ const configFilesDirs = new Set(configFiles.map((f) => dirname8(f)));
238824
+ const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(dirname8(entryFile)));
238863
238825
  const sharedFiles = await readSharedFiles(functionsDir);
238864
238826
  const functionsFromConfig = await Promise.all(configFiles.map((configPath) => readFunction(configPath, sharedFiles)));
238865
238827
  const functionsWithoutConfig = await Promise.all(entryFilesWithoutConfig.map(async (entryFile) => {
238866
- const functionDir = dirname9(entryFile);
238828
+ const functionDir = dirname8(entryFile);
238867
238829
  const filePaths = await globby(BACKEND_FILE_GLOB, {
238868
238830
  cwd: functionDir,
238869
238831
  absolute: true
@@ -238906,9 +238868,9 @@ async function readAllFunctions(functionsDir) {
238906
238868
  return functions;
238907
238869
  }
238908
238870
  // src/core/resources/function/deploy.ts
238909
- import { dirname as dirname10, relative as relative4 } from "node:path";
238871
+ import { dirname as dirname9, relative as relative4 } from "node:path";
238910
238872
  async function loadFunctionCode(fn) {
238911
- const functionDir = dirname10(fn.entryPath);
238873
+ const functionDir = dirname9(fn.entryPath);
238912
238874
  const resolvedFiles = await Promise.all(fn.filePaths.map(async (filePath) => {
238913
238875
  const content = await readTextFile(filePath);
238914
238876
  const path = relative4(functionDir, filePath).split(/[/\\]/).join("/");
@@ -239265,7 +239227,7 @@ ${prettifyError(result.error)}`);
239265
239227
  return salvageProjectConfig(parsed, result.error);
239266
239228
  }
239267
239229
  async readProjectResources(configPath, project, includeActors = true) {
239268
- const configDir = dirname11(configPath);
239230
+ const configDir = dirname10(configPath);
239269
239231
  const [
239270
239232
  entities,
239271
239233
  functions,
@@ -239312,7 +239274,7 @@ ${prettifyError(result.error)}`);
239312
239274
  this.pluginSourceByNamespace.set(namespace, source);
239313
239275
  }
239314
239276
  async readPluginConfig(plugin, hostConfigPath) {
239315
- const pluginRoot = resolvePluginRoot(plugin.source, dirname11(hostConfigPath));
239277
+ const pluginRoot = resolvePluginRoot(plugin.source, dirname10(hostConfigPath));
239316
239278
  const { configPath } = await this.findConfigOrThrow(pluginRoot);
239317
239279
  const project = await this.readConfigFile(configPath);
239318
239280
  const namespace = requirePluginNamespace(project, plugin.source, configPath);
@@ -239405,7 +239367,7 @@ function errorMessage(error) {
239405
239367
  // src/core/project/template.ts
239406
239368
  var import_ejs = __toESM(require_ejs(), 1);
239407
239369
  var import_front_matter2 = __toESM(require_front_matter(), 1);
239408
- import { dirname as dirname12, join as join14 } from "node:path";
239370
+ import { dirname as dirname11, join as join14 } from "node:path";
239409
239371
 
239410
239372
  // src/core/assets.ts
239411
239373
  import { cpSync, existsSync as existsSync2 } from "node:fs";
@@ -239568,7 +239530,7 @@ async function renderTemplate(template, destPath, data, options = {}) {
239568
239530
  if (file.endsWith(".ejs")) {
239569
239531
  const rendered = await import_ejs.default.renderFile(srcPath, data);
239570
239532
  const { attributes, body } = import_front_matter2.default(rendered);
239571
- const destFile = attributes.outputFileName ? join14(dirname12(file), attributes.outputFileName) : file.replace(/\.ejs$/, "");
239533
+ const destFile = attributes.outputFileName ? join14(dirname11(file), attributes.outputFileName) : file.replace(/\.ejs$/, "");
239572
239534
  const destFilePath = join14(destPath, destFile);
239573
239535
  if (skipExisting && await pathExists(destFilePath)) {
239574
239536
  skipped.push(destFile);
@@ -239786,7 +239748,7 @@ import { readFile as readFile3 } from "node:fs/promises";
239786
239748
  import { join as join18 } from "node:path";
239787
239749
 
239788
239750
  // src/core/site/modules.ts
239789
- import { stat as stat2 } from "node:fs/promises";
239751
+ import { stat } from "node:fs/promises";
239790
239752
  import { relative as relative5, resolve as resolve3, sep } from "node:path";
239791
239753
  var MAX_TOTAL_MODULE_BYTES = 40 * 1024 * 1024;
239792
239754
  var MODULE_IGNORE = ["wrangler.json", ".dev.vars"];
@@ -239861,7 +239823,7 @@ async function collectModules(config) {
239861
239823
  const modules = [...modulesByName.values()];
239862
239824
  let totalBytes = 0;
239863
239825
  for (const module of modules) {
239864
- module.size = (await stat2(module.absolutePath)).size;
239826
+ module.size = (await stat(module.absolutePath)).size;
239865
239827
  totalBytes += module.size;
239866
239828
  }
239867
239829
  if (totalBytes > MAX_TOTAL_MODULE_BYTES) {
@@ -239881,7 +239843,7 @@ function addSourcemap(modulesByName, configDir, name) {
239881
239843
  }
239882
239844
 
239883
239845
  // src/core/site/wrangler-config.ts
239884
- import { dirname as dirname13, join as join16, resolve as resolve4 } from "node:path";
239846
+ import { dirname as dirname12, join as join16, resolve as resolve4 } from "node:path";
239885
239847
  var WRANGLER_REDIRECT_PATH = join16(".wrangler", "deploy", "config.json");
239886
239848
  var RedirectConfigSchema = looseObject({
239887
239849
  configPath: string2().min(1)
@@ -239918,7 +239880,7 @@ async function resolveWranglerConfig(redirectPath) {
239918
239880
  if (config.no_bundle !== true) {
239919
239881
  throw new InvalidInputError("This framework's output requires bundling; not yet supported. Base44 only deploys pre-bundled Workers output (no_bundle: true).");
239920
239882
  }
239921
- const configDir = dirname13(configPath);
239883
+ const configDir = dirname12(configPath);
239922
239884
  const assetsDirectory = config.assets?.directory ? resolve4(configDir, config.assets.directory) : null;
239923
239885
  return {
239924
239886
  configPath,
@@ -239941,7 +239903,7 @@ async function resolveRedirectedConfigPath(redirectPath) {
239941
239903
  if (!result.success) {
239942
239904
  throw new ConfigInvalidError(`Invalid deploy redirect file: ${prettifyError(result.error)}`, redirectPath);
239943
239905
  }
239944
- const configPath = resolve4(dirname13(redirectPath), result.data.configPath);
239906
+ const configPath = resolve4(dirname12(redirectPath), result.data.configPath);
239945
239907
  if (!await pathExists(configPath)) {
239946
239908
  throw new ConfigInvalidError(`Wrangler config referenced by ${redirectPath} does not exist: ${configPath}`, redirectPath, {
239947
239909
  hints: [{ message: "Rebuild the project to regenerate the artifact" }]
@@ -239976,7 +239938,7 @@ async function resolveFullStackBuild(projectRoot) {
239976
239938
  // src/core/site/manifest.ts
239977
239939
  import { createHash } from "node:crypto";
239978
239940
  import { createReadStream } from "node:fs";
239979
- import { stat as stat3 } from "node:fs/promises";
239941
+ import { stat as stat2 } from "node:fs/promises";
239980
239942
  import { basename as basename5, extname, join as join17 } from "node:path";
239981
239943
 
239982
239944
  // ../../node_modules/p-map/index.js
@@ -240159,7 +240121,7 @@ async function describeBuildOutput(outputDir) {
240159
240121
  const relativePaths = await walkBuildOutput(outputDir);
240160
240122
  return await pMap(relativePaths, async (path) => {
240161
240123
  const absolutePath = join17(outputDir, ...path.split("/"));
240162
- return { path, absolutePath, size: (await stat3(absolutePath)).size };
240124
+ return { path, absolutePath, size: (await stat2(absolutePath)).size };
240163
240125
  }, { concurrency: STAT_CONCURRENCY });
240164
240126
  }
240165
240127
  async function hashFileInto(hash, absolutePath) {
@@ -247039,14 +247001,14 @@ function publishesFromBuilder(error) {
247039
247001
  return body?.error?.code === "git_commit_hash_not_supported";
247040
247002
  }
247041
247003
  // src/core/project/target.ts
247042
- import { dirname as dirname14, join as join19, resolve as resolve6 } from "node:path";
247004
+ import { dirname as dirname13, join as join19, resolve as resolve6 } from "node:path";
247043
247005
  async function resolveBuildTarget(projectRoot, overrides = {}) {
247044
247006
  const project = await readSettingsIfPresent(projectRoot);
247045
247007
  const root = project?.root ?? projectRoot ?? process.cwd();
247046
247008
  const site = project ? siteOrDefault(project) : DEFAULT_SITE;
247047
247009
  return {
247048
247010
  root,
247049
- configDir: project ? dirname14(project.configPath) : join19(root, PROJECT_SUBDIR),
247011
+ configDir: project ? dirname13(project.configPath) : join19(root, PROJECT_SUBDIR),
247050
247012
  buildCommand: site.buildCommand,
247051
247013
  outputDir: resolve6(root, overrides.outputDir ?? site.outputDirectory ?? DEFAULT_SITE.outputDirectory),
247052
247014
  entitiesDir: project?.entitiesDir ?? "entities",
@@ -247916,7 +247878,7 @@ function getActorsCommand() {
247916
247878
  }
247917
247879
 
247918
247880
  // src/cli/commands/agent-skills/pull.ts
247919
- import { dirname as dirname15, join as join20 } from "node:path";
247881
+ import { dirname as dirname14, join as join20 } from "node:path";
247920
247882
  // src/core/utils/dependencies.ts
247921
247883
  import { spawnSync as spawnSync2 } from "node:child_process";
247922
247884
  function verifyDenoInstalled(context) {
@@ -248005,7 +247967,7 @@ async function pullAction({
248005
247967
  runTask
248006
247968
  }) {
248007
247969
  const { project } = await readProjectConfig();
248008
- const dir = join20(dirname15(project.configPath), project.agentSkillsDir);
247970
+ const dir = join20(dirname14(project.configPath), project.agentSkillsDir);
248009
247971
  const remote = await runTask("Fetching agent skills from Base44", () => fetchAgentSkills(), {
248010
247972
  successMessage: "Agent skills fetched successfully",
248011
247973
  errorMessage: "Failed to fetch agent skills"
@@ -248061,13 +248023,13 @@ function getAgentSkillsCommand() {
248061
248023
  }
248062
248024
 
248063
248025
  // src/cli/commands/agents/pull.ts
248064
- import { dirname as dirname16, join as join21 } from "node:path";
248026
+ import { dirname as dirname15, join as join21 } from "node:path";
248065
248027
  async function pullAgentsAction({
248066
248028
  log,
248067
248029
  runTask
248068
248030
  }) {
248069
248031
  const { project } = await readProjectConfig();
248070
- const configDir = dirname16(project.configPath);
248032
+ const configDir = dirname15(project.configPath);
248071
248033
  const agentsDir = join21(configDir, project.agentsDir);
248072
248034
  const remoteAgents = await runTask("Fetching agents from Base44", async () => {
248073
248035
  return await fetchAgents();
@@ -249643,7 +249605,7 @@ function redactedApiError(apiError, raw, method, path, retryAfter) {
249643
249605
  });
249644
249606
  }
249645
249607
  // src/core/api-spec/spec.ts
249646
- import { rename, rm, stat as stat4 } from "node:fs/promises";
249608
+ import { rename, rm, stat as stat3 } from "node:fs/promises";
249647
249609
  import { join as join22 } from "node:path";
249648
249610
  var SPEC_CACHE_TTL_MS = 60 * 60 * 1000;
249649
249611
  function getSpecCachePath(apiUrl = getBase44ApiUrl()) {
@@ -249669,7 +249631,7 @@ function parseSpec(text) {
249669
249631
  var SPEC_DOWNLOAD_TIMEOUT_MS = 60000;
249670
249632
  async function readFreshCache(path) {
249671
249633
  try {
249672
- const { mtimeMs } = await stat4(path);
249634
+ const { mtimeMs } = await stat3(path);
249673
249635
  if (!isSpecCacheFresh(mtimeMs)) {
249674
249636
  return null;
249675
249637
  }
@@ -249998,11 +249960,11 @@ function getApiCommand() {
249998
249960
  }
249999
249961
 
250000
249962
  // src/cli/commands/auth/password-login.ts
250001
- import { dirname as dirname17, join as join23 } from "node:path";
249963
+ import { dirname as dirname16, join as join23 } from "node:path";
250002
249964
  async function passwordLoginAction({ log, runTask }, action) {
250003
249965
  const shouldEnable = action === "enable";
250004
249966
  const { project } = await readProjectConfig();
250005
- const configDir = dirname17(project.configPath);
249967
+ const configDir = dirname16(project.configPath);
250006
249968
  const authDir = join23(configDir, project.authDir);
250007
249969
  const updated = await runTask("Updating local auth config", async () => {
250008
249970
  const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
@@ -250023,13 +249985,13 @@ function getPasswordLoginCommand() {
250023
249985
  }
250024
249986
 
250025
249987
  // src/cli/commands/auth/pull.ts
250026
- import { dirname as dirname18, join as join24 } from "node:path";
249988
+ import { dirname as dirname17, join as join24 } from "node:path";
250027
249989
  async function pullAuthAction({
250028
249990
  log,
250029
249991
  runTask
250030
249992
  }) {
250031
249993
  const { project } = await readProjectConfig();
250032
- const configDir = dirname18(project.configPath);
249994
+ const configDir = dirname17(project.configPath);
250033
249995
  const authDir = join24(configDir, project.authDir);
250034
249996
  const remoteConfig = await runTask("Fetching auth config from Base44", async () => {
250035
249997
  return await pullAuthConfig();
@@ -250094,7 +250056,7 @@ function getAuthPushCommand() {
250094
250056
  }
250095
250057
 
250096
250058
  // src/cli/commands/auth/social-login.ts
250097
- import { dirname as dirname19, join as join25, resolve as resolve7 } from "node:path";
250059
+ import { dirname as dirname18, join as join25, resolve as resolve7 } from "node:path";
250098
250060
  var PROVIDER_LABELS = {
250099
250061
  google: "Google",
250100
250062
  microsoft: "Microsoft",
@@ -250164,7 +250126,7 @@ async function socialLoginAction({ log, isNonInteractive, runTask }, provider, a
250164
250126
  }
250165
250127
  }
250166
250128
  const { project } = await readProjectConfig();
250167
- const configDir = dirname19(project.configPath);
250129
+ const configDir = dirname18(project.configPath);
250168
250130
  const authDir = join25(configDir, project.authDir);
250169
250131
  const { config: updated } = await runTask("Updating local auth config", async () => updateSocialLoginConfig(authDir, provider, shouldEnable, useCustomOAuth && options.clientId ? { clientId: options.clientId } : undefined));
250170
250132
  if (clientSecret) {
@@ -250190,7 +250152,7 @@ function getSocialLoginCommand() {
250190
250152
  }
250191
250153
 
250192
250154
  // src/cli/commands/auth/sso.ts
250193
- import { dirname as dirname20, join as join26, resolve as resolve8 } from "node:path";
250155
+ import { dirname as dirname19, join as join26, resolve as resolve8 } from "node:path";
250194
250156
  var SSOConfigFileSchema = object({
250195
250157
  provider: _enum(Object.values(KNOWN_SSO_PROVIDERS)),
250196
250158
  clientId: string2(),
@@ -250353,7 +250315,7 @@ async function ssoEnableAction({ isNonInteractive, runTask }, options) {
250353
250315
  throw error;
250354
250316
  }
250355
250317
  const { project } = await readProjectConfig();
250356
- const configDir = dirname20(project.configPath);
250318
+ const configDir = dirname19(project.configPath);
250357
250319
  const authDir = join26(configDir, project.authDir);
250358
250320
  await runTask("Updating local auth config", async () => updateSSOConfig(authDir, provider, true));
250359
250321
  await runTask("Saving SSO credentials", async () => pushSSOSecrets(secrets));
@@ -250369,7 +250331,7 @@ async function ssoDisableAction({ log, runTask }, options) {
250369
250331
  throw new InvalidInputError("Configuration options cannot be used with disable. To disable SSO: base44 auth sso disable");
250370
250332
  }
250371
250333
  const { project } = await readProjectConfig();
250372
- const configDir = dirname20(project.configPath);
250334
+ const configDir = dirname19(project.configPath);
250373
250335
  const authDir = join26(configDir, project.authDir);
250374
250336
  const updated = await runTask("Updating local auth config", async () => updateSSOConfig(authDir, null, false));
250375
250337
  await runTask("Removing SSO credentials", async () => deleteSSOSecrets());
@@ -250993,7 +250955,7 @@ var baseOpen = async (options) => {
250993
250955
  });
250994
250956
  });
250995
250957
  };
250996
- var open2 = (target, options) => {
250958
+ var open = (target, options) => {
250997
250959
  if (typeof target !== "string") {
250998
250960
  throw new TypeError("Expected a `target`");
250999
250961
  }
@@ -251062,7 +251024,7 @@ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
251062
251024
  defineLazyProperty(apps, "safari", () => detectPlatformBinary({
251063
251025
  darwin: "Safari"
251064
251026
  }));
251065
- var open_default = open2;
251027
+ var open_default = open;
251066
251028
 
251067
251029
  // src/cli/commands/connectors/oauth-prompt.ts
251068
251030
  var POLL_INTERVAL_MS = 2000;
@@ -251252,13 +251214,13 @@ function getConnectorsListAvailableCommand() {
251252
251214
  }
251253
251215
 
251254
251216
  // src/cli/commands/connectors/pull.ts
251255
- import { dirname as dirname21, join as join27, resolve as resolve9 } from "node:path";
251217
+ import { dirname as dirname20, join as join27, resolve as resolve9 } from "node:path";
251256
251218
  async function resolveConnectorsDir(options) {
251257
251219
  if (!getAppContext().projectRoot) {
251258
251220
  return resolve9(options.dir ?? "connectors");
251259
251221
  }
251260
251222
  const { project } = await readProjectConfig();
251261
- return join27(dirname21(project.configPath), project.connectorsDir);
251223
+ return join27(dirname20(project.configPath), project.connectorsDir);
251262
251224
  }
251263
251225
  async function pullConnectorsAction({ log, runTask, jsonMode }, options) {
251264
251226
  const connectorsDir = await resolveConnectorsDir(options);
@@ -251645,10 +251607,10 @@ function getListCommand() {
251645
251607
  }
251646
251608
 
251647
251609
  // src/cli/commands/functions/pull.ts
251648
- import { dirname as dirname22, join as join28 } from "node:path";
251610
+ import { dirname as dirname21, join as join28 } from "node:path";
251649
251611
  async function pullFunctionsAction({ log, runTask }, name) {
251650
251612
  const { project, functions } = await readProjectConfig();
251651
- const configDir = dirname22(project.configPath);
251613
+ const configDir = dirname21(project.configPath);
251652
251614
  const functionsDir = join28(configDir, project.functionsDir);
251653
251615
  const pluginFunctionNames = new Set(functions.filter((fn) => fn.source.type === "plugin").map((fn) => fn.name));
251654
251616
  const remoteFunctions = await runTask("Fetching functions from Base44", async () => {
@@ -252862,7 +252824,7 @@ import { createHash as createHash3 } from "node:crypto";
252862
252824
  import { join as join30, resolve as resolve14 } from "node:path";
252863
252825
 
252864
252826
  // src/core/version/actors.ts
252865
- import { dirname as dirname23, relative as relative7, resolve as resolve13 } from "node:path";
252827
+ import { dirname as dirname22, relative as relative7, resolve as resolve13 } from "node:path";
252866
252828
 
252867
252829
  // ../functions-compiler/src/assembly.ts
252868
252830
  import path17 from "node:path";
@@ -255374,6 +255336,7 @@ var deno2 = Object.freeze({
255374
255336
  });
255375
255337
  globalThis.Deno = deno2;
255376
255338
  globalThis.Buffer = Buffer2;
255339
+ if (typeof process !== "undefined") process.version = "v22.23.4";
255377
255340
  try {
255378
255341
  new AsyncLocalStorage().enterWith(void 0);
255379
255342
  } catch {
@@ -264117,7 +264080,7 @@ async function readSharedFiles2(actorsDir) {
264117
264080
  return files;
264118
264081
  }
264119
264082
  async function compilerInput2(actor, shared) {
264120
- const actorDir = dirname23(actor.entryPath);
264083
+ const actorDir = dirname22(actor.entryPath);
264121
264084
  const entry = `${ACTORS_ROOT}/${actor.name}/entry.ts`;
264122
264085
  const source = await readTextFile(actor.entryPath);
264123
264086
  const candidates = { ...shared };
@@ -265702,7 +265665,7 @@ function getWorkspaceCommand() {
265702
265665
  // src/cli/dev/dev-server/main.ts
265703
265666
  var import_cors = __toESM(require_lib4(), 1);
265704
265667
  var import_express6 = __toESM(require_express(), 1);
265705
- import { dirname as dirname29, join as join39 } from "node:path";
265668
+ import { dirname as dirname28, join as join39 } from "node:path";
265706
265669
 
265707
265670
  // ../../node_modules/get-port/index.js
265708
265671
  import net from "node:net";
@@ -265832,7 +265795,7 @@ var $tmpName = promisify12(tmp.tmpName);
265832
265795
 
265833
265796
  // src/cli/dev/dev-server/function-manager.ts
265834
265797
  import { spawn as spawn3 } from "node:child_process";
265835
- import { dirname as dirname26, join as join35 } from "node:path";
265798
+ import { dirname as dirname25, join as join35 } from "node:path";
265836
265799
  import { pathToFileURL as pathToFileURL6 } from "node:url";
265837
265800
 
265838
265801
  // src/cli/dev/dev-server/base-function-manager.ts
@@ -265937,7 +265900,7 @@ class FunctionManager extends BaseFunctionManager {
265937
265900
  }
265938
265901
  spawnFunction(func, port) {
265939
265902
  this.logger.log(`Spawning function "${func.name}" on port ${port}`);
265940
- const importMapPath = join35(dirname26(this.wrapperPath), "import-map.json");
265903
+ const importMapPath = join35(dirname25(this.wrapperPath), "import-map.json");
265941
265904
  const process2 = spawn3("deno", ["run", "--allow-all", "--import-map", importMapPath, this.wrapperPath], {
265942
265905
  env: {
265943
265906
  ...globalThis.process.env,
@@ -267671,11 +267634,11 @@ import { relative as relative11 } from "node:path";
267671
267634
  // ../../node_modules/chokidar/index.js
267672
267635
  import { EventEmitter as EventEmitter3 } from "node:events";
267673
267636
  import { stat as statcb, Stats } from "node:fs";
267674
- import { readdir as readdir3, stat as stat8 } from "node:fs/promises";
267637
+ import { readdir as readdir3, stat as stat7 } from "node:fs/promises";
267675
267638
  import * as sp3 from "node:path";
267676
267639
 
267677
267640
  // ../../node_modules/readdirp/index.js
267678
- import { lstat as lstat2, readdir as readdir2, realpath, stat as stat6 } from "node:fs/promises";
267641
+ import { lstat as lstat2, readdir as readdir2, realpath, stat as stat5 } from "node:fs/promises";
267679
267642
  import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
267680
267643
  import { Readable as Readable6 } from "node:stream";
267681
267644
  var EntryTypes = {
@@ -267757,7 +267720,7 @@ class ReaddirpStream extends Readable6 {
267757
267720
  const { root, type } = opts;
267758
267721
  this._fileFilter = normalizeFilter(opts.fileFilter);
267759
267722
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
267760
- const statMethod = opts.lstat ? lstat2 : stat6;
267723
+ const statMethod = opts.lstat ? lstat2 : stat5;
267761
267724
  if (wantBigintFsStats) {
267762
267725
  this._stat = (path) => statMethod(path, { bigint: true });
267763
267726
  } else {
@@ -267910,7 +267873,7 @@ function readdirp(root, options = {}) {
267910
267873
 
267911
267874
  // ../../node_modules/chokidar/handler.js
267912
267875
  import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
267913
- import { realpath as fsrealpath, lstat as lstat3, open as open3, stat as stat7 } from "node:fs/promises";
267876
+ import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat6 } from "node:fs/promises";
267914
267877
  import { type as osType } from "node:os";
267915
267878
  import * as sp2 from "node:path";
267916
267879
  var STR_DATA = "data";
@@ -267936,7 +267899,7 @@ var EVENTS = {
267936
267899
  };
267937
267900
  var EV = EVENTS;
267938
267901
  var THROTTLE_MODE_WATCH = "watch";
267939
- var statMethods = { lstat: lstat3, stat: stat7 };
267902
+ var statMethods = { lstat: lstat3, stat: stat6 };
267940
267903
  var KEY_LISTENERS = "listeners";
267941
267904
  var KEY_ERR = "errHandlers";
267942
267905
  var KEY_RAW = "rawEmitters";
@@ -268286,7 +268249,7 @@ var setFsWatchListener = (path, fullPath, options, handlers) => {
268286
268249
  cont.watcherUnusable = true;
268287
268250
  if (isWindows4 && error.code === "EPERM") {
268288
268251
  try {
268289
- const fd = await open3(path, "r");
268252
+ const fd = await open2(path, "r");
268290
268253
  await fd.close();
268291
268254
  broadcastErr(error);
268292
268255
  } catch (err) {}
@@ -268407,7 +268370,7 @@ class NodeFsHandler {
268407
268370
  return;
268408
268371
  if (!newStats || newStats.mtimeMs === 0) {
268409
268372
  try {
268410
- const newStats = await stat7(file);
268373
+ const newStats = await stat6(file);
268411
268374
  if (this.fsw.closed)
268412
268375
  return;
268413
268376
  const at = newStats.atimeMs;
@@ -269079,7 +269042,7 @@ class FSWatcher extends EventEmitter3 {
269079
269042
  const fullPath = opts.cwd ? sp3.join(opts.cwd, path) : path;
269080
269043
  let stats;
269081
269044
  try {
269082
- stats = await stat8(fullPath);
269045
+ stats = await stat7(fullPath);
269083
269046
  } catch (err) {}
269084
269047
  if (!stats || this.closed)
269085
269048
  return;
@@ -269463,8 +269426,8 @@ async function createDevServer(options) {
269463
269426
  broadcastEntityEvent(io, appId, entityName, event);
269464
269427
  };
269465
269428
  const base44ConfigWatcher = new WatchBase44({
269466
- functions: join39(dirname29(project.configPath), project.functionsDir),
269467
- entities: join39(dirname29(project.configPath), project.entitiesDir)
269429
+ functions: join39(dirname28(project.configPath), project.functionsDir),
269430
+ entities: join39(dirname28(project.configPath), project.entitiesDir)
269468
269431
  }, devLogger);
269469
269432
  base44ConfigWatcher.on("change", async (name) => {
269470
269433
  try {
@@ -269994,7 +269957,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
269994
269957
  import { release, type } from "node:os";
269995
269958
 
269996
269959
  // ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
269997
- import { dirname as dirname30, posix, sep as sep2 } from "path";
269960
+ import { dirname as dirname29, posix, sep as sep2 } from "path";
269998
269961
  function createModulerModifier() {
269999
269962
  const getModuleFromFileName = createGetModuleFromFilename();
270000
269963
  return async (frames) => {
@@ -270003,7 +269966,7 @@ function createModulerModifier() {
270003
269966
  return frames;
270004
269967
  };
270005
269968
  }
270006
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname30(process.argv[1]) : process.cwd(), isWindows = sep2 === "\\") {
269969
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname29(process.argv[1]) : process.cwd(), isWindows = sep2 === "\\") {
270007
269970
  const normalizedBase = isWindows ? normalizeWindowsPath2(basePath) : basePath;
270008
269971
  return (filename) => {
270009
269972
  if (!filename)
@@ -273992,7 +273955,7 @@ function addCommandInfoToErrorReporter(program, errorReporter) {
273992
273955
  });
273993
273956
  }
273994
273957
  // src/cli/index.ts
273995
- var __dirname4 = dirname31(fileURLToPath7(import.meta.url));
273958
+ var __dirname4 = dirname30(fileURLToPath7(import.meta.url));
273996
273959
  async function runCLI(options) {
273997
273960
  ensureNpmAssets(join41(__dirname4, "../assets"));
273998
273961
  const errorReporter = new ErrorReporter;
@@ -274033,4 +273996,4 @@ export {
274033
273996
  runCLI
274034
273997
  };
274035
273998
 
274036
- //# debugId=CDAE7E45DF6E559064756E2164756E21
273999
+ //# debugId=7645CAD3637685AD64756E2164756E21