@globus/sdk 6.0.0-rc.8 → 6.0.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/README.md +4 -0
- package/dist/cjs/core/authorization/index.js +19 -5
- package/dist/cjs/core/authorization/index.js.map +2 -2
- package/dist/cjs/core/info/index.js +1 -1
- package/dist/cjs/core/info/index.js.map +1 -1
- package/dist/cjs/index.js +27 -8
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/services/globus-connect-server/client.js +2 -2
- package/dist/cjs/services/globus-connect-server/client.js.map +2 -2
- package/dist/esm/core/authorization/AuthorizationManager.d.ts +38 -5
- package/dist/esm/core/authorization/AuthorizationManager.d.ts.map +1 -1
- package/dist/esm/core/authorization/AuthorizationManager.js +37 -4
- package/dist/esm/core/authorization/AuthorizationManager.js.map +1 -1
- package/dist/esm/core/authorization/RedirectTransport.d.ts +2 -0
- package/dist/esm/core/authorization/RedirectTransport.d.ts.map +1 -1
- package/dist/esm/core/authorization/RedirectTransport.js.map +1 -1
- package/dist/esm/core/info/version.d.ts +1 -1
- package/dist/esm/core/info/version.js +1 -1
- package/dist/esm/index.d.ts +24 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +24 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/open-api/types/compute.d.ts +47 -21
- package/dist/esm/open-api/types/compute.d.ts.map +1 -1
- package/dist/esm/open-api/types/flows.d.ts +2623 -0
- package/dist/esm/open-api/types/flows.d.ts.map +1 -0
- package/dist/esm/open-api/types/flows.js +2 -0
- package/dist/esm/open-api/types/flows.js.map +1 -0
- package/dist/esm/open-api/types/gcs/v5.4.d.ts +1348 -1036
- package/dist/esm/open-api/types/gcs/v5.4.d.ts.map +1 -1
- package/dist/esm/open-api/types/search.d.ts +119 -11
- package/dist/esm/open-api/types/search.d.ts.map +1 -1
- package/dist/esm/open-api/types/timers.d.ts +185 -17
- package/dist/esm/open-api/types/timers.d.ts.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/services/flows/index.d.ts +1 -0
- package/dist/esm/services/flows/index.d.ts.map +1 -1
- package/dist/esm/services/flows/index.js.map +1 -1
- package/dist/esm/services/flows/service/flows.d.ts +19 -83
- package/dist/esm/services/flows/service/flows.d.ts.map +1 -1
- package/dist/esm/services/flows/service/flows.js.map +1 -1
- package/dist/esm/services/flows/service/runs.d.ts +17 -24
- package/dist/esm/services/flows/service/runs.d.ts.map +1 -1
- package/dist/esm/services/flows/service/runs.js.map +1 -1
- package/dist/esm/services/globus-connect-server/client.d.ts +55 -0
- package/dist/esm/services/globus-connect-server/client.d.ts.map +1 -1
- package/dist/esm/services/shared.js +1 -1
- package/dist/esm/services/shared.js.map +1 -1
- package/dist/esm/services/transfer/service/endpoint-manager/endpoint.d.ts +3 -3
- package/dist/esm/services/transfer/service/endpoint-manager/endpoint.d.ts.map +1 -1
- package/dist/esm/services/transfer/service/endpoint.d.ts +1 -0
- package/dist/esm/services/transfer/service/endpoint.d.ts.map +1 -1
- package/dist/esm/services/transfer/service/endpoint.js.map +1 -1
- package/dist/esm/services/transfer/service/task.d.ts +3 -3
- package/dist/esm/services/transfer/service/task.d.ts.map +1 -1
- package/dist/esm/services/transfer/types.d.ts +1 -1
- package/dist/esm/services/transfer/types.d.ts.map +1 -1
- package/dist/esm/services/transfer/utils.d.ts.map +1 -1
- package/dist/esm/services/transfer/utils.js +8 -3
- package/dist/esm/services/transfer/utils.js.map +1 -1
- package/dist/esm/services/types.d.ts +4 -0
- package/dist/esm/services/types.d.ts.map +1 -1
- package/dist/umd/globus.production.js +2 -2
- package/dist/umd/globus.production.js.map +2 -2
- package/package.json +5 -5
- package/dist/esm/open-api/types/timer.d.ts +0 -942
- package/dist/esm/open-api/types/timer.d.ts.map +0 -1
- package/dist/esm/open-api/types/timer.js +0 -2
- package/dist/esm/open-api/types/timer.js.map +0 -1
- package/dist/esm/services/timer/config.d.ts +0 -4
- package/dist/esm/services/timer/config.d.ts.map +0 -1
- package/dist/esm/services/timer/config.js +0 -10
- package/dist/esm/services/timer/config.js.map +0 -1
- package/dist/esm/services/timer/index.d.ts +0 -16
- package/dist/esm/services/timer/index.d.ts.map +0 -1
- package/dist/esm/services/timer/index.js +0 -15
- package/dist/esm/services/timer/index.js.map +0 -1
- package/dist/esm/services/timer/service/timer.d.ts +0 -32
- package/dist/esm/services/timer/service/timer.d.ts.map +0 -1
- package/dist/esm/services/timer/service/timer.js +0 -11
- package/dist/esm/services/timer/service/timer.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/info/index.ts", "../../../../src/core/info/private.ts", "../../../../src/core/info/version.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module Information\n * @description This module is mostly intended for internal use, but can be helpful\n * identifying information about the SDK package you are using at runtime.\n */\nimport { toString, isEnabled, CLIENT_INFO_HEADER } from './private.js';\nimport { VERSION as _VERSION } from './version.js';\n\nexport type Version = string;\n\n/**\n * The version of the `@globus/sdk` package that is in use.\n */\nexport const VERSION: Version = _VERSION;\n\nexport type Info = {\n product: string;\n version: Version;\n};\n\n/**\n * The client information identifier for this package.\n */\nexport const CLIENT_INFO: Info = {\n product: 'javascript-sdk',\n version: VERSION,\n};\n\nlet INFOS: Info[] = [CLIENT_INFO];\n\n/**\n * Add a client information identifier to the existing SDK information.\n */\nexport function addClientInfo(info: Info) {\n INFOS = INFOS.concat(info);\n}\n/**\n * Get the current client information as a string.\n */\nexport function getClientInfo(): string {\n return toString(INFOS);\n}\n\nexport function getClientInfoRequestHeaders(): Record<string, string> {\n if (!isEnabled()) {\n return {};\n }\n return {\n [CLIENT_INFO_HEADER]: getClientInfo(),\n };\n}\n", "import type { Info } from './index.js';\n\n/**\n * @private\n */\nexport const CLIENT_INFO_HEADER = `X-Globus-Client-Info`;\n\nlet ENABLED = true;\n/**\n * Disable the client information header from being included in requests (enabled by default).\n * @private\n */\nexport function disable() {\n ENABLED = false;\n}\n\n/**\n * Enables the client information header to be included in requests.\n * @private\n */\nexport function enable() {\n ENABLED = true;\n}\n\n/**\n * Whether or not the client information header should be sent with requests.\n * @private\n */\nexport function isEnabled() {\n return ENABLED;\n}\n\nconst INFOS_SEPERATOR = ';';\nconst INFO_ITEM_SEPARATOR = ',';\n\n/**\n * Exported for test purposes only.\n * @private\n */\nexport function toString(info: Info | Info[]) {\n const infos = Array.isArray(info) ? info : [info];\n return infos\n .map((i) =>\n Object.entries(i)\n .map(([key, value]) => `${key}=${value}`)\n .join(INFO_ITEM_SEPARATOR),\n )\n .join(INFOS_SEPERATOR);\n}\n", "// x-release-please-start-version\nexport const VERSION = '
|
|
4
|
+
"sourcesContent": ["/**\n * @module Information\n * @description This module is mostly intended for internal use, but can be helpful\n * identifying information about the SDK package you are using at runtime.\n */\nimport { toString, isEnabled, CLIENT_INFO_HEADER } from './private.js';\nimport { VERSION as _VERSION } from './version.js';\n\nexport type Version = string;\n\n/**\n * The version of the `@globus/sdk` package that is in use.\n */\nexport const VERSION: Version = _VERSION;\n\nexport type Info = {\n product: string;\n version: Version;\n};\n\n/**\n * The client information identifier for this package.\n */\nexport const CLIENT_INFO: Info = {\n product: 'javascript-sdk',\n version: VERSION,\n};\n\nlet INFOS: Info[] = [CLIENT_INFO];\n\n/**\n * Add a client information identifier to the existing SDK information.\n */\nexport function addClientInfo(info: Info) {\n INFOS = INFOS.concat(info);\n}\n/**\n * Get the current client information as a string.\n */\nexport function getClientInfo(): string {\n return toString(INFOS);\n}\n\nexport function getClientInfoRequestHeaders(): Record<string, string> {\n if (!isEnabled()) {\n return {};\n }\n return {\n [CLIENT_INFO_HEADER]: getClientInfo(),\n };\n}\n", "import type { Info } from './index.js';\n\n/**\n * @private\n */\nexport const CLIENT_INFO_HEADER = `X-Globus-Client-Info`;\n\nlet ENABLED = true;\n/**\n * Disable the client information header from being included in requests (enabled by default).\n * @private\n */\nexport function disable() {\n ENABLED = false;\n}\n\n/**\n * Enables the client information header to be included in requests.\n * @private\n */\nexport function enable() {\n ENABLED = true;\n}\n\n/**\n * Whether or not the client information header should be sent with requests.\n * @private\n */\nexport function isEnabled() {\n return ENABLED;\n}\n\nconst INFOS_SEPERATOR = ';';\nconst INFO_ITEM_SEPARATOR = ',';\n\n/**\n * Exported for test purposes only.\n * @private\n */\nexport function toString(info: Info | Info[]) {\n const infos = Array.isArray(info) ? info : [info];\n return infos\n .map((i) =>\n Object.entries(i)\n .map(([key, value]) => `${key}=${value}`)\n .join(INFO_ITEM_SEPARATOR),\n )\n .join(INFOS_SEPERATOR);\n}\n", "// x-release-please-start-version\nexport const VERSION = '6.0.0';\n// x-release-please-end\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,qBAAqB;AAElC,IAAI,UAAU;AAqBP,SAAS,YAAY;AAC1B,SAAO;AACT;AAEA,IAAM,kBAAkB;AACxB,IAAM,sBAAsB;AAMrB,SAAS,SAAS,MAAqB;AAC5C,QAAM,QAAQ,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;AAChD,SAAO,MACJ;AAAA,IAAI,CAAC,MACJ,OAAO,QAAQ,CAAC,EACb,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,EACvC,KAAK,mBAAmB;AAAA,EAC7B,EACC,KAAK,eAAe;AACzB;;;AC/CO,IAAM,UAAU;;;AFYhB,IAAMC,WAAmB;AAUzB,IAAM,cAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAASA;AACX;AAEA,IAAI,QAAgB,CAAC,WAAW;AAKzB,SAAS,cAAc,MAAY;AACxC,UAAQ,MAAM,OAAO,IAAI;AAC3B;AAIO,SAAS,gBAAwB;AACtC,SAAO,SAAS,KAAK;AACvB;AAEO,SAAS,8BAAsD;AACpE,MAAI,CAAC,UAAU,GAAG;AAChB,WAAO,CAAC;AAAA,EACV;AACA,SAAO;AAAA,IACL,CAAC,kBAAkB,GAAG,cAAc;AAAA,EACtC;AACF;",
|
|
6
6
|
"names": ["VERSION", "VERSION"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -72,7 +72,7 @@ function toString(info2) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
// src/core/info/version.ts
|
|
75
|
-
var VERSION = "
|
|
75
|
+
var VERSION = "6.0.0";
|
|
76
76
|
|
|
77
77
|
// src/core/info/index.ts
|
|
78
78
|
var VERSION2 = VERSION;
|
|
@@ -498,7 +498,7 @@ async function serviceRequest(config, options, passedSdkOptions) {
|
|
|
498
498
|
*/
|
|
499
499
|
...injectedFetchOptions.headers
|
|
500
500
|
};
|
|
501
|
-
const manager = sdkOptions?.manager;
|
|
501
|
+
const manager = options?.manager || sdkOptions?.manager;
|
|
502
502
|
let token2;
|
|
503
503
|
if (config.resource_server && manager) {
|
|
504
504
|
token2 = manager.tokens.getByResourceServer(config.resource_server);
|
|
@@ -1449,9 +1449,16 @@ var AuthorizationManager = class {
|
|
|
1449
1449
|
/**
|
|
1450
1450
|
* Initiate the login process by redirecting to the Globus Auth login page.
|
|
1451
1451
|
*
|
|
1452
|
-
* **IMPORTANT**: This method will reset the instance state before initiating the login process,
|
|
1453
|
-
* including clearing all tokens from storage
|
|
1454
|
-
* use the `AuthorizationManager.prompt` method.
|
|
1452
|
+
* **IMPORTANT**: This method will **reset the instance state before initiating the login process,
|
|
1453
|
+
* including clearing all tokens from storage**. If you need to maintain the current state,
|
|
1454
|
+
* use the `AuthorizationManager.prompt()` method.
|
|
1455
|
+
*
|
|
1456
|
+
* @example Passing parameters to the transport.
|
|
1457
|
+
* const result = await manager.login({
|
|
1458
|
+
* additionalParams: {
|
|
1459
|
+
* redirect_uri: '/oauth/redirect-uri-runtime-override',
|
|
1460
|
+
* },
|
|
1461
|
+
* });
|
|
1455
1462
|
*/
|
|
1456
1463
|
async login(options = { additionalParams: {} }) {
|
|
1457
1464
|
log("debug", "AuthorizationManager.login");
|
|
@@ -1465,6 +1472,13 @@ var AuthorizationManager = class {
|
|
|
1465
1472
|
}
|
|
1466
1473
|
/**
|
|
1467
1474
|
* Prompt the user to authenticate with Globus Auth.
|
|
1475
|
+
*
|
|
1476
|
+
* @example Passing parameters to the transport.
|
|
1477
|
+
* const result = await manager.prompt({
|
|
1478
|
+
* additionalParams: {
|
|
1479
|
+
* redirect_uri: '/oauth/redirect-uri-runtime-override',
|
|
1480
|
+
* },
|
|
1481
|
+
* });
|
|
1468
1482
|
*/
|
|
1469
1483
|
async prompt(options) {
|
|
1470
1484
|
log("debug", "AuthorizationManager.prompt");
|
|
@@ -2489,9 +2503,14 @@ function readableBytes(bytes, truncate = 2) {
|
|
|
2489
2503
|
}
|
|
2490
2504
|
return `${rendered} ${unit}`;
|
|
2491
2505
|
}
|
|
2492
|
-
var GLOBUS_DNS_DOMAINS = [
|
|
2506
|
+
var GLOBUS_DNS_DOMAINS = [
|
|
2507
|
+
"dnsteam.globuscs.info",
|
|
2508
|
+
"data.globus.org",
|
|
2509
|
+
"dn.glob.us",
|
|
2510
|
+
"gaccess.io"
|
|
2511
|
+
];
|
|
2493
2512
|
function isGlobusHostname(hostname) {
|
|
2494
|
-
return Boolean(GLOBUS_DNS_DOMAINS.find((d) => hostname.endsWith(d)));
|
|
2513
|
+
return Boolean(GLOBUS_DNS_DOMAINS.find((d) => hostname.endsWith(`.${d}`)));
|
|
2495
2514
|
}
|
|
2496
2515
|
function getDomainFromEndpoint(endpoint) {
|
|
2497
2516
|
const { tlsftp_server: tls } = endpoint;
|
|
@@ -2500,7 +2519,7 @@ function getDomainFromEndpoint(endpoint) {
|
|
|
2500
2519
|
}
|
|
2501
2520
|
const { hostname } = new URL(tls.replace("tlsftp", "https"));
|
|
2502
2521
|
const hasCustomDomain = !isGlobusHostname(hostname);
|
|
2503
|
-
const customDomain = hasCustomDomain && /(?:[gm]-\w{6}.)?(\w+(
|
|
2522
|
+
const customDomain = hasCustomDomain && /(?:[gm]-\w{6}.)?([\w-]+(\.[\w-]+)+)$/.exec(hostname)?.[1];
|
|
2504
2523
|
return customDomain || hostname || null;
|
|
2505
2524
|
}
|
|
2506
2525
|
|