@prismatic-io/prism 4.2.1 → 4.2.4
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/lib/commands/alerts/events/list.js +4 -1
- package/lib/commands/alerts/groups/list.js +23 -10
- package/lib/commands/alerts/monitors/list.js +41 -11
- package/lib/commands/alerts/webhooks/list.js +26 -13
- package/lib/commands/components/actions/list.js +60 -19
- package/lib/commands/components/dev/test.js +1 -1
- package/lib/commands/components/init/index.js +5 -1
- package/lib/commands/components/list.js +42 -19
- package/lib/commands/components/publish.js +18 -17
- package/lib/commands/components/triggers/list.js +61 -20
- package/lib/commands/customers/list.js +29 -11
- package/lib/commands/customers/users/list.js +34 -15
- package/lib/commands/instances/config-vars/list.js +44 -19
- package/lib/commands/instances/flow-configs/list.js +29 -16
- package/lib/commands/instances/list.js +44 -22
- package/lib/commands/integrations/flows/list.js +29 -16
- package/lib/commands/integrations/list.js +32 -15
- package/lib/commands/organization/users/list.js +37 -12
- package/lib/utils/component/publish.js +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -5,31 +5,50 @@ const graphql_1 = require("../../../graphql");
|
|
|
5
5
|
class ListCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
7
|
const { args: { customer }, flags, } = await this.parse(ListCommand);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
users {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
let customerUsers = [];
|
|
9
|
+
let hasNextPage = true;
|
|
10
|
+
let cursor = "";
|
|
11
|
+
while (hasNextPage) {
|
|
12
|
+
const { customer: { users: { nodes, pageInfo }, }, } = await (0, graphql_1.gqlRequest)({
|
|
13
|
+
document: (0, graphql_1.gql) `
|
|
14
|
+
query listCustomerUsers($id: ID!, $after: String) {
|
|
15
|
+
customer(id: $id) {
|
|
16
|
+
users(after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
name
|
|
20
|
+
email
|
|
21
|
+
externalId
|
|
22
|
+
role {
|
|
23
|
+
name
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
pageInfo {
|
|
27
|
+
hasNextPage
|
|
28
|
+
endCursor
|
|
29
|
+
}
|
|
17
30
|
}
|
|
18
31
|
}
|
|
19
32
|
}
|
|
33
|
+
`,
|
|
34
|
+
variables: { id: customer, after: cursor },
|
|
35
|
+
});
|
|
36
|
+
customerUsers = [...customerUsers, ...nodes];
|
|
37
|
+
cursor = pageInfo.endCursor;
|
|
38
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
20
39
|
}
|
|
21
|
-
|
|
22
|
-
variables: {
|
|
23
|
-
id: customer,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
core_1.CliUx.ux.table(result.customer.users.nodes, {
|
|
40
|
+
core_1.CliUx.ux.table(customerUsers, {
|
|
27
41
|
id: {
|
|
28
42
|
minWidth: 8,
|
|
29
43
|
extended: true,
|
|
30
44
|
},
|
|
31
45
|
name: {},
|
|
32
46
|
email: {},
|
|
47
|
+
role: { get: ({ role: { name } }) => name },
|
|
48
|
+
externalId: {
|
|
49
|
+
extended: true,
|
|
50
|
+
get: ({ externalId }) => externalId || "",
|
|
51
|
+
},
|
|
33
52
|
}, { ...flags });
|
|
34
53
|
}
|
|
35
54
|
}
|
|
@@ -5,29 +5,50 @@ const graphql_1 = require("../../../graphql");
|
|
|
5
5
|
class ListCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
7
|
const { args: { instance }, flags, } = await this.parse(ListCommand);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
configVariables {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
let configVariables = [];
|
|
9
|
+
let hasNextPage = true;
|
|
10
|
+
let cursor = "";
|
|
11
|
+
while (hasNextPage) {
|
|
12
|
+
const { instance: { configVariables: { nodes, pageInfo }, }, } = await (0, graphql_1.gqlRequest)({
|
|
13
|
+
document: (0, graphql_1.gql) `
|
|
14
|
+
query listInstanceConfigVariables($id: ID!) {
|
|
15
|
+
instance(id: $id) {
|
|
16
|
+
configVariables {
|
|
17
|
+
nodes {
|
|
17
18
|
id
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
value
|
|
20
|
+
status
|
|
21
|
+
inputs {
|
|
22
|
+
nodes {
|
|
23
|
+
name
|
|
24
|
+
value
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
requiredConfigVariable {
|
|
28
|
+
id
|
|
29
|
+
key
|
|
30
|
+
defaultValue
|
|
31
|
+
dataType
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
pageInfo {
|
|
35
|
+
hasNextPage
|
|
36
|
+
endCursor
|
|
20
37
|
}
|
|
21
38
|
}
|
|
22
39
|
}
|
|
23
40
|
}
|
|
41
|
+
`,
|
|
42
|
+
variables: {
|
|
43
|
+
id: instance,
|
|
44
|
+
after: cursor,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
configVariables = [...configVariables, ...nodes];
|
|
48
|
+
cursor = pageInfo.endCursor;
|
|
49
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
24
50
|
}
|
|
25
|
-
|
|
26
|
-
variables: {
|
|
27
|
-
id: instance,
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
core_1.CliUx.ux.table(result.instance.configVariables.nodes, {
|
|
51
|
+
core_1.CliUx.ux.table(configVariables, {
|
|
31
52
|
id: {
|
|
32
53
|
minWidth: 8,
|
|
33
54
|
extended: true,
|
|
@@ -40,10 +61,14 @@ class ListCommand extends core_1.Command {
|
|
|
40
61
|
get: (row) => row.requiredConfigVariable.key,
|
|
41
62
|
},
|
|
42
63
|
value: {
|
|
43
|
-
get: (row) => row.
|
|
64
|
+
get: (row) => row.requiredConfigVariable.dataType === "CONNECTION"
|
|
65
|
+
? row.inputs
|
|
66
|
+
: row.value,
|
|
44
67
|
},
|
|
45
68
|
defaultValue: {
|
|
46
|
-
get: (row) => row.requiredConfigVariable.
|
|
69
|
+
get: (row) => row.requiredConfigVariable.dataType === "CONNECTION"
|
|
70
|
+
? ""
|
|
71
|
+
: row.requiredConfigVariable.defaultValue,
|
|
47
72
|
},
|
|
48
73
|
}, { ...flags });
|
|
49
74
|
}
|
|
@@ -5,27 +5,40 @@ const graphql_1 = require("../../../graphql");
|
|
|
5
5
|
class ListCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
7
|
const { args: { instance }, flags, } = await this.parse(ListCommand);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
flowConfigs {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
let flowConfigs = [];
|
|
9
|
+
let hasNextPage = true;
|
|
10
|
+
let cursor = "";
|
|
11
|
+
while (hasNextPage) {
|
|
12
|
+
const { instance: { flowConfigs: { nodes, pageInfo }, }, } = await (0, graphql_1.gqlRequest)({
|
|
13
|
+
document: (0, graphql_1.gql) `
|
|
14
|
+
query listInstanceFlowConfigs($id: ID!, $after: String) {
|
|
15
|
+
instance(id: $id) {
|
|
16
|
+
flowConfigs(after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
flow {
|
|
20
|
+
name
|
|
21
|
+
}
|
|
22
|
+
webhookUrl
|
|
23
|
+
}
|
|
24
|
+
pageInfo {
|
|
25
|
+
hasNextPage
|
|
26
|
+
endCursor
|
|
17
27
|
}
|
|
18
|
-
webhookUrl
|
|
19
28
|
}
|
|
20
29
|
}
|
|
21
30
|
}
|
|
31
|
+
`,
|
|
32
|
+
variables: {
|
|
33
|
+
id: instance,
|
|
34
|
+
after: cursor,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
flowConfigs = [...flowConfigs, ...nodes];
|
|
38
|
+
cursor = pageInfo.endCursor;
|
|
39
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
22
40
|
}
|
|
23
|
-
|
|
24
|
-
variables: {
|
|
25
|
-
id: instance,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
core_1.CliUx.ux.table(result.instance.flowConfigs.nodes, {
|
|
41
|
+
core_1.CliUx.ux.table(flowConfigs, {
|
|
29
42
|
id: {
|
|
30
43
|
minWidth: 8,
|
|
31
44
|
extended: true,
|
|
@@ -6,40 +6,62 @@ class ListCommand extends core_1.Command {
|
|
|
6
6
|
async run() {
|
|
7
7
|
const { flags } = await this.parse(ListCommand);
|
|
8
8
|
const { customer, integration } = flags;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
let instances = [];
|
|
10
|
+
let hasNextPage = true;
|
|
11
|
+
let cursor = "";
|
|
12
|
+
while (hasNextPage) {
|
|
13
|
+
const { instances: { nodes, pageInfo }, } = await (0, graphql_1.gqlRequest)({
|
|
14
|
+
document: (0, graphql_1.gql) `
|
|
15
|
+
query listInstances($customer: ID, $integration: ID, $after: String) {
|
|
16
|
+
instances(
|
|
17
|
+
customer: $customer
|
|
18
|
+
integration: $integration
|
|
19
|
+
isSystem: false
|
|
20
|
+
after: $after
|
|
21
|
+
) {
|
|
22
|
+
nodes {
|
|
23
23
|
id
|
|
24
24
|
name
|
|
25
|
+
description
|
|
26
|
+
enabled
|
|
27
|
+
customer {
|
|
28
|
+
id
|
|
29
|
+
name
|
|
30
|
+
externalId
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
pageInfo {
|
|
34
|
+
hasNextPage
|
|
35
|
+
endCursor
|
|
25
36
|
}
|
|
26
37
|
}
|
|
27
38
|
}
|
|
39
|
+
`,
|
|
40
|
+
variables: {
|
|
41
|
+
customer,
|
|
42
|
+
integration,
|
|
43
|
+
after: cursor,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
instances = [...instances, ...nodes];
|
|
47
|
+
cursor = pageInfo.endCursor;
|
|
48
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
28
49
|
}
|
|
29
|
-
|
|
30
|
-
variables: {
|
|
31
|
-
customer,
|
|
32
|
-
integration,
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
core_1.CliUx.ux.table(result.instances.nodes, {
|
|
50
|
+
core_1.CliUx.ux.table(instances, {
|
|
36
51
|
id: {
|
|
37
52
|
minWidth: 8,
|
|
38
53
|
extended: true,
|
|
39
54
|
},
|
|
40
55
|
name: {},
|
|
41
56
|
customer: {
|
|
42
|
-
get: (
|
|
57
|
+
get: ({ customer }) => customer.name,
|
|
58
|
+
},
|
|
59
|
+
customerid: {
|
|
60
|
+
get: ({ customer }) => customer.id,
|
|
61
|
+
extended: true,
|
|
62
|
+
},
|
|
63
|
+
customerExternalId: {
|
|
64
|
+
get: ({ customer }) => customer.externalId || "",
|
|
43
65
|
extended: true,
|
|
44
66
|
},
|
|
45
67
|
description: {},
|
|
@@ -5,26 +5,39 @@ const graphql_1 = require("../../../graphql");
|
|
|
5
5
|
class ListCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
7
|
const { args: { integration }, flags, } = await this.parse(ListCommand);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
flows {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
let flows = [];
|
|
9
|
+
let hasNextPage = true;
|
|
10
|
+
let cursor = "";
|
|
11
|
+
while (hasNextPage) {
|
|
12
|
+
const { integration: { flows: { nodes, pageInfo }, }, } = await (0, graphql_1.gqlRequest)({
|
|
13
|
+
document: (0, graphql_1.gql) `
|
|
14
|
+
query listIntegrationFlows($id: ID!, $after: String) {
|
|
15
|
+
integration(id: $id) {
|
|
16
|
+
flows(after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
name
|
|
20
|
+
description
|
|
21
|
+
testUrl
|
|
22
|
+
}
|
|
23
|
+
pageInfo {
|
|
24
|
+
hasNextPage
|
|
25
|
+
endCursor
|
|
26
|
+
}
|
|
18
27
|
}
|
|
19
28
|
}
|
|
20
29
|
}
|
|
30
|
+
`,
|
|
31
|
+
variables: {
|
|
32
|
+
id: integration,
|
|
33
|
+
after: cursor,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
flows = [...flows, ...nodes];
|
|
37
|
+
cursor = pageInfo.endCursor;
|
|
38
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
21
39
|
}
|
|
22
|
-
|
|
23
|
-
variables: {
|
|
24
|
-
id: integration,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
core_1.CliUx.ux.table(result.integration.flows.nodes, {
|
|
40
|
+
core_1.CliUx.ux.table(flows, {
|
|
28
41
|
id: {
|
|
29
42
|
minWidth: 8,
|
|
30
43
|
extended: true,
|
|
@@ -6,24 +6,39 @@ class ListCommand extends core_1.Command {
|
|
|
6
6
|
async run() {
|
|
7
7
|
const { flags } = await this.parse(ListCommand);
|
|
8
8
|
const { showAllVersions } = flags;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
nodes {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
let integrations = [];
|
|
10
|
+
let hasNextPage = true;
|
|
11
|
+
let cursor = "";
|
|
12
|
+
while (hasNextPage) {
|
|
13
|
+
const { integrations: { nodes, pageInfo }, } = await (0, graphql_1.gqlRequest)({
|
|
14
|
+
document: (0, graphql_1.gql) `
|
|
15
|
+
query listIntegrations($showAllVersions: Boolean, $after: String) {
|
|
16
|
+
integrations(allVersions: $showAllVersions, after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
name
|
|
20
|
+
description
|
|
21
|
+
versionNumber
|
|
22
|
+
labels
|
|
23
|
+
category
|
|
24
|
+
}
|
|
25
|
+
pageInfo {
|
|
26
|
+
hasNextPage
|
|
27
|
+
endCursor
|
|
28
|
+
}
|
|
18
29
|
}
|
|
19
30
|
}
|
|
31
|
+
`,
|
|
32
|
+
variables: {
|
|
33
|
+
showAllVersions,
|
|
34
|
+
after: cursor,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
integrations = [...integrations, ...nodes];
|
|
38
|
+
cursor = pageInfo.endCursor;
|
|
39
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
20
40
|
}
|
|
21
|
-
|
|
22
|
-
variables: {
|
|
23
|
-
showAllVersions,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
core_1.CliUx.ux.table(result.integrations.nodes, {
|
|
41
|
+
core_1.CliUx.ux.table(integrations, {
|
|
27
42
|
id: {
|
|
28
43
|
minWidth: 8,
|
|
29
44
|
extended: true,
|
|
@@ -31,6 +46,8 @@ class ListCommand extends core_1.Command {
|
|
|
31
46
|
name: {},
|
|
32
47
|
description: {},
|
|
33
48
|
versionNumber: { header: "Version" },
|
|
49
|
+
labels: { extended: true },
|
|
50
|
+
category: { extended: true },
|
|
34
51
|
}, { ...flags });
|
|
35
52
|
}
|
|
36
53
|
}
|
|
@@ -5,28 +5,53 @@ const graphql_1 = require("../../../graphql");
|
|
|
5
5
|
class ListCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
7
|
const { flags } = await this.parse(ListCommand);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
users {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
let customerUsers = [];
|
|
9
|
+
let hasNextPage = true;
|
|
10
|
+
let cursor = "";
|
|
11
|
+
while (hasNextPage) {
|
|
12
|
+
const { organization: { users: { nodes, pageInfo }, }, } = await (0, graphql_1.gqlRequest)({
|
|
13
|
+
document: (0, graphql_1.gql) `
|
|
14
|
+
query listUsers($after: String) {
|
|
15
|
+
organization {
|
|
16
|
+
users(after: $after) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
name
|
|
20
|
+
email
|
|
21
|
+
externalId
|
|
22
|
+
phone
|
|
23
|
+
role {
|
|
24
|
+
name
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
pageInfo {
|
|
28
|
+
hasNextPage
|
|
29
|
+
endCursor
|
|
30
|
+
}
|
|
17
31
|
}
|
|
18
32
|
}
|
|
19
33
|
}
|
|
34
|
+
`,
|
|
35
|
+
variables: { after: cursor },
|
|
36
|
+
});
|
|
37
|
+
customerUsers = [...customerUsers, ...nodes];
|
|
38
|
+
cursor = pageInfo.endCursor;
|
|
39
|
+
hasNextPage = pageInfo.hasNextPage;
|
|
20
40
|
}
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
core_1.CliUx.ux.table(result.organization.users.nodes, {
|
|
41
|
+
core_1.CliUx.ux.table(customerUsers, {
|
|
24
42
|
id: {
|
|
25
43
|
minWidth: 8,
|
|
26
44
|
extended: true,
|
|
27
45
|
},
|
|
28
46
|
name: {},
|
|
29
47
|
email: {},
|
|
48
|
+
phone: {},
|
|
49
|
+
role: {
|
|
50
|
+
get: ({ role }) => role.name,
|
|
51
|
+
},
|
|
52
|
+
externalId: {
|
|
53
|
+
get: ({ externalId }) => externalId || "",
|
|
54
|
+
},
|
|
30
55
|
}, { ...flags });
|
|
31
56
|
}
|
|
32
57
|
}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.uploadConnectionIcons = exports.uploadFile = exports.publishDefinition = exports.confirmPublish = exports.
|
|
6
|
+
exports.uploadConnectionIcons = exports.uploadFile = exports.publishDefinition = exports.confirmPublish = exports.checkPackageSignature = exports.createComponentPackage = exports.validateDefinition = exports.loadEntrypoint = exports.seekComponentPackageDistDirectory = void 0;
|
|
7
7
|
const core_1 = require("@oclif/core");
|
|
8
8
|
const fs_1 = require("../../fs");
|
|
9
9
|
const path_1 = require("path");
|
|
@@ -69,7 +69,7 @@ const createComponentPackage = async () => {
|
|
|
69
69
|
return pathPromise;
|
|
70
70
|
};
|
|
71
71
|
exports.createComponentPackage = createComponentPackage;
|
|
72
|
-
const
|
|
72
|
+
const checkPackageSignature = async ({ key }, packagePath) => {
|
|
73
73
|
// Retrieve the existing signature of the component if it exists.
|
|
74
74
|
const result = await (0, graphql_1.gqlRequest)({
|
|
75
75
|
document: (0, graphql_1.gql) `
|
|
@@ -93,7 +93,7 @@ const checkSignature = async ({ key }, packagePath) => {
|
|
|
93
93
|
.digest("hex");
|
|
94
94
|
return existingSignature === packageSignature;
|
|
95
95
|
};
|
|
96
|
-
exports.
|
|
96
|
+
exports.checkPackageSignature = checkPackageSignature;
|
|
97
97
|
const confirmPublish = async ({ display: { label, description } }, confirm = true) => {
|
|
98
98
|
if (!confirm)
|
|
99
99
|
return;
|