miniprogram-ci 1.6.1 → 1.8.12
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 +7 -0
- package/README.md +3 -1
- package/dist/@types/ci/cos-upload.d.ts +1 -3
- package/dist/@types/config.d.ts +1 -3
- package/dist/@types/core/js/generateMap.d.ts +3 -0
- package/dist/@types/core/json/app/checkAppFields.d.ts +2 -0
- package/dist/@types/index.d.ts +2 -0
- package/dist/@types/summer/devtool.d.ts +5 -0
- package/dist/@types/summer/graph/basegraph.d.ts +2 -0
- package/dist/@types/summer/summer.d.ts +1 -0
- package/dist/@types/summer/types.d.ts +13 -3
- package/dist/@types/types/miniprogram-json/app.d.ts +5 -1
- package/dist/@types/types/miniprogram-json/page.d.ts +1 -0
- package/dist/@types/types/miniprogram-json/projectconfig.d.ts +1 -0
- package/dist/@types/utils/locales/locales.d.ts +6 -0
- package/dist/@types/utils/locales/zh.d.ts +6 -0
- package/dist/@types/utils/tools.d.ts +1 -0
- package/dist/ci/code-analyse.js +3 -1
- 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 -1
- 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.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 -1
- 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 +2 -2
- package/dist/schema/dist/index.d.ts +1 -1
- package/dist/summer/ci.js +3 -1
- 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/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/schema/dist/app.js +47 -1
- package/dist/vendor/schema/dist/ext.js +46 -1
- package/dist/vendor/schema/dist/game.js +29 -1
- package/dist/vendor/schema/dist/index.js +2 -1
- package/dist/vendor/schema/dist/page.js +38 -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 +425 -9
- package/dist/vendor/schema/dist/projectprivateconfig.js +347 -0
- package/dist/vendor/schema/dist/sitemap.js +1 -1
- package/dist/vendor/schema/dist/theme.js +1 -1
- package/package.json +21 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const types_1=require("../types"),config_1=require("../../config"),babel_helper_1=require("../../utils/babel_helper"),es6module_1=require("./base/es6module"),_transformRuntimeCustom=()=>require("../../utils/babel_transform_plugin"),_pluginTransformRuntime=()=>require("@babel/plugin-transform-runtime"),babel7=()=>require("@babel/core"),_presetEnv=()=>require("@babel/preset-env");function getEnhancePluginsList(){return[[require("../../utils/babel_transform_plugin")],[require("@babel/plugin-transform-runtime"),{corejs:!1,helpers:!0,regenerator:!0,version:"7.12.1"}]].concat(babel_helper_1.getCustomPlugins([]))}const enhance=(e,r)=>{const t=babel7();let
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const types_1=require("../types"),config_1=require("../../config"),babel_helper_1=require("../../utils/babel_helper"),es6module_1=require("./base/es6module"),_transformRuntimeCustom=()=>require("../../utils/babel_transform_plugin"),_pluginTransformRuntime=()=>require("@babel/plugin-transform-runtime"),babel7=()=>require("@babel/core"),_presetEnv=()=>require("@babel/preset-env");function getEnhancePluginsList(){return[[require("../../utils/babel_transform_plugin")],[require("@babel/plugin-transform-runtime"),{corejs:!1,helpers:!0,regenerator:!0,version:"7.12.1"}]].concat((0,babel_helper_1.getCustomPlugins)([]))}const enhance=(e,r)=>{const t=babel7();let n;try{const s={presets:[[require("@babel/preset-env"),{targets:{chrome:53,ios:8},modules:!1,include:["@babel/plugin-transform-computed-properties"]}]],babelrc:!1,plugins:getEnhancePluginsList(),sourceFileName:r,inputSourceMap:!1,configFile:!1,code:!1,ast:!0,cloneInputAst:!1};if(e.astInfo){if(e.astInfo.type!==types_1.AstType.Babel)throw new Error("ast type is not babel");n=t.transformFromAstSync(e.astInfo.ast,e.sourceCode,s)}else{if(null===e.sourceCode)throw new Error("source.targetCode is null");n=babel7().transform(e.sourceCode,s)}}catch(e){const t=`file: ${r}\n ${e.message}`,n=new Error(t);throw n.code=config_1.BABEL_TRANS_JS_ERR,n}return{sourceCode:e.sourceCode,inputMap:e.inputMap,astInfo:{ast:n.ast,type:types_1.AstType.Babel}}};function default_1(e,r){return{name:"summer-enhance",workerMethods:{doTransform(e,r,t,n){const s=enhance(e,r),o=(0,es6module_1.transformES6ModuleAndGenCode)(s,r,t,n);return Object.assign(Object.assign({},s),{target:o})}},async transform(e,t,n,{independentRoot:s,isBabelIgnore:o}){if(t.endsWith(".js")&&!e.largeFile&&!o){const t=(0,es6module_1.getBabelRoot)(s);return await this.runWorkerMethod("doTransform",e,n,t,r.disableUseStrict)}return e}}}exports.default=default_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importWxssCssReg=exports.importWxssReg=void 0;const tslib_1=require("tslib"),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),error_1=require("../error"),less=()=>require("less");function default_1(e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importWxssCssReg=exports.importWxssReg=void 0;const tslib_1=require("tslib"),fs_extra_1=(0,tslib_1.__importDefault)(require("fs-extra")),path_1=(0,tslib_1.__importDefault)(require("path")),error_1=require("../error"),less=()=>require("less");function default_1(s,e){return{name:"summer-less",resolveExt:{wxss:"less"},async load(r,t){var o;if(t.endsWith(".less")){let r=await fs_extra_1.default.readFile(t,"utf-8");const a=[];r=r.replace(exports.importWxssReg,(s,e,r)=>(a.push(r),s.replace(r,r+"?css")));try{const i=await require("less").render(r,{sourceMap:{outputSourceFiles:!0},paths:this.rootPath?[this.rootPath]:[],filename:t,globalVars:null!==(o=null==e?void 0:e.globalVars)&&void 0!==o?o:{}}),l=i.css.replace(exports.importWxssCssReg,(s,e,r)=>{const t=r.slice(0,-4);return a.includes(t)?s.replace(r,t):s});if(i.imports.length)for(const s of i.imports)this.addWatchFile(s);let p=void 0;return i.map&&(p=JSON.parse(i.map),p.sources=p.sources.map(e=>path_1.default.posix.relative(s,e))),{sourceCode:l,inputMap:p}}catch(s){throw(0,error_1.makeSummerError)(s,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR)}}}}}exports.importWxssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss)\1(?:\s*);/g,exports.importWxssCssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss\?css)\1(?:\s*);/g,exports.default=default_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.random=void 0;const tslib_1=require("tslib"),tools_1=require("../../utils/tools"),error_1=require("../error"),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),sass=()=>require("sass");function random(){return
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.random=void 0;const tslib_1=require("tslib"),tools_1=require("../../utils/tools"),error_1=require("../error"),fs_extra_1=(0,tslib_1.__importDefault)(require("fs-extra")),path_1=(0,tslib_1.__importDefault)(require("path")),sass=()=>require("sass");function random(){return(0,tools_1.generateMD5)(`${Math.random()}${Date.now()}`)}exports.random=random;const importWxssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss)\1(?:\s*);/g,importCssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.css)\1(?:\s*);/g;function default_1(s){return{name:"summer-sass",resolveExt:{wxss:["sass","scss"]},async load(e,r){if(r.endsWith(".scss")||r.endsWith(".sass")){let e=await fs_extra_1.default.readFile(r,"utf-8");const t=[];e=e.replace(importWxssReg,(s,e,r)=>(t.push(r),s.replace(r,r.slice(0,-4)+"css")));const o=path_1.default.posix.dirname(path_1.default.relative(s,r));return new Promise((s,a)=>{require("sass").render({file:r,data:e,sourceMap:!0,sourceMapContents:!0,omitSourceMapUrl:!0,outFile:r.slice(0,-5)+".wxss",includePaths:this.rootPath?[this.rootPath]:[]},(e,i)=>{if(e){const s=(0,error_1.makeSummerError)(e,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR);return void a(s)}if(!i)return void a(new Error("no result"));const n=i.css.toString("utf-8").replace(importCssReg,(s,e,r)=>{const o=r.slice(0,-3)+"wxss";return t.includes(o)?s.replace(r,o):s});if(i.stats.includedFiles.length>0)for(const s of i.stats.includedFiles)s!==r&&this.addWatchFile(s);const u=i.map?JSON.parse(i.map.toString("utf-8")):void 0;u&&(u.sourceRoot=o),s({sourceCode:n,inputMap:u})})})}}}}exports.default=default_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const config_1=require("../../config"),javascript_1=require("./base/javascript"),error_1=require("../error"),terser=()=>require("terser"),babelCodeFrame=()=>require("babel-code-frame");function default_1(){return{name:"summer-terser",workerMethods:{doCompress:async(e,r)=>require("terser").minify(e,{toplevel:!0,compress:{drop_console:!1},sourceMap:r})},async compress(e){const r=Object.keys(e).filter(e=>e.endsWith(".js")),o={};return await Promise.all(r.map(async r=>{if(e[r].length>=javascript_1.MAX_CODE_LENGTH)return o[r]=e[r],void(e[r+".map"]&&(o[r+".map"]=e[r+".map"]));const s=e[r+".map"]?{includeSources:!0,content:JSON.parse(e[r+".map"]),filename:r}:{includeSources:!0,content:void 0,filename:r},a=await this.runWorkerMethod("doCompress",e[r],s);if(a.error){const o=a.error,s=`file: ${r}\n ${a.error.message}\n ${require("babel-code-frame")(e[r],o.line,o.col>0?o.col:1)}`;throw
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const config_1=require("../../config"),javascript_1=require("./base/javascript"),error_1=require("../error"),terser=()=>require("terser"),babelCodeFrame=()=>require("babel-code-frame");function default_1(){return{name:"summer-terser",workerMethods:{doCompress:async(e,r)=>require("terser").minify(e,{toplevel:!0,compress:{drop_console:!1,drop_debugger:!1},sourceMap:r})},async compress(e){const r=Object.keys(e).filter(e=>e.endsWith(".js")),o={};return await Promise.all(r.map(async r=>{if(e[r].length>=javascript_1.MAX_CODE_LENGTH)return o[r]=e[r],void(e[r+".map"]&&(o[r+".map"]=e[r+".map"]));const s=e[r+".map"]?{includeSources:!0,content:JSON.parse(e[r+".map"]),filename:r}:{includeSources:!0,content:void 0,filename:r},a=await this.runWorkerMethod("doCompress",e[r],s);if(a.error){const o=a.error,s=`file: ${r}\n ${a.error.message}\n ${require("babel-code-frame")(e[r],o.line,o.col>0?o.col:1)}`;throw(0,error_1.makeSummerError)(s,config_1.UGLIFY_JS_ERR,r)}o[r]=a.code,a.map&&(o[r+".map"]=a.map)})),Object.assign(Object.assign({},e),o)}}}exports.default=default_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),types_1=require("../types"),fs_1=tslib_1.__importDefault(require("fs")),error_1=require("../error"),babel7=()=>require("@babel/core"),pluginTransformTypescript=()=>require("@babel/plugin-transform-typescript"),pluginReplaceTsExportAssignment=e=>{const r=e.template("\n module.exports = ASSIGNMENT;\n ");return{name:"replace-ts-export-assignment",visitor:{TSExportAssignment(e){e.replaceWith(r({ASSIGNMENT:e.node.expression}))}}}},pluginReplaceTsImportEqualsDeclaration=e=>{const r=e.template("\n const ID = require(SOURCE);\n ");return{name:"replace-ts-import-equals-declaration",visitor:{TSImportEqualsDeclaration(e){e.replaceWith(r({ID:e.node.id,SOURCE:e.node.moduleReference.expression}))}}}};function default_1(){return{name:"summer-typescript",resolveExt:{js:"ts"},workerMethods:{doTransform(e,r){let t;try{t=require("@babel/core").transform(e,{babelrc:!1,plugins:[[pluginReplaceTsImportEqualsDeclaration,{}],[pluginReplaceTsExportAssignment,{}],[require("@babel/plugin-transform-typescript"),{}]],sourceFileName:r,sourceMaps:!1,ast:!0,configFile:!1,code:!1})}catch(e){throw
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),types_1=require("../types"),fs_1=(0,tslib_1.__importDefault)(require("fs")),error_1=require("../error"),babel7=()=>require("@babel/core"),pluginTransformTypescript=()=>require("@babel/plugin-transform-typescript"),pluginReplaceTsExportAssignment=e=>{const r=e.template("\n module.exports = ASSIGNMENT;\n ");return{name:"replace-ts-export-assignment",visitor:{TSExportAssignment(e){e.replaceWith(r({ASSIGNMENT:e.node.expression}))}}}},pluginReplaceTsImportEqualsDeclaration=e=>{const r=e.template("\n const ID = require(SOURCE);\n ");return{name:"replace-ts-import-equals-declaration",visitor:{TSImportEqualsDeclaration(e){e.replaceWith(r({ID:e.node.id,SOURCE:e.node.moduleReference.expression}))}}}};function default_1(){return{name:"summer-typescript",resolveExt:{js:"ts"},workerMethods:{doTransform(e,r){let t;try{t=require("@babel/core").transform(e,{babelrc:!1,plugins:[[pluginReplaceTsImportEqualsDeclaration,{}],[pluginReplaceTsExportAssignment,{}],[require("@babel/plugin-transform-typescript"),{}]],sourceFileName:r,sourceMaps:!1,ast:!0,configFile:!1,code:!1})}catch(e){throw(0,error_1.makeSummerError)(e,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR,r)}return{sourceCode:e,inputMap:void 0,astInfo:{ast:t.ast,type:types_1.AstType.Babel}}}},async load(e,r){if(r.endsWith(".ts")){const e=fs_1.default.readFileSync(r,{encoding:"utf-8"});return await this.runWorkerMethod("doTransform",e,r)}}}}exports.default=default_1;
|
package/dist/summer/project.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Project=void 0;const tslib_1=require("tslib"),path_1=(0,tslib_1.__importDefault)(require("path")),fs_1=(0,tslib_1.__importDefault)(require("fs")),tools_1=require("../utils/tools"),events_1=(0,tslib_1.__importDefault)(require("events"));class Project{constructor(t,e,i,r){this.projectPath=t,this._dirSet=new Set,this._fileSet=new Set,this.type="miniProgram",this.privateKey="",this.event=new events_1.default,this.updateOptions(r),this._fileSet=new Set(e.filter(t=>!this.isIgnore(t))),this._dirSet=new Set(i)}getFilesAndDirs(){return{files:Array.from(this._fileSet),dirs:Array.from(this._dirSet)}}async attr(){return this._attr}updateOptions(t){this.appid=t.appid,this._attr=t.attr,this.updateType(t.attr,t.compileType),this.miniprogramRoot=t.miniprogramRoot,this.pluginRoot=t.pluginRoot}updateType(t,e){if(null==t?void 0:t.gameApp)return"miniGamePlugin"===e?void(this.type="miniGamePlugin"):void(this.type="miniGame");this.type=e}getExtAppid(){throw new Error("Method not implemented.")}updateFiles(){throw new Error("Method not implemented.")}isIgnore(t){return t.endsWith(".d.ts")}cacheDirName(t){this._dirSet.has(t)||(this._dirSet.add(t),this.cacheDirName(path_1.default.posix.dirname(t)))}getTargetPath(t,e){return(0,tools_1.normalizePath)(path_1.default.posix.join(t,e)).replace(/\/$/,"").replace(/^\//,"")}stat(t,e){const i=this.getTargetPath(t,e);return this._fileSet.has(i)?{isFile:!0,isDirectory:!1}:this._dirSet.has(i)?{isFile:!1,isDirectory:!0}:void 0}getFileSize(t,e){const i=this.getTargetPath(t,e),r=(0,tools_1.normalizePath)(path_1.default.posix.join(this.projectPath,i));return fs_1.default.statSync(r).size}getFile(t,e){const i=this.getTargetPath(t,e),r=(0,tools_1.normalizePath)(path_1.default.posix.join(this.projectPath,i));return fs_1.default.readFileSync(r,null)}getJson(t,e){const i=this.getFile(t,e).toString("utf-8");try{return JSON.parse(i)}catch(i){throw new Error("JSON parse failed: "+this.getTargetPath(t,e))}}getFileList(t,e=""){return Array.from(this._fileSet).filter(i=>(!e||path_1.default.posix.extname(i)===e)&&(!t||0===i.indexOf(t)))}onFileChange(t,e){if("add"!==t&&"addDir"!==t||(this.cacheDirName(path_1.default.posix.dirname(e)),this.isIgnore(e)||this._fileSet.add(e)),"addDir"===t&&this.cacheDirName(e),"unlink"===t&&this._fileSet.has(e)&&this._fileSet.delete(e),"unlinkDir"===t&&this._dirSet.has(e)){this._dirSet.delete(e);const t=e+"/",i=Array.from(this._dirSet);for(const e of i)0===e.indexOf(t)&&this._dirSet.delete(e);const r=Array.from(this._fileSet);for(const e of r)0===e.indexOf(t)&&this._fileSet.delete(e)}this.event.emit("fileChange",t,e)}}exports.Project=Project;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/recorder.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";function pad(e,t=2){return e>10**t?String(e):`${new Array(t).join("0")}${e}`.slice(-t)}function getPrintTime(){const e=new Date;return`${String(e.getFullYear())}-${pad(e.getMonth()+1)}-${pad(e.getDate())} ${pad(e.getHours())}:${pad(e.getMinutes())}:${pad(e.getSeconds())}.${pad(e.getMilliseconds(),3)}`}Object.defineProperty(exports,"__esModule",{value:!0}),exports.silentRecorder=exports.Recorder=exports.getPrintTime=void 0,exports.getPrintTime=getPrintTime;let taskId=5e7;function genTaskId(){return taskId++}class Recorder{constructor(e){this.sendProgress=e}start(e){const t=genTaskId(),r=e.startsWith("!");r||this.sendProgress(t,"doing",e);const s=()=>{r||this.sendProgress(t,"done","")};return s.id=t,s}async run(e,t){const r=this.start(e);try{return await t()}finally{r()}}}exports.Recorder=Recorder,exports.silentRecorder=new Recorder(()=>{});
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/resolver.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Resolver=void 0;const tslib_1=require("tslib"),path_1=(0,tslib_1.__importDefault)(require("path")),targetCodeExts=["json","wxml","wxss","js","wxs"];function getAllExts(t){const e=[];for(const s of targetCodeExts)for(const o of t[s])e.includes(o)||e.push(o);return e}function getExtToTarget(t){const e={};for(const s of targetCodeExts){const o=[];for(const i of t[s])e[i]=e[i]||{},e[i][s]=[...o],o.push(i)}return e}class Resolver{constructor(t,e,s){this.graph=t,this.root=e,this.extConf=s,this.fileSet=new Set,this.resolveInfoMap=new Map,this.onFileChange=(t,e)=>{var s;if(this.isCodeFile(e)&&("unlink"===t||"add"===t))if("add"===t)this.updateFile(e);else{const t=this.getExt(e),o=this.resolve(e);for(const e of o){const o=this.getExt(e.path);this.resolveInfoMap.delete(e.path);for(const i of this.extToTarget[t][o]){const t=e.path.slice(0,e.path.length-o.length)+i;if(null===(s=this.graph.project.stat(this.root,t))||void 0===s?void 0:s.isFile){this.updateFile(t);break}}}}},this.allExts=getAllExts(s),this.extToTarget=getExtToTarget(s),this.updateFiles()}updateFiles(){const t=this.graph.project.getFileList(this.root).map(t=>t.replace(new RegExp("^"+this.root),""));for(const e of t){const t=this.getExt(e);this.allExts.includes(t)&&(this.fileSet.add(e),this.updateFile(e))}}resolve(t){const e=[];if(this.isCodeFile(t))for(const s of this.resolveInfoMap.values())s.source===t&&e.push(s);return e}stat(t){return this.resolveInfoMap.has(t)?{isFile:!0,isDirectory:!1}:void 0}isCodeFile(t){const e=path_1.default.extname(t).replace(/^./,"");return this.allExts.includes(e)}getExt(t){return path_1.default.extname(t).replace(/^./,"")}updateFile(t){if(t.endsWith(".d.ts"))return;const e=this.getExt(t);for(const s of targetCodeExts)if(this.extToTarget[e][s]){const o=t.substr(0,t.length-e.length)+s,i=this.resolveInfoMap.get(o);if(i){if(!this.extToTarget[e][s].includes(i.sourceExt))continue}this.resolveInfoMap.set(o,{path:o,source:t,sourceExt:e})}}}exports.Resolver=Resolver;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/summer.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=void 0;const tslib_1=require("tslib"),plugingraph_1=require("./graph/plugingraph"),appgraph_1=require("./graph/appgraph"),path_1=(0,tslib_1.__importDefault)(require("path")),reactiveCache_1=require("../core/json/reactiveCache"),initPlugin_1=require("./initPlugin"),lodash_1=require("lodash"),locales_1=(0,tslib_1.__importDefault)(require("../utils/locales/locales")),plugin_driver_1=require("./plugin_driver"),persist_cache_1=(0,tslib_1.__importDefault)(require("./persist_cache")),tools_1=require("../utils/tools");let proxyProject;function initProxyProjectForJSON(t){if(proxyProject&&proxyProject.projectPath!==t.projectPath&&(proxyProject.clearResolver(),proxyProject=void 0),!proxyProject){let e={};function i(i,r){const o=t.stat(i,r);if(o)return o;const p=t.getTargetPath(i,r);for(const t in e)if(p.startsWith(t))return e[t].stat(path_1.default.posix.relative(t,p))}proxyProject=new Proxy(t,{get:(t,e,r)=>"stat"===e?i:Reflect.get(t,e,r)}),proxyProject.addResolver=t=>{(0,reactiveCache_1.cleanReactiveCache)(),e[t.root]=t},proxyProject.removeResolver=t=>{(0,reactiveCache_1.cleanReactiveCache)(),delete e[t.root]},proxyProject.clearResolver=()=>{e={},(0,reactiveCache_1.cleanReactiveCache)()}}return proxyProject}function getCacheBaseKey(t){const i=`${t.miniprogramRoot}|${t.pluginRoot}|${t.summerPlugins.join(",")}`;return(0,tools_1.generateMD5)(i)}class SummerCompiler{constructor(t,i,e){this.project=t,this.cachePath=i,this.options=e,this.proxyProject=initProxyProjectForJSON(t),this.projectPath=t.projectPath,this.persistCache=new persist_cache_1.default(i,getCacheBaseKey(e)),this.initPlugins(),this.initAppGraph(),"miniProgramPlugin"===this.options.compileType&&this.initPluginGraph()}getBabelSetting(){return this.options.babelSetting}initPlugins(){this.plugins=this.options.summerPlugins.map(t=>{let i,e={};return"string"==typeof t?i=t:(i=t[0],e=t[1]),(0,initPlugin_1.initPlugin)(i,this.project.projectPath,e)})}initAppGraph(){this.appGraph=new appgraph_1.AppGraph({type:"miniprogram",root:this.project.miniprogramRoot,persistCache:this.persistCache,plugins:this.plugins,compiler:this})}initPluginGraph(){this.pluginGraph=new plugingraph_1.PluginGraph({type:"plugin",root:this.project.pluginRoot,persistCache:this.persistCache,plugins:this.plugins,compiler:this})}updateOptions(t){var i,e;const r=this.options;if(this.options=t,this.persistCache.updateBaseCacheKey(getCacheBaseKey(t)),!(0,lodash_1.isEqual)(t.babelSetting,r.babelSetting)||!(0,lodash_1.isEqual)(this.options.summerPlugins,r.summerPlugins))return this.initPlugins(),this.appGraph.destroy(),null===(i=this.pluginGraph)||void 0===i||i.destroy(),this.initAppGraph(),void("miniProgramPlugin"===this.options.compileType&&this.initPluginGraph());this.options.compileType!==r.compileType&&("miniProgramPlugin"===this.options.compileType?this.initPluginGraph():(null===(e=this.pluginGraph)||void 0===e||e.destroy(),this.pluginGraph=void 0)),this.appGraph.root!==this.project.miniprogramRoot&&(this.appGraph.destroy(),this.initAppGraph()),this.pluginGraph&&this.pluginGraph.root!==this.project.pluginRoot&&(this.pluginGraph.destroy(),this.initPluginGraph())}destroy(){var t;this.appGraph.destroy(),null===(t=this.pluginGraph)||void 0===t||t.destroy(),this.proxyProject.clearResolver()}getStatus(){const t=(0,plugin_driver_1.genResovleExtConf)(this.plugins),i={},e=new Set;for(const r of["json","js","wxml","wxss","wxs"])i[r]={exts:t[r].reverse()},t[r].forEach(t=>{e.add(t)});return{codeExts:Array.from(e.keys()),codeConf:i}}clearCache(){var t;this.appGraph.clearCache(),null===(t=this.pluginGraph)||void 0===t||t.clearCache(),this.persistCache.clean(),(0,reactiveCache_1.cleanReactiveCache)()}async getConf({graphId:t},i){if("miniprogram"===t){return await this.appGraph.getConf(i)}if("plugin"===t){return await this.pluginGraph.getConf(i)}throw new Error("no support getConf for "+t)}async getCode(t,i){if("miniprogram"===t.graphId){return await this.appGraph.getDevCode(i,{package:t.package})}if("plugin"===t.graphId){return await this.pluginGraph.getDevCode(i)}throw new Error("no support getCode for "+t.graphId)}async getLocalFileList(t){if("miniprogram"===t)return await this.appGraph.getLocalFileList();if("plugin"===t)return await this.pluginGraph.getLocalFileList();throw new Error("no support getCode for "+t)}async compileSingleCode(t,i){if("miniprogram"===t.graphId){return await this.appGraph.compileSingleCode(t.filePath,t.sourceCode)}if("plugin"===t.graphId){return await this.pluginGraph.compileSingleCode(t.filePath,t.sourceCode)}throw new Error("no support getCode for "+t.graphId)}async compile(t,i){const e=await i.run(locales_1.default.config.SUMMER_COMPILE_MINIPROGRAM.format(),()=>this.appGraph.compile(i));if("miniProgram"===this.project.type)return e["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:{useSummer:!0}}),e;if("miniProgramPlugin"===this.project.type){const t={},r=await(await i.run(locales_1.default.config.SUMMER_COMPILE_PLUGIN.format(),()=>this.pluginGraph.compile(i)));return Object.keys(e).forEach(i=>{t[path_1.default.posix.join(this.project.miniprogramRoot,i)]=e[i]}),Object.keys(r).forEach(i=>{t[path_1.default.posix.join(this.project.pluginRoot,i)]=r[i]}),t["project.config.json"]=JSON.stringify({miniprogramRoot:this.project.miniprogramRoot,pluginRoot:this.project.pluginRoot,__compileDebugInfo__:{useSummer:!0}}),t}throw new Error("no support compile for "+this.project.type)}}exports.SummerCompiler=SummerCompiler;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/types.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";var FileType,JSONType,AstType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.AstType=exports.JSONType=exports.FileType=exports.BasicCodeExts=void 0,exports.BasicCodeExts=["js","wxml","wxss","json","wxs"],function(e){e.JSON="json",e.WXML="wxml",e.WXSS="wxss",e.WXS="wxs",e.JS="js"}(FileType=exports.FileType||(exports.FileType={})),function(e){e.APP="app",e.Page="page",e.EXT="ext",e.SITEMAP="sitemap",e.THEME="theme"}(JSONType=exports.JSONType||(exports.JSONType={})),function(e){e.Babel="babel",e.Acorn="acorn"}(AstType=exports.AstType||(exports.AstType={}));
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Barrier=void 0;class Barrier{constructor(){this._isOpen=!1,this._promise=new Promise((e,r)=>{this._completePromise=e})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}exports.Barrier=Barrier;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";function ensureArray(r){return Array.isArray(r)?r.filter(Boolean):r?[r]:[]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ensureArray=void 0,exports.ensureArray=ensureArray;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/worker.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.runSummerPluginHook=void 0;const error_1=require("./error"),initPlugin_1=require("./initPlugin");class PluginContainer{constructor(){this.initedPlugins=new Map}getPluginInstance(n,r,e){let i=this.initedPlugins.get(n);return i||(i=(0,initPlugin_1.initPlugin)(n,r,e),this.initedPlugins.set(n,i)),i}clear(){this.initedPlugins.clear()}}const pluginContainer=new PluginContainer;async function runSummerPluginHook(n){var r;if("clear"===n.command)return pluginContainer.clear(),{};const{plugin:e,projectPath:i,pluginOption:t,method:o,args:u}=n,l=pluginContainer.getPluginInstance(e,i,t);if("runMethod"===n.command){const n=null===(r=l.workerMethods)||void 0===r?void 0:r[o];if(!n||"function"!=typeof n)throw new Error(`the ${n} is not a workerMethod of plugin(${e})`);try{return{result:await n(...u)}}catch(n){return{error:n instanceof error_1.SummerError?n.toJSON():n}}}return{}}exports.runSummerPluginHook=runSummerPluginHook;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");(0,tslib_1.__exportStar)(require("./miniprogram-json/index"),exports);
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");(0,tslib_1.__exportStar)(require("./app"),exports),(0,tslib_1.__exportStar)(require("./ext"),exports),(0,tslib_1.__exportStar)(require("./sitemap"),exports),(0,tslib_1.__exportStar)(require("./page"),exports),(0,tslib_1.__exportStar)(require("./plugin"),exports),(0,tslib_1.__exportStar)(require("./projectconfig"),exports),(0,tslib_1.__exportStar)(require("./game"),exports),(0,tslib_1.__exportStar)(require("./theme"),exports);
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.appendBabelHelpers=exports.getBabelOutputPath=exports.isValidBabelHelperFunc=exports.collectBabelHelpers=exports.replaceBabelHelpers=exports.searchBabelModule=exports.isIgnore=exports.getHelperContent=exports.getHelperDeps=exports.getCustomPlugins=exports.getDefaultPlugins=void 0;const tslib_1=require("tslib"),fs=(0,tslib_1.__importStar)(require("fs-extra")),path=(0,tslib_1.__importStar)(require("path")),tools_1=require("./tools"),DepMap={applyDecoratedDescriptor:[],arrayLikeToArray:[],arrayWithHoles:[],arrayWithoutHoles:["arrayLikeToArray"],assertThisInitialized:[],AsyncGenerator:["AwaitValue"],asyncGeneratorDelegate:[],asyncIterator:[],asyncToGenerator:[],awaitAsyncGenerator:["AwaitValue"],AwaitValue:[],classCallCheck:[],classNameTDZError:[],classPrivateFieldDestructureSet:[],classPrivateFieldGet:[],classPrivateFieldLooseBase:[],classPrivateFieldLooseKey:[],classPrivateFieldSet:[],classPrivateMethodGet:[],classPrivateMethodSet:[],classStaticPrivateFieldSpecGet:[],classStaticPrivateFieldSpecSet:[],classStaticPrivateMethodGet:[],classStaticPrivateMethodSet:[],construct:["setPrototypeOf","isNativeReflectConstruct"],createClass:[],createForOfIteratorHelper:["unsupportedIterableToArray"],createForOfIteratorHelperLoose:["unsupportedIterableToArray"],createSuper:["getPrototypeOf","isNativeReflectConstruct","possibleConstructorReturn"],decorate:["toArray","toPropertyKey"],defaults:[],defineEnumerableProperties:[],defineProperty:[],extends:[],get:["superPropBase"],getPrototypeOf:[],inherits:["setPrototypeOf"],inheritsLoose:[],initializerDefineProperty:[],initializerWarningHelper:[],instanceof:[],interopRequireDefault:[],interopRequireWildcard:["typeof"],isNativeFunction:[],isNativeReflectConstruct:[],iterableToArray:[],iterableToArrayLimit:[],iterableToArrayLimitLoose:[],jsx:[],maybeArrayLike:["arrayLikeToArray"],newArrowCheck:[],nonIterableRest:[],nonIterableSpread:[],objectDestructuringEmpty:[],objectSpread:["defineProperty"],objectSpread2:["defineProperty"],objectWithoutProperties:["objectWithoutPropertiesLoose"],objectWithoutPropertiesLoose:[],possibleConstructorReturn:["typeof","assertThisInitialized"],readOnlyError:[],set:["superPropBase","defineProperty"],setPrototypeOf:[],skipFirstGeneratorNext:[],slicedToArray:["arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest"],slicedToArrayLoose:["arrayWithHoles","iterableToArrayLimitLoose","unsupportedIterableToArray","nonIterableRest"],superPropBase:["getPrototypeOf"],taggedTemplateLiteral:[],taggedTemplateLiteralLoose:[],tdz:[],temporalRef:["temporalUndefined","tdz"],temporalUndefined:[],toArray:["arrayWithHoles","iterableToArray","unsupportedIterableToArray","nonIterableRest"],toConsumableArray:["arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread"],toPrimitive:["typeof"],toPropertyKey:["typeof","toPrimitive"],typeof:[],unsupportedIterableToArray:["arrayLikeToArray"],wrapAsyncGenerator:["AsyncGenerator"],wrapNativeSuper:["getPrototypeOf","setPrototypeOf","isNativeFunction","construct"],wrapRegExp:["typeof","wrapNativeSuper","getPrototypeOf","possibleConstructorReturn","inherits"],regenerator:[],Objectentries:[],Objectvalues:[],Arrayincludes:[]};function getDefaultPlugins(){const e=require("@babel/plugin-proposal-class-properties").default,r=require("@babel/plugin-proposal-decorators").default,t=require("@babel/plugin-proposal-function-sent").default,a=require("@babel/plugin-proposal-throw-expressions").default,o=require("@babel/plugin-proposal-export-default-from").default,s=require("@babel/plugin-proposal-pipeline-operator").default,l=require("@babel/plugin-proposal-do-expressions").default,i=require("@babel/plugin-proposal-function-bind").default,p=require("@babel/plugin-proposal-private-methods").default;return new Map([[i,0],[o,0],[s,{proposal:"minimal"}],[l,0],[r,{legacy:!0}],[t,0],[a,0],[e,{loose:!0}],[p,{loose:!0}]])}function getCustomPlugins(e=[]){const r=getDefaultPlugins(),t=[];for(const[e,a]of r)0===a?t.push(e):t.push([e,a]);return t}function getHelperDeps(e,r){const t={};for(;e.length;){const a=e.shift()||"",o=a.substr(0,a.indexOf(r)+r.length),s=a.replace(o+"/helpers/","");s in DepMap&&DepMap[s].forEach(r=>{const a=`${o}/helpers/${r}`;t[a]||(e.push(a),t[a]=!0)}),t[a]=!0}return t}function getHelperContent(e,r){const t=e.substr(0,e.indexOf(r)+r.length),a=e.replace(t,"babel_runtime"),o=(0,tools_1.normalizePath)(path.join(__dirname,"../vendor/",a+".js"));return fs.readFile(o,"utf8")}function isIgnore(e,r){const t=e||[],a=r.split(path.sep).join("/");for(const e of t){if(r===e)return!0;if(!/^[./\\]+/.test(e)&&/.+\/\*$/.test(e)&&-1!==a.indexOf(e.substr(0,e.length-1)))return!0}return!1}function searchBabelModule(e,r){const t=[],a=new RegExp(`require\\("[\\.\\/]*(${r}[^"]+)"\\)`,"gi");return e.replace(a,(e,a)=>{const o=a.replace(r,"").match(/\/(helpers|regenerator)\/?(.+)?/);return(o&&"regenerator"===o[1]||o&&"helpers"===o[1]&&DepMap.hasOwnProperty(o[2]))&&t.push(a),e}),t}function replaceBabelHelpers(e,r={},t,a){const o=new Set,s=t.split("/").map((e,r)=>0===r?"":"../").join("");return{transformCode:e.replace(/require\("(@babel\/runtime\/[^"]+)"\)/gi,(e,t)=>{const l=t.replace(/@babel\/runtime\/(helpers\/)?/,"").replace(/\.js$/,""),i=t.replace("@babel/runtime",a),p=DepMap.hasOwnProperty(l);return!r[t]&&p?(o.add(i),`require("${s+i}")`):e}),helpers:Array.from(o)}}function collectBabelHelpers(e){const r={};return e.replace(/require\("(@babel\/runtime\/[^"]+)"\)/gi,(e,t)=>(r[t]=!0,e)),r}function isValidBabelHelperFunc(e){return DepMap.hasOwnProperty(e)}function getBabelOutputPath(e){let r=e.setting.babelSetting?e.setting.babelSetting.outputPath:"";return r?(r=(0,tools_1.normalizePath)(r),r.replace(/(^[./\\])|(\/$)/g,""),r):"@babel/runtime"}async function appendBabelHelpers(e,r,t,a){const o=getHelperDeps(Array.from(e),t),s=Object.keys(o).map(async e=>{try{const o=await getHelperContent(e,t),s=(0,tools_1.normalizePath)(path.posix.join(r,/\.js$/.test(e)?""+e:e+".js"));a[s]||(a[s]=o)}catch(e){if("EEXIST"===e.code);else if("ENOENT"!==e.code)throw e}});return Promise.all(s)}exports.getDefaultPlugins=getDefaultPlugins,exports.getCustomPlugins=getCustomPlugins,exports.getHelperDeps=getHelperDeps,exports.getHelperContent=getHelperContent,exports.isIgnore=isIgnore,exports.searchBabelModule=searchBabelModule,exports.replaceBabelHelpers=replaceBabelHelpers,exports.collectBabelHelpers=collectBabelHelpers,exports.isValidBabelHelperFunc=isValidBabelHelperFunc,exports.getBabelOutputPath=getBabelOutputPath,exports.appendBabelHelpers=appendBabelHelpers;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const core_1=require("@babel/core"),{addSideEffect:addSideEffect,isModule:isModule}=require("@babel/helper-module-imports");function hasStaticMapping(e,t,r,o){try{if("Object"===e){if("entries"===t||"values"===t)return!0}else if("includes"===t){if("Identifier"===r||"ArrayExpression"===r)return!0;if("MemberExpression"===r&&"prototype"===o.property.name&&"Array"===o.object.name)return!0}return!1}catch(e){return!1}}exports.default={name:"transform-runtime-custom",pre(e){const t=new Map;this.addDefaultImport=(r,o,i)=>{const n=`${r}:${o}:${isModule(e.path)||""}`;let s=t.get(n);return s?s=core_1.types.cloneNode(s):(s=addSideEffect(e.path,r,{importedInterop:"uncompiled",nameHint:o,blockHoist:i}),t.set(n,s)),s}},visitor:{MemberExpression:{enter(e){const{node:t}=e,{object:r,property:o}=t;if(!core_1.types.isReferenced(r,t))return;let i=r.name;const n=o.name;hasStaticMapping(i,n,r.type,r)&&("Object"!==i&&(i="Array"),this.addDefaultImport(`@babel/runtime/helpers/${i}${n}`))}}}};
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/cache.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cacheManager=exports.CACHE_KEY=void 0;const reactiveCache_1=require("../core/json/reactiveCache");var CACHE_KEY;!function(e){e.PROJECT_CONFIG="project.config",e.RAW_APP_JSON="raw|app.json",e.APP_JSON="app.json",e.EXT_JSON="ext.json",e.PAGE_JSON="page.json",e.COMPILED_APP_JSON="compiled.app.json",e.COMPILED_PAGE_JSON="compiled.page.json",e.GAME_JSON="game.json",e.PLUGIN_JSON="plugin.json",e.SITE_MAP_JSON="sitemap.json",e.THEME_JSON="theme.json",e.PLUGIN_THEME_JSON="plugin|theme.json",e.APP_JSON_THEME_LOCATION="app.json.themeLocation",e.APP_JSON_USING_COMPONENTS="app.json.usingComponents"}(CACHE_KEY=exports.CACHE_KEY||(exports.CACHE_KEY={}));let cache={};exports.cacheManager={get:(e,c)=>{if(cache[e.projectPath])return cache[e.projectPath][c]},set:(e,c,a)=>{cache[e.projectPath]||(cache[e.projectPath]={}),cache[e.projectPath][c]=a},clean:()=>{cache={},(0,reactiveCache_1.cleanReactiveCache)()},remove:e=>{for(const c in cache)cache[c]&&delete cache[c][e]}};
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/common.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllTargetTypeFilesWithOtherTypeFilesOfSameName=exports.checkPath=exports.ECheckPathType=exports.checkUTF8=exports.throwError=exports.getAllPagesInfo=exports.getAllPages=void 0;const tslib_1=require("tslib"),tools_1=require("./tools"),config_1=require("../config"),path_1=(0,tslib_1.__importDefault)(require("path")),locales_1=(0,tslib_1.__importDefault)(require("./locales/locales")),getAllPages=e=>{const t=[...e.pages];if(e.subPackages)for(const o of e.subPackages)for(const e of o.pages)t.push((0,tools_1.normalizePath)(path_1.default.posix.join(o.root,e)));return t};exports.getAllPages=getAllPages;const getAllPagesInfo=e=>{const t=e.pages.map(e=>({path:e,root:config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT,name:config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT}));if(e.subPackages)for(const o of e.subPackages)for(const e of o.pages)t.push({path:(0,tools_1.normalizePath)(path_1.default.posix.join(o.root,e)),root:o.root,name:o.name||""});return t};function throwError(e){const{msg:t,code:o=config_1.JSON_CONTENT_ERR,filePath:r}=e,a=new Error(`${r}: ${t}`);throw a.code=o,a.path=r,a}function checkUTF8(e,t){let o="";try{o=(0,tools_1.bufferToUtf8String)(e)}catch(e){o=""}return void 0===o&&throwError({msg:locales_1.default.config.FILE_NOT_UTF8.format(t),code:config_1.FILE_NOT_UTF8,filePath:t}),o}var ECheckPathType;function checkPath(e){const{value:t,tips:o,filePath:r="app.json",code:a=config_1.JSON_CONTENT_ERR,checkPathType:s=e.checkPathType||ECheckPathType.NORMAL}=e;"string"!==(0,tools_1.getType)(t)&&throwError({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([o,"string"]),code:a,filePath:r}),""===t&&throwError({msg:locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format([o,"''"]),code:a,filePath:r}),t.includes("\\")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format([o,"\\"]),code:a,filePath:r}),s===ECheckPathType.NORMAL&&t.startsWith(".")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o,"."]),code:a,filePath:r}),s===ECheckPathType.NORMAL&&t.startsWith("/")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o,"/"]),code:a,filePath:r}),t.startsWith(" ")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o," "]),code:a,filePath:r}),(t.includes("../")||t.endsWith("/.."))&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format([o,"../"]),code:a,filePath:r})}function getAllTargetTypeFilesWithOtherTypeFilesOfSameName(e,t,o,r){if(!t)return[];const a=e.getFileList(r,t);if(!o||0===o.length)return a;const s=o.map(t=>new Set(e.getFileList(r,t).map(e=>e.slice(0,-t.length))));return a.map(e=>e.slice(0,-t.length)).filter(e=>s.every(t=>t.has(e))).map(e=>`${e}${t}`)}exports.getAllPagesInfo=getAllPagesInfo,exports.throwError=throwError,exports.checkUTF8=checkUTF8,function(e){e.NORMAL="NORMAL",e.TAB_BAR_ICON="TAB_BAR_ICON"}(ECheckPathType=exports.ECheckPathType||(exports.ECheckPathType={})),exports.checkPath=checkPath,exports.getAllTargetTypeFilesWithOtherTypeFilesOfSameName=getAllTargetTypeFilesWithOtherTypeFilesOfSameName;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/error.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeError=void 0;const tslib_1=require("tslib"),log_1=(0,tslib_1.__importDefault)(require("./log"));class CodeError extends Error{constructor(r,e){super(r),log_1.default.error(e,r),this.code=e}}exports.CodeError=CodeError;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/fs.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const fsagent_1=require("./fsagent");exports.default=new fsagent_1.FSAgent;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/fsagent.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FSAgent=void 0;const tslib_1=require("tslib"),fs_1=(0,tslib_1.__importDefault)(require("fs")),log_1=(0,tslib_1.__importDefault)(require("./log")),tools_1=require("./tools");class FSAgent{constructor(e){e&&(this._agent=e)}setAgent(e){this._agent=e}stat(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.stat)?(log_1.default.debug("FSAgent use agent.stat for "+e),this._agent.stat(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.stat for "+e),fs_1.default.stat(e,(e,i)=>{if(e)return r(e);t(i)})})}exists(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.exists)?(log_1.default.debug("FSAgent use agent.exists for "+e),this._agent.exists(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.exists for "+e),fs_1.default.exists(e,e=>{t(e)})})}readFile(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.readFile)?(log_1.default.debug("FSAgent use agent.readFile for "+e),this._agent.readFile(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.readFile for "+e),fs_1.default.readFile(e,null,(e,i)=>{if(e)return r(e);t(i)})})}writeFile(e,t,r=null){var i;return e=(0,tools_1.normalizePath)(e),(null===(i=this._agent)||void 0===i?void 0:i.writeFile)?(log_1.default.debug("FSAgent use agent.writeFile for "+e),this._agent.writeFile(e,t,r)):new Promise((i,s)=>{log_1.default.debug("FSAgent use fs.writeFile for "+e),fs_1.default.writeFile(e,t,r,e=>{if(e)return s(e);i()})})}readdir(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.readdir)?(log_1.default.debug("FSAgent use agent.readdir for "+e),this._agent.readdir(e)):new Promise((t,r)=>{fs_1.default.readdir(e,(e,i)=>{if(e)return r(e);t(i)})})}}exports.FSAgent=FSAgent;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/glob.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.glob=void 0;const tslib_1=require("tslib"),path_1=(0,tslib_1.__importDefault)(require("path")),minimatch_1=require("minimatch"),fs_1=(0,tslib_1.__importDefault)(require("./fs")),tools_1=require("./tools"),log_1=(0,tslib_1.__importDefault)(require("./log"));function ignoreMap(t){let e=null;if("/**"===t.slice(-3)){const r=t.replace(/(\/\*\*)+$/,"");e=new minimatch_1.Minimatch(r,{dot:!0})}return{matcher:new minimatch_1.Minimatch(t,{dot:!0}),gmatcher:e}}async function readdir(t,e){const{ignore:r,cwd:i}=e;return(await fs_1.default.readdir(path_1.default.posix.join(i,t))).filter(e=>{const i=(0,tools_1.normalizePath)(path_1.default.posix.join(t,e)),o=isIgnored(i,r);return o&&log_1.default.debug(`file '${i}' has been ignore`),!o})}function childrenIgnored(t,e){return!!e.length&&e.some(e=>{var r;return!!(null===(r=e.gmatcher)||void 0===r?void 0:r.match(t))})}function isIgnored(t,e){return!!e.length&&e.some(e=>{var r;return e.matcher.match(t)||!!(null===(r=e.gmatcher)||void 0===r?void 0:r.match(t))})}async function _glob(t,e){const{cwd:r,ignore:i,dir:o}=e,n=path_1.default.posix.join(r,t),a=await fs_1.default.stat(n);if(!a)return[];if(a.isFile())return[(0,tools_1.normalizePath)(t)];if(a.isDirectory()){if(childrenIgnored(t,i))return log_1.default.debug(`directory '${n}' has been ignore`),[];let r=[];o&&t&&r.push((0,tools_1.normalizePath)(t+"/"));const a=await readdir(t,e);for(const i of a){const o=await _glob(path_1.default.posix.join(t,i),e);r=r.concat(o)}return r}return[]}async function glob(t){const{cwd:e,ignore:r,dir:i=!1}=t;let o=[];return Array.isArray(r)&&(o=r.map(ignoreMap)),_glob("",{cwd:e,ignore:o,dir:i})}exports.glob=glob;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InterruptibleTask=exports.AbortEvent=void 0,exports.AbortEvent="abort";class InterruptibleTask{constructor(...t){this._aborted=!1,this._args=t,this._promise=this.run(...t)}then(t,r){return this._promise.then(t,r)}catch(t){return this._promise.catch(t)}abort(){this._aborted||(this._aborted=!0)}}exports.InterruptibleTask=InterruptibleTask;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/jsonParse.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.jsonRespParse=exports.jsonParse=void 0;const tslib_1=require("tslib"),log_1=(0,tslib_1.__importDefault)(require("./log"));function jsonParse(e){try{return JSON.parse(e)}catch(r){throw log_1.default.info("jsonParse error, input string:"),log_1.default.info(e),r}}function jsonRespParse(e,r=""){try{return JSON.parse(e)}catch(s){throw log_1.default.info(`CGI[${r}] response parse error, response body: ${e}`),s}}exports.jsonParse=jsonParse,exports.jsonRespParse=jsonRespParse;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/jsonlint.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";const jsonlint=function(){const t={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,n,i,s,r,h){const l=r.length-1;switch(s){case 1:this.$=t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(t);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=r[l-1];case 13:this.$={};break;case 14:this.$=r[l-1];break;case 15:this.$=[r[l-2],r[l]];break;case 16:this.$={},this.$[r[l][0]]=r[l][1];break;case 17:this.$=r[l-2],r[l-2][r[l][0]]=r[l][1];break;case 18:this.$=[];break;case 19:this.$=r[l-1];break;case 20:this.$=[r[l]];break;case 21:this.$=r[l-2],r[l-2].push(r[l])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(t,e){throw new Error(t)},parse:function(t){const e=this;let n=[0],i=[null],s=[];const r=this.table;let h="",l=0,o=0,c=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});let a,u,y,p,f,g,_,m,x,b=this.lexer.yylloc;function d(){let t;return t=e.lexer.lex()||1,"number"!=typeof t&&(t=e.symbols_[t]||t),t}s.push(b),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);const E={};for(;;){y=n[n.length-1],this.defaultActions[y]?p=this.defaultActions[y]:(null==a&&(a=d()),p=r[y]&&r[y][a]);let t="";if(void 0===p||!p.length||!p[0]){if(!c){for(g in x=[],r[y])this.terminals_[g]&&g>2&&x.push("'"+this.terminals_[g]+"'");t=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+this.terminals_[a]+"'":"Parse error on line "+(l+1)+": Unexpected "+(1===a?"end of input":"'"+(this.terminals_[a]||a)+"'"),this.parseError(t,{text:this.lexer.match,token:this.terminals_[a]||a,line:this.lexer.yylineno,loc:b,expected:x})}if(3===c){if(1===a)throw new Error(t||"Parsing halted.");o=this.lexer.yyleng,h=this.lexer.yytext,l=this.lexer.yylineno,b=this.lexer.yylloc,a=d()}for(;!(2..toString()in r[y]);){if(0===y)throw new Error(t||"Parsing halted.");S=1,n.length=n.length-2*S,i.length=i.length-S,s.length=s.length-S,y=n[n.length-1]}u=a,a=2,y=n[n.length-1],p=r[y]&&r[y][2],c=3}if(p[0]instanceof Array&&p.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+a);switch(p[0]){case 1:n.push(a),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),n.push(p[1]),a=null,u?(a=u,u=null):(o=this.lexer.yyleng,h=this.lexer.yytext,l=this.lexer.yylineno,b=this.lexer.yylloc,c>0&&c--);break;case 2:if(_=this.productions_[p[1]][1],E.$=i[i.length-_],E._$={first_line:s[s.length-(_||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(_||1)].first_column,last_column:s[s.length-1].last_column},f=this.performAction.call(E,h,o,l,this.yy,p[1],i,s),void 0!==f)return f;_&&(n=n.slice(0,-1*_*2),i=i.slice(0,-1*_),s=s.slice(0,-1*_)),n.push(this.productions_[p[1]][0]),i.push(E.$),s.push(E._$),m=r[n[n.length-2]][n[n.length-1]],n.push(m);break;case 3:return!0}}var S;return!0}},e=function(){const t={EOF:1,parseError:function(t,e){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){const t=this._input[0];this.yytext+=t,this.yyleng++,this.match+=t,this.matched+=t;return t.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),t},unput:function(t){return this._input=t+this._input,this},more:function(){return this._more=!0,this},less:function(t){this._input=this.match.slice(t)+this._input},pastInput:function(){const t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){let t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){const t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;let t,e,n,i,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");const r=this._currentRules();for(let t=0;t<r.length&&(n=this._input.match(this.rules[r[t]]),!n||e&&!(n[0].length>e[0].length)||(e=n,i=t,this.options.flex));t++);return e?(s=e[0].match(/\n.*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,r[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){const t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,n,i){switch(n){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return t.lexer=e,t}();jsonlint.parseError=jsonlint.lexer.parseError=function(t,e){throw e},module.exports={parser:jsonlint,parse:function(){return jsonlint.parse.apply(jsonlint,arguments)}};
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/locales/en.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const fomatable_string_1=require("./fomatable_string"),config={GENERATE_LOCAL_SIGNATURE_FAIL:"generate local signature fail. Usually this happens the content or encoding of private key file is incorrect. Detail: %s",PARAM_ERROR:'function: "%s" lack of parameter: "%s"',SHOULD_NOT_BE_EMPTY:"%s should not be empty",JSON_CONTENT_SHOULD_BE:"%s field needs to be %s",SHOULD_MATCH:"%s should match %s",SHOULD_EQUAL:"%s should equal to %s",SHOULD_AT_LEAST_ONE_ITEM:"%s should have at least on item",OR:"Or",CORRESPONDING_FILE_NOT_FOUND:'%s could not find the corresponding file: "%s"',JSON_SHOULD_NOT_CONTAIN:"%s should not contain %s",JSON_SHOULD_NOT_START_WITH:"%s should not begin with '%s'",NOT_FOUND:"%s not found",MINIPROGRAM_APP_JSON_NOT_FOUND:"In the directory %s specified by miniprogramRoot in project.config.json, %s is not found",PLUGIN_JSON_NOT_FOUND:"In the miniprogram local development plug-in directory %s specified by pluginRoot in project.config.json, %s is not found",PLUGIN_PATH_SAME_WITH_MINIPROGRAM:"The plugin directory %s specified by pluginRoot in project.config.json is the same as the miniprogram directory %s, please modify it to a different directory",CONTENT_EXIST:"%s already exists",FILE_NOT_FOUND:'"%s" file not found, or the file read failed',JSON_PARSE_ERROR:"%s File parsing error",ENTRANCE_NOT_FOUND:"No pages : %s defined in the entry page \napp.json is found",JSON_PAGE_FILE_NOT_EXISTS:'%s %s "%s" could not find the corresponding %s file',SHOULD_NOT_IN:"%s Should not exist in %s",JSON_CUSTOM_COMPILE_PATH_NOT_EXISTS_TITLE:"app.json or custom compilation condition error",JSON_CUSTOM_COMPILE_PATH_NOT_EXISTS:"The startup page %s specified in the custom compilation is not defined in app.json",JSON_ENTRY_PAGE_PATH_NOT_FOUND:"No entry page defined in %s is found in %s",JSON_TABBAR_AT_LEAST:'["tabBar"]["list"] must contain at least %s items',JSON_TABBAR_AT_MOST:'["tabBar"]["list"] cannot contain more than %s items',JSON_TABBAR_PATH_EMPTY:'["tabBar"]["list"][%s]["pagePath"] cannot be empty',JSON_TABBAR_PATH_SAME_WITH_OTHER:'["tabBar"]["list"][%s]["pagePath"] is same with ["tabBar"]["list"][%s]["pagePath"]',JSON_TABBAR_ICON_MAX_SIZE:'The size of ["tabBar"]["list"][%s]["%s"] exceeds %skb',JSON_TABBAR_ICON_EXT:'["tabBar"]["list"][%s]["%s"] Wrong file format, only %s format is supported',EXT_SHOULD_BE_ERROR:'extension name of %s should be "%s"',JSON_CONTENT_SHOULD_NOT_BE:"%s cannot be %s",JSON_RESOLVE_ALIAS_ILLEGAL:'Invalid %s or %s in resolveAlias configuration, contains consecutive "//"',APP_JSON_SHOULD_SET_LAZYCODELOADING:'You need to add "lazyCodeLoading": "requiredComponents" in app.json, because the value of "renderer" in %s is "skyline"',PAGE_JSON_SHOULD_SET_DISABLESCROLL_TRUE:'According to the configuration of the page or app.json, the value of "renderer" in %s page is "skyline", you need to add "disableScroll": true in the page configuration',PAGE_JSON_SHOULD_SET_NAVIGATIONSTYLE_CUSTOM:'According to the configuration of the page or app.json, the value of "renderer" in %s page is "skyline", you need to add "navigationStyle": custom in the page configuration',JSON_CONTENT_EXISTED:"%s already exists",JSON_CONTENT_NOT_FOUND:"%s does not exist",LACK_OF_FILE:"File %s is missing",JSON_PAGES_REPEAT:"%s is repeated in %s",JSON_CONTENT_REPEAT:"%s could not be declared both in %s",EXT_JSON_INVALID:'%s is not a 3rdMiniProgramAppid, ext.json cannot take effect;Read the documentation: "%s"',GAME_EXT_JSON_INVALID:"%s is not a 3rdMiniGameAppid, ext.json cannot take effect;",EXT_APPID_SHOULD_NOT_BE_EMPTY:"extAppid should not be empty",FILE_NOT_UTF8:"%s file is not in UTF-8 encoding",INVALID:"invalid %s",DIRECTORY:"Directory",EXCEED_LIMIT:"%s exceed limit %s",PLEASE_CHOOSE_PLUGIN_MODE:"If you are developing a plugin, choose the plugin mode",TRIPLE_NUMBER_DOT:"number.number.number",PAGE_PATH:"Page Path",PLUGINS_SAME_ALIAS:"%s and %s have same alias",SAME_ITEM:'%s and %s have same "%s"',ALREADY_EXISTS:"already exists",SAME_KEY_PAGE_PUBLICCOMPONENTS:'There can not be the same key: %s in ["pages"] and ["publicComponents"]',GAME_DEV_PLUGIN_SHOULD_NOT_USE_LOCAL_PATH:"Dev plugin: %s shall never specify a local path",GAME_PLUGIN_SIGNATURE_MD5_NOT_MATCH_CONTENT:'MD5 hash of the plugin library file "%s": "%s" not matching the value "%s" given by its signature.json, thus the compiling process has been interrupted.\nThis indicates you might have changed the content of the file.\nRestore the original content of this file may help solve the issue and remove this warning.\n\nTo learn more, you may refer to the documentation.\n',FILE:"FILE",PROCESSING:"processing: %s",DONE:"done: %s",UPLOAD:"upload",SUCCESS:"success",PROJECT_TYPE_ERROR:"appid(%s) is %s",MINI_PROGRAM:"MiniProgram",MINI_GAME:"MiniGame",NOT_ALLOWED_REQUIRE_VAR:"Require variable is not allowed",NOT_ALLOWED_REQUIRE_ASSIGN:"Assigning the require function to other variables is not allowed",NOT_FOUND_NPM_ENTRY:"Npm package entry file not found",NOT_FOUND_NODE_MODULES:"NPM packages not found. Please confirm npm packages which need to build are belong to `miniprogramRoot` directory. Or you may edit project.config.json's `packNpmManually` and `packNpmRelationList`",JSON_ENTRANCE_DECLARE_PATH_ERR:'["entranceDeclare"]["locationMessage"]["path"] "%s" should belong to pages or pages in sub packages',JSON_ENTRANCE_DECLARE_PATH_EMPTY:'["entranceDeclare"]["locationMessage"]["path"] should not be empty',COULD_NOT_USE_CODE_PROTECT:"Code protect is not available",SUMMER_COMPILING_MODULE:"Compiling %s",SUMMER_COMPILE_JSON:"Compile jSON files",SUMMER_OPTIMIZE_CODE:"Optimize code",SUMMER_PACK_FILES:"Pack resource file",SUMMER_COMPRESS_PACK:"Compress code package",SUMMER_SEAL_PACK:"Seal code package",SUMMER_APPEND_BABEL_HELPERS:"Append babel helper files",SUMMER_COMPILE_PAGE_JSON:"Compile json files of %s pages",SUMMER_COMPILE_PLUGIN_PAGE_JSON:"Compiling json files of %s plugin pages",SUMMER_COMPILE:"Compile %s",SUMMER_COMPILE_MINIPROGRAM:"Compile miniprogram",SUMMER_COMPILE_PLUGIN:"Compile plugin"},formatConfig={};for(const[e,o]of Object.entries(config))formatConfig[e]=new fomatable_string_1.FormatableString(o);exports.default=formatConfig;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FormatableString=void 0;class FormatableString extends String{format(...t){const e=t[0];let r=this;return"[object Array]"===Object.prototype.toString.call(e)?(e.forEach(t=>{r=r.replace("%s",t)}),r):(t.forEach(t=>{r=r.replace("%s",t)}),""+r)}}exports.FormatableString=FormatableString;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),en_1=(0,tslib_1.__importDefault)(require("./en")),zh_1=(0,tslib_1.__importDefault)(require("./zh")),systemLocale="$SYSTEM",supportedLocales=["zh","en"];let locale="en";const toSupportedLocale=e=>("$SYSTEM"===e&&"zh_CN"===(e=navigator.language)&&(e="zh"),supportedLocales.find(t=>e.toLowerCase().includes(t))||"zh"),setLocale=e=>{locale=toSupportedLocale(e)};exports.default={get config(){return"en"===locale?en_1.default:zh_1.default},setLocale:setLocale};
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/locales/zh.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const fomatable_string_1=require("./fomatable_string"),config={GENERATE_LOCAL_SIGNATURE_FAIL:"生成本地签名失败。通常是key文件编码或者内容有误。错误详情: %s",PARAM_ERROR:'方法:"%s" 缺少参数:"%s"',SHOULD_NOT_BE_EMPTY:"%s 不能为空",JSON_CONTENT_SHOULD_BE:"%s 字段需为 %s",SHOULD_AT_LEAST_ONE_ITEM:"%s 需至少存在一项",SHOULD_MATCH:"%s 需与 %s 匹配",SHOULD_EQUAL:"%s 需等于 %s",EXT_SHOULD_BE_ERROR:'%s 的拓展名需为 "%s"',OR:"或",CORRESPONDING_FILE_NOT_FOUND:"未找到 %s 对应的 %s 文件",JSON_SHOULD_NOT_START_WITH:"%s 不应该以 '%s' 开头",JSON_SHOULD_NOT_CONTAIN:"%s 不应该包含 %s",NOT_FOUND:"%s 未找到",MINIPROGRAM_APP_JSON_NOT_FOUND:"根据 project.config.json 中 miniprogramRoot 指定的小程序目录 %s,%s 未找到",PLUGIN_JSON_NOT_FOUND:"根据 project.config.json 中 pluginRoot 指定的小程序本地开发插件目录 %s,%s 未找到",PLUGIN_PATH_SAME_WITH_MINIPROGRAM:"project.config.json 中 pluginRoot 指定的小程序本地开发插件目录 %s,与小程序目录 %s 相同,请修改为不同目录",FILE_NOT_FOUND:"未找到 %s 文件,或者文件读取失败",JSON_PARSE_ERROR:"%s 文件解析错误",ENTRANCE_NOT_FOUND:"未找到入口页面\napp.json 中定义的 pages : %s",JSON_PAGE_FILE_NOT_EXISTS:'未找到 %s 中的定义的 %s "%s" 对应的 %s 文件',SHOULD_NOT_IN:"%s 不应该在 %s 中",JSON_CUSTOM_COMPILE_PATH_NOT_EXISTS_TITLE:"app.json 或自定义编译条件错误",JSON_CUSTOM_COMPILE_PATH_NOT_EXISTS:"app.json 中未定义自定义编译中指定的启动页面 %s",JSON_ENTRY_PAGE_PATH_NOT_FOUND:"未在 %s 中找到 %s 定义的入口页面",JSON_TABBAR_AT_LEAST:'["tabBar"]["list"] 需至少包含 %s 项',JSON_TABBAR_AT_MOST:'["tabBar"]["list"] 不能超过 %s 项',JSON_TABBAR_PATH_EMPTY:'["tabBar"]["list"][%s]["pagePath"] 不能为空',JSON_TABBAR_PATH_SAME_WITH_OTHER:'["tabBar"]["list"][%s]["pagePath"] 和 ["tabBar"]["list"][%s]["pagePath"] 相同',JSON_TABBAR_ICON_MAX_SIZE:'["tabBar"]["list"][%s]["%s"] 大小超过 %skb',JSON_TABBAR_ICON_EXT:'["tabBar"]["list"][%s]["%s"] 文件格式错误,仅支持 %s 格式',JSON_CONTENT_SHOULD_NOT_BE:"%s 不能为 %s",JSON_RESOLVE_ALIAS_ILLEGAL:'resolveAlias 配置中 %s 或 %s 不合法,包含连续的 "//"',APP_JSON_SHOULD_SET_LAZYCODELOADING:'%s 中 "renderer" 设置为 "skyline",需在 app.json 添加 "lazyCodeLoading": "requiredComponents"',PAGE_JSON_SHOULD_SET_DISABLESCROLL_TRUE:'根据页面或 app.json 的配置,%s 页面 "renderer" 为 "skyline",需在页面配置中添加 "disableScroll": true',PAGE_JSON_SHOULD_SET_NAVIGATIONSTYLE_CUSTOM:'根据页面或 app.json 的配置,%s 页面 "renderer" 为 "skyline",需在页面配置中添加 "navigationStyle": custom',CONTENT_EXIST:"%s 已经存在",JSON_CONTENT_EXISTED:"%s 已经存在",JSON_CONTENT_NOT_FOUND:"%s 不存在",LACK_OF_FILE:"缺少文件 %s",JSON_PAGES_REPEAT:"%s 在 %s 中重复",JSON_CONTENT_REPEAT:"%s 不能同时在 %s 中声明",EXT_JSON_INVALID:'%s 不是 3rdMiniProgramAppid, ext.json 无法生效;查看文档: "%s"',GAME_EXT_JSON_INVALID:'%s 不是 3rdMiniGameAppid, ext.json 无法生效;"%s"',EXT_APPID_SHOULD_NOT_BE_EMPTY:"extAppid 不能为空",FILE_NOT_UTF8:"%s 文件不是 UTF-8 格式",INVALID:"无效的 %s",DIRECTORY:"目录",EXCEED_LIMIT:"%s 超过限制 %s",PLEASE_CHOOSE_PLUGIN_MODE:"如果正在开发插件,请选择插件模式",TRIPLE_NUMBER_DOT:"数字.数字.数字",PAGE_PATH:"页面路径",PLUGINS_SAME_ALIAS:"%s 和 %s 的别名相同",SAME_ITEM:'%s 和 %s 的 "%s" 相同',ALREADY_EXISTS:"已存在",SAME_KEY_PAGE_PUBLICCOMPONENTS:'["pages"] 与 ["publicComponents"] 不能存在相同的 key: %s',GAME_DEV_PLUGIN_SHOULD_NOT_USE_LOCAL_PATH:"开发版插件 %s 不能使用 %s 指定本地路径",GAME_PLUGIN_SIGNATURE_MD5_NOT_MATCH_CONTENT:'插件文件 "%s" 的 MD5: "%s" 与其 signature.json 所给定的值: "%s" 不匹配, 因此编译过程已经中断。\n这表示此文件的内容可能已经被修改。\n恢复此文件的原始内容可能可以解决此问题并移除此警告。\n\n要了解更多,可以参考文档。\n',FILE:"文件",PROCESSING:"处理中: %s",DONE:"完成: %s",UPLOAD:"上传",SUCCESS:"成功",PROJECT_TYPE_ERROR:"appid(%s) 是 %s",MINI_PROGRAM:"小程序",MINI_GAME:"小游戏",NOT_ALLOWED_REQUIRE_VAR:"不允许require变量",NOT_ALLOWED_REQUIRE_ASSIGN:"不允许将require函数赋值给其他变量",NOT_FOUND_NPM_ENTRY:"未找到npm包入口文件",NOT_FOUND_NODE_MODULES:"没有找到可以构建的 NPM 包,请确认需要参与构建的 npm 都在 `miniprogramRoot` 目录内,或配置 project.config.json 的 packNpmManually 和 packNpmRelationList 进行构建",JSON_ENTRANCE_DECLARE_PATH_ERR:'["entranceDeclare"]["locationMessage"]["path"] "%s" 需在 pages 数组或分包 pages 数组中',JSON_ENTRANCE_DECLARE_PATH_EMPTY:'["entranceDeclare"]["locationMessage"]["path"] 不能为空',COULD_NOT_USE_CODE_PROTECT:"无法使用代码保护功能",SUMMER_COMPILING_MODULE:"编译 %s",SUMMER_COMPILE_JSON:"编译 JSON 文件",SUMMER_OPTIMIZE_CODE:"优化代码",SUMMER_PACK_FILES:"打包资源文件",SUMMER_COMPRESS_PACK:"压缩代码包",SUMMER_SEAL_PACK:"封装代码包",SUMMER_APPEND_BABEL_HELPERS:"追加 babel helper 文件",SUMMER_COMPILE_PAGE_JSON:"编译 %s 个页面json文件",SUMMER_COMPILE_PLUGIN_PAGE_JSON:"编译插件 %s 个页面json文件",SUMMER_COMPILE:"编译 %s",SUMMER_COMPILE_MINIPROGRAM:"编译打包小程序",SUMMER_COMPILE_PLUGIN:"编译打包插件"},formatConfig={};for(const[_,E]of Object.entries(config))formatConfig[_]=new fomatable_string_1.FormatableString(E);exports.default=formatConfig;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/log.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={info:console.info,log:console.log,warn:console.warn,error:console.error,debug:(...e)=>{}};
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/report.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.wrapReport=void 0;const config_1=require("../config"),os=require("os"),request_1=require("./request");async function reportMMData(e){(0,request_1.request)({url:"https://servicewechat.com/wxa-dev-logic/clientreportv2",body:JSON.stringify({report_info_list:[e]}),method:"post"})}const compileTypeMap={miniProgram:1,miniProgramPlugin:2,miniGame:3,miniGamePlugin:4},actionMap={preview:1,upload:2,npm:3,cloud:4,getDevSourceMap:5};function parseVersionToInt(e){let t=e.split(".");return parseInt(t[0]+t[1]+t[2])}function getMinifyXStatus(e,t){return"boolean"==typeof t?t?1:0:e?1:0}function reportAction(e,t,o,i,r,n={}){const a=r.appid,p=r.type,s=parseVersionToInt(config_1.CI_VERSION),c="win32"===process.platform?1:"darwin"===process.platform?2:3,l=os.cpus().length,u=Math.floor(os.totalmem()/1024/1024),f=actionMap[e];o=o.replace(/\,/g,";").slice(0,512);reportMMData({log_id:22365,version:0,user_log_list:`0,${a},${s},${c},${l},${u},${compileTypeMap[p]},${f},${t},${o},${i},0,${n.es6?1:0},${n.es7?1:0},${getMinifyXStatus(n.minify,n.minifyJS)},${getMinifyXStatus(n.minify,n.minifyWXML)},${getMinifyXStatus(n.minify,n.minifyWXSS)},${n.codeProtect?1:0},${n.autoPrefixWXSS?1:0}`})}function wrapReport(e,t){return async function(o){let i=o.project,r={};"upload"!==e&&"preview"!==e||(r=o.setting||{});let n=null,a=Date.now();try{return await t.apply(null,arguments)}catch(e){throw n=e,e}finally{try{let t=Date.now()-a,o=n?n.code?n.code:-1:0,p=n&&n.message?n.message:"";reportAction(e,o,p,t,i,r)}catch(e){console.info(e)}}}}exports.wrapReport=wrapReport;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/request.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
!function(require, directRequire){
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initGlobalProxy=exports.getCiProxy=exports.setCiProxy=exports.request=void 0;const tslib_1=require("tslib"),log_1=(0,tslib_1.__importDefault)(require("./log")),interruptibletask_1=require("./interruptibletask"),req=require("request"),getGlobalProxySettings=require("get-proxy");class RequestTask extends interruptibletask_1.InterruptibleTask{constructor(e){super(e),this._alreadyRefresh=!1,this._promise.catch(e=>{log_1.default.error(`${this._opt.url} ${e}`)})}static async formateQuery(e){const t=Object.assign({},e),{needRandom:r}=t;delete t.needRandom;const s=(t.url||"").split("?"),o=s[0],i=[];return-1!==r&&i.push("_r="+Math.random()),s[1]&&i.push(s[1]),t.url=`${o}?${i.join("&")}`,t}abort(){this._aborted||(this._aborted=!0,this._realRequest&&"function"==typeof this._realRequest.abort&&this._realRequest.abort())}async request(){if(this._aborted)throw interruptibletask_1.AbortEvent;const e=await RequestTask.formateQuery(this._opt);return RequestTask.requestProxy&&(e.proxy=RequestTask.requestProxy),new Promise((t,r)=>{this._realRequest=req(e,(e,s,o)=>{e?r(e):t({resp:s,body:o})}),this._realRequest.on("abort",()=>{r(interruptibletask_1.AbortEvent)})})}async run(e){return this._opt=Object.assign({},e),await this.request()}}function request(e){return new RequestTask(e)}function setCiProxy(e){RequestTask.requestProxy=e,log_1.default.info("miniprogram-ci is using proxy: "+e)}function getCiProxy(){return RequestTask.requestProxy}function initGlobalProxy(){const e=getCiProxy(),t=`${process.env.no_proxy||""},${process.env.NO_PROXY||""}`.split(",").map(e=>e.trim());if(!e&&!t.includes("servicewechat.com")){const e=getGlobalProxySettings();e&&setCiProxy(e)}}RequestTask.requestProxy="",exports.request=request,exports.setCiProxy=setCiProxy,exports.getCiProxy=getCiProxy,exports.initGlobalProxy=initGlobalProxy;
|
|
3
|
+
}(require("licia/lazyImport")(require), require)
|