Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
BuZZ-T committed Nov 28, 2021
1 parent 6f09ea8 commit 55976b2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 24 deletions.
2 changes: 1 addition & 1 deletion commons/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ export const DEFAULT_SINGLE_CONFIG: IChromeSingleConfig = {
store: true,
download: true,
downloadFolder: null,
single: '10.0.0.0',
single: new ComparableVersion(10, 0, 0, 0),
quiet: false,
}
5 changes: 3 additions & 2 deletions examples/example-download-single.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { downloadChromium } from 'rusted-chromium';
import { downloadChromium } from 'rusted-chromium'
import { ComparableVersion } from '../commons/ComparableVersion'

downloadChromium({
single: '98.0.4707.2',
single: new ComparableVersion(98, 0, 4707, 2),
os: 'linux',
arch: 'x64',
})
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"prebuild": "npm run clean",
"build": "tsc -p tsconfig.json",
"build:silent": "npm run build -- --noEmit",
"build:examples": "cd examples/ && npm run build",
"release": "npm run build && npm publish",
"release-github": "npm run build && npm publish --registry=https://npm.pkg.github.com/"
},
Expand Down
21 changes: 0 additions & 21 deletions test.utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { NoParamCallback, PathLike, Stats } from 'fs'
import { HTMLElement as NodeParserHTMLElement, Node as NodeParserNode } from 'node-html-parser'

import { ComparableVersion } from './commons/ComparableVersion'
import { DEFAULT_FULL_CONFIG, DEFAULT_SINGLE_CONFIG, DEFAULT_CONFIG_OPTIONS } from './commons/constants'
import { MappedVersion } from './commons/MappedVersion'
import type { IConfigOptions } from './interfaces/config.interfaces'
Expand All @@ -14,26 +13,6 @@ export const createChromeFullConfig = (config?: Partial<IChromeFullConfig>): ICh
...config,
})

export const createChromeConfig = (config?: Partial<IChromeConfig>): IChromeConfig => ({
arch: 'x64',
autoUnzip: false,
download: true,
downloadFolder: null,
hideNegativeHits: false,
interactive: true,
max: new ComparableVersion(10000, 0, 0, 0),
min: new ComparableVersion(0, 0, 0, 0),
onFail: 'nothing',
onlyNewestMajor: false,
os: 'linux',
results: 10,
store: true,
single: null,
inverse: false,
quiet: false,
...config,
})

export const createChromeSingleConfig = (config?: Partial<IChromeSingleConfig>): IChromeSingleConfig => ({
...DEFAULT_SINGLE_CONFIG,
...config,
Expand Down

0 comments on commit 55976b2

Please sign in to comment.