ql-publish 0.0.2 → 0.0.3

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/cdn/index.js CHANGED
@@ -1,4 +1,9 @@
1
1
  const refreshCdn = require('./refresh');
2
+ const logger = require("../utils/logger");
2
3
  const config = require('../config/config')[process.env.NODE_ENV];
3
4
 
4
- refreshCdn(config.cdn.list);
5
+ if (config && config.cdn && config.cdn.list) {
6
+ refreshCdn(config.cdn.list);
7
+ } else {
8
+ logger.error(`❌ ${process.env.NODE_ENV}环境没有配置cdn`);
9
+ }
package/config/config.js CHANGED
@@ -12,8 +12,6 @@ const ossConfigCdn = () => {
12
12
  }
13
13
  }
14
14
 
15
- console.log('_config', _config)
16
-
17
15
  // 服务器配置信息
18
16
  module.exports = {
19
17
  test: {
package/index.js CHANGED
@@ -6,12 +6,12 @@ module.exports = {
6
6
  _.coreConfig = _coreConfig;
7
7
  },
8
8
  clear: () => {
9
-
9
+ require('./upload/clear');
10
10
  },
11
11
  upload: () => {
12
12
  return require('./upload/index')();
13
13
  },
14
14
  refresh: () => {
15
-
15
+ require('./cdn/index')
16
16
  }
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ql-publish",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "scripts": {},
5
5
  "dependencies": {
6
6
  "@alicloud/cdn20180510": "^7.0.1",