neo-cmp-cli 1.9.20 → 1.9.22
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/dist/neo/env.js +1 -1
- package/dist/neo/neoEnvManager.js +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +1 -1
- package/template/antd-custom-cmp-template/package.json +1 -1
- package/template/echarts-custom-cmp-template/package.json +1 -1
- package/template/empty-custom-cmp-template/package.json +1 -1
- package/template/neo-custom-cmp-template/package.json +1 -1
- package/template/react-custom-cmp-template/package.json +1 -1
- package/template/react-ts-custom-cmp-template/package.json +1 -1
- package/template/vue2-custom-cmp-template/package.json +1 -1
package/dist/neo/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash");var t,a;exports.__require=function(){if(a)return t;a=1;const e=o,s={neoBaseURL:"https://crm.xiaoshouyi.com",loginURL:"https://login.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login.xiaoshouyi.com/auc/oauth2/token"},n={neoBaseURL:"https://crm-gray.xiaoshouyi.com",loginURL:"https://login-gray.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login-gray.xiaoshouyi.com/auc/oauth2/token"},u={neoBaseURL:"https://crm-sandbox.xiaoshouyi.com",loginURL:"https://login-sandbox.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login-sandbox.xiaoshouyi.com/auc/oauth2/token"},i={neoBaseURL:"https://crm-cd.xiaoshouyi.com",loginURL:"https://login-cd.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login-cd.xiaoshouyi.com/auc/oauth2/token"},c={neoBaseURL:"https://crm-cd.xiaoshouyi.com",loginURL:"https://login-cd.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login-cd.xiaoshouyi.com/auc/oauth2/token",delete:"/rest/metadata/v3.0/ui/customComponents",saveAPI:"/rest/metadata/v3.0/ui/customComponents/actions/saveOrUpdateComponent",queryAll:"/rest/metadata/v3.0/ui/components/filter?custom=true",getCodeLibAPI:o=>`/rest/metadata/v3.0/ui/customComponents/${o}/codeLib`,uploadAPI:"/rest/metadata/v3.0/ui/customComponents/actions/upload",query:"/rest/metadata/v3.0/ui/customComponents/actions/queryCustomComponents"};return t={DefaultNeoCrmAPI:c,getNeoCrmAPI:(o="cd",t={})=>{let a=e.cloneDeep(c),h=i;switch(o){case"production":h=s;break;case"gray":h=n;break;case"sandbox":h=u;break;case"cd":default:h=i;break;case"custom":h={...t,neoBaseURL:t.neoBaseURL,loginURL:t.loginURL,tokenURL:t.tokenURL}}return
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash");var t,a;exports.__require=function(){if(a)return t;a=1;const e=o,s={neoBaseURL:"https://crm.xiaoshouyi.com",loginURL:"https://login.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login.xiaoshouyi.com/auc/oauth2/token"},n={neoBaseURL:"https://crm-gray.xiaoshouyi.com",loginURL:"https://login-gray.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login-gray.xiaoshouyi.com/auc/oauth2/token"},u={neoBaseURL:"https://crm-sandbox.xiaoshouyi.com",loginURL:"https://login-sandbox.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login-sandbox.xiaoshouyi.com/auc/oauth2/token"},i={neoBaseURL:"https://crm-cd.xiaoshouyi.com",loginURL:"https://login-cd.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login-cd.xiaoshouyi.com/auc/oauth2/token"},c={neoBaseURL:"https://crm-cd.xiaoshouyi.com",loginURL:"https://login-cd.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login-cd.xiaoshouyi.com/auc/oauth2/token",delete:"/rest/metadata/v3.0/ui/customComponents",saveAPI:"/rest/metadata/v3.0/ui/customComponents/actions/saveOrUpdateComponent",queryAll:"/rest/metadata/v3.0/ui/components/filter?custom=true",getCodeLibAPI:o=>`/rest/metadata/v3.0/ui/customComponents/${o}/codeLib`,uploadAPI:"/rest/metadata/v3.0/ui/customComponents/actions/upload",query:"/rest/metadata/v3.0/ui/customComponents/actions/queryCustomComponents"};return t={DefaultNeoCrmAPI:c,getNeoCrmAPI:(o="cd",t={})=>{let a=e.cloneDeep(c),h=i;switch(o){case"production":h=s;break;case"gray":h=n;break;case"sandbox":h=u;break;case"cd":default:h=i;break;case"custom":h={...t,neoBaseURL:t.neoBaseURL,loginURL:t.loginURL||t.loginAPI,tokenURL:t.tokenURL||t.tokenAPI}}return{...a,...h}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("node:fs"),t=require("node:path"),n=require("../utils/common.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("node:fs"),t=require("node:path"),n=require("../utils/common.js"),r=require("../config/index.js"),i=require("../config/auth.config.js"),s=require("./env.js");var o,u;exports.__require=function(){if(u)return o;u=1;const c=e,a=t,{errorLog:g}=n.__require(),f=r.__require(),l=i.__require(),{DefaultNeoCrmAPI:h}=s.__require();return o=class{static getEnvFilePath(){return a.join(process.cwd(),".neo-cli","env.json")}static ensureEnvDir(){const e=a.dirname(this.getEnvFilePath());c.existsSync(e)||c.mkdirSync(e,{recursive:!0})}static getAuthConfig(){return{...h,...f.neoConfig,...l}}static getEnvConfig(){let e={};const t=this.getEnvFilePath();if(!c.existsSync(t))return null;try{const n=c.readFileSync(t,"utf-8");e=JSON.parse(n)}catch(e){g(`读取环境配置文件失败: ${e.message||e.msg}`)}return{...this.getAuthConfig(),...e}}static setEnvConfig(e){if(!e||"object"!=typeof e)throw new Error("环境配置必须是一个对象");this.ensureEnvDir();const t={...e,updatedAt:Date.now()},n=this.getEnvFilePath();return c.writeFileSync(n,JSON.stringify(t,null,2),"utf-8"),t}static updateEnvConfig(e){return this.setEnvConfig(e)}static clearEnvConfig(){const e=this.getEnvFilePath();c.existsSync(e)&&c.unlinkSync(e)}}};
|
package/dist/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.9.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.9.22";const o={version:e};exports.default=o,exports.version=e;
|
package/package.json
CHANGED