@contrail/cli 2.0.9 → 2.0.10

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/README.md CHANGED
@@ -15,7 +15,7 @@ $ npm install -g @contrail/cli
15
15
  $ contrail COMMAND
16
16
  running command...
17
17
  $ contrail (--version)
18
- @contrail/cli/2.0.9 darwin-arm64 node-v18.13.0
18
+ @contrail/cli/2.0.10 darwin-arm64 node-v18.13.0
19
19
  $ contrail --help [COMMAND]
20
20
  USAGE
21
21
  $ contrail COMMAND
@@ -1,7 +1,4 @@
1
1
  import { App, AppOrg, AppVersion, WorkflowDefinition } from '../interfaces';
2
- export declare function getAllAvailableApps(options: {
3
- orgId: string;
4
- }): Promise<App[]>;
5
2
  export declare function getWorkflowTemplateDefinitionsForApp(options: {
6
3
  appId: string;
7
4
  }): Promise<WorkflowDefinition[]>;
package/dist/api/apps.js CHANGED
@@ -1,28 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAvailableApps = exports.installAppToOrg = exports.getInstalledApps = exports.deleteAppOrg = exports.upgradeAppVersion = exports.getAppVersions = exports.getWorkflowTemplateDefinitionsForApp = exports.getAllAvailableApps = void 0;
3
+ exports.getAvailableApps = exports.installAppToOrg = exports.getInstalledApps = exports.deleteAppOrg = exports.upgradeAppVersion = exports.getAppVersions = exports.getWorkflowTemplateDefinitionsForApp = void 0;
4
4
  const auth_1 = require("../auth/auth");
5
5
  const sdk_1 = require("@contrail/sdk");
6
- async function getAllAvailableApps(options) {
7
- const apps = [];
8
- apps.push(...await new sdk_1.Entities().get({
9
- entityName: 'app',
10
- criteria: {
11
- orgId: options.orgId,
12
- private: true,
13
- },
14
- }));
15
- apps.push(...await new sdk_1.Entities().get({
16
- entityName: 'app',
17
- criteria: {
18
- orgId: options.orgId,
19
- private: false,
20
- hidden: true,
21
- },
22
- }));
23
- return apps;
24
- }
25
- exports.getAllAvailableApps = getAllAvailableApps;
26
6
  async function getWorkflowTemplateDefinitionsForApp(options) {
27
7
  return await new sdk_1.Entities().get({
28
8
  entityName: 'event-workflow-template-definition',
@@ -76,13 +56,15 @@ async function installAppToOrg(app, configProperties) {
76
56
  }
77
57
  exports.installAppToOrg = installAppToOrg;
78
58
  async function getAvailableApps(options) {
79
- const orgId = auth_1.Auth.config.orgId;
59
+ var _a;
60
+ const orgId = (_a = options === null || options === void 0 ? void 0 : options.orgId) !== null && _a !== void 0 ? _a : auth_1.Auth.config.orgId;
80
61
  const apps = [];
81
62
  apps.push(...await new sdk_1.Entities().get({
82
63
  entityName: 'app',
83
64
  criteria: {
84
65
  orgId,
85
66
  private: true,
67
+ ...options,
86
68
  },
87
69
  }));
88
70
  apps.push(...await new sdk_1.Entities().get({
@@ -90,6 +72,7 @@ async function getAvailableApps(options) {
90
72
  criteria: {
91
73
  orgId,
92
74
  private: false,
75
+ hidden: true,
93
76
  ...options
94
77
  },
95
78
  }));
@@ -26,7 +26,7 @@ class AppDeployer {
26
26
  }
27
27
  async getExistingApp(appDeclaration) {
28
28
  const orgId = auth_1.Auth.config.orgId;
29
- const apps = await (0, apps_1.getAllAvailableApps)({ orgId });
29
+ const apps = await (0, apps_1.getAvailableApps)({ orgId });
30
30
  return apps.find(app => app.identifier === appDeclaration.appIdentifier);
31
31
  }
32
32
  async createNewApp(appDeclaration) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.9",
2
+ "version": "2.0.10",
3
3
  "commands": {
4
4
  "app:create": {
5
5
  "id": "app:create",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "bin": {
6
6
  "contrail-cli": "./bin/run",