@adonisjs/profiler
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -42,3 +42,3 @@ declare module '@ioc:Adonis/Core/Profiler' { | ||
} | ||
export type ProfilerConfig = { | ||
export type ProfilerConfigContract = { | ||
enabled: boolean; | ||
@@ -45,0 +45,0 @@ whitelist: string[]; |
@@ -5,3 +5,3 @@ import { IocContract } from '@adonisjs/fold'; | ||
constructor($container: IocContract); | ||
protected $registerProfiler(): void; | ||
register(): void; | ||
} |
@@ -8,6 +8,6 @@ "use strict"; | ||
} | ||
$registerProfiler() { | ||
register() { | ||
this.$container.singleton('Adonis/Core/Profiler', () => { | ||
const Config = this.$container.use('Adonis/Core/Config'); | ||
return new Profiler_1.Profiler(Config.get('app.profiler', {})); | ||
const config = this.$container.use('Adonis/Core/Config').get('app.profiler', {}); | ||
return new Profiler_1.Profiler(config); | ||
}); | ||
@@ -14,0 +14,0 @@ } |
/// <reference path="../../adonis-typings/profiler.d.ts" /> | ||
import { Profile } from './Profile'; | ||
import { ProfilerContract, ProfilerConfig, ProfilerSubscriber, ProfilerRowContract, ProfilerActionContract } from '@ioc:Adonis/Core/Profiler'; | ||
import { ProfilerContract, ProfilerSubscriber, ProfilerRowContract, ProfilerActionContract, ProfilerConfigContract } from '@ioc:Adonis/Core/Profiler'; | ||
export declare class Profiler extends Profile implements ProfilerContract { | ||
subscriber: ProfilerSubscriber; | ||
private _config; | ||
constructor(config: Partial<ProfilerConfig>); | ||
constructor(config: Partial<ProfilerConfigContract>); | ||
protected $getAction(action: string, data?: any): ProfilerActionContract; | ||
@@ -9,0 +9,0 @@ isEnabled(labelOrAction: string): boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Row_1 = require("./Row"); | ||
const Dummy_1 = require("./Dummy"); | ||
const Profile_1 = require("./Profile"); | ||
const Action_1 = require("./Action"); | ||
const Dummy_1 = require("./Dummy"); | ||
class Profiler extends Profile_1.Profile { | ||
@@ -8,0 +8,0 @@ constructor(config) { |
{ | ||
"name": "@adonisjs/profiler", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Profiler to time function calls in AdonisJs with context", | ||
@@ -5,0 +5,0 @@ "files": [ |
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
19266