Comparing version 1.5.3 to 1.6.0
@@ -7,2 +7,12 @@ # Changelog | ||
## 1.6.0 - 2021-02-10 | ||
- add `ray().interceptor().intercept()` method to redirect all `console.log()` calls to Ray | ||
- add ConsoleInterceptor class | ||
- ensure all payloads have an origin, fixing an occasional bug caused during bundle creation _(i.e., webpack)_ where payloads were sent but Ray did not display them | ||
- ensure `dayjs` and `stopwatch-node` packages are treated as external packages for the NodeJS and web versions | ||
## 1.5.3 - 2021-02-09 | ||
@@ -9,0 +19,0 @@ |
@@ -36,7 +36,11 @@ // Generated by dts-bundle-generator v5.6.0 | ||
declare class Client { | ||
static rayState: boolean | null; | ||
protected portNumber: number; | ||
protected host: string; | ||
constructor(portNumber?: number, host?: string); | ||
isRayAvailable(): boolean; | ||
protected updateRayAvailabilty(): Promise<void>; | ||
protected getUrlForPath(path: string): string; | ||
send(request: Request): Promise<void>; | ||
protected ensureAllPayloadsHaveAnOrigin(payloads: Payload[]): Payload[]; | ||
lockExists(lockName: string): Promise<unknown>; | ||
@@ -74,2 +78,3 @@ } | ||
not_defined?: boolean; | ||
intercept_console_log?: boolean; | ||
} | ||
@@ -87,2 +92,3 @@ declare class Settings { | ||
always_send_raw_values: boolean; | ||
intercept_console_log: boolean; | ||
protected originalSettings: RaySettings; | ||
@@ -119,2 +125,10 @@ constructor(settings: RaySettings); | ||
} | ||
declare class ConsoleInterceptor { | ||
static active: boolean; | ||
static consoleLog: any; | ||
intercept(): void; | ||
reset(): void; | ||
active(): boolean; | ||
protected wrapper(...args: any[]): void; | ||
} | ||
export declare type BoolFunction = () => boolean; | ||
@@ -131,4 +145,5 @@ declare const Ray_base: import("ts-mixer/dist/types").Class<[ | ||
static defaultSettings: RaySettings; | ||
protected static client: Client; | ||
static client: Client; | ||
static counters: Counters; | ||
static interceptor: ConsoleInterceptor; | ||
static fakeUuid: string; | ||
@@ -141,2 +156,3 @@ uuid: string; | ||
static useDefaultSettings(settings: RaySettings): typeof Ray; | ||
interceptor(): ConsoleInterceptor; | ||
enable(): this; | ||
@@ -143,0 +159,0 @@ disable(): this; |
const { Ray, ray } = require('./dist/index.cjs'); | ||
module.exports = { Ray, ray } | ||
module.exports = { Ray, ray }; |
{ | ||
"name": "node-ray", | ||
"version": "1.5.3", | ||
"version": "1.6.0", | ||
"description": "Debug NodeJS with Ray to fix problems faster", | ||
@@ -46,3 +46,3 @@ "license": "MIT", | ||
"test:coverage": "./node_modules/.bin/jest tests --coverage", | ||
"fmt": "./node_modules/.bin/prettier --config .prettierrc --write 'src/**/*.{js,ts,json}' 'tests/**/*.{js,ts,json}'", | ||
"fmt": "./node_modules/.bin/prettier --config .prettierrc --write 'src/**/*.{js,ts,json}' 'tests/**/*.{js,ts,json}' './*.js'", | ||
"lint": "./node_modules/.bin/eslint --ext ts,js src/", | ||
@@ -49,0 +49,0 @@ "lint:fix": "./node_modules/.bin/eslint --ext ts,js --fix src/", |
@@ -148,2 +148,5 @@ <p align="center"> | ||
port: 23517, | ||
// calls to console.log() are redirected to Ray | ||
intercept_console_log: true, | ||
} | ||
@@ -217,2 +220,3 @@ ``` | ||
| `ray().image(url)` | Display an image in Ray | | ||
| `ray().interceptor() | Access ConsoleInterceptor; call `.intercept()` to show `console.log()` calls in Ray | | ||
| `ray().json([…])` | Send JSON to Ray | | ||
@@ -219,0 +223,0 @@ | `ray().measure(callable)` | Measure the performance of a callback function | |
const { Ray, ray } = require('./dist/web.cjs'); | ||
module.exports = { Ray, ray } | ||
module.exports = { Ray, ray }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
277
1859012
17
16647