@metrichor/epi2me-api
Advanced tools
Comparing version 6.0.7479716 to 6.0.7581324
@@ -23,2 +23,5 @@ /// <reference types="node" /> | ||
static GraphQL: typeof GraphQLFS; | ||
/** | ||
* @deprecated use `getExperiments` instead | ||
*/ | ||
SampleReader: SampleReader; | ||
@@ -25,0 +28,0 @@ telemetryLogStream?: fs.WriteStream; |
@@ -77,2 +77,5 @@ /** | ||
constructor(opts) { | ||
/** | ||
* @deprecated use `getExperiments` instead | ||
*/ | ||
this.SampleReader = new sampleReader.SampleReader(); | ||
@@ -214,3 +217,3 @@ this.stopped = true; | ||
async stopAnalysis() { | ||
// If we stop the cloud, there's no point uploading anymore | ||
// If we stop the cloud, there's no point uploading any more | ||
this.stopUpload(); | ||
@@ -242,3 +245,3 @@ // This will stop all the intervals on their next call | ||
const credentials$1 = new credentials.Epi2meCredentials(this.fetchToken, this.config.options.sessionGrace); | ||
// Will need to prefetch a token to acccess region before creating the S3 service | ||
// Will need to prefetch a token to access region before creating the S3 service | ||
return new AWS__namespace.S3(Object.assign(Object.assign({ useAccelerateEndpoint: this.config.options.awsAcceleration === 'on' }, options), { region: this.config.instance.region, credentials: credentials$1, httpOptions: { | ||
@@ -685,3 +688,3 @@ agent: this.proxyAgent, | ||
catch (err) { | ||
this.log.error(NodeError.NestedError.formatMessage('error writing telemtry', err)); | ||
this.log.error(NodeError.NestedError.formatMessage('error writing telemetry', err)); | ||
} | ||
@@ -698,3 +701,3 @@ if (this.config.options.telemetryCb) { | ||
const idWorkflowInstance = this.config.instance.id_workflow_instance; | ||
let folder = path__default["default"].join(tsRuntimeTypecheck.asString(this.config.options.outputFolder), tsRuntimeTypecheck.isUndefined(idWorkflowInstance) ? '' : tsRuntimeTypecheck.makeString(idWorkflowInstance)); | ||
let folder = path__default["default"].join(tsRuntimeTypecheck.asString(this.config.options.outputFolder), `${idWorkflowInstance !== null && idWorkflowInstance !== void 0 ? idWorkflowInstance : ''}`); | ||
const telemetryHintsFolder = tsRuntimeTypecheck.asOptString((_a = tsRuntimeTypecheck.asOptDictionary(telemetry === null || telemetry === void 0 ? void 0 : telemetry.hints)) === null || _a === void 0 ? void 0 : _a.folder); | ||
@@ -710,3 +713,3 @@ /* MC-940: use folder hinting if present */ | ||
.map((o) => o.toUpperCase()); // MC-5612 cross-platform uppercase "pass" folder | ||
folder = path__default["default"].join.apply(null, [folder, ...codes]); | ||
folder = path__default["default"].join(...[folder, ...codes]); | ||
} | ||
@@ -713,0 +716,0 @@ try { |
@@ -25,2 +25,5 @@ /// <reference types="node" /> | ||
get graphQL(): GraphQLFS; | ||
/** | ||
* @deprecated use `getExperiments` instead | ||
*/ | ||
get sampleReader(): SampleReader; | ||
@@ -27,0 +30,0 @@ get proxyAgent(): Agent | undefined; |
@@ -51,2 +51,5 @@ /** | ||
} | ||
/** | ||
* @deprecated use `getExperiments` instead | ||
*/ | ||
get sampleReader() { | ||
@@ -53,0 +56,0 @@ return this.primary.SampleReader; |
@@ -1,4 +0,2 @@ | ||
export declare function genericFileStatistics(filePath: string): Promise<{ | ||
type: string; | ||
bytes: number; | ||
}>; | ||
import type { DefaultStats } from './filestats.type'; | ||
export declare function genericFileStatistics(filePath: string): Promise<DefaultStats>; |
@@ -16,5 +16,4 @@ /** | ||
async function genericFileStatistics(filePath) { | ||
return fs__default["default"].promises.stat(filePath).then((d) => { | ||
return { type: 'bytes', bytes: d.size }; | ||
}); | ||
const { size: bytes } = await fs__default["default"].promises.stat(filePath); | ||
return { type: 'bytes', bytes }; | ||
} | ||
@@ -21,0 +20,0 @@ |
@@ -1,5 +0,2 @@ | ||
export declare function fastaFileStatistics(filePath: string): Promise<{ | ||
type: string; | ||
bytes: number; | ||
sequences: number; | ||
}>; | ||
import type { FastaStats } from './filestats.type'; | ||
export declare function fastaFileStatistics(filePath: string): Promise<FastaStats>; |
@@ -19,3 +19,2 @@ /** | ||
let lineCount = 1; | ||
let idx = -1; | ||
if (stat.size === 0) { | ||
@@ -29,3 +28,3 @@ return { | ||
const readStream = fs__default["default"].createReadStream(filePath).on('data', (buffer) => { | ||
idx = -1; | ||
let idx = -1; | ||
lineCount -= 1; | ||
@@ -32,0 +31,0 @@ do { |
@@ -1,5 +0,2 @@ | ||
export declare function fastqFileStatistics(filePath: string): Promise<{ | ||
type: string; | ||
bytes: number; | ||
reads: number; | ||
}>; | ||
import type { FastqStats } from './filestats.type'; | ||
export declare function fastqFileStatistics(filePath: string): Promise<FastqStats>; |
@@ -15,31 +15,27 @@ /** | ||
function fastqFileStatistics(filePath) { | ||
const LINES_PER_READ = 4; | ||
async function fastqFileStatistics(filePath) { | ||
let lineCount = 1; | ||
const stat = await fs__default["default"].promises.stat(filePath); | ||
if (stat.size === 0) { | ||
return { | ||
type: 'fastq', | ||
bytes: 0, | ||
reads: 0, | ||
}; | ||
} | ||
const readStream = fs__default["default"].createReadStream(filePath).on('data', (buffer) => { | ||
let idx = -1; | ||
lineCount -= 1; | ||
do { | ||
idx = buffer.indexOf(10, idx + 1); | ||
lineCount += 1; | ||
} while (idx !== -1); | ||
}); | ||
return new Promise((resolve, reject) => { | ||
const linesPerRead = 4; | ||
let lineCount = 1; | ||
let idx = -1; | ||
let stat = { | ||
size: 0, | ||
}; | ||
try { | ||
// TODO make this async | ||
stat = fs__default["default"].statSync(filePath); | ||
} | ||
catch (e) { | ||
reject(e); | ||
return; | ||
} | ||
fs__default["default"].createReadStream(filePath) | ||
.on('data', (buffer) => { | ||
idx = -1; | ||
lineCount -= 1; | ||
do { | ||
idx = buffer.indexOf(10, idx + 1); | ||
lineCount += 1; | ||
} while (idx !== -1); | ||
}) | ||
readStream | ||
.on('end', () => resolve({ | ||
type: 'fastq', | ||
bytes: stat.size, | ||
reads: Math.floor(lineCount / linesPerRead), | ||
reads: Math.floor(lineCount / LINES_PER_READ), | ||
})) | ||
@@ -46,0 +42,0 @@ .on('error', reject); |
@@ -1,5 +0,2 @@ | ||
export declare function fastqgzFileStatistics(filePath: string): Promise<{ | ||
type: string; | ||
bytes: number; | ||
reads: number; | ||
}>; | ||
import type { FastqGZStats } from './filestats.type'; | ||
export declare function fastqgzFileStatistics(filePath: string): Promise<FastqGZStats>; |
@@ -27,3 +27,2 @@ /** | ||
let lineCount = 1; | ||
let idx = -1; | ||
const gunzipStream = fs__default["default"] | ||
@@ -33,3 +32,3 @@ .createReadStream(filePath) | ||
.on('data', (buffer) => { | ||
idx = -1; | ||
let idx = -1; | ||
lineCount -= 1; | ||
@@ -36,0 +35,0 @@ do { |
@@ -0,1 +1,20 @@ | ||
export interface FastqStats { | ||
type: 'fastq'; | ||
bytes: number; | ||
reads: number; | ||
} | ||
export interface FastaStats { | ||
type: 'fasta'; | ||
bytes: number; | ||
sequences: number; | ||
} | ||
export interface FastqGZStats { | ||
type: 'gz'; | ||
bytes: number; | ||
reads: number; | ||
} | ||
export interface DefaultStats { | ||
type: 'bytes'; | ||
bytes: number; | ||
} | ||
export interface MappedFileStats { | ||
@@ -2,0 +21,0 @@ type: string; |
@@ -23,2 +23,5 @@ /// <reference types="node" /> | ||
static GraphQL: typeof GraphQLFS; | ||
/** | ||
* @deprecated use `getExperiments` instead | ||
*/ | ||
SampleReader: SampleReader; | ||
@@ -25,0 +28,0 @@ telemetryLogStream?: fs.WriteStream; |
@@ -25,2 +25,5 @@ /// <reference types="node" /> | ||
get graphQL(): GraphQLFS; | ||
/** | ||
* @deprecated use `getExperiments` instead | ||
*/ | ||
get sampleReader(): SampleReader; | ||
@@ -27,0 +30,0 @@ get proxyAgent(): Agent | undefined; |
@@ -1,4 +0,2 @@ | ||
export declare function genericFileStatistics(filePath: string): Promise<{ | ||
type: string; | ||
bytes: number; | ||
}>; | ||
import type { DefaultStats } from './filestats.type'; | ||
export declare function genericFileStatistics(filePath: string): Promise<DefaultStats>; |
@@ -1,5 +0,2 @@ | ||
export declare function fastaFileStatistics(filePath: string): Promise<{ | ||
type: string; | ||
bytes: number; | ||
sequences: number; | ||
}>; | ||
import type { FastaStats } from './filestats.type'; | ||
export declare function fastaFileStatistics(filePath: string): Promise<FastaStats>; |
@@ -1,5 +0,2 @@ | ||
export declare function fastqFileStatistics(filePath: string): Promise<{ | ||
type: string; | ||
bytes: number; | ||
reads: number; | ||
}>; | ||
import type { FastqStats } from './filestats.type'; | ||
export declare function fastqFileStatistics(filePath: string): Promise<FastqStats>; |
@@ -1,5 +0,2 @@ | ||
export declare function fastqgzFileStatistics(filePath: string): Promise<{ | ||
type: string; | ||
bytes: number; | ||
reads: number; | ||
}>; | ||
import type { FastqGZStats } from './filestats.type'; | ||
export declare function fastqgzFileStatistics(filePath: string): Promise<FastqGZStats>; |
@@ -0,1 +1,20 @@ | ||
export interface FastqStats { | ||
type: 'fastq'; | ||
bytes: number; | ||
reads: number; | ||
} | ||
export interface FastaStats { | ||
type: 'fasta'; | ||
bytes: number; | ||
sequences: number; | ||
} | ||
export interface FastqGZStats { | ||
type: 'gz'; | ||
bytes: number; | ||
reads: number; | ||
} | ||
export interface DefaultStats { | ||
type: 'bytes'; | ||
bytes: number; | ||
} | ||
export interface MappedFileStats { | ||
@@ -2,0 +21,0 @@ type: string; |
{ | ||
"name": "@metrichor/epi2me-api", | ||
"version": "6.0.7479716", | ||
"version": "6.0.7581324", | ||
"license": "MPL-2.0", | ||
@@ -17,5 +17,2 @@ "repository": "git@github.com:nanoporetech/epi2me-api.git", | ||
"@apollo/client": "^3.4.16", | ||
"@grpc/grpc-js": "^1.3.7", | ||
"@improbable-eng/grpc-web": "^0.14.1", | ||
"@improbable-eng/grpc-web-node-http-transport": "^0.14.1", | ||
"@types/socket.io-client": "^3.0.0", | ||
@@ -27,3 +24,2 @@ "aws-sdk": "^2.1002.0", | ||
"fs-inspect": "^1.0.3", | ||
"google-protobuf": "^3.18.1", | ||
"graphql": "^15.6.1", | ||
@@ -30,0 +26,0 @@ "graphql-tag": "^2.12.5", |
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
582218
14
12155
- Removed@grpc/grpc-js@^1.3.7
- Removed@improbable-eng/grpc-web@^0.14.1
- Removed@improbable-eng/grpc-web-node-http-transport@^0.14.1
- Removedgoogle-protobuf@^3.18.1
- Removed@grpc/grpc-js@1.12.5(transitive)
- Removed@grpc/proto-loader@0.7.13(transitive)
- Removed@improbable-eng/grpc-web@0.14.1(transitive)
- Removed@improbable-eng/grpc-web-node-http-transport@0.14.1(transitive)
- Removed@js-sdsl/ordered-map@4.4.2(transitive)
- Removed@protobufjs/aspromise@1.1.2(transitive)
- Removed@protobufjs/base64@1.1.2(transitive)
- Removed@protobufjs/codegen@2.0.4(transitive)
- Removed@protobufjs/eventemitter@1.1.0(transitive)
- Removed@protobufjs/fetch@1.1.0(transitive)
- Removed@protobufjs/float@1.0.2(transitive)
- Removed@protobufjs/inquire@1.1.0(transitive)
- Removed@protobufjs/path@1.1.2(transitive)
- Removed@protobufjs/pool@1.1.0(transitive)
- Removed@protobufjs/utf8@1.1.0(transitive)
- Removed@types/node@22.10.2(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedbrowser-headers@0.4.1(transitive)
- Removedcliui@8.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedescalade@3.2.0(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedgoogle-protobuf@3.21.4(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedlodash.camelcase@4.3.0(transitive)
- Removedlong@5.2.3(transitive)
- Removedprotobufjs@7.4.0(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedundici-types@6.20.0(transitive)
- Removedwrap-ansi@7.0.0(transitive)
- Removedy18n@5.0.8(transitive)
- Removedyargs@17.7.2(transitive)
- Removedyargs-parser@21.1.1(transitive)