Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: python plugin schema-bind #1753

Merged
merged 3 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/src/__tests__/e2e/build-rs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { GetPathToCliTestFiles } from "@polywrap/test-cases";
import fs from "fs";
import path from "path";

jest.setTimeout(1200000);
jest.setTimeout(1500000);

describe("e2e tests for build command", () => {
const testCaseRoot = path.join(GetPathToCliTestFiles(), "build-cmd/wasm/rust");
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/__tests__/e2e/p1/create.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Commands:
app [options] <language> <name> Create a Polywrap application. langs:
typescript
plugin [options] <language> <name> Create a Polywrap plugin. langs:
typescript
typescript, rust, python
template [options] <url> <name> Download template from a URL. formats:
.git
help [command] display help for command
Expand Down
3 changes: 2 additions & 1 deletion packages/schema/bind/src/bindings/python/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export const generateBinding: GenerateBindingFn = (
): BindOutput => {
const escapedAbi = JSON.stringify(
sort((options.abi as unknown) as Record<string, unknown>)
).replace(/\n/g, "\\n");
).replace(/\\n/g, "\\\\n");

const formattedAbi = JSON.stringify(JSON.parse(escapedAbi), null, 2);

// Apply Abi transforms
Expand Down