@valbuild/server 0.49.0 → 0.50.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.
@@ -320,7 +320,6 @@ const printer = ts__default["default"].createPrinter({
|
|
320
320
|
newLine: newLine
|
321
321
|
// neverAsciiEscape: true,
|
322
322
|
});
|
323
|
-
|
324
323
|
function replaceNodeValue(document, node, value) {
|
325
324
|
const replacementText = printer.printNode(ts__default["default"].EmitHint.Unspecified, toExpression(value), document);
|
326
325
|
const span = ts__default["default"].createTextSpanFromBounds(node.getStart(document, false), node.end);
|
@@ -663,7 +662,6 @@ const patchValFile = async (id, valConfigPath, patch$1, sourceFileHandler, runti
|
|
663
662
|
sourceFileHandler.writeSourceFile(newSourceFile.value);
|
664
663
|
// console.timeEnd("patchValFile" + timeId);
|
665
664
|
};
|
666
|
-
|
667
665
|
function convertDataUrlToBase64(dataUrl) {
|
668
666
|
const base64 = dataUrl.slice(dataUrl.indexOf(",") + 1);
|
669
667
|
return Buffer.from(base64, "base64");
|
@@ -888,7 +886,6 @@ class ValModuleLoader {
|
|
888
886
|
}
|
889
887
|
}
|
890
888
|
}
|
891
|
-
|
892
889
|
return compiledCode;
|
893
890
|
}
|
894
891
|
resolveModulePath(containingFilePath, requestedModuleName) {
|
@@ -1218,7 +1215,7 @@ class LocalValServer {
|
|
1218
1215
|
if (treePath && !path__namespace["default"].join(dir, file).replace(rootDir, "").startsWith(treePath)) {
|
1219
1216
|
continue;
|
1220
1217
|
}
|
1221
|
-
moduleIds.push(path__namespace["default"].join(dir, file).replace(rootDir, "").replace(".val.js", "").replace(".val.ts", ""));
|
1218
|
+
moduleIds.push(path__namespace["default"].join(dir, file).replace(rootDir, "").replace(".val.js", "").replace(".val.ts", "").split(path__namespace["default"].sep).join("/"));
|
1222
1219
|
}
|
1223
1220
|
}
|
1224
1221
|
};
|
@@ -1308,7 +1305,6 @@ class LocalValServer {
|
|
1308
1305
|
json: {} // no patch ids created
|
1309
1306
|
};
|
1310
1307
|
}
|
1311
|
-
|
1312
1308
|
badRequest() {
|
1313
1309
|
return {
|
1314
1310
|
status: 400,
|
@@ -1382,7 +1378,6 @@ function decodeJwt(token, secretKey) {
|
|
1382
1378
|
function getExpire() {
|
1383
1379
|
return Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 4; // 4 days
|
1384
1380
|
}
|
1385
|
-
|
1386
1381
|
const JwtHeaderSchema = z.z.object({
|
1387
1382
|
alg: z.z.literal("HS256"),
|
1388
1383
|
typ: z.z.literal("JWT")
|
@@ -1468,7 +1463,6 @@ class ProxyValServer {
|
|
1468
1463
|
}
|
1469
1464
|
}
|
1470
1465
|
},
|
1471
|
-
|
1472
1466
|
status: 302,
|
1473
1467
|
redirectTo: appAuthorizeUrl
|
1474
1468
|
};
|
@@ -1554,7 +1548,6 @@ class ProxyValServer {
|
|
1554
1548
|
}
|
1555
1549
|
}
|
1556
1550
|
},
|
1557
|
-
|
1558
1551
|
redirectTo: callbackReqSuccess.redirect_uri || "/"
|
1559
1552
|
};
|
1560
1553
|
}
|
@@ -320,7 +320,6 @@ const printer = ts__default["default"].createPrinter({
|
|
320
320
|
newLine: newLine
|
321
321
|
// neverAsciiEscape: true,
|
322
322
|
});
|
323
|
-
|
324
323
|
function replaceNodeValue(document, node, value) {
|
325
324
|
const replacementText = printer.printNode(ts__default["default"].EmitHint.Unspecified, toExpression(value), document);
|
326
325
|
const span = ts__default["default"].createTextSpanFromBounds(node.getStart(document, false), node.end);
|
@@ -663,7 +662,6 @@ const patchValFile = async (id, valConfigPath, patch$1, sourceFileHandler, runti
|
|
663
662
|
sourceFileHandler.writeSourceFile(newSourceFile.value);
|
664
663
|
// console.timeEnd("patchValFile" + timeId);
|
665
664
|
};
|
666
|
-
|
667
665
|
function convertDataUrlToBase64(dataUrl) {
|
668
666
|
const base64 = dataUrl.slice(dataUrl.indexOf(",") + 1);
|
669
667
|
return Buffer.from(base64, "base64");
|
@@ -888,7 +886,6 @@ class ValModuleLoader {
|
|
888
886
|
}
|
889
887
|
}
|
890
888
|
}
|
891
|
-
|
892
889
|
return compiledCode;
|
893
890
|
}
|
894
891
|
resolveModulePath(containingFilePath, requestedModuleName) {
|
@@ -1218,7 +1215,7 @@ class LocalValServer {
|
|
1218
1215
|
if (treePath && !path__namespace["default"].join(dir, file).replace(rootDir, "").startsWith(treePath)) {
|
1219
1216
|
continue;
|
1220
1217
|
}
|
1221
|
-
moduleIds.push(path__namespace["default"].join(dir, file).replace(rootDir, "").replace(".val.js", "").replace(".val.ts", ""));
|
1218
|
+
moduleIds.push(path__namespace["default"].join(dir, file).replace(rootDir, "").replace(".val.js", "").replace(".val.ts", "").split(path__namespace["default"].sep).join("/"));
|
1222
1219
|
}
|
1223
1220
|
}
|
1224
1221
|
};
|
@@ -1308,7 +1305,6 @@ class LocalValServer {
|
|
1308
1305
|
json: {} // no patch ids created
|
1309
1306
|
};
|
1310
1307
|
}
|
1311
|
-
|
1312
1308
|
badRequest() {
|
1313
1309
|
return {
|
1314
1310
|
status: 400,
|
@@ -1382,7 +1378,6 @@ function decodeJwt(token, secretKey) {
|
|
1382
1378
|
function getExpire() {
|
1383
1379
|
return Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 4; // 4 days
|
1384
1380
|
}
|
1385
|
-
|
1386
1381
|
const JwtHeaderSchema = z.z.object({
|
1387
1382
|
alg: z.z.literal("HS256"),
|
1388
1383
|
typ: z.z.literal("JWT")
|
@@ -1468,7 +1463,6 @@ class ProxyValServer {
|
|
1468
1463
|
}
|
1469
1464
|
}
|
1470
1465
|
},
|
1471
|
-
|
1472
1466
|
status: 302,
|
1473
1467
|
redirectTo: appAuthorizeUrl
|
1474
1468
|
};
|
@@ -1554,7 +1548,6 @@ class ProxyValServer {
|
|
1554
1548
|
}
|
1555
1549
|
}
|
1556
1550
|
},
|
1557
|
-
|
1558
1551
|
redirectTo: callbackReqSuccess.redirect_uri || "/"
|
1559
1552
|
};
|
1560
1553
|
}
|
@@ -290,7 +290,6 @@ const printer = ts.createPrinter({
|
|
290
290
|
newLine: newLine
|
291
291
|
// neverAsciiEscape: true,
|
292
292
|
});
|
293
|
-
|
294
293
|
function replaceNodeValue(document, node, value) {
|
295
294
|
const replacementText = printer.printNode(ts.EmitHint.Unspecified, toExpression(value), document);
|
296
295
|
const span = ts.createTextSpanFromBounds(node.getStart(document, false), node.end);
|
@@ -633,7 +632,6 @@ const patchValFile = async (id, valConfigPath, patch, sourceFileHandler, runtime
|
|
633
632
|
sourceFileHandler.writeSourceFile(newSourceFile.value);
|
634
633
|
// console.timeEnd("patchValFile" + timeId);
|
635
634
|
};
|
636
|
-
|
637
635
|
function convertDataUrlToBase64(dataUrl) {
|
638
636
|
const base64 = dataUrl.slice(dataUrl.indexOf(",") + 1);
|
639
637
|
return Buffer.from(base64, "base64");
|
@@ -858,7 +856,6 @@ class ValModuleLoader {
|
|
858
856
|
}
|
859
857
|
}
|
860
858
|
}
|
861
|
-
|
862
859
|
return compiledCode;
|
863
860
|
}
|
864
861
|
resolveModulePath(containingFilePath, requestedModuleName) {
|
@@ -1188,7 +1185,7 @@ class LocalValServer {
|
|
1188
1185
|
if (treePath && !path__default.join(dir, file).replace(rootDir, "").startsWith(treePath)) {
|
1189
1186
|
continue;
|
1190
1187
|
}
|
1191
|
-
moduleIds.push(path__default.join(dir, file).replace(rootDir, "").replace(".val.js", "").replace(".val.ts", ""));
|
1188
|
+
moduleIds.push(path__default.join(dir, file).replace(rootDir, "").replace(".val.js", "").replace(".val.ts", "").split(path__default.sep).join("/"));
|
1192
1189
|
}
|
1193
1190
|
}
|
1194
1191
|
};
|
@@ -1278,7 +1275,6 @@ class LocalValServer {
|
|
1278
1275
|
json: {} // no patch ids created
|
1279
1276
|
};
|
1280
1277
|
}
|
1281
|
-
|
1282
1278
|
badRequest() {
|
1283
1279
|
return {
|
1284
1280
|
status: 400,
|
@@ -1352,7 +1348,6 @@ function decodeJwt(token, secretKey) {
|
|
1352
1348
|
function getExpire() {
|
1353
1349
|
return Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 4; // 4 days
|
1354
1350
|
}
|
1355
|
-
|
1356
1351
|
const JwtHeaderSchema = z$1.object({
|
1357
1352
|
alg: z$1.literal("HS256"),
|
1358
1353
|
typ: z$1.literal("JWT")
|
@@ -1438,7 +1433,6 @@ class ProxyValServer {
|
|
1438
1433
|
}
|
1439
1434
|
}
|
1440
1435
|
},
|
1441
|
-
|
1442
1436
|
status: 302,
|
1443
1437
|
redirectTo: appAuthorizeUrl
|
1444
1438
|
};
|
@@ -1524,7 +1518,6 @@ class ProxyValServer {
|
|
1524
1518
|
}
|
1525
1519
|
}
|
1526
1520
|
},
|
1527
|
-
|
1528
1521
|
redirectTo: callbackReqSuccess.redirect_uri || "/"
|
1529
1522
|
};
|
1530
1523
|
}
|
package/package.json
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
"./package.json": "./package.json"
|
13
13
|
},
|
14
14
|
"types": "dist/valbuild-server.cjs.d.ts",
|
15
|
-
"version": "0.
|
15
|
+
"version": "0.50.0",
|
16
16
|
"scripts": {
|
17
17
|
"typecheck": "tsc --noEmit",
|
18
18
|
"test": "jest",
|
@@ -24,9 +24,9 @@
|
|
24
24
|
"concurrently": "^7.6.0"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@valbuild/core": "~0.
|
28
|
-
"@valbuild/shared": "~0.
|
29
|
-
"@valbuild/ui": "~0.
|
27
|
+
"@valbuild/core": "~0.50.0",
|
28
|
+
"@valbuild/shared": "~0.50.0",
|
29
|
+
"@valbuild/ui": "~0.50.0",
|
30
30
|
"express": "^4.18.2",
|
31
31
|
"image-size": "^1.0.2",
|
32
32
|
"queue": "^6.0.2",
|