@palettelab/cli 0.3.6 → 0.3.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.
@@ -8,8 +8,8 @@ const { parseFlags } = require("../environments")
8
8
  const { resolveDevPorts } = require("../ports")
9
9
  const publish = require("./publish")
10
10
 
11
- const DEFAULT_IMAGE =
12
- process.env.PALETTE_DEV_IMAGE || "ghcr.io/palette-lab/platform-dev:latest"
11
+ const DEFAULT_PLATFORM_IMAGE = "ghcr.io/palette-lab/platform-dev:latest"
12
+ const DEFAULT_IMAGE = process.env.PALETTE_DEV_IMAGE || DEFAULT_PLATFORM_IMAGE
13
13
  const COMPOSE_FILE = path.resolve(__dirname, "..", "..", "platform-dev", "docker-compose.yml")
14
14
 
15
15
  function ensureDocker() {
@@ -38,6 +38,17 @@ function tryPullImage(image) {
38
38
  }
39
39
 
40
40
  function ensureImageAvailable(image) {
41
+ if (!process.env.PALETTE_DEV_IMAGE && image === DEFAULT_PLATFORM_IMAGE) {
42
+ const pulled = tryPullImage(image)
43
+ if (pulled.ok) return pulled
44
+ if (imageExistsLocally(image)) {
45
+ console.warn(
46
+ `[pltt] could not refresh ${image}; using the local cached image instead.`,
47
+ )
48
+ return { ok: true, output: pulled.output }
49
+ }
50
+ return pulled
51
+ }
41
52
  // Accept a locally-built image (e.g. `platform-dev:test` from `docker build`)
42
53
  // without attempting a registry pull — local is authoritative if present.
43
54
  if (imageExistsLocally(image)) return { ok: true, output: "" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palettelab/cli",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "Developer CLI for building Palette platform plugins — no platform source access required.",
5
5
  "bin": {
6
6
  "pltt": "bin/pltt.js"
@@ -21,6 +21,7 @@ services:
21
21
  JWT_SECRET: "dev-secret-do-not-use-in-prod"
22
22
  FRONTEND_URL: "http://localhost:${PALETTE_FRONTEND_PORT:-3000}"
23
23
  BACKEND_BASE_URL: "http://localhost:${PALETTE_BACKEND_PORT:-8000}"
24
+ NEXT_PUBLIC_API_URL: "http://localhost:${PALETTE_BACKEND_PORT:-8000}"
24
25
  STORAGE_BACKEND: "local"
25
26
  LOCAL_STORAGE_DIR: "/srv/storage"
26
27
  # Disable optional features that need real credentials