diff --git a/packages/templates/wasm/assemblyscript/package.json b/packages/templates/wasm/assemblyscript/package.json index 5655b15996..8511c141c3 100644 --- a/packages/templates/wasm/assemblyscript/package.json +++ b/packages/templates/wasm/assemblyscript/package.json @@ -6,13 +6,9 @@ "scripts": { "codegen": "npx polywrap codegen", "build": "npx polywrap build", - "test:env:up": "npx polywrap infra up --modules=eth-ens-ipfs", - "test:env:down": "npx polywrap infra down --modules=eth-ens-ipfs", "deploy": "npx polywrap deploy", - "test": "yarn test:e2e && yarn test:workflow", - "test:e2e": "yarn test:e2e:codegen && jest --passWithNoTests --runInBand --verbose", - "test:e2e:codegen": "npx polywrap codegen -m ./src/__tests__/types/polywrap.app.yaml -g ./src/__tests__/types/wrap", - "test:workflow": "npx polywrap test -o ./workflows/output.json" + "test": "yarn test:codegen && jest --passWithNoTests --runInBand --verbose", + "test:codegen": "npx polywrap codegen -m ./src/__tests__/types/polywrap.app.yaml -g ./src/__tests__/types/wrap" }, "devDependencies": { "@types/jest": "26.0.8", diff --git a/packages/templates/wasm/assemblyscript/polywrap.build.yaml b/packages/templates/wasm/assemblyscript/polywrap.build.yaml index 7a6e7fac0e..4a90507972 100644 --- a/packages/templates/wasm/assemblyscript/polywrap.build.yaml +++ b/packages/templates/wasm/assemblyscript/polywrap.build.yaml @@ -1,8 +1,8 @@ format: 0.3.0 strategies: image: - name: wrap-wasm-as-build-image - node_version: 16.13.0 + name: template-wasm-as + node_version: 18.15.0 include: - ./package.json - ./src diff --git a/packages/templates/wasm/assemblyscript/polywrap.test.cue b/packages/templates/wasm/assemblyscript/polywrap.test.cue deleted file mode 100644 index a71f50ace0..0000000000 --- a/packages/templates/wasm/assemblyscript/polywrap.test.cue +++ /dev/null @@ -1,11 +0,0 @@ -package e2e - -sampleMethod: { - $0: { - data: { - value: "polywrap" - }, - error?: _|_, - } -} - diff --git a/packages/templates/wasm/assemblyscript/polywrap.test.yaml b/packages/templates/wasm/assemblyscript/polywrap.test.yaml deleted file mode 100644 index c622bccd27..0000000000 --- a/packages/templates/wasm/assemblyscript/polywrap.test.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: template-wasm-rs -format: 0.1.0 -validation: "./polywrap.test.cue" -jobs: - sampleMethod: - steps: - - uri: fs/build - method: sampleMethod - args: - arg: "polywrap" diff --git a/packages/templates/wasm/golang/package.json b/packages/templates/wasm/golang/package.json index aa9a03750f..4c51a15127 100644 --- a/packages/templates/wasm/golang/package.json +++ b/packages/templates/wasm/golang/package.json @@ -7,10 +7,8 @@ "codegen": "npx polywrap codegen", "build": "npx polywrap build", "deploy": "npx polywrap deploy", - "test": "yarn test:e2e && yarn test:workflow", - "test:e2e": "yarn test:e2e:codegen && jest --passWithNoTests --runInBand --verbose", - "test:e2e:codegen": "npx polywrap codegen -m ./module/__tests__/types/polywrap.app.yaml -g ./module/__tests__/types/wrap", - "test:workflow": "npx polywrap test" + "test": "yarn test:e2e:codegen && jest --passWithNoTests --runInBand --verbose", + "test:codegen": "npx polywrap codegen -m ./module/__tests__/types/polywrap.app.yaml -g ./module/__tests__/types/wrap" }, "devDependencies": { "@types/jest": "26.0.8", diff --git a/packages/templates/wasm/golang/polywrap.build.yaml b/packages/templates/wasm/golang/polywrap.build.yaml new file mode 100644 index 0000000000..63fd363ddf --- /dev/null +++ b/packages/templates/wasm/golang/polywrap.build.yaml @@ -0,0 +1,4 @@ +format: 0.2.0 +strategies: + image: + name: template-wasm-go diff --git a/packages/templates/wasm/golang/polywrap.test.cue b/packages/templates/wasm/golang/polywrap.test.cue deleted file mode 100644 index a71f50ace0..0000000000 --- a/packages/templates/wasm/golang/polywrap.test.cue +++ /dev/null @@ -1,11 +0,0 @@ -package e2e - -sampleMethod: { - $0: { - data: { - value: "polywrap" - }, - error?: _|_, - } -} - diff --git a/packages/templates/wasm/golang/polywrap.test.yaml b/packages/templates/wasm/golang/polywrap.test.yaml deleted file mode 100644 index 2603e2d03f..0000000000 --- a/packages/templates/wasm/golang/polywrap.test.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: template-wasm-go -format: 0.1.0 -validation: "./polywrap.test.cue" -jobs: - sampleMethod: - steps: - - uri: fs/build - method: sampleMethod - args: - arg: "polywrap" diff --git a/packages/templates/wasm/golang/polywrap.yaml b/packages/templates/wasm/golang/polywrap.yaml index 0b1f3f35d6..41560be606 100644 --- a/packages/templates/wasm/golang/polywrap.yaml +++ b/packages/templates/wasm/golang/polywrap.yaml @@ -5,3 +5,5 @@ project: source: schema: ./polywrap.graphql module: ./go.mod +extensions: + build: ./polywrap.build.yaml diff --git a/packages/templates/wasm/interface/polywrap.deploy.yaml b/packages/templates/wasm/interface/polywrap.deploy.yaml deleted file mode 100644 index f0444053fc..0000000000 --- a/packages/templates/wasm/interface/polywrap.deploy.yaml +++ /dev/null @@ -1,7 +0,0 @@ -format: "0.1" -stages: - ipfs_deploy: - package: ipfs - uri: fs/./build - config: - gatewayUri: "https://ipfs.wrappers.io" \ No newline at end of file diff --git a/packages/templates/wasm/rust/package.json b/packages/templates/wasm/rust/package.json index 8aec722df6..5bf7bbd1e8 100644 --- a/packages/templates/wasm/rust/package.json +++ b/packages/templates/wasm/rust/package.json @@ -7,10 +7,8 @@ "codegen": "npx polywrap codegen", "build": "npx polywrap build", "deploy": "npx polywrap deploy", - "test": "yarn test:e2e && yarn test:workflow", - "test:e2e": "yarn test:e2e:codegen && cargo test --release", - "test:e2e:codegen": "npx polywrap codegen -m ./tests/types/polywrap.app.yaml -g ./tests/types/wrap", - "test:workflow": "npx polywrap test" + "test": "yarn test:codegen && cargo test --release", + "test:codegen": "npx polywrap codegen -m ./tests/types/polywrap.app.yaml -g ./tests/types/wrap" }, "devDependencies": { "polywrap": "0.12.1" diff --git a/packages/templates/wasm/rust/polywrap.deploy.yaml b/packages/templates/wasm/rust/polywrap.deploy.yaml deleted file mode 100644 index 2b9ab565ce..0000000000 --- a/packages/templates/wasm/rust/polywrap.deploy.yaml +++ /dev/null @@ -1,7 +0,0 @@ -format: 0.1.0 -stages: - ipfs_deploy: - package: ipfs - uri: fs/./build - config: - gatewayUri: "https://ipfs.wrappers.io" \ No newline at end of file diff --git a/packages/templates/wasm/rust/polywrap.test.cue b/packages/templates/wasm/rust/polywrap.test.cue deleted file mode 100644 index 72c37000a6..0000000000 --- a/packages/templates/wasm/rust/polywrap.test.cue +++ /dev/null @@ -1,11 +0,0 @@ -package e2e - -sampleMethod: { - $0: { - data: { - value: "polywrap from sample_method" - }, - error?: _|_, - } -} - diff --git a/packages/templates/wasm/rust/polywrap.test.yaml b/packages/templates/wasm/rust/polywrap.test.yaml deleted file mode 100644 index c622bccd27..0000000000 --- a/packages/templates/wasm/rust/polywrap.test.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: template-wasm-rs -format: 0.1.0 -validation: "./polywrap.test.cue" -jobs: - sampleMethod: - steps: - - uri: fs/build - method: sampleMethod - args: - arg: "polywrap" diff --git a/packages/templates/wasm/rust/tests/it/module.rs b/packages/templates/wasm/rust/tests/it/module.rs index a738738bbc..33e83bc530 100644 --- a/packages/templates/wasm/rust/tests/it/module.rs +++ b/packages/templates/wasm/rust/tests/it/module.rs @@ -1,14 +1,14 @@ use crate::types::wrap::types::{ - TemplateModule, - TemplateModuleArgsSampleMethod + Template, + TemplateArgsSampleMethod }; #[test] fn sample_method() { - let args = TemplateModuleArgsSampleMethod { + let args = TemplateArgsSampleMethod { arg: "input data".to_string(), }; - let template: TemplateModule = TemplateModule::new(None, None, None); - let response = template.sample_method(&args, None, None, None).unwrap(); + let template: Template = Template::new(None); + let response = template.sample_method(&args, None).unwrap(); assert_eq!(response.result, "input data from sample_method"); } diff --git a/packages/templates/wasm/typescript/package.json b/packages/templates/wasm/typescript/package.json index a8009740e6..983f859756 100644 --- a/packages/templates/wasm/typescript/package.json +++ b/packages/templates/wasm/typescript/package.json @@ -9,10 +9,8 @@ "codegen": "npx polywrap codegen", "build": "yarn codegen && yarn bundle && npx polywrap build --no-codegen", "deploy": "npx polywrap deploy", - "test": "yarn test:e2e && yarn test:workflow", - "test:e2e": "yarn test:e2e:codegen && cargo test --release", - "test:e2e:codegen": "npx polywrap codegen -m ./tests/types/polywrap.app.yaml -g ./tests/types/wrap", - "test:workflow": "npx polywrap test" + "test": "yarn test:codegen && jest --passWithNoTests --runInBand --verbose", + "test:codegen": "npx polywrap codegen -m ./src/__tests__/types/polywrap.app.yaml -g ./src/__tests__/types/wrap" }, "dependencies": { "tslib": "^2.6.2" diff --git a/packages/templates/wasm/typescript/polywrap.build.yaml b/packages/templates/wasm/typescript/polywrap.build.yaml index 4bdc6dc166..096bdbcbb9 100644 --- a/packages/templates/wasm/typescript/polywrap.build.yaml +++ b/packages/templates/wasm/typescript/polywrap.build.yaml @@ -1,3 +1,6 @@ format: 0.3.0 +strategies: + image: + name: template-wasm-ts config: scriptFile: ./bundled/wrap.js \ No newline at end of file diff --git a/packages/templates/wasm/typescript/polywrap.test.cue b/packages/templates/wasm/typescript/polywrap.test.cue deleted file mode 100644 index 72c37000a6..0000000000 --- a/packages/templates/wasm/typescript/polywrap.test.cue +++ /dev/null @@ -1,11 +0,0 @@ -package e2e - -sampleMethod: { - $0: { - data: { - value: "polywrap from sample_method" - }, - error?: _|_, - } -} - diff --git a/packages/templates/wasm/typescript/polywrap.test.yaml b/packages/templates/wasm/typescript/polywrap.test.yaml deleted file mode 100644 index 560e8b604e..0000000000 --- a/packages/templates/wasm/typescript/polywrap.test.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: template-wasm-ts -format: 0.1.0 -validation: "./polywrap.test.cue" -jobs: - sampleMethod: - steps: - - uri: fs/build - method: sampleMethod - args: - arg: "polywrap" diff --git a/packages/templates/wasm/typescript/polywrap.yaml b/packages/templates/wasm/typescript/polywrap.yaml index 8df1debb95..0442be181f 100644 --- a/packages/templates/wasm/typescript/polywrap.yaml +++ b/packages/templates/wasm/typescript/polywrap.yaml @@ -5,3 +5,5 @@ project: source: schema: ./polywrap.graphql module: ./bundled/wrap.js +extensions: + build: ./polywrap.build.yaml