@palettelab/cli 0.3.2 → 0.3.3

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 CHANGED
@@ -47,6 +47,7 @@ Boot the platform locally with your plugin mounted live. Run this from inside yo
47
47
 
48
48
  ```bash
49
49
  pltt dev
50
+ pltt dev --cloud --env staging
50
51
  ```
51
52
 
52
53
  Under the hood this runs `docker compose up` with a bundled compose file. It starts:
@@ -58,6 +59,8 @@ Under the hood this runs `docker compose up` with a bundled compose file. It sta
58
59
 
59
60
  Your plugin directory is mounted into the container at `/plugins/<your-id>`. Edits to your frontend/backend sources hot-reload.
60
61
 
62
+ `pltt dev --cloud` skips Docker and publishes a reviewable preview to a configured cloud sandbox. It defaults to `--env staging` unless `--env` or `PALETTE_ENV` is set.
63
+
61
64
  Environment variables:
62
65
 
63
66
  | Name | Default | Purpose |
@@ -120,7 +123,7 @@ pltt publish --env production -y
120
123
  pltt publish --env staging --json
121
124
  ```
122
125
 
123
- Publishing bundles frontend/backend artifacts, uploads them, creates a `pending_review` publish record, and prints review/preview URLs when the platform returns them.
126
+ Publishing first runs the same contract checks as `pltt test`. If preflight passes, it bundles frontend/backend artifacts, uploads them, creates a `pending_review` publish record, and prints review/preview URLs when the platform returns them.
124
127
 
125
128
  Environment config is read from `./palette.config.json`, `~/.palette/config.json`, or `PALETTE_<ENV>_URL` plus `PALETTE_<ENV>_TOKEN` / `PALETTE_PUBLISH_TOKEN`.
126
129
 
@@ -165,6 +168,6 @@ If no plugin ID is provided, the CLI uses the current `palette-plugin.json` or `
165
168
 
166
169
  ## See also
167
170
 
168
- - `@palettelab/sdk` on GitHub Packages — frontend hooks and types
171
+ - `@palettelab/sdk` on npm — frontend hooks and types
169
172
  - `palette-sdk` (git-installed from [palette-lab/virtual-organisation](https://github.com/palette-lab/virtual-organisation/tree/main/sdk/backend)) — backend `PluginRouter` + `ToolDefinition`
170
173
  - [Developer Guide](https://github.com/palette-lab/virtual-organisation/blob/main/sdk/DEVELOPER_GUIDE.md)
package/lib/bundler.js CHANGED
@@ -101,14 +101,14 @@ async function watchFrontend(pluginDir, entry, outfile) {
101
101
  setup(build) {
102
102
  build.onEnd((result) => {
103
103
  if (result.errors.length) {
104
- console.error("[palette] frontend bundle failed:")
104
+ console.error("[pltt] frontend bundle failed:")
105
105
  for (const err of result.errors) {
106
106
  console.error(` - ${err.text}`)
107
107
  }
108
108
  return
109
109
  }
110
110
  const size = fs.existsSync(outfile) ? fs.statSync(outfile).size : 0
111
- console.log(`[palette] frontend bundle ready (${size} bytes)`)
111
+ console.log(`[pltt] frontend bundle ready (${size} bytes)`)
112
112
  })
113
113
  },
114
114
  },
package/lib/cli.js CHANGED
@@ -49,6 +49,8 @@ function printHelp() {
49
49
  console.log("\nPublish flags:")
50
50
  console.log(" --env <name> Target environment from ~/.palette/config.json (default: local)")
51
51
  console.log(" -y, --yes Skip interactive confirmation for production pushes")
52
+ console.log("\nDev flags:")
53
+ console.log(" --cloud Publish a reviewable preview to a configured cloud sandbox")
52
54
  console.log("\nInit flags:")
53
55
  console.log(" --template <name> One of: dashboard, agent-tool, external-service, database, frontend-only")
54
56
  console.log("\nLogs flags:")
@@ -93,11 +93,11 @@ async function run(args, { cwd }) {
93
93
  }
94
94
 
95
95
  if (errors.length) {
96
- console.error("[palette] validation failed:")
96
+ console.error("[pltt] validation failed:")
97
97
  for (const e of errors) console.error(` - ${e}`)
98
98
  process.exit(1)
99
99
  }
100
- console.log(`[palette] ok — ${manifest.id} v${manifest.version}`)
100
+ console.log(`[pltt] ok — ${manifest.id} v${manifest.version}`)
101
101
  }
102
102
 
103
103
  module.exports = run
@@ -4,6 +4,8 @@ const path = require("path")
4
4
  const { spawn, spawnSync } = require("child_process")
5
5
  const { loadManifest } = require("../manifest")
6
6
  const { watchFrontend } = require("../bundler")
7
+ const { parseFlags } = require("../environments")
8
+ const publish = require("./publish")
7
9
 
8
10
  const DEFAULT_IMAGE =
9
11
  process.env.PALETTE_DEV_IMAGE || "ghcr.io/palette-lab/platform-dev:latest"
@@ -39,6 +41,22 @@ function ensureImageAvailable(image) {
39
41
  }
40
42
 
41
43
  async function run(args, { cwd }) {
44
+ const { flags, rest } = parseFlags(args)
45
+ const cloud = rest.includes("--cloud")
46
+ if (cloud) {
47
+ const publishArgs = []
48
+ if (flags.env) publishArgs.push("--env", flags.env)
49
+ if (flags.yes) publishArgs.push("--yes")
50
+ if (args.includes("--json")) publishArgs.push("--json")
51
+ if (!flags.env && !process.env.PALETTE_ENV) publishArgs.push("--env", "staging")
52
+ console.log(
53
+ "[pltt] cloud dev publishes a reviewable preview to the configured cloud sandbox.",
54
+ )
55
+ console.log("[pltt] use `pltt status <publish-id>` after upload to track review state.")
56
+ await publish(publishArgs, { cwd })
57
+ return
58
+ }
59
+
42
60
  const manifest = loadManifest(cwd)
43
61
  const pluginId = manifest.id
44
62
  const frontendEntry = manifest.frontend?.entry || "./frontend/src/index.tsx"
@@ -48,25 +66,25 @@ async function run(args, { cwd }) {
48
66
 
49
67
  let frontendWatcher = null
50
68
  if (manifest.frontend?.entry) {
51
- console.log(`[palette] bundling frontend ${frontendEntry} → .palette/dist/frontend.mjs`)
69
+ console.log(`[pltt] bundling frontend ${frontendEntry} → .palette/dist/frontend.mjs`)
52
70
  try {
53
71
  frontendWatcher = await watchFrontend(cwd, frontendEntry, frontendBundle)
54
72
  } catch (err) {
55
73
  console.error(
56
- `[palette] could not start frontend bundler: ${
74
+ `[pltt] could not start frontend bundler: ${
57
75
  err instanceof Error ? err.message : String(err)
58
76
  }`,
59
77
  )
60
78
  process.exit(1)
61
79
  }
62
80
  } else {
63
- console.log("[palette] manifest has no frontend entry; skipping frontend bundler")
81
+ console.log("[pltt] manifest has no frontend entry; skipping frontend bundler")
64
82
  }
65
83
 
66
- console.log(`[palette] starting ${DEFAULT_IMAGE} via docker compose`)
67
- console.log(`[palette] mounting ${cwd} → /plugins/${pluginId}`)
68
- console.log(`[palette] frontend: http://localhost:${FRONTEND_PORT}/apps/${pluginId}`)
69
- console.log(`[palette] backend: http://localhost:${BACKEND_PORT}/api/v1/plugins/${pluginId}`)
84
+ console.log(`[pltt] starting ${DEFAULT_IMAGE} via docker compose`)
85
+ console.log(`[pltt] mounting ${cwd} → /plugins/${pluginId}`)
86
+ console.log(`[pltt] frontend: http://localhost:${FRONTEND_PORT}/apps/${pluginId}`)
87
+ console.log(`[pltt] backend: http://localhost:${BACKEND_PORT}/api/v1/plugins/${pluginId}`)
70
88
 
71
89
  // Pre-pull so we can give a useful error if the image isn't reachable
72
90
  // (common cause: maintainer hasn't pushed it yet, or `docker login ghcr.io`
@@ -74,7 +92,7 @@ async function run(args, { cwd }) {
74
92
  if (!ensureImageAvailable(DEFAULT_IMAGE)) {
75
93
  if (frontendWatcher) await frontendWatcher.dispose()
76
94
  console.error(
77
- `\n[palette] could not pull ${DEFAULT_IMAGE}.\n` +
95
+ `\n[pltt] could not pull ${DEFAULT_IMAGE}.\n` +
78
96
  ` Most common causes:\n` +
79
97
  ` • The image hasn't been published to the registry yet.\n` +
80
98
  ` Platform maintainers: see docker/platform-dev/README.md for the build + push flow.\n` +
@@ -134,10 +134,10 @@ async function run(args, { cwd }) {
134
134
  }
135
135
 
136
136
  if (failures > 0) {
137
- console.log(`\n[palette] doctor found ${failures} blocking issue(s).`)
137
+ console.log(`\n[pltt] doctor found ${failures} blocking issue(s).`)
138
138
  process.exit(1)
139
139
  }
140
- console.log("\n[palette] doctor passed.")
140
+ console.log("\n[pltt] doctor passed.")
141
141
  }
142
142
 
143
143
  module.exports = run
@@ -72,13 +72,13 @@ async function run(args, { cwd }) {
72
72
  const name = positional[0]
73
73
  if (!name) {
74
74
  console.error("[pltt] usage: pltt init <plugin-name> [--template <name>]")
75
- console.error(`[palette] templates: ${KNOWN_TEMPLATES.join(", ")}`)
75
+ console.error(`[pltt] templates: ${KNOWN_TEMPLATES.join(", ")}`)
76
76
  process.exit(1)
77
77
  }
78
78
  const template = getOpt(args, "--template")
79
79
  if (template && !KNOWN_TEMPLATES.includes(template)) {
80
- console.error(`[palette] unknown template: ${template}`)
81
- console.error(`[palette] templates: ${KNOWN_TEMPLATES.join(", ")}`)
80
+ console.error(`[pltt] unknown template: ${template}`)
81
+ console.error(`[pltt] templates: ${KNOWN_TEMPLATES.join(", ")}`)
82
82
  process.exit(1)
83
83
  }
84
84
  const slug = toSlug(name)
@@ -87,25 +87,25 @@ async function run(args, { cwd }) {
87
87
  .replace(/\b\w/g, (c) => c.toUpperCase())
88
88
  const destDir = path.join(cwd, slug)
89
89
  if (fs.existsSync(destDir)) {
90
- console.error(`[palette] directory already exists: ${destDir}`)
90
+ console.error(`[pltt] directory already exists: ${destDir}`)
91
91
  process.exit(1)
92
92
  }
93
93
 
94
94
  if (template) {
95
- console.log(`[palette] creating plugin "${slug}" from template "${template}"`)
95
+ console.log(`[pltt] creating plugin "${slug}" from template "${template}"`)
96
96
  } else {
97
- console.log(`[palette] creating plugin "${slug}" from ${TEMPLATE_REPO}@${TEMPLATE_REF}`)
97
+ console.log(`[pltt] creating plugin "${slug}" from ${TEMPLATE_REPO}@${TEMPLATE_REF}`)
98
98
  }
99
99
 
100
100
  const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "palette-tpl-"))
101
101
  let ok = false
102
102
  if (!template) {
103
103
  ok = fetchTemplate(tmp)
104
- if (!ok) console.warn("[palette] git clone failed, falling back to bundled template")
104
+ if (!ok) console.warn("[pltt] git clone failed, falling back to bundled template")
105
105
  }
106
106
  if (!ok) ok = copyLocalFallback(tmp, template)
107
107
  if (!ok) {
108
- console.error("[palette] no template available")
108
+ console.error("[pltt] no template available")
109
109
  process.exit(1)
110
110
  }
111
111
 
@@ -113,8 +113,8 @@ async function run(args, { cwd }) {
113
113
  fs.rmSync(tmp, { recursive: true, force: true })
114
114
  rewriteManifest(destDir, slug, displayName)
115
115
 
116
- console.log(`[palette] created ${destDir}`)
117
- console.log("[palette] next steps:")
116
+ console.log(`[pltt] created ${destDir}`)
117
+ console.log("[pltt] next steps:")
118
118
  console.log(` cd ${slug}`)
119
119
  console.log(` npx @palettelab/cli dev`)
120
120
  console.log(` # or, after global install: pltt dev`)
@@ -50,7 +50,7 @@ async function run(argv, { cwd }) {
50
50
  }
51
51
  }
52
52
  if (!pluginId) {
53
- console.error("[palette] no plugin id provided and no manifest found.")
53
+ console.error("[pltt] no plugin id provided and no manifest found.")
54
54
  process.exit(1)
55
55
  }
56
56
 
@@ -60,11 +60,11 @@ async function run(argv, { cwd }) {
60
60
  try {
61
61
  env = resolveEnvironment({ cwd, flags })
62
62
  } catch (err) {
63
- console.error(`[palette] ${err.message}`)
63
+ console.error(`[pltt] ${err.message}`)
64
64
  process.exit(1)
65
65
  }
66
66
  if (!env.token) {
67
- console.error(`[palette] no publish token for "${env.name}". set $${env.token_env}.`)
67
+ console.error(`[pltt] no publish token for "${env.name}". set $${env.token_env}.`)
68
68
  process.exit(1)
69
69
  }
70
70
 
@@ -74,7 +74,7 @@ async function run(argv, { cwd }) {
74
74
  try {
75
75
  data = await fetchLogs(env, pluginId, tail)
76
76
  } catch (err) {
77
- console.error(`[palette] ${err.message}`)
77
+ console.error(`[pltt] ${err.message}`)
78
78
  process.exit(1)
79
79
  }
80
80
  const events = data.events || []
@@ -15,7 +15,7 @@ async function run(argv, { cwd }) {
15
15
  const manifest = loadManifest(cwd)
16
16
  const errors = validateManifest(manifest)
17
17
  if (errors.length) {
18
- console.error("[palette] manifest invalid:")
18
+ console.error("[pltt] manifest invalid:")
19
19
  for (const e of errors) console.error(` - ${e}`)
20
20
  process.exit(1)
21
21
  }
@@ -41,7 +41,7 @@ async function run(argv, { cwd }) {
41
41
  const { spawnSync } = require("child_process")
42
42
  const r = spawnSync("tar", ["-czf", out, "-C", stage, "."], { stdio: "inherit" })
43
43
  if (r.status !== 0) {
44
- console.error("[palette] tar failed")
44
+ console.error("[pltt] tar failed")
45
45
  process.exit(1)
46
46
  }
47
47
 
@@ -56,8 +56,8 @@ async function run(argv, { cwd }) {
56
56
  if (json) {
57
57
  console.log(JSON.stringify(result, null, 2))
58
58
  } else {
59
- console.log(`[palette] packaged ${manifest.id}@${manifest.version} → ${out} (${buf.length} bytes)`)
60
- console.log(`[palette] sha256: ${result.sha256}`)
59
+ console.log(`[pltt] packaged ${manifest.id}@${manifest.version} → ${out} (${buf.length} bytes)`)
60
+ console.log(`[pltt] sha256: ${result.sha256}`)
61
61
  }
62
62
  }
63
63
 
@@ -3,6 +3,7 @@
3
3
  const crypto = require("crypto")
4
4
  const fs = require("fs")
5
5
  const path = require("path")
6
+ const { spawnSync } = require("child_process")
6
7
  const { loadManifest, validateManifest } = require("../manifest")
7
8
  const { bundleFrontend, bundleBackend } = require("../bundler")
8
9
  const {
@@ -15,6 +16,35 @@ function sha256(buf) {
15
16
  return crypto.createHash("sha256").update(buf).digest("hex")
16
17
  }
17
18
 
19
+ function runPreflight(cwd, json) {
20
+ const cliBin = path.resolve(__dirname, "..", "..", "bin", "pltt.js")
21
+ const res = spawnSync(process.execPath, [cliBin, "test", "--json"], {
22
+ cwd,
23
+ encoding: "utf8",
24
+ env: process.env,
25
+ })
26
+
27
+ if (res.status === 0) {
28
+ if (!json) console.log("[pltt] preflight contract tests passed")
29
+ return
30
+ }
31
+
32
+ const output = `${res.stdout || ""}${res.stderr || ""}`.trim()
33
+ if (json) {
34
+ let payload = null
35
+ try {
36
+ payload = JSON.parse(res.stdout)
37
+ } catch {
38
+ payload = { ok: false, error: output || "pltt test failed" }
39
+ }
40
+ console.log(JSON.stringify({ ok: false, stage: "preflight", test: payload }, null, 2))
41
+ } else {
42
+ console.error("[pltt] preflight contract tests failed; publish cancelled.")
43
+ if (output) console.error(output)
44
+ }
45
+ process.exit(res.status || 1)
46
+ }
47
+
18
48
  function makeApi(env) {
19
49
  return async function api(pathname, { method = "GET", body, headers = {} } = {}) {
20
50
  const url = `${env.url}${pathname}`
@@ -54,13 +84,13 @@ async function run(argv, { cwd }) {
54
84
  try {
55
85
  env = resolveEnvironment({ cwd, flags })
56
86
  } catch (err) {
57
- console.error(`[palette] ${err.message}`)
87
+ console.error(`[pltt] ${err.message}`)
58
88
  process.exit(1)
59
89
  }
60
90
 
61
91
  if (!env.token) {
62
92
  console.error(
63
- `[palette] no publish token for environment "${env.name}". ` +
93
+ `[pltt] no publish token for environment "${env.name}". ` +
64
94
  `Set $${env.token_env} (or $PALETTE_PUBLISH_TOKEN as fallback).\n` +
65
95
  ` Ask a superadmin to mint one via POST ${env.url}/api/superadmin/publish-tokens.`,
66
96
  )
@@ -70,7 +100,7 @@ async function run(argv, { cwd }) {
70
100
  if (env.production_unconfirmed) {
71
101
  const ok = await confirmProduction(env)
72
102
  if (!ok) {
73
- console.error("[palette] publish cancelled.")
103
+ console.error("[pltt] publish cancelled.")
74
104
  process.exit(1)
75
105
  }
76
106
  }
@@ -78,32 +108,34 @@ async function run(argv, { cwd }) {
78
108
  const manifest = loadManifest(cwd)
79
109
  const errors = validateManifest(manifest)
80
110
  if (errors.length) {
81
- console.error("[palette] manifest invalid:")
111
+ console.error("[pltt] manifest invalid:")
82
112
  for (const e of errors) console.error(` - ${e}`)
83
113
  process.exit(1)
84
114
  }
85
115
 
116
+ runPreflight(cwd, flags.json)
117
+
86
118
  console.log(
87
- `[palette] publishing ${manifest.id}@${manifest.version} → ${env.name} (${env.url})`,
119
+ `[pltt] publishing ${manifest.id}@${manifest.version} → ${env.name} (${env.url})`,
88
120
  )
89
121
 
90
122
  let frontend = null
91
123
  if (manifest.frontend?.entry) {
92
- console.log("[palette] bundling frontend")
124
+ console.log("[pltt] bundling frontend")
93
125
  frontend = await bundleFrontend(cwd, manifest.frontend.entry)
94
- console.log(`[palette] ${frontend.length} bytes`)
126
+ console.log(`[pltt] ${frontend.length} bytes`)
95
127
  } else {
96
- console.log("[palette] no frontend declared")
128
+ console.log("[pltt] no frontend declared")
97
129
  }
98
130
 
99
- console.log("[palette] bundling backend")
131
+ console.log("[pltt] bundling backend")
100
132
  const backend = await bundleBackend(cwd)
101
- console.log(`[palette] ${backend.length} bytes`)
133
+ console.log(`[pltt] ${backend.length} bytes`)
102
134
 
103
135
  const backendSha = sha256(backend)
104
136
  const api = makeApi(env)
105
137
 
106
- console.log("[palette] requesting signed URLs")
138
+ console.log("[pltt] requesting signed URLs")
107
139
  const signed = await api("/api/v1/appstore/sign-upload", {
108
140
  method: "POST",
109
141
  body: {
@@ -113,7 +145,7 @@ async function run(argv, { cwd }) {
113
145
  },
114
146
  })
115
147
 
116
- console.log("[palette] uploading")
148
+ console.log("[pltt] uploading")
117
149
  const uploads = [
118
150
  put(signed.backend_upload_url, backend, "application/gzip"),
119
151
  put(
@@ -127,7 +159,7 @@ async function run(argv, { cwd }) {
127
159
  }
128
160
  await Promise.all(uploads)
129
161
 
130
- console.log("[palette] finalizing")
162
+ console.log("[pltt] finalizing")
131
163
  const record = await api("/api/v1/appstore/publish", {
132
164
  method: "POST",
133
165
  body: {
@@ -168,16 +200,16 @@ async function run(argv, { cwd }) {
168
200
  }
169
201
 
170
202
  console.log(
171
- `[palette] published ${record.plugin_id}@${record.version} (status=${record.status})`,
203
+ `[pltt] published ${record.plugin_id}@${record.version} (status=${record.status})`,
172
204
  )
173
- console.log(`[palette] awaiting superadmin review on ${env.url}`)
205
+ console.log(`[pltt] awaiting superadmin review on ${env.url}`)
174
206
  if (record.review_url) {
175
- console.log(`[palette] review queue: ${record.review_url}`)
207
+ console.log(`[pltt] review queue: ${record.review_url}`)
176
208
  }
177
209
  if (record.preview_url) {
178
- console.log(`[palette] preview: ${record.preview_url}`)
210
+ console.log(`[pltt] preview: ${record.preview_url}`)
179
211
  }
180
- console.log(`[palette] once approved, live at ${env.url}${record.catalog_url}`)
212
+ console.log(`[pltt] once approved, live at ${env.url}${record.catalog_url}`)
181
213
  }
182
214
 
183
215
  module.exports = run
@@ -22,7 +22,7 @@ async function run(argv, { cwd }) {
22
22
 
23
23
  if (!publishId) {
24
24
  console.error(
25
- "[palette] no publish id provided and no .palette/last-publish.json found.",
25
+ "[pltt] no publish id provided and no .palette/last-publish.json found.",
26
26
  )
27
27
  console.error(" usage: pltt status <publish-id> [--env <name>]")
28
28
  process.exit(1)
@@ -35,13 +35,13 @@ async function run(argv, { cwd }) {
35
35
  try {
36
36
  env = resolveEnvironment({ cwd, flags })
37
37
  } catch (err) {
38
- console.error(`[palette] ${err.message}`)
38
+ console.error(`[pltt] ${err.message}`)
39
39
  process.exit(1)
40
40
  }
41
41
 
42
42
  if (!env.token) {
43
43
  console.error(
44
- `[palette] no publish token for environment "${env.name}". set $${env.token_env}.`,
44
+ `[pltt] no publish token for environment "${env.name}". set $${env.token_env}.`,
45
45
  )
46
46
  process.exit(1)
47
47
  }
@@ -52,7 +52,7 @@ async function run(argv, { cwd }) {
52
52
  })
53
53
  if (!res.ok) {
54
54
  const text = await res.text()
55
- console.error(`[palette] GET ${url} → ${res.status}: ${text}`)
55
+ console.error(`[pltt] GET ${url} → ${res.status}: ${text}`)
56
56
  process.exit(1)
57
57
  }
58
58
  const data = await res.json()
@@ -62,7 +62,7 @@ async function run(argv, { cwd }) {
62
62
  return
63
63
  }
64
64
 
65
- console.log(`[palette] ${data.plugin_id}@${data.version}`)
65
+ console.log(`[pltt] ${data.plugin_id}@${data.version}`)
66
66
  console.log(` status: ${data.status}`)
67
67
  if (data.review_decision) console.log(` decision: ${data.review_decision}`)
68
68
  if (data.review_reason) console.log(` reason: ${data.review_reason}`)
@@ -365,12 +365,12 @@ async function run(args, { cwd }) {
365
365
  if (json) {
366
366
  console.log(JSON.stringify({ ok: false, failures, results }, null, 2))
367
367
  } else {
368
- console.log(`\n[palette] test failed with ${failures} issue(s).`)
368
+ console.log(`\n[pltt] test failed with ${failures} issue(s).`)
369
369
  }
370
370
  process.exit(1)
371
371
  }
372
372
  if (json) console.log(JSON.stringify({ ok: true, failures: 0, results }, null, 2))
373
- else console.log("\n[palette] test passed.")
373
+ else console.log("\n[pltt] test passed.")
374
374
  }
375
375
 
376
376
  module.exports = run
@@ -52,7 +52,7 @@ function readJsonIfExists(p) {
52
52
  if (!fs.existsSync(p)) return null
53
53
  return JSON.parse(fs.readFileSync(p, "utf8"))
54
54
  } catch (err) {
55
- console.error(`[palette] failed to parse ${p}: ${err.message}`)
55
+ console.error(`[pltt] failed to parse ${p}: ${err.message}`)
56
56
  return null
57
57
  }
58
58
  }
@@ -152,7 +152,7 @@ async function confirmProduction(env) {
152
152
  const readline = require("readline")
153
153
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout })
154
154
  rl.question(
155
- `\n[palette] You are about to publish to PRODUCTION (${env.url}).\n` +
155
+ `\n[pltt] You are about to publish to PRODUCTION (${env.url}).\n` +
156
156
  ` Type the environment name ("${env.name}") to confirm, anything else cancels: `,
157
157
  (answer) => {
158
158
  rl.close()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palettelab/cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Developer CLI for building Palette platform plugins — no platform source access required.",
5
5
  "bin": {
6
6
  "pltt": "bin/pltt.js"
@@ -22,7 +22,7 @@
22
22
  "esbuild": "^0.24.0"
23
23
  },
24
24
  "publishConfig": {
25
- "registry": "https://npm.pkg.github.com"
25
+ "registry": "https://registry.npmjs.org"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",