@banou/ripple 0.0.60 → 0.0.64

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 CHANGED
@@ -60,11 +60,14 @@ npm ci
60
60
  npm run dev # http://localhost:4560
61
61
  npm run build # the site and the npm package, into build/
62
62
  npm test # unit tests (vitest, node)
63
- npm run test:browser # component tests in Chrome
63
+ npm run test:browser # component tests in Chrome, a few in Firefox and WebKit
64
64
  npm run typecheck
65
65
  npm run lint # vp lint
66
66
  ```
67
67
 
68
+ Off CI, WebKit runs only where `RIPPLE_WEBKIT_WS` names a Playwright server: `scripts/webkit-server.sh start` starts
69
+ one in Docker and prints the address.
70
+
68
71
  The Playwright suites build first, then drive the built site in Chrome:
69
72
 
70
73
  | command | what it covers |
@@ -84,7 +87,10 @@ with `fkn-sign`.
84
87
  ## Embedding
85
88
 
86
89
  `/watch` and `/download` are the pages another site puts in an iframe. Both take a magnet and the
87
- same query; the path chooses which one renders. `/watch` plays a file, `/download` delivers files.
90
+ same parameters; the path chooses which one renders. `/watch` plays a file, `/download` delivers files.
91
+
92
+ The parameters go after `#`, which a browser never sends, so the server is not told which torrent a
93
+ visit is about. A link with them in the query (`?`) still works.
88
94
 
89
95
  | param | value | meaning |
90
96
  | --- | --- | --- |
@@ -106,12 +112,12 @@ original form and every link written with it keeps working. `m=` is the same tor
106
112
  much shorter link.
107
113
 
108
114
  ```
109
- /watch?magnet=<base64>&fileIndex=3 plays file 3
110
- /download?magnet=<base64> the whole torrent
111
- /download?magnet=<base64>&files=3 just file 3
112
- /download?magnet=<base64>&files=0-4 files 0 to 4 inclusive, as a zip
113
- /download?magnet=<base64>&files=0,2,5 those three, as a zip
114
- /download?magnet=<base64>&fileIndex=3 same as files=3
115
+ /watch#magnet=<base64>&fileIndex=3 plays file 3
116
+ /download#magnet=<base64> the whole torrent
117
+ /download#magnet=<base64>&files=3 just file 3
118
+ /download#magnet=<base64>&files=0-4 files 0 to 4 inclusive, as a zip
119
+ /download#magnet=<base64>&files=0,2,5 those three, as a zip
120
+ /download#magnet=<base64>&fileIndex=3 same as files=3
115
121
  ```
116
122
 
117
123
  One file is delivered as that file, and more than one as a single `.zip`. `files` outranks
@@ -122,7 +128,7 @@ nothing says so instead of downloading the whole torrent.
122
128
  Leaving out `sandbox` works too.
123
129
 
124
130
  ```html
125
- <iframe src="https://torrent.fkn.app/download?magnet=..."
131
+ <iframe src="https://torrent.fkn.app/download#magnet=..."
126
132
  sandbox="allow-scripts allow-same-origin allow-downloads"></iframe>
127
133
  ```
128
134