neo-cmp-cli 1.8.6-beta.6 → 1.8.7
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/bin/index.js +2 -2
- package/package.json +3 -3
- package/src/config/auth.config.js +27 -0
- package/src/config/default.config.js +176 -0
- package/src/config/index.js +9 -0
- package/src/initData/defaultTemplate.html +13 -0
- package/src/initData/neo.config.js +138 -0
- package/src/main.js +221 -0
- package/src/module/inspect.js +41 -0
- package/src/module/neoInit.js +55 -0
- package/src/module/neoInitByCopy.js +61 -0
- package/src/neo/NeoUMDContent.js +30 -0
- package/src/neo/neoLogin.js +565 -0
- package/src/neo/neoRequire.js +125 -0
- package/src/neo/neoService.js +874 -0
- package/src/neo/webpack.mf.js +60 -0
- package/src/neo/wrapperContent.js +16 -0
- package/src/oss/publish2oss.js +348 -0
- package/src/plugins/AddNeoRequirePlugin-v1.js +47 -0
- package/src/plugins/AddNeoRequirePlugin.js +179 -0
- package/src/plugins/README.md +109 -0
- package/src/utils/autoEntryRootDir.js +85 -0
- package/src/utils/cmpUtils/createCmpByTemplate.js +60 -0
- package/src/utils/cmpUtils/createCmpByZip.js +408 -0
- package/src/utils/cmpUtils/createCommonModulesCode.js +121 -0
- package/src/utils/cmpUtils/deleteCmp.js +63 -0
- package/src/utils/cmpUtils/getCmpModelRegisterCode.js +31 -0
- package/src/utils/cmpUtils/getCmpPreviewCode.js +43 -0
- package/src/utils/cmpUtils/getCmpRegisterCode.js +31 -0
- package/src/utils/cmpUtils/getCmpTypeByDir.js +41 -0
- package/src/utils/cmpUtils/hasCmpTypeByDir.js +11 -0
- package/src/utils/cmpUtils/previewCmp.js +55 -0
- package/src/utils/cmpUtils/pullCmp.js +104 -0
- package/src/utils/cmpUtils/pushCmp.js +230 -0
- package/src/utils/common.js +107 -0
- package/src/utils/configureNeoBuild.js +109 -0
- package/src/utils/generateEntries.js +63 -0
- package/src/utils/neoConfigInit.js +13 -0
- package/src/utils/neoParams.js +12 -0
- package/src/utils/pathUtils.js +23 -0
- package/src/utils/projectNameValidator.js +76 -0
- package/src/utils/projectUtils/createCmpProjectByTemplate.js +59 -0
- package/src/utils/projectUtils/createCmpProjectZip.js +120 -0
- package/src/utils/projectUtils/getEntries.js +80 -0
- package/src/utils/projectUtils/getEntriesWithAutoRegister.js +108 -0
- package/src/utils/projectUtils/hasNeoProject.js +17 -0
- package/src/utils/projectUtils/openProject.js +96 -0
- package/src/utils/projectUtils/updatePublishLog.js +30 -0
- package/src/utils/replaceInFiles.js +47 -0
- package/src/utils/replaceInFilesByMap.js +54 -0
- package/src/utils/replaceInPackage.js +134 -0
- package/src/utils/resetPackageVersion.js +115 -0
- package/test/deprecate-versions.js +1 -1
- package/test/neo.config.js +1 -25
- package/dist/_virtual/AddNeoRequirePlugin.js +0 -8
- package/dist/_virtual/OverloadYield.js +0 -5
- package/dist/_virtual/_commonjsHelpers.js +0 -40
- package/dist/_virtual/array-set.js +0 -5
- package/dist/_virtual/base64-vlq.js +0 -5
- package/dist/_virtual/base64.js +0 -5
- package/dist/_virtual/binary-search.js +0 -5
- package/dist/_virtual/createCmpByZip.js +0 -8
- package/dist/_virtual/deleteCmp.js +0 -8
- package/dist/_virtual/index.js +0 -9
- package/dist/_virtual/mapping-list.js +0 -5
- package/dist/_virtual/neoLogin.js +0 -8
- package/dist/_virtual/neoService.js +0 -8
- package/dist/_virtual/openProject.js +0 -8
- package/dist/_virtual/publish2oss.js +0 -8
- package/dist/_virtual/pullCmp.js +0 -8
- package/dist/_virtual/pushCmp.js +0 -8
- package/dist/_virtual/quick-sort.js +0 -5
- package/dist/_virtual/regenerator.js +0 -5
- package/dist/_virtual/regeneratorAsync.js +0 -5
- package/dist/_virtual/regeneratorAsyncGen.js +0 -5
- package/dist/_virtual/regeneratorAsyncIterator.js +0 -5
- package/dist/_virtual/regeneratorDefine.js +0 -5
- package/dist/_virtual/regeneratorKeys.js +0 -5
- package/dist/_virtual/regeneratorRuntime.js +0 -5
- package/dist/_virtual/regeneratorValues.js +0 -5
- package/dist/_virtual/source-map-consumer.js +0 -5
- package/dist/_virtual/source-map-generator.js +0 -5
- package/dist/_virtual/source-map-support.js +0 -5
- package/dist/_virtual/source-map.js +0 -5
- package/dist/_virtual/source-node.js +0 -5
- package/dist/_virtual/typeof.js +0 -5
- package/dist/_virtual/typescript.js +0 -5
- package/dist/_virtual/util.js +0 -5
- package/dist/config/auth.config.js +0 -50
- package/dist/config/default.config.js +0 -225
- package/dist/config/index.js +0 -27
- package/dist/main.js +0 -9
- package/dist/main2.js +0 -261
- package/dist/module/inspect.js +0 -64
- package/dist/module/neoInit.js +0 -69
- package/dist/module/neoInitByCopy.js +0 -81
- package/dist/neo/neoLogin.js +0 -663
- package/dist/neo/neoRequire.js +0 -118
- package/dist/neo/neoService.js +0 -1246
- package/dist/node_modules/@babel/runtime/helpers/OverloadYield.js +0 -19
- package/dist/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -29
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/regenerator.js +0 -105
- package/dist/node_modules/@babel/runtime/helpers/regeneratorAsync.js +0 -24
- package/dist/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js +0 -23
- package/dist/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js +0 -50
- package/dist/node_modules/@babel/runtime/helpers/regeneratorDefine.js +0 -37
- package/dist/node_modules/@babel/runtime/helpers/regeneratorKeys.js +0 -25
- package/dist/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +0 -98
- package/dist/node_modules/@babel/runtime/helpers/regeneratorValues.js +0 -35
- package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -25
- package/dist/node_modules/@babel/runtime/regenerator/index.js +0 -29
- package/dist/node_modules/buffer-from/index.js +0 -57
- package/dist/node_modules/source-map/lib/array-set.js +0 -134
- package/dist/node_modules/source-map/lib/base64-vlq.js +0 -144
- package/dist/node_modules/source-map/lib/base64.js +0 -81
- package/dist/node_modules/source-map/lib/binary-search.js +0 -122
- package/dist/node_modules/source-map/lib/mapping-list.js +0 -94
- package/dist/node_modules/source-map/lib/quick-sort.js +0 -126
- package/dist/node_modules/source-map/lib/source-map-consumer.js +0 -1018
- package/dist/node_modules/source-map/lib/source-map-generator.js +0 -385
- package/dist/node_modules/source-map/lib/source-node.js +0 -400
- package/dist/node_modules/source-map/lib/util.js +0 -449
- package/dist/node_modules/source-map/source-map.js +0 -25
- package/dist/node_modules/source-map-support/source-map-support.js +0 -610
- package/dist/node_modules/typescript/lib/typescript.js +0 -22376
- package/dist/oss/publish2oss.js +0 -378
- package/dist/plugins/AddNeoRequirePlugin.js +0 -178
- package/dist/utils/autoEntryRootDir.js +0 -98
- package/dist/utils/cmpUtils/createCmpByTemplate.js +0 -73
- package/dist/utils/cmpUtils/createCmpByZip.js +0 -530
- package/dist/utils/cmpUtils/createCommonModulesCode.js +0 -84
- package/dist/utils/cmpUtils/deleteCmp.js +0 -98
- package/dist/utils/cmpUtils/getCmpModelRegisterCode.js +0 -38
- package/dist/utils/cmpUtils/getCmpPreviewCode.js +0 -37
- package/dist/utils/cmpUtils/getCmpRegisterCode.js +0 -38
- package/dist/utils/cmpUtils/getCmpTypeByDir.js +0 -58
- package/dist/utils/cmpUtils/hasCmpTypeByDir.js +0 -25
- package/dist/utils/cmpUtils/previewCmp.js +0 -74
- package/dist/utils/cmpUtils/pullCmp.js +0 -144
- package/dist/utils/cmpUtils/pushCmp.js +0 -290
- package/dist/utils/common.js +0 -121
- package/dist/utils/configureNeoBuild.js +0 -153
- package/dist/utils/generateEntries.js +0 -73
- package/dist/utils/neoConfigInit.js +0 -25
- package/dist/utils/neoParams.js +0 -23
- package/dist/utils/pathUtils.js +0 -48
- package/dist/utils/projectNameValidator.js +0 -89
- package/dist/utils/projectUtils/createCmpProjectByTemplate.js +0 -74
- package/dist/utils/projectUtils/createCmpProjectZip.js +0 -135
- package/dist/utils/projectUtils/getEntries.js +0 -99
- package/dist/utils/projectUtils/getEntriesWithAutoRegister.js +0 -127
- package/dist/utils/projectUtils/hasNeoProject.js +0 -31
- package/dist/utils/projectUtils/openProject.js +0 -169
- package/dist/utils/projectUtils/updatePublishLog.js +0 -45
- package/dist/utils/replaceInFilesByMap.js +0 -70
- package/dist/utils/replaceInPackage.js +0 -151
- package/dist/utils/resetPackageVersion.js +0 -134
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
const fs = require('fs-extra');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 重置 package.json 文件中的版本号到指定版本
|
|
6
|
+
* @param dir 项目目录
|
|
7
|
+
* @param version 目标版本号,默认为 '1.0.0'
|
|
8
|
+
* @returns 替换结果对象: { success: boolean, message: string, filePath?: string, oldVersion?: string, newVersion?: string }
|
|
9
|
+
*/
|
|
10
|
+
function resetPackageVersion(dir, version = '1.0.0') {
|
|
11
|
+
try {
|
|
12
|
+
// 检查目录是否存在
|
|
13
|
+
if (!fs.existsSync(dir)) {
|
|
14
|
+
return {
|
|
15
|
+
success: false,
|
|
16
|
+
message: `目录不存在: ${dir}`
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 检查是否为目录
|
|
21
|
+
const stat = fs.statSync(dir);
|
|
22
|
+
if (!stat.isDirectory()) {
|
|
23
|
+
return {
|
|
24
|
+
success: false,
|
|
25
|
+
message: `指定路径不是目录: ${dir}`
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 构建package.json的完整路径
|
|
30
|
+
const packageJsonPath = path.join(dir, 'package.json');
|
|
31
|
+
|
|
32
|
+
// 检查package.json文件是否存在
|
|
33
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
34
|
+
return {
|
|
35
|
+
success: false,
|
|
36
|
+
message: `package.json文件不存在: ${packageJsonPath}`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 读取并解析package.json文件
|
|
41
|
+
const content = fs.readFileSync(packageJsonPath, 'utf8');
|
|
42
|
+
let packageJson = {};
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
packageJson = JSON.parse(content);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
return {
|
|
48
|
+
success: false,
|
|
49
|
+
message: `package.json 文件解析失败: ${error.message}。`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
// 保存旧版本号
|
|
55
|
+
const oldVersion = packageJson.version || '未定义';
|
|
56
|
+
|
|
57
|
+
// 检查版本号是否已经是目标版本
|
|
58
|
+
if (packageJson.version === version) {
|
|
59
|
+
return {
|
|
60
|
+
success: true,
|
|
61
|
+
message: `package.json 版本号已经是 ${version}`,
|
|
62
|
+
filePath: packageJsonPath,
|
|
63
|
+
oldVersion,
|
|
64
|
+
newVersion: version
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 更新版本号
|
|
69
|
+
packageJson.version = version;
|
|
70
|
+
|
|
71
|
+
// 写入package.json,保持格式化(2空格缩进)
|
|
72
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf8');
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
success: true,
|
|
76
|
+
message: `已将 package.json 版本号从 ${oldVersion} 重置为 ${version}`,
|
|
77
|
+
filePath: packageJsonPath,
|
|
78
|
+
oldVersion,
|
|
79
|
+
newVersion: version
|
|
80
|
+
};
|
|
81
|
+
} catch (error) {
|
|
82
|
+
return {
|
|
83
|
+
success: false,
|
|
84
|
+
message: `resetPackageVersion 运行失败: ${error.message}`
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 批量重置多个目录中 package.json 文件的版本号
|
|
91
|
+
* @param dirs 目录数组
|
|
92
|
+
* @param version 目标版本号,默认为 '1.0.0'
|
|
93
|
+
* @returns 批量重置结果
|
|
94
|
+
*/
|
|
95
|
+
function resetVersionInMulPackages(dirs, version = '1.0.0') {
|
|
96
|
+
const results = dirs.map((dir) => ({
|
|
97
|
+
dir,
|
|
98
|
+
result: resetPackageVersion(dir, version)
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
const successCount = results.filter((r) => r.result.success).length;
|
|
102
|
+
const failedCount = results.length - successCount;
|
|
103
|
+
|
|
104
|
+
return {
|
|
105
|
+
total: dirs.length,
|
|
106
|
+
success: successCount,
|
|
107
|
+
failed: failedCount,
|
|
108
|
+
results
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
module.exports = {
|
|
113
|
+
resetPackageVersion,
|
|
114
|
+
resetVersionInMulPackages
|
|
115
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
2
|
|
|
3
3
|
// 所有需要废弃的版本
|
|
4
|
-
const versionsToDeprecate = ["1.8.6-beta.1", "1.8.6-beta.2", "1.8.6-beta.3", "1.8.6-beta.5"];
|
|
4
|
+
const versionsToDeprecate = ["1.8.6-beta.1", "1.8.6-beta.2", "1.8.6-beta.3", "1.8.6-beta.5", "1.8.6-beta.6"];
|
|
5
5
|
|
|
6
6
|
const packageName = 'neo-cmp-cli';
|
|
7
7
|
const deprecateMessage = '此版本为开发中版本(存在 bug),请升级到最新版本。';
|
package/test/neo.config.js
CHANGED
|
@@ -32,34 +32,10 @@ module.exports = {
|
|
|
32
32
|
moduleRules: [], // 用于配置自定义loaders
|
|
33
33
|
plugins: [], // 用于配置自定义plugins
|
|
34
34
|
},
|
|
35
|
-
build2lib: {
|
|
36
|
-
entry: {
|
|
37
|
-
index: './src/index.js', // 构建lib的入口
|
|
38
|
-
main: './src/main.js', // 构建lib的入口
|
|
39
|
-
},
|
|
40
|
-
output: {
|
|
41
|
-
filename: '[name].js',
|
|
42
|
-
library: {
|
|
43
|
-
type: 'commonjs2', // 使用 CommonJS 模式构建
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
// 用于构建生产环境代码的相关配置信息
|
|
47
|
-
NODE_ENV: 'development', // development / production
|
|
48
|
-
assetsRoot: resolve('./dist'), // 打包后的文件绝对路径(物理路径)
|
|
49
|
-
assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
|
|
50
|
-
assetsSubDirectory: '', // 资源引用二级路径
|
|
51
|
-
ignoreNodeModules: true, // 打包时是否忽略 node_modules
|
|
52
|
-
// allowList: ['vue'], // ignoreNodeModules为true时生效
|
|
53
|
-
productionSourceMap: false,
|
|
54
|
-
productionGzip: false,
|
|
55
|
-
productionGzipExtensions: ['js', 'css', 'json'],
|
|
56
|
-
// bundleAnalyzerReport: false
|
|
57
|
-
},
|
|
58
35
|
build2esm: {
|
|
59
|
-
type: '
|
|
36
|
+
type: 'node',
|
|
60
37
|
compress: false,
|
|
61
38
|
input: {
|
|
62
|
-
index: resolve('src/index.js'),
|
|
63
39
|
main: resolve('src/main.js')
|
|
64
40
|
},
|
|
65
41
|
output: {
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _commonjsHelpers = require('./_commonjsHelpers.js');
|
|
4
|
-
var AddNeoRequirePlugin = require('../plugins/AddNeoRequirePlugin.js');
|
|
5
|
-
|
|
6
|
-
var require$$1 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(AddNeoRequirePlugin);
|
|
7
|
-
|
|
8
|
-
module.exports = require$$1;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
|
-
|
|
5
|
-
function getDefaultExportFromCjs (x) {
|
|
6
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function getAugmentedNamespace(n) {
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
|
|
11
|
-
var f = n.default;
|
|
12
|
-
if (typeof f == "function") {
|
|
13
|
-
var a = function a () {
|
|
14
|
-
var isInstance = false;
|
|
15
|
-
try {
|
|
16
|
-
isInstance = this instanceof a;
|
|
17
|
-
} catch {}
|
|
18
|
-
if (isInstance) {
|
|
19
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
20
|
-
}
|
|
21
|
-
return f.apply(this, arguments);
|
|
22
|
-
};
|
|
23
|
-
a.prototype = f.prototype;
|
|
24
|
-
} else a = {};
|
|
25
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
26
|
-
Object.keys(n).forEach(function (k) {
|
|
27
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
28
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function () {
|
|
31
|
-
return n[k];
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
return a;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
exports.commonjsGlobal = commonjsGlobal;
|
|
39
|
-
exports.getAugmentedNamespace = getAugmentedNamespace;
|
|
40
|
-
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
package/dist/_virtual/base64.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _commonjsHelpers = require('./_commonjsHelpers.js');
|
|
4
|
-
var createCmpByZip = require('../utils/cmpUtils/createCmpByZip.js');
|
|
5
|
-
|
|
6
|
-
var require$$7 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(createCmpByZip);
|
|
7
|
-
|
|
8
|
-
module.exports = require$$7;
|
package/dist/_virtual/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _commonjsHelpers = require('./_commonjsHelpers.js');
|
|
4
|
-
var index = require('../node_modules/@babel/runtime/regenerator/index.js');
|
|
5
|
-
|
|
6
|
-
var regeneratorExports = index.__require();
|
|
7
|
-
var _regeneratorRuntime = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(regeneratorExports);
|
|
8
|
-
|
|
9
|
-
module.exports = _regeneratorRuntime;
|
package/dist/_virtual/pullCmp.js
DELETED
package/dist/_virtual/pushCmp.js
DELETED
package/dist/_virtual/typeof.js
DELETED
package/dist/_virtual/util.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index.js');
|
|
4
|
-
|
|
5
|
-
var auth_config;
|
|
6
|
-
var hasRequiredAuth_config;
|
|
7
|
-
|
|
8
|
-
function requireAuth_config () {
|
|
9
|
-
if (hasRequiredAuth_config) return auth_config;
|
|
10
|
-
hasRequiredAuth_config = 1;
|
|
11
|
-
var curConfig = index.__require(); // 获取当前项目根目录下的配置文件
|
|
12
|
-
|
|
13
|
-
var neoConfig = curConfig.neoConfig || {};
|
|
14
|
-
// const authConfig = neoConfig.auth || {};
|
|
15
|
-
|
|
16
|
-
// NeoCRM 跨 Pod 授权配置
|
|
17
|
-
auth_config = {
|
|
18
|
-
loginURL: neoConfig.loginURL || 'https://login-cd.xiaoshouyi.com/auc/oauth2/auth',
|
|
19
|
-
// 登录 URL,从创建连接器的客户端信息中获取(Login_Url)
|
|
20
|
-
tokenAPI: neoConfig.tokenAPI || 'https://login-cd.xiaoshouyi.com/auc/oauth2/token',
|
|
21
|
-
// Token 获取接口地址(默认:https://login.xiaoshouyi.com/auc/oauth2/token)
|
|
22
|
-
redirectUri: neoConfig.redirectUri || 'http://localhost:1028',
|
|
23
|
-
// 固定端口号,用于接收授权码
|
|
24
|
-
// 重定向 URI,动态生成
|
|
25
|
-
getRedirectURI: function getRedirectURI(port) {
|
|
26
|
-
return "http://localhost:" + port;
|
|
27
|
-
},
|
|
28
|
-
// 获取 授权码 相关配置
|
|
29
|
-
response_type: 'code',
|
|
30
|
-
// 认证类型;此参数值必须为 code
|
|
31
|
-
// client_id: authConfig.client_id || '04c8b45c4dbe36426a660bf70d3fe3e7', // 客户端 ID,跨 Pod 级链接器【内置】
|
|
32
|
-
client_id: '04c8b45c4dbe36426a660bf70d3fe3e7',
|
|
33
|
-
// 客户端 ID,跨 Pod 级链接器【内置】
|
|
34
|
-
scope: 'all',
|
|
35
|
-
// 固定值:all
|
|
36
|
-
oauthType: 'standard',
|
|
37
|
-
// 固定值:standard
|
|
38
|
-
access_type: 'offline',
|
|
39
|
-
// 此参数值为 online 时,不产生 refresh_token ;此参数值为 offline 时,返回refresh_token
|
|
40
|
-
|
|
41
|
-
// 获取 令牌 相关配置
|
|
42
|
-
// client_secret: authConfig.client_secret || '370817d1336a3737f95c671eea39a23b', // 客户端秘钥,跨 Pod 级链接器【内置】
|
|
43
|
-
client_secret: '370817d1336a3737f95c671eea39a23b',
|
|
44
|
-
// 客户端秘钥,跨 Pod 级链接器【内置】
|
|
45
|
-
grant_type: 'authorization_code' // 授权类型;此参数值必须为 authorization_code
|
|
46
|
-
};
|
|
47
|
-
return auth_config;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
exports.__require = requireAuth_config;
|