filepizza-client 0.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/dist/types.js ADDED
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Connection status
3
+ */
4
+ export var ConnectionStatus;
5
+ (function (ConnectionStatus) {
6
+ ConnectionStatus["Pending"] = "PENDING";
7
+ ConnectionStatus["Ready"] = "READY";
8
+ ConnectionStatus["Paused"] = "PAUSED";
9
+ ConnectionStatus["Uploading"] = "UPLOADING";
10
+ ConnectionStatus["Downloading"] = "DOWNLOADING";
11
+ ConnectionStatus["Done"] = "DONE";
12
+ ConnectionStatus["Authenticating"] = "AUTHENTICATING";
13
+ ConnectionStatus["InvalidPassword"] = "INVALID_PASSWORD";
14
+ ConnectionStatus["Closed"] = "CLOSED";
15
+ ConnectionStatus["Error"] = "ERROR";
16
+ })(ConnectionStatus || (ConnectionStatus = {}));
17
+ /**
18
+ * Message types for peer-to-peer communication
19
+ */
20
+ export var MessageType;
21
+ (function (MessageType) {
22
+ MessageType["RequestInfo"] = "RequestInfo";
23
+ MessageType["Info"] = "Info";
24
+ MessageType["Start"] = "Start";
25
+ MessageType["Chunk"] = "Chunk";
26
+ MessageType["Pause"] = "Pause";
27
+ MessageType["Resume"] = "Resume";
28
+ MessageType["Done"] = "Done";
29
+ MessageType["Error"] = "Error";
30
+ MessageType["PasswordRequired"] = "PasswordRequired";
31
+ MessageType["UsePassword"] = "UsePassword";
32
+ MessageType["Report"] = "Report";
33
+ })(MessageType || (MessageType = {}));
34
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,CAAN,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;IACvB,+CAA2B,CAAA;IAC3B,iCAAa,CAAA;IACb,qDAAiC,CAAA;IACjC,wDAAoC,CAAA;IACpC,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AACjB,CAAC,EAXW,gBAAgB,KAAhB,gBAAgB,QAW3B;AA8CD;;GAEG;AACH,MAAM,CAAN,IAAY,WAYX;AAZD,WAAY,WAAW;IACrB,0CAA2B,CAAA;IAC3B,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,oDAAqC,CAAA;IACrC,0CAA2B,CAAA;IAC3B,gCAAiB,CAAA;AACnB,CAAC,EAZW,WAAW,KAAX,WAAW,QAYtB"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "filepizza-client",
3
+ "version": "0.1.0",
4
+ "description": "Client API for FilePizza, a free peer-to-peer file transfer service.",
5
+ "author": "Fares Abawi <fares@abawi.me> (https://abawi.me)",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/texlyre/filepizza-client.git"
10
+ },
11
+ "homepage": "https://texlyre.github.io/filepizza-client/",
12
+ "main": "dist/index.js",
13
+ "types": "dist/index.d.ts",
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc",
19
+ "test": "jest",
20
+ "lint": "eslint src/**/*.ts",
21
+ "example": "vite example/vite-bundled-typescript-example --port 8081",
22
+ "build:pages-example": "cd example/github-pages-example && npm install",
23
+ "build:example": "vite build example/vite-bundled-typescript-example",
24
+ "pages-example": "cd example/github-pages-example && npm start"
25
+ },
26
+ "dependencies": {
27
+ "streamsaver": "^2.0.6",
28
+ "web-streams-polyfill": "^3.2.1"
29
+ },
30
+ "peerDependencies": {
31
+ "next": "^13.0.0",
32
+ "react": "^18.0.0",
33
+ "react-dom": "^18.0.0",
34
+ "peerjs": "^1.5.1"
35
+ },
36
+ "devDependencies": {
37
+ "debug": "^4.3.4",
38
+ "@types/debug": "^4.1.8",
39
+ "@types/jest": "^29.5.3",
40
+ "@types/node": "^20.4.5",
41
+ "@types/react": "^18.2.15",
42
+ "@typescript-eslint/eslint-plugin": "^6.2.0",
43
+ "@typescript-eslint/parser": "^6.2.0",
44
+ "eslint": "^8.45.0",
45
+ "jest": "^29.6.1",
46
+ "ts-jest": "^29.1.1",
47
+ "typescript": "^5.1.6",
48
+ "vite": "^5.0.0",
49
+ "@vitejs/plugin-react": "^4.0.0",
50
+ "react": "^18.2.0",
51
+ "react-dom": "^18.2.0"
52
+ }
53
+ }