Skip to content

Commit

Permalink
Merge branch 'origin-dev' into 1001-tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
fetsorn committed Jul 18, 2022
2 parents d914308 + 4eac901 commit 2091e7d
Show file tree
Hide file tree
Showing 68 changed files with 303 additions and 227 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,11 @@
# Polywrap Origin (0.2.0)
## Bugs
* [PR-1040](https://github.com/polywrap/monorepo/pull/1040) `polywrap` CLI: Added proper CORS handling for the IPFS node located within the `eth-ens-ipfs` default infra module.

## Breaking Changes
* [PR-1035](https://github.com/polywrap/monorepo/pull/1035) `polywrap.meta` Manifest: Removed the `queries` property from version `0.1.0` of the manifest.
* [PR-1039](https://github.com/polywrap/monorepo/pull/1039) `@polywrap/ipfs-resolver-plugin-js`: Remove the `IpfsResolverPlugin`'s config, as it was never being used.

# Polywrap Origin (0.1.1)
## Features
* [PR-1017](https://github.com/polywrap/monorepo/pull/1017) `@polywrap/templates`, `polywrap` CLI: Rust wasm wrapper project template has been added, and made available via the `polywrap create ...` CLI command.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.1.1
0.2.0
30 changes: 15 additions & 15 deletions packages/cli/package.json
@@ -1,7 +1,7 @@
{
"name": "polywrap",
"description": "Polywrap CLI",
"version": "0.1.1",
"version": "0.2.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down Expand Up @@ -34,20 +34,20 @@
"@ethersproject/providers": "5.6.8",
"@ethersproject/wallet": "5.6.2",
"@formatjs/intl": "1.8.2",
"@polywrap/asyncify-js": "0.1.1",
"@polywrap/client-js": "0.1.1",
"@polywrap/core-js": "0.1.1",
"@polywrap/ens-resolver-plugin-js": "0.1.1",
"@polywrap/ethereum-plugin-js": "0.1.1",
"@polywrap/ipfs-plugin-js": "0.1.1",
"@polywrap/msgpack-js": "0.1.1",
"@polywrap/os-js": "0.1.1",
"@polywrap/polywrap-manifest-types-js": "0.1.1",
"@polywrap/schema-bind": "0.1.1",
"@polywrap/schema-compose": "0.1.1",
"@polywrap/schema-parse": "0.1.1",
"@polywrap/test-env-js": "0.1.1",
"@polywrap/wrap-manifest-types-js": "0.1.1",
"@polywrap/asyncify-js": "0.2.0",
"@polywrap/client-js": "0.2.0",
"@polywrap/core-js": "0.2.0",
"@polywrap/ens-resolver-plugin-js": "0.2.0",
"@polywrap/ethereum-plugin-js": "0.2.0",
"@polywrap/ipfs-plugin-js": "0.2.0",
"@polywrap/msgpack-js": "0.2.0",
"@polywrap/os-js": "0.2.0",
"@polywrap/polywrap-manifest-types-js": "0.2.0",
"@polywrap/schema-bind": "0.2.0",
"@polywrap/schema-compose": "0.2.0",
"@polywrap/schema-parse": "0.2.0",
"@polywrap/test-env-js": "0.2.0",
"@polywrap/wrap-manifest-types-js": "0.2.0",
"assemblyscript": "0.19.1",
"axios": "0.21.2",
"chalk": "4.1.0",
Expand Down

This file was deleted.

@@ -1,23 +1,22 @@
version: '3'
services:
ens-scripts:
build: ./
links:
- ganache
environment:
ETHEREUM_PORT: '${ETHEREUM_PORT:-8545}'
ganache: 'ganache:8545'
depends_on:
- "ganache"
command: ["./wait-for-it.sh", "ganache:8545", "--", "yarn", "deployEns"]
ganache:
image: 'trufflesuite/ganache-cli:v6.12.2'
ports:
- '${ETHEREUM_PORT:-8545}:8545'
command: -l 8000000 --networkId 1576478390085 --deterministic --hostname=0.0.0.0
ipfs:
image: 'ipfs/go-ipfs:v0.4.23'
build: ./ipfs
ports:
- '${IPFS_PORT:-5001}:5001'
- '8080:8080'
- '4001:4001'
ens:
build: ./ens
links:
- ganache
environment:
ETH_PROVIDER: 'ganache:8545'
depends_on:
- "ganache"
command: ["./wait-for-it.sh", "ganache:8545", "--", "yarn", "deployEns"]

This file was deleted.

@@ -0,0 +1,20 @@
FROM node:10.15.3-alpine

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

RUN apk --no-cache --virtual build-dependencies add \
bash

# Install deps
COPY ./scripts/package.json ./
RUN yarn

# Copy the rest of our source files
COPY ./scripts ./

# Build
RUN yarn build

# Deploy
CMD yarn deployEns
@@ -0,0 +1,29 @@
import { deployENS } from "./utils/deployENS";

import { ethers } from "ethers";

async function run() {
if (!!process.env.ETH_PROVIDER === false) {
throw Error("ETH_PROVIDER undefined");
}

const provider = new ethers.providers.JsonRpcProvider(
`http://${process.env.ETH_PROVIDER}`
);

console.log("Waiting for RPC node...");
await provider.ready;

console.log("Deploying ENS...")
const addresses = await deployENS(provider);
console.log(addresses);
}

run()
.then(() => {
process.exit();
})
.catch(err => {
console.error(err);
process.abort();
});
File renamed without changes.
@@ -0,0 +1,4 @@
FROM ipfs/go-ipfs:v0.4.23

COPY ./start_ipfs /usr/local/bin
COPY ./config_ipfs /usr/local/bin
@@ -0,0 +1,4 @@
#!/bin/sh

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["GET", "POST", "PUT", "DELETE"]'
@@ -0,0 +1,58 @@
#!/bin/sh
set -e
user=ipfs
repo="$IPFS_PATH"

if [ `id -u` -eq 0 ]; then
echo "Changing user to $user"
# ensure folder is writable
su-exec "$user" test -w "$repo" || chown -R -- "$user" "$repo"
# restart script with new privileges
exec su-exec "$user" "$0" "$@"
fi

# 2nd invocation with regular user
ipfs version

if [ -e "$repo/config" ]; then
echo "Found IPFS fs-repo at $repo"
else
case "$IPFS_PROFILE" in
"") INIT_ARGS="" ;;
*) INIT_ARGS="--profile=$IPFS_PROFILE" ;;
esac
ipfs init $INIT_ARGS
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080

# Set up the swarm key, if provided

SWARM_KEY_FILE="$repo/swarm.key"
SWARM_KEY_PERM=0400

# Create a swarm key from a given environment variable
if [ ! -z "$IPFS_SWARM_KEY" ] ; then
echo "Copying swarm key from variable..."
echo -e "$IPFS_SWARM_KEY" >"$SWARM_KEY_FILE" || exit 1
chmod $SWARM_KEY_PERM "$SWARM_KEY_FILE"
fi

# Unset the swarm key variable
unset IPFS_SWARM_KEY

# Check during initialization if a swarm key was provided and
# copy it to the ipfs directory with the right permissions
# WARNING: This will replace the swarm key if it exists
if [ ! -z "$IPFS_SWARM_KEY_FILE" ] ; then
echo "Copying swarm key from file..."
install -m $SWARM_KEY_PERM "$IPFS_SWARM_KEY_FILE" "$SWARM_KEY_FILE" || exit 1
fi

# Unset the swarm key file variable
unset IPFS_SWARM_KEY_FILE

fi

$(dirname $0)/config_ipfs

exec ipfs "$@"

This file was deleted.

4 changes: 2 additions & 2 deletions packages/interfaces/file-system/package.json
@@ -1,7 +1,7 @@
{
"name": "@polywrap/file-system-interface",
"description": "Polywrap Filesystem Interface",
"version": "0.1.1",
"version": "0.2.0",
"scripts": {
"build": "node ../../../dependencies/node_modules/polywrap/bin/polywrap build",
"lint": "eslint --color -c ../../../.eslintrc.js .",
Expand All @@ -10,7 +10,7 @@
"deploy": "npx polywrap deploy"
},
"devDependencies": {
"polywrap": "0.1.1"
"polywrap": "0.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/interfaces/ipfs/package.json
@@ -1,7 +1,7 @@
{
"name": "@polywrap/ipfs-interface",
"description": "Polywrap Ipfs Interface",
"version": "0.1.1",
"version": "0.2.0",
"scripts": {
"build": "node ../../../dependencies/node_modules/polywrap/bin/polywrap build",
"lint": "eslint --color -c ../../../.eslintrc.js .",
Expand All @@ -10,7 +10,7 @@
"deploy": "node ../../../dependencies/node_modules/polywrap/bin/polywrap deploy"
},
"devDependencies": {
"polywrap": "0.1.1"
"polywrap": "0.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/interfaces/logger/package.json
@@ -1,7 +1,7 @@
{
"name": "@polywrap/logger-interface",
"description": "Polywrap Logger Interface",
"version": "0.1.1",
"version": "0.2.0",
"scripts": {
"build": "node ../../../dependencies/node_modules/polywrap/bin/polywrap build",
"lint": "eslint --color -c ../../../.eslintrc.js .",
Expand All @@ -10,7 +10,7 @@
"deploy": "npx polywrap deploy"
},
"devDependencies": {
"polywrap": "0.1.1"
"polywrap": "0.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/interfaces/uri-resolver/package.json
@@ -1,7 +1,7 @@
{
"name": "@polywrap/uri-resolver-interface",
"description": "URI Resolver Interface",
"version": "0.1.1",
"version": "0.2.0",
"scripts": {
"build": "node ../../../dependencies/node_modules/polywrap/bin/polywrap build",
"lint": "eslint --color -c ../../../.eslintrc.js .",
Expand All @@ -10,7 +10,7 @@
"deploy": "npx polywrap deploy"
},
"devDependencies": {
"polywrap": "0.1.1"
"polywrap": "0.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/js/asyncify/package.json
@@ -1,7 +1,7 @@
{
"name": "@polywrap/asyncify-js",
"description": "Async Wasm Imports Support Using Asyncify",
"version": "0.1.1",
"version": "0.2.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/js/client/jest.config.js
Expand Up @@ -3,6 +3,7 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ["**/?(*.)+(spec|test).[jt]s?(x)"],
modulePathIgnorePatterns: ["./src/__tests__/e2e/wasm-rs.spec.ts"],
globals: {
'ts-jest': {
diagnostics: false
Expand Down
3 changes: 2 additions & 1 deletion packages/js/client/jest.rs.config.js
@@ -1,4 +1,5 @@
module.exports = {
...require("./jest.config"),
testMatch: ["**/wasm-rs.ts"]
testMatch: ["**/wasm-rs.spec.ts"],
modulePathIgnorePatterns: [],
};

0 comments on commit 2091e7d

Please sign in to comment.