Przeglądaj źródła

fix: 更新微信小程序密钥路径配置

- 更新发布脚本使用正确的密钥路径
- 企业小程序密钥: mini/certs/private.upload.key
- 人才小程序密钥: mini-talent/certs/private.upload.key
- 更新 weapp-publish Skill 文档中的密钥路径说明
- 修复未使用的 result 变量警告

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 2 dni temu
rodzic
commit
481a2897a6

+ 6 - 4
.claude/skills/weapp-publish/SKILL.md

@@ -33,8 +33,10 @@ pnpm add -g miniprogram-ci
 
 使用小程序管理员身份访问"微信公众平台 > 开发 > 开发设置",下载代码上传密钥。
 
-**企业小程序密钥文件**: `keys/private.wx1e791ed2e0229eb8.key`
-**人才小程序密钥文件**: `keys/private.wx3c47dbce1ea7d43c.key`
+**企业小程序密钥文件**: `mini/certs/private.upload.key`
+**人才小程序密钥文件**: `mini-talent/certs/private.upload.key`
+
+> 密钥文件已存在于各自小程序目录的 `certs/` 目录下。
 
 ### 3. 配置 IP 白名单
 
@@ -85,7 +87,7 @@ const MINI_CONFIGS = {
     name: '企业小程序',
     appid: 'wx1e791ed2e0229eb8',
     projectPath: path.resolve(__dirname, '../mini'),
-    privateKeyPath: path.resolve(__dirname, '../keys/private.wx1e791ed2e0229eb8.key'),
+    privateKeyPath: path.resolve(__dirname, '../mini/certs/private.upload.key'),
     buildCmd: 'cd mini && pnpm build:weapp',
     distPath: 'dist/weapp',
   },
@@ -93,7 +95,7 @@ const MINI_CONFIGS = {
     name: '人才小程序',
     appid: 'wx3c47dbce1ea7d43c',
     projectPath: path.resolve(__dirname, '../mini-talent'),
-    privateKeyPath: path.resolve(__dirname, '../keys/private.wx3c47dbce1ea7d43c.key'),
+    privateKeyPath: path.resolve(__dirname, '../mini-talent/certs/private.upload.key'),
     buildCmd: 'cd mini-talent && pnpm build:weapp',
     distPath: 'dist/weapp',
   },

+ 3 - 3
scripts/publish-weapp.js

@@ -8,7 +8,7 @@ const MINI_CONFIGS = {
     name: '企业小程序',
     appid: 'wx1e791ed2e0229eb8',
     projectPath: path.resolve(__dirname, '../mini'),
-    privateKeyPath: path.resolve(__dirname, '../keys/private.wx1e791ed2e0229eb8.key'),
+    privateKeyPath: path.resolve(__dirname, '../mini/certs/private.upload.key'),
     buildCmd: 'cd mini && pnpm build:weapp',
     distPath: 'dist/weapp',
   },
@@ -16,7 +16,7 @@ const MINI_CONFIGS = {
     name: '人才小程序',
     appid: 'wx3c47dbce1ea7d43c',
     projectPath: path.resolve(__dirname, '../mini-talent'),
-    privateKeyPath: path.resolve(__dirname, '../keys/private.wx3c47dbce1ea7d43c.key'),
+    privateKeyPath: path.resolve(__dirname, '../mini-talent/certs/private.upload.key'),
     buildCmd: 'cd mini-talent && pnpm build:weapp',
     distPath: 'dist/weapp',
   },
@@ -102,7 +102,7 @@ async function previewMiniProject(config, options) {
   })
 
   try {
-    const result = await ci.preview({
+    await ci.preview({
       project,
       desc,
       setting: { useProjectConfig: true },