@rebasepro/cli 0.9.1-canary.682a9cf → 0.9.1-canary.742f831

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 CHANGED
@@ -3287,13 +3287,18 @@ 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;
3290
3291
  function sleep(ms) {
3291
3292
  return new Promise((r) => setTimeout(r, ms));
3292
3293
  }
3293
- function run(cmd, cmdArgs, cwd) {
3294
+ function run(cmd, cmdArgs, cwd, env) {
3294
3295
  return new Promise((resolve, reject) => {
3295
3296
  const child = spawn(cmd, cmdArgs, {
3296
3297
  cwd,
3298
+ env: env ? {
3299
+ ...process.env,
3300
+ ...env
3301
+ } : void 0,
3297
3302
  stdio: [
3298
3303
  "ignore",
3299
3304
  "ignore",
@@ -3323,7 +3328,7 @@ async function createSourceTarball(sourceDir) {
3323
3328
  for (const ignore of [".gitignore", ".rebaseignore"]) if (fs.existsSync(path.join(dir, ignore))) tarArgs.push(`--exclude-from=${ignore}`);
3324
3329
  tarArgs.push(".");
3325
3330
  try {
3326
- await run("tar", tarArgs, dir);
3331
+ await run("tar", tarArgs, dir, { COPYFILE_DISABLE: "1" });
3327
3332
  } catch (e) {
3328
3333
  fail(`Failed to package source: ${e instanceof Error ? e.message : String(e)}`);
3329
3334
  }
@@ -3333,6 +3338,7 @@ async function createSourceTarball(sourceDir) {
3333
3338
  async function uploadSource(url, token, projectId, tarPath) {
3334
3339
  const bytes = fs.readFileSync(tarPath);
3335
3340
  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.");
3336
3342
  console.log(chalk.gray(` Uploading source (${sizeMb} MB)...`));
3337
3343
  const res = await fetch(`${url}/api/functions/deploy/upload?projectId=${encodeURIComponent(projectId)}`, {
3338
3344
  method: "POST",
@@ -4312,6 +4318,8 @@ ${chalk.green.bold("Options")}
4312
4318
  ${chalk.blue("--secret")} Mark a variable write-only ${chalk.gray("(set)")}
4313
4319
  ${chalk.blue("--json")} Machine-readable output
4314
4320
  ${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.")}
4315
4323
  `);
4316
4324
  }
4317
4325
  function printEnvHelpJson() {