@appsemble/node-utils 0.21.0 → 0.21.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 +3 -3
- package/fs.js +1 -1
- package/logger.js +1 -1
- package/odata.js +1 -1
- package/package.json +7 -4
- package/server/routes/appRouter/bulmaHandler.js +7 -5
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#  Appsemble Node Utilities
|
|
2
2
|
|
|
3
3
|
> NodeJS utilities used by Appsemble internally.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/node-utils)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.21.2)
|
|
7
7
|
[](https://prettier.io)
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
@@ -26,5 +26,5 @@ compatibility is not guaranteed.
|
|
|
26
26
|
|
|
27
27
|
## License
|
|
28
28
|
|
|
29
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.21.
|
|
29
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.21.2/LICENSE.md) ©
|
|
30
30
|
[Appsemble](https://appsemble.com)
|
package/fs.js
CHANGED
|
@@ -70,7 +70,7 @@ export async function writeData(path, data, { compare = compareStrings, sort = t
|
|
|
70
70
|
prettierOptions.parser = inferredParser;
|
|
71
71
|
buffer =
|
|
72
72
|
inferredParser === 'yaml' ? stringify(sorted) : `${JSON.stringify(sorted, undefined, 2)}\n`;
|
|
73
|
-
buffer = prettier.format(buffer, prettierOptions);
|
|
73
|
+
buffer = await prettier.format(buffer, prettierOptions);
|
|
74
74
|
}
|
|
75
75
|
catch {
|
|
76
76
|
const ext = extname(path);
|
package/logger.js
CHANGED
|
@@ -8,7 +8,7 @@ const levels = ['crit', 'error', 'warn', 'info', 'verbose', 'silly'];
|
|
|
8
8
|
const DEFAULT_LEVEL = levels.indexOf('info');
|
|
9
9
|
const padding = Math.max(...levels.map(({ length }) => length));
|
|
10
10
|
function headerCase(header) {
|
|
11
|
-
return header.
|
|
11
|
+
return header.replaceAll(/(^|-)\w/g, (a) => a.toUpperCase());
|
|
12
12
|
}
|
|
13
13
|
function httpErrorToString(error) {
|
|
14
14
|
var _a, _b, _c;
|
package/odata.js
CHANGED
|
@@ -20,7 +20,7 @@ export function processLiteral(token) {
|
|
|
20
20
|
case Edm.Boolean:
|
|
21
21
|
return token.raw === 'true';
|
|
22
22
|
case Edm.String:
|
|
23
|
-
return JSON.parse(`"${token.raw.slice(1, -1).
|
|
23
|
+
return JSON.parse(`"${token.raw.slice(1, -1).replaceAll('"', '\\"')}"`);
|
|
24
24
|
case Edm.Byte:
|
|
25
25
|
case Edm.Decimal:
|
|
26
26
|
case Edm.Double:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/node-utils",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"description": "NodeJS utilities used by Appsemble internally.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"test": "vitest"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@appsemble/types": "0.21.
|
|
35
|
-
"@appsemble/utils": "0.21.
|
|
34
|
+
"@appsemble/types": "0.21.2",
|
|
35
|
+
"@appsemble/utils": "0.21.2",
|
|
36
36
|
"@formatjs/fast-memoize": "^2.0.0",
|
|
37
37
|
"@fortawesome/fontawesome-free": "^6.0.0",
|
|
38
38
|
"@hapi/boom": "^10.0.0",
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
"@types/koa": "^2.0.0",
|
|
42
42
|
"axios": "^1.0.0",
|
|
43
43
|
"bulma": "0.9.3",
|
|
44
|
+
"bulma-checkradio": "2.1.1",
|
|
45
|
+
"bulma-slider": "2.0.4",
|
|
46
|
+
"bulma-switch": "^2.0.0",
|
|
44
47
|
"chalk": "^4.0.0",
|
|
45
48
|
"cli-highlight": "^2.0.0",
|
|
46
49
|
"csv-parse": "^5.0.0",
|
|
@@ -75,7 +78,7 @@
|
|
|
75
78
|
"sharp": "^0.32.0",
|
|
76
79
|
"sort-keys": "^5.0.0",
|
|
77
80
|
"strip-bom": "^5.0.0",
|
|
78
|
-
"type-fest": "^
|
|
81
|
+
"type-fest": "^4.0.0",
|
|
79
82
|
"webpack": "^5.0.0",
|
|
80
83
|
"webpack-dev-middleware": "^6.0.0",
|
|
81
84
|
"winston": "^3.0.0",
|
|
@@ -5,11 +5,13 @@ import bulma from 'bulma/package.json' assert { type: 'json' };
|
|
|
5
5
|
import { renderSync } from 'sass';
|
|
6
6
|
import stripBom from 'strip-bom';
|
|
7
7
|
const require = createRequire(import.meta.url);
|
|
8
|
-
const bulmaPath = require.resolve('bulma/bulma.sass').
|
|
9
|
-
const functionPath = require.resolve('bulma/sass/utilities/functions.sass').
|
|
10
|
-
const checkRadioPath = require
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const bulmaPath = require.resolve('bulma/bulma.sass').replaceAll('\\', '/');
|
|
9
|
+
const functionPath = require.resolve('bulma/sass/utilities/functions.sass').replaceAll('\\', '/');
|
|
10
|
+
const checkRadioPath = require
|
|
11
|
+
.resolve('bulma-checkradio/src/sass/index.sass')
|
|
12
|
+
.replaceAll('\\', '/');
|
|
13
|
+
const bulmaSliderPath = require.resolve('bulma-slider/src/sass/index.sass').replaceAll('\\', '/');
|
|
14
|
+
const bulmaSwitchPath = require.resolve('bulma-switch/src/sass/index.sass').replaceAll('\\', '/');
|
|
13
15
|
function getQueryParameter(value) {
|
|
14
16
|
return Array.isArray(value) ? value[0] : value;
|
|
15
17
|
}
|