@appsemble/cli 0.30.8 → 0.30.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 +3 -3
- package/lib/app.test.js +22 -19
- package/lib/asset.test.js +1 -0
- package/package.json +6 -6
- package/templates/apps/empty/app-definition.yaml +2 -2
- package/templates/blocks/mini-jsx/package.json +1 -1
- package/templates/blocks/preact/package.json +2 -2
- package/templates/blocks/vanilla/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#  Appsemble CLI
|
|
2
2
|
|
|
3
3
|
> Manage apps and blocks from the command line.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/cli)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.30.9)
|
|
7
7
|
[](https://prettier.io)
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
@@ -323,5 +323,5 @@ appsemble run-cronjobs --interval 30
|
|
|
323
323
|
|
|
324
324
|
## License
|
|
325
325
|
|
|
326
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.30.
|
|
326
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.30.9/LICENSE.md) ©
|
|
327
327
|
[Appsemble](https://appsemble.com)
|
package/lib/app.test.js
CHANGED
|
@@ -5,6 +5,7 @@ import { PredefinedOrganizationRole } from '@appsemble/types';
|
|
|
5
5
|
import { ISODateTimePattern } from '@appsemble/utils';
|
|
6
6
|
import { setTestApp } from 'axios-test-instance';
|
|
7
7
|
import FormData from 'form-data';
|
|
8
|
+
import sharp from 'sharp';
|
|
8
9
|
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
9
10
|
import { deleteApp, patchApp, publishApp, resolveAppIdAndRemote, traverseAppDirectory, updateApp, writeAppMessages, } from './app.js';
|
|
10
11
|
import { initAxios } from './initAxios.js';
|
|
@@ -351,9 +352,11 @@ describe('app', () => {
|
|
|
351
352
|
},
|
|
352
353
|
]
|
|
353
354
|
`);
|
|
354
|
-
const assets = await Asset.findAll();
|
|
355
|
+
const assets = await Asset.findAll({ order: [['filename', 'ASC']] });
|
|
356
|
+
const tuxData = await readFixture('apps/test/assets/tux.png');
|
|
355
357
|
expect(assets.map((a) => a.data)).toStrictEqual([
|
|
356
|
-
await
|
|
358
|
+
await sharp(tuxData).toFormat('avif').toBuffer(),
|
|
359
|
+
tuxData,
|
|
357
360
|
]);
|
|
358
361
|
});
|
|
359
362
|
it('should publish app with runtime config', async () => {
|
|
@@ -516,11 +519,10 @@ describe('app', () => {
|
|
|
516
519
|
},
|
|
517
520
|
]
|
|
518
521
|
`);
|
|
519
|
-
const assets = await Asset.findAll();
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
]);
|
|
522
|
+
const assets = await Asset.findAll({ order: [['filename', 'ASC']] });
|
|
523
|
+
const tuxData = await readFixture('apps/test/assets/tux.png');
|
|
524
|
+
const tuxAvifData = await sharp(tuxData).toFormat('avif').toBuffer();
|
|
525
|
+
expect(assets.map((a) => a.data)).toStrictEqual([tuxAvifData, tuxAvifData, tuxData, tuxData]);
|
|
524
526
|
const appCollectionApp = await AppCollectionApp.findOne();
|
|
525
527
|
expect(appCollectionApp.AppId).toBe(1);
|
|
526
528
|
expect(appCollectionApp.AppCollectionId).toBe(1);
|
|
@@ -659,9 +661,11 @@ describe('app', () => {
|
|
|
659
661
|
},
|
|
660
662
|
]
|
|
661
663
|
`);
|
|
662
|
-
const assets = await Asset.findAll();
|
|
664
|
+
const assets = await Asset.findAll({ order: [['filename', 'ASC']] });
|
|
665
|
+
const tuxData = await readFixture('apps/test/variants/tux/assets/small-tux.png');
|
|
663
666
|
expect(assets.map((a) => a.data)).toStrictEqual([
|
|
664
|
-
await
|
|
667
|
+
await sharp(tuxData).toFormat('avif').toBuffer(),
|
|
668
|
+
tuxData,
|
|
665
669
|
]);
|
|
666
670
|
});
|
|
667
671
|
it('should publish app variables and secrets', async () => {
|
|
@@ -1128,9 +1132,11 @@ describe('app', () => {
|
|
|
1128
1132
|
},
|
|
1129
1133
|
]
|
|
1130
1134
|
`);
|
|
1131
|
-
const assets = await Asset.findAll();
|
|
1135
|
+
const assets = await Asset.findAll({ order: [['filename', 'ASC']] });
|
|
1136
|
+
const tuxData = await readFixture('apps/test/assets/tux.png');
|
|
1132
1137
|
expect(assets.map((a) => a.data)).toStrictEqual([
|
|
1133
|
-
await
|
|
1138
|
+
await sharp(tuxData).toFormat('avif').toBuffer(),
|
|
1139
|
+
tuxData,
|
|
1134
1140
|
]);
|
|
1135
1141
|
});
|
|
1136
1142
|
it('should update app with runtime config', async () => {
|
|
@@ -1294,11 +1300,10 @@ describe('app', () => {
|
|
|
1294
1300
|
},
|
|
1295
1301
|
]
|
|
1296
1302
|
`);
|
|
1297
|
-
const assets = await Asset.findAll();
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
]);
|
|
1303
|
+
const assets = await Asset.findAll({ order: [['filename', 'ASC']] });
|
|
1304
|
+
const tuxData = await readFixture('apps/test/assets/tux.png');
|
|
1305
|
+
const tuxAvifData = await sharp(tuxData).toFormat('avif').toBuffer();
|
|
1306
|
+
expect(assets.map((a) => a.data)).toStrictEqual([tuxAvifData, tuxAvifData, tuxData, tuxData]);
|
|
1302
1307
|
// TODO: not yet implemented
|
|
1303
1308
|
// const appCollectionApp = await AppCollectionApp.findOne();
|
|
1304
1309
|
// expect(appCollectionApp.AppId).toBe(1);
|
|
@@ -1440,9 +1445,7 @@ describe('app', () => {
|
|
|
1440
1445
|
]
|
|
1441
1446
|
`);
|
|
1442
1447
|
const assets = await Asset.findAll();
|
|
1443
|
-
expect(assets.map((a) => a.
|
|
1444
|
-
await readFixture('apps/test/variants/tux/assets/small-tux.png'),
|
|
1445
|
-
]);
|
|
1448
|
+
expect(assets.map((a) => a.filename)).toStrictEqual(['small-tux.png', 'small-tux.avif']);
|
|
1446
1449
|
});
|
|
1447
1450
|
it('should update app variables and secrets', async () => {
|
|
1448
1451
|
vi.useRealTimers();
|
package/lib/asset.test.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/cli",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.9",
|
|
4
4
|
"description": "The CLI for developing with Appsemble apps and blocks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"test": "vitest"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@appsemble/node-utils": "0.30.
|
|
46
|
-
"@appsemble/types": "0.30.
|
|
47
|
-
"@appsemble/utils": "0.30.
|
|
45
|
+
"@appsemble/node-utils": "0.30.9",
|
|
46
|
+
"@appsemble/types": "0.30.9",
|
|
47
|
+
"@appsemble/utils": "0.30.9",
|
|
48
48
|
"@fortawesome/fontawesome-common-types": "^6.0.0",
|
|
49
49
|
"@koa/cors": "^4.0.0",
|
|
50
50
|
"@odata/parser": "^0.2.0",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"yargs": "^17.0.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@appsemble/types": "0.30.
|
|
91
|
-
"@appsemble/server": "0.30.
|
|
90
|
+
"@appsemble/types": "0.30.9",
|
|
91
|
+
"@appsemble/server": "0.30.9",
|
|
92
92
|
"bcrypt": "^5.0.0",
|
|
93
93
|
"axios-test-instance": "^7.0.0",
|
|
94
94
|
"@types/concat-stream": "^2.0.0",
|
|
@@ -6,7 +6,7 @@ pages:
|
|
|
6
6
|
- name: Example Page A
|
|
7
7
|
blocks:
|
|
8
8
|
- type: action-button
|
|
9
|
-
version: 0.30.
|
|
9
|
+
version: 0.30.9
|
|
10
10
|
parameters:
|
|
11
11
|
icon: arrow-right
|
|
12
12
|
actions:
|
|
@@ -17,7 +17,7 @@ pages:
|
|
|
17
17
|
- name: Example Page B
|
|
18
18
|
blocks:
|
|
19
19
|
- type: action-button
|
|
20
|
-
version: 0.30.
|
|
20
|
+
version: 0.30.9
|
|
21
21
|
parameters:
|
|
22
22
|
icon: arrow-left
|
|
23
23
|
actions:
|