@appsemble/cli 0.36.3 → 0.36.5-test.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.36.3/config/assets/logo.svg) Appsemble CLI
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.36.5-test.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.36.3/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.36.3)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.36.5-test.0/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.36.5-test.0)
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.36.3/LICENSE.md) ©
326
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.36.5-test.0/LICENSE.md) ©
327
327
  [Appsemble](https://appsemble.com)
@@ -0,0 +1,6 @@
1
+ import { type Argv } from 'yargs';
2
+ import { type BaseArguments } from '../types.js';
3
+ export declare const command = "cleanup-expired-domains";
4
+ export declare const description = "Sends emails to organization owners for app and app collection domains that have expired more than a week ago and sets the domain to null.";
5
+ export declare function builder(yargs: Argv): Argv<any>;
6
+ export declare function handler(argv: BaseArguments): Promise<void>;
@@ -0,0 +1,64 @@
1
+ import { serverImport } from '../lib/serverImport.js';
2
+ export const command = 'cleanup-expired-domains';
3
+ export const description = 'Sends emails to organization owners for app and app collection domains that have expired more than a week ago and sets the domain to null.';
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('smtp-host', {
35
+ desc: 'The host of the SMTP server to connect to.',
36
+ })
37
+ .option('smtp-port', {
38
+ desc: 'The port of the SMTP server to connect to.',
39
+ type: 'number',
40
+ })
41
+ .option('smtp-secure', {
42
+ desc: 'Use TLS when connecting to the SMTP server.',
43
+ type: 'boolean',
44
+ default: false,
45
+ })
46
+ .option('smtp-user', {
47
+ desc: 'The user to use to login to the SMTP server.',
48
+ implies: ['smtp-pass', 'smtp-from'],
49
+ })
50
+ .option('smtp-pass', {
51
+ desc: 'The password to use to login to the SMTP server.',
52
+ implies: ['smtp-user', 'smtp-from'],
53
+ })
54
+ .option('smtp-from', {
55
+ desc: 'The address to use when sending emails.',
56
+ implies: ['smtp-user', 'smtp-pass'],
57
+ });
58
+ }
59
+ export async function handler(argv) {
60
+ const { cleanupExpiredDomains, setArgv } = await serverImport('setArgv', 'cleanupExpiredDomains');
61
+ setArgv(argv);
62
+ return cleanupExpiredDomains();
63
+ }
64
+ //# sourceMappingURL=cleanupExpiredDomains.js.map
@@ -0,0 +1,6 @@
1
+ import { type Argv } from 'yargs';
2
+ import { type BaseArguments } from '../types.js';
3
+ export declare const command = "reencrypt-secrets";
4
+ export declare const description = "Re-encrypts all secrets in the database using the current AES secret. Use this when rotating from an old AES secret to a new one.";
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 = 'reencrypt-secrets';
3
+ export const description = 'Re-encrypts all secrets in the database using the current AES secret. Use this when rotating from an old AES secret to a new one.';
4
+ export function builder(yargs) {
5
+ return yargs
6
+ .option('old-aes-secret', {
7
+ desc: 'The old AES secret that was used to encrypt the secrets',
8
+ type: 'string',
9
+ demandOption: true,
10
+ })
11
+ .option('database-host', {
12
+ desc: 'The host of the database to connect to. This defaults to the connected database container.',
13
+ })
14
+ .option('database-port', {
15
+ desc: 'The port of the database to connect to.',
16
+ type: 'number',
17
+ default: 5432,
18
+ })
19
+ .option('database-ssl', {
20
+ desc: 'Use SSL to connect to the database.',
21
+ type: 'boolean',
22
+ })
23
+ .option('database-name', {
24
+ desc: 'The name of the database to connect to.',
25
+ implies: ['database-user', 'database-password'],
26
+ })
27
+ .option('database-user', {
28
+ desc: 'The user to use to login to the database.',
29
+ implies: ['database-name', 'database-password'],
30
+ })
31
+ .option('database-password', {
32
+ desc: 'The password to use to login to the database.',
33
+ implies: ['database-name', 'database-user'],
34
+ })
35
+ .option('database-url', {
36
+ desc: 'A connection string for the database to connect to. This is an alternative to the separate database related variables.',
37
+ conflicts: ['database-host', 'database-name', 'database-user', 'database-password'],
38
+ });
39
+ }
40
+ export async function handler(argv) {
41
+ const { reencryptSecrets, setArgv } = await serverImport('setArgv', 'reencryptSecrets');
42
+ setArgv(argv);
43
+ return reencryptSecrets(argv);
44
+ }
45
+ //# sourceMappingURL=reencryptSecrets.js.map
@@ -3,6 +3,9 @@ export const command = 'restore-data-from-backup';
3
3
  export const description = 'Restore appsemble data from a specified backup for the main database and app databases';
4
4
  export function builder(yargs) {
5
5
  return yargs
6
+ .option('aesSecret', {
7
+ desc: 'Aes Secret used for encrypting DB password in the backup DB',
8
+ })
6
9
  .option('database-host', {
7
10
  desc: 'The host of the database to connect to. This defaults to the connected database container.',
8
11
  })
@@ -31,7 +34,7 @@ export function builder(yargs) {
31
34
  desc: 'A connection string for the database to connect to. This is an alternative to the separate database related variables.',
32
35
  conflicts: ['database-host', 'database-name', 'database-user', 'database-password'],
33
36
  })
34
- .option('appsembleBackupFile', {
37
+ .option('restoreBackupFilename', {
35
38
  type: 'string',
36
39
  describe: 'The appsemble backup file to restore data from, e.g., appsemble_prod_backup_20250101.sql.gz',
37
40
  demandOption: true,
package/index.js CHANGED
@@ -11,6 +11,7 @@ import * as chargeOrganizationSubscriptions from './commands/chargeOrganizationS
11
11
  import * as checkDownMigrations from './commands/checkDownMigrations.js';
12
12
  import * as checkAppMigrations from './commands/checkMigrations.js';
13
13
  import * as cleanupDemoAppMembers from './commands/cleanupDemoAppMembers.js';
14
+ import * as cleanupExpiredDomains from './commands/cleanupExpiredDomains.js';
14
15
  import * as cleanupResourcesAndAssets from './commands/cleanupResourcesAndAssets.js';
15
16
  import * as cleanupSoftDeletedRecords from './commands/cleanupSoftDeletedRecords.js';
16
17
  import * as config from './commands/config/index.js';
@@ -20,6 +21,7 @@ import * as login from './commands/login.js';
20
21
  import * as logout from './commands/logout.js';
21
22
  import * as migrate from './commands/migrate.js';
22
23
  import * as migrateAppDefinitions from './commands/migrateAppDefinitions.js';
24
+ import * as reencryptSecrets from './commands/reencryptSecrets.js';
23
25
  import * as organization from './commands/organization/index.js';
24
26
  import * as resource from './commands/resource/index.js';
25
27
  import * as restoreDataFromBackup from './commands/restoreDataFromBackup.js';
@@ -62,6 +64,7 @@ let parser = yargs(process.argv.slice(2))
62
64
  .command(backupProductionData)
63
65
  .command(restoreDataFromBackup)
64
66
  .command(cleanupDemoAppMembers)
67
+ .command(cleanupExpiredDomains)
65
68
  .command(cleanupSoftDeletedRecords)
66
69
  .command(checkAppMigrations)
67
70
  .command(checkDownMigrations)
@@ -71,6 +74,7 @@ let parser = yargs(process.argv.slice(2))
71
74
  .command(logout)
72
75
  .command(migrate)
73
76
  .command(migrateAppDefinitions)
77
+ .command(reencryptSecrets)
74
78
  .command(organization)
75
79
  .command(resource)
76
80
  .command(runCronJobs)
@@ -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 'backupProductionData' | 'chargeOrganizationSubscriptions' | 'checkDownMigrations' | 'checkMigrations' | 'cleanupDemoAppMembers' | 'cleanupResourcesAndAssets' | 'cleanupSoftDeletedRecords' | 'fuzzMigrations' | 'migrate' | 'migrateAppDefinitions' | 'restoreDataFromBackup' | 'runCronJobs' | 'scaleContainers' | 'setArgv' | 'start' | 'synchronizeTrainings'>(...members: T[]): Promise<Record<T, any>>;
7
+ export declare function serverImport<T extends 'backupProductionData' | 'chargeOrganizationSubscriptions' | 'checkDownMigrations' | 'checkMigrations' | 'cleanupDemoAppMembers' | 'cleanupExpiredDomains' | 'cleanupResourcesAndAssets' | 'cleanupSoftDeletedRecords' | 'fuzzMigrations' | 'migrate' | 'migrateAppDefinitions' | 'reencryptSecrets' | '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.36.3",
3
+ "version": "0.36.5-test.0",
4
4
  "description": "The CLI for developing with Appsemble apps and blocks",
5
5
  "keywords": [
6
6
  "app",
@@ -44,11 +44,12 @@
44
44
  "test": "vitest"
45
45
  },
46
46
  "dependencies": {
47
- "@appsemble/node-utils": "0.36.3",
48
- "@appsemble/types": "0.36.3",
49
- "@appsemble/lang-sdk": "0.36.3",
50
- "@appsemble/utils": "0.36.3",
47
+ "@appsemble/node-utils": "0.36.5-test.0",
48
+ "@appsemble/types": "0.36.5-test.0",
49
+ "@appsemble/lang-sdk": "0.36.5-test.0",
50
+ "@appsemble/utils": "0.36.5-test.0",
51
51
  "@fortawesome/fontawesome-common-types": "^6.0.0",
52
+ "@inquirer/prompts": "^8.0.0",
52
53
  "@koa/cors": "^5.0.0",
53
54
  "@odata/parser": "^0.2.0",
54
55
  "axios": "^1.0.0",
@@ -60,7 +61,6 @@
60
61
  "fast-glob": "^3.0.0",
61
62
  "form-data": "^4.0.4",
62
63
  "global-cache-dir": "^6.0.0",
63
- "@inquirer/prompts": "^8.0.0",
64
64
  "jsonschema": "~1.4.1",
65
65
  "koa": "^3.0.0",
66
66
  "koa-compose": "^4.0.0",
@@ -80,7 +80,7 @@
80
80
  "prettier": "^3.0.0",
81
81
  "raw-body": "^2.0.0",
82
82
  "read-package-up": "^11.0.0",
83
- "sharp": "^0.32.0",
83
+ "sharp": "0.34.5",
84
84
  "ts-json-schema-generator": "^1.0.0",
85
85
  "type-fest": "^4.0.0",
86
86
  "url": "0.11.4",
@@ -89,16 +89,8 @@
89
89
  "yargs": "^17.0.0"
90
90
  },
91
91
  "devDependencies": {
92
- "@appsemble/types": "0.36.3",
93
- "@appsemble/server": "0.36.3",
94
- "axios-test-instance": "7.0.0",
95
- "bcrypt": "5.1.1",
96
- "big-integer": "1.6.52",
97
- "default-browser": "5.4.0",
98
- "is-inside-container": "1.0.0",
99
- "titleize": "4.0.0",
100
- "untildify": "6.0.0",
101
- "yoctocolors-cjs": "2.1.3",
92
+ "@appsemble/types": "0.36.5-test.0",
93
+ "@appsemble/server": "0.36.5-test.0",
102
94
  "@types/concat-stream": "2.0.3",
103
95
  "@types/koa__cors": "5.0.1",
104
96
  "@types/koa-compress": "4.0.7",
@@ -106,9 +98,17 @@
106
98
  "@types/normalize-path": "3.0.2",
107
99
  "@types/postcss-import": "14.0.3",
108
100
  "@types/postcss-url": "10.0.4",
101
+ "axios-test-instance": "7.0.0",
102
+ "bcrypt": "5.1.1",
103
+ "big-integer": "1.6.52",
109
104
  "concat-stream": "2.0.0",
105
+ "default-browser": "5.5.0",
106
+ "is-inside-container": "1.0.0",
107
+ "sequelize": "6.37.7",
108
+ "titleize": "4.0.0",
109
+ "untildify": "6.0.0",
110
110
  "vitest": "2.1.9",
111
- "sequelize": "6.37.7"
111
+ "yoctocolors-cjs": "2.1.3"
112
112
  },
113
113
  "optionalDependencies": {
114
114
  "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.36.3
9
+ version: 0.36.5-test.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.36.3
20
+ version: 0.36.5-test.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.36.3",
8
+ "@appsemble/sdk": "0.36.5-test.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.36.3",
9
- "@appsemble/sdk": "0.36.3",
8
+ "@appsemble/preact": "0.36.5-test.0",
9
+ "@appsemble/sdk": "0.36.5-test.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.36.3"
8
+ "@appsemble/sdk": "0.36.5-test.0"
9
9
  }
10
10
  }