@datadog/browser-core
Advanced tools
Comparing version 5.4.0 to 5.5.0
@@ -9,3 +9,3 @@ "use strict"; | ||
var publicApi = (0, polyfills_1.assign)({ | ||
version: "5.4.0", | ||
version: "5.5.0", | ||
// This API method is intentionally not monitored, since the only thing executed is the | ||
@@ -12,0 +12,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and |
import type { Payload } from '../../transport'; | ||
import type { InitConfiguration } from './configuration'; | ||
export type TrackType = 'logs' | 'rum' | 'replay'; | ||
export type ApiType = 'xhr' | 'fetch' | 'beacon' | 'manual'; | ||
export type EndpointBuilder = ReturnType<typeof createEndpointBuilder>; | ||
export declare function createEndpointBuilder(initConfiguration: InitConfiguration, trackType: TrackType, configurationTags: string[]): { | ||
build(api: 'xhr' | 'fetch' | 'beacon', payload: Payload): string; | ||
build(api: ApiType, payload: Payload): string; | ||
urlPrefix: string; | ||
trackType: TrackType; | ||
}; |
@@ -55,3 +55,3 @@ "use strict"; | ||
var retry = _b.retry, flushReason = _b.flushReason, encoding = _b.encoding; | ||
var tags = ["sdk_version:".concat("5.4.0"), "api:".concat(api)].concat(configurationTags); | ||
var tags = ["sdk_version:".concat("5.5.0"), "api:".concat(api)].concat(configurationTags); | ||
if (flushReason && (0, experimentalFeatures_1.isExperimentalFeatureEnabled)(experimentalFeatures_1.ExperimentalFeature.COLLECT_FLUSH_REASON)) { | ||
@@ -67,3 +67,3 @@ tags.push("flush_reason:".concat(flushReason)); | ||
"dd-api-key=".concat(clientToken), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.4.0")), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.5.0")), | ||
'dd-evp-origin=browser', | ||
@@ -70,0 +70,0 @@ "dd-request-id=".concat((0, stringUtils_1.generateUUID)()), |
export { Configuration, InitConfiguration, DefaultPrivacyLevel, validateAndBuildConfiguration, serializeConfiguration, } from './configuration'; | ||
export { createEndpointBuilder, EndpointBuilder, TrackType } from './endpointBuilder'; | ||
export * from './intakeSites'; | ||
export { computeTransportConfiguration } from './transportConfiguration'; |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createEndpointBuilder = exports.serializeConfiguration = exports.validateAndBuildConfiguration = exports.DefaultPrivacyLevel = void 0; | ||
exports.computeTransportConfiguration = exports.createEndpointBuilder = exports.serializeConfiguration = exports.validateAndBuildConfiguration = exports.DefaultPrivacyLevel = void 0; | ||
var configuration_1 = require("./configuration"); | ||
@@ -26,2 +26,4 @@ Object.defineProperty(exports, "DefaultPrivacyLevel", { enumerable: true, get: function () { return configuration_1.DefaultPrivacyLevel; } }); | ||
__exportStar(require("./intakeSites"), exports); | ||
var transportConfiguration_1 = require("./transportConfiguration"); | ||
Object.defineProperty(exports, "computeTransportConfiguration", { enumerable: true, get: function () { return transportConfiguration_1.computeTransportConfiguration; } }); | ||
//# sourceMappingURL=index.js.map |
export type ReportType = DeprecationReport['type'] | InterventionReport['type']; | ||
interface Report { | ||
type: ReportType; | ||
url: string; | ||
body: DeprecationReportBody | InterventionReportBody; | ||
toJSON(): any; | ||
} | ||
interface ReportBody { | ||
toJSON(): any; | ||
} | ||
export interface DeprecationReport extends Report { | ||
@@ -25,1 +34,2 @@ type: 'deprecation'; | ||
} | ||
export {}; |
import { Observable } from '../../tools/observable'; | ||
import type { Configuration } from '../configuration'; | ||
import type { InterventionReport, DeprecationReport } from './browser.types'; | ||
export declare const RawReportType: { | ||
@@ -13,4 +14,5 @@ readonly intervention: "intervention"; | ||
message: string; | ||
originalReport: SecurityPolicyViolationEvent | DeprecationReport | InterventionReport; | ||
stack?: string; | ||
} | ||
export declare function initReportObservable(configuration: Configuration, apis: RawReportType[]): Observable<RawReport>; |
@@ -57,4 +57,4 @@ "use strict"; | ||
} | ||
function buildRawReportFromReport(_a) { | ||
var type = _a.type, body = _a.body; | ||
function buildRawReportFromReport(report) { | ||
var type = report.type, body = report.body; | ||
return { | ||
@@ -64,2 +64,3 @@ type: type, | ||
message: "".concat(type, ": ").concat(body.message), | ||
originalReport: report, | ||
stack: buildStack(body.id, body.message, body.sourceFile, body.lineNumber, body.columnNumber), | ||
@@ -78,2 +79,3 @@ }; | ||
: 'no policy', event.sourceFile, event.lineNumber, event.columnNumber), | ||
originalReport: event, | ||
}; | ||
@@ -80,0 +82,0 @@ } |
@@ -54,3 +54,3 @@ "use strict"; | ||
service: telemetryService, | ||
version: "5.4.0", | ||
version: "5.5.0", | ||
source: 'browser', | ||
@@ -57,0 +57,0 @@ _dd: { |
@@ -6,3 +6,3 @@ import { catchUserErrors } from '../tools/catchUserErrors'; | ||
var publicApi = assign({ | ||
version: "5.4.0", | ||
version: "5.5.0", | ||
// This API method is intentionally not monitored, since the only thing executed is the | ||
@@ -9,0 +9,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and |
import type { Payload } from '../../transport'; | ||
import type { InitConfiguration } from './configuration'; | ||
export type TrackType = 'logs' | 'rum' | 'replay'; | ||
export type ApiType = 'xhr' | 'fetch' | 'beacon' | 'manual'; | ||
export type EndpointBuilder = ReturnType<typeof createEndpointBuilder>; | ||
export declare function createEndpointBuilder(initConfiguration: InitConfiguration, trackType: TrackType, configurationTags: string[]): { | ||
build(api: 'xhr' | 'fetch' | 'beacon', payload: Payload): string; | ||
build(api: ApiType, payload: Payload): string; | ||
urlPrefix: string; | ||
trackType: TrackType; | ||
}; |
@@ -51,3 +51,3 @@ import { timeStampNow } from '../../tools/utils/timeUtils'; | ||
var retry = _b.retry, flushReason = _b.flushReason, encoding = _b.encoding; | ||
var tags = ["sdk_version:".concat("5.4.0"), "api:".concat(api)].concat(configurationTags); | ||
var tags = ["sdk_version:".concat("5.5.0"), "api:".concat(api)].concat(configurationTags); | ||
if (flushReason && isExperimentalFeatureEnabled(ExperimentalFeature.COLLECT_FLUSH_REASON)) { | ||
@@ -63,3 +63,3 @@ tags.push("flush_reason:".concat(flushReason)); | ||
"dd-api-key=".concat(clientToken), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.4.0")), | ||
"dd-evp-origin-version=".concat(encodeURIComponent("5.5.0")), | ||
'dd-evp-origin=browser', | ||
@@ -66,0 +66,0 @@ "dd-request-id=".concat(generateUUID()), |
export { Configuration, InitConfiguration, DefaultPrivacyLevel, validateAndBuildConfiguration, serializeConfiguration, } from './configuration'; | ||
export { createEndpointBuilder, EndpointBuilder, TrackType } from './endpointBuilder'; | ||
export * from './intakeSites'; | ||
export { computeTransportConfiguration } from './transportConfiguration'; |
export { DefaultPrivacyLevel, validateAndBuildConfiguration, serializeConfiguration, } from './configuration'; | ||
export { createEndpointBuilder } from './endpointBuilder'; | ||
export * from './intakeSites'; | ||
export { computeTransportConfiguration } from './transportConfiguration'; | ||
//# sourceMappingURL=index.js.map |
export type ReportType = DeprecationReport['type'] | InterventionReport['type']; | ||
interface Report { | ||
type: ReportType; | ||
url: string; | ||
body: DeprecationReportBody | InterventionReportBody; | ||
toJSON(): any; | ||
} | ||
interface ReportBody { | ||
toJSON(): any; | ||
} | ||
export interface DeprecationReport extends Report { | ||
@@ -25,1 +34,2 @@ type: 'deprecation'; | ||
} | ||
export {}; |
import { Observable } from '../../tools/observable'; | ||
import type { Configuration } from '../configuration'; | ||
import type { InterventionReport, DeprecationReport } from './browser.types'; | ||
export declare const RawReportType: { | ||
@@ -13,4 +14,5 @@ readonly intervention: "intervention"; | ||
message: string; | ||
originalReport: SecurityPolicyViolationEvent | DeprecationReport | InterventionReport; | ||
stack?: string; | ||
} | ||
export declare function initReportObservable(configuration: Configuration, apis: RawReportType[]): Observable<RawReport>; |
@@ -53,4 +53,4 @@ import { toStackTraceString } from '../error/error'; | ||
} | ||
function buildRawReportFromReport(_a) { | ||
var type = _a.type, body = _a.body; | ||
function buildRawReportFromReport(report) { | ||
var type = report.type, body = report.body; | ||
return { | ||
@@ -60,2 +60,3 @@ type: type, | ||
message: "".concat(type, ": ").concat(body.message), | ||
originalReport: report, | ||
stack: buildStack(body.id, body.message, body.sourceFile, body.lineNumber, body.columnNumber), | ||
@@ -74,2 +75,3 @@ }; | ||
: 'no policy', event.sourceFile, event.lineNumber, event.columnNumber), | ||
originalReport: event, | ||
}; | ||
@@ -76,0 +78,0 @@ } |
@@ -51,3 +51,3 @@ import { ConsoleApiName } from '../../tools/display'; | ||
service: telemetryService, | ||
version: "5.4.0", | ||
version: "5.5.0", | ||
source: 'browser', | ||
@@ -54,0 +54,0 @@ _dd: { |
{ | ||
"name": "@datadog/browser-core", | ||
"version": "5.4.0", | ||
"version": "5.5.0", | ||
"license": "Apache-2.0", | ||
@@ -26,3 +26,3 @@ "main": "cjs/index.js", | ||
}, | ||
"gitHead": "9160f5cc9961c6f20055780d9880c572f6327992" | ||
"gitHead": "7b824d7ff3e7b535e4f6b4d77f16bf1ceb0c9242" | ||
} |
@@ -13,2 +13,9 @@ import type { Payload } from '../../transport' | ||
export type TrackType = 'logs' | 'rum' | 'replay' | ||
export type ApiType = | ||
| 'xhr' | ||
| 'fetch' | ||
| 'beacon' | ||
// 'manual' reflects that the request have been sent manually, outside of the SDK (ex: via curl or | ||
// a Node.js script). | ||
| 'manual' | ||
@@ -25,3 +32,3 @@ export type EndpointBuilder = ReturnType<typeof createEndpointBuilder> | ||
return { | ||
build(api: 'xhr' | 'fetch' | 'beacon', payload: Payload) { | ||
build(api: ApiType, payload: Payload) { | ||
const parameters = buildEndpointParameters(initConfiguration, trackType, configurationTags, api, payload) | ||
@@ -77,3 +84,3 @@ return buildUrlWithParameters(parameters) | ||
configurationTags: string[], | ||
api: 'xhr' | 'fetch' | 'beacon', | ||
api: ApiType, | ||
{ retry, flushReason, encoding }: Payload | ||
@@ -80,0 +87,0 @@ ) { |
@@ -10,1 +10,2 @@ export { | ||
export * from './intakeSites' | ||
export { computeTransportConfiguration } from './transportConfiguration' |
export type ReportType = DeprecationReport['type'] | InterventionReport['type'] | ||
interface Report { | ||
type: ReportType | ||
url: string | ||
body: DeprecationReportBody | InterventionReportBody | ||
toJSON(): any | ||
} | ||
interface ReportBody { | ||
toJSON(): any | ||
} | ||
export interface DeprecationReport extends Report { | ||
@@ -20,2 +31,3 @@ type: 'deprecation' | ||
} | ||
export interface InterventionReportBody extends ReportBody { | ||
@@ -22,0 +34,0 @@ id: string |
@@ -22,2 +22,3 @@ import { toStackTraceString } from '../error/error' | ||
message: string | ||
originalReport: SecurityPolicyViolationEvent | DeprecationReport | InterventionReport | ||
stack?: string | ||
@@ -78,3 +79,5 @@ } | ||
function buildRawReportFromReport({ type, body }: DeprecationReport | InterventionReport): RawReport { | ||
function buildRawReportFromReport(report: DeprecationReport | InterventionReport): RawReport { | ||
const { type, body } = report | ||
return { | ||
@@ -84,2 +87,3 @@ type, | ||
message: `${type}: ${body.message}`, | ||
originalReport: report, | ||
stack: buildStack(body.id, body.message, body.sourceFile, body.lineNumber, body.columnNumber), | ||
@@ -105,2 +109,3 @@ } | ||
), | ||
originalReport: event, | ||
} | ||
@@ -107,0 +112,0 @@ } |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
1012883
17787