@appsemble/cli 0.33.4 → 0.33.7

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.33.4/config/assets/logo.svg) Appsemble CLI
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.33.7/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.33.4/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.33.4)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.33.7/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.33.7)
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.33.4/LICENSE.md) ©
326
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.33.7/LICENSE.md) ©
327
327
  [Appsemble](https://appsemble.com)
package/commands/serve.js CHANGED
@@ -3,8 +3,9 @@ import { mkdir, readFile } from 'node:fs/promises';
3
3
  import http from 'node:http';
4
4
  import { basename, extname, join, parse } from 'node:path';
5
5
  import { Readable } from 'node:stream';
6
+ import { getAppBlocks, getAppRoles, normalize, parseBlockName, } from '@appsemble/lang-sdk';
6
7
  import { AppsembleError, logger, opendirSafe, readData, writeData, } from '@appsemble/node-utils';
7
- import { asciiLogo, getAppBlocks, getAppRoles, normalize, parseBlockName, } from '@appsemble/utils';
8
+ import { asciiLogo } from '@appsemble/utils';
8
9
  import axios from 'axios';
9
10
  import csvToJson from 'csvtojson';
10
11
  import FormData from 'form-data';
package/lib/app.js CHANGED
@@ -2,8 +2,9 @@ import { cpSync, createReadStream, createWriteStream, existsSync } from 'node:fs
2
2
  import { mkdir, readdir, rm, stat } from 'node:fs/promises';
3
3
  import { basename, dirname, join, parse, relative, resolve } from 'node:path';
4
4
  import { inspect } from 'node:util';
5
+ import { normalizeBlockName } from '@appsemble/lang-sdk';
5
6
  import { applyAppVariant, AppsembleError, authenticate, logger, opendirSafe, readData, writeData, } from '@appsemble/node-utils';
6
- import { extractAppMessages, has, normalizeBlockName } from '@appsemble/utils';
7
+ import { extractAppMessages, has } from '@appsemble/utils';
7
8
  import axios from 'axios';
8
9
  import fg from 'fast-glob';
9
10
  import FormData from 'form-data';
package/lib/asset.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createReadStream } from 'node:fs';
2
+ import { normalize } from '@appsemble/lang-sdk';
2
3
  import { logger } from '@appsemble/node-utils';
3
- import { normalize } from '@appsemble/utils';
4
4
  import axios from 'axios';
5
5
  import FormData from 'form-data';
6
6
  export async function publishAsset({ appId, clonable, name, path, remote, seed, }) {
package/lib/config.js CHANGED
@@ -2,8 +2,8 @@ import { existsSync } from 'node:fs';
2
2
  import { readFile, stat } from 'node:fs/promises';
3
3
  import { dirname, join, relative } from 'node:path';
4
4
  import { inspect } from 'node:util';
5
+ import { prefixBlockURL } from '@appsemble/lang-sdk';
5
6
  import { AppsembleError, getWorkspaces, logger, readData } from '@appsemble/node-utils';
6
- import { prefixBlockURL } from '@appsemble/utils';
7
7
  import chalk from 'chalk';
8
8
  import { parse } from 'comment-parser';
9
9
  import { cosmiconfig } from 'cosmiconfig';
package/lib/group.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type AppRole } from '@appsemble/types';
1
+ import { type AppRole } from '@appsemble/lang-sdk';
2
2
  interface SharedGroupParams {
3
3
  /**
4
4
  * The ID of the app to create the group for.
package/lib/project.js CHANGED
@@ -40,7 +40,7 @@ export async function makeProjectPayload(buildConfig) {
40
40
  const distPath = output ? resolvePath(dir, output) : undefined;
41
41
  const form = new FormData();
42
42
  const gatheredData = {};
43
- const { description, layout, longDescription, name, version, visibility } = buildConfig;
43
+ const { description, layout, longDescription, name, version, visibility, wildcardActions } = buildConfig;
44
44
  const { actions, events, messages, parameters } = getProjectImplementations(buildConfig);
45
45
  const files = await readdir(dir);
46
46
  const icon = files.find((entry) => entry.match(/^icon\.(png|svg)$/));
@@ -66,6 +66,7 @@ export async function makeProjectPayload(buildConfig) {
66
66
  append('name', name);
67
67
  append('parameters', parameters);
68
68
  append('version', version);
69
+ append('wildcardActions', wildcardActions);
69
70
  if (icon) {
70
71
  const iconPath = join(dir, icon);
71
72
  logger.info(`Using icon: ${iconPath}`);
package/lib/resource.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ResourceDefinition } from '@appsemble/types';
1
+ import { type ResourceDefinition } from '@appsemble/lang-sdk';
2
2
  interface UpdateResourceParams {
3
3
  /**
4
4
  * The name of the resource that a new entry is being created of.
package/lib/resource.js CHANGED
@@ -31,7 +31,8 @@ export async function publishResource({ appId, definition, path, publishedResour
31
31
  const resourceWithReferences = { ...resource };
32
32
  for (const [referencedProperty, resourceReference] of Object.entries(definition?.references ?? {})) {
33
33
  resourceWithReferences[referencedProperty] =
34
- publishedResourcesIds[resourceReference.resource]?.[Number(resource[`$${resourceReference.resource}`] ?? -1)];
34
+ resourceWithReferences[referencedProperty] ||
35
+ publishedResourcesIds[resourceReference.resource]?.[Number(resource[`$${resourceReference.resource}`] ?? -1)];
35
36
  }
36
37
  return resourceWithReferences;
37
38
  }), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/cli",
3
- "version": "0.33.4",
3
+ "version": "0.33.7",
4
4
  "description": "The CLI for developing with Appsemble apps and blocks",
5
5
  "keywords": [
6
6
  "app",
@@ -44,9 +44,10 @@
44
44
  "test": "vitest"
45
45
  },
46
46
  "dependencies": {
47
- "@appsemble/node-utils": "0.33.4",
48
- "@appsemble/types": "0.33.4",
49
- "@appsemble/utils": "0.33.4",
47
+ "@appsemble/node-utils": "0.33.7",
48
+ "@appsemble/types": "0.33.7",
49
+ "@appsemble/lang-sdk": "0.33.7",
50
+ "@appsemble/utils": "0.33.7",
50
51
  "@fortawesome/fontawesome-common-types": "^6.0.0",
51
52
  "@koa/cors": "^5.0.0",
52
53
  "@odata/parser": "^0.2.0",
@@ -89,8 +90,8 @@
89
90
  "yargs": "^17.0.0"
90
91
  },
91
92
  "devDependencies": {
92
- "@appsemble/types": "0.33.4",
93
- "@appsemble/server": "0.33.4",
93
+ "@appsemble/types": "0.33.7",
94
+ "@appsemble/server": "0.33.7",
94
95
  "bcrypt": "5.1.1",
95
96
  "axios-test-instance": "7.0.0",
96
97
  "@types/concat-stream": "2.0.3",
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
+ import { parseBlockName } from '@appsemble/lang-sdk';
3
4
  import { opendirSafe, } from '@appsemble/node-utils';
4
- import { parseBlockName } from '@appsemble/utils';
5
5
  import { processCss } from '../../lib/processCss.js';
6
6
  export async function getAppBlockStyles({ context, name, }) {
7
7
  const { appPath } = context;
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { readFile } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import { parseBlockName } from '@appsemble/utils';
4
+ import { parseBlockName } from '@appsemble/lang-sdk';
5
5
  import globalCacheDir from 'global-cache-dir';
6
6
  import { lookup } from 'mime-types';
7
7
  export async function getBlockAsset({ context, filename, name, version, }) {
@@ -1,4 +1,4 @@
1
- import { prefixBlockURL } from '@appsemble/utils';
1
+ import { prefixBlockURL } from '@appsemble/lang-sdk';
2
2
  export function getBlocksAssetsPaths({ context }) {
3
3
  const { appBlocks } = context;
4
4
  return Promise.resolve(appBlocks.flatMap((block) => block.files
@@ -6,7 +6,7 @@ pages:
6
6
  - name: Example Page A
7
7
  blocks:
8
8
  - type: action-button
9
- version: 0.33.4
9
+ version: 0.33.7
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.33.4
20
+ version: 0.33.7
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.33.4",
8
+ "@appsemble/sdk": "0.33.7",
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.33.4",
9
- "@appsemble/sdk": "0.33.4",
8
+ "@appsemble/preact": "0.33.7",
9
+ "@appsemble/sdk": "0.33.7",
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.33.4"
8
+ "@appsemble/sdk": "0.33.7"
9
9
  }
10
10
  }