@appsemble/cli 0.28.13 → 0.29.1
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/commands/checkDownMigrations.d.ts +6 -0
- package/commands/checkDownMigrations.js +12 -0
- package/commands/checkMigrations.d.ts +6 -0
- package/commands/checkMigrations.js +12 -0
- package/commands/fuzzMigrations.d.ts +6 -0
- package/commands/fuzzMigrations.js +12 -0
- package/index.js +6 -0
- package/lib/serverImport.d.ts +1 -1
- package/lib/team.test.js +5 -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.29.1)
|
|
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.
|
|
326
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.29.1/LICENSE.md) ©
|
|
327
327
|
[Appsemble](https://appsemble.com)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Argv } from 'yargs';
|
|
2
|
+
import { type BaseArguments } from '../types.js';
|
|
3
|
+
export declare const command = "check-down-migrations";
|
|
4
|
+
export declare const description = "Checks that the down migrations are defined correctly and match when migrating up to the previous migration";
|
|
5
|
+
export declare function builder(yargs: Argv): Argv;
|
|
6
|
+
export declare function handler(argv: BaseArguments): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { serverImport } from '../lib/serverImport.js';
|
|
2
|
+
export const command = 'check-down-migrations';
|
|
3
|
+
export const description = 'Checks that the down migrations are defined correctly and match when migrating up to the previous migration';
|
|
4
|
+
export function builder(yargs) {
|
|
5
|
+
return yargs;
|
|
6
|
+
}
|
|
7
|
+
export async function handler(argv) {
|
|
8
|
+
const { checkDownMigrations, setArgv } = await serverImport('setArgv', 'checkDownMigrations');
|
|
9
|
+
setArgv(argv);
|
|
10
|
+
return checkDownMigrations();
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=checkDownMigrations.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Argv } from 'yargs';
|
|
2
|
+
import { type BaseArguments } from '../types.js';
|
|
3
|
+
export declare const command = "check-migrations";
|
|
4
|
+
export declare const description = "Checks that migrations are defined correctly and match what is defined by models";
|
|
5
|
+
export declare function builder(yargs: Argv): Argv;
|
|
6
|
+
export declare function handler(argv: BaseArguments): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { serverImport } from '../lib/serverImport.js';
|
|
2
|
+
export const command = 'check-migrations';
|
|
3
|
+
export const description = 'Checks that migrations are defined correctly and match what is defined by models';
|
|
4
|
+
export function builder(yargs) {
|
|
5
|
+
return yargs;
|
|
6
|
+
}
|
|
7
|
+
export async function handler(argv) {
|
|
8
|
+
const { checkMigrations, setArgv } = await serverImport('setArgv', 'checkMigrations');
|
|
9
|
+
setArgv(argv);
|
|
10
|
+
return checkMigrations();
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=checkMigrations.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Argv } from 'yargs';
|
|
2
|
+
import { type BaseArguments } from '../types.js';
|
|
3
|
+
export declare const command = "fuzz-migrations";
|
|
4
|
+
export declare const description = "Fuzz migrations to find inconcistencies";
|
|
5
|
+
export declare function builder(yargs: Argv): Argv;
|
|
6
|
+
export declare function handler(argv: BaseArguments): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { serverImport } from '../lib/serverImport.js';
|
|
2
|
+
export const command = 'fuzz-migrations';
|
|
3
|
+
export const description = 'Fuzz migrations to find inconcistencies';
|
|
4
|
+
export function builder(yargs) {
|
|
5
|
+
return yargs;
|
|
6
|
+
}
|
|
7
|
+
export async function handler(argv) {
|
|
8
|
+
const { fuzzMigrations, setArgv } = await serverImport('setArgv', 'fuzzMigrations');
|
|
9
|
+
setArgv(argv);
|
|
10
|
+
return fuzzMigrations();
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=fuzzMigrations.js.map
|
package/index.js
CHANGED
|
@@ -6,9 +6,12 @@ import yargs from 'yargs';
|
|
|
6
6
|
import * as app from './commands/app/index.js';
|
|
7
7
|
import * as asset from './commands/asset/index.js';
|
|
8
8
|
import * as block from './commands/block/index.js';
|
|
9
|
+
import * as checkDownMigrations from './commands/checkDownMigrations.js';
|
|
10
|
+
import * as checkMigrations from './commands/checkMigrations.js';
|
|
9
11
|
import * as cleanupDemoUsers from './commands/cleanupDemoUsers.js';
|
|
10
12
|
import * as cleanupResourcesAndAssets from './commands/cleanupResourcesAndAssets.js';
|
|
11
13
|
import * as config from './commands/config/index.js';
|
|
14
|
+
import * as fuzzMigrations from './commands/fuzzMigrations.js';
|
|
12
15
|
import * as login from './commands/login.js';
|
|
13
16
|
import * as logout from './commands/logout.js';
|
|
14
17
|
import * as migrate from './commands/migrate.js';
|
|
@@ -49,6 +52,9 @@ let parser = yargs(process.argv.slice(2))
|
|
|
49
52
|
.command(block)
|
|
50
53
|
.command(cleanupResourcesAndAssets)
|
|
51
54
|
.command(cleanupDemoUsers)
|
|
55
|
+
.command(checkMigrations)
|
|
56
|
+
.command(checkDownMigrations)
|
|
57
|
+
.command(fuzzMigrations)
|
|
52
58
|
.command(config)
|
|
53
59
|
.command(login)
|
|
54
60
|
.command(logout)
|
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 'cleanupDemoUsers' | 'cleanupResourcesAndAssets' | 'migrate' | 'runCronJobs' | 'setArgv' | 'start'>(...members: T[]): Promise<Record<T, any>>;
|
|
7
|
+
export declare function serverImport<T extends 'checkDownMigrations' | 'checkMigrations' | 'cleanupDemoUsers' | 'cleanupResourcesAndAssets' | 'fuzzMigrations' | 'migrate' | 'runCronJobs' | 'setArgv' | 'start'>(...members: T[]): Promise<Record<T, any>>;
|
package/lib/team.test.js
CHANGED
|
@@ -332,6 +332,7 @@ describe('inviteMember', () => {
|
|
|
332
332
|
name: 'test',
|
|
333
333
|
});
|
|
334
334
|
await AppMember.create({
|
|
335
|
+
email: user.primaryEmail,
|
|
335
336
|
AppId: app.id,
|
|
336
337
|
UserId: user.id,
|
|
337
338
|
role: 'Manager',
|
|
@@ -451,6 +452,7 @@ describe('updateMember', () => {
|
|
|
451
452
|
name: 'test',
|
|
452
453
|
});
|
|
453
454
|
const member = await AppMember.create({
|
|
455
|
+
email: user.primaryEmail,
|
|
454
456
|
AppId: app.id,
|
|
455
457
|
UserId: user.id,
|
|
456
458
|
role: 'Manager',
|
|
@@ -501,6 +503,7 @@ describe('updateMember', () => {
|
|
|
501
503
|
name: 'test',
|
|
502
504
|
});
|
|
503
505
|
await AppMember.create({
|
|
506
|
+
email: user.primaryEmail,
|
|
504
507
|
AppId: app.id,
|
|
505
508
|
UserId: user.id,
|
|
506
509
|
role: 'Manager',
|
|
@@ -546,6 +549,7 @@ describe('deleteMember', () => {
|
|
|
546
549
|
name: 'test',
|
|
547
550
|
});
|
|
548
551
|
const member = await AppMember.create({
|
|
552
|
+
email: user.primaryEmail,
|
|
549
553
|
AppId: app.id,
|
|
550
554
|
UserId: user.id,
|
|
551
555
|
role: 'Manager',
|
|
@@ -594,6 +598,7 @@ describe('deleteMember', () => {
|
|
|
594
598
|
name: 'test',
|
|
595
599
|
});
|
|
596
600
|
await AppMember.create({
|
|
601
|
+
email: user.primaryEmail,
|
|
597
602
|
AppId: app.id,
|
|
598
603
|
UserId: user.id,
|
|
599
604
|
role: 'Manager',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
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.
|
|
46
|
-
"@appsemble/types": "0.
|
|
47
|
-
"@appsemble/utils": "0.
|
|
45
|
+
"@appsemble/node-utils": "0.29.1",
|
|
46
|
+
"@appsemble/types": "0.29.1",
|
|
47
|
+
"@appsemble/utils": "0.29.1",
|
|
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.
|
|
91
|
-
"@appsemble/server": "0.
|
|
90
|
+
"@appsemble/types": "0.29.1",
|
|
91
|
+
"@appsemble/server": "0.29.1",
|
|
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.
|
|
9
|
+
version: 0.29.1
|
|
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.
|
|
20
|
+
version: 0.29.1
|
|
21
21
|
parameters:
|
|
22
22
|
icon: arrow-left
|
|
23
23
|
actions:
|