koatty 3.5.12-0 → 3.5.12
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/CHANGELOG.md +8 -0
- package/dist/index.d.ts +8 -3
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/package.json +8 -9
- package/package.json +8 -9
- package/.commitlintrc.js +0 -3
- package/.eslintignore +0 -11
- package/.eslintrc.js +0 -43
- package/.huskyrc +0 -5
- package/.versionrc.js +0 -16
- package/api-extractor.json +0 -345
- package/docs/api/index.md +0 -12
- package/docs/api/koatty.apiinput.code.md +0 -11
- package/docs/api/koatty.apiinput.data.md +0 -11
- package/docs/api/koatty.apiinput.md +0 -22
- package/docs/api/koatty.apiinput.message.md +0 -11
- package/docs/api/koatty.apioutput.code.md +0 -11
- package/docs/api/koatty.apioutput.data.md +0 -11
- package/docs/api/koatty.apioutput.md +0 -22
- package/docs/api/koatty.apioutput.message.md +0 -11
- package/docs/api/koatty.appreadyhookfunc.md +0 -11
- package/docs/api/koatty.basecontroller._constructor_.md +0 -20
- package/docs/api/koatty.basecontroller._options.md +0 -11
- package/docs/api/koatty.basecontroller.app.md +0 -11
- package/docs/api/koatty.basecontroller.ctx.md +0 -11
- package/docs/api/koatty.basecontroller.fail.md +0 -28
- package/docs/api/koatty.basecontroller.init.md +0 -19
- package/docs/api/koatty.basecontroller.md +0 -39
- package/docs/api/koatty.basecontroller.ok.md +0 -28
- package/docs/api/koatty.baseservice._constructor_.md +0 -20
- package/docs/api/koatty.baseservice._options.md +0 -11
- package/docs/api/koatty.baseservice.app.md +0 -11
- package/docs/api/koatty.baseservice.init.md +0 -25
- package/docs/api/koatty.baseservice.md +0 -36
- package/docs/api/koatty.bindappreadyhook.md +0 -26
- package/docs/api/koatty.bootstrap.md +0 -27
- package/docs/api/koatty.component.md +0 -27
- package/docs/api/koatty.componentscan.md +0 -27
- package/docs/api/koatty.configurationscan.md +0 -27
- package/docs/api/koatty.controller.md +0 -27
- package/docs/api/koatty.httpcontroller.body.md +0 -28
- package/docs/api/koatty.httpcontroller.deny.md +0 -26
- package/docs/api/koatty.httpcontroller.expires.md +0 -26
- package/docs/api/koatty.httpcontroller.fail.md +0 -28
- package/docs/api/koatty.httpcontroller.header.md +0 -27
- package/docs/api/koatty.httpcontroller.isget.md +0 -19
- package/docs/api/koatty.httpcontroller.ismethod.md +0 -26
- package/docs/api/koatty.httpcontroller.ispost.md +0 -19
- package/docs/api/koatty.httpcontroller.json.md +0 -26
- package/docs/api/koatty.httpcontroller.md +0 -35
- package/docs/api/koatty.httpcontroller.ok.md +0 -28
- package/docs/api/koatty.httpcontroller.param.md +0 -26
- package/docs/api/koatty.httpcontroller.redirect.md +0 -27
- package/docs/api/koatty.httpcontroller.type.md +0 -27
- package/docs/api/koatty.icontroller.__after.md +0 -11
- package/docs/api/koatty.icontroller.__befor.md +0 -11
- package/docs/api/koatty.icontroller.app.md +0 -11
- package/docs/api/koatty.icontroller.ctx.md +0 -11
- package/docs/api/koatty.icontroller.fail.md +0 -11
- package/docs/api/koatty.icontroller.md +0 -25
- package/docs/api/koatty.icontroller.ok.md +0 -11
- package/docs/api/koatty.imiddleware.md +0 -20
- package/docs/api/koatty.imiddleware.run.md +0 -11
- package/docs/api/koatty.iplugin.md +0 -20
- package/docs/api/koatty.iplugin.run.md +0 -11
- package/docs/api/koatty.iservice.app.md +0 -11
- package/docs/api/koatty.iservice.md +0 -20
- package/docs/api/koatty.logger.md +0 -11
- package/docs/api/koatty.md +0 -51
- package/docs/api/koatty.middleware.md +0 -27
- package/docs/api/koatty.plugin.md +0 -27
- package/docs/api/koatty.service.md +0 -27
- package/jest.config.js +0 -34
- package/jest_html_reporters.html +0 -60
- package/rollup.config.js +0 -63
- package/scripts/copyright.js +0 -28
- package/scripts/postBuild.js +0 -10
- package/tsconfig.json +0 -69
package/rollup.config.js
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* @Description:
|
3
|
-
* @Usage:
|
4
|
-
* @Author: richen
|
5
|
-
* @Date: 2021-12-17 10:20:44
|
6
|
-
* @LastEditTime: 2021-12-18 11:58:46
|
7
|
-
*/
|
8
|
-
import json from "@rollup/plugin-json";
|
9
|
-
import typescript from 'rollup-plugin-typescript2';
|
10
|
-
// import babel from '@rollup/plugin-babel';
|
11
|
-
|
12
|
-
export default [
|
13
|
-
{
|
14
|
-
input: './src/index.ts',
|
15
|
-
output: [{
|
16
|
-
format: 'cjs',
|
17
|
-
file: './dist/index.js',
|
18
|
-
banner: require('./scripts/copyright')
|
19
|
-
}],
|
20
|
-
plugins: [
|
21
|
-
// babel({
|
22
|
-
// babelHelpers: "runtime",
|
23
|
-
// configFile: './babel.config.js',
|
24
|
-
// exclude: 'node_modules/**',
|
25
|
-
// }),
|
26
|
-
json(),
|
27
|
-
typescript({
|
28
|
-
tsconfigOverride: {
|
29
|
-
compilerOptions: {
|
30
|
-
declaration: false,
|
31
|
-
declarationMap: false,
|
32
|
-
module: "ESNext"
|
33
|
-
}
|
34
|
-
}
|
35
|
-
})
|
36
|
-
]
|
37
|
-
},
|
38
|
-
{
|
39
|
-
input: './src/index.ts',
|
40
|
-
output: [{
|
41
|
-
format: 'es',
|
42
|
-
file: './dist/index.mjs',
|
43
|
-
banner: require('./scripts/copyright')
|
44
|
-
}],
|
45
|
-
plugins: [
|
46
|
-
// babel({
|
47
|
-
// babelHelpers: "runtime",
|
48
|
-
// configFile: './babel.config.js',
|
49
|
-
// exclude: 'node_modules/**',
|
50
|
-
// }),
|
51
|
-
json(),
|
52
|
-
typescript({
|
53
|
-
tsconfigOverride: {
|
54
|
-
compilerOptions: {
|
55
|
-
declaration: false,
|
56
|
-
declarationMap: false,
|
57
|
-
module: "ESNext"
|
58
|
-
}
|
59
|
-
}
|
60
|
-
})
|
61
|
-
]
|
62
|
-
}
|
63
|
-
]
|
package/scripts/copyright.js
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* 扩展Date的Format函数
|
3
|
-
* 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
|
4
|
-
* 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
|
5
|
-
* @param {[type]} fmt [description]
|
6
|
-
*/
|
7
|
-
Date.prototype.Format = function (fmt) { //author: meizz
|
8
|
-
var o = {
|
9
|
-
"M+": this.getMonth() + 1, //月份
|
10
|
-
"d+": this.getDate(), //日
|
11
|
-
"h+": this.getHours(), //小时
|
12
|
-
"m+": this.getMinutes(), //分
|
13
|
-
"s+": this.getSeconds(), //秒
|
14
|
-
"S": this.getMilliseconds() //毫秒
|
15
|
-
};
|
16
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
17
|
-
for (var k in o)
|
18
|
-
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
19
|
-
return fmt;
|
20
|
-
}
|
21
|
-
|
22
|
-
module.exports = `/*!
|
23
|
-
* @Author: richen
|
24
|
-
* @Date: ${(new Date()).Format("yyyy-MM-dd hh:mm:ss")}
|
25
|
-
* @License: BSD (3-Clause)
|
26
|
-
* @Copyright (c) - <richenlin(at)gmail.com>
|
27
|
-
* @HomePage: https://koatty.org/
|
28
|
-
*/`
|
package/scripts/postBuild.js
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
const fs = require('fs');
|
2
|
-
const path = require('path');
|
3
|
-
|
4
|
-
// remove private / protected index.d.ts
|
5
|
-
(() => {
|
6
|
-
let content = fs.readFileSync(path.resolve(__dirname, '../dist/index.d.ts'), 'utf-8');
|
7
|
-
content = content.replace(/\s+(private|protected).+;/g, '');
|
8
|
-
content = require('./copyright') + '\n' + content;
|
9
|
-
fs.writeFileSync(path.resolve(__dirname, '../dist/index.d.ts'), content, 'utf-8');
|
10
|
-
})();
|
package/tsconfig.json
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
/* Basic Options */
|
4
|
-
"target": "ES2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
|
5
|
-
"module": "commonjs" /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
6
|
-
"lib": [
|
7
|
-
"es2019"
|
8
|
-
]
|
9
|
-
/* Specify library files to be included in the compilation: */ ,
|
10
|
-
// "allowJs": true /* Allow javascript files to be compiled. */,
|
11
|
-
// "checkJs": true, /* Report errors in .js files. */
|
12
|
-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
13
|
-
"declaration": true /* Generates corresponding '.d.ts' file. */,
|
14
|
-
"declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
15
|
-
"sourceMap": true /* Generates corresponding '.map' file. */,
|
16
|
-
// "outFile": "./", /* Concatenate and emit output to single file. */
|
17
|
-
"outDir": "./temp" /* Redirect output structure to the directory. */,
|
18
|
-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
19
|
-
"removeComments": false /* Do not emit comments to output. */,
|
20
|
-
// "noEmit": true /* Do not emit outputs. */,
|
21
|
-
"importHelpers": true /* Import emit helpers from 'tslib'. */,
|
22
|
-
"downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */,
|
23
|
-
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
24
|
-
/* Strict Type-Checking Options */
|
25
|
-
"stripInternal": true, /* Enable all strict type-checking options. */
|
26
|
-
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
27
|
-
// "strictNullChecks": true, /* Enable strict null checks. */
|
28
|
-
"noImplicitThis": false /* Raise error on 'this' expressions with an implied 'any' type. */,
|
29
|
-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
30
|
-
"pretty": true, /* pretty source file. */
|
31
|
-
/* Additional Checks */
|
32
|
-
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
33
|
-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
34
|
-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
35
|
-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
36
|
-
/* Module Resolution Options */
|
37
|
-
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
38
|
-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
39
|
-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
40
|
-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
41
|
-
"typeRoots": [
|
42
|
-
"node_modules/@types"
|
43
|
-
// "./typings/*"
|
44
|
-
] /* List of folders to include type definitions from. */,
|
45
|
-
"types": [
|
46
|
-
"node",
|
47
|
-
"jest"
|
48
|
-
] /* Type declaration files to be included in compilation. */,
|
49
|
-
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
|
50
|
-
"resolveJsonModule": true,
|
51
|
-
"esModuleInterop": true,
|
52
|
-
"useUnknownInCatchVariables": false, /* Default catch clause variables as unknown instead of any. */
|
53
|
-
/* Source Map Options */
|
54
|
-
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
55
|
-
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
|
56
|
-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
57
|
-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
58
|
-
/* Experimental Options */
|
59
|
-
"experimentalDecorators": true /* Enables experimental support for ES7 decorators. */,
|
60
|
-
"emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */
|
61
|
-
},
|
62
|
-
"exclude": [
|
63
|
-
"node_modules",
|
64
|
-
"dist"
|
65
|
-
],
|
66
|
-
"include": [
|
67
|
-
"src/**/*"
|
68
|
-
]
|
69
|
-
}
|