run402 1.25.0 → 1.26.0

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/lib/deploy.mjs CHANGED
@@ -32,11 +32,13 @@ Manifest format (JSON):
32
32
  { "file": "index.html", "data": "<html>...</html>" },
33
33
  { "file": "style.css", "path": "./dist/style.css" }
34
34
  ],
35
- "subdomain": "my-app"
35
+ "subdomain": "my-app",
36
+ "inherit": true
36
37
  }
37
38
 
38
39
  project_id is required (provision first with 'run402 provision').
39
40
  All other fields are optional.
41
+ inherit: copy unchanged site files from previous deployment (only upload changed files).
40
42
 
41
43
  Migrations can be inline or read from a file:
42
44
  "migrations": "CREATE TABLE ..." ← inline SQL
package/lib/sites.mjs CHANGED
@@ -18,6 +18,7 @@ Options (deploy):
18
18
  --manifest <file> Path to manifest JSON file (or read from stdin)
19
19
  --project <id> Project ID (defaults to active project)
20
20
  --target <target> Deployment target (e.g. 'production')
21
+ --inherit Copy unchanged files from the previous deployment (only upload changed files)
21
22
  --help, -h Show this help message
22
23
 
23
24
  Manifest format (JSON):
@@ -51,12 +52,13 @@ async function readStdin() {
51
52
  }
52
53
 
53
54
  async function deploy(args) {
54
- const opts = { manifest: null, project: undefined, target: undefined };
55
+ const opts = { manifest: null, project: undefined, target: undefined, inherit: false };
55
56
  for (let i = 0; i < args.length; i++) {
56
57
  if (args[i] === "--help" || args[i] === "-h") { console.log(HELP); process.exit(0); }
57
58
  if (args[i] === "--manifest" && args[i + 1]) opts.manifest = args[++i];
58
59
  if (args[i] === "--project" && args[i + 1]) opts.project = args[++i];
59
60
  if (args[i] === "--target" && args[i + 1]) opts.target = args[++i];
61
+ if (args[i] === "--inherit") opts.inherit = true;
60
62
  }
61
63
  const projectId = resolveProjectId(opts.project);
62
64
  const raw = opts.manifest ? readFileSync(opts.manifest, "utf-8") : await readStdin();
@@ -64,6 +66,7 @@ async function deploy(args) {
64
66
  if (opts.manifest) resolveFilePathsInManifest(manifest, dirname(resolve(opts.manifest)));
65
67
  const body = { files: manifest.files, project: projectId };
66
68
  if (opts.target) body.target = opts.target;
69
+ if (opts.inherit) body.inherit = true;
67
70
 
68
71
  const authHeaders = allowanceAuthHeaders("/deployments/v1");
69
72
  const res = await fetch(`${API}/deployments/v1`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "1.25.0",
3
+ "version": "1.26.0",
4
4
  "description": "CLI for Run402 — provision Postgres databases, deploy static sites, generate images, and manage wallets via x402 and MPP micropayments.",
5
5
  "type": "module",
6
6
  "bin": {