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

@metrichor/epi2me-api

Package Overview
Dependencies
Maintainers
3
Versions
231
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metrichor/epi2me-api - npm Package Compare versions

Comparing version

to
6.0.7173308

2

cjs/src/epi2me-fs.d.ts

@@ -49,3 +49,3 @@ /// <reference types="node" />

private s3?;
private proxyAgent?;
readonly proxyAgent?: Agent;
constructor(opts: Partial<EPI2ME_OPTIONS>);

@@ -52,0 +52,0 @@ private fetchToken;

@@ -75,3 +75,2 @@ /**

});
const DISABLE_CERT_VALIDATION_FOR_PROXIES = true;
class EPI2ME_FS extends epi2me.EPI2ME {

@@ -97,5 +96,2 @@ constructor(opts) {

const proxyAgent = hasProxy ? ProxyAgent__default["default"](proxy) : undefined;
if (proxyAgent && DISABLE_CERT_VALIDATION_FOR_PROXIES) {
proxyAgent.options.rejectUnauthorized = false;
}
this.proxyAgent = proxyAgent;

@@ -878,3 +874,3 @@ // overwrite non-fs REST and GQL object

const idWorkflowInstance = tsRuntimeTypecheck.makeString(this.config.instance.id_workflow_instance);
this.telemetry = telemetry.Telemetry.connect(idWorkflowInstance, this.graphQL, tsRuntimeTypecheck.asDefined(telemetryNames));
this.telemetry = telemetry.Telemetry.connect(idWorkflowInstance, this.graphQL, tsRuntimeTypecheck.asDefined(telemetryNames), this.proxyAgent);
// const reports$ = this.telemetry.telemetryReports$().pipe(filter(isDefined));

@@ -881,0 +877,0 @@ const { add: writeQueue } = queue.createQueue({ signal$: this.analysisStopped$ }, async ([filePath, content]) => {

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

/// <reference types="node" />
import type { REST_FS } from './rest-fs';

@@ -7,2 +8,3 @@ import type { GraphQL } from './graphql';

import type { EPI2ME_OPTIONS } from './epi2me-options.type';
import type { Agent } from 'http';
import { EPI2ME_FS } from './epi2me-fs';

@@ -28,2 +30,3 @@ import { BehaviorSubject } from 'rxjs';

get sampleReader(): SampleReader;
get proxy(): Agent | undefined;
telemetry(id: string, telemetryNames: Dictionary<Dictionary<string>>): Telemetry;

@@ -30,0 +33,0 @@ reset(options?: Partial<EPI2ME_OPTIONS>): void;

@@ -60,4 +60,7 @@ /**

}
get proxy() {
return this.primary.proxyAgent;
}
telemetry(id, telemetryNames) {
return telemetry.Telemetry.connect(id, this.graphQL, telemetryNames);
return telemetry.Telemetry.connect(id, this.graphQL, telemetryNames, this.proxy);
}

@@ -64,0 +67,0 @@ reset(options = {}) {

@@ -31,2 +31,5 @@ /**

init.headers = headers;
// NOTE we don't do anything proxy related here
// it would be nice to offer the option but this is primarily used in the "web"
// version which cannot reference a HTTPAgent that's required
return fetch.fetch(uri, init);

@@ -33,0 +36,0 @@ };

/// <reference lib="dom" />
export declare const fetch: typeof globalThis.fetch;
import type { NodeFetch } from './RequestOptions.type';
export declare const fetch: NodeFetch;
export declare const Request: {

@@ -4,0 +5,0 @@ new (input: RequestInfo, init?: RequestInit | undefined): Request;

@@ -20,2 +20,6 @@ /// <reference types="node" />

}
export interface NodeRequestInit extends RequestInit {
agent?: Agent;
}
export declare type NodeFetch = (info: RequestInfo, init?: NodeRequestInit) => Promise<Response>;
export interface ExtendedRequestOptions extends RequestOptions {

@@ -22,0 +26,0 @@ method?: 'head' | 'get' | 'put' | 'post';

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

/// <reference types="node" />
import { JSONObject } from 'ts-runtime-typecheck';

@@ -5,2 +6,3 @@ import type { ExtendedTelemetrySource, TelemetryNames } from './telemetry.type';

import type { GraphQL } from './graphql';
import type { Agent } from 'http';
export declare class Telemetry {

@@ -14,6 +16,7 @@ private readonly sources;

readonly anyReportsReady$: Observable<boolean>;
constructor(id: string, graphql: GraphQL, telemetryNames: TelemetryNames);
httpAgent?: Agent;
constructor(id: string, graphql: GraphQL, telemetryNames: TelemetryNames, httpAgent?: Agent);
private getTelemetrySources;
private getSources$;
static connect(id: string, graphQL: GraphQL, reportNames: TelemetryNames): Telemetry;
static connect(id: string, graphQL: GraphQL, reportNames: TelemetryNames, httpAgent?: Agent): Telemetry;
}

@@ -27,3 +27,3 @@ /**

class Telemetry {
constructor(id, graphql, telemetryNames) {
constructor(id, graphql, telemetryNames, httpAgent) {
/*

@@ -46,2 +46,3 @@ NOTE this used to flatten sources so that each pipeline dealt with only

*/
this.httpAgent = httpAgent;
// get the sources for the telemetry reports on this instance ( automatically updates when the sources expire )

@@ -54,3 +55,3 @@ this.sources = this.getSources$(graphql, id, telemetryNames);

return Promise.all(sources.map(async (source) => {
const response = await fetch.fetch(source.headUrl, { method: 'head' });
const response = await fetch.fetch(source.headUrl, { method: 'head', agent: this.httpAgent });
if (!response.ok) {

@@ -99,3 +100,3 @@ // when no report is available yet the head request produces a 404

if (!reports || current.etag !== ((_a = previousSources[index]) === null || _a === void 0 ? void 0 : _a.etag)) {
const response = await fetch.fetch(current.getUrl);
const response = await fetch.fetch(current.getUrl, { agent: this.httpAgent });
if (!response.ok) {

@@ -156,6 +157,6 @@ throw new Error('Unable to retrieve report content');

// ensures we don't get more than 1 instance of telemetry for a epi2me instance
static connect(id, graphQL, reportNames) {
static connect(id, graphQL, reportNames, httpAgent) {
let inst = TELEMETRY_INSTANCES.get(id);
if (!inst) {
inst = new Telemetry(id, graphQL, reportNames);
inst = new Telemetry(id, graphQL, reportNames, httpAgent);
TELEMETRY_INSTANCES.set(id, inst);

@@ -162,0 +163,0 @@ }

@@ -49,3 +49,3 @@ /// <reference types="node" />

private s3?;
private proxyAgent?;
readonly proxyAgent?: Agent;
constructor(opts: Partial<EPI2ME_OPTIONS>);

@@ -52,0 +52,0 @@ private fetchToken;

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

/// <reference types="node" />
import type { REST_FS } from './rest-fs';

@@ -7,2 +8,3 @@ import type { GraphQL } from './graphql';

import type { EPI2ME_OPTIONS } from './epi2me-options.type';
import type { Agent } from 'http';
import { EPI2ME_FS } from './epi2me-fs';

@@ -28,2 +30,3 @@ import { BehaviorSubject } from 'rxjs';

get sampleReader(): SampleReader;
get proxy(): Agent | undefined;
telemetry(id: string, telemetryNames: Dictionary<Dictionary<string>>): Telemetry;

@@ -30,0 +33,0 @@ reset(options?: Partial<EPI2ME_OPTIONS>): void;

/// <reference lib="dom" />
export declare const fetch: typeof globalThis.fetch;
import type { NodeFetch } from './RequestOptions.type';
export declare const fetch: NodeFetch;
export declare const Request: {

@@ -4,0 +5,0 @@ new (input: RequestInfo, init?: RequestInit | undefined): Request;

@@ -20,2 +20,6 @@ /// <reference types="node" />

}
export interface NodeRequestInit extends RequestInit {
agent?: Agent;
}
export declare type NodeFetch = (info: RequestInfo, init?: NodeRequestInit) => Promise<Response>;
export interface ExtendedRequestOptions extends RequestOptions {

@@ -22,0 +26,0 @@ method?: 'head' | 'get' | 'put' | 'post';

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

/// <reference types="node" />
import { JSONObject } from 'ts-runtime-typecheck';

@@ -5,2 +6,3 @@ import type { ExtendedTelemetrySource, TelemetryNames } from './telemetry.type';

import type { GraphQL } from './graphql';
import type { Agent } from 'http';
export declare class Telemetry {

@@ -14,6 +16,7 @@ private readonly sources;

readonly anyReportsReady$: Observable<boolean>;
constructor(id: string, graphql: GraphQL, telemetryNames: TelemetryNames);
httpAgent?: Agent;
constructor(id: string, graphql: GraphQL, telemetryNames: TelemetryNames, httpAgent?: Agent);
private getTelemetrySources;
private getSources$;
static connect(id: string, graphQL: GraphQL, reportNames: TelemetryNames): Telemetry;
static connect(id: string, graphQL: GraphQL, reportNames: TelemetryNames, httpAgent?: Agent): Telemetry;
}
{
"name": "@metrichor/epi2me-api",
"version": "6.0.7149896",
"version": "6.0.7173308",
"license": "MPL-2.0",

@@ -5,0 +5,0 @@ "repository": "git@github.com:nanoporetech/epi2me-api.git",

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