@xata.io/client 0.30.0 → 0.30.1

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @xata.io/client@0.30.0 add-version /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.30.1 add-version /home/runner/work/client-ts/client-ts/packages/client
3
3
  > node ../../scripts/add-version-file.mjs
4
4
 
@@ -1,13 +1,13 @@
1
1
 
2
- > @xata.io/client@0.30.0 build /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.30.1 build /home/runner/work/client-ts/client-ts/packages/client
3
3
  > rimraf dist && rollup -c
4
4
 
5
5
  
6
6
  src/index.ts → dist/index.cjs...
7
- created dist/index.cjs in 1.4s
7
+ created dist/index.cjs in 1.3s
8
8
  
9
9
  src/index.ts → dist/index.mjs...
10
- created dist/index.mjs in 885ms
10
+ created dist/index.mjs in 849ms
11
11
  
12
12
  src/index.ts → dist/index.d.ts...
13
- created dist/index.d.ts in 4.9s
13
+ created dist/index.d.ts in 5.3s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @xata.io/client
2
2
 
3
+ ## 0.30.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1604](https://github.com/xataio/client-ts/pull/1604) [`8fe6fbf`](https://github.com/xataio/client-ts/commit/8fe6fbf3e6f0983723d770c942a5a202eee6fb8f) Thanks [@SferaDev](https://github.com/SferaDev)! - Update dependencies
8
+
3
9
  ## 0.30.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -2160,6 +2160,7 @@ function getLines(onLine) {
2160
2160
  fieldLength = position - lineStart;
2161
2161
  }
2162
2162
  break;
2163
+ // @ts-ignore:7029 \r case below should fallthrough to \n:
2163
2164
  case 13 /* CarriageReturn */:
2164
2165
  discardTrailingNewline = true;
2165
2166
  case 10 /* NewLine */:
@@ -2296,7 +2297,7 @@ function defaultOnOpen(response) {
2296
2297
  }
2297
2298
  }
2298
2299
 
2299
- const VERSION = "0.30.0";
2300
+ const VERSION = "0.30.1";
2300
2301
 
2301
2302
  class ErrorWithCause extends Error {
2302
2303
  constructor(message, options) {
@@ -2405,7 +2406,7 @@ const resolveUrl = (url, queryParams = {}, pathParams = {}) => {
2405
2406
  const query = new URLSearchParams(cleanQueryParams).toString();
2406
2407
  const queryString = query.length > 0 ? `?${query}` : "";
2407
2408
  const cleanPathParams = Object.entries(pathParams).reduce((acc, [key, value]) => {
2408
- return { ...acc, [key]: encodeURIComponent(String(value ?? "")).replace("%3A", ":") };
2409
+ return { ...acc, [key]: encodeURIComponent(String(value ?? "")).replace(/%3A/g, ":") };
2409
2410
  }, {});
2410
2411
  return url.replace(/\{\w*\}/g, (key) => cleanPathParams[key.slice(1, -1)]) + queryString;
2411
2412
  };
@@ -2608,6 +2609,18 @@ function parseUrl(url) {
2608
2609
 
2609
2610
  const dataPlaneFetch = async (options) => fetch$1({ ...options, endpoint: "dataPlane" });
2610
2611
 
2612
+ const getTasks = (variables, signal) => dataPlaneFetch({
2613
+ url: "/tasks",
2614
+ method: "get",
2615
+ ...variables,
2616
+ signal
2617
+ });
2618
+ const getTaskStatus = (variables, signal) => dataPlaneFetch({
2619
+ url: "/tasks/{taskId}",
2620
+ method: "get",
2621
+ ...variables,
2622
+ signal
2623
+ });
2611
2624
  const listClusterBranches = (variables, signal) => dataPlaneFetch({
2612
2625
  url: "/cluster/{clusterId}/branches",
2613
2626
  method: "get",
@@ -2711,6 +2724,7 @@ const getDatabaseSettings = (variables, signal) => dataPlaneFetch({
2711
2724
  signal
2712
2725
  });
2713
2726
  const updateDatabaseSettings = (variables, signal) => dataPlaneFetch({ url: "/dbs/{dbName}/settings", method: "patch", ...variables, signal });
2727
+ const createBranchAsync = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/async", method: "put", ...variables, signal });
2714
2728
  const getBranchDetails = (variables, signal) => dataPlaneFetch({
2715
2729
  url: "/db/{dbBranchName}",
2716
2730
  method: "get",
@@ -3103,6 +3117,7 @@ const sqlBatchQuery = (variables, signal) => dataPlaneFetch({
3103
3117
  signal
3104
3118
  });
3105
3119
  const operationsByTag$2 = {
3120
+ tasks: { getTasks, getTaskStatus },
3106
3121
  cluster: {
3107
3122
  listClusterBranches,
3108
3123
  listClusterExtensions,
@@ -3136,6 +3151,7 @@ const operationsByTag$2 = {
3136
3151
  },
3137
3152
  branch: {
3138
3153
  getBranchList,
3154
+ createBranchAsync,
3139
3155
  getBranchDetails,
3140
3156
  createBranch,
3141
3157
  deleteBranch,
@@ -5066,7 +5082,7 @@ class SimpleCache {
5066
5082
  __privateGet$2(this, _map).set(key, value);
5067
5083
  if (__privateGet$2(this, _map).size > this.capacity) {
5068
5084
  const leastRecentlyUsed = __privateGet$2(this, _map).keys().next().value;
5069
- await this.delete(leastRecentlyUsed);
5085
+ if (leastRecentlyUsed) await this.delete(leastRecentlyUsed);
5070
5086
  }
5071
5087
  }
5072
5088
  async delete(key) {
@@ -5642,6 +5658,7 @@ exports.completeMigration = completeMigration;
5642
5658
  exports.contains = contains;
5643
5659
  exports.copyBranch = copyBranch;
5644
5660
  exports.createBranch = createBranch;
5661
+ exports.createBranchAsync = createBranchAsync;
5645
5662
  exports.createCluster = createCluster;
5646
5663
  exports.createDatabase = createDatabase;
5647
5664
  exports.createMigrationRequest = createMigrationRequest;
@@ -5706,6 +5723,8 @@ exports.getSchema = getSchema;
5706
5723
  exports.getSchemas = getSchemas;
5707
5724
  exports.getTableColumns = getTableColumns;
5708
5725
  exports.getTableSchema = getTableSchema;
5726
+ exports.getTaskStatus = getTaskStatus;
5727
+ exports.getTasks = getTasks;
5709
5728
  exports.getUser = getUser;
5710
5729
  exports.getUserAPIKeys = getUserAPIKeys;
5711
5730
  exports.getUserOAuthAccessTokens = getUserOAuthAccessTokens;