@cloudbase/cli 2.3.6 → 2.3.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.
@@ -63,7 +63,8 @@ let AttachFileLayer = class AttachFileLayer extends common_1.Command {
63
63
  }
64
64
  let layers = yield (0, function_1.listLayers)({
65
65
  offset: 0,
66
- limit: 200
66
+ limit: 200,
67
+ searchSrc: `TCB_${envId}`
67
68
  });
68
69
  loading.stop();
69
70
  layers = layers.map((item) => ({
@@ -42,14 +42,12 @@ let DeleteFileLayer = class DeleteFileLayer extends common_1.Command {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
43
  const loading = (0, utils_1.loadingFactory)();
44
44
  loading.start('数据加载中...');
45
- let layers = yield (0, function_1.listLayers)({
45
+ const layers = yield (0, function_1.listLayers)({
46
46
  offset: 0,
47
- limit: 200
47
+ limit: 200,
48
+ searchSrc: `TCB_${envId}`
48
49
  });
49
50
  loading.stop();
50
- layers = layers
51
- .filter((item) => item.LayerName.includes(`_${envId}`))
52
- .map((item) => item.LayerName);
53
51
  if (!layers.length) {
54
52
  throw new error_1.CloudBaseError('当前环境没有可用的文件层,请先创建文件层!');
55
53
  }
@@ -57,7 +55,7 @@ let DeleteFileLayer = class DeleteFileLayer extends common_1.Command {
57
55
  type: 'select',
58
56
  name: 'layer',
59
57
  message: '选择文件层名称',
60
- choices: layers
58
+ choices: layers.map((item) => item.LayerName)
61
59
  });
62
60
  let versions = yield (0, function_1.listLayerVersions)({
63
61
  name: layer
@@ -52,14 +52,12 @@ let DownloadFileLayer = class DownloadFileLayer extends common_1.Command {
52
52
  const { dest } = options;
53
53
  const loading = (0, utils_1.loadingFactory)();
54
54
  loading.start('数据加载中...');
55
- let layers = yield (0, function_1.listLayers)({
55
+ const layers = yield (0, function_1.listLayers)({
56
56
  offset: 0,
57
- limit: 200
57
+ limit: 200,
58
+ searchSrc: `TCB_${envId}`
58
59
  });
59
60
  loading.stop();
60
- layers = layers
61
- .filter((item) => item.LayerName.includes(`_${envId}`))
62
- .map((item) => item.LayerName);
63
61
  if (!layers.length) {
64
62
  throw new error_1.CloudBaseError('当前环境没有可用的文件层,请先创建文件层!');
65
63
  }
@@ -67,7 +65,7 @@ let DownloadFileLayer = class DownloadFileLayer extends common_1.Command {
67
65
  type: 'select',
68
66
  name: 'layer',
69
67
  message: '选择文件层名称',
70
- choices: layers
68
+ choices: layers.map((item) => item.LayerName)
71
69
  });
72
70
  let versions = yield (0, function_1.listLayerVersions)({
73
71
  name: layer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cli",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
4
4
  "description": "cli tool for cloudbase",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {