Import patches/0001-fork-identity-package-name-versions-binaries-packagi.patch
This commit is contained in:
parent
331e7c4343
commit
3d0ef72b28
|
|
@ -0,0 +1,491 @@
|
|||
From 54e22c3d13f15c9992f2107aad07ff428d98ad1b Mon Sep 17 00:00:00 2001
|
||||
From: rainow <rainow@users.noreply.github.com>
|
||||
Date: Fri, 13 Nov 2026 11:45:58 +0800
|
||||
Subject: [PATCH 1/3] fork: identity (package name, versions, binaries,
|
||||
packaging checks, sync script)
|
||||
|
||||
---
|
||||
cordis.patch.yml | 2 +-
|
||||
dsh-plugin.json | 8 +-
|
||||
package.json | 13 ++--
|
||||
...ss-remote.js => ds-harness-remote-fast.js} | 0
|
||||
packages/plugin/cordis.patch.yml | 2 +-
|
||||
packages/plugin/dsh-plugin.json | 8 +-
|
||||
packages/plugin/package.json | 13 ++--
|
||||
packages/plugin/public.d.ts | 4 +-
|
||||
packages/plugin/scripts/build-bundles.mjs | 4 +-
|
||||
packages/plugin/src/cli.ts | 6 +-
|
||||
packages/plugin/src/update-check.ts | 4 +-
|
||||
packages/plugin/src/version.ts | 4 +-
|
||||
scripts/install.sh | 10 +--
|
||||
scripts/sync-upstream.sh | 75 +++++++++++++++++++
|
||||
scripts/verify-dsh-plugin.mjs | 14 ++--
|
||||
scripts/verify-packed-webrtc-runtime.mjs | 2 +-
|
||||
scripts/verify-packed-webrtc.mjs | 2 +-
|
||||
17 files changed, 123 insertions(+), 48 deletions(-)
|
||||
rename packages/plugin/bin/{ds-harness-remote.js => ds-harness-remote-fast.js} (100%)
|
||||
create mode 100755 scripts/sync-upstream.sh
|
||||
|
||||
diff --git a/cordis.patch.yml b/cordis.patch.yml
|
||||
index 1aa839b..fcfd36c 100644
|
||||
--- a/cordis.patch.yml
|
||||
+++ b/cordis.patch.yml
|
||||
@@ -6,7 +6,7 @@
|
||||
# is deferred to a later release, so no terminal-specific entry is inserted.
|
||||
- insert:
|
||||
- id: ds-harness-remote
|
||||
- name: ds-harness-remote
|
||||
+ name: ds-harness-remote-fast
|
||||
inject:
|
||||
- webServer
|
||||
config:
|
||||
diff --git a/dsh-plugin.json b/dsh-plugin.json
|
||||
index f218dec..f6c84d1 100644
|
||||
--- a/dsh-plugin.json
|
||||
+++ b/dsh-plugin.json
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
|
||||
- "id": "com.r2049.ds-harness-remote",
|
||||
- "name": "ds-harness-remote",
|
||||
- "version": "0.6.4",
|
||||
+ "id": "top.rainow.ds-harness-remote-fast",
|
||||
+ "name": "ds-harness-remote-fast",
|
||||
+ "version": "0.6.4-fast.5",
|
||||
"manifestVersion": "0.15",
|
||||
"facets": {
|
||||
"host": {
|
||||
@@ -13,6 +13,6 @@
|
||||
"subscriptions": [],
|
||||
"license": "MIT",
|
||||
"source": {
|
||||
- "repository": "https://github.com/liguobao/ds-harness-remote"
|
||||
+ "repository": "https://github.com/rainow/ds-harness-remote-fast"
|
||||
}
|
||||
}
|
||||
diff --git a/package.json b/package.json
|
||||
index 9b98da5..26ba47c 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -1,31 +1,30 @@
|
||||
{
|
||||
- "name": "ds-harness-remote",
|
||||
- "version": "0.6.4",
|
||||
+ "name": "ds-harness-remote-fast",
|
||||
+ "version": "0.6.4-fast.5",
|
||||
"description": "P2P-based, end-to-end encrypted remote access to DeepSeek Harness, CodeX, Claude Code, Pi, and other workspaces from web and mobile clients.",
|
||||
"keywords": [
|
||||
"deepseek",
|
||||
"deepseek-harness",
|
||||
"dsh",
|
||||
- "dsh-plugin",
|
||||
"codex",
|
||||
"remote-development",
|
||||
"end-to-end-encryption",
|
||||
"webrtc"
|
||||
],
|
||||
- "homepage": "https://github.com/liguobao/ds-harness-remote#readme",
|
||||
+ "homepage": "https://github.com/rainow/ds-harness-remote-fast#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
- "url": "git+https://github.com/liguobao/ds-harness-remote.git"
|
||||
+ "url": "git+https://github.com/rainow/ds-harness-remote-fast.git"
|
||||
},
|
||||
"bugs": {
|
||||
- "url": "https://github.com/liguobao/ds-harness-remote/issues"
|
||||
+ "url": "https://github.com/rainow/ds-harness-remote-fast/issues"
|
||||
},
|
||||
"author": "liguobao <lgb835485368@gmail.com>",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"main": "./index.js",
|
||||
"bin": {
|
||||
- "ds-harness-remote": "./packages/plugin/bin/ds-harness-remote.js"
|
||||
+ "ds-harness-remote-fast": "./packages/plugin/bin/ds-harness-remote-fast.js"
|
||||
},
|
||||
"types": "./packages/plugin/public.d.ts",
|
||||
"exports": {
|
||||
diff --git a/packages/plugin/bin/ds-harness-remote.js b/packages/plugin/bin/ds-harness-remote-fast.js
|
||||
similarity index 100%
|
||||
rename from packages/plugin/bin/ds-harness-remote.js
|
||||
rename to packages/plugin/bin/ds-harness-remote-fast.js
|
||||
diff --git a/packages/plugin/cordis.patch.yml b/packages/plugin/cordis.patch.yml
|
||||
index a5e00d0..81806ae 100644
|
||||
--- a/packages/plugin/cordis.patch.yml
|
||||
+++ b/packages/plugin/cordis.patch.yml
|
||||
@@ -2,7 +2,7 @@
|
||||
# is deferred to a later release, so no terminal-specific entry is inserted.
|
||||
- insert:
|
||||
- id: ds-harness-remote
|
||||
- name: 'ds-harness-remote'
|
||||
+ name: 'ds-harness-remote-fast'
|
||||
config:
|
||||
enabled: true
|
||||
role: host
|
||||
diff --git a/packages/plugin/dsh-plugin.json b/packages/plugin/dsh-plugin.json
|
||||
index 6c637a8..6c27a70 100644
|
||||
--- a/packages/plugin/dsh-plugin.json
|
||||
+++ b/packages/plugin/dsh-plugin.json
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
|
||||
- "id": "com.r2049.ds-harness-remote",
|
||||
- "name": "ds-harness-remote",
|
||||
- "version": "0.6.4",
|
||||
+ "id": "top.rainow.ds-harness-remote-fast",
|
||||
+ "name": "ds-harness-remote-fast",
|
||||
+ "version": "0.6.4-fast.5",
|
||||
"manifestVersion": "0.15",
|
||||
"facets": {
|
||||
"host": {
|
||||
@@ -13,6 +13,6 @@
|
||||
"subscriptions": [],
|
||||
"license": "MIT",
|
||||
"source": {
|
||||
- "repository": "https://github.com/liguobao/ds-harness-remote"
|
||||
+ "repository": "https://github.com/rainow/ds-harness-remote-fast"
|
||||
}
|
||||
}
|
||||
diff --git a/packages/plugin/package.json b/packages/plugin/package.json
|
||||
index 18dc8ed..1fa47d7 100644
|
||||
--- a/packages/plugin/package.json
|
||||
+++ b/packages/plugin/package.json
|
||||
@@ -1,25 +1,24 @@
|
||||
{
|
||||
- "name": "ds-harness-remote",
|
||||
- "version": "0.6.4",
|
||||
+ "name": "ds-harness-remote-fast",
|
||||
+ "version": "0.6.4-fast.5",
|
||||
"description": "P2P-based, end-to-end encrypted remote access to DeepSeek Harness, CodeX, Claude Code, Pi, and other workspaces from web and mobile clients.",
|
||||
"keywords": [
|
||||
"deepseek",
|
||||
"deepseek-harness",
|
||||
"dsh",
|
||||
- "dsh-plugin",
|
||||
"codex",
|
||||
"remote-development",
|
||||
"end-to-end-encryption",
|
||||
"webrtc"
|
||||
],
|
||||
- "homepage": "https://github.com/liguobao/ds-harness-remote#readme",
|
||||
+ "homepage": "https://github.com/rainow/ds-harness-remote-fast#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
- "url": "git+https://github.com/liguobao/ds-harness-remote.git",
|
||||
+ "url": "git+https://github.com/rainow/ds-harness-remote-fast.git",
|
||||
"directory": "packages/plugin"
|
||||
},
|
||||
"bugs": {
|
||||
- "url": "https://github.com/liguobao/ds-harness-remote/issues"
|
||||
+ "url": "https://github.com/rainow/ds-harness-remote-fast/issues"
|
||||
},
|
||||
"author": "liguobao <lgb835485368@gmail.com>",
|
||||
"license": "MIT",
|
||||
@@ -30,7 +29,7 @@
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"bin": {
|
||||
- "ds-harness-remote": "./bin/ds-harness-remote.js"
|
||||
+ "ds-harness-remote-fast": "./bin/ds-harness-remote-fast.js"
|
||||
},
|
||||
"types": "./public.d.ts",
|
||||
"exports": {
|
||||
diff --git a/packages/plugin/public.d.ts b/packages/plugin/public.d.ts
|
||||
index d7ae7ea..83dff40 100644
|
||||
--- a/packages/plugin/public.d.ts
|
||||
+++ b/packages/plugin/public.d.ts
|
||||
@@ -9,6 +9,8 @@ export interface Config {
|
||||
loopback?: { ports?: number[] }
|
||||
forceRelay?: boolean
|
||||
logLevel?: 'debug' | 'info' | 'warn' | 'error'
|
||||
+ /** Fast mode: trim what a remote client receives. Defaults to true. */
|
||||
+ liteMode?: boolean
|
||||
reconnect?: boolean | {
|
||||
initialDelayMs?: number
|
||||
maxDelayMs?: number
|
||||
@@ -20,7 +22,7 @@ export interface Config {
|
||||
}
|
||||
}
|
||||
|
||||
-export declare const name: 'ds-harness-remote'
|
||||
+export declare const name: 'ds-harness-remote-fast'
|
||||
export declare const Config: unknown
|
||||
export declare function apply(ctx: Context, config?: Config | Volatile<Config>): void
|
||||
export declare function runCli(args?: readonly string[]): Promise<number>
|
||||
diff --git a/packages/plugin/scripts/build-bundles.mjs b/packages/plugin/scripts/build-bundles.mjs
|
||||
index f6d34f3..33dfad0 100644
|
||||
--- a/packages/plugin/scripts/build-bundles.mjs
|
||||
+++ b/packages/plugin/scripts/build-bundles.mjs
|
||||
@@ -63,8 +63,8 @@ await buildBundle({
|
||||
})
|
||||
|
||||
for (const [moduleId, outfile] of [
|
||||
- ['ds-harness-remote', 'client.js'],
|
||||
- ['ds-harness-remote', 'client.github.js'],
|
||||
+ ['ds-harness-remote-fast', 'client.js'],
|
||||
+ ['ds-harness-remote-fast', 'client.github.js'],
|
||||
]) {
|
||||
await buildBundle({
|
||||
entryPoints: [join(root, 'src/client.ts')],
|
||||
diff --git a/packages/plugin/src/cli.ts b/packages/plugin/src/cli.ts
|
||||
index 9a8eb00..9ae490c 100644
|
||||
--- a/packages/plugin/src/cli.ts
|
||||
+++ b/packages/plugin/src/cli.ts
|
||||
@@ -98,7 +98,7 @@ export async function runCli(
|
||||
|
||||
async function register(args: readonly string[], runtime: CliRuntime): Promise<number> {
|
||||
if (args.length !== 1 || args[0] === undefined || args[0].trim() === '') {
|
||||
- throw new CliUsageError('Usage: ds-harness-remote register <server-token>')
|
||||
+ throw new CliUsageError('Usage: ds-harness-remote-fast register <server-token>')
|
||||
}
|
||||
const context = await hostContext(runtime)
|
||||
await context.api.authorizeHostWithCode(context.identity, args[0])
|
||||
@@ -107,12 +107,12 @@ async function register(args: readonly string[], runtime: CliRuntime): Promise<n
|
||||
}
|
||||
|
||||
async function login(args: readonly string[], runtime: CliRuntime): Promise<number> {
|
||||
- if (args.length > 1) throw new CliUsageError('Usage: ds-harness-remote login [provider|list]')
|
||||
+ if (args.length > 1) throw new CliUsageError('Usage: ds-harness-remote-fast login [provider|list]')
|
||||
const context = await hostContext(runtime)
|
||||
const providers = (await context.api.oauthProviders()).filter(item => item.qrStartUrl != null)
|
||||
if (args[0] === 'list') {
|
||||
write(runtime.stdout, providers.length === 0 ? 'No QR sign-in providers are available.\n'
|
||||
- : providers.map(item => `${item.displayName}: ds-harness-remote login ${item.id}\n`).join(''))
|
||||
+ : providers.map(item => `${item.displayName}: ds-harness-remote-fast login ${item.id}\n`).join(''))
|
||||
return 0
|
||||
}
|
||||
const selected = args[0] === undefined
|
||||
diff --git a/packages/plugin/src/update-check.ts b/packages/plugin/src/update-check.ts
|
||||
index 022187f..3ba408b 100644
|
||||
--- a/packages/plugin/src/update-check.ts
|
||||
+++ b/packages/plugin/src/update-check.ts
|
||||
@@ -16,8 +16,8 @@ export interface PluginUpdateSnapshot {
|
||||
|
||||
/** dist-tags endpoints raced in parallel; the mirror backs up the official registry. */
|
||||
const DIST_TAG_URLS = [
|
||||
- 'https://registry.npmjs.org/-/package/ds-harness-remote/dist-tags',
|
||||
- 'https://registry.npmmirror.com/-/package/ds-harness-remote/dist-tags',
|
||||
+ 'https://registry.npmjs.org/-/package/ds-harness-remote-fast/dist-tags',
|
||||
+ 'https://registry.npmmirror.com/-/package/ds-harness-remote-fast/dist-tags',
|
||||
]
|
||||
const FETCH_TIMEOUT_MS = 10_000
|
||||
const RECHECK_INTERVAL_MS = 24 * 60 * 60 * 1000
|
||||
diff --git a/packages/plugin/src/version.ts b/packages/plugin/src/version.ts
|
||||
index f1d42f9..377c853 100644
|
||||
--- a/packages/plugin/src/version.ts
|
||||
+++ b/packages/plugin/src/version.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
- * Version of the `ds-harness-remote` distribution.
|
||||
+ * Version of the `ds-harness-remote-fast` distribution.
|
||||
*
|
||||
* This is reported to the Server during device registration (`clientVersion`
|
||||
* in the Device Descriptor) and again in the WebSocket `hello` frame. The
|
||||
@@ -8,4 +8,4 @@
|
||||
* If they diverge, `npm scripts` checks in `scripts/verify-version-sync.mjs`
|
||||
* will fail fast during build/check/test.
|
||||
*/
|
||||
-export const PLUGIN_VERSION = '0.6.4'
|
||||
+export const PLUGIN_VERSION = '0.6.4-fast.5'
|
||||
diff --git a/scripts/install.sh b/scripts/install.sh
|
||||
index ea15489..106c320 100755
|
||||
--- a/scripts/install.sh
|
||||
+++ b/scripts/install.sh
|
||||
@@ -81,7 +81,7 @@ elif [[ "$os" = Linux ]]; then
|
||||
{ printf '#!/usr/bin/env bash\n# ds-harness-remote managed private runtime\n'; printf 'export PATH=%q:"$PATH"\n' "$runtime/node/bin:$runtime/harness/node_modules/.bin"; printf 'exec %q "$@"\n' "$runtime/harness/node_modules/.bin/dsh"; } > "$DSH_COMMAND"
|
||||
chmod 755 "$DSH_COMMAND"
|
||||
else
|
||||
- fail "No existing dsh command found. Install via Desktop Extensions / Plugin management (https://github.com/liguobao/ds-harness-remote), or enable Desktop's official dsh launcher."
|
||||
+ fail "No existing dsh command found. Install via Desktop Extensions / Plugin management (https://github.com/rainow/ds-harness-remote-fast), or enable Desktop's official dsh launcher."
|
||||
fi
|
||||
# plugin exec changes cwd; service ExecStart must also use an absolute executable.
|
||||
if [[ "$DSH_COMMAND" != /* ]]; then DSH_COMMAND="$(pwd -P)/$DSH_COMMAND"; fi
|
||||
@@ -139,7 +139,7 @@ function abort(message) { const error = new Error(message); error.installerSafe
|
||||
}
|
||||
if (autostart === '1') checkOwner();
|
||||
if (mode === 'owner') return;
|
||||
- const pkgPath = req.resolve('ds-harness-remote/package.json');
|
||||
+ const pkgPath = req.resolve('ds-harness-remote-fast/package.json');
|
||||
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
||||
const entry = pkg.exports?.['.']?.import || pkg.main;
|
||||
if (typeof entry !== 'string') abort('Remote package has no import entry');
|
||||
@@ -167,7 +167,7 @@ function abort(message) { const error = new Error(message); error.installerSafe
|
||||
walk(tree);
|
||||
// The bundle inserts exactly one static Host entry in this release (dsh-TUI
|
||||
// integration is deferred, so no complementary terminal row exists).
|
||||
- const remotes = entries.filter(e => e.node.name === 'ds-harness-remote' && !e.off && !e.uncertain);
|
||||
+ const remotes = entries.filter(e => e.node.name === 'ds-harness-remote-fast' && !e.off && !e.uncertain);
|
||||
if (remotes.length !== 1) abort('Remote configuration is missing, ambiguous or dynamically enabled');
|
||||
const input = remotes[0].node.config || {};
|
||||
function staticValue(value) { if(value instanceof Expression) abort('Dynamic Remote configuration is unsupported'); if(value && typeof value === 'object') Object.values(value).forEach(staticValue); }
|
||||
@@ -244,8 +244,8 @@ NODE
|
||||
run_helper() { "$DSH_COMMAND" plugin --profile "$DSH_PROFILE" exec node -e "$helper" "$DSH_COMMAND" "$DSH_PROFILE" "$1" "$autostart" "$DSH_SYSTEMD_DIR"; }
|
||||
# Check service ownership before changing packages, then capabilities before redemption.
|
||||
if [[ "$autostart" = 1 ]]; then run_helper owner; fi
|
||||
-say "Installing ds-harness-remote@${REMOTE_VERSION} into profile ${DSH_PROFILE} using ${DSH_COMMAND}"
|
||||
-"$DSH_COMMAND" plugin --profile "$DSH_PROFILE" add -w "ds-harness-remote@${REMOTE_VERSION}"
|
||||
+say "Installing ds-harness-remote-fast@${REMOTE_VERSION} into profile ${DSH_PROFILE} using ${DSH_COMMAND}"
|
||||
+"$DSH_COMMAND" plugin --profile "$DSH_PROFILE" add -w "ds-harness-remote-fast@${REMOTE_VERSION}"
|
||||
if [[ "$INTELLIGENT_UI" = 1 ]]; then
|
||||
# Same profile as Remote, before any service restart picks up the new bundles.
|
||||
say "Installing deepseek-harness-intelligent-ui@${INTELLIGENT_UI_VERSION} into profile ${DSH_PROFILE}"
|
||||
diff --git a/scripts/sync-upstream.sh b/scripts/sync-upstream.sh
|
||||
new file mode 100755
|
||||
index 0000000..51a8a5f
|
||||
--- /dev/null
|
||||
+++ b/scripts/sync-upstream.sh
|
||||
@@ -0,0 +1,75 @@
|
||||
+#!/usr/bin/env bash
|
||||
+# Rebuild the `lite` branch on top of the latest upstream `main` by replaying
|
||||
+# patches/*.patch, then rebuild the committed bundles and verify.
|
||||
+#
|
||||
+# Why patches instead of a long-lived rebase: upstream moves fast (100+ commits
|
||||
+# per week) and our fork is a handful of concerns (identity rename, fast mode,
|
||||
+# docs/CI). A patch series gives one conflict per concern per upstream sync, and
|
||||
+# the resolution lives in the patch file instead of a merge commit.
|
||||
+#
|
||||
+# Usage:
|
||||
+# bash scripts/sync-upstream.sh # sync to upstream/main
|
||||
+# bash scripts/sync-upstream.sh --no-test # skip the slow test run
|
||||
+#
|
||||
+# On conflict: fix the files, `git add -A && git am --continue`, then re-run
|
||||
+# with --no-test; the script regenerates patches/ from the result at the end.
|
||||
+set -euo pipefail
|
||||
+cd "$(dirname "$0")/.."
|
||||
+
|
||||
+UPSTREAM="${UPSTREAM_REMOTE:-upstream}"
|
||||
+BRANCH="${FORK_BRANCH:-lite}"
|
||||
+RUN_TESTS=1
|
||||
+[ "${1:-}" = "--no-test" ] && RUN_TESTS=0
|
||||
+
|
||||
+if [ -n "$(git status --porcelain)" ]; then
|
||||
+ echo "工作区不干净,先提交或 stash" >&2
|
||||
+ exit 1
|
||||
+fi
|
||||
+[ -d patches ] || { echo "缺少 patches/ 目录" >&2; exit 1; }
|
||||
+
|
||||
+git fetch "$UPSTREAM" main --depth=120
|
||||
+BASE=$(git rev-parse "$UPSTREAM/main")
|
||||
+echo "上游基线:$BASE $(git log -1 --format=%s "$BASE")"
|
||||
+
|
||||
+# Keep the previous state addressable; the sync rewrites `lite` history.
|
||||
+git branch -f "backup/$BRANCH-$(date +%Y%m%d-%H%M%S)" "$BRANCH" 2>/dev/null || true
|
||||
+
|
||||
+# `patches/` is tracked on this branch but not in the upstream tree we are
|
||||
+# about to check out, so stage a copy before switching.
|
||||
+PATCH_DIR=$(mktemp -d)
|
||||
+cp patches/*.patch "$PATCH_DIR"/
|
||||
+trap 'rm -rf "$PATCH_DIR"' EXIT
|
||||
+
|
||||
+git checkout -B "$BRANCH" "$BASE"
|
||||
+
|
||||
+if ! git am -3 "$PATCH_DIR"/*.patch; then
|
||||
+ cat >&2 <<'MSG'
|
||||
+停止在补丁冲突处。规则:改的是 patch,不是工作区。
|
||||
+ 1) 手工解冲突,让源码回到「上游新代码 + 我们的 fork 改动」的正确形态
|
||||
+ 2) git add -A && git am --continue
|
||||
+ 3) bash scripts/sync-upstream.sh --no-test # 从下一步继续并刷新 patches/
|
||||
+MSG
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+pnpm install --frozen-lockfile
|
||||
+pnpm --filter './packages/**' -r build
|
||||
+git add packages/plugin/dist
|
||||
+git commit -q -m "chore: rebuild bundles for upstream $(git rev-parse --short "$BASE")"
|
||||
+
|
||||
+npx tsc -p packages/plugin/tsconfig.test.json
|
||||
+node scripts/verify-dsh-plugin.mjs
|
||||
+if [ "$RUN_TESTS" = 1 ]; then
|
||||
+ pnpm -C packages/plugin test
|
||||
+fi
|
||||
+
|
||||
+# Keep the series in sync with what actually applied (HEAD~1 = last patch commit).
|
||||
+rm -rf patches
|
||||
+git format-patch -q "$BASE"..HEAD~1 -o patches
|
||||
+git add patches
|
||||
+git add patches
|
||||
+git commit -q --amend --no-edit
|
||||
+
|
||||
+echo
|
||||
+echo "完成:$BRANCH 现在基于 $(git rev-parse --short "$BASE")"
|
||||
+echo "记得把版本改成 \`<upstream-version>-fast.N\`:packages/plugin/package.json、src/version.ts、dsh-plugin.json ×2、package.json"
|
||||
diff --git a/scripts/verify-dsh-plugin.mjs b/scripts/verify-dsh-plugin.mjs
|
||||
index f50df75..276c3b5 100644
|
||||
--- a/scripts/verify-dsh-plugin.mjs
|
||||
+++ b/scripts/verify-dsh-plugin.mjs
|
||||
@@ -11,7 +11,7 @@ const pluginManifest = JSON.parse(readFileSync(join(root, 'packages/plugin/packa
|
||||
const componentManifest = JSON.parse(readFileSync(join(root, 'dsh-plugin.json'), 'utf8'))
|
||||
const pluginComponentManifest = JSON.parse(readFileSync(join(root, 'packages/plugin/dsh-plugin.json'), 'utf8'))
|
||||
|
||||
-assert.equal(manifest.name, 'ds-harness-remote', 'root package must use the canonical DSH installation id')
|
||||
+assert.equal(manifest.name, 'ds-harness-remote-fast', 'root package must use the canonical DSH installation id')
|
||||
assert.equal(pluginManifest.name, manifest.name, 'root and npm plugin package ids must stay unified')
|
||||
assert.equal(pluginManifest.version, manifest.version, 'root and npm plugin versions must stay unified')
|
||||
assert.equal(componentManifest.name, manifest.name, 'root Component manifest must use the canonical plugin id')
|
||||
@@ -49,14 +49,14 @@ assert.ok(
|
||||
)
|
||||
assert.equal(manifest.main, './index.js', 'root package must expose a prebuilt Host entry at package root')
|
||||
assert.equal(
|
||||
- manifest.bin?.['ds-harness-remote'],
|
||||
- './packages/plugin/bin/ds-harness-remote.js',
|
||||
+ manifest.bin?.['ds-harness-remote-fast'],
|
||||
+ './packages/plugin/bin/ds-harness-remote-fast.js',
|
||||
'root package must expose the Remote CLI',
|
||||
)
|
||||
assert.equal(manifest.bin?.remote, undefined, 'root package must not install a standalone remote executable')
|
||||
assert.equal(
|
||||
- pluginManifest.bin?.['ds-harness-remote'],
|
||||
- './bin/ds-harness-remote.js',
|
||||
+ pluginManifest.bin?.['ds-harness-remote-fast'],
|
||||
+ './bin/ds-harness-remote-fast.js',
|
||||
'npm plugin package must expose the Remote CLI',
|
||||
)
|
||||
assert.equal(pluginManifest.bin?.remote, undefined, 'npm package must not install a standalone remote executable')
|
||||
@@ -79,7 +79,7 @@ for (const file of [
|
||||
'packages/plugin/dist/index.js',
|
||||
'packages/plugin/dist/client.github.js',
|
||||
'packages/plugin/public.d.ts',
|
||||
- 'packages/plugin/bin/ds-harness-remote.js',
|
||||
+ 'packages/plugin/bin/ds-harness-remote-fast.js',
|
||||
]) {
|
||||
assert.ok(existsSync(join(root, file)), `DSH plugin artifact is missing: ${file}`)
|
||||
}
|
||||
@@ -108,7 +108,7 @@ const rootHostEntry = readFileSync(join(root, 'index.js'), 'utf8')
|
||||
assert.match(rootHostEntry, /packages\/plugin\/dist\/index\.js/, 'root Host entry must forward to the committed bundle')
|
||||
|
||||
const publicTypes = readFileSync(join(root, 'packages/plugin/public.d.ts'), 'utf8')
|
||||
-assert.match(publicTypes, /name:\s*'ds-harness-remote'/, 'public types must expose the canonical plugin id')
|
||||
+assert.match(publicTypes, /name:\s*'ds-harness-remote-fast'/, 'public types must expose the canonical plugin id')
|
||||
|
||||
const hostBundle = readFileSync(join(root, 'packages/plugin/dist/index.js'), 'utf8')
|
||||
assert.doesNotMatch(hostBundle, /(?:from\s+|require\()['\"]@dsh-remote\//, 'Host bundle must not import unpublished workspace packages')
|
||||
diff --git a/scripts/verify-packed-webrtc-runtime.mjs b/scripts/verify-packed-webrtc-runtime.mjs
|
||||
index 3553f11..cc13d14 100644
|
||||
--- a/scripts/verify-packed-webrtc-runtime.mjs
|
||||
+++ b/scripts/verify-packed-webrtc-runtime.mjs
|
||||
@@ -29,7 +29,7 @@ const deadline = setTimeout(() => { console.error('packed WebRTC smoke timed out
|
||||
const peers = []
|
||||
try {
|
||||
const plugin = await import(entry)
|
||||
- assert.equal(plugin.name, 'ds-harness-remote')
|
||||
+ assert.equal(plugin.name, 'ds-harness-remote-fast')
|
||||
assert.equal(typeof plugin.apply, 'function')
|
||||
assert.equal(nativeAttempts, 0, 'package import must not initialize native RTC')
|
||||
const runtime = await import(`${bundle}?transport-smoke`)
|
||||
diff --git a/scripts/verify-packed-webrtc.mjs b/scripts/verify-packed-webrtc.mjs
|
||||
index 1d8102a..416ca94 100644
|
||||
--- a/scripts/verify-packed-webrtc.mjs
|
||||
+++ b/scripts/verify-packed-webrtc.mjs
|
||||
@@ -72,7 +72,7 @@ try {
|
||||
join(destination, pack.filename)], generation)
|
||||
const modules = join(generation, 'node_modules')
|
||||
const count = verifyClosure(modules, generation, installation)
|
||||
- const plugin = join(modules, 'ds-harness-remote')
|
||||
+ const plugin = join(modules, 'ds-harness-remote-fast')
|
||||
const manifest = JSON.parse(readFileSync(join(plugin, 'package.json'), 'utf8'))
|
||||
assert.equal(manifest.dependencies?.werift, undefined)
|
||||
// An ordinary import tests the untouched package entry. A second import
|
||||
--
|
||||
2.56.0
|
||||
|
||||
Loading…
Reference in New Issue