-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21527 from oleiman/xform/sdk/core-5638/js-sr-inte…
…gration-test Transform JS SR integration test
- Loading branch information
Showing
9 changed files
with
698 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
node_modules/**/* | ||
user_code.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as esbuild from 'esbuild' | ||
import { polyfillNode } from "esbuild-plugin-polyfill-node"; | ||
|
||
await esbuild.build({ | ||
entryPoints: ["src/index.ts"], | ||
outfile: "dist/schema_registry_example.js", | ||
bundle: true, | ||
external: [ | ||
// This package is provided by the Redpanda JavaScript runtime. | ||
"@redpanda-data/transform-sdk", | ||
"@redpanda-data/transform-sdk-sr", | ||
], | ||
target: "es2022", | ||
platform: "neutral", // We're running in Wasm | ||
plugins: [ | ||
polyfillNode({ | ||
globals: { | ||
// Allow a global Buffer variable if referenced. | ||
buffer: true, | ||
// Don't inject the process global, the Redpanda JavaScript runtime | ||
// does that. | ||
process: false, | ||
}, | ||
polyfills: { | ||
// Any NodeJS APIs that need to polyfilled can be added here. | ||
}, | ||
}), | ||
], | ||
}); |
Oops, something went wrong.