@polterware/polterbase 0.2.7 → 0.2.8

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.
Files changed (3) hide show
  1. package/README.md +12 -0
  2. package/dist/index.js +37 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -128,12 +128,18 @@ polterbase app configure uru --path .
128
128
  polterbase app install uru
129
129
  ```
130
130
 
131
+ ```bash
132
+ polterbase app update uru
133
+ ```
134
+
131
135
  `setup uru` installs dependencies, collects Supabase connection data, links the project, pushes migrations, and writes the runtime bootstrap payload used by the desktop app.
132
136
 
133
137
  `configure uru` refreshes the runtime connection payload without reinstalling the app.
134
138
 
135
139
  `install uru` is currently macOS-only. By default it resolves the latest GitHub release from `polterware/uru`, accepts `--version <version>` to pin a release, and still supports `--artifact-url` or `POLTERBASE_URU_MACOS_ARTIFACT_URL` as manual overrides.
136
140
 
141
+ `update uru` is also macOS-only. It replaces the installed `uru.app` with a newer release while preserving the persisted runtime configuration, local settings, and Supabase session state stored outside the app bundle.
142
+
137
143
  Use `POLTERBASE_URU_GITHUB_REPO=owner/repo` when you need to resolve releases from a fork or a different repository.
138
144
 
139
145
  ### Execution Model
@@ -278,6 +284,12 @@ Install a specific release:
278
284
  polterbase app install uru --version 1.0.0
279
285
  ```
280
286
 
287
+ Update an existing installation without re-running runtime configuration:
288
+
289
+ ```bash
290
+ polterbase app update uru
291
+ ```
292
+
281
293
  ### Check Supabase CLI version
282
294
 
283
295
  Interactive path:
package/dist/index.js CHANGED
@@ -2085,10 +2085,12 @@ function printCliHelp() {
2085
2085
  " polterbase app migrate uru [push|lint|reset|local-reset] [--path <dir>] [--relink]",
2086
2086
  " polterbase app configure uru [--path <dir>] [--yes]",
2087
2087
  " polterbase app install uru [--version <version>] [--artifact-url <url>] [--install-dir <dir>] [--yes]",
2088
+ " polterbase app update uru [--version <version>] [--artifact-url <url>] [--install-dir <dir>] [--yes]",
2088
2089
  "",
2089
2090
  "Notes:",
2090
2091
  " - App workflows stay separate from the generic Supabase interactive menu.",
2091
2092
  " - `install uru` is macOS-only and resolves the latest GitHub release from polterware/uru by default.",
2093
+ " - `update uru` replaces the installed app bundle without touching the persisted runtime/app state.",
2092
2094
  " - Use --artifact-url or POLTERBASE_URU_MACOS_ARTIFACT_URL to override the downloaded asset.",
2093
2095
  " - Use POLTERBASE_URU_GITHUB_REPO=owner/repo to resolve releases from a different repository.",
2094
2096
  ""
@@ -2758,7 +2760,7 @@ async function findFirstAppBundle(dir) {
2758
2760
  }
2759
2761
  return void 0;
2760
2762
  }
2761
- async function installMacosApp(context) {
2763
+ async function deployMacosApp(context, options) {
2762
2764
  const artifact = await resolveUruMacosArtifact(context.options);
2763
2765
  const tempRoot = await mkdtemp(join4(tmpdir(), "polterbase-uru-"));
2764
2766
  const archivePath = join4(tempRoot, artifact.fileName);
@@ -2792,6 +2794,11 @@ async function installMacosApp(context) {
2792
2794
  const installDir = context.options.installDir ?? "/Applications";
2793
2795
  mkdirSync(installDir, { recursive: true });
2794
2796
  const destination = join4(installDir, "uru.app");
2797
+ if (options.requireExistingInstallation && !existsSync3(destination)) {
2798
+ throw new Error(
2799
+ `No existing Uru installation was found at ${destination}. Run \`polterbase app install uru\` first.`
2800
+ );
2801
+ }
2795
2802
  if (existsSync3(destination)) {
2796
2803
  const confirmed = context.options.yes || await promptConfirm(`Replace existing installation at ${destination}?`, false);
2797
2804
  if (!confirmed) {
@@ -2807,15 +2814,38 @@ async function installMacosApp(context) {
2807
2814
  process.cwd(),
2808
2815
  "App copy failed."
2809
2816
  );
2810
- process.stdout.write(`${pc2.green(`Installed Uru to ${destination}`)}
2811
- `);
2812
- await runConfigure(context);
2817
+ process.stdout.write(
2818
+ `${pc2.green(`${options.mode === "install" ? "Installed" : "Updated"} Uru at ${destination}`)}
2819
+ `
2820
+ );
2821
+ if (options.configureAfterCopy) {
2822
+ await runConfigure(context);
2823
+ } else {
2824
+ process.stdout.write(
2825
+ `${pc2.dim("Preserved existing runtime configuration and local app state.")}
2826
+ `
2827
+ );
2828
+ }
2813
2829
  const shouldOpen = context.options.yes || await promptConfirm("Open Uru now?", true);
2814
2830
  if (shouldOpen) {
2815
2831
  await runOrThrow("open", ["-a", destination], process.cwd(), "Unable to open Uru.");
2816
2832
  }
2817
2833
  return 0;
2818
2834
  }
2835
+ async function installMacosApp(context) {
2836
+ return deployMacosApp(context, {
2837
+ mode: "install",
2838
+ configureAfterCopy: true,
2839
+ requireExistingInstallation: false
2840
+ });
2841
+ }
2842
+ async function updateMacosApp(context) {
2843
+ return deployMacosApp(context, {
2844
+ mode: "update",
2845
+ configureAfterCopy: false,
2846
+ requireExistingInstallation: true
2847
+ });
2848
+ }
2819
2849
  var uruProfile = {
2820
2850
  id: "uru",
2821
2851
  displayName: "Uru",
@@ -2842,6 +2872,8 @@ var uruProfile = {
2842
2872
  return runConfigure(context);
2843
2873
  case "install":
2844
2874
  return installMacosApp(context);
2875
+ case "update":
2876
+ return updateMacosApp(context);
2845
2877
  case "migrate":
2846
2878
  return runMigration(
2847
2879
  context,
@@ -2860,7 +2892,7 @@ function getAppProfile(appId) {
2860
2892
  // src/apps/runAppCli.ts
2861
2893
  function assertAppCommand(options) {
2862
2894
  if (!options.action || !options.app) {
2863
- throw new Error("Usage: polterbase app <setup|link|migrate|configure|install> <app>");
2895
+ throw new Error("Usage: polterbase app <setup|link|migrate|configure|install|update> <app>");
2864
2896
  }
2865
2897
  }
2866
2898
  async function runAppCli(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polterware/polterbase",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "An interactive CLI for managing Supabase CLI workflows.",
5
5
  "type": "module",
6
6
  "bin": {