@appsemble/cli 0.39.1 → 0.40.0

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.39.1/config/assets/logo.svg) Appsemble CLI
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.40.0/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.39.1/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.39.1)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.40.0/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.40.0)
7
7
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
8
8
 
9
9
  ## Table of Contents
@@ -342,5 +342,5 @@ appsemble run-cronjobs --interval 30
342
342
 
343
343
  ## License
344
344
 
345
- [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.39.1/LICENSE.md) ©
345
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.40.0/LICENSE.md) ©
346
346
  [Appsemble](https://appsemble.com)
package/lib/app.js CHANGED
@@ -4,6 +4,7 @@ import { basename, dirname, join, parse, relative, resolve } from 'node:path';
4
4
  import { inspect } from 'node:util';
5
5
  import { normalizeBlockName } from '@appsemble/lang-sdk';
6
6
  import { applyAppVariant, AppsembleError, authenticate, logger, opendirSafe, preProcessCSV, readData, writeData, } from '@appsemble/node-utils';
7
+ import { APP_VALIDATION_FAILED, } from '@appsemble/types';
7
8
  import { extractAppMessages, has, normalizeLocale } from '@appsemble/utils';
8
9
  import axios from 'axios';
9
10
  import csv from 'csvtojson';
@@ -916,7 +917,7 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
916
917
  if (!axios.isAxiosError(error)) {
917
918
  throw error;
918
919
  }
919
- if (error.response?.data?.message !== 'App validation failed') {
920
+ if (error.response?.data?.data?.code !== APP_VALIDATION_FAILED) {
920
921
  throw error;
921
922
  }
922
923
  throw new AppsembleError(printAxiosError(filename, yaml, (error.response?.data).data.errors));
@@ -1145,7 +1146,7 @@ export async function updateApp({ clientCredentials, context, force, path, ...op
1145
1146
  if (!axios.isAxiosError(error)) {
1146
1147
  throw error;
1147
1148
  }
1148
- if (error.response?.data?.message !== 'App validation failed') {
1149
+ if (error.response?.data?.data?.code !== APP_VALIDATION_FAILED) {
1149
1150
  throw error;
1150
1151
  }
1151
1152
  throw new AppsembleError(printAxiosError(filename, yaml, (error.response?.data).data.errors));
package/lib/config.js CHANGED
@@ -240,6 +240,11 @@ function processParameters(program, iface) {
240
240
  getDefinition: () => ({ type: 'string', format: 'fontawesome' }),
241
241
  getChildren: () => [],
242
242
  });
243
+ fmt.addTypeFormatter({
244
+ supportsType: (type) => type.getName() === 'IconReference',
245
+ getDefinition: () => ({ type: 'string', format: 'icon' }),
246
+ getChildren: () => [],
247
+ });
243
248
  fmt.addTypeFormatter({
244
249
  supportsType: (type) => type.getName() === 'Remapper',
245
250
  getDefinition: () => ({ format: 'remapper' }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/cli",
3
- "version": "0.39.1",
3
+ "version": "0.40.0",
4
4
  "description": "The CLI for developing with Appsemble apps and blocks",
5
5
  "keywords": [
6
6
  "app",
@@ -44,10 +44,10 @@
44
44
  "test": "vitest"
45
45
  },
46
46
  "dependencies": {
47
- "@appsemble/node-utils": "0.39.1",
48
- "@appsemble/types": "0.39.1",
49
- "@appsemble/lang-sdk": "0.39.1",
50
- "@appsemble/utils": "0.39.1",
47
+ "@appsemble/node-utils": "0.40.0",
48
+ "@appsemble/types": "0.40.0",
49
+ "@appsemble/lang-sdk": "0.40.0",
50
+ "@appsemble/utils": "0.40.0",
51
51
  "@fortawesome/fontawesome-common-types": "^6.0.0",
52
52
  "@inquirer/prompts": "^8.0.0",
53
53
  "@koa/cors": "^5.0.0",
@@ -90,8 +90,8 @@
90
90
  "yargs": "^17.0.0"
91
91
  },
92
92
  "devDependencies": {
93
- "@appsemble/types": "0.39.1",
94
- "@appsemble/server": "0.39.1",
93
+ "@appsemble/types": "0.40.0",
94
+ "@appsemble/server": "0.40.0",
95
95
  "@types/concat-stream": "2.0.3",
96
96
  "@types/koa__cors": "5.0.1",
97
97
  "@types/koa-compress": "4.0.7",
@@ -26,6 +26,9 @@ export async function createSettings({ context, host, languages, }) {
26
26
  logins: [],
27
27
  development: true,
28
28
  supportedLanguages: ['en'],
29
+ // Locally served apps have no app record backing them, so two factor authentication can never
30
+ // be set up for them.
31
+ totp: 'disabled',
29
32
  });
30
33
  }
31
34
  //# sourceMappingURL=createSettings.js.map
@@ -6,7 +6,7 @@ pages:
6
6
  - name: Example Page A
7
7
  blocks:
8
8
  - type: action-button
9
- version: 0.39.1
9
+ version: 0.40.0
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.39.1
20
+ version: 0.40.0
21
21
  parameters:
22
22
  icon: arrow-left
23
23
  actions:
@@ -5,7 +5,7 @@
5
5
  "*.css"
6
6
  ],
7
7
  "dependencies": {
8
- "@appsemble/sdk": "0.39.1",
8
+ "@appsemble/sdk": "0.40.0",
9
9
  "mini-jsx": "^4.0.0"
10
10
  }
11
11
  }
@@ -5,8 +5,8 @@
5
5
  "*.css"
6
6
  ],
7
7
  "dependencies": {
8
- "@appsemble/preact": "0.39.1",
9
- "@appsemble/sdk": "0.39.1",
8
+ "@appsemble/preact": "0.40.0",
9
+ "@appsemble/sdk": "0.40.0",
10
10
  "preact": "^10.0.0"
11
11
  }
12
12
  }
@@ -5,6 +5,6 @@
5
5
  "*.css"
6
6
  ],
7
7
  "dependencies": {
8
- "@appsemble/sdk": "0.39.1"
8
+ "@appsemble/sdk": "0.40.0"
9
9
  }
10
10
  }
package/vitest.setup.js CHANGED
@@ -11,8 +11,8 @@ beforeAll(async () => {
11
11
  [testDB] = await setupTestDatabase(randomUUID());
12
12
  await testDB.sync();
13
13
  await initS3Client({
14
- accessKey: 'admin',
15
- secretKey: 'password',
14
+ accessKey: process.env.S3_ACCESS_KEY || 'admin',
15
+ secretKey: process.env.S3_SECRET_KEY || 'password',
16
16
  endPoint: process.env.S3_HOST || 'localhost',
17
17
  port: Number(process.env.S3_PORT) || 9009,
18
18
  useSSL: false,