@fastly/compute-js-static-publish 7.0.2 → 8.0.0-beta.0
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/README.md +13 -4
- package/README.short.md +13 -4
- package/build/cli/cli/commands/manage/clean.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/manage/clean.js +62 -108
- package/build/cli/cli/commands/manage/collections/delete.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/manage/collections/delete.js +50 -72
- package/build/cli/cli/commands/manage/collections/index.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/manage/collections/index.js +15 -1
- package/build/cli/cli/commands/manage/collections/list.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/manage/collections/list.js +45 -73
- package/build/cli/cli/commands/manage/collections/promote.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/manage/collections/promote.js +56 -93
- package/build/cli/cli/commands/manage/collections/update-expiration.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/manage/collections/update-expiration.js +48 -77
- package/build/cli/cli/commands/manage/index.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/manage/index.js +15 -1
- package/build/cli/cli/commands/manage/publish-content.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/manage/publish-content.js +90 -187
- package/build/cli/{commands → cli/commands}/scaffold/index.d.ts +4 -0
- package/build/cli/cli/commands/scaffold/index.d.ts.map +1 -0
- package/build/cli/{commands → cli/commands}/scaffold/index.js +262 -38
- package/build/cli/cli/compression/brotli.d.ts.map +1 -0
- package/build/cli/cli/compression/gzip.d.ts.map +1 -0
- package/build/cli/cli/compression/index.d.ts.map +1 -0
- package/build/cli/{index.d.ts.map → cli/index.d.ts.map} +1 -1
- package/build/cli/{index.js → cli/index.js} +8 -0
- package/build/cli/cli/storage/kv-store-local-provider.d.ts +20 -0
- package/build/cli/cli/storage/kv-store-local-provider.d.ts.map +1 -0
- package/build/cli/cli/storage/kv-store-local-provider.js +86 -0
- package/build/cli/cli/storage/kv-store-provider.d.ts +24 -0
- package/build/cli/cli/storage/kv-store-provider.d.ts.map +1 -0
- package/build/cli/cli/storage/kv-store-provider.js +182 -0
- package/build/cli/cli/storage/s3-storage-provider.d.ts +30 -0
- package/build/cli/cli/storage/s3-storage-provider.d.ts.map +1 -0
- package/build/cli/cli/storage/s3-storage-provider.js +201 -0
- package/build/cli/cli/storage/storage-provider.d.ts +44 -0
- package/build/cli/cli/storage/storage-provider.d.ts.map +1 -0
- package/build/cli/cli/storage/storage-provider.js +26 -0
- package/build/cli/cli/util/api-token.d.ts.map +1 -0
- package/build/cli/cli/util/args.d.ts.map +1 -0
- package/build/cli/cli/util/aws-credentials.d.ts +12 -0
- package/build/cli/cli/util/aws-credentials.d.ts.map +1 -0
- package/build/cli/cli/util/aws-credentials.js +67 -0
- package/build/cli/{util → cli/util}/config.d.ts +1 -1
- package/build/cli/cli/util/config.d.ts.map +1 -0
- package/build/cli/{util → cli/util}/config.js +36 -20
- package/build/cli/cli/util/content-types.d.ts.map +1 -0
- package/build/cli/cli/util/data.d.ts.map +1 -0
- package/build/cli/cli/util/fastly-toml.d.ts.map +1 -0
- package/build/cli/cli/util/files.d.ts.map +1 -0
- package/build/cli/cli/util/kv-store-items.d.ts +5 -0
- package/build/cli/cli/util/kv-store-items.d.ts.map +1 -0
- package/build/cli/{util → cli/util}/kv-store-items.js +3 -42
- package/build/cli/{util → cli/util}/kv-store-local-server.d.ts +4 -7
- package/build/cli/cli/util/kv-store-local-server.d.ts.map +1 -0
- package/build/cli/{util → cli/util}/kv-store.d.ts +7 -10
- package/build/cli/cli/util/kv-store.d.ts.map +1 -0
- package/build/cli/cli/util/node.d.ts.map +1 -0
- package/build/cli/cli/util/package.d.ts.map +1 -0
- package/build/cli/{util → cli/util}/package.js +1 -1
- package/build/cli/{util → cli/util}/retryable.d.ts +3 -0
- package/build/cli/cli/util/retryable.d.ts.map +1 -0
- package/build/cli/cli/util/retryable.js +76 -0
- package/build/cli/cli/util/s3.d.ts +7 -0
- package/build/cli/cli/util/s3.d.ts.map +1 -0
- package/build/cli/cli/util/s3.js +43 -0
- package/build/cli/cli/util/variants.d.ts.map +1 -0
- package/build/{models/assets/kvstore-assets.d.ts → cli/models/assets/index.d.ts} +5 -5
- package/build/cli/models/assets/index.d.ts.map +1 -0
- package/build/cli/models/assets/index.js +33 -0
- package/build/cli/models/compression/index.d.ts.map +1 -0
- package/build/cli/models/config/kv-store-config.d.ts +6 -0
- package/build/cli/models/config/kv-store-config.d.ts.map +1 -0
- package/build/cli/models/config/kv-store-config.js +15 -0
- package/build/{models → cli/models}/config/publish-content-config.d.ts +4 -3
- package/build/cli/models/config/publish-content-config.d.ts.map +1 -0
- package/build/cli/models/config/publisher-server-config.d.ts.map +1 -0
- package/build/cli/models/config/s3-storage-config.d.ts +8 -0
- package/build/cli/models/config/s3-storage-config.d.ts.map +1 -0
- package/build/cli/models/config/s3-storage-config.js +11 -0
- package/build/cli/models/config/static-publish-rc.d.ts +31 -0
- package/build/cli/models/config/static-publish-rc.d.ts.map +1 -0
- package/build/cli/models/config/static-publish-rc.js +39 -0
- package/build/cli/models/metadata/index.d.ts +2 -0
- package/build/cli/models/metadata/index.d.ts.map +1 -0
- package/build/cli/models/metadata/index.js +8 -0
- package/build/cli/models/server/index.d.ts +7 -0
- package/build/cli/models/server/index.d.ts.map +1 -0
- package/build/cli/models/server/index.js +26 -0
- package/build/cli/models/time/index.d.ts.map +1 -0
- package/build/{models → cli/models}/time/index.js +5 -5
- package/build/server/models/assets/index.d.ts +17 -0
- package/build/server/models/assets/index.d.ts.map +1 -0
- package/build/server/models/assets/index.js +33 -0
- package/build/server/models/compression/index.d.ts +4 -0
- package/build/server/models/compression/index.d.ts.map +1 -0
- package/build/server/models/compression/index.js +11 -0
- package/build/server/models/config/kv-store-config.d.ts +6 -0
- package/build/server/models/config/kv-store-config.d.ts.map +1 -0
- package/build/server/models/config/kv-store-config.js +15 -0
- package/build/server/models/config/publish-content-config.d.ts +40 -0
- package/build/server/models/config/publish-content-config.d.ts.map +1 -0
- package/build/server/models/config/publisher-server-config.d.ts +20 -0
- package/build/server/models/config/publisher-server-config.d.ts.map +1 -0
- package/build/server/models/config/s3-storage-config.d.ts +8 -0
- package/build/server/models/config/s3-storage-config.d.ts.map +1 -0
- package/build/server/models/config/s3-storage-config.js +11 -0
- package/build/server/models/config/static-publish-rc.d.ts +31 -0
- package/build/server/models/config/static-publish-rc.d.ts.map +1 -0
- package/build/server/models/config/static-publish-rc.js +39 -0
- package/build/server/models/metadata/index.d.ts +2 -0
- package/build/server/models/metadata/index.d.ts.map +1 -0
- package/build/server/models/metadata/index.js +8 -0
- package/build/server/models/server/index.d.ts +7 -0
- package/build/server/models/server/index.d.ts.map +1 -0
- package/build/server/models/server/index.js +26 -0
- package/build/server/models/time/index.d.ts +8 -0
- package/build/server/models/time/index.d.ts.map +1 -0
- package/build/server/models/time/index.js +54 -0
- package/build/server/server/collection-selector/from-config-store.d.ts.map +1 -0
- package/build/server/server/collection-selector/from-cookie.d.ts.map +1 -0
- package/build/server/server/collection-selector/from-request.d.ts.map +1 -0
- package/build/server/server/collection-selector/index.d.ts.map +1 -0
- package/build/server/server/collection-selector/request-collection-selector.d.ts.map +1 -0
- package/build/server/server/collection-selector/request-collection-selector.js +5 -0
- package/build/server/server/index.d.ts +8 -0
- package/build/server/server/index.d.ts.map +1 -0
- package/build/server/server/index.js +15 -0
- package/build/server/{publisher-server → server/publisher-server}/index.d.ts +14 -14
- package/build/server/server/publisher-server/index.d.ts.map +1 -0
- package/build/server/{publisher-server → server/publisher-server}/index.js +60 -61
- package/build/server/server/publisher-server/serve-preconditions/if-modified-since.d.ts.map +1 -0
- package/build/server/server/publisher-server/serve-preconditions/if-none-match.d.ts.map +1 -0
- package/build/server/server/storage/kv-store-provider.d.ts +8 -0
- package/build/server/server/storage/kv-store-provider.d.ts.map +1 -0
- package/build/server/server/storage/kv-store-provider.js +24 -0
- package/build/server/server/storage/s3-storage-provider.d.ts +26 -0
- package/build/server/server/storage/s3-storage-provider.d.ts.map +1 -0
- package/build/server/server/storage/s3-storage-provider.js +110 -0
- package/build/server/server/storage/storage-provider.d.ts +48 -0
- package/build/server/server/storage/storage-provider.d.ts.map +1 -0
- package/build/server/{util/kv-store.js → server/storage/storage-provider.js} +17 -39
- package/build/server/server/util/cookies.d.ts.map +1 -0
- package/build/server/server/util/kv-store.d.ts.map +1 -0
- package/build/server/server/util/kv-store.js +40 -0
- package/package.json +9 -5
- package/build/cli/commands/manage/clean.d.ts.map +0 -1
- package/build/cli/commands/manage/collections/delete.d.ts.map +0 -1
- package/build/cli/commands/manage/collections/index.d.ts.map +0 -1
- package/build/cli/commands/manage/collections/list.d.ts.map +0 -1
- package/build/cli/commands/manage/collections/promote.d.ts.map +0 -1
- package/build/cli/commands/manage/collections/update-expiration.d.ts.map +0 -1
- package/build/cli/commands/manage/index.d.ts.map +0 -1
- package/build/cli/commands/manage/publish-content.d.ts.map +0 -1
- package/build/cli/commands/scaffold/index.d.ts.map +0 -1
- package/build/cli/compression/brotli.d.ts.map +0 -1
- package/build/cli/compression/gzip.d.ts.map +0 -1
- package/build/cli/compression/index.d.ts.map +0 -1
- package/build/cli/util/api-token.d.ts.map +0 -1
- package/build/cli/util/args.d.ts.map +0 -1
- package/build/cli/util/config.d.ts.map +0 -1
- package/build/cli/util/content-types.d.ts.map +0 -1
- package/build/cli/util/data.d.ts.map +0 -1
- package/build/cli/util/fastly-toml.d.ts.map +0 -1
- package/build/cli/util/files.d.ts.map +0 -1
- package/build/cli/util/kv-store-items.d.ts +0 -13
- package/build/cli/util/kv-store-items.d.ts.map +0 -1
- package/build/cli/util/kv-store-local-server.d.ts.map +0 -1
- package/build/cli/util/kv-store.d.ts.map +0 -1
- package/build/cli/util/node.d.ts.map +0 -1
- package/build/cli/util/package.d.ts.map +0 -1
- package/build/cli/util/retryable.d.ts.map +0 -1
- package/build/cli/util/retryable.js +0 -43
- package/build/cli/util/variants.d.ts.map +0 -1
- package/build/index.d.ts +0 -6
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -7
- package/build/models/assets/kvstore-assets.d.ts.map +0 -1
- package/build/models/assets/kvstore-assets.js +0 -28
- package/build/models/compression/index.d.ts.map +0 -1
- package/build/models/config/publish-content-config.d.ts.map +0 -1
- package/build/models/config/publisher-server-config.d.ts.map +0 -1
- package/build/models/config/static-publish-rc.d.ts +0 -7
- package/build/models/config/static-publish-rc.d.ts.map +0 -1
- package/build/models/server/index.d.ts +0 -5
- package/build/models/server/index.d.ts.map +0 -1
- package/build/models/server/index.js +0 -1
- package/build/models/time/index.d.ts.map +0 -1
- package/build/server/collection-selector/from-config-store.d.ts.map +0 -1
- package/build/server/collection-selector/from-cookie.d.ts.map +0 -1
- package/build/server/collection-selector/from-request.d.ts.map +0 -1
- package/build/server/collection-selector/index.d.ts.map +0 -1
- package/build/server/collection-selector/request-collection-selector.d.ts.map +0 -1
- package/build/server/publisher-server/index.d.ts.map +0 -1
- package/build/server/publisher-server/serve-preconditions/if-modified-since.d.ts.map +0 -1
- package/build/server/publisher-server/serve-preconditions/if-none-match.d.ts.map +0 -1
- package/build/server/util/cookies.d.ts.map +0 -1
- package/build/server/util/kv-store.d.ts.map +0 -1
- /package/build/cli/{commands → cli/commands}/manage/clean.d.ts +0 -0
- /package/build/cli/{commands → cli/commands}/manage/collections/delete.d.ts +0 -0
- /package/build/cli/{commands → cli/commands}/manage/collections/index.d.ts +0 -0
- /package/build/cli/{commands → cli/commands}/manage/collections/list.d.ts +0 -0
- /package/build/cli/{commands → cli/commands}/manage/collections/promote.d.ts +0 -0
- /package/build/cli/{commands → cli/commands}/manage/collections/update-expiration.d.ts +0 -0
- /package/build/cli/{commands → cli/commands}/manage/index.d.ts +0 -0
- /package/build/cli/{commands → cli/commands}/manage/publish-content.d.ts +0 -0
- /package/build/cli/{compression → cli/compression}/brotli.d.ts +0 -0
- /package/build/cli/{compression → cli/compression}/brotli.js +0 -0
- /package/build/cli/{compression → cli/compression}/gzip.d.ts +0 -0
- /package/build/cli/{compression → cli/compression}/gzip.js +0 -0
- /package/build/cli/{compression → cli/compression}/index.d.ts +0 -0
- /package/build/cli/{compression → cli/compression}/index.js +0 -0
- /package/build/cli/{index.d.ts → cli/index.d.ts} +0 -0
- /package/build/cli/{util → cli/util}/api-token.d.ts +0 -0
- /package/build/cli/{util → cli/util}/api-token.js +0 -0
- /package/build/cli/{util → cli/util}/args.d.ts +0 -0
- /package/build/cli/{util → cli/util}/args.js +0 -0
- /package/build/cli/{util → cli/util}/content-types.d.ts +0 -0
- /package/build/cli/{util → cli/util}/content-types.js +0 -0
- /package/build/cli/{util → cli/util}/data.d.ts +0 -0
- /package/build/cli/{util → cli/util}/data.js +0 -0
- /package/build/cli/{util → cli/util}/fastly-toml.d.ts +0 -0
- /package/build/cli/{util → cli/util}/fastly-toml.js +0 -0
- /package/build/cli/{util → cli/util}/files.d.ts +0 -0
- /package/build/cli/{util → cli/util}/files.js +0 -0
- /package/build/cli/{util → cli/util}/kv-store-local-server.js +0 -0
- /package/build/cli/{util → cli/util}/kv-store.js +0 -0
- /package/build/cli/{util → cli/util}/node.d.ts +0 -0
- /package/build/cli/{util → cli/util}/node.js +0 -0
- /package/build/cli/{util → cli/util}/package.d.ts +0 -0
- /package/build/cli/{util → cli/util}/variants.d.ts +0 -0
- /package/build/cli/{util → cli/util}/variants.js +0 -0
- /package/build/{models → cli/models}/compression/index.d.ts +0 -0
- /package/build/{models → cli/models}/compression/index.js +0 -0
- /package/build/{models → cli/models}/config/publish-content-config.js +0 -0
- /package/build/{models → cli/models}/config/publisher-server-config.d.ts +0 -0
- /package/build/{models → cli/models}/config/publisher-server-config.js +0 -0
- /package/build/{models → cli/models}/time/index.d.ts +0 -0
- /package/build/{models/config/static-publish-rc.js → server/models/config/publish-content-config.js} +0 -0
- /package/build/server/{collection-selector/request-collection-selector.js → models/config/publisher-server-config.js} +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/from-config-store.d.ts +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/from-config-store.js +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/from-cookie.d.ts +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/from-cookie.js +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/from-request.d.ts +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/from-request.js +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/index.d.ts +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/index.js +0 -0
- /package/build/server/{collection-selector → server/collection-selector}/request-collection-selector.d.ts +0 -0
- /package/build/server/{publisher-server → server/publisher-server}/serve-preconditions/if-modified-since.d.ts +0 -0
- /package/build/server/{publisher-server → server/publisher-server}/serve-preconditions/if-modified-since.js +0 -0
- /package/build/server/{publisher-server → server/publisher-server}/serve-preconditions/if-none-match.d.ts +0 -0
- /package/build/server/{publisher-server → server/publisher-server}/serve-preconditions/if-none-match.js +0 -0
- /package/build/server/{util → server/util}/cookies.d.ts +0 -0
- /package/build/server/{util → server/util}/cookies.js +0 -0
- /package/build/server/{util → server/util}/kv-store.d.ts +0 -0
|
@@ -4,26 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as fs from 'node:fs';
|
|
6
6
|
import * as path from 'node:path';
|
|
7
|
-
import {
|
|
7
|
+
import { encodeIndexMetadata } from '../../../models/server/index.js';
|
|
8
8
|
import { calcExpirationTime } from '../../../models/time/index.js';
|
|
9
|
-
import { loadApiToken } from '../../util/api-token.js';
|
|
10
|
-
import { getKvStoreEntryInfo, kvStoreSubmitEntry } from '../../util/kv-store.js';
|
|
11
9
|
import { parseCommandLine } from '../../util/args.js';
|
|
12
10
|
import { mergeContentTypes, testFileContentType } from '../../util/content-types.js';
|
|
13
11
|
import { LoadConfigError, loadPublishContentConfigFile, loadStaticPublisherRcFile } from '../../util/config.js';
|
|
14
12
|
import { applyDefaults } from '../../util/data.js';
|
|
15
|
-
import { readServiceId } from '../../util/fastly-toml.js';
|
|
16
13
|
import { calculateFileSizeAndHash, enumerateFiles, rootRelative } from '../../util/files.js';
|
|
17
|
-
import { applyKVStoreEntriesChunks, doKvStoreItemsOperation, } from '../../util/kv-store-items.js';
|
|
18
|
-
import { localKvStoreSubmitEntry, writeKVStoreEntriesForLocal, } from '../../util/kv-store-local-server.js';
|
|
19
|
-
import { isNodeError } from '../../util/node.js';
|
|
20
14
|
import { ensureVariantFileExists } from '../../util/variants.js';
|
|
21
|
-
|
|
15
|
+
import { loadStorageProviderFromStaticPublishRc, StorageProviderBatch, } from '../../storage/storage-provider.js';
|
|
16
|
+
// Storage key format:
|
|
22
17
|
// <publishId>_index_<preview_id>.json
|
|
23
18
|
// <publishId>_settings_<preview_id>.json
|
|
24
19
|
// <publishId>_files_sha256_<hash>_<variant>
|
|
25
|
-
// split large files into 20MiB chunks
|
|
26
|
-
const KV_STORE_CHUNK_SIZE = 1024 * 1024 * 20;
|
|
27
20
|
function help() {
|
|
28
21
|
console.log(`\
|
|
29
22
|
|
|
@@ -49,9 +42,7 @@ Optional:
|
|
|
49
42
|
--root-dir=<dir> Directory to publish from. Overrides the config file setting.
|
|
50
43
|
Default: rootDir from publish-content.config.js
|
|
51
44
|
|
|
52
|
-
--
|
|
53
|
-
When using Fastly KV Store, always overwrite
|
|
54
|
-
existing entries, even if unchanged.
|
|
45
|
+
--overwrite-existing Always overwrite existing entries in storage, even if unchanged.
|
|
55
46
|
|
|
56
47
|
Expiration:
|
|
57
48
|
--expires-in=<duration> Expiration duration from now.
|
|
@@ -65,7 +56,7 @@ Expiration:
|
|
|
65
56
|
⚠ These three options are mutually exclusive.
|
|
66
57
|
Specify only one.
|
|
67
58
|
|
|
68
|
-
|
|
59
|
+
KV Store Options:
|
|
69
60
|
--local Instead of working with the Fastly KV Store, operate on
|
|
70
61
|
local files that will be used to simulate the KV Store
|
|
71
62
|
with the local development environment.
|
|
@@ -75,6 +66,22 @@ Global Options:
|
|
|
75
66
|
1. FASTLY_API_TOKEN environment variable
|
|
76
67
|
2. Logged-in Fastly CLI profile
|
|
77
68
|
|
|
69
|
+
--kv-overwrite Alias for --overwrite-existing.
|
|
70
|
+
|
|
71
|
+
S3 Storage Options:
|
|
72
|
+
--aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
|
|
73
|
+
--aws-secret-access-key=<key> interface with S3.
|
|
74
|
+
If not set, the tool will check:
|
|
75
|
+
1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
|
|
76
|
+
environment variables
|
|
77
|
+
2. The aws credentials file, see below
|
|
78
|
+
|
|
79
|
+
--aws-profile=<profile> Profile within the aws credentials file.
|
|
80
|
+
If not set, the tool will check:
|
|
81
|
+
1. AWS_PROFILE environment variable
|
|
82
|
+
2. The default profile, if set
|
|
83
|
+
|
|
84
|
+
Global Options:
|
|
78
85
|
-h, --help Show this help message and exit.
|
|
79
86
|
|
|
80
87
|
Examples:
|
|
@@ -90,12 +97,16 @@ export async function action(actionArgs) {
|
|
|
90
97
|
{ name: 'config', type: String },
|
|
91
98
|
{ name: 'collection-name', type: String, },
|
|
92
99
|
{ name: 'root-dir', type: String, },
|
|
93
|
-
{ name: '
|
|
100
|
+
{ name: 'overwrite-existing', type: Boolean },
|
|
94
101
|
{ name: 'expires-in', type: String },
|
|
95
102
|
{ name: 'expires-at', type: String },
|
|
96
103
|
{ name: 'expires-never', type: Boolean },
|
|
97
104
|
{ name: 'local', type: Boolean },
|
|
98
105
|
{ name: 'fastly-api-token', type: String, },
|
|
106
|
+
{ name: 'kv-overwrite', type: Boolean },
|
|
107
|
+
{ name: 'aws-profile', type: String, },
|
|
108
|
+
{ name: 'aws-access-key-id', type: String, },
|
|
109
|
+
{ name: 'aws-secret-access-key', type: String, },
|
|
99
110
|
];
|
|
100
111
|
const parsed = parseCommandLine(actionArgs, optionDefinitions);
|
|
101
112
|
if (parsed.needHelp) {
|
|
@@ -107,49 +118,12 @@ export async function action(actionArgs) {
|
|
|
107
118
|
help();
|
|
108
119
|
return;
|
|
109
120
|
}
|
|
110
|
-
const { verbose, config: configFilePathValue, ['collection-name']: collectionNameValue, ['root-dir']: rootDir, ['
|
|
121
|
+
const { verbose, config: configFilePathValue, ['collection-name']: collectionNameValue, ['root-dir']: rootDir, ['overwrite-existing']: _overwriteExisting, ['expires-in']: expiresIn, ['expires-at']: expiresAt, ['expires-never']: expiresNever, local: localMode, ['fastly-api-token']: fastlyApiToken, ['kv-overwrite']: _kvOverwrite, ['aws-profile']: awsProfile, ['aws-access-key-id']: awsAccessKeyId, ['aws-secret-access-key']: awsSecretAccessKey, } = parsed.commandLineOptions;
|
|
122
|
+
const overwriteExisting = _overwriteExisting ?? _kvOverwrite;
|
|
111
123
|
// compute-js-static-publisher cli is always run from the Compute application directory
|
|
112
124
|
// in other words, the directory that contains `fastly.toml`.
|
|
113
125
|
const computeAppDir = path.resolve();
|
|
114
|
-
// Check to see if we have a service ID listed in `fastly.toml`.
|
|
115
|
-
// If we do NOT, then we do not use the KV Store.
|
|
116
|
-
let serviceId;
|
|
117
|
-
try {
|
|
118
|
-
serviceId = readServiceId(path.resolve(computeAppDir, './fastly.toml'));
|
|
119
|
-
}
|
|
120
|
-
catch (err) {
|
|
121
|
-
if (isNodeError(err) && err.code === 'ENOENT') {
|
|
122
|
-
console.warn(`❌ ERROR: can't find 'fastly.toml'.`);
|
|
123
|
-
process.exitCode = 1;
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
console.warn(`❌ ERROR: can't read or parse 'fastly.toml'.`);
|
|
127
|
-
process.exitCode = 1;
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
126
|
console.log(`🚀 Publishing content...`);
|
|
131
|
-
// Verify targets
|
|
132
|
-
let fastlyApiContext = undefined;
|
|
133
|
-
if (localMode) {
|
|
134
|
-
console.log(` Working on local simulated KV Store...`);
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
if (serviceId === null) {
|
|
138
|
-
console.log(`❌️ 'service_id' not set in 'fastly.toml' - Deploy your Compute app to Fastly before publishing.`);
|
|
139
|
-
process.exitCode = 1;
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
const apiTokenResult = loadApiToken({ commandLine: fastlyApiToken });
|
|
143
|
-
if (apiTokenResult == null) {
|
|
144
|
-
console.error("❌ Fastly API Token not provided.");
|
|
145
|
-
console.error("Set the FASTLY_API_TOKEN environment variable to an API token that has write access to the KV Store.");
|
|
146
|
-
process.exitCode = 1;
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
fastlyApiContext = { apiToken: apiTokenResult.apiToken };
|
|
150
|
-
console.log(`✔️ Fastly API Token: ${fastlyApiContext.apiToken.slice(0, 4)}${'*'.repeat(fastlyApiContext.apiToken.length - 4)} from '${apiTokenResult.source}'`);
|
|
151
|
-
console.log(` Working on the Fastly KV Store...`);
|
|
152
|
-
}
|
|
153
127
|
// #### load config
|
|
154
128
|
let staticPublisherRc;
|
|
155
129
|
try {
|
|
@@ -202,13 +176,28 @@ export async function action(actionArgs) {
|
|
|
202
176
|
console.log(`✔️ Public directory '${rootRelative(publicDirRoot)}'.`);
|
|
203
177
|
const publishId = staticPublisherRc.publishId;
|
|
204
178
|
console.log(` | Publish ID: ${publishId}`);
|
|
205
|
-
const kvStoreName = staticPublisherRc.kvStoreName;
|
|
206
|
-
console.log(` | Using KV Store: ${kvStoreName}`);
|
|
207
179
|
const defaultCollectionName = staticPublisherRc.defaultCollectionName;
|
|
208
180
|
console.log(` | Default Collection Name: ${defaultCollectionName}`);
|
|
209
181
|
const staticPublisherWorkingDir = staticPublisherRc.staticPublisherWorkingDir;
|
|
210
182
|
console.log(` | Static publisher working directory: ${staticPublisherWorkingDir}`);
|
|
211
|
-
|
|
183
|
+
// Storage Provider
|
|
184
|
+
let storageProvider;
|
|
185
|
+
try {
|
|
186
|
+
storageProvider = await loadStorageProviderFromStaticPublishRc(staticPublisherRc, {
|
|
187
|
+
computeAppDir,
|
|
188
|
+
localMode,
|
|
189
|
+
fastlyApiToken,
|
|
190
|
+
awsProfile,
|
|
191
|
+
awsAccessKeyId,
|
|
192
|
+
awsSecretAccessKey,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
console.error(`❌ Could not instantiate store provider`);
|
|
197
|
+
console.error(String(err));
|
|
198
|
+
process.exitCode = 1;
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
212
201
|
// Load content types
|
|
213
202
|
const contentTypes = mergeContentTypes(publishContentConfig.contentTypes);
|
|
214
203
|
// #### Collect all file paths
|
|
@@ -254,17 +243,17 @@ export async function action(actionArgs) {
|
|
|
254
243
|
const stats = {
|
|
255
244
|
kvStore: 0,
|
|
256
245
|
};
|
|
257
|
-
// Create "
|
|
258
|
-
// This will be used to hold a copy of files to prepare for upload to
|
|
246
|
+
// Create "storage content" sub dir if it doesn't exist already.
|
|
247
|
+
// This will be used to hold a copy of files to prepare for upload to storage
|
|
259
248
|
// and for serving using the local development server.
|
|
260
|
-
const
|
|
261
|
-
fs.mkdirSync(
|
|
262
|
-
// A list of items in
|
|
249
|
+
const storageContentDir = `${staticPublisherWorkingDir}/storage-content`;
|
|
250
|
+
fs.mkdirSync(storageContentDir, { recursive: true });
|
|
251
|
+
// A list of items in storage at the end of the publishing.
|
|
263
252
|
// Includes items that already exist as well. 'write' signifies
|
|
264
253
|
// that the item is to be written
|
|
265
|
-
const
|
|
254
|
+
const batch = new StorageProviderBatch();
|
|
266
255
|
// Assets included in the publishing, keyed by asset key
|
|
267
|
-
const
|
|
256
|
+
const assetsIndex = {};
|
|
268
257
|
const baseHashToVariantMetadatasMap = new Map();
|
|
269
258
|
// #### Iterate files
|
|
270
259
|
for (const file of files) {
|
|
@@ -288,8 +277,8 @@ export async function action(actionArgs) {
|
|
|
288
277
|
const contentCompression = contentTypeTestResult.precompressAsset ? publishContentConfig.contentCompression : [];
|
|
289
278
|
// #### Are we going to include this file?
|
|
290
279
|
let includeAsset;
|
|
291
|
-
if (publishContentConfig.
|
|
292
|
-
includeAsset = publishContentConfig.
|
|
280
|
+
if (publishContentConfig.assetInclusionTest != null) {
|
|
281
|
+
includeAsset = publishContentConfig.assetInclusionTest(assetKey, contentType);
|
|
293
282
|
}
|
|
294
283
|
else {
|
|
295
284
|
// If no test is set, then default to inclusion
|
|
@@ -321,78 +310,24 @@ export async function action(actionArgs) {
|
|
|
321
310
|
variantKey = `${variantKey}_${variant}`;
|
|
322
311
|
variantFilename = `${variantFilename}_${variant}`;
|
|
323
312
|
}
|
|
324
|
-
const variantFilePath = path.resolve(
|
|
313
|
+
const variantFilePath = path.resolve(storageContentDir, variantFilename);
|
|
325
314
|
let variantMetadata = variantMetadatas.get(variant);
|
|
326
315
|
if (variantMetadata != null) {
|
|
327
316
|
console.log(` 🏃♂️ Asset "${variantKey}" is identical to an item we already know about, reusing existing copy.`);
|
|
328
317
|
}
|
|
329
318
|
else {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
const kvStoreEntryInfo = await getKvStoreEntryInfo(fastlyApiContext, kvStoreName, variantKey);
|
|
338
|
-
if (!kvStoreEntryInfo) {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
let itemMetadata;
|
|
342
|
-
if (kvStoreEntryInfo.metadata != null) {
|
|
343
|
-
try {
|
|
344
|
-
itemMetadata = JSON.parse(kvStoreEntryInfo.metadata);
|
|
345
|
-
}
|
|
346
|
-
catch {
|
|
347
|
-
// if the metadata does not parse successfully as JSON,
|
|
348
|
-
// treat it as though it didn't exist.
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
if (isKVAssetVariantMetadata(itemMetadata)) {
|
|
352
|
-
let exists = false;
|
|
353
|
-
if (itemMetadata.size <= KV_STORE_CHUNK_SIZE) {
|
|
354
|
-
// For an item equal to or smaller than the chunk size, if it exists
|
|
355
|
-
// and its metadata asserts no chunk count, then we assume it exists.
|
|
356
|
-
if (itemMetadata.numChunks === undefined) {
|
|
357
|
-
exists = true;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
else {
|
|
361
|
-
// For chunked objects, if the first chunk exists, and its metadata asserts
|
|
362
|
-
// the same number of chunks based on size, then we assume it exists (for now).
|
|
363
|
-
// In the future we might actually check for the existence and sizes of
|
|
364
|
-
// every chunk in the KV Store.
|
|
365
|
-
const expectedNumChunks = Math.ceil(itemMetadata.size / KV_STORE_CHUNK_SIZE);
|
|
366
|
-
if (itemMetadata.numChunks === expectedNumChunks) {
|
|
367
|
-
exists = true;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
if (exists) {
|
|
371
|
-
kvStoreItemMetadata = {
|
|
372
|
-
contentEncoding: itemMetadata.contentEncoding,
|
|
373
|
-
size: itemMetadata.size,
|
|
374
|
-
hash: itemMetadata.hash,
|
|
375
|
-
numChunks: itemMetadata.numChunks,
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
if (kvStoreItemMetadata != null) {
|
|
382
|
-
console.log(` ・ Asset found in KV Store with key "${variantKey}".`);
|
|
383
|
-
// And we already know its hash and size.
|
|
384
|
-
variantMetadata = {
|
|
385
|
-
contentEncoding: kvStoreItemMetadata.contentEncoding,
|
|
386
|
-
size: kvStoreItemMetadata.size,
|
|
387
|
-
hash: kvStoreItemMetadata.hash,
|
|
388
|
-
numChunks: kvStoreItemMetadata.numChunks,
|
|
389
|
-
existsInKvStore: true,
|
|
390
|
-
};
|
|
319
|
+
if (!overwriteExisting) {
|
|
320
|
+
const assetVariantMetadata = await storageProvider.getExistingAssetVariant(variantKey);
|
|
321
|
+
if (assetVariantMetadata != null) {
|
|
322
|
+
console.log(` ・ Asset found in storage with key "${variantKey}".`);
|
|
323
|
+
// And we already know its hash and size.
|
|
324
|
+
variantMetadata = Object.assign(assetVariantMetadata, { existsInKvStore: true });
|
|
325
|
+
}
|
|
391
326
|
}
|
|
392
|
-
|
|
327
|
+
if (variantMetadata == null) {
|
|
393
328
|
await ensureVariantFileExists(variantFilePath, variant, file);
|
|
394
|
-
if (
|
|
395
|
-
console.log(` ・
|
|
329
|
+
if (localMode) {
|
|
330
|
+
console.log(` ・ Prepping asset for storage with key "${variantKey}".`);
|
|
396
331
|
}
|
|
397
332
|
let contentEncoding, hash, size;
|
|
398
333
|
if (variant === 'original') {
|
|
@@ -404,7 +339,7 @@ export async function action(actionArgs) {
|
|
|
404
339
|
contentEncoding = variant;
|
|
405
340
|
({ hash, size } = await calculateFileSizeAndHash(variantFilePath));
|
|
406
341
|
}
|
|
407
|
-
const numChunks =
|
|
342
|
+
const numChunks = storageProvider.calculateNumChunks(size);
|
|
408
343
|
variantMetadata = {
|
|
409
344
|
contentEncoding,
|
|
410
345
|
size,
|
|
@@ -414,26 +349,23 @@ export async function action(actionArgs) {
|
|
|
414
349
|
};
|
|
415
350
|
}
|
|
416
351
|
variantMetadatas.set(variant, variantMetadata);
|
|
417
|
-
|
|
352
|
+
const metadataJson = {
|
|
353
|
+
size: String(variantMetadata.size),
|
|
354
|
+
hash: variantMetadata.hash,
|
|
355
|
+
};
|
|
356
|
+
if (variantMetadata.contentEncoding != null) {
|
|
357
|
+
metadataJson.contentEncoding = variantMetadata.contentEncoding;
|
|
358
|
+
}
|
|
359
|
+
if (variantMetadata.numChunks != null) {
|
|
360
|
+
metadataJson.numChunks = String(variantMetadata.numChunks);
|
|
361
|
+
}
|
|
362
|
+
batch.add({
|
|
418
363
|
write: !variantMetadata.existsInKvStore,
|
|
419
364
|
size: variantMetadata.size,
|
|
420
365
|
key: variantKey,
|
|
421
366
|
filePath: variantFilePath,
|
|
422
|
-
metadataJson
|
|
423
|
-
contentEncoding: variantMetadata.contentEncoding,
|
|
424
|
-
size: variantMetadata.size,
|
|
425
|
-
hash: variantMetadata.hash,
|
|
426
|
-
numChunks: variantMetadata.numChunks,
|
|
427
|
-
},
|
|
367
|
+
metadataJson,
|
|
428
368
|
});
|
|
429
|
-
if (localMode) {
|
|
430
|
-
// Although we already know the size and hash of the variant, the local server
|
|
431
|
-
// needs a copy of the file so we create it if it doesn't exist.
|
|
432
|
-
// This may happen for example if files were uploaded to the KV Store in a previous
|
|
433
|
-
// publishing, but local static content files have been removed since.
|
|
434
|
-
await ensureVariantFileExists(variantFilePath, variant, file);
|
|
435
|
-
console.log(` ・ Prepping asset for local KV Store with key "${variantKey}".`);
|
|
436
|
-
}
|
|
437
369
|
}
|
|
438
370
|
// Only keep variants whose file size actually ends up smaller than
|
|
439
371
|
// what we started with.
|
|
@@ -441,7 +373,7 @@ export async function action(actionArgs) {
|
|
|
441
373
|
variantsToKeep.push(variant);
|
|
442
374
|
}
|
|
443
375
|
}
|
|
444
|
-
|
|
376
|
+
assetsIndex[assetKey] = {
|
|
445
377
|
key: `sha256:${baseHash}`,
|
|
446
378
|
size: baseSize,
|
|
447
379
|
contentType: contentTypeTestResult.contentType,
|
|
@@ -450,24 +382,7 @@ export async function action(actionArgs) {
|
|
|
450
382
|
};
|
|
451
383
|
}
|
|
452
384
|
console.log(`✅ Scan complete.`);
|
|
453
|
-
|
|
454
|
-
await applyKVStoreEntriesChunks(kvStoreItemDescriptions, KV_STORE_CHUNK_SIZE);
|
|
455
|
-
console.log(`✅ Large files have been chunked.`);
|
|
456
|
-
if (localMode) {
|
|
457
|
-
console.log(`📝 Writing local server KV Store entries.`);
|
|
458
|
-
writeKVStoreEntriesForLocal(storeFile, computeAppDir, kvStoreItemDescriptions);
|
|
459
|
-
console.log(`✅ Wrote KV Store entries for local server.`);
|
|
460
|
-
}
|
|
461
|
-
else {
|
|
462
|
-
console.log(`📤 Uploading entries to KV Store.`);
|
|
463
|
-
// fastlyApiContext is non-null if useKvStore is true
|
|
464
|
-
await doKvStoreItemsOperation(kvStoreItemDescriptions.filter(x => x.write), async ({ filePath, metadataJson }, key) => {
|
|
465
|
-
const fileBytes = fs.readFileSync(filePath);
|
|
466
|
-
await kvStoreSubmitEntry(fastlyApiContext, kvStoreName, key, fileBytes, metadataJson != null ? JSON.stringify(metadataJson) : undefined);
|
|
467
|
-
console.log(` 🌐 Submitted asset "${rootRelative(filePath)}" to KV Store with key "${key}".`);
|
|
468
|
-
});
|
|
469
|
-
console.log(`✅ Uploaded entries to KV Store.`);
|
|
470
|
-
}
|
|
385
|
+
await storageProvider.applyBatch(batch);
|
|
471
386
|
// #### INDEX FILE
|
|
472
387
|
console.log(`🗂️ Saving Index...`);
|
|
473
388
|
const indexFileKey = `${publishId}_index_${collectionName}`;
|
|
@@ -475,18 +390,12 @@ export async function action(actionArgs) {
|
|
|
475
390
|
publishedTime: Math.floor(Date.now() / 1000),
|
|
476
391
|
expirationTime: expirationTime ?? undefined,
|
|
477
392
|
};
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
fs.writeFileSync(indexFilePath, JSON.stringify(kvAssetsIndex));
|
|
482
|
-
await localKvStoreSubmitEntry(storeFile, indexFileKey, path.relative(computeAppDir, indexFilePath), JSON.stringify(indexMetadata));
|
|
483
|
-
}
|
|
484
|
-
else {
|
|
485
|
-
await kvStoreSubmitEntry(fastlyApiContext, kvStoreName, indexFileKey, JSON.stringify(kvAssetsIndex), JSON.stringify(indexMetadata));
|
|
486
|
-
}
|
|
393
|
+
const indexFileName = `index_${collectionName}.json`;
|
|
394
|
+
const indexFilePath = path.resolve(storageContentDir, indexFileName);
|
|
395
|
+
await storageProvider.submitStorageEntry(indexFileKey, indexFilePath, JSON.stringify(assetsIndex), encodeIndexMetadata(indexMetadata));
|
|
487
396
|
console.log(`✅ Index has been saved.`);
|
|
488
397
|
// #### SERVER SETTINGS
|
|
489
|
-
// These are saved to
|
|
398
|
+
// These are saved to storage
|
|
490
399
|
console.log(`⚙️ Saving server settings...`);
|
|
491
400
|
const server = applyDefaults(publishContentConfig.server, {
|
|
492
401
|
publicDirPrefix: '',
|
|
@@ -504,7 +413,7 @@ export async function action(actionArgs) {
|
|
|
504
413
|
let spaFile = server.spaFile;
|
|
505
414
|
if (spaFile != null) {
|
|
506
415
|
console.log(` ✔️ Application SPA file '${spaFile}'.`);
|
|
507
|
-
const spaAsset =
|
|
416
|
+
const spaAsset = assetsIndex[spaFile];
|
|
508
417
|
if (spaAsset == null || spaAsset.contentType !== 'text/html') {
|
|
509
418
|
if (verbose) {
|
|
510
419
|
console.log(` ⚠️ Notice: '${spaFile}' does not exist or is not of type 'text/html'. Ignoring.`);
|
|
@@ -520,7 +429,7 @@ export async function action(actionArgs) {
|
|
|
520
429
|
let notFoundPageFile = server.notFoundPageFile;
|
|
521
430
|
if (notFoundPageFile != null) {
|
|
522
431
|
console.log(` ✔️ Application 'not found (404)' file '${notFoundPageFile}'.`);
|
|
523
|
-
const notFoundPageAsset =
|
|
432
|
+
const notFoundPageAsset = assetsIndex[notFoundPageFile];
|
|
524
433
|
if (notFoundPageAsset == null || notFoundPageAsset.contentType !== 'text/html') {
|
|
525
434
|
if (verbose) {
|
|
526
435
|
console.log(` ⚠️ Notice: '${notFoundPageFile}' does not exist or is not of type 'text/html'. Ignoring.`);
|
|
@@ -545,15 +454,9 @@ export async function action(actionArgs) {
|
|
|
545
454
|
autoIndex,
|
|
546
455
|
};
|
|
547
456
|
const settingsFileKey = `${publishId}_settings_${collectionName}`;
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
fs.writeFileSync(settingsFilePath, JSON.stringify(serverSettings));
|
|
552
|
-
await localKvStoreSubmitEntry(storeFile, settingsFileKey, path.relative(computeAppDir, settingsFilePath), undefined);
|
|
553
|
-
}
|
|
554
|
-
else {
|
|
555
|
-
await kvStoreSubmitEntry(fastlyApiContext, kvStoreName, settingsFileKey, JSON.stringify(serverSettings), undefined);
|
|
556
|
-
}
|
|
457
|
+
const settingsFileName = `settings_${collectionName}.json`;
|
|
458
|
+
const settingsFilePath = path.resolve(storageContentDir, settingsFileName);
|
|
459
|
+
await storageProvider.submitStorageEntry(settingsFileKey, settingsFilePath, JSON.stringify(serverSettings));
|
|
557
460
|
console.log(`✅ Settings have been saved.`);
|
|
558
461
|
console.log(`🎉 Completed.`);
|
|
559
462
|
}
|
|
@@ -13,7 +13,11 @@ export type InitAppOptions = {
|
|
|
13
13
|
description: string | undefined;
|
|
14
14
|
serviceId: string | undefined;
|
|
15
15
|
publishId: string | undefined;
|
|
16
|
+
storageMode: string | undefined;
|
|
16
17
|
kvStoreName: string | undefined;
|
|
18
|
+
s3Region: string | undefined;
|
|
19
|
+
s3Bucket: string | undefined;
|
|
20
|
+
s3Endpoint: string | undefined;
|
|
17
21
|
};
|
|
18
22
|
export declare function action(actionArgs: string[]): Promise<void>;
|
|
19
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/scaffold/index.ts"],"names":[],"mappings":"AAsEA,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,yBAAyB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AA0TF,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAopBhD"}
|