@ductape/mcp 0.1.2 → 0.1.3

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/index.js CHANGED
@@ -9,6 +9,7 @@
9
9
  * publishable_key on every tool call. Per-call publishable_key still overrides
10
10
  * the env var when provided.
11
11
  */
12
+ import { createRequire } from 'module';
12
13
  import { z } from 'zod';
13
14
  import { executeViaProxy, generateExecutablePayload, getAssetSchemas, } from './proxy-client.js';
14
15
  const MODULES = [
@@ -805,8 +806,7 @@ async function loadMcpSdk() {
805
806
  function handleCliFlags() {
806
807
  const arg = process.argv[2];
807
808
  if (arg === '--version' || arg === '-v') {
808
- // eslint-disable-next-line @typescript-eslint/no-require-imports
809
- const { version } = require('../package.json');
809
+ const { version } = createRequire(import.meta.url)('../package.json');
810
810
  process.stdout.write(version + '\n');
811
811
  return true;
812
812
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server that exposes Ductape SDK operations via the backend proxy",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  * the env var when provided.
11
11
  */
12
12
 
13
+ import { createRequire } from 'module';
13
14
  import { z } from 'zod';
14
15
  import {
15
16
  executeViaProxy,
@@ -854,8 +855,7 @@ async function loadMcpSdk(): Promise<{
854
855
  function handleCliFlags(): boolean {
855
856
  const arg = process.argv[2];
856
857
  if (arg === '--version' || arg === '-v') {
857
- // eslint-disable-next-line @typescript-eslint/no-require-imports
858
- const { version } = require('../package.json') as { version: string };
858
+ const { version } = createRequire(import.meta.url)('../package.json') as { version: string };
859
859
  process.stdout.write(version + '\n');
860
860
  return true;
861
861
  }