@pluv/platform-cloudflare 0.0.0 → 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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pluv/platform-cloudflare@0.0.0 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
2
+ > @pluv/platform-cloudflare@0.1.0 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,9 +9,9 @@
9
9
  ESM Build start
10
10
  CJS Build start
11
11
  ESM dist/index.mjs 1.50 KB
12
- ESM ⚡️ Build success in 80ms
12
+ ESM ⚡️ Build success in 123ms
13
13
  CJS dist/index.js 2.52 KB
14
- CJS ⚡️ Build success in 82ms
14
+ CJS ⚡️ Build success in 125ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3633ms
16
+ DTS ⚡️ Build success in 4328ms
17
17
  DTS dist/index.d.ts 1.03 KB
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # @pluv/platform-cloudflare
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a22f525: Added documentation
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [a22f525]
12
+ - @pluv/io@0.1.0
13
+ - @pluv/types@0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Shoubhit Dash
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ <h1 align="center">
2
+ <br>
3
+ <img src="https://github.com/pluv-io/pluv/blob/master/assets/pluv-icon-192x192.png?raw=true" alt="Pluv.IO" width="180" style="border-radius:16px">
4
+ <br>
5
+ Pluv.IO (preview)
6
+ <br>
7
+ </h1>
8
+
9
+ <h3 align="center">Multi-platform, E2E type-safe realtime packages</h3>
10
+ <h4 align="center">💕 Inspired by <a href="https://trpc.io">trpc</a> 💕 Built with <a href="https://docs.yjs.dev/">yjs</a> 💕</h4>
11
+
12
+ <p align="center">
13
+ <a href="https://www.npmjs.com/package/@pluv/platform-cloudflare">
14
+ <img src="https://img.shields.io/npm/v/@pluv/platform-cloudflare" alt="npm @pluv/platform-cloudflare" />
15
+ </a>
16
+ <a href="https://github.com/pluv-io/pluv/blob/master/LICENSE">
17
+ <img alt="GitHub" src="https://img.shields.io/github/license/pluv-io/pluv" alt="License MIT" />
18
+ </a>
19
+ <img src="https://badgen.net/badge/-/TypeScript?icon=typescript&label&labelColor=blue&color=555555" alt="TypeScript">
20
+ <a href="https://commitizen.github.io/cz-cli/">
21
+ <img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg" alt="Commitizen friendly" />
22
+ </a>
23
+ <img src="https://img.shields.io/badge/docs-coming%20soon!-blue" alt="Docs coming soon!" />
24
+ </p>
25
+
26
+ <img src="https://github.com/pluv-io/pluv/blob/master/assets/demo-events.gif?raw=true" alt="Demo" />
27
+
28
+ ## `@pluv/platform-cloudflare`
29
+
30
+ > Enables [@pluv/io](https://img.shields.io/npm/v/@pluv/io) to run on [Cloudflare Workers](https://workers.cloudflare.com/).
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ # npm
36
+ npm install @pluv/platform-cloudflare
37
+
38
+ # yarn
39
+ yarn add @pluv/platform-cloudflare
40
+
41
+ # pnpm
42
+ pnpm add @pluv/platform-cloudflare
43
+ ```
44
+
45
+ ## Basic Example
46
+
47
+ ```ts
48
+ import { createIO } from "@pluv/io";
49
+ import { platformCloudflare } from "@pluv/platform-cloudflare";
50
+
51
+ export const io = createIO({
52
+ platform: platformCloudflare(),
53
+ });
54
+
55
+ /* Somewhere in a Cloudflare worker durable object */
56
+ const { 0: client, 1: server } = new WebSocketPair();
57
+
58
+ await io.register(server);
59
+
60
+ return new Response(null, { status: 101, webSocket: client });
61
+ ```
62
+
63
+ ## Reference
64
+
65
+ Check us out on [GitHub](https://github.com/pluv-io/pluv) for more information on how to use `@pluv/io`.
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "@pluv/platform-cloudflare",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
+ "description": "@pluv/io adapter for cloudflare workers",
5
+ "author": "leedavidcs",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/pluv-io/pluv",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/pluv-io/pluv.git",
11
+ "directory": "packages/platform-cloudflare"
12
+ },
4
13
  "main": "./dist/index.js",
5
14
  "module": "./dist/index.mjs",
6
15
  "types": "./dist/index.d.ts",
@@ -8,13 +17,13 @@
8
17
  "access": "public"
9
18
  },
10
19
  "dependencies": {
11
- "@pluv/io": "^0.0.0",
12
- "@pluv/types": "^0.0.0"
20
+ "@pluv/io": "^0.1.0",
21
+ "@pluv/types": "^0.1.0"
13
22
  },
14
23
  "devDependencies": {
15
24
  "@cloudflare/workers-types": "^3.18.0",
16
- "@pluv/tsconfig": "^0.0.0",
17
- "eslint-config-pluv": "^0.0.0",
25
+ "@pluv/tsconfig": "^0.1.0",
26
+ "eslint-config-pluv": "^0.1.0",
18
27
  "tsup": "^6.5.0",
19
28
  "typescript": "^4.9.4"
20
29
  },