@fastly/compute-js-static-publish 8.0.0-beta.7 → 8.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -4
- package/README.short.md +18 -4
- package/build/cli/cli/commands/manage/clean.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/clean.js +15 -21
- package/build/cli/cli/commands/manage/collections/delete.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/delete.js +11 -20
- package/build/cli/cli/commands/manage/collections/index.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/index.js +5 -12
- package/build/cli/cli/commands/manage/collections/list.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/list.js +10 -19
- package/build/cli/cli/commands/manage/collections/promote.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/promote.js +10 -19
- package/build/cli/cli/commands/manage/collections/update-expiration.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/collections/update-expiration.js +10 -19
- package/build/cli/cli/commands/manage/index.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/index.js +5 -12
- package/build/cli/cli/commands/manage/publish-content.d.ts.map +1 -1
- package/build/cli/cli/commands/manage/publish-content.js +93 -80
- package/build/cli/cli/commands/scaffold/index.d.ts.map +1 -1
- package/build/cli/cli/commands/scaffold/index.js +31 -29
- package/build/cli/cli/storage/kv-store-local-provider.d.ts +3 -5
- package/build/cli/cli/storage/kv-store-local-provider.d.ts.map +1 -1
- package/build/cli/cli/storage/kv-store-local-provider.js +3 -8
- package/build/cli/cli/storage/kv-store-provider.d.ts +4 -5
- package/build/cli/cli/storage/kv-store-provider.d.ts.map +1 -1
- package/build/cli/cli/storage/kv-store-provider.js +38 -66
- package/build/cli/cli/storage/s3-storage-provider.d.ts +3 -5
- package/build/cli/cli/storage/s3-storage-provider.d.ts.map +1 -1
- package/build/cli/cli/storage/s3-storage-provider.js +35 -46
- package/build/cli/cli/storage/storage-provider.d.ts +7 -8
- package/build/cli/cli/storage/storage-provider.d.ts.map +1 -1
- package/build/cli/cli/util/content-types.d.ts.map +1 -1
- package/build/cli/cli/util/content-types.js +4 -1
- package/build/cli/cli/util/kv-store-items.d.ts +12 -0
- package/build/cli/cli/util/kv-store-items.d.ts.map +1 -1
- package/build/cli/cli/util/kv-store-items.js +49 -0
- package/build/cli/cli/util/kv-store.d.ts +6 -0
- package/build/cli/cli/util/kv-store.d.ts.map +1 -1
- package/build/cli/cli/util/kv-store.js +39 -2
- package/build/cli/cli/util/retryable.d.ts +2 -1
- package/build/cli/cli/util/retryable.d.ts.map +1 -1
- package/build/cli/cli/util/retryable.js +34 -1
- package/build/cli/cli/util/s3-credentials.d.ts +11 -0
- package/build/cli/cli/util/s3-credentials.d.ts.map +1 -0
- package/build/cli/cli/util/s3-credentials.js +38 -0
- package/build/cli/cli/util/s3.d.ts +1 -1
- package/build/cli/cli/util/s3.d.ts.map +1 -1
- package/build/cli/cli/util/s3.js +1 -1
- package/build/cli/models/assets/index.js +1 -1
- package/build/cli/models/metadata/index.js +1 -1
- package/build/server/models/assets/index.js +1 -1
- package/build/server/models/metadata/index.js +1 -1
- package/build/server/server/index.d.ts +1 -1
- package/build/server/server/index.d.ts.map +1 -1
- package/build/server/server/index.js +1 -1
- package/build/server/server/storage/s3-storage-provider.d.ts +7 -7
- package/build/server/server/storage/s3-storage-provider.d.ts.map +1 -1
- package/build/server/server/storage/s3-storage-provider.js +28 -28
- package/package.json +2 -3
- package/build/cli/cli/util/aws-credentials.d.ts +0 -12
- package/build/cli/cli/util/aws-credentials.d.ts.map +0 -1
- package/build/cli/cli/util/aws-credentials.js +0 -67
package/README.md
CHANGED
|
@@ -24,22 +24,26 @@ npx @fastly/compute-js-static-publish@latest --root-dir=./public --kv-store-name
|
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
@@ -24,22 +24,26 @@ npx @fastly/compute-js-static-publish@latest --root-dir=./public --kv-store-name
|
|
|
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
|
|
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
|
-
|
|
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
|
|
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":"
|
|
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,iBA0NhD"}
|
|
@@ -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.
|
|
34
|
+
2. The default profile in the Fastly CLI
|
|
35
35
|
|
|
36
36
|
S3 Storage Options (BETA):
|
|
37
|
-
--
|
|
38
|
-
--
|
|
39
|
-
If not set, the tool will check
|
|
40
|
-
|
|
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
|
|
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: '
|
|
61
|
-
{ name: '
|
|
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, ['
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
awsSecretAccessKey,
|
|
100
|
+
s3AccessKeyId,
|
|
101
|
+
s3SecretAccessKey,
|
|
111
102
|
});
|
|
112
103
|
}
|
|
113
104
|
catch (err) {
|
|
@@ -171,7 +162,10 @@ export async function action(actionArgs) {
|
|
|
171
162
|
assetsIdsInUse.add(`sha256_${assetEntry.key.slice('sha256:'.length)}`);
|
|
172
163
|
}
|
|
173
164
|
}
|
|
174
|
-
}
|
|
165
|
+
}, undefined,
|
|
166
|
+
// If an index cannot be read, stop. If we continue, we mark the files
|
|
167
|
+
// and settings of that collection as not in use, and delete them.
|
|
168
|
+
true);
|
|
175
169
|
console.log('');
|
|
176
170
|
// ### List all settings ###
|
|
177
171
|
console.log('Enumerating settings:');
|
|
@@ -226,6 +220,6 @@ export async function action(actionArgs) {
|
|
|
226
220
|
console.log(`Deleting key from storage: ${key}`);
|
|
227
221
|
await storageProvider.deleteStorageEntry(key);
|
|
228
222
|
}
|
|
229
|
-
});
|
|
223
|
+
}, undefined, true);
|
|
230
224
|
console.log('✅ Completed.');
|
|
231
225
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/delete.ts"],"names":[],"mappings":"
|
|
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,iBAuIhD"}
|
|
@@ -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.
|
|
33
|
+
2. The default profile in the Fastly CLI
|
|
34
34
|
|
|
35
35
|
S3 Storage Options (BETA):
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
If not set, the tool will check
|
|
39
|
-
|
|
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
|
|
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: '
|
|
59
|
-
{ name: '
|
|
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, ['
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
awsSecretAccessKey,
|
|
103
|
+
s3AccessKeyId,
|
|
104
|
+
s3SecretAccessKey,
|
|
114
105
|
});
|
|
115
106
|
}
|
|
116
107
|
catch (err) {
|
|
@@ -153,6 +144,6 @@ export async function action(actionArgs) {
|
|
|
153
144
|
await storageProvider.doConcurrentParallel(items, async (_, key) => {
|
|
154
145
|
console.log(`Deleting key from storage: ${key}`);
|
|
155
146
|
await storageProvider.deleteStorageEntry(key);
|
|
156
|
-
});
|
|
147
|
+
}, undefined, true);
|
|
157
148
|
console.log("✅ Completed.");
|
|
158
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/commands/manage/collections/index.ts"],"names":[],"mappings":"
|
|
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.
|
|
34
|
+
2. The default profile in the Fastly CLI
|
|
35
35
|
|
|
36
36
|
S3 Storage Options (BETA):
|
|
37
|
-
--
|
|
38
|
-
--
|
|
39
|
-
If not set, the tool will check
|
|
40
|
-
|
|
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
|
|
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":"
|
|
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.
|
|
28
|
+
2. The default profile in the Fastly CLI
|
|
29
29
|
|
|
30
30
|
S3 Storage Options (BETA):
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
If not set, the tool will check
|
|
34
|
-
|
|
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
|
|
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: '
|
|
53
|
-
{ name: '
|
|
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, ['
|
|
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
|
-
|
|
101
|
-
|
|
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":"
|
|
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.
|
|
50
|
+
2. The default profile in the Fastly CLI
|
|
51
51
|
|
|
52
52
|
S3 Storage Options (BETA):
|
|
53
|
-
--
|
|
54
|
-
--
|
|
55
|
-
If not set, the tool will check
|
|
56
|
-
|
|
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
|
|
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: '
|
|
80
|
-
{ name: '
|
|
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, ['
|
|
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
|
-
|
|
148
|
-
|
|
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":"
|
|
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.
|
|
46
|
+
2. The default profile in the Fastly CLI
|
|
47
47
|
|
|
48
48
|
S3 Storage Options (BETA):
|
|
49
|
-
--
|
|
50
|
-
--
|
|
51
|
-
If not set, the tool will check
|
|
52
|
-
|
|
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
|
|
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: '
|
|
75
|
-
{ name: '
|
|
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, ['
|
|
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
|
-
|
|
143
|
-
|
|
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":"
|
|
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.
|
|
36
|
+
2. The default profile in the Fastly CLI
|
|
37
37
|
|
|
38
38
|
S3 Storage Options (BETA):
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
If not set, the tool will check
|
|
42
|
-
|
|
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
|
|
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":"
|
|
1
|
+
{"version":3,"file":"publish-content.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/manage/publish-content.ts"],"names":[],"mappings":"AAuGA,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,iBA8fhD"}
|