@appsemble/cli 0.30.2 → 0.30.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/README.md +4 -4
- package/commands/{cleanupDemoUsers.d.ts → cleanupDemoAppMembers.d.ts} +2 -2
- package/commands/{cleanupDemoUsers.js → cleanupDemoAppMembers.js} +5 -5
- package/index.js +2 -2
- package/lib/serverImport.d.ts +1 -1
- 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/vitest.setup.js +11 -4
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.3)
|
|
7
7
|
[](https://prettier.io)
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
@@ -248,7 +248,7 @@ npm install webpack@webpack-4 @appsemble/webpack-config
|
|
|
248
248
|
```
|
|
249
249
|
|
|
250
250
|
For a more in-depth explanation of how to build apps, use our
|
|
251
|
-
[block development guide](https://appsemble.app/docs/
|
|
251
|
+
[block development guide](https://appsemble.app/docs/04-development/developing-blocks).
|
|
252
252
|
|
|
253
253
|
### Groups
|
|
254
254
|
|
|
@@ -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.3/LICENSE.md) ©
|
|
327
327
|
[Appsemble](https://appsemble.com)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Argv } from 'yargs';
|
|
2
2
|
import { type BaseArguments } from '../types.js';
|
|
3
|
-
export declare const command = "cleanup-demo-
|
|
4
|
-
export declare const description = "Deletes all demo
|
|
3
|
+
export declare const command = "cleanup-demo-app-members";
|
|
4
|
+
export declare const description = "Deletes all demo app members from the database.";
|
|
5
5
|
export declare function builder(yargs: Argv): Argv<any>;
|
|
6
6
|
export declare function handler(argv: BaseArguments): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { serverImport } from '../lib/serverImport.js';
|
|
2
|
-
export const command = 'cleanup-demo-
|
|
3
|
-
export const description = 'Deletes all demo
|
|
2
|
+
export const command = 'cleanup-demo-app-members';
|
|
3
|
+
export const description = 'Deletes all demo app members from the database.';
|
|
4
4
|
export function builder(yargs) {
|
|
5
5
|
return yargs
|
|
6
6
|
.option('database-host', {
|
|
@@ -33,8 +33,8 @@ export function builder(yargs) {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
export async function handler(argv) {
|
|
36
|
-
const {
|
|
36
|
+
const { cleanupDemoAppMembers, setArgv } = await serverImport('setArgv', 'cleanupDemoAppMembers');
|
|
37
37
|
setArgv(argv);
|
|
38
|
-
return
|
|
38
|
+
return cleanupDemoAppMembers();
|
|
39
39
|
}
|
|
40
|
-
//# sourceMappingURL=
|
|
40
|
+
//# sourceMappingURL=cleanupDemoAppMembers.js.map
|
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as asset from './commands/asset/index.js';
|
|
|
8
8
|
import * as block from './commands/block/index.js';
|
|
9
9
|
import * as checkDownMigrations from './commands/checkDownMigrations.js';
|
|
10
10
|
import * as checkMigrations from './commands/checkMigrations.js';
|
|
11
|
-
import * as
|
|
11
|
+
import * as cleanupDemoAppMembers from './commands/cleanupDemoAppMembers.js';
|
|
12
12
|
import * as cleanupResourcesAndAssets from './commands/cleanupResourcesAndAssets.js';
|
|
13
13
|
import * as config from './commands/config/index.js';
|
|
14
14
|
import * as fuzzMigrations from './commands/fuzzMigrations.js';
|
|
@@ -53,7 +53,7 @@ let parser = yargs(process.argv.slice(2))
|
|
|
53
53
|
.command(asset)
|
|
54
54
|
.command(block)
|
|
55
55
|
.command(cleanupResourcesAndAssets)
|
|
56
|
-
.command(
|
|
56
|
+
.command(cleanupDemoAppMembers)
|
|
57
57
|
.command(checkMigrations)
|
|
58
58
|
.command(checkDownMigrations)
|
|
59
59
|
.command(fuzzMigrations)
|
package/lib/serverImport.d.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @param members The names of the exported member to import.
|
|
5
5
|
* @returns The exported member.
|
|
6
6
|
*/
|
|
7
|
-
export declare function serverImport<T extends 'checkDownMigrations' | 'checkMigrations' | '
|
|
7
|
+
export declare function serverImport<T extends 'checkDownMigrations' | 'checkMigrations' | 'cleanupDemoAppMembers' | 'cleanupResourcesAndAssets' | 'fuzzMigrations' | 'migrate' | 'migrateAppDefinitions' | 'runCronJobs' | 'scaleContainers' | 'setArgv' | 'start'>(...members: T[]): Promise<Record<T, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/cli",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.3",
|
|
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.3",
|
|
46
|
+
"@appsemble/types": "0.30.3",
|
|
47
|
+
"@appsemble/utils": "0.30.3",
|
|
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.3",
|
|
91
|
+
"@appsemble/server": "0.30.3",
|
|
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.3
|
|
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.3
|
|
21
21
|
parameters:
|
|
22
22
|
icon: arrow-left
|
|
23
23
|
actions:
|
package/vitest.setup.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { CREDENTIALS_ENV_VAR, setFixtureBase, setLogLevel } from '@appsemble/node-utils';
|
|
3
|
-
import { setupTestDatabase } from '@appsemble/server';
|
|
3
|
+
import { rootDB, setupTestDatabase } from '@appsemble/server';
|
|
4
4
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
5
|
-
import { beforeAll, beforeEach } from 'vitest';
|
|
5
|
+
import { afterAll, beforeAll, beforeEach } from 'vitest';
|
|
6
6
|
setFixtureBase(import.meta);
|
|
7
7
|
delete process.env[CREDENTIALS_ENV_VAR];
|
|
8
8
|
setLogLevel(0);
|
|
9
9
|
let testDB;
|
|
10
10
|
beforeAll(async () => {
|
|
11
|
-
[testDB] = await setupTestDatabase(randomUUID()
|
|
11
|
+
[testDB] = await setupTestDatabase(randomUUID());
|
|
12
|
+
await testDB.sync();
|
|
12
13
|
});
|
|
13
14
|
beforeEach(async () => {
|
|
14
|
-
await testDB.
|
|
15
|
+
await testDB.truncate({ truncate: true, cascade: true, force: true, restartIdentity: true });
|
|
16
|
+
});
|
|
17
|
+
afterAll(async () => {
|
|
18
|
+
await testDB.close();
|
|
19
|
+
// We need to drop the test database from the root database
|
|
20
|
+
// testDB.drop() doesn't actually delete the database
|
|
21
|
+
await rootDB.query(`DROP DATABASE ${testDB.getDatabaseName()}`);
|
|
15
22
|
});
|
|
16
23
|
//# sourceMappingURL=vitest.setup.js.map
|