@itentialopensource/adapter-winston_syslog 1.0.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/.eslintignore +5 -0
- package/.eslintrc.js +18 -0
- package/.jshintrc +3 -0
- package/CHANGELOG.md +9 -0
- package/LICENSE +201 -0
- package/README.md +285 -0
- package/adapter.js +250 -0
- package/adapterBase.js +1782 -0
- package/entities/.generic/action.json +214 -0
- package/entities/.generic/schema.json +28 -0
- package/entities/.system/action.json +50 -0
- package/entities/.system/mockdatafiles/getToken-default.json +3 -0
- package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
- package/entities/.system/schema.json +19 -0
- package/entities/.system/schemaTokenReq.json +53 -0
- package/entities/.system/schemaTokenResp.json +53 -0
- package/error.json +190 -0
- package/package.json +87 -0
- package/pronghorn.json +93 -0
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +1243 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +10 -0
- package/sampleProperties.json +60 -0
- package/test/integration/adapterTestIntegration.js +329 -0
- package/test/unit/adapterBaseTestUnit.js +949 -0
- package/test/unit/adapterTestUnit.js +1207 -0
- package/utils/adapterInfo.js +206 -0
- package/utils/addAuth.js +94 -0
- package/utils/artifactize.js +146 -0
- package/utils/basicGet.js +50 -0
- package/utils/checkMigrate.js +63 -0
- package/utils/entitiesToDB.js +179 -0
- package/utils/findPath.js +74 -0
- package/utils/modify.js +154 -0
- package/utils/packModificationScript.js +35 -0
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +30 -0
- package/utils/removeHooks.js +20 -0
- package/utils/setup.js +33 -0
- package/utils/tbScript.js +184 -0
- package/utils/tbUtils.js +469 -0
- package/utils/testRunner.js +298 -0
- package/utils/troubleshootingAdapter.js +190 -0
- package/workflows/README.md +3 -0
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@itentialopensource/adapter-winston_syslog",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "This adapter integrates with winston_syslog and sends logs to any syslog server.",
|
|
5
|
+
"main": "adapter.js",
|
|
6
|
+
"wizardVersion": "2.44.13",
|
|
7
|
+
"engineVersion": "1.61.6",
|
|
8
|
+
"adapterType": "udp",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
11
|
+
"preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
|
|
12
|
+
"deinstall": "node utils/removeHooks.js",
|
|
13
|
+
"lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
|
|
14
|
+
"lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
|
|
15
|
+
"test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
|
|
16
|
+
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
17
|
+
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
18
|
+
"test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
|
|
19
|
+
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
20
|
+
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
21
|
+
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
22
|
+
"adapter:findPath": "node utils/findPath.js",
|
|
23
|
+
"adapter:migrate": "node utils/modify.js -m",
|
|
24
|
+
"adapter:update": "node utils/modify.js -u",
|
|
25
|
+
"adapter:revert": "node utils/modify.js -r",
|
|
26
|
+
"troubleshoot": "node utils/tbScript.js",
|
|
27
|
+
"healthcheck": "node utils/tbScript.js healthcheck",
|
|
28
|
+
"basicget": "node utils/tbScript.js basicget",
|
|
29
|
+
"connectivity": "node utils/tbScript.js connectivity",
|
|
30
|
+
"deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
|
|
31
|
+
"build": "npm run deploy"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"Itential",
|
|
35
|
+
"IAP",
|
|
36
|
+
"Automation",
|
|
37
|
+
"Integration",
|
|
38
|
+
"App-Artifacts",
|
|
39
|
+
"Telemetry",
|
|
40
|
+
"Analytics",
|
|
41
|
+
"Adapter",
|
|
42
|
+
"Winston",
|
|
43
|
+
"Syslog",
|
|
44
|
+
"Pre-Release"
|
|
45
|
+
],
|
|
46
|
+
"license": "Apache-2.0",
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">= 8.0.0",
|
|
49
|
+
"npm": ">= 6.0.0"
|
|
50
|
+
},
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git@gitlab.com:itentialopensource/adapters/telemetry-analytics/adapter-winston_syslog.git"
|
|
54
|
+
},
|
|
55
|
+
"author": "Itential",
|
|
56
|
+
"homepage": "https://gitlab.com/itentialopensource/adapters/telemetry-analytics/adapter-winston_syslog#readme",
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@itentialopensource/adapter-utils": "^4.49.0",
|
|
59
|
+
"ajv": "^6.12.0",
|
|
60
|
+
"axios": "^0.21.0",
|
|
61
|
+
"commander": "^2.20.0",
|
|
62
|
+
"fs-extra": "^8.1.0",
|
|
63
|
+
"json-query": "^2.2.2",
|
|
64
|
+
"json5": "^2.2.2",
|
|
65
|
+
"mocha": "^9.0.1",
|
|
66
|
+
"mocha-param": "^2.0.1",
|
|
67
|
+
"mongodb": "^4.1.0",
|
|
68
|
+
"network-diagnostics": "^0.5.3",
|
|
69
|
+
"nyc": "^15.1.0",
|
|
70
|
+
"readline-sync": "^1.4.10",
|
|
71
|
+
"semver": "^7.3.2",
|
|
72
|
+
"winston": "^3.8.2",
|
|
73
|
+
"winston-syslog": "^2.7.0"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"chai": "^4.3.4",
|
|
77
|
+
"eslint": "^7.29.0",
|
|
78
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
|
79
|
+
"eslint-plugin-import": "^2.23.4",
|
|
80
|
+
"eslint-plugin-json": "^3.0.0",
|
|
81
|
+
"testdouble": "^3.16.1"
|
|
82
|
+
},
|
|
83
|
+
"resolutions": {
|
|
84
|
+
"minimist": "^1.2.8"
|
|
85
|
+
},
|
|
86
|
+
"private": false
|
|
87
|
+
}
|
package/pronghorn.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "@itentialopensource/adapter-winston_syslog",
|
|
3
|
+
"type": "Adapter",
|
|
4
|
+
"export": "WinstonSyslog",
|
|
5
|
+
"title": "WinstonSyslog",
|
|
6
|
+
"src": "adapter.js",
|
|
7
|
+
"roles": [
|
|
8
|
+
"admin"
|
|
9
|
+
],
|
|
10
|
+
"methods": [
|
|
11
|
+
{
|
|
12
|
+
"name": "postLog",
|
|
13
|
+
"summary": "Post a log message",
|
|
14
|
+
"description": "Post a custom log message to a syslog server",
|
|
15
|
+
"input": [
|
|
16
|
+
{
|
|
17
|
+
"name": "severity",
|
|
18
|
+
"type": "enum",
|
|
19
|
+
"info": "The log level of the message",
|
|
20
|
+
"enumerals" : [
|
|
21
|
+
"debug",
|
|
22
|
+
"info",
|
|
23
|
+
"notice",
|
|
24
|
+
"warning",
|
|
25
|
+
"error",
|
|
26
|
+
"crit",
|
|
27
|
+
"alert",
|
|
28
|
+
"emerg"
|
|
29
|
+
],
|
|
30
|
+
"required": true,
|
|
31
|
+
"schema": {
|
|
32
|
+
"title": "severity",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"debug",
|
|
36
|
+
"info",
|
|
37
|
+
"notice",
|
|
38
|
+
"warning",
|
|
39
|
+
"error",
|
|
40
|
+
"crit",
|
|
41
|
+
"alert",
|
|
42
|
+
"emerg"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "facility",
|
|
48
|
+
"type": "enum",
|
|
49
|
+
"info": "Where to send the log message",
|
|
50
|
+
"enumerals" : [
|
|
51
|
+
"local0",
|
|
52
|
+
"local1",
|
|
53
|
+
"local2",
|
|
54
|
+
"local3",
|
|
55
|
+
"local4",
|
|
56
|
+
"local5",
|
|
57
|
+
"local6",
|
|
58
|
+
"local7"
|
|
59
|
+
],
|
|
60
|
+
"required": true,
|
|
61
|
+
"schema": {
|
|
62
|
+
"title": "facility",
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "message",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"info": "The text body of the log message",
|
|
70
|
+
"required": true,
|
|
71
|
+
"schema": {
|
|
72
|
+
"title": "message",
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"output": {
|
|
78
|
+
"name": "result",
|
|
79
|
+
"type": "object",
|
|
80
|
+
"description": "A JSON Object containing status, code, and the result",
|
|
81
|
+
"schema": {
|
|
82
|
+
"title": "result",
|
|
83
|
+
"type": "object"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"roles": [
|
|
87
|
+
"admin"
|
|
88
|
+
],
|
|
89
|
+
"task": true
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"views": []
|
|
93
|
+
}
|