vite-plugin-backend-html 0.0.1 → 0.2.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/dist/index.mjs +2 -8
- package/package.json +18 -23
package/dist/index.mjs
CHANGED
|
@@ -60,7 +60,6 @@ const normalizeRedirectLocation = (location, basePath) => {
|
|
|
60
60
|
if (normalized.startsWith(basePath)) normalized = normalized.slice(basePath.length);
|
|
61
61
|
return ensureLeadingSlash(normalized);
|
|
62
62
|
};
|
|
63
|
-
|
|
64
63
|
//#endregion
|
|
65
64
|
//#region src/backend-proxy.ts
|
|
66
65
|
/**
|
|
@@ -197,10 +196,7 @@ var BackendProxy = class {
|
|
|
197
196
|
res.setHeader("location", result.location);
|
|
198
197
|
res.end();
|
|
199
198
|
return true;
|
|
200
|
-
default: {
|
|
201
|
-
const _exhaustive = result;
|
|
202
|
-
throw new Error(`Unhandled result type: ${JSON.stringify(_exhaustive)}`);
|
|
203
|
-
}
|
|
199
|
+
default: throw new Error(`Unhandled result type: ${JSON.stringify(result)}`);
|
|
204
200
|
}
|
|
205
201
|
}
|
|
206
202
|
/**
|
|
@@ -336,7 +332,6 @@ function nowUtcCompact() {
|
|
|
336
332
|
const now = /* @__PURE__ */ new Date();
|
|
337
333
|
return `${now.getUTCHours().toString().padStart(2, "0")}:${now.getUTCMinutes().toString().padStart(2, "0")}:${now.getUTCSeconds().toString().padStart(2, "0")}.${now.getUTCMilliseconds().toString().padStart(3, "0")}`;
|
|
338
334
|
}
|
|
339
|
-
|
|
340
335
|
//#endregion
|
|
341
336
|
//#region src/index.ts
|
|
342
337
|
/**
|
|
@@ -363,6 +358,5 @@ function backendProxyPlugin(config) {
|
|
|
363
358
|
}
|
|
364
359
|
};
|
|
365
360
|
}
|
|
366
|
-
|
|
367
361
|
//#endregion
|
|
368
|
-
export { backendProxyPlugin, createFetchBackendHandler, ensureLeadingSlash, extractModuleFromMeta, extractModuleFromUrl, joinUrlParts, normalizeRedirectLocation, stripLeadingSlash, stripTrailingSlash };
|
|
362
|
+
export { backendProxyPlugin, createFetchBackendHandler, ensureLeadingSlash, extractModuleFromMeta, extractModuleFromUrl, joinUrlParts, normalizeRedirectLocation, stripLeadingSlash, stripTrailingSlash };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-backend-html",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Dieter Oberkofler",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"dev": "tsdown --watch",
|
|
19
19
|
"build": "tsdown",
|
|
20
|
-
"lint": "
|
|
20
|
+
"lint": "prettier --check . && oxlint --type-aware --type-check && tsc",
|
|
21
21
|
"test": "vitest run --coverage",
|
|
22
22
|
"ci": "npm run lint && npm run build && npm run test",
|
|
23
23
|
"create-changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
|
@@ -39,33 +39,28 @@
|
|
|
39
39
|
"url": "git://github.com/doberkofler/vite-plugin-merge-css.git"
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/doberkofler/vite-plugin-merge-css#readme",
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"vite": "^7.0.0"
|
|
44
|
-
},
|
|
45
42
|
"devDependencies": {
|
|
46
|
-
"@commitlint/cli": "^20.
|
|
47
|
-
"@commitlint/config-conventional": "^20.
|
|
48
|
-
"@eslint/js": "^9.31.0",
|
|
43
|
+
"@commitlint/cli": "^20.5.0",
|
|
44
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
49
45
|
"@types/debug": "^4.1.12",
|
|
50
|
-
"@types/node": "^25.
|
|
51
|
-
"@vitest/coverage-v8": "^4.0
|
|
52
|
-
"
|
|
53
|
-
"conventional-changelog": "^
|
|
54
|
-
"
|
|
55
|
-
"conventional-changelog-cli": "^5.0.0",
|
|
56
|
-
"eslint": "^9.31.0",
|
|
57
|
-
"eslint-plugin-jsdoc": "^62.6.1",
|
|
58
|
-
"eslint-plugin-regexp": "^3.0.0",
|
|
59
|
-
"eslint-plugin-unicorn": "^63.0.0",
|
|
60
|
-
"globals": "^17.3.0",
|
|
46
|
+
"@types/node": "^25.5.0",
|
|
47
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
48
|
+
"conventional-changelog": "^7.2.0",
|
|
49
|
+
"conventional-changelog-angular": "^8.3.1",
|
|
50
|
+
"eslint-plugin-regexp": "3.1.0",
|
|
61
51
|
"husky": "^9.1.7",
|
|
52
|
+
"oxlint": "^1.56.0",
|
|
53
|
+
"oxlint-tsgolint": "^0.20.0",
|
|
62
54
|
"prettier": "^3.8.1",
|
|
63
|
-
"tsdown": "^0.
|
|
64
|
-
"typescript": "^
|
|
65
|
-
"
|
|
66
|
-
"vitest": "^4.0
|
|
55
|
+
"tsdown": "^0.21.4",
|
|
56
|
+
"typescript": "^6.0.2",
|
|
57
|
+
"vite": "^7.0.0 || ^8.0.0",
|
|
58
|
+
"vitest": "^4.1.0"
|
|
67
59
|
},
|
|
68
60
|
"dependencies": {
|
|
69
61
|
"debug": "^4.4.3"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"vite": "^7.0.0 || ^8.0.0"
|
|
70
65
|
}
|
|
71
66
|
}
|