miniprogram-ci 2.0.0 → 2.0.1

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/README.md CHANGED
@@ -8,6 +8,8 @@ miniprogram-ci 从 1.0.28 开始支持第三方平台开发的上传和预览,
8
8
 
9
9
  ## 最近变更
10
10
 
11
+ #### 2.0.1
12
+ - `fix` 修复 subPackages of undefined 问题
11
13
  #### 2.0.0
12
14
  - `new` 新增 swc 编译模式
13
15
  - `new` 新增 useProjectConfig 编译配置
@@ -1,5 +1,5 @@
1
1
  import { IProject } from '../types';
2
- export declare const CI_VERSION = "2.0.0";
2
+ export declare const CI_VERSION = "2.0.1";
3
3
  export declare const PARAM_ERROR = 10000;
4
4
  export declare const WXML_NOT_FOUND = 10007;
5
5
  export declare const JS_NOT_FOUND = 10008;
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "version": "2.0.1",
3
- "buildTime": 1717051554461
3
+ "buildTime": 1717057637680
4
4
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.JSONConditionCompiler=void 0;const tslib_1=require("tslib"),lodash_1=tslib_1.__importDefault(require("lodash")),define_1=require("../../../../config/define"),config_1=require("../../../../config/config"),common_1=require("../../../../utils/common"),tools_1=require("../../../../utils/tools"),base_1=require("./base");class JSONConditionCompiler extends base_1.BaseConditionCompiler{doCompile(e){const{filePath:o,content:i,macroDefine:r}=e,t=i.toString();t||(0,common_1.throwError)({filePath:o,msg:"Empty file is NOT a valid json file",code:config_1.JSON_PARSE_ERR});const s=r.getDefines(),n=Object.values(define_1.PLATFORM),a=s.PLATFORM;let c={};try{c=JSON.parse(t)}catch(e){const i=(0,tools_1.formatJSONParseErr)({filePath:o,data:t,error:e});(0,common_1.throwError)({filePath:o,msg:i,code:config_1.JSON_PARSE_ERR})}const l=c[a]||("mini-weixin"===a?c["mini-wechat"]:{});n.forEach(e=>{c[e]&&delete c[e]});const f=c.subPackages||c.subpackages,d=l.subPackages||l.subpackages;if(Array.isArray(f)&&Array.isArray(d)){for(const e in d){const o=d[e].root,i=d[e].pages;if(o&&i){const r=f.find(e=>e.root===o);r?(r.pages=[...new Set([...r.pages,...i])],r.name=d[e].name):f.push(d[e])}}return delete l.subPackages,delete l.subpackages,JSON.stringify(lodash_1.default.merge(c,l))}return JSON.stringify(lodash_1.default.merge(c,l))}}exports.JSONConditionCompiler=JSONConditionCompiler;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.JSONConditionCompiler=void 0;const tslib_1=require("tslib"),lodash_1=tslib_1.__importDefault(require("lodash")),define_1=require("../../../../config/define"),config_1=require("../../../../config/config"),common_1=require("../../../../utils/common"),tools_1=require("../../../../utils/tools"),base_1=require("./base");class JSONConditionCompiler extends base_1.BaseConditionCompiler{doCompile(e){const{filePath:o,content:i,macroDefine:r}=e,t=i.toString();t||(0,common_1.throwError)({filePath:o,msg:"Empty file is NOT a valid json file",code:config_1.JSON_PARSE_ERR});const s=r.getDefines(),n=Object.values(define_1.PLATFORM),a=s.PLATFORM;let c={};try{c=JSON.parse(t)}catch(e){const i=(0,tools_1.formatJSONParseErr)({filePath:o,data:t,error:e});(0,common_1.throwError)({filePath:o,msg:i,code:config_1.JSON_PARSE_ERR})}const l=c[a]||("mini-weixin"===a?c["mini-wechat"]:{})||{};n.forEach(e=>{c[e]&&delete c[e]});const f=c.subPackages||c.subpackages,d=l.subPackages||l.subpackages;if(Array.isArray(f)&&Array.isArray(d)){for(const e in d){const o=d[e].root,i=d[e].pages;if(o&&i){const r=f.find(e=>e.root===o);r?(r.pages=[...new Set([...r.pages,...i])],r.name=d[e].name):f.push(d[e])}}return delete l.subPackages,delete l.subpackages,JSON.stringify(lodash_1.default.merge(c,l))}return JSON.stringify(lodash_1.default.merge(c,l))}}exports.JSONConditionCompiler=JSONConditionCompiler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miniprogram-ci",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Module that build miniprogram project for web or app extracted from WeChatDevtools.",
5
5
  "homepage": "https://developers.weixin.qq.com/community/homepage",
6
6
  "main": "dist/index.js",
@@ -115,7 +115,6 @@
115
115
  "@babel/template": "7.20.7",
116
116
  "@babel/traverse": "7.21.4",
117
117
  "@swc/core": "1.4.14",
118
- "@tencent/product-sdk": "^1.0.8",
119
118
  "@vue/reactivity": "3.0.5",
120
119
  "acorn": "^6.1.1",
121
120
  "adm-zip": "^0.5.10",