dsh-syn-config 0.7.1 → 0.7.2
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/docs/RELEASE.md +11 -4
- package/lib/core/history.js +9 -4
- package/package.json +1 -1
- package/scripts/publish-check.mjs +1 -1
package/docs/RELEASE.md
CHANGED
|
@@ -14,12 +14,19 @@ node scripts/verify.mjs # 安装形态
|
|
|
14
14
|
|
|
15
15
|
## 1. 发布包(任选其一;推荐两个都做)
|
|
16
16
|
|
|
17
|
-
**A. npm
|
|
17
|
+
**A. npm(已发布)**
|
|
18
|
+
|
|
19
|
+
`dsh-syn-config@0.7.1` 已在 registry 上:<https://www.npmjs.com/package/dsh-syn-config>(34 个文件,234 KB unpacked)。
|
|
20
|
+
|
|
21
|
+
首次发布踩到的两个坑,记下来免得下台机器重踩:
|
|
22
|
+
|
|
23
|
+
1. granular token 若用「Only select packages」选一个**还不存在**的包,作用域是空集 → 403 `You may not perform that action with these credentials`;
|
|
24
|
+
2. 首次发布时 registry 会先挂一个 `0.0.0-stage` 占位版本(staged publishing 机制),真实版本在几分钟后出现,`npm view <name> version` 一开始会看到占位号,不要慌。
|
|
18
25
|
|
|
19
26
|
```bash
|
|
20
|
-
npm login
|
|
21
|
-
|
|
22
|
-
npm
|
|
27
|
+
npm login
|
|
28
|
+
npm publish --access public
|
|
29
|
+
npm view dsh-syn-config version # 0.7.1
|
|
23
30
|
```
|
|
24
31
|
|
|
25
32
|
**B. GitHub Release tarball(不发 npm 时的兜底,市场会优先展示它)**
|
package/lib/core/history.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import { findGit } from './env.js'
|
|
17
17
|
import { runCommand } from './exec.js'
|
|
18
|
-
import { SECRET_PATTERNS } from './files.js'
|
|
18
|
+
import { isPlaceholderMatch, SECRET_PATTERNS } from './files.js'
|
|
19
19
|
|
|
20
20
|
/** Mask the middle of a matched value so a hit is recognisable but not usable. */
|
|
21
21
|
export function maskValue(value) {
|
|
@@ -41,9 +41,10 @@ export async function scanHistory(options) {
|
|
|
41
41
|
|
|
42
42
|
const base = ['-C', repoPath, 'log', '-p', '--no-color', '--no-merges', '-n', String(maxCommits), '--format=%x01%H']
|
|
43
43
|
let result = await runCommand(gitPath, base, { timeoutMs, signal })
|
|
44
|
-
// A repository with large binary-ish skills
|
|
45
|
-
//
|
|
46
|
-
|
|
44
|
+
// A repository with large binary-ish skills overflows one buffer (the error
|
|
45
|
+
// text is not guaranteed: Node reports it in `code`, not `stderr`). Retry on
|
|
46
|
+
// any failure, restricted to the paths that can actually carry credentials.
|
|
47
|
+
if (!result.ok) {
|
|
47
48
|
result = await runCommand(
|
|
48
49
|
gitPath,
|
|
49
50
|
[...base, '--', 'profiles', 'scripts', 'AGENTS.md', 'weekly'],
|
|
@@ -81,6 +82,10 @@ export async function scanHistory(options) {
|
|
|
81
82
|
SECRET_PATTERNS[index].lastIndex = 0
|
|
82
83
|
const match = SECRET_PATTERNS[index].exec(added)
|
|
83
84
|
if (match === null) continue
|
|
85
|
+
// The same placeholder rule as the working-tree scan: a fixture that
|
|
86
|
+
// writes `API_KEY=dummy_test_value_0001` is not a leaked credential, and
|
|
87
|
+
// reporting it in history trains people to ignore the whole section.
|
|
88
|
+
if (isPlaceholderMatch(match[0])) continue
|
|
84
89
|
hits.push({
|
|
85
90
|
commit: current,
|
|
86
91
|
pattern: index,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-syn-config",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Cross-platform (macOS + Windows) DeepSeek Harness plugin that syncs DSH config — skills, profile settings, AGENTS.md — with a private dsh-config repository.",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@ const here = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
|
|
24
24
|
const argv = process.argv.slice(2)
|
|
25
25
|
let repo = here
|
|
26
26
|
// Documented examples that are intentionally generic.
|
|
27
|
-
const allowed = ['/Users/you/', 'Dreamaniax', 'awesome-dsh-plugin']
|
|
27
|
+
const allowed = ['/Users/you/', 'Dreamaniax', 'awesome-dsh-plugin', 'users.noreply.github.com']
|
|
28
28
|
for (let index = 0; index < argv.length; index += 1) {
|
|
29
29
|
if (argv[index] === '--repo') {
|
|
30
30
|
repo = resolve(argv[index + 1] ?? '')
|