@globus/sdk 6.4.0 → 6.5.0-canary.10.d96e45f
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/dist/cjs/core/authorization/index.js +19 -5
- package/dist/cjs/core/authorization/index.js.map +4 -4
- package/dist/cjs/core/info/index.js +1 -1
- package/dist/cjs/core/info/index.js.map +1 -1
- package/dist/cjs/index.js +78 -15
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/services/globus-connect-server/client.js +19 -5
- package/dist/cjs/services/globus-connect-server/client.js.map +4 -4
- package/dist/esm/apps/web.d.ts +1 -1
- package/dist/esm/apps/web.d.ts.map +1 -1
- package/dist/esm/apps/web.js +3 -0
- package/dist/esm/apps/web.js.map +1 -1
- package/dist/esm/core/authorization/TokenManager.js.map +1 -1
- package/dist/esm/core/global.d.ts +1 -0
- package/dist/esm/core/global.d.ts.map +1 -1
- package/dist/esm/core/global.js +3 -0
- package/dist/esm/core/global.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/core/url.d.ts.map +1 -1
- package/dist/esm/core/url.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/open-api/types/compute.d.ts +28 -84
- package/dist/esm/open-api/types/compute.d.ts.map +1 -1
- package/dist/esm/open-api/types/flows.d.ts +4 -5
- package/dist/esm/open-api/types/flows.d.ts.map +1 -1
- package/dist/esm/open-api/types/gcs/v5.4.d.ts +330 -13
- package/dist/esm/open-api/types/gcs/v5.4.d.ts.map +1 -1
- package/dist/esm/open-api/types/search.d.ts +111 -6
- package/dist/esm/open-api/types/search.d.ts.map +1 -1
- package/dist/esm/open-api/types/transfer.d.ts +335 -244
- package/dist/esm/open-api/types/transfer.d.ts.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/services/auth/service/developers/clients/index.d.ts.map +1 -1
- package/dist/esm/services/auth/service/developers/clients/index.js.map +1 -1
- package/dist/esm/services/auth/service/oauth2/token.d.ts.map +1 -1
- package/dist/esm/services/auth/service/oauth2/token.js.map +1 -1
- package/dist/esm/services/compute/service/endpoints.d.ts.map +1 -1
- package/dist/esm/services/downloads/config.d.ts +4 -0
- package/dist/esm/services/downloads/config.d.ts.map +1 -0
- package/dist/esm/services/downloads/config.js +10 -0
- package/dist/esm/services/downloads/config.js.map +1 -0
- package/dist/esm/services/downloads/index.d.ts +71 -0
- package/dist/esm/services/downloads/index.d.ts.map +1 -0
- package/dist/esm/services/downloads/index.js +40 -0
- package/dist/esm/services/downloads/index.js.map +1 -0
- package/dist/esm/services/flows/service/flows.d.ts +1 -1
- package/dist/esm/services/flows/service/flows.d.ts.map +1 -1
- package/dist/esm/services/flows/service/runs.d.ts +4 -4
- package/dist/esm/services/flows/service/runs.d.ts.map +1 -1
- package/dist/esm/services/flows/service/web-inputs.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/client.d.ts +54 -8
- package/dist/esm/services/globus-connect-server/client.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/collections.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/endpoint.d.ts +23 -0
- package/dist/esm/services/globus-connect-server/service/endpoint.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/nodes.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/roles.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/storage-gateways.d.ts +4 -4
- package/dist/esm/services/globus-connect-server/service/storage-gateways.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/user-credentials.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/versioning.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/utils.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/utils.js +16 -8
- package/dist/esm/services/globus-connect-server/utils.js.map +1 -1
- package/dist/esm/services/search/service/task.d.ts.map +1 -1
- package/dist/esm/services/shared.d.ts.map +1 -1
- package/dist/esm/services/shared.js +6 -2
- package/dist/esm/services/shared.js.map +1 -1
- 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/stream-access-point.d.ts +3 -3
- package/dist/esm/services/transfer/service/stream-access-point.d.ts.map +1 -1
- package/dist/esm/services/transfer/service/tunnel.d.ts +9 -9
- package/dist/esm/services/transfer/service/tunnel.d.ts.map +1 -1
- package/dist/esm/services/transfer/service/v2/bookmarks.d.ts +10 -10
- package/dist/esm/services/transfer/service/v2/bookmarks.d.ts.map +1 -1
- package/dist/umd/globus.production.js +2 -2
- package/dist/umd/globus.production.js.map +4 -4
- package/package.json +24 -19
|
@@ -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 = '6.
|
|
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.5.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
|
@@ -32,6 +32,7 @@ __export(index_exports, {
|
|
|
32
32
|
auth: () => auth_exports,
|
|
33
33
|
authorization: () => authorization_exports,
|
|
34
34
|
compute: () => compute_exports,
|
|
35
|
+
downloads: () => downloads_exports,
|
|
35
36
|
errors: () => errors_exports,
|
|
36
37
|
flows: () => flows_exports2,
|
|
37
38
|
gcs: () => globus_connect_server_exports,
|
|
@@ -72,7 +73,7 @@ function toString(info2) {
|
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
// src/core/info/version.ts
|
|
75
|
-
var VERSION = "6.
|
|
76
|
+
var VERSION = "6.5.0";
|
|
76
77
|
|
|
77
78
|
// src/core/info/index.ts
|
|
78
79
|
var VERSION2 = VERSION;
|
|
@@ -304,6 +305,22 @@ var RESOURCE_SERVERS = {
|
|
|
304
305
|
[ID6]: "funcx_service"
|
|
305
306
|
};
|
|
306
307
|
|
|
308
|
+
// src/services/downloads/config.ts
|
|
309
|
+
var config_exports8 = {};
|
|
310
|
+
__export(config_exports8, {
|
|
311
|
+
HOSTS: () => HOSTS8,
|
|
312
|
+
ID: () => ID8
|
|
313
|
+
});
|
|
314
|
+
var ID8 = "DOWNLOADS";
|
|
315
|
+
var HOSTS8 = {
|
|
316
|
+
sandbox: "downloads.globus.org",
|
|
317
|
+
production: "downloads.globus.org",
|
|
318
|
+
staging: "downloads.globus.org",
|
|
319
|
+
integration: "downloads.globus.org",
|
|
320
|
+
test: "downloads.globus.org",
|
|
321
|
+
preview: "downloads.globus.org"
|
|
322
|
+
};
|
|
323
|
+
|
|
307
324
|
// src/core/errors.ts
|
|
308
325
|
var errors_exports = {};
|
|
309
326
|
__export(errors_exports, {
|
|
@@ -393,7 +410,8 @@ var SERVICES = {
|
|
|
393
410
|
[ID4]: ID4,
|
|
394
411
|
[ID5]: ID5,
|
|
395
412
|
[ID3]: ID3,
|
|
396
|
-
[ID6]: ID6
|
|
413
|
+
[ID6]: ID6,
|
|
414
|
+
[ID8]: ID8
|
|
397
415
|
};
|
|
398
416
|
var SERVICE_HOSTS = {
|
|
399
417
|
[ID7]: HOSTS7,
|
|
@@ -402,7 +420,8 @@ var SERVICE_HOSTS = {
|
|
|
402
420
|
[ID4]: HOSTS4,
|
|
403
421
|
[ID5]: HOSTS5,
|
|
404
422
|
[ID3]: HOSTS3,
|
|
405
|
-
[ID6]: HOSTS6
|
|
423
|
+
[ID6]: HOSTS6,
|
|
424
|
+
[ID8]: HOSTS8
|
|
406
425
|
};
|
|
407
426
|
function getSDKOptions(options) {
|
|
408
427
|
let globalOptions = env("GLOBUS_SDK_OPTIONS", {});
|
|
@@ -539,11 +558,12 @@ async function serviceRequest(config, options, passedSdkOptions) {
|
|
|
539
558
|
* Only attempt to get a token if the `service` property is a string or has an `endpoint_id` property (GCSConfiguration).
|
|
540
559
|
*/
|
|
541
560
|
(typeof config.service === "string" || "endpoint_id" in config.service)) {
|
|
542
|
-
const
|
|
561
|
+
const resourceServers = RESOURCE_SERVERS;
|
|
562
|
+
const resourceServer = typeof config.service === "string" ? resourceServers[config.service] : (
|
|
543
563
|
// For `GCSConfiguration` objects, the `endpoint_id` is the resource server.
|
|
544
564
|
config.service.endpoint_id
|
|
545
565
|
);
|
|
546
|
-
token2 = manager.tokens.getByResourceServer(resourceServer);
|
|
566
|
+
token2 = resourceServer ? manager.tokens.getByResourceServer(resourceServer) : null;
|
|
547
567
|
if (token2) {
|
|
548
568
|
headers["Authorization"] = `Bearer ${token2.access_token}`;
|
|
549
569
|
}
|
|
@@ -5496,19 +5516,23 @@ __export(utils_exports3, {
|
|
|
5496
5516
|
getEndpointIdFromURL: () => getEndpointIdFromURL,
|
|
5497
5517
|
getGCSDomainFromURL: () => getGCSDomainFromURL
|
|
5498
5518
|
});
|
|
5499
|
-
var
|
|
5519
|
+
var GCS_DEFAULT_DOMAINS = ["data.globus.org", "gaccess.io"];
|
|
5520
|
+
function getDefaultDomain(hostname) {
|
|
5521
|
+
return GCS_DEFAULT_DOMAINS.find((d) => hostname.endsWith(`.${d}`));
|
|
5522
|
+
}
|
|
5500
5523
|
function getGCSDomainFromURL(url2) {
|
|
5501
|
-
const { host: host2 } = typeof url2 === "string" ? new URL(url2) : url2;
|
|
5502
|
-
|
|
5524
|
+
const { host: host2, hostname } = typeof url2 === "string" ? new URL(url2) : url2;
|
|
5525
|
+
const defaultDomain = getDefaultDomain(hostname);
|
|
5526
|
+
if (!defaultDomain) {
|
|
5503
5527
|
return host2;
|
|
5504
5528
|
}
|
|
5505
|
-
const
|
|
5529
|
+
const subdomain = hostname.slice(0, -`.${defaultDomain}`.length);
|
|
5506
5530
|
const parts = subdomain.split(".");
|
|
5507
|
-
return (parts.length === 2 ? [...parts,
|
|
5531
|
+
return (parts.length === 2 ? [...parts, defaultDomain] : [parts[1], parts[2], defaultDomain]).join(".");
|
|
5508
5532
|
}
|
|
5509
5533
|
async function getEndpointIdFromURL(url2) {
|
|
5510
5534
|
const u = typeof url2 === "string" ? new URL(url2) : url2;
|
|
5511
|
-
const isCustomDomain = !u.
|
|
5535
|
+
const isCustomDomain = !getDefaultDomain(u.hostname);
|
|
5512
5536
|
if (isCustomDomain) {
|
|
5513
5537
|
return null;
|
|
5514
5538
|
}
|
|
@@ -5808,15 +5832,50 @@ var next44 = {
|
|
|
5808
5832
|
// src/services/compute/index.ts
|
|
5809
5833
|
var CONFIG7 = config_exports6;
|
|
5810
5834
|
|
|
5835
|
+
// src/services/downloads/index.ts
|
|
5836
|
+
var downloads_exports = {};
|
|
5837
|
+
__export(downloads_exports, {
|
|
5838
|
+
CONFIG: () => CONFIG8,
|
|
5839
|
+
releases: () => releases
|
|
5840
|
+
});
|
|
5841
|
+
var CONFIG8 = config_exports8;
|
|
5842
|
+
var releases = {
|
|
5843
|
+
gcs: {
|
|
5844
|
+
/**
|
|
5845
|
+
* @description Retrieves the current version metadata for Globus Connect Server (GCS)
|
|
5846
|
+
*/
|
|
5847
|
+
current: createServiceMethodFactory({
|
|
5848
|
+
service: ID8,
|
|
5849
|
+
path: `releases/gcs/current`
|
|
5850
|
+
}).generate(),
|
|
5851
|
+
/**
|
|
5852
|
+
* @description Retrieves all available version metadata for Globus Connect Server (GCS)
|
|
5853
|
+
*/
|
|
5854
|
+
all: createServiceMethodFactory({
|
|
5855
|
+
service: ID8,
|
|
5856
|
+
path: `releases/gcs/all`
|
|
5857
|
+
}).generate()
|
|
5858
|
+
},
|
|
5859
|
+
gcp: {
|
|
5860
|
+
/**
|
|
5861
|
+
* @description Retrieves the current version metadata for Globus Connect Personal (GCP)
|
|
5862
|
+
*/
|
|
5863
|
+
current: createServiceMethodFactory({
|
|
5864
|
+
service: ID8,
|
|
5865
|
+
path: `releases/gcp/current`
|
|
5866
|
+
}).generate()
|
|
5867
|
+
}
|
|
5868
|
+
};
|
|
5869
|
+
|
|
5811
5870
|
// src/apps/web.ts
|
|
5812
5871
|
var web_exports = {};
|
|
5813
5872
|
__export(web_exports, {
|
|
5814
|
-
HOSTS: () =>
|
|
5873
|
+
HOSTS: () => HOSTS9,
|
|
5815
5874
|
host: () => host,
|
|
5816
5875
|
url: () => url,
|
|
5817
5876
|
urlFor: () => urlFor
|
|
5818
5877
|
});
|
|
5819
|
-
var
|
|
5878
|
+
var HOSTS9 = {
|
|
5820
5879
|
integration: "app.integration.globuscs.info",
|
|
5821
5880
|
sandbox: "app.sandbox.globuscs.info",
|
|
5822
5881
|
test: "app.test.globuscs.info",
|
|
@@ -5825,7 +5884,7 @@ var HOSTS8 = {
|
|
|
5825
5884
|
production: "app.globus.org"
|
|
5826
5885
|
};
|
|
5827
5886
|
function host(env2 = getEnvironment()) {
|
|
5828
|
-
return
|
|
5887
|
+
return HOSTS9[env2];
|
|
5829
5888
|
}
|
|
5830
5889
|
function url(path, sdkOptions) {
|
|
5831
5890
|
return new URL(path || "", `https://${host(sdkOptions?.environment)}`);
|
|
@@ -5833,7 +5892,10 @@ function url(path, sdkOptions) {
|
|
|
5833
5892
|
var WEBAPP_URLS = {
|
|
5834
5893
|
TASK: "/activity/%s/overview",
|
|
5835
5894
|
COLLECTION: "/file-manager/collections/%s/overview",
|
|
5836
|
-
ENDPOINT: "/file-manager/collections/%s/overview"
|
|
5895
|
+
ENDPOINT: "/file-manager/collections/%s/overview",
|
|
5896
|
+
GROUP: "/groups/%s",
|
|
5897
|
+
SUBSCRIPTION: "/groups/%s",
|
|
5898
|
+
FLOW: "/flows/%s"
|
|
5837
5899
|
};
|
|
5838
5900
|
function urlFor(identifier, segments, sdkOptions) {
|
|
5839
5901
|
const path = WEBAPP_URLS[identifier].replace(/%s/g, segments?.join("/") || "");
|
|
@@ -5844,6 +5906,7 @@ function urlFor(identifier, segments, sdkOptions) {
|
|
|
5844
5906
|
auth,
|
|
5845
5907
|
authorization,
|
|
5846
5908
|
compute,
|
|
5909
|
+
downloads,
|
|
5847
5910
|
errors,
|
|
5848
5911
|
flows,
|
|
5849
5912
|
gcs,
|