@base44-preview/cli 0.1.14-pr.626.0acc5e4 → 0.1.14-pr.626.28bcbc7
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 -32
- package/dist/cli/index.js.map +10 -9
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -250450,6 +250450,31 @@ function getVisibilityCommand() {
|
|
|
250450
250450
|
])).action(setVisibility);
|
|
250451
250451
|
}
|
|
250452
250452
|
|
|
250453
|
+
// src/cli/commands/versions/options.ts
|
|
250454
|
+
function outputDirOption() {
|
|
250455
|
+
return new Option2("--output-dir <dir>", "Build output directory (defaults to the project's, else dist)");
|
|
250456
|
+
}
|
|
250457
|
+
function targetOption() {
|
|
250458
|
+
return new Option2("--target <name>", "Environment to serve the version at");
|
|
250459
|
+
}
|
|
250460
|
+
function gitHashOption() {
|
|
250461
|
+
return new Option2("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser((value) => {
|
|
250462
|
+
if (!isGitCommitHash(value)) {
|
|
250463
|
+
throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
|
|
250464
|
+
}
|
|
250465
|
+
return value;
|
|
250466
|
+
});
|
|
250467
|
+
}
|
|
250468
|
+
function concurrencyOption() {
|
|
250469
|
+
return new Option2("--concurrency <n>", "Parallel file uploads").default(DEFAULT_VERSION_UPLOAD_CONCURRENCY).argParser((value) => {
|
|
250470
|
+
const parsed = Number(value);
|
|
250471
|
+
if (!Number.isInteger(parsed) || parsed < 1 || parsed > MAX_VERSION_UPLOAD_CONCURRENCY) {
|
|
250472
|
+
throw new InvalidArgumentError2(`Expected a whole number between 1 and ${MAX_VERSION_UPLOAD_CONCURRENCY}.`);
|
|
250473
|
+
}
|
|
250474
|
+
return parsed;
|
|
250475
|
+
});
|
|
250476
|
+
}
|
|
250477
|
+
|
|
250453
250478
|
// src/cli/commands/publish.ts
|
|
250454
250479
|
async function publishAction(ctx, options) {
|
|
250455
250480
|
const { runTask, log, jsonMode, app } = ctx;
|
|
@@ -250490,20 +250515,7 @@ async function publishAction(ctx, options) {
|
|
|
250490
250515
|
};
|
|
250491
250516
|
}
|
|
250492
250517
|
function getPublishCommand() {
|
|
250493
|
-
return new Base44Command("publish").description("Build the app, record it as a version, and serve that version").option("--no-build", "Publish the existing build output without rebuilding").
|
|
250494
|
-
}
|
|
250495
|
-
function parseGitHash(value) {
|
|
250496
|
-
if (!isGitCommitHash(value)) {
|
|
250497
|
-
throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
|
|
250498
|
-
}
|
|
250499
|
-
return value;
|
|
250500
|
-
}
|
|
250501
|
-
function parseConcurrency(value) {
|
|
250502
|
-
const parsed = Number(value);
|
|
250503
|
-
if (!Number.isInteger(parsed) || parsed < 1 || parsed > MAX_VERSION_UPLOAD_CONCURRENCY) {
|
|
250504
|
-
throw new InvalidArgumentError2(`Expected a whole number between 1 and ${MAX_VERSION_UPLOAD_CONCURRENCY}.`);
|
|
250505
|
-
}
|
|
250506
|
-
return parsed;
|
|
250518
|
+
return new Base44Command("publish").description("Build the app, record it as a version, and serve that version").option("--no-build", "Publish the existing build output without rebuilding").addOption(outputDirOption()).addOption(targetOption()).addOption(gitHashOption()).addOption(concurrencyOption()).action(publishAction);
|
|
250507
250519
|
}
|
|
250508
250520
|
|
|
250509
250521
|
// src/core/resources/sandbox/schema.ts
|
|
@@ -251018,18 +251030,18 @@ function siteOutputDir(project) {
|
|
|
251018
251030
|
function getSiteDeployCommand() {
|
|
251019
251031
|
const command = 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)");
|
|
251020
251032
|
if (deploymentsApiEnabled()) {
|
|
251021
|
-
command.addOption(new Option2("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser(
|
|
251022
|
-
command.addOption(new Option2("--concurrency <n>", "Parallel asset uploads").default(DEFAULT_UPLOAD_CONCURRENCY).argParser(
|
|
251033
|
+
command.addOption(new Option2("--git-hash <hash>", "Commit the build came from (defaults to the checkout's HEAD)").argParser(parseGitHash));
|
|
251034
|
+
command.addOption(new Option2("--concurrency <n>", "Parallel asset uploads").default(DEFAULT_UPLOAD_CONCURRENCY).argParser(parseConcurrency));
|
|
251023
251035
|
}
|
|
251024
251036
|
return command.action(deployAction2);
|
|
251025
251037
|
}
|
|
251026
|
-
function
|
|
251038
|
+
function parseGitHash(value) {
|
|
251027
251039
|
if (!isGitCommitHash(value)) {
|
|
251028
251040
|
throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
|
|
251029
251041
|
}
|
|
251030
251042
|
return value;
|
|
251031
251043
|
}
|
|
251032
|
-
function
|
|
251044
|
+
function parseConcurrency(value) {
|
|
251033
251045
|
const parsed = Number(value);
|
|
251034
251046
|
if (!Number.isInteger(parsed) || parsed < 1 || parsed > MAX_UPLOAD_CONCURRENCY) {
|
|
251035
251047
|
throw new InvalidArgumentError2(`Expected a whole number between 1 and ${MAX_UPLOAD_CONCURRENCY}.`);
|
|
@@ -251219,18 +251231,7 @@ async function createAction2({ runTask, jsonMode, app }, options) {
|
|
|
251219
251231
|
};
|
|
251220
251232
|
}
|
|
251221
251233
|
function getVersionCreateCommand() {
|
|
251222
|
-
return new Base44Command("create").description("Record the built output as a version, without deploying it").
|
|
251223
|
-
if (!isGitCommitHash(value)) {
|
|
251224
|
-
throw new InvalidArgumentError2("Expected a git commit hash (7-64 hex chars).");
|
|
251225
|
-
}
|
|
251226
|
-
return value;
|
|
251227
|
-
})).addOption(new Option2("--concurrency <n>", "Parallel file uploads").default(DEFAULT_VERSION_UPLOAD_CONCURRENCY).argParser((value) => {
|
|
251228
|
-
const parsed = Number(value);
|
|
251229
|
-
if (!Number.isInteger(parsed) || parsed < 1 || parsed > MAX_VERSION_UPLOAD_CONCURRENCY) {
|
|
251230
|
-
throw new InvalidArgumentError2(`Expected a whole number between 1 and ${MAX_VERSION_UPLOAD_CONCURRENCY}.`);
|
|
251231
|
-
}
|
|
251232
|
-
return parsed;
|
|
251233
|
-
})).action(createAction2);
|
|
251234
|
+
return new Base44Command("create").description("Record the built output as a version, without deploying it").addOption(outputDirOption()).addOption(gitHashOption()).addOption(concurrencyOption()).action(createAction2);
|
|
251234
251235
|
}
|
|
251235
251236
|
|
|
251236
251237
|
// src/cli/commands/versions/deploy.ts
|
|
@@ -251247,7 +251248,7 @@ async function deployAction3({ runTask, jsonMode }, versionId, options) {
|
|
|
251247
251248
|
};
|
|
251248
251249
|
}
|
|
251249
251250
|
function getVersionDeployCommand() {
|
|
251250
|
-
return new Base44Command("deploy").description("Serve an already-recorded version (also how a rollback is done)").argument("<version-id>", "The version to serve").
|
|
251251
|
+
return new Base44Command("deploy").description("Serve an already-recorded version (also how a rollback is done)").argument("<version-id>", "The version to serve").addOption(targetOption()).action(deployAction3);
|
|
251251
251252
|
}
|
|
251252
251253
|
|
|
251253
251254
|
// src/cli/commands/versions/index.ts
|
|
@@ -259965,4 +259966,4 @@ export {
|
|
|
259965
259966
|
runCLI
|
|
259966
259967
|
};
|
|
259967
259968
|
|
|
259968
|
-
//# debugId=
|
|
259969
|
+
//# debugId=444A926116EBC8F264756E2164756E21
|