You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@datadog/js-instrumentation-wasm

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/js-instrumentation-wasm - npm Package Compare versions

Comparing version

to
0.9.4

102

dist/types/index.d.ts
declare module '@datadog/js-instrumentation-wasm' {
export interface InstrumentationInput {
id: string;
code: string;
map?: string;
}
export interface InstrumentationOutput {
id: string;
code: string;
map?: string;
}
export interface InputOptions {
module?: 'cjs' | 'esm' | undefined;
jsx?: boolean;
typescript?: boolean;
}
export interface PrivacyHelperOptions {
module: string;
addToDictionaryFunction: string;
}
export interface PrivacyOptions {
helpers?: PrivacyHelperOptions;
}
export interface InstrumentationOptions {
input?: InputOptions;
privacy?: PrivacyOptions;
}
export function instrument(input: InstrumentationInput, options?: InstrumentationOptions | undefined): Promise<InstrumentationOutput>;
export interface InstrumentationInput {
/** The filename or id of the code to instrument. */
id: string;
/** The source code to instrument. */
code: string;
/** The source map for the code to instrument, if any. */
map?: string;
}
export interface InstrumentationOutput {
/** The filename or id of the code that was instrumented. */
id: string;
/** The instrumented source code. */
code: string;
/** The source map for the instrumented code. */
map?: string;
}
export interface InputOptions {
/**
* If 'cjs', interpret the input as a CommonJS module. If 'esm', interpret the input as
* an ES module. If 'undefined' (the default), guess based on the module contents.
*/
module?: 'cjs' | 'esm' | undefined;
/** If true (the default), allow JSX syntax in the input. */
jsx?: boolean;
/** If true (the default), allow TypeScript syntax in the input. */
typescript?: boolean;
}
export type PrivacyHelperSource = {
/**
* Declare the helper using the given JavaScript expression.
*
* Example: `{ code: '(v) => console.log(v)' }` will produce output like:
* ```js
* const $ = (v) => console.log(v);
* ```
*/
expression: {
code: string;
};
} | {
/**
* Declare the helper by importing the given function from the given module.
*
* Example: `{ module: 'custom/helpers', func: 'foo' }` will produce output like:
* ```js
* import { foo as $ } from 'custom/helpers';
* ```
*
* If the input is an ES module, `import` will be used; for CommonJS modules,
* `require()` will be used.
*/
import: {
module: string;
func: string;
};
};
export interface PrivacyOptions {
/** The source for the helper function used to add strings to the dictionary. */
addToDictionaryHelper?: PrivacyHelperSource;
}
export interface InstrumentationOptions {
/** Options that configure how the input is interpreted. */
input?: InputOptions;
/** Options that configure the privacy instrumentation transform. */
privacy?: PrivacyOptions;
}
export interface RustPrivacyOptions {
addToDictionaryHelper: PrivacyHelperSource;
}
/**
* Instrument the provided input, applying the provided options, if any.
*
* @returns the instrumented code.
*/
export function instrument(input: InstrumentationInput, options?: InstrumentationOptions | undefined): InstrumentationOutput;

@@ -30,0 +78,0 @@ export {};

{
"name": "@datadog/js-instrumentation-wasm",
"type": "module",
"version": "0.9.3",
"version": "0.9.4",
"license": "MIT",

@@ -6,0 +6,0 @@ "description": "A library for adding Datadog instrumentation to JavaScript and TypeScript code",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.