@dremio/js-sdk 0.55.0 → 0.56.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.
@@ -17,6 +17,7 @@ const prodLikePattern = /^([^.]+)(\.(?:(?:eu\.)?dremio\.cloud|[^.]+\.dremio\.sit
17
17
  const privateLinkPattern = /^([^.]+\.)([^.]+)((\.privatelink\.dremio\.cloud)|(\.privatelink\.([^.]+)\.dremio\.site))$/;
18
18
  const daasEnginePattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.drem\.io)$/;
19
19
  const daasAzurePattern = /^([^.]+)(\.daas-azure\.drem\.io)$/;
20
+ const liftnShiftPattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.[^.]+\.drem\.io)$/;
20
21
  const awsInternalPattern = /^([^.]+)(\.([^.]+\.aws\.dremio\.site))$/;
21
22
  /**
22
23
  * @hidden
@@ -40,6 +41,10 @@ export function _replaceOriginResource(origin, resource) {
40
41
  url.hostname = hostname.replace(daasEnginePattern, `$1${resource}$3`);
41
42
  return url.origin;
42
43
  }
44
+ if (liftnShiftPattern.test(hostname)) {
45
+ url.hostname = hostname.replace(liftnShiftPattern, `$1${resource}$3`);
46
+ return url.origin;
47
+ }
43
48
  if (prodLikePattern.test(hostname)) {
44
49
  url.hostname = hostname.replace(prodLikePattern, `${resource}$2`);
45
50
  return url.origin;
@@ -1 +1 @@
1
- {"version":3,"file":"replaceOriginResource.js","sourceRoot":"","sources":["../../src/cloud/replaceOriginResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,eAAe,GAAG,6DAA6D,CAAC;AACtF,MAAM,kBAAkB,GACtB,2FAA2F,CAAC;AAC9F,MAAM,iBAAiB,GAAG,mDAAmD,CAAC;AAC9E,MAAM,gBAAgB,GAAG,mCAAmC,CAAC;AAC7D,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAErE;;;GAGG;AACH,MAA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cesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Config } from \"../common/Config.ts\";\n\nconst prodLikePattern = /^([^.]+)(\\.(?:(?:eu\\.)?dremio\\.cloud|[^.]+\\.dremio\\.site))$/;\nconst privateLinkPattern =\n /^([^.]+\\.)([^.]+)((\\.privatelink\\.dremio\\.cloud)|(\\.privatelink\\.([^.]+)\\.dremio\\.site))$/;\nconst daasEnginePattern = /^(dcs-(?:aws|cloud)-\\d+-ns\\.)([^.]+)(\\.drem\\.io)$/;\nconst daasAzurePattern = /^([^.]+)(\\.daas-azure\\.drem\\.io)$/;\nconst awsInternalPattern = /^([^.]+)(\\.([^.]+\\.aws\\.dremio\\.site))$/;\n\n/**\n * @hidden\n * @internal\n */\nexport function _replaceOriginResource(origin: Config[\"origin\"], resource: string): string {\n const url = new URL(origin);\n const hostname = url.hostname;\n\n if (awsInternalPattern.test(hostname)) {\n url.hostname = hostname.replace(awsInternalPattern, `${resource}$2`);\n }\n\n if (privateLinkPattern.test(hostname)) {\n url.hostname = hostname.replace(privateLinkPattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (daasAzurePattern.test(hostname)) {\n url.hostname = hostname.replace(daasAzurePattern, `${resource}$2`);\n return url.origin;\n }\n\n if (daasEnginePattern.test(hostname)) {\n url.hostname = hostname.replace(daasEnginePattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (prodLikePattern.test(hostname)) {\n url.hostname = hostname.replace(prodLikePattern, `${resource}$2`);\n return url.origin;\n }\n\n return url.origin;\n}\n"]}
1
+ {"version":3,"file":"repl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OAAO,CAAC,iBAAiB,EAAE,KAAK,QAAQ,IAAI,CAAC,CAAC;QACtE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,QAAQ,IAAI,CAAC,CAAC;QACtE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,QAAQ,IAAI,CAAC,CAAC;QAClE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,OAAO,GAAG,CAAC,MAAM,CAAC;AACpB,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Config } from \"../common/Config.ts\";\n\nconst prodLikePattern = /^([^.]+)(\\.(?:(?:eu\\.)?dremio\\.cloud|[^.]+\\.dremio\\.site))$/;\nconst privateLinkPattern =\n /^([^.]+\\.)([^.]+)((\\.privatelink\\.dremio\\.cloud)|(\\.privatelink\\.([^.]+)\\.dremio\\.site))$/;\nconst daasEnginePattern = /^(dcs-(?:aws|cloud)-\\d+-ns\\.)([^.]+)(\\.drem\\.io)$/;\nconst daasAzurePattern = /^([^.]+)(\\.daas-azure\\.drem\\.io)$/;\nconst liftnShiftPattern = /^(dcs-(?:aws|cloud)-\\d+-ns\\.)([^.]+)(\\.[^.]+\\.drem\\.io)$/;\nconst awsInternalPattern = /^([^.]+)(\\.([^.]+\\.aws\\.dremio\\.site))$/;\n\n/**\n * @hidden\n * @internal\n */\nexport function _replaceOriginResource(origin: Config[\"origin\"], resource: string): string {\n const url = new URL(origin);\n const hostname = url.hostname;\n\n if (awsInternalPattern.test(hostname)) {\n url.hostname = hostname.replace(awsInternalPattern, `${resource}$2`);\n }\n\n if (privateLinkPattern.test(hostname)) {\n url.hostname = hostname.replace(privateLinkPattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (daasAzurePattern.test(hostname)) {\n url.hostname = hostname.replace(daasAzurePattern, `${resource}$2`);\n return url.origin;\n }\n\n if (daasEnginePattern.test(hostname)) {\n url.hostname = hostname.replace(daasEnginePattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (liftnShiftPattern.test(hostname)) {\n url.hostname = hostname.replace(liftnShiftPattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (prodLikePattern.test(hostname)) {\n url.hostname = hostname.replace(prodLikePattern, `${resource}$2`);\n return url.origin;\n }\n\n return url.origin;\n}\n"]}
@@ -12649,6 +12649,7 @@ var DremioCloud = (() => {
12649
12649
  var privateLinkPattern = /^([^.]+\.)([^.]+)((\.privatelink\.dremio\.cloud)|(\.privatelink\.([^.]+)\.dremio\.site))$/;
12650
12650
  var daasEnginePattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.drem\.io)$/;
12651
12651
  var daasAzurePattern = /^([^.]+)(\.daas-azure\.drem\.io)$/;
12652
+ var liftnShiftPattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.[^.]+\.drem\.io)$/;
12652
12653
  var awsInternalPattern = /^([^.]+)(\.([^.]+\.aws\.dremio\.site))$/;
12653
12654
  function _replaceOriginResource(origin, resource) {
12654
12655
  const url = new URL(origin);
@@ -12668,6 +12669,10 @@ var DremioCloud = (() => {
12668
12669
  url.hostname = hostname2.replace(daasEnginePattern, `$1${resource}$3`);
12669
12670
  return url.origin;
12670
12671
  }
12672
+ if (liftnShiftPattern.test(hostname2)) {
12673
+ url.hostname = hostname2.replace(liftnShiftPattern, `$1${resource}$3`);
12674
+ return url.origin;
12675
+ }
12671
12676
  if (prodLikePattern.test(hostname2)) {
12672
12677
  url.hostname = hostname2.replace(prodLikePattern, `${resource}$2`);
12673
12678
  return url.origin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.55.0",
3
+ "version": "0.56.0",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",
@@ -43,8 +43,9 @@
43
43
  "docs": "typedoc src/oss/index.ts --hideGenerator --out ./docs/oss && typedoc src/enterprise/index.ts --hideGenerator --out ./docs/enterprise && typedoc src/cloud/index.ts --hideGenerator --out ./docs/cloud",
44
44
  "lint": "eslint src",
45
45
  "lint:fix": "eslint src --fix",
46
- "lint:prettier": "prettier src --check",
47
- "prepare": "node --run dist"
46
+ "lint:prettier": "prettier src test --check",
47
+ "prepare": "node --run dist",
48
+ "test": "node --test 'test/**/*.test.ts'"
48
49
  },
49
50
  "dependencies": {
50
51
  "dequal": "^2",