@stacksjs/types 0.75.765 → 0.75.766
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/security.d.ts +1 -0
- package/dist/utils.d.ts +8 -1
- package/package.json +7 -7
package/dist/security.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export declare interface SecurityOptions {
|
|
|
62
62
|
limit: { max: number, per: 'second' | 'minute' | 'hour' | 'day' | number }
|
|
63
63
|
| ((request: any) => { max: number, per: 'second' | 'minute' | 'hour' | 'day' | number } | Promise<{ max: number, per: 'second' | 'minute' | 'hour' | 'day' | number }>)
|
|
64
64
|
cacheSeconds?: number
|
|
65
|
+
refusal?: (info: { retryAfter: number, limit: number, headers: Record<string, string> }, request: any) => Response | Promise<Response>
|
|
65
66
|
}>
|
|
66
67
|
rateLimit: RateLimitSecurityOptions
|
|
67
68
|
trustedProxies?: readonly string[]
|
package/dist/utils.d.ts
CHANGED
|
@@ -38,7 +38,14 @@ export type DeepMerge<F, S> = S extends MergeLeaf | readonly unknown[] ? S
|
|
|
38
38
|
: K extends keyof S ? S[K] : K extends keyof F ? F[K] : never
|
|
39
39
|
} : S
|
|
40
40
|
: S;
|
|
41
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Every property optional, all the way down. Functions are left whole: mapping
|
|
43
|
+
* over one turned it into `{}`, so a function-valued option (a rate limiter's
|
|
44
|
+
* `key` or `refusal`, say) accepted any value and gave its callback no
|
|
45
|
+
* parameter types.
|
|
46
|
+
*/
|
|
47
|
+
// eslint-disable-next-line pickier/no-unused-vars
|
|
48
|
+
export type DeepPartial<T> = T extends (...args: any[]) => any ? T : {
|
|
42
49
|
[P in keyof T]?: DeepPartial<T[P]>
|
|
43
50
|
}
|
|
44
51
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.75.
|
|
4
|
+
"version": "0.75.766",
|
|
5
5
|
"description": "The Stacks framework types.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": [
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@stacksjs/bunpress": "^0.2.36",
|
|
72
72
|
"@stacksjs/clapp": "^0.2.17",
|
|
73
|
-
"@stacksjs/events": "0.75.
|
|
74
|
-
"@stacksjs/hq": "0.75.
|
|
75
|
-
"@stacksjs/strings": "0.75.
|
|
73
|
+
"@stacksjs/events": "0.75.766",
|
|
74
|
+
"@stacksjs/hq": "0.75.766",
|
|
75
|
+
"@stacksjs/strings": "0.75.766",
|
|
76
76
|
"@stacksjs/stx": "^0.2.983",
|
|
77
77
|
"@stacksjs/ts-validation": "^0.5.7",
|
|
78
78
|
"bun-query-builder": "^0.6.5",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"stripe": "23.0.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@stacksjs/validation": "0.75.
|
|
83
|
+
"@stacksjs/validation": "0.75.766",
|
|
84
84
|
"better-dx": "^0.2.42"
|
|
85
85
|
},
|
|
86
86
|
"sideEffects": false,
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
"peerDependencies": {
|
|
115
|
-
"@stacksjs/actions": "0.75.
|
|
116
|
-
"@stacksjs/scheduler": "0.75.
|
|
115
|
+
"@stacksjs/actions": "0.75.766",
|
|
116
|
+
"@stacksjs/scheduler": "0.75.766"
|
|
117
117
|
}
|
|
118
118
|
}
|