@appsemble/types 0.29.4 → 0.29.6
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/index.d.ts +60 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#  Appsemble Types
|
|
2
2
|
|
|
3
3
|
> Reusable TypeScript types
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/types)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.29.6)
|
|
7
7
|
[](https://prettier.io)
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
@@ -26,5 +26,5 @@ not guaranteed.
|
|
|
26
26
|
|
|
27
27
|
## License
|
|
28
28
|
|
|
29
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.29.
|
|
29
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.29.6/LICENSE.md) ©
|
|
30
30
|
[Appsemble](https://appsemble.com)
|
package/index.d.ts
CHANGED
|
@@ -599,6 +599,7 @@ export interface Remappers {
|
|
|
599
599
|
*/
|
|
600
600
|
translate: string;
|
|
601
601
|
user: keyof UserInfo;
|
|
602
|
+
container: string;
|
|
602
603
|
}
|
|
603
604
|
export type ObjectRemapper = RequireExactlyOne<Remappers>;
|
|
604
605
|
export type ArrayRemapper = (ArrayRemapper | ObjectRemapper)[];
|
|
@@ -1573,6 +1574,15 @@ export interface AppDefinition {
|
|
|
1573
1574
|
* Cron jobs associated with the app.
|
|
1574
1575
|
*/
|
|
1575
1576
|
cron?: Record<string, CronDefinition>;
|
|
1577
|
+
/**
|
|
1578
|
+
* Companion containers of the app.
|
|
1579
|
+
*/
|
|
1580
|
+
containers?: CompanionContainerDefinition[];
|
|
1581
|
+
/**
|
|
1582
|
+
* Default registry to use when creating app companion containers.
|
|
1583
|
+
* Used to avoid writing the registry name in front of every image.
|
|
1584
|
+
*/
|
|
1585
|
+
registry?: string;
|
|
1576
1586
|
}
|
|
1577
1587
|
/**
|
|
1578
1588
|
* The definition of a cron job for an app.
|
|
@@ -2188,3 +2198,53 @@ export interface BlockManifest extends ProjectManifest {
|
|
|
2188
2198
|
*/
|
|
2189
2199
|
layout?: 'float' | 'grow' | 'hidden' | 'static' | null;
|
|
2190
2200
|
}
|
|
2201
|
+
export interface CompanionContainerDefinition {
|
|
2202
|
+
/**
|
|
2203
|
+
* Alias of the container in the app.
|
|
2204
|
+
*/
|
|
2205
|
+
name: string;
|
|
2206
|
+
/**
|
|
2207
|
+
* Image to use for the container.
|
|
2208
|
+
*/
|
|
2209
|
+
image: string;
|
|
2210
|
+
/**
|
|
2211
|
+
* Port exposed by the provided image.
|
|
2212
|
+
*
|
|
2213
|
+
* E.g., if the Dockerfile of the image contains `EXPOSE 3000`
|
|
2214
|
+
* then `port` should be 3000 as well.
|
|
2215
|
+
*/
|
|
2216
|
+
port: number;
|
|
2217
|
+
/**
|
|
2218
|
+
* Limits the resources used and required by companion containers
|
|
2219
|
+
*
|
|
2220
|
+
*/
|
|
2221
|
+
resources?: ContainerResources;
|
|
2222
|
+
/**
|
|
2223
|
+
* Environment within the container
|
|
2224
|
+
*/
|
|
2225
|
+
env?: ContainerEnvVar[];
|
|
2226
|
+
/**
|
|
2227
|
+
* Additional properties e.g., labels, annotations
|
|
2228
|
+
*
|
|
2229
|
+
*/
|
|
2230
|
+
metadata?: Record<string, any>;
|
|
2231
|
+
}
|
|
2232
|
+
export interface ContainerResources {
|
|
2233
|
+
/**
|
|
2234
|
+
* Maximum amount of resources allowed
|
|
2235
|
+
*/
|
|
2236
|
+
limits: ContainerResourceProps;
|
|
2237
|
+
}
|
|
2238
|
+
export interface ContainerResourceProps {
|
|
2239
|
+
cpu: string;
|
|
2240
|
+
memory: string;
|
|
2241
|
+
}
|
|
2242
|
+
export interface ContainerEnvVar {
|
|
2243
|
+
name: string;
|
|
2244
|
+
value: string;
|
|
2245
|
+
useValueFromSecret?: boolean;
|
|
2246
|
+
}
|
|
2247
|
+
export interface LogObject {
|
|
2248
|
+
fromAppsemble: boolean;
|
|
2249
|
+
entries: string[];
|
|
2250
|
+
}
|