@base44-preview/cli 0.1.12-pr.584.81e385d → 0.1.12-pr.584.92706a2

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
@@ -23421,12 +23421,12 @@ var require_isexe = __commonJS(function(exports, module) {
23421
23421
  if (typeof Promise !== "function") {
23422
23422
  throw new TypeError("callback not provided");
23423
23423
  }
23424
- return new Promise(function(resolve6, reject) {
23424
+ return new Promise(function(resolve5, reject) {
23425
23425
  isexe(path11, options || {}, function(er, is) {
23426
23426
  if (er) {
23427
23427
  reject(er);
23428
23428
  } else {
23429
- resolve6(is);
23429
+ resolve5(is);
23430
23430
  }
23431
23431
  });
23432
23432
  });
@@ -23488,27 +23488,27 @@ var require_which = __commonJS(function(exports, module) {
23488
23488
  opt = {};
23489
23489
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
23490
23490
  const found = [];
23491
- const step = (i) => new Promise((resolve6, reject) => {
23491
+ const step = (i) => new Promise((resolve5, reject) => {
23492
23492
  if (i === pathEnv.length)
23493
- return opt.all && found.length ? resolve6(found) : reject(getNotFoundError(cmd));
23493
+ return opt.all && found.length ? resolve5(found) : reject(getNotFoundError(cmd));
23494
23494
  const ppRaw = pathEnv[i];
23495
23495
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
23496
23496
  const pCmd = path11.join(pathPart, cmd);
23497
23497
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
23498
- resolve6(subStep(p, i, 0));
23498
+ resolve5(subStep(p, i, 0));
23499
23499
  });
23500
- const subStep = (p, i, ii) => new Promise((resolve6, reject) => {
23500
+ const subStep = (p, i, ii) => new Promise((resolve5, reject) => {
23501
23501
  if (ii === pathExt.length)
23502
- return resolve6(step(i + 1));
23502
+ return resolve5(step(i + 1));
23503
23503
  const ext = pathExt[ii];
23504
23504
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
23505
23505
  if (!er && is) {
23506
23506
  if (opt.all)
23507
23507
  found.push(p + ext);
23508
23508
  else
23509
- return resolve6(p + ext);
23509
+ return resolve5(p + ext);
23510
23510
  }
23511
- return resolve6(subStep(p, i, ii + 1));
23511
+ return resolve5(subStep(p, i, ii + 1));
23512
23512
  });
23513
23513
  });
23514
23514
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -248163,7 +248163,7 @@ async function createProjectFilesForExistingProject(options) {
248163
248163
  };
248164
248164
  }
248165
248165
  // src/core/project/deploy.ts
248166
- import { resolve as resolve6 } from "node:path";
248166
+ import { resolve as resolve5 } from "node:path";
248167
248167
 
248168
248168
  // src/core/site/api.ts
248169
248169
  async function uploadSite(archivePath) {
@@ -248288,112 +248288,6 @@ async function createArchive(pathToArchive, targetArchivePath) {
248288
248288
  cwd: pathToArchive
248289
248289
  }, ["."]);
248290
248290
  }
248291
- // src/core/site/deploy-app.ts
248292
- import { resolve as resolve4 } from "node:path";
248293
-
248294
- // src/core/site/wrangler-config.ts
248295
- import { dirname as dirname10, join as join15, resolve as resolve3 } from "node:path";
248296
- var WRANGLER_REDIRECT_PATH = join15(".wrangler", "deploy", "config.json");
248297
- var RedirectConfigSchema = exports_external.looseObject({
248298
- configPath: exports_external.string().min(1)
248299
- });
248300
- var WranglerConfigSchema = exports_external.looseObject({
248301
- main: exports_external.string().min(1, "wrangler config is missing a 'main' entry module"),
248302
- no_bundle: exports_external.boolean().optional(),
248303
- rules: exports_external.array(exports_external.looseObject({ type: exports_external.string(), globs: exports_external.array(exports_external.string()) })).optional(),
248304
- assets: exports_external.looseObject({
248305
- directory: exports_external.string().optional(),
248306
- html_handling: exports_external.string().optional(),
248307
- not_found_handling: exports_external.string().optional(),
248308
- run_worker_first: exports_external.union([exports_external.boolean(), exports_external.array(exports_external.string())]).optional(),
248309
- headers: exports_external.string().optional(),
248310
- redirects: exports_external.string().optional()
248311
- }).optional(),
248312
- compatibility_date: exports_external.string().optional(),
248313
- compatibility_flags: exports_external.array(exports_external.string()).optional(),
248314
- vars: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
248315
- upload_source_maps: exports_external.boolean().optional()
248316
- });
248317
- async function detectFullStackArtifact(projectRoot) {
248318
- const redirectPath = join15(projectRoot, WRANGLER_REDIRECT_PATH);
248319
- return await pathExists(redirectPath) ? redirectPath : null;
248320
- }
248321
- async function resolveWranglerConfig(projectRoot) {
248322
- const redirectPath = await detectFullStackArtifact(projectRoot);
248323
- if (!redirectPath) {
248324
- throw new InvalidInputError("No Workers build artifact found. Expected a .wrangler/deploy/config.json redirect file.", {
248325
- hints: [{ message: "Run your framework's build command first" }]
248326
- });
248327
- }
248328
- const configPath = await resolveRedirectedConfigPath(redirectPath);
248329
- const parsed = await readJsonFile(configPath);
248330
- const result = WranglerConfigSchema.safeParse(parsed);
248331
- if (!result.success) {
248332
- throw new ConfigInvalidError(`Invalid wrangler config: ${exports_external.prettifyError(result.error)}`, configPath);
248333
- }
248334
- const config9 = result.data;
248335
- if (config9.no_bundle !== true) {
248336
- throw new InvalidInputError("This framework's output requires bundling; not yet supported. Base44 only deploys pre-bundled Workers output (no_bundle: true).");
248337
- }
248338
- const configDir = dirname10(configPath);
248339
- const assetsDirectory = config9.assets?.directory ? resolve3(configDir, config9.assets.directory) : null;
248340
- return {
248341
- configPath,
248342
- configDir,
248343
- main: config9.main,
248344
- assetsDirectory,
248345
- assetsConfig: config9.assets ? toResolvedAssetsConfig(config9.assets) : null,
248346
- compatibilityDate: config9.compatibility_date ?? null,
248347
- compatibilityFlags: config9.compatibility_flags ?? [],
248348
- vars: config9.vars ?? {},
248349
- rules: (config9.rules ?? []).map((rule) => ({
248350
- type: rule.type,
248351
- globs: rule.globs
248352
- })),
248353
- uploadSourceMaps: config9.upload_source_maps ?? false
248354
- };
248355
- }
248356
- async function resolveRedirectedConfigPath(redirectPath) {
248357
- const parsed = await readJsonFile(redirectPath);
248358
- const result = RedirectConfigSchema.safeParse(parsed);
248359
- if (!result.success) {
248360
- throw new ConfigInvalidError(`Invalid deploy redirect file: ${exports_external.prettifyError(result.error)}`, redirectPath);
248361
- }
248362
- const configPath = resolve3(dirname10(redirectPath), result.data.configPath);
248363
- if (!await pathExists(configPath)) {
248364
- throw new ConfigInvalidError(`Wrangler config referenced by ${redirectPath} does not exist: ${configPath}`, redirectPath, {
248365
- hints: [{ message: "Rebuild the project to regenerate the artifact" }]
248366
- });
248367
- }
248368
- return configPath;
248369
- }
248370
- function toResolvedAssetsConfig(assets) {
248371
- return {
248372
- htmlHandling: assets.html_handling,
248373
- notFoundHandling: assets.not_found_handling,
248374
- runWorkerFirst: assets.run_worker_first,
248375
- headers: assets.headers,
248376
- redirects: assets.redirects
248377
- };
248378
- }
248379
-
248380
- // src/core/site/deploy-app.ts
248381
- var STATIC_DEPLOYMENTS_ENV = "BASE44_STATIC_DEPLOYMENTS";
248382
- function staticDeploymentsEnabled(env2 = process.env) {
248383
- const value = env2[STATIC_DEPLOYMENTS_ENV];
248384
- return value === "1" || value === "true";
248385
- }
248386
- async function planAppDeploy(target) {
248387
- const outputDirectory = target.site?.outputDirectory;
248388
- const outputDir = outputDirectory ? resolve4(target.root, outputDirectory) : null;
248389
- if (await detectFullStackArtifact(target.root)) {
248390
- return { kind: "deployment", outputDir };
248391
- }
248392
- if (!outputDir) {
248393
- return { kind: "none" };
248394
- }
248395
- return staticDeploymentsEnabled() ? { kind: "deployment", outputDir } : { kind: "tarball", outputDir };
248396
- }
248397
248291
  // src/core/site/deployment.ts
248398
248292
  import { readFile as readFile4 } from "node:fs/promises";
248399
248293
  import { join as join17 } from "node:path";
@@ -248401,7 +248295,7 @@ import { join as join17 } from "node:path";
248401
248295
  // src/core/site/manifest.ts
248402
248296
  import { createHash } from "node:crypto";
248403
248297
  import { readFile as readFile2, stat } from "node:fs/promises";
248404
- import { basename as basename4, extname, join as join16 } from "node:path";
248298
+ import { basename as basename4, extname, join as join15 } from "node:path";
248405
248299
  var MAX_ASSET_SIZE_BYTES = 25 * 1024 * 1024;
248406
248300
  var MAX_ASSET_COUNT = 1e5;
248407
248301
  var ASSETS_IGNORE_FILE = ".assetsignore";
@@ -248461,7 +248355,7 @@ async function buildAssetManifest(assetsDir, appId) {
248461
248355
  throw new InvalidInputError(`Too many static assets: found ${relativeFilePaths.length}, the limit is ${MAX_ASSET_COUNT} files.`);
248462
248356
  }
248463
248357
  for (const relativePath of relativeFilePaths.sort()) {
248464
- const absolutePath = join16(assetsDir, ...relativePath.split("/"));
248358
+ const absolutePath = join15(assetsDir, ...relativePath.split("/"));
248465
248359
  const { size } = await stat(absolutePath);
248466
248360
  if (size > MAX_ASSET_SIZE_BYTES) {
248467
248361
  throw new InvalidInputError(`Static asset "${relativePath}" is ${size} bytes, which exceeds the 25 MiB per-file limit.`);
@@ -248483,7 +248377,7 @@ async function buildAssetManifest(assetsDir, appId) {
248483
248377
 
248484
248378
  // src/core/site/modules.ts
248485
248379
  import { stat as stat2 } from "node:fs/promises";
248486
- import { relative as relative3, resolve as resolve5, sep } from "node:path";
248380
+ import { relative as relative3, resolve as resolve3, sep } from "node:path";
248487
248381
  var MAX_TOTAL_MODULE_BYTES = 40 * 1024 * 1024;
248488
248382
  var MODULE_IGNORE = ["wrangler.json", ".dev.vars"];
248489
248383
  var RULE_TYPE_TO_MODULE_TYPE = {
@@ -248496,7 +248390,7 @@ function toPosix(path11) {
248496
248390
  return path11.split(sep).join("/");
248497
248391
  }
248498
248392
  async function collectModules(config9) {
248499
- const entryPath = resolve5(config9.configDir, config9.main);
248393
+ const entryPath = resolve3(config9.configDir, config9.main);
248500
248394
  if (!await pathExists(entryPath)) {
248501
248395
  throw new InvalidInputError(`Worker entry module does not exist: ${entryPath} (from "main" in ${config9.configPath})`, {
248502
248396
  hints: [{ message: "Rebuild the project to regenerate the artifact" }]
@@ -248529,7 +248423,7 @@ async function collectModules(config9) {
248529
248423
  if (!modulesByName.has(match)) {
248530
248424
  modulesByName.set(match, {
248531
248425
  name: match,
248532
- absolutePath: resolve5(config9.configDir, match),
248426
+ absolutePath: resolve3(config9.configDir, match),
248533
248427
  size: 0,
248534
248428
  type
248535
248429
  });
@@ -248549,7 +248443,7 @@ async function collectModules(config9) {
248549
248443
  } else {
248550
248444
  for (const name2 of [...modulesByName.keys()]) {
248551
248445
  const mapName = `${name2}.map`;
248552
- if (await pathExists(resolve5(config9.configDir, mapName))) {
248446
+ if (await pathExists(resolve3(config9.configDir, mapName))) {
248553
248447
  addSourcemap(modulesByName, config9.configDir, mapName);
248554
248448
  }
248555
248449
  }
@@ -248570,7 +248464,7 @@ function addSourcemap(modulesByName, configDir, name2) {
248570
248464
  return;
248571
248465
  modulesByName.set(name2, {
248572
248466
  name: name2,
248573
- absolutePath: resolve5(configDir, name2),
248467
+ absolutePath: resolve3(configDir, name2),
248574
248468
  size: 0,
248575
248469
  type: "sourcemap"
248576
248470
  });
@@ -248610,7 +248504,7 @@ async function pMap(iterable, mapper, {
248610
248504
  const cleanup = () => {
248611
248505
  signal?.removeEventListener("abort", signalListener);
248612
248506
  };
248613
- const resolve6 = (value) => {
248507
+ const resolve4 = (value) => {
248614
248508
  resolve_(value);
248615
248509
  cleanup();
248616
248510
  };
@@ -248643,7 +248537,7 @@ async function pMap(iterable, mapper, {
248643
248537
  }
248644
248538
  isResolved = true;
248645
248539
  if (skippedIndexesMap.size === 0) {
248646
- resolve6(result);
248540
+ resolve4(result);
248647
248541
  return;
248648
248542
  }
248649
248543
  const pureResult = [];
@@ -248653,7 +248547,7 @@ async function pMap(iterable, mapper, {
248653
248547
  }
248654
248548
  pureResult.push(value);
248655
248549
  }
248656
- resolve6(pureResult);
248550
+ resolve4(pureResult);
248657
248551
  }
248658
248552
  return;
248659
248553
  }
@@ -248813,8 +248707,102 @@ async function uploadPresignedAsset(upload, assets) {
248813
248707
  }
248814
248708
  }
248815
248709
 
248710
+ // src/core/site/wrangler-config.ts
248711
+ import { dirname as dirname10, join as join16, resolve as resolve4 } from "node:path";
248712
+ var WRANGLER_REDIRECT_PATH = join16(".wrangler", "deploy", "config.json");
248713
+ var RedirectConfigSchema = exports_external.looseObject({
248714
+ configPath: exports_external.string().min(1)
248715
+ });
248716
+ var WranglerConfigSchema = exports_external.looseObject({
248717
+ main: exports_external.string().min(1, "wrangler config is missing a 'main' entry module"),
248718
+ no_bundle: exports_external.boolean().optional(),
248719
+ rules: exports_external.array(exports_external.looseObject({ type: exports_external.string(), globs: exports_external.array(exports_external.string()) })).optional(),
248720
+ assets: exports_external.looseObject({
248721
+ directory: exports_external.string().optional(),
248722
+ html_handling: exports_external.string().optional(),
248723
+ not_found_handling: exports_external.string().optional(),
248724
+ run_worker_first: exports_external.union([exports_external.boolean(), exports_external.array(exports_external.string())]).optional(),
248725
+ headers: exports_external.string().optional(),
248726
+ redirects: exports_external.string().optional()
248727
+ }).optional(),
248728
+ compatibility_date: exports_external.string().optional(),
248729
+ compatibility_flags: exports_external.array(exports_external.string()).optional(),
248730
+ vars: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
248731
+ upload_source_maps: exports_external.boolean().optional()
248732
+ });
248733
+ async function detectFullStackArtifact(projectRoot) {
248734
+ const redirectPath = join16(projectRoot, WRANGLER_REDIRECT_PATH);
248735
+ return await pathExists(redirectPath) ? redirectPath : null;
248736
+ }
248737
+ async function resolveWranglerConfig(projectRoot) {
248738
+ const redirectPath = await detectFullStackArtifact(projectRoot);
248739
+ if (!redirectPath) {
248740
+ throw new InvalidInputError("No Workers build artifact found. Expected a .wrangler/deploy/config.json redirect file.", {
248741
+ hints: [{ message: "Run your framework's build command first" }]
248742
+ });
248743
+ }
248744
+ const configPath = await resolveRedirectedConfigPath(redirectPath);
248745
+ const parsed = await readJsonFile(configPath);
248746
+ const result = WranglerConfigSchema.safeParse(parsed);
248747
+ if (!result.success) {
248748
+ throw new ConfigInvalidError(`Invalid wrangler config: ${exports_external.prettifyError(result.error)}`, configPath);
248749
+ }
248750
+ const config9 = result.data;
248751
+ if (config9.no_bundle !== true) {
248752
+ throw new InvalidInputError("This framework's output requires bundling; not yet supported. Base44 only deploys pre-bundled Workers output (no_bundle: true).");
248753
+ }
248754
+ const configDir = dirname10(configPath);
248755
+ const assetsDirectory = config9.assets?.directory ? resolve4(configDir, config9.assets.directory) : null;
248756
+ return {
248757
+ configPath,
248758
+ configDir,
248759
+ main: config9.main,
248760
+ assetsDirectory,
248761
+ assetsConfig: config9.assets ? toResolvedAssetsConfig(config9.assets) : null,
248762
+ compatibilityDate: config9.compatibility_date ?? null,
248763
+ compatibilityFlags: config9.compatibility_flags ?? [],
248764
+ vars: config9.vars ?? {},
248765
+ rules: (config9.rules ?? []).map((rule) => ({
248766
+ type: rule.type,
248767
+ globs: rule.globs
248768
+ })),
248769
+ uploadSourceMaps: config9.upload_source_maps ?? false
248770
+ };
248771
+ }
248772
+ async function resolveRedirectedConfigPath(redirectPath) {
248773
+ const parsed = await readJsonFile(redirectPath);
248774
+ const result = RedirectConfigSchema.safeParse(parsed);
248775
+ if (!result.success) {
248776
+ throw new ConfigInvalidError(`Invalid deploy redirect file: ${exports_external.prettifyError(result.error)}`, redirectPath);
248777
+ }
248778
+ const configPath = resolve4(dirname10(redirectPath), result.data.configPath);
248779
+ if (!await pathExists(configPath)) {
248780
+ throw new ConfigInvalidError(`Wrangler config referenced by ${redirectPath} does not exist: ${configPath}`, redirectPath, {
248781
+ hints: [{ message: "Rebuild the project to regenerate the artifact" }]
248782
+ });
248783
+ }
248784
+ return configPath;
248785
+ }
248786
+ function toResolvedAssetsConfig(assets) {
248787
+ return {
248788
+ htmlHandling: assets.html_handling,
248789
+ notFoundHandling: assets.not_found_handling,
248790
+ runWorkerFirst: assets.run_worker_first,
248791
+ headers: assets.headers,
248792
+ redirects: assets.redirects
248793
+ };
248794
+ }
248795
+
248816
248796
  // src/core/site/deployment.ts
248817
248797
  var NO_ASSETS = { manifest: {}, filesByHash: new Map };
248798
+ var STATIC_DEPLOYMENTS_ENV = "BASE44_STATIC_DEPLOYMENTS";
248799
+ async function usesDeploymentsApi(projectRoot) {
248800
+ if (await detectFullStackArtifact(projectRoot)) {
248801
+ return true;
248802
+ }
248803
+ const gate = process.env[STATIC_DEPLOYMENTS_ENV];
248804
+ return gate === "1" || gate === "true";
248805
+ }
248818
248806
  async function deployToDeployments(options) {
248819
248807
  const { projectRoot, outputDir, gitHash, concurrency, progress } = options;
248820
248808
  const worker = await resolveWorkerBuild(projectRoot, progress);
@@ -250428,8 +250416,8 @@ var disconnect = (anyProcess) => {
250428
250416
  // ../../node_modules/execa/lib/utils/deferred.js
250429
250417
  var createDeferred = () => {
250430
250418
  const methods = {};
250431
- const promise2 = new Promise((resolve6, reject) => {
250432
- Object.assign(methods, { resolve: resolve6, reject });
250419
+ const promise2 = new Promise((resolve5, reject) => {
250420
+ Object.assign(methods, { resolve: resolve5, reject });
250433
250421
  });
250434
250422
  return Object.assign(promise2, methods);
250435
250423
  };
@@ -254793,11 +254781,11 @@ var addConcurrentStream = (concurrentStreams, stream, waitName) => {
254793
254781
  const promises = weakMap.get(stream);
254794
254782
  const promise2 = createDeferred();
254795
254783
  promises.push(promise2);
254796
- const resolve6 = promise2.resolve.bind(promise2);
254797
- return { resolve: resolve6, promises };
254784
+ const resolve5 = promise2.resolve.bind(promise2);
254785
+ return { resolve: resolve5, promises };
254798
254786
  };
254799
- var waitForConcurrentStreams = async ({ resolve: resolve6, promises }, subprocess) => {
254800
- resolve6();
254787
+ var waitForConcurrentStreams = async ({ resolve: resolve5, promises }, subprocess) => {
254788
+ resolve5();
254801
254789
  const [isSubprocessExit] = await Promise.race([
254802
254790
  Promise.allSettled([true, subprocess]),
254803
254791
  Promise.all([false, ...promises])
@@ -255452,7 +255440,7 @@ async function deployAll(projectData, options) {
255452
255440
  const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
255453
255441
  const connectorResults = skipConnectorSync ? [] : (await pushConnectors(connectors)).results;
255454
255442
  if (project.site?.outputDirectory) {
255455
- const outputDir = resolve6(project.root, project.site.outputDirectory);
255443
+ const outputDir = resolve5(project.root, project.site.outputDirectory);
255456
255444
  const { appUrl } = await deploySite(outputDir);
255457
255445
  return { appUrl, connectorResults };
255458
255446
  }
@@ -256455,7 +256443,7 @@ function getAuthPushCommand() {
256455
256443
  }
256456
256444
 
256457
256445
  // src/cli/commands/auth/social-login.ts
256458
- import { dirname as dirname15, join as join22, resolve as resolve7 } from "node:path";
256446
+ import { dirname as dirname15, join as join22, resolve as resolve6 } from "node:path";
256459
256447
  var PROVIDER_LABELS = {
256460
256448
  google: "Google",
256461
256449
  microsoft: "Microsoft",
@@ -256495,7 +256483,7 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
256495
256483
  let clientSecret;
256496
256484
  if (useCustomOAuth && oauth && oauthCli && hasSecretOptions(options)) {
256497
256485
  if (options.envFile) {
256498
- const secrets = await parseEnvFile(resolve7(options.envFile));
256486
+ const secrets = await parseEnvFile(resolve6(options.envFile));
256499
256487
  const value = secrets[oauthCli.envVar];
256500
256488
  if (!value) {
256501
256489
  throw new InvalidInputError(`Key "${oauthCli.envVar}" not found in ${options.envFile}.`);
@@ -256551,7 +256539,7 @@ function getSocialLoginCommand() {
256551
256539
  }
256552
256540
 
256553
256541
  // src/cli/commands/auth/sso.ts
256554
- import { dirname as dirname16, join as join23, resolve as resolve8 } from "node:path";
256542
+ import { dirname as dirname16, join as join23, resolve as resolve7 } from "node:path";
256555
256543
  var SSOConfigFileSchema = exports_external.object({
256556
256544
  provider: exports_external.enum(Object.values(KNOWN_SSO_PROVIDERS)),
256557
256545
  clientId: exports_external.string(),
@@ -256567,7 +256555,7 @@ var SSOConfigFileSchema = exports_external.object({
256567
256555
  ssoName: exports_external.string().optional()
256568
256556
  });
256569
256557
  async function loadSSOConfigFile(filePath) {
256570
- const resolved = resolve8(filePath);
256558
+ const resolved = resolve7(filePath);
256571
256559
  const raw2 = await readJsonFile(resolved);
256572
256560
  const result = SSOConfigFileSchema.safeParse(raw2);
256573
256561
  if (!result.success) {
@@ -256655,7 +256643,7 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
256655
256643
  }
256656
256644
  let clientSecret;
256657
256645
  if (merged.envFile && !merged.clientSecret) {
256658
- const secrets2 = await parseEnvFile(resolve8(merged.envFile));
256646
+ const secrets2 = await parseEnvFile(resolve7(merged.envFile));
256659
256647
  const value = secrets2.sso_client_secret;
256660
256648
  if (!value) {
256661
256649
  throw new InvalidInputError(`Key "sso_client_secret" not found in ${merged.envFile}.`);
@@ -257293,19 +257281,19 @@ var baseOpen = async (options) => {
257293
257281
  }
257294
257282
  const subprocess = childProcess3.spawn(command2, cliArguments, childProcessOptions);
257295
257283
  if (options.wait) {
257296
- return new Promise((resolve9, reject) => {
257284
+ return new Promise((resolve8, reject) => {
257297
257285
  subprocess.once("error", reject);
257298
257286
  subprocess.once("close", (exitCode) => {
257299
257287
  if (!options.allowNonzeroExitCode && exitCode !== 0) {
257300
257288
  reject(new Error(`Exited with code ${exitCode}`));
257301
257289
  return;
257302
257290
  }
257303
- resolve9(subprocess);
257291
+ resolve8(subprocess);
257304
257292
  });
257305
257293
  });
257306
257294
  }
257307
257295
  if (isFallbackAttempt) {
257308
- return new Promise((resolve9, reject) => {
257296
+ return new Promise((resolve8, reject) => {
257309
257297
  subprocess.once("error", reject);
257310
257298
  subprocess.once("spawn", () => {
257311
257299
  subprocess.once("close", (exitCode) => {
@@ -257315,17 +257303,17 @@ var baseOpen = async (options) => {
257315
257303
  return;
257316
257304
  }
257317
257305
  subprocess.unref();
257318
- resolve9(subprocess);
257306
+ resolve8(subprocess);
257319
257307
  });
257320
257308
  });
257321
257309
  });
257322
257310
  }
257323
257311
  subprocess.unref();
257324
- return new Promise((resolve9, reject) => {
257312
+ return new Promise((resolve8, reject) => {
257325
257313
  subprocess.once("error", reject);
257326
257314
  subprocess.once("spawn", () => {
257327
257315
  subprocess.off("error", reject);
257328
- resolve9(subprocess);
257316
+ resolve8(subprocess);
257329
257317
  });
257330
257318
  });
257331
257319
  };
@@ -257588,10 +257576,10 @@ function getConnectorsListAvailableCommand() {
257588
257576
  }
257589
257577
 
257590
257578
  // src/cli/commands/connectors/pull.ts
257591
- import { dirname as dirname17, join as join24, resolve as resolve9 } from "node:path";
257579
+ import { dirname as dirname17, join as join24, resolve as resolve8 } from "node:path";
257592
257580
  async function resolveConnectorsDir(options) {
257593
257581
  if (!getAppContext().projectRoot) {
257594
- return resolve9(options.dir ?? "connectors");
257582
+ return resolve8(options.dir ?? "connectors");
257595
257583
  }
257596
257584
  const { project: project2 } = await readProjectConfig();
257597
257585
  return join24(dirname17(project2.configPath), project2.connectorsDir);
@@ -257635,10 +257623,10 @@ function getConnectorsPullCommand() {
257635
257623
  }
257636
257624
 
257637
257625
  // src/cli/commands/connectors/push.ts
257638
- import { resolve as resolve10 } from "node:path";
257626
+ import { resolve as resolve9 } from "node:path";
257639
257627
  async function readConnectorsToPush(options) {
257640
257628
  if (!getAppContext().projectRoot) {
257641
- return readAllConnectors(resolve10(options.dir ?? "connectors"));
257629
+ return readAllConnectors(resolve9(options.dir ?? "connectors"));
257642
257630
  }
257643
257631
  const { connectors } = await readProjectConfig();
257644
257632
  return connectors;
@@ -258139,7 +258127,7 @@ function getBuildCommand() {
258139
258127
  }
258140
258128
 
258141
258129
  // src/cli/commands/project/create.ts
258142
- import { basename as basename5, resolve as resolve11 } from "node:path";
258130
+ import { basename as basename5, resolve as resolve10 } from "node:path";
258143
258131
  var import_kebabCase = __toESM(require_kebabCase(), 1);
258144
258132
 
258145
258133
  // src/cli/commands/project/scaffold-shared.ts
@@ -258335,7 +258323,7 @@ async function createInteractive(options, ctx) {
258335
258323
  }, ctx);
258336
258324
  }
258337
258325
  async function createNonInteractive(options, ctx) {
258338
- ctx.log.info(`Creating a new project at ${resolve11(options.path)}`);
258326
+ ctx.log.info(`Creating a new project at ${resolve10(options.path)}`);
258339
258327
  const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
258340
258328
  return await executeCreate({
258341
258329
  template: template2,
@@ -258359,7 +258347,7 @@ async function executeCreate({
258359
258347
  }, ctx) {
258360
258348
  const { log, runTask: runTask2 } = ctx;
258361
258349
  const name2 = rawName.trim();
258362
- const resolvedPath = resolve11(projectPath);
258350
+ const resolvedPath = resolve10(projectPath);
258363
258351
  const organizationId = await resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive);
258364
258352
  const { projectId } = await runTask2("Setting up your project...", async () => {
258365
258353
  return await createProjectFiles({
@@ -258756,7 +258744,7 @@ async function followLogs(functionNames, options, availableFunctionNames, jsonMo
258756
258744
  for (const entry of fresh)
258757
258745
  writeFollowLine(entry, jsonMode);
258758
258746
  first = false;
258759
- await new Promise((resolve12) => setTimeout(resolve12, 2000));
258747
+ await new Promise((resolve11) => setTimeout(resolve11, 2000));
258760
258748
  }
258761
258749
  }
258762
258750
  function formatLogs(entries, env3) {
@@ -258878,7 +258866,7 @@ function getLogsCommand() {
258878
258866
  }
258879
258867
 
258880
258868
  // src/cli/commands/project/scaffold.ts
258881
- import { basename as basename6, resolve as resolve12 } from "node:path";
258869
+ import { basename as basename6, resolve as resolve11 } from "node:path";
258882
258870
  function resolveAppId(options) {
258883
258871
  const appId = options.appId;
258884
258872
  if (!appId) {
@@ -258894,7 +258882,7 @@ function resolveAppId(options) {
258894
258882
  async function scaffoldAction(ctx, name2, options, command2) {
258895
258883
  const { log, runTask: runTask2 } = ctx;
258896
258884
  const appId = resolveAppId(command2.optsWithGlobals());
258897
- const resolvedPath = resolve12("./");
258885
+ const resolvedPath = resolve11("./");
258898
258886
  const projectName = (name2 ?? basename6(resolvedPath)).trim();
258899
258887
  const template2 = await getTemplateById("backend-only");
258900
258888
  log.info(`Scaffolding project at ${resolvedPath}`);
@@ -259291,7 +259279,7 @@ function getSecretsListCommand() {
259291
259279
  }
259292
259280
 
259293
259281
  // src/cli/commands/secrets/set.ts
259294
- import { resolve as resolve13 } from "node:path";
259282
+ import { resolve as resolve12 } from "node:path";
259295
259283
  function parseEntries(entries) {
259296
259284
  const secrets = {};
259297
259285
  for (const entry of entries) {
@@ -259322,7 +259310,7 @@ async function setSecretsAction({ log, runTask: runTask2 }, entries, options) {
259322
259310
  validateInput(entries, options);
259323
259311
  let secrets;
259324
259312
  if (options.envFile) {
259325
- secrets = await parseEnvFile(resolve13(options.envFile));
259313
+ secrets = await parseEnvFile(resolve12(options.envFile));
259326
259314
  if (Object.keys(secrets).length === 0) {
259327
259315
  throw new InvalidInputError("The env file contains no valid KEY=VALUE entries.");
259328
259316
  }
@@ -259351,6 +259339,7 @@ function getSecretsCommand() {
259351
259339
  }
259352
259340
 
259353
259341
  // src/cli/commands/site/deploy.ts
259342
+ import { resolve as resolve13 } from "node:path";
259354
259343
  async function deployAction2(ctx, options) {
259355
259344
  const { isNonInteractive } = ctx;
259356
259345
  if (isNonInteractive && !options.yes) {
@@ -259358,15 +259347,6 @@ async function deployAction2(ctx, options) {
259358
259347
  }
259359
259348
  const project2 = await readProjectSettings();
259360
259349
  const outputDirectory = project2.site?.outputDirectory;
259361
- if ((await planAppDeploy(project2)).kind === "none") {
259362
- throw new ConfigNotFoundError("No site configuration found.", {
259363
- hints: [
259364
- {
259365
- message: `Add 'site.outputDirectory' to your config.jsonc (e.g., "site": { "outputDirectory": "dist" })`
259366
- }
259367
- ]
259368
- });
259369
- }
259370
259350
  if (!options.yes) {
259371
259351
  const shouldDeploy = await Re({
259372
259352
  message: outputDirectory ? `Deploy site from ${outputDirectory}?` : "Deploy site?"
@@ -259376,24 +259356,17 @@ async function deployAction2(ctx, options) {
259376
259356
  }
259377
259357
  }
259378
259358
  await maybeBuildBeforeDeploy(ctx, project2, options.build);
259379
- const plan = await planAppDeploy(project2);
259380
- switch (plan.kind) {
259381
- case "deployment":
259382
- return await deployToDeploymentsApi(ctx, project2.root, plan.outputDir, options);
259383
- case "tarball":
259384
- return await deployTarball(ctx, plan.outputDir);
259385
- case "none":
259386
- return { outroMessage: "Nothing to deploy" };
259387
- }
259388
- }
259389
- async function deployToDeploymentsApi(ctx, projectRoot, outputDir, options) {
259390
- const { runTask: runTask2, log } = ctx;
259359
+ return await usesDeploymentsApi(project2.root) ? await deployToDeploymentsApi(ctx, project2, options) : await deployTarball(ctx, project2);
259360
+ }
259361
+ async function deployToDeploymentsApi(ctx, project2, options) {
259362
+ const { runTask: runTask2, log, jsonMode } = ctx;
259363
+ const projectRoot = project2.root;
259391
259364
  const gitHash = await resolveGitHash(projectRoot, options.gitHash);
259392
259365
  const progressLines = [];
259393
259366
  const warnings = [];
259394
259367
  const { deploymentId } = await runTask2("Deploying site...", async (updateMessage) => await deployToDeployments({
259395
259368
  projectRoot,
259396
- outputDir,
259369
+ outputDir: siteOutputDir(project2),
259397
259370
  gitHash,
259398
259371
  concurrency: options.concurrency,
259399
259372
  progress: {
@@ -259419,21 +259392,32 @@ async function deployToDeploymentsApi(ctx, projectRoot, outputDir, options) {
259419
259392
  for (const warning of warnings) {
259420
259393
  log.warn(warning);
259421
259394
  }
259422
- return deploymentResult(ctx, deploymentId, gitHash);
259395
+ return {
259396
+ outroMessage: `Deployment ${deploymentId} (commit ${gitHash.slice(0, 12)})`,
259397
+ stdout: jsonMode ? `${JSON.stringify({ deploymentId, gitHash }, null, 2)}
259398
+ ` : undefined
259399
+ };
259423
259400
  }
259424
- async function deployTarball({ runTask: runTask2 }, outputDir) {
259401
+ async function deployTarball({ runTask: runTask2 }, project2) {
259402
+ const outputDir = siteOutputDir(project2);
259403
+ if (!outputDir) {
259404
+ throw new ConfigNotFoundError("No site configuration found.", {
259405
+ hints: [
259406
+ {
259407
+ message: `Add 'site.outputDirectory' to your config.jsonc (e.g., "site": { "outputDirectory": "dist" })`
259408
+ }
259409
+ ]
259410
+ });
259411
+ }
259425
259412
  const { appUrl } = await runTask2("Creating archive and deploying site...", async () => await deploySite(outputDir), {
259426
259413
  successMessage: "Site deployed successfully",
259427
259414
  errorMessage: "Deployment failed"
259428
259415
  });
259429
259416
  return { outroMessage: `Visit your site at: ${appUrl}` };
259430
259417
  }
259431
- function deploymentResult({ jsonMode }, deploymentId, gitHash) {
259432
- return {
259433
- outroMessage: `Deployment ${deploymentId} (commit ${gitHash.slice(0, 12)})`,
259434
- stdout: jsonMode ? `${JSON.stringify({ deploymentId, gitHash }, null, 2)}
259435
- ` : undefined
259436
- };
259418
+ function siteOutputDir(project2) {
259419
+ const outputDirectory = project2.site?.outputDirectory;
259420
+ return outputDirectory ? resolve13(project2.root, outputDirectory) : null;
259437
259421
  }
259438
259422
  function getSiteDeployCommand() {
259439
259423
  return new Base44Command("deploy").description("Deploy built site files to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").option("--build", "Build the site before deploying (skips the prompt)").option("--no-build", "Deploy without building (skips the prompt)").addOption(new Option("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser(parseGitHash)).addOption(new Option("--concurrency <n>", "Parallel asset uploads").default(DEFAULT_UPLOAD_CONCURRENCY).argParser(parseConcurrency)).action(deployAction2);
@@ -268517,4 +268501,4 @@ export {
268517
268501
  runCLI
268518
268502
  };
268519
268503
 
268520
- //# debugId=9741A962D703AE2864756E2164756E21
268504
+ //# debugId=EB0C8D1767549E4D64756E2164756E21