@appsemble/cli 0.35.11-test.4 → 0.35.15
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/app/publish.d.ts +1 -0
- package/commands/app/publish.js +3 -0
- package/commands/app/update.d.ts +1 -0
- package/commands/app/update.js +3 -0
- package/commands/backupProductionData.d.ts +6 -0
- package/commands/backupProductionData.js +40 -0
- package/commands/organization/create.d.ts +1 -3
- package/commands/organization/create.js +1 -5
- package/commands/organization/update.d.ts +1 -3
- package/commands/organization/update.js +1 -5
- package/commands/organization/upsert.d.ts +1 -3
- package/commands/organization/upsert.js +1 -5
- package/commands/restoreDataFromBackup.d.ts +6 -0
- package/commands/restoreDataFromBackup.js +45 -0
- package/index.js +4 -0
- package/lib/app.d.ts +20 -0
- package/lib/app.js +21 -0
- package/lib/organization.d.ts +3 -5
- package/lib/organization.js +3 -13
- package/lib/serverImport.d.ts +1 -1
- package/package.json +9 -9
- package/server/options/createSettings.js +1 -0
- 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.35.15)
|
|
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.35.
|
|
326
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.35.15/LICENSE.md) ©
|
|
327
327
|
[Appsemble](https://appsemble.com)
|
package/commands/app/publish.js
CHANGED
|
@@ -76,6 +76,9 @@ export function builder(yargs) {
|
|
|
76
76
|
})
|
|
77
77
|
.option('meta-pixel-id', {
|
|
78
78
|
describe: 'The ID for Meta Pixel for the app.',
|
|
79
|
+
})
|
|
80
|
+
.option('ms-clarity-id', {
|
|
81
|
+
describe: 'The ID for MS Clarity for the app.',
|
|
79
82
|
})
|
|
80
83
|
.option('sentry-dsn', {
|
|
81
84
|
describe: 'The custom Sentry DSN for the app.',
|
package/commands/app/update.d.ts
CHANGED
package/commands/app/update.js
CHANGED
|
@@ -76,6 +76,9 @@ export function builder(yargs) {
|
|
|
76
76
|
})
|
|
77
77
|
.option('meta-pixel-id', {
|
|
78
78
|
describe: 'The ID for Meta Pixel for the app.',
|
|
79
|
+
})
|
|
80
|
+
.option('ms-clarity-id', {
|
|
81
|
+
describe: 'The ID for MS Clarity for the app.',
|
|
79
82
|
})
|
|
80
83
|
.option('sentry-dsn', {
|
|
81
84
|
describe: 'The custom Sentry DSN for the app.',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Argv } from 'yargs';
|
|
2
|
+
import { type BaseArguments } from '../types.js';
|
|
3
|
+
export declare const command = "backup-production-data";
|
|
4
|
+
export declare const description = "Backs up data from the main database and app databases.";
|
|
5
|
+
export declare function builder(yargs: Argv): Argv<any>;
|
|
6
|
+
export declare function handler(argv: BaseArguments): Promise<void>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { serverImport } from '../lib/serverImport.js';
|
|
2
|
+
export const command = 'backup-production-data';
|
|
3
|
+
export const description = 'Backs up data from the main database and app databases.';
|
|
4
|
+
export function builder(yargs) {
|
|
5
|
+
return yargs
|
|
6
|
+
.option('database-host', {
|
|
7
|
+
desc: 'The host of the database to connect to. This defaults to the connected database container.',
|
|
8
|
+
})
|
|
9
|
+
.option('database-port', {
|
|
10
|
+
desc: 'The port of the database to connect to.',
|
|
11
|
+
type: 'number',
|
|
12
|
+
default: 5432,
|
|
13
|
+
})
|
|
14
|
+
.option('database-ssl', {
|
|
15
|
+
desc: 'Use SSL to connect to the database.',
|
|
16
|
+
type: 'boolean',
|
|
17
|
+
})
|
|
18
|
+
.option('database-name', {
|
|
19
|
+
desc: 'The name of the database to connect to.',
|
|
20
|
+
implies: ['database-user', 'database-password'],
|
|
21
|
+
})
|
|
22
|
+
.option('database-user', {
|
|
23
|
+
desc: 'The user to use to login to the database.',
|
|
24
|
+
implies: ['database-name', 'database-password'],
|
|
25
|
+
})
|
|
26
|
+
.option('database-password', {
|
|
27
|
+
desc: 'The password to use to login to the database.',
|
|
28
|
+
implies: ['database-name', 'database-user'],
|
|
29
|
+
})
|
|
30
|
+
.option('database-url', {
|
|
31
|
+
desc: 'A connection string for the database to connect to. This is an alternative to the separate database related variables.',
|
|
32
|
+
conflicts: ['database-host', 'database-name', 'database-user', 'database-password'],
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export async function handler(argv) {
|
|
36
|
+
const { backupProductionData, setArgv } = await serverImport('setArgv', 'backupProductionData');
|
|
37
|
+
setArgv(argv);
|
|
38
|
+
return backupProductionData();
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=backupProductionData.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ReadStream } from 'node:fs';
|
|
2
|
-
import { type PaymentProvider } from '@appsemble/types';
|
|
3
2
|
import { type Argv } from 'yargs';
|
|
4
3
|
import { type BaseArguments } from '../../types.js';
|
|
5
4
|
interface CreateOrganizationArguments extends BaseArguments {
|
|
@@ -9,7 +8,6 @@ interface CreateOrganizationArguments extends BaseArguments {
|
|
|
9
8
|
name: string;
|
|
10
9
|
website: string;
|
|
11
10
|
icon: ReadStream;
|
|
12
|
-
preferredPaymentProvider: PaymentProvider;
|
|
13
11
|
vatIdNumber: string;
|
|
14
12
|
streetName: string;
|
|
15
13
|
houseNumber: string;
|
|
@@ -21,5 +19,5 @@ interface CreateOrganizationArguments extends BaseArguments {
|
|
|
21
19
|
export declare const command = "create <id>";
|
|
22
20
|
export declare const description = "Register a new organization. You will be the owner of the new organization.";
|
|
23
21
|
export declare function builder(yargs: Argv): Argv<any>;
|
|
24
|
-
export declare function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name,
|
|
22
|
+
export declare function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name, remote, streetName, vatIdNumber, website, zipCode, }: CreateOrganizationArguments): Promise<void>;
|
|
25
23
|
export {};
|
|
@@ -23,9 +23,6 @@ export function builder(yargs) {
|
|
|
23
23
|
.option('icon', {
|
|
24
24
|
describe: 'The file location of the icon representing the organization.',
|
|
25
25
|
coerce: coerceFile,
|
|
26
|
-
})
|
|
27
|
-
.option('preferredPaymentProvider', {
|
|
28
|
-
describe: 'The preferred payment provider of the organization.',
|
|
29
26
|
})
|
|
30
27
|
.option('vatIdNumber', {
|
|
31
28
|
describe: 'The VAT id number of the organization.',
|
|
@@ -49,7 +46,7 @@ export function builder(yargs) {
|
|
|
49
46
|
describe: 'Optional reference the organization can set to appear on the invoice.',
|
|
50
47
|
});
|
|
51
48
|
}
|
|
52
|
-
export async function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name,
|
|
49
|
+
export async function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name, remote, streetName, vatIdNumber, website, zipCode, }) {
|
|
53
50
|
await authenticate(remote, 'organizations:write', clientCredentials);
|
|
54
51
|
await createOrganization({
|
|
55
52
|
description: desc,
|
|
@@ -58,7 +55,6 @@ export async function handler({ city, clientCredentials, countryCode, descriptio
|
|
|
58
55
|
icon,
|
|
59
56
|
id,
|
|
60
57
|
name,
|
|
61
|
-
preferredPaymentProvider,
|
|
62
58
|
website,
|
|
63
59
|
streetName,
|
|
64
60
|
houseNumber,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ReadStream } from 'node:fs';
|
|
2
|
-
import { type PaymentProvider } from '@appsemble/types';
|
|
3
2
|
import { type Argv } from 'yargs';
|
|
4
3
|
import { type BaseArguments } from '../../types.js';
|
|
5
4
|
interface UpdateOrganizationArguments extends BaseArguments {
|
|
@@ -9,7 +8,6 @@ interface UpdateOrganizationArguments extends BaseArguments {
|
|
|
9
8
|
icon: ReadStream;
|
|
10
9
|
name: string;
|
|
11
10
|
website: string;
|
|
12
|
-
preferredPaymentProvider: PaymentProvider;
|
|
13
11
|
vatIdNumber: string;
|
|
14
12
|
streetName: string;
|
|
15
13
|
houseNumber: string;
|
|
@@ -21,5 +19,5 @@ interface UpdateOrganizationArguments extends BaseArguments {
|
|
|
21
19
|
export declare const command = "update <id>";
|
|
22
20
|
export declare const description = "Update an existing organization. You must be an owner of the organization.";
|
|
23
21
|
export declare function builder(yargs: Argv): Argv<any>;
|
|
24
|
-
export declare function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name,
|
|
22
|
+
export declare function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name, remote, streetName, vatIdNumber, website, zipCode, }: UpdateOrganizationArguments): Promise<void>;
|
|
25
23
|
export {};
|
|
@@ -23,9 +23,6 @@ export function builder(yargs) {
|
|
|
23
23
|
.option('icon', {
|
|
24
24
|
describe: 'The file location of the icon representing the organization.',
|
|
25
25
|
coerce: coerceFile,
|
|
26
|
-
})
|
|
27
|
-
.option('preferredPaymentProvider', {
|
|
28
|
-
describe: 'The preferred payment provider of the organization.',
|
|
29
26
|
})
|
|
30
27
|
.option('vatIdNumber', {
|
|
31
28
|
describe: 'The VAT id number of the organization.',
|
|
@@ -49,7 +46,7 @@ export function builder(yargs) {
|
|
|
49
46
|
describe: 'Optional reference the organization can set to appear on the invoice.',
|
|
50
47
|
});
|
|
51
48
|
}
|
|
52
|
-
export async function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name,
|
|
49
|
+
export async function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name, remote, streetName, vatIdNumber, website, zipCode, }) {
|
|
53
50
|
await authenticate(remote, 'organizations:write', clientCredentials);
|
|
54
51
|
await updateOrganization({
|
|
55
52
|
description: desc,
|
|
@@ -58,7 +55,6 @@ export async function handler({ city, clientCredentials, countryCode, descriptio
|
|
|
58
55
|
icon,
|
|
59
56
|
id,
|
|
60
57
|
name,
|
|
61
|
-
preferredPaymentProvider,
|
|
62
58
|
website,
|
|
63
59
|
streetName,
|
|
64
60
|
houseNumber,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ReadStream } from 'node:fs';
|
|
2
|
-
import { type PaymentProvider } from '@appsemble/types';
|
|
3
2
|
import { type Argv } from 'yargs';
|
|
4
3
|
import { type BaseArguments } from '../../types.js';
|
|
5
4
|
interface UpsertOrganizationArguments extends BaseArguments {
|
|
@@ -9,7 +8,6 @@ interface UpsertOrganizationArguments extends BaseArguments {
|
|
|
9
8
|
name: string;
|
|
10
9
|
website: string;
|
|
11
10
|
icon: ReadStream;
|
|
12
|
-
preferredPaymentProvider: PaymentProvider;
|
|
13
11
|
vatIdNumber: string;
|
|
14
12
|
streetName: string;
|
|
15
13
|
houseNumber: string;
|
|
@@ -21,5 +19,5 @@ interface UpsertOrganizationArguments extends BaseArguments {
|
|
|
21
19
|
export declare const command = "upsert <id>";
|
|
22
20
|
export declare const description = "Create a new organization for the given id or update if there exists one already.";
|
|
23
21
|
export declare function builder(yargs: Argv): Argv<any>;
|
|
24
|
-
export declare function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name,
|
|
22
|
+
export declare function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name, remote, streetName, vatIdNumber, website, zipCode, }: UpsertOrganizationArguments): Promise<void>;
|
|
25
23
|
export {};
|
|
@@ -23,9 +23,6 @@ export function builder(yargs) {
|
|
|
23
23
|
.option('icon', {
|
|
24
24
|
describe: 'The file location of the icon representing the organization.',
|
|
25
25
|
coerce: coerceFile,
|
|
26
|
-
})
|
|
27
|
-
.option('preferredPaymentProvider', {
|
|
28
|
-
describe: 'The preferred payment provider of the organization.',
|
|
29
26
|
})
|
|
30
27
|
.option('vatIdNumber', {
|
|
31
28
|
describe: 'The VAT id number of the organization.',
|
|
@@ -49,7 +46,7 @@ export function builder(yargs) {
|
|
|
49
46
|
describe: 'Optional reference the organization can set to appear on the invoice.',
|
|
50
47
|
});
|
|
51
48
|
}
|
|
52
|
-
export async function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name,
|
|
49
|
+
export async function handler({ city, clientCredentials, countryCode, description: desc, email, houseNumber, icon, id, invoiceReference, name, remote, streetName, vatIdNumber, website, zipCode, }) {
|
|
53
50
|
await authenticate(remote, 'organizations:write', clientCredentials);
|
|
54
51
|
await upsertOrganization({
|
|
55
52
|
description: desc,
|
|
@@ -58,7 +55,6 @@ export async function handler({ city, clientCredentials, countryCode, descriptio
|
|
|
58
55
|
icon,
|
|
59
56
|
id,
|
|
60
57
|
name,
|
|
61
|
-
preferredPaymentProvider,
|
|
62
58
|
website,
|
|
63
59
|
streetName,
|
|
64
60
|
houseNumber,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Argv } from 'yargs';
|
|
2
|
+
import { type BaseArguments } from '../types.js';
|
|
3
|
+
export declare const command = "restore-data-from-backup";
|
|
4
|
+
export declare const description = "Restore appsemble data from a specified backup for the main database and app databases";
|
|
5
|
+
export declare function builder(yargs: Argv): Argv<any>;
|
|
6
|
+
export declare function handler(argv: BaseArguments): Promise<void>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { serverImport } from '../lib/serverImport.js';
|
|
2
|
+
export const command = 'restore-data-from-backup';
|
|
3
|
+
export const description = 'Restore appsemble data from a specified backup for the main database and app databases';
|
|
4
|
+
export function builder(yargs) {
|
|
5
|
+
return yargs
|
|
6
|
+
.option('database-host', {
|
|
7
|
+
desc: 'The host of the database to connect to. This defaults to the connected database container.',
|
|
8
|
+
})
|
|
9
|
+
.option('database-port', {
|
|
10
|
+
desc: 'The port of the database to connect to.',
|
|
11
|
+
type: 'number',
|
|
12
|
+
default: 5432,
|
|
13
|
+
})
|
|
14
|
+
.option('database-ssl', {
|
|
15
|
+
desc: 'Use SSL to connect to the database.',
|
|
16
|
+
type: 'boolean',
|
|
17
|
+
})
|
|
18
|
+
.option('database-name', {
|
|
19
|
+
desc: 'The name of the database to connect to.',
|
|
20
|
+
implies: ['database-user', 'database-password'],
|
|
21
|
+
})
|
|
22
|
+
.option('database-user', {
|
|
23
|
+
desc: 'The user to use to login to the database.',
|
|
24
|
+
implies: ['database-name', 'database-password'],
|
|
25
|
+
})
|
|
26
|
+
.option('database-password', {
|
|
27
|
+
desc: 'The password to use to login to the database.',
|
|
28
|
+
implies: ['database-name', 'database-user'],
|
|
29
|
+
})
|
|
30
|
+
.option('database-url', {
|
|
31
|
+
desc: 'A connection string for the database to connect to. This is an alternative to the separate database related variables.',
|
|
32
|
+
conflicts: ['database-host', 'database-name', 'database-user', 'database-password'],
|
|
33
|
+
})
|
|
34
|
+
.option('appsembleBackupFile', {
|
|
35
|
+
type: 'string',
|
|
36
|
+
describe: 'The appsemble backup file to restore data from, e.g., appsemble_prod_backup_20250101.sql.gz',
|
|
37
|
+
demandOption: true,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export async function handler(argv) {
|
|
41
|
+
const { restoreDataFromBackup, setArgv } = await serverImport('setArgv', 'restoreDataFromBackup');
|
|
42
|
+
setArgv(argv);
|
|
43
|
+
return restoreDataFromBackup();
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=restoreDataFromBackup.js.map
|
package/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { cosmiconfig } from 'cosmiconfig';
|
|
|
5
5
|
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
|
+
import * as backupProductionData from './commands/backupProductionData.js';
|
|
8
9
|
import * as block from './commands/block/index.js';
|
|
9
10
|
import * as chargeOrganizationSubscriptions from './commands/chargeOrganizationSubscriptions.js';
|
|
10
11
|
import * as checkDownMigrations from './commands/checkDownMigrations.js';
|
|
@@ -21,6 +22,7 @@ import * as migrate from './commands/migrate.js';
|
|
|
21
22
|
import * as migrateAppDefinitions from './commands/migrateAppDefinitions.js';
|
|
22
23
|
import * as organization from './commands/organization/index.js';
|
|
23
24
|
import * as resource from './commands/resource/index.js';
|
|
25
|
+
import * as restoreDataFromBackup from './commands/restoreDataFromBackup.js';
|
|
24
26
|
import * as runCronJobs from './commands/runCronJobs.js';
|
|
25
27
|
import * as scaleContainers from './commands/scaleContainers.js';
|
|
26
28
|
import * as serve from './commands/serve.js';
|
|
@@ -57,6 +59,8 @@ let parser = yargs(process.argv.slice(2))
|
|
|
57
59
|
.command(asset)
|
|
58
60
|
.command(block)
|
|
59
61
|
.command(cleanupResourcesAndAssets)
|
|
62
|
+
.command(backupProductionData)
|
|
63
|
+
.command(restoreDataFromBackup)
|
|
60
64
|
.command(cleanupDemoAppMembers)
|
|
61
65
|
.command(cleanupSoftDeletedRecords)
|
|
62
66
|
.command(checkAppMigrations)
|
package/lib/app.d.ts
CHANGED
|
@@ -120,6 +120,10 @@ interface PublishAppParams {
|
|
|
120
120
|
* Whether to publish seed members from `members/index.json` after publishing the app.
|
|
121
121
|
*/
|
|
122
122
|
members?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Languages officially supported by the app
|
|
125
|
+
*/
|
|
126
|
+
supportedLanguages?: string[];
|
|
123
127
|
/**
|
|
124
128
|
* Whether assets from the `assets` directory should be published after publishing the app.
|
|
125
129
|
*/
|
|
@@ -141,6 +145,10 @@ interface PublishAppParams {
|
|
|
141
145
|
* The ID to use for Meta Pixel for the app.
|
|
142
146
|
*/
|
|
143
147
|
metaPixelId?: string;
|
|
148
|
+
/**
|
|
149
|
+
* The ID to use for MS Clarity for the app.
|
|
150
|
+
*/
|
|
151
|
+
msClarityId?: string;
|
|
144
152
|
/**
|
|
145
153
|
* The custom Sentry DSN for the app.
|
|
146
154
|
*/
|
|
@@ -221,6 +229,10 @@ interface UpdateAppParams {
|
|
|
221
229
|
* Whether to publish seed members from `members/index.json` after publishing the app.
|
|
222
230
|
*/
|
|
223
231
|
members?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Languages officially supported by the app
|
|
234
|
+
*/
|
|
235
|
+
supportedLanguages?: string[];
|
|
224
236
|
/**
|
|
225
237
|
* Whether assets from the `assets` directory should be published after publishing the app.
|
|
226
238
|
*/
|
|
@@ -253,6 +265,10 @@ interface UpdateAppParams {
|
|
|
253
265
|
* The ID to use for Meta Pixel for the app.
|
|
254
266
|
*/
|
|
255
267
|
metaPixelId?: string;
|
|
268
|
+
/**
|
|
269
|
+
* The ID to use for MS Clarity for the app.
|
|
270
|
+
*/
|
|
271
|
+
msClarityId?: string;
|
|
256
272
|
/**
|
|
257
273
|
* The custom Sentry DSN for the app.
|
|
258
274
|
*/
|
|
@@ -337,6 +353,10 @@ interface PatchAppParams {
|
|
|
337
353
|
* Whether to prompt the app users to display the installation prompts
|
|
338
354
|
*/
|
|
339
355
|
displayInstallationPrompt?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Languages officially supported by the app
|
|
358
|
+
*/
|
|
359
|
+
supportedLanguages?: string[];
|
|
340
360
|
/**
|
|
341
361
|
* Whether the Appsemble OAuth2 login method should be shown.
|
|
342
362
|
*/
|
package/lib/app.js
CHANGED
|
@@ -805,9 +805,11 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
|
|
|
805
805
|
const sentryEnvironment = appsembleContext.sentryEnvironment ?? options.sentryEnvironment;
|
|
806
806
|
const googleAnalyticsId = appsembleContext.googleAnalyticsId ?? options.googleAnalyticsId;
|
|
807
807
|
const metaPixelId = appsembleContext.metaPixelId ?? options.metaPixelId;
|
|
808
|
+
const msClarityId = appsembleContext.msClarityId ?? options.msClarityId;
|
|
808
809
|
const assets = appsembleContext.assets ?? options.assets;
|
|
809
810
|
const resources = appsembleContext.resources ?? options.resources;
|
|
810
811
|
const members = appsembleContext.members ?? options.members;
|
|
812
|
+
const supportedLanguages = appsembleContext.supportedLanguages ?? options.supportedLanguages;
|
|
811
813
|
const appLock = appsembleContext.appLock || 'unlocked';
|
|
812
814
|
const dbName = appsembleContext.dbName ?? options.dbName;
|
|
813
815
|
const dbHost = appsembleContext.dbHost ?? options.dbHost;
|
|
@@ -843,6 +845,9 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
|
|
|
843
845
|
if (dbPassword) {
|
|
844
846
|
formData.append('dbPassword', dbPassword);
|
|
845
847
|
}
|
|
848
|
+
if (supportedLanguages?.length) {
|
|
849
|
+
formData.append('supportedLanguages', JSON.stringify(supportedLanguages));
|
|
850
|
+
}
|
|
846
851
|
if (icon) {
|
|
847
852
|
const realIcon = typeof icon === 'string' ? createReadStream(icon) : icon;
|
|
848
853
|
logger.info(`Using icon from ${realIcon.path ?? 'stdin'}`);
|
|
@@ -868,6 +873,10 @@ export async function publishApp({ clientCredentials, context, dryRun, modifyCon
|
|
|
868
873
|
logger.info('Using Meta Pixel');
|
|
869
874
|
formData.append('metaPixelID', metaPixelId);
|
|
870
875
|
}
|
|
876
|
+
if (msClarityId) {
|
|
877
|
+
logger.info('Using MS Clarity');
|
|
878
|
+
formData.append('msClarityID', msClarityId);
|
|
879
|
+
}
|
|
871
880
|
let authScope = 'apps:write';
|
|
872
881
|
if (resources) {
|
|
873
882
|
authScope += ' resources:write';
|
|
@@ -1008,8 +1017,10 @@ export async function updateApp({ clientCredentials, context, force, path, ...op
|
|
|
1008
1017
|
const sentryEnvironment = appsembleContext.sentryEnvironment ?? options.sentryEnvironment;
|
|
1009
1018
|
const googleAnalyticsId = appsembleContext.googleAnalyticsId ?? options.googleAnalyticsId;
|
|
1010
1019
|
const metaPixelId = appsembleContext.metaPixelId ?? options.metaPixelId;
|
|
1020
|
+
const msClarityId = appsembleContext.msClarityId ?? options.msClarityId;
|
|
1011
1021
|
const resources = appsembleContext.resources ?? options.resources;
|
|
1012
1022
|
const members = appsembleContext.members ?? options.members;
|
|
1023
|
+
const supportedLanguages = appsembleContext.supportedLanguages ?? options.supportedLanguages;
|
|
1013
1024
|
const assets = appsembleContext.assets ?? options.assets;
|
|
1014
1025
|
const { appLock } = appsembleContext;
|
|
1015
1026
|
const dbName = appsembleContext.dbName ?? options.dbName;
|
|
@@ -1046,6 +1057,9 @@ export async function updateApp({ clientCredentials, context, force, path, ...op
|
|
|
1046
1057
|
if (dbPassword) {
|
|
1047
1058
|
formData.append('dbPassword', dbPassword);
|
|
1048
1059
|
}
|
|
1060
|
+
if (supportedLanguages?.length) {
|
|
1061
|
+
formData.append('supportedLanguages', JSON.stringify(supportedLanguages));
|
|
1062
|
+
}
|
|
1049
1063
|
if (icon) {
|
|
1050
1064
|
const realIcon = typeof icon === 'string' ? createReadStream(icon) : icon;
|
|
1051
1065
|
logger.info(`Using icon from ${realIcon.path ?? 'stdin'}`);
|
|
@@ -1071,6 +1085,10 @@ export async function updateApp({ clientCredentials, context, force, path, ...op
|
|
|
1071
1085
|
logger.info('Using Meta Pixel');
|
|
1072
1086
|
formData.append('metaPixelID', metaPixelId);
|
|
1073
1087
|
}
|
|
1088
|
+
if (msClarityId) {
|
|
1089
|
+
logger.info('Using MS Clarity');
|
|
1090
|
+
formData.append('msClarityID', msClarityId);
|
|
1091
|
+
}
|
|
1074
1092
|
let authScope = 'apps:write';
|
|
1075
1093
|
if (resources) {
|
|
1076
1094
|
authScope += ' resources:write';
|
|
@@ -1135,6 +1153,9 @@ export async function updateApp({ clientCredentials, context, force, path, ...op
|
|
|
1135
1153
|
}
|
|
1136
1154
|
export async function patchApp({ id, remote, ...options }) {
|
|
1137
1155
|
const formData = new FormData();
|
|
1156
|
+
if (options.supportedLanguages?.length) {
|
|
1157
|
+
formData.append('supportedLanguages', JSON.stringify(options.supportedLanguages));
|
|
1158
|
+
}
|
|
1138
1159
|
if (options.path !== undefined) {
|
|
1139
1160
|
logger.info(`Setting app path to ${options.path}`);
|
|
1140
1161
|
formData.append('path', options.path);
|
package/lib/organization.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ReadStream } from 'node:fs';
|
|
2
|
-
import { type PaymentProvider } from '@appsemble/types';
|
|
3
2
|
interface OrganizationArguments {
|
|
4
3
|
description: string;
|
|
5
4
|
email: string;
|
|
@@ -7,7 +6,6 @@ interface OrganizationArguments {
|
|
|
7
6
|
icon: ReadStream;
|
|
8
7
|
name: string;
|
|
9
8
|
website: string;
|
|
10
|
-
preferredPaymentProvider: PaymentProvider;
|
|
11
9
|
vatIdNumber: string | null;
|
|
12
10
|
streetName: string | null;
|
|
13
11
|
houseNumber: string | null;
|
|
@@ -16,7 +14,7 @@ interface OrganizationArguments {
|
|
|
16
14
|
countryCode: string | null;
|
|
17
15
|
invoiceReference: string | null;
|
|
18
16
|
}
|
|
19
|
-
export declare function createOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name,
|
|
20
|
-
export declare function updateOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name,
|
|
21
|
-
export declare function upsertOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name,
|
|
17
|
+
export declare function createOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name, streetName, vatIdNumber, website, zipCode, }: OrganizationArguments): Promise<void>;
|
|
18
|
+
export declare function updateOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name, streetName, vatIdNumber, website, zipCode, }: OrganizationArguments): Promise<void>;
|
|
19
|
+
export declare function upsertOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name, streetName, vatIdNumber, website, zipCode, }: OrganizationArguments): Promise<void>;
|
|
22
20
|
export {};
|
package/lib/organization.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logger } from '@appsemble/node-utils';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import FormData from 'form-data';
|
|
4
|
-
export async function createOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name,
|
|
4
|
+
export async function createOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name, streetName, vatIdNumber, website, zipCode, }) {
|
|
5
5
|
const formData = new FormData();
|
|
6
6
|
formData.append('id', id);
|
|
7
7
|
if (description) {
|
|
@@ -24,10 +24,6 @@ export async function createOrganization({ city, countryCode, description, email
|
|
|
24
24
|
logger.info(`Setting website to ${website}`);
|
|
25
25
|
formData.append('website', website);
|
|
26
26
|
}
|
|
27
|
-
if (preferredPaymentProvider) {
|
|
28
|
-
logger.info(`Setting preferred payment provider to ${preferredPaymentProvider}`);
|
|
29
|
-
formData.append('preferredPaymentProvider', preferredPaymentProvider);
|
|
30
|
-
}
|
|
31
27
|
if (vatIdNumber) {
|
|
32
28
|
logger.info(`Setting vatIdNumber to ${vatIdNumber}`);
|
|
33
29
|
formData.append('vatIdNumber', vatIdNumber);
|
|
@@ -66,7 +62,7 @@ export async function createOrganization({ city, countryCode, description, email
|
|
|
66
62
|
throw error;
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
|
-
export async function updateOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name,
|
|
65
|
+
export async function updateOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name, streetName, vatIdNumber, website, zipCode, }) {
|
|
70
66
|
logger.info(`Updating organization ${id}${name ? ` (${name})` : ''}`);
|
|
71
67
|
const formData = new FormData();
|
|
72
68
|
if (description) {
|
|
@@ -89,10 +85,6 @@ export async function updateOrganization({ city, countryCode, description, email
|
|
|
89
85
|
logger.info(`Setting website to ${website}`);
|
|
90
86
|
formData.append('website', website);
|
|
91
87
|
}
|
|
92
|
-
if (preferredPaymentProvider) {
|
|
93
|
-
logger.info(`Setting preferred payment provider to ${preferredPaymentProvider}`);
|
|
94
|
-
formData.append('preferredPaymentProvider', preferredPaymentProvider);
|
|
95
|
-
}
|
|
96
88
|
if (vatIdNumber) {
|
|
97
89
|
logger.info(`Setting vat id number to ${vatIdNumber}`);
|
|
98
90
|
formData.append('vatIdNumber', vatIdNumber);
|
|
@@ -130,7 +122,7 @@ export async function updateOrganization({ city, countryCode, description, email
|
|
|
130
122
|
throw error;
|
|
131
123
|
}
|
|
132
124
|
}
|
|
133
|
-
export async function upsertOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name,
|
|
125
|
+
export async function upsertOrganization({ city, countryCode, description, email, houseNumber, icon, id, invoiceReference, name, streetName, vatIdNumber, website, zipCode, }) {
|
|
134
126
|
try {
|
|
135
127
|
await axios.get(`/api/organizations/${id}`);
|
|
136
128
|
await updateOrganization({
|
|
@@ -140,7 +132,6 @@ export async function upsertOrganization({ city, countryCode, description, email
|
|
|
140
132
|
id,
|
|
141
133
|
name,
|
|
142
134
|
website,
|
|
143
|
-
preferredPaymentProvider,
|
|
144
135
|
vatIdNumber,
|
|
145
136
|
streetName,
|
|
146
137
|
houseNumber,
|
|
@@ -159,7 +150,6 @@ export async function upsertOrganization({ city, countryCode, description, email
|
|
|
159
150
|
id,
|
|
160
151
|
name,
|
|
161
152
|
website,
|
|
162
|
-
preferredPaymentProvider,
|
|
163
153
|
vatIdNumber,
|
|
164
154
|
streetName,
|
|
165
155
|
houseNumber,
|
package/lib/serverImport.d.ts
CHANGED
|
@@ -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 'chargeOrganizationSubscriptions' | 'checkDownMigrations' | 'checkMigrations' | 'cleanupDemoAppMembers' | 'cleanupResourcesAndAssets' | 'cleanupSoftDeletedRecords' | 'fuzzMigrations' | 'migrate' | 'migrateAppDefinitions' | 'runCronJobs' | 'scaleContainers' | 'setArgv' | 'start' | 'synchronizeTrainings'>(...members: T[]): Promise<Record<T, any>>;
|
|
7
|
+
export declare function serverImport<T extends 'backupProductionData' | 'chargeOrganizationSubscriptions' | 'checkDownMigrations' | 'checkMigrations' | 'cleanupDemoAppMembers' | 'cleanupResourcesAndAssets' | 'cleanupSoftDeletedRecords' | 'fuzzMigrations' | 'migrate' | 'migrateAppDefinitions' | 'restoreDataFromBackup' | 'runCronJobs' | 'scaleContainers' | 'setArgv' | 'start' | 'synchronizeTrainings'>(...members: T[]): Promise<Record<T, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/cli",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.15",
|
|
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.35.
|
|
48
|
-
"@appsemble/types": "0.35.
|
|
49
|
-
"@appsemble/lang-sdk": "0.35.
|
|
50
|
-
"@appsemble/utils": "0.35.
|
|
47
|
+
"@appsemble/node-utils": "0.35.15",
|
|
48
|
+
"@appsemble/types": "0.35.15",
|
|
49
|
+
"@appsemble/lang-sdk": "0.35.15",
|
|
50
|
+
"@appsemble/utils": "0.35.15",
|
|
51
51
|
"@fortawesome/fontawesome-common-types": "^6.0.0",
|
|
52
52
|
"@koa/cors": "^5.0.0",
|
|
53
53
|
"@odata/parser": "^0.2.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"csvtojson": "^2.0.0",
|
|
59
59
|
"esbuild": "^0.21.5",
|
|
60
60
|
"fast-glob": "^3.0.0",
|
|
61
|
-
"form-data": "^4.0.
|
|
61
|
+
"form-data": "^4.0.4",
|
|
62
62
|
"global-cache-dir": "^6.0.0",
|
|
63
63
|
"inquirer": "^9.0.0",
|
|
64
64
|
"jsonschema": "~1.4.1",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"yargs": "^17.0.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@appsemble/types": "0.35.
|
|
94
|
-
"@appsemble/server": "0.35.
|
|
93
|
+
"@appsemble/types": "0.35.15",
|
|
94
|
+
"@appsemble/server": "0.35.15",
|
|
95
95
|
"bcrypt": "5.1.1",
|
|
96
96
|
"axios-test-instance": "7.0.0",
|
|
97
97
|
"@types/concat-stream": "2.0.3",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"concat-stream": "2.0.0",
|
|
104
104
|
"vitest": "2.1.9",
|
|
105
105
|
"sequelize": "6.37.7",
|
|
106
|
-
"minio": "8.0.
|
|
106
|
+
"minio": "8.0.6"
|
|
107
107
|
},
|
|
108
108
|
"optionalDependencies": {
|
|
109
109
|
"keytar": "^7.0.0"
|
|
@@ -6,7 +6,7 @@ pages:
|
|
|
6
6
|
- name: Example Page A
|
|
7
7
|
blocks:
|
|
8
8
|
- type: action-button
|
|
9
|
-
version: 0.35.
|
|
9
|
+
version: 0.35.15
|
|
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.35.
|
|
20
|
+
version: 0.35.15
|
|
21
21
|
parameters:
|
|
22
22
|
icon: arrow-left
|
|
23
23
|
actions:
|