mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-03 04:26:44 +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",
|
"once": "^1.3.0",
|
||||||
"path-is-absolute": "^1.0.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": {
|
"blinking": {
|
||||||
"version": "0.0.3",
|
"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=",
|
"integrity": "sha1-c6LX+J2z2lSzYFxJiqXYYGv8Hnc=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -10112,9 +10118,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.9.7",
|
"version": "4.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz",
|
||||||
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
|
"integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"uglify-js": {
|
"uglify-js": {
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
"ts-loader": "^7.0.5",
|
"ts-loader": "^7.0.5",
|
||||||
"ts-node": "^8.10.2",
|
"ts-node": "^8.10.2",
|
||||||
"typed-error": "^3.2.1",
|
"typed-error": "^3.2.1",
|
||||||
"typescript": "^3.9.7",
|
"typescript": "^4.2.4",
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-cli": "^3.3.12",
|
"webpack-cli": "^3.3.12",
|
||||||
"winston": "^3.3.3",
|
"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)
|
return _(image)
|
||||||
.defaults({
|
.defaults({
|
||||||
serviceId: null,
|
serviceId: null,
|
||||||
|
@ -23,7 +23,7 @@ export async function remountAndWriteAtomic(
|
|||||||
|
|
||||||
export abstract class ConfigBackend {
|
export abstract class ConfigBackend {
|
||||||
// Does this config backend support the given device type?
|
// Does this config backend support the given device type?
|
||||||
public abstract async matches(
|
public abstract matches(
|
||||||
deviceType: string,
|
deviceType: string,
|
||||||
metaRelease?: string,
|
metaRelease?: string,
|
||||||
): Promise<boolean>;
|
): Promise<boolean>;
|
||||||
|
@ -468,7 +468,7 @@ function emitAsync<T extends keyof DeviceStateEvents>(
|
|||||||
: Array<DeviceStateEvents[T]>
|
: Array<DeviceStateEvents[T]>
|
||||||
) {
|
) {
|
||||||
if (_.isArray(args)) {
|
if (_.isArray(args)) {
|
||||||
return setImmediate(() => events.emit(ev as any, ...args));
|
return setImmediate(() => events.emit(ev as any, ...(args as any)));
|
||||||
} else {
|
} else {
|
||||||
return setImmediate(() => events.emit(ev as any, args));
|
return setImmediate(() => events.emit(ev as any, args));
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ exports.up = function (knex) {
|
|||||||
console.log(
|
console.log(
|
||||||
'Unable to locate config.json! Things may fail unexpectedly!',
|
'Unable to locate config.json! Things may fail unexpectedly!',
|
||||||
);
|
);
|
||||||
resolve();
|
resolve(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fs.readFile(configJsonPath, (err, data) => {
|
fs.readFile(configJsonPath, (err, data) => {
|
||||||
@ -29,7 +29,7 @@ exports.up = function (knex) {
|
|||||||
console.log(
|
console.log(
|
||||||
'Failed to read config.json! Things may fail unexpectedly!',
|
'Failed to read config.json! Things may fail unexpectedly!',
|
||||||
);
|
);
|
||||||
resolve();
|
resolve(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -44,13 +44,13 @@ exports.up = function (knex) {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
resolve();
|
resolve(false);
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(
|
console.log(
|
||||||
'Failed to parse config.json! Things may fail unexpectedly!',
|
'Failed to parse config.json! Things may fail unexpectedly!',
|
||||||
);
|
);
|
||||||
resolve();
|
resolve(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
@ -17,7 +17,7 @@ exports.up = function (knex) {
|
|||||||
console.log(
|
console.log(
|
||||||
'Failed to read config.json! Things may fail unexpectedly!',
|
'Failed to read config.json! Things may fail unexpectedly!',
|
||||||
);
|
);
|
||||||
return resolve();
|
return resolve(false);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const parsed = JSON.parse(data.toString());
|
const parsed = JSON.parse(data.toString());
|
||||||
|
Loading…
Reference in New Issue
Block a user