openpalm 0.9.2-rc2 → 0.9.2-rc3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openpalm",
3
- "version": "0.9.2-rc2",
3
+ "version": "0.9.2-rc3",
4
4
  "type": "module",
5
5
  "license": "MPL-2.0",
6
6
  "description": "OpenPalm CLI — install and manage a self-hosted OpenPalm stack",
@@ -24,7 +24,7 @@
24
24
  "build:windows-arm64": "bun build src/main.ts --compile --target=bun-windows-arm64 --outfile dist/openpalm-cli-windows-arm64.exe"
25
25
  },
26
26
  "dependencies": {
27
- "@openpalm/lib": "workspace:*",
27
+ "@openpalm/lib": "0.9.4",
28
28
  "citty": "^0.2.1"
29
29
  }
30
30
  }
@@ -0,0 +1,24 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+ import { buildDeployStatusEntries, buildInstallServiceNames } from './install-services.ts';
3
+
4
+ describe('install service helpers', () => {
5
+ it('appends admin services to managed services', () => {
6
+ expect(buildInstallServiceNames(['caddy', 'memory'])).toEqual([
7
+ 'caddy',
8
+ 'memory',
9
+ 'admin',
10
+ 'docker-socket-proxy',
11
+ ]);
12
+ });
13
+
14
+ it('builds deploy status entries for the full install service list', () => {
15
+ const services = buildInstallServiceNames(['caddy', 'memory']);
16
+
17
+ expect(buildDeployStatusEntries(services, 'pending', 'Waiting...')).toEqual([
18
+ { service: 'caddy', status: 'pending', label: 'Waiting...' },
19
+ { service: 'memory', status: 'pending', label: 'Waiting...' },
20
+ { service: 'admin', status: 'pending', label: 'Waiting...' },
21
+ { service: 'docker-socket-proxy', status: 'pending', label: 'Waiting...' },
22
+ ]);
23
+ });
24
+ });
@@ -0,0 +1,13 @@
1
+ export type DeployStatusState = 'pending' | 'pulling';
2
+
3
+ export function buildInstallServiceNames(managedServices: string[]): string[] {
4
+ return [...managedServices, 'admin', 'docker-socket-proxy'];
5
+ }
6
+
7
+ export function buildDeployStatusEntries(
8
+ services: string[],
9
+ status: DeployStatusState,
10
+ label: string,
11
+ ): Array<{ service: string; status: DeployStatusState; label: string }> {
12
+ return services.map(service => ({ service, status, label }));
13
+ }
@@ -12,6 +12,7 @@ import { detectHostInfo } from '../lib/host-info.ts';
12
12
  import { loadAdminToken } from '../lib/env.ts';
13
13
  import { ensureStagedState, fullComposeArgs, buildManagedServiceNames } from '../lib/staging.ts';
14
14
  import { createSetupServer } from '../setup-wizard/server.ts';
15
+ import { buildInstallServiceNames, buildDeployStatusEntries } from './install-services.ts';
15
16
 
16
17
  const DEFAULT_INSTALL_REF = cliPkg.version ? `v${cliPkg.version}` : 'main';
17
18
  const SETUP_WIZARD_PORT = 8100;
@@ -220,27 +221,24 @@ export async function bootstrapInstall(options: InstallOptions): Promise<void> {
220
221
  const state = await ensureStagedState();
221
222
  const composeArgs = fullComposeArgs(state);
222
223
  const managedServices = buildManagedServiceNames(state);
224
+ const allServices = buildInstallServiceNames(managedServices);
223
225
 
224
- wizard.updateDeployStatus(
225
- managedServices.map(s => ({ service: s, status: 'pending', label: 'Waiting...' })),
226
- );
226
+ wizard.updateDeployStatus(buildDeployStatusEntries(allServices, 'pending', 'Waiting...'));
227
227
 
228
- await runDockerCompose([...composeArgs, 'pull', ...managedServices]).catch(() => {
228
+ await runDockerCompose([...composeArgs, '--profile', 'admin', 'pull', ...allServices]).catch(() => {
229
229
  // Pull failure is non-fatal — images may already be cached
230
230
  });
231
231
 
232
- wizard.updateDeployStatus(
233
- managedServices.map(s => ({ service: s, status: 'pulling', label: 'Starting...' })),
234
- );
232
+ wizard.updateDeployStatus(buildDeployStatusEntries(allServices, 'pulling', 'Starting...'));
235
233
 
236
- await runDockerCompose([...composeArgs, 'up', '-d', ...managedServices]);
234
+ await runDockerCompose([...composeArgs, '--profile', 'admin', 'up', '-d', ...allServices]);
237
235
 
238
236
  wizard.markAllRunning();
239
237
 
240
238
  console.log(JSON.stringify({
241
239
  ok: true,
242
240
  mode: 'install',
243
- services: managedServices,
241
+ services: allServices,
244
242
  }, null, 2));
245
243
 
246
244
  // Give the browser a moment to poll the final status, then stop
@@ -264,12 +262,13 @@ export async function bootstrapInstall(options: InstallOptions): Promise<void> {
264
262
  const state = await ensureStagedState();
265
263
  const composeArgs = fullComposeArgs(state);
266
264
  const managedServices = buildManagedServiceNames(state);
265
+ const allServices = buildInstallServiceNames(managedServices);
267
266
 
268
- await runDockerCompose([...composeArgs, 'up', '-d', ...managedServices]);
267
+ await runDockerCompose([...composeArgs, '--profile', 'admin', 'up', '-d', ...allServices]);
269
268
 
270
269
  console.log(JSON.stringify({
271
270
  ok: true,
272
271
  mode: 'update',
273
- services: managedServices,
272
+ services: allServices,
274
273
  }, null, 2));
275
274
  }
@@ -16,8 +16,8 @@ export default defineCommand({
16
16
  },
17
17
  'with-admin': {
18
18
  type: 'boolean',
19
- description: 'Include admin UI and docker-socket-proxy',
20
- default: false,
19
+ description: 'Include admin UI and docker-socket-proxy (use --no-with-admin to skip)',
20
+ default: true,
21
21
  },
22
22
  },
23
23
  async run({ args }) {