@balena/open-balena-api 29.0.0-build-reduce-service-install-usage-state-get-v3-427fd396ec055f8061204b216e28a5f9216da822-1 → 29.0.0-build-reduce-service-install-usage-state-get-v3-a1e33179211cf92ec804cef1bf6da07840800b76-1
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,8 +4,8 @@ import type { Application } from '../../../balena-model.js';
|
|
4
4
|
import type { ExpandedApplicationWithService } from './fleet-state-get-v3.js';
|
5
5
|
type LocalStateApp = StateV3[string]['apps'][string];
|
6
6
|
type ServiceComposition = AnyObject;
|
7
|
-
|
8
|
-
|
7
|
+
type ExpandedDevice = Awaited<ReturnType<typeof getDevice>>;
|
8
|
+
type ExpandedApplication = OptionsToResponse<Application['Read'], {
|
9
9
|
$select: typeof appSelect;
|
10
10
|
$expand: typeof appExpand;
|
11
11
|
}, undefined>[number];
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import type { ExpandableStringKeyOf } from 'pinejs-client-core';
|
2
2
|
import type { dbModule, permissions } from '@balena/pinejs';
|
3
|
-
import type { Device } from '../../balena-model.js';
|
4
|
-
import type { ExpandedDevice as ExpandedDeviceV3, ExpandedRelease as ExpandedReleaseV3 } from './routes/state-get-v3.js';
|
5
|
-
import type { ExpandedApplicationWithService } from './routes/fleet-state-get-v3.js';
|
3
|
+
import type { Device, Service } from '../../balena-model.js';
|
6
4
|
export declare const getStateEventAdditionalFields: Array<Exclude<keyof Device['Read'], ExpandableStringKeyOf<Device['Read']>>>;
|
7
5
|
declare const defaultConfigVariableFns: Array<(config: Dictionary<string>) => void>;
|
8
6
|
export declare const addDefaultConfigVariableFn: (fn: (typeof defaultConfigVariableFns)[number]) => void;
|
@@ -15,20 +13,29 @@ export declare const getConfig: (device: {
|
|
15
13
|
} | undefined, application?: {
|
16
14
|
application_config_variable: EnvVarList;
|
17
15
|
} | undefined) => Dictionary<string>;
|
18
|
-
type
|
19
|
-
|
20
|
-
|
16
|
+
type ServiceWithId = {
|
17
|
+
id: Service['Read']['id'];
|
18
|
+
};
|
19
|
+
type Image = {
|
20
|
+
is_a_build_of__service: ServiceWithId[];
|
21
|
+
};
|
22
|
+
type ServiceInstall = {
|
23
|
+
service: {
|
24
|
+
__id: ServiceWithId['id'];
|
25
|
+
};
|
26
|
+
device_service_environment_variable: EnvVarList;
|
27
|
+
};
|
21
28
|
export declare function serviceInstallFromImage(deviceOrFleet: {
|
22
29
|
service_install: ServiceInstall[];
|
23
30
|
}, image?: Image): ServiceInstall | undefined;
|
24
31
|
export declare function serviceInstallFromImage(deviceOrFleet: {
|
25
|
-
service:
|
26
|
-
}, image?: Image):
|
32
|
+
service: ServiceWithId[];
|
33
|
+
}, image?: Image): ServiceWithId | undefined;
|
27
34
|
export declare function serviceInstallFromImage(deviceOrFleet: {
|
28
35
|
service_install: ServiceInstall[];
|
29
36
|
} | {
|
30
|
-
service:
|
31
|
-
}, image?: Image):
|
37
|
+
service: ServiceWithId[];
|
38
|
+
}, image?: Image): ServiceInstall | ServiceWithId | undefined;
|
32
39
|
export declare const formatImageLocation: (imageLocation: string) => string;
|
33
40
|
export declare const filterDeviceConfig: (configVars: Dictionary<string>) => void;
|
34
41
|
export declare const setReadTransaction: (newReadTransaction: dbModule.Database["readTransaction"]) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state-get-utils.js","sourceRoot":"","sources":["../../../src/features/device-state/state-get-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACN,gCAAgC,EAChC,oCAAoC,GACpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,4BAA4B,CAAC;
|
1
|
+
{"version":3,"file":"state-get-utils.js","sourceRoot":"","sources":["../../../src/features/device-state/state-get-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACN,gCAAgC,EAChC,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AAG,CAAC,CAAC;QAC1D,yEAAyE;QACzE,IACC,QAAQ,IAAI,IAAI;YAChB,QAAQ,GAAG,4BAA4B,GAAG,IAAI,CAAC,GAAG,EAAE,EACnD,CAAC;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC3C,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;gBACpB,mEAAmE;gBACnE,MAAM,yBAAyB,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;gBACrD,kDAAkD;gBAClD,MAAM,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YACtC,CAAC;YAED,OAAO,MAAM,CAAC;QACf,CAAC;QACD,MAAM,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;IACtC,CAAC,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@balena/open-balena-api",
|
3
3
|
"description": "Internet of things, Made Simple",
|
4
|
-
"version": "29.0.0-build-reduce-service-install-usage-state-get-v3-
|
4
|
+
"version": "29.0.0-build-reduce-service-install-usage-state-get-v3-a1e33179211cf92ec804cef1bf6da07840800b76-1",
|
5
5
|
"license": "AGPL-3.0",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -168,6 +168,6 @@
|
|
168
168
|
"loader": "ts-node/esm/transpile-only"
|
169
169
|
},
|
170
170
|
"versionist": {
|
171
|
-
"publishedAt": "2024-09-
|
171
|
+
"publishedAt": "2024-09-30T11:53:03.898Z"
|
172
172
|
}
|
173
173
|
}
|