@fastly/compute-js-context 0.4.1 → 0.4.2
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 +8 -1
- package/build/proxy.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.2] - 2025-10-08
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fix typing of Proxy when bindings are empty
|
|
15
|
+
|
|
10
16
|
## [0.4.1] - 2025-10-06
|
|
11
17
|
|
|
12
18
|
### Changed
|
|
@@ -19,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
25
|
|
|
20
26
|
- Initial public release
|
|
21
27
|
|
|
22
|
-
[unreleased]: https://github.com/fastly/compute-js-context/compare/v0.4.
|
|
28
|
+
[unreleased]: https://github.com/fastly/compute-js-context/compare/v0.4.2...HEAD
|
|
29
|
+
[0.4.2]: https://github.com/fastly/compute-js-context/compare/v0.4.1...v0.4.2
|
|
23
30
|
[0.4.1]: https://github.com/fastly/compute-js-context/compare/v0.2.0...v0.4.1
|
|
24
31
|
[0.2.0]: https://github.com/fastly/compute-js-context/releases/tag/v0.2.0
|
package/build/proxy.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ type BindingStringToResourceInstanceTypeMapping = {
|
|
|
29
29
|
SecretStore: SecretStore;
|
|
30
30
|
};
|
|
31
31
|
export type ResourceInstance<T> = T extends Def<infer K extends keyof BindingStringToResourceInstanceTypeMapping> ? BindingStringToResourceInstanceTypeMapping[K] : never;
|
|
32
|
-
export type ContextProxy<T extends BindingsDefs> = {
|
|
32
|
+
export type ContextProxy<T extends BindingsDefs> = keyof T extends never ? Record<string, never> : {
|
|
33
33
|
[K in keyof T]: ResourceInstance<T[K]>;
|
|
34
34
|
};
|
|
35
35
|
export declare function buildContextProxy<T extends BindingsDefs>(context: Context, bindingsDefs: T): ContextProxy<T>;
|