@twinsearth/w2m-dsh-plugin 0.4.6 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,48 @@ All notable changes to this project are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.4.8] — 2026-10-09
8
+
9
+ ### Added
10
+
11
+ * **The listing badge, with the URL it actually resolves to.** The plugin is listed on
12
+ dsh-plugin.org as `twinsearth/dsh-windows2macos` under Workflow & Automation, marked
13
+ **Verified** — it was auto-discovered through the `dsh-plugin` topic and reviewed by hand
14
+ before this release. The badge links to that page rather than to a guessed slug.
15
+
16
+ ### Notes
17
+
18
+ * The listing's own snapshot was stale (it still showed v0.3.8 and an install command the hub
19
+ derived itself), so a submission issue was filed with the hub's template —
20
+ [dshplugin/dsh-plugin-hub#141](https://github.com/dshplugin/dsh-plugin-hub/issues/141) — which
21
+ is what triggers a re-scan. Nothing about being listed had to be requested: the topic is the
22
+ entry point, and this repository already carried it.
23
+ * The package is on npm as `@twinsearth/w2m-dsh-plugin` (latest 0.4.7 at the time of this
24
+ release). With the package now existing, npm **trusted publishing** can be configured for this
25
+ repository and `release.yml` — after that every future release publishes itself with provenance,
26
+ and no token or one-time code is involved.
27
+
28
+ ## [0.4.7] — 2026-10-09
29
+
30
+ ### Fixed
31
+
32
+ * **The package root exported nothing, and the ecosystem checks the root.** `lib/index.js` was
33
+ deliberately documentation-only — the profile mounts `@twinsearth/w2m-dsh-plugin/tools` because
34
+ `cordis.patch.yml` names that subpath — so `import('@twinsearth/w2m-dsh-plugin')` returned
35
+ `Object.keys() === []` and `typeof apply === 'undefined'`. A plugin that mounts perfectly and
36
+ looks like an empty package to every tool that inspects it is a listing risk with no upside: the
37
+ DSH plugin listing requirements ask for a package that "exports an `apply(ctx)` module", and a
38
+ missing root export is one of the most common reasons a submission is refused. The root now
39
+ re-exports `apply`, `inject` and the test helper from `./tools.js` — one implementation, two
40
+ entry points — and `test/tools.test.mjs` asserts it, so it cannot silently regress.
41
+
42
+ ### Notes
43
+
44
+ * Nothing about the mounted plugin changed: the patch still names the subpath rather than relying on
45
+ the "root is the plugin" convention, which is what keeps the eight tools from being registered
46
+ twice.
47
+ * `tools.test.mjs`: 83 pass, 0 fail.
48
+
7
49
  ## [0.4.6] — 2026-10-09
8
50
 
9
51
  ### Added
package/README.md CHANGED
@@ -6,6 +6,7 @@ English | [中文](#中文说明)
6
6
 
7
7
  [![CI](https://github.com/TwinsEarth/dsh-windows2macos/actions/workflows/ci.yml/badge.svg)](https://github.com/TwinsEarth/dsh-windows2macos/actions/workflows/ci.yml)
8
8
  [![npm](https://img.shields.io/npm/v/@twinsearth/w2m-dsh-plugin?label=npm)](https://www.npmjs.com/package/@twinsearth/w2m-dsh-plugin)
9
+ [![Listed on dsh-plugin.org](https://dsh-plugin.org/badges/listed.svg)](https://dsh-plugin.org/plugins/twinsearth/dsh-windows2macos)
9
10
  [![DSH plugin](https://img.shields.io/badge/DSH-plugin-4c6ef5)](#install)
10
11
  [![dependencies](https://img.shields.io/badge/runtime%20dependencies-0-brightgreen)](#design-notes)
11
12
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
package/lib/index.js CHANGED
@@ -1,13 +1,24 @@
1
1
  /**
2
- * Intentionally empty plugin entry point.
2
+ * Package root entry.
3
3
  *
4
- * The profile mounts this package's `tools` subpath -- named explicitly by
5
- * `cordis.patch.yml`'s insert entry -- so that reading the profile tells you
6
- * which module of the package becomes the plugin, instead of relying on a
7
- * "root export is the plugin" convention.
4
+ * TWO READERS, ONE EXPORT LIST
8
5
  *
9
- * This file exists only so the manifest never points at a path that does not
10
- * resolve. All real behaviour lives in `../src/plugin/tools.mjs`, re-exported
11
- * through `./tools.js`.
6
+ * `cordis.patch.yml` names the `tools` subpath explicitly, and that stays true: mounting this
7
+ * profile reads the patch, sees `@twinsearth/w2m-dsh-plugin/tools`, and loads `./tools.js`. Nothing
8
+ * about the mounted plugin changes because of this file.
9
+ *
10
+ * But the root entry is what everything else looks at. The DSH plugin listing requirements -- and
11
+ * the marketplace checklists that copy them -- ask for a package that "exports an `apply(ctx)`
12
+ * module", and a package that does not is one of the most common reasons a submission is refused.
13
+ * This file used to be documentation only, so importing the package root yielded **no exports at
14
+ * all** (`Object.keys() === []`): a plugin that works perfectly when mounted by its patch and looks
15
+ * like an empty package to every tool that inspects it. That is a bad trade for one re-export line.
16
+ *
17
+ * WHY NOT MOVE THE PLUGIN HERE
18
+ *
19
+ * Re-exporting is not relocating: `./tools.js` stays the single definition, so there is still
20
+ * exactly one implementation of the plugin surface to keep in sync. Mounting *both* this entry and
21
+ * the subpath would register the eight tools twice, which is why the patch keeps naming the subpath
22
+ * instead of falling back to the "the root is the plugin" convention.
12
23
  */
13
- export {};
24
+ export { apply, inject, resetDefineToolCacheForTests } from './tools.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twinsearth/w2m-dsh-plugin",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "DSH: Windows2MacOS — drive the same project on online Windows and macOS machines from one DeepSeek account, across networks and regions. P2P hole punching is the default path (relay + shared server as rendezvous, ledger and fallback), with a bundled STUN responder, Tailscale/public-VPS/tunnel shapes, Rabbit relay + per-machine Localside + eight DSH tools (replicate / split), nine aggregate verdicts and signed requests.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -110,7 +110,7 @@ const MAX_STAGES = 16;
110
110
  * `package.json` during `scripts/pack.mjs` rather than hand-maintained, and `W2M_PLUGIN_VERSION`
111
111
  * overrides it at runtime for tests and packagers.
112
112
  */
113
- const PLUGIN_VERSION = '0.4.6';
113
+ const PLUGIN_VERSION = '0.4.8';
114
114
 
115
115
  /** How long any single HTTP call may take before it is aborted, in milliseconds. */
116
116
  const DEFAULT_REQUEST_TIMEOUT_MS = 15_000;