@ripple-ts/adapter 0.2.210 → 0.2.212
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/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/package.json +5 -5
- package/types/index.d.ts +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ripple-ts/adapter
|
|
2
2
|
|
|
3
|
+
## 0.2.212
|
|
4
|
+
|
|
5
|
+
## 0.2.211
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#694](https://github.com/Ripple-TS/ripple/pull/694)
|
|
10
|
+
[`fa285f4`](https://github.com/Ripple-TS/ripple/commit/fa285f441ab8d748c3dfea6adb463e3ca6d614b5)
|
|
11
|
+
Thanks [@trueadm](https://github.com/trueadm)! - Add a shared
|
|
12
|
+
`ServeStaticDirectoryOptions` type in `@ripple-ts/adapter` and update node/bun
|
|
13
|
+
adapters to consume it instead of redefining the same
|
|
14
|
+
`ServeStaticOptions & { dir?: string }` shape locally.
|
|
15
|
+
|
|
3
16
|
## 0.2.210
|
|
4
17
|
|
|
5
18
|
## 0.2.209
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Dominic Gannaway
|
|
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,5 +1,8 @@
|
|
|
1
1
|
# @ripple-ts/adapter
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@ripple-ts/adapter)
|
|
4
|
+
[](https://www.npmjs.com/package/@ripple-ts/adapter)
|
|
5
|
+
|
|
3
6
|
Shared adapter primitives for Ripple metaframework adapters.
|
|
4
7
|
|
|
5
8
|
This package contains common runtime helpers and shared type contracts used by
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Shared adapter primitives for Ripple metaframework adapters",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.212",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"module": "src/index.js",
|
|
9
9
|
"main": "src/index.js",
|
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
"default": "./src/index.js"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"test": "pnpm -w test --project adapter"
|
|
19
|
-
},
|
|
20
17
|
"homepage": "https://ripplejs.com",
|
|
21
18
|
"repository": {
|
|
22
19
|
"type": "git",
|
|
@@ -25,5 +22,8 @@
|
|
|
25
22
|
},
|
|
26
23
|
"bugs": {
|
|
27
24
|
"url": "https://github.com/Ripple-TS/ripple/issues"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "pnpm -w test --project adapter"
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -6,6 +6,17 @@ export type FetchHandler<Platform = any, ResultValue = Response> = (
|
|
|
6
6
|
export type AdapterCoreOptions = {
|
|
7
7
|
port?: number;
|
|
8
8
|
hostname?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to trust `X-Forwarded-Proto` and `X-Forwarded-Host` headers
|
|
11
|
+
* when deriving the request origin (protocol + host).
|
|
12
|
+
*
|
|
13
|
+
* Enable this only when the application is behind a trusted reverse proxy
|
|
14
|
+
* (e.g., nginx, Cloudflare, AWS ALB). When `false` (the default), the
|
|
15
|
+
* protocol is inferred from the socket and the host from the `Host` header.
|
|
16
|
+
*
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
trustProxy?: boolean;
|
|
9
20
|
};
|
|
10
21
|
|
|
11
22
|
export type ServeStaticOptions = {
|
|
@@ -29,6 +40,12 @@ export type ServeResult<Server = any> = {
|
|
|
29
40
|
close: () => void;
|
|
30
41
|
};
|
|
31
42
|
|
|
43
|
+
export type ServeFunction<
|
|
44
|
+
Platform = any,
|
|
45
|
+
Options extends AdapterCoreOptions = AdapterCoreOptions,
|
|
46
|
+
Server = any,
|
|
47
|
+
> = (fetch_handler: FetchHandler<Platform>, options?: Options) => ServeResult<Server>;
|
|
48
|
+
|
|
32
49
|
export const DEFAULT_HOSTNAME: 'localhost';
|
|
33
50
|
export const DEFAULT_PORT: 3000;
|
|
34
51
|
export const DEFAULT_STATIC_PREFIX: '/';
|