miniprogram-ci 1.9.3 → 1.9.6
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/CHANGELOG.md +4 -0
- package/README.md +1 -0
- package/dist/@types/ci/getDevSourceMap.d.ts +1 -0
- package/dist/@types/config.d.ts +1 -1
- package/dist/ci/getDevSourceMap.js +1 -1
- package/dist/config.js +1 -1
- package/dist/manifest.json +2 -2
- package/dist/vendor/schema/dist/app.js +1 -1
- package/dist/vendor/schema/dist/ext.js +2 -1
- package/dist/vendor/schema/dist/game.js +1 -1
- package/dist/vendor/schema/dist/page.js +2 -1
- package/dist/vendor/schema/dist/plugin.js +1 -1
- package/dist/vendor/schema/dist/pluginpage.js +1 -1
- package/dist/vendor/schema/dist/projectconfig.js +1 -1
- package/dist/vendor/schema/dist/projectprivateconfig.js +1 -1
- package/dist/vendor/schema/dist/sitemap.js +1 -1
- package/dist/vendor/schema/dist/theme.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -219,6 +219,7 @@ const ci = require('miniprogram-ci')
|
|
|
219
219
|
| project | IProject | 是 | #项目对象 |
|
|
220
220
|
| robot | number | 是 | 指定使用哪一个 ci 机器人,可选值:1 ~ 30 |
|
|
221
221
|
| sourceMapSavePath | string | 是 | 保存的路径 |
|
|
222
|
+
| streaming | boolean | 否 | 是否使用流式传输 |
|
|
222
223
|
|
|
223
224
|
### 获取本地编译后的代码包
|
|
224
225
|
当怀疑代码大小发生变化,不符合预期时,可以调用这个方法,检查一下最终上传到微信后台服务器时代码包里的文件内容。
|
package/dist/@types/config.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDevSourceMap=void 0;const tslib_1=require("tslib"),fs_1=(0,tslib_1.__importDefault)(require("fs")),path_1=(0,tslib_1.__importDefault)(require("path")),log_1=(0,tslib_1.__importDefault)(require("../utils/log")),request_1=require("../utils/request"),url_config_1=require("../utils/url_config"),sign_1=require("../utils/sign"),JsZip=require("jszip"),ERR_MSG_PREFIX="download source map failed:";async function getExtAppId(e){let r,t={};try{r=await e.getFile(e.miniprogramRoot,"ext.json"),t=JSON.parse(r.toString("utf-8"))}catch(e){}if(null==t?void 0:t.extEnable)return t.extAppid}async function getDevSourceMap(e){const{project:r,robot:t}=e;let{sourceMapSavePath:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDevSourceMap=void 0;const tslib_1=require("tslib"),fs_1=(0,tslib_1.__importDefault)(require("fs")),path_1=(0,tslib_1.__importDefault)(require("path")),log_1=(0,tslib_1.__importDefault)(require("../utils/log")),request_1=require("../utils/request"),url_config_1=require("../utils/url_config"),sign_1=require("../utils/sign"),JsZip=require("jszip"),ERR_MSG_PREFIX="download source map failed:";async function getExtAppId(e){let r,t={};try{r=await e.getFile(e.miniprogramRoot,"ext.json"),t=JSON.parse(r.toString("utf-8"))}catch(e){}if(null==t?void 0:t.extEnable)return t.extAppid}async function getDevSourceMap(e){const{project:r,robot:t,streaming:o}=e;let{sourceMapSavePath:a}=e;if(!r){const e="params project is requried";throw log_1.default.error(e),e}if("number"!=typeof t||Math.round(t)>30||Math.round(t)<=0){const e="params robot is invalid";throw log_1.default.error(e),e}if(!a){const e="params sourceMapSavePath is invalid";throw log_1.default.error(e),e}path_1.default.isAbsolute(a)||(a=path_1.default.join(process.cwd(),a));const i=await(0,sign_1.getSignature)(r.privateKey,r.appid),s=await getExtAppId(r),{body:l}=await(0,request_1.request)({url:url_config_1.GET_DEV_SOURCE_MAP,method:"post",gzip:!0,body:JSON.stringify({appid:r.appid,signature:i,robot:t,extAppId:s,streaming:o}),headers:{"content-type":"application/json"}});let u,p;try{u=JSON.parse(l)}catch(e){const r=ERR_MSG_PREFIX+" resp body is not a valid json";throw log_1.default.error(r),r}if(o)p=u.sourcemap_list;else{if(0!==u.errCode)throw new Error(`request failed, errCode: ${u.errCode}, errMsg: ${u.errMsg}`);const e=u.data;if(!Array.isArray(e.sourcemap_list)){const r=`${ERR_MSG_PREFIX} respData.sourcemap_list, respData: ${JSON.stringify(e)}`;throw log_1.default.error(r),r}p=e.sourcemap_list}const n=p,c=new JsZip;try{n.forEach(e=>{c.folder(path_1.default.dirname(e.fullpath)).file(path_1.default.basename(e.fullpath),e.sourcemap)})}catch(e){const r=ERR_MSG_PREFIX+" source map add folder or add file error";throw log_1.default.error(r),r}let _;try{_=await c.generateAsync({type:"nodebuffer"})}catch(e){const r=ERR_MSG_PREFIX+" source map generate zip error";throw log_1.default.error(r),r}try{fs_1.default.writeFileSync(a,_)}catch(e){const r=`${ERR_MSG_PREFIX} save source map to ${a} failed. Error detail: ${JSON.stringify(e)}`;throw log_1.default.error(r),r}return _}exports.getDevSourceMap=getDevSourceMap;
|
|
3
3
|
}(require("licia/lazyImport")(require), require)
|
package/dist/config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
!function(require, directRequire){
|
|
2
|
-
"use strict";var COMPILE_TYPE;Object.defineProperty(exports,"__esModule",{value:!0}),exports.extendedLibMap=exports.jsonVariablePropertyWhiteList=exports.DefaultProjectAttr=exports.TABBAR_ICON_WHITE_LIST=exports.COMPILE_TYPE=exports.APP_TYPE=exports.MINI_GAME_WORKERS_PACKAGE_ROOT=exports.MINI_GAME_MAIN_PACKAGE_ROOT=exports.MINI_PROGRAM_MAIN_PACKAGE_ROOT=exports.PROJECT_TYPE_ERROR=exports.GET_LATEST_VERSION_CGI_ERR=exports.UPLOAD_JS_SERVER_CGI_ERR=exports.CODE_PROTECT_TRANSLATE_FILENAME=exports.UPLOAD_CGI_ERR=exports.GENERATE_LOCAL_SIGNATURE_ERR=exports.GET_SIGNATURE_RAND_STRING_ERR=exports.APP_JSON_NOT_FOUND=exports.JSON_CONTENT_ERR=exports.FILE_NOT_UTF8=exports.JSON_PARSE_ERR=exports.FILE_NOT_FOUND=exports.PLUGIN_JSON_PARSE_ERR=exports.PLUGIN_JSON_CONTENT_ERR=exports.PLUGIN_JSON_FILE_NOT_FOUND=exports.GAME_PLUGIN_LIB_MD5_NOT_MATCH=exports.SUMMER_PLUGIN_CODE_ERR=exports.SUMMER_PLUGIN_ERR=exports.MINIFY_WXML_ERR=exports.POST_WXSS_ERR=exports.FILE_FLAT_ERR=exports.JS_ES6_ERR=exports.BABILI_JS_ERR=exports.UGLIFY_JS_ERR=exports.BABEL_TRANS_JS_ERR=exports.JS_NOT_FOUND=exports.WXML_NOT_FOUND=exports.PARAM_ERROR=exports.CI_VERSION=void 0,exports.CI_VERSION="1.9.
|
|
2
|
+
"use strict";var COMPILE_TYPE;Object.defineProperty(exports,"__esModule",{value:!0}),exports.extendedLibMap=exports.jsonVariablePropertyWhiteList=exports.DefaultProjectAttr=exports.TABBAR_ICON_WHITE_LIST=exports.COMPILE_TYPE=exports.APP_TYPE=exports.MINI_GAME_WORKERS_PACKAGE_ROOT=exports.MINI_GAME_MAIN_PACKAGE_ROOT=exports.MINI_PROGRAM_MAIN_PACKAGE_ROOT=exports.PROJECT_TYPE_ERROR=exports.GET_LATEST_VERSION_CGI_ERR=exports.UPLOAD_JS_SERVER_CGI_ERR=exports.CODE_PROTECT_TRANSLATE_FILENAME=exports.UPLOAD_CGI_ERR=exports.GENERATE_LOCAL_SIGNATURE_ERR=exports.GET_SIGNATURE_RAND_STRING_ERR=exports.APP_JSON_NOT_FOUND=exports.JSON_CONTENT_ERR=exports.FILE_NOT_UTF8=exports.JSON_PARSE_ERR=exports.FILE_NOT_FOUND=exports.PLUGIN_JSON_PARSE_ERR=exports.PLUGIN_JSON_CONTENT_ERR=exports.PLUGIN_JSON_FILE_NOT_FOUND=exports.GAME_PLUGIN_LIB_MD5_NOT_MATCH=exports.SUMMER_PLUGIN_CODE_ERR=exports.SUMMER_PLUGIN_ERR=exports.MINIFY_WXML_ERR=exports.POST_WXSS_ERR=exports.FILE_FLAT_ERR=exports.JS_ES6_ERR=exports.BABILI_JS_ERR=exports.UGLIFY_JS_ERR=exports.BABEL_TRANS_JS_ERR=exports.JS_NOT_FOUND=exports.WXML_NOT_FOUND=exports.PARAM_ERROR=exports.CI_VERSION=void 0,exports.CI_VERSION="1.9.5",exports.PARAM_ERROR=1e4,exports.WXML_NOT_FOUND=10007,exports.JS_NOT_FOUND=10008,exports.BABEL_TRANS_JS_ERR=10032,exports.UGLIFY_JS_ERR=10033,exports.BABILI_JS_ERR=10034,exports.JS_ES6_ERR=10035,exports.FILE_FLAT_ERR=10036,exports.POST_WXSS_ERR=10037,exports.MINIFY_WXML_ERR=10038,exports.SUMMER_PLUGIN_ERR=10045,exports.SUMMER_PLUGIN_CODE_ERR=10046,exports.GAME_PLUGIN_LIB_MD5_NOT_MATCH=10081,exports.PLUGIN_JSON_FILE_NOT_FOUND=10091,exports.PLUGIN_JSON_CONTENT_ERR=10092,exports.PLUGIN_JSON_PARSE_ERR=10093,exports.FILE_NOT_FOUND=10005,exports.JSON_PARSE_ERR=10006,exports.FILE_NOT_UTF8=10031,exports.JSON_CONTENT_ERR=10009,exports.APP_JSON_NOT_FOUND=2e4,exports.GET_SIGNATURE_RAND_STRING_ERR=20001,exports.GENERATE_LOCAL_SIGNATURE_ERR=20002,exports.UPLOAD_CGI_ERR=20003,exports.CODE_PROTECT_TRANSLATE_FILENAME=20004,exports.UPLOAD_JS_SERVER_CGI_ERR=20005,exports.GET_LATEST_VERSION_CGI_ERR=20006,exports.PROJECT_TYPE_ERROR=3e4,exports.MINI_PROGRAM_MAIN_PACKAGE_ROOT="__APP__",exports.MINI_GAME_MAIN_PACKAGE_ROOT="__GAME__",exports.MINI_GAME_WORKERS_PACKAGE_ROOT="workers.js",exports.APP_TYPE={NORMAL:0,PLUGIN:1,SHOP:2,MINISHOP:3,GAME:4,CARD:5,NATIVE:7},function(_){_.miniProgram="miniProgram",_.miniProgramPlugin="miniProgramPlugin",_.miniGame="miniGame",_.miniGamePlugin="miniGamePlugin"}(COMPILE_TYPE=exports.COMPILE_TYPE||(exports.COMPILE_TYPE={})),exports.TABBAR_ICON_WHITE_LIST=[".png",".jpg",".jpeg"],exports.DefaultProjectAttr={platform:!1,appType:0,isSandbox:!1,released:!1,setting:{MaxCodeSize:2,MaxSubpackageSubCodeSize:2,MaxSubpackageFullCodeSize:12,NavigateMiniprogramLimit:10,MaxSubPackageLimit:100,MinTabbarCount:2,MaxTabbarCount:5,MaxTabbarIconSize:40}},exports.jsonVariablePropertyWhiteList={windowPropertWhiteList:["navigationBarBackgroundColor","navigationBarTextStyle","backgroundColor","backgroundTextStyle","backgroundColorTop","backgroundColorBottom","backgroundColorContent"],tabBarPropertyWhiteList:["color","selectedColor","backgroundColor","borderStyle"],tabbarListItemPropertyWhiteList:["iconPath","selectedIconPath"]},exports.extendedLibMap={kbone:{packages:["miniprogram-element","miniprogram-render"]},weui:{packages:["weui-miniprogram"]}};
|
|
3
3
|
}(require("licia/lazyImport")(require), require)
|
package/dist/manifest.json
CHANGED
|
@@ -549,6 +549,7 @@ module.exports = {
|
|
|
549
549
|
},
|
|
550
550
|
"renderer": {
|
|
551
551
|
"enum": [
|
|
552
|
+
"cover-view",
|
|
552
553
|
"skyline",
|
|
553
554
|
"webview",
|
|
554
555
|
"xr-frame"
|
|
@@ -857,5 +858,5 @@ module.exports = {
|
|
|
857
858
|
}
|
|
858
859
|
},
|
|
859
860
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
860
|
-
"$version":
|
|
861
|
+
"$version": 1669016223495
|
|
861
862
|
}
|
|
@@ -257,6 +257,7 @@ module.exports = {
|
|
|
257
257
|
},
|
|
258
258
|
"renderer": {
|
|
259
259
|
"enum": [
|
|
260
|
+
"cover-view",
|
|
260
261
|
"skyline",
|
|
261
262
|
"webview",
|
|
262
263
|
"xr-frame"
|
|
@@ -308,5 +309,5 @@ module.exports = {
|
|
|
308
309
|
}
|
|
309
310
|
},
|
|
310
311
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
311
|
-
"$version":
|
|
312
|
+
"$version": 1671418085036
|
|
312
313
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miniprogram-ci",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.6",
|
|
4
4
|
"description": "pre compilation module about the miniProgram / miniGame project extracted from WeChatDevtools.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/@types/index.d.ts",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@babel/core": "7.12.3",
|
|
79
79
|
"@babel/generator": "7.17.10",
|
|
80
80
|
"@babel/helper-module-imports": "7.12.1",
|
|
81
|
-
"@babel/helpers": "7.
|
|
81
|
+
"@babel/helpers": "7.21.0",
|
|
82
82
|
"@babel/parser": "7.17.10",
|
|
83
83
|
"@babel/plugin-proposal-class-properties": "7.12.1",
|
|
84
84
|
"@babel/plugin-proposal-decorators": "7.12.1",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@babel/preset-env": "7.12.1",
|
|
96
96
|
"@babel/runtime": "7.12.1",
|
|
97
97
|
"@babel/template": "7.16.7",
|
|
98
|
-
"@babel/traverse": "7.
|
|
98
|
+
"@babel/traverse": "7.21.2",
|
|
99
99
|
"@vue/reactivity": "3.0.5",
|
|
100
100
|
"acorn": "^6.1.1",
|
|
101
101
|
"autoprefixer": "^10.4.0",
|
|
@@ -135,4 +135,4 @@
|
|
|
135
135
|
"wxml-minifier": "0.0.1",
|
|
136
136
|
"yargs": "^15.0.2"
|
|
137
137
|
}
|
|
138
|
-
}
|
|
138
|
+
}
|