@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 +2 -2
- package/package.json +1 -1
- package/src/index.ts +2 -2
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
|
-
|
|
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
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
|
-
|
|
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
|
}
|