@appsemble/cli 0.29.3 → 0.29.5
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/scaleContainers.d.ts +6 -0
- package/commands/scaleContainers.js +15 -0
- package/index.js +2 -0
- package/lib/app.test.js +4 -0
- package/lib/serverImport.d.ts +1 -1
- package/package.json +6 -6
- 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.29.5)
|
|
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.29.
|
|
326
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.29.5/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 = "scale-containers";
|
|
4
|
+
export declare const description = "Scales down all deployments of companion containers, which are currently not in use";
|
|
5
|
+
export declare function builder(yargs: Argv): Argv<any>;
|
|
6
|
+
export declare function handler(argv: BaseArguments): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { serverImport } from '../lib/serverImport.js';
|
|
2
|
+
export const command = 'scale-containers';
|
|
3
|
+
export const description = 'Scales down all deployments of companion containers, which are currently not in use';
|
|
4
|
+
export function builder(yargs) {
|
|
5
|
+
return yargs.option('interval', {
|
|
6
|
+
desc: 'The time in minutes to perform the operation. Defaults to 10 minutes',
|
|
7
|
+
default: 10,
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export async function handler(argv) {
|
|
11
|
+
const { scaleContainers, setArgv } = await serverImport('setArgv', 'scaleContainers');
|
|
12
|
+
setArgv(argv);
|
|
13
|
+
return scaleContainers();
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=scaleContainers.js.map
|
package/index.js
CHANGED
|
@@ -18,6 +18,7 @@ import * as migrate from './commands/migrate.js';
|
|
|
18
18
|
import * as organization from './commands/organization/index.js';
|
|
19
19
|
import * as resource from './commands/resource/index.js';
|
|
20
20
|
import * as runCronJobs from './commands/runCronJobs.js';
|
|
21
|
+
import * as scaleContainers from './commands/scaleContainers.js';
|
|
21
22
|
import * as serve from './commands/serve.js';
|
|
22
23
|
import * as start from './commands/start.js';
|
|
23
24
|
import * as team from './commands/team/index.js';
|
|
@@ -64,6 +65,7 @@ let parser = yargs(process.argv.slice(2))
|
|
|
64
65
|
.command(runCronJobs)
|
|
65
66
|
.command(start)
|
|
66
67
|
.command(serve)
|
|
68
|
+
.command(scaleContainers)
|
|
67
69
|
.command(team)
|
|
68
70
|
.demandCommand(1)
|
|
69
71
|
// .strict() isn’t used because of https://github.com/yargs/yargs/issues/2058
|
package/lib/app.test.js
CHANGED
|
@@ -1767,6 +1767,7 @@ describe('updateApp', () => {
|
|
|
1767
1767
|
expect(app.dataValues).toMatchInlineSnapshot(`
|
|
1768
1768
|
{
|
|
1769
1769
|
"OrganizationId": "testorganization",
|
|
1770
|
+
"containers": null,
|
|
1770
1771
|
"controllerCode": null,
|
|
1771
1772
|
"controllerImplementations": null,
|
|
1772
1773
|
"coreStyle": null,
|
|
@@ -1793,6 +1794,7 @@ describe('updateApp', () => {
|
|
|
1793
1794
|
"locked": "unlocked",
|
|
1794
1795
|
"maskableIcon": null,
|
|
1795
1796
|
"path": "test-app",
|
|
1797
|
+
"registry": null,
|
|
1796
1798
|
"scimEnabled": false,
|
|
1797
1799
|
"scimToken": null,
|
|
1798
1800
|
"sentryDsn": null,
|
|
@@ -1845,6 +1847,7 @@ describe('patchApp', () => {
|
|
|
1845
1847
|
expect(app.dataValues).toMatchInlineSnapshot(`
|
|
1846
1848
|
{
|
|
1847
1849
|
"OrganizationId": "testorganization",
|
|
1850
|
+
"containers": null,
|
|
1848
1851
|
"controllerCode": null,
|
|
1849
1852
|
"controllerImplementations": null,
|
|
1850
1853
|
"coreStyle": null,
|
|
@@ -1871,6 +1874,7 @@ describe('patchApp', () => {
|
|
|
1871
1874
|
"locked": "fullLock",
|
|
1872
1875
|
"maskableIcon": null,
|
|
1873
1876
|
"path": "updated-path",
|
|
1877
|
+
"registry": null,
|
|
1874
1878
|
"scimEnabled": false,
|
|
1875
1879
|
"scimToken": null,
|
|
1876
1880
|
"sentryDsn": null,
|
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 'checkDownMigrations' | 'checkMigrations' | 'cleanupDemoUsers' | 'cleanupResourcesAndAssets' | 'fuzzMigrations' | 'migrate' | 'runCronJobs' | 'setArgv' | 'start'>(...members: T[]): Promise<Record<T, any>>;
|
|
7
|
+
export declare function serverImport<T extends 'checkDownMigrations' | 'checkMigrations' | 'cleanupDemoUsers' | 'cleanupResourcesAndAssets' | 'fuzzMigrations' | 'migrate' | 'runCronJobs' | 'scaleContainers' | 'setArgv' | 'start'>(...members: T[]): Promise<Record<T, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/cli",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.5",
|
|
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.29.
|
|
46
|
-
"@appsemble/types": "0.29.
|
|
47
|
-
"@appsemble/utils": "0.29.
|
|
45
|
+
"@appsemble/node-utils": "0.29.5",
|
|
46
|
+
"@appsemble/types": "0.29.5",
|
|
47
|
+
"@appsemble/utils": "0.29.5",
|
|
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.29.
|
|
91
|
-
"@appsemble/server": "0.29.
|
|
90
|
+
"@appsemble/types": "0.29.5",
|
|
91
|
+
"@appsemble/server": "0.29.5",
|
|
92
92
|
"bcrypt": "^5.0.0",
|
|
93
93
|
"axios-test-instance": "^7.0.0",
|
|
94
94
|
"@types/concat-stream": "^2.0.0",
|
|
@@ -6,7 +6,7 @@ pages:
|
|
|
6
6
|
- name: Example Page A
|
|
7
7
|
blocks:
|
|
8
8
|
- type: action-button
|
|
9
|
-
version: 0.29.
|
|
9
|
+
version: 0.29.5
|
|
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.29.
|
|
20
|
+
version: 0.29.5
|
|
21
21
|
parameters:
|
|
22
22
|
icon: arrow-left
|
|
23
23
|
actions:
|