@globus/sdk 3.4.2 → 3.5.0
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/cjs/lib/apps/web.js +4 -4
- package/cjs/lib/apps/web.js.map +1 -1
- package/cjs/lib/core/authorization/AuthorizationManager.d.ts +1 -1
- package/cjs/lib/core/authorization/AuthorizationManager.d.ts.map +1 -1
- package/cjs/lib/core/authorization/index.js +1 -2
- package/cjs/lib/core/authorization/index.js.map +1 -1
- package/cjs/lib/core/errors.d.ts +9 -0
- package/cjs/lib/core/errors.d.ts.map +1 -1
- package/cjs/lib/core/errors.js +11 -6
- package/cjs/lib/core/errors.js.map +1 -1
- package/cjs/lib/core/global.d.ts +17 -17
- package/cjs/lib/core/global.d.ts.map +1 -1
- package/cjs/lib/core/global.js +21 -15
- package/cjs/lib/core/global.js.map +1 -1
- package/cjs/lib/core/info/index.js +4 -4
- package/cjs/lib/core/info/index.js.map +1 -1
- package/cjs/lib/core/info/private.js +5 -5
- package/cjs/lib/core/info/private.js.map +1 -1
- package/cjs/lib/core/info/version.d.ts +1 -1
- package/cjs/lib/core/info/version.js +1 -1
- package/cjs/lib/core/logger.js +3 -4
- package/cjs/lib/core/logger.js.map +1 -1
- package/cjs/lib/core/storage/index.js +3 -3
- package/cjs/lib/core/storage/index.js.map +1 -1
- package/cjs/lib/core/url.js +3 -4
- package/cjs/lib/core/url.js.map +1 -1
- package/cjs/lib/services/auth/index.js +6 -6
- package/cjs/lib/services/auth/index.js.map +1 -1
- package/cjs/lib/services/auth/service/identities.d.ts +7 -9
- package/cjs/lib/services/auth/service/identities.d.ts.map +1 -1
- package/cjs/lib/services/compute/service/endpoints.d.ts +12 -16
- package/cjs/lib/services/compute/service/endpoints.d.ts.map +1 -1
- package/cjs/lib/services/flows/service/flows.d.ts +8 -12
- package/cjs/lib/services/flows/service/flows.d.ts.map +1 -1
- package/cjs/lib/services/flows/service/runs.d.ts +3 -3
- package/cjs/lib/services/flows/service/runs.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/client.d.ts +882 -12110
- package/cjs/lib/services/globus-connect-server/client.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/client.js +1 -2
- package/cjs/lib/services/globus-connect-server/client.js.map +1 -1
- package/cjs/lib/services/globus-connect-server/index.d.ts +0 -1
- package/cjs/lib/services/globus-connect-server/index.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/index.js +2 -2
- package/cjs/lib/services/globus-connect-server/index.js.map +1 -1
- package/cjs/lib/services/globus-connect-server/service/collections.d.ts +32 -48
- package/cjs/lib/services/globus-connect-server/service/collections.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/service/endpoint.d.ts +17 -25
- package/cjs/lib/services/globus-connect-server/service/endpoint.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/service/https.d.ts +12 -18
- package/cjs/lib/services/globus-connect-server/service/https.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/service/roles.d.ts +18 -26
- package/cjs/lib/services/globus-connect-server/service/roles.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/service/storage-gateways.d.ts +25 -37
- package/cjs/lib/services/globus-connect-server/service/storage-gateways.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/service/user-credentials.d.ts +26 -38
- package/cjs/lib/services/globus-connect-server/service/user-credentials.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/service/versioning.d.ts +5 -7
- package/cjs/lib/services/globus-connect-server/service/versioning.d.ts.map +1 -1
- package/cjs/lib/services/groups/service/groups.d.ts +8 -10
- package/cjs/lib/services/groups/service/groups.d.ts.map +1 -1
- package/cjs/lib/services/groups/service/membership.d.ts +4 -6
- package/cjs/lib/services/groups/service/membership.d.ts.map +1 -1
- package/cjs/lib/services/groups/service/policies.d.ts +5 -7
- package/cjs/lib/services/groups/service/policies.d.ts.map +1 -1
- package/cjs/lib/services/search/service/entry.d.ts +3 -5
- package/cjs/lib/services/search/service/entry.d.ts.map +1 -1
- package/cjs/lib/services/search/service/query.d.ts +11 -20
- package/cjs/lib/services/search/service/query.d.ts.map +1 -1
- package/cjs/lib/services/search/service/subject.d.ts +3 -5
- package/cjs/lib/services/search/service/subject.d.ts.map +1 -1
- package/cjs/lib/services/shared.js +2 -2
- package/cjs/lib/services/shared.js.map +1 -1
- package/cjs/lib/services/timer/service/timer.d.ts +1 -1
- package/cjs/lib/services/transfer/service/access.d.ts +21 -39
- package/cjs/lib/services/transfer/service/access.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/collection-bookmarks.d.ts +15 -26
- package/cjs/lib/services/transfer/service/collection-bookmarks.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/endpoint-manager/endpoint.d.ts +16 -36
- package/cjs/lib/services/transfer/service/endpoint-manager/endpoint.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/endpoint-manager/pause-rule.d.ts +18 -29
- package/cjs/lib/services/transfer/service/endpoint-manager/pause-rule.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/endpoint-manager/task.d.ts +35 -59
- package/cjs/lib/services/transfer/service/endpoint-manager/task.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/endpoint-search.d.ts +1 -6
- package/cjs/lib/services/transfer/service/endpoint-search.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/endpoint.d.ts +12 -107
- package/cjs/lib/services/transfer/service/endpoint.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/file-operations.d.ts +26 -27
- package/cjs/lib/services/transfer/service/file-operations.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/file-operations.js +13 -1
- package/cjs/lib/services/transfer/service/file-operations.js.map +1 -1
- package/cjs/lib/services/transfer/service/task-submission.d.ts +4 -4
- package/cjs/lib/services/transfer/service/task-submission.d.ts.map +1 -1
- package/cjs/lib/services/transfer/service/task.d.ts +42 -73
- package/cjs/lib/services/transfer/service/task.d.ts.map +1 -1
- package/cjs/lib/services/transfer/shared.js +1 -2
- package/cjs/lib/services/transfer/shared.js.map +1 -1
- package/esm/lib/core/authorization/AuthorizationManager.d.ts +1 -1
- package/esm/lib/core/authorization/AuthorizationManager.d.ts.map +1 -1
- package/esm/lib/core/errors.d.ts +9 -0
- package/esm/lib/core/errors.d.ts.map +1 -1
- package/esm/lib/core/errors.js +6 -1
- package/esm/lib/core/errors.js.map +1 -1
- package/esm/lib/core/global.d.ts +17 -17
- package/esm/lib/core/global.d.ts.map +1 -1
- package/esm/lib/core/global.js +14 -8
- package/esm/lib/core/global.js.map +1 -1
- package/esm/lib/core/info/version.d.ts +1 -1
- package/esm/lib/core/info/version.js +1 -1
- package/esm/lib/services/auth/service/identities.d.ts +7 -9
- package/esm/lib/services/auth/service/identities.d.ts.map +1 -1
- package/esm/lib/services/compute/service/endpoints.d.ts +12 -16
- package/esm/lib/services/compute/service/endpoints.d.ts.map +1 -1
- package/esm/lib/services/flows/service/flows.d.ts +8 -12
- package/esm/lib/services/flows/service/flows.d.ts.map +1 -1
- package/esm/lib/services/flows/service/runs.d.ts +3 -3
- package/esm/lib/services/flows/service/runs.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/client.d.ts +882 -12110
- package/esm/lib/services/globus-connect-server/client.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/index.d.ts +0 -1
- package/esm/lib/services/globus-connect-server/index.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/service/collections.d.ts +32 -48
- package/esm/lib/services/globus-connect-server/service/collections.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/service/endpoint.d.ts +17 -25
- package/esm/lib/services/globus-connect-server/service/endpoint.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/service/https.d.ts +12 -18
- package/esm/lib/services/globus-connect-server/service/https.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/service/roles.d.ts +18 -26
- package/esm/lib/services/globus-connect-server/service/roles.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/service/storage-gateways.d.ts +25 -37
- package/esm/lib/services/globus-connect-server/service/storage-gateways.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/service/user-credentials.d.ts +26 -38
- package/esm/lib/services/globus-connect-server/service/user-credentials.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/service/versioning.d.ts +5 -7
- package/esm/lib/services/globus-connect-server/service/versioning.d.ts.map +1 -1
- package/esm/lib/services/groups/service/groups.d.ts +8 -10
- package/esm/lib/services/groups/service/groups.d.ts.map +1 -1
- package/esm/lib/services/groups/service/membership.d.ts +4 -6
- package/esm/lib/services/groups/service/membership.d.ts.map +1 -1
- package/esm/lib/services/groups/service/policies.d.ts +5 -7
- package/esm/lib/services/groups/service/policies.d.ts.map +1 -1
- package/esm/lib/services/search/service/entry.d.ts +3 -5
- package/esm/lib/services/search/service/entry.d.ts.map +1 -1
- package/esm/lib/services/search/service/query.d.ts +11 -20
- package/esm/lib/services/search/service/query.d.ts.map +1 -1
- package/esm/lib/services/search/service/subject.d.ts +3 -5
- package/esm/lib/services/search/service/subject.d.ts.map +1 -1
- package/esm/lib/services/timer/service/timer.d.ts +1 -1
- package/esm/lib/services/transfer/service/access.d.ts +21 -39
- package/esm/lib/services/transfer/service/access.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/collection-bookmarks.d.ts +15 -26
- package/esm/lib/services/transfer/service/collection-bookmarks.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/endpoint-manager/endpoint.d.ts +16 -36
- package/esm/lib/services/transfer/service/endpoint-manager/endpoint.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/endpoint-manager/pause-rule.d.ts +18 -29
- package/esm/lib/services/transfer/service/endpoint-manager/pause-rule.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/endpoint-manager/task.d.ts +35 -59
- package/esm/lib/services/transfer/service/endpoint-manager/task.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/endpoint-search.d.ts +1 -6
- package/esm/lib/services/transfer/service/endpoint-search.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/endpoint.d.ts +12 -107
- package/esm/lib/services/transfer/service/endpoint.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/file-operations.d.ts +26 -27
- package/esm/lib/services/transfer/service/file-operations.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/file-operations.js +12 -0
- package/esm/lib/services/transfer/service/file-operations.js.map +1 -1
- package/esm/lib/services/transfer/service/task-submission.d.ts +4 -4
- package/esm/lib/services/transfer/service/task-submission.d.ts.map +1 -1
- package/esm/lib/services/transfer/service/task.d.ts +42 -73
- package/esm/lib/services/transfer/service/task.d.ts.map +1 -1
- package/package.json +1 -1
- package/umd/globus.production.js +1 -1
package/cjs/lib/apps/web.js
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* @see https://app.globus.org/
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.HOSTS = void 0;
|
|
8
|
+
exports.host = host;
|
|
9
|
+
exports.url = url;
|
|
10
|
+
exports.urlFor = urlFor;
|
|
8
11
|
const global_js_1 = require("../core/global.js");
|
|
9
12
|
/**
|
|
10
13
|
* The hostnames for the Globus Web App in each environment.
|
|
@@ -23,14 +26,12 @@ exports.HOSTS = {
|
|
|
23
26
|
function host(env = (0, global_js_1.getEnvironment)()) {
|
|
24
27
|
return exports.HOSTS[env];
|
|
25
28
|
}
|
|
26
|
-
exports.host = host;
|
|
27
29
|
/**
|
|
28
30
|
* Return a URL for the Globus Web App.
|
|
29
31
|
*/
|
|
30
32
|
function url(path, sdkOptions) {
|
|
31
33
|
return new URL(path || '', `https://${host(sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.environment)}`);
|
|
32
34
|
}
|
|
33
|
-
exports.url = url;
|
|
34
35
|
const WEBAPP_URLS = {
|
|
35
36
|
TASK: '/activity/%s/overview',
|
|
36
37
|
COLLECTION: '/file-manager/collections/%s/overview',
|
|
@@ -47,5 +48,4 @@ function urlFor(identifier, segments, sdkOptions) {
|
|
|
47
48
|
const path = WEBAPP_URLS[identifier].replace(/%s/g, (segments === null || segments === void 0 ? void 0 : segments.join('/')) || '');
|
|
48
49
|
return url(path, sdkOptions);
|
|
49
50
|
}
|
|
50
|
-
exports.urlFor = urlFor;
|
|
51
51
|
//# sourceMappingURL=web.js.map
|
package/cjs/lib/apps/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../../src/lib/apps/web.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../../src/lib/apps/web.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAoBH,oBAEC;AAKD,kBAEC;AAiBD,wBAOC;AAnDD,iDAAqE;AAGrE;;GAEG;AACU,QAAA,KAAK,GAAgC;IAChD,WAAW,EAAE,+BAA+B;IAC5C,OAAO,EAAE,2BAA2B;IACpC,IAAI,EAAE,wBAAwB;IAC9B,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,wBAAwB;IACjC,UAAU,EAAE,gBAAgB;CAC7B,CAAC;AAEF;;GAEG;AACH,SAAgB,IAAI,CAAC,MAAmB,IAAA,0BAAc,GAAE;IACtD,OAAO,aAAK,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,SAAgB,GAAG,CAAC,IAAa,EAAE,UAAuB;IACxD,OAAO,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,WAAW,IAAI,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC;AAID,MAAM,WAAW,GAAwC;IACvD,IAAI,EAAE,uBAAuB;IAC7B,UAAU,EAAE,uCAAuC;IACnD,QAAQ,EAAE,uCAAuC;CAClD,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,MAAM,CACpB,UAA+B,EAC/B,QAAmB,EACnB,UAAuB;IAEvB,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAC,GAAG,CAAC,KAAI,EAAE,CAAC,CAAC;IAC/E,OAAO,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -77,7 +77,7 @@ export declare class AuthorizationManager {
|
|
|
77
77
|
* @see {@link AuthorizationManager.authenticated}
|
|
78
78
|
*/
|
|
79
79
|
isAuthenticated: boolean;
|
|
80
|
-
token?: TokenResponse
|
|
80
|
+
token?: TokenResponse;
|
|
81
81
|
}>;
|
|
82
82
|
/**
|
|
83
83
|
* Emitted when the user revokes their authentication.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorizationManager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/AuthorizationManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAahD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,wBAAwB,EACxB,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAGL,8BAA8B,EAC9B,oBAAoB,EAErB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACV,WAAW,EACX,KAAK,EACL,aAAa,EACb,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAChC,CAAC;AAYF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,oBAAoB;;IAG/B,aAAa,EAAE,iCAAiC,CAAC;IAIjD;;;OAGG;IACH,IAAI,aAAa,IAOQ,OAAO,CAL/B;IAED;;OAEG;IACH,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,EAG/B;IAED,MAAM,EAAE,WAAW,CAAC;IAEpB,MAAM;QACJ;;;;;;WAMG;;YAIC;;;eAGG;6BACc,OAAO;;;
|
|
1
|
+
{"version":3,"file":"AuthorizationManager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/AuthorizationManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAahD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,wBAAwB,EACxB,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAGL,8BAA8B,EAC9B,oBAAoB,EAErB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACV,WAAW,EACX,KAAK,EACL,aAAa,EACb,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAChC,CAAC;AAYF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,oBAAoB;;IAG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,CAClC,QAAQ,EAAE,8BAA8B,EACxC,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAA;KAAE;IAYrE;;;OAGG;IACH,0BAA0B,CACxB,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAA;KAAE;IAWrE;;;;OAIG;IACH,gBAAgB,UAAW,KAAK,GAAG,aAAa,UAM9C;IAEF;;;;OAIG;IACG,MAAM;CAoBb"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.create =
|
|
3
|
+
exports.create = create;
|
|
4
4
|
/**
|
|
5
5
|
* @module Authorization
|
|
6
6
|
* @description Provides modules for interacting with Globus-related authorization contexts in your application.
|
|
@@ -15,5 +15,4 @@ const AuthorizationManager_js_1 = require("./AuthorizationManager.js");
|
|
|
15
15
|
function create(configuration) {
|
|
16
16
|
return new AuthorizationManager_js_1.AuthorizationManager(configuration);
|
|
17
17
|
}
|
|
18
|
-
exports.create = create;
|
|
19
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/index.ts"],"names":[],"mappings":";;AAeA,wBAEC;AAjBD;;;;;;GAMG;AACH,uEAGmC;AAEnC;;GAEG;AACH,SAAgB,MAAM,CAAC,aAAgD;IACrE,OAAO,IAAI,8CAAoB,CAAC,aAAa,CAAC,CAAC;AACjD,CAAC"}
|
package/cjs/lib/core/errors.d.ts
CHANGED
|
@@ -36,11 +36,20 @@ export type AuthorizationRequirementsError = {
|
|
|
36
36
|
prompt?: string;
|
|
37
37
|
required_scopes?: string[];
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* @todo At the moment, most Globus services do not guarentee a `code` property for this error type.
|
|
41
|
+
* Once it becomes more common, this type (and the `isAuthorizationRequirementsError` function) should be updated.
|
|
42
|
+
* @see https://globus-sdk-python.readthedocs.io/en/stable/experimental/auth_requirements_errors.html
|
|
43
|
+
*/
|
|
39
44
|
[key: string]: unknown;
|
|
40
45
|
};
|
|
41
46
|
/**
|
|
42
47
|
* Convert an `AuthorizationRequirementsError` to a query string object accepted by Globus Auth.
|
|
43
48
|
*/
|
|
44
49
|
export declare function toAuthorizationQueryParams(error: AuthorizationRequirementsError): AuthorizationQueryParameters;
|
|
50
|
+
/**
|
|
51
|
+
* Check if an object is an `AuthorizationRequirementsError`.
|
|
52
|
+
* @see {@link AuthorizationRequirementsError}
|
|
53
|
+
*/
|
|
45
54
|
export declare function isAuthorizationRequirementsError(test: unknown): test is AuthorizationRequirementsError;
|
|
46
55
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAE9E,qBAAa,6BAA8B,SAAQ,KAAK;IAC7C,IAAI,SAAmC;gBAEpC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAK7C;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,eAAe,CAExE;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,iBAAiB,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC,GAAG,EAAE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e,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,oBAAoB,CAOlF;AAED;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,wBAAwB,EAAE;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,2BAA2B,CAAC,EAAE,MAAM,EAAE,CAAC;QACvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,8BAA8B,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1C,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;QACrC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;KAC5B,CAAC;IACF;;;;OAIG;IAEH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAKF;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,8BAA8B,GACpC,4BAA4B,CAmB9B;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,OAAO,GACZ,IAAI,IAAI,8BAA8B,CAQxC"}
|
package/cjs/lib/core/errors.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.EnvironmentConfigurationError = void 0;
|
|
4
|
+
exports.isErrorWellFormed = isErrorWellFormed;
|
|
5
|
+
exports.isConsentRequiredError = isConsentRequiredError;
|
|
6
|
+
exports.toAuthorizationQueryParams = toAuthorizationQueryParams;
|
|
7
|
+
exports.isAuthorizationRequirementsError = isAuthorizationRequirementsError;
|
|
4
8
|
class EnvironmentConfigurationError extends Error {
|
|
5
9
|
constructor(variable, value) {
|
|
6
10
|
super();
|
|
@@ -13,14 +17,12 @@ exports.EnvironmentConfigurationError = EnvironmentConfigurationError;
|
|
|
13
17
|
function isErrorWellFormed(test) {
|
|
14
18
|
return typeof test === 'object' && test !== null && 'code' in test && 'message' in test;
|
|
15
19
|
}
|
|
16
|
-
exports.isErrorWellFormed = isErrorWellFormed;
|
|
17
20
|
function isConsentRequiredError(test) {
|
|
18
21
|
return (isErrorWellFormed(test) &&
|
|
19
22
|
test.code === 'ConsentRequired' &&
|
|
20
23
|
'required_scopes' in test &&
|
|
21
24
|
Array.isArray(test.required_scopes));
|
|
22
25
|
}
|
|
23
|
-
exports.isConsentRequiredError = isConsentRequiredError;
|
|
24
26
|
/**
|
|
25
27
|
* Keys that should not be included in the query string object (not recognized by Globus Auth).
|
|
26
28
|
*/
|
|
@@ -49,12 +51,15 @@ function toAuthorizationQueryParams(error) {
|
|
|
49
51
|
return Object.assign(Object.assign({}, acc), { [key]: value });
|
|
50
52
|
}, {});
|
|
51
53
|
}
|
|
52
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Check if an object is an `AuthorizationRequirementsError`.
|
|
56
|
+
* @see {@link AuthorizationRequirementsError}
|
|
57
|
+
*/
|
|
53
58
|
function isAuthorizationRequirementsError(test) {
|
|
54
|
-
return (
|
|
59
|
+
return (typeof test === 'object' &&
|
|
60
|
+
test !== null &&
|
|
55
61
|
'authorization_parameters' in test &&
|
|
56
62
|
typeof test.authorization_parameters === 'object' &&
|
|
57
63
|
test.authorization_parameters !== null);
|
|
58
64
|
}
|
|
59
|
-
exports.isAuthorizationRequirementsError = isAuthorizationRequirementsError;
|
|
60
65
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/lib/core/errors.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/lib/core/errors.ts"],"names":[],"mappings":";;;AAuBA,8CAEC;AAQD,wDAOC;AAiCD,gEA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C;aAAM,IAAI,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;YAClC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QACnC,CAAC;QACD,uCAAY,GAAG,KAAE,CAAC,GAAG,CAAC,EAAE,KAAK,IAAG;IAClC,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED;;;GAGG;AACH,SAAgB,gCAAgC,CAC9C,IAAa;IAEb,OAAO,CACL,OAAO,IAAI,KAAK,QAAQ;QACxB,IAAI,KAAK,IAAI;QACb,0BAA0B,IAAI,IAAI;QAClC,OAAO,IAAI,CAAC,wBAAwB,KAAK,QAAQ;QACjD,IAAI,CAAC,wBAAwB,KAAK,IAAI,CACvC,CAAC;AACJ,CAAC"}
|
package/cjs/lib/core/global.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export declare const ENVIRONMENTS: {
|
|
|
11
11
|
readonly TEST: "test";
|
|
12
12
|
};
|
|
13
13
|
export type Environment = (typeof ENVIRONMENTS)[keyof typeof ENVIRONMENTS];
|
|
14
|
-
export declare function getEnvironment(): Environment;
|
|
15
14
|
export declare const SERVICES: {
|
|
16
15
|
AUTH: "AUTH";
|
|
17
16
|
TRANSFER: "TRANSFER";
|
|
@@ -34,25 +33,26 @@ export declare function getSDKOptions(options?: SDKOptions): {
|
|
|
34
33
|
headers: {
|
|
35
34
|
[x: string]: string;
|
|
36
35
|
};
|
|
37
|
-
body?: BodyInit | null
|
|
38
|
-
cache?: RequestCache
|
|
39
|
-
credentials?: RequestCredentials
|
|
40
|
-
integrity?: string
|
|
41
|
-
keepalive?: boolean
|
|
42
|
-
method?: string
|
|
43
|
-
mode?: RequestMode
|
|
44
|
-
priority?: RequestPriority
|
|
45
|
-
redirect?: RequestRedirect
|
|
46
|
-
referrer?: string
|
|
47
|
-
referrerPolicy?: ReferrerPolicy
|
|
48
|
-
signal?: AbortSignal | null
|
|
49
|
-
window?: null
|
|
50
|
-
__callable?: typeof fetch
|
|
36
|
+
body?: BodyInit | null;
|
|
37
|
+
cache?: RequestCache;
|
|
38
|
+
credentials?: RequestCredentials;
|
|
39
|
+
integrity?: string;
|
|
40
|
+
keepalive?: boolean;
|
|
41
|
+
method?: string;
|
|
42
|
+
mode?: RequestMode;
|
|
43
|
+
priority?: RequestPriority;
|
|
44
|
+
redirect?: RequestRedirect;
|
|
45
|
+
referrer?: string;
|
|
46
|
+
referrerPolicy?: ReferrerPolicy;
|
|
47
|
+
signal?: AbortSignal | null;
|
|
48
|
+
window?: null;
|
|
49
|
+
__callable?: typeof fetch;
|
|
51
50
|
};
|
|
52
51
|
};
|
|
53
|
-
environment?:
|
|
54
|
-
manager?: import("./authorization/AuthorizationManager.js").AuthorizationManager
|
|
52
|
+
environment?: (typeof ENVIRONMENTS)[keyof typeof ENVIRONMENTS];
|
|
53
|
+
manager?: import("./authorization/AuthorizationManager.js").AuthorizationManager;
|
|
55
54
|
};
|
|
55
|
+
export declare function getEnvironment(): Environment;
|
|
56
56
|
/**
|
|
57
57
|
* Handlers for: GLOBUS_SDK_VERIFY_SSL
|
|
58
58
|
* Since disabling SSL is at least not-recommended, we consider
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/global.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/global.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAyBlD;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE3E,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE5C,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAQ/E,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;EAqBjD;AAED,wBAAgB,cAAc,IAAI,WAAW,CAgB5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAStC;AAED;;GAEG;AACH,wBAAgB,cAAc,kBAM7B;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,GAAE,WAA8B,sBAE3F;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,GAAE,WAA8B,sBAG9F"}
|
package/cjs/lib/core/global.js
CHANGED
|
@@ -23,7 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.SERVICE_HOSTS = exports.SERVICES = exports.ENVIRONMENTS = void 0;
|
|
27
|
+
exports.getSDKOptions = getSDKOptions;
|
|
28
|
+
exports.getEnvironment = getEnvironment;
|
|
29
|
+
exports.getVerifySSL = getVerifySSL;
|
|
30
|
+
exports.getHttpTimeout = getHttpTimeout;
|
|
31
|
+
exports.getServiceHost = getServiceHost;
|
|
32
|
+
exports.getServiceBaseUrl = getServiceBaseUrl;
|
|
27
33
|
const AUTH = __importStar(require("../services/auth/config.js"));
|
|
28
34
|
const TRANSFER = __importStar(require("../services/transfer/config.js"));
|
|
29
35
|
const FLOWS = __importStar(require("../services/flows/config.js"));
|
|
@@ -32,6 +38,7 @@ const SEARCH = __importStar(require("../services/search/config.js"));
|
|
|
32
38
|
const TIMER = __importStar(require("../services/timer/config.js"));
|
|
33
39
|
const COMPUTE = __importStar(require("../services/compute/config.js"));
|
|
34
40
|
const errors_js_1 = require("./errors.js");
|
|
41
|
+
const logger_js_1 = require("./logger.js");
|
|
35
42
|
function getRuntime() {
|
|
36
43
|
return typeof window !== 'undefined' ? window : process;
|
|
37
44
|
}
|
|
@@ -63,14 +70,6 @@ exports.ENVIRONMENTS = {
|
|
|
63
70
|
INTEGRATION: 'integration',
|
|
64
71
|
TEST: 'test',
|
|
65
72
|
};
|
|
66
|
-
function getEnvironment() {
|
|
67
|
-
const environment = env('GLOBUS_SDK_ENVIRONMENT', exports.ENVIRONMENTS.PRODUCTION);
|
|
68
|
-
if (!environment || !Object.values(exports.ENVIRONMENTS).includes(environment)) {
|
|
69
|
-
throw new errors_js_1.EnvironmentConfigurationError('GLOBUS_SDK_ENVIRONMENT', environment);
|
|
70
|
-
}
|
|
71
|
-
return environment;
|
|
72
|
-
}
|
|
73
|
-
exports.getEnvironment = getEnvironment;
|
|
74
73
|
exports.SERVICES = {
|
|
75
74
|
[AUTH.ID]: AUTH.ID,
|
|
76
75
|
[TRANSFER.ID]: TRANSFER.ID,
|
|
@@ -102,7 +101,18 @@ function getSDKOptions(options) {
|
|
|
102
101
|
}
|
|
103
102
|
return Object.assign(Object.assign(Object.assign({}, globalOptions), options), { fetch: Object.assign(Object.assign(Object.assign({}, globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.fetch), options === null || options === void 0 ? void 0 : options.fetch), { options: Object.assign(Object.assign(Object.assign({}, (_a = globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.fetch) === null || _a === void 0 ? void 0 : _a.options), (_b = options === null || options === void 0 ? void 0 : options.fetch) === null || _b === void 0 ? void 0 : _b.options), { headers: Object.assign(Object.assign({}, (_d = (_c = globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.fetch) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.headers), (_f = (_e = options === null || options === void 0 ? void 0 : options.fetch) === null || _e === void 0 ? void 0 : _e.options) === null || _f === void 0 ? void 0 : _f.headers) }) }) });
|
|
104
103
|
}
|
|
105
|
-
|
|
104
|
+
function getEnvironment() {
|
|
105
|
+
var _a;
|
|
106
|
+
const globalOptions = getSDKOptions();
|
|
107
|
+
const environment = env('GLOBUS_SDK_ENVIRONMENT', (_a = globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.environment) !== null && _a !== void 0 ? _a : exports.ENVIRONMENTS.PRODUCTION);
|
|
108
|
+
if ((globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.environment) && environment !== globalOptions.environment) {
|
|
109
|
+
(0, logger_js_1.log)('debug', 'GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence');
|
|
110
|
+
}
|
|
111
|
+
if (!environment || !Object.values(exports.ENVIRONMENTS).includes(environment)) {
|
|
112
|
+
throw new errors_js_1.EnvironmentConfigurationError('GLOBUS_SDK_ENVIRONMENT', environment);
|
|
113
|
+
}
|
|
114
|
+
return environment;
|
|
115
|
+
}
|
|
106
116
|
/**
|
|
107
117
|
* Handlers for: GLOBUS_SDK_VERIFY_SSL
|
|
108
118
|
* Since disabling SSL is at least not-recommended, we consider
|
|
@@ -115,11 +125,10 @@ exports.getSDKOptions = getSDKOptions;
|
|
|
115
125
|
function getVerifySSL() {
|
|
116
126
|
const verifySSLTemp = env('GLOBUS_SDK_VERIFY_SSL', 'true').toLowerCase();
|
|
117
127
|
if (['n', 'no', 'f', 'false', 'off', '0'].includes(verifySSLTemp)) {
|
|
118
|
-
|
|
128
|
+
(0, logger_js_1.log)('warn', 'Setting GLOBUS_SDK_VERIFY_SSL to false is disallowed in the Globus JavaScript SDK. It will always true in this context');
|
|
119
129
|
}
|
|
120
130
|
return true;
|
|
121
131
|
}
|
|
122
|
-
exports.getVerifySSL = getVerifySSL;
|
|
123
132
|
/**
|
|
124
133
|
* Handlers for: GLOBUS_SDK_HTTP_TIMEOUT
|
|
125
134
|
*/
|
|
@@ -130,14 +139,11 @@ function getHttpTimeout() {
|
|
|
130
139
|
}
|
|
131
140
|
return timeout;
|
|
132
141
|
}
|
|
133
|
-
exports.getHttpTimeout = getHttpTimeout;
|
|
134
142
|
function getServiceHost(service, environment = getEnvironment()) {
|
|
135
143
|
return exports.SERVICE_HOSTS[service][environment];
|
|
136
144
|
}
|
|
137
|
-
exports.getServiceHost = getServiceHost;
|
|
138
145
|
function getServiceBaseUrl(service, environment = getEnvironment()) {
|
|
139
146
|
const host = getServiceHost(service, environment);
|
|
140
147
|
return env(`GLOBUS_SDK_SERVICE_URL_${service}`, host ? `https://${host}` : undefined);
|
|
141
148
|
}
|
|
142
|
-
exports.getServiceBaseUrl = getServiceBaseUrl;
|
|
143
149
|
//# sourceMappingURL=global.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../../src/lib/core/global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../../src/lib/core/global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,sCAqBC;AAED,wCAgBC;AAWD,oCASC;AAKD,wCAMC;AAED,wCAEC;AAED,8CAGC;AA1JD,iEAAmD;AACnD,yEAA2D;AAC3D,mEAAqD;AACrD,qEAAuD;AACvD,qEAAuD;AACvD,mEAAqD;AACrD,uEAAyD;AAEzD,2CAA4D;AAE5D,2CAAkC;AAElC,SAAS,UAAU;IACjB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;AAC1D,CAAC;AAED,SAAS,SAAS,CAAC,OAAgC;IACjD,OAAO,OAAO,MAAM,KAAK,OAAO,OAAO,CAAC;AAC1C,CAAC;AAED,SAAS,GAAG,CAAI,GAAW,EAAE,QAAW;IACtC,MAAM,OAAO,G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B,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACxF,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CLIENT_INFO = exports.VERSION = void 0;
|
|
4
|
+
exports.addClientInfo = addClientInfo;
|
|
5
|
+
exports.getClientInfo = getClientInfo;
|
|
6
|
+
exports.getClientInfoRequestHeaders = getClientInfoRequestHeaders;
|
|
4
7
|
/**
|
|
5
8
|
* This module is mostly intended for internal use, but can be helpful
|
|
6
9
|
* identifying information about the SDK package you are using at runtime.
|
|
@@ -25,14 +28,12 @@ let INFOS = [exports.CLIENT_INFO];
|
|
|
25
28
|
function addClientInfo(info) {
|
|
26
29
|
INFOS = INFOS.concat(info);
|
|
27
30
|
}
|
|
28
|
-
exports.addClientInfo = addClientInfo;
|
|
29
31
|
/**
|
|
30
32
|
* Get the current client information as a string.
|
|
31
33
|
*/
|
|
32
34
|
function getClientInfo() {
|
|
33
35
|
return (0, private_js_1.toString)(INFOS);
|
|
34
36
|
}
|
|
35
|
-
exports.getClientInfo = getClientInfo;
|
|
36
37
|
function getClientInfoRequestHeaders() {
|
|
37
38
|
if (!(0, private_js_1.isEnabled)()) {
|
|
38
39
|
return {};
|
|
@@ -41,5 +42,4 @@ function getClientInfoRequestHeaders() {
|
|
|
41
42
|
[private_js_1.CLIENT_INFO_HEADER]: getClientInfo(),
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
|
-
exports.getClientInfoRequestHeaders = getClientInfoRequestHeaders;
|
|
45
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/core/info/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/core/info/index.ts"],"names":[],"mappings":";;;AAgCA,sCAEC;AAID,sCAEC;AAED,kEAOC;AAjDD;;;GAGG;AACH,6CAAuE;AACvE,6CAAmD;AAInD;;GAEG;AACU,QAAA,OAAO,GAAY,oBAAQ,CAAC;AAOzC;;GAEG;AACU,QAAA,WAAW,GAAS;IAC/B,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,eAAO;CACjB,CAAC;AAEF,IAAI,KAAK,GAAW,CAAC,mBAAW,CAAC,CAAC;AAElC;;GAEG;AACH,SAAgB,aAAa,CAAC,IAAU;IACtC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AACD;;GAEG;AACH,SAAgB,aAAa;IAC3B,OAAO,IAAA,qBAAQ,EAAC,KAAK,CAAC,CAAC;AACzB,CAAC;AAED,SAAgB,2BAA2B;IACzC,IAAI,CAAC,IAAA,sBAAS,GAAE,EAAE,CAAC;QACjB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO;QACL,CAAC,+BAAkB,CAAC,EAAE,aAAa,EAAE;KACtC,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CLIENT_INFO_HEADER = void 0;
|
|
4
|
+
exports.disable = disable;
|
|
5
|
+
exports.enable = enable;
|
|
6
|
+
exports.isEnabled = isEnabled;
|
|
7
|
+
exports.toString = toString;
|
|
4
8
|
/**
|
|
5
9
|
* @private
|
|
6
10
|
*/
|
|
@@ -13,7 +17,6 @@ let ENABLED = true;
|
|
|
13
17
|
function disable() {
|
|
14
18
|
ENABLED = false;
|
|
15
19
|
}
|
|
16
|
-
exports.disable = disable;
|
|
17
20
|
/**
|
|
18
21
|
* Enables the client information header to be included in requests.
|
|
19
22
|
* @private
|
|
@@ -21,7 +24,6 @@ exports.disable = disable;
|
|
|
21
24
|
function enable() {
|
|
22
25
|
ENABLED = true;
|
|
23
26
|
}
|
|
24
|
-
exports.enable = enable;
|
|
25
27
|
/**
|
|
26
28
|
* Whether or not the client information header should be sent with requests.
|
|
27
29
|
* @private
|
|
@@ -29,7 +31,6 @@ exports.enable = enable;
|
|
|
29
31
|
function isEnabled() {
|
|
30
32
|
return ENABLED;
|
|
31
33
|
}
|
|
32
|
-
exports.isEnabled = isEnabled;
|
|
33
34
|
const INFOS_SEPERATOR = ';';
|
|
34
35
|
const INFO_ITEM_SEPARATOR = ',';
|
|
35
36
|
/**
|
|
@@ -44,5 +45,4 @@ function toString(info) {
|
|
|
44
45
|
.join(INFO_ITEM_SEPARATOR))
|
|
45
46
|
.join(INFOS_SEPERATOR);
|
|
46
47
|
}
|
|
47
|
-
exports.toString = toString;
|
|
48
48
|
//# sourceMappingURL=private.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private.js","sourceRoot":"","sources":["../../../../../src/lib/core/info/private.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"private.js","sourceRoot":"","sources":["../../../../../src/lib/core/info/private.ts"],"names":[],"mappings":";;;AAYA,0BAEC;AAMD,wBAEC;AAMD,8BAEC;AASD,4BASC;AA9CD;;GAEG;AACU,QAAA,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD,IAAI,OAAO,GAAG,IAAI,CAAC;AACnB;;;GAGG;AACH,SAAgB,OAAO;IACrB,OAAO,GAAG,KAAK,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,SAAgB,MAAM;IACpB,OAAO,GAAG,IAAI,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,SAAgB,SAAS;IACvB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;GAGG;AACH,SAAgB,QAAQ,CAAC,IAAmB;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAClD,OAAO,KAAK;SACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;SACd,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;SACxC,IAAI,CAAC,mBAAmB,CAAC,CAC7B;SACA,IAAI,CAAC,eAAe,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/cjs/lib/core/logger.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.setLogger = setLogger;
|
|
4
|
+
exports.setLogLevel = setLogLevel;
|
|
5
|
+
exports.log = log;
|
|
4
6
|
const LOG_LEVELS = ['debug', 'info', 'warn', 'error'];
|
|
5
7
|
/**
|
|
6
8
|
* No logger is set by default.
|
|
@@ -18,7 +20,6 @@ let level = LOG_LEVELS.indexOf('error');
|
|
|
18
20
|
function setLogger(logMechanism) {
|
|
19
21
|
logger = logMechanism;
|
|
20
22
|
}
|
|
21
|
-
exports.setLogger = setLogger;
|
|
22
23
|
/**
|
|
23
24
|
* Set the global log level for the logger.
|
|
24
25
|
* @param severity The severity to set the logger to.
|
|
@@ -27,7 +28,6 @@ exports.setLogger = setLogger;
|
|
|
27
28
|
function setLogLevel(severity) {
|
|
28
29
|
level = LOG_LEVELS.indexOf(severity);
|
|
29
30
|
}
|
|
30
|
-
exports.setLogLevel = setLogLevel;
|
|
31
31
|
/**
|
|
32
32
|
* Log a message to the logger.
|
|
33
33
|
* @param severity The severity of the log entry.
|
|
@@ -50,5 +50,4 @@ function log(severity, ...args) {
|
|
|
50
50
|
const handler = (_a = logger[severity]) !== null && _a !== void 0 ? _a : logger.log;
|
|
51
51
|
handler(...args);
|
|
52
52
|
}
|
|
53
|
-
exports.log = log;
|
|
54
53
|
//# sourceMappingURL=logger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/lib/core/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/lib/core/logger.ts"],"names":[],"mappings":";;AA0BA,8BAEC;AAMD,kCAEC;AAOD,kBAaC;AAxDD,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAa/D;;GAEG;AACH,IAAI,MAA0B,CAAC;AAC/B;;GAEG;AACH,IAAI,KAAK,GAAW,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAChD;;;;GAIG;AACH,SAAgB,SAAS,CAAC,YAAoB;IAC5C,MAAM,GAAG,YAAY,CAAC;AACxB,CAAC;AACD;;;;GAIG;AACH,SAAgB,WAAW,CAAC,QAAkB;IAC5C,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AACD;;;;;GAKG;AACH,SAAgB,GAAG,CAAC,QAAkB,EAAE,GAAG,IAAe;;IACxD,IAAI,CAAC,MAAM;QAAE,OAAO;IACpB;;OAEG;IACH,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,KAAK,EAAE,CAAC;QACzC,OAAO;IACT,CAAC;IACD;;OAEG;IACH,MAAM,OAAO,GAAG,MAAA,MAAM,CAAC,QAAQ,CAAC,mCAAI,MAAM,CAAC,GAAG,CAAC;IAC/C,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getStorage = void 0;
|
|
4
|
+
exports.createStorage = createStorage;
|
|
5
|
+
exports.__reset = __reset;
|
|
4
6
|
const memory_js_1 = require("./memory.js");
|
|
5
7
|
const local_storage_js_1 = require("./local-storage.js");
|
|
6
8
|
let storage;
|
|
@@ -23,7 +25,6 @@ function createStorage(storageType = 'memory') {
|
|
|
23
25
|
}
|
|
24
26
|
return storage;
|
|
25
27
|
}
|
|
26
|
-
exports.createStorage = createStorage;
|
|
27
28
|
exports.default = createStorage;
|
|
28
29
|
/**
|
|
29
30
|
* Returns the active storage system.
|
|
@@ -38,5 +39,4 @@ exports.getStorage = createStorage;
|
|
|
38
39
|
function __reset() {
|
|
39
40
|
storage = undefined;
|
|
40
41
|
}
|
|
41
|
-
exports.__reset = __reset;
|
|
42
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/core/storage/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/core/storage/index.ts"],"names":[],"mappings":";;;AAwBA,sCAaC;AAeD,0BAEC;AAtDD,2CAA4C;AAC5C,yDAAkD;AAYlD,IAAI,OAAkC,CAAC;AAQvC;;GAEG;AACH,SAAgB,aAAa,CAAC,cAA8B,QAAQ;IAClE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,IAAI,OAAgC,CAAC;QACrC,IAAI,WAAW,KAAK,cAAc,EAAE,CAAC;YACnC,OAAO,GAAG,+BAAY,CAAC;QACzB,CAAC;aAAM,IAAI,WAAW,KAAK,QAAQ,EAAE,CAAC;YACpC,OAAO,GAAG,yBAAa,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,WAAW,CAAC;QACxB,CAAC;QACD,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,kBAAe,aAAa,CAAC;AAE7B;;GAEG;AACU,QAAA,UAAU,GAAG,aAAa,CAAC;AAExC;;;;GAIG;AACH,sFAAsF;AACtF,SAAgB,OAAO;IACrB,OAAO,GAAG,SAAS,CAAC;AACtB,CAAC"}
|
package/cjs/lib/core/url.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.stringifyParameters = stringifyParameters;
|
|
4
|
+
exports.getServiceURL = getServiceURL;
|
|
5
|
+
exports.build = build;
|
|
4
6
|
const global_js_1 = require("./global.js");
|
|
5
7
|
/**
|
|
6
8
|
* An extremely simplified parameter serializer based on our current needs.
|
|
@@ -24,7 +26,6 @@ function stringifyParameters(parameters) {
|
|
|
24
26
|
});
|
|
25
27
|
return search.toString();
|
|
26
28
|
}
|
|
27
|
-
exports.stringifyParameters = stringifyParameters;
|
|
28
29
|
/**
|
|
29
30
|
* Return the base URL for a service (based on the environment).
|
|
30
31
|
* @param service The service to build the URL for.
|
|
@@ -35,7 +36,6 @@ function getServiceURL(service, path = '', environment = (0, global_js_1.getEnvi
|
|
|
35
36
|
const base = (0, global_js_1.getServiceBaseUrl)(service, environment);
|
|
36
37
|
return new URL(path, base);
|
|
37
38
|
}
|
|
38
|
-
exports.getServiceURL = getServiceURL;
|
|
39
39
|
/**
|
|
40
40
|
* Build a URL for a service or GCSConfiguration.
|
|
41
41
|
*
|
|
@@ -56,5 +56,4 @@ function build(serviceOrConfiguration, path, options, sdkOptions) {
|
|
|
56
56
|
}
|
|
57
57
|
return url.toString();
|
|
58
58
|
}
|
|
59
|
-
exports.build = build;
|
|
60
59
|
//# sourceMappingURL=url.js.map
|
package/cjs/lib/core/url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../../src/lib/core/url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../../src/lib/core/url.ts"],"names":[],"mappings":";;AAWA,kDAuBC;AAQD,sCAOC;AASD,sBAkBC;AA5ED,2CAAsF;AAItF;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,UAQnC;IACC,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IAErC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9D,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB;;eAEG;YACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC;aAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACjC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,aAAa,CAC3B,OAAgB,EAChB,IAAI,GAAG,EAAE,EACT,cAA2B,IAAA,0BAAc,GAAE;IAE3C,MAAM,IAAI,GAAG,IAAA,6BAAiB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACrD,OAAO,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,KAAK,CACnB,sBAAkD,EAClD,IAAY,EACZ,OAEC,EACD,UAAuB;IAEvB,IAAI,GAAG,CAAC;IACR,IAAI,OAAO,sBAAsB,KAAK,QAAQ,EAAE,CAAC;QAC/C,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,aAAa,CAAC,sBAAsB,EAAE,IAAI,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,CAAC,CAAC;IAC7E,CAAC;IACD,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QAC9B,GAAG,CAAC,MAAM,GAAG,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -23,7 +23,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.oauth2 = exports.identities = exports.CONFIG = void 0;
|
|
27
|
+
exports.getAuthorizationEndpoint = getAuthorizationEndpoint;
|
|
28
|
+
exports.getTokenEndpoint = getTokenEndpoint;
|
|
29
|
+
exports.isToken = isToken;
|
|
30
|
+
exports.isRefreshToken = isRefreshToken;
|
|
31
|
+
exports.isGlobusAuthTokenResponse = isGlobusAuthTokenResponse;
|
|
27
32
|
/**
|
|
28
33
|
* @description A wrapper around the Globus Auth service.
|
|
29
34
|
* @group Service
|
|
@@ -40,26 +45,21 @@ exports.CONFIG = AUTH;
|
|
|
40
45
|
function getAuthorizationEndpoint() {
|
|
41
46
|
return (0, url_js_1.build)(AUTH.ID, '/v2/oauth2/authorize');
|
|
42
47
|
}
|
|
43
|
-
exports.getAuthorizationEndpoint = getAuthorizationEndpoint;
|
|
44
48
|
function getTokenEndpoint() {
|
|
45
49
|
return (0, url_js_1.build)(AUTH.ID, '/v2/oauth2/token');
|
|
46
50
|
}
|
|
47
|
-
exports.getTokenEndpoint = getTokenEndpoint;
|
|
48
51
|
exports.identities = __importStar(require("./service/identities.js"));
|
|
49
52
|
exports.oauth2 = __importStar(require("./service/oauth2/index.js"));
|
|
50
53
|
function isToken(check) {
|
|
51
54
|
return typeof check === 'object' && check !== null && 'access_token' in check;
|
|
52
55
|
}
|
|
53
|
-
exports.isToken = isToken;
|
|
54
56
|
function isRefreshToken(check) {
|
|
55
57
|
return isToken(check) && check !== null && 'refresh_token' in check;
|
|
56
58
|
}
|
|
57
|
-
exports.isRefreshToken = isRefreshToken;
|
|
58
59
|
function isGlobusAuthTokenResponse(check) {
|
|
59
60
|
/**
|
|
60
61
|
* @todo This could be made more robust by checking whether the `resource_server` is a well-known value.
|
|
61
62
|
*/
|
|
62
63
|
return isToken(check) && check !== null && 'resource_server' in check;
|
|
63
64
|
}
|
|
64
|
-
exports.isGlobusAuthTokenResponse = isGlobusAuthTokenResponse;
|
|
65
65
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/services/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/services/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,4DAEC;AAED,4CAEC;AAKD,0BAEC;AAED,wCAEC;AAED,8DAKC;AAxDD;;;;;GAKG;AACH,8CAA0C;AAE1C,kDAAoC;AAIpC;;;GAGG;AACU,QAAA,MAAM,GAAG,IAAI,CAAC;AAgB3B,SAAgB,wBAAwB;IACtC,OAAO,IAAA,cAAK,EAAC,IAAI,CAAC,EAAE,EAAE,sBAAsB,CAAC,CAAC;AAChD,CAAC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,cAAK,EAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;AAC5C,CAAC;AAED,sEAAsD;AACtD,oEAAoD;AAEpD,SAAgB,OAAO,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,cAAc,IAAI,KAAK,CAAC;AAChF,CAAC;AAED,SAAgB,cAAc,CAAC,KAAc;IAC3C,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,eAAe,IAAI,KAAK,CAAC;AACtE,CAAC;AAED,SAAgB,yBAAyB,CAAC,KAAc;IACtD;;OAEG;IACH,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,iBAAiB,IAAI,KAAK,CAAC;AACxE,CAAC"}
|