@pickaxe/driftstone 1.0.6 → 1.1.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.
package/LICENSE CHANGED
@@ -1 +1 @@
1
- UNLICENSED
1
+ UNLICENSED
package/README.md CHANGED
@@ -1,102 +1,102 @@
1
- # Driftstone TypeScript
2
-
3
- TypeScript SDK for the Driftstone repository API.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install driftstone
9
- ```
10
-
11
- ## Quick Start
12
-
13
- ```ts
14
- import { Driftstone } from "driftstone";
15
-
16
- const client = new Driftstone({ apiKey: "dk-..." });
17
-
18
- const repo = await client.repos.create("hello-world");
19
-
20
- const upload = await client.repos.createUpload("hello-world", {
21
- storageDir: "ver-1234abcd",
22
- branch: "main",
23
- files: [{ name: "README.md", hash: "64-character-sha256-or-client-hash" }],
24
- });
25
-
26
- await client.uploadFiles(upload, upload.uploadUrls, ".");
27
- await client.repos.completeUpload("hello-world", upload.uploadId);
28
-
29
- const download = await client.repos.createDownload("hello-world", {
30
- type: "main",
31
- files: [{ path: "ver-1234abcd/README.md" }],
32
- });
33
-
34
- console.log(repo.id, download.downloadUrls);
35
- ```
36
-
37
- ## Configuration
38
-
39
- ```ts
40
- const client = new Driftstone({
41
- apiKey: "dk-...",
42
- version: "v1",
43
- timeout: 30_000,
44
- baseUrl: "https://api.driftstone.ai",
45
- });
46
- ```
47
-
48
- The default base URL mirrors the Python SDK. Set `baseUrl` when targeting a custom deployment or the public custom domain.
49
-
50
- ## Repositories
51
-
52
- ```ts
53
- await client.repos.create("hello-world");
54
- await client.repos.list({ page: 1, pageSize: 10 });
55
- await client.repos.get("hello-world");
56
- await client.repos.delete("hello-world");
57
- ```
58
-
59
- ## Branches
60
-
61
- ```ts
62
- await client.repos.createBranch("hello-world", "feature-readme", {
63
- storageDir: "state-123",
64
- transforms: {
65
- "README.md": "# Example Repo\nUpdated content.\n",
66
- },
67
- });
68
-
69
- await client.repos.listBranches("hello-world");
70
- await client.repos.getBranch("hello-world", "feature-readme");
71
- await client.repos.deleteBranch("hello-world", "feature-readme");
72
- ```
73
-
74
- ## Uploads And Downloads
75
-
76
- ```ts
77
- const upload = await client.repos.createUpload("hello-world", {
78
- storageDir: "ver-1234abcd",
79
- files: [{ name: "README.md", hash: "sha256-or-client-hash" }],
80
- });
81
-
82
- await client.uploadFiles(upload, upload.uploadUrls, ".");
83
- await client.repos.completeUpload("hello-world", upload.uploadId);
84
-
85
- const files = await client.repos.createDirectoryDownload("hello-world", {
86
- type: "main",
87
- directory: "ver-1234abcd",
88
- });
89
- ```
90
-
91
- ## Directory Copies
92
-
93
- ```ts
94
- const copy = await client.repos.copyDirectory("hello-world", {
95
- sourceDir: "ver-1234abcd",
96
- destDir: "state-456",
97
- sourceBranch: "main",
98
- destBranch: "feature-readme",
99
- });
100
-
101
- const status = await client.repos.getCopyStatus("hello-world", copy.runId);
102
- ```
1
+ # Driftstone TypeScript
2
+
3
+ TypeScript SDK for the Driftstone repository API.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install driftstone
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```ts
14
+ import { Driftstone } from "driftstone";
15
+
16
+ const client = new Driftstone({ apiKey: "dk-..." });
17
+
18
+ const repo = await client.repos.create("hello-world");
19
+
20
+ const upload = await client.repos.createUpload("hello-world", {
21
+ storageDir: "ver-1234abcd",
22
+ branch: "main",
23
+ files: [{ name: "README.md", hash: "64-character-sha256-or-client-hash" }],
24
+ });
25
+
26
+ await client.uploadFiles(upload, upload.uploadUrls, ".");
27
+ await client.repos.completeUpload("hello-world", upload.uploadId);
28
+
29
+ const download = await client.repos.createDownload("hello-world", {
30
+ type: "main",
31
+ files: [{ path: "ver-1234abcd/README.md" }],
32
+ });
33
+
34
+ console.log(repo.id, download.downloadUrls);
35
+ ```
36
+
37
+ ## Configuration
38
+
39
+ ```ts
40
+ const client = new Driftstone({
41
+ apiKey: "dk-...",
42
+ version: "v1",
43
+ timeout: 30_000,
44
+ baseUrl: "https://api.driftstone.ai",
45
+ });
46
+ ```
47
+
48
+ The default base URL mirrors the Python SDK. Set `baseUrl` when targeting a custom deployment or the public custom domain.
49
+
50
+ ## Repositories
51
+
52
+ ```ts
53
+ await client.repos.create("hello-world");
54
+ await client.repos.list({ page: 1, pageSize: 10 });
55
+ await client.repos.get("hello-world");
56
+ await client.repos.delete("hello-world");
57
+ ```
58
+
59
+ ## Branches
60
+
61
+ ```ts
62
+ await client.repos.createBranch("hello-world", "feature-readme", {
63
+ storageDir: "state-123",
64
+ transforms: {
65
+ "README.md": "# Example Repo\nUpdated content.\n",
66
+ },
67
+ });
68
+
69
+ await client.repos.listBranches("hello-world");
70
+ await client.repos.getBranch("hello-world", "feature-readme");
71
+ await client.repos.deleteBranch("hello-world", "feature-readme");
72
+ ```
73
+
74
+ ## Uploads And Downloads
75
+
76
+ ```ts
77
+ const upload = await client.repos.createUpload("hello-world", {
78
+ storageDir: "ver-1234abcd",
79
+ files: [{ name: "README.md", hash: "sha256-or-client-hash" }],
80
+ });
81
+
82
+ await client.uploadFiles(upload, upload.uploadUrls, ".");
83
+ await client.repos.completeUpload("hello-world", upload.uploadId);
84
+
85
+ const files = await client.repos.createDirectoryDownload("hello-world", {
86
+ type: "main",
87
+ directory: "ver-1234abcd",
88
+ });
89
+ ```
90
+
91
+ ## Directory Copies
92
+
93
+ ```ts
94
+ const copy = await client.repos.copyDirectory("hello-world", {
95
+ sourceDir: "ver-1234abcd",
96
+ destDir: "state-456",
97
+ sourceBranch: "main",
98
+ destBranch: "feature-readme",
99
+ });
100
+
101
+ const status = await client.repos.getCopyStatus("hello-world", copy.runId);
102
+ ```
@@ -1,2 +1,2 @@
1
- export declare const DEFAULT_API_BASE_URL = "https://pickaxeproject--driftstone-api-v2-api.modal.run";
1
+ export declare const DEFAULT_API_BASE_URL = "https://api.driftstone.ai";
2
2
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/internal/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,4DAC0B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/internal/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,8BACJ,CAAC"}
@@ -1,2 +1,2 @@
1
- export const DEFAULT_API_BASE_URL = "https://pickaxeproject--driftstone-api-v2-api.modal.run";
1
+ export const DEFAULT_API_BASE_URL = "https://api.driftstone.ai";
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/internal/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAC/B,yDAAyD,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/internal/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAC/B,2BAA2B,CAAC"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.6";
1
+ export declare const VERSION = "1.1.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "1.0.6";
1
+ export const VERSION = "1.1.0";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
- {
2
- "name": "@pickaxe/driftstone",
3
- "version": "1.0.6",
4
- "description": "TypeScript SDK for the Driftstone API.",
5
- "type": "module",
6
- "license": "UNLICENSED",
7
- "author": "Driftstone",
8
- "homepage": "https://www.driftstone.ai/",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/driftstone/driftstone.git",
12
- "directory": "typescript/driftstone"
13
- },
14
- "bugs": {
15
- "url": "https://github.com/driftstone/driftstone/issues"
16
- },
17
- "keywords": [
18
- "driftstone",
19
- "sdk",
20
- "api-client",
21
- "typescript"
22
- ],
23
- "sideEffects": false,
24
- "files": [
25
- "dist",
26
- "README.md",
27
- "LICENSE"
28
- ],
29
- "exports": {
30
- ".": {
31
- "types": "./dist/index.d.ts",
32
- "import": "./dist/index.js"
33
- },
34
- "./package.json": "./package.json"
35
- },
36
- "main": "./dist/index.js",
37
- "types": "./dist/index.d.ts",
38
- "engines": {
39
- "node": ">=18"
40
- },
41
- "scripts": {
42
- "build": "tsc -p tsconfig.json",
43
- "check": "tsc -p tsconfig.json --noEmit",
44
- "test": "npm run build && node --test test",
45
- "prepack": "npm run build"
46
- },
47
- "devDependencies": {
48
- "@types/node": "^20.17.10",
49
- "typescript": "^5.7.2"
50
- }
51
- }
1
+ {
2
+ "name": "@pickaxe/driftstone",
3
+ "version": "1.1.0",
4
+ "description": "TypeScript SDK for the Driftstone API.",
5
+ "type": "module",
6
+ "license": "UNLICENSED",
7
+ "author": "Driftstone",
8
+ "homepage": "https://www.driftstone.ai/",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/driftstone/driftstone.git",
12
+ "directory": "typescript/driftstone"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/driftstone/driftstone/issues"
16
+ },
17
+ "keywords": [
18
+ "driftstone",
19
+ "sdk",
20
+ "api-client",
21
+ "typescript"
22
+ ],
23
+ "sideEffects": false,
24
+ "files": [
25
+ "dist",
26
+ "README.md",
27
+ "LICENSE"
28
+ ],
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js"
33
+ },
34
+ "./package.json": "./package.json"
35
+ },
36
+ "main": "./dist/index.js",
37
+ "types": "./dist/index.d.ts",
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "scripts": {
42
+ "build": "tsc -p tsconfig.json",
43
+ "check": "tsc -p tsconfig.json --noEmit",
44
+ "test": "npm run build && node --test test",
45
+ "prepack": "npm run build"
46
+ },
47
+ "devDependencies": {
48
+ "@types/node": "^20.17.10",
49
+ "typescript": "^5.7.2"
50
+ }
51
+ }