@tmsfe/tmskit 0.0.54 → 0.0.56

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/dist/index.cjs.js CHANGED
@@ -1374,22 +1374,22 @@ const {
1374
1374
 
1375
1375
  /* eslint-disable no-param-reassign */
1376
1376
  /**
1377
- * 检查是否包含 meta-services 分包
1377
+ * 检查是否包含 wechat-skills 分包
1378
1378
  * @param {Object} appJson app.json配置对象
1379
1379
  * @returns {boolean}
1380
1380
  */
1381
- function hasMetaServicesSubpackage(appJson) {
1382
- return appJson.subpackages.some(s => s.root === 'modules/meta-services' || s.name === 'meta-services');
1381
+ function hasWechatSkillsSubpackage(appJson) {
1382
+ return appJson.subpackages.some(s => s.root === 'modules/wechat-skills' || s.name === 'wechat-skills');
1383
1383
  }
1384
1384
 
1385
1385
  /**
1386
- * 处理 agent 配置:根据是否包含 meta-services 分包来添加或删除 agent 配置
1386
+ * 处理 agent 配置:根据是否包含 wechat-skills 分包来添加或删除 agent 配置
1387
1387
  * @param {Object} appJson app.json配置对象
1388
1388
  */
1389
1389
  function handleAgentConfig$1(appJson) {
1390
- const hasMetaServices = hasMetaServicesSubpackage(appJson);
1391
- console.log('🔍', hasMetaServices ? '包含' : '不包含', 'meta-services 分包');
1392
- if (hasMetaServices) {
1390
+ const hasWechatSkills = hasWechatSkillsSubpackage(appJson);
1391
+ console.log('🔍', hasWechatSkills ? '包含' : '不包含', 'wechat-skills 分包');
1392
+ if (hasWechatSkills) {
1393
1393
  if (!appJson.agent) {
1394
1394
  try {
1395
1395
  appJson.agent = require(resolve$i('./agentConfig.json'));
@@ -3196,6 +3196,10 @@ var dev$4 = async (tmsConfig, modules, isDev = true) => {
3196
3196
  }
3197
3197
  return `!${resolve$a(srcModulePath, newPath)}/**/*`;
3198
3198
  });
3199
+
3200
+ // 构建时排除 README 文件,减小包体积(仅本地 dev 保留)
3201
+ excludes.push(`!${srcModulePath}/**/README.md`);
3202
+ excludes.push(`!${srcModulePath}/**/readme.md`);
3199
3203
  const moduleConfigPath = `${srcModulePath}/**/module.config.json`;
3200
3204
  const moduleConfigGlob = tmsConfig.isKeepModuleConfig ? `${moduleConfigPath}` : `!${moduleConfigPath}`;
3201
3205
  mergeMap(compileTasksMap, compile(tmsConfig, {
@@ -4243,7 +4247,7 @@ var entry = [{
4243
4247
 
4244
4248
  var require$$12 = {
4245
4249
  name: "@tmsfe/tmskit",
4246
- version: "0.0.54",
4250
+ version: "0.0.56",
4247
4251
  description: "tmskit",
4248
4252
  main: "dist/index.cjs",
4249
4253
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmsfe/tmskit",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "description": "tmskit",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {
@@ -72,6 +72,10 @@ module.exports = async (tmsConfig, modules, isDev = true) => {
72
72
  return `!${resolve(srcModulePath, newPath)}/**/*`;
73
73
  });
74
74
 
75
+ // 构建时排除 README 文件,减小包体积(仅本地 dev 保留)
76
+ excludes.push(`!${srcModulePath}/**/README.md`);
77
+ excludes.push(`!${srcModulePath}/**/readme.md`);
78
+
75
79
  const moduleConfigPath = `${srcModulePath}/**/module.config.json`;
76
80
 
77
81
  const moduleConfigGlob = tmsConfig.isKeepModuleConfig ? `${moduleConfigPath}` : `!${moduleConfigPath}`;
@@ -3,22 +3,22 @@ const { info } = require('../utils/log');
3
3
 
4
4
  /* eslint-disable no-param-reassign */
5
5
  /**
6
- * 检查是否包含 meta-services 分包
6
+ * 检查是否包含 wechat-skills 分包
7
7
  * @param {Object} appJson app.json配置对象
8
8
  * @returns {boolean}
9
9
  */
10
- function hasMetaServicesSubpackage(appJson) {
11
- return appJson.subpackages.some(s => s.root === 'modules/meta-services' || s.name === 'meta-services');
10
+ function hasWechatSkillsSubpackage(appJson) {
11
+ return appJson.subpackages.some(s => s.root === 'modules/wechat-skills' || s.name === 'wechat-skills');
12
12
  }
13
13
 
14
14
  /**
15
- * 处理 agent 配置:根据是否包含 meta-services 分包来添加或删除 agent 配置
15
+ * 处理 agent 配置:根据是否包含 wechat-skills 分包来添加或删除 agent 配置
16
16
  * @param {Object} appJson app.json配置对象
17
17
  */
18
18
  function handleAgentConfig(appJson) {
19
- const hasMetaServices = hasMetaServicesSubpackage(appJson);
20
- console.log('🔍', hasMetaServices ? '包含' : '不包含', 'meta-services 分包');
21
- if (hasMetaServices) {
19
+ const hasWechatSkills = hasWechatSkillsSubpackage(appJson);
20
+ console.log('🔍', hasWechatSkills ? '包含' : '不包含', 'wechat-skills 分包');
21
+ if (hasWechatSkills) {
22
22
  if (!appJson.agent) {
23
23
  try {
24
24
  appJson.agent = require(resolve('./agentConfig.json'));