mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 22:47:49 +00:00
Update supervisor to typescript 4
Change-type: patch
This commit is contained in:
parent
5b7bc8a870
commit
fd06c06092
14
package-lock.json
generated
14
package-lock.json
generated
@ -244,6 +244,12 @@
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.9.9",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz",
|
||||
"integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1564,7 +1570,7 @@
|
||||
},
|
||||
"blinking": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "http://registry.npmjs.org/blinking/-/blinking-0.0.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/blinking/-/blinking-0.0.3.tgz",
|
||||
"integrity": "sha1-c6LX+J2z2lSzYFxJiqXYYGv8Hnc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -10112,9 +10118,9 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.9.7",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
|
||||
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz",
|
||||
"integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==",
|
||||
"dev": true
|
||||
},
|
||||
"uglify-js": {
|
||||
|
@ -129,7 +129,7 @@
|
||||
"ts-loader": "^7.0.5",
|
||||
"ts-node": "^8.10.2",
|
||||
"typed-error": "^3.2.1",
|
||||
"typescript": "^3.9.7",
|
||||
"typescript": "^4.2.4",
|
||||
"webpack": "^4.44.1",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"winston": "^3.3.3",
|
||||
|
@ -609,7 +609,7 @@ async function markAsSupervised(image: Image): Promise<void> {
|
||||
);
|
||||
}
|
||||
|
||||
function format(image: Image): Omit<Image, 'id'> {
|
||||
function format(image: Image): Partial<Omit<Image, 'id'>> {
|
||||
return _(image)
|
||||
.defaults({
|
||||
serviceId: null,
|
||||
|
@ -23,7 +23,7 @@ export async function remountAndWriteAtomic(
|
||||
|
||||
export abstract class ConfigBackend {
|
||||
// Does this config backend support the given device type?
|
||||
public abstract async matches(
|
||||
public abstract matches(
|
||||
deviceType: string,
|
||||
metaRelease?: string,
|
||||
): Promise<boolean>;
|
||||
|
@ -468,7 +468,7 @@ function emitAsync<T extends keyof DeviceStateEvents>(
|
||||
: Array<DeviceStateEvents[T]>
|
||||
) {
|
||||
if (_.isArray(args)) {
|
||||
return setImmediate(() => events.emit(ev as any, ...args));
|
||||
return setImmediate(() => events.emit(ev as any, ...(args as any)));
|
||||
} else {
|
||||
return setImmediate(() => events.emit(ev as any, args));
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ exports.up = function (knex) {
|
||||
console.log(
|
||||
'Unable to locate config.json! Things may fail unexpectedly!',
|
||||
);
|
||||
resolve();
|
||||
resolve(false);
|
||||
return;
|
||||
}
|
||||
fs.readFile(configJsonPath, (err, data) => {
|
||||
@ -29,7 +29,7 @@ exports.up = function (knex) {
|
||||
console.log(
|
||||
'Failed to read config.json! Things may fail unexpectedly!',
|
||||
);
|
||||
resolve();
|
||||
resolve(false);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@ -44,13 +44,13 @@ exports.up = function (knex) {
|
||||
);
|
||||
return;
|
||||
}
|
||||
resolve();
|
||||
resolve(false);
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(
|
||||
'Failed to parse config.json! Things may fail unexpectedly!',
|
||||
);
|
||||
resolve();
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
}).then(() => {
|
||||
|
@ -17,7 +17,7 @@ exports.up = function (knex) {
|
||||
console.log(
|
||||
'Failed to read config.json! Things may fail unexpectedly!',
|
||||
);
|
||||
return resolve();
|
||||
return resolve(false);
|
||||
}
|
||||
try {
|
||||
const parsed = JSON.parse(data.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user