@madewithremy/admin 0.1.21 → 0.1.22

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/prod.js CHANGED
@@ -949,7 +949,7 @@ Examples:
949
949
  import { execFileSync } from "child_process";
950
950
 
951
951
  // src/config.ts
952
- var WORKSPACE_DIR = process.env["WORKSPACE_DIR"] || "/home/vercel-sandbox/workspace";
952
+ var WORKSPACE_DIR = process.env["WORKSPACE_DIR"] || "/home/remy/workspace";
953
953
 
954
954
  // src/ops/releases.ts
955
955
  function list3(ctx, params = {}) {
@@ -2171,12 +2171,15 @@ Examples:
2171
2171
  remy-admin methods invoke mth_abc123 --user-id user_abc --roles analyst,admin`;
2172
2172
 
2173
2173
  // src/ops/data.ts
2174
- function liftFromDev(ctx) {
2174
+ function liftFromDev(ctx, params = {}) {
2175
2175
  return call(
2176
2176
  ctx,
2177
2177
  "POST",
2178
2178
  `/_internal/v2/apps/${ctx.appId}/manage/lift-dev-to-live`,
2179
- { confirm: true }
2179
+ {
2180
+ confirm: true,
2181
+ ...params.releaseId ? { releaseId: params.releaseId } : {}
2182
+ }
2180
2183
  );
2181
2184
  }
2182
2185
  function liftFromLive(ctx, params = {}) {
@@ -2184,24 +2187,32 @@ function liftFromLive(ctx, params = {}) {
2184
2187
  ctx,
2185
2188
  "POST",
2186
2189
  `/_internal/v2/apps/${ctx.appId}/manage/lift-live-to-dev`,
2187
- { confirm: true, ...params.truncate ? { mode: "truncate" } : {} }
2190
+ {
2191
+ confirm: true,
2192
+ ...params.truncate ? { mode: "truncate" } : {},
2193
+ ...params.releaseId ? { releaseId: params.releaseId } : {}
2194
+ }
2188
2195
  );
2189
2196
  }
2190
2197
 
2191
2198
  // src/commands/data.ts
2192
2199
  var dataSpecs = {
2193
2200
  "data lift-from-dev": {
2194
- usage: "Usage: remy-admin data lift-from-dev <appId> --confirm\nRefusing to run without the exact appId and --confirm: this destructively replaces the live release's databases with a snapshot of dev. Wipes any rows live had \u2014 including signed-up users. Intended for first-publish / pre-launch data sync only.",
2201
+ usage: "Usage: remy-admin data lift-from-dev <appId> --confirm [--release-id <id>]\nRefusing to run without the exact appId and --confirm: this destructively replaces the live release's databases with a snapshot of dev. Wipes any rows live had \u2014 including signed-up users. Intended for first-publish / pre-launch data sync only.\n--release-id names which of your dev workspaces to lift from, and is required only when you have more than one open (a box and a laptop CLI). The ambiguity error lists the ids.",
2195
2202
  positionals: [{ name: "appId", required: true }],
2196
- flags: { confirm: { type: "boolean" } },
2203
+ flags: { confirm: { type: "boolean" }, "release-id": { type: "string" } },
2197
2204
  requireAnyOf: {
2198
2205
  flags: ["confirm"],
2199
2206
  message: "Refusing to run without --confirm."
2200
2207
  }
2201
2208
  },
2202
2209
  "data lift-from-live": {
2203
- usage: "Usage: remy-admin data lift-from-live [--truncate] --confirm\nRefusing to run without --confirm: this destructively replaces the dev release's databases with a snapshot of live (wiping local dev data). Live/prod data is never touched. With --truncate it instead empties the dev databases (keeps schema, no data pulled from live).",
2204
- flags: { truncate: { type: "boolean" }, confirm: { type: "boolean" } },
2210
+ usage: "Usage: remy-admin data lift-from-live [--truncate] --confirm [--release-id <id>]\nRefusing to run without --confirm: this destructively replaces the dev release's databases with a snapshot of live (wiping local dev data). Live/prod data is never touched. With --truncate it instead empties the dev databases (keeps schema, no data pulled from live).\n--release-id names which of your dev workspaces to overwrite, and is required only when you have more than one open.",
2211
+ flags: {
2212
+ truncate: { type: "boolean" },
2213
+ confirm: { type: "boolean" },
2214
+ "release-id": { type: "string" }
2215
+ },
2205
2216
  requireAnyOf: {
2206
2217
  flags: ["confirm"],
2207
2218
  message: "Refusing to run without --confirm."
@@ -2215,10 +2226,15 @@ async function dataLiftFromDev(ctx, a) {
2215
2226
  `appId "${given}" does not match this workspace's app \u2014 re-run with the exact appId from mindstudio.json.`
2216
2227
  );
2217
2228
  }
2218
- out(await liftFromDev(ctx));
2229
+ out(await liftFromDev(ctx, { releaseId: a.str("release-id") }));
2219
2230
  }
2220
2231
  async function dataLiftFromLive(ctx, a) {
2221
- out(await liftFromLive(ctx, { truncate: a.bool("truncate") }));
2232
+ out(
2233
+ await liftFromLive(ctx, {
2234
+ truncate: a.bool("truncate"),
2235
+ releaseId: a.str("release-id")
2236
+ })
2237
+ );
2222
2238
  }
2223
2239
  var dataHandlers = {
2224
2240
  "data lift-from-dev": dataLiftFromDev,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madewithremy/admin",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Admin SDK + CLI for managing production Remy apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",