@ardrive/turbo-sdk 1.9.1-alpha.1 → 1.10.0-alpha.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/README.md +58 -0
- package/bundles/web.bundle.min.js +25370 -12548
- package/lib/cjs/common/factory.js +19 -9
- package/lib/cjs/common/http.js +1 -1
- package/lib/cjs/common/logger.js +1 -1
- package/lib/cjs/common/token/arweave.js +2 -2
- package/lib/cjs/common/token/ethereum.js +2 -2
- package/lib/cjs/common/token/solana.js +2 -2
- package/lib/cjs/common/turbo.js +3 -0
- package/lib/cjs/common/upload.js +106 -3
- package/lib/cjs/node/index.js +1 -0
- package/lib/cjs/node/upload.js +72 -0
- package/lib/cjs/types.js +6 -2
- package/lib/cjs/utils/base64.js +6 -6
- package/lib/cjs/utils/common.js +5 -2
- package/lib/cjs/utils/readableStream.js +1 -2
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/web/factory.js +2 -1
- package/lib/cjs/web/index.js +1 -0
- package/lib/cjs/web/upload.js +57 -0
- package/lib/esm/common/factory.js +18 -8
- package/lib/esm/common/http.js +1 -1
- package/lib/esm/common/logger.js +1 -1
- package/lib/esm/common/token/arweave.js +2 -2
- package/lib/esm/common/token/ethereum.js +2 -2
- package/lib/esm/common/token/solana.js +2 -2
- package/lib/esm/common/turbo.js +3 -0
- package/lib/esm/common/upload.js +104 -1
- package/lib/esm/node/index.js +1 -0
- package/lib/esm/node/upload.js +68 -0
- package/lib/esm/types.js +2 -0
- package/lib/esm/utils/common.js +3 -0
- package/lib/esm/version.js +1 -1
- package/lib/esm/web/factory.js +3 -2
- package/lib/esm/web/index.js +1 -0
- package/lib/esm/web/upload.js +53 -0
- package/lib/types/common/factory.d.ts.map +1 -1
- package/lib/types/common/http.d.ts +0 -3
- package/lib/types/common/http.d.ts.map +1 -1
- package/lib/types/common/logger.d.ts.map +1 -1
- package/lib/types/common/signer.d.ts +0 -1
- package/lib/types/common/signer.d.ts.map +1 -1
- package/lib/types/common/token/arweave.d.ts.map +1 -1
- package/lib/types/common/token/ethereum.d.ts.map +1 -1
- package/lib/types/common/token/solana.d.ts.map +1 -1
- package/lib/types/common/turbo.d.ts +2 -1
- package/lib/types/common/turbo.d.ts.map +1 -1
- package/lib/types/common/upload.d.ts +18 -2
- package/lib/types/common/upload.d.ts.map +1 -1
- package/lib/types/node/index.d.ts +1 -0
- package/lib/types/node/index.d.ts.map +1 -1
- package/lib/types/node/signer.d.ts +0 -1
- package/lib/types/node/signer.d.ts.map +1 -1
- package/lib/types/node/upload.d.ts +15 -0
- package/lib/types/node/upload.d.ts.map +1 -0
- package/lib/types/types.d.ts +40 -4
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/utils/base64.d.ts +0 -1
- package/lib/types/utils/base64.d.ts.map +1 -1
- package/lib/types/utils/common.d.ts +1 -0
- package/lib/types/utils/common.d.ts.map +1 -1
- package/lib/types/utils/readableStream.d.ts +0 -2
- package/lib/types/utils/readableStream.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/lib/types/version.d.ts.map +1 -1
- package/lib/types/web/factory.d.ts.map +1 -1
- package/lib/types/web/index.d.ts +1 -0
- package/lib/types/web/index.d.ts.map +1 -1
- package/lib/types/web/signer.d.ts +0 -1
- package/lib/types/web/signer.d.ts.map +1 -1
- package/lib/types/web/upload.d.ts +29 -0
- package/lib/types/web/upload.d.ts.map +1 -0
- package/package.json +6 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../src/utils/base64.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../src/utils/base64.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,cAAc,QAAwB,CAAC;AAEpD,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,YAAY,GAChB,oBAAoB,CAEtB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,oBAAoB,CAExE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAStD;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAErD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAExD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED,wBAAgB,KAAK,YAEpB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"readableStream.d.ts","sourceRoot":"","sources":["../../../src/utils/readableStream.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"readableStream.d.ts","sourceRoot":"","sources":["../../../src/utils/readableStream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,wBAAsB,sBAAsB,CAAC,EAC3C,MAAM,EACN,IAAI,GACL,EAAE;IACD,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
|
package/lib/types/version.d.ts
CHANGED
@@ -14,5 +14,5 @@
|
|
14
14
|
* You should have received a copy of the GNU Affero General Public License
|
15
15
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
16
|
*/
|
17
|
-
export declare const version = "1.9.
|
17
|
+
export declare const version = "1.9.1-alpha.1";
|
18
18
|
//# sourceMappingURL=version.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/web/factory.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,wBAAwB,
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/web/factory.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,wBAAwB,EAGzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,SAAS,EACT,+BAA+B,EAC/B,WAAW,EACX,WAAW,EAGZ,MAAM,aAAa,CAAC;AAIrB,qBAAa,YAAa,SAAQ,gBAAgB;IAChD,SAAS,CAAC,MAAM,CAAC,SAAS,CACxB,cAAc,EAAE,WAAW,GAAG,SAAS,EACvC,kBAAkB,EAAE,WAAW,GAAG,SAAS,EAC3C,KAAK,EAAE,SAAS,GACf,2BAA2B;IA+B9B,MAAM,CAAC,aAAa,CAAC,EACnB,UAAU,EACV,MAAM,EAAE,cAAc,EACtB,oBAAyB,EACzB,mBAAwB,EACxB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,UAAU,GACX,EAAE,+BAA+B;CA+CnC"}
|
package/lib/types/web/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EAEhB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAE3E;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,2BAA2B;gBACxD,CAAC,EAAE,yBAAyB;YAI1B,YAAY;IAUb,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAK/B,YAAY,CAAC,EACxB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAE/B,qBAAqB,EAAE,MAAM,MAAM,CAAC;QACpC,mBAAmB,EAAE,iBAAiB,CAAC;KACxC,CAAC;IAoBW,4BAA4B,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAKlE,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CAInE"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
|
3
|
+
*
|
4
|
+
* This program is free software: you can redistribute it and/or modify
|
5
|
+
* it under the terms of the GNU Affero General Public License as published by
|
6
|
+
* the Free Software Foundation, either version 3 of the License, or
|
7
|
+
* (at your option) any later version.
|
8
|
+
*
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
* GNU Affero General Public License for more details.
|
13
|
+
*
|
14
|
+
* You should have received a copy of the GNU Affero General Public License
|
15
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
*/
|
17
|
+
import { TurboAuthenticatedBaseUploadService } from '../common/upload.js';
|
18
|
+
import { TurboAuthenticatedUploadServiceConfiguration, TurboUploadFolderParams } from '../types.js';
|
19
|
+
export declare class TurboAuthenticatedWebUploadService extends TurboAuthenticatedBaseUploadService {
|
20
|
+
constructor({ url, retryConfig, signer, logger, token, }: TurboAuthenticatedUploadServiceConfiguration);
|
21
|
+
getFiles(params: TurboUploadFolderParams): Promise<File[]>;
|
22
|
+
getFileStreamForFile(file: File): ReadableStream;
|
23
|
+
getFileSize(file: File): number;
|
24
|
+
getFileName(file: File): string;
|
25
|
+
getRelativePath(file: File): string;
|
26
|
+
contentTypeFromFile(file: File): string;
|
27
|
+
createManifestStream(manifestBuffer: Buffer): ReadableStream;
|
28
|
+
}
|
29
|
+
//# sourceMappingURL=upload.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/web/upload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,mCAAmC,EAEpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4CAA4C,EAC5C,uBAAuB,EAExB,MAAM,aAAa,CAAC;AAErB,qBAAa,kCAAmC,SAAQ,mCAAmC;gBAC7E,EACV,GAA6B,EAC7B,WAAW,EACX,MAAM,EACN,MAAM,EACN,KAAK,GACN,EAAE,4CAA4C;IAI/C,QAAQ,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAO1D,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,cAAc;IAIhD,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAI/B,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAI/B,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAInC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIvC,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,cAAc;CAS7D"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ardrive/turbo-sdk",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.10.0-alpha.1",
|
4
4
|
"main": "./lib/cjs/node/index.js",
|
5
5
|
"types": "./lib/types/node/index.d.ts",
|
6
6
|
"module": "./lib/esm/node/index.js",
|
@@ -79,6 +79,8 @@
|
|
79
79
|
"bignumber.js": "^9.1.2",
|
80
80
|
"bs58": "^5.0.0",
|
81
81
|
"ethers": "^6.12.0",
|
82
|
+
"mime-types": "^2.1.35",
|
83
|
+
"plimit-lit": "^3.0.1",
|
82
84
|
"tweetnacl": "^1.0.3",
|
83
85
|
"winston": "^3.10.0"
|
84
86
|
},
|
@@ -91,6 +93,7 @@
|
|
91
93
|
"@semantic-release/git": "^10.0.1",
|
92
94
|
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
|
93
95
|
"@types/chai": "^4.3.5",
|
96
|
+
"@types/mime-types": "^2.1.4",
|
94
97
|
"@types/mocha": "^10.0.1",
|
95
98
|
"@types/node": "^20.4.8",
|
96
99
|
"@types/sinon": "^10.0.15",
|
@@ -114,11 +117,12 @@
|
|
114
117
|
"husky": "^8.0.3",
|
115
118
|
"markdown-toc-gen": "^1.0.1",
|
116
119
|
"mocha": "^10.2.0",
|
120
|
+
"node-fetch": "^3.3.2",
|
117
121
|
"prettier": "^3.0.2",
|
118
122
|
"rimraf": "^5.0.1",
|
119
123
|
"semantic-release": "^21.0.7",
|
120
124
|
"sinon": "^15.2.0",
|
121
125
|
"ts-node": "^10.9.1",
|
122
|
-
"typescript": "^5.
|
126
|
+
"typescript": "^5.5.4"
|
123
127
|
}
|
124
128
|
}
|