@appsemble/cli 0.30.14-test.3 → 0.30.14-test.4
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 -3
- package/lib/app.js +47 -52
- package/lib/config.js +5 -6
- package/lib/organization.js +1 -2
- package/lib/resource.js +2 -3
- package/lib/serverImport.js +1 -2
- package/package.json +7 -7
- package/server/options/parseQuery.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/__fixtures__/apps/test/README.md +0 -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.30.14-test.4)
|
|
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.30.14-test.
|
|
326
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.30.14-test.4/LICENSE.md) ©
|
|
327
327
|
[Appsemble](https://appsemble.com)
|
package/commands/serve.js
CHANGED
|
@@ -54,13 +54,12 @@ export function builder(yargs) {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
export async function handler(argv) {
|
|
57
|
-
var _a;
|
|
58
57
|
setArgv(argv);
|
|
59
58
|
const appPath = join(process.cwd(), argv.path);
|
|
60
59
|
const [, , , appsembleApp] = await traverseAppDirectory(appPath, 'development', new FormData());
|
|
61
60
|
const appRoles = getAppRoles(appsembleApp.definition.security);
|
|
62
61
|
const passedUserRole = argv['user-role'];
|
|
63
|
-
if (passedUserRole && !
|
|
62
|
+
if (passedUserRole && !appRoles?.includes(passedUserRole)) {
|
|
64
63
|
throw appRoles
|
|
65
64
|
? new AppsembleError(`The specified role "${passedUserRole}" is not supported by this app. Supported roles are [${appRoles}]`)
|
|
66
65
|
: new AppsembleError('This app does not support roles');
|
|
@@ -71,7 +70,7 @@ export async function handler(argv) {
|
|
|
71
70
|
name: 'dev',
|
|
72
71
|
email: 'dev@example.com',
|
|
73
72
|
email_verified: true,
|
|
74
|
-
role: passedUserRole ||
|
|
73
|
+
role: passedUserRole || appSecurity?.default?.role,
|
|
75
74
|
demo: false,
|
|
76
75
|
zoneinfo: '',
|
|
77
76
|
properties: {},
|
package/lib/app.js
CHANGED
|
@@ -64,7 +64,7 @@ export async function traverseAppDirectory(path, context, formData) {
|
|
|
64
64
|
formData.append('iconBackground', rc.iconBackground);
|
|
65
65
|
gatheredData.iconBackground = rc.iconBackground;
|
|
66
66
|
}
|
|
67
|
-
if (context && has(rc
|
|
67
|
+
if (context && has(rc?.context, context)) {
|
|
68
68
|
discoveredContext = rc.context[context];
|
|
69
69
|
logger.verbose(`Using context: ${inspect(discoveredContext, { colors: true })}`);
|
|
70
70
|
}
|
|
@@ -169,7 +169,7 @@ async function retrieveContext(path, context) {
|
|
|
169
169
|
case '.appsemblerc.yaml':
|
|
170
170
|
logger.info(`Reading app settings from ${filepath}`);
|
|
171
171
|
[rc] = await readData(filepath);
|
|
172
|
-
if (context && has(rc
|
|
172
|
+
if (context && has(rc?.context, context)) {
|
|
173
173
|
discoveredContext = rc.context[context];
|
|
174
174
|
logger.verbose(`Using context: ${inspect(discoveredContext, { colors: true })}`);
|
|
175
175
|
}
|
|
@@ -272,7 +272,6 @@ export async function deleteApp({ clientCredentials, id, remote }) {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
export async function publishSeedResources(path, app, remote) {
|
|
275
|
-
var _a, _b;
|
|
276
275
|
const resourcesPath = join(path, 'resources');
|
|
277
276
|
logger.info(`Publishing seed resources from ${resourcesPath}`);
|
|
278
277
|
if (existsSync(resourcesPath)) {
|
|
@@ -288,7 +287,7 @@ export async function publishSeedResources(path, app, remote) {
|
|
|
288
287
|
resourcesToPublish.push({
|
|
289
288
|
appId: app.id,
|
|
290
289
|
path: join(resourcesPath, resource.name),
|
|
291
|
-
definition:
|
|
290
|
+
definition: app.definition.resources?.[name],
|
|
292
291
|
type: name,
|
|
293
292
|
});
|
|
294
293
|
}
|
|
@@ -300,7 +299,7 @@ export async function publishSeedResources(path, app, remote) {
|
|
|
300
299
|
resourcesToPublish.push({
|
|
301
300
|
appId: app.id,
|
|
302
301
|
path: join(resourcesPath, resource.name, subResource.name),
|
|
303
|
-
definition:
|
|
302
|
+
definition: app.definition.resources?.[resource.name],
|
|
304
303
|
type: resource.name,
|
|
305
304
|
});
|
|
306
305
|
}
|
|
@@ -541,7 +540,6 @@ export async function publishAppConfig(path, app, remote) {
|
|
|
541
540
|
* @param format The file format that should be used for the output.
|
|
542
541
|
*/
|
|
543
542
|
export async function writeAppMessages(path, languages, verify, format) {
|
|
544
|
-
var _a, _b;
|
|
545
543
|
logger.info(`Extracting messages from ${path}`);
|
|
546
544
|
let app;
|
|
547
545
|
let i18nDir = join(path, 'i18n');
|
|
@@ -640,7 +638,7 @@ export async function writeAppMessages(path, languages, verify, format) {
|
|
|
640
638
|
newAppMessages[key] = message;
|
|
641
639
|
}
|
|
642
640
|
}
|
|
643
|
-
const coreMessages =
|
|
641
|
+
const coreMessages = oldMessages.core ?? {};
|
|
644
642
|
for (const [key, value] of Object.entries(coreMessages)) {
|
|
645
643
|
if (!value || typeof value !== 'string') {
|
|
646
644
|
throw new AppsembleError(`Invalid translation key: core.${key}`);
|
|
@@ -655,7 +653,7 @@ export async function writeAppMessages(path, languages, verify, format) {
|
|
|
655
653
|
}
|
|
656
654
|
}
|
|
657
655
|
for (const [blockName] of Object.entries(blockMessageKeys)) {
|
|
658
|
-
if (
|
|
656
|
+
if (oldMessages.blocks?.[blockName]) {
|
|
659
657
|
blockMessages[blockName] = {};
|
|
660
658
|
for (const [version, oldValues] of Object.entries(oldMessages.blocks[blockName])) {
|
|
661
659
|
if (!has(blockMessageKeys[blockName], version)) {
|
|
@@ -693,17 +691,16 @@ This block version is not used in the app`);
|
|
|
693
691
|
* @returns The resolved app ID and remote.
|
|
694
692
|
*/
|
|
695
693
|
export async function resolveAppIdAndRemote(appPath, name, defaultRemote, defaultAppId) {
|
|
696
|
-
var _a;
|
|
697
694
|
let id = defaultAppId;
|
|
698
695
|
let resolvedRemote = defaultRemote;
|
|
699
696
|
if (appPath) {
|
|
700
697
|
const rcPath = join(appPath, '.appsemblerc.yaml');
|
|
701
698
|
const [rc] = await readData(rcPath);
|
|
702
|
-
const context =
|
|
703
|
-
if (context
|
|
704
|
-
id = context
|
|
699
|
+
const context = rc.context?.[name];
|
|
700
|
+
if (context?.id) {
|
|
701
|
+
id = context?.id;
|
|
705
702
|
}
|
|
706
|
-
if (context
|
|
703
|
+
if (context?.remote) {
|
|
707
704
|
resolvedRemote = context.remote;
|
|
708
705
|
}
|
|
709
706
|
}
|
|
@@ -721,14 +718,13 @@ export async function resolveAppIdAndRemote(appPath, name, defaultRemote, defaul
|
|
|
721
718
|
* @param options The options to use for publishing an app.
|
|
722
719
|
*/
|
|
723
720
|
export async function publishApp({ clientCredentials, context, dryRun, modifyContext, path, ...options }) {
|
|
724
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
725
721
|
const file = await stat(path);
|
|
726
722
|
const formData = new FormData();
|
|
727
723
|
const appsembleContext = await retrieveContext(path, context);
|
|
728
724
|
let rc;
|
|
729
725
|
let yaml;
|
|
730
726
|
let filename = relative(process.cwd(), path);
|
|
731
|
-
const variant =
|
|
727
|
+
const variant = appsembleContext.variant ?? options.variant ?? context;
|
|
732
728
|
let appVariantPath = path;
|
|
733
729
|
if (variant && existsSync(join(path, 'variants', variant))) {
|
|
734
730
|
await applyAppVariant(path, variant);
|
|
@@ -754,20 +750,20 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
|
|
|
754
750
|
}
|
|
755
751
|
filename = join(filename, 'app-definition.yaml');
|
|
756
752
|
}
|
|
757
|
-
const remote =
|
|
758
|
-
const organizationId =
|
|
759
|
-
const template =
|
|
760
|
-
const assetsClonable =
|
|
761
|
-
const demoMode =
|
|
762
|
-
const visibility =
|
|
763
|
-
const iconBackground =
|
|
764
|
-
const icon =
|
|
765
|
-
const maskableIcon =
|
|
766
|
-
const sentryDsn =
|
|
767
|
-
const sentryEnvironment =
|
|
768
|
-
const googleAnalyticsId =
|
|
769
|
-
const assets =
|
|
770
|
-
const resources =
|
|
753
|
+
const remote = appsembleContext.remote ?? options.remote;
|
|
754
|
+
const organizationId = appsembleContext.organization ?? options.organization;
|
|
755
|
+
const template = appsembleContext.template ?? options.template ?? false;
|
|
756
|
+
const assetsClonable = appsembleContext.assetsClonable ?? options.assetsClonable ?? false;
|
|
757
|
+
const demoMode = appsembleContext.demoMode ?? options.demoMode ?? false;
|
|
758
|
+
const visibility = appsembleContext.visibility ?? options.visibility;
|
|
759
|
+
const iconBackground = appsembleContext.iconBackground ?? options.iconBackground;
|
|
760
|
+
const icon = options.icon ?? appsembleContext.icon;
|
|
761
|
+
const maskableIcon = options.maskableIcon ?? appsembleContext.maskableIcon;
|
|
762
|
+
const sentryDsn = appsembleContext.sentryDsn ?? options.sentryDsn;
|
|
763
|
+
const sentryEnvironment = appsembleContext.sentryEnvironment ?? options.sentryEnvironment;
|
|
764
|
+
const googleAnalyticsId = appsembleContext.googleAnalyticsId ?? options.googleAnalyticsId;
|
|
765
|
+
const assets = appsembleContext.assets ?? options.assets;
|
|
766
|
+
const resources = appsembleContext.resources ?? options.resources;
|
|
771
767
|
const appLock = appsembleContext.appLock || 'unlocked';
|
|
772
768
|
logger.verbose(`App remote: ${remote}`);
|
|
773
769
|
logger.verbose(`App organization: ${organizationId}`);
|
|
@@ -785,12 +781,12 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
|
|
|
785
781
|
formData.append('locked', appLock);
|
|
786
782
|
if (icon) {
|
|
787
783
|
const realIcon = typeof icon === 'string' ? createReadStream(icon) : icon;
|
|
788
|
-
logger.info(`Using icon from ${
|
|
784
|
+
logger.info(`Using icon from ${realIcon.path ?? 'stdin'}`);
|
|
789
785
|
formData.append('icon', realIcon);
|
|
790
786
|
}
|
|
791
787
|
if (maskableIcon) {
|
|
792
788
|
const realIcon = typeof maskableIcon === 'string' ? createReadStream(maskableIcon) : maskableIcon;
|
|
793
|
-
logger.info(`Using maskable icon from ${
|
|
789
|
+
logger.info(`Using maskable icon from ${realIcon.path ?? 'stdin'}`);
|
|
794
790
|
formData.append('maskableIcon', realIcon);
|
|
795
791
|
}
|
|
796
792
|
if (sentryDsn) {
|
|
@@ -823,7 +819,7 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
|
|
|
823
819
|
if (!axios.isAxiosError(error)) {
|
|
824
820
|
throw error;
|
|
825
821
|
}
|
|
826
|
-
if (
|
|
822
|
+
if (error.response?.data?.message !== 'App validation failed') {
|
|
827
823
|
throw error;
|
|
828
824
|
}
|
|
829
825
|
throw new AppsembleError(printAxiosError(filename, yaml, error.response.data.data.errors));
|
|
@@ -855,7 +851,7 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
|
|
|
855
851
|
logger.info(`Successfully published app ${data.definition.name}! 🙌`);
|
|
856
852
|
logger.info(`App URL: ${protocol}//${data.path}.${data.OrganizationId}.${host}`);
|
|
857
853
|
logger.info(`App store page: ${new URL(`/apps/${data.id}`, remote)}`);
|
|
858
|
-
const rcCollections =
|
|
854
|
+
const rcCollections = rc?.context?.[context]?.collections;
|
|
859
855
|
if (Array.isArray(rcCollections)) {
|
|
860
856
|
for (const collectionId of rcCollections) {
|
|
861
857
|
try {
|
|
@@ -883,13 +879,12 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
|
|
|
883
879
|
* @param argv The command line options used for updating the app.
|
|
884
880
|
*/
|
|
885
881
|
export async function updateApp({ clientCredentials, context, force, path, ...options }) {
|
|
886
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
887
882
|
const file = await stat(path);
|
|
888
883
|
const formData = new FormData();
|
|
889
884
|
const appsembleContext = await retrieveContext(path, context);
|
|
890
885
|
let yaml;
|
|
891
886
|
let filename = relative(process.cwd(), path);
|
|
892
|
-
const variant =
|
|
887
|
+
const variant = appsembleContext.variant ?? options.variant ?? context;
|
|
893
888
|
let appVariantPath = path;
|
|
894
889
|
if (variant && existsSync(join(path, 'variants', variant))) {
|
|
895
890
|
await applyAppVariant(path, variant);
|
|
@@ -914,20 +909,20 @@ export async function updateApp({ clientCredentials, context, force, path, ...op
|
|
|
914
909
|
}
|
|
915
910
|
filename = join(filename, 'app-definition.yaml');
|
|
916
911
|
}
|
|
917
|
-
const remote =
|
|
918
|
-
const id =
|
|
919
|
-
const template =
|
|
920
|
-
const assetsClonable =
|
|
921
|
-
const demoMode =
|
|
922
|
-
const visibility =
|
|
923
|
-
const iconBackground =
|
|
924
|
-
const icon =
|
|
925
|
-
const maskableIcon =
|
|
926
|
-
const sentryDsn =
|
|
927
|
-
const sentryEnvironment =
|
|
928
|
-
const googleAnalyticsId =
|
|
929
|
-
const resources =
|
|
930
|
-
const assets =
|
|
912
|
+
const remote = appsembleContext.remote ?? options.remote;
|
|
913
|
+
const id = appsembleContext.id ?? options.id;
|
|
914
|
+
const template = appsembleContext.template ?? options.template ?? false;
|
|
915
|
+
const assetsClonable = appsembleContext.assetsClonable ?? options.assetsClonable ?? false;
|
|
916
|
+
const demoMode = appsembleContext.demoMode ?? options.demoMode ?? false;
|
|
917
|
+
const visibility = appsembleContext.visibility ?? options.visibility;
|
|
918
|
+
const iconBackground = appsembleContext.iconBackground ?? options.iconBackground;
|
|
919
|
+
const icon = options.icon ?? appsembleContext.icon;
|
|
920
|
+
const maskableIcon = options.maskableIcon ?? appsembleContext.maskableIcon;
|
|
921
|
+
const sentryDsn = appsembleContext.sentryDsn ?? options.sentryDsn;
|
|
922
|
+
const sentryEnvironment = appsembleContext.sentryEnvironment ?? options.sentryEnvironment;
|
|
923
|
+
const googleAnalyticsId = appsembleContext.googleAnalyticsId ?? options.googleAnalyticsId;
|
|
924
|
+
const resources = appsembleContext.resources ?? options.resources;
|
|
925
|
+
const assets = appsembleContext.assets ?? options.assets;
|
|
931
926
|
const { appLock } = appsembleContext;
|
|
932
927
|
logger.info(`App id: ${id}`);
|
|
933
928
|
logger.verbose(`App remote: ${remote}`);
|
|
@@ -945,12 +940,12 @@ export async function updateApp({ clientCredentials, context, force, path, ...op
|
|
|
945
940
|
formData.append('iconBackground', iconBackground);
|
|
946
941
|
if (icon) {
|
|
947
942
|
const realIcon = typeof icon === 'string' ? createReadStream(icon) : icon;
|
|
948
|
-
logger.info(`Using icon from ${
|
|
943
|
+
logger.info(`Using icon from ${realIcon.path ?? 'stdin'}`);
|
|
949
944
|
formData.append('icon', realIcon);
|
|
950
945
|
}
|
|
951
946
|
if (maskableIcon) {
|
|
952
947
|
const realIcon = typeof maskableIcon === 'string' ? createReadStream(maskableIcon) : maskableIcon;
|
|
953
|
-
logger.info(`Using maskable icon from ${
|
|
948
|
+
logger.info(`Using maskable icon from ${realIcon.path ?? 'stdin'}`);
|
|
954
949
|
formData.append('maskableIcon', realIcon);
|
|
955
950
|
}
|
|
956
951
|
if (sentryDsn) {
|
|
@@ -992,7 +987,7 @@ export async function updateApp({ clientCredentials, context, force, path, ...op
|
|
|
992
987
|
if (!axios.isAxiosError(error)) {
|
|
993
988
|
throw error;
|
|
994
989
|
}
|
|
995
|
-
if (
|
|
990
|
+
if (error.response?.data?.message !== 'App validation failed') {
|
|
996
991
|
throw error;
|
|
997
992
|
}
|
|
998
993
|
throw new AppsembleError(printAxiosError(filename, yaml, error.response.data.data.errors));
|
package/lib/config.js
CHANGED
|
@@ -135,18 +135,17 @@ function getNodeComments(checker, node) {
|
|
|
135
135
|
* @returns A record created from the returned key/value pairs.
|
|
136
136
|
*/
|
|
137
137
|
function processInterface(iface, checker, convert) {
|
|
138
|
-
if (!
|
|
138
|
+
if (!iface?.members.length) {
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
const source = iface.getSourceFile().getText();
|
|
142
142
|
return Object.fromEntries(iface.members.map((member) => {
|
|
143
|
-
var _a;
|
|
144
143
|
const description = getNodeComments(checker, member);
|
|
145
144
|
if (ts.isIndexSignatureDeclaration(member)) {
|
|
146
145
|
// Comments aren’t properly extracted for index signatures.
|
|
147
146
|
const commentRanges = ts.getLeadingCommentRanges(source, member.pos);
|
|
148
147
|
if (commentRanges) {
|
|
149
|
-
const comments =
|
|
148
|
+
const comments = commentRanges?.map((r) => source.slice(r.pos, r.end)) ?? [];
|
|
150
149
|
const [block] = parse(comments[0]);
|
|
151
150
|
const processedDescription = block.source
|
|
152
151
|
.map((src) => src.tokens.description)
|
|
@@ -178,7 +177,7 @@ function processInterface(iface, checker, convert) {
|
|
|
178
177
|
* @returns The action manifest to upload.
|
|
179
178
|
*/
|
|
180
179
|
function processActions(iface, checker) {
|
|
181
|
-
return processInterface(iface, checker, (name, description) => [name
|
|
180
|
+
return processInterface(iface, checker, (name, description) => [name ?? '$any', { description }]);
|
|
182
181
|
}
|
|
183
182
|
/**
|
|
184
183
|
* Get an events object based on TypeScript interface nodes.
|
|
@@ -190,11 +189,11 @@ function processActions(iface, checker) {
|
|
|
190
189
|
*/
|
|
191
190
|
function processEvents(eventListenerInterface, eventEmitterInterface, checker) {
|
|
192
191
|
const listen = processInterface(eventListenerInterface, checker, (name, description) => [
|
|
193
|
-
name
|
|
192
|
+
name ?? '$any',
|
|
194
193
|
{ description },
|
|
195
194
|
]);
|
|
196
195
|
const emit = processInterface(eventEmitterInterface, checker, (name, description) => [
|
|
197
|
-
name
|
|
196
|
+
name ?? '$any',
|
|
198
197
|
{ description },
|
|
199
198
|
]);
|
|
200
199
|
return (emit || listen) && { emit, listen };
|
package/lib/organization.js
CHANGED
|
@@ -67,13 +67,12 @@ export async function updateOrganization({ description, email, icon, id, name, w
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
export async function upsertOrganization({ description, email, icon, id, name, website, }) {
|
|
70
|
-
var _a;
|
|
71
70
|
try {
|
|
72
71
|
await axios.get(`/api/organizations/${id}`);
|
|
73
72
|
await updateOrganization({ description, email, icon, id, name, website });
|
|
74
73
|
}
|
|
75
74
|
catch (error) {
|
|
76
|
-
if (axios.isAxiosError(error) &&
|
|
75
|
+
if (axios.isAxiosError(error) && error.response?.status === 404) {
|
|
77
76
|
await createOrganization({ description, email, icon, id, name, website });
|
|
78
77
|
}
|
|
79
78
|
else {
|
package/lib/resource.js
CHANGED
|
@@ -28,11 +28,10 @@ export async function publishResource({ appId, definition, path, publishedResour
|
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
30
|
const response = await axios.post(endpoint, resources.map((resource) => {
|
|
31
|
-
var _a, _b, _c;
|
|
32
31
|
const resourceWithReferences = { ...resource };
|
|
33
|
-
for (const [referencedProperty, resourceReference] of Object.entries(
|
|
32
|
+
for (const [referencedProperty, resourceReference] of Object.entries(definition?.references ?? {})) {
|
|
34
33
|
resourceWithReferences[referencedProperty] =
|
|
35
|
-
|
|
34
|
+
publishedResourcesIds[resourceReference.resource]?.[Number(resource[`$${resourceReference.resource}`] ?? -1)];
|
|
36
35
|
}
|
|
37
36
|
return resourceWithReferences;
|
|
38
37
|
}), {
|
package/lib/serverImport.js
CHANGED
|
@@ -15,7 +15,6 @@ ${PROMPT} ${COMMAND} @appsemble/server
|
|
|
15
15
|
* @returns The exported member.
|
|
16
16
|
*/
|
|
17
17
|
export async function serverImport(...members) {
|
|
18
|
-
var _a;
|
|
19
18
|
try {
|
|
20
19
|
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
21
20
|
// @ts-ignore Because the the server isn’t built and published, an error is expected here at
|
|
@@ -30,7 +29,7 @@ export async function serverImport(...members) {
|
|
|
30
29
|
}
|
|
31
30
|
catch (error) {
|
|
32
31
|
if (error.code !== 'MODULE_NOT_FOUND' ||
|
|
33
|
-
|
|
32
|
+
error.requireStack?.[0] !== __filename) {
|
|
34
33
|
throw error;
|
|
35
34
|
}
|
|
36
35
|
throw new AppsembleError(INSTALL_MESSAGE);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/cli",
|
|
3
|
-
"version": "0.30.14-test.
|
|
3
|
+
"version": "0.30.14-test.4",
|
|
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.30.14-test.
|
|
46
|
-
"@appsemble/types": "0.30.14-test.
|
|
47
|
-
"@appsemble/utils": "0.30.14-test.
|
|
45
|
+
"@appsemble/node-utils": "0.30.14-test.4",
|
|
46
|
+
"@appsemble/types": "0.30.14-test.4",
|
|
47
|
+
"@appsemble/utils": "0.30.14-test.4",
|
|
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.30.14-test.
|
|
91
|
-
"@appsemble/server": "0.30.14-test.
|
|
90
|
+
"@appsemble/types": "0.30.14-test.4",
|
|
91
|
+
"@appsemble/server": "0.30.14-test.4",
|
|
92
92
|
"bcrypt": "^5.0.0",
|
|
93
93
|
"axios-test-instance": "^7.0.0",
|
|
94
94
|
"@types/concat-stream": "^2.0.0",
|
|
@@ -105,6 +105,6 @@
|
|
|
105
105
|
"keytar": "^7.0.0"
|
|
106
106
|
},
|
|
107
107
|
"engines": {
|
|
108
|
-
"node": ">=
|
|
108
|
+
"node": ">=20"
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -75,7 +75,7 @@ function parseOdataOrder(query) {
|
|
|
75
75
|
}
|
|
76
76
|
return query.split(/,/g).map((line) => {
|
|
77
77
|
const [name, direction] = line.split(' ');
|
|
78
|
-
return [renameOData(name), direction
|
|
78
|
+
return [renameOData(name), direction?.toUpperCase()];
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
export function parseQuery({ $filter, $orderby }) {
|
|
@@ -6,7 +6,7 @@ pages:
|
|
|
6
6
|
- name: Example Page A
|
|
7
7
|
blocks:
|
|
8
8
|
- type: action-button
|
|
9
|
-
version: 0.30.14-test.
|
|
9
|
+
version: 0.30.14-test.4
|
|
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.30.14-test.
|
|
20
|
+
version: 0.30.14-test.4
|
|
21
21
|
parameters:
|
|
22
22
|
icon: arrow-left
|
|
23
23
|
actions:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Test App
|