@balena/open-balena-api 26.4.9-build-v6-number-image-image-size--0308f6f13d2f4a063166ff86c726416fcf3c0d03-1 → 26.5.0-build-644-last-api-heartbeat-state-change-event-9576f4a13430576123b476b301b319adf3e81351-1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/balena-model.d.ts +2 -0
- package/dist/balena.sbvr +4 -1
- package/dist/features/device-heartbeat/index.js +10 -3
- package/dist/features/device-heartbeat/index.js.map +1 -1
- package/dist/features/device-state/middleware.d.ts +1 -0
- package/dist/migrations/00093-device-last-api-heartbeat-state-change-event.sql +2 -0
- package/dist/translations/v6/v6.d.ts +0 -1
- package/dist/translations/v6/v6.js +0 -2
- package/dist/translations/v6/v6.js.map +1 -1
- package/dist/translations/v6/v6.sbvr +1 -1
- package/dist/translations/v7/v7.sbvr +3 -0
- package/package.json +2 -2
- package/dist/translations/v6/numeric-big-integer-hack.d.ts +0 -1
- package/dist/translations/v6/numeric-big-integer-hack.js +0 -16
- package/dist/translations/v6/numeric-big-integer-hack.js.map +0 -1
package/dist/balena-model.d.ts
CHANGED
@@ -682,6 +682,7 @@ export interface Device {
|
|
682
682
|
__id: Actor['Read']['id'];
|
683
683
|
} | [Actor['Read']];
|
684
684
|
api_heartbeat_state: 'online' | 'offline' | 'timeout' | 'unknown';
|
685
|
+
changed_api_heartbeat_state_on__date: Types['Date Time']['Read'] | null;
|
685
686
|
uuid: Types['Text']['Read'];
|
686
687
|
local_id: Types['Short Text']['Read'] | null;
|
687
688
|
device_name: Types['Short Text']['Read'] | null;
|
@@ -763,6 +764,7 @@ export interface Device {
|
|
763
764
|
id: Types['Serial']['Write'];
|
764
765
|
actor: Actor['Write']['id'];
|
765
766
|
api_heartbeat_state: 'online' | 'offline' | 'timeout' | 'unknown';
|
767
|
+
changed_api_heartbeat_state_on__date: Types['Date Time']['Write'] | null;
|
766
768
|
uuid: Types['Text']['Write'];
|
767
769
|
local_id: Types['Short Text']['Write'] | null;
|
768
770
|
device_name: Types['Short Text']['Write'] | null;
|
package/dist/balena.sbvr
CHANGED
@@ -374,6 +374,9 @@ Term: device
|
|
374
374
|
Necessity: each device has exactly one api heartbeat state
|
375
375
|
Definition: "online" or "offline" or "timeout" or "unknown"
|
376
376
|
|
377
|
+
Fact type: device [changed api heartbeat state on] date
|
378
|
+
Necessity: each device [changed api heartbeat state on] at most one date.
|
379
|
+
|
377
380
|
Fact type: device has env var name
|
378
381
|
Term Form: device environment variable
|
379
382
|
Database Table Name: device environment variable
|
@@ -451,7 +454,7 @@ Fact type: user (Auth) has public key
|
|
451
454
|
-- user public key
|
452
455
|
|
453
456
|
Fact type: user public key has title
|
454
|
-
|
457
|
+
Necessity: each user public key has exactly one title
|
455
458
|
|
456
459
|
|
457
460
|
-- application type
|
@@ -172,7 +172,7 @@ export class DeviceOnlineStateManager extends EventEmitter {
|
|
172
172
|
let err;
|
173
173
|
try {
|
174
174
|
// patch the api_heartbeat_state value to the new state...
|
175
|
-
const
|
175
|
+
const baseBody = {
|
176
176
|
api_heartbeat_state: newState,
|
177
177
|
};
|
178
178
|
await api.resin.patch({
|
@@ -181,10 +181,17 @@ export class DeviceOnlineStateManager extends EventEmitter {
|
|
181
181
|
id: deviceId,
|
182
182
|
options: {
|
183
183
|
$filter: {
|
184
|
-
$not:
|
184
|
+
$not: baseBody,
|
185
185
|
},
|
186
186
|
},
|
187
|
-
body
|
187
|
+
body: {
|
188
|
+
...baseBody,
|
189
|
+
// Since the heartbeat manager is the only place that we update the heartbeat state
|
190
|
+
// we are updating the heartbeat's change date in here rather than a hook, so that
|
191
|
+
// we can avoid the extra DB request that a generic hook would require for checking
|
192
|
+
// whether the value actually changed or not.
|
193
|
+
changed_api_heartbeat_state_on__date: Date.now(),
|
194
|
+
},
|
188
195
|
});
|
189
196
|
}
|
190
197
|
catch ($err) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/device-heartbeat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,M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AiB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;YAClE,IAAI,+CAA+C,IAAI,IAAI,EAAE,CAAC;gBAC7D,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACxB,CAAC;QACF,CAAC;QAED,yBAAyB;QACzB,MAAM,IAAI,CAAC,8BAA8B,CACxC,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,CAAC,MAAM,EACzB,kBAAkB,CAAC,OAAO,EAC1B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,mGAAmG;QAC9H,SAAS,CACT,CAAC;IACH,CAAC;;AAGF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,wBAAwB,EAAE,CAAC,CAAC"}
|
@@ -9,6 +9,7 @@ export declare const checkDeviceExistsIsFrozen: import("../../infra/cache/multi-
|
|
9
9
|
__id: import("../../balena-model.js").Actor["Read"]["id"];
|
10
10
|
} | [import("../../balena-model.js").Actor["Read"]];
|
11
11
|
api_heartbeat_state: "online" | "offline" | "timeout" | "unknown";
|
12
|
+
changed_api_heartbeat_state_on__date: import("@balena/sbvr-types").Types["Date Time"]["Read"] | null;
|
12
13
|
uuid: import("@balena/sbvr-types").Types["Text"]["Read"];
|
13
14
|
local_id: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
|
14
15
|
device_name: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import './numeric-big-integer-hack.js';
|
2
1
|
export declare const toVersion = "v7";
|
3
2
|
export declare const v6AbstractSqlModel: import("@balena/abstract-sql-compiler").AbstractSqlModel;
|
4
3
|
export declare const getV6Translations: (abstractSqlModel?: import("@balena/abstract-sql-compiler").AbstractSqlModel) => {
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import './numeric-big-integer-hack.js';
|
2
1
|
import { aliasFields, aliasTable, generateAbstractSqlModel, overrideFieldType, renameResourceField, } from '../../abstract-sql-utils.js';
|
3
2
|
import * as userHasDirectAccessToApplication from '../../features/applications/models/user__has_direct_access_to__application.js';
|
4
3
|
import * as DeviceAdditions from '../../features/devices/models/device-additions.js';
|
@@ -14,7 +13,6 @@ overrideFieldType(v6AbstractSqlModel, 'application', 'actor', 'Integer');
|
|
14
13
|
for (const resource of ['device', 'application']) {
|
15
14
|
renameResourceField(v6AbstractSqlModel, resource, 'env var name', 'name');
|
16
15
|
}
|
17
|
-
overrideFieldType(v6AbstractSqlModel, 'image', 'image size', 'Numeric Big Integer');
|
18
16
|
export const getV6Translations = (abstractSqlModel = v6AbstractSqlModel) => {
|
19
17
|
const deviceFieldSet = new Set(abstractSqlModel.tables['device'].fields.map((f) => f.fieldName));
|
20
18
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"v6.js","sourceRoot":"","sources":["../../../src/translations/v6/v6.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"v6.js","sourceRoot":"","sources":["../../../src/translations/v6/v6.ts"],"names":[],"mappings":"AACA,OAAO,EACN,WAAW,EACX,UAAU,EACV,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,gCAAgC,MAAM,+EAA+E,CAAC;AAClI,OAAO,KAAK,eAAe,MAAM,mDAAmD,CAAC;AAErF,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC;AAE9B,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CACzD,IAAI,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACnC,CAAC;AAEF,UAAU,CAAC,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,CAAC,CAAC;AAChE,gCAAgC,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAEhE,iBAAiB,CAAC,kBAAkB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC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S,CAAC,EAAE,OAAO,CAAC;qBACjD;iBACD;gBACD,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;aAC7B;SACD;KAC4C,CAAC;AAChD,CAAC,CAAC"}
|
@@ -379,6 +379,9 @@ Term: device
|
|
379
379
|
Necessity: each device has exactly one api heartbeat state
|
380
380
|
Definition: "online" or "offline" or "timeout" or "unknown"
|
381
381
|
|
382
|
+
Fact type: device [changed api heartbeat state on] date
|
383
|
+
Necessity: each device [changed api heartbeat state on] at most one date.
|
384
|
+
|
382
385
|
Fact type: device has env var name
|
383
386
|
Term Form: device environment variable
|
384
387
|
Database Table Name: device environment variable
|
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.
|
4
|
+
"version": "26.5.0-build-644-last-api-heartbeat-state-change-event-9576f4a13430576123b476b301b319adf3e81351-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-04T10:50:39.479Z"
|
172
172
|
}
|
173
173
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import SbvrTypes from '@balena/sbvr-types';
|
2
|
-
// @ts-expect-error we are augmenting SbvrTypes w/ Numeric Big Integer
|
3
|
-
SbvrTypes.default['Numeric Big Integer'] = {
|
4
|
-
...SbvrTypes.default['Big Integer'],
|
5
|
-
fetchProcessing(data) {
|
6
|
-
if (data == null || typeof data === 'number') {
|
7
|
-
return data;
|
8
|
-
}
|
9
|
-
if (typeof data === 'string') {
|
10
|
-
return parseInt(data, 10);
|
11
|
-
}
|
12
|
-
throw new Error('Fetched Numeric Big Integer value is not valid: ' + typeof data);
|
13
|
-
},
|
14
|
-
validate: SbvrTypes.default.Integer.validate,
|
15
|
-
};
|
16
|
-
//# sourceMappingURL=numeric-big-integer-hack.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"numeric-big-integer-hack.js","sourceRoot":"","sources":["../../../src/translations/v6/numeric-big-integer-hack.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,sEAAsE;AACtE,SAAS,CAAC,OAAO,CAAC,qBAAqB,CAAC,GAAG;IAC1C,GAAG,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC;IAEnC,eAAe,CAAC,IAAI;QACnB,IAAI,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC9C,OAAO,IAAI,CAAC;QACb,CAAC;QACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC3B,CAAC;QACD,MAAM,IAAI,KAAK,CACd,kDAAkD,GAAG,OAAO,IAAI,CAChE,CAAC;IACH,CAAC;IAED,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ;CACiC,CAAC"}
|