@apollo-annotation/shared 0.1.21 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollo-annotation/shared",
3
- "version": "0.1.21",
3
+ "version": "0.2.0",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "yarn clean && tsc --build",
@@ -10,17 +10,15 @@
10
10
  "test:ci": "NODE_V8_COVERAGE=./coverage glob -c \"tsx --test --test-reporter spec --experimental-test-coverage \" \"**/*.test.ts\""
11
11
  },
12
12
  "dependencies": {
13
- "@apollo-annotation/common": "^0.1.21",
14
- "@apollo-annotation/mst": "^0.1.21",
15
- "@apollo-annotation/schemas": "^0.1.21",
13
+ "@apollo-annotation/common": "^0.2.0",
14
+ "@apollo-annotation/mst": "^0.2.0",
15
+ "@apollo-annotation/schemas": "^0.2.0",
16
16
  "@gmod/gff": "1.2.0",
17
17
  "@gmod/indexedfasta": "^2.0.4",
18
18
  "@jbrowse/core": "^2.13.1",
19
19
  "bson-objectid": "^2.0.4",
20
20
  "generic-filehandle": "^3.0.0",
21
21
  "jwt-decode": "^3.1.2",
22
- "regenerator-runtime": "^0.13.9",
23
- "socket.io-client": "^4.5.4",
24
22
  "tslib": "^2.3.1"
25
23
  },
26
24
  "devDependencies": {
@@ -28,7 +26,6 @@
28
26
  "@nestjs/core": "^10.1.0",
29
27
  "@types/chai": "^4.3.19",
30
28
  "@types/node": "^18.14.2",
31
- "@types/rimraf": "^3",
32
29
  "chai": "^5.1.1",
33
30
  "chai-exclude": "^3.0.0",
34
31
  "glob": "^11.0.0",
@@ -87,7 +87,7 @@ export class AddAssemblyFromFileChange extends FromFileBaseChange {
87
87
  throw new Error('No FILE_UPLOAD_FOLDER found in .env file')
88
88
  }
89
89
 
90
- const { fa, fai, gzi } = fileIds
90
+ const { fa: faId, fai: faiId, gzi: gziId } = fileIds
91
91
  const {
92
92
  assemblyModel,
93
93
  checkModel,
@@ -97,30 +97,30 @@ export class AddAssemblyFromFileChange extends FromFileBaseChange {
97
97
  user,
98
98
  } = backend
99
99
 
100
- const faDoc = await fileModel.findById(fa)
100
+ const faDoc = await fileModel.findById(faId)
101
101
  const faChecksum = faDoc?.checksum
102
102
  if (!faChecksum) {
103
103
  throw new Error(`No checksum for file document ${faDoc}`)
104
104
  }
105
105
 
106
- const faiDoc = await fileModel.findById(fai)
106
+ const faiDoc = await fileModel.findById(faiId)
107
107
  const faiChecksum = faiDoc?.checksum
108
108
  if (!faiChecksum) {
109
109
  throw new Error(`No checksum for file document ${faiDoc}`)
110
110
  }
111
111
 
112
- const gziDoc = await fileModel.findById(gzi)
112
+ const gziDoc = await fileModel.findById(gziId)
113
113
  const gziChecksum = gziDoc?.checksum
114
114
  if (!gziChecksum) {
115
115
  throw new Error(`No checksum for file document ${gziDoc}`)
116
116
  }
117
117
 
118
- const sequenceAdapter = new BgzipIndexedFasta({
119
- fasta: filesService.getFileHandle(faDoc),
120
- fai: filesService.getFileHandle(faiDoc),
121
- gzi: filesService.getFileHandle(gziDoc),
122
- })
118
+ const fasta = filesService.getFileHandle(faDoc)
119
+ const fai = filesService.getFileHandle(faiDoc)
120
+ const gzi = filesService.getFileHandle(gziDoc)
121
+ const sequenceAdapter = new BgzipIndexedFasta({ fasta, fai, gzi })
123
122
  const allSequenceSizes = await sequenceAdapter.getSequenceSizes()
123
+ await Promise.all([fasta.close(), fai.close(), gzi.close()])
124
124
 
125
125
  const assemblyDoc = await assemblyModel
126
126
  .findOne({ name: assemblyName })
@@ -13,7 +13,7 @@ export interface SerializedDeleteUserChangeBase extends SerializedChange {
13
13
  userId: string
14
14
  }
15
15
 
16
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
16
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
17
17
  export interface DeleteUserChangeDetails {}
18
18
 
19
19
  interface SerializedDeleteUserChangeSingle
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
2
+ "extends": "../../tsconfig-base.json",
3
3
  "compilerOptions": {
4
4
  "composite": true,
5
5
  "incremental": true,