@fastly/compute-js-static-publish 8.0.1 → 8.1.0-beta.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/DOCUMENTATION.md +792 -35
- package/README.md +13 -3
- package/README.short.md +13 -3
- package/build/cli/cli/commands/manage/clean.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/clean.js +14 -8
- package/build/cli/cli/commands/manage/collections/delete.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/delete.js +32 -15
- package/build/cli/cli/commands/manage/collections/index.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/index.js +10 -4
- package/build/cli/cli/commands/manage/collections/list.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/list.js +49 -8
- package/build/cli/cli/commands/manage/collections/promote.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/promote.js +69 -21
- package/build/cli/cli/commands/manage/collections/update-expiration.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/update-expiration.js +12 -12
- package/build/cli/cli/commands/manage/deploy.d.ts +2 -0
- package/build/cli/cli/commands/manage/deploy.d.ts.map +1 -0
- package/build/cli/cli/commands/manage/deploy.js +194 -0
- package/build/cli/cli/commands/manage/dev.d.ts +2 -0
- package/build/cli/cli/commands/manage/dev.d.ts.map +1 -0
- package/build/cli/cli/commands/manage/dev.js +78 -0
- package/build/cli/cli/commands/manage/eject.d.ts +2 -0
- package/build/cli/cli/commands/manage/eject.d.ts.map +1 -0
- package/build/cli/cli/commands/manage/eject.js +155 -0
- package/build/cli/cli/commands/manage/index.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/index.js +42 -5
- package/build/cli/cli/commands/manage/publish-content.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/publish-content.js +83 -37
- package/build/cli/cli/commands/manage/status.d.ts +2 -0
- package/build/cli/cli/commands/manage/status.d.ts.map +1 -0
- package/build/cli/cli/commands/manage/status.js +162 -0
- package/build/cli/cli/commands/manage/template/index.d.ts +2 -0
- package/build/cli/cli/commands/manage/template/index.d.ts.map +1 -0
- package/build/cli/cli/commands/manage/template/index.js +43 -0
- package/build/cli/cli/commands/manage/template/init.d.ts +13 -0
- package/build/cli/cli/commands/manage/template/init.d.ts.map +1 -0
- package/build/cli/cli/commands/manage/template/init.js +172 -0
- package/build/cli/cli/commands/manage/upgrade.d.ts +2 -0
- package/build/cli/cli/commands/manage/upgrade.d.ts.map +1 -0
- package/build/cli/cli/commands/manage/upgrade.js +59 -0
- package/build/cli/cli/commands/run-dev-watch.d.ts +8 -0
- package/build/cli/cli/commands/run-dev-watch.d.ts.map +1 -0
- package/build/cli/cli/commands/run-dev-watch.js +41 -0
- package/build/cli/cli/commands/run-template-hook.d.ts +2 -0
- package/build/cli/cli/commands/run-template-hook.d.ts.map +1 -0
- package/build/cli/cli/commands/run-template-hook.js +28 -0
- package/build/cli/cli/commands/scaffold/app-template.d.ts +17 -0
- package/build/cli/cli/commands/scaffold/app-template.d.ts.map +1 -0
- package/build/cli/cli/commands/scaffold/app-template.js +54 -0
- package/build/cli/cli/commands/scaffold/fastly-toml-sections.d.ts +5 -0
- package/build/cli/cli/commands/scaffold/fastly-toml-sections.d.ts.map +1 -0
- package/build/cli/cli/commands/scaffold/fastly-toml-sections.js +154 -0
- package/build/cli/cli/commands/scaffold/generate-app.d.ts +47 -0
- package/build/cli/cli/commands/scaffold/generate-app.d.ts.map +1 -0
- package/build/cli/cli/commands/scaffold/generate-app.js +164 -0
- package/build/cli/cli/commands/scaffold/index.d.ts +6 -0
- package/build/cli/cli/commands/scaffold/index.d.ts.map +1 -1
- package/build/cli/cli/commands/scaffold/index.js +208 -290
- package/build/cli/cli/commands/scaffold/render.d.ts +7 -0
- package/build/cli/cli/commands/scaffold/render.d.ts.map +1 -0
- package/build/cli/cli/commands/scaffold/render.js +72 -0
- package/build/cli/cli/hono/build.d.ts +43 -0
- package/build/cli/cli/hono/build.d.ts.map +1 -0
- package/build/cli/cli/hono/build.js +298 -0
- package/build/cli/cli/index.js +98 -5
- package/build/cli/cli/managed/app.d.ts +21 -0
- package/build/cli/cli/managed/app.d.ts.map +1 -0
- package/build/cli/cli/managed/app.js +162 -0
- package/build/cli/cli/managed/command-helpers.d.ts +6 -0
- package/build/cli/cli/managed/command-helpers.d.ts.map +1 -0
- package/build/cli/cli/managed/command-helpers.js +81 -0
- package/build/cli/cli/managed/eject.d.ts +6 -0
- package/build/cli/cli/managed/eject.d.ts.map +1 -0
- package/build/cli/cli/managed/eject.js +68 -0
- package/build/cli/cli/managed/fastly-service.d.ts +8 -0
- package/build/cli/cli/managed/fastly-service.d.ts.map +1 -0
- package/build/cli/cli/managed/fastly-service.js +21 -0
- package/build/cli/cli/managed/fingerprint.d.ts +13 -0
- package/build/cli/cli/managed/fingerprint.d.ts.map +1 -0
- package/build/cli/cli/managed/fingerprint.js +60 -0
- package/build/cli/cli/managed/lockfile.d.ts +31 -0
- package/build/cli/cli/managed/lockfile.d.ts.map +1 -0
- package/build/cli/cli/managed/lockfile.js +62 -0
- package/build/cli/cli/managed/project-edit.d.ts +3 -0
- package/build/cli/cli/managed/project-edit.d.ts.map +1 -0
- package/build/cli/cli/managed/project-edit.js +35 -0
- package/build/cli/cli/managed/project-file.d.ts +16 -0
- package/build/cli/cli/managed/project-file.d.ts.map +1 -0
- package/build/cli/cli/managed/project-file.js +119 -0
- package/build/cli/cli/managed/template-init.d.ts +12 -0
- package/build/cli/cli/managed/template-init.d.ts.map +1 -0
- package/build/cli/cli/managed/template-init.js +120 -0
- package/build/cli/cli/managed/version-check.d.ts +25 -0
- package/build/cli/cli/managed/version-check.d.ts.map +1 -0
- package/build/cli/cli/managed/version-check.js +84 -0
- package/build/cli/cli/storage/kv-store-local-provider.d.ts +1 -0
- package/build/cli/cli/storage/kv-store-local-provider.d.ts.map +1 -1
- package/build/cli/cli/storage/kv-store-local-provider.js +6 -3
- package/build/cli/cli/storage/kv-store-provider.d.ts +1 -0
- package/build/cli/cli/storage/kv-store-provider.d.ts.map +1 -1
- package/build/cli/cli/storage/kv-store-provider.js +9 -1
- package/build/cli/cli/storage/s3-storage-provider.d.ts +1 -0
- package/build/cli/cli/storage/s3-storage-provider.d.ts.map +1 -1
- package/build/cli/cli/storage/s3-storage-provider.js +4 -0
- package/build/cli/cli/storage/storage-provider.d.ts +3 -0
- package/build/cli/cli/storage/storage-provider.d.ts.map +1 -1
- package/build/cli/cli/storage/storage-provider.js +32 -0
- package/build/cli/cli/util/api-token.d.ts.map +1 -1
- package/build/cli/cli/util/collection-name.d.ts +3 -0
- package/build/cli/cli/util/collection-name.d.ts.map +1 -0
- package/build/cli/cli/util/collection-name.js +24 -0
- package/build/cli/cli/util/collection-selection-flags.d.ts +13 -0
- package/build/cli/cli/util/collection-selection-flags.d.ts.map +1 -0
- package/build/cli/cli/util/collection-selection-flags.js +131 -0
- package/build/cli/cli/util/config.d.ts +13 -0
- package/build/cli/cli/util/config.d.ts.map +1 -1
- package/build/cli/cli/util/config.js +172 -38
- package/build/cli/cli/util/data.d.ts.map +1 -1
- package/build/cli/cli/util/global-options.d.ts +13 -0
- package/build/cli/cli/util/global-options.d.ts.map +1 -0
- package/build/cli/cli/util/global-options.js +53 -0
- package/build/cli/cli/util/kv-store-items.d.ts +1 -0
- package/build/cli/cli/util/kv-store-items.d.ts.map +1 -1
- package/build/cli/cli/util/kv-store-items.js +16 -40
- package/build/cli/cli/util/kv-store-local-server.d.ts +1 -1
- package/build/cli/cli/util/kv-store-local-server.d.ts.map +1 -1
- package/build/cli/cli/util/kv-store-local-server.js +4 -2
- package/build/cli/cli/util/output.d.ts +31 -0
- package/build/cli/cli/util/output.d.ts.map +1 -0
- package/build/cli/cli/util/output.js +139 -0
- package/build/cli/cli/util/package.d.ts +6 -0
- package/build/cli/cli/util/package.d.ts.map +1 -1
- package/build/cli/cli/util/package.js +23 -0
- package/build/cli/cli/util/progress.d.ts.map +1 -1
- package/build/cli/cli/util/purge.d.ts +6 -2
- package/build/cli/cli/util/purge.d.ts.map +1 -1
- package/build/cli/cli/util/purge.js +7 -2
- package/build/cli/cli/util/resources.d.ts +2 -0
- package/build/cli/cli/util/resources.d.ts.map +1 -0
- package/build/cli/cli/util/resources.js +8 -0
- package/build/cli/cli/util/service-id.d.ts +1 -0
- package/build/cli/cli/util/service-id.d.ts.map +1 -1
- package/build/cli/cli/util/service-id.js +5 -1
- package/build/cli/cli/util/variants.d.ts.map +1 -1
- package/build/cli/models/assets/index.d.ts +6 -0
- package/build/cli/models/assets/index.d.ts.map +1 -1
- package/build/cli/models/assets/index.js +24 -0
- package/build/cli/models/collections/index.d.ts +3 -0
- package/build/cli/models/collections/index.d.ts.map +1 -0
- package/build/cli/models/collections/index.js +15 -0
- package/build/cli/models/compression/index.d.ts +1 -1
- package/build/cli/models/compression/index.d.ts.map +1 -1
- package/build/cli/models/config/collection-selection.d.ts +55 -0
- package/build/cli/models/config/collection-selection.d.ts.map +1 -0
- package/build/cli/models/config/collection-selection.js +238 -0
- package/build/cli/models/config/item-patterns.d.ts +4 -0
- package/build/cli/models/config/item-patterns.d.ts.map +1 -0
- package/build/cli/models/config/item-patterns.js +43 -0
- package/build/cli/models/config/publish-content-config.d.ts +6 -1
- package/build/cli/models/config/publish-content-config.d.ts.map +1 -1
- package/build/cli/models/config/static-publish-project.d.ts +23 -0
- package/build/cli/models/config/static-publish-project.d.ts.map +1 -0
- package/build/cli/models/config/static-publish-project.js +11 -0
- package/build/cli/models/config/static-publish-rc.d.ts +25 -0
- package/build/cli/models/config/static-publish-rc.d.ts.map +1 -1
- package/build/cli/models/config/static-publish-rc.js +31 -0
- package/build/cli/models/config/template-settings.d.ts +10 -0
- package/build/cli/models/config/template-settings.d.ts.map +1 -0
- package/build/cli/models/config/template-settings.js +72 -0
- package/build/cli/models/server/index.d.ts.map +1 -1
- package/build/cli/models/server/index.js +6 -2
- package/build/server/hono/extensions.d.ts +48 -0
- package/build/server/hono/extensions.d.ts.map +1 -0
- package/build/server/hono/extensions.js +65 -0
- package/build/server/hono/index.d.ts +30 -0
- package/build/server/hono/index.d.ts.map +1 -0
- package/build/server/hono/index.js +72 -0
- package/build/server/hono/path.d.ts +7 -0
- package/build/server/hono/path.d.ts.map +1 -0
- package/build/server/hono/path.js +32 -0
- package/build/server/models/assets/index.d.ts +6 -0
- package/build/server/models/assets/index.d.ts.map +1 -1
- package/build/server/models/assets/index.js +24 -0
- package/build/server/models/collections/index.d.ts +3 -0
- package/build/server/models/collections/index.d.ts.map +1 -0
- package/build/server/models/collections/index.js +15 -0
- package/build/server/models/compression/index.d.ts +1 -1
- package/build/server/models/compression/index.d.ts.map +1 -1
- package/build/server/models/config/collection-selection.d.ts +55 -0
- package/build/server/models/config/collection-selection.d.ts.map +1 -0
- package/build/server/models/config/collection-selection.js +238 -0
- package/build/server/models/config/item-patterns.d.ts +4 -0
- package/build/server/models/config/item-patterns.d.ts.map +1 -0
- package/build/server/models/config/item-patterns.js +43 -0
- package/build/server/models/config/publish-content-config.d.ts +6 -1
- package/build/server/models/config/publish-content-config.d.ts.map +1 -1
- package/build/server/models/config/static-publish-project.d.ts +23 -0
- package/build/server/models/config/static-publish-project.d.ts.map +1 -0
- package/build/server/models/config/static-publish-project.js +11 -0
- package/build/server/models/config/static-publish-rc.d.ts +25 -0
- package/build/server/models/config/static-publish-rc.d.ts.map +1 -1
- package/build/server/models/config/static-publish-rc.js +31 -0
- package/build/server/models/server/index.d.ts.map +1 -1
- package/build/server/models/server/index.js +6 -2
- package/build/server/server/collection-selection/index.d.ts +11 -0
- package/build/server/server/collection-selection/index.d.ts.map +1 -0
- package/build/server/server/collection-selection/index.js +192 -0
- package/build/server/server/collection-selector/from-cookie.d.ts.map +1 -1
- package/build/server/server/collection-selector/from-cookie.js +6 -8
- package/build/server/server/collection-selector/from-request.d.ts.map +1 -1
- package/build/server/server/index.d.ts +4 -1
- package/build/server/server/index.d.ts.map +1 -1
- package/build/server/server/index.js +3 -1
- package/build/server/server/publisher-server/accept-html.d.ts +2 -0
- package/build/server/server/publisher-server/accept-html.d.ts.map +1 -0
- package/build/server/server/publisher-server/accept-html.js +50 -0
- package/build/server/server/publisher-server/index.d.ts +59 -7
- package/build/server/server/publisher-server/index.d.ts.map +1 -1
- package/build/server/server/publisher-server/index.js +362 -145
- package/build/server/server/publisher-server/response-cache.d.ts +3 -0
- package/build/server/server/publisher-server/response-cache.d.ts.map +1 -1
- package/build/server/server/publisher-server/response-cache.js +24 -1
- package/build/server/server/storage/kv-store-provider.d.ts.map +1 -1
- package/build/server/server/storage/s3-storage-provider.d.ts.map +1 -1
- package/build/server/server/storage/storage-provider.d.ts.map +1 -1
- package/build/server/server/util/body-length.d.ts.map +1 -1
- package/build/server/server/util/server-timing.d.ts.map +1 -1
- package/package.json +21 -3
- package/resources/app/fastly.toml.njk +58 -0
- package/resources/app/gitignore.njk +9 -0
- package/resources/app/publish-content.config.from-project.js.njk +9 -0
- package/resources/app/publish-content.config.js.njk +35 -0
- package/resources/app/static-publish.project.js.njk +83 -0
- package/resources/app/static-publish.rc.js.njk +43 -0
- package/resources/template-init/hono/_example.ts +22 -0
- package/resources/template-init/hono/tsconfig.json +17 -0
- package/resources/templates/hono/package-lock.json +4123 -0
- package/resources/templates/hono/package.json +15 -0
- package/resources/templates/hono/scripts/template_postinstall.js +10 -0
- package/resources/templates/hono/scripts/template_prebuild.js +8 -0
- package/resources/templates/hono/scripts/template_watch.js +15 -0
- package/resources/templates/hono/src/hono-extensions.generated.d.ts +5 -0
- package/resources/templates/hono/src/index.ts +53 -0
- package/resources/templates/hono/tsconfig.json +17 -0
- package/resources/templates/plain/package-lock.json +4088 -0
- package/resources/templates/plain/package.json +10 -0
- package/resources/templates/plain/src/index.js +34 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type StorageProviderBatchEntry } from '../storage/storage-provider.js';
|
|
2
2
|
import { type KvStoreEntryInfo } from './kv-store.js';
|
|
3
3
|
export declare function getLocalKVStoreKeys(storeFile: string, prefix?: string): Promise<string[]>;
|
|
4
|
-
export declare function getLocalKvStoreEntry(storeFile: string, key: string, metadataOnly?: boolean): Promise<KvStoreEntryInfo | null>;
|
|
4
|
+
export declare function getLocalKvStoreEntry(storeFile: string, key: string, metadataOnly?: boolean, computeAppDir?: string): Promise<KvStoreEntryInfo | null>;
|
|
5
5
|
export declare function localKvStoreSubmitEntry(storeFile: string, key: string, file: string, metadata: string | undefined): Promise<void>;
|
|
6
6
|
export declare function localKvStoreDeleteEntry(storeFile: string, key: string): Promise<void>;
|
|
7
7
|
export declare function writeKVStoreEntriesForLocal(storeFile: string, computeAppDir: string, kvStoreItemDescriptions: StorageProviderBatchEntry[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kv-store-local-server.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/kv-store-local-server.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKtD,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,qBAoBhB;AAED,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,YAAY,CAAC,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"kv-store-local-server.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/kv-store-local-server.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKtD,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,qBAoBhB;AAED,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,YAAY,CAAC,EAAE,OAAO,EAEtB,aAAa,GAAE,MAAY,GAC1B,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CA+BlC;AAED,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,SAAS,iBAmB7B;AAED,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,iBAgBZ;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,uBAAuB,EAAE,yBAAyB,EAAE,QAiCrD"}
|
|
@@ -20,7 +20,9 @@ export async function getLocalKVStoreKeys(storeFile, prefix) {
|
|
|
20
20
|
}
|
|
21
21
|
return keys;
|
|
22
22
|
}
|
|
23
|
-
export async function getLocalKvStoreEntry(storeFile, key, metadataOnly
|
|
23
|
+
export async function getLocalKvStoreEntry(storeFile, key, metadataOnly,
|
|
24
|
+
// The paths of the entries are relative to the Compute app dir.
|
|
25
|
+
computeAppDir = '.') {
|
|
24
26
|
let store;
|
|
25
27
|
try {
|
|
26
28
|
// If the local KV store file exists, we have to add to it.
|
|
@@ -42,7 +44,7 @@ export async function getLocalKvStoreEntry(storeFile, key, metadataOnly) {
|
|
|
42
44
|
response = new Response(obj.data);
|
|
43
45
|
}
|
|
44
46
|
else {
|
|
45
|
-
const fileData = fs.readFileSync(obj.file);
|
|
47
|
+
const fileData = fs.readFileSync(path.resolve(computeAppDir, obj.file));
|
|
46
48
|
response = new Response(fileData);
|
|
47
49
|
}
|
|
48
50
|
return {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const EXIT_SUCCESS = 0;
|
|
2
|
+
export declare const EXIT_FAILED = 1;
|
|
3
|
+
export declare const EXIT_USAGE = 2;
|
|
4
|
+
export declare const JSON_SCHEMA_VERSION = 1;
|
|
5
|
+
declare const FAILED_CODES: readonly ['deploy-failed', 'failed'];
|
|
6
|
+
declare const USAGE_CODES: readonly ['usage', 'config-invalid', 'collection-name-invalid', 'collection-not-found', 'project-dir-not-found', 'json-not-supported', 'credentials-missing', 'version-mismatch', 'first-deploy-manual', 'version-not-published', 'template-init-needed'];
|
|
7
|
+
export type CliErrorCode = typeof FAILED_CODES[number] | typeof USAGE_CODES[number];
|
|
8
|
+
export declare const CLI_ERROR_CODES: readonly CliErrorCode[];
|
|
9
|
+
export type CliError = {
|
|
10
|
+
code: CliErrorCode;
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
export declare class ConfigError extends Error {
|
|
14
|
+
}
|
|
15
|
+
export declare function exitCodeOf(code: CliErrorCode): 1 | 2;
|
|
16
|
+
export declare function isNonInteractive(): boolean;
|
|
17
|
+
export declare function isJsonMode(): boolean;
|
|
18
|
+
export declare function addSecret(value: string | undefined | null): void;
|
|
19
|
+
export declare function redactSecrets(text: string): string;
|
|
20
|
+
export declare function setUpOutput(options: {
|
|
21
|
+
nonInteractive: boolean;
|
|
22
|
+
json: boolean;
|
|
23
|
+
secrets: string[];
|
|
24
|
+
}, env: Record<string, string | undefined>): void;
|
|
25
|
+
export declare function recordFailure(code: CliErrorCode, message: string): void;
|
|
26
|
+
export declare function fail(code: CliErrorCode, message: string): void;
|
|
27
|
+
export declare function errorCodeOf(err: unknown): CliErrorCode;
|
|
28
|
+
export declare function setJsonResult(result: Record<string, unknown>): void;
|
|
29
|
+
export declare function writeJsonOutput(): void;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/output.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,UAAU,IAAI,CAAC;AAE5B,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,QAAA,MAAM,YAAY,YAChB,eAAe,EACf,QAAQ,CACA,CAAC;AAGX,QAAA,MAAM,WAAW,YACf,OAAO,EACP,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,CACd,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAEpF,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAAwC,CAAC;AAE5F,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAK/D,qBAAa,WAAY,SAAQ,KAAK;CAAG;AAEzC,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,SAE5C;AASD,wBAAgB,gBAAgB,YAE/B;AAGD,wBAAgB,UAAU,YAEzB;AAKD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,QAKzD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AAOD,wBAAgB,WAAW,CAAC,OAAO,EAAE;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,QAe1I;AAKD,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,QAGhE;AAGD,wBAAgB,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,QAGvD;AAID,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,CAStD;AAGD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAE5D;AAGD,wBAAgB,eAAe,SAa9B"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Fastly, Inc.
|
|
3
|
+
* Licensed under the MIT license. See LICENSE file for details.
|
|
4
|
+
*/
|
|
5
|
+
import util from 'node:util';
|
|
6
|
+
// The contract with tools that run the CLI, for example in CI:
|
|
7
|
+
// - Exit codes: 0 success (also "nothing to do"), 1 the operation failed and a
|
|
8
|
+
// retry can help, 2 a usage or config error (a retry cannot help).
|
|
9
|
+
// - --json: stdout has exactly one JSON object, written at the end. The log
|
|
10
|
+
// lines go to stderr. Each object has schemaVersion. Adding a field keeps the
|
|
11
|
+
// version. Removing or changing a field increases it, only in a major release.
|
|
12
|
+
// - An error with --json: { schemaVersion, error: { code, message } }. The
|
|
13
|
+
// codes are part of the contract (CliErrorCode, also in the README). The
|
|
14
|
+
// message is for people, and can change.
|
|
15
|
+
export const EXIT_SUCCESS = 0;
|
|
16
|
+
export const EXIT_FAILED = 1;
|
|
17
|
+
export const EXIT_USAGE = 2;
|
|
18
|
+
export const JSON_SCHEMA_VERSION = 1;
|
|
19
|
+
// The codes that give exit 1.
|
|
20
|
+
const FAILED_CODES = [
|
|
21
|
+
'deploy-failed', // the build or the deploy of the app failed
|
|
22
|
+
'failed', // the operation failed, for example storage cannot be reached
|
|
23
|
+
];
|
|
24
|
+
// The codes that give exit 2.
|
|
25
|
+
const USAGE_CODES = [
|
|
26
|
+
'usage', // an unknown command or option, or a missing or incorrect option value
|
|
27
|
+
'config-invalid', // a config file cannot be loaded or is not valid
|
|
28
|
+
'collection-name-invalid', // a collection name breaks the rule
|
|
29
|
+
'collection-not-found', // the command needs a collection that does not exist
|
|
30
|
+
'project-dir-not-found', // --project-dir is not a directory, or has no config file
|
|
31
|
+
'json-not-supported', // --json with a command that does not support it
|
|
32
|
+
'credentials-missing', // a token or credentials are necessary, but not given
|
|
33
|
+
'version-mismatch', // managed.staticPublishVersion is not the version that runs
|
|
34
|
+
'first-deploy-manual', // a first deploy that must be done by hand (S3 storage, non-interactive)
|
|
35
|
+
'version-not-published', // eject needs a version of this package that is on npm
|
|
36
|
+
'template-init-needed', // template init --check: the template's folder is out of date
|
|
37
|
+
];
|
|
38
|
+
export const CLI_ERROR_CODES = [...USAGE_CODES, ...FAILED_CODES];
|
|
39
|
+
// An error in the settings that a command finds after it loads them, for
|
|
40
|
+
// example a name in managed.fastlyToml that the CLI writes. The CLI gives the
|
|
41
|
+
// code config-invalid (exit 2) for it.
|
|
42
|
+
export class ConfigError extends Error {
|
|
43
|
+
}
|
|
44
|
+
export function exitCodeOf(code) {
|
|
45
|
+
return FAILED_CODES.includes(code) ? EXIT_FAILED : EXIT_USAGE;
|
|
46
|
+
}
|
|
47
|
+
let nonInteractive = false;
|
|
48
|
+
let json = false;
|
|
49
|
+
let jsonResult = null;
|
|
50
|
+
let recordedError = null;
|
|
51
|
+
// True with --non-interactive, or when the CI environment variable is set. Then
|
|
52
|
+
// a command never asks a question: missing input is an error.
|
|
53
|
+
export function isNonInteractive() {
|
|
54
|
+
return nonInteractive;
|
|
55
|
+
}
|
|
56
|
+
// True with --json.
|
|
57
|
+
export function isJsonMode() {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
// Values that must never appear in the output, for example the API token.
|
|
61
|
+
const secrets = new Set();
|
|
62
|
+
export function addSecret(value) {
|
|
63
|
+
// A very short value would also replace normal text.
|
|
64
|
+
if (value != null && value.length >= 8) {
|
|
65
|
+
secrets.add(value);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export function redactSecrets(text) {
|
|
69
|
+
let result = text;
|
|
70
|
+
for (const secret of secrets) {
|
|
71
|
+
result = result.split(secret).join('[REDACTED]');
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
// Sets the mode of the run, and replaces the console methods with ones that
|
|
76
|
+
// redact the secrets: the given values, and the values of FASTLY_API_TOKEN and
|
|
77
|
+
// S3_SECRET_ACCESS_KEY. Thus an error message can never show a secret. With
|
|
78
|
+
// --json, all console methods write to stderr, so that stdout has only the
|
|
79
|
+
// JSON object.
|
|
80
|
+
export function setUpOutput(options, env) {
|
|
81
|
+
nonInteractive = options.nonInteractive;
|
|
82
|
+
json = options.json;
|
|
83
|
+
for (const secret of options.secrets) {
|
|
84
|
+
addSecret(secret);
|
|
85
|
+
}
|
|
86
|
+
addSecret(env.FASTLY_API_TOKEN);
|
|
87
|
+
addSecret(env.S3_SECRET_ACCESS_KEY);
|
|
88
|
+
for (const method of ['log', 'info', 'debug', 'warn', 'error']) {
|
|
89
|
+
const stream = json || method === 'warn' || method === 'error' ? process.stderr : process.stdout;
|
|
90
|
+
console[method] = (...args) => {
|
|
91
|
+
stream.write(redactSecrets(util.format(...args)) + '\n');
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Make the command fail with the exit code of the error code. Use this when
|
|
96
|
+
// the log already shows the error for the customer. With --json, the output
|
|
97
|
+
// has the first error only.
|
|
98
|
+
export function recordFailure(code, message) {
|
|
99
|
+
recordedError ??= { code, message: redactSecrets(message.replace(/^(Error: )?❌\s*/, '')) };
|
|
100
|
+
process.exitCode = exitCodeOf(code);
|
|
101
|
+
}
|
|
102
|
+
// Show an error for the customer, and make the command fail.
|
|
103
|
+
export function fail(code, message) {
|
|
104
|
+
console.error(`❌ ${message}`);
|
|
105
|
+
recordFailure(code, message);
|
|
106
|
+
}
|
|
107
|
+
// The error code for an error that a storage provider or the purge setup
|
|
108
|
+
// throws before the operation starts.
|
|
109
|
+
export function errorCodeOf(err) {
|
|
110
|
+
const message = String(err instanceof Error ? err.message : err);
|
|
111
|
+
if (/not provided/i.test(message)) {
|
|
112
|
+
return 'credentials-missing';
|
|
113
|
+
}
|
|
114
|
+
if (/^(❌ )?Unknown --|^--local is available only/.test(message)) {
|
|
115
|
+
return 'usage';
|
|
116
|
+
}
|
|
117
|
+
return 'config-invalid';
|
|
118
|
+
}
|
|
119
|
+
// The result of the command, for --json.
|
|
120
|
+
export function setJsonResult(result) {
|
|
121
|
+
jsonResult = result;
|
|
122
|
+
}
|
|
123
|
+
// With --json, write the one JSON object to stdout: the error, or the result.
|
|
124
|
+
export function writeJsonOutput() {
|
|
125
|
+
if (!json) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let output;
|
|
129
|
+
if (recordedError != null) {
|
|
130
|
+
output = { schemaVersion: JSON_SCHEMA_VERSION, error: recordedError };
|
|
131
|
+
}
|
|
132
|
+
else if (process.exitCode != null && process.exitCode !== EXIT_SUCCESS) {
|
|
133
|
+
output = { schemaVersion: JSON_SCHEMA_VERSION, error: { code: 'failed', message: 'The command failed.' } };
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
output = { schemaVersion: JSON_SCHEMA_VERSION, ...jsonResult };
|
|
137
|
+
}
|
|
138
|
+
process.stdout.write(redactSecrets(JSON.stringify(output, undefined, 2)) + '\n');
|
|
139
|
+
}
|
|
@@ -5,5 +5,11 @@ export type PackageJson = {
|
|
|
5
5
|
dependencies?: Record<string, string>;
|
|
6
6
|
devDependencies?: Record<string, string>;
|
|
7
7
|
};
|
|
8
|
+
export declare function getOwnPackageDir(): string;
|
|
9
|
+
export declare function readOwnPackageJson(): Record<string, any>;
|
|
10
|
+
export declare function getOwnVersion(): string;
|
|
11
|
+
export declare function cliCommand(options?: {
|
|
12
|
+
latest?: boolean;
|
|
13
|
+
}, version?: string): string;
|
|
8
14
|
export declare function findComputeJsStaticPublisherVersion(packageJson: PackageJson | null): string;
|
|
9
15
|
//# sourceMappingURL=package.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/package.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C,CAAC;
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/package.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C,CAAC;AAGF,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAGD,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAExD;AAGD,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAQD,wBAAgB,UAAU,CAAC,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,EAAE,OAAO,GAAE,MAAwB,GAAG,MAAM,CAIxG;AAED,wBAAgB,mCAAmC,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,UA8ClF"}
|
|
@@ -4,6 +4,29 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import fs from 'node:fs';
|
|
6
6
|
import path from 'node:path';
|
|
7
|
+
// The package dir of the copy of this package that runs.
|
|
8
|
+
export function getOwnPackageDir() {
|
|
9
|
+
return path.resolve(import.meta.dirname, '../../../..');
|
|
10
|
+
}
|
|
11
|
+
// The package.json of the copy of this package that runs.
|
|
12
|
+
export function readOwnPackageJson() {
|
|
13
|
+
return JSON.parse(fs.readFileSync(path.resolve(getOwnPackageDir(), 'package.json'), 'utf-8'));
|
|
14
|
+
}
|
|
15
|
+
// The version of this package, from the package.json of the copy that runs.
|
|
16
|
+
export function getOwnVersion() {
|
|
17
|
+
return readOwnPackageJson().version;
|
|
18
|
+
}
|
|
19
|
+
// The npx command of this package, for the messages of the CLI. The version of
|
|
20
|
+
// a prerelease (for example 8.1.0-beta.1) gives the dist-tag of the prerelease
|
|
21
|
+
// (@beta), because npx without a dist-tag runs the latest stable version, which
|
|
22
|
+
// does not have the features of the prerelease. A stable version gives no
|
|
23
|
+
// dist-tag, or @latest with { latest: true } (the command that makes a new
|
|
24
|
+
// app).
|
|
25
|
+
export function cliCommand(options = {}, version = getOwnVersion()) {
|
|
26
|
+
const prerelease = /^\d+\.\d+\.\d+-([a-z][a-z0-9-]*)/.exec(version)?.[1];
|
|
27
|
+
const distTag = prerelease ?? (options.latest ? 'latest' : undefined);
|
|
28
|
+
return `npx @fastly/compute-js-static-publish${distTag != null ? `@${distTag}` : ''}`;
|
|
29
|
+
}
|
|
7
30
|
export function findComputeJsStaticPublisherVersion(packageJson) {
|
|
8
31
|
// Get the current compute js static publisher version.
|
|
9
32
|
let computeJsStaticPublisherVersion = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/progress.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAKtC,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IANzB,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,UAAU,CAAqB;
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/progress.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAKtC,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IANzB,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,UAAU,CAAqB;IAEvC,YACmB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,KAAK,CAAC,EAAE,MAAM,YAAA,EAC7B;IAGJ,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,QAavC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FastlyApiContext } from './api-token.js';
|
|
2
|
-
export declare const purgeEnvironments: readonly [
|
|
2
|
+
export declare const purgeEnvironments: readonly ['production', 'staging'];
|
|
3
3
|
export type PurgeEnvironment = typeof purgeEnvironments[number];
|
|
4
4
|
export declare function parsePurgeEnvironments(values: unknown): PurgeEnvironment[];
|
|
5
5
|
export type PurgeTarget = {
|
|
@@ -11,6 +11,7 @@ export type LoadPurgeTargetParams = {
|
|
|
11
11
|
localMode: boolean;
|
|
12
12
|
computeAppDir: string;
|
|
13
13
|
fastlyServiceId: unknown;
|
|
14
|
+
projectServiceId?: string;
|
|
14
15
|
fastlyApiToken: unknown;
|
|
15
16
|
purgeEnvironments: unknown;
|
|
16
17
|
};
|
|
@@ -24,5 +25,8 @@ export type PurgeOutcome = {
|
|
|
24
25
|
reason: string;
|
|
25
26
|
};
|
|
26
27
|
export declare function purgeSurrogateKey(fastlyApiContext: FastlyApiContext, fastlyServiceId: string, surrogateKey: string, softPurge?: boolean, environment?: PurgeEnvironment): Promise<PurgeOutcome>;
|
|
27
|
-
export
|
|
28
|
+
export type PurgeResult = {
|
|
29
|
+
environment: PurgeEnvironment;
|
|
30
|
+
} & PurgeOutcome;
|
|
31
|
+
export declare function purgeCollection(purgeTarget: PurgeTarget, publishId: string, collectionName: string): Promise<PurgeResult[]>;
|
|
28
32
|
//# sourceMappingURL=purge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purge.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/purge.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiB,KAAK,gBAAgB,EAA4B,MAAM,gBAAgB,CAAC;AAGhG,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"purge.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/purge.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiB,KAAK,gBAAgB,EAA4B,MAAM,gBAAgB,CAAC;AAGhG,eAAO,MAAM,iBAAiB,YAAK,YAAY,EAAE,SAAS,CAAW,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAIhE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAkB1E;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,gBAAgB,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IAEzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAMF,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,WAAW,GAAG,IAAI,CAiCjF;AAMD,MAAM,MAAM,YAAY,GACpB;IAAE,MAAM,EAAE,QAAQ,CAAA;CAAE,GACpB;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GACxB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,SAAS,GAAE,OAAe,EAC1B,WAAW,GAAE,gBAA+B,GAC3C,OAAO,CAAC,YAAY,CAAC,CA8BvB;AAED,MAAM,MAAM,WAAW,GAAG;IAAE,WAAW,EAAE,gBAAgB,CAAA;CAAE,GAAG,YAAY,CAAC;AAK3E,wBAAsB,eAAe,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAoBjI"}
|
|
@@ -41,9 +41,10 @@ export function loadPurgeTarget(params) {
|
|
|
41
41
|
const serviceIdResult = loadServiceId({
|
|
42
42
|
commandLine: params.fastlyServiceId,
|
|
43
43
|
fastlyTomlPath: path.resolve(params.computeAppDir, 'fastly.toml'),
|
|
44
|
+
projectServiceId: params.projectServiceId,
|
|
44
45
|
});
|
|
45
46
|
if (serviceIdResult == null) {
|
|
46
|
-
console.log(`- Service ID not found (--fastly-service-id, FASTLY_SERVICE_ID, or fastly.toml). Will skip the purge.`);
|
|
47
|
+
console.log(`- Service ID not found (--fastly-service-id, FASTLY_SERVICE_ID, managed.serviceId, or fastly.toml). Will skip the purge.`);
|
|
47
48
|
return null;
|
|
48
49
|
}
|
|
49
50
|
console.log(`✔️ Service ID from ${serviceIdResult.source}: ${serviceIdResult.serviceId}`);
|
|
@@ -85,12 +86,15 @@ export async function purgeSurrogateKey(fastlyApiContext, fastlyServiceId, surro
|
|
|
85
86
|
return { result: 'purged' };
|
|
86
87
|
}
|
|
87
88
|
// Purges the cached responses of a collection in each environment of the purge
|
|
88
|
-
// target
|
|
89
|
+
// target, and returns the outcome for each environment. A failed purge is a
|
|
90
|
+
// warning, because the change to storage is done.
|
|
89
91
|
export async function purgeCollection(purgeTarget, publishId, collectionName) {
|
|
90
92
|
const surrogateKey = `${publishId}-${collectionName}`;
|
|
93
|
+
const results = [];
|
|
91
94
|
for (const environment of purgeTarget.environments) {
|
|
92
95
|
console.log(`Purging surrogate key [${surrogateKey}] on service [${purgeTarget.serviceId}] (${environment})...`);
|
|
93
96
|
const outcome = await purgeSurrogateKey(purgeTarget.fastlyApiContext, purgeTarget.serviceId, surrogateKey, true, environment);
|
|
97
|
+
results.push({ environment, ...outcome });
|
|
94
98
|
switch (outcome.result) {
|
|
95
99
|
case 'purged':
|
|
96
100
|
console.log('Purged');
|
|
@@ -103,4 +107,5 @@ export async function purgeCollection(purgeTarget, publishId, collectionName) {
|
|
|
103
107
|
break;
|
|
104
108
|
}
|
|
105
109
|
}
|
|
110
|
+
return results;
|
|
106
111
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/resources.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY,QAA6D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Fastly, Inc.
|
|
3
|
+
* Licensed under the MIT license. See LICENSE file for details.
|
|
4
|
+
*/
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
// The resources/ directory of this package. This file is
|
|
7
|
+
// build/cli/cli/util/resources.js in the package.
|
|
8
|
+
export const resourcesDir = path.resolve(import.meta.dirname, '../../../../resources');
|
|
@@ -5,6 +5,7 @@ export type LoadServiceIdResult = {
|
|
|
5
5
|
export type LoadServiceIdParams = {
|
|
6
6
|
commandLine: unknown;
|
|
7
7
|
fastlyTomlPath: string;
|
|
8
|
+
projectServiceId?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare function loadServiceId(params: LoadServiceIdParams): LoadServiceIdResult | null;
|
|
10
11
|
//# sourceMappingURL=service-id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-id.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/service-id.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"service-id.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/service-id.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IAEvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAQF,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,GAAG,IAAI,CAuBrF"}
|
|
@@ -7,7 +7,8 @@ import { readServiceId } from './fastly-toml.js';
|
|
|
7
7
|
// Finds the Fastly Service ID to purge after a change to a collection. Checks, in order:
|
|
8
8
|
// 1. The command line (--fastly-service-id)
|
|
9
9
|
// 2. The FASTLY_SERVICE_ID environment variable
|
|
10
|
-
// 3.
|
|
10
|
+
// 3. managed.serviceId in static-publish.project.js (a managed project)
|
|
11
|
+
// 4. service_id in fastly.toml
|
|
11
12
|
// This is the same order as the Fastly CLI's --service-id.
|
|
12
13
|
export function loadServiceId(params) {
|
|
13
14
|
if (typeof params.commandLine === 'string' && params.commandLine.trim() !== '') {
|
|
@@ -17,6 +18,9 @@ export function loadServiceId(params) {
|
|
|
17
18
|
if (envServiceId) {
|
|
18
19
|
return { serviceId: envServiceId, source: 'env' };
|
|
19
20
|
}
|
|
21
|
+
if (params.projectServiceId != null && params.projectServiceId.trim() !== '') {
|
|
22
|
+
return { serviceId: params.projectServiceId.trim(), source: 'managed.serviceId' };
|
|
23
|
+
}
|
|
20
24
|
if (fs.existsSync(params.fastlyTomlPath)) {
|
|
21
25
|
const serviceId = readServiceId(params.fastlyTomlPath);
|
|
22
26
|
if (serviceId != null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/variants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAQ,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGrE,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,uBAAuB,CAAC;AAK5D,qBAAa,UAAU,CAAC,CAAC;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAE1D,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE;
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/variants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAQ,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGrE,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,uBAAuB,CAAC;AAK5D,qBAAa,UAAU,CAAC,CAAC;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAE1D,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAQ9E;CACF;AAED,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,EAChB,eAAe,GAAE,eAAoB,iBA6BtC"}
|
|
@@ -7,6 +7,12 @@ export type AssetEntry = {
|
|
|
7
7
|
variants: ContentCompressionTypes[];
|
|
8
8
|
};
|
|
9
9
|
export type AssetEntryMap = Record<string, AssetEntry>;
|
|
10
|
+
export declare const HIDDEN_INDEX_KEY_PREFIX = "hidden:";
|
|
11
|
+
export declare const HIDDEN_INDEX_FEATURE = "hidden";
|
|
12
|
+
export declare function hiddenIndexKey(assetKey: string): string;
|
|
13
|
+
export declare function isHiddenIndexKey(indexKey: string): boolean;
|
|
14
|
+
export declare function findAssetEntry(assetEntryMap: AssetEntryMap, assetKey: string, includeHidden: boolean): AssetEntry | null;
|
|
15
|
+
export declare function countHiddenEntries(assetEntryMap: AssetEntryMap): number;
|
|
10
16
|
export type AssetVariantMetadata = {
|
|
11
17
|
contentEncoding?: ContentCompressionTypes;
|
|
12
18
|
size: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/assets/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,uBAAuB,EAAqB,MAAM,yBAAyB,CAAC;AAE1F,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,uBAAuB,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/assets/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,uBAAuB,EAAqB,MAAM,yBAAyB,CAAC;AAE1F,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,uBAAuB,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAOvD,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE1D;AAGD,wBAAgB,cAAc,CAAC,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAKxH;AAGD,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAEvE;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,oBAAoB,GAAG,IAAI,CAiC/G"}
|
|
@@ -4,6 +4,30 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { getMetadataFieldValue } from '../metadata/index.js';
|
|
6
6
|
import { isCompressionType } from '../compression/index.js';
|
|
7
|
+
// A hidden file is published, but PublisherServer does not serve it for a
|
|
8
|
+
// request. Its key in the index is this prefix and then the asset key, for
|
|
9
|
+
// example 'hidden:/404.html'. A real asset key always starts with '/', so no
|
|
10
|
+
// request path can match such a key. A collection that has a hidden file
|
|
11
|
+
// requires the 'hidden' feature.
|
|
12
|
+
export const HIDDEN_INDEX_KEY_PREFIX = 'hidden:';
|
|
13
|
+
export const HIDDEN_INDEX_FEATURE = 'hidden';
|
|
14
|
+
export function hiddenIndexKey(assetKey) {
|
|
15
|
+
return HIDDEN_INDEX_KEY_PREFIX + assetKey;
|
|
16
|
+
}
|
|
17
|
+
export function isHiddenIndexKey(indexKey) {
|
|
18
|
+
return indexKey.startsWith(HIDDEN_INDEX_KEY_PREFIX);
|
|
19
|
+
}
|
|
20
|
+
// Find the entry for an asset key. With includeHidden, also find a hidden file.
|
|
21
|
+
export function findAssetEntry(assetEntryMap, assetKey, includeHidden) {
|
|
22
|
+
if (isHiddenIndexKey(assetKey)) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return assetEntryMap[assetKey] ?? (includeHidden ? assetEntryMap[hiddenIndexKey(assetKey)] : undefined) ?? null;
|
|
26
|
+
}
|
|
27
|
+
// The number of hidden files in an index.
|
|
28
|
+
export function countHiddenEntries(assetEntryMap) {
|
|
29
|
+
return Object.keys(assetEntryMap).filter(isHiddenIndexKey).length;
|
|
30
|
+
}
|
|
7
31
|
export function decodeAssetVariantMetadata(obj) {
|
|
8
32
|
if (obj == null) {
|
|
9
33
|
return null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/collections/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,oBAAoB,mGACiE,CAAC;AAEnG,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE3D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Fastly, Inc.
|
|
3
|
+
* Licensed under the MIT license. See LICENSE file for details.
|
|
4
|
+
*/
|
|
5
|
+
// A collection name must be a DNS label: lowercase a-z, 0-9, and '-', from
|
|
6
|
+
// 1 to 63 characters, with no '-' at the start or the end. A collection name
|
|
7
|
+
// is used in storage keys, in the surrogate key of the purge, in a cookie,
|
|
8
|
+
// and in hostnames (preview URLs), and a DNS label is safe in all of them.
|
|
9
|
+
// It also cannot have a character that breaks a cookie (';', ',', '=',
|
|
10
|
+
// spaces, quotes, '\', or control characters).
|
|
11
|
+
const COLLECTION_NAME_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
12
|
+
export const COLLECTION_NAME_RULE = "Use lowercase a-z, 0-9, and '-', from 1 to 63 characters, with no '-' at the start or the end.";
|
|
13
|
+
export function isValidCollectionName(name) {
|
|
14
|
+
return COLLECTION_NAME_PATTERN.test(name);
|
|
15
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const compressionTypes: readonly [
|
|
1
|
+
export declare const compressionTypes: readonly ['br', 'gzip'];
|
|
2
2
|
export type ContentCompressionTypes = typeof compressionTypes[number];
|
|
3
3
|
export declare function isCompressionType(value: string): value is ContentCompressionTypes;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/compression/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/compression/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,YAC3B,IAAI,EACJ,MAAM,CACE,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEtE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,uBAAuB,CAEjF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const COLLECTION_PLACEHOLDER = "{collection}";
|
|
2
|
+
export type CollectionSelectionHostSource = {
|
|
3
|
+
type: 'host';
|
|
4
|
+
pattern: string;
|
|
5
|
+
};
|
|
6
|
+
export type CollectionSelectionPathSource = {
|
|
7
|
+
type: 'path';
|
|
8
|
+
prefix: string;
|
|
9
|
+
sticky?: 'cookie';
|
|
10
|
+
};
|
|
11
|
+
export type CollectionSelectionQuerySource = {
|
|
12
|
+
type: 'query';
|
|
13
|
+
param: string;
|
|
14
|
+
sticky?: 'cookie';
|
|
15
|
+
};
|
|
16
|
+
export type CollectionSelectionCookieSource = {
|
|
17
|
+
type: 'cookie';
|
|
18
|
+
cookieName?: string;
|
|
19
|
+
activatePath?: string;
|
|
20
|
+
resetPath?: string;
|
|
21
|
+
maxAge?: number;
|
|
22
|
+
};
|
|
23
|
+
export type CollectionSelectionHeaderSource = {
|
|
24
|
+
type: 'header';
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
export type CollectionSelectionSource = CollectionSelectionHostSource | CollectionSelectionPathSource | CollectionSelectionQuerySource | CollectionSelectionCookieSource | CollectionSelectionHeaderSource;
|
|
28
|
+
export type CollectionSelectionSourceType = CollectionSelectionSource['type'];
|
|
29
|
+
export type CollectionSelection = {
|
|
30
|
+
sources: CollectionSelectionSource[];
|
|
31
|
+
allow?: string[];
|
|
32
|
+
onMissing?: 'not-found' | 'default';
|
|
33
|
+
noindex?: boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare const COOKIE_SOURCE_DEFAULTS: {
|
|
36
|
+
readonly cookieName: 'publisher-collection';
|
|
37
|
+
readonly activatePath: '/activate';
|
|
38
|
+
readonly resetPath: '/reset';
|
|
39
|
+
};
|
|
40
|
+
export type PatternParts = {
|
|
41
|
+
before: string;
|
|
42
|
+
after: string;
|
|
43
|
+
};
|
|
44
|
+
export declare function splitPattern(pattern: string): PatternParts | null;
|
|
45
|
+
export declare function hostLabelFixedLength(parts: PatternParts): number;
|
|
46
|
+
export declare function maxCollectionNameLengthForHost(pattern: string): number;
|
|
47
|
+
export declare function allowPatternToRegExp(pattern: string): RegExp;
|
|
48
|
+
export declare function isCollectionNameAllowed(collectionName: string, allow: readonly string[] | undefined): boolean;
|
|
49
|
+
export declare function validateCollectionSelection(config: unknown): string[];
|
|
50
|
+
export declare function previewUrl(collectionName: string, baseUrl: string, config: CollectionSelection): string | null;
|
|
51
|
+
export declare function previewUrlTemplates(baseUrl: string, config: CollectionSelection): {
|
|
52
|
+
type: CollectionSelectionSourceType;
|
|
53
|
+
url: string;
|
|
54
|
+
}[];
|
|
55
|
+
//# sourceMappingURL=collection-selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-selection.d.ts","sourceRoot":"","sources":["../../../../src/models/config/collection-selection.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AAErD,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,OAAO,CAAC;IAEd,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,QAAQ,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,QAAQ,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,yBAAyB,GACjC,6BAA6B,GAC7B,6BAA6B,GAC7B,8BAA8B,GAC9B,+BAA+B,GAC/B,+BAA+B,CAAC;AAEpC,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,MAAM,mBAAmB,GAAG;IAGhC,OAAO,EAAE,yBAAyB,EAAE,CAAC;IAGrC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAGjB,SAAS,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAGpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,sBAAsB;aACjC,UAAU,EAAE,sBAAsB;aAClC,YAAY,EAAE,WAAW;aACzB,SAAS,EAAE,QAAQ;CACX,CAAC;AAaX,MAAM,MAAM,YAAY,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CASjE;AAGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAKhE;AAGD,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMtE;AAMD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAGD,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAQ7G;AAGD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CA0GrE;AAOD,wBAAgB,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,MAAM,GAAG,IAAI,CAiC9G;AAMD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG;IAAE,IAAI,EAAE,6BAA6B,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,CAqBxI"}
|