@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 +3 -3
- package/commands/serve.js +2 -1
- package/lib/app.js +2 -1
- package/lib/asset.js +1 -1
- package/lib/config.js +1 -1
- package/lib/group.d.ts +1 -1
- package/lib/project.js +2 -1
- package/lib/resource.d.ts +1 -1
- package/lib/resource.js +2 -1
- package/package.json +7 -6
- package/server/options/getAppBlockStyles.js +1 -1
- package/server/options/getBlockAsset.js +1 -1
- package/server/options/getBlockAssetsPaths.js +1 -1
- 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.33.7)
|
|
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.33.
|
|
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
|
|
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
|
|
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
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
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
|
-
|
|
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.
|
|
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.
|
|
48
|
-
"@appsemble/types": "0.33.
|
|
49
|
-
"@appsemble/
|
|
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.
|
|
93
|
-
"@appsemble/server": "0.33.
|
|
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/
|
|
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, }) {
|
|
@@ -6,7 +6,7 @@ pages:
|
|
|
6
6
|
- name: Example Page A
|
|
7
7
|
blocks:
|
|
8
8
|
- type: action-button
|
|
9
|
-
version: 0.33.
|
|
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.
|
|
20
|
+
version: 0.33.7
|
|
21
21
|
parameters:
|
|
22
22
|
icon: arrow-left
|
|
23
23
|
actions:
|