Skip to content

Commit

Permalink
Export BotResult along with BotKind (#122)
Browse files Browse the repository at this point in the history
* Add a check for undefined to plugins length signal (#114)

* Update README.md

Make changes that align more with recent documentation updates

* bump version to 1.3.1

* Bump json5 from 2.2.1 to 2.2.3

* bump version to 1.3.2

* Update window and document properties check (#118)

* migrate configs to .ts

* finish updates

* lint

* Update plugin length signal and bump version (#116)

* Add a check for undefined to plugins length signal (#114)

* bump version to 1.3.2

---------

Co-authored-by: xnerhu <[email protected]>

* fix ts-loader parsing

* add tests to PR workflow

* Revert "add tests to PR workflow"

This reverts commit 08647d6.

* update broyster to 0.1.2

* pr comments

* lint

* ci: disable browserstack release test temporarily

* restore release workflow

* pr comments

* add workflow

* remove unused terser

* remove terser completely

* Bump webpack from 5.74.0 to 5.76.0 (#117)

Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.74.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Replace document and window properties signals with new one

* Rename signal

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: fpkamp <[email protected]>
Co-authored-by: xnerhu <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bump version to 1.4.0

* export types

* bump version

* fix ci

* enable skipLibCheck

* export BotDetectionResult and BotKind

* use normal enum instread of const enum for BotKind

* use enum instead of cost enum in all files

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Rishat Valitov <[email protected]>
Co-authored-by: fpkamp <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored May 2, 2023
1 parent 07af4a4 commit e84a4bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fingerprintjs/botd",
"version": "1.4.0",
"version": "1.5.0",
"description": "botd is a browser library for JavaScript bot detection",
"keywords": [
"bot",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { version } from '../package.json'
import BotDetector from './detector'
import { sources, WindowSizePayload, ProcessPayload } from './sources'
import { BotdError, BotDetectorInterface } from './types'
import { BotdError, BotDetectorInterface, BotKind, BotDetectionResult } from './types'

/**
* Options for BotD loading
Expand Down Expand Up @@ -46,4 +46,4 @@ export default { load }

// The exports below are for private usage. They may change unexpectedly. Use them at your own risk.
/** Not documented, out of Semantic Versioning, usage is at your own risk */
export { sources, BotdError, WindowSizePayload, ProcessPayload }
export { sources, BotdError, WindowSizePayload, ProcessPayload, BotDetectionResult, BotKind }
8 changes: 4 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type BotDetectionResult =
* @readonly
* @enum {number}
*/
export const enum State {
export enum State {
Success = 0,
Undefined = -1,
NotFunction = -2,
Expand All @@ -31,7 +31,7 @@ export const enum State {
* @readonly
* @enum {string}
*/
export const enum BotKind {
export enum BotKind {
Awesomium = 'awesomium',
Cef = 'cef',
CefSharp = 'cefsharp',
Expand Down Expand Up @@ -148,14 +148,14 @@ export class BotdError extends Error {
}
}

export const enum BrowserEngineKind {
export enum BrowserEngineKind {
Unknown = 'unknown',
Chromium = 'chromium',
Gecko = 'gecko',
Webkit = 'webkit',
}

export const enum BrowserKind {
export enum BrowserKind {
Unknown = 'unknown',
Chrome = 'chrome',
Firefox = 'firefox',
Expand Down

0 comments on commit e84a4bc

Please sign in to comment.