@appsemble/cli 0.28.12 → 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 CHANGED
@@ -1,9 +1,9 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.28.12/config/assets/logo.svg) Appsemble CLI
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.29.1/config/assets/logo.svg) Appsemble CLI
2
2
 
3
3
  > Manage apps and blocks from the command line.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@appsemble/cli)](https://www.npmjs.com/package/@appsemble/cli)
6
- [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.28.12/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.28.12)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.29.1/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.29.1)
7
7
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](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.28.12/LICENSE.md) ©
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)
@@ -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.28.12",
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.28.12",
46
- "@appsemble/types": "0.28.12",
47
- "@appsemble/utils": "0.28.12",
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.28.12",
91
- "@appsemble/server": "0.28.12",
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.28.12
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.28.12
20
+ version: 0.29.1
21
21
  parameters:
22
22
  icon: arrow-left
23
23
  actions:
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@appsemble/sdk": "0.28.12",
5
+ "@appsemble/sdk": "0.29.1",
6
6
  "mini-jsx": "^4.0.0"
7
7
  }
8
8
  }
@@ -2,8 +2,8 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@appsemble/preact": "0.28.12",
6
- "@appsemble/sdk": "0.28.12",
5
+ "@appsemble/preact": "0.29.1",
6
+ "@appsemble/sdk": "0.29.1",
7
7
  "preact": "^10.0.0"
8
8
  }
9
9
  }
@@ -2,6 +2,6 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@appsemble/sdk": "0.28.12"
5
+ "@appsemble/sdk": "0.29.1"
6
6
  }
7
7
  }