Skip to content

Commit 3c5b9af

Browse files
committed
updated hello-world demo wrappers to 0.10.0
1 parent 42f62ca commit 3c5b9af

27 files changed

+2111
-2917
lines changed

hello-world/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ We have implemented this project in the below WASM compatible languages:
55

66
| Language | Source | Status | Version |
77
|----------|--------|--------|---------|
8-
| ![Rust](https://img.shields.io/badge/Rust-ffffff?style=for-the-badge&labelColor=ffff99&logoColor=000000&logo=rust) | [./wrapper/rust](./wrapper/rust) |Running | [![Polywrap](https://img.shields.io/badge/Polywrap-0.2.0-blue?style=for-the-badge)](https://www.npmjs.com/package/polywrap/v/0.2.0) |
9-
| ![AssemblyScript](https://img.shields.io/badge/AssemblyScript-007AAC?style=for-the-badge&labelColor=ffffff&logoColor=007AAC&logo=assemblyscript) | [./wrapper/assemblyscript](./wrapper/assemblyscript/) | Running | [![Polywrap](https://img.shields.io/badge/Polywrap-0.2.0-blue?style=for-the-badge)](https://www.npmjs.com/package/polywrap/v/0.2.0) |
8+
| ![Rust](https://img.shields.io/badge/Rust-ffffff?style=for-the-badge&labelColor=ffff99&logoColor=000000&logo=rust) | [./wrapper/rust](./wrapper/rust) |Running | [![Polywrap](https://img.shields.io/badge/Polywrap-0.10.0-blue?style=for-the-badge)](https://www.npmjs.com/package/polywrap/v/0.10.0) |
9+
| ![AssemblyScript](https://img.shields.io/badge/AssemblyScript-007AAC?style=for-the-badge&labelColor=ffffff&logoColor=007AAC&logo=assemblyscript) | [./wrapper/assemblyscript](./wrapper/assemblyscript/) | Running | [![Polywrap](https://img.shields.io/badge/Polywrap-0.10.0-blue?style=for-the-badge)](https://www.npmjs.com/package/polywrap/v/0.10.0) |
1010

1111
We have also created demo apps that integrate this wrapper using different language/frameworks:
1212

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.13.0
1+
v17.9.1

hello-world/wrapper/assemblyscript/jest.config.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ module.exports = {
33
preset: "ts-jest",
44
testEnvironment: "node",
55
testMatch: ["**/__tests__/**/?(*.)+(spec|test).[jt]s?(x)"],
6-
modulePathIgnorePatterns: [
7-
"./src/__tests__/mutation",
8-
"./src/__tests__/query",
9-
"./src/__tests__/utils",
10-
],
6+
testPathIgnorePatterns: [".polywrap"],
7+
modulePathIgnorePatterns: [".polywrap"],
118
globals: {
129
"ts-jest": {
1310
tsconfig: "tsconfig.json",
-174 KB
Binary file not shown.

hello-world/wrapper/assemblyscript/meta/link.svg

Lines changed: 0 additions & 118 deletions
This file was deleted.

hello-world/wrapper/assemblyscript/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
"deploy": "polywrap deploy",
1010
"test": "yarn test:e2e && yarn test:workflow",
1111
"test:e2e": "jest --passWithNoTests --runInBand --verbose",
12-
"test:workflow": "npx polywrap run ./workflows/e2e.yaml"
12+
"test:workflow": "npx polywrap test -m ./workflows/polywrap.test.yaml"
1313
},
1414
"devDependencies": {
1515
"@types/jest": "27.0.3",
16-
"assemblyscript": "0.19.1",
16+
"assemblyscript": "0.19.23",
1717
"jest": "26.6.3",
18-
"polywrap": "0.2.0",
18+
"polywrap": "0.10.0",
1919
"ts-jest": "26.5.4",
2020
"typescript": "4.0.7"
2121
},
2222
"dependencies": {
23-
"@polywrap/wasm-as": "0.2.0"
23+
"@polywrap/wasm-as": "0.10.0"
2424
}
2525
}
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
format: 0.1.0
2-
docker:
3-
name: hello-world-wasm-as
1+
format: 0.3.0
42
config:
5-
node_version: "16.13.0"
3+
node_version: 16.13.0
64
include:
75
- ./package.json
8-
- ./src
6+
- ./src
7+
strategies:
8+
image:
9+
name: hello-world-wasm-as
10+
node_version: 16.13.0
11+
include:
12+
- ./package.json
13+
- ./src
14+
buildx:
15+
keepBuilder: false
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
format: 0.1.0
2-
stages:
1+
format: 0.3.0
2+
primaryJobName: ipfs_deploy
3+
jobs:
34
ipfs_deploy:
4-
package: ipfs
5-
uri: fs/./build
6-
config:
7-
gatewayUri: "https://ipfs.wrappers.io"
5+
steps:
6+
- name: ipfs_deploy
7+
package: ipfs
8+
uri: fs/./build
9+
config:
10+
gatewayUri: https://ipfs.wrappers.io

hello-world/wrapper/assemblyscript/polywrap.meta.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
format: 0.1.0
2-
name: hello-world-as
3-
language: wasm/assemblyscript
4-
schema: ./src/schema.graphql
5-
module: ./src/index.ts
6-
deploy: ./polywrap.deploy.yaml
7-
meta: ./polywrap.meta.yaml
8-
build: ./polywrap.build.yaml
1+
format: 0.3.0
2+
project:
3+
name: hello-world-as
4+
type: wasm/assemblyscript
5+
source:
6+
schema: ./src/schema.graphql
7+
module: ./src/index.ts
8+
extensions:
9+
build: ./polywrap.build.yaml

hello-world/wrapper/assemblyscript/src/__tests__/e2e.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ describe("Hello world wrapper", () => {
66
const client = new PolywrapClient()
77
it("Should log as warning", async () => {
88

9-
const invocation = await client.invoke({
9+
const result = await client.invoke<boolean>({
1010
uri: "fs/./build",
1111
method: "logMessage",
1212
args: {
1313
message: "Invocation being executed from wrapper!"
1414
}
1515
})
16-
expect(invocation).toBeTruthy()
16+
if (!result.ok) throw result.error
17+
expect(result.value).toBeTruthy()
1718
});
1819
})
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import { Args_logMessage, Logger_Module } from "./wrap";
1+
import { Args_logMessage, Logger_Module, ModuleBase } from "./wrap";
22

3-
export function logMessage(args: Args_logMessage): bool {
4-
return Logger_Module.info({
5-
message: args.message
6-
}).unwrap();
7-
}
3+
export class Module extends ModuleBase {
4+
5+
logMessage(args: Args_logMessage): bool {
6+
return Logger_Module.info({
7+
message: args.message
8+
}).unwrap();
9+
}
10+
11+
}

hello-world/wrapper/rust/workflows/e2e.yaml renamed to hello-world/wrapper/assemblyscript/workflows/polywrap.test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
format: "0.2.0"
12
name: hello-world
23
jobs:
34
cases:

0 commit comments

Comments
 (0)