@peerbit/please-lib 0.0.16 → 0.0.18

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.
Files changed (2) hide show
  1. package/package.json +43 -44
  2. package/src/index.ts +5 -5
package/package.json CHANGED
@@ -1,45 +1,44 @@
1
1
  {
2
- "name": "@peerbit/please-lib",
3
- "version": "0.0.16",
4
- "author": "dao.xyz",
5
- "repository": "https://github.com/@dao-xyz/peerbit-examples",
6
- "license": "Apache-2.0",
7
- "type": "module",
8
- "private": false,
9
- "publishConfig": {
10
- "access": "public"
11
- },
12
- "sideEffects": false,
13
- "module": "lib/esm/index.js",
14
- "types": "lib/esm/index.d.ts",
15
- "exports": {
16
- "import": "./lib/esm/index.js"
17
- },
18
- "files": [
19
- "lib",
20
- "src",
21
- "!src/**/__tests__",
22
- "!lib/**/__tests__",
23
- "LICENSE"
24
- ],
25
- "engines": {
26
- "node": ">=16.15.1"
27
- },
28
- "scripts": {
29
- "clean": "shx rm -rf lib/*",
30
- "build": "yarn clean && tsc -p tsconfig.json",
31
- "test": "vitest run",
32
- "test:watch": "vitest"
33
- },
34
- "devDependencies": {
35
- "@peerbit/test-utils": "^2",
36
- "typescript": "^5.6.3"
37
- },
38
- "dependencies": {
39
- "@peerbit/document": "^9",
40
- "@peerbit/trusted-network": "^4",
41
- "peerbit": "^4",
42
- "uuid": "^10.0.0"
43
- },
44
- "gitHead": "5d95157879bc6e540c7bde79d87577d394f79c53"
45
- }
2
+ "name": "@peerbit/please-lib",
3
+ "version": "0.0.18",
4
+ "author": "dao.xyz",
5
+ "repository": "https://github.com/@dao-xyz/peerbit-examples",
6
+ "license": "Apache-2.0",
7
+ "type": "module",
8
+ "private": false,
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "lib/esm/index.js",
14
+ "types": "lib/esm/index.d.ts",
15
+ "exports": {
16
+ "import": "./lib/esm/index.js"
17
+ },
18
+ "files": [
19
+ "lib",
20
+ "src",
21
+ "!src/**/__tests__",
22
+ "!lib/**/__tests__",
23
+ "LICENSE"
24
+ ],
25
+ "engines": {
26
+ "node": ">=16.15.1"
27
+ },
28
+ "devDependencies": {
29
+ "@peerbit/test-utils": "^2",
30
+ "typescript": "^5.6.3"
31
+ },
32
+ "dependencies": {
33
+ "@peerbit/document": "^10",
34
+ "@peerbit/trusted-network": "^4",
35
+ "peerbit": "^4",
36
+ "uuid": "^10.0.0"
37
+ },
38
+ "scripts": {
39
+ "clean": "shx rm -rf lib/*",
40
+ "build": "pnpm run clean && tsc -p tsconfig.json",
41
+ "test": "vitest run",
42
+ "test:watch": "vitest"
43
+ }
44
+ }
package/src/index.ts CHANGED
@@ -23,7 +23,7 @@ export abstract class AbstractFile {
23
23
  abstract parentId?: string;
24
24
  abstract getFile<
25
25
  OutputType extends "chunks" | "joined" = "joined",
26
- Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array
26
+ Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array,
27
27
  >(
28
28
  files: Files,
29
29
  properties?: {
@@ -91,7 +91,7 @@ export class TinyFile extends AbstractFile {
91
91
 
92
92
  async getFile<
93
93
  OutputType extends "chunks" | "joined" = "joined",
94
- Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array
94
+ Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array,
95
95
  >(
96
96
  _files: Files,
97
97
  properties?: { as: OutputType; progress?: (progress: number) => any }
@@ -195,7 +195,7 @@ export class LargeFile extends AbstractFile {
195
195
 
196
196
  async getFile<
197
197
  OutputType extends "chunks" | "joined" = "joined",
198
- Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array
198
+ Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array,
199
199
  >(
200
200
  files: Files,
201
201
  properties?: {
@@ -403,7 +403,7 @@ export class Files extends Program<Args> {
403
403
  */
404
404
  async getById<
405
405
  OutputType extends "chunks" | "joined" = "joined",
406
- Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array
406
+ Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array,
407
407
  >(
408
408
  id: string,
409
409
  properties?: { as: OutputType }
@@ -440,7 +440,7 @@ export class Files extends Program<Args> {
440
440
  */
441
441
  async getByName<
442
442
  OutputType extends "chunks" | "joined" = "joined",
443
- Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array
443
+ Output = OutputType extends "chunks" ? Uint8Array[] : Uint8Array,
444
444
  >(
445
445
  name: string,
446
446
  properties?: { as: OutputType }