@polterware/polterbase 0.2.6 → 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.
- package/README.md +15 -3
- package/dist/index.js +39 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,7 +125,11 @@ polterbase app configure uru --path .
|
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
|
-
polterbase app install uru
|
|
128
|
+
polterbase app install uru
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
polterbase app update uru
|
|
129
133
|
```
|
|
130
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.
|
|
@@ -134,6 +138,8 @@ polterbase app install uru --platform macos
|
|
|
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
|
|
@@ -269,13 +275,19 @@ polterbase app configure uru
|
|
|
269
275
|
### Install the latest released Uru app
|
|
270
276
|
|
|
271
277
|
```bash
|
|
272
|
-
polterbase app install uru
|
|
278
|
+
polterbase app install uru
|
|
273
279
|
```
|
|
274
280
|
|
|
275
281
|
Install a specific release:
|
|
276
282
|
|
|
277
283
|
```bash
|
|
278
|
-
polterbase app install uru --
|
|
284
|
+
polterbase app install uru --version 1.0.0
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Update an existing installation without re-running runtime configuration:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
polterbase app update uru
|
|
279
291
|
```
|
|
280
292
|
|
|
281
293
|
### Check Supabase CLI version
|
package/dist/index.js
CHANGED
|
@@ -2049,12 +2049,6 @@ function parseCliArgs(argv) {
|
|
|
2049
2049
|
index = parsed.nextIndex;
|
|
2050
2050
|
continue;
|
|
2051
2051
|
}
|
|
2052
|
-
if (token.startsWith("--platform")) {
|
|
2053
|
-
const parsed = takeValue(argv, index);
|
|
2054
|
-
options.platform = parsed.value;
|
|
2055
|
-
index = parsed.nextIndex;
|
|
2056
|
-
continue;
|
|
2057
|
-
}
|
|
2058
2052
|
if (token.startsWith("--version")) {
|
|
2059
2053
|
const parsed = takeValue(argv, index);
|
|
2060
2054
|
options.version = parsed.value;
|
|
@@ -2090,11 +2084,13 @@ function printCliHelp() {
|
|
|
2090
2084
|
" polterbase app link uru [--path <dir>] [--relink]",
|
|
2091
2085
|
" polterbase app migrate uru [push|lint|reset|local-reset] [--path <dir>] [--relink]",
|
|
2092
2086
|
" polterbase app configure uru [--path <dir>] [--yes]",
|
|
2093
|
-
" polterbase app install uru
|
|
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]",
|
|
2094
2089
|
"",
|
|
2095
2090
|
"Notes:",
|
|
2096
2091
|
" - App workflows stay separate from the generic Supabase interactive menu.",
|
|
2097
|
-
" - `install uru` resolves the latest GitHub release from polterware/uru by default.",
|
|
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.",
|
|
2098
2094
|
" - Use --artifact-url or POLTERBASE_URU_MACOS_ARTIFACT_URL to override the downloaded asset.",
|
|
2099
2095
|
" - Use POLTERBASE_URU_GITHUB_REPO=owner/repo to resolve releases from a different repository.",
|
|
2100
2096
|
""
|
|
@@ -2764,7 +2760,7 @@ async function findFirstAppBundle(dir) {
|
|
|
2764
2760
|
}
|
|
2765
2761
|
return void 0;
|
|
2766
2762
|
}
|
|
2767
|
-
async function
|
|
2763
|
+
async function deployMacosApp(context, options) {
|
|
2768
2764
|
const artifact = await resolveUruMacosArtifact(context.options);
|
|
2769
2765
|
const tempRoot = await mkdtemp(join4(tmpdir(), "polterbase-uru-"));
|
|
2770
2766
|
const archivePath = join4(tempRoot, artifact.fileName);
|
|
@@ -2798,6 +2794,11 @@ async function installMacosApp(context) {
|
|
|
2798
2794
|
const installDir = context.options.installDir ?? "/Applications";
|
|
2799
2795
|
mkdirSync(installDir, { recursive: true });
|
|
2800
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
|
+
}
|
|
2801
2802
|
if (existsSync3(destination)) {
|
|
2802
2803
|
const confirmed = context.options.yes || await promptConfirm(`Replace existing installation at ${destination}?`, false);
|
|
2803
2804
|
if (!confirmed) {
|
|
@@ -2813,15 +2814,38 @@ async function installMacosApp(context) {
|
|
|
2813
2814
|
process.cwd(),
|
|
2814
2815
|
"App copy failed."
|
|
2815
2816
|
);
|
|
2816
|
-
process.stdout.write(
|
|
2817
|
-
`)
|
|
2818
|
-
|
|
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
|
+
}
|
|
2819
2829
|
const shouldOpen = context.options.yes || await promptConfirm("Open Uru now?", true);
|
|
2820
2830
|
if (shouldOpen) {
|
|
2821
2831
|
await runOrThrow("open", ["-a", destination], process.cwd(), "Unable to open Uru.");
|
|
2822
2832
|
}
|
|
2823
2833
|
return 0;
|
|
2824
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
|
+
}
|
|
2825
2849
|
var uruProfile = {
|
|
2826
2850
|
id: "uru",
|
|
2827
2851
|
displayName: "Uru",
|
|
@@ -2847,10 +2871,9 @@ var uruProfile = {
|
|
|
2847
2871
|
case "configure":
|
|
2848
2872
|
return runConfigure(context);
|
|
2849
2873
|
case "install":
|
|
2850
|
-
if ((context.options.platform ?? "macos") !== "macos") {
|
|
2851
|
-
throw new Error("Only --platform macos is currently supported for Uru install.");
|
|
2852
|
-
}
|
|
2853
2874
|
return installMacosApp(context);
|
|
2875
|
+
case "update":
|
|
2876
|
+
return updateMacosApp(context);
|
|
2854
2877
|
case "migrate":
|
|
2855
2878
|
return runMigration(
|
|
2856
2879
|
context,
|
|
@@ -2869,7 +2892,7 @@ function getAppProfile(appId) {
|
|
|
2869
2892
|
// src/apps/runAppCli.ts
|
|
2870
2893
|
function assertAppCommand(options) {
|
|
2871
2894
|
if (!options.action || !options.app) {
|
|
2872
|
-
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>");
|
|
2873
2896
|
}
|
|
2874
2897
|
}
|
|
2875
2898
|
async function runAppCli(options) {
|