@nanobpm/nano-ide-ext-types 1.0.1 → 1.2.0

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +37 -2
  2. package/package.json +12 -4
package/dist/index.d.ts CHANGED
@@ -8,12 +8,43 @@ export interface FileType {
8
8
  export interface Toolchain {
9
9
  /** Probe argv proving the toolchain is installed (e.g. ["cargo","--version"]). */
10
10
  detect?: string[];
11
- /** argv to run the project (cwd = project dir). Empty => built-in Deno runner. */
11
+ /** argv to run the project (cwd = project dir). Empty => built-in Deno runner.
12
+ * Serves as a fallback when the active run config's `run` argv is empty. */
12
13
  run?: string[];
13
- /** argv to compile the project. Empty => Deno compile. */
14
+ /** argv to compile the project. Empty => Deno compile. Serves as a fallback
15
+ * when the active run config's `compile` argv is empty. */
14
16
  compile?: string[];
15
17
  /** Cross-compile target triples this toolchain offers. */
16
18
  targets?: string[];
19
+ /** Named run configurations the console surfaces in a Run/Target dropdown.
20
+ * When set, the supervisor prefers the active one (pinned →
21
+ * `default: true` → first) over the flat `run`/`compile`. */
22
+ runConfigs?: RunConfig[];
23
+ /** Official install instructions for this toolchain, surfaced in the IDE
24
+ * config panel when the `detect` probe fails (e.g. the Rust toolchain page). */
25
+ installUrl?: string;
26
+ /** One-line, actionable hint shown when the toolchain is missing (e.g.
27
+ * "`cargo` was not found. Install the Rust toolchain…"). */
28
+ installHint?: string;
29
+ }
30
+ /**
31
+ * One named run/compile combo a pack exposes — e.g. an example that swaps
32
+ * transports or build profiles. The console persists the picked id in the
33
+ * project's `nanobpm.project.json` as `toolchain.activeRunConfig`.
34
+ */
35
+ export interface RunConfig {
36
+ /** Stable id, unique within the pack (e.g. "stock-grpc"). */
37
+ id: string;
38
+ /** Human-facing label shown in the Run dropdown. */
39
+ label: string;
40
+ /** When no id is pinned by the user, this entry is picked; else the first. */
41
+ default?: boolean;
42
+ /** argv override for this config. Empty => fall back to `Toolchain.run`. */
43
+ run?: string[];
44
+ /** argv override for this config. Empty => fall back to `Toolchain.compile`. */
45
+ compile?: string[];
46
+ /** Env vars layered on top of the base spawn env (last wins on key clash). */
47
+ env?: Record<string, string>;
17
48
  }
18
49
  export interface TemplateSpec {
19
50
  id: string;
@@ -42,6 +73,10 @@ export interface ExtManifest {
42
73
  id: string;
43
74
  kind: ExtKind;
44
75
  displayName: string;
76
+ /** Optional pack icon: an inline SVG XML string (preferred; use single-quoted
77
+ * attributes so it nests in JSON) or a data:/http: URL. Lang packs supply this
78
+ * so the console can badge project cards with a language icon. */
79
+ icon?: string;
45
80
  fileTypes?: FileType[];
46
81
  templates?: TemplateSpec[];
47
82
  toolchain?: Toolchain;
package/package.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
2
  "name": "@nanobpm/nano-ide-ext-types",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "TypeScript types for the nano-ide.ext.json extension manifest (ADR 0007).",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
- "publishConfig": { "access": "public" },
8
- "repository": { "type": "git", "url": "https://github.com/jwulf/nano-ide.git", "directory": "packages/ext-types" },
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/jwulf/nano-ide.git",
13
+ "directory": "packages/ext-types"
14
+ },
9
15
  "main": "./dist/index.js",
10
16
  "types": "./dist/index.d.ts",
11
- "files": ["dist"],
17
+ "files": [
18
+ "dist"
19
+ ],
12
20
  "scripts": {
13
21
  "build": "tsc -p tsconfig.json",
14
22
  "typecheck": "tsc --noEmit"