jooby-codec 2.14.0 → 2.15.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.
- package/dist/mtx/constants/commandRelations.d.ts +4 -0
- package/dist/mtx/constants/commandRelations.js +21 -0
- package/dist/mtx/constants/commandRelations.js.map +1 -0
- package/dist/mtx/index.d.ts +1 -0
- package/dist/mtx/index.js +1 -0
- package/dist/mtx/index.js.map +1 -1
- package/dist/mtx/utils/index.d.ts +1 -0
- package/dist/mtx/utils/index.js +2 -0
- package/dist/mtx/utils/index.js.map +1 -0
- package/dist/obis-observer/constants/commandRelations.d.ts +2 -0
- package/dist/obis-observer/constants/commandRelations.js +6 -2
- package/dist/obis-observer/constants/commandRelations.js.map +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as downlinkCommands from '../commands/downlink/index.js';
|
|
2
|
+
import * as uplinkCommands from '../commands/uplink/index.js';
|
|
3
|
+
export const requestByResponse = new Map();
|
|
4
|
+
export const responseByRequest = new Map();
|
|
5
|
+
export const requestById = new Map();
|
|
6
|
+
export const responseById = new Map();
|
|
7
|
+
requestByResponse.set(uplinkCommands.ActivateRatePlanResponse, downlinkCommands.ActivateRatePlan);
|
|
8
|
+
requestByResponse.set(uplinkCommands.GetDateTimeResponse, downlinkCommands.GetDateTime);
|
|
9
|
+
requestByResponse.set(uplinkCommands.GetDisplayParamResponse, downlinkCommands.GetDisplayParam);
|
|
10
|
+
requestByResponse.set(uplinkCommands.GetOpParamsResponse, downlinkCommands.GetOpParams);
|
|
11
|
+
requestByResponse.set(uplinkCommands.GetRatePlanInfoResponse, downlinkCommands.GetRatePlanInfo);
|
|
12
|
+
requestByResponse.set(uplinkCommands.SetDisplayParamResponse, downlinkCommands.SetDisplayParam);
|
|
13
|
+
requestByResponse.set(uplinkCommands.SetOpParamsResponse, downlinkCommands.SetOpParams);
|
|
14
|
+
requestByResponse.set(uplinkCommands.TurnRelayOffResponse, downlinkCommands.TurnRelayOff);
|
|
15
|
+
requestByResponse.set(uplinkCommands.TurnRelayOnResponse, downlinkCommands.TurnRelayOn);
|
|
16
|
+
for (const [response, request] of requestByResponse.entries()) {
|
|
17
|
+
responseByRequest.set(request, response);
|
|
18
|
+
responseById.set(response.id, response);
|
|
19
|
+
requestById.set(request.id, request);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=commandRelations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandRelations.js","sourceRoot":"","sources":["../../../src/mtx/constants/commandRelations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAC;AAI9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;AAC3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;AAG3C,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;AAGtC,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AAClG,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACxF,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;AAChG,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACxF,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;AAChG,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;AAChG,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACxF,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;AAC1F,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;AAExF,KAAM,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,iBAAiB,CAAC,OAAO,EAAE,EAAG;IAE7D,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEzC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IACxC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;CACxC"}
|
package/dist/mtx/index.d.ts
CHANGED
package/dist/mtx/index.js
CHANGED
package/dist/mtx/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mtx/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mtx/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as crypto from './crypto.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mtx/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC"}
|
|
@@ -2,6 +2,8 @@ import * as downlinkCommands from '../commands/downlink/index.js';
|
|
|
2
2
|
import * as uplinkCommands from '../commands/uplink/index.js';
|
|
3
3
|
export const requestByResponse = new Map();
|
|
4
4
|
export const responseByRequest = new Map();
|
|
5
|
+
export const requestById = new Map();
|
|
6
|
+
export const responseById = new Map();
|
|
5
7
|
requestByResponse.set(uplinkCommands.AddShortNameProfileResponse, downlinkCommands.AddShortNameProfile);
|
|
6
8
|
requestByResponse.set(uplinkCommands.GetArchiveProfileResponse, downlinkCommands.GetArchiveProfile);
|
|
7
9
|
requestByResponse.set(uplinkCommands.GetContentByObisResponse, downlinkCommands.GetContentByObis);
|
|
@@ -17,7 +19,9 @@ requestByResponse.set(uplinkCommands.RemoveShortNameProfileResponse, downlinkCom
|
|
|
17
19
|
requestByResponse.set(uplinkCommands.SetArchiveProfileResponse, downlinkCommands.SetArchiveProfile);
|
|
18
20
|
requestByResponse.set(uplinkCommands.SetSerialPortResponse, downlinkCommands.SetSerialPort);
|
|
19
21
|
requestByResponse.set(uplinkCommands.SetShortNameResponse, downlinkCommands.SetShortName);
|
|
20
|
-
for (const [
|
|
21
|
-
responseByRequest.set(
|
|
22
|
+
for (const [response, request] of requestByResponse.entries()) {
|
|
23
|
+
responseByRequest.set(request, response);
|
|
24
|
+
responseById.set(response.id, response);
|
|
25
|
+
requestById.set(request.id, request);
|
|
22
26
|
}
|
|
23
27
|
//# sourceMappingURL=commandRelations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandRelations.js","sourceRoot":"","sources":["../../../src/obis-observer/constants/commandRelations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commandRelations.js","sourceRoot":"","sources":["../../../src/obis-observer/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,GAAG,CAAC,cAAc,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACxF,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,cAAc,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC9E,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,8BAA8B,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAC9G,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACpG,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;AAC5F,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;AAE1F,KAAM,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,iBAAiB,CAAC,OAAO,EAAE,EAAG;IAE7D,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEzC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IACxC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;CACxC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jooby-codec",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Jooby message encoders/decoders",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"./analog/commands/downlink": "./dist/analog/commands/downlink/index.js",
|
|
15
15
|
"./analog/commands/uplink": "./dist/analog/commands/uplink/index.js",
|
|
16
16
|
"./analog/constants": "./dist/analog/constants/index.js",
|
|
17
|
+
"./mtx": "./dist/mtx/index.js",
|
|
18
|
+
"./mtx/commands": "./dist/mtx/commands/index.js",
|
|
19
|
+
"./mtx/commands/downlink": "./dist/mtx/commands/downlink/index.js",
|
|
20
|
+
"./mtx/commands/uplink": "./dist/mtx/commands/uplink/index.js",
|
|
21
|
+
"./mtx/constants": "./dist/mtx/constants/index.js",
|
|
17
22
|
"./obis-observer": "./dist/obis-observer/index.js",
|
|
18
23
|
"./obis-observer/commands": "./dist/obis-observer/commands/index.js",
|
|
19
24
|
"./obis-observer/commands/downlink": "./dist/obis-observer/commands/downlink/index.js",
|
|
@@ -30,5 +35,8 @@
|
|
|
30
35
|
"npm": ">=9.0.0",
|
|
31
36
|
"node": ">=18.0.0"
|
|
32
37
|
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"crypto-js": "^4.1.1"
|
|
40
|
+
},
|
|
33
41
|
"license": "MIT"
|
|
34
42
|
}
|