@unchainedshop/admin-ui 3.0.15 → 3.0.16
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 +1 -2
- package/dist/fastify.d.ts +2 -2
- package/dist/fastify.js +1 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- 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,8 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
const expressRouter = express.Router();
|
|
3
|
+
export const expressRouter = express.Router();
|
|
4
4
|
const staticPath = path.join(__dirname, '..', 'out');
|
|
5
5
|
expressRouter.use(express.static(staticPath));
|
|
6
6
|
expressRouter.get(/(.*)/, (_, res) => {
|
|
7
7
|
res.sendFile(path.join(staticPath, 'index.html'));
|
|
8
8
|
});
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import fastifyStatic from '@fastify/static';
|
|
3
3
|
const staticPath = path.join(__dirname, '..', 'out');
|
|
4
|
-
const fastifyRouter = async (fastify, opts) => {
|
|
4
|
+
export const fastifyRouter = async (fastify, opts) => {
|
|
5
5
|
fastify.register(fastifyStatic, {
|
|
6
6
|
root: staticPath,
|
|
7
7
|
prefix: opts.prefix || '/',
|
|
@@ -15,4 +15,3 @@ const fastifyRouter = async (fastify, opts) => {
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
export default 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,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 };
|