@fastly/compute-js-static-publish 8.0.0-beta.6 → 8.0.0-beta.8

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 (55) hide show
  1. package/README.md +1 -1
  2. package/README.short.md +1 -1
  3. package/build/cli/cli/commands/manage/clean.d.ts.map +1 -1
  4. package/build/cli/cli/commands/manage/clean.js +11 -20
  5. package/build/cli/cli/commands/manage/collections/delete.d.ts.map +1 -1
  6. package/build/cli/cli/commands/manage/collections/delete.js +11 -20
  7. package/build/cli/cli/commands/manage/collections/index.d.ts.map +1 -1
  8. package/build/cli/cli/commands/manage/collections/index.js +6 -13
  9. package/build/cli/cli/commands/manage/collections/list.d.ts.map +1 -1
  10. package/build/cli/cli/commands/manage/collections/list.js +11 -20
  11. package/build/cli/cli/commands/manage/collections/promote.d.ts.map +1 -1
  12. package/build/cli/cli/commands/manage/collections/promote.js +11 -20
  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 +11 -20
  15. package/build/cli/cli/commands/manage/index.d.ts.map +1 -1
  16. package/build/cli/cli/commands/manage/index.js +6 -13
  17. package/build/cli/cli/commands/manage/publish-content.d.ts.map +1 -1
  18. package/build/cli/cli/commands/manage/publish-content.js +16 -24
  19. package/build/cli/cli/commands/scaffold/index.d.ts.map +1 -1
  20. package/build/cli/cli/commands/scaffold/index.js +47 -28
  21. package/build/cli/cli/storage/kv-store-local-provider.d.ts +1 -0
  22. package/build/cli/cli/storage/kv-store-local-provider.d.ts.map +1 -1
  23. package/build/cli/cli/storage/kv-store-local-provider.js +2 -0
  24. package/build/cli/cli/storage/kv-store-provider.d.ts +1 -0
  25. package/build/cli/cli/storage/kv-store-provider.d.ts.map +1 -1
  26. package/build/cli/cli/storage/kv-store-provider.js +2 -0
  27. package/build/cli/cli/storage/s3-storage-provider.d.ts +4 -1
  28. package/build/cli/cli/storage/s3-storage-provider.d.ts.map +1 -1
  29. package/build/cli/cli/storage/s3-storage-provider.js +50 -12
  30. package/build/cli/cli/storage/storage-provider.d.ts +3 -3
  31. package/build/cli/cli/storage/storage-provider.d.ts.map +1 -1
  32. package/build/cli/cli/util/purge.d.ts +3 -0
  33. package/build/cli/cli/util/purge.d.ts.map +1 -0
  34. package/build/cli/cli/util/purge.js +23 -0
  35. package/build/cli/cli/util/s3-credentials.d.ts +11 -0
  36. package/build/cli/cli/util/s3-credentials.d.ts.map +1 -0
  37. package/build/cli/cli/util/s3-credentials.js +38 -0
  38. package/build/cli/cli/util/s3.d.ts +1 -1
  39. package/build/cli/cli/util/s3.d.ts.map +1 -1
  40. package/build/cli/cli/util/s3.js +1 -1
  41. package/build/cli/models/metadata/index.js +1 -1
  42. package/build/server/models/metadata/index.js +1 -1
  43. package/build/server/server/index.d.ts +1 -1
  44. package/build/server/server/index.d.ts.map +1 -1
  45. package/build/server/server/index.js +1 -1
  46. package/build/server/server/publisher-server/index.js +2 -2
  47. package/build/server/server/storage/s3-storage-provider.d.ts +13 -14
  48. package/build/server/server/storage/s3-storage-provider.d.ts.map +1 -1
  49. package/build/server/server/storage/s3-storage-provider.js +45 -36
  50. package/build/server/server/storage/storage-provider.d.ts +1 -1
  51. package/build/server/server/storage/storage-provider.d.ts.map +1 -1
  52. package/package.json +2 -3
  53. package/build/cli/cli/util/aws-credentials.d.ts +0 -12
  54. package/build/cli/cli/util/aws-credentials.d.ts.map +0 -1
  55. package/build/cli/cli/util/aws-credentials.js +0 -67
package/README.md CHANGED
@@ -18,7 +18,7 @@ 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:
package/README.short.md CHANGED
@@ -18,7 +18,7 @@ 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:
@@ -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":"AAoDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAoNhD"}
@@ -31,20 +31,13 @@ KV Store Options:
31
31
  --fastly-api-token=<token> Fastly API token for KV Store access.
32
32
  If not set, the tool will check:
33
33
  1. FASTLY_API_TOKEN environment variable
34
- 2. Logged-in Fastly CLI profile
34
+ 2. The default profile in the Fastly CLI
35
35
 
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
36
+ S3 Storage Options (BETA):
37
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
38
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
39
+ If not set, the tool will check the S3_ACCESS_KEY_ID
40
+ and S3_SECRET_ACCESS_KEY environment variables.
48
41
 
49
42
  Global Options:
50
43
  -h, --help Show this help message and exit.
@@ -57,9 +50,8 @@ export async function action(actionArgs) {
57
50
  { name: 'dry-run', type: Boolean },
58
51
  { name: 'local', type: Boolean },
59
52
  { 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, },
53
+ { name: 's3-access-key-id', type: String, },
54
+ { name: 's3-secret-access-key', type: String, },
63
55
  ];
64
56
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
65
57
  if (parsed.needHelp) {
@@ -71,7 +63,7 @@ export async function action(actionArgs) {
71
63
  help();
72
64
  return;
73
65
  }
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;
66
+ 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
67
  // compute-js-static-publisher cli is always run from the Compute application directory
76
68
  // in other words, the directory that contains `fastly.toml`.
77
69
  const computeAppDir = path.resolve();
@@ -105,9 +97,8 @@ export async function action(actionArgs) {
105
97
  computeAppDir,
106
98
  localMode,
107
99
  fastlyApiToken,
108
- awsProfile,
109
- awsAccessKeyId,
110
- awsSecretAccessKey,
100
+ s3AccessKeyId,
101
+ s3SecretAccessKey,
111
102
  });
112
103
  }
113
104
  catch (err) {
@@ -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":"AAkDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAqIhD"}
@@ -30,20 +30,13 @@ KV Store Options:
30
30
  --fastly-api-token=<token> Fastly API token for KV Store access.
31
31
  If not set, the tool will check:
32
32
  1. FASTLY_API_TOKEN environment variable
33
- 2. Logged-in Fastly CLI profile
33
+ 2. The default profile in the Fastly CLI
34
34
 
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
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.
47
40
 
48
41
  Global Options:
49
42
  -h, --help Show this help message and exit.
@@ -55,9 +48,8 @@ export async function action(actionArgs) {
55
48
  { name: 'collection-name', type: String },
56
49
  { name: 'local', type: Boolean },
57
50
  { 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, },
51
+ { name: 's3-access-key-id', type: String, },
52
+ { name: 's3-secret-access-key', type: String, },
61
53
  ];
62
54
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
63
55
  if (parsed.needHelp) {
@@ -69,7 +61,7 @@ export async function action(actionArgs) {
69
61
  help();
70
62
  return;
71
63
  }
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;
64
+ const { verbose, ['collection-name']: collectionNameValue, ['fastly-api-token']: fastlyApiToken, local: localMode, ['s3-access-key-id']: s3AccessKeyId, ['s3-secret-access-key']: s3SecretAccessKey, } = parsed.commandLineOptions;
73
65
  // compute-js-static-publisher cli is always run from the Compute application directory
74
66
  // in other words, the directory that contains `fastly.toml`.
75
67
  const computeAppDir = path.resolve();
@@ -108,9 +100,8 @@ export async function action(actionArgs) {
108
100
  computeAppDir,
109
101
  localMode,
110
102
  fastlyApiToken,
111
- awsProfile,
112
- awsAccessKeyId,
113
- awsSecretAccessKey,
103
+ s3AccessKeyId,
104
+ s3SecretAccessKey,
114
105
  });
115
106
  }
116
107
  catch (err) {
@@ -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":"AAoDA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA0BhD"}
@@ -31,20 +31,13 @@ KV Store Options:
31
31
  --fastly-api-token=<token> Fastly API token for KV Store access.
32
32
  If not set, the tool will check:
33
33
  1. FASTLY_API_TOKEN environment variable
34
- 2. Logged-in Fastly CLI profile
34
+ 2. The default profile in the Fastly CLI
35
35
 
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
36
+ S3 Storage Options (BETA):
37
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
38
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
39
+ If not set, the tool will check the S3_ACCESS_KEY_ID
40
+ and S3_SECRET_ACCESS_KEY environment variables.
48
41
 
49
42
  Global Options:
50
43
  -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":"AA6CA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAmIhD"}
@@ -25,20 +25,13 @@ KV Store Options:
25
25
  --fastly-api-token=<token> Fastly API token for KV Store access.
26
26
  If not set, the tool will check:
27
27
  1. FASTLY_API_TOKEN environment variable
28
- 2. Logged-in Fastly CLI profile
28
+ 2. The default profile in the Fastly CLI
29
29
 
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
30
+ S3 Storage Options (BETA):
31
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
32
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
33
+ If not set, the tool will check the S3_ACCESS_KEY_ID
34
+ and S3_SECRET_ACCESS_KEY environment variables.
42
35
 
43
36
  Global Options:
44
37
  -h, --help Show this help message and exit.
@@ -49,9 +42,8 @@ export async function action(actionArgs) {
49
42
  { name: 'verbose', type: Boolean },
50
43
  { name: 'local', type: Boolean },
51
44
  { 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, },
45
+ { name: 's3-access-key-id', type: String, },
46
+ { name: 's3-secret-access-key', type: String, },
55
47
  ];
56
48
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
57
49
  if (parsed.needHelp) {
@@ -63,7 +55,7 @@ export async function action(actionArgs) {
63
55
  help();
64
56
  return;
65
57
  }
66
- const { verbose, local: localMode, ['fastly-api-token']: fastlyApiToken, ['aws-profile']: awsProfile, ['aws-access-key-id']: awsAccessKeyId, ['aws-secret-access-key']: awsSecretAccessKey, } = parsed.commandLineOptions;
58
+ const { verbose, local: localMode, ['fastly-api-token']: fastlyApiToken, ['s3-access-key-id']: s3AccessKeyId, ['s3-secret-access-key']: s3SecretAccessKey, } = parsed.commandLineOptions;
67
59
  // compute-js-static-publisher cli is always run from the Compute application directory
68
60
  // in other words, the directory that contains `fastly.toml`.
69
61
  const computeAppDir = path.resolve();
@@ -97,9 +89,8 @@ export async function action(actionArgs) {
97
89
  computeAppDir,
98
90
  localMode,
99
91
  fastlyApiToken,
100
- awsProfile,
101
- awsAccessKeyId,
102
- awsSecretAccessKey,
92
+ s3AccessKeyId,
93
+ s3SecretAccessKey,
103
94
  });
104
95
  }
105
96
  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":"AAmEA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAuLhD"}
@@ -47,20 +47,13 @@ KV Store Options:
47
47
  --fastly-api-token=<token> Fastly API token for KV Store access.
48
48
  If not set, the tool will check:
49
49
  1. FASTLY_API_TOKEN environment variable
50
- 2. Logged-in Fastly CLI profile
50
+ 2. The default profile in the Fastly CLI
51
51
 
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
52
+ S3 Storage Options (BETA):
53
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
54
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
55
+ If not set, the tool will check the S3_ACCESS_KEY_ID
56
+ and S3_SECRET_ACCESS_KEY environment variables.
64
57
 
65
58
  Global Options:
66
59
  -h, --help Show this help message and exit.
@@ -76,9 +69,8 @@ export async function action(actionArgs) {
76
69
  { name: 'expires-never', type: Boolean },
77
70
  { name: 'local', type: Boolean },
78
71
  { 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, },
72
+ { name: 's3-access-key-id', type: String, },
73
+ { name: 's3-secret-access-key', type: String, },
82
74
  ];
83
75
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
84
76
  if (parsed.needHelp) {
@@ -90,7 +82,7 @@ export async function action(actionArgs) {
90
82
  help();
91
83
  return;
92
84
  }
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;
85
+ 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
86
  // compute-js-static-publisher cli is always run from the Compute application directory
95
87
  // in other words, the directory that contains `fastly.toml`.
96
88
  const computeAppDir = path.resolve();
@@ -144,9 +136,8 @@ export async function action(actionArgs) {
144
136
  computeAppDir,
145
137
  localMode,
146
138
  fastlyApiToken,
147
- awsProfile,
148
- awsAccessKeyId,
149
- awsSecretAccessKey,
139
+ s3AccessKeyId,
140
+ s3SecretAccessKey,
150
141
  });
151
142
  }
152
143
  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":"AA+DA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA0JhD"}
@@ -43,20 +43,13 @@ KV Store Options:
43
43
  --fastly-api-token=<token> Fastly API token for KV Store access.
44
44
  If not set, the tool will check:
45
45
  1. FASTLY_API_TOKEN environment variable
46
- 2. Logged-in Fastly CLI profile
46
+ 2. The default profile in the Fastly CLI
47
47
 
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
48
+ S3 Storage Options (BETA):
49
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
50
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
51
+ If not set, the tool will check the S3_ACCESS_KEY_ID
52
+ and S3_SECRET_ACCESS_KEY environment variables.
60
53
 
61
54
  Global Options:
62
55
  -h, --help Show this help message and exit.
@@ -71,9 +64,8 @@ export async function action(actionArgs) {
71
64
  { name: 'expires-never', type: Boolean },
72
65
  { name: 'local', type: Boolean },
73
66
  { 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, },
67
+ { name: 's3-access-key-id', type: String, },
68
+ { name: 's3-secret-access-key', type: String, },
77
69
  ];
78
70
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
79
71
  if (parsed.needHelp) {
@@ -85,7 +77,7 @@ export async function action(actionArgs) {
85
77
  help();
86
78
  return;
87
79
  }
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;
80
+ 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
81
  // compute-js-static-publisher cli is always run from the Compute application directory
90
82
  // in other words, the directory that contains `fastly.toml`.
91
83
  const computeAppDir = path.resolve();
@@ -139,9 +131,8 @@ export async function action(actionArgs) {
139
131
  computeAppDir,
140
132
  localMode,
141
133
  fastlyApiToken,
142
- awsProfile,
143
- awsAccessKeyId,
144
- awsSecretAccessKey,
134
+ s3AccessKeyId,
135
+ s3SecretAccessKey,
145
136
  });
146
137
  }
147
138
  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":"AA2DA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAyBhD"}
@@ -33,20 +33,13 @@ KV Store Options:
33
33
  --fastly-api-token=<token> Fastly API token for KV Store access.
34
34
  If not set, the tool will check:
35
35
  1. FASTLY_API_TOKEN environment variable
36
- 2. Logged-in Fastly CLI profile
36
+ 2. The default profile in the Fastly CLI
37
37
 
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
38
+ S3 Storage Options (BETA):
39
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
40
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
41
+ If not set, the tool will check the S3_ACCESS_KEY_ID
42
+ and S3_SECRET_ACCESS_KEY environment variables.
50
43
 
51
44
  Global Options:
52
45
  -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":"AA4GA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA0ehD"}
1
+ {"version":3,"file":"publish-content.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/publish-content.ts"],"names":[],"mappings":"AAsGA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBAyehD"}
@@ -42,6 +42,11 @@ Optional:
42
42
  --root-dir=<dir> Directory to publish from. Overrides the config file setting.
43
43
  Default: rootDir from publish-content.config.js
44
44
 
45
+ --fastly-api-token=<token> Fastly API token for KV Store or cache access.
46
+ If not set, the tool will check:
47
+ 1. FASTLY_API_TOKEN environment variable
48
+ 2. The default profile in the Fastly CLI
49
+
45
50
  --overwrite-existing Always overwrite existing entries in storage, even if unchanged.
46
51
 
47
52
  Expiration:
@@ -61,25 +66,13 @@ KV Store Options:
61
66
  local files that will be used to simulate the KV Store
62
67
  with the local development environment.
63
68
 
64
- --fastly-api-token=<token> Fastly API token for KV Store access.
65
- If not set, the tool will check:
66
- 1. FASTLY_API_TOKEN environment variable
67
- 2. Logged-in Fastly CLI profile
68
-
69
69
  --kv-overwrite Alias for --overwrite-existing.
70
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
71
+ S3 Storage Options (BETA):
72
+ --s3-access-key-id=<id> Access Key ID and Secret Access Key used to
73
+ --s3-secret-access-key=<key> interface with S3 or compatible storage.
74
+ If not set, the tool will check the S3_ACCESS_KEY_ID
75
+ and S3_SECRET_ACCESS_KEY environment variables.
83
76
 
84
77
  Global Options:
85
78
  -h, --help Show this help message and exit.
@@ -104,9 +97,8 @@ export async function action(actionArgs) {
104
97
  { name: 'local', type: Boolean },
105
98
  { name: 'fastly-api-token', type: String, },
106
99
  { 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, },
100
+ { name: 's3-access-key-id', type: String, },
101
+ { name: 's3-secret-access-key', type: String, },
110
102
  ];
111
103
  const parsed = parseCommandLine(actionArgs, optionDefinitions);
112
104
  if (parsed.needHelp) {
@@ -118,7 +110,7 @@ export async function action(actionArgs) {
118
110
  help();
119
111
  return;
120
112
  }
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;
113
+ 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, ['s3-access-key-id']: s3AccessKeyId, ['s3-secret-access-key']: s3SecretAccessKey, } = parsed.commandLineOptions;
122
114
  const overwriteExisting = _overwriteExisting ?? _kvOverwrite;
123
115
  // compute-js-static-publisher cli is always run from the Compute application directory
124
116
  // in other words, the directory that contains `fastly.toml`.
@@ -187,9 +179,8 @@ export async function action(actionArgs) {
187
179
  computeAppDir,
188
180
  localMode,
189
181
  fastlyApiToken,
190
- awsProfile,
191
- awsAccessKeyId,
192
- awsSecretAccessKey,
182
+ s3AccessKeyId,
183
+ s3SecretAccessKey,
193
184
  });
194
185
  }
195
186
  catch (err) {
@@ -475,5 +466,6 @@ export async function action(actionArgs) {
475
466
  const settingsFilePath = path.resolve(storageContentDir, settingsFileName);
476
467
  await storageProvider.submitStorageEntry(settingsFileKey, settingsFilePath, JSON.stringify(serverSettings));
477
468
  console.log(`✅ Settings have been saved.`);
469
+ await storageProvider.purgeSurrogateKey(`${publishId}-${collectionName}`);
478
470
  console.log(`🎉 Completed.`);
479
471
  }
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/scaffold/index.ts"],"names":[],"mappings":"AAuEA,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,iBAsqBhD"}