opal-security 3.2.2 → 3.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/README.md +22 -22
- package/lib/commands/login.js +11 -11
- package/lib/commands/request/get.js +2 -1
- package/lib/graphql/graphql.d.ts +855 -158
- package/lib/graphql/graphql.js +107 -10
- package/lib/handler.d.ts +6 -6
- package/lib/handler.js +1 -1
- package/lib/labels.js +3 -0
- package/lib/lib/apollo.d.ts +3 -3
- package/lib/lib/apollo.js +24 -47
- package/lib/lib/request/api/mutations/create-request.d.ts +2 -2
- package/lib/lib/request/api/queries/apps.d.ts +2 -2
- package/lib/lib/request/api/queries/assets.d.ts +3 -3
- package/lib/lib/request/api/queries/assets.js +5 -5
- package/lib/lib/request/api/queries/request-defaults.d.ts +2 -2
- package/lib/lib/request/api/queries/request-defaults.js +2 -1
- package/lib/lib/request/api/queries/requests.d.ts +4 -4
- package/lib/lib/request/api/queries/roles.d.ts +3 -3
- package/lib/lib/request/api/queries/roles.js +9 -9
- package/lib/lib/request/displays.d.ts +3 -3
- package/lib/lib/request/displays.js +15 -15
- package/lib/lib/request/prompts/apps-prompt.d.ts +2 -2
- package/lib/lib/request/prompts/asset-prompt.d.ts +3 -3
- package/lib/lib/request/prompts/asset-prompt.js +27 -43
- package/lib/lib/request/prompts/duration-prompt.js +3 -0
- package/lib/lib/request/prompts/index.d.ts +0 -1
- package/lib/lib/request/prompts/index.js +1 -2
- package/lib/lib/request/prompts/role-prompt.d.ts +2 -2
- package/lib/lib/request/prompts/role-prompt.js +7 -16
- package/lib/lib/request/request-utils.d.ts +7 -8
- package/lib/lib/request/request-utils.js +17 -16
- package/lib/lib/resources.d.ts +1 -1
- package/lib/lib/sessions.d.ts +1 -1
- package/lib/lib/sessions.js +3 -2
- package/oclif.manifest.json +1 -1
- package/package.json +4 -3
package/lib/lib/resources.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Command } from "@oclif/core";
|
|
2
|
-
import type { ResourceAccessLevel, ResourceAccessLevelInput } from "../
|
|
2
|
+
import type { ResourceAccessLevel, ResourceAccessLevelInput } from "../graphql/graphql";
|
|
3
3
|
export type ResourceInfo = {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
package/lib/lib/sessions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Command } from "@oclif/core";
|
|
2
|
-
import type { ResourceAccessLevelInput } from "../
|
|
2
|
+
import type { ResourceAccessLevelInput } from "../graphql/graphql";
|
|
3
3
|
export declare const getOrCreateSession: (command: Command, resourceId: string, accessLevel: ResourceAccessLevelInput, sessionId: string | undefined, metadataFragment: string, wantNewSession?: boolean) => Promise<any>;
|
|
4
4
|
export declare const getSessionExpirationMessage: (session: any) => string;
|
package/lib/lib/sessions.js
CHANGED
|
@@ -118,6 +118,7 @@ const openBrowserAndPollForSession = async (command, message, resourceId, access
|
|
|
118
118
|
return session;
|
|
119
119
|
};
|
|
120
120
|
const createSession = async (command, resourceId, accessLevel, sessionId, metadataFragment, wantNewSession) => {
|
|
121
|
+
var _a, _b, _c, _d;
|
|
121
122
|
const { resp, error } = await (0, handler_1.runMutation)({
|
|
122
123
|
command: command,
|
|
123
124
|
query: CreateSessionDocument.replace("METADATA_FRAGMENT", metadataFragment),
|
|
@@ -130,9 +131,9 @@ const createSession = async (command, resourceId, accessLevel, sessionId, metada
|
|
|
130
131
|
if (error) {
|
|
131
132
|
return (0, apollo_1.handleError)(command, error);
|
|
132
133
|
}
|
|
133
|
-
switch (resp === null || resp === void 0 ? void 0 : resp.data.createSession.__typename) {
|
|
134
|
+
switch ((_b = (_a = resp === null || resp === void 0 ? void 0 : resp.data) === null || _a === void 0 ? void 0 : _a.createSession) === null || _b === void 0 ? void 0 : _b.__typename) {
|
|
134
135
|
case "CreateSessionResult": {
|
|
135
|
-
return resp.data.createSession.session;
|
|
136
|
+
return (_d = (_c = resp.data) === null || _c === void 0 ? void 0 : _c.createSession) === null || _d === void 0 ? void 0 : _d.session;
|
|
136
137
|
}
|
|
137
138
|
case "MfaInvalidError": {
|
|
138
139
|
return openBrowserAndPollForSession(command, "❗ MFA validation needed. Please connect via browser. Opening browser and awaiting validation...", resourceId, accessLevel.accessLevelRemoteId, sessionId, metadataFragment, wantNewSession);
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opal-security",
|
|
3
3
|
"description": "Opal allows you to centrally manage access to all of your sensitive systems.",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.4",
|
|
5
5
|
"author": "Stephen Cobbe",
|
|
6
6
|
"bin": {
|
|
7
7
|
"opal": "./bin/run"
|
|
8
8
|
},
|
|
9
9
|
"bugs": "https://github.com/opalsecurity/opal-cli/issues",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@apollo/client": "^
|
|
11
|
+
"@apollo/client": "^4.0.4",
|
|
12
12
|
"@oclif/core": "^3.19.3",
|
|
13
13
|
"@oclif/plugin-autocomplete": "^1.4.6",
|
|
14
14
|
"@oclif/plugin-help": "^5.2.20",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"chalk": "^2.4.2",
|
|
18
18
|
"cli-table3": "^0.6.5",
|
|
19
19
|
"enquirer": "^2.4.1",
|
|
20
|
-
"graphql": "^
|
|
20
|
+
"graphql": "^16.11.0",
|
|
21
21
|
"inquirer": "^8.2.6",
|
|
22
22
|
"inquirer-autocomplete-prompt": "^2.0.1",
|
|
23
23
|
"keychain": "^1.5.0",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"open": "^8.0.4",
|
|
28
28
|
"openid-client": "^5.6.5",
|
|
29
29
|
"prettyjson": "^1.2.1",
|
|
30
|
+
"rxjs": "^7.8.2",
|
|
30
31
|
"semver": "^7.5.4",
|
|
31
32
|
"tslib": "^2.8.1"
|
|
32
33
|
},
|