@fastly/compute-js-static-publish 8.0.0-beta.2 → 8.0.0-beta.20

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.
Files changed (113) hide show
  1. package/README.md +19 -5
  2. package/README.short.md +19 -5
  3. package/build/cli/cli/commands/manage/clean.d.ts.map +1 -1
  4. package/build/cli/cli/commands/manage/clean.js +17 -24
  5. package/build/cli/cli/commands/manage/collections/delete.d.ts.map +1 -1
  6. package/build/cli/cli/commands/manage/collections/delete.js +13 -23
  7. package/build/cli/cli/commands/manage/collections/index.d.ts.map +1 -1
  8. package/build/cli/cli/commands/manage/collections/index.js +7 -15
  9. package/build/cli/cli/commands/manage/collections/list.d.ts.map +1 -1
  10. package/build/cli/cli/commands/manage/collections/list.js +12 -22
  11. package/build/cli/cli/commands/manage/collections/promote.d.ts.map +1 -1
  12. package/build/cli/cli/commands/manage/collections/promote.js +12 -22
  13. package/build/cli/cli/commands/manage/collections/update-expiration.d.ts.map +1 -1
  14. package/build/cli/cli/commands/manage/collections/update-expiration.js +12 -22
  15. package/build/cli/cli/commands/manage/index.d.ts.map +1 -1
  16. package/build/cli/cli/commands/manage/index.js +7 -15
  17. package/build/cli/cli/commands/manage/publish-content.d.ts.map +1 -1
  18. package/build/cli/cli/commands/manage/publish-content.js +201 -92
  19. package/build/cli/cli/commands/scaffold/index.d.ts.map +1 -1
  20. package/build/cli/cli/commands/scaffold/index.js +54 -32
  21. package/build/cli/cli/compression/brotli.d.ts +2 -1
  22. package/build/cli/cli/compression/brotli.d.ts.map +1 -1
  23. package/build/cli/cli/compression/brotli.js +15 -4
  24. package/build/cli/cli/compression/gzip.d.ts +2 -1
  25. package/build/cli/cli/compression/gzip.d.ts.map +1 -1
  26. package/build/cli/cli/compression/gzip.js +8 -4
  27. package/build/cli/cli/compression/index.d.ts +4 -1
  28. package/build/cli/cli/compression/index.d.ts.map +1 -1
  29. package/build/cli/cli/index.js +8 -0
  30. package/build/cli/cli/storage/kv-store-local-provider.d.ts +3 -5
  31. package/build/cli/cli/storage/kv-store-local-provider.d.ts.map +1 -1
  32. package/build/cli/cli/storage/kv-store-local-provider.js +3 -8
  33. package/build/cli/cli/storage/kv-store-provider.d.ts +4 -5
  34. package/build/cli/cli/storage/kv-store-provider.d.ts.map +1 -1
  35. package/build/cli/cli/storage/kv-store-provider.js +38 -66
  36. package/build/cli/cli/storage/s3-storage-provider.d.ts +6 -6
  37. package/build/cli/cli/storage/s3-storage-provider.d.ts.map +1 -1
  38. package/build/cli/cli/storage/s3-storage-provider.js +54 -51
  39. package/build/cli/cli/storage/storage-provider.d.ts +9 -8
  40. package/build/cli/cli/storage/storage-provider.d.ts.map +1 -1
  41. package/build/cli/cli/storage/storage-provider.js +13 -0
  42. package/build/cli/cli/util/api-token.d.ts.map +1 -1
  43. package/build/cli/cli/util/api-token.js +0 -28
  44. package/build/cli/cli/util/config.d.ts.map +1 -1
  45. package/build/cli/cli/util/config.js +8 -1
  46. package/build/cli/cli/util/content-types.d.ts.map +1 -1
  47. package/build/cli/cli/util/content-types.js +5 -2
  48. package/build/cli/cli/util/kv-store-items.d.ts +12 -0
  49. package/build/cli/cli/util/kv-store-items.d.ts.map +1 -1
  50. package/build/cli/cli/util/kv-store-items.js +49 -0
  51. package/build/cli/cli/util/kv-store.d.ts +6 -0
  52. package/build/cli/cli/util/kv-store.d.ts.map +1 -1
  53. package/build/cli/cli/util/kv-store.js +39 -2
  54. package/build/cli/cli/util/purge.d.ts +19 -0
  55. package/build/cli/cli/util/purge.d.ts.map +1 -0
  56. package/build/cli/cli/util/purge.js +83 -0
  57. package/build/cli/cli/util/retryable.d.ts +2 -1
  58. package/build/cli/cli/util/retryable.d.ts.map +1 -1
  59. package/build/cli/cli/util/retryable.js +34 -1
  60. package/build/cli/cli/util/s3-credentials.d.ts +11 -0
  61. package/build/cli/cli/util/s3-credentials.d.ts.map +1 -0
  62. package/build/cli/cli/util/s3-credentials.js +38 -0
  63. package/build/cli/cli/util/s3.d.ts +1 -1
  64. package/build/cli/cli/util/s3.d.ts.map +1 -1
  65. package/build/cli/cli/util/s3.js +1 -1
  66. package/build/cli/cli/util/service-id.d.ts +10 -0
  67. package/build/cli/cli/util/service-id.d.ts.map +1 -0
  68. package/build/cli/cli/util/service-id.js +26 -0
  69. package/build/cli/cli/util/variants.d.ts +2 -1
  70. package/build/cli/cli/util/variants.d.ts.map +1 -1
  71. package/build/cli/cli/util/variants.js +8 -4
  72. package/build/cli/models/assets/index.js +1 -1
  73. package/build/cli/models/config/publish-content-config.d.ts +2 -0
  74. package/build/cli/models/config/publish-content-config.d.ts.map +1 -1
  75. package/build/cli/models/config/s3-storage-config.d.ts +1 -0
  76. package/build/cli/models/config/s3-storage-config.d.ts.map +1 -1
  77. package/build/cli/models/config/s3-storage-config.js +1 -0
  78. package/build/cli/models/config/static-publish-rc.d.ts +1 -0
  79. package/build/cli/models/config/static-publish-rc.d.ts.map +1 -1
  80. package/build/cli/models/config/static-publish-rc.js +3 -1
  81. package/build/cli/models/metadata/index.js +1 -1
  82. package/build/server/models/assets/index.js +1 -1
  83. package/build/server/models/config/publish-content-config.d.ts +2 -0
  84. package/build/server/models/config/publish-content-config.d.ts.map +1 -1
  85. package/build/server/models/config/s3-storage-config.d.ts +1 -0
  86. package/build/server/models/config/s3-storage-config.d.ts.map +1 -1
  87. package/build/server/models/config/s3-storage-config.js +1 -0
  88. package/build/server/models/config/static-publish-rc.d.ts +1 -0
  89. package/build/server/models/config/static-publish-rc.d.ts.map +1 -1
  90. package/build/server/models/config/static-publish-rc.js +3 -1
  91. package/build/server/models/metadata/index.js +1 -1
  92. package/build/server/server/index.d.ts +1 -1
  93. package/build/server/server/index.d.ts.map +1 -1
  94. package/build/server/server/index.js +1 -1
  95. package/build/server/server/publisher-server/index.d.ts +14 -0
  96. package/build/server/server/publisher-server/index.d.ts.map +1 -1
  97. package/build/server/server/publisher-server/index.js +178 -54
  98. package/build/server/server/publisher-server/response-cache.d.ts +19 -0
  99. package/build/server/server/publisher-server/response-cache.d.ts.map +1 -0
  100. package/build/server/server/publisher-server/response-cache.js +106 -0
  101. package/build/server/server/storage/s3-storage-provider.d.ts +16 -15
  102. package/build/server/server/storage/s3-storage-provider.d.ts.map +1 -1
  103. package/build/server/server/storage/s3-storage-provider.js +131 -60
  104. package/build/server/server/storage/storage-provider.d.ts +2 -2
  105. package/build/server/server/storage/storage-provider.d.ts.map +1 -1
  106. package/build/server/server/storage/storage-provider.js +2 -1
  107. package/build/server/server/util/server-timing.d.ts +7 -0
  108. package/build/server/server/util/server-timing.d.ts.map +1 -0
  109. package/build/server/server/util/server-timing.js +34 -0
  110. package/package.json +9 -8
  111. package/build/cli/cli/util/aws-credentials.d.ts +0 -12
  112. package/build/cli/cli/util/aws-credentials.d.ts.map +0 -1
  113. package/build/cli/cli/util/aws-credentials.js +0 -67
package/README.md CHANGED
@@ -18,28 +18,32 @@ This CLI tool helps you:
18
18
  Create a directory for your project, place your static files in `./public`, then type:
19
19
 
20
20
  ```sh
21
- npx @fastly/compute-js-static-publish@latest --root-dir=./public --storage-mode=kv-store --kv-store-name=site-content
21
+ npx @fastly/compute-js-static-publish@latest --root-dir=./public --kv-store-name=site-content
22
22
  ```
23
23
 
24
24
  **New in v8:** S3-compatible storage (such as Fastly Object Storage) is also supported (Beta). To use this mode, type:
25
25
 
26
26
  ```sh
27
- npx @fastly/compute-js-static-publish@latest --root-dir=./public --storage-mode=s3 --s3-region=<region> --s3-bucket-<bucket-name>
27
+ npx @fastly/compute-js-static-publish@latest --root-dir=./public --storage-mode=s3 --s3-region=<region> --s3-bucket=<bucket-name>
28
28
  ```
29
29
 
30
- For more details, see the [S3-compatible storage](https://github.com/fastly/compute-js-static-publish/blob/main/README.md#s3-compatible-storage) section in the full documentation.
30
+ If the storage needs a custom endpoint, as Fastly Object Storage does, add `--s3-endpoint=<endpoint>` (for example, `--s3-endpoint=https://us-east-1.object.fastlystorage.app`).
31
+
32
+ For more details, see the [S3-compatible storage](https://github.com/fastly/compute-js-static-publish/blob/v8/README.md#-using-s3-compatible-storage-beta) section in the full documentation.
31
33
 
32
34
  ### 🔧 Local Preview
33
35
 
34
36
  ```sh
35
37
  cd compute-js
36
38
  npm install
37
- npm run dev:publish # 'publish' your files to the simulated local KV Store or to the S3 bucket
39
+ npm run dev:publish # 'publish' your files to the simulated local KV Store
38
40
  npm run dev:start # preview locally
39
41
  ```
40
42
 
41
43
  Serves your app at `http://127.0.0.1:7676`. If the app is using the KV Store, your content is served from a simulated KV Store managed by the development server.
42
44
 
45
+ If the app uses S3-compatible storage, use `npm run s3:publish` in place of `npm run dev:publish`. This uploads your files to the bucket. Set the `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY` environment variables before you run `s3:publish` and `dev:start`.
46
+
43
47
  ### 🚀 Deploy to Production
44
48
 
45
49
  When you're ready to go live, [create a free Fastly account](https://www.fastly.com/signup/?tier=free) if you haven't already, and then:
@@ -57,6 +61,8 @@ cd compute-js
57
61
  npm run fastly:publish # upload your static files
58
62
  ```
59
63
 
64
+ If the app uses S3-compatible storage, your files are already in the bucket after `npm run s3:publish`. Run `npm run fastly:deploy` to deploy the app, and use `npm run s3:publish` to upload updates.
65
+
60
66
  ## Features
61
67
 
62
68
  - Named collections for previews, staging, production
@@ -67,4 +73,12 @@ npm run fastly:publish # upload your static files
67
73
  ## Documentation
68
74
 
69
75
  📘 Full documentation available on GitHub:
70
- [https://github.com/fastly/compute-js-static-publish](https://github.com/fastly/compute-js-static-publish)
76
+ [https://github.com/fastly/compute-js-static-publish/tree/v8](https://github.com/fastly/compute-js-static-publish/tree/v8)
77
+
78
+ ### Security issues
79
+
80
+ Please see our [SECURITY.md](SECURITY.md) for guidance on reporting security-related issues.
81
+
82
+ ## License
83
+
84
+ [MIT](./LICENSE).
package/README.short.md CHANGED
@@ -18,28 +18,32 @@ This CLI tool helps you:
18
18
  Create a directory for your project, place your static files in `./public`, then type:
19
19
 
20
20
  ```sh
21
- npx @fastly/compute-js-static-publish@latest --root-dir=./public --storage-mode=kv-store --kv-store-name=site-content
21
+ npx @fastly/compute-js-static-publish@latest --root-dir=./public --kv-store-name=site-content
22
22
  ```
23
23
 
24
24
  **New in v8:** S3-compatible storage (such as Fastly Object Storage) is also supported (Beta). To use this mode, type:
25
25
 
26
26
  ```sh
27
- npx @fastly/compute-js-static-publish@latest --root-dir=./public --storage-mode=s3 --s3-region=<region> --s3-bucket-<bucket-name>
27
+ npx @fastly/compute-js-static-publish@latest --root-dir=./public --storage-mode=s3 --s3-region=<region> --s3-bucket=<bucket-name>
28
28
  ```
29
29
 
30
- For more details, see the [S3-compatible storage](https://github.com/fastly/compute-js-static-publish/blob/main/README.md#s3-compatible-storage) section in the full documentation.
30
+ If the storage needs a custom endpoint, as Fastly Object Storage does, add `--s3-endpoint=<endpoint>` (for example, `--s3-endpoint=https://us-east-1.object.fastlystorage.app`).
31
+
32
+ For more details, see the [S3-compatible storage](https://github.com/fastly/compute-js-static-publish/blob/v8/README.md#-using-s3-compatible-storage-beta) section in the full documentation.
31
33
 
32
34
  ### 🔧 Local Preview
33
35
 
34
36
  ```sh
35
37
  cd compute-js
36
38
  npm install
37
- npm run dev:publish # 'publish' your files to the simulated local KV Store or to the S3 bucket
39
+ npm run dev:publish # 'publish' your files to the simulated local KV Store
38
40
  npm run dev:start # preview locally
39
41
  ```
40
42
 
41
43
  Serves your app at `http://127.0.0.1:7676`. If the app is using the KV Store, your content is served from a simulated KV Store managed by the development server.
42
44
 
45
+ If the app uses S3-compatible storage, use `npm run s3:publish` in place of `npm run dev:publish`. This uploads your files to the bucket. Set the `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY` environment variables before you run `s3:publish` and `dev:start`.
46
+
43
47
  ### 🚀 Deploy to Production
44
48
 
45
49
  When you're ready to go live, [create a free Fastly account](https://www.fastly.com/signup/?tier=free) if you haven't already, and then:
@@ -57,6 +61,8 @@ cd compute-js
57
61
  npm run fastly:publish # upload your static files
58
62
  ```
59
63
 
64
+ If the app uses S3-compatible storage, your files are already in the bucket after `npm run s3:publish`. Run `npm run fastly:deploy` to deploy the app, and use `npm run s3:publish` to upload updates.
65
+
60
66
  ## Features
61
67
 
62
68
  - Named collections for previews, staging, production
@@ -67,4 +73,12 @@ npm run fastly:publish # upload your static files
67
73
  ## Documentation
68
74
 
69
75
  📘 Full documentation available on GitHub:
70
- [https://github.com/fastly/compute-js-static-publish](https://github.com/fastly/compute-js-static-publish)
76
+ [https://github.com/fastly/compute-js-static-publish/tree/v8](https://github.com/fastly/compute-js-static-publish/tree/v8)
77
+
78
+ ### Security issues
79
+
80
+ Please see our [SECURITY.md](SECURITY.md) for guidance on reporting security-related issues.
81
+
82
+ ## License
83
+
84
+ [MIT](./LICENSE).
@@ -1 +1 @@
1
- {"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/clean.ts"],"names":[],"mappings":"AA2DA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAuNhD"}
1
+ {"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/clean.ts"],"names":[],"mappings":"AAmDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA0NhD"}
@@ -29,22 +29,14 @@ KV Store Options:
29
29
  with the local development environment.
30
30
 
31
31
  --fastly-api-token=<token> Fastly API token for KV Store access.
32
- If not set, the tool will check:
33
- 1. FASTLY_API_TOKEN environment variable
34
- 2. Logged-in Fastly CLI profile
32
+ If not set, the tool uses the FASTLY_API_TOKEN
33
+ environment variable.
35
34
 
36
- S3 Storage Options:
37
- --aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
38
- --aws-secret-access-key=<key> interface with S3.
39
- If not set, the tool will check:
40
- 1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
41
- environment variables
42
- 2. The aws credentials file, see below
43
-
44
- --aws-profile=<profile> Profile within the aws credentials file.
45
- If not set, the tool will check:
46
- 1. AWS_PROFILE environment variable
47
- 2. The default profile, if set
35
+ S3 Storage Options (BETA):
36
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
37
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
38
+ If not set, the tool will check the S3_ACCESS_KEY_ID
39
+ and S3_SECRET_ACCESS_KEY environment variables.
48
40
 
49
41
  Global Options:
50
42
  -h, --help Show this help message and exit.
@@ -57,9 +49,8 @@ export async function action(actionArgs) {
57
49
  { name: 'dry-run', type: Boolean },
58
50
  { name: 'local', type: Boolean },
59
51
  { name: 'fastly-api-token', type: String, },
60
- { name: 'aws-profile', type: String, },
61
- { name: 'aws-access-key-id', type: String, },
62
- { name: 'aws-secret-access-key', type: String, },
52
+ { name: 's3-access-key-id', type: String, },
53
+ { name: 's3-secret-access-key', type: String, },
63
54
  ];
64
55
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
65
56
  if (parsed.needHelp) {
@@ -71,7 +62,7 @@ export async function action(actionArgs) {
71
62
  help();
72
63
  return;
73
64
  }
74
- const { verbose, ['delete-expired-collections']: deleteExpiredCollections, ['dry-run']: dryRun, local: localMode, ['fastly-api-token']: fastlyApiToken, ['aws-profile']: awsProfile, ['aws-access-key-id']: awsAccessKeyId, ['aws-secret-access-key']: awsSecretAccessKey, } = parsed.commandLineOptions;
65
+ const { verbose, ['delete-expired-collections']: deleteExpiredCollections, ['dry-run']: dryRun, local: localMode, ['fastly-api-token']: fastlyApiToken, ['s3-access-key-id']: s3AccessKeyId, ['s3-secret-access-key']: s3SecretAccessKey, } = parsed.commandLineOptions;
75
66
  // compute-js-static-publisher cli is always run from the Compute application directory
76
67
  // in other words, the directory that contains `fastly.toml`.
77
68
  const computeAppDir = path.resolve();
@@ -105,9 +96,8 @@ export async function action(actionArgs) {
105
96
  computeAppDir,
106
97
  localMode,
107
98
  fastlyApiToken,
108
- awsProfile,
109
- awsAccessKeyId,
110
- awsSecretAccessKey,
99
+ s3AccessKeyId,
100
+ s3SecretAccessKey,
111
101
  });
112
102
  }
113
103
  catch (err) {
@@ -171,7 +161,10 @@ export async function action(actionArgs) {
171
161
  assetsIdsInUse.add(`sha256_${assetEntry.key.slice('sha256:'.length)}`);
172
162
  }
173
163
  }
174
- });
164
+ }, undefined,
165
+ // If an index cannot be read, stop. If we continue, we mark the files
166
+ // and settings of that collection as not in use, and delete them.
167
+ true);
175
168
  console.log('');
176
169
  // ### List all settings ###
177
170
  console.log('Enumerating settings:');
@@ -226,6 +219,6 @@ export async function action(actionArgs) {
226
219
  console.log(`Deleting key from storage: ${key}`);
227
220
  await storageProvider.deleteStorageEntry(key);
228
221
  }
229
- });
222
+ }, undefined, true);
230
223
  console.log('✅ Completed.');
231
224
  }
@@ -1 +1 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/delete.ts"],"names":[],"mappings":"AAyDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAwIhD"}
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/delete.ts"],"names":[],"mappings":"AAiDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAuIhD"}
@@ -28,22 +28,14 @@ KV Store Options:
28
28
  with the local development environment.
29
29
 
30
30
  --fastly-api-token=<token> Fastly API token for KV Store access.
31
- If not set, the tool will check:
32
- 1. FASTLY_API_TOKEN environment variable
33
- 2. Logged-in Fastly CLI profile
31
+ If not set, the tool uses the FASTLY_API_TOKEN
32
+ environment variable.
34
33
 
35
- S3 Storage Options:
36
- --aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
37
- --aws-secret-access-key=<key> interface with S3.
38
- If not set, the tool will check:
39
- 1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
40
- environment variables
41
- 2. The aws credentials file, see below
42
-
43
- --aws-profile=<profile> Profile within the aws credentials file.
44
- If not set, the tool will check:
45
- 1. AWS_PROFILE environment variable
46
- 2. The default profile, if set
34
+ S3 Storage Options (BETA):
35
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
36
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
37
+ If not set, the tool will check the S3_ACCESS_KEY_ID
38
+ and S3_SECRET_ACCESS_KEY environment variables.
47
39
 
48
40
  Global Options:
49
41
  -h, --help Show this help message and exit.
@@ -55,9 +47,8 @@ export async function action(actionArgs) {
55
47
  { name: 'collection-name', type: String },
56
48
  { name: 'local', type: Boolean },
57
49
  { name: 'fastly-api-token', type: String, },
58
- { name: 'aws-profile', type: String, },
59
- { name: 'aws-access-key-id', type: String, },
60
- { name: 'aws-secret-access-key', type: String, },
50
+ { name: 's3-access-key-id', type: String, },
51
+ { name: 's3-secret-access-key', type: String, },
61
52
  ];
62
53
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
63
54
  if (parsed.needHelp) {
@@ -69,7 +60,7 @@ export async function action(actionArgs) {
69
60
  help();
70
61
  return;
71
62
  }
72
- const { verbose, ['collection-name']: collectionNameValue, ['fastly-api-token']: fastlyApiToken, local: localMode, ['aws-profile']: awsProfile, ['aws-access-key-id']: awsAccessKeyId, ['aws-secret-access-key']: awsSecretAccessKey, } = parsed.commandLineOptions;
63
+ const { verbose, ['collection-name']: collectionNameValue, ['fastly-api-token']: fastlyApiToken, local: localMode, ['s3-access-key-id']: s3AccessKeyId, ['s3-secret-access-key']: s3SecretAccessKey, } = parsed.commandLineOptions;
73
64
  // compute-js-static-publisher cli is always run from the Compute application directory
74
65
  // in other words, the directory that contains `fastly.toml`.
75
66
  const computeAppDir = path.resolve();
@@ -108,9 +99,8 @@ export async function action(actionArgs) {
108
99
  computeAppDir,
109
100
  localMode,
110
101
  fastlyApiToken,
111
- awsProfile,
112
- awsAccessKeyId,
113
- awsSecretAccessKey,
102
+ s3AccessKeyId,
103
+ s3SecretAccessKey,
114
104
  });
115
105
  }
116
106
  catch (err) {
@@ -153,6 +143,6 @@ export async function action(actionArgs) {
153
143
  await storageProvider.doConcurrentParallel(items, async (_, key) => {
154
144
  console.log(`Deleting key from storage: ${key}`);
155
145
  await storageProvider.deleteStorageEntry(key);
156
- });
146
+ }, undefined, true);
157
147
  console.log("✅ Completed.");
158
148
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/index.ts"],"names":[],"mappings":"AA2DA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA0BhD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/index.ts"],"names":[],"mappings":"AAmDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA0BhD"}
@@ -29,22 +29,14 @@ KV Store Options:
29
29
  with the local development environment.
30
30
 
31
31
  --fastly-api-token=<token> Fastly API token for KV Store access.
32
- If not set, the tool will check:
33
- 1. FASTLY_API_TOKEN environment variable
34
- 2. Logged-in Fastly CLI profile
32
+ If not set, the tool uses the FASTLY_API_TOKEN
33
+ environment variable.
35
34
 
36
- S3 Storage Options:
37
- --aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
38
- --aws-secret-access-key=<key> interface with S3.
39
- If not set, the tool will check:
40
- 1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
41
- environment variables
42
- 2. The aws credentials file, see below
43
-
44
- --aws-profile=<profile> Profile within the aws credentials file.
45
- If not set, the tool will check:
46
- 1. AWS_PROFILE environment variable
47
- 2. The default profile, if set
35
+ S3 Storage Options (BETA):
36
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
37
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
38
+ If not set, the tool will check the S3_ACCESS_KEY_ID
39
+ and S3_SECRET_ACCESS_KEY environment variables.
48
40
 
49
41
  Global Options:
50
42
  -h, --help Show this help message and exit.
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/list.ts"],"names":[],"mappings":"AAoDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAsIhD"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/list.ts"],"names":[],"mappings":"AA4CA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAmIhD"}
@@ -23,22 +23,14 @@ KV Store Options:
23
23
  with the local development environment.
24
24
 
25
25
  --fastly-api-token=<token> Fastly API token for KV Store access.
26
- If not set, the tool will check:
27
- 1. FASTLY_API_TOKEN environment variable
28
- 2. Logged-in Fastly CLI profile
26
+ If not set, the tool uses the FASTLY_API_TOKEN
27
+ environment variable.
29
28
 
30
- S3 Storage Options:
31
- --aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
32
- --aws-secret-access-key=<key> interface with S3.
33
- If not set, the tool will check:
34
- 1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
35
- environment variables
36
- 2. The aws credentials file, see below
37
-
38
- --aws-profile=<profile> Profile within the aws credentials file.
39
- If not set, the tool will check:
40
- 1. AWS_PROFILE environment variable
41
- 2. The default profile, if set
29
+ S3 Storage Options (BETA):
30
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
31
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
32
+ If not set, the tool will check the S3_ACCESS_KEY_ID
33
+ and S3_SECRET_ACCESS_KEY environment variables.
42
34
 
43
35
  Global Options:
44
36
  -h, --help Show this help message and exit.
@@ -49,9 +41,8 @@ export async function action(actionArgs) {
49
41
  { name: 'verbose', type: Boolean },
50
42
  { name: 'local', type: Boolean },
51
43
  { name: 'fastly-api-token', type: String, },
52
- { name: 'aws-profile', type: String, },
53
- { name: 'aws-access-key-id', type: String, },
54
- { name: 'aws-secret-access-key', type: String, },
44
+ { name: 's3-access-key-id', type: String, },
45
+ { name: 's3-secret-access-key', type: String, },
55
46
  ];
56
47
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
57
48
  if (parsed.needHelp) {
@@ -63,7 +54,7 @@ export async function action(actionArgs) {
63
54
  help();
64
55
  return;
65
56
  }
66
- const { verbose, local: localMode, ['fastly-api-token']: fastlyApiToken, ['aws-profile']: awsProfile, ['aws-access-key-id']: awsAccessKeyId, ['aws-secret-access-key']: awsSecretAccessKey, } = parsed.commandLineOptions;
57
+ const { verbose, local: localMode, ['fastly-api-token']: fastlyApiToken, ['s3-access-key-id']: s3AccessKeyId, ['s3-secret-access-key']: s3SecretAccessKey, } = parsed.commandLineOptions;
67
58
  // compute-js-static-publisher cli is always run from the Compute application directory
68
59
  // in other words, the directory that contains `fastly.toml`.
69
60
  const computeAppDir = path.resolve();
@@ -97,9 +88,8 @@ export async function action(actionArgs) {
97
88
  computeAppDir,
98
89
  localMode,
99
90
  fastlyApiToken,
100
- awsProfile,
101
- awsAccessKeyId,
102
- awsSecretAccessKey,
91
+ s3AccessKeyId,
92
+ s3SecretAccessKey,
103
93
  });
104
94
  }
105
95
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"promote.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/promote.ts"],"names":[],"mappings":"AA0EA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA0LhD"}
1
+ {"version":3,"file":"promote.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/promote.ts"],"names":[],"mappings":"AAkEA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAuLhD"}
@@ -45,22 +45,14 @@ KV Store Options:
45
45
  with the local development environment.
46
46
 
47
47
  --fastly-api-token=<token> Fastly API token for KV Store access.
48
- If not set, the tool will check:
49
- 1. FASTLY_API_TOKEN environment variable
50
- 2. Logged-in Fastly CLI profile
48
+ If not set, the tool uses the FASTLY_API_TOKEN
49
+ environment variable.
51
50
 
52
- S3 Storage Options:
53
- --aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
54
- --aws-secret-access-key=<key> interface with S3.
55
- If not set, the tool will check:
56
- 1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
57
- environment variables
58
- 2. The aws credentials file, see below
59
-
60
- --aws-profile=<profile> Profile within the aws credentials file.
61
- If not set, the tool will check:
62
- 1. AWS_PROFILE environment variable
63
- 2. The default profile, if set
51
+ S3 Storage Options (BETA):
52
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
53
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
54
+ If not set, the tool will check the S3_ACCESS_KEY_ID
55
+ and S3_SECRET_ACCESS_KEY environment variables.
64
56
 
65
57
  Global Options:
66
58
  -h, --help Show this help message and exit.
@@ -76,9 +68,8 @@ export async function action(actionArgs) {
76
68
  { name: 'expires-never', type: Boolean },
77
69
  { name: 'local', type: Boolean },
78
70
  { name: 'fastly-api-token', type: String, },
79
- { name: 'aws-profile', type: String, },
80
- { name: 'aws-access-key-id', type: String, },
81
- { name: 'aws-secret-access-key', type: String, },
71
+ { name: 's3-access-key-id', type: String, },
72
+ { name: 's3-secret-access-key', type: String, },
82
73
  ];
83
74
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
84
75
  if (parsed.needHelp) {
@@ -90,7 +81,7 @@ export async function action(actionArgs) {
90
81
  help();
91
82
  return;
92
83
  }
93
- const { verbose, ['collection-name']: collectionNameValue, to: toCollectionNameValue, ['expires-in']: expiresIn, ['expires-at']: expiresAt, ['expires-never']: expiresNever, local: localMode, ['fastly-api-token']: fastlyApiToken, ['aws-profile']: awsProfile, ['aws-access-key-id']: awsAccessKeyId, ['aws-secret-access-key']: awsSecretAccessKey, } = parsed.commandLineOptions;
84
+ const { verbose, ['collection-name']: collectionNameValue, to: toCollectionNameValue, ['expires-in']: expiresIn, ['expires-at']: expiresAt, ['expires-never']: expiresNever, local: localMode, ['fastly-api-token']: fastlyApiToken, ['s3-access-key-id']: s3AccessKeyId, ['s3-secret-access-key']: s3SecretAccessKey, } = parsed.commandLineOptions;
94
85
  // compute-js-static-publisher cli is always run from the Compute application directory
95
86
  // in other words, the directory that contains `fastly.toml`.
96
87
  const computeAppDir = path.resolve();
@@ -144,9 +135,8 @@ export async function action(actionArgs) {
144
135
  computeAppDir,
145
136
  localMode,
146
137
  fastlyApiToken,
147
- awsProfile,
148
- awsAccessKeyId,
149
- awsSecretAccessKey,
138
+ s3AccessKeyId,
139
+ s3SecretAccessKey,
150
140
  });
151
141
  }
152
142
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"update-expiration.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/update-expiration.ts"],"names":[],"mappings":"AAsEA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA6JhD"}
1
+ {"version":3,"file":"update-expiration.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/update-expiration.ts"],"names":[],"mappings":"AA8DA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA0JhD"}
@@ -41,22 +41,14 @@ KV Store Options:
41
41
  with the local development environment.
42
42
 
43
43
  --fastly-api-token=<token> Fastly API token for KV Store access.
44
- If not set, the tool will check:
45
- 1. FASTLY_API_TOKEN environment variable
46
- 2. Logged-in Fastly CLI profile
44
+ If not set, the tool uses the FASTLY_API_TOKEN
45
+ environment variable.
47
46
 
48
- S3 Storage Options:
49
- --aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
50
- --aws-secret-access-key=<key> interface with S3.
51
- If not set, the tool will check:
52
- 1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
53
- environment variables
54
- 2. The aws credentials file, see below
55
-
56
- --aws-profile=<profile> Profile within the aws credentials file.
57
- If not set, the tool will check:
58
- 1. AWS_PROFILE environment variable
59
- 2. The default profile, if set
47
+ S3 Storage Options (BETA):
48
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
49
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
50
+ If not set, the tool will check the S3_ACCESS_KEY_ID
51
+ and S3_SECRET_ACCESS_KEY environment variables.
60
52
 
61
53
  Global Options:
62
54
  -h, --help Show this help message and exit.
@@ -71,9 +63,8 @@ export async function action(actionArgs) {
71
63
  { name: 'expires-never', type: Boolean },
72
64
  { name: 'local', type: Boolean },
73
65
  { name: 'fastly-api-token', type: String, },
74
- { name: 'aws-profile', type: String, },
75
- { name: 'aws-access-key-id', type: String, },
76
- { name: 'aws-secret-access-key', type: String, },
66
+ { name: 's3-access-key-id', type: String, },
67
+ { name: 's3-secret-access-key', type: String, },
77
68
  ];
78
69
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
79
70
  if (parsed.needHelp) {
@@ -85,7 +76,7 @@ export async function action(actionArgs) {
85
76
  help();
86
77
  return;
87
78
  }
88
- const { verbose, ['collection-name']: collectionNameValue, ['expires-in']: expiresIn, ['expires-at']: expiresAt, ['expires-never']: expiresNever, local: localMode, ['fastly-api-token']: fastlyApiToken, ['aws-profile']: awsProfile, ['aws-access-key-id']: awsAccessKeyId, ['aws-secret-access-key']: awsSecretAccessKey, } = parsed.commandLineOptions;
79
+ const { verbose, ['collection-name']: collectionNameValue, ['expires-in']: expiresIn, ['expires-at']: expiresAt, ['expires-never']: expiresNever, local: localMode, ['fastly-api-token']: fastlyApiToken, ['s3-access-key-id']: s3AccessKeyId, ['s3-secret-access-key']: s3SecretAccessKey, } = parsed.commandLineOptions;
89
80
  // compute-js-static-publisher cli is always run from the Compute application directory
90
81
  // in other words, the directory that contains `fastly.toml`.
91
82
  const computeAppDir = path.resolve();
@@ -139,9 +130,8 @@ export async function action(actionArgs) {
139
130
  computeAppDir,
140
131
  localMode,
141
132
  fastlyApiToken,
142
- awsProfile,
143
- awsAccessKeyId,
144
- awsSecretAccessKey,
133
+ s3AccessKeyId,
134
+ s3SecretAccessKey,
145
135
  });
146
136
  }
147
137
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/index.ts"],"names":[],"mappings":"AAkEA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAyBhD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/index.ts"],"names":[],"mappings":"AA0DA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAyBhD"}
@@ -31,22 +31,14 @@ KV Store Options:
31
31
  with the local development environment.
32
32
 
33
33
  --fastly-api-token=<token> Fastly API token for KV Store access.
34
- If not set, the tool will check:
35
- 1. FASTLY_API_TOKEN environment variable
36
- 2. Logged-in Fastly CLI profile
34
+ If not set, the tool uses the FASTLY_API_TOKEN
35
+ environment variable.
37
36
 
38
- S3 Storage Options:
39
- --aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
40
- --aws-secret-access-key=<key> interface with S3.
41
- If not set, the tool will check:
42
- 1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
43
- environment variables
44
- 2. The aws credentials file, see below
45
-
46
- --aws-profile=<profile> Profile within the aws credentials file.
47
- If not set, the tool will check:
48
- 1. AWS_PROFILE environment variable
49
- 2. The default profile, if set
37
+ S3 Storage Options (BETA):
38
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
39
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
40
+ If not set, the tool will check the S3_ACCESS_KEY_ID
41
+ and S3_SECRET_ACCESS_KEY environment variables.
50
42
 
51
43
  Global Options:
52
44
  -h, --help Show this help message and exit.
@@ -1 +1 @@
1
- {"version":3,"file":"publish-content.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/publish-content.ts"],"names":[],"mappings":"AA2GA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAqdhD"}
1
+ {"version":3,"file":"publish-content.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/publish-content.ts"],"names":[],"mappings":"AAyHA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAikBhD"}