koa-files 2.1.2 → 2.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/cjs/Send.js +9 -0
- package/cjs/index.js +9 -0
- package/cjs/utils.js +9 -0
- package/esm/Send.js +9 -0
- package/esm/index.js +9 -0
- package/esm/utils.js +9 -0
- package/package.json +8 -8
- /package/{typings → types}/Send.d.ts +0 -0
- /package/{typings → types}/index.d.ts +0 -0
- /package/{typings → types}/utils.d.ts +0 -0
package/cjs/Send.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @package koa-files
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @version 2.2.0
|
|
5
|
+
* @author nuintun <nuintun@qq.com>
|
|
6
|
+
* @description A static files serving middleware for koa.
|
|
7
|
+
* @see https://github.com/nuintun/koa-files#readme
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
'use strict';
|
|
2
11
|
|
|
3
12
|
var etag = require('etag');
|
package/cjs/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @package koa-files
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @version 2.2.0
|
|
5
|
+
* @author nuintun <nuintun@qq.com>
|
|
6
|
+
* @description A static files serving middleware for koa.
|
|
7
|
+
* @see https://github.com/nuintun/koa-files#readme
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
'use strict';
|
|
2
11
|
|
|
3
12
|
var Send = require('./Send.js');
|
package/cjs/utils.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @package koa-files
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @version 2.2.0
|
|
5
|
+
* @author nuintun <nuintun@qq.com>
|
|
6
|
+
* @description A static files serving middleware for koa.
|
|
7
|
+
* @see https://github.com/nuintun/koa-files#readme
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
'use strict';
|
|
2
11
|
|
|
3
12
|
var fs = require('fs');
|
package/esm/Send.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @package koa-files
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @version 2.2.0
|
|
5
|
+
* @author nuintun <nuintun@qq.com>
|
|
6
|
+
* @description A static files serving middleware for koa.
|
|
7
|
+
* @see https://github.com/nuintun/koa-files#readme
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
import etag from 'etag';
|
|
2
11
|
import destroy from 'destroy';
|
|
3
12
|
import { PassThrough } from 'stream';
|
package/esm/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @package koa-files
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @version 2.2.0
|
|
5
|
+
* @author nuintun <nuintun@qq.com>
|
|
6
|
+
* @description A static files serving middleware for koa.
|
|
7
|
+
* @see https://github.com/nuintun/koa-files#readme
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
import Send from './Send.js';
|
|
2
11
|
|
|
3
12
|
/**
|
package/esm/utils.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @package koa-files
|
|
3
|
+
* @license MIT
|
|
4
|
+
* @version 2.2.0
|
|
5
|
+
* @author nuintun <nuintun@qq.com>
|
|
6
|
+
* @description A static files serving middleware for koa.
|
|
7
|
+
* @see https://github.com/nuintun/koa-files#readme
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
import fs from 'fs';
|
|
2
11
|
import { isAbsolute, relative } from 'path';
|
|
3
12
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koa-files",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A static files serving middleware for koa.",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
7
|
-
"
|
|
7
|
+
"types": "types/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"cjs",
|
|
10
10
|
"esm",
|
|
11
|
-
"
|
|
11
|
+
"types"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
14
|
"tests": "node tests",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"prepublishOnly": "npm run build",
|
|
18
18
|
"build:cjs": "rollup -c tools/rollup.cjs.js",
|
|
19
19
|
"build:esm": "rollup -c tools/rollup.esm.js",
|
|
20
|
-
"format": "prettier --write tools src cjs esm tests
|
|
20
|
+
"format": "prettier --write tools src cjs esm tests types",
|
|
21
21
|
"build": "npm run clean && npm run build:main && npm run format",
|
|
22
|
-
"build:main": "npm run build:cjs && npm run build:esm && npm run build:
|
|
23
|
-
"build:
|
|
22
|
+
"build:main": "npm run build:cjs && npm run build:esm && npm run build:types",
|
|
23
|
+
"build:types": "tsc --declaration --emitDeclarationOnly --declarationDir types"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"magic-string": "^0.26.1",
|
|
67
67
|
"prettier": "^2.6.2",
|
|
68
68
|
"rimraf": "^3.0.2",
|
|
69
|
-
"rollup": "^2.
|
|
70
|
-
"typescript": "^4.6.
|
|
69
|
+
"rollup": "^2.72.0",
|
|
70
|
+
"typescript": "^4.6.4"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|