wurzel 0.0.18 → 0.0.19
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/bin/wurzel.js +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +2 -2
- package/dist/samples/express/main.js +2 -2
- package/package.json +1 -1
package/dist/bin/wurzel.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import express from "express";
|
|
4
|
-
import {
|
|
4
|
+
import { wurzelExpressRouter } from "../lib/index.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
|
|
7
7
|
const app = express();
|
|
8
8
|
|
|
9
9
|
const rootFolder = path.resolve(".");
|
|
10
10
|
|
|
11
|
-
app.use("/",
|
|
11
|
+
app.use("/", wurzelExpressRouter({ express, baseFolder: rootFolder }));
|
|
12
12
|
|
|
13
13
|
const port = 8080;
|
|
14
14
|
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const defaultResolveImportPath: TResolveImportPathFunc;
|
|
|
6
6
|
declare const defaultDetermineFileTypeByPath: ({ filePath }: {
|
|
7
7
|
filePath: string;
|
|
8
8
|
}) => TFileType;
|
|
9
|
-
declare const
|
|
9
|
+
declare const wurzelExpressRouter: ({ express, baseFolder, maxAnalyzeCacheSize, maxTranspileCacheSize, analyzeCode: providedAnalyzeCode, determineFileTypeByPath, resolveImportPath }: {
|
|
10
10
|
express: typeof Express;
|
|
11
11
|
baseFolder: string;
|
|
12
12
|
maxAnalyzeCacheSize?: number;
|
|
@@ -17,5 +17,5 @@ declare const expressRouter: ({ express, baseFolder, maxAnalyzeCacheSize, maxTra
|
|
|
17
17
|
}) => TFileType;
|
|
18
18
|
resolveImportPath?: TResolveImportPathFunc;
|
|
19
19
|
}) => any;
|
|
20
|
-
export {
|
|
20
|
+
export { wurzelExpressRouter, defaultResolveImportPath, defaultDetermineFileTypeByPath, defaultCodeAnalyzer, };
|
|
21
21
|
export type { TResolveImportPathFunc, TFileType };
|
package/dist/lib/index.js
CHANGED
|
@@ -114,7 +114,7 @@ const defaultDetermineFileTypeByPath = ({ filePath }/*: { filePath: string }*/)/
|
|
|
114
114
|
return "other";
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
-
const
|
|
117
|
+
const wurzelExpressRouter = ({
|
|
118
118
|
express,
|
|
119
119
|
baseFolder,
|
|
120
120
|
|
|
@@ -355,7 +355,7 @@ const expressRouter = ({
|
|
|
355
355
|
};
|
|
356
356
|
|
|
357
357
|
export {
|
|
358
|
-
|
|
358
|
+
wurzelExpressRouter,
|
|
359
359
|
|
|
360
360
|
defaultResolveImportPath,
|
|
361
361
|
defaultDetermineFileTypeByPath,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
wurzelExpressRouter,
|
|
3
3
|
defaultResolveImportPath,
|
|
4
4
|
/*type TResolveImportPathFunc
|
|
5
5
|
*/} from "../../lib/index.js";
|
|
@@ -27,7 +27,7 @@ const resolveImportPath/*: TResolveImportPathFunc*/ = async ({ importer, specifi
|
|
|
27
27
|
|
|
28
28
|
const app = express();
|
|
29
29
|
|
|
30
|
-
app.use("/",
|
|
30
|
+
app.use("/", wurzelExpressRouter({
|
|
31
31
|
express,
|
|
32
32
|
baseFolder,
|
|
33
33
|
resolveImportPath
|
package/package.json
CHANGED