@contrast/common 1.32.0 → 1.34.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.
Files changed (2) hide show
  1. package/lib/types.d.ts +58 -34
  2. package/package.json +2 -2
package/lib/types.d.ts CHANGED
@@ -60,58 +60,82 @@ export interface AppInfo {
60
60
  buildId: string;
61
61
  }
62
62
  export interface SystemInfo {
63
- ReportDate: string;
64
- MachineName: string;
65
- Contrast: {
66
- Url: string | null;
67
- Proxy: {
63
+ reportDate: string;
64
+ hostname: string;
65
+ contrast: {
66
+ url: string | null;
67
+ proxy: {
68
68
  enable: boolean;
69
69
  url: string | null;
70
70
  };
71
- Server: {
72
- Name: string;
71
+ server: {
72
+ name: string;
73
73
  };
74
- Agent: {
75
- Name: string;
76
- Version: string;
74
+ agent: {
75
+ name: string;
76
+ version: string;
77
77
  };
78
78
  };
79
- Node: {
80
- Path: string;
81
- Version: string;
79
+ node: {
80
+ path: string;
81
+ version: string;
82
+ memory: {
83
+ total: string;
84
+ totalBytes: number;
85
+ free: string;
86
+ freeBytes: number;
87
+ used: string;
88
+ usedBytes: number;
89
+ };
82
90
  };
83
- OperatingSystem: {
84
- Architecture: string;
85
- Name: string;
86
- Version: string;
87
- KernelVersion: string;
88
- CPU: {
89
- Type: string;
90
- Count: number;
91
+ os: {
92
+ /** `os.arch()` */
93
+ architecture: string;
94
+ /** `os.type()` */
95
+ name: string;
96
+ /** `os.release()` */
97
+ version: string;
98
+ /** `os.version()` */
99
+ kernelVersion: string;
100
+ cpu: {
101
+ type: string;
102
+ count: number;
103
+ };
104
+ memory: {
105
+ total: string;
106
+ totalBytes: number;
91
107
  };
108
+ linuxInfo: {
109
+ file: string;
110
+ [key: string]: string;
111
+ } | null;
112
+ macOsInfo: {
113
+ productName: string;
114
+ productVersion: string;
115
+ buildVersion: string;
116
+ } | null;
92
117
  };
93
- Host: {
94
- Docker: {
118
+ host: {
119
+ docker: {
95
120
  isDocker: boolean;
96
- containerID: string | null;
121
+ containerId: string | null;
97
122
  };
98
- Kubernetes: {
123
+ kubernetes: {
99
124
  isKubernetes: boolean;
100
125
  };
101
- PM2: {
126
+ pm2: {
102
127
  used: boolean;
103
128
  version: string | null;
104
129
  };
105
- Memory: {
106
- Total: string;
107
- Free: string;
108
- Used: string;
130
+ memory: {
131
+ total: string;
132
+ totalBytes: number;
109
133
  };
110
134
  };
111
- Application: object;
112
- Cloud: {
113
- Provider: string | null;
114
- ResourceID: string | null;
135
+ application: object;
136
+ cloud: {
137
+ provider: string | null;
138
+ resourceId: string | null;
115
139
  };
116
140
  }
117
141
  export type CommonRules = Rule.SQL_INJECTION | Rule.CMD_INJECTION | Rule.PATH_TRAVERSAL | Rule.REFLECTED_XSS | Rule.SSJS_INJECTION | Rule.NOSQL_INJECTION_MONGO | Rule.UNSAFE_FILE_UPLOAD | Rule.NOSQL_INJECTION | Rule.METHOD_TAMPERING | Rule.BOT_BLOCKER;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/common",
3
- "version": "1.32.0",
3
+ "version": "1.34.0",
4
4
  "description": "Shared constants and utilities for all Contrast Agent modules",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -18,6 +18,6 @@
18
18
  },
19
19
  "scripts": {
20
20
  "build": "tsc --build src/",
21
- "test": "../scripts/test.sh"
21
+ "test": "bash ../scripts/test.sh"
22
22
  }
23
23
  }