Skip to content

Commit cd36ead

Browse files
authored
Merge pull request #1753 from Niraj-Kamdar/nk/fix-py-bind
fix: python plugin schema-bind
2 parents 1a46cb7 + f410b02 commit cd36ead

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

packages/cli/src/__tests__/e2e/build-rs.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { GetPathToCliTestFiles } from "@polywrap/test-cases";
44
import fs from "fs";
55
import path from "path";
66

7-
jest.setTimeout(1200000);
7+
jest.setTimeout(1500000);
88

99
describe("e2e tests for build command", () => {
1010
const testCaseRoot = path.join(GetPathToCliTestFiles(), "build-cmd/wasm/rust");

packages/cli/src/__tests__/e2e/p1/create.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Commands:
2020
app [options] <language> <name> Create a Polywrap application. langs:
2121
typescript
2222
plugin [options] <language> <name> Create a Polywrap plugin. langs:
23-
typescript
23+
typescript, rust, python
2424
template [options] <url> <name> Download template from a URL. formats:
2525
.git
2626
help [command] display help for command

packages/schema/bind/src/bindings/python/plugin/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export const generateBinding: GenerateBindingFn = (
4242
): BindOutput => {
4343
const escapedAbi = JSON.stringify(
4444
sort((options.abi as unknown) as Record<string, unknown>)
45-
).replace(/\n/g, "\\n");
45+
).replace(/\\n/g, "\\\\n");
46+
4647
const formattedAbi = JSON.stringify(JSON.parse(escapedAbi), null, 2);
4748

4849
// Apply Abi transforms

0 commit comments

Comments
 (0)