@joystick.js/node-canary 0.0.0-canary.36 → 0.0.0-canary.38

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.
@@ -9,6 +9,7 @@ import replaceFileProtocol from "../../lib/replaceFileProtocol.js";
9
9
  import replaceBackslashesWithForwardSlashes from "../../lib/replaceBackslashesWithForwardSlashes.js";
10
10
  import getBuildPath from "../../lib/getBuildPath.js";
11
11
  import escapeHTML from "../../lib/escapeHTML.js";
12
+ import escapeKeyValuePair from "../../lib/escapeKeyValuePair.js";
12
13
  const generateHash = (input = "") => {
13
14
  return crypto.createHash("sha256").update(input).digest("hex");
14
15
  };
@@ -66,8 +67,8 @@ const getCachedHTML = ({ cachePath, cacheFileName, currentDiff }) => {
66
67
  const getUrl = (request = {}) => {
67
68
  const [path = null] = request.url?.split("?");
68
69
  return {
69
- params: escapeHTML(request.params),
70
- query: escapeHTML(request.query),
70
+ params: escapeKeyValuePair(request.params),
71
+ query: escapeKeyValuePair(request.query),
71
72
  route: escapeHTML(request.route.path),
72
73
  path: escapeHTML(path)
73
74
  };
@@ -1,4 +1,3 @@
1
- import escapeHTML from "../../lib/escapeHTML.js";
2
1
  import escapeKeyValuePair from "../../lib/escapeKeyValuePair.js";
3
2
  var sanitizeRequestParameters_default = (req, res, next) => {
4
3
  req.params = escapeKeyValuePair(req.params);
@@ -16,6 +16,9 @@ var registerGetters_default = (express, getters = [], context = {}, APIOptions =
16
16
  if (!isValidSession) {
17
17
  return;
18
18
  }
19
+ console.log({
20
+ query: req?.query
21
+ });
19
22
  const getterContext = await getAPIContext({ req, res }, context);
20
23
  const input = req?.query?.input ? JSON.parse(req?.query?.input) : null;
21
24
  const output = req?.query?.output ? JSON.parse(req?.query?.output) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/node-canary",
3
- "version": "0.0.0-canary.36",
3
+ "version": "0.0.0-canary.38",
4
4
  "type": "module",
5
5
  "description": "A Node.js framework for building web apps.",
6
6
  "main": "./dist/index.js",