@cloudbase/cli 2.6.0-alpha.4 → 2.6.0-alpha.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.
@@ -175,7 +175,7 @@ let FunDeployCommand = class FunDeployCommand extends common_1.Command {
175
175
  Limit: 1,
176
176
  Offset: 0
177
177
  });
178
- if (fetchSvrRes.ServerName && fetchSvrRes.Tag !== 'function') {
178
+ if (fetchSvrRes.ServerName && !_isFunRunService(fetchSvrRes.Tag)) {
179
179
  log.error(`${serviceName} 服务已存在,但不是一个函数式托管服务,请使用另外的服务名称`);
180
180
  return;
181
181
  }
@@ -229,7 +229,7 @@ let FunDeployCommand = class FunDeployCommand extends common_1.Command {
229
229
  envId,
230
230
  serviceName,
231
231
  filePath: source,
232
- fileToIgnore: includeNodeModules ? [] : ['node_modules/**/*']
232
+ fileToIgnore: includeNodeModules ? [] : ['node_modules', 'node_modules/**/*']
233
233
  });
234
234
  packageName = PackageName;
235
235
  packageVersion = PackageVersion;
@@ -410,3 +410,10 @@ function _inputAppId(defaultVal = '') {
410
410
  return answers['appId'];
411
411
  });
412
412
  }
413
+ function _isFunRunService(tagStr) {
414
+ if (!tagStr)
415
+ return false;
416
+ const tags = tagStr.split(',');
417
+ const tagList = tags.map((item) => item.split(':')[0]);
418
+ return tagList.includes('function');
419
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cli",
3
- "version": "2.6.0-alpha.4",
3
+ "version": "2.6.0-alpha.6",
4
4
  "description": "cli tool for cloudbase",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {