New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@yuants/prometheus-client

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yuants/prometheus-client - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

3

dist/index.js

@@ -1,4 +0,3 @@

import { Registry } from './registry';
export { Registry } from './registry';
export * from './types';
export default () => new Registry();
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import prom from '.';
import { Registry } from './registry';
describe('promjs', () => {

@@ -10,3 +10,3 @@ // e2e Test

desired = [];
registry = prom();
registry = new Registry();
errors = [];

@@ -13,0 +13,0 @@ const counter = registry.create('counter', 'my_counter', 'A counter for things');

@@ -33,5 +33,2 @@ declare abstract class Collector<T extends MetricValue> {

declare const _default: () => Registry;
export default _default;
declare class Gauge extends Counter {

@@ -95,3 +92,6 @@ dec(labels?: Labels): this;

declare class Registry {
/**
* @public
*/
export declare class Registry {
private data;

@@ -98,0 +98,0 @@ constructor();

@@ -5,2 +5,5 @@ import { Counter } from './counter';

import { formatCounterOrGauge, formatHistogramOrSummary } from './utils';
/**
* @public
*/
export class Registry {

@@ -7,0 +10,0 @@ constructor() {

@@ -1,5 +0,3 @@

import { Registry } from './registry';
export { Registry } from './registry';
export * from './types';
declare const _default: () => Registry;
export default _default;
//# sourceMappingURL=index.d.ts.map

@@ -17,5 +17,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const registry_1 = require("./registry");
exports.Registry = void 0;
var registry_1 = require("./registry");
Object.defineProperty(exports, "Registry", { enumerable: true, get: function () { return registry_1.Registry; } });
__exportStar(require("./types"), exports);
exports.default = () => new registry_1.Registry();
//# sourceMappingURL=index.js.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = __importDefault(require("."));
const registry_1 = require("./registry");
describe('promjs', () => {

@@ -15,3 +12,3 @@ // e2e Test

desired = [];
registry = (0, _1.default)();
registry = new registry_1.Registry();
errors = [];

@@ -18,0 +15,0 @@ const counter = registry.create('counter', 'my_counter', 'A counter for things');

import { Counter } from './counter';
import { Gauge } from './gauge';
import { Histogram } from './histogram';
/**
* @public
*/
export declare class Registry {

@@ -5,0 +8,0 @@ private data;

@@ -8,2 +8,5 @@ "use strict";

const utils_1 = require("./utils");
/**
* @public
*/
class Registry {

@@ -10,0 +13,0 @@ constructor() {

{
"name": "@yuants/prometheus-client",
"version": "0.0.0",
"version": "0.0.1",
"main": "lib/index.js",

@@ -25,5 +25,3 @@ "module": "dist/index.js",

},
"dependencies": {
"rxjs": "~7.5.6"
},
"dependencies": {},
"scripts": {

@@ -30,0 +28,0 @@ "build": "heft test --clean && api-extractor run --local && yuan-toolkit post-build"

{
"libraries/prometheus-client/CHANGELOG.json": "da1cc1d1f4049547d866ccb03f89d4f07accd59c",
"libraries/prometheus-client/CHANGELOG.md": "004efe28f8f18a0e8dbb6a0a612fc89166086c4a",
"libraries/prometheus-client/LICENSE": "9cd1640bad172ba9fc1e83f57b3efc53f6199b7f",

@@ -8,4 +10,4 @@ "libraries/prometheus-client/README.md": "bad384e584504a8d1da434aea05a8d5cf70cdfab",

"libraries/prometheus-client/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
"libraries/prometheus-client/etc/prometheus-client.api.md": "9e09eb2ff129eea8afc573cf14898d07c0dd555b",
"libraries/prometheus-client/package.json": "60af15111bc786f9ee7bea3f82fc5a038757ec45",
"libraries/prometheus-client/etc/prometheus-client.api.md": "7f3874ae687ed972861370757a0e00cf8bfb5a22",
"libraries/prometheus-client/package.json": "8ab6d70abfe37948c32381e640a70ab6ac606b22",
"libraries/prometheus-client/src/collector.ts": "552ddbfffbdb70ed686bbb837dd2c0026e729c47",

@@ -18,6 +20,6 @@ "libraries/prometheus-client/src/counter.test.ts": "6d4a61e936ad7fb796ee608fdc50c66907380ddd",

"libraries/prometheus-client/src/histogram.ts": "f5e381a27b9564dbd249caf0413e409611cfa55c",
"libraries/prometheus-client/src/index.ts": "ff5bf22931d11c85a4bcdd68617b23afaa14c46c",
"libraries/prometheus-client/src/integration.test.ts": "e6187391b8c8be16c628832a5ca1916615b92e21",
"libraries/prometheus-client/src/index.ts": "28ac40810b125121c357392ae8ce7e6dea73dfcc",
"libraries/prometheus-client/src/integration.test.ts": "9b50b262408a28179e333c34c99fcac6b4a4fd58",
"libraries/prometheus-client/src/registry.test.ts": "3c8edd1e5d77d8fa4c61cc55e18ab66cea24136c",
"libraries/prometheus-client/src/registry.ts": "37506c7bc8f40cd63dc30717508146222d898696",
"libraries/prometheus-client/src/registry.ts": "e8712c185c89ecb7ac2ea32939f49503e33d6368",
"libraries/prometheus-client/src/types.ts": "4c1c13a2a71f1d51cd32ece0b961d50ce7f56daf",

@@ -27,4 +29,4 @@ "libraries/prometheus-client/src/utils.test.ts": "2a77871177094b8772ec9b17af5239d1209838c7",

"libraries/prometheus-client/tsconfig.json": "22f94ca28b507f8ddcc21b9053158eefd3f726a9",
"libraries/prometheus-client/.rush/temp/shrinkwrap-deps.json": "14db33f288347906edd17318bc90b111585008bc",
"libraries/prometheus-client/.rush/temp/shrinkwrap-deps.json": "65cf93e7242d4d98073295429b014238b4196e80",
"tools/toolkit/temp/package-deps.json": "6fdcf40050022e8fb09d1b5d697d50761dae16d1"
}

@@ -176,29 +176,2 @@ {

{
"kind": "Variable",
"canonicalReference": "@yuants/prometheus-client!_default:var",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "_default: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "Registry",
"canonicalReference": "@yuants/prometheus-client!~Registry:class"
}
],
"isReadonly": true,
"releaseTag": "Public",
"name": "_default",
"variableTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "TypeAlias",

@@ -682,2 +655,584 @@ "canonicalReference": "@yuants/prometheus-client!CollectorType:type",

{
"kind": "Class",
"canonicalReference": "@yuants/prometheus-client!Registry:class",
"docComment": "/**\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare class Registry "
}
],
"releaseTag": "Public",
"name": "Registry",
"preserveMemberOrder": false,
"members": [
{
"kind": "Constructor",
"canonicalReference": "@yuants/prometheus-client!Registry:constructor(1)",
"docComment": "/**\n * Constructs a new instance of the `Registry` class\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "constructor();"
}
],
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 1,
"parameters": []
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#clear:member(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "clear(): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 1,
"parameters": [],
"isOptional": false,
"name": "clear"
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#create:member(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "create(type: "
},
{
"kind": "Content",
"text": "'counter'"
},
{
"kind": "Content",
"text": ", name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", help?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Counter",
"canonicalReference": "@yuants/prometheus-client!~Counter:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 1,
"parameters": [
{
"parameterName": "type",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isOptional": false
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"isOptional": false
},
{
"parameterName": "help",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"isOptional": true
}
],
"isOptional": false,
"name": "create"
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#create:member(2)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "create(type: "
},
{
"kind": "Content",
"text": "'gauge'"
},
{
"kind": "Content",
"text": ", name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", help?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Gauge",
"canonicalReference": "@yuants/prometheus-client!~Gauge:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 2,
"parameters": [
{
"parameterName": "type",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isOptional": false
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"isOptional": false
},
{
"parameterName": "help",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"isOptional": true
}
],
"isOptional": false,
"name": "create"
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#create:member(3)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "create(type: "
},
{
"kind": "Content",
"text": "'histogram'"
},
{
"kind": "Content",
"text": ", name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", help?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", histogramBuckets?: "
},
{
"kind": "Content",
"text": "number[]"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Histogram",
"canonicalReference": "@yuants/prometheus-client!~Histogram:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 9,
"endIndex": 10
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 3,
"parameters": [
{
"parameterName": "type",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isOptional": false
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"isOptional": false
},
{
"parameterName": "help",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"isOptional": true
},
{
"parameterName": "histogramBuckets",
"parameterTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"isOptional": true
}
],
"isOptional": false,
"name": "create"
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#get:member(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "get(type: "
},
{
"kind": "Content",
"text": "'counter'"
},
{
"kind": "Content",
"text": ", name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Counter",
"canonicalReference": "@yuants/prometheus-client!~Counter:class"
},
{
"kind": "Content",
"text": " | undefined"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 7
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 1,
"parameters": [
{
"parameterName": "type",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isOptional": false
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"isOptional": false
}
],
"isOptional": false,
"name": "get"
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#get:member(2)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "get(type: "
},
{
"kind": "Content",
"text": "'gauge'"
},
{
"kind": "Content",
"text": ", name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Gauge",
"canonicalReference": "@yuants/prometheus-client!~Gauge:class"
},
{
"kind": "Content",
"text": " | undefined"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 7
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 2,
"parameters": [
{
"parameterName": "type",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isOptional": false
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"isOptional": false
}
],
"isOptional": false,
"name": "get"
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#get:member(3)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "get(type: "
},
{
"kind": "Content",
"text": "'histogram'"
},
{
"kind": "Content",
"text": ", name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Histogram",
"canonicalReference": "@yuants/prometheus-client!~Histogram:class"
},
{
"kind": "Content",
"text": " | undefined"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 7
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 3,
"parameters": [
{
"parameterName": "type",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isOptional": false
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"isOptional": false
}
],
"isOptional": false,
"name": "get"
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#metrics:member(1)",
"docComment": "/**\n * Returns a string in the prometheus' desired format More info: https://prometheus.io/docs/concepts/data_model/ Loop through each metric type (counter, histogram, etc);\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "metrics(): "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 1,
"parameters": [],
"isOptional": false,
"name": "metrics"
},
{
"kind": "Method",
"canonicalReference": "@yuants/prometheus-client!Registry#reset:member(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "reset(): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"isProtected": false,
"overloadIndex": 1,
"parameters": [],
"isOptional": false,
"name": "reset"
}
],
"implementsTokenRanges": []
},
{
"kind": "TypeAlias",

@@ -694,3 +1249,3 @@ "canonicalReference": "@yuants/prometheus-client!RegistryType:type",

"text": "Registry",
"canonicalReference": "@yuants/prometheus-client!~Registry:class"
"canonicalReference": "@yuants/prometheus-client!Registry:class"
},

@@ -697,0 +1252,0 @@ {

@@ -18,8 +18,2 @@ ## API Report File for "@yuants/prometheus-client"

// Warning: (ae-forgotten-export) The symbol "Registry" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
const _default: () => Registry;
export default _default;
// Warning: (ae-forgotten-export) The symbol "Gauge" needs to be exported by the entry point index.d.ts

@@ -69,2 +63,24 @@ //

// @public (undocumented)
export class Registry {
constructor();
// (undocumented)
clear(): this;
// (undocumented)
create(type: 'counter', name: string, help?: string): Counter;
// (undocumented)
create(type: 'gauge', name: string, help?: string): Gauge;
// (undocumented)
create(type: 'histogram', name: string, help?: string, histogramBuckets?: number[]): Histogram;
// (undocumented)
get(type: 'counter', name: string): Counter | undefined;
// (undocumented)
get(type: 'gauge', name: string): Gauge | undefined;
// (undocumented)
get(type: 'histogram', name: string): Histogram | undefined;
metrics(): string;
// (undocumented)
reset(): this;
}
// @public (undocumented)
export type RegistryType = Registry;

@@ -71,0 +87,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc