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.
Files changed (158) hide show
  1. package/bin/index.js +2 -2
  2. package/package.json +3 -3
  3. package/src/config/auth.config.js +27 -0
  4. package/src/config/default.config.js +176 -0
  5. package/src/config/index.js +9 -0
  6. package/src/initData/defaultTemplate.html +13 -0
  7. package/src/initData/neo.config.js +138 -0
  8. package/src/main.js +221 -0
  9. package/src/module/inspect.js +41 -0
  10. package/src/module/neoInit.js +55 -0
  11. package/src/module/neoInitByCopy.js +61 -0
  12. package/src/neo/NeoUMDContent.js +30 -0
  13. package/src/neo/neoLogin.js +565 -0
  14. package/src/neo/neoRequire.js +125 -0
  15. package/src/neo/neoService.js +874 -0
  16. package/src/neo/webpack.mf.js +60 -0
  17. package/src/neo/wrapperContent.js +16 -0
  18. package/src/oss/publish2oss.js +348 -0
  19. package/src/plugins/AddNeoRequirePlugin-v1.js +47 -0
  20. package/src/plugins/AddNeoRequirePlugin.js +179 -0
  21. package/src/plugins/README.md +109 -0
  22. package/src/utils/autoEntryRootDir.js +85 -0
  23. package/src/utils/cmpUtils/createCmpByTemplate.js +60 -0
  24. package/src/utils/cmpUtils/createCmpByZip.js +408 -0
  25. package/src/utils/cmpUtils/createCommonModulesCode.js +121 -0
  26. package/src/utils/cmpUtils/deleteCmp.js +63 -0
  27. package/src/utils/cmpUtils/getCmpModelRegisterCode.js +31 -0
  28. package/src/utils/cmpUtils/getCmpPreviewCode.js +43 -0
  29. package/src/utils/cmpUtils/getCmpRegisterCode.js +31 -0
  30. package/src/utils/cmpUtils/getCmpTypeByDir.js +41 -0
  31. package/src/utils/cmpUtils/hasCmpTypeByDir.js +11 -0
  32. package/src/utils/cmpUtils/previewCmp.js +55 -0
  33. package/src/utils/cmpUtils/pullCmp.js +104 -0
  34. package/src/utils/cmpUtils/pushCmp.js +230 -0
  35. package/src/utils/common.js +107 -0
  36. package/src/utils/configureNeoBuild.js +109 -0
  37. package/src/utils/generateEntries.js +63 -0
  38. package/src/utils/neoConfigInit.js +13 -0
  39. package/src/utils/neoParams.js +12 -0
  40. package/src/utils/pathUtils.js +23 -0
  41. package/src/utils/projectNameValidator.js +76 -0
  42. package/src/utils/projectUtils/createCmpProjectByTemplate.js +59 -0
  43. package/src/utils/projectUtils/createCmpProjectZip.js +120 -0
  44. package/src/utils/projectUtils/getEntries.js +80 -0
  45. package/src/utils/projectUtils/getEntriesWithAutoRegister.js +108 -0
  46. package/src/utils/projectUtils/hasNeoProject.js +17 -0
  47. package/src/utils/projectUtils/openProject.js +96 -0
  48. package/src/utils/projectUtils/updatePublishLog.js +30 -0
  49. package/src/utils/replaceInFiles.js +47 -0
  50. package/src/utils/replaceInFilesByMap.js +54 -0
  51. package/src/utils/replaceInPackage.js +134 -0
  52. package/src/utils/resetPackageVersion.js +115 -0
  53. package/test/deprecate-versions.js +1 -1
  54. package/test/neo.config.js +1 -25
  55. package/dist/_virtual/AddNeoRequirePlugin.js +0 -8
  56. package/dist/_virtual/OverloadYield.js +0 -5
  57. package/dist/_virtual/_commonjsHelpers.js +0 -40
  58. package/dist/_virtual/array-set.js +0 -5
  59. package/dist/_virtual/base64-vlq.js +0 -5
  60. package/dist/_virtual/base64.js +0 -5
  61. package/dist/_virtual/binary-search.js +0 -5
  62. package/dist/_virtual/createCmpByZip.js +0 -8
  63. package/dist/_virtual/deleteCmp.js +0 -8
  64. package/dist/_virtual/index.js +0 -9
  65. package/dist/_virtual/mapping-list.js +0 -5
  66. package/dist/_virtual/neoLogin.js +0 -8
  67. package/dist/_virtual/neoService.js +0 -8
  68. package/dist/_virtual/openProject.js +0 -8
  69. package/dist/_virtual/publish2oss.js +0 -8
  70. package/dist/_virtual/pullCmp.js +0 -8
  71. package/dist/_virtual/pushCmp.js +0 -8
  72. package/dist/_virtual/quick-sort.js +0 -5
  73. package/dist/_virtual/regenerator.js +0 -5
  74. package/dist/_virtual/regeneratorAsync.js +0 -5
  75. package/dist/_virtual/regeneratorAsyncGen.js +0 -5
  76. package/dist/_virtual/regeneratorAsyncIterator.js +0 -5
  77. package/dist/_virtual/regeneratorDefine.js +0 -5
  78. package/dist/_virtual/regeneratorKeys.js +0 -5
  79. package/dist/_virtual/regeneratorRuntime.js +0 -5
  80. package/dist/_virtual/regeneratorValues.js +0 -5
  81. package/dist/_virtual/source-map-consumer.js +0 -5
  82. package/dist/_virtual/source-map-generator.js +0 -5
  83. package/dist/_virtual/source-map-support.js +0 -5
  84. package/dist/_virtual/source-map.js +0 -5
  85. package/dist/_virtual/source-node.js +0 -5
  86. package/dist/_virtual/typeof.js +0 -5
  87. package/dist/_virtual/typescript.js +0 -5
  88. package/dist/_virtual/util.js +0 -5
  89. package/dist/config/auth.config.js +0 -50
  90. package/dist/config/default.config.js +0 -225
  91. package/dist/config/index.js +0 -27
  92. package/dist/main.js +0 -9
  93. package/dist/main2.js +0 -261
  94. package/dist/module/inspect.js +0 -64
  95. package/dist/module/neoInit.js +0 -69
  96. package/dist/module/neoInitByCopy.js +0 -81
  97. package/dist/neo/neoLogin.js +0 -663
  98. package/dist/neo/neoRequire.js +0 -118
  99. package/dist/neo/neoService.js +0 -1246
  100. package/dist/node_modules/@babel/runtime/helpers/OverloadYield.js +0 -19
  101. package/dist/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -29
  102. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -13
  103. package/dist/node_modules/@babel/runtime/helpers/regenerator.js +0 -105
  104. package/dist/node_modules/@babel/runtime/helpers/regeneratorAsync.js +0 -24
  105. package/dist/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js +0 -23
  106. package/dist/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js +0 -50
  107. package/dist/node_modules/@babel/runtime/helpers/regeneratorDefine.js +0 -37
  108. package/dist/node_modules/@babel/runtime/helpers/regeneratorKeys.js +0 -25
  109. package/dist/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +0 -98
  110. package/dist/node_modules/@babel/runtime/helpers/regeneratorValues.js +0 -35
  111. package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -25
  112. package/dist/node_modules/@babel/runtime/regenerator/index.js +0 -29
  113. package/dist/node_modules/buffer-from/index.js +0 -57
  114. package/dist/node_modules/source-map/lib/array-set.js +0 -134
  115. package/dist/node_modules/source-map/lib/base64-vlq.js +0 -144
  116. package/dist/node_modules/source-map/lib/base64.js +0 -81
  117. package/dist/node_modules/source-map/lib/binary-search.js +0 -122
  118. package/dist/node_modules/source-map/lib/mapping-list.js +0 -94
  119. package/dist/node_modules/source-map/lib/quick-sort.js +0 -126
  120. package/dist/node_modules/source-map/lib/source-map-consumer.js +0 -1018
  121. package/dist/node_modules/source-map/lib/source-map-generator.js +0 -385
  122. package/dist/node_modules/source-map/lib/source-node.js +0 -400
  123. package/dist/node_modules/source-map/lib/util.js +0 -449
  124. package/dist/node_modules/source-map/source-map.js +0 -25
  125. package/dist/node_modules/source-map-support/source-map-support.js +0 -610
  126. package/dist/node_modules/typescript/lib/typescript.js +0 -22376
  127. package/dist/oss/publish2oss.js +0 -378
  128. package/dist/plugins/AddNeoRequirePlugin.js +0 -178
  129. package/dist/utils/autoEntryRootDir.js +0 -98
  130. package/dist/utils/cmpUtils/createCmpByTemplate.js +0 -73
  131. package/dist/utils/cmpUtils/createCmpByZip.js +0 -530
  132. package/dist/utils/cmpUtils/createCommonModulesCode.js +0 -84
  133. package/dist/utils/cmpUtils/deleteCmp.js +0 -98
  134. package/dist/utils/cmpUtils/getCmpModelRegisterCode.js +0 -38
  135. package/dist/utils/cmpUtils/getCmpPreviewCode.js +0 -37
  136. package/dist/utils/cmpUtils/getCmpRegisterCode.js +0 -38
  137. package/dist/utils/cmpUtils/getCmpTypeByDir.js +0 -58
  138. package/dist/utils/cmpUtils/hasCmpTypeByDir.js +0 -25
  139. package/dist/utils/cmpUtils/previewCmp.js +0 -74
  140. package/dist/utils/cmpUtils/pullCmp.js +0 -144
  141. package/dist/utils/cmpUtils/pushCmp.js +0 -290
  142. package/dist/utils/common.js +0 -121
  143. package/dist/utils/configureNeoBuild.js +0 -153
  144. package/dist/utils/generateEntries.js +0 -73
  145. package/dist/utils/neoConfigInit.js +0 -25
  146. package/dist/utils/neoParams.js +0 -23
  147. package/dist/utils/pathUtils.js +0 -48
  148. package/dist/utils/projectNameValidator.js +0 -89
  149. package/dist/utils/projectUtils/createCmpProjectByTemplate.js +0 -74
  150. package/dist/utils/projectUtils/createCmpProjectZip.js +0 -135
  151. package/dist/utils/projectUtils/getEntries.js +0 -99
  152. package/dist/utils/projectUtils/getEntriesWithAutoRegister.js +0 -127
  153. package/dist/utils/projectUtils/hasNeoProject.js +0 -31
  154. package/dist/utils/projectUtils/openProject.js +0 -169
  155. package/dist/utils/projectUtils/updatePublishLog.js +0 -45
  156. package/dist/utils/replaceInFilesByMap.js +0 -70
  157. package/dist/utils/replaceInPackage.js +0 -151
  158. 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),请升级到最新版本。';
@@ -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: 'js',
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,5 +0,0 @@
1
- 'use strict';
2
-
3
- var OverloadYield = {exports: {}};
4
-
5
- exports.__module = OverloadYield;
@@ -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;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var arraySet = {};
4
-
5
- exports.__exports = arraySet;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var base64Vlq = {};
4
-
5
- exports.__exports = base64Vlq;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var base64 = {};
4
-
5
- exports.__exports = base64;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var binarySearch = {};
4
-
5
- exports.__exports = binarySearch;
@@ -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;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('./_commonjsHelpers.js');
4
- var deleteCmp = require('../utils/cmpUtils/deleteCmp.js');
5
-
6
- var require$$15 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(deleteCmp);
7
-
8
- module.exports = require$$15;
@@ -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;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var mappingList = {};
4
-
5
- exports.__exports = mappingList;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('./_commonjsHelpers.js');
4
- var neoLogin = require('../neo/neoLogin.js');
5
-
6
- var require$$22 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(neoLogin);
7
-
8
- module.exports = require$$22;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('./_commonjsHelpers.js');
4
- var neoService = require('../neo/neoService.js');
5
-
6
- var require$$21 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(neoService);
7
-
8
- module.exports = require$$21;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('./_commonjsHelpers.js');
4
- var openProject = require('../utils/projectUtils/openProject.js');
5
-
6
- var require$$16 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(openProject);
7
-
8
- module.exports = require$$16;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('./_commonjsHelpers.js');
4
- var publish2oss = require('../oss/publish2oss.js');
5
-
6
- var require$$8 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(publish2oss);
7
-
8
- module.exports = require$$8;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('./_commonjsHelpers.js');
4
- var pullCmp = require('../utils/cmpUtils/pullCmp.js');
5
-
6
- var require$$14 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(pullCmp);
7
-
8
- module.exports = require$$14;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('./_commonjsHelpers.js');
4
- var pushCmp = require('../utils/cmpUtils/pushCmp.js');
5
-
6
- var require$$9 = /*@__PURE__*/_commonjsHelpers.getAugmentedNamespace(pushCmp);
7
-
8
- module.exports = require$$9;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var quickSort = {};
4
-
5
- exports.__exports = quickSort;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var regenerator = {exports: {}};
4
-
5
- exports.__module = regenerator;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var regeneratorAsync = {exports: {}};
4
-
5
- exports.__module = regeneratorAsync;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var regeneratorAsyncGen = {exports: {}};
4
-
5
- exports.__module = regeneratorAsyncGen;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var regeneratorAsyncIterator = {exports: {}};
4
-
5
- exports.__module = regeneratorAsyncIterator;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var regeneratorDefine = {exports: {}};
4
-
5
- exports.__module = regeneratorDefine;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var regeneratorKeys = {exports: {}};
4
-
5
- exports.__module = regeneratorKeys;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var regeneratorRuntime = {exports: {}};
4
-
5
- exports.__module = regeneratorRuntime;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var regeneratorValues = {exports: {}};
4
-
5
- exports.__module = regeneratorValues;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var sourceMapConsumer = {};
4
-
5
- exports.__exports = sourceMapConsumer;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var sourceMapGenerator = {};
4
-
5
- exports.__exports = sourceMapGenerator;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var sourceMapSupport = {exports: {}};
4
-
5
- exports.__module = sourceMapSupport;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var sourceMap = {};
4
-
5
- exports.__exports = sourceMap;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var sourceNode = {};
4
-
5
- exports.__exports = sourceNode;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var _typeof = {exports: {}};
4
-
5
- exports.__module = _typeof;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var typescript = {exports: {}};
4
-
5
- exports.__module = typescript;
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- var util = {};
4
-
5
- exports.__exports = util;
@@ -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;