@unchainedshop/admin-ui 3.0.15 → 3.0.17
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/express.d.ts +1 -2
- package/dist/express.js +13 -8
- package/dist/fastify.d.ts +2 -2
- package/dist/fastify.js +11 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -3
- package/package.json +1 -1
package/dist/express.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const expressRouter: import("express-serve-static-core").Router;
|
|
2
|
-
export default expressRouter;
|
|
1
|
+
export declare const expressRouter: import("express-serve-static-core").Router;
|
package/dist/express.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
expressRouter
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.expressRouter = void 0;
|
|
7
|
+
const express_1 = __importDefault(require("express"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
exports.expressRouter = express_1.default.Router();
|
|
10
|
+
const staticPath = path_1.default.join(__dirname, '..', 'out');
|
|
11
|
+
exports.expressRouter.use(express_1.default.static(staticPath));
|
|
12
|
+
exports.expressRouter.get(/(.*)/, (_, res) => {
|
|
13
|
+
res.sendFile(path_1.default.join(staticPath, 'index.html'));
|
|
8
14
|
});
|
|
9
|
-
export default expressRouter;
|
package/dist/fastify.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { FastifyPluginAsync } from 'fastify';
|
|
|
2
2
|
interface FastifyRouterOptions {
|
|
3
3
|
prefix?: string;
|
|
4
4
|
}
|
|
5
|
-
declare const fastifyRouter: FastifyPluginAsync<FastifyRouterOptions>;
|
|
6
|
-
export
|
|
5
|
+
export declare const fastifyRouter: FastifyPluginAsync<FastifyRouterOptions>;
|
|
6
|
+
export {};
|
package/dist/fastify.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.fastifyRouter = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const static_1 = __importDefault(require("@fastify/static"));
|
|
9
|
+
const staticPath = path_1.default.join(__dirname, '..', 'out');
|
|
4
10
|
const fastifyRouter = async (fastify, opts) => {
|
|
5
|
-
fastify.register(
|
|
11
|
+
fastify.register(static_1.default, {
|
|
6
12
|
root: staticPath,
|
|
7
13
|
prefix: opts.prefix || '/',
|
|
8
14
|
});
|
|
@@ -15,4 +21,4 @@ const fastifyRouter = async (fastify, opts) => {
|
|
|
15
21
|
}
|
|
16
22
|
});
|
|
17
23
|
};
|
|
18
|
-
|
|
24
|
+
exports.fastifyRouter = fastifyRouter;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import fastifyRouter from './fastify';
|
|
2
|
-
import expressRouter from './express';
|
|
1
|
+
import { fastifyRouter } from './fastify';
|
|
2
|
+
import { expressRouter } from './express';
|
|
3
3
|
export { fastifyRouter, expressRouter };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expressRouter = exports.fastifyRouter = void 0;
|
|
4
|
+
const fastify_1 = require("./fastify");
|
|
5
|
+
Object.defineProperty(exports, "fastifyRouter", { enumerable: true, get: function () { return fastify_1.fastifyRouter; } });
|
|
6
|
+
const express_1 = require("./express");
|
|
7
|
+
Object.defineProperty(exports, "expressRouter", { enumerable: true, get: function () { return express_1.expressRouter; } });
|