@contrast/common
Advanced tools
Comparing version 1.1.3 to 1.1.4
export * from './constants'; | ||
export * from './types'; | ||
interface TraverseCallback { | ||
(path: any[], type: 'Key' | 'Value', value: any, obj: any): unknown; | ||
} | ||
/** | ||
@@ -10,3 +13,3 @@ * Returns true if the value passed is either a primitive string or a | ||
export declare function encodeString(str: string): string; | ||
export declare function simpleTraverse(obj: any, cb: Function): void; | ||
export declare function simpleTraverse(obj: any, cb: TraverseCallback): void; | ||
export declare function installChildComponentsSync(parent: any, order: string[]): void; |
@@ -57,3 +57,2 @@ "use strict"; | ||
const path = []; | ||
/* eslint-disable complexity */ | ||
function traverse(obj) { | ||
@@ -60,0 +59,0 @@ const isArray = Array.isArray(obj); |
@@ -12,3 +12,2 @@ /// <reference types="node" /> | ||
hostname: string; | ||
version: string; | ||
name: string; | ||
@@ -24,2 +23,3 @@ pkg: object; | ||
serverEnvironment: string; | ||
version: string; | ||
} | ||
@@ -43,2 +43,4 @@ export declare type SemanticAnalysisRules = Rule.CMD_INJECTION_SEMANTIC_CHAINED_COMMANDS | Rule.CMD_INJECTION_COMMAND_BACKDOORS | Rule.CMD_INJECTION_SEMANTIC_DANGEROUS_PATHS; | ||
command?: string; | ||
prolog?: string; | ||
xml?: string; | ||
}; | ||
@@ -45,0 +47,0 @@ sinkContext?: any; |
{ | ||
"name": "@contrast/common", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Shared constants and utilities for all Contrast Agent modules", | ||
@@ -16,4 +16,3 @@ "license": "UNLICENSED", | ||
"test": "../scripts/test.sh" | ||
}, | ||
"dependencies": {} | ||
} | ||
} |
@@ -19,2 +19,6 @@ /* | ||
interface TraverseCallback { | ||
(path: any[], type: 'Key' | 'Value', value: any, obj: any): unknown; | ||
} | ||
/** | ||
@@ -38,3 +42,3 @@ * Returns true if the value passed is either a primitive string or a | ||
export function simpleTraverse(obj: any, cb: Function) { | ||
export function simpleTraverse(obj: any, cb: TraverseCallback) { | ||
if (typeof obj !== 'object' || obj === null) { | ||
@@ -44,3 +48,2 @@ return; | ||
const path: any[] = []; | ||
/* eslint-disable complexity */ | ||
function traverse(obj: any) { | ||
@@ -47,0 +50,0 @@ const isArray = Array.isArray(obj); |
@@ -27,3 +27,2 @@ /* | ||
hostname: string; | ||
version: string; | ||
name: string; | ||
@@ -39,2 +38,3 @@ pkg: object; // package.json | ||
serverEnvironment: string; | ||
version: string; | ||
} | ||
@@ -64,2 +64,4 @@ | ||
command?: string; | ||
prolog?: string; | ||
xml?: string; | ||
}; | ||
@@ -136,9 +138,4 @@ sinkContext?: any; | ||
export interface Messages extends EventEmitter { | ||
addListener(event: Event.PROTECT, | ||
listener: (msg: RequestStore) => void, | ||
): this; | ||
addListener( | ||
event: Event.SERVER_SETTINGS_UPDATE, | ||
listener: (msg: Record<string, any>) => void, | ||
): this; | ||
addListener(event: Event.PROTECT, listener: (msg: RequestStore) => void): this; | ||
addListener(event: Event.SERVER_SETTINGS_UPDATE, listener: (msg: Record<string, any>) => void): this; | ||
@@ -149,15 +146,6 @@ emit(event: Event.PROTECT, msg: RequestStore): boolean; | ||
on(event: Event.PROTECT, listener: (msg: RequestStore) => void): this; | ||
on( | ||
event: Event.SERVER_SETTINGS_UPDATE, | ||
listener: (msg: Record<string, any>) => void, | ||
): this; | ||
on(event: Event.SERVER_SETTINGS_UPDATE, listener: (msg: Record<string, any>) => void): this; | ||
prependListener( | ||
event: Event.PROTECT, | ||
listener: (msg: RequestStore) => void, | ||
): this; | ||
prependOnceListener( | ||
event: Event.PROTECT, | ||
listener: (msg: RequestStore) => void, | ||
): this; | ||
prependListener(event: Event.PROTECT, listener: (msg: RequestStore) => void,): this; | ||
prependOnceListener(event: Event.PROTECT, listener: (msg: RequestStore) => void): this; | ||
} |
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
29539
653