mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-18 21:27:54 +00:00
Merge pull request #2313 from balena-os/update-dependencies-node-20-pt-2
Update more dependencies for Node 20, patch some NPM vulnerabilities
This commit is contained in:
commit
3e862eee17
938
package-lock.json
generated
938
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -66,9 +66,9 @@
|
||||
"@types/shell-quote": "^1.7.1",
|
||||
"@types/sinon": "^17.0.3",
|
||||
"@types/sinon-chai": "^3.2.12",
|
||||
"@types/supertest": "^6.0.0",
|
||||
"@types/supertest": "^6.0.2",
|
||||
"@types/webpack": "^5.28.0",
|
||||
"@types/yargs": "^15.0.14",
|
||||
"@types/yargs": "^17.0.32",
|
||||
"balena-auth": "^6.0.1",
|
||||
"balena-register-device": "^9.0.2",
|
||||
"balena-request": "^13.3.1",
|
||||
@ -88,7 +88,7 @@
|
||||
"duration-js": "^4.0.0",
|
||||
"event-stream": "3.3.5",
|
||||
"express": "^4.17.1",
|
||||
"fork-ts-checker-webpack-plugin": "^7.2.13",
|
||||
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
||||
"fp-ts": "^2.8.1",
|
||||
"got": "14.2.1",
|
||||
"husky": "^8.0.1",
|
||||
@ -122,9 +122,9 @@
|
||||
"sinon": "^17.0.1",
|
||||
"sinon-chai": "^3.7.0",
|
||||
"strict-event-emitter-types": "^2.0.0",
|
||||
"supertest": "^6.1.3",
|
||||
"supertest": "^7.0.0",
|
||||
"systeminformation": "^5.22.7",
|
||||
"tar-stream": "^2.1.3",
|
||||
"tar-stream": "^3.1.7",
|
||||
"terser-webpack-plugin": "^5.3.6",
|
||||
"ts-loader": "^9.4.0",
|
||||
"ts-node": "^10.0.0",
|
||||
@ -134,7 +134,7 @@
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-cli": "^5.0.0",
|
||||
"winston": "^3.3.3",
|
||||
"yargs": "^15.4.1"
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"versionist": {
|
||||
"publishedAt": "2024-04-24T15:13:31.680Z"
|
||||
|
96
sync/sync.ts
96
sync/sync.ts
@ -14,46 +14,58 @@ Usage:
|
||||
npm run sync <device IP>
|
||||
`;
|
||||
|
||||
const argv = yargs
|
||||
.command(
|
||||
'$0 <device-address>',
|
||||
'Sync changes in code to a running debug mode supervisor on a local device',
|
||||
(y) =>
|
||||
y.positional('device-address', {
|
||||
type: 'string',
|
||||
describe: 'The address of a local device',
|
||||
}),
|
||||
)
|
||||
.option('device-arch', {
|
||||
alias: 'a',
|
||||
type: 'string',
|
||||
description:
|
||||
'Specify the device architecture (use this when the automatic detection fails)',
|
||||
choices: ['amd64', 'i386', 'aarch64', 'armv7hf', 'rpi'],
|
||||
})
|
||||
.options('image-name', {
|
||||
alias: 'i',
|
||||
type: 'string',
|
||||
description: 'Specify the name to use for the supervisor image on device',
|
||||
default: `livepush-supervisor-${packageJson.version}`,
|
||||
})
|
||||
.options('image-tag', {
|
||||
alias: 't',
|
||||
type: 'string',
|
||||
description:
|
||||
'Specify the tag to use for the supervisor image on device. It will not have any effect on balenaOS >= v2.89.0',
|
||||
default: 'latest',
|
||||
deprecated: true,
|
||||
})
|
||||
.options('nocache', {
|
||||
description: 'Run the intial build without cache',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
})
|
||||
.usage(helpText)
|
||||
.version(false)
|
||||
.scriptName('npm run sync --')
|
||||
.alias('h', 'help').argv;
|
||||
interface ArgV {
|
||||
'device-address': string;
|
||||
'device-arch': string;
|
||||
'image-name': string;
|
||||
'image-tag': string;
|
||||
nocache: boolean;
|
||||
}
|
||||
|
||||
const argv =
|
||||
// TypeScript doesn't infer `device-address` to be part of argv so we cast it
|
||||
yargs
|
||||
.command(
|
||||
'$0 <device-address>',
|
||||
'Sync changes in code to a running debug mode supervisor on a local device',
|
||||
(y) =>
|
||||
y.positional('device-address', {
|
||||
type: 'string',
|
||||
describe: 'The address of a local device',
|
||||
demandOption: true,
|
||||
}),
|
||||
)
|
||||
.option('device-arch', {
|
||||
alias: 'a',
|
||||
type: 'string',
|
||||
description:
|
||||
'Specify the device architecture (use this when the automatic detection fails)',
|
||||
choices: ['amd64', 'i386', 'aarch64', 'armv7hf', 'rpi'],
|
||||
demandOption: true,
|
||||
})
|
||||
.options('image-name', {
|
||||
alias: 'i',
|
||||
type: 'string',
|
||||
description: 'Specify the name to use for the supervisor image on device',
|
||||
default: `livepush-supervisor-${packageJson.version}`,
|
||||
})
|
||||
.options('image-tag', {
|
||||
alias: 't',
|
||||
type: 'string',
|
||||
description:
|
||||
'Specify the tag to use for the supervisor image on device. It will not have any effect on balenaOS >= v2.89.0',
|
||||
default: 'latest',
|
||||
deprecated: true,
|
||||
})
|
||||
.options('nocache', {
|
||||
description: 'Run the intial build without cache',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
})
|
||||
.usage(helpText)
|
||||
.version(false)
|
||||
.scriptName('npm run sync --')
|
||||
.alias('h', 'help').argv as unknown as ArgV;
|
||||
|
||||
void (async () => {
|
||||
const address = argv['device-address']!;
|
||||
@ -72,10 +84,10 @@ void (async () => {
|
||||
address,
|
||||
docker,
|
||||
dockerfile,
|
||||
imageName: argv['image-name'],
|
||||
imageTag: argv['image-tag'],
|
||||
arch: argv['device-arch'],
|
||||
nocache: argv['nocache'],
|
||||
imageName: argv['image-name'],
|
||||
imageTag: argv['image-tag'],
|
||||
});
|
||||
// Another newline to separate build and livepush output
|
||||
console.log(`Supervisor container: ${containerId}\n`);
|
||||
|
Loading…
Reference in New Issue
Block a user