mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 11:16:39 +00:00
patch: bump @balena/lint to 8.0.2 and fix formating
This commit is contained in:
parent
0642611079
commit
4aa4140d65
@ -1,5 +1,5 @@
|
|||||||
import { PluginBase } from '@electron-forge/plugin-base';
|
import { PluginBase } from '@electron-forge/plugin-base';
|
||||||
import {
|
import type {
|
||||||
ForgeHookMap,
|
ForgeHookMap,
|
||||||
ResolvedForgeConfig,
|
ResolvedForgeConfig,
|
||||||
} from '@electron-forge/shared-types';
|
} from '@electron-forge/shared-types';
|
||||||
|
@ -16,14 +16,15 @@
|
|||||||
|
|
||||||
import * as electron from 'electron';
|
import * as electron from 'electron';
|
||||||
import * as remote from '@electron/remote';
|
import * as remote from '@electron/remote';
|
||||||
import { debounce, capitalize, Dictionary, values } from 'lodash';
|
import type { Dictionary } from 'lodash';
|
||||||
|
import { debounce, capitalize, values } from 'lodash';
|
||||||
import outdent from 'outdent';
|
import outdent from 'outdent';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import * as ReactDOM from 'react-dom';
|
import * as ReactDOM from 'react-dom';
|
||||||
import { v4 as uuidV4 } from 'uuid';
|
import { v4 as uuidV4 } from 'uuid';
|
||||||
|
|
||||||
import * as packageJSON from '../../../package.json';
|
import * as packageJSON from '../../../package.json';
|
||||||
import { DrivelistDrive } from '../../shared/drive-constraints';
|
import type { DrivelistDrive } from '../../shared/drive-constraints';
|
||||||
import * as EXIT_CODES from '../../shared/exit-codes';
|
import * as EXIT_CODES from '../../shared/exit-codes';
|
||||||
import * as messages from '../../shared/messages';
|
import * as messages from '../../shared/messages';
|
||||||
import * as availableDrives from './models/available-drives';
|
import * as availableDrives from './models/available-drives';
|
||||||
@ -38,7 +39,7 @@ import * as windowProgress from './os/window-progress';
|
|||||||
import MainPage from './pages/main/MainPage';
|
import MainPage from './pages/main/MainPage';
|
||||||
import './css/main.css';
|
import './css/main.css';
|
||||||
import * as i18next from 'i18next';
|
import * as i18next from 'i18next';
|
||||||
import { SourceMetadata } from '../../shared/typings/source-selector';
|
import type { SourceMetadata } from '../../shared/typings/source-selector';
|
||||||
|
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
'unhandledrejection',
|
'unhandledrejection',
|
||||||
|
@ -16,16 +16,19 @@
|
|||||||
|
|
||||||
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
|
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
|
||||||
import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg';
|
import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg';
|
||||||
import * as sourceDestination from 'etcher-sdk/build/source-destination/';
|
import type * as sourceDestination from 'etcher-sdk/build/source-destination/';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Flex, ModalProps, Txt, Badge, Link, TableColumn } from 'rendition';
|
import type { ModalProps, TableColumn } from 'rendition';
|
||||||
|
import { Flex, Txt, Badge, Link } from 'rendition';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
import type {
|
||||||
|
DriveStatus,
|
||||||
|
DrivelistDrive,
|
||||||
|
} from '../../../../shared/drive-constraints';
|
||||||
import {
|
import {
|
||||||
getDriveImageCompatibilityStatuses,
|
getDriveImageCompatibilityStatuses,
|
||||||
isDriveValid,
|
isDriveValid,
|
||||||
DriveStatus,
|
|
||||||
DrivelistDrive,
|
|
||||||
isDriveSizeLarge,
|
isDriveSizeLarge,
|
||||||
} from '../../../../shared/drive-constraints';
|
} from '../../../../shared/drive-constraints';
|
||||||
import { compatibility, warning } from '../../../../shared/messages';
|
import { compatibility, warning } from '../../../../shared/messages';
|
||||||
@ -35,14 +38,10 @@ import { getImage, isDriveSelected } from '../../models/selection-state';
|
|||||||
import { store } from '../../models/store';
|
import { store } from '../../models/store';
|
||||||
import { logEvent, logException } from '../../modules/analytics';
|
import { logEvent, logException } from '../../modules/analytics';
|
||||||
import { open as openExternal } from '../../os/open-external/services/open-external';
|
import { open as openExternal } from '../../os/open-external/services/open-external';
|
||||||
import {
|
import type { GenericTableProps } from '../../styled-components';
|
||||||
Alert,
|
import { Alert, Modal, Table } from '../../styled-components';
|
||||||
GenericTableProps,
|
|
||||||
Modal,
|
|
||||||
Table,
|
|
||||||
} from '../../styled-components';
|
|
||||||
|
|
||||||
import { SourceMetadata } from '../../../../shared/typings/source-selector';
|
import type { SourceMetadata } from '../../../../shared/typings/source-selector';
|
||||||
import { middleEllipsis } from '../../utils/middle-ellipsis';
|
import { middleEllipsis } from '../../utils/middle-ellipsis';
|
||||||
import * as i18next from 'i18next';
|
import * as i18next from 'i18next';
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
|
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Badge, Flex, Txt, ModalProps } from 'rendition';
|
import type { ModalProps } from 'rendition';
|
||||||
|
import { Badge, Flex, Txt } from 'rendition';
|
||||||
import { Modal, ScrollableFlex } from '../../styled-components';
|
import { Modal, ScrollableFlex } from '../../styled-components';
|
||||||
import { middleEllipsis } from '../../utils/middle-ellipsis';
|
import { middleEllipsis } from '../../utils/middle-ellipsis';
|
||||||
|
|
||||||
import prettyBytes from 'pretty-bytes';
|
import prettyBytes from 'pretty-bytes';
|
||||||
import { DriveWithWarnings } from '../../pages/main/Flash';
|
import type { DriveWithWarnings } from '../../pages/main/Flash';
|
||||||
import * as i18next from 'i18next';
|
import * as i18next from 'i18next';
|
||||||
|
|
||||||
const DriveStatusWarningModal = ({
|
const DriveStatusWarningModal = ({
|
||||||
|
@ -24,7 +24,8 @@ import * as settings from '../../models/settings';
|
|||||||
import { Actions, store } from '../../models/store';
|
import { Actions, store } from '../../models/store';
|
||||||
import * as analytics from '../../modules/analytics';
|
import * as analytics from '../../modules/analytics';
|
||||||
import { FlashAnother } from '../flash-another/flash-another';
|
import { FlashAnother } from '../flash-another/flash-another';
|
||||||
import { FlashResults, FlashError } from '../flash-results/flash-results';
|
import type { FlashError } from '../flash-results/flash-results';
|
||||||
|
import { FlashResults } from '../flash-results/flash-results';
|
||||||
import { SafeWebview } from '../safe-webview/safe-webview';
|
import { SafeWebview } from '../safe-webview/safe-webview';
|
||||||
|
|
||||||
function restart(goToMain: () => void) {
|
function restart(goToMain: () => void) {
|
||||||
|
@ -18,7 +18,8 @@ import CircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle.svg';
|
|||||||
import CheckCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-check.svg';
|
import CheckCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-check.svg';
|
||||||
import TimesCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-xmark.svg';
|
import TimesCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-xmark.svg';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Flex, FlexProps, Link, TableColumn, Txt } from 'rendition';
|
import type { FlexProps, TableColumn } from 'rendition';
|
||||||
|
import { Flex, Link, Txt } from 'rendition';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { progress } from '../../../../shared/messages';
|
import { progress } from '../../../../shared/messages';
|
||||||
|
@ -20,16 +20,17 @@ import LinkSvg from '@fortawesome/fontawesome-free/svgs/solid/link.svg';
|
|||||||
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
|
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
|
||||||
import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg';
|
import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg';
|
||||||
import ChevronRightSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-right.svg';
|
import ChevronRightSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-right.svg';
|
||||||
import { ipcRenderer, IpcRendererEvent } from 'electron';
|
import type { IpcRendererEvent } from 'electron';
|
||||||
|
import { ipcRenderer } from 'electron';
|
||||||
import { uniqBy, isNil } from 'lodash';
|
import { uniqBy, isNil } from 'lodash';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import prettyBytes from 'pretty-bytes';
|
import prettyBytes from 'pretty-bytes';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { requestMetadata } from '../../app';
|
import { requestMetadata } from '../../app';
|
||||||
|
|
||||||
|
import type { ButtonProps } from 'rendition';
|
||||||
import {
|
import {
|
||||||
Flex,
|
Flex,
|
||||||
ButtonProps,
|
|
||||||
Modal as SmallModal,
|
Modal as SmallModal,
|
||||||
Txt,
|
Txt,
|
||||||
Card as BaseCard,
|
Card as BaseCard,
|
||||||
@ -63,9 +64,9 @@ import { SVGIcon } from '../svg-icon/svg-icon';
|
|||||||
import ImageSvg from '../../../assets/image.svg';
|
import ImageSvg from '../../../assets/image.svg';
|
||||||
import SrcSvg from '../../../assets/src.svg';
|
import SrcSvg from '../../../assets/src.svg';
|
||||||
import { DriveSelector } from '../drive-selector/drive-selector';
|
import { DriveSelector } from '../drive-selector/drive-selector';
|
||||||
import { DrivelistDrive } from '../../../../shared/drive-constraints';
|
import type { DrivelistDrive } from '../../../../shared/drive-constraints';
|
||||||
import { isJson } from '../../../../shared/utils';
|
import { isJson } from '../../../../shared/utils';
|
||||||
import {
|
import type {
|
||||||
SourceMetadata,
|
SourceMetadata,
|
||||||
Authentication,
|
Authentication,
|
||||||
Source,
|
Source,
|
||||||
|
@ -16,12 +16,11 @@
|
|||||||
|
|
||||||
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
|
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Flex, FlexProps, Txt } from 'rendition';
|
import type { FlexProps } from 'rendition';
|
||||||
|
import { Flex, Txt } from 'rendition';
|
||||||
|
|
||||||
import {
|
import type { DriveStatus } from '../../../../shared/drive-constraints';
|
||||||
getDriveImageCompatibilityStatuses,
|
import { getDriveImageCompatibilityStatuses } from '../../../../shared/drive-constraints';
|
||||||
DriveStatus,
|
|
||||||
} from '../../../../shared/drive-constraints';
|
|
||||||
import { compatibility, warning } from '../../../../shared/messages';
|
import { compatibility, warning } from '../../../../shared/messages';
|
||||||
import prettyBytes from 'pretty-bytes';
|
import prettyBytes from 'pretty-bytes';
|
||||||
import { getImage, getSelectedDrives } from '../../models/selection-state';
|
import { getImage, getSelectedDrives } from '../../models/selection-state';
|
||||||
|
@ -17,10 +17,8 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Flex, Txt } from 'rendition';
|
import { Flex, Txt } from 'rendition';
|
||||||
|
|
||||||
import {
|
import type { DriveSelectorProps } from '../drive-selector/drive-selector';
|
||||||
DriveSelector,
|
import { DriveSelector } from '../drive-selector/drive-selector';
|
||||||
DriveSelectorProps,
|
|
||||||
} from '../drive-selector/drive-selector';
|
|
||||||
import {
|
import {
|
||||||
isDriveSelected,
|
isDriveSelected,
|
||||||
getImage,
|
getImage,
|
||||||
@ -36,7 +34,7 @@ import { TargetSelectorButton } from './target-selector-button';
|
|||||||
import TgtSvg from '../../../assets/tgt.svg';
|
import TgtSvg from '../../../assets/tgt.svg';
|
||||||
import DriveSvg from '../../../assets/drive.svg';
|
import DriveSvg from '../../../assets/drive.svg';
|
||||||
import { warning } from '../../../../shared/messages';
|
import { warning } from '../../../../shared/messages';
|
||||||
import { DrivelistDrive } from '../../../../shared/drive-constraints';
|
import type { DrivelistDrive } from '../../../../shared/drive-constraints';
|
||||||
import * as i18next from 'i18next';
|
import * as i18next from 'i18next';
|
||||||
|
|
||||||
export const getDriveListLabel = () => {
|
export const getDriveListLabel = () => {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DrivelistDrive } from '../../../shared/drive-constraints';
|
import type { DrivelistDrive } from '../../../shared/drive-constraints';
|
||||||
import { Actions, store } from './store';
|
import { Actions, store } from './store';
|
||||||
|
|
||||||
export function hasAvailableDrives() {
|
export function hasAvailableDrives() {
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as electron from 'electron';
|
import * as electron from 'electron';
|
||||||
import * as sdk from 'etcher-sdk';
|
import type * as sdk from 'etcher-sdk';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import { DrivelistDrive } from '../../../shared/drive-constraints';
|
import type { DrivelistDrive } from '../../../shared/drive-constraints';
|
||||||
import { bytesToMegabytes } from '../../../shared/units';
|
import { bytesToMegabytes } from '../../../shared/units';
|
||||||
import { Actions, store } from './store';
|
import { Actions, store } from './store';
|
||||||
|
|
||||||
|
@ -15,12 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import { Animator, AnimationFunction, Color, RGBLed } from 'sys-class-rgb-led';
|
import type { AnimationFunction, Color } from 'sys-class-rgb-led';
|
||||||
|
import { Animator, RGBLed } from 'sys-class-rgb-led';
|
||||||
|
|
||||||
import {
|
import type { DrivelistDrive } from '../../../shared/drive-constraints';
|
||||||
DrivelistDrive,
|
import { isSourceDrive } from '../../../shared/drive-constraints';
|
||||||
isSourceDrive,
|
|
||||||
} from '../../../shared/drive-constraints';
|
|
||||||
import { getDrives } from './available-drives';
|
import { getDrives } from './available-drives';
|
||||||
import { getSelectedDrives } from './selection-state';
|
import { getSelectedDrives } from './selection-state';
|
||||||
import * as settings from './settings';
|
import * as settings from './settings';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { DrivelistDrive } from '../../../shared/drive-constraints';
|
import type { DrivelistDrive } from '../../../shared/drive-constraints';
|
||||||
/*
|
/*
|
||||||
* Copyright 2016 balena.io
|
* Copyright 2016 balena.io
|
||||||
*
|
*
|
||||||
@ -15,7 +15,7 @@ import { DrivelistDrive } from '../../../shared/drive-constraints';
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { SourceMetadata } from '../../../shared/typings/source-selector';
|
import type { SourceMetadata } from '../../../shared/typings/source-selector';
|
||||||
|
|
||||||
import * as availableDrives from './available-drives';
|
import * as availableDrives from './available-drives';
|
||||||
import { Actions, store } from './store';
|
import { Actions, store } from './store';
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import { Client, createClient, createNoopClient } from 'analytics-client';
|
import type { Client } 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';
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Drive as DrivelistDrive } from 'drivelist';
|
import type { Drive as DrivelistDrive } from 'drivelist';
|
||||||
import * as sdk from 'etcher-sdk';
|
import type * as sdk from 'etcher-sdk';
|
||||||
import { Dictionary } from 'lodash';
|
import type { Dictionary } from 'lodash';
|
||||||
import * as errors from '../../../shared/errors';
|
import * as errors from '../../../shared/errors';
|
||||||
import { SourceMetadata } from '../../../shared/typings/source-selector';
|
import type { SourceMetadata } from '../../../shared/typings/source-selector';
|
||||||
import * as flashState from '../models/flash-state';
|
import * as flashState from '../models/flash-state';
|
||||||
import * as selectionState from '../models/selection-state';
|
import * as selectionState from '../models/selection-state';
|
||||||
import * as settings from '../models/settings';
|
import * as settings from '../models/settings';
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
import * as remote from '@electron/remote';
|
import * as remote from '@electron/remote';
|
||||||
|
|
||||||
import { percentageToFloat } from '../../../shared/utils';
|
import { percentageToFloat } from '../../../shared/utils';
|
||||||
import { FlashState, titleFromFlashState } from '../modules/progress-status';
|
import type { FlashState } from '../modules/progress-status';
|
||||||
|
import { titleFromFlashState } from '../modules/progress-status';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary The title of the main window upon program launch
|
* @summary The title of the main window upon program launch
|
||||||
|
@ -27,7 +27,7 @@ import FinishPage from '../../components/finish/finish';
|
|||||||
import { ReducedFlashingInfos } from '../../components/reduced-flashing-infos/reduced-flashing-infos';
|
import { ReducedFlashingInfos } from '../../components/reduced-flashing-infos/reduced-flashing-infos';
|
||||||
import { SettingsModal } from '../../components/settings/settings';
|
import { SettingsModal } from '../../components/settings/settings';
|
||||||
import { SourceSelector } from '../../components/source-selector/source-selector';
|
import { SourceSelector } from '../../components/source-selector/source-selector';
|
||||||
import { SourceMetadata } from '../../../../shared/typings/source-selector';
|
import type { SourceMetadata } from '../../../../shared/typings/source-selector';
|
||||||
import * as flashState from '../../models/flash-state';
|
import * as flashState from '../../models/flash-state';
|
||||||
import * as selectionState from '../../models/selection-state';
|
import * as selectionState from '../../models/selection-state';
|
||||||
import * as settings from '../../models/settings';
|
import * as settings from '../../models/settings';
|
||||||
|
@ -15,16 +15,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import type {
|
||||||
|
FlexProps,
|
||||||
|
ButtonProps,
|
||||||
|
TableProps as BaseTableProps,
|
||||||
|
} from 'rendition';
|
||||||
import {
|
import {
|
||||||
Alert as AlertBase,
|
Alert as AlertBase,
|
||||||
Flex,
|
Flex,
|
||||||
FlexProps,
|
|
||||||
Button,
|
Button,
|
||||||
ButtonProps,
|
|
||||||
Modal as ModalBase,
|
Modal as ModalBase,
|
||||||
Provider,
|
Provider,
|
||||||
Table as BaseTable,
|
Table as BaseTable,
|
||||||
TableProps as BaseTableProps,
|
|
||||||
Txt,
|
Txt,
|
||||||
} from 'rendition';
|
} from 'rendition';
|
||||||
import styled, { css } from 'styled-components';
|
import styled, { css } from 'styled-components';
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Dictionary } from 'lodash';
|
import type { Dictionary } from 'lodash';
|
||||||
|
|
||||||
type BalenaTag = {
|
type BalenaTag = {
|
||||||
id: number;
|
id: number;
|
||||||
|
@ -14,12 +14,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Drive } from 'drivelist';
|
import type { Drive } from 'drivelist';
|
||||||
import { isNil } from 'lodash';
|
import { isNil } from 'lodash';
|
||||||
import * as pathIsInside from 'path-is-inside';
|
import * as pathIsInside from 'path-is-inside';
|
||||||
|
|
||||||
import * as messages from './messages';
|
import * as messages from './messages';
|
||||||
import { SourceMetadata } from './typings/source-selector';
|
import type { SourceMetadata } from './typings/source-selector';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary The default unknown size for things such as images and drives
|
* @summary The default unknown size for things such as images and drives
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Dictionary } from 'lodash';
|
import type { Dictionary } from 'lodash';
|
||||||
import { outdent } from 'outdent';
|
import { outdent } from 'outdent';
|
||||||
import prettyBytes from 'pretty-bytes';
|
import prettyBytes from 'pretty-bytes';
|
||||||
import '../gui/app/i18n';
|
import '../gui/app/i18n';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { GPTPartition, MBRPartition } from 'partitioninfo';
|
import type { GPTPartition, MBRPartition } from 'partitioninfo';
|
||||||
import { sourceDestination } from 'etcher-sdk';
|
import type { sourceDestination } from 'etcher-sdk';
|
||||||
import { DrivelistDrive } from '../drive-constraints';
|
import type { DrivelistDrive } from '../drive-constraints';
|
||||||
|
|
||||||
export type Source = 'File' | 'BlockDevice' | 'Http';
|
export type Source = 'File' | 'BlockDevice' | 'Http';
|
||||||
|
|
||||||
|
@ -15,18 +15,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { WebSocketServer } from 'ws';
|
import { WebSocketServer } from 'ws';
|
||||||
import { Dictionary, values } from 'lodash';
|
import type { Dictionary } from 'lodash';
|
||||||
|
import { values } from 'lodash';
|
||||||
|
|
||||||
import type { MultiDestinationProgress } from 'etcher-sdk/build/multi-write';
|
import type { MultiDestinationProgress } from 'etcher-sdk/build/multi-write';
|
||||||
|
|
||||||
import { toJSON } from '../shared/errors';
|
import { toJSON } from '../shared/errors';
|
||||||
import { GENERAL_ERROR, SUCCESS } from '../shared/exit-codes';
|
import { GENERAL_ERROR, SUCCESS } from '../shared/exit-codes';
|
||||||
import { WriteOptions } from './types/types';
|
import type { WriteOptions } from './types/types';
|
||||||
import { write, cleanup } from './child-writer';
|
import { write, cleanup } from './child-writer';
|
||||||
import { startScanning } from './scanner';
|
import { startScanning } from './scanner';
|
||||||
import { getSourceMetadata } from './source-metadata';
|
import { getSourceMetadata } from './source-metadata';
|
||||||
import { DrivelistDrive } from '../shared/drive-constraints';
|
import type { DrivelistDrive } from '../shared/drive-constraints';
|
||||||
import { SourceMetadata } from '../shared/typings/source-selector';
|
import type { SourceMetadata } from '../shared/typings/source-selector';
|
||||||
|
|
||||||
const ETCHER_SERVER_ADDRESS = process.env.ETCHER_SERVER_ADDRESS as string;
|
const ETCHER_SERVER_ADDRESS = process.env.ETCHER_SERVER_ADDRESS as string;
|
||||||
const ETCHER_SERVER_PORT = process.env.ETCHER_SERVER_PORT as string;
|
const ETCHER_SERVER_PORT = process.env.ETCHER_SERVER_PORT as string;
|
||||||
|
@ -16,26 +16,24 @@
|
|||||||
* This file handles the writer process.
|
* This file handles the writer process.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import type {
|
||||||
OnProgressFunction,
|
OnProgressFunction,
|
||||||
OnFailFunction,
|
OnFailFunction,
|
||||||
|
MultiDestinationProgress,
|
||||||
|
} from 'etcher-sdk/build/multi-write';
|
||||||
|
import {
|
||||||
decompressThenFlash,
|
decompressThenFlash,
|
||||||
DECOMPRESSED_IMAGE_PREFIX,
|
DECOMPRESSED_IMAGE_PREFIX,
|
||||||
MultiDestinationProgress,
|
|
||||||
} from 'etcher-sdk/build/multi-write';
|
} from 'etcher-sdk/build/multi-write';
|
||||||
|
|
||||||
import { totalmem } from 'os';
|
import { totalmem } from 'os';
|
||||||
|
|
||||||
import { cleanupTmpFiles } from 'etcher-sdk/build/tmp';
|
import { cleanupTmpFiles } from 'etcher-sdk/build/tmp';
|
||||||
|
|
||||||
import {
|
import type { SourceDestination } from 'etcher-sdk/build/source-destination';
|
||||||
File,
|
import { File, Http, BlockDevice } from 'etcher-sdk/build/source-destination';
|
||||||
Http,
|
|
||||||
BlockDevice,
|
|
||||||
SourceDestination,
|
|
||||||
} from 'etcher-sdk/build/source-destination';
|
|
||||||
|
|
||||||
import { WriteResult, FlashError, WriteOptions } from './types/types';
|
import type { WriteResult, FlashError, WriteOptions } from './types/types';
|
||||||
|
|
||||||
import { isJson } from '../shared/utils';
|
import { isJson } from '../shared/utils';
|
||||||
import { toJSON } from '../shared/errors';
|
import { toJSON } from '../shared/errors';
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as sdk from 'etcher-sdk';
|
import * as sdk from 'etcher-sdk';
|
||||||
|
import type { Adapter } from 'etcher-sdk/build/scanner/adapters';
|
||||||
import {
|
import {
|
||||||
Adapter,
|
|
||||||
BlockDeviceAdapter,
|
BlockDeviceAdapter,
|
||||||
UsbbootDeviceAdapter,
|
UsbbootDeviceAdapter,
|
||||||
} from 'etcher-sdk/build/scanner/adapters';
|
} from 'etcher-sdk/build/scanner/adapters';
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { scanner as driveScanner } from './drive-scanner';
|
import { scanner as driveScanner } from './drive-scanner';
|
||||||
import * as sdk from 'etcher-sdk';
|
import * as sdk from 'etcher-sdk';
|
||||||
import { DrivelistDrive } from '../shared/drive-constraints';
|
import type { DrivelistDrive } from '../shared/drive-constraints';
|
||||||
import outdent from 'outdent';
|
import outdent from 'outdent';
|
||||||
import { Dictionary, values, keyBy, padStart } from 'lodash';
|
import type { Dictionary } from 'lodash';
|
||||||
|
import { values, keyBy, padStart } from 'lodash';
|
||||||
import { emitDrives } from './api';
|
import { emitDrives } from './api';
|
||||||
|
|
||||||
let availableDrives: DrivelistDrive[] = [];
|
let availableDrives: DrivelistDrive[] = [];
|
||||||
|
@ -2,15 +2,16 @@
|
|||||||
|
|
||||||
import { sourceDestination } from 'etcher-sdk';
|
import { sourceDestination } from 'etcher-sdk';
|
||||||
import { replaceWindowsNetworkDriveLetter } from '../gui/app/os/windows-network-drives';
|
import { replaceWindowsNetworkDriveLetter } from '../gui/app/os/windows-network-drives';
|
||||||
import axios, { AxiosRequestConfig } from 'axios';
|
import type { AxiosRequestConfig } from 'axios';
|
||||||
|
import axios from 'axios';
|
||||||
import { isJson } from '../shared/utils';
|
import { isJson } from '../shared/utils';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import {
|
import type {
|
||||||
SourceMetadata,
|
SourceMetadata,
|
||||||
Authentication,
|
Authentication,
|
||||||
Source,
|
Source,
|
||||||
} from '../shared/typings/source-selector';
|
} from '../shared/typings/source-selector';
|
||||||
import { DrivelistDrive } from '../shared/drive-constraints';
|
import type { DrivelistDrive } from '../shared/drive-constraints';
|
||||||
import { omit } from 'lodash';
|
import { omit } from 'lodash';
|
||||||
|
|
||||||
function isString(value: any): value is string {
|
function isString(value: any): value is string {
|
||||||
|
6
lib/util/types/types.d.ts
vendored
6
lib/util/types/types.d.ts
vendored
@ -1,6 +1,6 @@
|
|||||||
import { Metadata } from 'etcher-sdk/build/source-destination';
|
import type { Metadata } from 'etcher-sdk/build/source-destination';
|
||||||
import { SourceMetadata } from '../../shared/typings/source-selector';
|
import type { SourceMetadata } from '../../shared/typings/source-selector';
|
||||||
import { Drive as DrivelistDrive } from 'drivelist';
|
import type { Drive as DrivelistDrive } from 'drivelist';
|
||||||
|
|
||||||
export interface WriteResult {
|
export interface WriteResult {
|
||||||
bytesWritten?: number;
|
bytesWritten?: number;
|
||||||
|
2205
npm-shrinkwrap.json
generated
2205
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
@ -59,7 +59,7 @@
|
|||||||
"ws": "^8.16.0"
|
"ws": "^8.16.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@balena/lint": "7.2.4",
|
"@balena/lint": "8.0.2",
|
||||||
"@electron-forge/cli": "7.2.0",
|
"@electron-forge/cli": "7.2.0",
|
||||||
"@electron-forge/maker-deb": "7.2.0",
|
"@electron-forge/maker-deb": "7.2.0",
|
||||||
"@electron-forge/maker-dmg": "7.2.0",
|
"@electron-forge/maker-dmg": "7.2.0",
|
||||||
|
@ -22,10 +22,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { Drive as DrivelistDrive } from 'drivelist';
|
import type { Drive as DrivelistDrive } from 'drivelist';
|
||||||
import { assert, SinonStub, stub } from 'sinon';
|
import type { SinonStub } from 'sinon';
|
||||||
|
import { assert, stub } from 'sinon';
|
||||||
|
|
||||||
import { SourceMetadata } from '../../../lib/shared/typings/source-selector';
|
import type { SourceMetadata } from '../../../lib/shared/typings/source-selector';
|
||||||
import * as flashState from '../../../lib/gui/app/models/flash-state';
|
import * as flashState from '../../../lib/gui/app/models/flash-state';
|
||||||
import * as imageWriter from '../../../lib/gui/app/modules/image-writer';
|
import * as imageWriter from '../../../lib/gui/app/modules/image-writer';
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import { SinonStub, stub } from 'sinon';
|
import type { SinonStub } from 'sinon';
|
||||||
|
import { stub } from 'sinon';
|
||||||
|
|
||||||
import * as wnd from '../../../lib/gui/app/os/windows-network-drives';
|
import * as wnd from '../../../lib/gui/app/os/windows-network-drives';
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { SourceMetadata } from '../../lib/shared/typings/source-selector';
|
import type { SourceMetadata } from '../../lib/shared/typings/source-selector';
|
||||||
|
|
||||||
import * as constraints from '../../lib/shared/drive-constraints';
|
import * as constraints from '../../lib/shared/drive-constraints';
|
||||||
import * as messages from '../../lib/shared/messages';
|
import * as messages from '../../lib/shared/messages';
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"target": "es2019",
|
"target": "es2019",
|
||||||
"typeRoots": ["./node_modules/@types", "./typings"],
|
"typeRoots": ["./node_modules/@types", "./typings"],
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"lib": ["dom", "esnext"],
|
"lib": ["dom", "esnext"],
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"pretty": true,
|
"pretty": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user