@base44-preview/cli 0.3.3-pr.700.d3249f9 → 0.3.4-pr.701.87b0681
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 +33 -8
- package/dist/cli/index.js.map +10 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -228529,6 +228529,20 @@ class AppNotPublishedError extends UserError {
|
|
|
228529
228529
|
});
|
|
228530
228530
|
}
|
|
228531
228531
|
}
|
|
228532
|
+
|
|
228533
|
+
class DeploymentExistsError extends UserError {
|
|
228534
|
+
code = "DEPLOYMENT_EXISTS";
|
|
228535
|
+
constructor(gitHash, options) {
|
|
228536
|
+
super(`Commit ${gitHash.slice(0, 12)} already has a different build, so this one was not deployed`, {
|
|
228537
|
+
hints: options?.hints ?? [
|
|
228538
|
+
{
|
|
228539
|
+
message: "Run the same command again with --overwrite to replace that build, or commit your changes and deploy the new commit"
|
|
228540
|
+
}
|
|
228541
|
+
],
|
|
228542
|
+
cause: options?.cause
|
|
228543
|
+
});
|
|
228544
|
+
}
|
|
228545
|
+
}
|
|
228532
228546
|
var MAX_RESPONSE_TEXT_CHARS = 500;
|
|
228533
228547
|
async function readResponseText(response) {
|
|
228534
228548
|
try {
|
|
@@ -236613,6 +236627,9 @@ var DeployResponseSchema = object({
|
|
|
236613
236627
|
var PublishedUrlResponseSchema = object({
|
|
236614
236628
|
url: string2()
|
|
236615
236629
|
});
|
|
236630
|
+
var DeploymentExistsRefusalSchema = object({
|
|
236631
|
+
error: object({ code: literal("deployment_already_exists") })
|
|
236632
|
+
});
|
|
236616
236633
|
var CreateDeploymentResponseSchema = object({
|
|
236617
236634
|
deployment_id: string2(),
|
|
236618
236635
|
session_id: string2(),
|
|
@@ -239446,7 +239463,7 @@ import { join as join13 } from "node:path";
|
|
|
239446
239463
|
// package.json
|
|
239447
239464
|
var package_default = {
|
|
239448
239465
|
name: "base44",
|
|
239449
|
-
version: "0.3.
|
|
239466
|
+
version: "0.3.4",
|
|
239450
239467
|
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
239451
239468
|
type: "module",
|
|
239452
239469
|
bin: {
|
|
@@ -239713,7 +239730,11 @@ async function createDeployment(request) {
|
|
|
239713
239730
|
timeout: 120000
|
|
239714
239731
|
});
|
|
239715
239732
|
} catch (error) {
|
|
239716
|
-
|
|
239733
|
+
const apiError = await ApiError.fromHttpError(error, "creating deployment");
|
|
239734
|
+
if (apiError.statusCode === 409 && DeploymentExistsRefusalSchema.safeParse(apiError.responseBody).success) {
|
|
239735
|
+
throw new DeploymentExistsError(request.git_hash, { cause: apiError });
|
|
239736
|
+
}
|
|
239737
|
+
throw apiError;
|
|
239717
239738
|
}
|
|
239718
239739
|
const result = CreateDeploymentResponseSchema.safeParse(await response.json());
|
|
239719
239740
|
if (!result.success) {
|
|
@@ -240350,7 +240371,7 @@ async function putPresignedBody(upload, body) {
|
|
|
240350
240371
|
// src/core/site/deployment.ts
|
|
240351
240372
|
var NO_ASSETS = { manifest: {}, filesByHash: new Map };
|
|
240352
240373
|
async function deployToDeployments(options) {
|
|
240353
|
-
const { projectRoot, outputDir, gitHash, concurrency, progress } = options;
|
|
240374
|
+
const { projectRoot, outputDir, gitHash, concurrency, overwrite, progress } = options;
|
|
240354
240375
|
const worker = await resolveWorkerBuild(projectRoot, progress);
|
|
240355
240376
|
const assetsDir = worker ? worker.assetsDir : outputDir;
|
|
240356
240377
|
const assets = assetsDir ? await buildAssetManifest(assetsDir, getAppContext().id) : NO_ASSETS;
|
|
@@ -240360,7 +240381,8 @@ async function deployToDeployments(options) {
|
|
|
240360
240381
|
const created = await createDeployment({
|
|
240361
240382
|
git_hash: gitHash,
|
|
240362
240383
|
config: worker?.config,
|
|
240363
|
-
asset_manifest: assets.manifest
|
|
240384
|
+
asset_manifest: assets.manifest,
|
|
240385
|
+
overwrite
|
|
240364
240386
|
});
|
|
240365
240387
|
const completionJwt = await uploadDeploymentAssets(created.assetUploads, assets, { concurrency, progress });
|
|
240366
240388
|
const completion = worker ? { kind: "worker", modules: worker.modules, completionJwt } : await resolveStaticCompletion(assetsDir, assets, created.indexHtmlStaged);
|
|
@@ -247063,6 +247085,7 @@ async function shipCommit(projectRoot, outputDir, gitHash, options) {
|
|
|
247063
247085
|
projectRoot,
|
|
247064
247086
|
outputDir,
|
|
247065
247087
|
gitHash,
|
|
247088
|
+
overwrite: options?.overwrite,
|
|
247066
247089
|
progress: {
|
|
247067
247090
|
onWarning: (message) => options?.onSiteProgress?.(message),
|
|
247068
247091
|
onAssets: ({ totalAssets, newAssets }) => options?.onSiteProgress?.(`Found ${totalAssets} static assets (${newAssets} new)`)
|
|
@@ -252183,6 +252206,7 @@ ${summaryLines.join(`
|
|
|
252183
252206
|
let actorCompleted = 0;
|
|
252184
252207
|
const result = await deployAll(projectData, {
|
|
252185
252208
|
gitHash: options.gitHash,
|
|
252209
|
+
overwrite: options.overwrite,
|
|
252186
252210
|
onSiteProgress: (message) => {
|
|
252187
252211
|
log.message(theme.styles.dim(message));
|
|
252188
252212
|
},
|
|
@@ -252224,7 +252248,7 @@ ${summaryLines.join(`
|
|
|
252224
252248
|
return { outroMessage: "App deployed successfully" };
|
|
252225
252249
|
}
|
|
252226
252250
|
function getDeployCommand3() {
|
|
252227
|
-
return new Base44Command("deploy").description("Deploy all project resources (entities, functions, actors, agents, connectors, and site)").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 Option2("--git-hash <hash>", "Deploy by the commit the build came from, through the deployments API").argParser(parseGitHash)).action(deployAction);
|
|
252251
|
+
return new Base44Command("deploy").description("Deploy all project resources (entities, functions, actors, agents, connectors, and site)").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 Option2("--git-hash <hash>", "Deploy by the commit the build came from, through the deployments API").argParser(parseGitHash)).option("--overwrite", "Replace the build the commit already has (with --git-hash)").action(deployAction);
|
|
252228
252252
|
}
|
|
252229
252253
|
async function handleOAuthConnectors(connectorResults, isNonInteractive, options, log) {
|
|
252230
252254
|
const needsOAuth = filterPendingOAuth(connectorResults);
|
|
@@ -258646,7 +258670,7 @@ var TELEMETRY_PATCH = [
|
|
|
258646
258670
|
var TELEMETRY_STORE_FIELDS = "reqId: crypto.randomUUID(), respondedAt: null, inflight: new Map(), inflightTotal: 0, hadRejection: false, hadNonOk: false, logBudget: 5";
|
|
258647
258671
|
|
|
258648
258672
|
// ../functions-compiler/src/version.ts
|
|
258649
|
-
var COMPILER_VERSION = "0.
|
|
258673
|
+
var COMPILER_VERSION = "0.4.0";
|
|
258650
258674
|
|
|
258651
258675
|
// ../functions-compiler/src/worker-entry.ts
|
|
258652
258676
|
function denoShimSource() {
|
|
@@ -266100,6 +266124,7 @@ async function deployToDeploymentsApi(ctx, project, options) {
|
|
|
266100
266124
|
outputDir,
|
|
266101
266125
|
gitHash,
|
|
266102
266126
|
concurrency: options.concurrency,
|
|
266127
|
+
overwrite: options.overwrite,
|
|
266103
266128
|
progress: {
|
|
266104
266129
|
onWarning: (message) => {
|
|
266105
266130
|
warnings.push(message);
|
|
@@ -266151,7 +266176,7 @@ function siteOutputDir(project) {
|
|
|
266151
266176
|
return resolve17(project.root, outputDirectory);
|
|
266152
266177
|
}
|
|
266153
266178
|
function getSiteDeployCommand() {
|
|
266154
|
-
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)").option("--publish", "Serve this build in production once it is deployed").addOption(new Option2("--git-hash <hash>", "Deploy by the commit the build came from, through the deployments API").argParser(parseGitHash)).addOption(new Option2("--concurrency <n>", "Parallel asset uploads").default(DEFAULT_UPLOAD_CONCURRENCY).argParser(parseConcurrency)).action(deployAction2);
|
|
266179
|
+
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)").option("--publish", "Serve this build in production once it is deployed").option("--overwrite", "Replace the build the commit already has (with --git-hash)").addOption(new Option2("--git-hash <hash>", "Deploy by the commit the build came from, through the deployments API").argParser(parseGitHash)).addOption(new Option2("--concurrency <n>", "Parallel asset uploads").default(DEFAULT_UPLOAD_CONCURRENCY).argParser(parseConcurrency)).action(deployAction2);
|
|
266155
266180
|
}
|
|
266156
266181
|
function parseConcurrency(value) {
|
|
266157
266182
|
const parsed = Number(value);
|
|
@@ -275307,4 +275332,4 @@ export {
|
|
|
275307
275332
|
runCLI
|
|
275308
275333
|
};
|
|
275309
275334
|
|
|
275310
|
-
//# debugId=
|
|
275335
|
+
//# debugId=B97BC2F260368ED664756E2164756E21
|