@unbound-app/cli 2.0.0 → 2.1.1

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/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- import { $ as ASSET_NAME_PATTERN, A as readIcuMessage, E as writeLocaleTypings, F as formatDiagnostic, H as withoutFullStop, I as isDiagnostic, J as LOCALES_DIRECTORY, M as findFile, O as buildReportSchema, P as diagnostic, U as bytecodeFileName, V as sortDiagnostics, X as SOURCE_LOCALE, Y as LOCALE_CODE_PATTERN, Z as isLocaleCode, _ as formatBytes, at as __commonJSMin, b as LOCALE_TYPINGS, ct as __require, et as ASSET_SCALES, it as ADDON_KINDS, j as IcuSyntaxError, k as readIcuArguments, p as BUILD_REPORT_ENV, q as listAddonFiles, t as SETTINGS_TYPINGS, tt as ASSET_TYPES, ut as __toESM, y as LOCALE_MODULE } from "./settings-typings-D39KwaWs.mjs";
2
+ import { $ as SOURCE_LOCALE, A as readIcuMessage, E as writeLocaleTypings, F as findFile, G as withoutFullStop, K as bytecodeFileName, L as diagnostic, M as Visitor, N as parseSync, O as buildReportSchema, Q as LOCALE_CODE_PATTERN, R as formatDiagnostic, W as sortDiagnostics, X as listAddonFiles, Z as LOCALES_DIRECTORY, _ as formatBytes, b as LOCALE_TYPINGS, ct as __commonJSMin, dt as __require, et as isLocaleCode, it as ASSET_TYPES, j as IcuSyntaxError, k as readIcuArguments, nt as ASSET_NAME_PATTERN, p as BUILD_REPORT_ENV, pt as __toESM, rt as ASSET_SCALES, st as ADDON_KINDS, t as SETTINGS_TYPINGS, y as LOCALE_MODULE, z as isDiagnostic } from "./settings-typings-BSBbM6c9.mjs";
3
3
  import { cli, command } from "cleye";
4
4
  import { closeSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
5
5
  import { availableParallelism, homedir, tmpdir } from "node:os";
@@ -15,13 +15,11 @@ import { createHash } from "node:crypto";
15
15
  import { CONTROLLER_ENDPOINT_MARKER, DEFAULT_BRIDGE_PORT, DEFAULT_EVAL_TIMEOUT_MS, MAX_EVAL_TIMEOUT_MS } from "@unbound-app/debugger-protocol";
16
16
  import { ControllerClient } from "@unbound-app/debugger-protocol/controller";
17
17
  import pc from "picocolors";
18
- import { Visitor, parseSync } from "rolldown/utils";
19
18
  import { Lexer, walkTokens } from "marked";
20
19
  import { rgbaToThumbHash } from "thumbhash";
21
- import sharp from "sharp";
22
20
  import { gzipSync } from "node:zlib";
23
21
  import blockScoping from "@babel/plugin-transform-block-scoping";
24
- import { transformSync as transformSync$1 } from "@babel/core";
22
+ import { transformSync } from "@babel/core";
25
23
  import { connect } from "node:net";
26
24
  import MagicString from "magic-string";
27
25
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
@@ -30,7 +28,6 @@ import { createAuthClient } from "better-auth/client";
30
28
  import { pathToFileURL } from "node:url";
31
29
  import { cancel, confirm, intro, isCancel, note, outro, select, text } from "@clack/prompts";
32
30
  import { isUtf8 } from "node:buffer";
33
- import { rollup } from "rollup";
34
31
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
35
32
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
36
33
  import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
@@ -679,10 +676,10 @@ const addonAssetSchema = Type$2.Object({
679
676
  minimum: 1,
680
677
  maximum: 16384
681
678
  }),
682
- scales: Type$2.Record(Type$2.Enum(ASSET_SCALES), Type$2.String({
679
+ scales: Type$2.Partial(Type$2.Record(Type$2.Enum(ASSET_SCALES), Type$2.String({
683
680
  pattern: "^[\\da-f]{64}$",
684
681
  errorMessage: "Must be a lowercase SHA-256 digest."
685
- }), {
682
+ })), {
686
683
  additionalProperties: false,
687
684
  minProperties: 1
688
685
  })
@@ -164169,8 +164166,11 @@ function checkFormat(kind, extension, probe) {
164169
164166
  if (kind === "video" && codecs && !codecs.includes(probe.codec ?? "")) return `uses the ${probe.codec} codec; a .${extension} video must use ${codecs.join(", ")}.`;
164170
164167
  if (kind === "video" && !(probe.duration && probe.duration > 0)) return "has no length; a video must play for longer than zero seconds.";
164171
164168
  }
164169
+ async function loadSharp() {
164170
+ return (await import("sharp")).default;
164171
+ }
164172
164172
  async function probeImage(file) {
164173
- const metadata = await sharp(file).metadata();
164173
+ const metadata = await (await loadSharp())(file).metadata();
164174
164174
  const height = metadata.pageHeight ?? metadata.height;
164175
164175
  const rotated = (metadata.orientation ?? 1) >= 5;
164176
164176
  return {
@@ -164180,7 +164180,7 @@ async function probeImage(file) {
164180
164180
  };
164181
164181
  }
164182
164182
  async function readImagePixels(file) {
164183
- const { data, info } = await sharp(file).rotate().resize(THUMBHASH_SIZE, THUMBHASH_SIZE, {
164183
+ const { data, info } = await (await loadSharp())(file).rotate().resize(THUMBHASH_SIZE, THUMBHASH_SIZE, {
164184
164184
  fit: "inside",
164185
164185
  withoutEnlargement: true
164186
164186
  }).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
@@ -164765,7 +164765,7 @@ const restoreCommand = {
164765
164765
  */
164766
164766
  function lowerForHermes(code) {
164767
164767
  try {
164768
- return transformSync$1(code, {
164768
+ return transformSync(code, {
164769
164769
  babelrc: false,
164770
164770
  configFile: false,
164771
164771
  sourceType: "script",
@@ -165843,6 +165843,8 @@ async function runProfile(client, input) {
165843
165843
  const LISTEN_TIMEOUT_MS = 15e3;
165844
165844
  const LISTEN_POLL_MS = 250;
165845
165845
  const LOOKUP_TIMEOUT_MS = 5e3;
165846
+ /** The unlisted command a compiled `ubd` runs the bridge under, since it has no Bun to run it with. */
165847
+ const SERVE_BRIDGE_COMMAND = "serve-bridge";
165846
165848
  function isListening(port) {
165847
165849
  return new Promise((resolve) => {
165848
165850
  const socket = connect({
@@ -165885,9 +165887,9 @@ function bridgeLogPath(port) {
165885
165887
  function startDetached(port) {
165886
165888
  const log = bridgeLogPath(port);
165887
165889
  const output = openSync(log, "a");
165888
- const entry = Bun.resolveSync("@unbound-app/debugger", import.meta.dir);
165889
- spawn("bun", [
165890
- entry,
165890
+ const [command, args] = Bun.isStandaloneExecutable ? [process.execPath, [SERVE_BRIDGE_COMMAND]] : ["bun", [Bun.resolveSync("@unbound-app/debugger", import.meta.dir)]];
165891
+ spawn(command, [
165892
+ ...args,
165891
165893
  "--port",
165892
165894
  String(port)
165893
165895
  ], {
@@ -169880,6 +169882,7 @@ async function checkModuleGraph(dir, cache) {
169880
169882
  function record(id, found) {
169881
169883
  fresh.set(id, [...fresh.get(id) ?? [], ...found]);
169882
169884
  }
169885
+ const { rollup } = await import("rollup");
169883
169886
  const [next] = await Promise.all((await loadOptions(join(dir, CONFIG_FILE$1))).map(async (options, index) => {
169884
169887
  try {
169885
169888
  const bundle = await rollup({
@@ -170808,6 +170811,19 @@ function mcpTools() {
170808
170811
  })));
170809
170812
  return [...root, ...grouped].filter((tool) => tool.definition.mcp);
170810
170813
  }
170814
+ /**
170815
+ * @description Lists every command with the group words before its name, for `ubd catalog`.
170816
+ * @returns The root commands, then each group's, in menu order.
170817
+ */
170818
+ function catalogEntries() {
170819
+ return [...rootCommands.map((definition) => ({
170820
+ definition,
170821
+ prefix: []
170822
+ })), ...groups.flatMap((entry) => groupCommands(entry).map((definition) => ({
170823
+ definition,
170824
+ prefix: [entry.name]
170825
+ })))];
170826
+ }
170811
170827
  // src/lib/menu.ts
170812
170828
  function label(entry) {
170813
170829
  return entry.group ? `${entry.name} <command>` : entry.name;
@@ -171052,6 +171068,32 @@ async function run(definition, input, stdinField, json) {
171052
171068
  context.close();
171053
171069
  }
171054
171070
  }
171071
+ /**
171072
+ * @description Describes every command for a front end that drives `ubd`, such as Unbound DevTools.
171073
+ * Fields keep their schema order, which a JSON object would not promise to every reader.
171074
+ * @param entries The commands, each with the group words that precede its name.
171075
+ * @returns The catalog `ubd catalog` prints.
171076
+ */
171077
+ function buildCatalog(entries) {
171078
+ return {
171079
+ version: 1,
171080
+ commands: entries.map(({ definition, prefix }) => {
171081
+ const required = new Set(definition.schema.required ?? []);
171082
+ return {
171083
+ name: definition.name,
171084
+ description: definition.description,
171085
+ summary: definition.summary,
171086
+ path: [...prefix, definition.name],
171087
+ positionals: (definition.cli?.positionals ?? []).map(String),
171088
+ fields: Object.entries(definition.schema.properties).map(([name, schema]) => ({
171089
+ name,
171090
+ required: required.has(name),
171091
+ schema
171092
+ }))
171093
+ };
171094
+ })
171095
+ };
171096
+ }
171055
171097
  // src/cli.ts
171056
171098
  const HELP = /* @__PURE__ */ new Set([
171057
171099
  "help",
@@ -171133,6 +171175,14 @@ function runCli(argv) {
171133
171175
  print(rootMenu());
171134
171176
  return;
171135
171177
  }
171178
+ if (name === "catalog") {
171179
+ process.stdout.write(`${JSON.stringify(buildCatalog(catalogEntries()))}\n`);
171180
+ return;
171181
+ }
171182
+ if (name === "serve-bridge") {
171183
+ import("@unbound-app/debugger/src/index.ts");
171184
+ return;
171185
+ }
171136
171186
  const group = groups.find((candidate) => candidate.name === name);
171137
171187
  if (group) {
171138
171188
  runGroup(group, rest);
@@ -1,7 +1,7 @@
1
1
  import { StaticDecode, Type } from "typebox";
2
- import { ESTree } from "rolldown/utils";
3
2
  import MagicString from "magic-string";
4
3
  import { EmittedAsset, Plugin, PluginContext, RollupOptions } from "rollup";
4
+ import { ESTree } from "rolldown/utils";
5
5
  /** One locale's messages, keyed by message key. */
6
6
  type LocaleTable = Record<string, string>;
7
7
  /** A translation as the build emits it: its minified JSON and that text's SHA-256. */
@@ -1,18 +1,17 @@
1
- import { B as reportProblem, C as readLocaleFolder, D as reportLine, E as writeLocaleTypings, F as formatDiagnostic, G as hermesBytecode, K as hermescCount, L as pluginDiagnostic, M as findFile, N as sourceAlias, P as diagnostic, Q as ASSETS_DIRECTORY, R as reportDiagnostic, S as locales, T as sourceLocalePath, U as bytecodeFileName, W as bytecodeSource, a as SETTINGS_MODULE, at as __commonJSMin, b as LOCALE_TYPINGS, c as settingsPath, ct as __require$1, f as outputOnly, g as shim_libraries_default, h as buildReport, i as SETTINGS_FILE, l as lineStarts, lt as __toCommonJS$1, m as DEFAULT_BUDGET, n as settingsTypings, nt as getAssetPath, ot as __esmMin, p as BUILD_REPORT_ENV, r as writeSettingsTypings, rt as isAssetName, s as readPluginSettings, st as __exportAll, u as toLocation, ut as __toESM$1, v as parseByteSize, w as readTable, x as localeModule, y as LOCALE_MODULE, z as reportDiagnostics } from "../settings-typings-D39KwaWs.mjs";
1
+ import { B as pluginDiagnostic, C as readLocaleFolder, D as reportLine, E as writeLocaleTypings, F as findFile, H as reportDiagnostics, I as sourceAlias, J as hermesBytecode, K as bytecodeFileName, L as diagnostic, M as Visitor, N as parseSync, P as transformSync$1, R as formatDiagnostic, S as locales, T as sourceLocalePath, U as reportProblem, V as reportDiagnostic, Y as hermescCount, a as SETTINGS_MODULE, at as getAssetPath, b as LOCALE_TYPINGS, c as settingsPath, ct as __commonJSMin, dt as __require$1, f as outputOnly, ft as __toCommonJS$1, g as shim_libraries_default, h as buildReport, i as SETTINGS_FILE, l as lineStarts, lt as __esmMin, m as DEFAULT_BUDGET, n as settingsTypings, ot as isAssetName, p as BUILD_REPORT_ENV, pt as __toESM$1, q as bytecodeSource, r as writeSettingsTypings, s as readPluginSettings, tt as ASSETS_DIRECTORY, u as toLocation, ut as __exportAll, v as parseByteSize, w as readTable, x as localeModule, y as LOCALE_MODULE } from "../settings-typings-BSBbM6c9.mjs";
2
2
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
3
3
  import os from "node:os";
4
4
  import { basename, dirname, extname, join, relative, resolve, sep } from "node:path";
5
5
  import { createHash } from "node:crypto";
6
- import { Visitor, parseSync, transformSync } from "rolldown/utils";
7
6
  import { transformAsync } from "@babel/core";
8
7
  import MagicString from "magic-string";
9
8
  import { fileURLToPath } from "node:url";
10
- import { rollup } from "rollup";
11
9
  import { nodeResolve } from "@rollup/plugin-node-resolve";
12
10
  import { minify, swc } from "rollup-plugin-swc3";
13
11
  import commonjs from "@rollup/plugin-commonjs";
14
12
  import json from "@rollup/plugin-json";
15
13
  import iife from "rollup-plugin-iife";
14
+ import { rollup } from "rollup";
16
15
  import { parseAst } from "rolldown/parseAst";
17
16
  import process$1 from "node:process";
18
17
  import tty from "node:tty";
@@ -400,7 +399,7 @@ function settingsModule(pluginRoot, state = {}) {
400
399
  message: `The plugin imports '${SETTINGS_MODULE}' but has no ${SETTINGS_FILE}`,
401
400
  fix: `add ${SETTINGS_FILE} beside src/`
402
401
  });
403
- return transformSync("unbound-settings.ts", settingsModuleSource(state.settings)).code;
402
+ return transformSync$1("unbound-settings.ts", settingsModuleSource(state.settings)).code;
404
403
  },
405
404
  async transform(code, id) {
406
405
  if (!id.startsWith(resolve(pluginRoot, "src") + sep) || !isGuardedSource(id)) return null;
@@ -27,8 +27,6 @@ export type BuilderOptions = {
27
27
  maxLength?: number;
28
28
  placeholder?: string;
29
29
  alpha?: boolean;
30
- presets?: string[];
31
- palette?: boolean;
32
30
  maxSize?: number;
33
31
  options?: Record<string, OptionLabel>;
34
32
  of?: TSchema;
@@ -78,8 +78,6 @@ function string(options = {}) {
78
78
  maxLength: options.maxLength,
79
79
  placeholder: options.placeholder,
80
80
  alpha: options.alpha,
81
- presets: options.presets,
82
- palette: options.palette,
83
81
  maxSize: options.maxSize
84
82
  }));
85
83
  }
@@ -9,10 +9,8 @@ import { fetchManifest, resolveHermesTargets } from "@unbound-app/rollup-plugin-
9
9
  import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
10
10
  import { promisify } from "node:util";
11
11
  import { createHash } from "node:crypto";
12
- import { parseSync } from "rolldown/utils";
13
12
  import { gzipSync } from "node:zlib";
14
13
  import { fileURLToPath } from "node:url";
15
- import { rolldown } from "rolldown";
16
14
  // \0rolldown/runtime.js
17
15
  var __create = Object.create;
18
16
  var __defProp = Object.defineProperty;
@@ -435,6 +433,42 @@ function sourceAlias(sourceRoot) {
435
433
  }
436
434
  };
437
435
  }
436
+ // src/rollup/rolldown-utils.ts
437
+ const require = createRequire(import.meta.url);
438
+ let loaded;
439
+ function load() {
440
+ loaded ??= require("rolldown/utils");
441
+ return loaded;
442
+ }
443
+ /**
444
+ * @description Parses a module with rolldown's oxc parser, loading the parser on first use.
445
+ * @param args The file name, source and parser options, as `rolldown/utils` takes them.
446
+ * @returns The program, comments and errors.
447
+ */
448
+ function parseSync(...args) {
449
+ return load().parseSync(...args);
450
+ }
451
+ /**
452
+ * @description Transforms a module with rolldown's oxc transformer, loading it on first use.
453
+ * @param args The file name, source and transform options, as `rolldown/utils` takes them.
454
+ * @returns The transformed code.
455
+ */
456
+ function transformSync(...args) {
457
+ return load().transformSync(...args);
458
+ }
459
+ /**
460
+ * Rolldown's ESTree visitor, created when it first visits like {@link parseSync}. No private
461
+ * fields: the CLI's bundled typings cannot declare them on an exported class.
462
+ */
463
+ var Visitor = class {
464
+ visitor;
465
+ constructor(visitor) {
466
+ this.visitor = visitor;
467
+ }
468
+ visit(program) {
469
+ new (load()).Visitor(this.visitor).visit(program);
470
+ }
471
+ };
438
472
  // ../api/testing/icu-parse.ts
439
473
  /** A syntax error in an ICU message; `position` is the 1-based character it stopped at. */
440
474
  var IcuSyntaxError = class extends Error {
@@ -1534,7 +1568,7 @@ function outputOnly(plugin) {
1534
1568
  };
1535
1569
  }
1536
1570
  // ../contracts/src/settings-schema.ts
1537
- const BUILDERS$1 = "setting.boolean/number/integer/string/choice/array/section/button/notice from '@unbound-app/settings/schema'";
1571
+ const BUILDERS = "setting.boolean/number/integer/string/choice/array/section/button/notice from '@unbound-app/settings/schema'";
1538
1572
  const ENTITIES = [
1539
1573
  "user",
1540
1574
  "channel",
@@ -1612,8 +1646,6 @@ const SPEC = {
1612
1646
  "maxLength",
1613
1647
  "placeholder",
1614
1648
  "alpha",
1615
- "presets",
1616
- "palette",
1617
1649
  "maxSize"
1618
1650
  ]
1619
1651
  },
@@ -1656,8 +1688,6 @@ const DISPLAY_KEYS = {
1656
1688
  "url"
1657
1689
  ],
1658
1690
  alpha: ["color"],
1659
- presets: ["color"],
1660
- palette: ["color"],
1661
1691
  maxSize: ["image"],
1662
1692
  units: ["duration"]
1663
1693
  };
@@ -1799,7 +1829,6 @@ function readDisplay(node, path, reader) {
1799
1829
  const display = textOf(node.displayAs);
1800
1830
  for (const [key, displays] of Object.entries(DISPLAY_KEYS)) if (node[key] !== void 0 && !displays.includes(display)) issue(reader, path, `sets \`${key}\`, which only displayAs ${displays.map((name) => `'${name}'`).join("/")} takes`, `remove \`${key}\` or change displayAs`);
1801
1831
  if (display === "slider" && (node.minimum === void 0 || node.maximum === void 0)) issue(reader, path, "shows as a slider without both `min` and `max`", "set both, or use displayAs: 'input'");
1802
- if (node.palette === true && !Array.isArray(node.presets)) issue(reader, path, "sets `palette` without `presets`", "add `presets`");
1803
1832
  if (node.kind === "choice") readChoices(node, path, reader);
1804
1833
  if (node.kind === "array") {
1805
1834
  const of = isObject(node.of) ? node.of : {};
@@ -1821,7 +1850,7 @@ function copy(node, keys) {
1821
1850
  function readField(node, path, reader) {
1822
1851
  const spec = isObject(node) && typeof node.kind === "string" ? SPEC[node.kind] : void 0;
1823
1852
  if (!isObject(node) || !spec) {
1824
- issue(reader, path, "is not built with a setting builder", `use ${BUILDERS$1}`);
1853
+ issue(reader, path, "is not built with a setting builder", `use ${BUILDERS}`);
1825
1854
  return;
1826
1855
  }
1827
1856
  for (const key of Object.keys(node)) if (!COMMON.includes(key) && !spec.keys.includes(key) && !TYPEBOX.has(key)) issue(reader, path, `has the unsupported \`${key}\` option`, "remove it");
@@ -2136,7 +2165,9 @@ const SETTINGS_FILE = "settings.ts";
2136
2165
  const SETTINGS_MODULE = "@unbound-app/settings";
2137
2166
  /** The build-time module `settings.ts` imports its builders from; it exists only while the build evaluates the file. */
2138
2167
  const SETTINGS_SCHEMA_MODULE = "@unbound-app/settings/schema";
2139
- const BUILDERS = fileURLToPath(import.meta.resolve("@unbound-app/cli/settings/schema"));
2168
+ function buildersPath() {
2169
+ return fileURLToPath(import.meta.resolve("@unbound-app/cli/settings/schema"));
2170
+ }
2140
2171
  /**
2141
2172
  * @description Names a plugin's settings schema file.
2142
2173
  * @param pluginRoot The plugin's directory.
@@ -2151,19 +2182,21 @@ function settingsPath(pluginRoot) {
2151
2182
  * @returns Its default export as JSON, and the files it was bundled from.
2152
2183
  */
2153
2184
  async function evaluateSettings(path) {
2185
+ const { rolldown } = await import("rolldown");
2186
+ const builders = buildersPath();
2154
2187
  const bundle = await rolldown({
2155
2188
  input: path,
2156
2189
  platform: "node",
2157
2190
  logLevel: "silent",
2158
2191
  plugins: [{
2159
2192
  name: "unbound-settings-schema",
2160
- resolveId: (source) => source === "@unbound-app/settings/schema" ? BUILDERS : null
2193
+ resolveId: (source) => source === "@unbound-app/settings/schema" ? builders : null
2161
2194
  }]
2162
2195
  });
2163
2196
  try {
2164
2197
  const { output } = await bundle.generate({ format: "esm" });
2165
2198
  const module = await import(`data:text/javascript;base64,${Buffer.from(output[0].code).toString("base64")}`);
2166
- const watchFiles = (await bundle.watchFiles).filter((file) => file !== BUILDERS);
2199
+ const watchFiles = (await bundle.watchFiles).filter((file) => file !== builders);
2167
2200
  return {
2168
2201
  value: JSON.parse(JSON.stringify(module.default ?? null)),
2169
2202
  watchFiles
@@ -2396,19 +2429,16 @@ const SCHEMA_TYPINGS = `declare module '${SETTINGS_SCHEMA_MODULE}' {
2396
2429
  | ({ displayAs: 'duration'; /** The units offered, smallest first. */ units?: ('ms' | 's' | 'm' | 'h' | 'd')[] } & Range & Never<'step'>);
2397
2430
 
2398
2431
  type TextOptions = { minLength?: number; maxLength?: number; placeholder?: MessageKey };
2399
- type ColorOptions = { alpha?: boolean; default: HexColor } & (
2400
- | { palette?: false; presets?: HexColor[] }
2401
- | { /** Draws \`presets\` inline. */ palette: true; presets: [HexColor, ...HexColor[]] }
2402
- );
2432
+ type ColorOptions = { alpha?: boolean; default: HexColor };
2403
2433
  type StringDisplay =
2404
- | ({ displayAs?: 'input' | 'multiline'; default: string } & TextOptions & Never<'alpha' | 'presets' | 'palette' | 'maxSize'>)
2405
- | ({ displayAs: 'secret'; default: string; placeholder?: MessageKey } & Never<'minLength' | 'maxLength' | 'alpha' | 'presets' | 'palette' | 'maxSize'>)
2406
- | ({ displayAs: 'url'; default: HttpUrl | ''; placeholder?: MessageKey } & Never<'minLength' | 'maxLength' | 'alpha' | 'presets' | 'palette' | 'maxSize'>)
2434
+ | ({ displayAs?: 'input' | 'multiline'; default: string } & TextOptions & Never<'alpha' | 'maxSize'>)
2435
+ | ({ displayAs: 'secret'; default: string; placeholder?: MessageKey } & Never<'minLength' | 'maxLength' | 'alpha' | 'maxSize'>)
2436
+ | ({ displayAs: 'url'; default: HttpUrl | ''; placeholder?: MessageKey } & Never<'minLength' | 'maxLength' | 'alpha' | 'maxSize'>)
2407
2437
  | ({ displayAs: 'color' } & ColorOptions & Never<'minLength' | 'maxLength' | 'placeholder' | 'maxSize'>)
2408
- | ({ displayAs: 'image'; default?: string; /** The largest file, in bytes. */ maxSize?: number } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'presets' | 'palette'>)
2409
- | ({ displayAs: 'font'; default?: string } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'presets' | 'palette' | 'maxSize'>)
2410
- | ({ /** \`name\`, or \`name:id\` for a custom emoji. */ displayAs: 'emoji'; default?: EmojiString } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'presets' | 'palette' | 'maxSize'>)
2411
- | ({ displayAs: 'user' | 'channel' | 'guild' | 'role'; default?: Snowflake | '' } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'presets' | 'palette' | 'maxSize'>);
2438
+ | ({ displayAs: 'image'; default?: string; /** The largest file, in bytes. */ maxSize?: number } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha'>)
2439
+ | ({ displayAs: 'font'; default?: string } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'maxSize'>)
2440
+ | ({ /** \`name\`, or \`name:id\` for a custom emoji. */ displayAs: 'emoji'; default?: EmojiString } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'maxSize'>)
2441
+ | ({ displayAs: 'user' | 'channel' | 'guild' | 'role'; default?: Snowflake | '' } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'maxSize'>);
2412
2442
 
2413
2443
  /** An option's label: a message key, or a title and a subtitle a radio group shows under it. */
2414
2444
  export type OptionLabel = MessageKey | { title: MessageKey; subtitle?: MessageKey };
@@ -2582,4 +2612,4 @@ function writeSettingsTypings(pluginRoot, typings) {
2582
2612
  writeFileSync(path, typings);
2583
2613
  return true;
2584
2614
  }
2585
- export { ASSET_NAME_PATTERN as $, readIcuMessage as A, reportProblem as B, readLocaleFolder as C, reportLine as D, writeLocaleTypings as E, formatDiagnostic as F, hermesBytecode as G, withoutFullStop as H, isDiagnostic as I, LOCALES_DIRECTORY as J, hermescCount as K, pluginDiagnostic as L, findFile as M, sourceAlias as N, buildReportSchema as O, diagnostic as P, ASSETS_DIRECTORY as Q, reportDiagnostic as R, locales as S, sourceLocalePath as T, bytecodeFileName as U, sortDiagnostics as V, bytecodeSource as W, SOURCE_LOCALE as X, LOCALE_CODE_PATTERN as Y, isLocaleCode as Z, formatBytes as _, SETTINGS_MODULE as a, __commonJSMin as at, LOCALE_TYPINGS as b, settingsPath as c, __require as ct, OUTPUT_ONLY as d, ASSET_SCALES as et, outputOnly as f, shim_libraries_default as g, buildReport as h, SETTINGS_FILE as i, ADDON_KINDS as it, IcuSyntaxError as j, readIcuArguments as k, lineStarts as l, __toCommonJS as lt, DEFAULT_BUDGET as m, settingsTypings as n, getAssetPath as nt, SETTINGS_SCHEMA_MODULE as o, __esmMin as ot, BUILD_REPORT_ENV as p, listAddonFiles as q, writeSettingsTypings as r, isAssetName as rt, readPluginSettings as s, __exportAll as st, SETTINGS_TYPINGS as t, ASSET_TYPES as tt, toLocation as u, __toESM as ut, parseByteSize as v, readTable as w, localeModule as x, LOCALE_MODULE as y, reportDiagnostics as z };
2615
+ export { SOURCE_LOCALE as $, readIcuMessage as A, pluginDiagnostic as B, readLocaleFolder as C, reportLine as D, writeLocaleTypings as E, findFile as F, withoutFullStop as G, reportDiagnostics as H, sourceAlias as I, hermesBytecode as J, bytecodeFileName as K, diagnostic as L, Visitor as M, parseSync as N, buildReportSchema as O, transformSync as P, LOCALE_CODE_PATTERN as Q, formatDiagnostic as R, locales as S, sourceLocalePath as T, reportProblem as U, reportDiagnostic as V, sortDiagnostics as W, listAddonFiles as X, hermescCount as Y, LOCALES_DIRECTORY as Z, formatBytes as _, SETTINGS_MODULE as a, getAssetPath as at, LOCALE_TYPINGS as b, settingsPath as c, __commonJSMin as ct, OUTPUT_ONLY as d, __require as dt, isLocaleCode as et, outputOnly as f, __toCommonJS as ft, shim_libraries_default as g, buildReport as h, SETTINGS_FILE as i, ASSET_TYPES as it, IcuSyntaxError as j, readIcuArguments as k, lineStarts as l, __esmMin as lt, DEFAULT_BUDGET as m, settingsTypings as n, ASSET_NAME_PATTERN as nt, SETTINGS_SCHEMA_MODULE as o, isAssetName as ot, BUILD_REPORT_ENV as p, __toESM as pt, bytecodeSource as q, writeSettingsTypings as r, ASSET_SCALES as rt, readPluginSettings as s, ADDON_KINDS as st, SETTINGS_TYPINGS as t, ASSETS_DIRECTORY as tt, toLocation as u, __exportAll as ut, parseByteSize as v, readTable as w, localeModule as x, LOCALE_MODULE as y, isDiagnostic as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbound-app/cli",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "The `ubd` command line for the Unbound client: evaluate on-device code and serve the debugger as an MCP.",
5
5
  "author": {
6
6
  "name": "Mario P.",
@@ -61,8 +61,8 @@
61
61
  "@rollup/plugin-commonjs": "^29.0.3",
62
62
  "@rollup/plugin-json": "^6.1.0",
63
63
  "@rollup/plugin-node-resolve": "^16.0.3",
64
- "@unbound-app/debugger": "0.10.3",
65
- "@unbound-app/debugger-protocol": "1.0.0",
64
+ "@unbound-app/debugger": "0.10.5",
65
+ "@unbound-app/debugger-protocol": "1.0.2",
66
66
  "@unbound-app/rollup-plugin-hermes": "2.0.0",
67
67
  "better-auth": "1.7.16",
68
68
  "cleye": "^2.7.0",
@@ -55,19 +55,16 @@ declare module '@unbound-app/settings/schema' {
55
55
  | ({ displayAs: 'duration'; /** The units offered, smallest first. */ units?: ('ms' | 's' | 'm' | 'h' | 'd')[] } & Range & Never<'step'>);
56
56
 
57
57
  type TextOptions = { minLength?: number; maxLength?: number; placeholder?: MessageKey };
58
- type ColorOptions = { alpha?: boolean; default: HexColor } & (
59
- | { palette?: false; presets?: HexColor[] }
60
- | { /** Draws `presets` inline. */ palette: true; presets: [HexColor, ...HexColor[]] }
61
- );
58
+ type ColorOptions = { alpha?: boolean; default: HexColor };
62
59
  type StringDisplay =
63
- | ({ displayAs?: 'input' | 'multiline'; default: string } & TextOptions & Never<'alpha' | 'presets' | 'palette' | 'maxSize'>)
64
- | ({ displayAs: 'secret'; default: string; placeholder?: MessageKey } & Never<'minLength' | 'maxLength' | 'alpha' | 'presets' | 'palette' | 'maxSize'>)
65
- | ({ displayAs: 'url'; default: HttpUrl | ''; placeholder?: MessageKey } & Never<'minLength' | 'maxLength' | 'alpha' | 'presets' | 'palette' | 'maxSize'>)
60
+ | ({ displayAs?: 'input' | 'multiline'; default: string } & TextOptions & Never<'alpha' | 'maxSize'>)
61
+ | ({ displayAs: 'secret'; default: string; placeholder?: MessageKey } & Never<'minLength' | 'maxLength' | 'alpha' | 'maxSize'>)
62
+ | ({ displayAs: 'url'; default: HttpUrl | ''; placeholder?: MessageKey } & Never<'minLength' | 'maxLength' | 'alpha' | 'maxSize'>)
66
63
  | ({ displayAs: 'color' } & ColorOptions & Never<'minLength' | 'maxLength' | 'placeholder' | 'maxSize'>)
67
- | ({ displayAs: 'image'; default?: string; /** The largest file, in bytes. */ maxSize?: number } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'presets' | 'palette'>)
68
- | ({ displayAs: 'font'; default?: string } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'presets' | 'palette' | 'maxSize'>)
69
- | ({ /** `name`, or `name:id` for a custom emoji. */ displayAs: 'emoji'; default?: EmojiString } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'presets' | 'palette' | 'maxSize'>)
70
- | ({ displayAs: 'user' | 'channel' | 'guild' | 'role'; default?: Snowflake | '' } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'presets' | 'palette' | 'maxSize'>);
64
+ | ({ displayAs: 'image'; default?: string; /** The largest file, in bytes. */ maxSize?: number } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha'>)
65
+ | ({ displayAs: 'font'; default?: string } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'maxSize'>)
66
+ | ({ /** `name`, or `name:id` for a custom emoji. */ displayAs: 'emoji'; default?: EmojiString } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'maxSize'>)
67
+ | ({ displayAs: 'user' | 'channel' | 'guild' | 'role'; default?: Snowflake | '' } & Never<'minLength' | 'maxLength' | 'placeholder' | 'alpha' | 'maxSize'>);
71
68
 
72
69
  /** An option's label: a message key, or a title and a subtitle a radio group shows under it. */
73
70
  export type OptionLabel = MessageKey | { title: MessageKey; subtitle?: MessageKey };