neo-cmp-cli 1.15.2 → 1.15.5
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/package.json.js +1 -1
- package/dist/utils/projectUtils/openProject.js +1 -1
- package/dist/utils/skillUtils/skillDirs.js +1 -1
- package/package.json +1 -1
- package/template/antd-custom-cmp-template/package.json +1 -1
- package/template/asset-manage-template/package.json +2 -2
- package/template/echarts-custom-cmp-template/package.json +1 -1
- package/template/empty-custom-cmp-template/package.json +2 -2
- package/template/map-custom-cmp-template/package.json +1 -1
- package/template/neo-bi-cmps/package.json +1 -1
- package/template/neo-custom-cmp-template/package.json +2 -2
- package/template/neo-custom-cmp-template/src/components/entityTable__c/model.ts +1 -1
- package/template/neo-custom-cmp-template/src/components/simpleCmp__c/index.tsx +1 -0
- package/template/neo-h5-cmps/package.json +1 -1
- package/template/neo-order-cmps/package.json +2 -2
- package/template/neo-pipeline-cmps/package.json +1 -1
- package/template/neo-pipeline-zh-cmps/package.json +1 -1
- package/template/neo-web-entity-grid/package.json +2 -2
- package/template/neo-web-form/package.json +2 -2
- 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/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.15.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.15.5";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("node:path"),o=require("node:fs"),r=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("node:path"),o=require("node:fs"),r=require("node:child_process"),s=require("ora"),t=require("../neoParams.js"),n=require("../common.js"),i=require("open");var a,c;exports.__require=function(){if(c)return a;c=1;const p=e,d=o,{spawn:u}=r,l=s,{consoleTag:m}=t.__require(),{errorLog:$,successLog:g,warningLog:f}=n.__require(),y={codebuddy:{name:"CodeBuddy",apps:["CodeBuddy CN","CodeBuddy","codebuddy"],win32:[{app:{name:"codebuddy"}}],linux:[{app:{name:"codebuddy"}}]},kiro:{name:"Kiro",cli:["kiro"],apps:["Kiro","kiro"],win32:[{app:{name:"kiro"}}],linux:[{app:{name:"kiro"}}]},cursor:{name:"Cursor",cli:["cursor"],apps:["Cursor","cursor"],win32:[{app:{name:"cursor"}}],linux:[{app:{name:"cursor"}}]},vscode:{name:"Visual Studio Code",cli:["code"],apps:["Visual Studio Code","Code"],win32:[{app:{name:"code"}}],linux:[{app:{name:"code"}}]}},h=["codebuddy","kiro","cursor","vscode"],w=function(){const e=process.env.HOME||process.env.USERPROFILE||"",o=["/usr/local/bin","/opt/homebrew/bin",e?p.join(e,".local","bin"):null,e?p.join(e,".local","share"):null].filter(Boolean),r=(process.env.PATH||"").split(p.delimiter).filter(Boolean);return o.forEach(e=>{!r.includes(e)&&d.existsSync(e)&&r.unshift(e)}),r.join(p.delimiter)},_=function(e,o){const r=function(e){if(!e)return"auto";const o=String(e).toLowerCase();return"code"===o?"vscode":o}(e),s="darwin"===o,t=(e,r)=>{const t=[];if(e.cli&&e.cli.length>0&&e.cli.forEach(o=>{t.push({type:"cli",cmd:o,__editorName:e.name,__editorKey:r})}),s)e.apps&&e.apps.length>0&&e.apps.forEach(o=>{t.push({type:"open-app",appName:o,__editorName:e.name,__editorKey:r})}),e.apps&&e.apps.length>0&&t.push({type:"osascript",appName:e.apps[0],__editorName:e.name,__editorKey:r});else{const s=e[o];s&&s.length>0&&s.forEach(o=>{t.push({type:"app",...o,__editorName:e.name,__editorKey:r})})}return t};if("auto"===r){const e=[];return h.forEach(o=>{const r=y[o];r&&e.push(...t(r,o))}),{configs:e,editorName:"编辑器"}}const n=y[r];return n?{configs:t(n,r),editorName:n.name}:{configs:[],editorName:"编辑器"}};return a=async function(e,o){const r=o?p.resolve(o):process.cwd();d.existsSync(r)||($(`目录不存在: ${r}`),process.exit(1));d.statSync(r).isDirectory()||($(`路径不是目录: ${r}`),process.exit(1));const s=process.platform;["darwin","win32","linux"].includes(s)||($(`不支持的操作系统: ${s}`),process.exit(1));const{configs:t,editorName:n}=_(e,s);0===t.length&&($(`不支持的编辑器类型: ${e}`),process.exit(1));const a=l(`${m}正在尝试使用 ${n} 打开项目: ${r}`).start(),c=[],y=async e=>{e>=t.length&&(a.fail(),$("无法打开编辑器,已尝试所有可用方式。"),console.log(""),console.log(` 目标目录: ${r}`),console.log(` 尝试次数: ${c.length}`),c.forEach((e,o)=>{console.log(` [${o+1}] ${e}`)}),console.log(""),console.log(" 请确保已安装 CodeBuddy、Kiro、Cursor 或 Visual Studio Code 其中之一。"),process.exit(1));const o=t[e],s=o.__editorName||"未知编辑器",n={cli:`CLI (${o.cmd})`,"open-app":`open -a "${o.appName}"`,osascript:"AppleScript",app:"应用名称"};let p;switch(a.text=`${m}正在使用 ${s} (${n[o.type]||o.type}) 打开: ${r}`,o.type){case"cli":p=await function(e,o){return new Promise(r=>{const s={...process.env,PATH:w()};let t="";const n=u(e,[o],{env:s,stdio:["ignore","ignore","pipe"],detached:!0});n.stderr.on("data",e=>{t+=e.toString()}),n.on("error",o=>{r({success:!1,error:o,detail:`CLI 命令 "${e}" 启动失败: ${o.message}`})}),n.on("close",o=>{n.unref(),0===o?t.trim()?r({success:!0,warning:t.trim()}):r({success:!0}):r({success:!1,error:new Error(`exit code ${o}`),detail:`CLI 命令 "${e}" 退出码: ${o}${t?", stderr: "+t.trim():""}`})})})}(o.cmd,r);break;case"open-app":p=await function(e,o){return new Promise(r=>{const s=u("open",["-a",e,o],{stdio:["ignore","ignore","pipe"],detached:!0});let t="";s.stderr.on("data",e=>{t+=e.toString()}),s.on("error",o=>{r({success:!1,error:o,detail:`open -a "${e}" 启动失败: ${o.message}`})}),s.on("close",o=>{s.unref(),r(0!==o?{success:!1,error:new Error(`exit code ${o}`),detail:`open -a "${e}" 退出码: ${o}${t?", stderr: "+t.trim():""}`}:{success:!0})})})}(o.appName,r);break;case"osascript":p=await function(e,o){return new Promise(r=>{const s=u("osascript",["-e",`tell application "${e}" to open POSIX file "${o}"`],{stdio:["ignore","pipe","pipe"],detached:!0});let t="",n="";s.stdout.on("data",e=>{t+=e.toString()}),s.stderr.on("data",e=>{n+=e.toString()}),s.on("error",e=>{r({success:!1,error:e,detail:`osascript 启动失败: ${e.message}`})}),s.on("close",o=>{s.unref(),r(0!==o?{success:!1,error:new Error(`osascript exit code ${o}`),detail:`osascript "${e}" 失败: ${n.trim()||t.trim()||"exit "+o}`}:{success:!0})})})}(o.appName,r);break;case"app":p=await function(e,o){const r=i;return new Promise(s=>{r(e,o).then(()=>s({success:!0})).catch(e=>s({success:!1,error:e,detail:`open 包启动失败: ${e.message}`}))})}(r,{app:o.app});break;default:p={success:!1,detail:`未知策略类型: ${o.type}`}}if(p.success){a.stop();const e=n[o.type]||o.type;g(`${m}已成功使用 ${s}(${e})打开项目: ${r}`),p.warning&&f(` ⚠ ${p.warning}`),process.exit(0)}else c.push(`[${s}] ${n[o.type]}: ${p.detail||p.error?.message||"失败"}`),await y(e+1)};await y(0)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("node:path"),r=require("node:os");var o,u;exports.__require=function(){if(u)return o;u=1;const a=e,d=r,n={codebuddy:{name:"CodeBuddy",value:"codebuddy",dirName:".codebuddy"},kiro:{name:"Kiro",value:"kiro",dirName:".kiro"},cursor:{name:"Cursor",value:"cursor",dirName:".cursor"},claudeCode:{name:"Claude Code",value:"claudeCode",dirName:".claude"}},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("node:path"),r=require("node:os");var o,u;exports.__require=function(){if(u)return o;u=1;const a=e,d=r,n={codebuddy:{name:"CodeBuddy",value:"codebuddy",dirName:".codebuddy"},kiro:{name:"Kiro",value:"kiro",dirName:".kiro"},cursor:{name:"Cursor",value:"cursor",dirName:".cursor"},claudeCode:{name:"Claude Code",value:"claudeCode",dirName:".claude"}},t=Object.values(n).map(e=>({name:e.name,value:e.value,short:e.name})),i=Object.keys(n);return o={SKILL_PRODUCT_MAP:n,SKILL_PRODUCT_CHOICES:t,SKILL_PRODUCT_VALUES:i,getSkillDir:function(e){const r=n[e];if(!r)throw new Error(`不支持的产品类型:${e},当前仅支持:${i.join(" / ")}`);return a.join(d.homedir(),r.dirName,"skills")},getProductName:function(e){const r=n[e];return r?r.name:e}}};
|
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"axios": "^1.7.0",
|
|
42
42
|
"antd": "4.9.4",
|
|
43
43
|
"lodash": "^4.17.21",
|
|
44
|
-
"neo-open-api": "^1.2.
|
|
44
|
+
"neo-open-api": "^1.2.12",
|
|
45
45
|
"tslib": "2.3.0",
|
|
46
46
|
"echarts": "^5.5.1",
|
|
47
47
|
"moment": "^2.30.1"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/react": "^16.9.11",
|
|
53
53
|
"@types/react-dom": "^16.9.15",
|
|
54
54
|
"@types/axios": "^0.14.0",
|
|
55
|
-
"neo-cmp-cli": "^1.15.
|
|
55
|
+
"neo-cmp-cli": "^1.15.5",
|
|
56
56
|
"husky": "^4.2.5",
|
|
57
57
|
"lint-staged": "^10.2.9",
|
|
58
58
|
"prettier": "^2.0.5",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"react": "^16.9.0",
|
|
35
35
|
"react-dom": "^16.9.0",
|
|
36
36
|
"antd": "4.9.4",
|
|
37
|
-
"neo-open-api": "^1.2.
|
|
37
|
+
"neo-open-api": "^1.2.12"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@commitlint/cli": "^18.0.0",
|
|
41
41
|
"@commitlint/config-conventional": "^18.0.0",
|
|
42
42
|
"@types/react": "^16.9.11",
|
|
43
43
|
"@types/react-dom": "^16.9.15",
|
|
44
|
-
"neo-cmp-cli": "^1.15.
|
|
44
|
+
"neo-cmp-cli": "^1.15.5",
|
|
45
45
|
"husky": "^4.2.5",
|
|
46
46
|
"lint-staged": "^10.2.9",
|
|
47
47
|
"prettier": "^2.0.5"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"axios": "^1.7.0",
|
|
50
50
|
"antd": "^4.9.4",
|
|
51
51
|
"lodash": "^4.17.23",
|
|
52
|
-
"neo-open-api": "^1.2.
|
|
52
|
+
"neo-open-api": "^1.2.12"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@commitlint/cli": "^18.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/react": "^16.9.11",
|
|
58
58
|
"@types/react-dom": "^16.9.15",
|
|
59
59
|
"@types/axios": "^0.14.0",
|
|
60
|
-
"neo-cmp-cli": "^1.15.
|
|
60
|
+
"neo-cmp-cli": "^1.15.5",
|
|
61
61
|
"husky": "^4.2.5",
|
|
62
62
|
"lint-staged": "^10.2.9",
|
|
63
63
|
"prettier": "^2.0.5"
|
|
@@ -31,6 +31,7 @@ export default class CustomCmp extends React.PureComponent<
|
|
|
31
31
|
// 从上下文中 获取系统语言
|
|
32
32
|
if (ctx && ctx.system && ctx.system.language) {
|
|
33
33
|
languageCode = ctx.system.language;
|
|
34
|
+
console.log('languageCode:', languageCode);
|
|
34
35
|
}
|
|
35
36
|
console.log('当前自定义组件:', this.props);
|
|
36
37
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"axios": "^1.7.0",
|
|
40
40
|
"antd": "^4.9.4",
|
|
41
41
|
"lodash": "^4.17.23",
|
|
42
|
-
"neo-open-api": "^1.2.
|
|
42
|
+
"neo-open-api": "^1.2.12"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@commitlint/cli": "^18.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@types/react": "^16.9.11",
|
|
48
48
|
"@types/react-dom": "^16.9.15",
|
|
49
49
|
"@types/axios": "^0.14.0",
|
|
50
|
-
"neo-cmp-cli": "^1.
|
|
50
|
+
"neo-cmp-cli": "^1.15.5",
|
|
51
51
|
"husky": "^4.2.5",
|
|
52
52
|
"lint-staged": "^10.2.9",
|
|
53
53
|
"prettier": "^2.0.5"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"antd": "^4.9.4",
|
|
38
38
|
"axios": "^1.7.0",
|
|
39
39
|
"lodash": "^4.17.23",
|
|
40
|
-
"neo-open-api": "^1.2.
|
|
40
|
+
"neo-open-api": "^1.2.12",
|
|
41
41
|
"neo-register": "^1.2.0",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/react-dom": "^16.9.15",
|
|
53
53
|
"husky": "^4.2.5",
|
|
54
54
|
"lint-staged": "^10.2.9",
|
|
55
|
-
"neo-cmp-cli": "^1.15.
|
|
55
|
+
"neo-cmp-cli": "^1.15.5",
|
|
56
56
|
"prettier": "^2.0.5"
|
|
57
57
|
},
|
|
58
58
|
"overrides": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"antd": "^4.9.4",
|
|
38
38
|
"axios": "^1.7.0",
|
|
39
39
|
"lodash": "^4.17.23",
|
|
40
|
-
"neo-open-api": "^1.2.
|
|
40
|
+
"neo-open-api": "^1.2.12",
|
|
41
41
|
"neo-register": "^1.2.0",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/react-dom": "^16.9.15",
|
|
54
54
|
"husky": "^4.2.5",
|
|
55
55
|
"lint-staged": "^10.2.9",
|
|
56
|
-
"neo-cmp-cli": "^1.15.
|
|
56
|
+
"neo-cmp-cli": "^1.15.5",
|
|
57
57
|
"prettier": "^2.0.5"
|
|
58
58
|
},
|
|
59
59
|
"overrides": {
|