@xata.io/client 0.28.3 → 0.28.4

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.28.3 add-version /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.28.4 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.28.3 build /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.28.4 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 742ms
7
+ created dist/index.cjs in 1.1s
8
8
  
9
9
  src/index.ts → dist/index.mjs...
10
- created dist/index.mjs in 472ms
10
+ created dist/index.mjs in 767ms
11
11
  
12
12
  src/index.ts → dist/index.d.ts...
13
- created dist/index.d.ts in 5.2s
13
+ created dist/index.d.ts in 5.3s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @xata.io/client
2
2
 
3
+ ## 0.28.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1309](https://github.com/xataio/client-ts/pull/1309) [`adc961b`](https://github.com/xataio/client-ts/commit/adc961b886b789010e6512c17cb2377eceab665a) Thanks [@andrew-farries](https://github.com/andrew-farries)! - Add CLI support for running against local development environments
8
+
9
+ - [#1312](https://github.com/xataio/client-ts/pull/1312) [`6031a9d`](https://github.com/xataio/client-ts/commit/6031a9de63c264b7db5b031bb1795258c2bf8150) Thanks [@SferaDev](https://github.com/SferaDev)! - Add get to transactions
10
+
3
11
  ## 0.28.3
4
12
 
5
13
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -528,7 +528,7 @@ function defaultOnOpen(response) {
528
528
  }
529
529
  }
530
530
 
531
- const VERSION = "0.28.3";
531
+ const VERSION = "0.28.4";
532
532
 
533
533
  class ErrorWithCause extends Error {
534
534
  constructor(message, options) {
@@ -591,6 +591,10 @@ const providers = {
591
591
  dev: {
592
592
  main: "https://api.dev-xata.dev",
593
593
  workspaces: "https://{workspaceId}.{region}.dev-xata.dev"
594
+ },
595
+ local: {
596
+ main: "http://localhost:6001",
597
+ workspaces: "http://{workspaceId}.{region}.localhost:6001"
594
598
  }
595
599
  };
596
600
  function isHostProviderAlias(alias) {
@@ -619,7 +623,8 @@ function parseWorkspacesUrlParts(url) {
619
623
  const matches = {
620
624
  production: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.xata\.sh.*/),
621
625
  staging: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.staging-xata\.dev.*/),
622
- dev: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.dev-xata\.dev.*/)
626
+ dev: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.dev-xata\.dev.*/),
627
+ local: url.match(/(?:https?:\/\/)?([^.]+)(?:\.([^.]+))\.localhost:(\d+)/)
623
628
  };
624
629
  const [host, match] = Object.entries(matches).find(([, match2]) => match2 !== null) ?? [];
625
630
  if (!isHostProviderAlias(host) || !match)
@@ -718,7 +723,7 @@ async function fetch$1({
718
723
  async ({ setAttributes }) => {
719
724
  const baseUrl = buildBaseUrl({ method, endpoint, path, workspacesApiUrl, pathParams, apiUrl });
720
725
  const fullUrl = resolveUrl(baseUrl, queryParams, pathParams);
721
- const url = fullUrl.includes("localhost") ? fullUrl.replace(/^[^.]+\./, "http://") : fullUrl;
726
+ const url = fullUrl.includes("localhost") ? fullUrl.replace(/^[^.]+\.[^.]+\./, "http://") : fullUrl;
722
727
  setAttributes({
723
728
  [TraceAttributes.HTTP_URL]: url,
724
729
  [TraceAttributes.HTTP_TARGET]: resolveUrl(path, queryParams, pathParams)
@@ -855,6 +860,7 @@ const pgRollJobStatus = (variables, signal) => dataPlaneFetch({
855
860
  ...variables,
856
861
  signal
857
862
  });
863
+ const pgRollMigrationHistory = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/pgroll/migrations", method: "get", ...variables, signal });
858
864
  const getBranchList = (variables, signal) => dataPlaneFetch({
859
865
  url: "/dbs/{dbName}",
860
866
  method: "get",
@@ -1078,6 +1084,7 @@ const operationsByTag$2 = {
1078
1084
  applyMigration,
1079
1085
  pgRollStatus,
1080
1086
  pgRollJobStatus,
1087
+ pgRollMigrationHistory,
1081
1088
  getBranchList,
1082
1089
  getBranchDetails,
1083
1090
  createBranch,
@@ -1258,12 +1265,7 @@ const updateWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ u
1258
1265
  const cancelWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteId}", method: "delete", ...variables, signal });
1259
1266
  const acceptWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteKey}/accept", method: "post", ...variables, signal });
1260
1267
  const resendWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteId}/resend", method: "post", ...variables, signal });
1261
- const listClusters = (variables, signal) => controlPlaneFetch({
1262
- url: "/workspaces/{workspaceId}/clusters",
1263
- method: "get",
1264
- ...variables,
1265
- signal
1266
- });
1268
+ const listClusters = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/clusters", method: "get", ...variables, signal });
1267
1269
  const createCluster = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/clusters", method: "post", ...variables, signal });
1268
1270
  const getCluster = (variables, signal) => controlPlaneFetch({
1269
1271
  url: "/workspaces/{workspaceId}/clusters/{clusterId}",
@@ -4952,6 +4954,7 @@ exports.parseProviderString = parseProviderString;
4952
4954
  exports.parseWorkspacesUrlParts = parseWorkspacesUrlParts;
4953
4955
  exports.pattern = pattern;
4954
4956
  exports.pgRollJobStatus = pgRollJobStatus;
4957
+ exports.pgRollMigrationHistory = pgRollMigrationHistory;
4955
4958
  exports.pgRollStatus = pgRollStatus;
4956
4959
  exports.previewBranchSchemaEdit = previewBranchSchemaEdit;
4957
4960
  exports.pushBranchMigrations = pushBranchMigrations;