minidev 1.5.2 → 1.6.1-beta.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.
@@ -1 +1 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("fs-extra")),n=e(require("bent")),o=e(require("crypto")),a=e(require("os")),i=e(require("path")),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e,t){return e(t={exports:{}},t.exports),t.exports}var d=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Mini="Mini",e.Cube="Cube"}(t.ECompileTargetType||(t.ECompileTargetType={})),function(e){e.Remote="Remote",e.Remotex="Remotex",e.RemotexLite="RemotexLite",e.Preview="Preview",e.RemoteBoatman="RemoteBoatman"}(t.ECompileModeType||(t.ECompileModeType={}))}));s(d);d.ECompileTargetType,d.ECompileModeType;var u=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultConfig={assetsQueryUrl:"https://render.alipay.com/p/s/h5data/prod/h5config/builder-debug-h5data.json",injectCodeTempPath:i.join(a.tmpdir(),"./builder_debug_output_v2"),offlineDirectoryPath:i.join(__dirname,"../offline"),readonlyDirectoryPath:i.join(__dirname,"../readonly"),assetsMapFilename:"assets_map",boatmanFilename:{[d.ECompileTargetType.Mini]:"boatman_mini",[d.ECompileTargetType.Cube]:"boatman_cube"}},t.libName="builder-debug-utils"}));s(u);u.defaultConfig,u.libName;var c=l((function(e,a){var i=r&&r.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(a,i){function r(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))},s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const l=s(n),c=s(t),p=s(o),f=l.default("json"),h=l.default("buffer"),g=`[${u.libName}]`;a.AssetsUpdater=class{constructor(e){this.context=e}updateOfflineAssetsToday(){return i(this,void 0,void 0,(function*(){!function(e){return i(this,void 0,void 0,(function*(){try{const t=yield c.default.stat(e),n=new Date(parseInt(""+t.mtimeMs,10));return(new Date).toLocaleDateString()===n.toLocaleDateString()}catch(e){return!1}}))}(this.context.getAssetsMapFilePath())?(console.log(g+" local assets are outdated, start to download new debug assets"),yield this.updateOfflineAssets()):console.log(g+" local assets are in the period of validity")}))}updateOfflineAssets(){return i(this,void 0,void 0,(function*(){if(this.updatingTask)return this.updatingTask;this.updatingTask=this.runUpdateTask();try{yield this.updatingTask,this.updatingTask=void 0}catch(e){throw this.updatingTask=void 0,e}}))}runUpdateTask(){return i(this,void 0,void 0,(function*(){let e;try{e=yield f(u.defaultConfig.assetsQueryUrl)}catch(e){throw new Error("Failed to request online config")}yield Promise.all([this.updateLocalFile(this.context.getAssetsMapFilePath(),e.url_v2,e.integrity_v2),this.updateLocalFile(this.context.getBoatmanFilePath(d.ECompileTargetType.Mini),e.url_boatman_mini,e.integrity_boatman_mini),this.updateLocalFile(this.context.getBoatmanFilePath(d.ECompileTargetType.Cube),e.url_boatman_cube,e.integrity_boatman_cube)])}))}updateLocalFile(e,t,n){return i(this,void 0,void 0,(function*(){if(!t||!n)return void console.error(g+" Empty key in config");try{const t=yield c.default.readFile(e);if(p.default.createHash("sha256").update(t).digest("base64")===n)return void console.log(g+" Local is latested")}catch(e){}let o;console.log(g+" Start to update local");try{o=yield h(t)}catch(e){return void console.error(`${g} Download error ${e.message}`)}if(p.default.createHash("sha256").update(o).digest("base64")!==n)throw new Error("Failed to verify");yield c.default.writeFile(e,o),console.log(g+" Updated")}))}}}));s(c);c.AssetsUpdater;var p=l((function(e,t){function n(...e){return e.join("\n")}function o(e,t){return t.target===d.ECompileTargetType.Cube?{}:{workerTop:e.bugmeWPreview,htmlTop:"<script>window.__BUGME_ENV__='preview';<\/script>"+e.bugmeRPreview}}function a(e,t){return{htmlTop:e.bugmeRRemote}}function i(e,t){return t.compilePlugin?{workerTop:e.bugmeWRemote,pluginWorkerTop:e.tyroAgent,htmlTop:e.bugmeRRemote}:{workerTop:n(e.tyroAgent||"",e.bugmeWRemote||""),htmlTop:e.bugmeRRemote}}function r(e,t){return{workerTop:n("var __BUGME_CONSOLE_ENABLE__=true;",e.bugmeWRemote||""),htmlTop:e.bugmeRRemote}}function s(e,t){if(t.target===d.ECompileTargetType.Cube)return{};{const n={htmlTop:e.bugmeRRemote};return t.compilePlugin&&(n.workerTop=e.bugmeWRemote),n}}Object.defineProperty(t,"__esModule",{value:!0}),t.composeAssetsByCompileMode=function(e,t){let n;switch(t.mode){case d.ECompileModeType.Preview:n=o;break;case d.ECompileModeType.Remote:n=a;break;case d.ECompileModeType.Remotex:n=i;break;case d.ECompileModeType.RemotexLite:n=r;break;case d.ECompileModeType.RemoteBoatman:n=s;break;default:throw new Error(`[${u.libName}] unknown compile mode: ${t.mode}`)}return n(e,t)}}));s(p);p.composeAssetsByCompileMode;var f=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.BuilderDebugContext=class{constructor(e){this.assetsQueryUrl="",this.injectCodeTempPath="",this.offlineDirectoryPath="",this.readonlyDirectoryPath="",this.assetsMapFilename="",this.assetsQueryUrl=e.assetsQueryUrl,this.injectCodeTempPath=e.injectCodeTempPath,this.offlineDirectoryPath=e.offlineDirectoryPath,this.readonlyDirectoryPath=e.readonlyDirectoryPath,this.assetsMapFilename=e.assetsMapFilename,this.boatmanFilename=e.boatmanFilename}getAssetsMapFilePath(){return i.join(this.offlineDirectoryPath,this.assetsMapFilename)}getBoatmanFilePath(e){return i.join(this.offlineDirectoryPath,this.boatmanFilename[e])}getReadonlyAssetsMapFilePath(){return i.join(this.readonlyDirectoryPath,this.assetsMapFilename)}getReadonlyBoatmanFilePath(e){return i.join(this.readonlyDirectoryPath,this.boatmanFilename[e])}}}));s(f);f.BuilderDebugContext;var h=l((function(e,n){var o=r&&r.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(a,i){function r(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))},a=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});const i=a(t);function s(e){const t={target:d.ECompileTargetType.Mini};return e.target&&Object.keys(d.ECompileTargetType).indexOf(e.target)>-1&&(t.target=e.target),t}function l(e){const t=Object.assign({},e);if(!t.mode||-1===Object.keys(d.ECompileModeType).indexOf(t.mode))throw new Error(`[${u.libName}] invalid 'mode' option: ${t.mode}`);return t.target&&-1!==Object.keys(d.ECompileTargetType).indexOf(t.target)||(t.target=d.ECompileTargetType.Mini),e}n.BuilderDebugClient=class{constructor(e){this.context=new f.BuilderDebugContext(Object.assign(Object.assign({},u.defaultConfig),e))}updateOfflineAssets(e){return o(this,void 0,void 0,(function*(){this.assetsUpdater||(this.assetsUpdater=new c.AssetsUpdater(this.context)),e.cacheToday?yield this.assetsUpdater.updateOfflineAssetsToday():yield this.assetsUpdater.updateOfflineAssets()}))}generateInjectCode(e){return o(this,void 0,void 0,(function*(){e=l(e);const t=yield function(e){return o(this,void 0,void 0,(function*(){let t;try{t=yield i.default.readJSON(e.getAssetsMapFilePath(),{throws:!1})}catch(e){}return t||(console.log(`[${u.libName}] offline assets_map file was damaged, fallback to readonly file`),t=yield i.default.readJSON(e.getReadonlyAssetsMapFilePath())),t}))}(this.context);return p.composeAssetsByCompileMode(t,e)}))}generateInjectCodeSync(e){e=l(e);const t=function(e){let t=i.default.readJSONSync(e.getAssetsMapFilePath(),{throws:!1});t||(console.log(`[${u.libName}] offline assets_map file was damaged, fallback to readonly file`),t=i.default.readJSONSync(e.getReadonlyAssetsMapFilePath()));return t}(this.context);return p.composeAssetsByCompileMode(t,e)}generateInjectCodePath(e){return o(this,void 0,void 0,(function*(){const t=yield this.generateInjectCode(e);return yield i.default.writeJSON(u.defaultConfig.injectCodeTempPath,t),u.defaultConfig.injectCodeTempPath}))}generateInjectCodePathSync(e){const t=this.generateInjectCodeSync(e);return i.default.writeJSONSync(u.defaultConfig.injectCodeTempPath,t),u.defaultConfig.injectCodeTempPath}getBoatmanBundlePath(e){return o(this,void 0,void 0,(function*(){const t=s(e);try{const e=this.context.getBoatmanFilePath(t.target);return yield i.default.access(e,i.default.constants.R_OK),e}catch(e){return this.context.getReadonlyBoatmanFilePath(t.target)}}))}getBoatmanBundlePathSync(e){const t=s(e);try{const e=this.context.getBoatmanFilePath(t.target);return i.default.accessSync(e,i.default.constants.R_OK),e}catch(e){return this.context.getReadonlyBoatmanFilePath(t.target)}}}}));s(h);h.BuilderDebugClient;var g=l((function(e,t){var n=r&&r.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(a,i){function r(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};let o;function a(){return o||(o=new h.BuilderDebugClient),o}Object.defineProperty(t,"__esModule",{value:!0}),t.updateInjectCodeAssets=function(e={}){return n(this,void 0,void 0,(function*(){return a().updateOfflineAssets(e)}))},t.generateInjectCode=function(e){return n(this,void 0,void 0,(function*(){return a().generateInjectCode(e)}))},t.generateInjectCodeSync=function(e){return a().generateInjectCodeSync(e)},t.generateInjectCodePath=function(e){return n(this,void 0,void 0,(function*(){return a().generateInjectCodePath(e)}))},t.generateInjectCodePathSync=function(e){return a().generateInjectCodePathSync(e)},t.getBoatmanBundlePath=function(e={}){return n(this,void 0,void 0,(function*(){return a().getBoatmanBundlePath(e)}))},t.getBoatmanBundlePathSync=function(e={}){return a().getBoatmanBundlePathSync(e)},t.loadConfig=function(e){o=new h.BuilderDebugClient(e)}}));s(g);g.updateInjectCodeAssets,g.generateInjectCode,g.generateInjectCodeSync,g.generateInjectCodePath,g.generateInjectCodePathSync,g.getBoatmanBundlePath,g.getBoatmanBundlePathSync,g.loadConfig;var m=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ECompileModeType=d.ECompileModeType,t.ECompileTargetType=d.ECompileTargetType,t.BuilderDebugClient=h.BuilderDebugClient,t.updateInjectCodeAssets=g.updateInjectCodeAssets,t.generateInjectCode=g.generateInjectCode,t.generateInjectCodeSync=g.generateInjectCodeSync,t.generateInjectCodePath=g.generateInjectCodePath,t.generateInjectCodePathSync=g.generateInjectCodePathSync,t.getBoatmanBundlePath=g.getBoatmanBundlePath,t.getBoatmanBundlePathSync=g.getBoatmanBundlePathSync,t.loadConfig=g.loadConfig})),y=s(m),C=m.ECompileModeType,P=m.ECompileTargetType,b=m.BuilderDebugClient,T=m.updateInjectCodeAssets,v=m.generateInjectCode,j=m.generateInjectCodeSync,_=m.generateInjectCodePath,B=m.generateInjectCodePathSync,w=m.getBoatmanBundlePath,M=m.getBoatmanBundlePathSync,x=m.loadConfig;exports.BuilderDebugClient=b,exports.ECompileModeType=C,exports.ECompileTargetType=P,exports.default=y,exports.generateInjectCode=v,exports.generateInjectCodePath=_,exports.generateInjectCodePathSync=B,exports.generateInjectCodeSync=j,exports.getBoatmanBundlePath=w,exports.getBoatmanBundlePathSync=M,exports.loadConfig=x,exports.updateInjectCodeAssets=T;
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("fs-extra")),n=e(require("bent")),o=e(require("crypto")),a=e(require("os")),i=e(require("path")),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e,t){return e(t={exports:{}},t.exports),t.exports}var d=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Mini="Mini",e.Cube="Cube"}(t.ECompileTargetType||(t.ECompileTargetType={})),function(e){e.Remote="Remote",e.Remotex="Remotex",e.RemotexLite="RemotexLite",e.Preview="Preview",e.RemoteBoatman="RemoteBoatman"}(t.ECompileModeType||(t.ECompileModeType={}))}));s(d);d.ECompileTargetType,d.ECompileModeType;var u=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultConfig={assetsQueryUrl:"https://render.alipay.com/p/h5data/h5config_builder-debug-h5data.json",injectCodeTempPath:i.join(a.tmpdir(),"./builder_debug_output_v2"),offlineDirectoryPath:i.join(__dirname,"../offline"),readonlyDirectoryPath:i.join(__dirname,"../readonly"),assetsMapFilename:"assets_map",boatmanFilename:{[d.ECompileTargetType.Mini]:"boatman_mini",[d.ECompileTargetType.Cube]:"boatman_cube"}},t.libName="builder-debug-utils"}));s(u);u.defaultConfig,u.libName;var c=l((function(e,a){var i=r&&r.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(a,i){function r(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))},s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const l=s(n),c=s(t),p=s(o),f=l.default("json"),h=l.default("buffer"),g=`[${u.libName}]`;a.AssetsUpdater=class{constructor(e){this.context=e}updateOfflineAssetsToday(){return i(this,void 0,void 0,(function*(){!function(e){return i(this,void 0,void 0,(function*(){try{const t=yield c.default.stat(e),n=new Date(parseInt(""+t.mtimeMs,10));return(new Date).toLocaleDateString()===n.toLocaleDateString()}catch(e){return!1}}))}(this.context.getAssetsMapFilePath())?(console.log(g+" local assets are outdated, start to download new debug assets"),yield this.updateOfflineAssets()):console.log(g+" local assets are in the period of validity")}))}updateOfflineAssets(){return i(this,void 0,void 0,(function*(){if(this.updatingTask)return this.updatingTask;this.updatingTask=this.runUpdateTask();try{yield this.updatingTask,this.updatingTask=void 0}catch(e){throw this.updatingTask=void 0,e}}))}runUpdateTask(){return i(this,void 0,void 0,(function*(){let e;try{e=yield f(u.defaultConfig.assetsQueryUrl)}catch(e){throw new Error("Failed to request online config")}yield Promise.all([this.updateLocalFile(this.context.getAssetsMapFilePath(),e.url_v2,e.integrity_v2),this.updateLocalFile(this.context.getBoatmanFilePath(d.ECompileTargetType.Mini),e.url_boatman_mini,e.integrity_boatman_mini),this.updateLocalFile(this.context.getBoatmanFilePath(d.ECompileTargetType.Cube),e.url_boatman_cube,e.integrity_boatman_cube)])}))}updateLocalFile(e,t,n){return i(this,void 0,void 0,(function*(){if(!t||!n)return void console.error(g+" Empty key in config");try{const t=yield c.default.readFile(e);if(p.default.createHash("sha256").update(t).digest("base64")===n)return void console.log(g+" Local is latested")}catch(e){}let o;console.log(g+" Start to update local");try{o=yield h(t)}catch(e){return void console.error(`${g} Download error ${e.message}`)}if(p.default.createHash("sha256").update(o).digest("base64")!==n)throw new Error("Failed to verify");yield c.default.writeFile(e,o),console.log(g+" Updated")}))}}}));s(c);c.AssetsUpdater;var p=l((function(e,t){function n(...e){return e.join("\n")}function o(e,t){return t.target===d.ECompileTargetType.Cube?{}:{workerTop:e.bugmeWPreview,htmlTop:"<script>window.__BUGME_ENV__='preview';<\/script>"+e.bugmeRPreview}}function a(e,t){return{htmlTop:e.bugmeRRemote}}function i(e,t){return t.compilePlugin?{workerTop:e.bugmeWRemote,pluginWorkerTop:e.tyroAgent,htmlTop:e.bugmeRRemote}:{workerTop:n(e.tyroAgent||"",e.bugmeWRemote||""),htmlTop:e.bugmeRRemote}}function r(e,t){return{workerTop:n("var __BUGME_CONSOLE_ENABLE__=true;",e.bugmeWRemote||""),htmlTop:e.bugmeRRemote}}function s(e,t){if(t.target===d.ECompileTargetType.Cube)return{};{const n={htmlTop:e.bugmeRRemote};return t.compilePlugin&&(n.workerTop=e.bugmeWRemote),n}}Object.defineProperty(t,"__esModule",{value:!0}),t.composeAssetsByCompileMode=function(e,t){let n;switch(t.mode){case d.ECompileModeType.Preview:n=o;break;case d.ECompileModeType.Remote:n=a;break;case d.ECompileModeType.Remotex:n=i;break;case d.ECompileModeType.RemotexLite:n=r;break;case d.ECompileModeType.RemoteBoatman:n=s;break;default:throw new Error(`[${u.libName}] unknown compile mode: ${t.mode}`)}return n(e,t)}}));s(p);p.composeAssetsByCompileMode;var f=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.BuilderDebugContext=class{constructor(e){this.assetsQueryUrl="",this.injectCodeTempPath="",this.offlineDirectoryPath="",this.readonlyDirectoryPath="",this.assetsMapFilename="",this.assetsQueryUrl=e.assetsQueryUrl,this.injectCodeTempPath=e.injectCodeTempPath,this.offlineDirectoryPath=e.offlineDirectoryPath,this.readonlyDirectoryPath=e.readonlyDirectoryPath,this.assetsMapFilename=e.assetsMapFilename,this.boatmanFilename=e.boatmanFilename}getAssetsMapFilePath(){return i.join(this.offlineDirectoryPath,this.assetsMapFilename)}getBoatmanFilePath(e){return i.join(this.offlineDirectoryPath,this.boatmanFilename[e])}getReadonlyAssetsMapFilePath(){return i.join(this.readonlyDirectoryPath,this.assetsMapFilename)}getReadonlyBoatmanFilePath(e){return i.join(this.readonlyDirectoryPath,this.boatmanFilename[e])}}}));s(f);f.BuilderDebugContext;var h=l((function(e,n){var o=r&&r.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(a,i){function r(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))},a=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});const i=a(t);function s(e){const t={target:d.ECompileTargetType.Mini};return e.target&&Object.keys(d.ECompileTargetType).indexOf(e.target)>-1&&(t.target=e.target),t}function l(e){const t=Object.assign({},e);if(!t.mode||-1===Object.keys(d.ECompileModeType).indexOf(t.mode))throw new Error(`[${u.libName}] invalid 'mode' option: ${t.mode}`);return t.target&&-1!==Object.keys(d.ECompileTargetType).indexOf(t.target)||(t.target=d.ECompileTargetType.Mini),e}n.BuilderDebugClient=class{constructor(e){this.context=new f.BuilderDebugContext(Object.assign(Object.assign({},u.defaultConfig),e))}updateOfflineAssets(e){return o(this,void 0,void 0,(function*(){this.assetsUpdater||(this.assetsUpdater=new c.AssetsUpdater(this.context)),e.cacheToday?yield this.assetsUpdater.updateOfflineAssetsToday():yield this.assetsUpdater.updateOfflineAssets()}))}generateInjectCode(e){return o(this,void 0,void 0,(function*(){e=l(e);const t=yield function(e){return o(this,void 0,void 0,(function*(){let t;try{t=yield i.default.readJSON(e.getAssetsMapFilePath(),{throws:!1})}catch(e){}return t||(console.log(`[${u.libName}] offline assets_map file was damaged, fallback to readonly file`),t=yield i.default.readJSON(e.getReadonlyAssetsMapFilePath())),t}))}(this.context);return p.composeAssetsByCompileMode(t,e)}))}generateInjectCodeSync(e){e=l(e);const t=function(e){let t=i.default.readJSONSync(e.getAssetsMapFilePath(),{throws:!1});t||(console.log(`[${u.libName}] offline assets_map file was damaged, fallback to readonly file`),t=i.default.readJSONSync(e.getReadonlyAssetsMapFilePath()));return t}(this.context);return p.composeAssetsByCompileMode(t,e)}generateInjectCodePath(e){return o(this,void 0,void 0,(function*(){const t=yield this.generateInjectCode(e);return yield i.default.writeJSON(u.defaultConfig.injectCodeTempPath,t),u.defaultConfig.injectCodeTempPath}))}generateInjectCodePathSync(e){const t=this.generateInjectCodeSync(e);return i.default.writeJSONSync(u.defaultConfig.injectCodeTempPath,t),u.defaultConfig.injectCodeTempPath}getBoatmanBundlePath(e){return o(this,void 0,void 0,(function*(){const t=s(e);try{const e=this.context.getBoatmanFilePath(t.target);return yield i.default.access(e,i.default.constants.R_OK),e}catch(e){return this.context.getReadonlyBoatmanFilePath(t.target)}}))}getBoatmanBundlePathSync(e){const t=s(e);try{const e=this.context.getBoatmanFilePath(t.target);return i.default.accessSync(e,i.default.constants.R_OK),e}catch(e){return this.context.getReadonlyBoatmanFilePath(t.target)}}}}));s(h);h.BuilderDebugClient;var g=l((function(e,t){var n=r&&r.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(a,i){function r(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};let o;function a(){return o||(o=new h.BuilderDebugClient),o}Object.defineProperty(t,"__esModule",{value:!0}),t.updateInjectCodeAssets=function(e={}){return n(this,void 0,void 0,(function*(){return a().updateOfflineAssets(e)}))},t.generateInjectCode=function(e){return n(this,void 0,void 0,(function*(){return a().generateInjectCode(e)}))},t.generateInjectCodeSync=function(e){return a().generateInjectCodeSync(e)},t.generateInjectCodePath=function(e){return n(this,void 0,void 0,(function*(){return a().generateInjectCodePath(e)}))},t.generateInjectCodePathSync=function(e){return a().generateInjectCodePathSync(e)},t.getBoatmanBundlePath=function(e={}){return n(this,void 0,void 0,(function*(){return a().getBoatmanBundlePath(e)}))},t.getBoatmanBundlePathSync=function(e={}){return a().getBoatmanBundlePathSync(e)},t.loadConfig=function(e){o=new h.BuilderDebugClient(e)}}));s(g);g.updateInjectCodeAssets,g.generateInjectCode,g.generateInjectCodeSync,g.generateInjectCodePath,g.generateInjectCodePathSync,g.getBoatmanBundlePath,g.getBoatmanBundlePathSync,g.loadConfig;var m=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ECompileModeType=d.ECompileModeType,t.ECompileTargetType=d.ECompileTargetType,t.BuilderDebugClient=h.BuilderDebugClient,t.updateInjectCodeAssets=g.updateInjectCodeAssets,t.generateInjectCode=g.generateInjectCode,t.generateInjectCodeSync=g.generateInjectCodeSync,t.generateInjectCodePath=g.generateInjectCodePath,t.generateInjectCodePathSync=g.generateInjectCodePathSync,t.getBoatmanBundlePath=g.getBoatmanBundlePath,t.getBoatmanBundlePathSync=g.getBoatmanBundlePathSync,t.loadConfig=g.loadConfig})),y=s(m),C=m.ECompileModeType,P=m.ECompileTargetType,b=m.BuilderDebugClient,T=m.updateInjectCodeAssets,v=m.generateInjectCode,j=m.generateInjectCodeSync,_=m.generateInjectCodePath,B=m.generateInjectCodePathSync,w=m.getBoatmanBundlePath,M=m.getBoatmanBundlePathSync,x=m.loadConfig;exports.BuilderDebugClient=b,exports.ECompileModeType=C,exports.ECompileTargetType=P,exports.default=y,exports.generateInjectCode=v,exports.generateInjectCodePath=_,exports.generateInjectCodePathSync=B,exports.generateInjectCodeSync=j,exports.getBoatmanBundlePath=w,exports.getBoatmanBundlePathSync=M,exports.loadConfig=x,exports.updateInjectCodeAssets=T;
@@ -4,7 +4,7 @@ const os_1 = require("os");
4
4
  const path_1 = require("path");
5
5
  const interface_1 = require("./interface");
6
6
  exports.defaultConfig = {
7
- assetsQueryUrl: 'https://render.alipay.com/p/s/h5data/prod/h5config/builder-debug-h5data.json',
7
+ assetsQueryUrl: 'https://render.alipay.com/p/h5data/h5config_builder-debug-h5data.json',
8
8
  injectCodeTempPath: path_1.join(os_1.tmpdir(), './builder_debug_output_v2'),
9
9
  offlineDirectoryPath: path_1.join(__dirname, '../offline'),
10
10
  readonlyDirectoryPath: path_1.join(__dirname, '../readonly'),