@rebasepro/cli 0.9.1-canary.5809e39 → 0.9.1-canary.682a9cf
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/index.es.js +2 -10
- package/dist/index.es.js.map +1 -1
- package/package.json +7 -7
package/dist/index.es.js
CHANGED
|
@@ -3287,18 +3287,13 @@ function fmtDate(value) {
|
|
|
3287
3287
|
*/
|
|
3288
3288
|
var POLL_INTERVAL_MS = 1500;
|
|
3289
3289
|
var POLL_TIMEOUT_MS = 900 * 1e3;
|
|
3290
|
-
var MAX_SOURCE_UPLOAD_BYTES = 100 * 1024 * 1024;
|
|
3291
3290
|
function sleep(ms) {
|
|
3292
3291
|
return new Promise((r) => setTimeout(r, ms));
|
|
3293
3292
|
}
|
|
3294
|
-
function run(cmd, cmdArgs, cwd
|
|
3293
|
+
function run(cmd, cmdArgs, cwd) {
|
|
3295
3294
|
return new Promise((resolve, reject) => {
|
|
3296
3295
|
const child = spawn(cmd, cmdArgs, {
|
|
3297
3296
|
cwd,
|
|
3298
|
-
env: env ? {
|
|
3299
|
-
...process.env,
|
|
3300
|
-
...env
|
|
3301
|
-
} : void 0,
|
|
3302
3297
|
stdio: [
|
|
3303
3298
|
"ignore",
|
|
3304
3299
|
"ignore",
|
|
@@ -3328,7 +3323,7 @@ async function createSourceTarball(sourceDir) {
|
|
|
3328
3323
|
for (const ignore of [".gitignore", ".rebaseignore"]) if (fs.existsSync(path.join(dir, ignore))) tarArgs.push(`--exclude-from=${ignore}`);
|
|
3329
3324
|
tarArgs.push(".");
|
|
3330
3325
|
try {
|
|
3331
|
-
await run("tar", tarArgs, dir
|
|
3326
|
+
await run("tar", tarArgs, dir);
|
|
3332
3327
|
} catch (e) {
|
|
3333
3328
|
fail(`Failed to package source: ${e instanceof Error ? e.message : String(e)}`);
|
|
3334
3329
|
}
|
|
@@ -3338,7 +3333,6 @@ async function createSourceTarball(sourceDir) {
|
|
|
3338
3333
|
async function uploadSource(url, token, projectId, tarPath) {
|
|
3339
3334
|
const bytes = fs.readFileSync(tarPath);
|
|
3340
3335
|
const sizeMb = (bytes.length / 1024 / 1024).toFixed(1);
|
|
3341
|
-
if (bytes.length > MAX_SOURCE_UPLOAD_BYTES) fail(`Source context is ${sizeMb} MB — the upload cap is ${Math.round(MAX_SOURCE_UPLOAD_BYTES / 1024 / 1024)} MB.`, "Trim the build context: exclude sourcemaps (*.map), build output and large assets via .rebaseignore or .gitignore.");
|
|
3342
3336
|
console.log(chalk.gray(` Uploading source (${sizeMb} MB)...`));
|
|
3343
3337
|
const res = await fetch(`${url}/api/functions/deploy/upload?projectId=${encodeURIComponent(projectId)}`, {
|
|
3344
3338
|
method: "POST",
|
|
@@ -4318,8 +4312,6 @@ ${chalk.green.bold("Options")}
|
|
|
4318
4312
|
${chalk.blue("--secret")} Mark a variable write-only ${chalk.gray("(set)")}
|
|
4319
4313
|
${chalk.blue("--json")} Machine-readable output
|
|
4320
4314
|
${chalk.blue("--project, -p")} Project slug ${chalk.gray("(defaults to the linked project)")}
|
|
4321
|
-
|
|
4322
|
-
${chalk.gray("Values are encrypted at rest (AES-256-GCM) and only decrypted at deploy time.")}
|
|
4323
4315
|
`);
|
|
4324
4316
|
}
|
|
4325
4317
|
function printEnvHelpJson() {
|