@fastly/js-compute
Advanced tools
Comparing version 3.6.2 to 3.7.0
# Changelog | ||
## 3.7.0 (2023-10-14) | ||
### Added | ||
This release of `@fastly/js-compute` includes 4 new methods to the Backend class, which enable the Fastly Service to retrieve information about any backend, this is particularly useful for checking if the backend is “healthy”. ([#523](https://github.com/fastly/js-compute-runtime/issues/523)) ([08f816a](https://github.com/fastly/js-compute-runtime/commit/08f816ae4465316a2316467338e0d33ffbd20e7a)) | ||
The new methods are: | ||
- Backend.exists(name) - Check whether a backend with the given name exists for the Fastly Service. | ||
- Backend.fromName(name) - Check whether a backend with the given name exists for the Fastly Service and if it does, then returns an instance of Backend for the given name. | ||
- Backend.health(name) - Returns the health of the backend with the given name. | ||
- Backend.prototype.toName() - Return the name for the Backend instance. | ||
### Fixed | ||
* bring back support for build-time env vars ([#691](https://github.com/fastly/js-compute-runtime/issues/691)) ([c044ac4](https://github.com/fastly/js-compute-runtime/commit/c044ac4bbbd5629bfc879b7593a0bfa9c5e3cfcb)) | ||
* raise an error during wizening for async functions given to addEventListener ([#689](https://github.com/fastly/js-compute-runtime/issues/689)) ([e6747a2](https://github.com/fastly/js-compute-runtime/commit/e6747a28d70d71bc71da77c9b6e44848b95ea387)) | ||
## 3.6.2 (2023-10-05) | ||
@@ -769,3 +789,3 @@ | ||
This release adds support for Fastly [Object-store](https://developer.fastly.com/reference/api/services/resources/kv-store/), which is globally consistent key-value storage accessible across the Fastly Network. This makes it possible for your Compute@Edge application to read and write from Object-stores. | ||
This release adds support for Fastly [Object-store](https://developer.fastly.com/reference/api/services/resources/kv-store/), which is globally consistent key-value storage accessible across the Fastly Network. This makes it possible for your Fastly Compute application to read and write from Object-stores. | ||
@@ -905,3 +925,3 @@ We've added two classes, `ObjectStore`, and `ObjectStoreEntry`. `ObjectStore` is used to interact with a particular Object-store and `ObjectStoreEntry` is a particular value within an Object-store. We've made `ObjectStoreEntry` have a similar API as `Response` to make it simpler to read and write from Object-stores. I.e. `ObjectStoreEntry` has a `body` property which is a `ReadableStream` and has `arrayBuffer`/`json`/`text` methods - just like `Response`. | ||
- Updated the js-compute-runtime to `0.2.2` (Which includes fixes to geoip, a way to get environment variables, improves debugging of exceptions in the request handler, and other updates) | ||
- Added the `Env` namespace for accessing Fastly C@E environment variables. | ||
- Added the `Env` namespace for accessing Fastly Compute environment variables. | ||
@@ -931,3 +951,3 @@ ## 0.2.0 (2021-08-31) | ||
- Initial Release | ||
- Includes TypeScript type definitions for Compute@Edge flavored ServiceWorkers APIs | ||
- Includes TypeScript type definitions for Fastly Compute flavored ServiceWorkers APIs | ||
- Also includes the `js-compute-runtime` CLI for bundling JavaScript applications |
{ | ||
"name": "@fastly/js-compute", | ||
"version": "3.6.2", | ||
"version": "3.7.0", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": "16 - 20", |
# @fastly/js-compute | ||
JavaScript SDK and CLI for building JavaScript applications on [Fastly Compute](https://www.fastly.com/products/edge-compute/serverless). | ||
![npm version](https://img.shields.io/npm/v/@fastly/js-compute) ![npm downloads per month](https://img.shields.io/npm/dm/@fastly/js-compute) | ||
JavaScript SDK and CLI for building JavaScript applications on Fastly's [Compute@Edge](https://www.fastly.com/products/edge-compute/serverless). | ||
## Getting Started | ||
We recommend using the [Fastly CLI](https://github.com/fastly/cli) to create, build, and deploy JavaScript Compute@Edge services, as [described on the Fastly Developer Hub](https://developer.fastly.com/learning/compute/). | ||
We recommend using the [Fastly CLI](https://github.com/fastly/cli) to create, build, and deploy JavaScript Fastly Compute services, as [described on the Fastly Developer Hub](https://developer.fastly.com/learning/compute/). | ||
[Detailed documentation for JavaScript Compute@Edge services](https://developer.fastly.com/learning/compute/javascript/) is also available on Fastly Developer Hub. | ||
[Detailed documentation for JavaScript Fastly Compute services](https://developer.fastly.com/learning/compute/javascript/) is also available on Fastly Developer Hub. | ||
@@ -13,0 +13,0 @@ ## Usage |
@@ -104,2 +104,3 @@ import { dirname } from "node:path"; | ||
ENABLE_PBL: enablePBL ? '1' : '0', | ||
...process.env | ||
} | ||
@@ -106,0 +107,0 @@ } |
@@ -5,3 +5,3 @@ declare module "fastly:env" { | ||
* | ||
* For a list of available environment variables, see the [Fastly Developer Hub for C@E Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/) | ||
* For a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/) | ||
* | ||
@@ -8,0 +8,0 @@ * **Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization. |
@@ -15,3 +15,3 @@ /** | ||
/** | ||
* Causes the Compute@Edge JS runtime environment to log debug information to stdout. | ||
* Causes the Fastly Compute JS runtime environment to log debug information to stdout. | ||
* | ||
@@ -18,0 +18,0 @@ * **Note**: This is mostly for internal debugging purposes and will generate highly unstable |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19442201
3271
1