@ffflorian/mock-udp 1.0.0 → 1.0.2
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 +10 -56
- package/CHANGELOG.md +0 -23
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
|
-
"@ffflorian/tslint-config": "0.7.0",
|
|
8
|
-
"@semantic-release/changelog": "3.0.6",
|
|
9
|
-
"@semantic-release/git": "7.0.18",
|
|
10
|
-
"@types/jasmine": "3.5.0",
|
|
11
|
-
"@types/node": "~12",
|
|
12
|
-
"husky": "3.1.0",
|
|
13
|
-
"jasmine": "3.5.0",
|
|
14
|
-
"lint-staged": "9.5.0",
|
|
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.4",
|
|
20
|
-
"tslint": "5.20.1",
|
|
21
|
-
"tslint-config-prettier": "1.18.0",
|
|
22
|
-
"tslint-plugin-prettier": "2.1.0",
|
|
23
|
-
"typescript": "3.7.4"
|
|
5
|
+
"rimraf": "4.1.2",
|
|
6
|
+
"typescript": "4.9.5"
|
|
24
7
|
},
|
|
25
8
|
"engines": {
|
|
26
9
|
"node": ">= 10.9"
|
|
@@ -30,49 +13,20 @@
|
|
|
30
13
|
"index.js",
|
|
31
14
|
"index.js.map"
|
|
32
15
|
],
|
|
33
|
-
"husky": {
|
|
34
|
-
"hooks": {
|
|
35
|
-
"pre-commit": "lint-staged"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
16
|
"license": "GPL-3.0",
|
|
39
|
-
"lint-staged": {
|
|
40
|
-
"*.{json,md,yml}": [
|
|
41
|
-
"prettier --write",
|
|
42
|
-
"git add"
|
|
43
|
-
],
|
|
44
|
-
"spec/**/*.ts": [
|
|
45
|
-
"tslint --project tsconfig.jasmine.json --fix",
|
|
46
|
-
"git add"
|
|
47
|
-
],
|
|
48
|
-
"src/**/*.ts": [
|
|
49
|
-
"tslint --project tsconfig.json --fix",
|
|
50
|
-
"git add"
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
17
|
"main": "index.js",
|
|
54
18
|
"name": "@ffflorian/mock-udp",
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
"release": {
|
|
58
|
-
"extends": "@ffflorian/semantic-release-config"
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"directory": "flattened"
|
|
59
21
|
},
|
|
22
|
+
"repository": "https://github.com/ffflorian/node-packages/tree/main/packages/mock-udp",
|
|
60
23
|
"scripts": {
|
|
61
24
|
"build": "tsc",
|
|
62
25
|
"clean": "rimraf dist",
|
|
63
26
|
"dist": "yarn clean && yarn build",
|
|
64
|
-
"flatten": "publish-flat -o flattened",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"fix:ts": "yarn lint:ts --fix && yarn lint:ts:spec --fix",
|
|
68
|
-
"lint": "yarn lint:ts && yarn lint:ts:spec && yarn lint:other",
|
|
69
|
-
"lint:other": "yarn prettier --list-different",
|
|
70
|
-
"lint:ts": "tslint --project tsconfig.json",
|
|
71
|
-
"lint:ts:spec": "tslint --project tsconfig.jasmine.json",
|
|
72
|
-
"postversion": "node ../node_modules/publish-flat/cli-copy.js -i package.json -o ../package.json version",
|
|
73
|
-
"prettier": "prettier \"*.{json,md,yml}\"",
|
|
74
|
-
"release": "semantic-release",
|
|
75
|
-
"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"
|
|
76
30
|
},
|
|
77
|
-
"version": "1.0.
|
|
31
|
+
"version": "1.0.2"
|
|
78
32
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# [0.2.0](https://github.com/ffflorian/mock-udp/compare/v0.1.2...v0.2.0) (2019-11-20)
|
|
2
|
-
|
|
3
|
-
### Features
|
|
4
|
-
|
|
5
|
-
- Force publish ([832b69f](https://github.com/ffflorian/mock-udp/commit/832b69f))
|
|
6
|
-
|
|
7
|
-
## [0.1.2](https://github.com/ffflorian/mock-udp/compare/v0.1.1...v0.1.2) (2019-09-06)
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
- Use postversion when publishing ([ae74bc4](https://github.com/ffflorian/mock-udp/commit/ae74bc4))
|
|
12
|
-
|
|
13
|
-
## [0.1.1](https://github.com/ffflorian/mock-udp/compare/v0.1.0...v0.1.1) (2019-06-14)
|
|
14
|
-
|
|
15
|
-
### Bug Fixes
|
|
16
|
-
|
|
17
|
-
- Use @ffflorian/semantic-release-config ([2e97753](https://github.com/ffflorian/mock-udp/commit/2e97753))
|
|
18
|
-
|
|
19
|
-
## [0.0.5](https://github.com/ffflorian/mock-udp/compare/v0.0.4...v0.0.5) (2019-05-06)
|
|
20
|
-
|
|
21
|
-
### Bug Fixes
|
|
22
|
-
|
|
23
|
-
- Force publishing ([da619e7](https://github.com/ffflorian/mock-udp/commit/da619e7))
|