mirror of
https://github.com/balena-io/etcher.git
synced 2025-11-12 03:39:26 +00:00
Compare commits
21 Commits
docs
...
aethernet/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
657027248f | ||
|
|
5fd6376f45 | ||
|
|
818dcd3b13 | ||
|
|
52d396aa7e | ||
|
|
c748c2a9c0 | ||
|
|
a5dac57b09 | ||
|
|
8dad81ae34 | ||
|
|
d28719daf2 | ||
|
|
98db4df0dc | ||
|
|
52144f4a6e | ||
|
|
39b02f2168 | ||
|
|
c4d3f8db87 | ||
|
|
6d796df017 | ||
|
|
326a3c740f | ||
|
|
8223130e8d | ||
|
|
3245439744 | ||
|
|
74854f1720 | ||
|
|
4ffda6e208 | ||
|
|
62ac0b98b9 | ||
|
|
ae70c20779 | ||
|
|
e94767aca7 |
6
.github/actions/test/action.yml
vendored
6
.github/actions/test/action.yml
vendored
@@ -55,6 +55,12 @@ runs:
|
|||||||
# fi
|
# fi
|
||||||
|
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
|
# as the shrinkwrap might have been done on mac/linux, this is ensure the package is there for windows
|
||||||
|
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||||
|
npm i -D winusb-driver-generator
|
||||||
|
fi
|
||||||
|
|
||||||
npm run lint
|
npm run lint
|
||||||
npm run package
|
npm run package
|
||||||
npm run wdio # test stage, note that it requires the package to be done first
|
npm run wdio # test stage, note that it requires the package to be done first
|
||||||
|
|||||||
21
.github/workflows/flowzone.yml
vendored
21
.github/workflows/flowzone.yml
vendored
@@ -10,7 +10,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
flowzone:
|
flowzone:
|
||||||
name: Flowzone
|
name: Flowzone
|
||||||
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
|
uses: product-os/flowzone/.github/workflows/flowzone.yml@e1693592a678f92001e1e6ab6feccd1f6acd3715
|
||||||
# prevent duplicate workflows and only allow one `pull_request` or `pull_request_target` for
|
# prevent duplicate workflows and only allow one `pull_request` or `pull_request_target` for
|
||||||
# internal or external contributions respectively
|
# internal or external contributions respectively
|
||||||
if: |
|
if: |
|
||||||
@@ -18,7 +18,24 @@ jobs:
|
|||||||
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target')
|
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target')
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
custom_runs_on: '[["ubuntu-20.04"],["windows-2019"],["macos-12"],["macos-latest-xlarge"]]'
|
custom_test_matrix: >
|
||||||
|
{
|
||||||
|
"os": [
|
||||||
|
["ubuntu-20.04"],
|
||||||
|
["windows-2019"],
|
||||||
|
["macos-12"],
|
||||||
|
["macos-latest-xlarge"]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
custom_publish_matrix: >
|
||||||
|
{
|
||||||
|
"os": [
|
||||||
|
["ubuntu-20.04"],
|
||||||
|
["windows-2019"],
|
||||||
|
["macos-12"],
|
||||||
|
["macos-latest-xlarge"]
|
||||||
|
]
|
||||||
|
}
|
||||||
restrict_custom_actions: false
|
restrict_custom_actions: false
|
||||||
github_prerelease: true
|
github_prerelease: true
|
||||||
cloudflare_website: "etcher"
|
cloudflare_website: "etcher"
|
||||||
|
|||||||
@@ -1,3 +1,77 @@
|
|||||||
|
- commits:
|
||||||
|
- subject: Replace deprecated Flowzone inputs
|
||||||
|
hash: 52d396aa7ea9ae1ef6d68151f582f04f57191b14
|
||||||
|
body: ""
|
||||||
|
footer:
|
||||||
|
Change-type: patch
|
||||||
|
change-type: patch
|
||||||
|
author: Kyle Harding
|
||||||
|
nested: []
|
||||||
|
version: 1.19.22
|
||||||
|
title: ""
|
||||||
|
date: 2024-07-18T18:12:56.368Z
|
||||||
|
- commits:
|
||||||
|
- subject: "patch: fix missing windows dependency"
|
||||||
|
hash: 8dad81ae34b8d71f3d4f7151ee60717e6207ccd8
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: Edwin Joassart
|
||||||
|
nested: []
|
||||||
|
- subject: "patch: fix missing windows dependency"
|
||||||
|
hash: d28719daf249f2994acdf94b4bb7ea937ffcab9b
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: Edwin Joassart
|
||||||
|
nested: []
|
||||||
|
- subject: "patch: fix missing windows dependency"
|
||||||
|
hash: 98db4df0dc147e5fec9180c50f4e21acf1fd0a58
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: Edwin Joassart
|
||||||
|
nested: []
|
||||||
|
version: 1.19.21
|
||||||
|
title: ""
|
||||||
|
date: 2024-05-30T15:00:35.706Z
|
||||||
|
- commits:
|
||||||
|
- subject: "patch: fix missing windows dependency"
|
||||||
|
hash: c4d3f8db8769418925a9909ac700edc5f425a068
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: Edwin Joassart
|
||||||
|
nested: []
|
||||||
|
version: 1.19.20
|
||||||
|
title: ""
|
||||||
|
date: 2024-05-30T10:17:29.075Z
|
||||||
|
- commits:
|
||||||
|
- subject: "patch: add sentry debug flag"
|
||||||
|
hash: 8223130e8dfce180481550d77f022064255601e4
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: Edwin Joassart
|
||||||
|
nested: []
|
||||||
|
version: 1.19.19
|
||||||
|
title: ""
|
||||||
|
date: 2024-05-28T12:09:51.167Z
|
||||||
|
- commits:
|
||||||
|
- subject: "patch: fix Sentry DSN for main process"
|
||||||
|
hash: 4ffda6e208a6e2f109f652d39e1248bec23a2ddf
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: Edwin Joassart
|
||||||
|
nested: []
|
||||||
|
version: 1.19.18
|
||||||
|
title: ""
|
||||||
|
date: 2024-05-22T13:28:03.659Z
|
||||||
|
- commits:
|
||||||
|
- subject: "patch: fix injection of analytics key at build time"
|
||||||
|
hash: e94767aca7b07e674bd60176ef77c11440131ace
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: JOASSART Edwin
|
||||||
|
nested: []
|
||||||
|
version: 1.19.17
|
||||||
|
title: ""
|
||||||
|
date: 2024-05-09T06:33:45.091Z
|
||||||
- commits:
|
- commits:
|
||||||
- subject: "patch: hold request for metadata while waiting for flasher"
|
- subject: "patch: hold request for metadata while waiting for flasher"
|
||||||
hash: 2dfa795129e287f887b9ea02f2eca717575d27ac
|
hash: 2dfa795129e287f887b9ea02f2eca717575d27ac
|
||||||
|
|||||||
32
CHANGELOG.md
32
CHANGELOG.md
@@ -3,6 +3,38 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
# v1.19.22
|
||||||
|
## (2024-07-18)
|
||||||
|
|
||||||
|
* Replace deprecated Flowzone inputs [Kyle Harding]
|
||||||
|
|
||||||
|
# v1.19.21
|
||||||
|
## (2024-05-30)
|
||||||
|
|
||||||
|
* patch: fix missing windows dependency [Edwin Joassart]
|
||||||
|
* patch: fix missing windows dependency [Edwin Joassart]
|
||||||
|
* patch: fix missing windows dependency [Edwin Joassart]
|
||||||
|
|
||||||
|
# v1.19.20
|
||||||
|
## (2024-05-30)
|
||||||
|
|
||||||
|
* patch: fix missing windows dependency [Edwin Joassart]
|
||||||
|
|
||||||
|
# v1.19.19
|
||||||
|
## (2024-05-28)
|
||||||
|
|
||||||
|
* patch: add sentry debug flag [Edwin Joassart]
|
||||||
|
|
||||||
|
# v1.19.18
|
||||||
|
## (2024-05-22)
|
||||||
|
|
||||||
|
* patch: fix Sentry DSN for main process [Edwin Joassart]
|
||||||
|
|
||||||
|
# v1.19.17
|
||||||
|
## (2024-05-09)
|
||||||
|
|
||||||
|
* patch: fix injection of analytics key at build time [JOASSART Edwin]
|
||||||
|
|
||||||
# v1.19.16
|
# v1.19.16
|
||||||
## (2024-04-26)
|
## (2024-04-26)
|
||||||
|
|
||||||
|
|||||||
@@ -136,25 +136,6 @@ const config: ForgeConfig = {
|
|||||||
new sidecar.SidecarPlugin(),
|
new sidecar.SidecarPlugin(),
|
||||||
],
|
],
|
||||||
hooks: {
|
hooks: {
|
||||||
readPackageJson: async (_config, packageJson) => {
|
|
||||||
packageJson.analytics = {};
|
|
||||||
|
|
||||||
if (process.env.SENTRY_TOKEN) {
|
|
||||||
packageJson.analytics.sentry = {
|
|
||||||
token: process.env.SENTRY_TOKEN,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.AMPLITUDE_TOKEN) {
|
|
||||||
packageJson.analytics.amplitude = {
|
|
||||||
token: 'balena-etcher',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// packageJson.packageType = 'dmg' | 'AppImage' | 'rpm' | 'deb' | 'zip' | 'nsis' | 'portable'
|
|
||||||
|
|
||||||
return packageJson;
|
|
||||||
},
|
|
||||||
postPackage: async (_forgeConfig, options) => {
|
postPackage: async (_forgeConfig, options) => {
|
||||||
if (options.platform === 'linux') {
|
if (options.platform === 'linux') {
|
||||||
// symlink the etcher binary from balena-etcher to balenaEtcher to ensure compatibility with the wdio suite and the old name
|
// symlink the etcher binary from balena-etcher to balenaEtcher to ensure compatibility with the wdio suite and the old name
|
||||||
|
|||||||
@@ -14,13 +14,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as _ from 'lodash';
|
import { findLastIndex, once } from 'lodash';
|
||||||
import type { Client } from 'analytics-client';
|
import type { Client } from 'analytics-client';
|
||||||
import { createClient, createNoopClient } from 'analytics-client';
|
import { createClient, createNoopClient } from 'analytics-client';
|
||||||
import * as SentryRenderer from '@sentry/electron/renderer';
|
import * as SentryRenderer from '@sentry/electron/renderer';
|
||||||
import * as settings from '../models/settings';
|
import * as settings from '../models/settings';
|
||||||
import { store } from '../models/store';
|
import { store } from '../models/store';
|
||||||
import * as packageJSON from '../../../../package.json';
|
import { version } from '../../../../package.json';
|
||||||
|
|
||||||
type AnalyticsPayload = _.Dictionary<any>;
|
type AnalyticsPayload = _.Dictionary<any>;
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ export const anonymizePath = (input: string) => {
|
|||||||
const segments = mainPart.split(sep);
|
const segments = mainPart.split(sep);
|
||||||
|
|
||||||
// Moving from the end, find the first marker and cut the path from there.
|
// Moving from the end, find the first marker and cut the path from there.
|
||||||
const startCutIndex = _.findLastIndex(segments, (segment) =>
|
const startCutIndex = findLastIndex(segments, (segment) =>
|
||||||
etcherSegmentMarkers.includes(segment),
|
etcherSegmentMarkers.includes(segment),
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
@@ -119,21 +119,23 @@ let analyticsClient: Client;
|
|||||||
/**
|
/**
|
||||||
* @summary Init analytics configurations
|
* @summary Init analytics configurations
|
||||||
*/
|
*/
|
||||||
export const initAnalytics = _.once(() => {
|
export const initAnalytics = once(() => {
|
||||||
const dsn =
|
const dsn =
|
||||||
settings.getSync('analyticsSentryToken') ||
|
settings.getSync('analyticsSentryToken') || process.env.SENTRY_TOKEN;
|
||||||
_.get(packageJSON, ['analytics', 'sentry', 'token']);
|
SentryRenderer.init({
|
||||||
SentryRenderer.init({ dsn, beforeSend: anonymizeSentryData });
|
dsn,
|
||||||
|
beforeSend: anonymizeSentryData,
|
||||||
|
debug: process.env.ETCHER_SENTRY_DEBUG === 'true',
|
||||||
|
});
|
||||||
|
|
||||||
const projectName =
|
const projectName =
|
||||||
settings.getSync('analyticsAmplitudeToken') ||
|
settings.getSync('analyticsAmplitudeToken') || process.env.AMPLITUDE_TOKEN;
|
||||||
_.get(packageJSON, ['analytics', 'amplitude', 'token']);
|
|
||||||
|
|
||||||
const clientConfig = {
|
const clientConfig = {
|
||||||
projectName,
|
projectName,
|
||||||
endpoint: 'data.balena-cloud.com',
|
endpoint: 'data.balena-cloud.com',
|
||||||
componentName: 'etcher',
|
componentName: 'etcher',
|
||||||
componentVersion: packageJSON.version,
|
componentVersion: version,
|
||||||
};
|
};
|
||||||
analyticsClient = projectName
|
analyticsClient = projectName
|
||||||
? createClient(clientConfig)
|
? createClient(clientConfig)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import { promises as fs } from 'fs';
|
|||||||
import { platform } from 'os';
|
import { platform } from 'os';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import * as lodash from 'lodash';
|
import { once } from 'lodash';
|
||||||
|
|
||||||
import './app/i18n';
|
import './app/i18n';
|
||||||
|
|
||||||
@@ -37,7 +37,6 @@ import * as settings from './app/models/settings';
|
|||||||
import { buildWindowMenu } from './menu';
|
import { buildWindowMenu } from './menu';
|
||||||
import * as i18n from 'i18next';
|
import * as i18n from 'i18next';
|
||||||
import * as SentryMain from '@sentry/electron/main';
|
import * as SentryMain from '@sentry/electron/main';
|
||||||
import * as packageJSON from '../../package.json';
|
|
||||||
import { anonymizeSentryData } from './app/modules/analytics';
|
import { anonymizeSentryData } from './app/modules/analytics';
|
||||||
|
|
||||||
import { delay } from '../shared/utils';
|
import { delay } from '../shared/utils';
|
||||||
@@ -115,12 +114,16 @@ async function getCommandLineURL(argv: string[]): Promise<string | undefined> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const initSentryMain = lodash.once(() => {
|
const initSentryMain = once(() => {
|
||||||
const dsn =
|
const dsn =
|
||||||
settings.getSync('analyticsSentryToken') ||
|
settings.getSync('analyticsSentryToken') || process.env.SENTRY_TOKEN;
|
||||||
lodash.get(packageJSON, ['analytics', 'sentry', 'token']);
|
|
||||||
|
|
||||||
SentryMain.init({ dsn, beforeSend: anonymizeSentryData });
|
SentryMain.init({
|
||||||
|
dsn,
|
||||||
|
beforeSend: anonymizeSentryData,
|
||||||
|
debug: process.env.ETCHER_SENTRY_DEBUG === 'true',
|
||||||
|
});
|
||||||
|
console.log(SentryMain.getCurrentScope());
|
||||||
});
|
});
|
||||||
|
|
||||||
const sourceSelectorReady = new Promise((resolve) => {
|
const sourceSelectorReady = new Promise((resolve) => {
|
||||||
|
|||||||
7
npm-shrinkwrap.json
generated
7
npm-shrinkwrap.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "balena-etcher",
|
"name": "balena-etcher",
|
||||||
"version": "1.19.16",
|
"version": "1.19.22",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "balena-etcher",
|
"name": "balena-etcher",
|
||||||
"version": "1.19.16",
|
"version": "1.19.22",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/remote": "^2.1.2",
|
"@electron/remote": "^2.1.2",
|
||||||
@@ -88,7 +88,8 @@
|
|||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"bufferutil": "^4.0.8",
|
"bufferutil": "^4.0.8",
|
||||||
"utf-8-validate": "^5.0.10"
|
"utf-8-validate": "^5.0.10",
|
||||||
|
"winusb-driver-generator": "2.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@aashutoshrathi/word-wrap": {
|
"node_modules/@aashutoshrathi/word-wrap": {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"displayName": "balenaEtcher",
|
"displayName": "balenaEtcher",
|
||||||
"productName": "balenaEtcher",
|
"productName": "balenaEtcher",
|
||||||
"version": "1.19.16",
|
"version": "1.19.22",
|
||||||
"packageType": "local",
|
"packageType": "local",
|
||||||
"main": ".webpack/main",
|
"main": ".webpack/main",
|
||||||
"description": "Flash OS images to SD cards and USB drives, safely and easily.",
|
"description": "Flash OS images to SD cards and USB drives, safely and easily.",
|
||||||
@@ -147,10 +147,11 @@
|
|||||||
"node": ">=20 <21"
|
"node": ">=20 <21"
|
||||||
},
|
},
|
||||||
"versionist": {
|
"versionist": {
|
||||||
"publishedAt": "2024-04-26T14:33:19.590Z"
|
"publishedAt": "2024-07-18T18:12:56.823Z"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"bufferutil": "^4.0.8",
|
"bufferutil": "^4.0.8",
|
||||||
"utf-8-validate": "^5.0.10"
|
"utf-8-validate": "^5.0.10",
|
||||||
|
"winusb-driver-generator": "2.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
import type { Configuration, ModuleOptions } from 'webpack';
|
import type { Configuration, ModuleOptions } from 'webpack';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
import { BannerPlugin, IgnorePlugin } from 'webpack';
|
import { BannerPlugin, IgnorePlugin, DefinePlugin } from 'webpack';
|
||||||
|
|
||||||
const rules: Required<ModuleOptions>['rules'] = [
|
const rules: Required<ModuleOptions>['rules'] = [
|
||||||
// Add support for native node modules
|
// Add support for native node modules
|
||||||
@@ -61,6 +61,13 @@ const rules: Required<ModuleOptions>['rules'] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const injectAnalyticsToken = new DefinePlugin({
|
||||||
|
'process.env.SENTRY_TOKEN': JSON.stringify(process.env.SENTRY_TOKEN || ''),
|
||||||
|
'process.env.AMPLITUDE_TOKEN': JSON.stringify(
|
||||||
|
process.env.AMPLITUDE_TOKEN || '',
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
export const rendererConfig: Configuration = {
|
export const rendererConfig: Configuration = {
|
||||||
module: {
|
module: {
|
||||||
rules,
|
rules,
|
||||||
@@ -79,6 +86,7 @@ export const rendererConfig: Configuration = {
|
|||||||
banner: '__REACT_DEVTOOLS_GLOBAL_HOOK__ = { isDisabled: true };',
|
banner: '__REACT_DEVTOOLS_GLOBAL_HOOK__ = { isDisabled: true };',
|
||||||
raw: true,
|
raw: true,
|
||||||
}),
|
}),
|
||||||
|
injectAnalyticsToken,
|
||||||
],
|
],
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -100,4 +108,5 @@ export const mainConfig: Configuration = {
|
|||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
|
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
|
||||||
},
|
},
|
||||||
|
plugins: [injectAnalyticsToken],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user