miniprogram-ci 1.5.1 → 1.8.0
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 +5 -0
- package/README.md +71 -0
- package/dist/@types/ci/code-analyse.d.ts +4 -0
- package/dist/@types/ci/getLatestVersion.d.ts +7 -0
- package/dist/@types/ci/project.d.ts +4 -0
- package/dist/@types/cloud/cloudapi.d.ts +1 -1
- package/dist/@types/cloud/uploadContainer.d.ts +36 -7
- package/dist/@types/config.d.ts +3 -3
- package/dist/@types/core/js/enhance.d.ts +1 -0
- package/dist/@types/core/js/generateMap.d.ts +3 -0
- package/dist/@types/core/json/app/checkAppFields.d.ts +1 -0
- package/dist/@types/core/json/projectWithMockBuffer.d.ts +14 -0
- package/dist/@types/core/json/reactiveCache.d.ts +4 -0
- package/dist/@types/core/protect/uglifyfilenames.d.ts +2 -4
- package/dist/@types/core/worker_thread/task/minifywxml.d.ts +7 -0
- package/dist/@types/core.d.ts +1 -1
- package/dist/@types/index.d.ts +6 -0
- package/dist/@types/summer/ci.d.ts +3 -0
- package/dist/@types/summer/devtool.d.ts +9 -1
- package/dist/@types/summer/error.d.ts +14 -5
- package/dist/@types/summer/graph/appgraph.d.ts +1 -0
- package/dist/@types/summer/graph/basegraph.d.ts +4 -0
- package/dist/@types/summer/graph/plugingraph.d.ts +2 -1
- package/dist/@types/summer/initPlugin.d.ts +1 -1
- package/dist/@types/summer/module.d.ts +3 -2
- package/dist/@types/summer/plugins/base/es6module.d.ts +4 -2
- package/dist/@types/summer/plugins/base/wxss.d.ts +1 -1
- package/dist/@types/summer/plugins/enhance.d.ts +3 -1
- package/dist/@types/summer/plugins/index.d.ts +1 -16
- package/dist/@types/summer/project.d.ts +5 -3
- package/dist/@types/summer/summer.d.ts +2 -1
- package/dist/@types/summer/types.d.ts +1 -0
- package/dist/@types/types/index.d.ts +5 -0
- package/dist/@types/types/miniprogram-json/app.d.ts +2 -1
- package/dist/@types/types/miniprogram-json/page.d.ts +1 -0
- package/dist/@types/types/miniprogram-json/projectconfig.d.ts +2 -0
- package/dist/@types/utils/locales/locales.d.ts +4 -0
- package/dist/@types/utils/locales/zh.d.ts +4 -0
- package/dist/@types/utils/tools.d.ts +1 -0
- package/dist/@types/utils/url_config.d.ts +1 -0
- package/dist/@types/vendor/code-analyse/index.d.ts +4 -3
- package/dist/ci/code-analyse.js +3 -0
- package/dist/ci/cos-upload.js +3 -1
- package/dist/ci/getCompiledResult.js +3 -1
- package/dist/ci/getDevSourceMap.js +3 -1
- package/dist/ci/getLatestVersion.js +3 -0
- package/dist/ci/jsserver.js +3 -1
- package/dist/ci/preview.js +3 -1
- package/dist/ci/project.js +3 -1
- package/dist/ci/projectattr.js +3 -1
- package/dist/ci/upload.js +3 -1
- package/dist/ci/utils/pack.js +3 -1
- package/dist/ci/utils/packfile.js +3 -1
- package/dist/ci/utils/terminalQrcode.js +3 -1
- package/dist/cli.js +3 -1
- package/dist/cloud/cloudapi.js +3 -1
- package/dist/cloud/createTimeTrigger.js +3 -1
- package/dist/cloud/uploadContainer.js +3 -1
- package/dist/cloud/uploadFile.js +3 -1
- package/dist/cloud/uploadFunction.js +3 -1
- package/dist/cloud/utils.js +3 -1
- package/dist/config.js +3 -1
- package/dist/core/analyse/partial.js +3 -1
- package/dist/core/compile/common.js +3 -1
- package/dist/core/compile/game.js +3 -1
- package/dist/core/compile/game_plugin.js +3 -1
- package/dist/core/compile/handler/js.js +3 -1
- package/dist/core/compile/handler/mpjson.js +3 -1
- package/dist/core/compile/handler/wxml.js +3 -1
- package/dist/core/compile/handler/wxss.js +3 -1
- package/dist/core/compile/index.js +3 -1
- package/dist/core/compile/mini_program.js +3 -1
- package/dist/core/compile/mini_program_plugin.js +3 -1
- package/dist/core/js/enhance.js +1 -1
- package/dist/core/js/generateMap.js +1 -0
- package/dist/core/js/index.js +1 -1
- package/dist/core/js/minifyjs_after_wrap.js +1 -1
- package/dist/core/json/app/checkAppFields.js +3 -1
- package/dist/core/json/app/getAppJSON.js +3 -1
- package/dist/core/json/app/getExtJSON.js +3 -1
- package/dist/core/json/app/index.js +3 -1
- package/dist/core/json/common.js +3 -1
- package/dist/core/json/game.js +3 -1
- package/dist/core/json/page/checkPageJSON.js +3 -1
- package/dist/core/json/page/getPageJSON.js +3 -1
- package/dist/core/json/plugin/plugin.js +3 -1
- package/dist/core/json/plugin/plugin_page.js +3 -1
- package/dist/core/json/projectWithMockBuffer.js +3 -0
- package/dist/core/json/projectconfig.js +3 -1
- package/dist/core/json/reactiveCache.js +3 -1
- package/dist/core/json/signaturejson.js +3 -1
- package/dist/core/json/sitemap.js +3 -1
- package/dist/core/json/theme.js +3 -1
- package/dist/core/npm/filterdeps.js +3 -1
- package/dist/core/npm/packnpm.js +3 -1
- package/dist/core/protect/file_flatter.js +3 -1
- package/dist/core/protect/uglifyfilenames.js +3 -1
- package/dist/core/utils/env.js +3 -1
- package/dist/core/utils/logger.js +3 -1
- package/dist/core/validate/validate.js +1 -1
- package/dist/core/worker_thread/childprocess.js +1 -1
- package/dist/core/worker_thread/childprocess_manager.js +1 -1
- package/dist/core/worker_thread/fork.js +1 -1
- package/dist/core/worker_thread/index.js +1 -1
- package/dist/core/worker_thread/task/call_func.js +1 -1
- package/dist/core/worker_thread/task/compilejs.js +1 -1
- package/dist/core/worker_thread/task/compilewxss.js +1 -1
- package/dist/core/worker_thread/task/func.js +1 -1
- package/dist/core/worker_thread/task/minifywxml.js +1 -1
- package/dist/core/worker_thread/worker.js +1 -1
- package/dist/core/worker_thread/worker_manager.js +1 -1
- package/dist/core.js +3 -1
- package/dist/index.js +3 -1
- package/dist/manifest.json +3 -3
- package/dist/summer/ci.js +3 -0
- package/dist/summer/devtool.js +3 -1
- package/dist/summer/entry_process.js +1 -1
- package/dist/summer/error.js +3 -1
- package/dist/summer/graph/appconf.js +3 -1
- package/dist/summer/graph/appgraph.js +3 -1
- package/dist/summer/graph/basegraph.js +3 -1
- package/dist/summer/graph/pluginconf.js +3 -1
- package/dist/summer/graph/plugingraph.js +3 -1
- package/dist/summer/index.js +3 -1
- package/dist/summer/initPlugin.js +3 -1
- package/dist/summer/module.js +3 -1
- package/dist/summer/persist_cache.js +3 -1
- package/dist/summer/plugin_driver.js +3 -1
- package/dist/summer/plugins/base/es6module.js +1 -1
- package/dist/summer/plugins/base/javascript.js +1 -1
- package/dist/summer/plugins/base/wxss.js +1 -1
- package/dist/summer/plugins/enhance.js +1 -1
- package/dist/summer/plugins/index.js +1 -1
- package/dist/summer/plugins/less.js +1 -1
- package/dist/summer/plugins/sass.js +1 -1
- package/dist/summer/plugins/terser.js +1 -1
- package/dist/summer/plugins/typescript.js +1 -1
- package/dist/summer/project.js +3 -1
- package/dist/summer/recorder.js +3 -1
- package/dist/summer/resolver.js +3 -1
- package/dist/summer/summer.js +3 -1
- package/dist/summer/types.js +3 -1
- package/dist/summer/utils/async.js +3 -1
- package/dist/summer/utils/ensureArray.js +3 -1
- package/dist/summer/worker.js +3 -1
- package/dist/types/index.js +3 -1
- package/dist/types/miniprogram-json/app.js +3 -1
- package/dist/types/miniprogram-json/base.js +3 -1
- package/dist/types/miniprogram-json/ext.js +3 -1
- package/dist/types/miniprogram-json/game.js +3 -1
- package/dist/types/miniprogram-json/index.js +3 -1
- package/dist/types/miniprogram-json/page.js +3 -1
- package/dist/types/miniprogram-json/plugin.js +3 -1
- package/dist/types/miniprogram-json/projectconfig.js +3 -1
- package/dist/types/miniprogram-json/sitemap.js +3 -1
- package/dist/types/miniprogram-json/theme.js +3 -1
- package/dist/utils/babel_helper.js +3 -1
- package/dist/utils/babel_transform_plugin.js +3 -1
- package/dist/utils/cache.js +3 -1
- package/dist/utils/common.js +3 -1
- package/dist/utils/error.js +3 -1
- package/dist/utils/fs.js +3 -1
- package/dist/utils/fsagent.js +3 -1
- package/dist/utils/glob.js +3 -1
- package/dist/utils/interruptibletask.js +3 -1
- package/dist/utils/jsonParse.js +3 -1
- package/dist/utils/jsonlint.js +3 -1
- package/dist/utils/locales/en.js +3 -1
- package/dist/utils/locales/fomatable_string.js +3 -1
- package/dist/utils/locales/locales.js +3 -1
- package/dist/utils/locales/zh.js +3 -1
- package/dist/utils/log.js +3 -1
- package/dist/utils/report.js +3 -1
- package/dist/utils/request.js +3 -1
- package/dist/utils/sign.js +3 -1
- package/dist/utils/taskstatus.js +3 -1
- package/dist/utils/tools.js +3 -1
- package/dist/utils/url_config.js +3 -1
- package/dist/utils/white_ext_list.js +3 -1
- package/dist/utils/wxvpkgreader/wxvpkgreader.js +1 -1
- package/dist/vendor/cloud-api/src/apis/apis.js +3 -1
- package/dist/vendor/cloud-api/src/apis/cdn/cdn.apis.js +3 -1
- package/dist/vendor/cloud-api/src/apis/cdn/index.js +3 -1
- package/dist/vendor/cloud-api/src/apis/flexdb/flexdb.apis.js +3 -1
- package/dist/vendor/cloud-api/src/apis/flexdb/index.js +3 -1
- package/dist/vendor/cloud-api/src/apis/scf/index.js +3 -1
- package/dist/vendor/cloud-api/src/apis/scf/scf.apis.js +3 -1
- package/dist/vendor/cloud-api/src/apis/ssl/index.js +3 -1
- package/dist/vendor/cloud-api/src/apis/ssl/ssl.apis.js +3 -1
- package/dist/vendor/cloud-api/src/apis/tcb/general.apis.js +3 -1
- package/dist/vendor/cloud-api/src/apis/tcb/index.js +3 -1
- package/dist/vendor/cloud-api/src/apis/tcb/tcb.apis.js +3 -1
- package/dist/vendor/cloud-api/src/index.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/contracts/cdn.contracts.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/contracts/contracts.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/contracts/factory.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/contracts/flexdb.contracts.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/contracts/scf.contracts.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/contracts/ssl.contracts.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/contracts/tcb.contracts.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/transactor.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/validations/cdn.validations.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/validations/common.validations.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/validations/flexdb.validations.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/validations/scf.validations.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/validations/ssl.validations.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/validations/tcb.validations.js +3 -1
- package/dist/vendor/cloud-api/src/transaction/validations/validations.js +3 -1
- package/dist/vendor/cloud-api/src/utils/common.js +3 -1
- package/dist/vendor/cloud-api/src/utils/validator.js +3 -1
- package/dist/vendor/code-analyse/index.js +1 -1
- package/dist/vendor/schema/dist/app.js +26 -1
- package/dist/vendor/schema/dist/ext.js +21 -1
- package/dist/vendor/schema/dist/game.js +29 -1
- package/dist/vendor/schema/dist/page.js +18 -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 +38 -1
- package/dist/vendor/schema/dist/sitemap.js +1 -1
- package/dist/vendor/schema/dist/theme.js +1 -1
- package/package.json +22 -24
- package/dist/@types/core/js/__tests__/minifyjs.spec.d.ts +0 -1
- package/dist/@types/summer/backup/appconf/index-old.d.ts +0 -0
- package/dist/@types/summer/backup/appconf/index.d.ts +0 -33
- package/dist/@types/summer/backup/detectors/es6/BasicEvaluatedExpression.d.ts +0 -51
- package/dist/@types/summer/backup/detectors/es6/ContextDependencyHelpers.d.ts +0 -4
- package/dist/@types/summer/backup/detectors/es6/Evaluator.d.ts +0 -29
- package/dist/@types/summer/backup/detectors/es6/Parser.d.ts +0 -134
- package/dist/@types/summer/backup/detectors/es6/StackedSetMap.d.ts +0 -17
- package/dist/@types/summer/backup/detectors/es6/acorn/acorn.d.ts +0 -0
- package/dist/@types/summer/backup/detectors/es6/types.d.ts +0 -37
- package/dist/@types/summer/backup/detectors/wxml/index.d.ts +0 -4
- package/dist/@types/summer/backup/detectors/wxss/index.d.ts +0 -5
- package/dist/@types/summer/backup/detectors/wxss/parse.d.ts +0 -1
- package/dist/@types/summer/backup/fslayer/fslayer.d.ts +0 -73
- package/dist/@types/summer/backup/graph.d.ts +0 -71
- package/dist/@types/summer/backup/module.d.ts +0 -34
- package/dist/@types/summer/backup/plugin_driver.d.ts +0 -41
- package/dist/@types/summer/backup/structs/app.d.ts +0 -0
- package/dist/@types/summer/backup/watcher.d.ts +0 -0
- package/dist/core/js/__tests__/minifyjs.spec.js +0 -1
- package/dist/summer/backup/appconf/index-old.js +0 -1
- package/dist/summer/backup/appconf/index.js +0 -1
- package/dist/summer/backup/detectors/es6/BasicEvaluatedExpression.js +0 -1
- package/dist/summer/backup/detectors/es6/ContextDependencyHelpers.js +0 -1
- package/dist/summer/backup/detectors/es6/Evaluator.js +0 -1
- package/dist/summer/backup/detectors/es6/Parser.js +0 -1
- package/dist/summer/backup/detectors/es6/StackedSetMap.js +0 -1
- package/dist/summer/backup/detectors/es6/acorn/acorn.js +0 -1
- package/dist/summer/backup/detectors/es6/types.js +0 -1
- package/dist/summer/backup/detectors/wxml/index.js +0 -1
- package/dist/summer/backup/detectors/wxss/index.js +0 -1
- package/dist/summer/backup/detectors/wxss/parse.js +0 -1
- package/dist/summer/backup/fslayer/fslayer.js +0 -1
- package/dist/summer/backup/graph.js +0 -1
- package/dist/summer/backup/module.js +0 -1
- package/dist/summer/backup/plugin_driver.js +0 -1
- package/dist/summer/backup/structs/app.js +0 -1
- package/dist/summer/backup/watcher.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 1.6.1
|
|
2
|
+
- `new` 新增 支持编译工具上对应的 Typescript 模板项目。
|
|
3
|
+
- `fix` 更新 wxml压缩逻辑,可通过 minifyWXML 参数开启 wxml 压缩。
|
|
4
|
+
## 1.5.12
|
|
5
|
+
- `new` 新增 `analyseCode` 分析代码间的依赖关系。
|
|
1
6
|
## 1.5.1
|
|
2
7
|
- `fix` 修复 js 压缩中文字符串转义导致体积变大的问题,[相关反馈](https://developers.weixin.qq.com/community/develop/doc/00066831aa8b203b8f8cba59251400)
|
|
3
8
|
- `new` 新增 `getCompiledResult` 方法,输出本地编译后的代码包内容。
|
package/README.md
CHANGED
|
@@ -67,6 +67,8 @@ interface IProject {
|
|
|
67
67
|
|
|
68
68
|
```javascript
|
|
69
69
|
const ci = require('miniprogram-ci')
|
|
70
|
+
|
|
71
|
+
// 注意: new ci.Project 调用时,请确保项目代码已经是完整的,避免编译过程出现找不到文件的报错。
|
|
70
72
|
const project = new ci.Project({
|
|
71
73
|
appid: 'wxsomeappid',
|
|
72
74
|
type: 'miniProgram',
|
|
@@ -568,6 +570,74 @@ const ci = require('miniprogram-ci')
|
|
|
568
570
|
| env | string | 是 | test: 测试环境,release:正式环境 |
|
|
569
571
|
|
|
570
572
|
|
|
573
|
+
### 代码静态依赖分析
|
|
574
|
+
对应开发者工具的[代码静态依赖分析](https://developers.weixin.qq.com/miniprogram/dev/devtools/codeanalyse.html)的功能,输出分析结果。
|
|
575
|
+
|
|
576
|
+
```javascript
|
|
577
|
+
const ci = require('miniprogram-ci')
|
|
578
|
+
;(async () => {
|
|
579
|
+
const project = new ci.Project({
|
|
580
|
+
appid: 'wxsomeappid',
|
|
581
|
+
type: 'miniProgram',
|
|
582
|
+
projectPath: 'the/project/path',
|
|
583
|
+
privateKeyPath: 'the/path/to/privatekey',
|
|
584
|
+
})
|
|
585
|
+
|
|
586
|
+
const result = await ci.analyseCode(project)
|
|
587
|
+
console.warn('analyse result' + result)
|
|
588
|
+
})()
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
#### 分析结果结构说明
|
|
592
|
+
代码静态依赖分析的过程,也是构建出模块的依赖图谱的过程。模块分为文件模块和结构模块两种类型。每个模块都有唯一的 id 来表示。模块之间的依赖关系则通过 module.parentDeps 和 module.deps 中的信息来表示。
|
|
593
|
+
```js
|
|
594
|
+
{
|
|
595
|
+
files: [
|
|
596
|
+
{
|
|
597
|
+
path: 'app.json', // 文件的路径
|
|
598
|
+
ext: '.json', // 文件的后缀名
|
|
599
|
+
size: 771, // 文件的大小
|
|
600
|
+
moduleId: 'MainPackage:app.json', // 对应的模块id,可以从 modules 中根据id 找出对应的模块,如果 moduleId 为 null,则说明依赖关系图谱中没有该文件。
|
|
601
|
+
subPackage: null // 分包的路径,如果是 null 则代表是主包
|
|
602
|
+
}
|
|
603
|
+
...
|
|
604
|
+
],
|
|
605
|
+
modules: [
|
|
606
|
+
{
|
|
607
|
+
id: 'Component:components/chatroom/chatroom.json', // 模块的id,由模块类型和路径组成。
|
|
608
|
+
type: 'Component', // 模块的类型,可能的类型取值有 1. 文件类型: 'Js' | 'Wxml' | 'Wxss' | 'Wxs' | 'Config' 2. 结构类型: 'MainPackage' | 'SubPackage' | 'Page' | 'Component' | 'Plugin' | 'Worker' | 'FunctionalPages' | 'ContextModule' | 'PluginPackage' | 'GameMainPackage' | 'GameSubPackage'
|
|
609
|
+
path: 'components/chatroom/chatroom.json',
|
|
610
|
+
// 哪些模块依赖了此模块
|
|
611
|
+
parentDeps: [
|
|
612
|
+
{
|
|
613
|
+
from: 'json', // 依赖关系的来源, 可能的取值:'json' | 'file' | 'rule'
|
|
614
|
+
type: 'Component',
|
|
615
|
+
request: '/components/chatroom/chatroom',
|
|
616
|
+
path: 'components/chatroom/chatroom.json',
|
|
617
|
+
moduleId: 'Component:components/chatroom/chatroom.json',
|
|
618
|
+
originModuleId: 'Page:pages/im/room/room.json', // 父模块的id
|
|
619
|
+
error: null, // 如果依赖解析过程中有错误,则为错误信息
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
// 此模块依赖了哪些模块
|
|
623
|
+
deps: [
|
|
624
|
+
{
|
|
625
|
+
from: 'rule',
|
|
626
|
+
type: 'Wxml',
|
|
627
|
+
request: 'components/chatroom/chatroom.wxml',
|
|
628
|
+
path: 'components/chatroom/chatroom.wxml',
|
|
629
|
+
moduleId: 'Wxml:components/chatroom/chatroom.wxml', // 子模块的id
|
|
630
|
+
originModuleId: 'Component:components/chatroom/chatroom.json',
|
|
631
|
+
error: null
|
|
632
|
+
},
|
|
633
|
+
],
|
|
634
|
+
errors: [] // 如果模块解析过程中有错误,则错误列表不为空
|
|
635
|
+
}
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
|
|
571
641
|
### 代理
|
|
572
642
|
|
|
573
643
|
miniprogram-ci 使用了 [get-proxy](https://www.npmjs.com/package/get-proxy) 模块来自动获取代理地址。
|
|
@@ -726,6 +796,7 @@ miniprogram-ci \
|
|
|
726
796
|
| -------------- | ------- | ----------------------------------------------------------- |
|
|
727
797
|
| es6 | boolean | 对应于微信开发者工具的 "es6 转 es5" |
|
|
728
798
|
| es7 | boolean | 对应于微信开发者工具的 "增强编译" |
|
|
799
|
+
| disableUseStrict | boolean | "增强编译" 开启时,是否禁用JS文件严格模式,默认为false |
|
|
729
800
|
| minifyJS | boolean | 上传时压缩 JS 代码 |
|
|
730
801
|
| minifyWXML | boolean | 上传时压缩 WXML 代码 |
|
|
731
802
|
| minifyWXSS | boolean | 上传时压缩 WXSS 代码 |
|
|
@@ -34,6 +34,10 @@ export declare class Project implements IProject {
|
|
|
34
34
|
get appid(): string;
|
|
35
35
|
get type(): MiniProgramCI.ProjectType;
|
|
36
36
|
get privateKey(): string;
|
|
37
|
+
getFilesAndDirs(): {
|
|
38
|
+
files: string[];
|
|
39
|
+
dirs: string[];
|
|
40
|
+
};
|
|
37
41
|
getExtAppid(): Promise<string | void>;
|
|
38
42
|
stat(prefix: string, filePath: string): IStat | undefined;
|
|
39
43
|
getFile(prefix: string, filePath: string): Buffer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as cloudAPI from '../vendor/cloud-api';
|
|
1
|
+
import * as cloudAPI from '../vendor/cloud-api/src/index';
|
|
2
2
|
import { MiniProgramCI } from '../types';
|
|
3
3
|
export declare function initCloudAPI(appid: string): void;
|
|
4
4
|
export declare function get3rdCloudCodeSecret(project: MiniProgramCI.IProject): Promise<any>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MiniProgramCI } from '../types';
|
|
2
|
-
interface
|
|
2
|
+
interface VersionOptions {
|
|
3
3
|
region?: string;
|
|
4
|
-
envId: string;
|
|
5
4
|
uploadType: string;
|
|
6
5
|
flowRatio: number;
|
|
7
6
|
cpu: number;
|
|
@@ -21,21 +20,51 @@ interface IAPITCBCreateCloudBaseRunServerVersionOptions {
|
|
|
21
20
|
versionRemark?: string;
|
|
22
21
|
packageName?: string;
|
|
23
22
|
packageVersion?: string;
|
|
24
|
-
imageInfo?:
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
imageInfo?: {
|
|
24
|
+
repositoryName: string;
|
|
25
|
+
isPublic: boolean;
|
|
26
|
+
tagName: string;
|
|
27
|
+
serverAddr: string;
|
|
28
|
+
imageUrl: string;
|
|
29
|
+
};
|
|
30
|
+
codeDetail?: {
|
|
31
|
+
name?: {
|
|
32
|
+
name?: string | null;
|
|
33
|
+
fullName?: string | null;
|
|
34
|
+
};
|
|
35
|
+
url?: string;
|
|
36
|
+
};
|
|
37
|
+
imageSecretInfo?: {
|
|
38
|
+
registryServer?: string;
|
|
39
|
+
userName?: string;
|
|
40
|
+
password?: string;
|
|
41
|
+
email?: string;
|
|
42
|
+
};
|
|
27
43
|
imagePullSecret?: string;
|
|
28
44
|
customLogs?: string;
|
|
29
45
|
initialDelaySeconds?: number;
|
|
30
|
-
mountVolumeInfo?:
|
|
46
|
+
mountVolumeInfo?: {
|
|
47
|
+
name?: string;
|
|
48
|
+
mountPath?: string;
|
|
49
|
+
readOnly?: boolean;
|
|
50
|
+
nfsVolumes?: {
|
|
51
|
+
server?: string;
|
|
52
|
+
path?: string;
|
|
53
|
+
readOnly?: boolean;
|
|
54
|
+
}[];
|
|
55
|
+
}[];
|
|
31
56
|
addIntranetDns?: boolean;
|
|
32
57
|
mountWxToken?: boolean;
|
|
33
58
|
useHttpRoute?: boolean;
|
|
34
59
|
}
|
|
60
|
+
interface IAPITCBCreateCloudBaseRunServerVersionResult {
|
|
61
|
+
result: string | null;
|
|
62
|
+
versionName: string | null;
|
|
63
|
+
}
|
|
35
64
|
interface IContainerOptions {
|
|
36
65
|
project: MiniProgramCI.IProject;
|
|
37
66
|
env: string;
|
|
38
|
-
version:
|
|
67
|
+
version: VersionOptions;
|
|
39
68
|
containerRoot: string;
|
|
40
69
|
}
|
|
41
70
|
export declare function uploadContainer(options: IContainerOptions): Promise<IAPITCBCreateCloudBaseRunServerVersionResult>;
|
package/dist/@types/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CI_VERSION = "1.
|
|
1
|
+
export declare const CI_VERSION = "1.8.0";
|
|
2
2
|
export declare const PARAM_ERROR = 10000;
|
|
3
3
|
export declare const WXML_NOT_FOUND = 10007;
|
|
4
4
|
export declare const JS_NOT_FOUND = 10008;
|
|
@@ -8,6 +8,7 @@ export declare const BABILI_JS_ERR = 10034;
|
|
|
8
8
|
export declare const JS_ES6_ERR = 10035;
|
|
9
9
|
export declare const FILE_FLAT_ERR = 10036;
|
|
10
10
|
export declare const POST_WXSS_ERR = 10037;
|
|
11
|
+
export declare const MINIFY_WXML_ERR = 10038;
|
|
11
12
|
export declare const SUMMER_PLUGIN_ERR = 10045;
|
|
12
13
|
export declare const SUMMER_PLUGIN_CODE_ERR = 10046;
|
|
13
14
|
export declare const GAME_PLUGIN_LIB_MD5_NOT_MATCH = 10081;
|
|
@@ -24,6 +25,7 @@ export declare const GENERATE_LOCAL_SIGNATURE_ERR = 20002;
|
|
|
24
25
|
export declare const UPLOAD_CGI_ERR = 20003;
|
|
25
26
|
export declare const CODE_PROTECT_TRANSLATE_FILENAME = 20004;
|
|
26
27
|
export declare const UPLOAD_JS_SERVER_CGI_ERR = 20005;
|
|
28
|
+
export declare const GET_LATEST_VERSION_CGI_ERR = 20006;
|
|
27
29
|
export declare const PROJECT_TYPE_ERROR = 30000;
|
|
28
30
|
export declare const MINI_PROGRAM_MAIN_PACKAGE_ROOT = "__APP__";
|
|
29
31
|
export declare const MINI_GAME_MAIN_PACKAGE_ROOT = "__GAME__";
|
|
@@ -42,8 +44,6 @@ export declare enum COMPILE_TYPE {
|
|
|
42
44
|
miniGame = "miniGame",
|
|
43
45
|
miniGamePlugin = "miniGamePlugin"
|
|
44
46
|
}
|
|
45
|
-
export declare const MiniProgramWhiteList: Record<string, true>;
|
|
46
|
-
export declare const GameWhiteList: Record<string, true>;
|
|
47
47
|
export declare const TABBAR_ICON_WHITE_LIST: string[];
|
|
48
48
|
export declare const DefaultProjectAttr: {
|
|
49
49
|
platform: boolean;
|
|
@@ -36,4 +36,5 @@ interface IVariableDeclareProperty {
|
|
|
36
36
|
}
|
|
37
37
|
export declare function getAppJSONVariableDecalearProperty(appJSON: AppJSON.IAppJSON): Array<IVariableDeclareProperty>;
|
|
38
38
|
export declare function checkOpenDataContext(options: IInnerAppJSONCheckOptions, appJSON: AppJSON.IAppJSON): void;
|
|
39
|
+
export declare function checkRenderer(options: IInnerAppJSONCheckOptions): void;
|
|
39
40
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Project } from '../../ci/project';
|
|
3
|
+
import { MiniProgramCI } from '../../types';
|
|
4
|
+
declare type IStat = MiniProgramCI.IStat;
|
|
5
|
+
export declare class ProjectWithMockBuffer extends Project {
|
|
6
|
+
private mockBuffer;
|
|
7
|
+
setMockFileCache(mockedProject: object): void;
|
|
8
|
+
private __dirSet;
|
|
9
|
+
private __fileSet;
|
|
10
|
+
private _getTargetPath;
|
|
11
|
+
getFile(prefix: string, filePath: string): Buffer;
|
|
12
|
+
stat(prefix: string, filePath: string): IStat | undefined;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -18,6 +18,10 @@ export declare class ReactiveProject implements MiniProgramCI.IProject {
|
|
|
18
18
|
release(): void;
|
|
19
19
|
attr(): Promise<MiniProgramCI.IProjectAttr>;
|
|
20
20
|
getFileList(prefix: string, extName: string): string[];
|
|
21
|
+
getFilesAndDirs(): {
|
|
22
|
+
files: string[];
|
|
23
|
+
dirs: string[];
|
|
24
|
+
};
|
|
21
25
|
getExtAppid(): Promise<string | void>;
|
|
22
26
|
updateFiles(): void;
|
|
23
27
|
updateProject(): Promise<unknown>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { IGameJSON, IProject, MiniProgramCI } from '../../types';
|
|
2
3
|
interface INameMapping {
|
|
3
4
|
[origin: string]: string;
|
|
4
5
|
}
|
|
5
6
|
export declare const getNameMapping: (project: IProject, root: string) => Promise<INameMapping>;
|
|
6
7
|
export declare const getGameNameMapping: (project: IProject, gameJSON: IGameJSON, fileList: string[]) => Promise<INameMapping>;
|
|
7
|
-
export declare function uglifyFileNames(project: IProject, prevResult: MiniProgramCI.IStringKeyMap<string |
|
|
8
|
-
type: 'Buffer';
|
|
9
|
-
data: Uint8Array;
|
|
10
|
-
}>): Promise<MiniProgramCI.IAnyObject>;
|
|
8
|
+
export declare function uglifyFileNames(project: IProject, prevResult: MiniProgramCI.IStringKeyMap<string | Buffer>, nameMapping?: INameMapping): Promise<MiniProgramCI.IAnyObject>;
|
|
11
9
|
export {};
|
package/dist/@types/core.d.ts
CHANGED
package/dist/@types/index.d.ts
CHANGED
|
@@ -9,7 +9,10 @@ import { createTimeTrigger } from './cloud/createTimeTrigger';
|
|
|
9
9
|
import { uploadContainer } from './cloud/uploadContainer';
|
|
10
10
|
import { IUploadOptions } from './cloud/uploadFile';
|
|
11
11
|
import { uploadJsServer } from './ci/jsserver';
|
|
12
|
+
import { analyseCode } from './ci/code-analyse';
|
|
12
13
|
import { getCompiledResult } from './ci/getCompiledResult';
|
|
14
|
+
import { getLatestVersion } from './ci/getLatestVersion';
|
|
15
|
+
import { getWhiteExtList } from './utils/white_ext_list';
|
|
13
16
|
export { Project };
|
|
14
17
|
export type { IUploadOptions };
|
|
15
18
|
export declare const upload: typeof _upload;
|
|
@@ -27,5 +30,8 @@ export declare const cloud: {
|
|
|
27
30
|
uploadContainer: typeof uploadContainer;
|
|
28
31
|
};
|
|
29
32
|
export { uploadJsServer };
|
|
33
|
+
export { getLatestVersion };
|
|
34
|
+
export { analyseCode };
|
|
35
|
+
export { getWhiteExtList };
|
|
30
36
|
export * from './core';
|
|
31
37
|
export * from './summer';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { IBasicCodeExt, SourceMap, SummerPluginOptions } from './types';
|
|
3
|
+
import { MiniProgramCI } from '../types';
|
|
3
4
|
interface DevtoolMessageHub {
|
|
4
5
|
showStatus: (id: number, message: string) => void;
|
|
5
6
|
hideStatus: (id: number) => void;
|
|
@@ -80,6 +81,9 @@ export interface CodeError {
|
|
|
80
81
|
error: any;
|
|
81
82
|
}
|
|
82
83
|
export declare type CodeFiles = Record<string, CodeFile | CodeError>;
|
|
84
|
+
export declare type LocalFiles = Record<string, {
|
|
85
|
+
size: number;
|
|
86
|
+
}>;
|
|
83
87
|
export interface ICompilerStatus {
|
|
84
88
|
codeExts: string[];
|
|
85
89
|
codeConf: {
|
|
@@ -110,7 +114,7 @@ declare type ISummerPluginConfig = Array<string | [string, SummerPluginOptions]>
|
|
|
110
114
|
export interface ICompilerOptions {
|
|
111
115
|
appid: string;
|
|
112
116
|
attr: any;
|
|
113
|
-
compileType:
|
|
117
|
+
compileType: MiniProgramCI.ProjectType;
|
|
114
118
|
miniprogramRoot: string;
|
|
115
119
|
pluginRoot: string;
|
|
116
120
|
summerPlugins: ISummerPluginConfig;
|
|
@@ -181,6 +185,7 @@ export declare class SummerCompiler {
|
|
|
181
185
|
es6: boolean;
|
|
182
186
|
es7: boolean;
|
|
183
187
|
minify: boolean;
|
|
188
|
+
disableUseStrict: boolean;
|
|
184
189
|
};
|
|
185
190
|
}): Promise<{
|
|
186
191
|
isLargeFile?: boolean | undefined;
|
|
@@ -232,6 +237,9 @@ export declare class SummerCompiler {
|
|
|
232
237
|
}): Promise<any>;
|
|
233
238
|
setProxy(proxyUrl: string): void;
|
|
234
239
|
setLocale(locale: string): void;
|
|
240
|
+
uglifyFileNames(project: IProject, result: Record<string, string | Buffer>, nameMapping: Record<string, string>): Promise<MiniProgramCI.IAnyObject>;
|
|
241
|
+
getLocalFileList(): Promise<LocalFiles>;
|
|
242
|
+
getPluginLocalFileList(): Promise<LocalFiles>;
|
|
235
243
|
packNpm(project: IProject): Promise<void>;
|
|
236
244
|
packNpmManually(packTaskList: Array<{
|
|
237
245
|
packageJsonPath: string;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
code?:
|
|
3
|
-
message: string;
|
|
4
|
-
stack?: string;
|
|
1
|
+
export declare class SummerError extends Error {
|
|
2
|
+
code?: number | string;
|
|
5
3
|
path?: string;
|
|
6
4
|
plugin?: string;
|
|
7
5
|
hook?: string;
|
|
8
|
-
|
|
6
|
+
constructor(error: any);
|
|
7
|
+
toString(): string;
|
|
8
|
+
toJSON(): {
|
|
9
|
+
type: string;
|
|
10
|
+
message: string;
|
|
11
|
+
stack: string | undefined;
|
|
12
|
+
code: string | number | undefined;
|
|
13
|
+
path: string | undefined;
|
|
14
|
+
plugin: string | undefined;
|
|
15
|
+
hook: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
9
18
|
export declare const SummerErrors: {
|
|
10
19
|
readonly SUMMER_PLUGIN_ERR: 10045;
|
|
11
20
|
readonly SUMMER_PLUGIN_CODE_ERR: 10046;
|
|
@@ -11,6 +11,7 @@ export declare class AppGraph extends BaseGraph {
|
|
|
11
11
|
compileSingleCode(filePath: string, sourceCode?: string): Promise<CodeFile>;
|
|
12
12
|
getDevCode(recorder: Recorder, options: IPackageCodeOptions): Promise<CodeFiles>;
|
|
13
13
|
getProdCode(recorder: Recorder, options: IPackageCodeOptions): Promise<CodeFiles>;
|
|
14
|
+
protected getLocalCodeFileList(): string[];
|
|
14
15
|
protected onFileChangeForGraph(type: 'unlink' | 'unlinkDir' | 'add' | 'addDir' | 'change', path: string): void;
|
|
15
16
|
private getPackageFile;
|
|
16
17
|
private getIndependentRoot;
|
|
@@ -44,6 +44,9 @@ export declare abstract class BaseGraph {
|
|
|
44
44
|
private tranform;
|
|
45
45
|
private generate;
|
|
46
46
|
compile(recorder: Recorder): Promise<ICompileResult>;
|
|
47
|
+
getLocalFileList(): Promise<Record<string, {
|
|
48
|
+
size: number;
|
|
49
|
+
}>>;
|
|
47
50
|
private compileOther;
|
|
48
51
|
private compileCodeWithoutJSON;
|
|
49
52
|
protected abstract onFileChangeForGraph(type: 'unlink' | 'unlinkDir' | 'add' | 'addDir' | 'change', path: string): void;
|
|
@@ -54,5 +57,6 @@ export declare abstract class BaseGraph {
|
|
|
54
57
|
conf: any;
|
|
55
58
|
jsons: Record<string, string>;
|
|
56
59
|
}>;
|
|
60
|
+
protected abstract getLocalCodeFileList(): string[];
|
|
57
61
|
}
|
|
58
62
|
export {};
|
|
@@ -11,8 +11,9 @@ export declare class PluginGraph extends BaseGraph {
|
|
|
11
11
|
compileSingleCode(filePath: string, sourceCode?: string): Promise<CodeFile>;
|
|
12
12
|
getDevCode(recorder: Recorder): Promise<CodeFiles>;
|
|
13
13
|
getProdCode(recorder: Recorder): Promise<CodeFiles>;
|
|
14
|
+
protected getLocalCodeFileList(): string[];
|
|
14
15
|
protected onFileChangeForGraph(type: 'unlink' | 'unlinkDir' | 'add' | 'addDir' | 'change', path: string): void;
|
|
15
|
-
private
|
|
16
|
+
private getPackageFile;
|
|
16
17
|
private getIndependentRoot;
|
|
17
18
|
protected compileJSON(): Promise<{
|
|
18
19
|
conf: IPluginConf;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SummerPluginOptions } from './types';
|
|
2
|
-
export declare function initPlugin(
|
|
2
|
+
export declare function initPlugin(pluginName: string, projectPath: string, options: SummerPluginOptions): import("./types").SummerPlugin;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FileType, GenerateDescription, ModuleJSON, SourceDescription } from './types';
|
|
2
2
|
import { CodeError, CodeFile } from './devtool';
|
|
3
3
|
import { BaseGraph } from './graph/basegraph';
|
|
4
|
+
import { SummerError } from './error';
|
|
4
5
|
declare class JsTag {
|
|
5
6
|
isLargeFile: boolean;
|
|
6
7
|
isBabelIgnore: boolean;
|
|
@@ -22,7 +23,7 @@ export default class Module {
|
|
|
22
23
|
fileType: FileType;
|
|
23
24
|
md5: string;
|
|
24
25
|
json: any;
|
|
25
|
-
error
|
|
26
|
+
error?: SummerError | Error;
|
|
26
27
|
jsTag?: JsTag;
|
|
27
28
|
source?: SourceDescription;
|
|
28
29
|
target?: GenerateDescription;
|
|
@@ -32,7 +33,7 @@ export default class Module {
|
|
|
32
33
|
loadStart: number;
|
|
33
34
|
loadEnd: number;
|
|
34
35
|
constructor(graph: BaseGraph, path: string, sourcePath: string, fileType: FileType);
|
|
35
|
-
setError(error:
|
|
36
|
+
setError(error: SummerError | Error): void;
|
|
36
37
|
setSource(source: SourceDescription): void;
|
|
37
38
|
toCodeFile(): CodeFile | CodeError;
|
|
38
39
|
toJSON(): ModuleJSON;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SourceDescription, SummerPlugin } from '../../types';
|
|
2
2
|
export declare function getBabelRoot(independentRoot: string): string;
|
|
3
|
-
export declare function transformES6ModuleAndGenCode(source: SourceDescription, id: string, babelRoot: string): {
|
|
3
|
+
export declare function transformES6ModuleAndGenCode(source: SourceDescription, id: string, babelRoot: string, disableUseStrict: boolean): {
|
|
4
4
|
code: string;
|
|
5
5
|
map: {
|
|
6
6
|
version: number;
|
|
@@ -13,4 +13,6 @@ export declare function transformES6ModuleAndGenCode(source: SourceDescription,
|
|
|
13
13
|
};
|
|
14
14
|
helpers: string[];
|
|
15
15
|
};
|
|
16
|
-
export default function (
|
|
16
|
+
export default function (projectPath: string, options: {
|
|
17
|
+
disableUseStrict: boolean;
|
|
18
|
+
}): SummerPlugin;
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
import typescript from './typescript';
|
|
2
|
-
import sass from './sass';
|
|
3
|
-
import less from './less';
|
|
4
|
-
import enhance from './enhance';
|
|
5
|
-
import terser from './terser';
|
|
6
|
-
import javascript from './base/javascript';
|
|
7
|
-
import wxss from './base/wxss';
|
|
8
|
-
import es6module from './base/es6module';
|
|
9
1
|
declare const _default: {
|
|
10
|
-
|
|
11
|
-
less: typeof less;
|
|
12
|
-
sass: typeof sass;
|
|
13
|
-
enhance: typeof enhance;
|
|
14
|
-
javascript: typeof javascript;
|
|
15
|
-
terser: typeof terser;
|
|
16
|
-
wxss: typeof wxss;
|
|
17
|
-
es6module: typeof es6module;
|
|
2
|
+
load(pluginName: string): typeof import("./enhance").default | typeof import("./base/wxss").default | typeof import("./less").default | null;
|
|
18
3
|
};
|
|
19
4
|
export default _default;
|
|
@@ -18,7 +18,6 @@ export declare class Project implements IDevtoolProject {
|
|
|
18
18
|
private _attr;
|
|
19
19
|
private _dirSet;
|
|
20
20
|
private _fileSet;
|
|
21
|
-
conf: any;
|
|
22
21
|
event: ProjectEventEmitter;
|
|
23
22
|
type: MiniProgramCI.ProjectType;
|
|
24
23
|
privateKey: string;
|
|
@@ -26,17 +25,20 @@ export declare class Project implements IDevtoolProject {
|
|
|
26
25
|
pluginRoot: string;
|
|
27
26
|
nameMappingFromDevtools?: MiniProgramCI.IStringKeyMap<string> | undefined;
|
|
28
27
|
constructor(projectPath: string, files: string[], dirs: string[], options: ProjectOptions);
|
|
28
|
+
getFilesAndDirs(): {
|
|
29
|
+
files: string[];
|
|
30
|
+
dirs: string[];
|
|
31
|
+
};
|
|
29
32
|
attr(): Promise<any>;
|
|
30
33
|
updateOptions(options: ProjectOptions): void;
|
|
31
34
|
private updateType;
|
|
32
35
|
getExtAppid(): Promise<string | void>;
|
|
33
36
|
updateFiles(): void;
|
|
34
37
|
private isIgnore;
|
|
35
|
-
private loadConf;
|
|
36
|
-
private checkConf;
|
|
37
38
|
private cacheDirName;
|
|
38
39
|
getTargetPath(prefix: string, filePath: string): string;
|
|
39
40
|
stat(prefix: string, filePath: string): IStat | undefined;
|
|
41
|
+
getFileSize(prefix: string, filePath: string): number;
|
|
40
42
|
getFile(prefix: string, filePath: string): Buffer;
|
|
41
43
|
getJson<T = any>(prefix: string, filePath: string): T;
|
|
42
44
|
getFileList(prefix?: string, extName?: string): string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodeFile, CodeFiles, IAppConf, ICompileResult, ICompilerOptions, ICompilerStatus, ICompileSingleCodeOptions, IGetCodeOptions, IGetConfOptions, IPluginConf } from './devtool';
|
|
1
|
+
import { CodeFile, CodeFiles, GraphId, IAppConf, ICompileResult, ICompilerOptions, ICompilerStatus, ICompileSingleCodeOptions, IGetCodeOptions, IGetConfOptions, IPluginConf, LocalFiles } from './devtool';
|
|
2
2
|
import { Project } from './project';
|
|
3
3
|
import { SummerPlugin } from './types';
|
|
4
4
|
import { PluginGraph } from './graph/plugingraph';
|
|
@@ -25,6 +25,7 @@ export declare class SummerCompiler {
|
|
|
25
25
|
clearCache(): void;
|
|
26
26
|
getConf({ graphId }: IGetConfOptions, recorder: Recorder): Promise<IAppConf | IPluginConf>;
|
|
27
27
|
getCode(options: IGetCodeOptions, recorder: Recorder): Promise<CodeFiles>;
|
|
28
|
+
getLocalFileList(graphId: GraphId): Promise<LocalFiles>;
|
|
28
29
|
compileSingleCode(options: ICompileSingleCodeOptions, recorder: Recorder): Promise<CodeFile>;
|
|
29
30
|
compile(options: any, recorder: Recorder): Promise<ICompileResult>;
|
|
30
31
|
}
|
|
@@ -40,6 +40,7 @@ export interface PluginContext {
|
|
|
40
40
|
addWatchFile: (absFilePath: string) => void;
|
|
41
41
|
error: (err: any) => never;
|
|
42
42
|
runWorkerMethod: (method: string, ...args: any[]) => Promise<any>;
|
|
43
|
+
rootPath?: string;
|
|
43
44
|
}
|
|
44
45
|
export declare type SourceMap = Omit<RawSourceMap, 'version'> & {
|
|
45
46
|
version: number | string;
|
|
@@ -22,6 +22,10 @@ export declare namespace MiniProgramCI {
|
|
|
22
22
|
getFileList(prefix: string, extName: string): string[];
|
|
23
23
|
getExtAppid(): Promise<string | void>;
|
|
24
24
|
updateFiles(): void;
|
|
25
|
+
getFilesAndDirs(): {
|
|
26
|
+
files: string[];
|
|
27
|
+
dirs: string[];
|
|
28
|
+
};
|
|
25
29
|
}
|
|
26
30
|
interface IStringKeyMap<T = any> {
|
|
27
31
|
[propName: string]: T;
|
|
@@ -52,6 +56,7 @@ export declare namespace MiniProgramCI {
|
|
|
52
56
|
minifyWXML?: boolean;
|
|
53
57
|
minifyWXSS?: boolean;
|
|
54
58
|
autoPrefixWXSS?: boolean;
|
|
59
|
+
disableUseStrict?: boolean;
|
|
55
60
|
}
|
|
56
61
|
interface ITaskStatus {
|
|
57
62
|
id: string;
|
|
@@ -89,7 +89,8 @@ export declare namespace AppJSON {
|
|
|
89
89
|
darkmode?: boolean;
|
|
90
90
|
themeLocation?: string;
|
|
91
91
|
theme?: string;
|
|
92
|
-
lazyCodeLoading?:
|
|
92
|
+
lazyCodeLoading?: 'requiredComponents';
|
|
93
|
+
renderer?: 'skyline' | 'webview';
|
|
93
94
|
}
|
|
94
95
|
interface IPluginConfig {
|
|
95
96
|
provider: string;
|
|
@@ -2,12 +2,14 @@ export declare namespace ProjectConfigJSON {
|
|
|
2
2
|
interface IProjectConfigJSON {
|
|
3
3
|
miniprogramRoot?: string;
|
|
4
4
|
pluginRoot?: string;
|
|
5
|
+
pluginAppid?: string;
|
|
5
6
|
jsserverRoot?: string;
|
|
6
7
|
setting?: {
|
|
7
8
|
babelSetting?: {
|
|
8
9
|
outputPath?: string;
|
|
9
10
|
ignore?: any[];
|
|
10
11
|
};
|
|
12
|
+
useCompilerPlugins?: false | Array<string | [string, any]>;
|
|
11
13
|
};
|
|
12
14
|
}
|
|
13
15
|
}
|