@appsemble/node-utils 0.36.3-test.6 → 0.36.4
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/icon.js +0 -2
- package/package.json +5 -5
- package/server/routes/appRouter/cssHandler.js +1 -1
- package/server/types.d.ts +1 -0
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.36.4)
|
|
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.36.
|
|
29
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.36.4/LICENSE.md) ©
|
|
30
30
|
[Appsemble](https://appsemble.com)
|
package/icon.js
CHANGED
|
@@ -16,7 +16,6 @@ export async function serveIcon(ctx, { background, cache, fallback, height, icon
|
|
|
16
16
|
if (raw) {
|
|
17
17
|
const { format } = await img.metadata();
|
|
18
18
|
ctx.body = buffer;
|
|
19
|
-
// @ts-expect-error 2322 null is not assignable to type (strictNullChecks)
|
|
20
19
|
ctx.type = format;
|
|
21
20
|
return;
|
|
22
21
|
}
|
|
@@ -42,7 +41,6 @@ export async function serveIcon(ctx, { background, cache, fallback, height, icon
|
|
|
42
41
|
// Make the regular icon maskable
|
|
43
42
|
const actual = img;
|
|
44
43
|
const metadata = await actual.metadata();
|
|
45
|
-
// @ts-expect-error 18048 variable is possibly undefined (strictNullChecks)
|
|
46
44
|
const angle = Math.atan(metadata.height / metadata.width);
|
|
47
45
|
actual.resize({
|
|
48
46
|
// @ts-expect-error 18048 variable is possibly undefined (strictNullChecks)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/node-utils",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.4",
|
|
4
4
|
"description": "NodeJS utilities used by Appsemble internally.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"test": "vitest"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@appsemble/lang-sdk": "0.36.
|
|
44
|
-
"@appsemble/types": "0.36.
|
|
45
|
-
"@appsemble/utils": "0.36.
|
|
43
|
+
"@appsemble/lang-sdk": "0.36.4",
|
|
44
|
+
"@appsemble/types": "0.36.4",
|
|
45
|
+
"@appsemble/utils": "0.36.4",
|
|
46
46
|
"@formatjs/fast-memoize": "^2.0.0",
|
|
47
47
|
"@fortawesome/fontawesome-free": "^6.0.0",
|
|
48
48
|
"@kubernetes/client-node": "^0.22.2",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"pg": "^8.16.3",
|
|
92
92
|
"request-filtering-agent": "^3.2.0",
|
|
93
93
|
"sass": "^1.0.0",
|
|
94
|
-
"sharp": "
|
|
94
|
+
"sharp": "0.34.5",
|
|
95
95
|
"sort-keys": "^5.0.0",
|
|
96
96
|
"strip-bom": "^5.0.0",
|
|
97
97
|
"type-fest": "^4.0.0",
|
|
@@ -3,7 +3,7 @@ export function createCssHandler(type, { getAppStyles }) {
|
|
|
3
3
|
return async (ctx) => {
|
|
4
4
|
const app = await getAppStyles({ context: ctx, query: { attributes: [type], raw: true } });
|
|
5
5
|
assertKoaCondition(app != null, ctx, 404, 'App not found');
|
|
6
|
-
ctx.body = app[type];
|
|
6
|
+
ctx.body = app[type] ?? '';
|
|
7
7
|
ctx.type = 'css';
|
|
8
8
|
};
|
|
9
9
|
}
|