@dotcraft/plugin 0.9.4 → 0.9.6

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
@@ -1,7 +1,7 @@
1
1
  # @dotcraft/plugin
2
2
 
3
3
  `@dotcraft/plugin` provides the public contracts, React runtime bindings, and build command for
4
- trusted DotCraft Desktop Plugins. Use Node.js 20 or later with React 19 and `react-dom` 19.
4
+ trusted DotCraft Desktop extensions. Use Node.js 20 or later with React 19 and `react-dom` 19.
5
5
 
6
6
  ## Install
7
7
 
@@ -23,5 +23,5 @@ export const activate: DesktopPluginActivate = (host) => {
23
23
 
24
24
  ## Documentation
25
25
 
26
- - [Build a Desktop Plugin](https://www.dotcraft.net/extend/desktop-plugins)
27
- - [Desktop Plugin API](https://www.dotcraft.net/extend/desktop-plugin-api)
26
+ - [Build a Desktop extension](https://www.dotcraft.net/extend/desktop-extensions)
27
+ - [Desktop extension API](https://www.dotcraft.net/extend/desktop-extension-api)
package/dist/runtime.js CHANGED
@@ -5,7 +5,7 @@ export function installDesktopPluginRuntime(runtime) {
5
5
  export function readDesktopPluginRuntime() {
6
6
  const runtime = runtimeGlobal()[runtimeKey];
7
7
  if (!runtime) {
8
- throw new Error("DotCraft Desktop Plugin runtime is not installed.");
8
+ throw new Error("DotCraft Desktop extension runtime is not installed.");
9
9
  }
10
10
  return runtime;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;AASjE,MAAM,UAAU,2BAA2B,CAAC,OAA6B;IACvE,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,UAAkF,CAAC;AAC5F,CAAC"}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;AASjE,MAAM,UAAU,2BAA2B,CAAC,OAA6B;IACvE,aAAa,EAAE,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,UAAkF,CAAC;AAC5F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcraft/plugin",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
4
4
  "description": "TypeScript and React authoring tools for DotCraft Plugin desktop modules",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  "test": "npm run typecheck && npm run build && node --test scripts/runtime.test.mjs && node scripts/build-plugin.test.mjs"
39
39
  },
40
40
  "dependencies": {
41
- "@dotcraft/sdk": "0.9.4",
41
+ "@dotcraft/sdk": "0.9.6",
42
42
  "esbuild": "^0.25.11"
43
43
  },
44
44
  "peerDependencies": {
@@ -29,11 +29,11 @@ async function buildDesktopPlugin(projectRoot = process.cwd()) {
29
29
  const entry = join(root, "src", "index.tsx");
30
30
  const outdir = join(root, "dist");
31
31
  if (!existsSync(entry)) {
32
- throw new Error("Desktop Plugin entry not found: src/index.tsx");
32
+ throw new Error("Desktop extension entry not found: src/index.tsx");
33
33
  }
34
34
  for (const proxy of proxyEntries.values()) {
35
35
  if (!existsSync(proxy)) {
36
- throw new Error("Build @dotcraft/plugin before building a Desktop Plugin.");
36
+ throw new Error("Build @dotcraft/plugin before building a Desktop extension.");
37
37
  }
38
38
  }
39
39
 
@@ -64,14 +64,14 @@ async function buildDesktopPlugin(projectRoot = process.cwd()) {
64
64
  /(?:^|[/\\])node_modules[/\\]react(?:-dom)?[/\\]/.test(input),
65
65
  );
66
66
  if (bundledReact) {
67
- throw new Error("Desktop Plugin output contains a private React runtime.");
67
+ throw new Error("Desktop extension output contains a private React runtime.");
68
68
  }
69
69
 
70
70
  for (const output of walkFiles(staging)) {
71
71
  if (!output.endsWith(".mjs")) continue;
72
72
  const source = readFileSync(output, "utf8");
73
73
  if (/\b(?:from|import)\s*\(?\s*["']react(?:-dom)?(?:\/[^"']*)?["']/.test(source)) {
74
- throw new Error(`Desktop Plugin output contains a bare React import: ${relativeSourcePath(staging, output)}`);
74
+ throw new Error(`Desktop extension output contains a bare React import: ${relativeSourcePath(staging, output)}`);
75
75
  }
76
76
  }
77
77
 
@@ -90,7 +90,7 @@ function runtimeProxyPlugin() {
90
90
  buildContext.onResolve({ filter: new RegExp(`^${escapeRegExp(specifier)}$`) }, () => ({ path: proxy }));
91
91
  }
92
92
  buildContext.onResolve({ filter: /^react(?:\/.*)?$|^react-dom(?:\/.*)?$/ }, (args) => ({
93
- errors: [{ text: `Unsupported React entry point '${args.path}' in a Desktop Plugin.` }],
93
+ errors: [{ text: `Unsupported React entry point '${args.path}' in a Desktop extension.` }],
94
94
  }));
95
95
  },
96
96
  };