ql-publish 0.0.3 → 0.0.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.
Files changed (3) hide show
  1. package/index.js +3 -0
  2. package/package.json +1 -1
  3. package/upload/u.js +3 -5
package/index.js CHANGED
@@ -13,5 +13,8 @@ module.exports = {
13
13
  },
14
14
  refresh: () => {
15
15
  require('./cdn/index')
16
+ },
17
+ reset: () => {
18
+ require('./upload/reset')
16
19
  }
17
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ql-publish",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "scripts": {},
5
5
  "dependencies": {
6
6
  "@alicloud/cdn20180510": "^7.0.1",
package/upload/u.js CHANGED
@@ -335,11 +335,6 @@ const creatFileMap = async (sftp, currentSourceDir) => {
335
335
  // }
336
336
  }
337
337
  }
338
-
339
- if (fileMapData.mtime === 0) {
340
- logger.error(`❌ 旧项目文件索引创建失败,请检查目录 ${currentSourceDir} 是否存在`);
341
- process.exit(1);
342
- }
343
338
  }
344
339
 
345
340
  const sftpReaddir = async (sftp, pathStr) => {
@@ -447,6 +442,9 @@ const sshAction = async () => {
447
442
  }
448
443
  // 生成文件地址路径映像
449
444
  await creatFileMap(sftp, `${config.path}/`);
445
+ if (fileMapData.mtime === 0) {
446
+ logger.error(`❌ 旧项目文件索引创建失败`);
447
+ }
450
448
  await writeStreamToFile(sftp, JSON.stringify(fileMapData), `${config.path}/fileMap.json`);
451
449
  } catch (err) {
452
450
  logger.error('❌ 过程出错:', err.message);