magpie-plugin-loomy-auth 0.1.20 → 0.1.21

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/AGENTS.md CHANGED
@@ -80,7 +80,7 @@ node tests/semantics.test.mjs
80
80
  # 打包面预演
81
81
  npm pack --dry-run
82
82
 
83
- # 发布(包内 name 是 讯飞 Loomy,npm 包名是 magpie-plugin-loomy-auth)
83
+ # 发布(包内 name 是 ASCII slug magpie-plugin-loomy-auth;显示名在 magpie.name)
84
84
  npm run publish:npm
85
85
 
86
86
  # Release:本仓库有 release.yml,推 tag 后 workflow 自动建(不用手工 POST)
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  > 每个版本一节,**一条一行**,说用户能感知的变化。
4
4
  > 格式与发布流程见 [magpie-plugin-scaffold](https://github.com/MYCF711/magpie-plugin-scaffold) 的 [UPDATING.md](https://github.com/MYCF711/magpie-plugin-scaffold/blob/main/UPDATING.md)。
5
5
 
6
+ ## 0.1.21 — 2026-10-31
7
+
8
+ - **显示名迁移到 `magpie.name`**:`package.json` 的 `name` 改回 ASCII slug `magpie-plugin-loomy-auth`(bun 依赖键,避免 `plugin update` 报 `unrecognised dependency format`);卡片标题由 `magpie.name: "讯飞 Loomy"` 提供(magpie 0.1.2404 的 `magpie.name` 修复)
9
+ - provider 名保持 `讯飞 Loomy`;`registry-entry.json` 的 `name` 同步,`package` 仍是 npm 包名
6
10
  ## 0.1.20 — 2026-10-31
7
11
 
8
12
  - **卡片显示名改为「讯飞 Loomy」**:按新约定写成 `<中文> <English>`,英文部分照厂商官方写法 `Loomy`;provider 的 `name` 同步改,市场条目的 `name` 也同步。官方站点(https://loomy.xunfei.cn/)的标题与 description 只写「Loomy」,中文部分是厂商名「讯飞」,没有独立中文产品名
package/CHECKLIST.md CHANGED
@@ -75,7 +75,7 @@
75
75
  □ 第 3 步 · 提交并推功能分支(不是 main)
76
76
  □ 第 4 步 · PR 的 rules 全绿后合并(禁止直接推 main)
77
77
  □ 第 5 步 · npm run publish:npm
78
- 判据:返回 + magpie-plugin-loomy-auth@<版本>;package.json 的 name 已还原成 Loomy
78
+ 判据:返回 + magpie-plugin-loomy-auth@<版本>;package.json 的 name 保持 ASCII slug,显示名在 magpie.name
79
79
  □ 第 6 步 · tag + Release
80
80
  命令:git tag v<version> && git push origin v<version>
81
81
  本仓库**有** .github/workflows/release.yml ⇒ 推 tag 后 workflow 自动建,不用手工 POST
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magpie-plugin-loomy-auth",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "讯飞 Loomy (iFlytek) for magpie: desktop-session import / SMS / session sign-in, live model catalog with reasoning efforts, chat with tools and images, and the two credit pools reported as the host routes them — the daily pool counts, the permanent one is shown aside.",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
@@ -44,7 +44,8 @@
44
44
  },
45
45
  "magpie": {
46
46
  "icon": "https://raw.githubusercontent.com/MYCF711/magpie-loomy-auth/main/assets/icon.png",
47
- "maxConcurrency": 4
47
+ "maxConcurrency": 4,
48
+ "name": "讯飞 Loomy"
48
49
  },
49
50
  "bugs": {
50
51
  "url": "https://github.com/MYCF711/magpie-loomy-auth/issues"
package/publish-npm.mjs CHANGED
@@ -1,40 +1,33 @@
1
- // 发布到 npm 的包装器 —— 用 `npm run publish:npm`,不要裸跑 `npm publish`。
1
+ // 发布到 npm 的包装器 —— 用 `npm run publish:npm`。
2
2
  //
3
- // 为什么要有它:两个读者开的是**同一个** package.json。
3
+ // package.json 的 name 现在是 ASCII slug(magpie-plugin-loomy-auth),也就是 npm 包名;
4
+ // 卡片标题改用 magpie.name(讯飞 Loomy)。所以发布时不需要再临时换 name。
4
5
  //
5
- // bun(magpie 的 git 安装)读它 → 决定插件卡片上的标题(依赖键 = name)
6
- // npm publish 读它 → 决定包名
7
- //
8
- // npm 不允许**新**包名含大写(registry 会拒:name can no longer contain capital
9
- // letters),而卡片标题想要供应商自己的写法。所以发布这一下把 name 换成 npm 上的
10
- // 包名,发完立刻还原 —— 仓库里永远留着好看的那个名字。
11
- //
12
- // ⚠ 从此不要裸跑 `npm publish`:那会拿 "讯飞 Loomy" 去发,被 registry 拒绝。
13
- // ⚠ 机制说明见 magpie-plugin-scaffold 的 UPDATING.md。
6
+ // 保留这个包装器是为了旧分支/旧文档仍走同一条命令;它只在 name 与 PUBLISH_AS
7
+ // 不一致时才临时换名,发布后无论成败都恢复。
14
8
 
15
9
  import fs from "node:fs"
16
10
  import { fileURLToPath } from "node:url"
17
11
  import { execSync } from "node:child_process"
18
12
 
19
- /** npm 上的包名。与仓库里的 name 不同是**故意的** —— 已装的用户按这个名收更新。 */
13
+ /** npm 上的包名。与仓库里的 name 相同是正常的。 */
20
14
  const PUBLISH_AS = "magpie-plugin-loomy-auth"
21
15
 
22
16
  const FILE = fileURLToPath(new URL("./package.json", import.meta.url))
23
-
24
17
  const orig = fs.readFileSync(FILE, "utf8")
25
18
  const pkg = JSON.parse(orig)
26
19
 
27
- if (pkg.name === PUBLISH_AS) {
28
- console.error(`package.json 的 name 已经是 ${PUBLISH_AS} —— 没有可换的,停。`)
29
- process.exit(1)
20
+ const renamed = pkg.name !== PUBLISH_AS
21
+ if (renamed) {
22
+ pkg.name = PUBLISH_AS
23
+ fs.writeFileSync(FILE, JSON.stringify(pkg, null, 2) + "\n")
30
24
  }
31
25
 
32
- pkg.name = PUBLISH_AS
33
- fs.writeFileSync(FILE, JSON.stringify(pkg, null, 2) + "\n")
34
-
35
26
  try {
36
- execSync(process.argv[2] || "npm publish", { stdio: "inherit" })
27
+ execSync(process.argv[2] || "npm publish --access public", { stdio: "inherit" })
37
28
  } finally {
38
- fs.writeFileSync(FILE, orig)
39
- console.log(`name 已还原为 ${JSON.parse(orig).name}`)
29
+ if (renamed) {
30
+ fs.writeFileSync(FILE, orig)
31
+ console.log("name 已还原为 " + JSON.parse(orig).name)
32
+ }
40
33
  }