@soleil-se/build-app 2.1.4 → 2.1.6
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/bin/index.js +0 -0
- package/package.json +15 -12
- package/requests/api/addonRequest.js +13 -4
- package/requests/signAddon.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ title: Changelog
|
|
|
4
4
|
|
|
5
5
|
Baseras på [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) och använder [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.1.6] - 2025-02-28
|
|
8
|
+
|
|
9
|
+
- Ta bort encoding av inlodggningsuppgifter på anrop för signering.
|
|
10
|
+
|
|
11
|
+
## [2.1.5] - 2025-02-28
|
|
12
|
+
|
|
13
|
+
- Kasta fel vid redirects då uppladdning av tillägg misslyckas och fastnar.
|
|
14
|
+
|
|
15
|
+
## [2.1.4] - 2024-12-05
|
|
16
|
+
|
|
17
|
+
- Ta bort `babel-plugin-transform-async-to-promises` då det medför problem vid serverrendering.
|
|
18
|
+
|
|
7
19
|
## [2.1.3] - 2024-11-29
|
|
8
20
|
|
|
9
21
|
- Lägg till `globalThis` i serverkontext.
|
package/README.md
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Script for building WebApps, RESTApps and Widgets with Svelte in Sitevision.
|
|
4
4
|
|
|
5
|
-
[Documentation](https://docs.soleil.se/build/app) | [Changelog](https://docs.soleil.se/build/app/changelog)
|
|
5
|
+
[Documentation](https://docs.soleil.se/build/build-app) | [Changelog](https://docs.soleil.se/build/build-app/changelog)
|
package/bin/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soleil-se/build-app",
|
|
3
|
-
"
|
|
3
|
+
"description": "Script for building WebApps, RESTApps and Widgets with Svelte in Sitevision.",
|
|
4
|
+
"version": "2.1.6",
|
|
4
5
|
"bin": {
|
|
5
6
|
"build-app": "./bin/index.js",
|
|
6
7
|
"sv-app-build": "./bin/index.js"
|
|
@@ -9,6 +10,13 @@
|
|
|
9
10
|
"author": "Soleil AB",
|
|
10
11
|
"license": "UNLICENSED",
|
|
11
12
|
"type": "module",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"sitevision",
|
|
15
|
+
"webapp",
|
|
16
|
+
"restapp",
|
|
17
|
+
"widget",
|
|
18
|
+
"svelte"
|
|
19
|
+
],
|
|
12
20
|
"engines": {
|
|
13
21
|
"node": ">=20.0.0"
|
|
14
22
|
},
|
|
@@ -44,19 +52,14 @@
|
|
|
44
52
|
"rollup-plugin-svelte": "7.2.2",
|
|
45
53
|
"slash": "5.1.0",
|
|
46
54
|
"svelte-preprocess": "6.0.3",
|
|
47
|
-
"@soleil-se/build-
|
|
48
|
-
"@soleil-se/build-
|
|
55
|
+
"@soleil-se/build-utils": "1.8.2",
|
|
56
|
+
"@soleil-se/build-config": "1.3.0"
|
|
49
57
|
},
|
|
50
58
|
"devDependencies": {
|
|
51
59
|
"svelte": "^5.6.2"
|
|
52
60
|
},
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"WebApp",
|
|
58
|
-
"RESTApp",
|
|
59
|
-
"Widget",
|
|
60
|
-
"Svelte"
|
|
61
|
-
]
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {}
|
|
62
65
|
}
|
|
@@ -4,16 +4,22 @@ import config from '@soleil-se/build-config';
|
|
|
4
4
|
|
|
5
5
|
const { name, host, auth, acceptUnauthorizedCert } = config.env;
|
|
6
6
|
|
|
7
|
-
const [username, password] = Buffer.from(auth || '', 'base64').toString().split(
|
|
7
|
+
const [username, password] = Buffer.from(auth || '', 'base64').toString().split(/:(.*)/s);
|
|
8
8
|
|
|
9
9
|
const options = {
|
|
10
|
-
prefixUrl: `${host}/rest-api/1/0/${
|
|
11
|
-
username,
|
|
12
|
-
password,
|
|
10
|
+
prefixUrl: `${host}/rest-api/1/0/${encodeURIComponent(name)}/`,
|
|
11
|
+
username: encodeURIComponent(username),
|
|
12
|
+
password: encodeURIComponent(password),
|
|
13
13
|
method: 'POST',
|
|
14
14
|
responseType: 'json',
|
|
15
15
|
resolveBodyOnly: true,
|
|
16
16
|
hooks: {
|
|
17
|
+
beforeRedirect: [
|
|
18
|
+
() => {
|
|
19
|
+
// Addon upload won't work on redirect, throw error to stop the request
|
|
20
|
+
throw new Error('REDIRECT');
|
|
21
|
+
},
|
|
22
|
+
],
|
|
17
23
|
beforeError: [
|
|
18
24
|
(error) => {
|
|
19
25
|
const { response } = error;
|
|
@@ -22,7 +28,10 @@ const options = {
|
|
|
22
28
|
let message = body && body.message ? body.message : body.toString();
|
|
23
29
|
if (!message && response.statusCode === 401) {
|
|
24
30
|
message = 'Unauthorized, correct username and password?';
|
|
31
|
+
} else if (response.statusCode >= 300 && response.statusCode < 400) {
|
|
32
|
+
message = `Request to '${response?.requestUrl?.origin}' was redirected to '${response?.redirectUrls[0]?.origin}', check if the site primary address is correct in config.`;
|
|
25
33
|
}
|
|
34
|
+
|
|
26
35
|
return new Error(`${response.statusCode} - ${message}`);
|
|
27
36
|
}
|
|
28
37
|
return new Error(error.message);
|
package/requests/signAddon.js
CHANGED
|
@@ -21,7 +21,7 @@ function getCertificate() {
|
|
|
21
21
|
function getAuth() {
|
|
22
22
|
const { auth } = config.webappSign || {};
|
|
23
23
|
if (auth) {
|
|
24
|
-
const [username, password] = Buffer.from(auth || '', 'base64').toString().split(
|
|
24
|
+
const [username, password] = Buffer.from(auth || '', 'base64').toString().split(/:(.*)/s);
|
|
25
25
|
return { username, password };
|
|
26
26
|
}
|
|
27
27
|
return prompts([
|