altair-graphql-core 8.4.0 → 8.4.2
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/.turbo/turbo-bootstrap.log +4 -2
- package/build/cjs/identity/providers.d.ts +8 -0
- package/build/cjs/identity/providers.js +20 -0
- package/build/cjs/origins.js +0 -1
- package/build/cjs/request/adapters.spec.js +4 -4
- package/build/cjs/request/handlers/action-cable.js +1 -1
- package/build/cjs/request/handlers/http.js +1 -1
- package/build/cjs/request/handlers/http.spec.js +16 -16
- package/build/cjs/request/types.d.ts +1 -1
- package/build/cjs/request/utils.js +1 -1
- package/build/cjs/types/state/settings.interfaces.d.ts +7 -0
- package/build/cjs/utils/dot-notation.js +8 -1
- package/build/cjs/utils/dot-notation.spec.js +14 -0
- package/build/identity/providers.d.ts +8 -0
- package/build/identity/providers.js +16 -0
- package/build/origins.js +0 -1
- package/build/request/adapters.spec.js +4 -4
- package/build/request/handlers/action-cable.js +1 -1
- package/build/request/handlers/http.js +1 -1
- package/build/request/handlers/http.spec.js +16 -16
- package/build/request/types.d.ts +1 -1
- package/build/request/utils.js +1 -1
- package/build/typegen/partial_settings.schema.json +9 -0
- package/build/typegen/settings.schema.json +9 -0
- package/build/typegen/validate-partial-settings.js +1 -1
- package/build/typegen/validate-settings.js +1 -1
- package/build/types/state/settings.interfaces.d.ts +7 -0
- package/build/utils/dot-notation.js +8 -1
- package/build/utils/dot-notation.spec.js +14 -0
- package/package.json +9 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> altair-graphql-core@8.4.
|
|
2
|
+
> altair-graphql-core@8.4.2 bootstrap /home/runner/work/altair/altair/packages/altair-core
|
|
3
3
|
> pnpm build
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> altair-graphql-core@8.4.
|
|
6
|
+
> altair-graphql-core@8.4.2 build /home/runner/work/altair/altair/packages/altair-core
|
|
7
7
|
> node ./scripts/build.js
|
|
8
8
|
|
|
9
9
|
Generating types for partial-settings ...
|
|
@@ -39,6 +39,7 @@ Edited file: /home/runner/work/altair/altair/packages/altair-core/build/cjs/conf
|
|
|
39
39
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/cjs/crx/index.js
|
|
40
40
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/cjs/evaluator/events.js
|
|
41
41
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/cjs/evaluator/worker.js
|
|
42
|
+
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/cjs/identity/providers.js
|
|
42
43
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/cjs/index.js
|
|
43
44
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/cjs/oauth2/client.js
|
|
44
45
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/cjs/oauth2/client.spec.js
|
|
@@ -144,6 +145,7 @@ Edited file: /home/runner/work/altair/altair/packages/altair-core/build/config/u
|
|
|
144
145
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/crx/index.js
|
|
145
146
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/evaluator/events.js
|
|
146
147
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/evaluator/worker.js
|
|
148
|
+
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/identity/providers.js
|
|
147
149
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/index.js
|
|
148
150
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/oauth2/client.js
|
|
149
151
|
Edited file: /home/runner/work/altair/altair/packages/altair-core/build/oauth2/client.spec.js
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const IDENTITY_PROVIDERS: {
|
|
2
|
+
readonly GOOGLE: "GOOGLE";
|
|
3
|
+
readonly GITHUB: "GITHUB";
|
|
4
|
+
};
|
|
5
|
+
type IdentityProvider = (typeof IDENTITY_PROVIDERS)[keyof typeof IDENTITY_PROVIDERS];
|
|
6
|
+
export { IDENTITY_PROVIDERS, IdentityProvider };
|
|
7
|
+
export declare function getPopupUrl(url: string, nonce: string, source: string, provider: IdentityProvider): string;
|
|
8
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IDENTITY_PROVIDERS = void 0;
|
|
4
|
+
exports.getPopupUrl = getPopupUrl;
|
|
5
|
+
// TODO: For some reason, importing from altair-db in login-redirect package causes issues. Strangely this only seems to affect login-redirect package.
|
|
6
|
+
// Getting src/login-redirect.ts (4:2): "IDENTITY_PROVIDERS" is not exported by "../altair-db/build/client.js", imported by "src/login-redirect.ts".
|
|
7
|
+
// Will investigate later.
|
|
8
|
+
const IDENTITY_PROVIDERS = {
|
|
9
|
+
GOOGLE: 'GOOGLE',
|
|
10
|
+
GITHUB: 'GITHUB',
|
|
11
|
+
};
|
|
12
|
+
exports.IDENTITY_PROVIDERS = IDENTITY_PROVIDERS;
|
|
13
|
+
function getPopupUrl(url, nonce, source, provider) {
|
|
14
|
+
const urlObj = new URL(url);
|
|
15
|
+
urlObj.searchParams.append('nonce', nonce);
|
|
16
|
+
urlObj.searchParams.append('sc', source);
|
|
17
|
+
urlObj.searchParams.append('provider', provider);
|
|
18
|
+
return urlObj.href;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=providers.js.map
|
package/build/cjs/origins.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.validOrigins = [
|
|
|
7
7
|
'moz-extension://567d7e27-43b8-994e-ab50-e770fa7eab4b', // firefox extension
|
|
8
8
|
'http://localhost:4200', // local altair app
|
|
9
9
|
'https://dash.altairgraphql.dev',
|
|
10
|
-
'https://altair-gql.sirmuel.design',
|
|
11
10
|
'https://web.altairgraphql.dev',
|
|
12
11
|
'altair://-',
|
|
13
12
|
];
|
|
@@ -42,7 +42,7 @@ class TestSubscriptionProvider extends subscription_provider_1.SubscriptionProvi
|
|
|
42
42
|
ok: true,
|
|
43
43
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
44
44
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
45
|
-
|
|
45
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
46
46
|
status: 200,
|
|
47
47
|
statusText: 'OK',
|
|
48
48
|
url: 'http://localhost:3000/graphql',
|
|
@@ -83,7 +83,7 @@ class TestSubscriptionProvider extends subscription_provider_1.SubscriptionProvi
|
|
|
83
83
|
ok: true,
|
|
84
84
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
85
85
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
86
|
-
|
|
86
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
87
87
|
status: 200,
|
|
88
88
|
statusText: 'OK',
|
|
89
89
|
url: 'http://localhost:3000/graphql',
|
|
@@ -94,7 +94,7 @@ class TestSubscriptionProvider extends subscription_provider_1.SubscriptionProvi
|
|
|
94
94
|
ok: true,
|
|
95
95
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
96
96
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
97
|
-
|
|
97
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
98
98
|
status: 200,
|
|
99
99
|
statusText: 'OK',
|
|
100
100
|
url: 'http://localhost:3000/graphql',
|
|
@@ -137,7 +137,7 @@ class TestSubscriptionProvider extends subscription_provider_1.SubscriptionProvi
|
|
|
137
137
|
ok: true,
|
|
138
138
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
139
139
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
140
|
-
|
|
140
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
141
141
|
status: 200,
|
|
142
142
|
statusText: 'OK',
|
|
143
143
|
url: 'http://localhost:3000/graphql',
|
|
@@ -32,7 +32,7 @@ class ActionCableRequestHandler {
|
|
|
32
32
|
url: request.url,
|
|
33
33
|
requestStartTimestamp,
|
|
34
34
|
requestEndTimestamp,
|
|
35
|
-
|
|
35
|
+
responseTimeMs: requestEndTimestamp - requestStartTimestamp,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
if (!payload.more) {
|
|
@@ -95,7 +95,7 @@ class HttpRequestHandler {
|
|
|
95
95
|
requestStartTimestamp: requestStartTime,
|
|
96
96
|
requestEndTimestamp: requestEndTime,
|
|
97
97
|
// this is redundant data
|
|
98
|
-
|
|
98
|
+
responseTimeMs: requestEndTime - requestStartTime,
|
|
99
99
|
};
|
|
100
100
|
// Send the data to the observer
|
|
101
101
|
observer.next(res);
|
|
@@ -69,7 +69,7 @@ const testObserver = (o) => {
|
|
|
69
69
|
url: 'http://localhost:3000/graphql',
|
|
70
70
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
71
71
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
72
|
-
|
|
72
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
73
73
|
}),
|
|
74
74
|
]);
|
|
75
75
|
});
|
|
@@ -107,7 +107,7 @@ const testObserver = (o) => {
|
|
|
107
107
|
url: 'http://localhost:3000/graphql?query=query+%7B+hello+%7D&variables=%7B%7D&operationName=hello',
|
|
108
108
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
109
109
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
110
|
-
|
|
110
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
111
111
|
}),
|
|
112
112
|
]);
|
|
113
113
|
});
|
|
@@ -161,7 +161,7 @@ const testObserver = (o) => {
|
|
|
161
161
|
url: 'http://localhost:3000/graphql',
|
|
162
162
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
163
163
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
164
|
-
|
|
164
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
165
165
|
}),
|
|
166
166
|
]);
|
|
167
167
|
});
|
|
@@ -216,7 +216,7 @@ const testObserver = (o) => {
|
|
|
216
216
|
url: 'http://localhost:3000/graphql',
|
|
217
217
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
218
218
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
219
|
-
|
|
219
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
220
220
|
}),
|
|
221
221
|
]);
|
|
222
222
|
});
|
|
@@ -245,7 +245,7 @@ const testObserver = (o) => {
|
|
|
245
245
|
url: 'http://localhost:3000/graphql',
|
|
246
246
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
247
247
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
248
|
-
|
|
248
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
249
249
|
}),
|
|
250
250
|
]);
|
|
251
251
|
});
|
|
@@ -285,7 +285,7 @@ const testObserver = (o) => {
|
|
|
285
285
|
url: 'http://localhost:3000/graphql?query=query+%7B+hello+%7D&variables=%7B%7D&operationName=hello',
|
|
286
286
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
287
287
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
288
|
-
|
|
288
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
289
289
|
}),
|
|
290
290
|
]);
|
|
291
291
|
});
|
|
@@ -385,7 +385,7 @@ const testObserver = (o) => {
|
|
|
385
385
|
url: 'http://localhost:3000/simple-stream',
|
|
386
386
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
387
387
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
388
|
-
|
|
388
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
389
389
|
}),
|
|
390
390
|
globals_1.expect.objectContaining({
|
|
391
391
|
ok: true,
|
|
@@ -395,7 +395,7 @@ const testObserver = (o) => {
|
|
|
395
395
|
url: 'http://localhost:3000/simple-stream',
|
|
396
396
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
397
397
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
398
|
-
|
|
398
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
399
399
|
}),
|
|
400
400
|
globals_1.expect.objectContaining({
|
|
401
401
|
ok: true,
|
|
@@ -405,7 +405,7 @@ const testObserver = (o) => {
|
|
|
405
405
|
url: 'http://localhost:3000/simple-stream',
|
|
406
406
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
407
407
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
408
|
-
|
|
408
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
409
409
|
}),
|
|
410
410
|
]);
|
|
411
411
|
});
|
|
@@ -505,7 +505,7 @@ const testObserver = (o) => {
|
|
|
505
505
|
url: 'http://localhost:3000/multipart-stream',
|
|
506
506
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
507
507
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
508
|
-
|
|
508
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
509
509
|
}),
|
|
510
510
|
globals_1.expect.objectContaining({
|
|
511
511
|
ok: true,
|
|
@@ -515,7 +515,7 @@ const testObserver = (o) => {
|
|
|
515
515
|
url: 'http://localhost:3000/multipart-stream',
|
|
516
516
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
517
517
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
518
|
-
|
|
518
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
519
519
|
}),
|
|
520
520
|
globals_1.expect.objectContaining({
|
|
521
521
|
ok: true,
|
|
@@ -525,7 +525,7 @@ const testObserver = (o) => {
|
|
|
525
525
|
url: 'http://localhost:3000/multipart-stream',
|
|
526
526
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
527
527
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
528
|
-
|
|
528
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
529
529
|
}),
|
|
530
530
|
globals_1.expect.objectContaining({
|
|
531
531
|
ok: true,
|
|
@@ -535,7 +535,7 @@ const testObserver = (o) => {
|
|
|
535
535
|
url: 'http://localhost:3000/multipart-stream',
|
|
536
536
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
537
537
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
538
|
-
|
|
538
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
539
539
|
}),
|
|
540
540
|
globals_1.expect.objectContaining({
|
|
541
541
|
ok: true,
|
|
@@ -545,7 +545,7 @@ const testObserver = (o) => {
|
|
|
545
545
|
url: 'http://localhost:3000/multipart-stream',
|
|
546
546
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
547
547
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
548
|
-
|
|
548
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
549
549
|
}),
|
|
550
550
|
]);
|
|
551
551
|
});
|
|
@@ -599,7 +599,7 @@ const testObserver = (o) => {
|
|
|
599
599
|
url: 'http://localhost:3000/multipart-stream-2',
|
|
600
600
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
601
601
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
602
|
-
|
|
602
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
603
603
|
}),
|
|
604
604
|
globals_1.expect.objectContaining({
|
|
605
605
|
ok: true,
|
|
@@ -609,7 +609,7 @@ const testObserver = (o) => {
|
|
|
609
609
|
url: 'http://localhost:3000/multipart-stream-2',
|
|
610
610
|
requestStartTimestamp: globals_1.expect.any(Number),
|
|
611
611
|
requestEndTimestamp: globals_1.expect.any(Number),
|
|
612
|
-
|
|
612
|
+
responseTimeMs: globals_1.expect.any(Number),
|
|
613
613
|
}),
|
|
614
614
|
]);
|
|
615
615
|
});
|
|
@@ -36,7 +36,7 @@ export interface GraphQLResponseData {
|
|
|
36
36
|
/**
|
|
37
37
|
* The time taken to get the response in milliseconds
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
responseTimeMs: number;
|
|
40
40
|
}
|
|
41
41
|
export interface GraphQLRequestHandler {
|
|
42
42
|
handle(request: GraphQLRequestOptions): Observable<GraphQLResponseData>;
|
|
@@ -14,7 +14,7 @@ const simpleResponseObserver = (subscriber, url, requestStartTimestamp) => {
|
|
|
14
14
|
url: url,
|
|
15
15
|
requestStartTimestamp,
|
|
16
16
|
requestEndTimestamp,
|
|
17
|
-
|
|
17
|
+
responseTimeMs: requestEndTimestamp - requestStartTimestamp,
|
|
18
18
|
});
|
|
19
19
|
},
|
|
20
20
|
error: (...args) => subscriber.error(...args),
|
|
@@ -132,6 +132,13 @@ export interface SettingsState {
|
|
|
132
132
|
* @default []
|
|
133
133
|
*/
|
|
134
134
|
'script.allowedCookies'?: string[];
|
|
135
|
+
/**
|
|
136
|
+
* List of local storage keys to be accessible in the pre-request script.
|
|
137
|
+
* These will be made available read-only via the `storage` API in the script context.
|
|
138
|
+
* @example ['key1', 'key2']
|
|
139
|
+
* @default []
|
|
140
|
+
*/
|
|
141
|
+
'script.allowedLocalStorageKeys'?: string[];
|
|
135
142
|
/**
|
|
136
143
|
* Enable the scrollbar in the tab list
|
|
137
144
|
*/
|
|
@@ -26,7 +26,14 @@ function setByDotNotation(obj, path, value, merge = false) {
|
|
|
26
26
|
return undefined;
|
|
27
27
|
}
|
|
28
28
|
if (typeof path === 'string') {
|
|
29
|
-
|
|
29
|
+
const segments = path.split('.').map(parseDotNotationKey);
|
|
30
|
+
if (segments.some(segment => segment === '__proto__' || segment === 'constructor' || segment === 'prototype')) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
return setByDotNotation(obj, segments, value, merge);
|
|
34
|
+
}
|
|
35
|
+
if (Array.isArray(path) && path.some(segment => segment === '__proto__' || segment === 'constructor' || segment === 'prototype')) {
|
|
36
|
+
return undefined;
|
|
30
37
|
}
|
|
31
38
|
const currentPath = path[0];
|
|
32
39
|
if (typeof currentPath === 'undefined') {
|
|
@@ -33,6 +33,20 @@ const dot_notation_1 = require("./dot-notation");
|
|
|
33
33
|
// set object inside existing object with merge
|
|
34
34
|
(0, dot_notation_1.setByDotNotation)(existingObj, 'b.e', { h: 11 }, true);
|
|
35
35
|
(0, globals_1.expect)(existingObj).toEqual({ a: 1, b: { c: 2, e: { g: 10, h: 11 } } });
|
|
36
|
+
// prevent prototype pollution
|
|
37
|
+
const polluted = {};
|
|
38
|
+
(0, dot_notation_1.setByDotNotation)(polluted, '__proto__.polluted', 'polluted');
|
|
39
|
+
(0, globals_1.expect)(polluted.polluted).toBeUndefined();
|
|
40
|
+
(0, globals_1.expect)({}.polluted).toBeUndefined();
|
|
41
|
+
(0, dot_notation_1.setByDotNotation)(polluted, 'constructor.prototype.polluted', 'polluted');
|
|
42
|
+
(0, globals_1.expect)(polluted.polluted).toBeUndefined();
|
|
43
|
+
(0, globals_1.expect)({}.polluted).toBeUndefined();
|
|
44
|
+
// ensure valid paths with substrings are not blocked
|
|
45
|
+
const validObj = {};
|
|
46
|
+
(0, dot_notation_1.setByDotNotation)(validObj, 'myconstructor', 'is-ok');
|
|
47
|
+
(0, globals_1.expect)(validObj.myconstructor).toBe('is-ok');
|
|
48
|
+
(0, dot_notation_1.setByDotNotation)(validObj, 'some_prototype_value', 'is-ok');
|
|
49
|
+
(0, globals_1.expect)(validObj.some_prototype_value).toBe('is-ok');
|
|
36
50
|
});
|
|
37
51
|
});
|
|
38
52
|
//# sourceMappingURL=dot-notation.spec.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const IDENTITY_PROVIDERS: {
|
|
2
|
+
readonly GOOGLE: "GOOGLE";
|
|
3
|
+
readonly GITHUB: "GITHUB";
|
|
4
|
+
};
|
|
5
|
+
type IdentityProvider = (typeof IDENTITY_PROVIDERS)[keyof typeof IDENTITY_PROVIDERS];
|
|
6
|
+
export { IDENTITY_PROVIDERS, IdentityProvider };
|
|
7
|
+
export declare function getPopupUrl(url: string, nonce: string, source: string, provider: IdentityProvider): string;
|
|
8
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// TODO: For some reason, importing from altair-db in login-redirect package causes issues. Strangely this only seems to affect login-redirect package.
|
|
2
|
+
// Getting src/login-redirect.ts (4:2): "IDENTITY_PROVIDERS" is not exported by "../altair-db/build/client.js", imported by "src/login-redirect.ts".
|
|
3
|
+
// Will investigate later.
|
|
4
|
+
const IDENTITY_PROVIDERS = {
|
|
5
|
+
GOOGLE: 'GOOGLE',
|
|
6
|
+
GITHUB: 'GITHUB',
|
|
7
|
+
};
|
|
8
|
+
export { IDENTITY_PROVIDERS };
|
|
9
|
+
export function getPopupUrl(url, nonce, source, provider) {
|
|
10
|
+
const urlObj = new URL(url);
|
|
11
|
+
urlObj.searchParams.append('nonce', nonce);
|
|
12
|
+
urlObj.searchParams.append('sc', source);
|
|
13
|
+
urlObj.searchParams.append('provider', provider);
|
|
14
|
+
return urlObj.href;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=providers.js.map
|
package/build/origins.js
CHANGED
|
@@ -4,7 +4,6 @@ export const validOrigins = [
|
|
|
4
4
|
'moz-extension://567d7e27-43b8-994e-ab50-e770fa7eab4b', // firefox extension
|
|
5
5
|
'http://localhost:4200', // local altair app
|
|
6
6
|
'https://dash.altairgraphql.dev',
|
|
7
|
-
'https://altair-gql.sirmuel.design',
|
|
8
7
|
'https://web.altairgraphql.dev',
|
|
9
8
|
'altair://-',
|
|
10
9
|
];
|
|
@@ -40,7 +40,7 @@ describe('SubscriptionProviderRequestHandlerAdapter', () => {
|
|
|
40
40
|
ok: true,
|
|
41
41
|
requestEndTimestamp: expect.any(Number),
|
|
42
42
|
requestStartTimestamp: expect.any(Number),
|
|
43
|
-
|
|
43
|
+
responseTimeMs: expect.any(Number),
|
|
44
44
|
status: 200,
|
|
45
45
|
statusText: 'OK',
|
|
46
46
|
url: 'http://localhost:3000/graphql',
|
|
@@ -81,7 +81,7 @@ describe('SubscriptionProviderRequestHandlerAdapter', () => {
|
|
|
81
81
|
ok: true,
|
|
82
82
|
requestEndTimestamp: expect.any(Number),
|
|
83
83
|
requestStartTimestamp: expect.any(Number),
|
|
84
|
-
|
|
84
|
+
responseTimeMs: expect.any(Number),
|
|
85
85
|
status: 200,
|
|
86
86
|
statusText: 'OK',
|
|
87
87
|
url: 'http://localhost:3000/graphql',
|
|
@@ -92,7 +92,7 @@ describe('SubscriptionProviderRequestHandlerAdapter', () => {
|
|
|
92
92
|
ok: true,
|
|
93
93
|
requestEndTimestamp: expect.any(Number),
|
|
94
94
|
requestStartTimestamp: expect.any(Number),
|
|
95
|
-
|
|
95
|
+
responseTimeMs: expect.any(Number),
|
|
96
96
|
status: 200,
|
|
97
97
|
statusText: 'OK',
|
|
98
98
|
url: 'http://localhost:3000/graphql',
|
|
@@ -135,7 +135,7 @@ describe('SubscriptionProviderRequestHandlerAdapter', () => {
|
|
|
135
135
|
ok: true,
|
|
136
136
|
requestEndTimestamp: expect.any(Number),
|
|
137
137
|
requestStartTimestamp: expect.any(Number),
|
|
138
|
-
|
|
138
|
+
responseTimeMs: expect.any(Number),
|
|
139
139
|
status: 200,
|
|
140
140
|
statusText: 'OK',
|
|
141
141
|
url: 'http://localhost:3000/graphql',
|
|
@@ -26,7 +26,7 @@ export class ActionCableRequestHandler {
|
|
|
26
26
|
url: request.url,
|
|
27
27
|
requestStartTimestamp,
|
|
28
28
|
requestEndTimestamp,
|
|
29
|
-
|
|
29
|
+
responseTimeMs: requestEndTimestamp - requestStartTimestamp,
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
if (!payload.more) {
|
|
@@ -89,7 +89,7 @@ export class HttpRequestHandler {
|
|
|
89
89
|
requestStartTimestamp: requestStartTime,
|
|
90
90
|
requestEndTimestamp: requestEndTime,
|
|
91
91
|
// this is redundant data
|
|
92
|
-
|
|
92
|
+
responseTimeMs: requestEndTime - requestStartTime,
|
|
93
93
|
};
|
|
94
94
|
// Send the data to the observer
|
|
95
95
|
observer.next(res);
|
|
@@ -67,7 +67,7 @@ describe('HTTP handler', () => {
|
|
|
67
67
|
url: 'http://localhost:3000/graphql',
|
|
68
68
|
requestStartTimestamp: expect.any(Number),
|
|
69
69
|
requestEndTimestamp: expect.any(Number),
|
|
70
|
-
|
|
70
|
+
responseTimeMs: expect.any(Number),
|
|
71
71
|
}),
|
|
72
72
|
]);
|
|
73
73
|
});
|
|
@@ -105,7 +105,7 @@ describe('HTTP handler', () => {
|
|
|
105
105
|
url: 'http://localhost:3000/graphql?query=query+%7B+hello+%7D&variables=%7B%7D&operationName=hello',
|
|
106
106
|
requestStartTimestamp: expect.any(Number),
|
|
107
107
|
requestEndTimestamp: expect.any(Number),
|
|
108
|
-
|
|
108
|
+
responseTimeMs: expect.any(Number),
|
|
109
109
|
}),
|
|
110
110
|
]);
|
|
111
111
|
});
|
|
@@ -159,7 +159,7 @@ describe('HTTP handler', () => {
|
|
|
159
159
|
url: 'http://localhost:3000/graphql',
|
|
160
160
|
requestStartTimestamp: expect.any(Number),
|
|
161
161
|
requestEndTimestamp: expect.any(Number),
|
|
162
|
-
|
|
162
|
+
responseTimeMs: expect.any(Number),
|
|
163
163
|
}),
|
|
164
164
|
]);
|
|
165
165
|
});
|
|
@@ -214,7 +214,7 @@ describe('HTTP handler', () => {
|
|
|
214
214
|
url: 'http://localhost:3000/graphql',
|
|
215
215
|
requestStartTimestamp: expect.any(Number),
|
|
216
216
|
requestEndTimestamp: expect.any(Number),
|
|
217
|
-
|
|
217
|
+
responseTimeMs: expect.any(Number),
|
|
218
218
|
}),
|
|
219
219
|
]);
|
|
220
220
|
});
|
|
@@ -243,7 +243,7 @@ describe('HTTP handler', () => {
|
|
|
243
243
|
url: 'http://localhost:3000/graphql',
|
|
244
244
|
requestStartTimestamp: expect.any(Number),
|
|
245
245
|
requestEndTimestamp: expect.any(Number),
|
|
246
|
-
|
|
246
|
+
responseTimeMs: expect.any(Number),
|
|
247
247
|
}),
|
|
248
248
|
]);
|
|
249
249
|
});
|
|
@@ -283,7 +283,7 @@ describe('HTTP handler', () => {
|
|
|
283
283
|
url: 'http://localhost:3000/graphql?query=query+%7B+hello+%7D&variables=%7B%7D&operationName=hello',
|
|
284
284
|
requestStartTimestamp: expect.any(Number),
|
|
285
285
|
requestEndTimestamp: expect.any(Number),
|
|
286
|
-
|
|
286
|
+
responseTimeMs: expect.any(Number),
|
|
287
287
|
}),
|
|
288
288
|
]);
|
|
289
289
|
});
|
|
@@ -383,7 +383,7 @@ describe('HTTP handler', () => {
|
|
|
383
383
|
url: 'http://localhost:3000/simple-stream',
|
|
384
384
|
requestStartTimestamp: expect.any(Number),
|
|
385
385
|
requestEndTimestamp: expect.any(Number),
|
|
386
|
-
|
|
386
|
+
responseTimeMs: expect.any(Number),
|
|
387
387
|
}),
|
|
388
388
|
expect.objectContaining({
|
|
389
389
|
ok: true,
|
|
@@ -393,7 +393,7 @@ describe('HTTP handler', () => {
|
|
|
393
393
|
url: 'http://localhost:3000/simple-stream',
|
|
394
394
|
requestStartTimestamp: expect.any(Number),
|
|
395
395
|
requestEndTimestamp: expect.any(Number),
|
|
396
|
-
|
|
396
|
+
responseTimeMs: expect.any(Number),
|
|
397
397
|
}),
|
|
398
398
|
expect.objectContaining({
|
|
399
399
|
ok: true,
|
|
@@ -403,7 +403,7 @@ describe('HTTP handler', () => {
|
|
|
403
403
|
url: 'http://localhost:3000/simple-stream',
|
|
404
404
|
requestStartTimestamp: expect.any(Number),
|
|
405
405
|
requestEndTimestamp: expect.any(Number),
|
|
406
|
-
|
|
406
|
+
responseTimeMs: expect.any(Number),
|
|
407
407
|
}),
|
|
408
408
|
]);
|
|
409
409
|
});
|
|
@@ -503,7 +503,7 @@ describe('HTTP handler', () => {
|
|
|
503
503
|
url: 'http://localhost:3000/multipart-stream',
|
|
504
504
|
requestStartTimestamp: expect.any(Number),
|
|
505
505
|
requestEndTimestamp: expect.any(Number),
|
|
506
|
-
|
|
506
|
+
responseTimeMs: expect.any(Number),
|
|
507
507
|
}),
|
|
508
508
|
expect.objectContaining({
|
|
509
509
|
ok: true,
|
|
@@ -513,7 +513,7 @@ describe('HTTP handler', () => {
|
|
|
513
513
|
url: 'http://localhost:3000/multipart-stream',
|
|
514
514
|
requestStartTimestamp: expect.any(Number),
|
|
515
515
|
requestEndTimestamp: expect.any(Number),
|
|
516
|
-
|
|
516
|
+
responseTimeMs: expect.any(Number),
|
|
517
517
|
}),
|
|
518
518
|
expect.objectContaining({
|
|
519
519
|
ok: true,
|
|
@@ -523,7 +523,7 @@ describe('HTTP handler', () => {
|
|
|
523
523
|
url: 'http://localhost:3000/multipart-stream',
|
|
524
524
|
requestStartTimestamp: expect.any(Number),
|
|
525
525
|
requestEndTimestamp: expect.any(Number),
|
|
526
|
-
|
|
526
|
+
responseTimeMs: expect.any(Number),
|
|
527
527
|
}),
|
|
528
528
|
expect.objectContaining({
|
|
529
529
|
ok: true,
|
|
@@ -533,7 +533,7 @@ describe('HTTP handler', () => {
|
|
|
533
533
|
url: 'http://localhost:3000/multipart-stream',
|
|
534
534
|
requestStartTimestamp: expect.any(Number),
|
|
535
535
|
requestEndTimestamp: expect.any(Number),
|
|
536
|
-
|
|
536
|
+
responseTimeMs: expect.any(Number),
|
|
537
537
|
}),
|
|
538
538
|
expect.objectContaining({
|
|
539
539
|
ok: true,
|
|
@@ -543,7 +543,7 @@ describe('HTTP handler', () => {
|
|
|
543
543
|
url: 'http://localhost:3000/multipart-stream',
|
|
544
544
|
requestStartTimestamp: expect.any(Number),
|
|
545
545
|
requestEndTimestamp: expect.any(Number),
|
|
546
|
-
|
|
546
|
+
responseTimeMs: expect.any(Number),
|
|
547
547
|
}),
|
|
548
548
|
]);
|
|
549
549
|
});
|
|
@@ -597,7 +597,7 @@ describe('HTTP handler', () => {
|
|
|
597
597
|
url: 'http://localhost:3000/multipart-stream-2',
|
|
598
598
|
requestStartTimestamp: expect.any(Number),
|
|
599
599
|
requestEndTimestamp: expect.any(Number),
|
|
600
|
-
|
|
600
|
+
responseTimeMs: expect.any(Number),
|
|
601
601
|
}),
|
|
602
602
|
expect.objectContaining({
|
|
603
603
|
ok: true,
|
|
@@ -607,7 +607,7 @@ describe('HTTP handler', () => {
|
|
|
607
607
|
url: 'http://localhost:3000/multipart-stream-2',
|
|
608
608
|
requestStartTimestamp: expect.any(Number),
|
|
609
609
|
requestEndTimestamp: expect.any(Number),
|
|
610
|
-
|
|
610
|
+
responseTimeMs: expect.any(Number),
|
|
611
611
|
}),
|
|
612
612
|
]);
|
|
613
613
|
});
|
package/build/request/types.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface GraphQLResponseData {
|
|
|
36
36
|
/**
|
|
37
37
|
* The time taken to get the response in milliseconds
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
responseTimeMs: number;
|
|
40
40
|
}
|
|
41
41
|
export interface GraphQLRequestHandler {
|
|
42
42
|
handle(request: GraphQLRequestOptions): Observable<GraphQLResponseData>;
|
package/build/request/utils.js
CHANGED
|
@@ -11,7 +11,7 @@ export const simpleResponseObserver = (subscriber, url, requestStartTimestamp) =
|
|
|
11
11
|
url: url,
|
|
12
12
|
requestStartTimestamp,
|
|
13
13
|
requestEndTimestamp,
|
|
14
|
-
|
|
14
|
+
responseTimeMs: requestEndTimestamp - requestStartTimestamp,
|
|
15
15
|
});
|
|
16
16
|
},
|
|
17
17
|
error: (...args) => subscriber.error(...args),
|
|
@@ -420,6 +420,15 @@
|
|
|
420
420
|
},
|
|
421
421
|
"type": "array"
|
|
422
422
|
},
|
|
423
|
+
"script.allowedLocalStorageKeys": {
|
|
424
|
+
"default": [
|
|
425
|
+
],
|
|
426
|
+
"description": "List of local storage keys to be accessible in the pre-request script.\nThese will be made available read-only via the `storage` API in the script context.",
|
|
427
|
+
"items": {
|
|
428
|
+
"type": "string"
|
|
429
|
+
},
|
|
430
|
+
"type": "array"
|
|
431
|
+
},
|
|
423
432
|
"tabSize": {
|
|
424
433
|
"description": "Specifies the tab size for the editor",
|
|
425
434
|
"type": "number"
|
|
@@ -420,6 +420,15 @@
|
|
|
420
420
|
},
|
|
421
421
|
"type": "array"
|
|
422
422
|
},
|
|
423
|
+
"script.allowedLocalStorageKeys": {
|
|
424
|
+
"default": [
|
|
425
|
+
],
|
|
426
|
+
"description": "List of local storage keys to be accessible in the pre-request script.\nThese will be made available read-only via the `storage` API in the script context.",
|
|
427
|
+
"items": {
|
|
428
|
+
"type": "string"
|
|
429
|
+
},
|
|
430
|
+
"type": "array"
|
|
431
|
+
},
|
|
423
432
|
"tabSize": {
|
|
424
433
|
"description": "Specifies the tab size for the editor",
|
|
425
434
|
"type": "number"
|