@xata.io/client 0.9.0 → 0.9.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.
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs +52 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +252 -61
- package/dist/index.mjs +49 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# @xata.io/client
|
2
2
|
|
3
|
+
## 0.9.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#250](https://github.com/xataio/client-ts/pull/250) [`5d7c9e4`](https://github.com/xataio/client-ts/commit/5d7c9e4fa2799255e2bfc8b6fb12c89dc4e1f35e) Thanks [@xata-bot](https://github.com/xata-bot)! - Add branch resolution endpoints to api client
|
8
|
+
|
9
|
+
* [#261](https://github.com/xataio/client-ts/pull/261) [`e95f20a`](https://github.com/xataio/client-ts/commit/e95f20a7bce264936680353f816065fa379448fc) Thanks [@gimenete](https://github.com/gimenete)! - Fixes a compatibility error in CloudFlare workers with latest version of wrangler
|
10
|
+
|
3
11
|
## 0.9.0
|
4
12
|
|
5
13
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
@@ -38,7 +38,10 @@ function getEnvVariable(name) {
|
|
38
38
|
}
|
39
39
|
async function getGitBranch() {
|
40
40
|
try {
|
41
|
-
|
41
|
+
if (typeof require === "function") {
|
42
|
+
const req = require;
|
43
|
+
return req("child_process").execSync("git branch --show-current", { encoding: "utf-8" }).trim();
|
44
|
+
}
|
42
45
|
} catch (err) {
|
43
46
|
}
|
44
47
|
try {
|
@@ -252,6 +255,14 @@ const deleteDatabase = (variables) => fetch$1({
|
|
252
255
|
method: "delete",
|
253
256
|
...variables
|
254
257
|
});
|
258
|
+
const getGitBranchesMapping = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "get", ...variables });
|
259
|
+
const addGitBranchesEntry = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "post", ...variables });
|
260
|
+
const removeGitBranchesEntry = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "delete", ...variables });
|
261
|
+
const resolveBranch = (variables) => fetch$1({
|
262
|
+
url: "/dbs/{dbName}/resolveBranch",
|
263
|
+
method: "get",
|
264
|
+
...variables
|
265
|
+
});
|
255
266
|
const getBranchDetails = (variables) => fetch$1({
|
256
267
|
url: "/db/{dbBranchName}",
|
257
268
|
method: "get",
|
@@ -380,7 +391,15 @@ const operationsByTag = {
|
|
380
391
|
resendWorkspaceMemberInvite,
|
381
392
|
acceptWorkspaceMemberInvite
|
382
393
|
},
|
383
|
-
database: {
|
394
|
+
database: {
|
395
|
+
getDatabaseList,
|
396
|
+
createDatabase,
|
397
|
+
deleteDatabase,
|
398
|
+
getGitBranchesMapping,
|
399
|
+
addGitBranchesEntry,
|
400
|
+
removeGitBranchesEntry,
|
401
|
+
resolveBranch
|
402
|
+
},
|
384
403
|
branch: {
|
385
404
|
getBranchList,
|
386
405
|
getBranchDetails,
|
@@ -640,6 +659,33 @@ class DatabaseApi {
|
|
640
659
|
...this.extraProps
|
641
660
|
});
|
642
661
|
}
|
662
|
+
getGitBranchesMapping(workspace, dbName) {
|
663
|
+
return operationsByTag.database.getGitBranchesMapping({
|
664
|
+
pathParams: { workspace, dbName },
|
665
|
+
...this.extraProps
|
666
|
+
});
|
667
|
+
}
|
668
|
+
addGitBranchesEntry(workspace, dbName, body) {
|
669
|
+
return operationsByTag.database.addGitBranchesEntry({
|
670
|
+
pathParams: { workspace, dbName },
|
671
|
+
body,
|
672
|
+
...this.extraProps
|
673
|
+
});
|
674
|
+
}
|
675
|
+
removeGitBranchesEntry(workspace, dbName, gitBranch) {
|
676
|
+
return operationsByTag.database.removeGitBranchesEntry({
|
677
|
+
pathParams: { workspace, dbName },
|
678
|
+
queryParams: { gitBranch },
|
679
|
+
...this.extraProps
|
680
|
+
});
|
681
|
+
}
|
682
|
+
resolveBranch(workspace, dbName, gitBranch) {
|
683
|
+
return operationsByTag.database.resolveBranch({
|
684
|
+
pathParams: { workspace, dbName },
|
685
|
+
queryParams: { gitBranch },
|
686
|
+
...this.extraProps
|
687
|
+
});
|
688
|
+
}
|
643
689
|
}
|
644
690
|
class BranchApi {
|
645
691
|
constructor(extraProps) {
|
@@ -1825,6 +1871,7 @@ exports.XataApiPlugin = XataApiPlugin;
|
|
1825
1871
|
exports.XataError = XataError;
|
1826
1872
|
exports.XataPlugin = XataPlugin;
|
1827
1873
|
exports.acceptWorkspaceMemberInvite = acceptWorkspaceMemberInvite;
|
1874
|
+
exports.addGitBranchesEntry = addGitBranchesEntry;
|
1828
1875
|
exports.addTableColumn = addTableColumn;
|
1829
1876
|
exports.buildClient = buildClient;
|
1830
1877
|
exports.bulkInsertTableRecords = bulkInsertTableRecords;
|
@@ -1859,6 +1906,7 @@ exports.getCurrentBranchDetails = getCurrentBranchDetails;
|
|
1859
1906
|
exports.getCurrentBranchName = getCurrentBranchName;
|
1860
1907
|
exports.getDatabaseList = getDatabaseList;
|
1861
1908
|
exports.getDatabaseURL = getDatabaseURL;
|
1909
|
+
exports.getGitBranchesMapping = getGitBranchesMapping;
|
1862
1910
|
exports.getRecord = getRecord;
|
1863
1911
|
exports.getTableColumns = getTableColumns;
|
1864
1912
|
exports.getTableSchema = getTableSchema;
|
@@ -1887,8 +1935,10 @@ exports.notExists = notExists;
|
|
1887
1935
|
exports.operationsByTag = operationsByTag;
|
1888
1936
|
exports.pattern = pattern;
|
1889
1937
|
exports.queryTable = queryTable;
|
1938
|
+
exports.removeGitBranchesEntry = removeGitBranchesEntry;
|
1890
1939
|
exports.removeWorkspaceMember = removeWorkspaceMember;
|
1891
1940
|
exports.resendWorkspaceMemberInvite = resendWorkspaceMemberInvite;
|
1941
|
+
exports.resolveBranch = resolveBranch;
|
1892
1942
|
exports.searchBranch = searchBranch;
|
1893
1943
|
exports.setTableSchema = setTableSchema;
|
1894
1944
|
exports.startsWith = startsWith;
|