Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed balena-image-manager instead of having it as a dependency #2834

Merged
merged 6 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 89 additions & 95 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,12 @@
"@types/jsonwebtoken": "^9.0.6",
"@types/klaw": "^3.0.6",
"@types/lodash": "^4.14.178",
"@types/mime": "^3.0.4",
"@types/mixpanel": "^2.14.3",
"@types/mocha": "^10.0.7",
"@types/mock-fs": "^4.13.4",
"@types/mock-require": "^2.0.1",
"@types/mockery": "^1.4.33",
"@types/ndjson": "^2.0.1",
"@types/node": "^20.0.0",
"@types/node-cleanup": "^2.1.2",
Expand Down Expand Up @@ -178,15 +181,17 @@
"intercept-stdout": "^0.1.2",
"jsonwebtoken": "^9.0.0",
"klaw": "^4.1.0",
"mkdirp": "^3.0.1",
"mocha": "^10.6.0",
"mock-fs": "^5.2.0",
"mock-require": "^3.0.3",
"mockery": "^2.1.0",
"nock": "^13.2.1",
"oclif": "^4.14.0",
"parse-link-header": "^2.0.0",
"rewire": "^7.0.0",
"simple-git": "^3.14.1",
"sinon": "^18.0.0",
"string-to-stream": "^3.0.1",
"ts-node": "^10.4.0",
"typescript": "^5.6.2"
},
Expand All @@ -201,7 +206,6 @@
"balena-device-init": "^7.0.1",
"balena-errors": "^4.7.3",
"balena-image-fs": "^7.0.6",
"balena-image-manager": "^10.0.1",
"balena-preload": "^15.0.6",
"balena-sdk": "^19.7.3",
"balena-semver": "^2.3.0",
Expand Down Expand Up @@ -237,6 +241,8 @@
"JSONStream": "^1.0.3",
"livepush": "^3.5.1",
"lodash": "^4.17.21",
"mime": "^2.4.6",
"mkdirp": "^3.0.1",
"ndjson": "^2.0.0",
"node-cleanup": "^2.1.2",
"node-unzip-2": "^0.2.8",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/os/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default class OsDownloadCmd extends Command {

// balenaOS ESR versions require user authentication
if (options.version) {
const { isESR } = await import('balena-image-manager');
const { isESR } = await import('../../utils/image-manager');
if (options.version === 'menu-esr' || isESR(options.version)) {
try {
await OsDownloadCmd.checkLoggedIn();
Expand Down
4 changes: 2 additions & 2 deletions src/utils/cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ export async function downloadOSImage(
// some ongoing issues with the os download stream.
process.env.ZLIB_FLUSH = 'Z_NO_FLUSH';

const manager = await import('balena-image-manager');
const stream = await manager.get(deviceType, OSVersion);
const { getStream } = await import('./image-manager');
const stream = await getStream(deviceType, OSVersion);

const displayVersion = await new Promise((resolve, reject) => {
stream.on('error', reject);
Expand Down
Loading
Loading