@midwayjs/code-dye 3.10.8 → 3.10.10

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/README.md CHANGED
@@ -1,45 +1,9 @@
1
- ## Code-Dye 代码染色组件
1
+ # midway-codedye
2
2
 
3
- 适用于 `@midwayjs/faas` 、`@midwayjs/web` 、`@midwayjs/koa` `@midwayjs/express` 多种框架的代码染色组件,清晰的展示调用链路耗时与各个方法的出入参,帮你更快地定位代码问题。
4
- ![](https://gw.alicdn.com/imgextra/i1/O1CN017Zd6y628M2PvqJO7I_!!6000000007917-2-tps-2392-844.png)
5
- ### Usage
3
+ this is a sub package for midway.
6
4
 
7
- 1. 安装依赖
8
- ```shell
9
- tnpm i @midwayjs/code-dye --save
10
- ```
11
- 2. 在 configuration 中引入组件,
12
- ```ts
13
- import * as codeDye from '@midwayjs/code-dye';
14
- @Configuration({
15
- imports: [
16
- // ...other components
17
- codeDye
18
- ],
19
- })
20
- export class AutoConfiguration {}
21
- ```
5
+ Document: [https://midwayjs.org](https://midwayjs.org)
22
6
 
23
- 3. 请求你的接口,添加配置的 header 或 query 进入染色链路
7
+ ## License
24
8
 
25
- 例如,配置为:
26
- ```ts
27
- // src/config/config.default.ts
28
- export const codeDye = {
29
- matchQueryKey: 'codeDyeABC',
30
- }
31
- ```
32
- 然后请求你的接口,例如:http://127.0.0.1:7001/test?codeDyeABC=html
33
-
34
- ### 配置
35
- ```ts
36
- export const codeDye = {
37
- // 是否启用
38
- enable: boolean;
39
- // 匹配到对应的 header key时,进行代码染色,值可以为 html、json、log
40
- matchHeaderKey: string;
41
- // 匹配到对应的 query key时,进行代码染色
42
- // 例如 http://127.0.0.1:7001/test?codeDye=html
43
- matchQueryKey: string;
44
- }
45
- ```
9
+ [MIT]((http://github.com/midwayjs/midway/blob/master/LICENSE))
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.codeDye = void 0;
4
4
  exports.codeDye = {
5
- enable: true,
6
5
  matchHeaderKey: 'codeDye',
7
6
  matchQueryKey: 'codeDye',
8
7
  };
@@ -16,9 +16,6 @@ const middleware_1 = require("./middleware");
16
16
  const codeDye_1 = require("./codeDye");
17
17
  let CodeDyeConfiguration = class CodeDyeConfiguration {
18
18
  async onReady(container) {
19
- if (!this.codeDye.enable) {
20
- return;
21
- }
22
19
  this.applicationManager
23
20
  .getApplications(['koa', 'faas', 'express', 'egg'])
24
21
  .forEach(app => {
@@ -1,5 +1,4 @@
1
1
  export interface CodeDyeOptions {
2
- enable: boolean;
3
2
  matchHeaderKey: string;
4
3
  matchQueryKey: string;
5
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/code-dye",
3
- "version": "3.10.8",
3
+ "version": "3.10.10",
4
4
  "description": "Midway Code Dye Component",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -22,13 +22,13 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "devDependencies": {
25
- "@midwayjs/core": "^3.10.7",
26
- "@midwayjs/express": "^3.10.7",
27
- "@midwayjs/faas": "^3.10.8",
28
- "@midwayjs/koa": "^3.10.7",
29
- "@midwayjs/mock": "^3.10.7",
30
- "@midwayjs/serverless-app": "^3.10.8",
31
- "@midwayjs/web": "^3.10.7"
25
+ "@midwayjs/core": "^3.10.10",
26
+ "@midwayjs/express": "^3.10.10",
27
+ "@midwayjs/faas": "^3.10.10",
28
+ "@midwayjs/koa": "^3.10.10",
29
+ "@midwayjs/mock": "^3.10.10",
30
+ "@midwayjs/serverless-app": "^3.10.10",
31
+ "@midwayjs/web": "^3.10.10"
32
32
  },
33
- "gitHead": "5e124cd154a919951c7cf97d2e19dd120fa68b48"
33
+ "gitHead": "93d333e82e75b6eb44ab83f74a378172508730d6"
34
34
  }