@adobe/aio-lib-web 6.1.0 → 6.1.1-pre.2024-01-08.20eab078
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/daily.yml +2 -2
- package/.github/workflows/node.js.yml +1 -1
- package/.github/workflows/on-push-publish-to-npm.yml +1 -1
- package/.github/workflows/prerelease.yml +1 -1
- package/package.json +10 -9
- package/src/undeploy-web.js +2 -2
- package/test/__mocks__/@adobe/aio-lib-core-tvm.js +0 -1
- package/test/src/undeploy-web.test.js +3 -3
|
@@ -10,7 +10,7 @@ jobs:
|
|
|
10
10
|
runs-on: ${{ matrix.os }}
|
|
11
11
|
strategy:
|
|
12
12
|
matrix:
|
|
13
|
-
node: [
|
|
13
|
+
node-version: [18]
|
|
14
14
|
os: [ubuntu-latest]
|
|
15
15
|
|
|
16
16
|
steps:
|
|
@@ -29,6 +29,6 @@ jobs:
|
|
|
29
29
|
env:
|
|
30
30
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
|
31
31
|
SLACK_TITLE: 'Node version'
|
|
32
|
-
SLACK_MESSAGE: ${{ matrix.node }}
|
|
32
|
+
SLACK_MESSAGE: ${{ matrix.node-version }}
|
|
33
33
|
SLACK_COLOR: ${{ job.status == 'success' && 'good' || job.status == 'cancelled' && '#808080' || 'danger' }}
|
|
34
34
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aio-lib-web",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1-pre.2024-01-08.20eab078",
|
|
4
4
|
"description": "Utility tooling library to build and deploy Adobe I/O Project Firefly app static sites to CDN",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Adobe Inc.",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": "
|
|
13
|
+
"node": ">=18"
|
|
14
14
|
},
|
|
15
15
|
"repository": "adobe/aio-lib-web",
|
|
16
16
|
"homepage": "https://github.com/adobe/aio-lib-web",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"e2e": "jest --config='./e2e/jest.config.js' --testRegex './e2e/e2e.js'"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@adobe/aio-lib-core-config": "
|
|
33
|
-
"@adobe/aio-lib-core-logging": "
|
|
34
|
-
"@adobe/aio-lib-core-tvm": "
|
|
32
|
+
"@adobe/aio-lib-core-config": "next",
|
|
33
|
+
"@adobe/aio-lib-core-logging": "next",
|
|
34
|
+
"@adobe/aio-lib-core-tvm": "next",
|
|
35
35
|
"@aws-sdk/client-s3": "^3.276.0",
|
|
36
36
|
"core-js": "^3.25.1",
|
|
37
|
-
"fs-extra": "^
|
|
37
|
+
"fs-extra": "^11",
|
|
38
38
|
"joi": "^17.2.1",
|
|
39
39
|
"klaw": "^4",
|
|
40
40
|
"lodash.clonedeep": "^4.5.0",
|
|
@@ -54,8 +54,9 @@
|
|
|
54
54
|
"eslint-plugin-promise": "^6",
|
|
55
55
|
"eslint-plugin-standard": "^5",
|
|
56
56
|
"jest": "^29",
|
|
57
|
-
"jsdoc-to-markdown": "^
|
|
57
|
+
"jsdoc-to-markdown": "^8",
|
|
58
58
|
"memfs": "^3.4.7",
|
|
59
59
|
"node-fetch": "^2.6.7"
|
|
60
|
-
}
|
|
61
|
-
|
|
60
|
+
},
|
|
61
|
+
"prereleaseSha": "20eab07837ed3c5f32dacfcb60cf55fe40756e07"
|
|
62
|
+
}
|
package/src/undeploy-web.js
CHANGED
|
@@ -22,11 +22,11 @@ const undeployWeb = async (config) => {
|
|
|
22
22
|
|
|
23
23
|
const remoteStorage = new RemoteStorage(creds)
|
|
24
24
|
|
|
25
|
-
if (!(await remoteStorage.folderExists(config.s3.folder))) {
|
|
25
|
+
if (!(await remoteStorage.folderExists(config.s3.folder + '/'))) {
|
|
26
26
|
throw new Error(`cannot undeploy static files, there is no deployment for ${config.s3.folder}`)
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
await remoteStorage.emptyFolder(config.s3.folder)
|
|
29
|
+
await remoteStorage.emptyFolder(config.s3.folder + '/')
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
module.exports = undeployWeb
|
|
@@ -64,8 +64,8 @@ describe('undeploy-web', () => {
|
|
|
64
64
|
await undeployWeb(config)
|
|
65
65
|
expect(getS3Credentials).toHaveBeenCalledWith(config)
|
|
66
66
|
expect(RemoteStorage).toHaveBeenCalledWith('fakecreds')
|
|
67
|
-
expect(mockRemoteStorageInstance.folderExists).toHaveBeenCalledWith('somefolder')
|
|
68
|
-
expect(mockRemoteStorageInstance.emptyFolder).toHaveBeenCalledWith('somefolder')
|
|
67
|
+
expect(mockRemoteStorageInstance.folderExists).toHaveBeenCalledWith('somefolder/')
|
|
68
|
+
expect(mockRemoteStorageInstance.emptyFolder).toHaveBeenCalledWith('somefolder/')
|
|
69
69
|
})
|
|
70
70
|
|
|
71
71
|
test('throws if remoteStorage folder does not exist', async () => {
|
|
@@ -89,7 +89,7 @@ describe('undeploy-web', () => {
|
|
|
89
89
|
await expect(undeployWeb(config)).rejects.toThrow('cannot undeploy static files')
|
|
90
90
|
expect(getS3Credentials).toHaveBeenCalledWith(config)
|
|
91
91
|
expect(RemoteStorage).toHaveBeenCalledWith('fakecreds')
|
|
92
|
-
expect(mockRemoteStorageInstance.folderExists).toHaveBeenCalledWith('somefolder')
|
|
92
|
+
expect(mockRemoteStorageInstance.folderExists).toHaveBeenCalledWith('somefolder/')
|
|
93
93
|
expect(mockRemoteStorageInstance.emptyFolder).not.toHaveBeenCalled()
|
|
94
94
|
})
|
|
95
95
|
})
|