@blocklet/sdk 1.16.29-beta-cbfd116d → 1.16.29-beta-8671c2cf

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.
@@ -6,6 +6,7 @@ const fs_1 = require("fs");
6
6
  const path_1 = require("path");
7
7
  const ufo_1 = require("ufo");
8
8
  const escape_1 = __importDefault(require("lodash/escape"));
9
+ const constant_1 = require("@blocklet/constant");
9
10
  const config_1 = require("../config");
10
11
  const fallback = (file, options = {}) => {
11
12
  const filePath = options.root ? (0, path_1.join)(options.root, file) : file;
@@ -13,9 +14,8 @@ const fallback = (file, options = {}) => {
13
14
  throw new Error(`Fallback file not found at: ${filePath}`);
14
15
  }
15
16
  const sourceRaw = (0, fs_1.readFileSync)(filePath).toString();
16
- const resourcePattern = /\.(js|css|jpg|jpeg|png|gif|webp|avif|svg|woff|woff2|ico|mp4|mp3|webm)$/i;
17
17
  return async (req, res, next) => {
18
- if ((req.method === 'GET' || req.method === 'HEAD') && req.accepts('html') && !resourcePattern.test(req.path)) {
18
+ if ((req.method === 'GET' || req.method === 'HEAD') && req.accepts('html') && !constant_1.RESOURCE_PATTERN.test(req.path)) {
19
19
  res.type('html');
20
20
  const pageGroup = req.headers['x-page-group'] || '';
21
21
  const pathPrefix = req.headers['x-path-prefix'] || '';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.29-beta-cbfd116d",
6
+ "version": "1.16.29-beta-8671c2cf",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
@@ -27,15 +27,15 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/client": "1.16.29-beta-cbfd116d",
31
- "@abtnode/constant": "1.16.29-beta-cbfd116d",
30
+ "@abtnode/client": "1.16.29-beta-8671c2cf",
31
+ "@abtnode/constant": "1.16.29-beta-8671c2cf",
32
32
  "@arcblock/did": "1.18.126",
33
33
  "@arcblock/did-auth": "1.18.126",
34
34
  "@arcblock/jwt": "1.18.126",
35
35
  "@arcblock/ws": "1.18.126",
36
- "@blocklet/constant": "1.16.29-beta-cbfd116d",
37
- "@blocklet/env": "1.16.29-beta-cbfd116d",
38
- "@blocklet/meta": "1.16.29-beta-cbfd116d",
36
+ "@blocklet/constant": "1.16.29-beta-8671c2cf",
37
+ "@blocklet/env": "1.16.29-beta-8671c2cf",
38
+ "@blocklet/meta": "1.16.29-beta-8671c2cf",
39
39
  "@did-connect/authenticator": "^2.2.4",
40
40
  "@did-connect/handler": "^2.2.4",
41
41
  "@nedb/core": "^2.1.5",
@@ -75,5 +75,5 @@
75
75
  "ts-node": "^10.9.1",
76
76
  "typescript": "^5.0.4"
77
77
  },
78
- "gitHead": "e9bdb7af77f2d126e40195c67972b07fe683adf9"
78
+ "gitHead": "67207cc32f2cdf4ab8af39d4083ad61fba9711e2"
79
79
  }