@hello.nrfcloud.com/proto-map 16.5.41 → 16.5.42
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/models.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Generate code from the model and schema definitions
|
|
3
|
-
*/ function _array_like_to_array(arr, len) {
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
4
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
5
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6
4
|
return arr2;
|
|
@@ -146,7 +144,9 @@ function _ts_generator(thisArg, body) {
|
|
|
146
144
|
}
|
|
147
145
|
}
|
|
148
146
|
var _path;
|
|
149
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Generate code from the model and schema definitions
|
|
149
|
+
*/ import chalk from 'chalk';
|
|
150
150
|
import { readFile, readdir, stat, writeFile } from 'node:fs/promises';
|
|
151
151
|
import os from 'node:os';
|
|
152
152
|
import path from 'node:path';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* A recursive function that walks through the given object and for each property checks if its value is an array and only has one element. If that is the case it takes the first element and uses it instead.
|
|
3
|
-
*/ function _array_like_to_array(arr, len) {
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
4
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
5
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6
4
|
return arr2;
|
|
@@ -98,7 +96,9 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
98
96
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
99
97
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
100
98
|
}
|
|
101
|
-
|
|
99
|
+
/**
|
|
100
|
+
* A recursive function that walks through the given object and for each property checks if its value is an array and only has one element. If that is the case it takes the first element and uses it instead.
|
|
101
|
+
*/ export var unwrapNestedArray = function(object) {
|
|
102
102
|
if (typeof object === 'string') return object;
|
|
103
103
|
return Object.entries(object).reduce(function(result, param) {
|
|
104
104
|
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
package/dist/models/models.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* The Model IDs defined in this repo.
|
|
3
|
-
*/ function _define_property(obj, key, value) {
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
4
2
|
if (key in obj) {
|
|
5
3
|
Object.defineProperty(obj, key, {
|
|
6
4
|
value: value,
|
|
@@ -13,7 +11,9 @@
|
|
|
13
11
|
}
|
|
14
12
|
return obj;
|
|
15
13
|
}
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The Model IDs defined in this repo.
|
|
16
|
+
*/ export var ModelID = /*#__PURE__*/ function(ModelID) {
|
|
17
17
|
ModelID["Kartverket_vasstandsdata"] = "kartverket-vasstandsdata";
|
|
18
18
|
ModelID["Thingy91x"] = "thingy91x";
|
|
19
19
|
return ModelID;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hello.nrfcloud.com/proto-map",
|
|
3
|
-
"version": "16.5.
|
|
3
|
+
"version": "16.5.42",
|
|
4
4
|
"description": "Documents the communication protocol between devices, the hello.nrfcloud.com/map backend and web application",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@bifravst/prettier-config": "1.1.13",
|
|
40
40
|
"@commitlint/config-conventional": "19.8.1",
|
|
41
41
|
"@swc/cli": "0.7.9",
|
|
42
|
-
"@swc/core": "1.15.
|
|
42
|
+
"@swc/core": "1.15.3",
|
|
43
43
|
"@types/node": "22.19.1",
|
|
44
44
|
"@types/xml2js": "0.4.14",
|
|
45
45
|
"chalk": "5.6.2",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"lwm2m"
|
|
98
98
|
],
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@aws-sdk/client-timestream-write": "^3.
|
|
100
|
+
"@aws-sdk/client-timestream-write": "^3.939.0",
|
|
101
101
|
"@sinclair/typebox": "^0.34.41"
|
|
102
102
|
}
|
|
103
103
|
}
|