edge-core-js 2.42.0 → 2.43.0
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 +4 -0
- package/android/src/main/assets/edge-core-js/edge-core.js +1 -1
- package/lib/core/currency/wallet/currency-wallet-cleaners.js +2 -0
- package/lib/flow/types.js +2 -0
- package/lib/node/index.js +2 -0
- package/lib/types/types.js +2 -0
- package/package.json +1 -1
- package/src/types/types.ts +2 -0
- package/lib/flow/webby.js +0 -35
- package/src/types/webby.js +0 -33
|
@@ -231,6 +231,8 @@ export const asEdgeTxActionGiftCard = asObject({
|
|
|
231
231
|
actionType: asValue('giftCard'),
|
|
232
232
|
orderId: asString,
|
|
233
233
|
orderUri: asOptional(asString),
|
|
234
|
+
productId: asOptional(asString),
|
|
235
|
+
quoteId: asOptional(asString),
|
|
234
236
|
|
|
235
237
|
provider: asObject({
|
|
236
238
|
providerId: asString,
|
package/lib/flow/types.js
CHANGED
package/lib/node/index.js
CHANGED
|
@@ -4831,6 +4831,8 @@ const asEdgeTxActionGiftCard = cleaners.asObject({
|
|
|
4831
4831
|
actionType: cleaners.asValue('giftCard'),
|
|
4832
4832
|
orderId: cleaners.asString,
|
|
4833
4833
|
orderUri: cleaners.asOptional(cleaners.asString),
|
|
4834
|
+
productId: cleaners.asOptional(cleaners.asString),
|
|
4835
|
+
quoteId: cleaners.asOptional(cleaners.asString),
|
|
4834
4836
|
provider: cleaners.asObject({
|
|
4835
4837
|
providerId: cleaners.asString,
|
|
4836
4838
|
displayName: cleaners.asString,
|
package/lib/types/types.js
CHANGED
package/package.json
CHANGED
package/src/types/types.ts
CHANGED
package/lib/flow/webby.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import { Buffer } from "buffer";
|
|
4
|
-
import http from "http";
|
|
5
|
-
import { createProxyServer } from "http-proxy";
|
|
6
|
-
|
|
7
|
-
const proxy = createProxyServer({});
|
|
8
|
-
|
|
9
|
-
// Rust WebDAV server running on port 3000
|
|
10
|
-
const WEBDAV_TARGET = "http://localhost:3000";
|
|
11
|
-
const OTHER_TARGET = "http://localhost:4000";
|
|
12
|
-
|
|
13
|
-
const AUTH_USER = "william";
|
|
14
|
-
const AUTH_PASS = "hunter2";
|
|
15
|
-
|
|
16
|
-
const mainServer = http.createServer((req, res) => {
|
|
17
|
-
if (isAuthorized(req)) {
|
|
18
|
-
proxy.web(req, res, { target: WEBDAV_TARGET });
|
|
19
|
-
} else {
|
|
20
|
-
proxy.web(req, res, { target: OTHER_TARGET });
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
mainServer.listen(8080, () => {
|
|
25
|
-
console.log("Node proxy running on port 8080");
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
function isAuthorized(req) {
|
|
29
|
-
const authHeader = req.headers.authorization;
|
|
30
|
-
if (!authHeader || !authHeader.startsWith("Basic ")) return false;
|
|
31
|
-
|
|
32
|
-
const encoded = authHeader.slice(6);
|
|
33
|
-
const decoded = Buffer.from(encoded, "base64").toString("utf8");
|
|
34
|
-
return decoded === `${AUTH_USER}:${AUTH_PASS}`;
|
|
35
|
-
}
|
package/src/types/webby.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Buffer } from 'buffer'
|
|
2
|
-
import http from 'http'
|
|
3
|
-
import { createProxyServer } from 'http-proxy'
|
|
4
|
-
|
|
5
|
-
const proxy = createProxyServer({})
|
|
6
|
-
|
|
7
|
-
// Rust WebDAV server running on port 3000
|
|
8
|
-
const WEBDAV_TARGET = 'http://localhost:3000'
|
|
9
|
-
const OTHER_TARGET = 'http://localhost:4000'
|
|
10
|
-
|
|
11
|
-
const AUTH_USER = 'william'
|
|
12
|
-
const AUTH_PASS = 'hunter2'
|
|
13
|
-
|
|
14
|
-
const mainServer = http.createServer((req, res) => {
|
|
15
|
-
if (isAuthorized(req)) {
|
|
16
|
-
proxy.web(req, res, { target: WEBDAV_TARGET })
|
|
17
|
-
} else {
|
|
18
|
-
proxy.web(req, res, { target: OTHER_TARGET })
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
mainServer.listen(8080, () => {
|
|
23
|
-
console.log('Node proxy running on port 8080')
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
function isAuthorized(req) {
|
|
27
|
-
const authHeader = req.headers.authorization
|
|
28
|
-
if (!authHeader || !authHeader.startsWith('Basic ')) return false
|
|
29
|
-
|
|
30
|
-
const encoded = authHeader.slice(6)
|
|
31
|
-
const decoded = Buffer.from(encoded, 'base64').toString('utf8')
|
|
32
|
-
return decoded === `${AUTH_USER}:${AUTH_PASS}`
|
|
33
|
-
}
|