@rebilly/framepay-react 14.62.0 → 14.62.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/CHANGELOG.md +3 -2
- package/package.json +2 -2
- package/tests/e2e/server.mjs +19 -9
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebilly/framepay-react",
|
|
3
|
-
"version": "14.62.
|
|
3
|
+
"version": "14.62.1",
|
|
4
4
|
"description": "A React wrapper for Rebilly's FramePay offering out-of-the-box support for Redux and other common React features",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Rebilly",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@playwright/test": "^1.63.0",
|
|
55
55
|
"@rebilly/playwright-config": "*",
|
|
56
56
|
"@rebilly/eslint-config": "*",
|
|
57
|
-
"@small-tech/auto-encrypt-localhost": "^
|
|
57
|
+
"@small-tech/auto-encrypt-localhost": "^11.4.0",
|
|
58
58
|
"@testing-library/react": "^15.0.7",
|
|
59
59
|
"@types/node": "^24.13.3",
|
|
60
60
|
"@types/react": "^19.2.7",
|
package/tests/e2e/server.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
|
+
import https from 'https';
|
|
2
3
|
import path from 'path';
|
|
3
4
|
import fs from 'fs';
|
|
4
5
|
import portfinder from 'portfinder';
|
|
5
6
|
import AutoEncryptLocalhost from '@small-tech/auto-encrypt-localhost';
|
|
6
|
-
import HttpServer from '@small-tech/auto-encrypt-localhost/lib/HttpServer.js';
|
|
7
7
|
import { fileURLToPath } from 'url';
|
|
8
8
|
|
|
9
9
|
// __dirname is not available in esmodules, so we must build it
|
|
@@ -31,15 +31,25 @@ const addDirRoutes = (dir, category) => {
|
|
|
31
31
|
addDirRoutes(path.resolve(__dirname, './build'), '');
|
|
32
32
|
|
|
33
33
|
export default function () {
|
|
34
|
-
return new Promise((resolve) => {
|
|
34
|
+
return new Promise((resolve, reject) => {
|
|
35
35
|
portfinder.getPort((err, port) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
if (err) {
|
|
37
|
+
reject(err);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Auto Encrypt Localhost provisions a locally-trusted certificate and key
|
|
42
|
+
// (creating and installing its certificate authority on first run).
|
|
43
|
+
// Node's own https server uses them directly, so the package's shared
|
|
44
|
+
// HTTP-to-HTTPS redirect server on port 80 is never started.
|
|
45
|
+
const server = https.createServer(
|
|
46
|
+
AutoEncryptLocalhost.getKeyMaterial(),
|
|
47
|
+
app,
|
|
48
|
+
);
|
|
49
|
+
server.listen(port, () => {
|
|
50
|
+
console.log(`Running at https://localhost:${port}`);
|
|
51
|
+
resolve({ port, server, app });
|
|
52
|
+
});
|
|
43
53
|
});
|
|
44
54
|
});
|
|
45
55
|
}
|