@moneko/core 2.0.42 → 2.0.43
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/build/envFlags.js +1 -1
- package/lib/persist.js +1 -1
- package/package.json +1 -1
package/build/envFlags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return N}});var e=f(require("fs")),r=f(require("path")),t=require("./common"),i=require("./coverage"),n=f(require("./html-plugin-option")),a=require("./process-env"),s=require("./utils");function o(){return(o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}).apply(this,arguments)}function f(e){return e&&e.__esModule?e:{default:e}}var c=parseFloat(a.hasReact?require("react/package.json").version:"18")>=18?"react-dom/client":"react-dom",u="library"===a.APPTYPE?"site":"src",l=!1;try{var O=r.default.join(a.PROGRAMPATH,"./src/index.ts");e.default.accessSync(O,e.default.constants.R_OK),l=O}catch(e){l=!1}var N={projectName:JSON.stringify((0,s.toUpperCaseString)(a.PACKAGENAME)),projectCoverage:JSON.stringify(i.coverage),providerConfig:JSON.stringify({prefixCls:t.CONFIG.prefixCls,iconPrefixCls:t.CONFIG.prefixCls+"-icon",theme:t.CONFIG.theme}),fallbackCompPath:JSON.stringify(t.CONFIG.fallbackCompPath),ReactDOMPath:JSON.stringify(c),favicon:JSON.stringify(n.default.favicon),hasLocales:JSON.stringify(e.default.existsSync(r.default.join(a.PROGRAMPATH,"./"+u+"/locales"))),hasPersist:JSON.stringify(e.default.existsSync(r.default.join(a.PROGRAMPATH,"./"+u+"/persist"))),layoutSider:JSON.stringify(t.CONFIG.layoutSider),hasAntd:JSON.stringify(a.hasAntd),APPTYPE:JSON.stringify(a.APPTYPE),APPENTRY:JSON.stringify(l),programInfo:JSON.stringify(o({},a.programInfo,{routeBaseName:t.CONFIG.routeBaseName,designSize:t.CONFIG.designSize,routerMode:t.CONFIG.routerMode,renderMode:t.CONFIG.mode})),"process.env":JSON.stringify(o({NODE_ENV:a.NODE_ENV,iconfont:t.CONFIG.iconfont},t.CONFIG.env))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return N}});var e=f(require("fs")),r=f(require("path")),t=require("./common"),i=require("./coverage"),n=f(require("./html-plugin-option")),a=require("./process-env"),s=require("./utils");function o(){return(o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}).apply(this,arguments)}function f(e){return e&&e.__esModule?e:{default:e}}var c=parseFloat(a.hasReact?require("react/package.json").version:"18")>=18?"react-dom/client":"react-dom",u="library"===a.APPTYPE?"site":"src",l=!1;try{var O=r.default.join(a.PROGRAMPATH,"./src/index.ts");e.default.accessSync(O,e.default.constants.R_OK),l=O}catch(e){l=!1}var N={projectName:JSON.stringify((0,s.toUpperCaseString)(a.PACKAGENAME)),projectCoverage:JSON.stringify(i.coverage),providerConfig:JSON.stringify({prefixCls:t.CONFIG.prefixCls,iconPrefixCls:t.CONFIG.prefixCls+"-icon",theme:t.CONFIG.theme}),fallbackCompPath:JSON.stringify(t.CONFIG.fallbackCompPath),ReactDOMPath:JSON.stringify(c),favicon:JSON.stringify(n.default.favicon),hasLocales:JSON.stringify(e.default.existsSync(r.default.join(a.PROGRAMPATH,"./"+u+"/locales"))),hasPersist:JSON.stringify(e.default.existsSync(r.default.join(a.PROGRAMPATH,"./"+u+"/persist.ts"))),layoutSider:JSON.stringify(t.CONFIG.layoutSider),hasAntd:JSON.stringify(a.hasAntd),APPTYPE:JSON.stringify(a.APPTYPE),APPENTRY:JSON.stringify(l),programInfo:JSON.stringify(o({},a.programInfo,{routeBaseName:t.CONFIG.routeBaseName,designSize:t.CONFIG.designSize,routerMode:t.CONFIG.routerMode,renderMode:t.CONFIG.mode})),"process.env":JSON.stringify(o({NODE_ENV:a.NODE_ENV,iconfont:t.CONFIG.iconfont},t.CONFIG.env))};
|
package/lib/persist.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{persistence as e}from"@moneko/common";window.addEventListener("unload",function o(){try{var r=require("@/persist").default
|
|
1
|
+
import{persistence as e}from"@moneko/common";window.addEventListener("unload",function o(){try{var r=hasPersist?require("@/persist").default:{};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.set(t,r[t])}catch(e){}window.removeEventListener("unload",o,!1)},!1);
|