neo-cmp-cli 1.9.22 → 1.9.23

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 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||t.loginAPI,tokenURL:t.tokenURL||t.tokenAPI}}return{...a,...h}}}};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash");var t,e;exports.__require=function(){if(e)return t;e=1;const a=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.xiaoshouyi.com/auc/oauth2/auth",tokenURL:"https://login.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 e=a.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{...e,...h}}}};
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.9.23";const o={version:e};exports.default=o,exports.version=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("fs-extra"),r=require("node:path"),o=require("lodash"),s=require("../neoParams.js"),c=require("../replaceInFilesByMap.js"),t=require("./hasCmpTypeByDir.js"),i=require("../projectUtils/hasNeoProject.js"),n=require("../cmpTypeValidator.js"),a=require("../common.js");var m,p;exports.__require=function(){if(p)return m;p=1;const l=e,u=r,d=o,{consoleTag:_}=s.__require(),q=c.__require(),f=t.__require(),g=i.__require(),{validateApiName:j,ensureApiNameSuffix:x}=n.__require(),{errorLog:y}=a.__require(),C={widgetInfo:{cmpName:"CustomCmp",modelName:"CmpModel",cmpClassName:"custom-cmp-container",cmpType:"xx-custom-cmp",cmpLabel:"xx组件"},dir:u.resolve(__dirname,"../../../template/empty-cmp")};return m=function(e,r="./src/components"){const o=C.dir;let s=e||"neoCustomCmp__c";s=x(s);const{isValid:c,errors:t}=j(s);c||(y(t.join("\n")),process.exit(1));const i=u.resolve(process.cwd(),r,s);g()||(console.error(`${_}当前(${process.cwd()})还不是自定义组件项目,请先创建一个自定义组件项目(neo init / neo create project)。`),process.exit(1)),f(s)&&(console.error(`${_}创建自定义组件失败,当前项目已经存在${s}自定义组件。`),process.exit(1)),l.copy(o,i).then(()=>{const e=d.camelCase(s),r=d.kebabCase(s);q(i,{[C.widgetInfo.modelName]:`${e}Model`,[C.widgetInfo.cmpName]:e,[C.widgetInfo.cmpClassName]:`${r}-container`,[C.widgetInfo.cmpType]:r,[C.widgetInfo.cmpLabel]:r}),console.log(`${_}已创建自定义组件(${s})!`)}).catch(e=>console.error(`${_}自定义组件创建失败(${s}):`,e))}};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("fs-extra"),r=require("node:path"),o=require("lodash"),s=require("../neoParams.js"),c=require("../replaceInFilesByMap.js"),t=require("./hasCmpTypeByDir.js"),i=require("../projectUtils/hasNeoProject.js"),n=require("../cmpTypeValidator.js"),m=require("../common.js");var p,a;exports.__require=function(){if(a)return p;a=1;const l=e,u=r,d=o,{consoleTag:_}=s.__require(),q=c.__require(),f=t.__require(),g=i.__require(),{validateApiName:j,ensureApiNameSuffix:x}=n.__require(),{errorLog:y}=m.__require(),$={widgetInfo:{cmpName:"CustomCmp",modelName:"CmpModel",cmpClassName:"custom-cmp-container",cmpType:"xx-custom-cmp",cmpLabel:"xx组件"},dir:u.resolve(__dirname,"../../../template/empty-cmp")};return p=function(e,r="./src/components"){const o=$.dir;let s=e||"neoCustomCmp__c";s=x(s);const{isValid:c,errors:t}=j(s);c||(y(t.join("\n")),process.exit(1));const i=u.resolve(process.cwd(),r,s);g()||(console.error(`${_}当前(${process.cwd()})还不是自定义组件项目,请先创建一个自定义组件项目(neo init / neo create project)。`),process.exit(1)),f(s)&&(console.error(`${_}创建自定义组件失败,当前项目已经存在${s}自定义组件。`),process.exit(1)),l.copy(o,i).then(()=>{const e=d.camelCase(s),r=s;q(i,{[$.widgetInfo.modelName]:`${e}Model`,[$.widgetInfo.cmpName]:e,[$.widgetInfo.cmpClassName]:`${r}-container`,[$.widgetInfo.cmpType]:r,[$.widgetInfo.cmpLabel]:r}),console.log(`${_}已创建自定义组件(${s})!`)}).catch(e=>console.error(`${_}自定义组件创建失败(${s}):`,e))}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.9.22",
3
+ "version": "1.9.23",
4
4
  "description": "Neo 自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -55,11 +55,13 @@ export default class EntityCardList extends BaseCmp<
55
55
  componentDidMount() {
56
56
  this.loadObjectData();
57
57
 
58
+ /*
58
59
  // 监听一个广播事件
59
60
  NeoEvent.listen('reloadData', (eventData: any) => {
60
61
  console.log('EntityCardList 监听到了一个广播事件 reloadData: ', eventData);
61
62
  this.loadObjectData();
62
63
  });
64
+ */
63
65
  }
64
66
 
65
67
  componentDidUpdate(prevProps: Readonly<EntityCardListProps>) {
@@ -237,9 +237,11 @@ export default class EntityForm extends React.PureComponent<
237
237
  onSubmit() {
238
238
  console.log('触发了表单提交事件:', this.props);
239
239
 
240
+ /*
240
241
  // 触发一个广播事件
241
242
  console.log('触发了一个广播事件 reloadData。');
242
243
  NeoEvent.broadcast('reloadData', this.props);
244
+ */
243
245
  }
244
246
 
245
247
  /**
@@ -180,11 +180,13 @@ export default class EntityTable extends BaseCmp<
180
180
  }
181
181
  }
182
182
 
183
+ /*
183
184
  // 监听一个广播事件
184
185
  NeoEvent.listen('reloadData', (eventData: any) => {
185
186
  console.log('EntityTable 监听到了一个广播事件 reloadData: ', eventData);
186
187
  this.loadData();
187
188
  });
189
+ */
188
190
  }
189
191
 
190
192
  /**