neo-cmp-cli 1.9.3 → 1.9.6
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/README.md +34 -34
- package/dist/neo/neoLogin.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/neo-custom-cmp-template/src/components/entityForm_c/model.ts +2 -2
- package/template/pageHtml/auth-error.html +39 -0
- package/template/pageHtml/auth-failed.html +39 -0
- package/template/pageHtml/auth-success.html +40 -0
- package/template/pageHtml/token-error.html +40 -0
- 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/test/deprecate-versions.js +1 -1
package/README.md
CHANGED
|
@@ -519,6 +519,38 @@ neo delete cmp -n xxCmp
|
|
|
519
519
|
- ⚠️ **影响范围**:删除组件后,所有使用该组件的页面和表单将受到影响,请确保没有正在使用的场景
|
|
520
520
|
- 💡 **建议先备份**:删除前建议先使用 `neo pull cmp` 拉取组件源码到本地进行备份
|
|
521
521
|
|
|
522
|
+
### 10. 自定义组件之间实现模块共享
|
|
523
|
+
|
|
524
|
+
**步骤 1**:在自定义组件A(customCmpA)/ 配置文件中定义要共享出来的模块A(xxModuleA)
|
|
525
|
+
|
|
526
|
+
```javascript
|
|
527
|
+
// customCmpA 组件的 neo.config.js
|
|
528
|
+
module.exports = {
|
|
529
|
+
neoCommonModule: {
|
|
530
|
+
// exports: ['xxModule'], // 数组写法,用于导出当前自定义组件中的第三方依赖模块
|
|
531
|
+
exports: { 'xxModuleA': path.resolve('./src/components/xxModuleA') }, // 对象写法,可用于导出自定义组件中的某个内容模块(需要使用绝对路径导出)
|
|
532
|
+
},
|
|
533
|
+
}
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**步骤 2**:在自定义组件B(customCmpB)/ 配置文件中声明需要使用自定义组件 A 分享出来的模块(xxModuleA)
|
|
537
|
+
|
|
538
|
+
```javascript
|
|
539
|
+
// customCmpB 组件的 neo.config.js
|
|
540
|
+
module.exports = {
|
|
541
|
+
neoCommonModule: {
|
|
542
|
+
remoteDeps: ['customCmpA'], // 远程依赖(自定义组件),表示当前自定义组件 B 会用到哪些自定义组件
|
|
543
|
+
externals: ['xxModuleA'], // 自定义组件中需要剔除的外部模块(远程自定义组件中分享出来的模块),仅支持数组写法,需要和 remoteDeps 配合使用
|
|
544
|
+
},
|
|
545
|
+
}
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
**步骤 3**:在自定义组件B 中使用自定义组件 A 分享出来的模块(xxModuleA)
|
|
549
|
+
|
|
550
|
+
```javascript
|
|
551
|
+
import xxModuleA from 'xxModuleA'; // 导入自定义组件 A 共享出来的模块
|
|
552
|
+
```
|
|
553
|
+
|
|
522
554
|
## ⚙️ 配置说明
|
|
523
555
|
|
|
524
556
|
neo-cmp-cli 默认提供完整配置;如需自定义,使用 `neo config init` 生成 `neo.config.js` 并按需修改。
|
|
@@ -544,7 +576,7 @@ module.exports = {
|
|
|
544
576
|
|
|
545
577
|
> **提示**:当未配置 `entry` 时,cli 默认从 `src/components` 目录下扫描并识别自定义组件,并自动生成对应的 entry 构建入口配置。
|
|
546
578
|
|
|
547
|
-
优先级:`linkDebug/build2lib/
|
|
579
|
+
优先级:`linkDebug/build2lib/pushCmp.entry` > `webpack.entry`
|
|
548
580
|
|
|
549
581
|
如需自定义构建入口配置,请按如下结构调整项目工程配置文件(`neo.config.js`):
|
|
550
582
|
|
|
@@ -555,7 +587,7 @@ module.exports = {
|
|
|
555
587
|
},
|
|
556
588
|
linkDebug: { entry: {} },
|
|
557
589
|
build2lib: { entry: {} },
|
|
558
|
-
|
|
590
|
+
pushCmp: { entry: {} },
|
|
559
591
|
}
|
|
560
592
|
```
|
|
561
593
|
|
|
@@ -695,38 +727,6 @@ module.exports = {
|
|
|
695
727
|
}
|
|
696
728
|
```
|
|
697
729
|
|
|
698
|
-
#### 11. 自定义组件之间实现模块共享
|
|
699
|
-
|
|
700
|
-
**步骤 1**:在自定义组件A(customCmpA)/ 配置文件中定义要共享出来的模块A(xxModuleA)
|
|
701
|
-
|
|
702
|
-
```javascript
|
|
703
|
-
// customCmpA 组件的 neo.config.js
|
|
704
|
-
module.exports = {
|
|
705
|
-
neoCommonModule: {
|
|
706
|
-
// exports: ['xxModule'], // 数组写法,用于导出当前自定义组件中的第三方依赖模块
|
|
707
|
-
exports: { 'xxModuleA': path.resolve('./src/components/xxModuleA') }, // 对象写法,可用于导出自定义组件中的某个内容模块(需要使用绝对路径导出)
|
|
708
|
-
},
|
|
709
|
-
}
|
|
710
|
-
```
|
|
711
|
-
|
|
712
|
-
**步骤 2**:在自定义组件B(customCmpB)/ 配置文件中声明需要使用自定义组件 A 分享出来的模块(xxModuleA)
|
|
713
|
-
|
|
714
|
-
```javascript
|
|
715
|
-
// customCmpB 组件的 neo.config.js
|
|
716
|
-
module.exports = {
|
|
717
|
-
neoCommonModule: {
|
|
718
|
-
remoteDeps: ['customCmpA'], // 远程依赖(自定义组件),表示当前自定义组件 B 会用到哪些自定义组件
|
|
719
|
-
externals: ['xxModuleA'], // 自定义组件中需要剔除的外部模块(远程自定义组件中分享出来的模块),仅支持数组写法,需要和 remoteDeps 配合使用
|
|
720
|
-
},
|
|
721
|
-
}
|
|
722
|
-
```
|
|
723
|
-
|
|
724
|
-
**步骤 3**:在自定义组件B 中使用自定义组件 A 分享出来的模块(xxModuleA)
|
|
725
|
-
|
|
726
|
-
```javascript
|
|
727
|
-
import xxModuleA from 'xxModuleA'; // 导入自定义组件 A 共享出来的模块
|
|
728
|
-
```
|
|
729
|
-
|
|
730
730
|
---
|
|
731
731
|
|
|
732
732
|
如需更多细节与高级用法,请参考模板项目与源码注释。
|
package/dist/neo/neoLogin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("axios"),t=require("node:fs"),n=require("node:path"),s=require("ora"),r=require("node:http"),o=require("node:url"),i=require("open"),c=require("node:net");require("portfinder");const a=require("../utils/common.js"),l=require("../config/auth.config.js");var h,p;exports.__require=function(){if(p)return h;p=1;const u=e,d=t,g=n,k=s,y=r,_=o,m=i,T=c,{errorLog:f,successLog:w}=a.__require(),S=l.__require();return h=class{constructor(e={}){const{loginURL:t,tokenAPI:n}=e;if(!t||!n)throw new Error("auth.config.js 配置不完整,需要包含 loginURL、tokenAPI");this.loginURL=t,this.tokenAPI=n,this.response_type=S.response_type||"code",this.client_id=S.client_id,this.client_secret=S.client_secret,this.scope=S.scope||"all",this.oauthType=S.oauthType||"standard",this.access_type=S.access_type||"offline",this.grant_type=S.grant_type||"authorization_code",this.tokenDir=g.join(process.cwd(),".neo-cli"),this.tokenFile=g.join(this.tokenDir,"token.json"),this.pageDir=g.join(__dirname,"
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("axios"),t=require("node:fs"),n=require("node:path"),s=require("ora"),r=require("node:http"),o=require("node:url"),i=require("open"),c=require("node:net");require("portfinder");const a=require("../utils/common.js"),l=require("../config/auth.config.js");var h,p;exports.__require=function(){if(p)return h;p=1;const u=e,d=t,g=n,k=s,y=r,_=o,m=i,T=c,{errorLog:f,successLog:w}=a.__require(),S=l.__require();return h=class{constructor(e={}){const{loginURL:t,tokenAPI:n}=e;if(!t||!n)throw new Error("auth.config.js 配置不完整,需要包含 loginURL、tokenAPI");this.loginURL=t,this.tokenAPI=n,this.response_type=S.response_type||"code",this.client_id=S.client_id,this.client_secret=S.client_secret,this.scope=S.scope||"all",this.oauthType=S.oauthType||"standard",this.access_type=S.access_type||"offline",this.grant_type=S.grant_type||"authorization_code",this.tokenDir=g.join(process.cwd(),".neo-cli"),this.tokenFile=g.join(this.tokenDir,"token.json"),this.pageDir=g.join(__dirname,"../../template/pageHtml"),this.authErrorTemplate=g.join(this.pageDir,"auth-error.html"),this.authSuccessTemplate=g.join(this.pageDir,"auth-success.html"),this.tokenErrorTemplate=g.join(this.pageDir,"token-error.html"),this.authFailedTemplate=g.join(this.pageDir,"auth-failed.html")}ensureTokenDir(){d.existsSync(this.tokenDir)||d.mkdirSync(this.tokenDir,{recursive:!0})}saveToken(e){this.ensureTokenDir();const t={...e,savedAt:Date.now(),expiresAt:Date.now()+1e3*(e.expires_in||7200)};d.writeFileSync(this.tokenFile,JSON.stringify(t,null,2),"utf-8")}readToken(){if(!d.existsSync(this.tokenFile))return null;try{return JSON.parse(d.readFileSync(this.tokenFile,"utf-8"))}catch(e){return f(`读取 token 文件失败: ${e.message}`),null}}isTokenExpired(e){return!e||!e.expiresAt||Date.now()>=e.expiresAt-3e5}clearToken(){d.existsSync(this.tokenFile)&&d.unlinkSync(this.tokenFile)}getRedirectURI(e){return`http://localhost:${e}`}buildAuthUrl(e){const t=new URLSearchParams({response_type:this.response_type,client_id:this.client_id,redirect_uri:e,scope:this.scope,oauthType:this.oauthType,access_type:this.access_type});return`${this.loginURL}?${t.toString()}`}async openBrowser(e){try{await m(e)}catch(t){f(`无法自动打开浏览器: ${t.message}`),console.log(`\n请手动访问以下 URL 进行授权:\n${e}\n`)}}getHtmlTemplate(e,t={}){try{let n=d.readFileSync(e,"utf-8");return Object.keys(t).forEach(e=>{const s=`{{${e}}}`;n=n.replace(new RegExp(s,"g"),t[e])}),n}catch(e){return f(`读取 HTML 模板失败: ${e.message}`),"<html><body><h1>页面加载失败</h1></body></html>"}}async isPortInUse(e){return new Promise(t=>{const n=T.createServer();n.once("error",e=>{"EADDRINUSE"===e.code?t(!0):t(!1)}),n.once("listening",()=>{n.once("close",()=>{t(!1)}),n.close()}),n.listen(e)})}async startCallbackServer(){let e=S.redirectUri,t=new URL(e),n=parseInt(t.port,10);await this.isPortInUse(n)&&(f(`\n警告: 端口 ${n} 已被占用,请调整 redirectUri 配置项,使其指向一个未被占用的端口。`),process.exit(1));const s=new Promise((s,r)=>{const o=y.createServer(async(n,i)=>{const c=_.parse(n.url,!0);if(c.pathname===t.pathname||"/"===c.pathname){const t=c.query.code,n=c.query.error;if(n){i.writeHead(400,{"Content-Type":"text/html; charset=utf-8"});const e=this.getHtmlTemplate(this.authErrorTemplate,{ERROR:n});return i.end(e),o.close(),void r(new Error(`授权失败: ${n}`))}if(t)try{const n=await this.getTokenByCode(t,e);this.saveToken(n);const r=n.tenant_id||"未返回",c=n.instance_uri||"未返回";i.writeHead(200,{"Content-Type":"text/html; charset=utf-8"});const a=this.getHtmlTemplate(this.authSuccessTemplate,{TENANT_ID:r,INSTANCE_URI:c});return i.end(a),o.close(),void s({code:t,tokenData:n})}catch(e){i.writeHead(500,{"Content-Type":"text/html; charset=utf-8"});const t=this.getHtmlTemplate(this.tokenErrorTemplate,{ERROR:e});return i.end(t),o.close(),void r(e)}i.writeHead(400,{"Content-Type":"text/html; charset=utf-8"});const a=this.getHtmlTemplate(this.authFailedTemplate);i.end(a),o.close(),r(new Error("未获取到授权码"))}else i.writeHead(404,{"Content-Type":"text/plain"}),i.end("Not Found")});o.on("error",e=>{"EADDRINUSE"===e.code?r(new Error(`端口 ${n} 已被占用,无法启动回调服务器`)):r(e)}),o.listen(n,()=>{console.log(`\n本地回调服务器已启动,监听端口: ${n}`),console.log(`回调地址: ${e}`)}),setTimeout(()=>{o.close(),r(new Error("授权超时,请重试"))},3e5)});return{redirectUri:e,getCodeAndTokenPromise:s}}async getTokenByCode(e,t){const n=k("正在获取 access token...").start();try{const s=new URLSearchParams;s.append("grant_type",this.grant_type),s.append("client_id",this.client_id),s.append("client_secret",this.client_secret),s.append("code",e),s.append("redirect_uri",t);const r=(await u.post(this.tokenAPI,s.toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data;return r&&r.access_token||(f("获取 token 失败:响应中未包含 access_token",n),f(`响应数据: ${JSON.stringify(r)}`),process.exit(1)),w("成功获取 access token",n),r}catch(e){f("获取 token 失败",n),f(`\n获取 token 失败: ${e.message}`),e.response&&f(`响应数据: ${JSON.stringify(e.response.data)}`),process.exit(1)}}async refreshToken(e){const t=k("正在刷新授权信息(token)...").start();try{const n=new URLSearchParams;n.append("grant_type","refresh_token"),n.append("client_id",this.client_id),n.append("client_secret",this.client_secret),n.append("refresh_token",e);const s=(await u.post(this.tokenAPI,n.toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data;return s&&s.access_token?(w("刷新授权信息成功(token)。",t),s):(f("刷新授权信息失败:响应中未包含 access_token",t),f(`响应数据: ${JSON.stringify(s)}`),null)}catch(e){return f("刷新授权信息失败",t),f(`\n刷新授权信息失败: ${e.message}`),e.response&&f(`响应数据: ${JSON.stringify(e.response.data)}`),null}}async login(){console.log("\n========== NeoCRM 登录授权 ==========\n");try{const{redirectUri:e,getCodeAndTokenPromise:t}=await this.startCallbackServer(),n=this.buildAuthUrl(e);console.log("授权 URL:",n),console.log("\n正在打开浏览器进行授权..."),await this.openBrowser(n);const{code:s,tokenData:r}=await t;return w("\n✓ 已获取授权码"),console.log("\n========== 登录成功 ==========\n"),console.log(`已缓存授权信息到: ${this.tokenFile}`),console.log(`实例地址: ${r.instance_uri||"未返回"}`),console.log(`租户 ID: ${r.tenant_id||"未返回"}`),console.log(`授权信息有效期(access_token): ${r.expires_in||7200} 秒`),console.log(`自动刷新授权信息有效期(refresh_token): ${r.refresh_token_expires_in||2592e3} 秒`),r}catch(e){f(`\n登录失败: ${e.message}`),process.exit(1)}}async logout(){if(console.log("\n========== NeoCRM 登出 ==========\n"),d.existsSync(this.tokenFile))try{this.clearToken(),w("已清除授权信息,下次登录需要重新授权。"),console.log("\n登出成功!\n")}catch(e){f(`登出失败: ${e.message}`),process.exit(1)}else console.log("当前未登录,无需登出。")}async getValidToken(){const e=this.readToken();if(e||(f("未找到授权信息,请先执行 neo login 进行登录。"),process.exit(1)),this.isTokenExpired(e)){console.log("授权信息已过期,正在尝试刷新..."),e.refresh_token||(f("自动刷新授权信息失败,请重新登录(neo login)。"),process.exit(1));const t=await this.refreshToken(e.refresh_token);return t||(f("刷新授权信息失败,请重新登录 (neo login)"),process.exit(1)),this.saveToken(t),t}return e}async getAccessToken(){return await this.getValidToken()}}};
|
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.3";const o={version:e};exports.default=o,exports.version=e;
|
package/package.json
CHANGED
|
@@ -60,12 +60,12 @@ export class EntityFormModel {
|
|
|
60
60
|
apiKey: 'onSubmit', // 事件名称
|
|
61
61
|
// description: '这是一个表单提交事件', // 暂未使用
|
|
62
62
|
label: '提交表单后', // 事件
|
|
63
|
-
helpText: '表单提交后触发该事件' // 信息icon hover 时的提示文本
|
|
63
|
+
helpText: '表单提交后触发该事件', // 信息icon hover 时的提示文本
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
apiKey: 'onBeforeSubmit',
|
|
67
67
|
label: '提交表单前',
|
|
68
|
-
helpText: '表单提交前触发该事件'
|
|
68
|
+
helpText: '表单提交前触发该事件',
|
|
69
69
|
},
|
|
70
70
|
];
|
|
71
71
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>授权失败</title>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<style>
|
|
7
|
+
.container {
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
padding-top: 30px;
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
.error-title {
|
|
13
|
+
color: red;
|
|
14
|
+
}
|
|
15
|
+
h1, .info-content {
|
|
16
|
+
text-align: center;
|
|
17
|
+
margin-top: 30px;
|
|
18
|
+
}
|
|
19
|
+
.info-content .title {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
}
|
|
23
|
+
.info-content .detail {
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
color: #666;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="container">
|
|
31
|
+
<h1 class="error-title">授权失败</h1>
|
|
32
|
+
<img src="https://custom-widgets.bj.bcebos.com/neocrmlogin.png" alt="授权失败" />
|
|
33
|
+
<div class="info-content">
|
|
34
|
+
<div class="detail">错误信息: {{ERROR}}</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</body>
|
|
38
|
+
</html>
|
|
39
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>授权失败</title>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<style>
|
|
7
|
+
.container {
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
padding-top: 30px;
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
.error-title {
|
|
13
|
+
color: red;
|
|
14
|
+
}
|
|
15
|
+
h1, .info-content {
|
|
16
|
+
text-align: center;
|
|
17
|
+
margin-top: 30px;
|
|
18
|
+
}
|
|
19
|
+
.info-content .title {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
}
|
|
23
|
+
.info-content .detail {
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
color: #666;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="container">
|
|
31
|
+
<h1 class="error-title">授权失败</h1>
|
|
32
|
+
<img src="https://custom-widgets.bj.bcebos.com/neocrmlogin.png" alt="授权失败" />
|
|
33
|
+
<div class="info-content">
|
|
34
|
+
<div class="detail">未获取到授权码。</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</body>
|
|
38
|
+
</html>
|
|
39
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>授权成功</title>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<style>
|
|
7
|
+
.container {
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
padding-top: 30px;
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
.success-title {
|
|
13
|
+
color: green;
|
|
14
|
+
}
|
|
15
|
+
h1, .success-content {
|
|
16
|
+
text-align: center;
|
|
17
|
+
margin-top: 30px;
|
|
18
|
+
}
|
|
19
|
+
.success-content .title {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
}
|
|
23
|
+
.success-content .detail {
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
color: #666;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="container">
|
|
31
|
+
<h1 class="success-title">授权成功!</h1>
|
|
32
|
+
<img src="https://custom-widgets.bj.bcebos.com/neocrmlogin.png" alt="授权成功" />
|
|
33
|
+
<div class="success-content">
|
|
34
|
+
<div class="title">您已成功授权开发账户,请关闭此页面。</div>
|
|
35
|
+
<div class="detail">租户 ID: {{TENANT_ID}},所在租户的 API 域名: {{INSTANCE_URI}}。</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
40
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>获取 Token 失败</title>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<style>
|
|
7
|
+
.container {
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
padding-top: 30px;
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
.error-title {
|
|
13
|
+
color: red;
|
|
14
|
+
}
|
|
15
|
+
h1, .info-content {
|
|
16
|
+
text-align: center;
|
|
17
|
+
margin-top: 30px;
|
|
18
|
+
}
|
|
19
|
+
.info-content .title {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
}
|
|
23
|
+
.info-content .detail {
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
color: #666;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="container">
|
|
31
|
+
<h1 class="error-title">授权失败</h1>
|
|
32
|
+
<img src="https://custom-widgets.bj.bcebos.com/neocrmlogin.png" alt="获取 Token 失败" />
|
|
33
|
+
<div class="info-content">
|
|
34
|
+
<div class="title">未获取到用户 token 信息,请重试。</div>
|
|
35
|
+
<div class="detail">错误信息: {{ERROR}}</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
40
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
2
|
|
|
3
3
|
// 所有需要废弃的版本
|
|
4
|
-
const versionsToDeprecate = ["1.
|
|
4
|
+
const versionsToDeprecate = ["1.9.0", "1.9.1", "1.9.2", "1.9.3"];
|
|
5
5
|
|
|
6
6
|
const packageName = 'neo-cmp-cli';
|
|
7
7
|
const deprecateMessage = '此版本为开发中版本(存在 bug),请升级到最新版本。';
|