@cloud-cli/vm 1.0.1 → 1.0.3
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/dist/index.js +1 -1
- package/package.json +2 -1
- package/src/index.spec.ts +1 -1
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const nameRe = /^[a-z][a-z0-9-]+$/;
|
|
|
3
3
|
const isValidName = (name) => nameRe.test(name);
|
|
4
4
|
const invalidNameError = new Error('Invalid name');
|
|
5
5
|
async function list() {
|
|
6
|
-
const output = await exec('docker', ['volume', 'ls', '--format=
|
|
6
|
+
const output = await exec('docker', ['volume', 'ls', '--format={{.Name}}']);
|
|
7
7
|
if (!output.ok) {
|
|
8
8
|
throw new Error('Unable to list volumes');
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-cli/vm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Docker volume management",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
7
8
|
"prettier": "@cloud-cli/prettier-config",
|
|
8
9
|
"scripts": {
|
|
9
10
|
"test": "jest",
|
package/src/index.spec.ts
CHANGED
|
@@ -33,7 +33,7 @@ describe('volume manager', () => {
|
|
|
33
33
|
execMocks.exec = jest.fn().mockResolvedValue(execOutput);
|
|
34
34
|
|
|
35
35
|
await expect(vm.list()).resolves.toEqual(['test', 'test2']);
|
|
36
|
-
expect(exec.exec).toHaveBeenCalledWith('docker', ['volume', 'ls', '--format=
|
|
36
|
+
expect(exec.exec).toHaveBeenCalledWith('docker', ['volume', 'ls', '--format={{.Name}}']);
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
it('should reject in case of error', async () => {
|
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ interface NameOption {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
async function list() {
|
|
12
|
-
const output = await exec('docker', ['volume', 'ls', '--format=
|
|
12
|
+
const output = await exec('docker', ['volume', 'ls', '--format={{.Name}}']);
|
|
13
13
|
|
|
14
14
|
if (!output.ok) {
|
|
15
15
|
throw new Error('Unable to list volumes');
|