ember-cli-deploy-s3-index 4.0.2 → 4.0.4
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/.github/workflows/ci.yaml +14 -12
- package/CHANGELOG.md +25 -0
- package/README.md +3 -1
- package/RELEASE.md +21 -9
- package/lib/s3.js +17 -27
- package/package.json +6 -5
- package/pnpm-workspace.yaml +2 -0
- package/appveyor.yml +0 -33
|
@@ -10,31 +10,33 @@ jobs:
|
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
strategy:
|
|
12
12
|
matrix:
|
|
13
|
-
node-version: [
|
|
13
|
+
node-version: [20.x, 22.x, 24.x]
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: pnpm/action-setup@v6
|
|
16
17
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
17
|
-
uses: actions/setup-node@
|
|
18
|
+
uses: actions/setup-node@v4
|
|
18
19
|
with:
|
|
19
20
|
node-version: ${{ matrix.node-version }}
|
|
20
|
-
cache: '
|
|
21
|
-
- run:
|
|
22
|
-
- run:
|
|
21
|
+
cache: 'pnpm'
|
|
22
|
+
- run: pnpm install --frozen-lockfile
|
|
23
|
+
- run: pnpm test
|
|
23
24
|
|
|
24
25
|
test-floating:
|
|
25
26
|
name: Floating Dependencies
|
|
26
27
|
runs-on: ubuntu-latest
|
|
27
28
|
strategy:
|
|
28
29
|
matrix:
|
|
29
|
-
node-version: [
|
|
30
|
+
node-version: [20.x, 22.x, 24.x]
|
|
30
31
|
steps:
|
|
31
|
-
- uses: actions/checkout@
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
- uses: pnpm/action-setup@v6
|
|
32
34
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
33
|
-
uses: actions/setup-node@
|
|
35
|
+
uses: actions/setup-node@v4
|
|
34
36
|
with:
|
|
35
37
|
node-version: ${{ matrix.node-version }}
|
|
36
|
-
cache: '
|
|
38
|
+
cache: 'pnpm'
|
|
37
39
|
- name: install dependencies
|
|
38
|
-
run:
|
|
40
|
+
run: pnpm install --no-lockfile
|
|
39
41
|
- name: test
|
|
40
|
-
run:
|
|
42
|
+
run: pnpm test
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## 4.0.4 (2026-10-28)
|
|
9
|
+
|
|
10
|
+
#### :bug: Bug Fix
|
|
11
|
+
* [#145](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/pull/145) fix: Give endpoint and credentials to the S3 client constructor ([@matthewhartstonge](https://github.com/matthewhartstonge))
|
|
12
|
+
|
|
13
|
+
#### :house: Internal
|
|
14
|
+
* [#155](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/pull/155) Upgrade release-it to v20 and update RELEASE.md ([@lukemelia](https://github.com/lukemelia))
|
|
15
|
+
* [#151](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/pull/151) Switch from yarn to pnpm ([@lukemelia](https://github.com/lukemelia))
|
|
16
|
+
* [#150](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/pull/150) Remove AppVeyor config and dead CI badges ([@lukemelia](https://github.com/lukemelia))
|
|
17
|
+
* [#146](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/pull/146) Update CI: drop EOL Node versions, bump actions ([@lukemelia](https://github.com/lukemelia))
|
|
18
|
+
|
|
19
|
+
#### Committers: 2
|
|
20
|
+
- Luke Melia ([@lukemelia](https://github.com/lukemelia))
|
|
21
|
+
- Matthew Hartstonge ([@matthewhartstonge](https://github.com/matthewhartstonge))
|
|
22
|
+
|
|
23
|
+
## 4.0.3 (2024-05-02)
|
|
24
|
+
|
|
25
|
+
#### :bug: Bug Fix
|
|
26
|
+
* [#143](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/pull/143) Handle NotFound S3 Response ([@jrjohnson](https://github.com/jrjohnson))
|
|
27
|
+
|
|
28
|
+
#### Committers: 1
|
|
29
|
+
- Jon Johnson ([@jrjohnson](https://github.com/jrjohnson))
|
|
30
|
+
|
|
6
31
|
## 4.0.2 (2024-04-05)
|
|
7
32
|
|
|
8
33
|
#### :bug: Bug Fix
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ember-cli-deploy-s3-index
|
|
1
|
+
# ember-cli-deploy-s3-index
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
> An ember-cli-deploy plugin to deploy ember-cli's bootstrap index file to [S3](https://aws.amazon.com/de/s3).
|
|
@@ -144,6 +144,8 @@ The underlying S3 library used to upload the files to S3. This allows the user t
|
|
|
144
144
|
|
|
145
145
|
The client specified MUST implement functions called `getObject` and `putObject`. See [Using V2 API] (https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html#using_v2_commands).
|
|
146
146
|
|
|
147
|
+
The plugin does not change configuration in a provided client. For example, if you set `endpoint`, you will need to give it to your custom client when you create it.
|
|
148
|
+
|
|
147
149
|
*Default:* the default S3 library is `@aws-sdk/s3-client` (AWS JS SDK v3). Please use this addon version < 3.0.0 if you want to use AWS JS SDK 2.0
|
|
148
150
|
|
|
149
151
|
### endpoint
|
package/RELEASE.md
CHANGED
|
@@ -24,20 +24,29 @@ When reviewing merged PR's the labels to be used are:
|
|
|
24
24
|
* internal - Used for internal changes that still require a mention in the
|
|
25
25
|
changelog/release notes.
|
|
26
26
|
|
|
27
|
+
Unlabeled PRs are left out of the changelog.
|
|
28
|
+
|
|
27
29
|
## Release
|
|
28
30
|
|
|
29
31
|
Once the prep work is completed, the actual release is straight forward:
|
|
30
32
|
|
|
31
|
-
* First,
|
|
33
|
+
* First, check out an up-to-date `master` and install the project's
|
|
34
|
+
dependencies:
|
|
32
35
|
|
|
33
36
|
```sh
|
|
34
|
-
|
|
37
|
+
git checkout master
|
|
38
|
+
git pull
|
|
39
|
+
pnpm install
|
|
35
40
|
```
|
|
36
41
|
|
|
37
|
-
* Second, ensure that you
|
|
42
|
+
* Second, ensure that you are logged in to npm as a user with publish access
|
|
43
|
+
to `ember-cli-deploy-s3-index`. `npm whoami` should print your username.
|
|
44
|
+
|
|
45
|
+
* Third, ensure that you have obtained a
|
|
38
46
|
[GitHub personal access token][generate-token] with the `repo` scope (no
|
|
39
47
|
other permissions are needed). Make sure the token is available as the
|
|
40
|
-
`GITHUB_AUTH` environment variable.
|
|
48
|
+
`GITHUB_AUTH` environment variable. Both lerna-changelog and release-it's
|
|
49
|
+
GitHub release step read it from there.
|
|
41
50
|
|
|
42
51
|
For instance:
|
|
43
52
|
|
|
@@ -50,11 +59,14 @@ yarn install
|
|
|
50
59
|
* And last (but not least 😁) do your release.
|
|
51
60
|
|
|
52
61
|
```sh
|
|
53
|
-
|
|
62
|
+
pnpm release
|
|
54
63
|
```
|
|
55
64
|
|
|
56
65
|
[release-it](https://github.com/release-it/release-it/) manages the actual
|
|
57
|
-
release process. It will prompt you to
|
|
58
|
-
|
|
59
|
-
`CHANGELOG.md` and GitHub
|
|
60
|
-
|
|
66
|
+
release process. It will prompt you to choose the version number (or pass it
|
|
67
|
+
directly, e.g. `pnpm release minor`) after which you will have the chance to
|
|
68
|
+
hand tweak the changelog to be used (for the `CHANGELOG.md` and GitHub
|
|
69
|
+
release), then `release-it` continues on to committing, tagging, pushing the
|
|
70
|
+
tag and commits, publishing to npm, and creating the GitHub release.
|
|
71
|
+
|
|
72
|
+
To preview a release without changing anything, run `pnpm release --dry-run`.
|
package/lib/s3.js
CHANGED
|
@@ -9,20 +9,15 @@ var readFile = RSVP.denodeify(fs.readFile);
|
|
|
9
9
|
var mime = require('mime-types');
|
|
10
10
|
var joinUriSegments = require('./util/join-uri-segments');
|
|
11
11
|
|
|
12
|
-
function headObject(client, params) {
|
|
13
|
-
|
|
14
|
-
client.headObject(params
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
else {
|
|
22
|
-
return resolve(data);
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
});
|
|
12
|
+
async function headObject(client, params) {
|
|
13
|
+
try {
|
|
14
|
+
return await client.headObject(params);
|
|
15
|
+
} catch (err) {
|
|
16
|
+
if (err.name === 'NotFound') {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
throw err;
|
|
20
|
+
}
|
|
26
21
|
}
|
|
27
22
|
|
|
28
23
|
module.exports = CoreObject.extend({
|
|
@@ -32,31 +27,26 @@ module.exports = CoreObject.extend({
|
|
|
32
27
|
var config = plugin.pluginConfig;
|
|
33
28
|
var profile = plugin.readConfig('profile');
|
|
34
29
|
var endpoint = plugin.readConfig('endpoint');
|
|
35
|
-
|
|
30
|
+
// The SDK resolves its options when it creates the client. Do not set them after.
|
|
31
|
+
var s3Options = Object.assign({}, config);
|
|
36
32
|
|
|
37
33
|
this._plugin = plugin;
|
|
38
34
|
|
|
39
35
|
var providedS3Client = plugin.readConfig("s3Client");
|
|
40
|
-
|
|
36
|
+
|
|
41
37
|
|
|
42
38
|
if (profile && !providedS3Client) {
|
|
43
39
|
this._plugin.log("Using AWS profile from config", { verbose: true });
|
|
44
|
-
credentials = fromIni({ profile: profile });
|
|
40
|
+
s3Options.credentials = fromIni({ profile: profile });
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
if (endpoint) {
|
|
48
|
-
this._plugin.log('Using endpoint from config', { verbose: true });
|
|
44
|
+
this._plugin.log('Using endpoint from config', { verbose: true });
|
|
45
|
+
s3Options.endpoint = endpoint;
|
|
49
46
|
}
|
|
50
47
|
|
|
51
|
-
this._client = providedS3Client || new S3(
|
|
52
|
-
|
|
53
|
-
if (endpoint) {
|
|
54
|
-
this._client.config.endpoint = endpoint;
|
|
55
|
-
}
|
|
56
|
-
if (credentials) {
|
|
57
|
-
this._client.config.credentials = credentials;
|
|
58
|
-
}
|
|
59
|
-
|
|
48
|
+
this._client = providedS3Client || new S3(s3Options);
|
|
49
|
+
|
|
60
50
|
},
|
|
61
51
|
|
|
62
52
|
upload: function(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli-deploy-s3-index",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Ember CLI Deploy plugin to deploy ember-cli's bootstrap index file to S3.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"rsvp": "^4.8.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
+
"@release-it-plugins/lerna-changelog": "^9.0.0",
|
|
29
30
|
"chai": "^4.2.0",
|
|
30
31
|
"chai-as-promised": "^7.1.1",
|
|
31
32
|
"ember-cli": "~3.18.0",
|
|
32
33
|
"eslint": "^7.0.0",
|
|
33
34
|
"glob": "^7.1.6",
|
|
34
35
|
"mocha": "^7.1.2",
|
|
35
|
-
"release-it": "^
|
|
36
|
-
"release-it-lerna-changelog": "^3.1.0"
|
|
36
|
+
"release-it": "^20.2.1"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": "14.* || 16.* || 18.* || >= 20"
|
|
@@ -50,10 +50,11 @@
|
|
|
50
50
|
"tokenRef": "GITHUB_AUTH"
|
|
51
51
|
},
|
|
52
52
|
"plugins": {
|
|
53
|
-
"release-it-lerna-changelog": {
|
|
53
|
+
"@release-it-plugins/lerna-changelog": {
|
|
54
54
|
"infile": "CHANGELOG.md",
|
|
55
55
|
"launchEditor": true
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
"packageManager": "pnpm@12.15.0+sha512.b3951d6d6ff4a9f13dc7cf56cd28d2b8eb37dbcc9c68e52e1e1191873ea9f82a017287ab50baadc5ccc494f036c67c0e47eb13608c2fa36f47711b61ea128e61"
|
|
59
60
|
}
|
package/appveyor.yml
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# http://www.appveyor.com/docs/appveyor-yml
|
|
2
|
-
|
|
3
|
-
# Fix line endings in Windows. (runs before repo cloning)
|
|
4
|
-
init:
|
|
5
|
-
- git config --global core.autorclf true
|
|
6
|
-
|
|
7
|
-
# Test against these versions of Node.js.
|
|
8
|
-
environment:
|
|
9
|
-
matrix:
|
|
10
|
-
- nodejs_version: "4.5"
|
|
11
|
-
- nodejs_version: "6.10"
|
|
12
|
-
|
|
13
|
-
cache:
|
|
14
|
-
- "%LOCALAPPDATA%\\Yarn"
|
|
15
|
-
|
|
16
|
-
# Install scripts. (runs after repo cloning)
|
|
17
|
-
install:
|
|
18
|
-
# Get the latest stable version of Node.js or io.js
|
|
19
|
-
- ps: Install-Product node $env:nodejs_version
|
|
20
|
-
# install modules
|
|
21
|
-
- md C:\nc
|
|
22
|
-
- yarn install
|
|
23
|
-
|
|
24
|
-
# Post-install test scripts.
|
|
25
|
-
test_script:
|
|
26
|
-
# Output useful info for debugging.
|
|
27
|
-
- node --version
|
|
28
|
-
- yarn --version
|
|
29
|
-
# run tests
|
|
30
|
-
- yarn test
|
|
31
|
-
|
|
32
|
-
# Don't actually build.
|
|
33
|
-
build: off
|