@ffflorian/mock-udp 0.2.0 → 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/README.md +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +13 -56
- package/CHANGELOG.md +0 -17
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mock-udp [](https://www.npmjs.com/package/@ffflorian/mock-udp)
|
|
2
2
|
|
|
3
3
|
Mock dgram udp requests. Based on [node-mock-udp](https://github.com/mattrobenolt/node-mock-udp).
|
|
4
4
|
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// tslint:disable:no-default-export
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Scope = exports.isMocked = exports.clean = exports.intercept = exports.revert = exports.add = void 0;
|
|
4
4
|
const dgram_1 = require("dgram");
|
|
5
5
|
let intercepts = {};
|
|
6
6
|
const originalSocketSend = dgram_1.Socket.prototype.send;
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAI7B,IAAI,UAAU,GAEV,EAAE,CAAC;AAEP,MAAM,kBAAkB,GAAG,cAAM,CAAC,SAAS,CAAC,IAAI,CAAC;AAEjD,MAAM,KAAK;IAQT;QACE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,IAAI;QACT,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAqHC,sBAAK;AAtFP,SAAS,oBAAoB,CAC3B,GAAyC,EACzC,sBAA8C,EAC9C,yBAA0D,EAC1D,cAAsC,EACtC,iBAAyC,EACzC,mBAAkC;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": "Florian
|
|
2
|
+
"author": "Florian Imdahl <git@ffflorian.de>",
|
|
3
3
|
"description": "Mock dgram udp requests.",
|
|
4
4
|
"devDependencies": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"@types/jasmine": "3.4.6",
|
|
11
|
-
"@types/node": "~12",
|
|
12
|
-
"husky": "3.1.0",
|
|
13
|
-
"jasmine": "3.5.0",
|
|
14
|
-
"lint-staged": "9.4.3",
|
|
15
|
-
"prettier": "1.19.1",
|
|
16
|
-
"publish-flat": "1.3.4",
|
|
17
|
-
"rimraf": "3.0.0",
|
|
18
|
-
"semantic-release": "15.13.31",
|
|
19
|
-
"ts-node": "8.5.2",
|
|
20
|
-
"tslint": "5.20.1",
|
|
21
|
-
"tslint-config-prettier": "1.18.0",
|
|
22
|
-
"tslint-plugin-prettier": "2.0.1",
|
|
23
|
-
"typescript": "3.7.2"
|
|
5
|
+
"rimraf": "4.1.2",
|
|
6
|
+
"typescript": "4.9.5"
|
|
7
|
+
},
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">= 10.9"
|
|
24
10
|
},
|
|
25
11
|
"files": [
|
|
26
12
|
"index.d.ts",
|
|
27
13
|
"index.js",
|
|
28
14
|
"index.js.map"
|
|
29
15
|
],
|
|
30
|
-
"husky": {
|
|
31
|
-
"hooks": {
|
|
32
|
-
"pre-commit": "lint-staged"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
16
|
"license": "GPL-3.0",
|
|
36
|
-
"lint-staged": {
|
|
37
|
-
"*.{json,md,yml}": [
|
|
38
|
-
"prettier --write",
|
|
39
|
-
"git add"
|
|
40
|
-
],
|
|
41
|
-
"spec/**/*.ts": [
|
|
42
|
-
"tslint --project tsconfig.jasmine.json --fix",
|
|
43
|
-
"git add"
|
|
44
|
-
],
|
|
45
|
-
"src/**/*.ts": [
|
|
46
|
-
"tslint --project tsconfig.json --fix",
|
|
47
|
-
"git add"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
17
|
"main": "index.js",
|
|
51
18
|
"name": "@ffflorian/mock-udp",
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
"release": {
|
|
55
|
-
"extends": "@ffflorian/semantic-release-config"
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"directory": "flattened"
|
|
56
21
|
},
|
|
22
|
+
"repository": "https://github.com/ffflorian/node-packages/tree/main/packages/mock-udp",
|
|
57
23
|
"scripts": {
|
|
58
24
|
"build": "tsc",
|
|
59
25
|
"clean": "rimraf dist",
|
|
60
26
|
"dist": "yarn clean && yarn build",
|
|
61
|
-
"flatten": "publish-flat -o flattened",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"fix:ts": "yarn lint:ts --fix && yarn lint:ts:spec --fix",
|
|
65
|
-
"lint": "yarn lint:ts && yarn lint:ts:spec && yarn lint:other",
|
|
66
|
-
"lint:other": "yarn prettier --list-different",
|
|
67
|
-
"lint:ts": "tslint --project tsconfig.json",
|
|
68
|
-
"lint:ts:spec": "tslint --project tsconfig.jasmine.json",
|
|
69
|
-
"postversion": "node ../node_modules/publish-flat/cli-copy.js -i package.json -o ../package.json version",
|
|
70
|
-
"prettier": "prettier \"*.{json,md,yml}\"",
|
|
71
|
-
"release": "semantic-release",
|
|
72
|
-
"test": "ts-node -P tsconfig.jasmine.json node_modules/.bin/jasmine"
|
|
27
|
+
"flatten": "node ../publish-flat/dist/cli.js -o flattened",
|
|
28
|
+
"postversion": "node ../publish-flat/dist/cli-copy.js -o flattened/package.json version",
|
|
29
|
+
"test": "ts-node -P tsconfig.jasmine.json ../../node_modules/.bin/jasmine"
|
|
73
30
|
},
|
|
74
|
-
"version": "0.
|
|
31
|
+
"version": "1.0.1"
|
|
75
32
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
## [0.1.2](https://github.com/ffflorian/mock-udp/compare/v0.1.1...v0.1.2) (2019-09-06)
|
|
2
|
-
|
|
3
|
-
### Bug Fixes
|
|
4
|
-
|
|
5
|
-
- Use postversion when publishing ([ae74bc4](https://github.com/ffflorian/mock-udp/commit/ae74bc4))
|
|
6
|
-
|
|
7
|
-
## [0.1.1](https://github.com/ffflorian/mock-udp/compare/v0.1.0...v0.1.1) (2019-06-14)
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
- Use @ffflorian/semantic-release-config ([2e97753](https://github.com/ffflorian/mock-udp/commit/2e97753))
|
|
12
|
-
|
|
13
|
-
## [0.0.5](https://github.com/ffflorian/mock-udp/compare/v0.0.4...v0.0.5) (2019-05-06)
|
|
14
|
-
|
|
15
|
-
### Bug Fixes
|
|
16
|
-
|
|
17
|
-
- Force publishing ([da619e7](https://github.com/ffflorian/mock-udp/commit/da619e7))
|