@hello.nrfcloud.com/proto-map 4.0.0 → 4.0.2-nodenext.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/dist/generator/types.js +1 -1
- package/dist/lwm2m/definitions.js +7 -0
- package/lwm2m/14205.xml +1 -1
- package/lwm2m/definitions.ts +4 -1
- package/lwm2m/object/14205.d.ts +4 -0
- package/lwm2m/objects.ts +8 -8
- package/package.json +4 -4
- package/senml/lwm2mToSenML.ts +2 -2
- package/senml/senMLtoLwM2M.ts +1 -1
package/dist/generator/types.js
CHANGED
|
@@ -132,7 +132,7 @@ await writeFile(objectsFile, objects.map(function(param) {
|
|
|
132
132
|
return [
|
|
133
133
|
ts.factory.createExportDeclaration([], true, ts.factory.createNamedExports([
|
|
134
134
|
ts.factory.createExportSpecifier(false, undefined, ts.factory.createIdentifier(name))
|
|
135
|
-
]), ts.factory.createStringLiteral("./object/".concat(ObjectID))),
|
|
135
|
+
]), ts.factory.createStringLiteral("./object/".concat(ObjectID, ".js"))),
|
|
136
136
|
ts.factory.createExportDeclaration([], false, ts.factory.createNamedExports([
|
|
137
137
|
ts.factory.createExportSpecifier(false, undefined, ts.factory.createIdentifier("validate".concat(ObjectID)))
|
|
138
138
|
]), ts.factory.createStringLiteral("./object/validate".concat(ObjectID, ".js")))
|
|
@@ -438,12 +438,19 @@ var _obj;
|
|
|
438
438
|
* Humidity (Float)
|
|
439
439
|
*
|
|
440
440
|
* Environmental humidity in percent. Examples: 44.2, 72.
|
|
441
|
+
*
|
|
442
|
+
* Minimum: 0
|
|
443
|
+
* Maximum: 100
|
|
441
444
|
*/ 1: {
|
|
442
445
|
ResourceID: 1,
|
|
443
446
|
Name: "Humidity",
|
|
444
447
|
Mandatory: false,
|
|
445
448
|
Type: ResourceType.Float,
|
|
446
449
|
Description: "Environmental humidity in percent. Examples: 44.2, 72.",
|
|
450
|
+
RangeEnumeration: {
|
|
451
|
+
min: 0,
|
|
452
|
+
max: 100
|
|
453
|
+
},
|
|
447
454
|
Units: "%"
|
|
448
455
|
},
|
|
449
456
|
/**
|
package/lwm2m/14205.xml
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<MultipleInstances>Single</MultipleInstances>
|
|
25
25
|
<Mandatory>Optional</Mandatory>
|
|
26
26
|
<Type>Float</Type>
|
|
27
|
-
<RangeEnumeration
|
|
27
|
+
<RangeEnumeration>0..100</RangeEnumeration>
|
|
28
28
|
<Units>%</Units>
|
|
29
29
|
<Description><![CDATA[Environmental humidity in percent. Examples: 44.2, 72.]]></Description>
|
|
30
30
|
</Item>
|
package/lwm2m/definitions.ts
CHANGED
|
@@ -204,8 +204,11 @@ export const definitions: Record<LwM2MObjectID, LWM2MObjectInfo> = { /**
|
|
|
204
204
|
* Humidity (Float)
|
|
205
205
|
*
|
|
206
206
|
* Environmental humidity in percent. Examples: 44.2, 72.
|
|
207
|
+
*
|
|
208
|
+
* Minimum: 0
|
|
209
|
+
* Maximum: 100
|
|
207
210
|
*/
|
|
208
|
-
1: { ResourceID: 1, Name: "Humidity", Mandatory: false, Type: ResourceType.Float, Description: "Environmental humidity in percent. Examples: 44.2, 72.", Units: "%" }, /**
|
|
211
|
+
1: { ResourceID: 1, Name: "Humidity", Mandatory: false, Type: ResourceType.Float, Description: "Environmental humidity in percent. Examples: 44.2, 72.", RangeEnumeration: { min: 0, max: 100 }, Units: "%" }, /**
|
|
209
212
|
* Atmospheric pressure (Float)
|
|
210
213
|
*
|
|
211
214
|
* Atmospheric pressure in pascal. Examples: 1003.6, 977.
|
package/lwm2m/object/14205.d.ts
CHANGED
package/lwm2m/objects.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export type { Geolocation_14201 } from "./object/14201";
|
|
1
|
+
export type { Geolocation_14201 } from "./object/14201.js";
|
|
2
2
|
export { validate14201 } from "./object/validate14201.js";
|
|
3
|
-
export type { BatteryAndPower_14202 } from "./object/14202";
|
|
3
|
+
export type { BatteryAndPower_14202 } from "./object/14202.js";
|
|
4
4
|
export { validate14202 } from "./object/validate14202.js";
|
|
5
|
-
export type { ConnectionInformation_14203 } from "./object/14203";
|
|
5
|
+
export type { ConnectionInformation_14203 } from "./object/14203.js";
|
|
6
6
|
export { validate14203 } from "./object/validate14203.js";
|
|
7
|
-
export type { DeviceInformation_14204 } from "./object/14204";
|
|
7
|
+
export type { DeviceInformation_14204 } from "./object/14204.js";
|
|
8
8
|
export { validate14204 } from "./object/validate14204.js";
|
|
9
|
-
export type { Environment_14205 } from "./object/14205";
|
|
9
|
+
export type { Environment_14205 } from "./object/14205.js";
|
|
10
10
|
export { validate14205 } from "./object/validate14205.js";
|
|
11
|
-
export type { SolarCharge_14210 } from "./object/14210";
|
|
11
|
+
export type { SolarCharge_14210 } from "./object/14210.js";
|
|
12
12
|
export { validate14210 } from "./object/validate14210.js";
|
|
13
|
-
export type { ButtonPress_14220 } from "./object/14220";
|
|
13
|
+
export type { ButtonPress_14220 } from "./object/14220.js";
|
|
14
14
|
export { validate14220 } from "./object/validate14220.js";
|
|
15
|
-
export type { SeaWaterLevel_14230 } from "./object/14230";
|
|
15
|
+
export type { SeaWaterLevel_14230 } from "./object/14230.js";
|
|
16
16
|
export { validate14230 } from "./object/validate14230.js";
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hello.nrfcloud.com/proto-map",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2-nodenext.1",
|
|
4
4
|
"description": "Documents the communication protocol between devices, the hello.nrfcloud.com/map backend and web application",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"types": "./index.d.ts",
|
|
7
6
|
"exports": {
|
|
8
7
|
".": {
|
|
9
8
|
"import": "./export.js",
|
|
10
|
-
"node": "./export.js"
|
|
9
|
+
"node": "./export.js",
|
|
10
|
+
"types": "./index.d.ts"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@commitlint/config-conventional": "19.1.0",
|
|
42
42
|
"@swc/cli": "0.3.10",
|
|
43
43
|
"@swc/core": "1.4.8",
|
|
44
|
-
"@types/node": "20.11.
|
|
44
|
+
"@types/node": "20.11.28",
|
|
45
45
|
"@types/xml2js": "0.4.14",
|
|
46
46
|
"chalk": "5.3.0",
|
|
47
47
|
"husky": "9.0.11",
|
package/senml/lwm2mToSenML.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SenMLType } from './SenMLSchema'
|
|
1
|
+
import type { SenMLType } from './SenMLSchema.js'
|
|
2
2
|
import { instanceTs } from '../lwm2m/instanceTs.js'
|
|
3
|
-
import type { LwM2MObjectInstance, LwM2MResourceValue } from './senMLtoLwM2M'
|
|
3
|
+
import type { LwM2MObjectInstance, LwM2MResourceValue } from './senMLtoLwM2M.js'
|
|
4
4
|
import { timestampResources } from '../lwm2m/timestampResources.js'
|
|
5
5
|
import { definitions } from '../lwm2m/definitions.js'
|
|
6
6
|
import { ResourceType, type LWM2MObjectInfo } from '../lwm2m/LWM2MObjectInfo.js'
|
package/senml/senMLtoLwM2M.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MeasurementType, SenMLType } from './SenMLSchema'
|
|
1
|
+
import type { MeasurementType, SenMLType } from './SenMLSchema.js'
|
|
2
2
|
import { timestampResources } from '../lwm2m/timestampResources.js'
|
|
3
3
|
import { parseResourceId, type ResourceID } from './parseResourceId.js'
|
|
4
4
|
import { hasValue } from './hasValue.js'
|