Skip to content

Commit

Permalink
Merge pull request #1813 from polywrap/pileks/chore/client-0.12
Browse files Browse the repository at this point in the history
update Polywrap Client used by CLI to 0.12-pre.1
  • Loading branch information
dOrgJelli authored Jul 14, 2023
2 parents 85059f9 + cae7946 commit 272778a
Show file tree
Hide file tree
Showing 30 changed files with 228 additions and 1,150 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
},
"resolutions": {
"@types/react": "16.9.0",
"@types/react-dom": "16.9.0"
"@types/react-dom": "16.9.0",
"@types/node": "18.15.0"
}
}
22 changes: 12 additions & 10 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,24 @@
"@ethersproject/providers": "5.6.8",
"@ethersproject/wallet": "5.6.2",
"@formatjs/intl": "1.8.2",
"@polywrap/asyncify-js": "0.11.0",
"@polywrap/client-config-builder-js": "0.11.0",
"@polywrap/client-js": "0.11.0",
"@polywrap/core-js": "0.11.0",
"@polywrap/asyncify-js": "0.12.0-pre.1",
"@polywrap/client-config-builder-js": "0.12.0-pre.1",
"@polywrap/client-js": "0.12.0-pre.1",
"@polywrap/core-js": "0.12.0-pre.1",
"@polywrap/ethereum-provider-js": "0.3.1",
"@polywrap/logging-js": "0.11.0-pre.2",
"@polywrap/os-js": "0.11.0-pre.2",
"@polywrap/polywrap-manifest-types-js": "0.11.0-pre.2",
"@polywrap/result": "0.11.0",
"@polywrap/result": "0.12.0-pre.1",
"@polywrap/schema-bind": "0.11.0-pre.2",
"@polywrap/schema-compose": "0.11.0-pre.2",
"@polywrap/schema-parse": "0.11.0-pre.2",
"@polywrap/uri-resolver-extensions-js": "0.11.0",
"@polywrap/uri-resolvers-js": "0.11.0",
"@polywrap/wasm-js": "0.11.0",
"@polywrap/wrap-manifest-types-js": "0.11.0",
"@polywrap/uri-resolver-extensions-js": "0.12.0-pre.1",
"@polywrap/uri-resolvers-js": "0.12.0-pre.1",
"@polywrap/wasm-js": "0.12.0-pre.1",
"@polywrap/wrap-manifest-types-js": "0.12.0-pre.1",
"@polywrap/web3-config-bundle-js": "0.12.0-pre.1",
"@polywrap/sys-config-bundle-js": "0.12.0-pre.1",
"axios": "0.21.2",
"chalk": "4.1.0",
"chokidar": "3.5.1",
Expand Down Expand Up @@ -86,7 +88,7 @@
"@types/fs-extra": "9.0.12",
"@types/jest": "26.0.8",
"@types/mustache": "4.0.1",
"@types/node": "18.14.6",
"@types/node": "18.15.0",
"@types/prettier": "2.6.0",
"@types/rimraf": "3.0.0",
"dir-compare": "3.3.0",
Expand Down
13 changes: 9 additions & 4 deletions packages/cli/src/__tests__/unit/jobrunner.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import path from "path";
import { GetPathToTestWrappers } from "@polywrap/test-cases";
import { ClientConfigBuilder, PolywrapClientConfigBuilder } from "@polywrap/client-config-builder-js";
import {
PolywrapClientConfigBuilder,
ClientConfigBuilder,
} from "@polywrap/client-config-builder-js";
import { testCases } from "./jobrunner-test-cases";
import { JobRunner } from "../../lib";

Expand All @@ -17,17 +20,19 @@ describe("workflow JobRunner", () => {
"00-subinvoke",
"implementations",
"rs"
)}`
)}`;

const invokeUri = `fs/${path.join(
GetPathToTestWrappers(),
"subinvoke",
"01-invoke",
"implementations",
"rs"
)}`
)}`;

configBuilder.setRedirect("ens/imported-invoke.eth", invokeUri).setRedirect("ens/imported-subinvoke.eth", subinvokeUri);
configBuilder
.setRedirect("ens/imported-invoke.eth", invokeUri)
.setRedirect("ens/imported-subinvoke.eth", subinvokeUri);
configBuilder.addDefaults();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
PolywrapClientConfigBuilder,
PolywrapClient,
} from "@polywrap/client-js";
import { Web3 } from "@polywrap/client-config-builder-js";
import * as Web3 from "@polywrap/web3-config-bundle-js";
import {
Connection,
Connections,
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/lib/defaults/deploy-modules/ens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { Wallet } from "@ethersproject/wallet";
import { JsonRpcProvider } from "@ethersproject/providers";
import { IWrapPackage, Uri } from "@polywrap/core-js";
import {
PolywrapClient,
PolywrapClientConfigBuilder,
PolywrapClient,
} from "@polywrap/client-js";
import { Web3 } from "@polywrap/client-config-builder-js";
import * as Web3 from "@polywrap/web3-config-bundle-js";
import {
Connection,
Connections,
Expand Down
8 changes: 3 additions & 5 deletions packages/cli/src/lib/defaults/deploy-modules/ipfs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import { DeployModule } from "../../../deploy";

import { Uri } from "@polywrap/core-js";
import { PolywrapClient } from "@polywrap/client-js";
import {
PolywrapClientConfigBuilder,
Web3,
} from "@polywrap/client-config-builder-js";
import * as Sys from "@polywrap/sys-config-bundle-js";
import { PolywrapClientConfigBuilder } from "@polywrap/client-config-builder-js";
import fs from "fs";

const isValidUri = (uri: Uri) =>
Expand Down Expand Up @@ -100,7 +98,7 @@ class IPFSDeployer implements DeployModule {
const client: PolywrapClient = new PolywrapClient(clientConfig);

const result = await client.invoke<AddResult[]>({
uri: Web3.bundle.ipfsHttpClient.uri,
uri: Sys.bundle.ipfsHttpClient.uri,
method: "addDir",
args: (args as unknown) as Record<string, unknown>,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/file-saver": "2.0.5",
"@types/fs-extra": "7.0.0",
"@types/jest": "26.0.8",
"@types/node": "18.14.6",
"@types/node": "18.15.0",
"jest": "26.6.3",
"nodemon": "2.0.19",
"rimraf": "3.0.2",
Expand Down
6 changes: 2 additions & 4 deletions packages/cli/src/lib/option-parsers/client-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { intlMsg } from "../intl";
import { importTypescriptModule } from "../system";
import { getTestEnvClientConfig } from "../test-env";

import {
PolywrapClientConfigBuilder,
ClientConfigBuilder,
} from "@polywrap/client-config-builder-js";
import { PolywrapClientConfigBuilder } from "@polywrap/client-config-builder-js";
import path from "path";
import { ClientConfigBuilder } from "@polywrap/client-config-builder-js";

export async function parseClientConfigOption(
clientConfig: string | undefined | false
Expand Down
11 changes: 7 additions & 4 deletions packages/cli/src/lib/test-env/client-config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import { getTestEnvProviders } from "./providers";
import { ETH_ENS_IPFS_MODULE_CONSTANTS } from "../../lib";

import { BuilderConfig, Web3 } from "@polywrap/client-config-builder-js";
import {
BuilderConfig,
PolywrapClientConfigBuilder,
} from "@polywrap/client-config-builder-js";
import * as Web3 from "@polywrap/web3-config-bundle-js";
import * as Sys from "@polywrap/sys-config-bundle-js";
import { ExtendableUriResolver } from "@polywrap/uri-resolver-extensions-js";
import {
ethereumProviderPlugin,
Connections,
Connection,
} from "@polywrap/ethereum-provider-js";
import { PolywrapClientConfigBuilder } from "@polywrap/client-js";
import { IWrapPackage } from "@polywrap/core-js";

export function getTestEnvClientConfig(): Partial<BuilderConfig> {
Expand All @@ -27,9 +31,8 @@ export function getTestEnvClientConfig(): Partial<BuilderConfig> {
const builder = new PolywrapClientConfigBuilder()
.addDefaults()
.addEnvs({
[Web3.bundle.ipfsResolver.uri]: {
[Sys.bundle.ipfsResolver.uri]: {
provider: ipfsProvider,
fallbackProviders: Web3.ipfsProviders,
retries: { tryResolveUri: 1, getFile: 1 },
},
"proxy/testnet-ens-uri-resolver-ext": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface Step {
[k: string]: unknown;
};
/**
* URI to pass into the deploy step.
* URI or name of other step prefixed with '$$' to pass into the deploy step.
*/
uri: string | string;
uri: string;
}
2 changes: 1 addition & 1 deletion packages/js/os/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint": "eslint --color -c ../../../.eslintrc.js src/"
},
"devDependencies": {
"@types/node": "18.14.6",
"@types/node": "18.15.0",
"rimraf": "3.0.2",
"typescript": "4.9.5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/js/validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@polywrap/schema-compose": "0.11.0-pre.2",
"@polywrap/wrap-manifest-types-js": "0.10.0"
"@polywrap/wrap-manifest-types-js": "0.12.0-pre.1"
},
"devDependencies": {
"@polywrap/msgpack-js": "0.10.0",
Expand Down
14 changes: 2 additions & 12 deletions packages/manifests/polywrap/formats/polywrap.deploy/0.4.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,8 @@
"type": "object"
},
"uri": {
"description": "URI to pass into the deploy step.",
"oneOf": [
{
"type": "string",
"description": "Valid WRAP URI"
},
{
"type": "string",
"description": "Name of another step, prefixed with '$'",
"pattern": "^\\$.*"
}
]
"description": "URI or name of other step prefixed with '$$' to pass into the deploy step.",
"type": "string"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/schema/bind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"copy:templates": "copyfiles -u 1 src/**/*.mustache build/"
},
"dependencies": {
"@polywrap/client-js": "~0.11.0",
"@polywrap/client-js": "0.12.0-pre.1",
"@polywrap/os-js": "0.11.0-pre.2",
"@polywrap/schema-parse": "0.11.0-pre.2",
"@polywrap/wrap-manifest-types-js": "0.11.0",
"@polywrap/wrap-manifest-types-js": "0.12.0-pre.1",
"mustache": "4.0.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/bind/src/bindings/wrap-bindgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Args_generateBindings, GenerateBindingFn, Output } from "./types";

import {
PolywrapClient,
PolywrapClientConfigBuilder,
ExtendableUriResolver,
PolywrapClientConfigBuilder,
} from "@polywrap/client-js";
import { OutputEntry } from "@polywrap/os-js";

Expand Down
2 changes: 1 addition & 1 deletion packages/schema/compose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@polywrap/schema-parse": "0.11.0-pre.2",
"@polywrap/wrap-manifest-types-js": "0.10.0",
"@polywrap/wrap-manifest-types-js": "0.12.0-pre.1",
"graphql": "15.5.0",
"mustache": "4.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@dorgjelli/graphql-schema-cycles": "1.1.4",
"@polywrap/wrap-manifest-types-js": "0.10.0",
"@polywrap/wrap-manifest-types-js": "0.12.0-pre.1",
"graphql": "15.5.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/templates/app/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"test": "ts-node ./src/index.ts"
},
"dependencies": {
"@polywrap/client-js": "~0.10.0"
"@polywrap/client-js": "~0.12.0-pre.1"
},
"devDependencies": {
"@types/node": "18.14.6",
"@types/node": "18.15.0",
"polywrap": "0.11.0-pre.2",
"ts-node": "10.9.1",
"typescript": "4.9.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/templates/plugin/python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"private": true,
"version": "0.11.0-pre.2",
"dependencies": {
"polywrap": "~0.10.2"
"polywrap": "0.11.0-pre.2"
}
}
2 changes: 1 addition & 1 deletion packages/templates/plugin/rust/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"private": true,
"version": "0.11.0-pre.2",
"dependencies": {
"polywrap": "~0.10.2"
"polywrap": "0.11.0-pre.2"
}
}
10 changes: 5 additions & 5 deletions packages/templates/plugin/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"test:watch": "yarn test -- --watch"
},
"dependencies": {
"@polywrap/core-js": "~0.10.0",
"@polywrap/plugin-js": "~0.10.0"
"@polywrap/core-js": "~0.12.0-pre.1",
"@polywrap/plugin-js": "~0.12.0-pre.1"
},
"peerDependencies": {
"@polywrap/core-js": "0.10.x",
"@polywrap/plugin-js": "0.10.x"
"@polywrap/core-js": "0.12.x",
"@polywrap/plugin-js": "0.12.x"
},
"devDependencies": {
"@polywrap/client-js": "~0.10.0",
"@polywrap/client-js": "~0.12.0-pre.1",
"@types/jest": "26.0.8",
"@types/prettier": "2.6.0",
"jest": "26.6.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientConfigBuilder, IWrapPackage, PolywrapClient } from "@polywrap/client-js";
import { PolywrapClientConfigBuilder, IWrapPackage, PolywrapClient } from "@polywrap/client-js";
import { samplePlugin } from "../";

describe("e2e", () => {
Expand All @@ -7,9 +7,9 @@ describe("e2e", () => {

beforeAll(() => {
// Add the samplePlugin to the PolywrapClient
const config = new ClientConfigBuilder()
const config = new PolywrapClientConfigBuilder()
.addDefaults()
.addPackage(
.setPackage(
uri,
samplePlugin({
defaultValue: "foo bar",
Expand Down
2 changes: 1 addition & 1 deletion packages/templates/wasm/interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "templates-interface",
"private": true,
"dependencies": {
"polywrap": "~0.10.2"
"polywrap": "0.11.0-pre.2"
}
}
2 changes: 1 addition & 1 deletion packages/templates/wasm/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT"
edition = "2021"

[dependencies]
polywrap-wasm-rs = { version = "~0.10.2" }
polywrap-wasm-rs = { version = "0.11.0-pre.0" }
serde = { version = "1.0", features = ["derive"] }

[lib]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
format: 0.4.0
format: 0.5.0
project:
name: test-project
type: wasm/assemblyscript
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
format: 0.4.0
format: 0.5.0
project:
name: ObjectTypes
type: wasm/rust
source:
schema: ./schema.graphql
module: ./Cargo.toml
extensions:
build: ./polywrap.build.yaml
build: ./polywrap.build.yaml
1 change: 1 addition & 0 deletions packages/test-cases/cases/cli/deploy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
URI.txt
1 change: 0 additions & 1 deletion packages/test-cases/cases/cli/deploy/001-sanity/URI.txt

This file was deleted.

Loading

0 comments on commit 272778a

Please # to comment.