hono-takibi 0.3.3 → 0.3.5
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.
|
@@ -3,8 +3,8 @@ type HonoTakibiPluginOptions = {
|
|
|
3
3
|
output: string;
|
|
4
4
|
packageManager: 'pnpm' | 'npm' | 'yarn' | 'bun';
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
export default function honoTakibiPlugin(options: HonoTakibiPluginOptions): {
|
|
7
7
|
name: string;
|
|
8
8
|
configureServer(server: any): void;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = honoTakibiPlugin;
|
|
3
4
|
const node_child_process_1 = require("node:child_process");
|
|
4
5
|
function honoTakibiPlugin(options) {
|
|
5
6
|
return {
|
|
@@ -9,13 +10,13 @@ function honoTakibiPlugin(options) {
|
|
|
9
10
|
server.watcher.add(options.input);
|
|
10
11
|
server.watcher.on('change', () => {
|
|
11
12
|
const commandPrefixMap = {
|
|
12
|
-
npm: 'npx',
|
|
13
13
|
pnpm: 'pnpm',
|
|
14
|
+
npm: 'npx',
|
|
14
15
|
yarn: 'yarn',
|
|
15
|
-
bun: 'bun',
|
|
16
|
+
bun: 'bun run',
|
|
16
17
|
};
|
|
17
18
|
const commandPrefix = commandPrefixMap[options.packageManager];
|
|
18
|
-
const command = `${commandPrefix} hono-takibi ${options.input} -o ${options.output}
|
|
19
|
+
const command = `${commandPrefix} hono-takibi ${options.input} -o ${options.output}`;
|
|
19
20
|
(0, node_child_process_1.exec)(command, (error) => {
|
|
20
21
|
if (error) {
|
|
21
22
|
console.error(`[hono-takibi-plugin] error: ${error.message}`);
|
|
@@ -28,4 +29,3 @@ function honoTakibiPlugin(options) {
|
|
|
28
29
|
},
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
exports.default = honoTakibiPlugin;
|