@isrd-isi-edu/ermrestjs 2.4.0 → 2.4.1
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 +2 -4
- package/src/services/file-preview.ts +6 -0
- package/vite.config.mts +1 -14
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isrd-isi-edu/ermrestjs",
|
|
3
3
|
"description": "ERMrest client library in JavaScript",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">= 20.0.0",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"main": "dist/ermrest.js",
|
|
11
11
|
"module": "dist/ermrest.min.js",
|
|
12
|
-
"types": "dist/ermrest.d.ts",
|
|
13
12
|
"files": [
|
|
14
13
|
"dist",
|
|
15
14
|
"js",
|
|
@@ -64,8 +63,7 @@
|
|
|
64
63
|
"terser": "^5.44.1",
|
|
65
64
|
"typescript": "~5.9.3",
|
|
66
65
|
"vite": "^7.3.1",
|
|
67
|
-
"vite-plugin-compression2": "^2.2.1"
|
|
68
|
-
"vite-plugin-dts": "^4.5.4"
|
|
66
|
+
"vite-plugin-compression2": "^2.2.1"
|
|
69
67
|
},
|
|
70
68
|
"devDependencies": {
|
|
71
69
|
"@commitlint/cli": "^20.2.0",
|
|
@@ -49,6 +49,10 @@ const DEFAULT_CONTENT_TYPE_MAPPING: { [key: string]: FilePreviewTypes | typeof U
|
|
|
49
49
|
// text:
|
|
50
50
|
'chemical/x-mmcif': FilePreviewTypes.TEXT,
|
|
51
51
|
'chemical/x-cif': FilePreviewTypes.TEXT,
|
|
52
|
+
'text/yaml': FilePreviewTypes.TEXT,
|
|
53
|
+
'text/x-yaml': FilePreviewTypes.TEXT,
|
|
54
|
+
'application/yaml': FilePreviewTypes.TEXT,
|
|
55
|
+
'application/x-yaml': FilePreviewTypes.TEXT,
|
|
52
56
|
// generic:
|
|
53
57
|
'text/plain': USE_EXT_MAPPING,
|
|
54
58
|
'application/octet-stream': USE_EXT_MAPPING,
|
|
@@ -78,6 +82,8 @@ const DEFAULT_EXTENSION_MAPPING: { [key: string]: FilePreviewTypes | false } = {
|
|
|
78
82
|
'.mvsj': FilePreviewTypes.JSON, // MolViewSpec JSON (mol* viewer)
|
|
79
83
|
// text:
|
|
80
84
|
'.txt': FilePreviewTypes.TEXT,
|
|
85
|
+
'.yml': FilePreviewTypes.TEXT,
|
|
86
|
+
'.yaml': FilePreviewTypes.TEXT,
|
|
81
87
|
'.log': FilePreviewTypes.TEXT,
|
|
82
88
|
'.cif': FilePreviewTypes.TEXT,
|
|
83
89
|
'.pdb': FilePreviewTypes.TEXT,
|
package/vite.config.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolve } from 'path';
|
|
2
2
|
import { defineConfig, UserConfig } from 'vite';
|
|
3
3
|
import { compression } from 'vite-plugin-compression2';
|
|
4
|
-
import dts from 'vite-plugin-dts';
|
|
4
|
+
// import dts from 'vite-plugin-dts';
|
|
5
5
|
|
|
6
6
|
// if NODE_DEV defined properly, uset it. otherwise set it to production.
|
|
7
7
|
const nodeDevs = ['production', 'development'];
|
|
@@ -13,19 +13,6 @@ const isDev = mode === 'development';
|
|
|
13
13
|
|
|
14
14
|
export default defineConfig(async (): Promise<UserConfig> => {
|
|
15
15
|
const plugins = [
|
|
16
|
-
/**
|
|
17
|
-
* generate TypeScript declaration files
|
|
18
|
-
*/
|
|
19
|
-
dts({
|
|
20
|
-
include: ['src/**/*'],
|
|
21
|
-
exclude: ['js/**/*', 'test/**/*', 'vendor/**/*'],
|
|
22
|
-
outDir: 'dist',
|
|
23
|
-
rollupTypes: true, // bundle all .d.ts files into a single ermrest.d.ts
|
|
24
|
-
compilerOptions: {
|
|
25
|
-
skipLibCheck: true,
|
|
26
|
-
},
|
|
27
|
-
logLevel: 'silent', // suppress warnings about legacy JS files
|
|
28
|
-
}),
|
|
29
16
|
/**
|
|
30
17
|
* generate the *.js.gz files so server can directly serve them
|
|
31
18
|
*/
|