@vornrun/connector-sdk 0.7.1-beta.6 → 0.7.2

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.
@@ -1311,14 +1311,22 @@ async function esbuildBundle(request) {
1311
1311
  write: false,
1312
1312
  metafile: true,
1313
1313
  legalComments: "none",
1314
- // A bundled CommonJS dependency asks for its builtins through esbuild's shim, which throws unless a real require is in scope.
1314
+ // A bundled CommonJS dependency asks for its builtins through esbuild's shim, which throws unless a real require is in scope,
1315
+ // and may read __dirname or __filename, which ESM does not define. Uniquely named consts rather than __dirname itself, so
1316
+ // nothing collides with a module that declares its own; `define` rewrites only the free references. They name the bundle's
1317
+ // directory, so a dependency reading its own package.json there finds nothing — the ones we ship guard for that.
1315
1318
  banner: {
1316
1319
  js: [
1317
1320
  "import { createRequire as __vornCreateRequire } from 'node:module'",
1321
+ "import { fileURLToPath as __vornFileURLToPath } from 'node:url'",
1322
+ "import { dirname as __vornDirname } from 'node:path'",
1318
1323
  "const require = __vornCreateRequire(import.meta.url)",
1324
+ "const __vorn_filename = __vornFileURLToPath(import.meta.url)",
1325
+ "const __vorn_dirname = __vornDirname(__vorn_filename)",
1319
1326
  ""
1320
1327
  ].join("\n")
1321
- }
1328
+ },
1329
+ define: { __dirname: "__vorn_dirname", __filename: "__vorn_filename" }
1322
1330
  });
1323
1331
  const output = Object.values(result.metafile.outputs)[0];
1324
1332
  return {
@@ -3357,7 +3365,7 @@ function scaffoldFiles(options) {
3357
3365
  }
3358
3366
 
3359
3367
  // src/server.ts
3360
- var SDK_VERSION = true ? "0.7.1-beta.6" : "0.0.0-source";
3368
+ var SDK_VERSION = true ? "0.7.2" : "0.0.0-source";
3361
3369
  var InvalidParams = class extends Error {
3362
3370
  };
3363
3371
  function text(params, key) {
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  runPoll,
11
11
  scaffoldFiles,
12
12
  serveConnector
13
- } from "./chunk-WK5JBVNP.js";
13
+ } from "./chunk-R2WUY4C2.js";
14
14
 
15
15
  // src/cli.ts
16
16
  import { fileURLToPath, pathToFileURL } from "url";
package/dist/index.js CHANGED
@@ -67,7 +67,7 @@ import {
67
67
  valueAt,
68
68
  withMockHttp,
69
69
  withinOrigins
70
- } from "./chunk-WK5JBVNP.js";
70
+ } from "./chunk-R2WUY4C2.js";
71
71
  export {
72
72
  ActionArgumentError,
73
73
  BROWSER_HOST_ENV,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vornrun/connector-sdk",
3
- "version": "0.7.1-beta.6",
3
+ "version": "0.7.2",
4
4
  "description": "Build and share Vorn pull connectors as ordinary npm packages",
5
5
  "type": "module",
6
6
  "license": "MIT",