@balena/open-balena-api 26.3.0-build-v7-e81e6701adf0958ac1e0e85f46c022e7b822541a-1 → 26.3.0-build-device-update-status-7aacd491f00578f4ed149155afde2a7ac16e7b6f-1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/balena-model.d.ts +4 -0
- package/dist/balena.sbvr +11 -0
- package/dist/features/device-state/hooks.js +9 -0
- package/dist/features/device-state/hooks.js.map +1 -0
- package/dist/features/device-state/middleware.d.ts +2 -0
- package/dist/features/device-state/routes/state-patch-v3.d.ts +2 -0
- package/dist/features/device-state/routes/state-patch-v3.js +21 -0
- package/dist/features/device-state/routes/state-patch-v3.js.map +1 -1
- package/dist/features/device-state/state-patch-utils.d.ts +1 -2
- package/dist/features/device-state/state-patch-utils.js +7 -1
- package/dist/features/device-state/state-patch-utils.js.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +3 -7
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/migrations/00092-add-device-update-status.sql +3 -0
- package/dist/translations/v6/v6.d.ts +4 -4
- package/dist/translations/v6/v6.js +3 -5
- package/dist/translations/v6/v6.js.map +1 -1
- package/dist/translations/v6/v6.sbvr +11 -0
- package/package.json +3 -4
- package/dist/translations/v7/hooks.js +0 -2
- package/dist/translations/v7/hooks.js.map +0 -1
- package/dist/translations/v7/v7.d.ts +0 -3
- package/dist/translations/v7/v7.js +0 -12
- package/dist/translations/v7/v7.js.map +0 -1
- package/dist/translations/v7/v7.sbvr +0 -871
- /package/dist/{translations/v7 → features/device-state}/hooks.d.ts +0 -0
package/dist/balena-model.d.ts
CHANGED
@@ -736,6 +736,8 @@ export interface Device {
|
|
736
736
|
should_be_managed_by__release: {
|
737
737
|
__id: Release['Read']['id'];
|
738
738
|
} | [Release['Read']] | [] | null;
|
739
|
+
update_status: 'rejected' | 'downloading' | 'downloaded' | 'applying changes' | 'aborted' | 'done' | null;
|
740
|
+
last_update_status_event: Types['Date Time']['Read'] | null;
|
739
741
|
is_web_accessible: Types['Boolean']['Read'] | null;
|
740
742
|
is_frozen: Types['Boolean']['Read'] | null;
|
741
743
|
overall_status: Types['Short Text']['Read'] | null;
|
@@ -799,6 +801,8 @@ export interface Device {
|
|
799
801
|
should_be_running__release: Release['Write']['id'] | null;
|
800
802
|
should_be_operated_by__release: Release['Write']['id'] | null;
|
801
803
|
should_be_managed_by__release: Release['Write']['id'] | null;
|
804
|
+
update_status: 'rejected' | 'downloading' | 'downloaded' | 'applying changes' | 'aborted' | 'done' | null;
|
805
|
+
last_update_status_event: Types['Date Time']['Write'] | null;
|
802
806
|
is_web_accessible: Types['Boolean']['Write'] | null;
|
803
807
|
is_frozen: Types['Boolean']['Write'] | null;
|
804
808
|
overall_status: Types['Short Text']['Write'] | null;
|
package/dist/balena.sbvr
CHANGED
@@ -172,6 +172,9 @@ Term: last connectivity event
|
|
172
172
|
Term: last heartbeat
|
173
173
|
Concept Type: Date Time (Type)
|
174
174
|
|
175
|
+
Term: last update status event
|
176
|
+
Concept Type: Date Time (Type)
|
177
|
+
|
175
178
|
Term: last vpn event
|
176
179
|
Concept Type: Date Time (Type)
|
177
180
|
|
@@ -298,6 +301,9 @@ Term: tag key
|
|
298
301
|
Term: title
|
299
302
|
Concept Type: Short Text (Type)
|
300
303
|
|
304
|
+
Term: update status
|
305
|
+
Concept Type: Short Text (Type)
|
306
|
+
|
301
307
|
Term: update timestamp
|
302
308
|
Concept Type: Date Time (Type)
|
303
309
|
|
@@ -591,6 +597,11 @@ Fact type: device should be operated by release
|
|
591
597
|
Fact type: device should be managed by release
|
592
598
|
Synonymous Form: release should manage device
|
593
599
|
Necessity: each device should be managed by at most one release
|
600
|
+
Fact type: device has update status
|
601
|
+
Necessity: each device has at most one update status.
|
602
|
+
Definition: "rejected" or "downloading" or "downloaded" or "applying changes" or "aborted" or "done"
|
603
|
+
Fact type: device has last update status event
|
604
|
+
Necessity: each device has at most one last update status event.
|
594
605
|
|
595
606
|
|
596
607
|
-- application config variable
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { hooks } from '@balena/pinejs';
|
2
|
+
hooks.addPureHook('PATCH', 'resin', 'device', {
|
3
|
+
POSTPARSE({ request }) {
|
4
|
+
if (request.values.update_status !== undefined) {
|
5
|
+
request.values.last_update_status_event = new Date();
|
6
|
+
}
|
7
|
+
},
|
8
|
+
});
|
9
|
+
//# sourceMappingURL=hooks.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/features/device-state/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC7C,SAAS,CAAC,EAAE,OAAO,EAAE;QACpB,IAAI,OAAO,CAAC,MAAM,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YAChD,OAAO,CAAC,MAAM,CAAC,wBAAwB,GAAG,IAAI,IAAI,EAAE,CAAC;QACtD,CAAC;IACF,CAAC;CACD,CAAC,CAAC"}
|
@@ -63,6 +63,8 @@ export declare const checkDeviceExistsIsFrozen: import("../../infra/cache/multi-
|
|
63
63
|
should_be_managed_by__release: {
|
64
64
|
__id: import("../../balena-model.js").Release["Read"]["id"];
|
65
65
|
} | [import("../../balena-model.js").Release["Read"]] | [] | null;
|
66
|
+
update_status: "rejected" | "downloading" | "downloaded" | "applying changes" | "aborted" | "done" | null;
|
67
|
+
last_update_status_event: import("@balena/sbvr-types").Types["Date Time"]["Read"] | null;
|
66
68
|
is_web_accessible: import("@balena/sbvr-types").Types["Boolean"]["Read"] | null;
|
67
69
|
is_frozen: import("@balena/sbvr-types").Types["Boolean"]["Read"] | null;
|
68
70
|
overall_status: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { RequestHandler } from 'express';
|
2
|
+
import type { Device } from '../../../balena-model.js';
|
2
3
|
/**
|
3
4
|
* These typings should be used as a guide to what should be sent, but cannot be trusted as what actually *is* sent.
|
4
5
|
*/
|
@@ -35,6 +36,7 @@ export type StatePatchV3Body = {
|
|
35
36
|
release_uuid?: string;
|
36
37
|
releases?: {
|
37
38
|
[releaseUUID: string]: {
|
39
|
+
update_status?: NonNullable<Device['Write']['update_status']>;
|
38
40
|
services?: {
|
39
41
|
[name: string]: {
|
40
42
|
image: string;
|
@@ -6,6 +6,15 @@ import { metricsPatchFields, v3ValidPatchFields } from '../index.js';
|
|
6
6
|
import { deleteOldImageInstalls, limitMetricNumbers, upsertImageInstall, shouldUpdateMetrics, truncateShortTextFields, } from '../state-patch-utils.js';
|
7
7
|
const { BadRequestError, UnauthorizedError, InternalRequestError } = errors;
|
8
8
|
const { api } = sbvrUtils;
|
9
|
+
var updateStatusPrecedence;
|
10
|
+
(function (updateStatusPrecedence) {
|
11
|
+
updateStatusPrecedence[updateStatusPrecedence["rejected"] = 0] = "rejected";
|
12
|
+
updateStatusPrecedence[updateStatusPrecedence["aborted"] = 1] = "aborted";
|
13
|
+
updateStatusPrecedence[updateStatusPrecedence["downloading"] = 2] = "downloading";
|
14
|
+
updateStatusPrecedence[updateStatusPrecedence["downloaded"] = 3] = "downloaded";
|
15
|
+
updateStatusPrecedence[updateStatusPrecedence["applying changes"] = 4] = "applying changes";
|
16
|
+
updateStatusPrecedence[updateStatusPrecedence["done"] = 5] = "done";
|
17
|
+
})(updateStatusPrecedence || (updateStatusPrecedence = {}));
|
9
18
|
const fetchData = async (req, custom, deviceIds, appReleaseUuids) => await sbvrUtils.db.readTransaction(async (tx) => {
|
10
19
|
const resinApiTx = api.resin.clone({
|
11
20
|
passthrough: { req, custom, tx },
|
@@ -175,6 +184,18 @@ export const statePatchV3 = async (req, res) => {
|
|
175
184
|
deviceBody.is_running__release = release.id;
|
176
185
|
}
|
177
186
|
}
|
187
|
+
const { releases } = apps[userAppUuid];
|
188
|
+
if (releases != null) {
|
189
|
+
for (const { update_status: updateStatus } of Object.values(releases)) {
|
190
|
+
if (updateStatus != null) {
|
191
|
+
if (deviceBody.update_status == null ||
|
192
|
+
updateStatusPrecedence[updateStatus] <
|
193
|
+
updateStatusPrecedence[deviceBody.update_status]) {
|
194
|
+
deviceBody.update_status = updateStatus;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
178
199
|
}
|
179
200
|
if (Object.keys(deviceBody).length > 0) {
|
180
201
|
// truncate for resilient legacy compatible device state patch so that supervisors don't fail
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state-patch-v3.js","sourceRoot":"","sources":["../../../../src/features/device-state/routes/state-patch-v3.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EACN,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EACN,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC;AAC5E,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AAoD1B,MAAM,SAAS,GAAG,KAAK,EACtB,GAAoB,EACpB,MAAiB,EACjB,SAAmB,EACnB,eAKC,EACA,EAAE,CACH,MAAM,SAAS,CAAC,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;IAC/C,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;QAClC,WAAW,EAAE,EAAE,G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;YAC1B,MAAM,SAAS,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;gBAC3C,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;oBAClC,WAAW,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;iBAChC,CAAC,CAAC;gBAEH,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACtE,CAAC,CAAC,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACvB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,IAAI,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;YACrC,OAAO;QACR,CAAC;QACD,gBAAgB,CAAC,GAAG,EAAE,4BAA4B,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QAC7D,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"state-patch-v3.js","sourceRoot":"","sources":["../../../../src/features/device-state/routes/state-patch-v3.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EACN,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EACN,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,yBA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ClC,WAAW,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;iBAChC,CAAC,CAAC;gBAEH,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACtE,CAAC,CAAC,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACvB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,IAAI,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;YACrC,OAAO;QACR,CAAC;QACD,gBAAgB,CAAC,GAAG,EAAE,4BAA4B,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QAC7D,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC"}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import type { ImageInstall } from '../../balena-model.js';
|
2
2
|
import type { StatePatchV2Body } from './routes/state-patch-v2.js';
|
3
|
-
import type { StatePatchV3Body } from './routes/state-patch-v3.js';
|
4
3
|
import type { sbvrUtils } from '@balena/pinejs';
|
5
|
-
export declare const v3ValidPatchFields:
|
4
|
+
export declare const v3ValidPatchFields: ("status" | "is_online" | "ip_address" | "mac_address" | "is_undervolted" | "cpu_id" | "os_version" | "os_variant" | "supervisor_version" | "provisioning_progress" | "provisioning_state" | "api_port" | "api_secret" | "update_status")[];
|
6
5
|
export declare const v2ValidPatchFields: Array<Exclude<keyof NonNullable<StatePatchV2Body['local']>, 'apps'>>;
|
7
6
|
type ValidPatchFields = Array<(typeof v3ValidPatchFields)[number] | (typeof v2ValidPatchFields)[number]>;
|
8
7
|
export declare const truncateShortTextFields: (object: Dictionary<any>, keysToTruncate?: ValidPatchFields) => Dictionary<any>;
|
@@ -15,8 +15,14 @@ export const v3ValidPatchFields = [
|
|
15
15
|
'api_secret',
|
16
16
|
'cpu_id',
|
17
17
|
'is_undervolted',
|
18
|
+
'update_status',
|
19
|
+
];
|
20
|
+
export const v2ValidPatchFields = [
|
21
|
+
...v3ValidPatchFields.filter((f) => f !== 'update_status'),
|
22
|
+
'device_name',
|
23
|
+
'note',
|
24
|
+
'download_progress',
|
18
25
|
];
|
19
|
-
export const v2ValidPatchFields = [...v3ValidPatchFields, 'device_name', 'note', 'download_progress'];
|
20
26
|
const SHORT_TEXT_LENGTH = 255;
|
21
27
|
const ADDRESS_DELIMITER = ' ';
|
22
28
|
// Truncate text at delimiters to input length or less
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state-patch-utils.js","sourceRoot":"","sources":["../../../src/features/device-state/state-patch-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACN,6CAA6C,EAC7C,mCAAmC,EACnC,yBAAyB,EACzB,mCAAmC,GACnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,
|
1
|
+
{"version":3,"file":"state-patch-utils.js","sourceRoot":"","sources":["../../../src/features/device-state/state-patch-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACN,6CAA6C,EAC7C,mCAAmC,EACnC,yBAAyB,EACzB,mCAAmC,GACnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,oBAAoB;IACpB,uBAAuB;IACvB,oBAAoB;IACpB,YAAY;IACZ,aAAa;IACb,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,gBAA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AM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EAC1C,QAAoC,EACpC,QAAgB,EAChB,QAAkB,EACF,EAAE;IAClB,qEAAqE;IACrE,6BAA6B;IAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC9B,WAAW,EAAE,EAAE,GAAG,EAAE,WAAW,CAAC,IAAI,EAAE;KACtC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;IAC5D,MAAM,MAAM,GAAW;QACtB,MAAM,EAAE,QAAQ;KAChB,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IACpD,CAAC;SAAM,CAAC;QACP,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,MAAM,OAAO,CAAC,KAAK,CAAC;QACnB,QAAQ,EAAE,eAAe;QACzB,IAAI;QACJ,OAAO,EAAE;YACR,OAAO,EAAE,MAAM;SACf;KACD,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/hooks.d.ts
CHANGED
@@ -5,6 +5,7 @@ import './features/ci-cd/hooks/index.js';
|
|
5
5
|
import './features/cascade-delete/hooks.js';
|
6
6
|
import './features/devices/hooks/index.js';
|
7
7
|
import './features/device-provisioning/hooks/index.js';
|
8
|
+
import './features/device-state/hooks.js';
|
8
9
|
import './features/device-types/hooks/index.js';
|
9
10
|
import './features/device-urls/hooks.js';
|
10
11
|
import './features/hostapp/hooks/index.js';
|
@@ -14,5 +15,4 @@ import './features/supervisor-app/hooks/index.js';
|
|
14
15
|
import './features/tags/hooks.js';
|
15
16
|
import './features/vars-schema/hooks/index.js';
|
16
17
|
import './features/vpn/hooks.js';
|
17
|
-
import './translations/v7/hooks.js';
|
18
18
|
import './translations/v6/hooks.js';
|
package/dist/hooks.js
CHANGED
@@ -5,6 +5,7 @@ import './features/ci-cd/hooks/index.js';
|
|
5
5
|
import './features/cascade-delete/hooks.js';
|
6
6
|
import './features/devices/hooks/index.js';
|
7
7
|
import './features/device-provisioning/hooks/index.js';
|
8
|
+
import './features/device-state/hooks.js';
|
8
9
|
import './features/device-types/hooks/index.js';
|
9
10
|
import './features/device-urls/hooks.js';
|
10
11
|
import './features/hostapp/hooks/index.js';
|
@@ -14,6 +15,5 @@ import './features/supervisor-app/hooks/index.js';
|
|
14
15
|
import './features/tags/hooks.js';
|
15
16
|
import './features/vars-schema/hooks/index.js';
|
16
17
|
import './features/vpn/hooks.js';
|
17
|
-
import './translations/v7/hooks.js';
|
18
18
|
import './translations/v6/hooks.js';
|
19
19
|
//# sourceMappingURL=hooks.js.map
|
package/dist/hooks.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AACxC,OAAO,wCAAwC,CAAC;AAChD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,iCAAiC,CAAC;AACzC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,+CAA+C,CAAC;AACvD,OAAO,wCAAwC,CAAC;AAChD,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,yCAAyC,CAAC;AACjD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,0CAA0C,CAAC;AAClD,OAAO,0BAA0B,CAAC;AAClC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,yBAAyB,CAAC;AACjC,OAAO,4BAA4B,CAAC
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AACxC,OAAO,wCAAwC,CAAC;AAChD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,iCAAiC,CAAC;AACzC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,+CAA+C,CAAC;AACvD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,wCAAwC,CAAC;AAChD,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,yCAAyC,CAAC;AACjD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,0CAA0C,CAAC;AAClD,OAAO,0BAA0B,CAAC;AAClC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,yBAAyB,CAAC;AACjC,OAAO,4BAA4B,CAAC"}
|
package/dist/index.d.ts
CHANGED
@@ -185,15 +185,11 @@ export declare const envVarsConfig: {
|
|
185
185
|
}[];
|
186
186
|
};
|
187
187
|
export declare const translations: {
|
188
|
-
v7: {
|
189
|
-
getTranslations: (_abstractSqlModel?: import("@balena/abstract-sql-compiler").AbstractSqlModel) => {};
|
190
|
-
loadHooks: () => Promise<typeof import("./translations/v7/hooks.js")>;
|
191
|
-
};
|
192
188
|
v6: {
|
193
189
|
getTranslations: (abstractSqlModel?: import("@balena/abstract-sql-compiler").AbstractSqlModel) => {
|
194
190
|
'my application': {
|
195
191
|
$toResource: string;
|
196
|
-
abstractSql: ["SelectQuery", ["Select", import("@balena/abstract-sql-compiler").AnyTypeNodes[]], ["From", ["Alias", ["Resource", "application$
|
192
|
+
abstractSql: ["SelectQuery", ["Select", import("@balena/abstract-sql-compiler").AnyTypeNodes[]], ["From", ["Alias", ["Resource", "application$resin"], "application"]], ["Where", ["Exists", ["SelectQuery", ["Select", []], ["From", ["Alias", ["Resource", "user-has direct access to-application$resin"], "user-has direct access to-application"]], ["Where", ["Equals", ["ReferencedField", "user-has direct access to-application", "has direct access to-application"], ["ReferencedField", "application", string]]]]]]];
|
197
193
|
};
|
198
194
|
application: {
|
199
195
|
'depends on-application': ["Cast", ["Null"], string];
|
@@ -209,10 +205,10 @@ export declare const translations: {
|
|
209
205
|
'logs channel': ["Cast", ["Null"], string];
|
210
206
|
'vpn address': ["Cast", ["Null"], string];
|
211
207
|
'should be running-release': string;
|
212
|
-
'overall status': ["Case", ["When", import("@balena/abstract-sql-compiler").BooleanTypeNodes, ["EmbeddedText", "inactive"]], ["When", import("@balena/abstract-sql-compiler").EqualsNode, ["EmbeddedText", "post-provisioning"]], ["When", import("@balena/abstract-sql-compiler").AndNode, ["EmbeddedText", "configuring"]], ["When", import("@balena/abstract-sql-compiler").AndNode, ["EmbeddedText", "offline"]], ["When", ["And", ["Exists", ["ReferencedField", "device", "download progress"]], ["Equals", ["ReferencedField", "device", "status"], ["EmbeddedText", "Downloading"]]], ["EmbeddedText", "updating"]], ["When", ["Exists", ["ReferencedField", "device", "provisioning progress"]], ["EmbeddedText", "configuring"]], ["When", ["Exists", ["SelectQuery", ["Select", []], ["From", ["Alias", ["Resource", "device-installs-image$
|
208
|
+
'overall status': ["Case", ["When", import("@balena/abstract-sql-compiler").BooleanTypeNodes, ["EmbeddedText", "inactive"]], ["When", import("@balena/abstract-sql-compiler").EqualsNode, ["EmbeddedText", "post-provisioning"]], ["When", import("@balena/abstract-sql-compiler").AndNode, ["EmbeddedText", "configuring"]], ["When", import("@balena/abstract-sql-compiler").AndNode, ["EmbeddedText", "offline"]], ["When", ["And", ["Exists", ["ReferencedField", "device", "download progress"]], ["Equals", ["ReferencedField", "device", "status"], ["EmbeddedText", "Downloading"]]], ["EmbeddedText", "updating"]], ["When", ["Exists", ["ReferencedField", "device", "provisioning progress"]], ["EmbeddedText", "configuring"]], ["When", ["Exists", ["SelectQuery", ["Select", []], ["From", ["Alias", ["Resource", "device-installs-image$resin$bypass"], "image install"]], ["Where", ["And", ["Equals", ["ReferencedField", "image install", "device"], ["ReferencedField", "device", string]], ["Exists", ["ReferencedField", "image install", "download progress"]], ["Equals", ["ReferencedField", "image install", "status"], ["EmbeddedText", "Downloading"]]]]]], ["EmbeddedText", "updating"]], ["Else", ["EmbeddedText", "idle"]]];
|
213
209
|
};
|
214
210
|
release: {
|
215
|
-
abstractSql: ["SelectQuery", ["Select", import("@balena/abstract-sql-compiler").AnyTypeNodes[]], ["From", ["Alias", ["Resource", "release$
|
211
|
+
abstractSql: ["SelectQuery", ["Select", import("@balena/abstract-sql-compiler").AnyTypeNodes[]], ["From", ["Alias", ["Resource", "release$resin"], "release"]]];
|
216
212
|
};
|
217
213
|
'image-is downloaded by-device': {
|
218
214
|
$toResource: string;
|
package/dist/index.js
CHANGED
@@ -53,7 +53,6 @@ import * as deviceAdditions from './features/devices/models/device-additions.js'
|
|
53
53
|
import { addToModel as addReleaseAdditionsToModel } from './features/ci-cd/models/release-additions.js';
|
54
54
|
import { model as balenaModel } from './balena.js';
|
55
55
|
import { getV6Translations } from './translations/v6/v6.js';
|
56
|
-
import { getV7Translations } from './translations/v7/v7.js';
|
57
56
|
export * as tags from './features/tags/validation.js';
|
58
57
|
export * as request from './infra/request-promise/index.js';
|
59
58
|
export * as redis from './infra/redis/index.js';
|
@@ -152,10 +151,6 @@ export const envVarsConfig = {
|
|
152
151
|
DEVICE_TYPE_SPECIFIC_CONFIG_VAR_PROPERTIES,
|
153
152
|
};
|
154
153
|
export const translations = {
|
155
|
-
v7: {
|
156
|
-
getTranslations: getV7Translations,
|
157
|
-
loadHooks: () => import('./translations/v7/hooks.js'),
|
158
|
-
},
|
159
154
|
v6: {
|
160
155
|
getTranslations: getV6Translations,
|
161
156
|
loadHooks: () => import('./translations/v6/hooks.js'),
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,OAAO,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UAAU,WAAW,CACzB,GAAgB,EAChB,IAAqB;IAErB,IAAI,MAAc,CAAC;IACnB,+CAA+C;IAC/C,mDAAmD;IACnD,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE;QAC9B,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE;QAClC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,EAA8B,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC1E,OAAO,MAAO,CAAC;AAChB,CAAC"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
export declare const toVersion = "
|
1
|
+
export declare const toVersion = "resin";
|
2
2
|
export declare const v6AbstractSqlModel: import("@balena/abstract-sql-compiler").AbstractSqlModel;
|
3
3
|
export declare const getV6Translations: (abstractSqlModel?: import("@balena/abstract-sql-compiler").AbstractSqlModel) => {
|
4
4
|
'my application': {
|
5
5
|
$toResource: string;
|
6
|
-
abstractSql: ["SelectQuery", ["Select", import("@balena/abstract-sql-compiler").AnyTypeNodes[]], ["From", ["Alias", ["Resource", "application$
|
6
|
+
abstractSql: ["SelectQuery", ["Select", import("@balena/abstract-sql-compiler").AnyTypeNodes[]], ["From", ["Alias", ["Resource", "application$resin"], "application"]], ["Where", ["Exists", ["SelectQuery", ["Select", []], ["From", ["Alias", ["Resource", "user-has direct access to-application$resin"], "user-has direct access to-application"]], ["Where", ["Equals", ["ReferencedField", "user-has direct access to-application", "has direct access to-application"], ["ReferencedField", "application", string]]]]]]];
|
7
7
|
};
|
8
8
|
application: {
|
9
9
|
'depends on-application': ["Cast", ["Null"], string];
|
@@ -19,10 +19,10 @@ export declare const getV6Translations: (abstractSqlModel?: import("@balena/abst
|
|
19
19
|
'logs channel': ["Cast", ["Null"], string];
|
20
20
|
'vpn address': ["Cast", ["Null"], string];
|
21
21
|
'should be running-release': string;
|
22
|
-
'overall status': ["Case", ["When", import("@balena/abstract-sql-compiler").BooleanTypeNodes, ["EmbeddedText", "inactive"]], ["When", import("@balena/abstract-sql-compiler").EqualsNode, ["EmbeddedText", "post-provisioning"]], ["When", import("@balena/abstract-sql-compiler").AndNode, ["EmbeddedText", "configuring"]], ["When", import("@balena/abstract-sql-compiler").AndNode, ["EmbeddedText", "offline"]], ["When", ["And", ["Exists", ["ReferencedField", "device", "download progress"]], ["Equals", ["ReferencedField", "device", "status"], ["EmbeddedText", "Downloading"]]], ["EmbeddedText", "updating"]], ["When", ["Exists", ["ReferencedField", "device", "provisioning progress"]], ["EmbeddedText", "configuring"]], ["When", ["Exists", ["SelectQuery", ["Select", []], ["From", ["Alias", ["Resource", "device-installs-image$
|
22
|
+
'overall status': ["Case", ["When", import("@balena/abstract-sql-compiler").BooleanTypeNodes, ["EmbeddedText", "inactive"]], ["When", import("@balena/abstract-sql-compiler").EqualsNode, ["EmbeddedText", "post-provisioning"]], ["When", import("@balena/abstract-sql-compiler").AndNode, ["EmbeddedText", "configuring"]], ["When", import("@balena/abstract-sql-compiler").AndNode, ["EmbeddedText", "offline"]], ["When", ["And", ["Exists", ["ReferencedField", "device", "download progress"]], ["Equals", ["ReferencedField", "device", "status"], ["EmbeddedText", "Downloading"]]], ["EmbeddedText", "updating"]], ["When", ["Exists", ["ReferencedField", "device", "provisioning progress"]], ["EmbeddedText", "configuring"]], ["When", ["Exists", ["SelectQuery", ["Select", []], ["From", ["Alias", ["Resource", "device-installs-image$resin$bypass"], "image install"]], ["Where", ["And", ["Equals", ["ReferencedField", "image install", "device"], ["ReferencedField", "device", string]], ["Exists", ["ReferencedField", "image install", "download progress"]], ["Equals", ["ReferencedField", "image install", "status"], ["EmbeddedText", "Downloading"]]]]]], ["EmbeddedText", "updating"]], ["Else", ["EmbeddedText", "idle"]]];
|
23
23
|
};
|
24
24
|
release: {
|
25
|
-
abstractSql: ["SelectQuery", ["Select", import("@balena/abstract-sql-compiler").AnyTypeNodes[]], ["From", ["Alias", ["Resource", "release$
|
25
|
+
abstractSql: ["SelectQuery", ["Select", import("@balena/abstract-sql-compiler").AnyTypeNodes[]], ["From", ["Alias", ["Resource", "release$resin"], "release"]]];
|
26
26
|
};
|
27
27
|
'image-is downloaded by-device': {
|
28
28
|
$toResource: string;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { aliasFields, aliasTable, generateAbstractSqlModel, overrideFieldType, renameResourceField, } from '../../abstract-sql-utils.js';
|
2
2
|
import * as userHasDirectAccessToApplication from '../../features/applications/models/user__has_direct_access_to__application.js';
|
3
3
|
import * as DeviceAdditions from '../../features/devices/models/device-additions.js';
|
4
|
-
export const toVersion = '
|
4
|
+
export const toVersion = 'resin';
|
5
5
|
export const v6AbstractSqlModel = generateAbstractSqlModel(new URL('v6.sbvr', import.meta.url));
|
6
6
|
aliasTable(v6AbstractSqlModel, 'application', 'my application');
|
7
7
|
userHasDirectAccessToApplication.addToModel(v6AbstractSqlModel);
|
@@ -69,12 +69,10 @@ export const getV6Translations = (abstractSqlModel = v6AbstractSqlModel) => {
|
|
69
69
|
'depends on-application': ['Cast', ['Null'], 'Integer'],
|
70
70
|
},
|
71
71
|
'application-has-name': {
|
72
|
-
|
73
|
-
$toResource: `application-has-config var name$resin`,
|
72
|
+
$toResource: `application-has-config var name$${toVersion}`,
|
74
73
|
},
|
75
74
|
'device-has-name': {
|
76
|
-
|
77
|
-
$toResource: `device-has-config var name$resin`,
|
75
|
+
$toResource: `device-has-config var name$${toVersion}`,
|
78
76
|
},
|
79
77
|
device: {
|
80
78
|
'is managed by-device': ['Cast', ['Null'], 'Integer'],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"v6.js","sourceRoot":"","sources":["../../../src/translations/v6/v6.ts"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B,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC;6BAC5D;4BACD,MAAM;yBACN;qBACD,CAAC;iBACF;gBACD,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,UAAU,EAAE,WAAW,SAAS,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;aACpE;SACD;QACD,+BAA+B,EAAE;YAChC,uGAAuG;YACvG,8GAA8G;YAC9G,wCAAwC;YACxC,WAAW,EAAE,UAAU,SAAS,EAAE;YAClC,WAAW,EAAE;gBACZ,aAAa;gBACb;oBACC,QAAQ;oBACR;wBACC,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC;wBAC9C,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,CAAC;wBACnD,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE,yBAAyB,CAAC;wBACnE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,EAAE,QAAQ,CAAC;wBACrD,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE,mBAAmB,CAAC;wBAC7D,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC;qBACjD;iBACD;gBACD,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;aAC7B;SACD;KAC4C,CAAC;AAChD,CAAC,CAAC"}
|
@@ -163,6 +163,9 @@ Term: last connectivity event
|
|
163
163
|
Term: last heartbeat
|
164
164
|
Concept Type: Date Time (Type)
|
165
165
|
|
166
|
+
Term: last update status event
|
167
|
+
Concept Type: Date Time (Type)
|
168
|
+
|
166
169
|
Term: last vpn event
|
167
170
|
Concept Type: Date Time (Type)
|
168
171
|
|
@@ -307,6 +310,9 @@ Term: tag key
|
|
307
310
|
Term: title
|
308
311
|
Concept Type: Short Text (Type)
|
309
312
|
|
313
|
+
Term: update status
|
314
|
+
Concept Type: Short Text (Type)
|
315
|
+
|
310
316
|
Term: update timestamp
|
311
317
|
Concept Type: Date Time (Type)
|
312
318
|
|
@@ -612,6 +618,11 @@ Fact type: device should be operated by release
|
|
612
618
|
Fact type: device1 is managed by device2
|
613
619
|
Synonymous Form: device2 manages device1
|
614
620
|
Necessity: each device1 is managed by at most one device2.
|
621
|
+
Fact type: device has update status
|
622
|
+
Necessity: each device has at most one update status.
|
623
|
+
Definition: "rejected" or "downloading" or "downloaded" or "applying changes" or "aborted" or "done"
|
624
|
+
Fact type: device has last update status event
|
625
|
+
Necessity: each device has at most one last update status event.
|
615
626
|
|
616
627
|
-- application config variable
|
617
628
|
|
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": "26.3.0-build-
|
4
|
+
"version": "26.3.0-build-device-update-status-7aacd491f00578f4ed149155afde2a7ac16e7b6f-1",
|
5
5
|
"license": "AGPL-3.0",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -16,8 +16,7 @@
|
|
16
16
|
"./models/balena.sbvr": "./dist/balena.sbvr",
|
17
17
|
"./models/balena-model.d.ts": "./dist/balena-model.d.ts",
|
18
18
|
"./models/balena-init.sql": "./dist/balena-init.sql",
|
19
|
-
"./models/v6.sbvr": "./dist/translations/v6/v6.sbvr"
|
20
|
-
"./models/v7.sbvr": "./dist/translations/v7/v7.sbvr"
|
19
|
+
"./models/v6.sbvr": "./dist/translations/v6/v6.sbvr"
|
21
20
|
},
|
22
21
|
"files": [
|
23
22
|
"dist/"
|
@@ -168,6 +167,6 @@
|
|
168
167
|
"loader": "ts-node/esm/transpile-only"
|
169
168
|
},
|
170
169
|
"versionist": {
|
171
|
-
"publishedAt": "2024-08-
|
170
|
+
"publishedAt": "2024-08-12T14:58:44.006Z"
|
172
171
|
}
|
173
172
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/translations/v7/hooks.ts"],"names":[],"mappings":""}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { generateAbstractSqlModel, overrideFieldType, renameVarResourcesName, } from '../../abstract-sql-utils.js';
|
2
|
-
import * as userHasDirectAccessToApplication from '../../features/applications/models/user__has_direct_access_to__application.js';
|
3
|
-
export const toVersion = 'resin';
|
4
|
-
export const v7AbstractSqlModel = generateAbstractSqlModel(new URL('v7.sbvr', import.meta.url));
|
5
|
-
renameVarResourcesName(v7AbstractSqlModel);
|
6
|
-
overrideFieldType(v7AbstractSqlModel, 'release', 'version', 'JSON');
|
7
|
-
userHasDirectAccessToApplication.addToModel(v7AbstractSqlModel);
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- So that the interface is already well defined.
|
9
|
-
export const getV7Translations = (_abstractSqlModel = v7AbstractSqlModel) => {
|
10
|
-
return {};
|
11
|
-
};
|
12
|
-
//# sourceMappingURL=v7.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"v7.js","sourceRoot":"","sources":["../../../src/translations/v7/v7.ts"],"names":[],"mappings":"AACA,OAAO,EACN,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,gCAAgC,MAAM,+EAA+E,CAAC;AAElI,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CACzD,IAAI,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACnC,CAAC;AAEF,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;AAE3C,iBAAiB,CAAC,kBAAkB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAEpE,gCAAgC,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAChE,+GAA+G;AAC/G,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,iBAAiB,GAAG,kBAAkB,EAAE,EAAE;IAC3E,OAAO,EAA+C,CAAC;AACxD,CAAC,CAAC"}
|