@base44-preview/cli 0.1.15-pr.631.fed67f3 → 0.1.15-pr.632.1a53729
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/README.md +1 -1
- package/dist/cli/index.js +20 -4
- package/dist/cli/index.js.map +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
|
|
|
67
67
|
| [`sandbox edit`](https://docs.base44.com/developers/references/cli/commands/sandbox-edit) | Apply exact old→new string edits to a file in the sandbox |
|
|
68
68
|
| [`sandbox grep`](https://docs.base44.com/developers/references/cli/commands/sandbox-grep) | Search files for a pattern in an app's remote sandbox |
|
|
69
69
|
| [`sandbox run`](https://docs.base44.com/developers/references/cli/commands/sandbox-run) | Run a shell command in an app's remote sandbox |
|
|
70
|
-
| [`sandbox checkpoint`](https://docs.base44.com/developers/references/cli/commands/sandbox-checkpoint) |
|
|
70
|
+
| [`sandbox checkpoint`](https://docs.base44.com/developers/references/cli/commands/sandbox-checkpoint) | Save a restore point in the builder's version history; run it after each unit of work, since sandbox writes are committed but not checkpointed and a Restore or Revert in the builder discards everything after the last checkpoint |
|
|
71
71
|
| [`site deploy`](https://docs.base44.com/developers/references/cli/commands/site-deploy) | Deploy built site files to Base44 hosting |
|
|
72
72
|
| [`site open`](https://docs.base44.com/developers/references/cli/commands/site-open) | Open the published site in your browser |
|
|
73
73
|
| [`types generate`](https://docs.base44.com/developers/references/cli/commands/types-generate) | Generate TypeScript types from project resources |
|
package/dist/cli/index.js
CHANGED
|
@@ -250665,6 +250665,11 @@ function createCheckpoint(appId, params) {
|
|
|
250665
250665
|
}
|
|
250666
250666
|
|
|
250667
250667
|
// src/cli/commands/sandbox/shared.ts
|
|
250668
|
+
var CHECKPOINT_HELP = `
|
|
250669
|
+
Writes are committed but not checkpointed. Only checkpoints appear in the
|
|
250670
|
+
builder's version history, and a Restore or Revert there rolls the app back to
|
|
250671
|
+
the last checkpoint and discards everything written after it. Run
|
|
250672
|
+
\`base44 sandbox checkpoint\` when you finish a unit of work and before you stop.`;
|
|
250668
250673
|
async function resolveFlagOrStdin(flagValue, flagName) {
|
|
250669
250674
|
if (flagValue !== undefined) {
|
|
250670
250675
|
return flagValue;
|
|
@@ -250695,7 +250700,14 @@ async function checkpointAction({ runTask, branchId }, options) {
|
|
|
250695
250700
|
return { outroMessage: "Created checkpoint", stdout: toJsonStdout(result) };
|
|
250696
250701
|
}
|
|
250697
250702
|
function getSandboxCheckpointCommand() {
|
|
250698
|
-
return new Base44Command("checkpoint", { supportsBranch: true }).description("
|
|
250703
|
+
return new Base44Command("checkpoint", { supportsBranch: true }).description("Save a restore point in the builder's version history (run after each unit of work)").option("--name <name>", "Optional title, ideally a short summary of what changed (defaults to an auto-generated title)").addHelpText("after", `
|
|
250704
|
+
Sandbox writes are committed but not checkpointed. Only checkpoints appear in
|
|
250705
|
+
the builder's version history, and a Restore or Revert there rolls the app back
|
|
250706
|
+
to the last checkpoint and discards everything written after it. Run this when
|
|
250707
|
+
you finish a unit of work and always before you stop, so the user can restore
|
|
250708
|
+
your work instead of losing it. Pending changes are flushed first, so the
|
|
250709
|
+
checkpoint captures your latest code.
|
|
250710
|
+
|
|
250699
250711
|
Examples:
|
|
250700
250712
|
$ base44 sandbox checkpoint
|
|
250701
250713
|
$ base44 sandbox checkpoint --name "before refactor"`).action(checkpointAction);
|
|
@@ -250738,6 +250750,7 @@ async function editFileAction({ runTask, branchId }, path, options) {
|
|
|
250738
250750
|
function getSandboxEditFileCommand() {
|
|
250739
250751
|
return new Base44Command("edit", { supportsBranch: true }).description("Apply exact old→new string edits to a file in the sandbox").argument("<path>", "File path relative to the app root").option("--edits-json <json>", "JSON array of edits (if omitted, read from stdin)").option("--dry-run", "Return the unified diff without writing").addHelpText("after", `
|
|
250740
250752
|
Each edit is { "old_text": "...", "new_text": "...", "replace_all"?: true }.
|
|
250753
|
+
${CHECKPOINT_HELP}
|
|
250741
250754
|
|
|
250742
250755
|
Examples:
|
|
250743
250756
|
$ echo '[{"old_text":"foo","new_text":"bar"}]' | base44 sandbox edit src/x.ts
|
|
@@ -250807,6 +250820,8 @@ async function runCommandAction({ runTask, branchId }, commandParts, options) {
|
|
|
250807
250820
|
}
|
|
250808
250821
|
function getSandboxRunCommandCommand() {
|
|
250809
250822
|
return new Base44Command("run", { supportsBranch: true }).description("Run a shell command in an app's remote sandbox").argument("<command...>", "Shell command to execute (quote to keep as one)").option("--cwd <path>", "Working directory relative to the app root").option("--timeout-ms <n>", "Timeout in milliseconds (default 120000, max 600000)").addHelpText("after", `
|
|
250823
|
+
A command that changes files needs a checkpoint too.${CHECKPOINT_HELP}
|
|
250824
|
+
|
|
250810
250825
|
Examples:
|
|
250811
250826
|
$ base44 sandbox run "npm test"
|
|
250812
250827
|
$ base44 sandbox run ls -la --cwd src`).action(runCommandAction);
|
|
@@ -250825,7 +250840,8 @@ async function writeFileAction({ runTask, branchId }, path, options) {
|
|
|
250825
250840
|
return { outroMessage: "Wrote file", stdout: toJsonStdout(result) };
|
|
250826
250841
|
}
|
|
250827
250842
|
function getSandboxWriteFileCommand() {
|
|
250828
|
-
return new Base44Command("write", { supportsBranch: true }).description("Create or overwrite a file in an app's remote sandbox").argument("<path>", "File path relative to the app root").option("--content <content>", "File content (if omitted, read from stdin)").option("--overwrite", "Overwrite the file if it already exists").addHelpText("after",
|
|
250843
|
+
return new Base44Command("write", { supportsBranch: true }).description("Create or overwrite a file in an app's remote sandbox").argument("<path>", "File path relative to the app root").option("--content <content>", "File content (if omitted, read from stdin)").option("--overwrite", "Overwrite the file if it already exists").addHelpText("after", `${CHECKPOINT_HELP}
|
|
250844
|
+
|
|
250829
250845
|
Examples:
|
|
250830
250846
|
$ echo "hello" | base44 sandbox write notes.txt
|
|
250831
250847
|
$ base44 sandbox write notes.txt --content "hello" --overwrite`).action(writeFileAction);
|
|
@@ -250833,7 +250849,7 @@ Examples:
|
|
|
250833
250849
|
|
|
250834
250850
|
// src/cli/commands/sandbox/index.ts
|
|
250835
250851
|
function getSandboxCommand() {
|
|
250836
|
-
return new Command2("sandbox").description("Develop an app remotely via its server-side sandbox").addCommand(getSandboxListDirectoryCommand()).addCommand(getSandboxReadFileCommand()).addCommand(getSandboxWriteFileCommand()).addCommand(getSandboxEditFileCommand()).addCommand(getSandboxGrepCommand()).addCommand(getSandboxRunCommandCommand()).addCommand(getSandboxCheckpointCommand());
|
|
250852
|
+
return new Command2("sandbox").description("Develop an app remotely via its server-side sandbox").addHelpText("after", CHECKPOINT_HELP).addCommand(getSandboxListDirectoryCommand()).addCommand(getSandboxReadFileCommand()).addCommand(getSandboxWriteFileCommand()).addCommand(getSandboxEditFileCommand()).addCommand(getSandboxGrepCommand()).addCommand(getSandboxRunCommandCommand()).addCommand(getSandboxCheckpointCommand());
|
|
250837
250853
|
}
|
|
250838
250854
|
|
|
250839
250855
|
// src/cli/commands/secrets/delete.ts
|
|
@@ -259913,4 +259929,4 @@ export {
|
|
|
259913
259929
|
runCLI
|
|
259914
259930
|
};
|
|
259915
259931
|
|
|
259916
|
-
//# debugId=
|
|
259932
|
+
//# debugId=3CF1426A84AA996C64756E2164756E21
|