Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/front-web/build/assets/fonts/iran-yekan/beflpn/minimal.tar
Назад
dist/index.d.ts 0000664 00000011333 15105315344 0007414 0 ustar 00 import { Scope } from '@sentry/hub'; import { Breadcrumb, CaptureContext, CustomSamplingContext, Event, Extra, Extras, Primitive, Severity, Transaction, TransactionContext, User } from '@sentry/types'; /** * Captures an exception event and sends it to Sentry. * * @param exception An exception-like object. * @returns The generated eventId. */ export declare function captureException(exception: any, captureContext?: CaptureContext): string; /** * Captures a message event and sends it to Sentry. * * @param message The message to send to Sentry. * @param level Define the level of the message. * @returns The generated eventId. */ export declare function captureMessage(message: string, captureContext?: CaptureContext | Severity): string; /** * Captures a manually created event and sends it to Sentry. * * @param event The event to send to Sentry. * @returns The generated eventId. */ export declare function captureEvent(event: Event): string; /** * Callback to set context information onto the scope. * @param callback Callback function that receives Scope. */ export declare function configureScope(callback: (scope: Scope) => void): void; /** * Records a new breadcrumb which will be attached to future events. * * Breadcrumbs will be added to subsequent events to provide more context on * user's actions prior to an error or crash. * * @param breadcrumb The breadcrumb to record. */ export declare function addBreadcrumb(breadcrumb: Breadcrumb): void; /** * Sets context data with the given name. * @param name of the context * @param context Any kind of data. This data will be normalized. */ export declare function setContext(name: string, context: { [key: string]: any; } | null): void; /** * Set an object that will be merged sent as extra data with the event. * @param extras Extras object to merge into current context. */ export declare function setExtras(extras: Extras): void; /** * Set an object that will be merged sent as tags data with the event. * @param tags Tags context object to merge into current context. */ export declare function setTags(tags: { [key: string]: Primitive; }): void; /** * Set key:value that will be sent as extra data with the event. * @param key String of extra * @param extra Any kind of data. This data will be normalized. */ export declare function setExtra(key: string, extra: Extra): void; /** * Set key:value that will be sent as tags data with the event. * * Can also be used to unset a tag, by passing `undefined`. * * @param key String key of tag * @param value Value of tag */ export declare function setTag(key: string, value: Primitive): void; /** * Updates user context information for future events. * * @param user User context object to be set in the current context. Pass `null` to unset the user. */ export declare function setUser(user: User | null): void; /** * Creates a new scope with and executes the given operation within. * The scope is automatically removed once the operation * finishes or throws. * * This is essentially a convenience function for: * * pushScope(); * callback(); * popScope(); * * @param callback that will be enclosed into push/popScope. */ export declare function withScope(callback: (scope: Scope) => void): void; /** * Calls a function on the latest client. Use this with caution, it's meant as * in "internal" helper so we don't need to expose every possible function in * the shim. It is not guaranteed that the client actually implements the * function. * * @param method The method to call on the client/client. * @param args Arguments to pass to the client/fontend. * @hidden */ export declare function _callOnClient(method: string, ...args: any[]): void; /** * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation. * * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a * new child span within the transaction or any span, call the respective `.startChild()` method. * * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded. * * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its * finished child spans will be sent to Sentry. * * @param context Properties of the new `Transaction`. * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent * default values). See {@link Options.tracesSampler}. * * @returns The transaction which was just started */ export declare function startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction; //# sourceMappingURL=index.d.ts.map dist/index.d.ts.map 0000664 00000003064 15105315344 0010172 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,KAAK,EACL,KAAK,EACL,MAAM,EACN,SAAS,EACT,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,IAAI,EACL,MAAM,eAAe,CAAC;AAiBvB;;;;;GAKG;AAEH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAYxF;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,QAAQ,GAAG,MAAM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AAE,kBAAkB,EAC3B,qBAAqB,CAAC,EAAE,qBAAqB,GAC5C,WAAW,CAEb"} dist/index.js 0000664 00000016070 15105315344 0007163 0 ustar 00 Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var hub_1 = require("@sentry/hub"); /** * This calls a function on the current hub. * @param method function to call on hub. * @param args to pass to function. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function callOnHub(method) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } var hub = hub_1.getCurrentHub(); if (hub && hub[method]) { // eslint-disable-next-line @typescript-eslint/no-explicit-any return hub[method].apply(hub, tslib_1.__spread(args)); } throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report."); } /** * Captures an exception event and sends it to Sentry. * * @param exception An exception-like object. * @returns The generated eventId. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types function captureException(exception, captureContext) { var syntheticException; try { throw new Error('Sentry syntheticException'); } catch (exception) { syntheticException = exception; } return callOnHub('captureException', exception, { captureContext: captureContext, originalException: exception, syntheticException: syntheticException, }); } exports.captureException = captureException; /** * Captures a message event and sends it to Sentry. * * @param message The message to send to Sentry. * @param level Define the level of the message. * @returns The generated eventId. */ function captureMessage(message, captureContext) { var syntheticException; try { throw new Error(message); } catch (exception) { syntheticException = exception; } // This is necessary to provide explicit scopes upgrade, without changing the original // arity of the `captureMessage(message, level)` method. var level = typeof captureContext === 'string' ? captureContext : undefined; var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined; return callOnHub('captureMessage', message, level, tslib_1.__assign({ originalException: message, syntheticException: syntheticException }, context)); } exports.captureMessage = captureMessage; /** * Captures a manually created event and sends it to Sentry. * * @param event The event to send to Sentry. * @returns The generated eventId. */ function captureEvent(event) { return callOnHub('captureEvent', event); } exports.captureEvent = captureEvent; /** * Callback to set context information onto the scope. * @param callback Callback function that receives Scope. */ function configureScope(callback) { callOnHub('configureScope', callback); } exports.configureScope = configureScope; /** * Records a new breadcrumb which will be attached to future events. * * Breadcrumbs will be added to subsequent events to provide more context on * user's actions prior to an error or crash. * * @param breadcrumb The breadcrumb to record. */ function addBreadcrumb(breadcrumb) { callOnHub('addBreadcrumb', breadcrumb); } exports.addBreadcrumb = addBreadcrumb; /** * Sets context data with the given name. * @param name of the context * @param context Any kind of data. This data will be normalized. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function setContext(name, context) { callOnHub('setContext', name, context); } exports.setContext = setContext; /** * Set an object that will be merged sent as extra data with the event. * @param extras Extras object to merge into current context. */ function setExtras(extras) { callOnHub('setExtras', extras); } exports.setExtras = setExtras; /** * Set an object that will be merged sent as tags data with the event. * @param tags Tags context object to merge into current context. */ function setTags(tags) { callOnHub('setTags', tags); } exports.setTags = setTags; /** * Set key:value that will be sent as extra data with the event. * @param key String of extra * @param extra Any kind of data. This data will be normalized. */ function setExtra(key, extra) { callOnHub('setExtra', key, extra); } exports.setExtra = setExtra; /** * Set key:value that will be sent as tags data with the event. * * Can also be used to unset a tag, by passing `undefined`. * * @param key String key of tag * @param value Value of tag */ function setTag(key, value) { callOnHub('setTag', key, value); } exports.setTag = setTag; /** * Updates user context information for future events. * * @param user User context object to be set in the current context. Pass `null` to unset the user. */ function setUser(user) { callOnHub('setUser', user); } exports.setUser = setUser; /** * Creates a new scope with and executes the given operation within. * The scope is automatically removed once the operation * finishes or throws. * * This is essentially a convenience function for: * * pushScope(); * callback(); * popScope(); * * @param callback that will be enclosed into push/popScope. */ function withScope(callback) { callOnHub('withScope', callback); } exports.withScope = withScope; /** * Calls a function on the latest client. Use this with caution, it's meant as * in "internal" helper so we don't need to expose every possible function in * the shim. It is not guaranteed that the client actually implements the * function. * * @param method The method to call on the client/client. * @param args Arguments to pass to the client/fontend. * @hidden */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function _callOnClient(method) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } callOnHub.apply(void 0, tslib_1.__spread(['_invokeClient', method], args)); } exports._callOnClient = _callOnClient; /** * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation. * * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a * new child span within the transaction or any span, call the respective `.startChild()` method. * * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded. * * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its * finished child spans will be sent to Sentry. * * @param context Properties of the new `Transaction`. * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent * default values). See {@link Options.tracesSampler}. * * @returns The transaction which was just started */ function startTransaction(context, customSamplingContext) { return callOnHub('startTransaction', tslib_1.__assign({}, context), customSamplingContext); } exports.startTransaction = startTransaction; //# sourceMappingURL=index.js.map dist/index.js.map 0000664 00000023466 15105315344 0007746 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mCAAwD;AAexD;;;;GAIG;AACH,8DAA8D;AAC9D,SAAS,SAAS,CAAI,MAAc;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAClD,IAAM,GAAG,GAAG,mBAAa,EAAE,CAAC;IAC5B,IAAI,GAAG,IAAI,GAAG,CAAC,MAAmB,CAAC,EAAE;QACnC,8DAA8D;QAC9D,OAAQ,GAAG,CAAC,MAAmB,CAAC,OAAxB,GAAG,mBAAiC,IAAI,GAAE;KACnD;IACD,MAAM,IAAI,KAAK,CAAC,uBAAqB,MAAM,yDAAsD,CAAC,CAAC;AACrG,CAAC;AAED;;;;;GAKG;AACH,iHAAiH;AACjH,SAAgB,gBAAgB,CAAC,SAAc,EAAE,cAA+B;IAC9E,IAAI,kBAAyB,CAAC;IAC9B,IAAI;QACF,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;KAC9C;IAAC,OAAO,SAAS,EAAE;QAClB,kBAAkB,GAAG,SAAkB,CAAC;KACzC;IACD,OAAO,SAAS,CAAC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CAKC","sourcesContent":["import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport {\n Breadcrumb,\n CaptureContext,\n CustomSamplingContext,\n Event,\n Extra,\n Extras,\n Primitive,\n Severity,\n Transaction,\n TransactionContext,\n User,\n} from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction callOnHub<T>(method: string, ...args: any[]): T {\n const hub = getCurrentHub();\n if (hub && hub[method as keyof Hub]) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (hub[method as keyof Hub] as any)(...args);\n }\n throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function captureException(exception: any, captureContext?: CaptureContext): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureException', exception, {\n captureContext,\n originalException: exception,\n syntheticException,\n });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, captureContext?: CaptureContext | Severity): string {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n\n return callOnHub('captureMessage', message, level, {\n originalException: message,\n syntheticException,\n ...context,\n });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n callOnHub<void>('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n callOnHub<void>('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n callOnHub<void>('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: Extras): void {\n callOnHub<void>('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: Primitive }): void {\n callOnHub<void>('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key: string, extra: Extra): void {\n callOnHub<void>('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key: string, value: Primitive): void {\n callOnHub<void>('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n callOnHub<void>('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n callOnHub<void>('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _callOnClient(method: string, ...args: any[]): void {\n callOnHub<void>('_invokeClient', method, ...args);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nexport function startTransaction(\n context: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n): Transaction {\n return callOnHub('startTransaction', { ...context }, customSamplingContext);\n}\n"]} esm/index.d.ts 0000664 00000011333 15105315344 0007235 0 ustar 00 import { Scope } from '@sentry/hub'; import { Breadcrumb, CaptureContext, CustomSamplingContext, Event, Extra, Extras, Primitive, Severity, Transaction, TransactionContext, User } from '@sentry/types'; /** * Captures an exception event and sends it to Sentry. * * @param exception An exception-like object. * @returns The generated eventId. */ export declare function captureException(exception: any, captureContext?: CaptureContext): string; /** * Captures a message event and sends it to Sentry. * * @param message The message to send to Sentry. * @param level Define the level of the message. * @returns The generated eventId. */ export declare function captureMessage(message: string, captureContext?: CaptureContext | Severity): string; /** * Captures a manually created event and sends it to Sentry. * * @param event The event to send to Sentry. * @returns The generated eventId. */ export declare function captureEvent(event: Event): string; /** * Callback to set context information onto the scope. * @param callback Callback function that receives Scope. */ export declare function configureScope(callback: (scope: Scope) => void): void; /** * Records a new breadcrumb which will be attached to future events. * * Breadcrumbs will be added to subsequent events to provide more context on * user's actions prior to an error or crash. * * @param breadcrumb The breadcrumb to record. */ export declare function addBreadcrumb(breadcrumb: Breadcrumb): void; /** * Sets context data with the given name. * @param name of the context * @param context Any kind of data. This data will be normalized. */ export declare function setContext(name: string, context: { [key: string]: any; } | null): void; /** * Set an object that will be merged sent as extra data with the event. * @param extras Extras object to merge into current context. */ export declare function setExtras(extras: Extras): void; /** * Set an object that will be merged sent as tags data with the event. * @param tags Tags context object to merge into current context. */ export declare function setTags(tags: { [key: string]: Primitive; }): void; /** * Set key:value that will be sent as extra data with the event. * @param key String of extra * @param extra Any kind of data. This data will be normalized. */ export declare function setExtra(key: string, extra: Extra): void; /** * Set key:value that will be sent as tags data with the event. * * Can also be used to unset a tag, by passing `undefined`. * * @param key String key of tag * @param value Value of tag */ export declare function setTag(key: string, value: Primitive): void; /** * Updates user context information for future events. * * @param user User context object to be set in the current context. Pass `null` to unset the user. */ export declare function setUser(user: User | null): void; /** * Creates a new scope with and executes the given operation within. * The scope is automatically removed once the operation * finishes or throws. * * This is essentially a convenience function for: * * pushScope(); * callback(); * popScope(); * * @param callback that will be enclosed into push/popScope. */ export declare function withScope(callback: (scope: Scope) => void): void; /** * Calls a function on the latest client. Use this with caution, it's meant as * in "internal" helper so we don't need to expose every possible function in * the shim. It is not guaranteed that the client actually implements the * function. * * @param method The method to call on the client/client. * @param args Arguments to pass to the client/fontend. * @hidden */ export declare function _callOnClient(method: string, ...args: any[]): void; /** * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation. * * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a * new child span within the transaction or any span, call the respective `.startChild()` method. * * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded. * * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its * finished child spans will be sent to Sentry. * * @param context Properties of the new `Transaction`. * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent * default values). See {@link Options.tracesSampler}. * * @returns The transaction which was just started */ export declare function startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction; //# sourceMappingURL=index.d.ts.map esm/index.d.ts.map 0000664 00000003064 15105315344 0010013 0 ustar 00 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,KAAK,EACL,KAAK,EACL,MAAM,EACN,SAAS,EACT,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,IAAI,EACL,MAAM,eAAe,CAAC;AAiBvB;;;;;GAKG;AAEH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAYxF;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,QAAQ,GAAG,MAAM,CAkBlG;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEjD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAErE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAE1D;AAED;;;;GAIG;AAEH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,IAAI,GAAG,IAAI,CAErF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,IAAI,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAE/C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAEhE;AAED;;;;;;;;;GASG;AAEH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAElE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,kBAAkB,EAC3B,qBAAqB,CAAC,EAAE,qBAAqB,GAC5C,WAAW,CAEb"} esm/index.js 0000664 00000015150 15105315344 0007002 0 ustar 00 import { __assign, __read, __spread } from "tslib"; import { getCurrentHub } from '@sentry/hub'; /** * This calls a function on the current hub. * @param method function to call on hub. * @param args to pass to function. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function callOnHub(method) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } var hub = getCurrentHub(); if (hub && hub[method]) { // eslint-disable-next-line @typescript-eslint/no-explicit-any return hub[method].apply(hub, __spread(args)); } throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report."); } /** * Captures an exception event and sends it to Sentry. * * @param exception An exception-like object. * @returns The generated eventId. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types export function captureException(exception, captureContext) { var syntheticException; try { throw new Error('Sentry syntheticException'); } catch (exception) { syntheticException = exception; } return callOnHub('captureException', exception, { captureContext: captureContext, originalException: exception, syntheticException: syntheticException, }); } /** * Captures a message event and sends it to Sentry. * * @param message The message to send to Sentry. * @param level Define the level of the message. * @returns The generated eventId. */ export function captureMessage(message, captureContext) { var syntheticException; try { throw new Error(message); } catch (exception) { syntheticException = exception; } // This is necessary to provide explicit scopes upgrade, without changing the original // arity of the `captureMessage(message, level)` method. var level = typeof captureContext === 'string' ? captureContext : undefined; var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined; return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context)); } /** * Captures a manually created event and sends it to Sentry. * * @param event The event to send to Sentry. * @returns The generated eventId. */ export function captureEvent(event) { return callOnHub('captureEvent', event); } /** * Callback to set context information onto the scope. * @param callback Callback function that receives Scope. */ export function configureScope(callback) { callOnHub('configureScope', callback); } /** * Records a new breadcrumb which will be attached to future events. * * Breadcrumbs will be added to subsequent events to provide more context on * user's actions prior to an error or crash. * * @param breadcrumb The breadcrumb to record. */ export function addBreadcrumb(breadcrumb) { callOnHub('addBreadcrumb', breadcrumb); } /** * Sets context data with the given name. * @param name of the context * @param context Any kind of data. This data will be normalized. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any export function setContext(name, context) { callOnHub('setContext', name, context); } /** * Set an object that will be merged sent as extra data with the event. * @param extras Extras object to merge into current context. */ export function setExtras(extras) { callOnHub('setExtras', extras); } /** * Set an object that will be merged sent as tags data with the event. * @param tags Tags context object to merge into current context. */ export function setTags(tags) { callOnHub('setTags', tags); } /** * Set key:value that will be sent as extra data with the event. * @param key String of extra * @param extra Any kind of data. This data will be normalized. */ export function setExtra(key, extra) { callOnHub('setExtra', key, extra); } /** * Set key:value that will be sent as tags data with the event. * * Can also be used to unset a tag, by passing `undefined`. * * @param key String key of tag * @param value Value of tag */ export function setTag(key, value) { callOnHub('setTag', key, value); } /** * Updates user context information for future events. * * @param user User context object to be set in the current context. Pass `null` to unset the user. */ export function setUser(user) { callOnHub('setUser', user); } /** * Creates a new scope with and executes the given operation within. * The scope is automatically removed once the operation * finishes or throws. * * This is essentially a convenience function for: * * pushScope(); * callback(); * popScope(); * * @param callback that will be enclosed into push/popScope. */ export function withScope(callback) { callOnHub('withScope', callback); } /** * Calls a function on the latest client. Use this with caution, it's meant as * in "internal" helper so we don't need to expose every possible function in * the shim. It is not guaranteed that the client actually implements the * function. * * @param method The method to call on the client/client. * @param args Arguments to pass to the client/fontend. * @hidden */ // eslint-disable-next-line @typescript-eslint/no-explicit-any export function _callOnClient(method) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } callOnHub.apply(void 0, __spread(['_invokeClient', method], args)); } /** * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation. * * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a * new child span within the transaction or any span, call the respective `.startChild()` method. * * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded. * * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its * finished child spans will be sent to Sentry. * * @param context Properties of the new `Transaction`. * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent * default values). See {@link Options.tracesSampler}. * * @returns The transaction which was just started */ export function startTransaction(context, customSamplingContext) { return callOnHub('startTransaction', __assign({}, context), customSamplingContext); } //# sourceMappingURL=index.js.map esm/index.js.map 0000664 00000023351 15105315344 0007560 0 ustar 00 {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,aAAa,CAAC;AAexD;;;;GAIG;AACH,8DAA8D;AAC9D,SAAS,SAAS,CAAI,MAAc;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAClD,IAAM,GAAG,GAAG,aAAa,EAAE,CAAC;IAC5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;;;;GASG;AACH,8DAA8D;AAC9D,MAAM,UAAU,aAAa,CAAC,MAAc;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAC1D,SAAS,yBAAO,eAAe,EAAE,MAAM,GAAK,IAAI,GAAE;AACpD,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA2B,EAC3B,qBAA6C;IAE7C,OAAO,SAAS,CAAC,kBAAkB,eAAO,OAAO,GAAI,qBAAqB,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["import { getCurrentHub, Hub, Scope } from '@sentry/hub';\nimport {\n Breadcrumb,\n CaptureContext,\n CustomSamplingContext,\n Event,\n Extra,\n Extras,\n Primitive,\n Severity,\n Transaction,\n TransactionContext,\n User,\n} from '@sentry/types';\n\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction callOnHub<T>(method: string, ...args: any[]): T {\n const hub = getCurrentHub();\n if (hub && hub[method as keyof Hub]) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (hub[method as keyof Hub] as any)(...args);\n }\n throw new Error(`No hub defined or ${method} was not found on the hub, please open a bug report.`);\n}\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function captureException(exception: any, captureContext?: CaptureContext): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n return callOnHub('captureException', exception, {\n captureContext,\n originalException: exception,\n syntheticException,\n });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message: string, captureContext?: CaptureContext | Severity): string {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n\n return callOnHub('captureMessage', message, level, {\n originalException: message,\n syntheticException,\n ...context,\n });\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event: Event): string {\n return callOnHub('captureEvent', event);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback: (scope: Scope) => void): void {\n callOnHub<void>('configureScope', callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\n callOnHub<void>('addBreadcrumb', breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function setContext(name: string, context: { [key: string]: any } | null): void {\n callOnHub<void>('setContext', name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: Extras): void {\n callOnHub<void>('setExtras', extras);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: Primitive }): void {\n callOnHub<void>('setTags', tags);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key: string, extra: Extra): void {\n callOnHub<void>('setExtra', key, extra);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key: string, value: Primitive): void {\n callOnHub<void>('setTag', key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n callOnHub<void>('setUser', user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback: (scope: Scope) => void): void {\n callOnHub<void>('withScope', callback);\n}\n\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _callOnClient(method: string, ...args: any[]): void {\n callOnHub<void>('_invokeClient', method, ...args);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nexport function startTransaction(\n context: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n): Transaction {\n return callOnHub('startTransaction', { ...context }, customSamplingContext);\n}\n"]} LICENSE 0000664 00000002742 15105315344 0005561 0 ustar 00 BSD 3-Clause License Copyright (c) 2019, Sentry All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. README.md 0000664 00000004356 15105315344 0006036 0 ustar 00 <p align="center"> <a href="https://sentry.io" target="_blank" align="center"> <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280"> </a> <br /> </p> # Sentry JavaScript SDK Minimal [](https://www.npmjs.com/package/@sentry/minimal) [](https://www.npmjs.com/package/@sentry/minimal) [](https://www.npmjs.com/package/@sentry/minimal) [](http://getsentry.github.io/sentry-javascript/) ## Links - [Official SDK Docs](https://docs.sentry.io/quickstart/) - [TypeDoc](http://getsentry.github.io/sentry-javascript/) ## General A minimal Sentry SDK that uses a configured client when embedded into an application. It allows library authors add support for a Sentry SDK without having to bundle the entire SDK or being dependent on a specific platform. If the user is using Sentry in their application and your library uses `@sentry/minimal`, the user receives all breadcrumbs/messages/events you added to your libraries codebase. ## Usage To use the minimal, you do not have to initialize an SDK. This should be handled by the user of your library. Instead, directly use the exported functions of `@sentry/minimal` to add breadcrumbs or capture events: ```javascript import * as Sentry from '@sentry/minimal'; // Add a breadcrumb for future events Sentry.addBreadcrumb({ message: 'My Breadcrumb', // ... }); // Capture exceptions, messages or manual events Sentry.captureMessage('Hello, world!'); Sentry.captureException(new Error('Good bye')); Sentry.captureEvent({ message: 'Manual', stacktrace: [ // ... ], }); ``` Note that while strictly possible, it is discouraged to interfere with the event context. If for some reason your library needs to inject context information, beware that this might override the user's context values: ```javascript // Set user information, as well as tags and further extras Sentry.configureScope(scope => { scope.setExtra('battery', 0.7); scope.setTag('user_mode', 'admin'); scope.setUser({ id: '4711' }); // scope.clear(); }); ``` package.json 0000664 00000006144 15105315344 0007042 0 ustar 00 { "_args": [ [ "@sentry/minimal@6.2.3", "/home/freeclou/app.optimyar.com/backend" ] ], "_from": "@sentry/minimal@6.2.3", "_id": "@sentry/minimal@6.2.3", "_inBundle": false, "_integrity": "sha512-Gpn9x4NQAG7E94EK1+hAz9GUcYrffTuqJ/XgqvHYk0jsHZ6RfsXYrmBac0ZwUxOivMf2t0n5opK0v5rhMDfF2w==", "_location": "/@sentry/minimal", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, "raw": "@sentry/minimal@6.2.3", "name": "@sentry/minimal", "escapedName": "@sentry%2fminimal", "scope": "@sentry", "rawSpec": "6.2.3", "saveSpec": null, "fetchSpec": "6.2.3" }, "_requiredBy": [ "/@sentry/core", "/@sentry/tracing" ], "_resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.2.3.tgz", "_spec": "6.2.3", "_where": "/home/freeclou/app.optimyar.com/backend", "author": { "name": "Sentry" }, "bugs": { "url": "https://github.com/getsentry/sentry-javascript/issues" }, "dependencies": { "@sentry/hub": "6.2.3", "@sentry/types": "6.2.3", "tslib": "^1.9.3" }, "description": "Sentry minimal library that can be used in other packages", "devDependencies": { "@sentry-internal/eslint-config-sdk": "6.2.3", "eslint": "7.6.0", "jest": "^24.7.1", "npm-run-all": "^4.1.2", "prettier": "1.19.0", "rimraf": "^2.6.3", "typescript": "3.7.5" }, "engines": { "node": ">=6" }, "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/minimal", "jest": { "collectCoverage": true, "transform": { "^.+\\.ts$": "ts-jest" }, "moduleFileExtensions": [ "js", "ts" ], "testEnvironment": "node", "testMatch": [ "**/*.test.ts" ], "globals": { "ts-jest": { "tsConfig": "./tsconfig.json", "diagnostics": false } } }, "license": "BSD-3-Clause", "main": "dist/index.js", "module": "esm/index.js", "name": "@sentry/minimal", "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "git://github.com/getsentry/sentry-javascript.git" }, "scripts": { "build": "run-p build:es5 build:esm", "build:es5": "tsc -p tsconfig.build.json", "build:esm": "tsc -p tsconfig.esm.json", "build:watch": "run-p build:watch:es5 build:watch:esm", "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", "clean": "rimraf dist coverage", "fix": "run-s fix:eslint fix:prettier", "fix:eslint": "eslint . --format stylish --fix", "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", "link:yarn": "yarn link", "lint": "run-s lint:prettier lint:eslint", "lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish", "lint:prettier": "prettier --check \"{src,test}/**/*.ts\"", "pack": "npm pack", "test": "jest", "test:watch": "jest --watch" }, "sideEffects": false, "types": "dist/index.d.ts", "version": "6.2.3", "volta": { "extends": "../../package.json" } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка