@adeu/mcp-server 1.8.0 → 1.10.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/tsup.config.ts CHANGED
@@ -1,26 +1,50 @@
1
- import { defineConfig } from 'tsup';
1
+ // FILE: node/packages/mcp-server/tsup.config.ts
2
+ import { defineConfig } from "tsup";
3
+ import { cpSync, existsSync } from "node:fs";
4
+ import { join } from "node:path";
5
+
6
+ function copyAssets(outDir: string) {
7
+ if (existsSync("src/templates")) {
8
+ cpSync("src/templates", join(outDir, "templates"), {
9
+ recursive: true,
10
+ force: true,
11
+ });
12
+ }
13
+ if (existsSync("src/assets")) {
14
+ cpSync("src/assets", join(outDir, "assets"), {
15
+ recursive: true,
16
+ force: true,
17
+ });
18
+ }
19
+ }
2
20
 
3
21
  export default defineConfig([
4
22
  {
5
- entry: ['src/index.ts'],
6
- format: ['esm'],
23
+ entry: ["src/index.ts"],
24
+ format: ["esm"],
7
25
  dts: true,
8
26
  sourcemap: true,
9
27
  clean: true,
10
- outDir: 'dist',
28
+ outDir: "dist",
11
29
  banner: {
12
- js: '#!/usr/bin/env node',
30
+ js: "#!/usr/bin/env node",
31
+ },
32
+ onSuccess: async () => {
33
+ copyAssets("dist");
13
34
  },
14
35
  },
15
36
  {
16
- entry: ['src/index.ts'],
17
- format: ['esm'],
18
- outExtension: () => ({ js: '.js' }),
37
+ entry: ["src/index.ts"],
38
+ format: ["esm"],
39
+ outExtension: () => ({ js: ".js" }),
19
40
  noExternal: [/(.*)/], // Bundle all NPM dependencies
20
41
  external: [/^node:/], // Leave Node.js native built-ins external
21
- outDir: '../../../desktop-extension',
42
+ outDir: "../../../desktop-extension",
22
43
  dts: false,
23
44
  sourcemap: false,
24
45
  clean: false, // Don't clean the whole dir (preserves icon and manifest)
25
- }
26
- ]);
46
+ onSuccess: async () => {
47
+ copyAssets("../../../desktop-extension");
48
+ },
49
+ },
50
+ ]);