You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -194,7 +194,7 @@ You can override this file for a single `publish-content` command by specifying
194
194
-`excludeDirs` - Array of directory names or regex patterns to exclude (default: `['./node_modules']`).
195
195
-`excludeDotFiles` - Exclude dotfiles and dot-named directories (default: true).
196
196
-`includeWellKnown` - Always include `.well-known` even if dotfiles are excluded (default: true).
197
-
-`kvStoreAssetInclusionTest` - Function to determine inclusion and variant behavior per file.
197
+
-`assetInclusionTest` - Function to determine inclusion and variant behavior per file.
198
198
-`contentCompression` - Array of compression formats to pre-generate (`['br', 'gzip']` by default).
199
199
-`contentTypes` - Additional or override content type definitions.
200
200
@@ -483,7 +483,7 @@ async function handleRequest(request) {
483
483
484
484
## 📥 Using Published Assets in Your Code
485
485
486
-
To access files you've published, use the `getMatchingAsset()` and `loadKvAssetVariant()` methods on `publisherServer`.
486
+
To access files you've published, use the `getMatchingAsset()` and `loadAssetVariant()` methods on `publisherServer`.
487
487
488
488
### Access Metadata for a File:
489
489
@@ -502,16 +502,16 @@ if (asset != null) {
502
502
### Load the File from KV Store:
503
503
504
504
```js
505
-
const kvAssetVariant = await publisherServer.loadKvAssetVariant(asset, null); // pass 'gzip' or 'br' for compressed
505
+
const assetVariant = await publisherServer.loadAssetVariant(asset, null); // pass 'gzip' or 'br' for compressed
506
506
507
-
kvAssetVariant.kvStoreEntry; // KV Store entry (type KVStoreEntry defined in 'fastly:kv-store')
508
-
kvAssetVariant.size; // Size of the variant
509
-
kvAssetVariant.hash; // SHA256 of the variant
510
-
kvAssetVariant.contentEncoding; // 'gzip', 'br', or null
511
-
kvAssetVariant.numChunks; // Number of chunks (for large files)
507
+
assetVariant.storageEntry; // Storage entry (type StorageEntry defined in './src/storage/storage-provider.ts')
508
+
assetVariant.size; // Size of the variant
509
+
assetVariant.hash; // SHA256 of the variant
510
+
assetVariant.contentEncoding; // 'gzip', 'br', or null
511
+
assetVariant.numChunks; // Number of chunks (for large files)
512
512
```
513
513
514
-
You can stream `kvAssetVariant.kvStoreEntry.body` directly to a `Response`, or read it using `.text()`, `.json()`, or `.arrayBuffer()` depending on its content type.
514
+
You can stream `assetVariant.storageEntry.body` directly to a `Response`, or read it using `.text()`, `.json()`, or `.arrayBuffer()` depending on its content type.
515
515
516
516
---
517
517
@@ -609,7 +609,7 @@ After this process is complete, the PublisherServer object in the Compute applic
609
609
610
610
*At most one of **`--expires-in`**, **`--expires-at`**, or **`--expires-never`** may be specified*
611
611
612
-
**Global Options:**
612
+
**KV Store Options:**
613
613
614
614
- `--local`: Instead of working with the Fastly KV Store, operate on local files that will be used to simulate the KV Store with the local development environment.
615
615
@@ -633,7 +633,7 @@ This can include expired collection indexes and orphaned content assets.
633
633
- `--delete-expired-collections`: If set, expired collection index files will be deleted.
634
634
- `--dry-run`: Show what would be deleted without performing any deletions.
635
635
636
-
**Global Options:**
636
+
**KV Store Options:**
637
637
638
638
- `--local`: Instead of working with the Fastly KV Store, operate on local files that will be used to simulate the KV Store with the local development environment.
639
639
@@ -650,7 +650,7 @@ Lists all collections currently published in the KV Store.
650
650
651
651
##### Options:
652
652
653
-
**Global Options:**
653
+
**KV Store Options:**
654
654
655
655
- `--local`: Instead of working with the Fastly KV Store, operate on local files that will be used to simulate the KV Store with the local development environment.
656
656
@@ -681,7 +681,7 @@ Copies an existing collection (content + config) to a new collection name.
681
681
682
682
*At most one of **`--expires-in`**, **`--expires-at`**, or **`--expires-never`** may be specified*. If not provided, then the existing expiration rule of the collection being promoted is used.
683
683
684
-
**Global Options:**
684
+
**KV Store Options:**
685
685
686
686
- `--local`: Instead of working with the Fastly KV Store, operate on local files that will be used to simulate the KV Store with the local development environment.
687
687
@@ -709,7 +709,7 @@ Sets or updates the expiration time of an existing collection.
709
709
710
710
*Exactly one of **`--expires-in`**, **`--expires-at`**, or **`--expires-never`** must be specified*
711
711
712
-
**Global Options:**
712
+
**KV Store Options:**
713
713
714
714
- `--local`: Instead of working with the Fastly KV Store, operate on local files that will be used to simulate the KV Store with the local development environment.
715
715
@@ -732,7 +732,7 @@ Use the `npx @fastly/compute-js-static-publish clean` command afterward to remov
732
732
733
733
- `--collection-name`: The name of the collection to delete (required)
734
734
735
-
**Global Options:**
735
+
**KV Store Options:**
736
736
737
737
- `--local`: Instead of working with the Fastly KV Store, operate on local files that will be used to simulate the KV Store with the local development environment.
0 commit comments