@flowscripter/io-plugin-http 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +55 -2
- package/dist/bundle.js +63 -0
- package/package.json +64 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Flowscripter
|
|
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
CHANGED
|
@@ -1,3 +1,56 @@
|
|
|
1
|
-
#
|
|
1
|
+
# io-plugin-http
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/flowscripter/io-plugin-http/releases)
|
|
4
|
+
[](https://github.com/flowscripter/io-plugin-http/actions/workflows/release-bun-library.yml)
|
|
5
|
+
[](https://flowscripter.github.io/io-plugin-http/index.html)
|
|
6
|
+
[](https://github.com/flowscripter/io-plugin-http/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
> HTTP and HTTPS source/sink plugin for
|
|
9
|
+
> [pluggable-io-framework](https://github.com/flowscripter/pluggable-io-framework),
|
|
10
|
+
> loaded via
|
|
11
|
+
> [dynamic-plugin-framework](https://github.com/flowscripter/dynamic-plugin-framework)
|
|
12
|
+
|
|
13
|
+
## Key Features
|
|
14
|
+
|
|
15
|
+
- One plugin registering two provider factories, for the `http` and
|
|
16
|
+
`https` protocols, sharing one `fetch`-based implementation with the `js`
|
|
17
|
+
payload kind.
|
|
18
|
+
- A location is a full URL plus optional request options: `method` for
|
|
19
|
+
writes (`PUT` by default, or `POST`), basic auth (`username`/`password`),
|
|
20
|
+
a `bearerToken`, and extra `headers`. Credentials are marked secret in the
|
|
21
|
+
location schema.
|
|
22
|
+
- Every location is a single entry; HTTP has no containers or patterns.
|
|
23
|
+
- Reads are `GET` requests. Readable handles are `RangeReadable`, using a
|
|
24
|
+
`Range` header on a fresh request, so the framework can read in parts and
|
|
25
|
+
`seekable` works.
|
|
26
|
+
- Writes stream the request body of one `PUT` or `POST`.
|
|
27
|
+
- `getProperties` uses `HEAD` (size, last modified, content type, etag) and
|
|
28
|
+
`delete` uses `DELETE`.
|
|
29
|
+
- Failures are classified for the framework's retries: network errors,
|
|
30
|
+
timeouts, throttling and server errors are transient; other client
|
|
31
|
+
errors are permanent.
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
Install the plugin where a
|
|
36
|
+
[pluggable-io-framework](https://github.com/flowscripter/pluggable-io-framework)
|
|
37
|
+
host discovers plugins, then address entries by URL (`registry` is a
|
|
38
|
+
discovered `ProviderRegistry`):
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
const { source, dest, options } = await registry.createProvidersForTransfer(
|
|
42
|
+
"https://example.com/data/report.csv",
|
|
43
|
+
"file:///tmp/report.csv",
|
|
44
|
+
);
|
|
45
|
+
await copy(source.provider, source.target, dest.provider, dest.target, options);
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Further Details
|
|
49
|
+
|
|
50
|
+
- [Configuration](./README/configuration.md)
|
|
51
|
+
- [Development](./README/development.md)
|
|
52
|
+
- [API Documentation](https://flowscripter.github.io/io-plugin-http/index.html)
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
MIT © Flowscripter
|