From a5311d00342b9dcf55c57c1249b6c01a9fe16569 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 14 Jun 2022 19:00:15 -0700 Subject: [PATCH 01/17] @web3api/* package name changes --- dependencies/package.json | 2 +- package.json | 27 +++++++------- packages/cli/package.json | 24 ++++++------- packages/cli/src/__tests__/e2e/app.spec.ts | 4 +-- packages/cli/src/__tests__/e2e/build.spec.ts | 4 +-- .../cli/src/__tests__/e2e/codegen.spec.ts | 4 +-- packages/cli/src/__tests__/e2e/create.spec.ts | 2 +- packages/cli/src/__tests__/e2e/deploy.spec.ts | 10 +++--- packages/cli/src/__tests__/e2e/help.spec.ts | 2 +- packages/cli/src/__tests__/e2e/infra.spec.ts | 4 +-- .../cli/src/__tests__/e2e/no-command.spec.ts | 2 +- packages/cli/src/__tests__/e2e/plugin.spec.ts | 4 +-- .../src/__tests__/e2e/query.spec.helper.ts | 2 +- packages/cli/src/__tests__/e2e/query.spec.ts | 6 ++-- .../cli/src/__tests__/unit/docker.spec.ts | 4 +-- packages/cli/src/cli.ts | 2 +- packages/cli/src/commands/app.ts | 2 +- packages/cli/src/commands/deploy.ts | 2 +- packages/cli/src/commands/infra.ts | 2 +- packages/cli/src/commands/plugin.ts | 4 +-- packages/cli/src/commands/query.ts | 2 +- packages/cli/src/lib/CacheDirectory.ts | 2 +- packages/cli/src/lib/CodeGenerator.ts | 4 +-- packages/cli/src/lib/Compiler.ts | 12 +++---- packages/cli/src/lib/SchemaComposer.ts | 4 +-- .../defaults/build-images/wasm/rust/index.ts | 2 +- .../lib/defaults/deploy-modules/ens/index.ts | 8 ++--- .../deploy-modules/ipfs-test/index.ts | 2 +- .../lib/defaults/deploy-modules/ipfs/index.ts | 2 +- .../deploy-modules/local-dev-ens/index.ts | 10 +++--- packages/cli/src/lib/deploy/deployer.ts | 2 +- packages/cli/src/lib/helpers/client.ts | 10 +++--- packages/cli/src/lib/helpers/metadata.ts | 4 +-- .../src/lib/helpers/validate-client-config.ts | 2 +- packages/cli/src/lib/infra/Infra.ts | 2 +- .../cli/src/lib/manifest/app/languages.ts | 2 +- packages/cli/src/lib/manifest/app/load.ts | 2 +- packages/cli/src/lib/manifest/index.ts | 2 +- packages/cli/src/lib/manifest/output.ts | 4 +-- .../cli/src/lib/manifest/plugin/languages.ts | 2 +- packages/cli/src/lib/manifest/plugin/load.ts | 2 +- .../cli/src/lib/manifest/web3api/languages.ts | 2 +- packages/cli/src/lib/manifest/web3api/load.ts | 2 +- packages/cli/src/lib/option-parsers/query.ts | 4 +-- .../cli/src/lib/project-templates/index.ts | 6 ++-- packages/cli/src/lib/project/AppProject.ts | 8 ++--- packages/cli/src/lib/project/PluginProject.ts | 8 ++--- packages/cli/src/lib/project/Project.ts | 4 +-- .../cli/src/lib/project/Web3ApiProject.ts | 10 +++--- packages/cli/src/lib/system/DockerCompose.ts | 2 +- packages/cli/src/lib/system/docker.ts | 2 +- .../cli/src/lib/test-env/client-config.ts | 10 +++--- packages/cli/src/lib/test-env/providers.ts | 2 +- packages/core-interfaces/logger/package.json | 2 +- .../core-interfaces/uri-resolver/package.json | 2 +- packages/js/asyncify/package.json | 2 +- packages/js/client/package.json | 36 +++++++++---------- .../js/client/scripts/extractPluginConfigs.ts | 8 ++--- packages/js/client/src/Web3ApiClient.ts | 4 +-- .../src/__tests__/core/resolveUri.spec.ts | 6 ++-- .../client/src/__tests__/core/sanity.spec.ts | 2 +- .../src/__tests__/core/wasm-wrapper.spec.ts | 4 +-- .../js/client/src/__tests__/e2e/env.spec.ts | 6 ++-- .../client/src/__tests__/e2e/wasm-as.spec.ts | 4 +-- .../js/client/src/__tests__/e2e/wasm-rs.ts | 4 +-- .../src/__tests__/e2e/workflow-test-cases.ts | 2 +- .../client/src/__tests__/e2e/workflow.spec.ts | 4 +-- packages/js/client/src/createWeb3ApiClient.ts | 4 +-- .../js/client/src/default-client-config.ts | 22 ++++++------ packages/js/client/src/index.ts | 2 +- .../js/client/src/plugin/PluginWeb3Api.ts | 4 +-- packages/js/client/src/pluginConfigs/Ens.ts | 2 +- .../js/client/src/pluginConfigs/Ethereum.ts | 2 +- packages/js/client/src/pluginConfigs/Ipfs.ts | 2 +- packages/js/client/src/pluginConfigs/index.ts | 6 ++-- packages/js/client/src/wasm/WasmWeb3Api.ts | 6 ++-- packages/js/client/src/wasm/imports.ts | 2 +- packages/js/core/package.json | 8 ++--- .../scripts/manifest/deserialize-ts.mustache | 2 +- .../scripts/manifest/generateFormatTypes.js | 6 ++-- .../core/scripts/manifest/migrate-ts.mustache | 2 +- .../scripts/manifest/validate-ts.mustache | 4 +-- .../js/core/src/algorithms/apply-redirects.ts | 2 +- .../js/core/src/algorithms/filter-results.ts | 2 +- .../src/algorithms/find-plugin-package.ts | 2 +- .../src/algorithms/get-implementations.ts | 2 +- .../js/core/src/algorithms/parse-query.ts | 2 +- .../js/core/src/interfaces/uri-resolver.ts | 2 +- .../formats/web3api.app/deserialize.ts | 2 +- .../manifest/formats/web3api.app/migrate.ts | 2 +- .../manifest/formats/web3api.app/validate.ts | 6 ++-- .../formats/web3api.build/deserialize.ts | 2 +- .../manifest/formats/web3api.build/migrate.ts | 2 +- .../formats/web3api.build/validate.ts | 8 ++--- .../formats/web3api.deploy/deserialize.ts | 2 +- .../formats/web3api.deploy/migrate.ts | 2 +- .../formats/web3api.deploy/validate.ts | 4 +-- .../formats/web3api.infra/deserialize.ts | 2 +- .../manifest/formats/web3api.infra/migrate.ts | 2 +- .../formats/web3api.infra/validate.ts | 6 ++-- .../formats/web3api.meta/deserialize.ts | 2 +- .../manifest/formats/web3api.meta/migrate.ts | 2 +- .../manifest/formats/web3api.meta/validate.ts | 8 ++--- .../formats/web3api.plugin/deserialize.ts | 2 +- .../formats/web3api.plugin/migrate.ts | 2 +- .../formats/web3api.plugin/validate.ts | 8 ++--- .../manifest/formats/web3api/deserialize.ts | 2 +- .../src/manifest/formats/web3api/migrate.ts | 2 +- .../src/manifest/formats/web3api/validate.ts | 20 +++++------ packages/js/core/src/types/Env.ts | 2 +- .../src/types/InterfaceImplementations.ts | 2 +- .../js/core/src/types/PluginRegistration.ts | 2 +- packages/js/core/src/types/Query.ts | 2 +- packages/js/core/src/types/Uri.ts | 2 +- packages/js/core/src/types/UriRedirect.ts | 2 +- .../src/uri-resolution/core/resolveUri.ts | 2 +- .../extendable/UriResolverWrapper.ts | 2 +- packages/js/os/package.json | 2 +- packages/js/plugins/ens/package.json | 8 ++--- packages/js/plugins/ens/src/index.ts | 2 +- packages/js/plugins/ens/src/w3-man/index.ts | 2 +- .../js/plugins/ens/src/w3-man/manifest.ts | 2 +- packages/js/plugins/ens/src/w3-man/module.ts | 2 +- packages/js/plugins/ens/src/w3-man/types.ts | 2 +- packages/js/plugins/ethereum/package.json | 16 ++++----- .../ethereum/src/__tests__/e2e.spec.ts | 8 ++--- .../src/__tests__/integration/package.json | 4 +-- .../src/__tests__/integration/src/index.ts | 2 +- .../__tests__/integration/web3api.build.yaml | 2 +- packages/js/plugins/ethereum/src/index.ts | 2 +- .../js/plugins/ethereum/src/w3-man/index.ts | 2 +- .../plugins/ethereum/src/w3-man/manifest.ts | 2 +- .../js/plugins/ethereum/src/w3-man/module.ts | 2 +- packages/js/plugins/filesystem/package.json | 20 +++++------ .../filesystem/src/__tests__/e2e.spec.ts | 12 +++---- packages/js/plugins/filesystem/src/index.ts | 2 +- .../js/plugins/filesystem/src/w3-man/index.ts | 2 +- .../plugins/filesystem/src/w3-man/manifest.ts | 2 +- .../plugins/filesystem/src/w3-man/module.ts | 2 +- .../js/plugins/filesystem/src/w3-man/types.ts | 2 +- packages/js/plugins/graph-node/package.json | 12 +++---- .../graph-node/src/__tests__/e2e.spec.ts | 2 +- packages/js/plugins/graph-node/src/index.ts | 2 +- .../js/plugins/graph-node/src/w3-man/index.ts | 2 +- .../plugins/graph-node/src/w3-man/manifest.ts | 2 +- .../plugins/graph-node/src/w3-man/module.ts | 2 +- .../js/plugins/graph-node/src/w3-man/types.ts | 2 +- packages/js/plugins/http/package.json | 16 ++++----- .../http/src/__tests__/e2e/e2e.spec.ts | 2 +- .../src/__tests__/e2e/integration.spec.ts | 4 +-- .../__tests__/e2e/integration/package.json | 4 +-- .../e2e/integration/web3api.build.yaml | 2 +- packages/js/plugins/http/src/index.ts | 2 +- packages/js/plugins/http/src/w3-man/index.ts | 2 +- .../js/plugins/http/src/w3-man/manifest.ts | 2 +- packages/js/plugins/http/src/w3-man/module.ts | 2 +- packages/js/plugins/ipfs/package.json | 8 ++--- packages/js/plugins/ipfs/src/index.ts | 2 +- packages/js/plugins/ipfs/src/w3-man/index.ts | 2 +- .../js/plugins/ipfs/src/w3-man/manifest.ts | 2 +- packages/js/plugins/ipfs/src/w3-man/module.ts | 2 +- packages/js/plugins/ipfs/src/w3-man/types.ts | 2 +- packages/js/plugins/logger/README.md | 2 +- packages/js/plugins/logger/package.json | 10 +++--- .../logger/src/__tests__/e2e/e2e.spec.ts | 2 +- packages/js/plugins/logger/src/index.ts | 2 +- .../js/plugins/logger/src/w3-man/index.ts | 2 +- .../js/plugins/logger/src/w3-man/manifest.ts | 2 +- .../js/plugins/logger/src/w3-man/module.ts | 2 +- .../js/plugins/logger/src/w3-man/types.ts | 2 +- packages/js/plugins/sha3/package.json | 8 ++--- .../plugins/sha3/src/__tests__/index.test.ts | 2 +- packages/js/plugins/sha3/src/index.ts | 2 +- packages/js/plugins/sha3/src/w3-man/index.ts | 2 +- .../js/plugins/sha3/src/w3-man/manifest.ts | 2 +- packages/js/plugins/sha3/src/w3-man/module.ts | 2 +- packages/js/plugins/uts46/package.json | 8 ++--- .../plugins/uts46/src/__tests__/index.test.ts | 2 +- packages/js/plugins/uts46/src/index.ts | 2 +- packages/js/plugins/uts46/src/w3-man/index.ts | 2 +- .../js/plugins/uts46/src/w3-man/manifest.ts | 2 +- .../js/plugins/uts46/src/w3-man/module.ts | 2 +- packages/js/react/package.json | 18 +++++----- .../react/src/__tests__/app/SimpleStorage.tsx | 4 +-- .../react/src/__tests__/integration.spec.tsx | 6 ++-- packages/js/react/src/__tests__/plugins.ts | 10 +++--- .../src/__tests__/useWeb3ApiClient.spec.tsx | 4 +-- .../src/__tests__/useWeb3ApiInvoke.spec.tsx | 6 ++-- .../src/__tests__/useWeb3ApiQuery.spec.tsx | 6 ++-- packages/js/react/src/client.tsx | 2 +- packages/js/react/src/invoke.tsx | 2 +- packages/js/react/src/provider.tsx | 2 +- packages/js/react/src/query.tsx | 2 +- packages/js/test-env/package.json | 8 ++--- packages/js/test-env/src/index.ts | 6 ++-- packages/js/tracing/package.json | 2 +- packages/manifest-schemas/package.json | 2 +- packages/schema/bind/package.json | 8 ++--- packages/schema/bind/src/__tests__/index.ts | 6 ++-- .../bind/src/__tests__/test-cases.spec.ts | 2 +- .../bindings/assemblyscript/wasm-as/index.ts | 4 +-- .../wasm-as/templates/entry-ts.mustache | 2 +- .../imported/module-type/index-ts.mustache | 2 +- .../imported/object-type/index-ts.mustache | 2 +- .../interface-type/index-ts.mustache | 2 +- .../templates/object-type/index-ts.mustache | 2 +- .../templates/serialization_imports.mustache | 2 +- .../bind/src/bindings/rust/wasm-rs/index.ts | 4 +-- .../bindings/rust/wasm-rs/transforms/byRef.ts | 2 +- .../rust/wasm-rs/transforms/propertyDeps.ts | 2 +- .../src/bindings/typescript/app-ts/index.ts | 2 +- .../app-ts/templates/types-ts.mustache | 2 +- .../bindings/typescript/plugin-ts/index.ts | 2 +- .../plugin-ts/templates/index-ts.mustache | 2 +- .../plugin-ts/templates/manifest-ts.mustache | 2 +- .../plugin-ts/templates/module-ts.mustache | 2 +- .../plugin-ts/templates/types-ts.mustache | 2 +- .../bind/src/bindings/utils/templates.ts | 2 +- packages/schema/bind/src/types.ts | 4 +-- packages/schema/compose/package.json | 6 ++-- .../schema/compose/src/__tests__/env.spec.ts | 2 +- .../schema/compose/src/__tests__/index.ts | 4 +-- packages/schema/compose/src/env.ts | 2 +- packages/schema/compose/src/index.ts | 2 +- packages/schema/compose/src/parse.ts | 2 +- packages/schema/compose/src/render.ts | 2 +- packages/schema/compose/src/resolve.ts | 2 +- .../compose/src/templates/header.mustache.ts | 2 +- packages/schema/compose/src/types.ts | 2 +- packages/schema/parse/package.json | 4 +-- packages/schema/parse/src/__tests__/index.ts | 2 +- .../templates/api/assemblyscript/package.json | 6 ++-- .../assemblyscript/scripts/deploy-contract.js | 4 +-- .../src/__tests__/e2e/integration.spec.ts | 4 +-- .../api/assemblyscript/src/__tests__/utils.ts | 8 ++--- packages/templates/api/interface/package.json | 2 +- .../app/typescript-node/package.json | 4 +-- .../app/typescript-node/src/index.ts | 2 +- .../app/typescript-react/package.json | 6 ++-- .../app/typescript-react/src/App.tsx | 2 +- .../app/typescript-react/src/HelloWorld.tsx | 2 +- packages/templates/package.json | 2 +- .../templates/plugin/typescript/package.json | 6 ++-- .../typescript/src/__tests__/e2e.spec.ts | 2 +- .../templates/plugin/typescript/src/index.ts | 2 +- .../cases/apis/wasm-as/asyncify/package.json | 2 +- .../apis/wasm-as/asyncify/web3api.build.yaml | 2 +- .../apis/wasm-as/bigint-type/package.json | 2 +- .../apis/wasm-as/bigint-type/src/index.ts | 2 +- .../wasm-as/bigint-type/web3api.build.yaml | 2 +- .../apis/wasm-as/bignumber-type/package.json | 2 +- .../apis/wasm-as/bignumber-type/src/index.ts | 2 +- .../wasm-as/bignumber-type/web3api.build.yaml | 2 +- .../apis/wasm-as/bytes-type/package.json | 2 +- .../wasm-as/bytes-type/web3api.build.yaml | 2 +- .../apis/wasm-as/enum-types/package.json | 2 +- .../wasm-as/enum-types/web3api.build.yaml | 2 +- .../wasm-as/env-client-types/package.json | 2 +- .../env-client-types/web3api.build.yaml | 2 +- .../cases/apis/wasm-as/env-types/package.json | 2 +- .../apis/wasm-as/env-types/web3api.build.yaml | 2 +- .../implementations/test-api/package.json | 2 +- .../test-api/web3api.build.yaml | 2 +- .../test-use-getImpl/package.json | 2 +- .../test-use-getImpl/web3api.build.yaml | 2 +- .../interface-invoke/test-api/package.json | 2 +- .../test-api/web3api.build.yaml | 2 +- .../test-implementation/package.json | 2 +- .../test-implementation/web3api.build.yaml | 2 +- .../apis/wasm-as/invalid-types/package.json | 2 +- .../wasm-as/invalid-types/web3api.build.yaml | 2 +- .../cases/apis/wasm-as/json-type/package.json | 2 +- .../cases/apis/wasm-as/json-type/src/index.ts | 2 +- .../apis/wasm-as/json-type/web3api.build.yaml | 2 +- .../apis/wasm-as/large-types/package.json | 2 +- .../wasm-as/large-types/web3api.build.yaml | 2 +- .../cases/apis/wasm-as/map-type/package.json | 2 +- .../apis/wasm-as/map-type/web3api.build.yaml | 2 +- .../apis/wasm-as/number-types/package.json | 2 +- .../wasm-as/number-types/web3api.build.yaml | 2 +- .../apis/wasm-as/object-types/package.json | 2 +- .../wasm-as/object-types/web3api.build.yaml | 2 +- .../apis/wasm-as/reserved-words/package.json | 2 +- .../wasm-as/reserved-words/web3api.build.yaml | 2 +- .../wasm-as/simple-env-types/package.json | 2 +- .../simple-env-types/web3api.build.yaml | 2 +- .../apis/wasm-as/simple-storage/package.json | 2 +- .../wasm-as/simple-storage/web3api.build.yaml | 2 +- .../cases/bind/sanity/output/app-ts/types.ts | 2 +- .../bind/sanity/output/plugin-ts/index.ts | 2 +- .../bind/sanity/output/plugin-ts/manifest.ts | 2 +- .../bind/sanity/output/plugin-ts/module.ts | 2 +- .../bind/sanity/output/plugin-ts/types.ts | 2 +- .../output/wasm-as/AnotherType/index.ts | 2 +- .../wasm-as/AnotherType/serialization.ts | 2 +- .../sanity/output/wasm-as/CustomType/index.ts | 2 +- .../wasm-as/CustomType/serialization.ts | 2 +- .../bind/sanity/output/wasm-as/Env/index.ts | 2 +- .../output/wasm-as/Env/serialization.ts | 2 +- .../output/wasm-as/Module/serialization.ts | 2 +- .../sanity/output/wasm-as/TestImport/index.ts | 2 +- .../cases/bind/sanity/output/wasm-as/entry.ts | 2 +- .../TestImport_AnotherObject/index.ts | 2 +- .../TestImport_AnotherObject/serialization.ts | 2 +- .../imported/TestImport_Module/index.ts | 2 +- .../TestImport_Module/serialization.ts | 2 +- .../imported/TestImport_Object/index.ts | 2 +- .../TestImport_Object/serialization.ts | 2 +- .../cli/api/build-cmd/001-sanity/package.json | 4 +-- .../build-cmd/001-sanity/web3api.build.yaml | 2 +- .../build-cmd/004-default-build/package.json | 4 +-- .../004-default-build/web3api.build.yaml | 2 +- .../005-default-dockerfile/package.json | 4 +-- .../005-default-dockerfile/web3api.build.yaml | 2 +- .../006-custom-dockerfile/Dockerfile | 4 +-- .../006-custom-dockerfile/package.json | 4 +-- .../006-custom-dockerfile/web3api.build.yaml | 2 +- .../007-linked-packages/package.json | 4 +-- .../007-linked-packages/web3api.build.yaml | 4 +-- .../api/build-cmd/008-metadata/package.json | 4 +-- .../build-cmd/008-metadata/web3api.build.yaml | 2 +- .../build-cmd/009-docker-buildx/package.json | 4 +-- .../009-docker-buildx/web3api.build.yaml | 2 +- .../cli/api/codegen/001-sanity/package.json | 4 +-- .../api/codegen/001-sanity/web3api.build.yaml | 2 +- .../002-invalid-codegen-script/package.json | 4 +-- .../web3api.build.yaml | 2 +- .../codegen/003-codegen-script/package.json | 4 +-- .../003-codegen-script/web3api.build.yaml | 2 +- .../codegen/003-codegen-script/web3api.gen.ts | 4 +-- .../cli/api/deploy/001-sanity/package.json | 4 +-- .../api/deploy/001-sanity/web3api.build.yaml | 2 +- .../cli/api/deploy/002-no-ext/package.json | 4 +-- .../api/deploy/002-no-ext/web3api.build.yaml | 2 +- .../deploy/003-invalid-config/package.json | 4 +-- .../003-invalid-config/web3api.build.yaml | 2 +- .../api/deploy/004-fail-between/package.json | 4 +-- .../004-fail-between/web3api.build.yaml | 2 +- .../005-non-loaded-env-var/package.json | 4 +-- .../005-non-loaded-env-var/web3api.build.yaml | 2 +- .../cli/api/query/client-async-config.js | 2 +- .../cli/api/query/client-async-config.ts | 4 +-- .../cases/cli/api/query/client-config.js | 2 +- .../cases/cli/api/query/client-config.ts | 4 +-- .../cases/cli/api/query/deploy-contracts.js | 2 +- .../cases/cli/api/query/package.json | 6 ++-- .../cases/cli/api/query/web3api.build.yaml | 2 +- .../local-packages/dev-server/package.json | 2 +- .../001-sanity/expected/src/w3/index.ts | 2 +- .../001-sanity/expected/src/w3/manifest.ts | 2 +- .../001-sanity/expected/src/w3/module.ts | 2 +- .../001-sanity/expected/src/w3/types.ts | 2 +- .../expected/src/w3/index.ts | 2 +- .../expected/src/w3/manifest.ts | 2 +- .../expected/src/w3/module.ts | 2 +- .../expected/src/w3/types.ts | 2 +- .../codegen/003-env/expected/src/w3/index.ts | 2 +- .../003-env/expected/src/w3/manifest.ts | 2 +- .../codegen/003-env/expected/src/w3/module.ts | 2 +- .../codegen/003-env/expected/src/w3/types.ts | 2 +- .../expected/src/w3/index.ts | 2 +- .../expected/src/w3/manifest.ts | 2 +- .../expected/src/w3/module.ts | 2 +- .../expected/src/w3/types.ts | 2 +- .../00-sanity/output/module.ts | 2 +- .../01-nested-objects/output/module.ts | 2 +- .../02-recursive/output/module.ts | 2 +- .../03-wild-card/output/module.ts | 2 +- .../00-sanity/output/module.ts | 2 +- .../output/module.ts | 2 +- .../02-wild-card/output/module.ts | 2 +- .../01-sanity/output/module.ts | 2 +- .../00-sanity/output/module.ts | 2 +- .../01-inherited/output/module.ts | 2 +- .../02-imported-inherited/output/module.ts | 2 +- .../03-external-import/output/module.ts | 2 +- .../output/module.ts | 2 +- .../005-map-types/00-sanity/output/module.ts | 2 +- .../01-inherited/output/module.ts | 2 +- .../02-imported-inherited/output/module.ts | 2 +- .../03-external-import/output/module.ts | 2 +- .../output/module.ts | 2 +- .../006-env-types/00-sanity/output/module.ts | 2 +- .../01-client-env/output/module.ts | 2 +- .../cases/compose/sanity/output/module.ts | 2 +- packages/test-cases/index.ts | 2 +- packages/test-cases/package.json | 4 +-- packages/wasm/as/package.json | 2 +- yarn.lock | 23 ++++-------- 389 files changed, 669 insertions(+), 681 deletions(-) diff --git a/dependencies/package.json b/dependencies/package.json index ef11779cf0..d7fdea9633 100644 --- a/dependencies/package.json +++ b/dependencies/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@web3api/cli": "latest" + "polywrap": "latest" }, "resolutions": { "colors": "1.4.0" diff --git a/package.json b/package.json index 4fd8927b3d..38677685be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "description": "Web3API Monorepo", + "description": "Polywrap Monorepo", "license": "MIT", "private": true, "repository": { @@ -25,23 +25,22 @@ "reset": "yarn clean && yarn && yarn build", "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.w3", "dependencies:install": "cd dependencies && yarn", - "preinstall": "yarn dependencies:install", "build": "yarn build:core && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && yarn build:plugins:patch", - "build:core": "lerna run build --no-private --ignore @web3api/*-plugin-js --ignore @web3api/cli* --ignore @web3api/react --ignore @web3api/test-env-js", - "build:plugins": "lerna run build --scope @web3api/*-plugin-js --concurrency 1", - "build:client": "lerna run build --scope @web3api/client-js --scope @web3api/react", - "build:test-env": "lerna run build --scope @web3api/test-env-js", - "build:cli": "lerna run build --scope @web3api/cli", - "build:plugins:patch": "lerna run codegen:patch --scope @web3api/*-plugin-js --concurrency 1", + "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/clie* --ignore @polywrap/react --ignore @polywrap/test-env-js", + "build:plugins": "lerna run build --scope @polywrap/*-plugin-js --concurrency 1", + "build:client": "lerna run build --scope @polywrap/client-js --scope @polywrap/react", + "build:test-env": "lerna run build --scope @polywrap/test-env-js", + "build:cli": "lerna run build --scope polywrap", + "build:plugins:patch": "lerna run codegen:patch --scope @polywrap/*-plugin-js --concurrency 1", "lint": "lerna run lint", "lint:fix": "lerna run lint -- --fix", "lint:ci": "yarn lint", - "test": "lerna run test --no-private --ignore @web3api/client-js --concurrency 1 && lerna run test --scope @web3api/client-js", - "test:ci": "lerna run test:ci --no-private --ignore @web3api/client-js --concurrency 1 && lerna run test:ci --scope @web3api/client-js", - "test:core": "lerna run test:ci --no-private --ignore @web3api/*-plugin-js --ignore @web3api/cli* --ignore @web3api/client-js --concurrency 1", - "test:plugins": "lerna run test:ci --no-private --scope @web3api/*-plugin-js --concurrency 1", - "test:client": "lerna run test:ci --no-private --scope @web3api/client-js --concurrency 1", - "test:cli": "lerna run test:ci --no-private --scope @web3api/cli --concurrency 1", + "test": "lerna run test --no-private --ignore @polywrap/client-js --concurrency 1 && lerna run test --scope @polywrap/client-js", + "test:ci": "lerna run test:ci --no-private --ignore @polywrap/client-js --concurrency 1 && lerna run test:ci --scope @polywrap/client-js", + "test:core": "lerna run test:ci --no-private --ignore @polywrap/*-plugin-js --ignore polywrap* --ignore @polywrap/client-js --concurrency 1", + "test:plugins": "lerna run test:ci --no-private --scope @polywrap/*-plugin-js --concurrency 1", + "test:client": "lerna run test:ci --no-private --scope @polywrap/client-js --concurrency 1", + "test:cli": "lerna run test:ci --no-private --scope polywrap --concurrency 1", "version:apply": "npx lerna version $(cat VERSION) --exact --no-git-tag-version --yes", "postversion:apply": "git add . && git commit -m \"build(release): migrate to `cat ./VERSION`\"", "publish:npm": "lerna publish from-package --no-private --yes --registry https://registry.npmjs.org/ --no-verify-access" diff --git a/packages/cli/package.json b/packages/cli/package.json index 1af37f3e41..f16b932152 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/cli", + "name": "polywrap", "description": "Web3API CLI", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -34,17 +34,17 @@ "@ethersproject/providers": "5.6.8", "@ethersproject/wallet": "5.6.2", "@formatjs/intl": "1.8.2", - "@web3api/asyncify-js": "0.0.1-prealpha.85", - "@web3api/client-js": "0.0.1-prealpha.85", - "@web3api/core-js": "0.0.1-prealpha.85", - "@web3api/ens-plugin-js": "0.0.1-prealpha.85", - "@web3api/ethereum-plugin-js": "0.0.1-prealpha.85", - "@web3api/ipfs-plugin-js": "0.0.1-prealpha.85", - "@web3api/os-js": "0.0.1-prealpha.85", - "@web3api/schema-bind": "0.0.1-prealpha.85", - "@web3api/schema-compose": "0.0.1-prealpha.85", - "@web3api/schema-parse": "0.0.1-prealpha.85", - "@web3api/test-env-js": "0.0.1-prealpha.85", + "@polywrap/asyncify-js": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", + "@polywrap/ens-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ipfs-plugin-js": "0.0.1-prealpha.85", + "@polywrap/os-js": "0.0.1-prealpha.85", + "@polywrap/schema-bind": "0.0.1-prealpha.85", + "@polywrap/schema-compose": "0.0.1-prealpha.85", + "@polywrap/schema-parse": "0.0.1-prealpha.85", + "@polywrap/test-env-js": "0.0.1-prealpha.85", "assemblyscript": "0.19.1", "axios": "0.21.2", "chalk": "4.1.0", diff --git a/packages/cli/src/__tests__/e2e/app.spec.ts b/packages/cli/src/__tests__/e2e/app.spec.ts index ded371d593..0670a5c491 100644 --- a/packages/cli/src/__tests__/e2e/app.spec.ts +++ b/packages/cli/src/__tests__/e2e/app.spec.ts @@ -1,7 +1,7 @@ import { clearStyle, w3Cli } from "./utils"; -import { runCLI } from "@web3api/test-env-js"; -import { GetPathToCliTestFiles } from "@web3api/test-cases"; +import { runCLI } from "@polywrap/test-env-js"; +import { GetPathToCliTestFiles } from "@polywrap/test-cases"; import path from "path"; import fs from "fs"; diff --git a/packages/cli/src/__tests__/e2e/build.spec.ts b/packages/cli/src/__tests__/e2e/build.spec.ts index 394a8a6d7a..08f8d6cc6a 100644 --- a/packages/cli/src/__tests__/e2e/build.spec.ts +++ b/packages/cli/src/__tests__/e2e/build.spec.ts @@ -1,8 +1,8 @@ import { Web3ApiProject, loadBuildManifest } from "../../lib"; import { clearStyle, w3Cli } from "./utils"; -import { runCLI } from "@web3api/test-env-js"; -import { GetPathToCliTestFiles } from "@web3api/test-cases"; +import { runCLI } from "@polywrap/test-env-js"; +import { GetPathToCliTestFiles } from "@polywrap/test-cases"; import fs from "fs"; import path from "path"; diff --git a/packages/cli/src/__tests__/e2e/codegen.spec.ts b/packages/cli/src/__tests__/e2e/codegen.spec.ts index cbd0422cf5..a2e03f72a5 100644 --- a/packages/cli/src/__tests__/e2e/codegen.spec.ts +++ b/packages/cli/src/__tests__/e2e/codegen.spec.ts @@ -1,8 +1,8 @@ import { defaultWeb3ApiManifest } from "../../lib"; import { clearStyle, w3Cli } from "./utils"; -import { runCLI } from "@web3api/test-env-js"; -import { GetPathToCliTestFiles } from "@web3api/test-cases"; +import { runCLI } from "@polywrap/test-env-js"; +import { GetPathToCliTestFiles } from "@polywrap/test-cases"; import path from "path"; import fs from "fs"; import rimraf from "rimraf"; diff --git a/packages/cli/src/__tests__/e2e/create.spec.ts b/packages/cli/src/__tests__/e2e/create.spec.ts index 908e81ba28..2ed77fa315 100644 --- a/packages/cli/src/__tests__/e2e/create.spec.ts +++ b/packages/cli/src/__tests__/e2e/create.spec.ts @@ -1,6 +1,6 @@ import { clearStyle, w3Cli } from "./utils"; -import { runCLI } from "@web3api/test-env-js"; +import { runCLI } from "@polywrap/test-env-js"; import rimraf from "rimraf"; const HELP = `Usage: w3 create|c [options] [command] diff --git a/packages/cli/src/__tests__/e2e/deploy.spec.ts b/packages/cli/src/__tests__/e2e/deploy.spec.ts index 68250fa1ab..46b6cc0869 100644 --- a/packages/cli/src/__tests__/e2e/deploy.spec.ts +++ b/packages/cli/src/__tests__/e2e/deploy.spec.ts @@ -6,10 +6,10 @@ import { stopTestEnvironment, ensAddresses, providers -} from "@web3api/test-env-js"; -import { GetPathToCliTestFiles } from "@web3api/test-cases"; -import { Web3ApiClient } from "@web3api/client-js"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; +} from "@polywrap/test-env-js"; +import { GetPathToCliTestFiles } from "@polywrap/test-cases"; +import { Web3ApiClient } from "@polywrap/client-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; import { Wallet } from "@ethersproject/wallet"; import path from "path"; import fs from "fs"; @@ -71,7 +71,7 @@ const setup = async (domainNames: string[]) => { }); const ensWrapperUri = `fs/${path.join( - path.dirname(require.resolve("@web3api/test-env-js")), + path.dirname(require.resolve("@polywrap/test-env-js")), "wrappers", "ens" )}`; diff --git a/packages/cli/src/__tests__/e2e/help.spec.ts b/packages/cli/src/__tests__/e2e/help.spec.ts index 8d6ad83a66..d1437355bf 100644 --- a/packages/cli/src/__tests__/e2e/help.spec.ts +++ b/packages/cli/src/__tests__/e2e/help.spec.ts @@ -1,6 +1,6 @@ import { clearStyle, w3Cli } from "./utils"; -import { runCLI } from "@web3api/test-env-js"; +import { runCLI } from "@polywrap/test-env-js"; const HELP = `Usage: w3 [options] [command] diff --git a/packages/cli/src/__tests__/e2e/infra.spec.ts b/packages/cli/src/__tests__/e2e/infra.spec.ts index ced96aa993..1c7b9fcdf4 100644 --- a/packages/cli/src/__tests__/e2e/infra.spec.ts +++ b/packages/cli/src/__tests__/e2e/infra.spec.ts @@ -3,8 +3,8 @@ import path from "path"; import net from "net"; import { clearStyle, w3Cli } from "./utils"; -import { GetPathToCliTestFiles } from "@web3api/test-cases"; -import { runCLI } from "@web3api/test-env-js"; +import { GetPathToCliTestFiles } from "@polywrap/test-cases"; +import { runCLI } from "@polywrap/test-env-js"; const testCaseRoot = path.join(GetPathToCliTestFiles(), "infra"); const testCases = diff --git a/packages/cli/src/__tests__/e2e/no-command.spec.ts b/packages/cli/src/__tests__/e2e/no-command.spec.ts index 8e24df77fb..d657276c24 100644 --- a/packages/cli/src/__tests__/e2e/no-command.spec.ts +++ b/packages/cli/src/__tests__/e2e/no-command.spec.ts @@ -1,6 +1,6 @@ import { clearStyle, w3Cli } from "./utils"; -import { runCLI } from "@web3api/test-env-js"; +import { runCLI } from "@polywrap/test-env-js"; const HELP = `Usage: w3 [options] [command] diff --git a/packages/cli/src/__tests__/e2e/plugin.spec.ts b/packages/cli/src/__tests__/e2e/plugin.spec.ts index a7e9645d33..51408e2354 100644 --- a/packages/cli/src/__tests__/e2e/plugin.spec.ts +++ b/packages/cli/src/__tests__/e2e/plugin.spec.ts @@ -1,7 +1,7 @@ import { clearStyle } from "./utils"; -import { runCLI } from "@web3api/test-env-js"; -import { GetPathToCliTestFiles } from "@web3api/test-cases"; +import { runCLI } from "@polywrap/test-env-js"; +import { GetPathToCliTestFiles } from "@polywrap/test-cases"; import { compareSync } from "dir-compare"; import path from "path"; import fs from "fs"; diff --git a/packages/cli/src/__tests__/e2e/query.spec.helper.ts b/packages/cli/src/__tests__/e2e/query.spec.helper.ts index 6094d3673f..dfc2a869f6 100644 --- a/packages/cli/src/__tests__/e2e/query.spec.helper.ts +++ b/packages/cli/src/__tests__/e2e/query.spec.helper.ts @@ -1,4 +1,4 @@ -import { normalizeLineEndings } from "@web3api/os-js"; +import { normalizeLineEndings } from "@polywrap/os-js"; import { clearStyle } from "./utils"; export interface ISampleOutputOptions { diff --git a/packages/cli/src/__tests__/e2e/query.spec.ts b/packages/cli/src/__tests__/e2e/query.spec.ts index f4dc1b28f8..79dbb72483 100644 --- a/packages/cli/src/__tests__/e2e/query.spec.ts +++ b/packages/cli/src/__tests__/e2e/query.spec.ts @@ -4,9 +4,9 @@ import yaml from "js-yaml"; import { clearStyle, w3Cli } from "./utils"; -import { buildAndDeployApi, providers, initTestEnvironment, runCLI, stopTestEnvironment } from "@web3api/test-env-js"; -import { GetPathToCliTestFiles } from "@web3api/test-cases"; -import { normalizeLineEndings } from "@web3api/os-js"; +import { buildAndDeployApi, providers, initTestEnvironment, runCLI, stopTestEnvironment } from "@polywrap/test-env-js"; +import { GetPathToCliTestFiles } from "@polywrap/test-cases"; +import { normalizeLineEndings } from "@polywrap/os-js"; import { checkSampleQueryOutput, getSampleObjectOutput, diff --git a/packages/cli/src/__tests__/unit/docker.spec.ts b/packages/cli/src/__tests__/unit/docker.spec.ts index cf77f08158..d61e11aa0e 100644 --- a/packages/cli/src/__tests__/unit/docker.spec.ts +++ b/packages/cli/src/__tests__/unit/docker.spec.ts @@ -1,7 +1,7 @@ import { w3Cli } from "../e2e/utils"; -import { initTestEnvironment, runCLI, stopTestEnvironment } from "@web3api/test-env-js"; -import { GetPathToCliTestFiles } from "@web3api/test-cases"; +import { initTestEnvironment, runCLI, stopTestEnvironment } from "@polywrap/test-env-js"; +import { GetPathToCliTestFiles } from "@polywrap/test-cases"; import path from "path"; describe("e2e tests for docker", () => { diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 079291258d..294341b6c6 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -3,7 +3,7 @@ import * as Commands from "./commands"; import { Command } from "./commands/types"; -import { executeMaybeAsyncFunction } from "@web3api/core-js"; +import { executeMaybeAsyncFunction } from "@polywrap/core-js"; import { program } from "commander"; export const run = async (argv: string[]): Promise => { diff --git a/packages/cli/src/commands/app.ts b/packages/cli/src/commands/app.ts index 09d891479e..c0fe7ec35e 100644 --- a/packages/cli/src/commands/app.ts +++ b/packages/cli/src/commands/app.ts @@ -10,7 +10,7 @@ import { parseAppCodegenDirOption, } from "../lib"; -import { Web3ApiClient } from "@web3api/client-js"; +import { Web3ApiClient } from "@polywrap/client-js"; import * as path from "path"; const defaultOutputTypesDir = "./src/w3"; diff --git a/packages/cli/src/commands/deploy.ts b/packages/cli/src/commands/deploy.ts index 51634b322f..47c009a971 100644 --- a/packages/cli/src/commands/deploy.ts +++ b/packages/cli/src/commands/deploy.ts @@ -12,7 +12,7 @@ import { Command, Program } from "./types"; import fs from "fs"; import nodePath from "path"; import { print } from "gluegun"; -import { Uri, DeployManifest } from "@web3api/core-js"; +import { Uri, DeployManifest } from "@polywrap/core-js"; import { validate } from "jsonschema"; const defaultManifestStr = defaultWeb3ApiManifest.join(" | "); diff --git a/packages/cli/src/commands/infra.ts b/packages/cli/src/commands/infra.ts index 85c11d9a0b..22695eb4d4 100644 --- a/packages/cli/src/commands/infra.ts +++ b/packages/cli/src/commands/infra.ts @@ -7,7 +7,7 @@ import { Argument } from "commander"; import chalk from "chalk"; import yaml from "js-yaml"; import { readdirSync } from "fs"; -import { InfraManifest } from "@web3api/core-js"; +import { InfraManifest } from "@polywrap/core-js"; type InfraCommandOptions = { modules?: string; diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index 97f154ce98..fca30f9c9f 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -12,8 +12,8 @@ import { parsePluginPublishDirOption, } from "../lib"; -import { ComposerFilter } from "@web3api/schema-compose"; -import { writeFileSync } from "@web3api/os-js"; +import { ComposerFilter } from "@polywrap/schema-compose"; +import { writeFileSync } from "@polywrap/os-js"; import path from "path"; import fs from "fs"; diff --git a/packages/cli/src/commands/query.ts b/packages/cli/src/commands/query.ts index f7fd88ab43..aed6b6b1b5 100644 --- a/packages/cli/src/commands/query.ts +++ b/packages/cli/src/commands/query.ts @@ -5,7 +5,7 @@ import { parseRecipeOutputFilePathOption, } from "../lib"; -import { Web3ApiClient, Web3ApiClientConfig } from "@web3api/client-js"; +import { Web3ApiClient, Web3ApiClientConfig } from "@polywrap/client-js"; import gql from "graphql-tag"; import path from "path"; import yaml from "js-yaml"; diff --git a/packages/cli/src/lib/CacheDirectory.ts b/packages/cli/src/lib/CacheDirectory.ts index 1d3d5871a0..55c7734efc 100644 --- a/packages/cli/src/lib/CacheDirectory.ts +++ b/packages/cli/src/lib/CacheDirectory.ts @@ -2,7 +2,7 @@ import fs from "fs"; import path from "path"; import rimraf from "rimraf"; import copyfiles from "copyfiles"; -import { writeFileSync } from "@web3api/os-js"; +import { writeFileSync } from "@polywrap/os-js"; export interface CacheDirectoryConfig { rootDir: string; diff --git a/packages/cli/src/lib/CodeGenerator.ts b/packages/cli/src/lib/CodeGenerator.ts index 8daf9e5c1c..37059f8f65 100644 --- a/packages/cli/src/lib/CodeGenerator.ts +++ b/packages/cli/src/lib/CodeGenerator.ts @@ -19,8 +19,8 @@ import { resetDir, } from "./"; -import { BindLanguage, GenerateBindingFn } from "@web3api/schema-bind"; -import { writeDirectorySync } from "@web3api/os-js"; +import { BindLanguage, GenerateBindingFn } from "@polywrap/schema-bind"; +import { writeDirectorySync } from "@polywrap/os-js"; import path from "path"; import { readFileSync } from "fs"; import * as gluegun from "gluegun"; diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index b63aeedbd6..006ec0b70c 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -15,12 +15,12 @@ import { resetDir, } from "./"; -import { Web3ApiManifest, BuildManifest, MetaManifest } from "@web3api/core-js"; -import { WasmWeb3Api } from "@web3api/client-js"; -import { W3Imports } from "@web3api/client-js/build/wasm/types"; -import { AsyncWasmInstance } from "@web3api/asyncify-js"; -import { ComposerOutput } from "@web3api/schema-compose"; -import { writeFileSync, writeDirectorySync } from "@web3api/os-js"; +import { Web3ApiManifest, BuildManifest, MetaManifest } from "@polywrap/core-js"; +import { WasmWeb3Api } from "@polywrap/client-js"; +import { W3Imports } from "@polywrap/client-js/build/wasm/types"; +import { AsyncWasmInstance } from "@polywrap/asyncify-js"; +import { ComposerOutput } from "@polywrap/schema-compose"; +import { writeFileSync, writeDirectorySync } from "@polywrap/os-js"; import * as gluegun from "gluegun"; import fs from "fs"; import path from "path"; diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index 0ea50d2a71..b31e1e1715 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -3,14 +3,14 @@ import { Project, AnyManifest, getSimpleClient } from "./"; -import { Uri, Web3ApiClient } from "@web3api/client-js"; +import { Uri, Web3ApiClient } from "@polywrap/client-js"; import { composeSchema, ComposerOutput, ComposerFilter, ComposerOptions, SchemaFile, -} from "@web3api/schema-compose"; +} from "@polywrap/schema-compose"; import fs from "fs"; import path from "path"; import * as gluegun from "gluegun"; diff --git a/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts b/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts index 28b266c08e..fe60c01372 100644 --- a/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts +++ b/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts @@ -1,7 +1,7 @@ import { CompilerOverrides } from "../../../../Compiler"; import { intlMsg } from "../../../../intl"; -import { Web3ApiManifest } from "@web3api/core-js"; +import { Web3ApiManifest } from "@polywrap/core-js"; export function getCompilerOverrides(): CompilerOverrides { return { diff --git a/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts b/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts index e9f5222b65..83ec3d3298 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts @@ -4,10 +4,10 @@ import { Deployer } from "../../../deploy/deployer"; import { Wallet } from "@ethersproject/wallet"; import { JsonRpcProvider } from "@ethersproject/providers"; -import { Uri } from "@web3api/core-js"; -import { Web3ApiClient } from "@web3api/client-js"; +import { Uri } from "@polywrap/core-js"; +import { Web3ApiClient } from "@polywrap/client-js"; import path from "path"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; const contentHash = require("content-hash"); @@ -43,7 +43,7 @@ class ENSPublisher implements Deployer { const ethereumPluginUri = "w3://ens/ethereum.web3api.eth"; const ensWrapperUri = `fs/${path.join( - path.dirname(require.resolve("@web3api/test-env-js")), + path.dirname(require.resolve("@polywrap/test-env-js")), "wrappers", "ens" )}`; diff --git a/packages/cli/src/lib/defaults/deploy-modules/ipfs-test/index.ts b/packages/cli/src/lib/defaults/deploy-modules/ipfs-test/index.ts index 1cc32c0066..a184f256b6 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/ipfs-test/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/ipfs-test/index.ts @@ -1,6 +1,6 @@ import { Deployer } from "../../../deploy/deployer"; -import { Uri } from "@web3api/core-js"; +import { Uri } from "@polywrap/core-js"; class IPFSDeployer implements Deployer { // eslint-disable-next-line @typescript-eslint/naming-convention diff --git a/packages/cli/src/lib/defaults/deploy-modules/ipfs/index.ts b/packages/cli/src/lib/defaults/deploy-modules/ipfs/index.ts index a861906974..060517d75d 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/ipfs/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/ipfs/index.ts @@ -1,6 +1,6 @@ import { Deployer } from "../../../deploy/deployer"; -import { Uri } from "@web3api/core-js"; +import { Uri } from "@polywrap/core-js"; // eslint-disable-next-line @typescript-eslint/no-require-imports,@typescript-eslint/no-var-requires,@typescript-eslint/naming-convention const IPFSClient = require("ipfs-http-client"); diff --git a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts index 05afc287c0..171035b612 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts @@ -2,11 +2,11 @@ /* eslint-disable @typescript-eslint/no-var-requires */ import { Deployer } from "../../../deploy/deployer"; -import { Uri } from "@web3api/core-js"; -import { ensAddresses } from "@web3api/test-env-js"; +import { Uri } from "@polywrap/core-js"; +import { ensAddresses } from "@polywrap/test-env-js"; import path from "path"; -import { Web3ApiClient } from "@web3api/client-js"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; +import { Web3ApiClient } from "@polywrap/client-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; const contentHash = require("content-hash"); @@ -61,7 +61,7 @@ class LocalDevENSPublisher implements Deployer { } const ensWrapperUri = `fs/${path.join( - path.dirname(require.resolve("@web3api/test-env-js")), + path.dirname(require.resolve("@polywrap/test-env-js")), "wrappers", "ens" )}`; diff --git a/packages/cli/src/lib/deploy/deployer.ts b/packages/cli/src/lib/deploy/deployer.ts index ef9b5e731f..c4fa2ee385 100644 --- a/packages/cli/src/lib/deploy/deployer.ts +++ b/packages/cli/src/lib/deploy/deployer.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-require-imports */ import { AsciiTree } from "./asciiTree"; -import { Uri } from "@web3api/core-js"; +import { Uri } from "@polywrap/core-js"; import { GluegunPrint } from "gluegun"; export interface Deployer { diff --git a/packages/cli/src/lib/helpers/client.ts b/packages/cli/src/lib/helpers/client.ts index bfbeef0f8a..e7d3473803 100644 --- a/packages/cli/src/lib/helpers/client.ts +++ b/packages/cli/src/lib/helpers/client.ts @@ -1,8 +1,8 @@ -import { PluginRegistration } from "@web3api/core-js"; -import { ensPlugin } from "@web3api/ens-plugin-js"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; -import { ipfsPlugin } from "@web3api/ipfs-plugin-js"; -import { Web3ApiClient, defaultIpfsProviders } from "@web3api/client-js"; +import { PluginRegistration } from "@polywrap/core-js"; +import { ensPlugin } from "@polywrap/ens-plugin-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; +import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; +import { Web3ApiClient, defaultIpfsProviders } from "@polywrap/client-js"; interface SimpleClientConfig { ensAddress?: string; diff --git a/packages/cli/src/lib/helpers/metadata.ts b/packages/cli/src/lib/helpers/metadata.ts index 3a0c5744f0..c7017a4cfe 100644 --- a/packages/cli/src/lib/helpers/metadata.ts +++ b/packages/cli/src/lib/helpers/metadata.ts @@ -1,8 +1,8 @@ import { withSpinner } from "./"; import { displayPath, intlMsg } from "../"; -import { normalizePath } from "@web3api/os-js"; -import { MetaManifest } from "@web3api/core-js"; +import { normalizePath } from "@polywrap/os-js"; +import { MetaManifest } from "@polywrap/core-js"; import { Ora } from "ora"; import fs from "fs"; import path from "path"; diff --git a/packages/cli/src/lib/helpers/validate-client-config.ts b/packages/cli/src/lib/helpers/validate-client-config.ts index e849802b30..d353ffec61 100644 --- a/packages/cli/src/lib/helpers/validate-client-config.ts +++ b/packages/cli/src/lib/helpers/validate-client-config.ts @@ -8,7 +8,7 @@ import { Uri, UriRedirect, Web3ApiClientConfig, -} from "@web3api/client-js"; +} from "@polywrap/client-js"; export function validateRedirects( redirects: UriRedirect[] diff --git a/packages/cli/src/lib/infra/Infra.ts b/packages/cli/src/lib/infra/Infra.ts index dfc9e3683b..cd29110ff8 100644 --- a/packages/cli/src/lib/infra/Infra.ts +++ b/packages/cli/src/lib/infra/Infra.ts @@ -6,7 +6,7 @@ import { CacheDirectory, } from "../"; -import { InfraManifest } from "@web3api/core-js"; +import { InfraManifest } from "@polywrap/core-js"; import path from "path"; import fs, { lstatSync, readdirSync } from "fs"; import YAML from "js-yaml"; diff --git a/packages/cli/src/lib/manifest/app/languages.ts b/packages/cli/src/lib/manifest/app/languages.ts index 995a49de2c..ce89cd41e0 100644 --- a/packages/cli/src/lib/manifest/app/languages.ts +++ b/packages/cli/src/lib/manifest/app/languages.ts @@ -1,6 +1,6 @@ import { intlMsg } from "../../intl"; -import { BindLanguage } from "@web3api/schema-bind"; +import { BindLanguage } from "@polywrap/schema-bind"; export const appManifestLanguages = { "app/typescript": "app/typescript", diff --git a/packages/cli/src/lib/manifest/app/load.ts b/packages/cli/src/lib/manifest/app/load.ts index 5158774198..117036387d 100644 --- a/packages/cli/src/lib/manifest/app/load.ts +++ b/packages/cli/src/lib/manifest/app/load.ts @@ -1,6 +1,6 @@ import { displayPath, withSpinner, intlMsg } from "../../"; -import { AppManifest, deserializeAppManifest } from "@web3api/core-js"; +import { AppManifest, deserializeAppManifest } from "@polywrap/core-js"; import fs from "fs"; export const defaultAppManifest = ["web3api.app.yaml", "web3api.app.yml"]; diff --git a/packages/cli/src/lib/manifest/index.ts b/packages/cli/src/lib/manifest/index.ts index bbd3a92c9c..39d8b4dc65 100644 --- a/packages/cli/src/lib/manifest/index.ts +++ b/packages/cli/src/lib/manifest/index.ts @@ -4,6 +4,6 @@ export * from "./web3api"; export * from "./language"; export * from "./output"; -import { Web3ApiManifest, PluginManifest, AppManifest } from "@web3api/core-js"; +import { Web3ApiManifest, PluginManifest, AppManifest } from "@polywrap/core-js"; export type AnyManifest = Web3ApiManifest | PluginManifest | AppManifest; diff --git a/packages/cli/src/lib/manifest/output.ts b/packages/cli/src/lib/manifest/output.ts index 62fe67376b..8b549a8243 100644 --- a/packages/cli/src/lib/manifest/output.ts +++ b/packages/cli/src/lib/manifest/output.ts @@ -5,8 +5,8 @@ import { Web3ApiManifest, MetaManifest, PluginManifest, -} from "@web3api/core-js"; -import { writeFileSync, normalizePath } from "@web3api/os-js"; +} from "@polywrap/core-js"; +import { writeFileSync, normalizePath } from "@polywrap/os-js"; import YAML from "js-yaml"; import path from "path"; import fs from "fs"; diff --git a/packages/cli/src/lib/manifest/plugin/languages.ts b/packages/cli/src/lib/manifest/plugin/languages.ts index 7b3b5bcbdc..3e2b8a7ba6 100644 --- a/packages/cli/src/lib/manifest/plugin/languages.ts +++ b/packages/cli/src/lib/manifest/plugin/languages.ts @@ -1,6 +1,6 @@ import { intlMsg } from "../../intl"; -import { BindLanguage } from "@web3api/schema-bind"; +import { BindLanguage } from "@polywrap/schema-bind"; export const pluginManifestLanguages = { "plugin/typescript": "plugin/typescript", diff --git a/packages/cli/src/lib/manifest/plugin/load.ts b/packages/cli/src/lib/manifest/plugin/load.ts index bf31be778c..b1ed87c6c3 100644 --- a/packages/cli/src/lib/manifest/plugin/load.ts +++ b/packages/cli/src/lib/manifest/plugin/load.ts @@ -1,6 +1,6 @@ import { displayPath, withSpinner, intlMsg } from "../../"; -import { PluginManifest, deserializePluginManifest } from "@web3api/core-js"; +import { PluginManifest, deserializePluginManifest } from "@polywrap/core-js"; import fs from "fs"; export const defaultPluginManifest = [ diff --git a/packages/cli/src/lib/manifest/web3api/languages.ts b/packages/cli/src/lib/manifest/web3api/languages.ts index 0aecf16991..c3c238a759 100644 --- a/packages/cli/src/lib/manifest/web3api/languages.ts +++ b/packages/cli/src/lib/manifest/web3api/languages.ts @@ -1,6 +1,6 @@ import { intlMsg } from "../../intl"; -import { BindLanguage } from "@web3api/schema-bind"; +import { BindLanguage } from "@polywrap/schema-bind"; export const web3apiManifestLanguages = { "wasm/assemblyscript": "wasm/assemblyscript", diff --git a/packages/cli/src/lib/manifest/web3api/load.ts b/packages/cli/src/lib/manifest/web3api/load.ts index 7a7e38b655..b54e1b591d 100644 --- a/packages/cli/src/lib/manifest/web3api/load.ts +++ b/packages/cli/src/lib/manifest/web3api/load.ts @@ -17,7 +17,7 @@ import { deserializeDeployManifest, InfraManifest, deserializeInfraManifest, -} from "@web3api/core-js"; +} from "@polywrap/core-js"; import { Schema as JsonSchema } from "jsonschema"; import path from "path"; import fs from "fs"; diff --git a/packages/cli/src/lib/option-parsers/query.ts b/packages/cli/src/lib/option-parsers/query.ts index a6210e63c5..5384b4c1a5 100644 --- a/packages/cli/src/lib/option-parsers/query.ts +++ b/packages/cli/src/lib/option-parsers/query.ts @@ -5,8 +5,8 @@ import { validateClientConfig } from "../helpers"; import path from "path"; import fs from "fs"; -import { Web3ApiClientConfig } from "@web3api/client-js"; -import { executeMaybeAsyncFunction } from "@web3api/core-js"; +import { Web3ApiClientConfig } from "@polywrap/client-js"; +import { executeMaybeAsyncFunction } from "@polywrap/core-js"; export function parseRecipeScriptPathOption( script: string, diff --git a/packages/cli/src/lib/project-templates/index.ts b/packages/cli/src/lib/project-templates/index.ts index c70e833221..8be73b323b 100644 --- a/packages/cli/src/lib/project-templates/index.ts +++ b/packages/cli/src/lib/project-templates/index.ts @@ -97,7 +97,7 @@ export const generateProjectTemplate = ( const isOnline = checkIfOnline(useYarn); const root = path.resolve(projectName); - const dependencies: string[] = ["@web3api/templates"]; + const dependencies: string[] = ["@polywrap/templates"]; fs.write( `${root}/package.json`, @@ -147,7 +147,7 @@ export const generateProjectTemplate = ( executeCommand(command, args, root) .then(() => { copyAsync( - `${root}/node_modules/@web3api/templates/${type}/${lang}`, + `${root}/node_modules/@polywrap/templates/${type}/${lang}`, `${root}`, { overwrite: true, @@ -158,7 +158,7 @@ export const generateProjectTemplate = ( }) .catch(() => { reject({ - command: `copy ${root}/node_modules/@web3api/templates/${type}/${lang} ${root}`, + command: `copy ${root}/node_modules/@polywrap/templates/${type}/${lang} ${root}`, }); }); }) diff --git a/packages/cli/src/lib/project/AppProject.ts b/packages/cli/src/lib/project/AppProject.ts index cdaa66343e..b1b99b2adb 100644 --- a/packages/cli/src/lib/project/AppProject.ts +++ b/packages/cli/src/lib/project/AppProject.ts @@ -7,10 +7,10 @@ import { appManifestLanguageToBindLanguage, } from ".."; -import { AppManifest, Client } from "@web3api/core-js"; -import { ComposerOutput } from "@web3api/schema-compose"; -import { bindSchema, BindOutput } from "@web3api/schema-bind"; -import { TypeInfo } from "@web3api/schema-parse"; +import { AppManifest, Client } from "@polywrap/core-js"; +import { ComposerOutput } from "@polywrap/schema-compose"; +import { bindSchema, BindOutput } from "@polywrap/schema-bind"; +import { TypeInfo } from "@polywrap/schema-parse"; import path from "path"; export interface AppProjectConfig extends ProjectConfig { diff --git a/packages/cli/src/lib/project/PluginProject.ts b/packages/cli/src/lib/project/PluginProject.ts index b63c16c92b..de8644dae5 100644 --- a/packages/cli/src/lib/project/PluginProject.ts +++ b/packages/cli/src/lib/project/PluginProject.ts @@ -8,10 +8,10 @@ import { resetDir, } from ".."; -import { PluginManifest } from "@web3api/core-js"; -import { bindSchema, BindOutput, BindOptions } from "@web3api/schema-bind"; -import { ComposerOutput } from "@web3api/schema-compose"; -import { TypeInfo } from "@web3api/schema-parse"; +import { PluginManifest } from "@polywrap/core-js"; +import { bindSchema, BindOutput, BindOptions } from "@polywrap/schema-bind"; +import { ComposerOutput } from "@polywrap/schema-compose"; +import { TypeInfo } from "@polywrap/schema-parse"; import path from "path"; export interface PluginProjectConfig extends ProjectConfig { diff --git a/packages/cli/src/lib/project/Project.ts b/packages/cli/src/lib/project/Project.ts index a07c73a4d0..a62d87c237 100644 --- a/packages/cli/src/lib/project/Project.ts +++ b/packages/cli/src/lib/project/Project.ts @@ -6,8 +6,8 @@ import { CacheDirectoryConfig, } from "../"; -import { BindOutput } from "@web3api/schema-bind"; -import { ComposerOutput } from "@web3api/schema-compose"; +import { BindOutput } from "@polywrap/schema-bind"; +import { ComposerOutput } from "@polywrap/schema-compose"; export interface ProjectConfig { rootDir: string; diff --git a/packages/cli/src/lib/project/Web3ApiProject.ts b/packages/cli/src/lib/project/Web3ApiProject.ts index 90eb09754d..5c0f132d73 100644 --- a/packages/cli/src/lib/project/Web3ApiProject.ts +++ b/packages/cli/src/lib/project/Web3ApiProject.ts @@ -25,11 +25,11 @@ import { Web3ApiManifest, MetaManifest, DeployManifest, -} from "@web3api/core-js"; -import { normalizePath } from "@web3api/os-js"; -import { bindSchema, BindOutput, BindOptions } from "@web3api/schema-bind"; -import { ComposerOutput } from "@web3api/schema-compose"; -import { TypeInfo } from "@web3api/schema-parse"; +} from "@polywrap/core-js"; +import { normalizePath } from "@polywrap/os-js"; +import { bindSchema, BindOutput, BindOptions } from "@polywrap/schema-bind"; +import { ComposerOutput } from "@polywrap/schema-compose"; +import { TypeInfo } from "@polywrap/schema-parse"; import regexParser from "regex-parser"; import path from "path"; import { Schema as JsonSchema } from "jsonschema"; diff --git a/packages/cli/src/lib/system/DockerCompose.ts b/packages/cli/src/lib/system/DockerCompose.ts index 058fa363b5..f1802e03ab 100644 --- a/packages/cli/src/lib/system/DockerCompose.ts +++ b/packages/cli/src/lib/system/DockerCompose.ts @@ -3,7 +3,7 @@ import { getDockerFileLock } from "./docker"; import path from "path"; import Commands, { IDockerComposeOptions } from "docker-compose"; -import { InfraManifest } from "@web3api/core-js"; +import { InfraManifest } from "@polywrap/core-js"; export class DockerCompose { private _dockerLock = getDockerFileLock(); diff --git a/packages/cli/src/lib/system/docker.ts b/packages/cli/src/lib/system/docker.ts index d83823542f..89630acd07 100644 --- a/packages/cli/src/lib/system/docker.ts +++ b/packages/cli/src/lib/system/docker.ts @@ -3,7 +3,7 @@ import { displayPath, runCommand, FileLock } from "./"; import { withSpinner, intlMsg } from "../"; -import { isWin, writeFileSync } from "@web3api/os-js"; +import { isWin, writeFileSync } from "@polywrap/os-js"; import { system, print } from "gluegun"; import Mustache from "mustache"; import YAML from "js-yaml"; diff --git a/packages/cli/src/lib/test-env/client-config.ts b/packages/cli/src/lib/test-env/client-config.ts index 82166050e4..d861346717 100644 --- a/packages/cli/src/lib/test-env/client-config.ts +++ b/packages/cli/src/lib/test-env/client-config.ts @@ -4,11 +4,11 @@ import { PluginRegistration, Web3ApiClientConfig, defaultIpfsProviders, -} from "@web3api/client-js"; -import { ensPlugin } from "@web3api/ens-plugin-js"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; -import { ipfsPlugin } from "@web3api/ipfs-plugin-js"; -import { ensAddresses } from "@web3api/test-env-js"; +} from "@polywrap/client-js"; +import { ensPlugin } from "@polywrap/ens-plugin-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; +import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; +import { ensAddresses } from "@polywrap/test-env-js"; export async function getTestEnvClientConfig(): Promise< Partial diff --git a/packages/cli/src/lib/test-env/providers.ts b/packages/cli/src/lib/test-env/providers.ts index 60159fcb46..bfe81b5589 100644 --- a/packages/cli/src/lib/test-env/providers.ts +++ b/packages/cli/src/lib/test-env/providers.ts @@ -1,4 +1,4 @@ -import { providers } from "@web3api/test-env-js"; +import { providers } from "@polywrap/test-env-js"; export async function getTestEnvProviders( ipfsProvider?: string, diff --git a/packages/core-interfaces/logger/package.json b/packages/core-interfaces/logger/package.json index ac55cb1383..f244f68055 100644 --- a/packages/core-interfaces/logger/package.json +++ b/packages/core-interfaces/logger/package.json @@ -11,6 +11,6 @@ "deploy": "npx w3 build --ipfs http://localhost:5001" }, "devDependencies": { - "@web3api/cli": "0.0.1-prealpha.85" + "polywrap": "0.0.1-prealpha.85" } } diff --git a/packages/core-interfaces/uri-resolver/package.json b/packages/core-interfaces/uri-resolver/package.json index b478218b85..8aeb7ccbd5 100644 --- a/packages/core-interfaces/uri-resolver/package.json +++ b/packages/core-interfaces/uri-resolver/package.json @@ -11,6 +11,6 @@ "deploy": "npx w3 build --ipfs http://localhost:5001" }, "devDependencies": { - "@web3api/cli": "0.0.1-prealpha.85" + "polywrap": "0.0.1-prealpha.85" } } diff --git a/packages/js/asyncify/package.json b/packages/js/asyncify/package.json index c076d82671..950af1ef1f 100644 --- a/packages/js/asyncify/package.json +++ b/packages/js/asyncify/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/asyncify-js", + "name": "@polywrap/asyncify-js", "description": "Async Wasm Imports Support Using Asyncify", "version": "0.0.1-prealpha.85", "license": "MIT", diff --git a/packages/js/client/package.json b/packages/js/client/package.json index 3234bf0114..e2a4b39970 100644 --- a/packages/js/client/package.json +++ b/packages/js/client/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/client-js", + "name": "@polywrap/client-js", "description": "Web3API Javascript Client", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -21,19 +21,19 @@ "test:watch": "jest --watch --passWithNoTests --verbose --detectOpenHandles" }, "dependencies": { - "@web3api/asyncify-js": "0.0.1-prealpha.85", - "@web3api/core-js": "0.0.1-prealpha.85", - "@web3api/ens-plugin-js": "0.0.1-prealpha.85", - "@web3api/ethereum-plugin-js": "0.0.1-prealpha.85", - "@web3api/fs-plugin-js": "0.0.1-prealpha.85", - "@web3api/graph-node-plugin-js": "0.0.1-prealpha.85", - "@web3api/http-plugin-js": "0.0.1-prealpha.85", - "@web3api/ipfs-plugin-js": "0.0.1-prealpha.85", - "@web3api/logger-plugin-js": "0.0.1-prealpha.85", - "@web3api/schema-parse": "0.0.1-prealpha.85", - "@web3api/sha3-plugin-js": "0.0.1-prealpha.85", - "@web3api/tracing-js": "0.0.1-prealpha.85", - "@web3api/uts46-plugin-js": "0.0.1-prealpha.85", + "@polywrap/asyncify-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", + "@polywrap/ens-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.85", + "@polywrap/fs-plugin-js": "0.0.1-prealpha.85", + "@polywrap/graph-node-plugin-js": "0.0.1-prealpha.85", + "@polywrap/http-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ipfs-plugin-js": "0.0.1-prealpha.85", + "@polywrap/logger-plugin-js": "0.0.1-prealpha.85", + "@polywrap/schema-parse": "0.0.1-prealpha.85", + "@polywrap/sha3-plugin-js": "0.0.1-prealpha.85", + "@polywrap/tracing-js": "0.0.1-prealpha.85", + "@polywrap/uts46-plugin-js": "0.0.1-prealpha.85", "graphql": "15.5.0", "js-yaml": "3.14.0", "uuid": "8.3.2" @@ -43,10 +43,10 @@ "@types/js-yaml": "3.11.1", "@types/prettier": "2.6.0", "@types/uuid": "8.3.0", - "@web3api/cli": "0.0.1-prealpha.85", - "@web3api/os-js": "0.0.1-prealpha.85", - "@web3api/test-cases": "0.0.1-prealpha.85", - "@web3api/test-env-js": "0.0.1-prealpha.85", + "polywrap": "0.0.1-prealpha.85", + "@polywrap/os-js": "0.0.1-prealpha.85", + "@polywrap/test-cases": "0.0.1-prealpha.85", + "@polywrap/test-env-js": "0.0.1-prealpha.85", "bignumber.js": "9.0.2", "jest": "26.6.3", "rimraf": "3.0.2", diff --git a/packages/js/client/scripts/extractPluginConfigs.ts b/packages/js/client/scripts/extractPluginConfigs.ts index 2d3e272c9a..59f11b130b 100644 --- a/packages/js/client/scripts/extractPluginConfigs.ts +++ b/packages/js/client/scripts/extractPluginConfigs.ts @@ -1,5 +1,5 @@ import { Project as TsProject } from "ts-morph"; -import { writeFileSync } from "@web3api/os-js"; +import { writeFileSync } from "@polywrap/os-js"; import path from "path"; interface PluginConfigSource { @@ -21,7 +21,7 @@ interface PluginConfigSource { const plugins: PluginConfigSource[] = [ { name: "Ipfs", - module: "@web3api/ipfs-plugin-js", + module: "@polywrap/ipfs-plugin-js", uri: "w3://ens/ipfs.web3api.eth", config: "IpfsPluginConfig", files: [ @@ -33,7 +33,7 @@ const plugins: PluginConfigSource[] = [ }, { name: "Ethereum", - module: "@web3api/ethereum-plugin-js", + module: "@polywrap/ethereum-plugin-js", uri: "w3://ens/ethereum.web3api.eth", config: "EthereumPluginConfig", files: [ @@ -64,7 +64,7 @@ const plugins: PluginConfigSource[] = [ }, { name: "Ens", - module: "@web3api/ens-plugin-js", + module: "@polywrap/ens-plugin-js", uri: "w3://ens/ens.web3api.eth", config: "EnsPluginConfig", files: [ diff --git a/packages/js/client/src/Web3ApiClient.ts b/packages/js/client/src/Web3ApiClient.ts index a6d09bfaf3..5e18648e88 100644 --- a/packages/js/client/src/Web3ApiClient.ts +++ b/packages/js/client/src/Web3ApiClient.ts @@ -47,8 +47,8 @@ import { JobRunner, PluginPackage, RunOptions, -} from "@web3api/core-js"; -import { Tracer } from "@web3api/tracing-js"; +} from "@polywrap/core-js"; +import { Tracer } from "@polywrap/tracing-js"; export interface Web3ApiClientConfig extends ClientConfig { diff --git a/packages/js/client/src/__tests__/core/resolveUri.spec.ts b/packages/js/client/src/__tests__/core/resolveUri.spec.ts index bde731b231..180b6a913a 100644 --- a/packages/js/client/src/__tests__/core/resolveUri.spec.ts +++ b/packages/js/client/src/__tests__/core/resolveUri.spec.ts @@ -12,9 +12,9 @@ import { stopTestEnvironment, ensAddresses, providers -} from "@web3api/test-env-js"; -import { GetPathToTestApis } from "@web3api/test-cases"; -import { ResolveUriErrorType } from "@web3api/core-js"; +} from "@polywrap/test-env-js"; +import { GetPathToTestApis } from "@polywrap/test-cases"; +import { ResolveUriErrorType } from "@polywrap/core-js"; jest.setTimeout(200000); diff --git a/packages/js/client/src/__tests__/core/sanity.spec.ts b/packages/js/client/src/__tests__/core/sanity.spec.ts index 30ee49f0d6..158cd1c542 100644 --- a/packages/js/client/src/__tests__/core/sanity.spec.ts +++ b/packages/js/client/src/__tests__/core/sanity.spec.ts @@ -1,6 +1,6 @@ import { coreInterfaceUris, -} from "@web3api/core-js"; +} from "@polywrap/core-js"; import { Uri, Web3ApiClient, diff --git a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts index 953668c23e..2b731ecd9f 100644 --- a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts @@ -4,7 +4,7 @@ import { initTestEnvironment, stopTestEnvironment, providers -} from "@web3api/test-env-js"; +} from "@polywrap/test-env-js"; import { Uri, createWeb3ApiClient, @@ -19,7 +19,7 @@ import { deserializeMetaManifest, msgpackDecode } from "../.."; -import { GetPathToTestApis } from "@web3api/test-cases"; +import { GetPathToTestApis } from "@polywrap/test-cases"; import fs from "fs"; jest.setTimeout(200000); diff --git a/packages/js/client/src/__tests__/e2e/env.spec.ts b/packages/js/client/src/__tests__/e2e/env.spec.ts index 3eee8ed497..1c6dc603d0 100644 --- a/packages/js/client/src/__tests__/e2e/env.spec.ts +++ b/packages/js/client/src/__tests__/e2e/env.spec.ts @@ -1,9 +1,9 @@ import { buildApi, -} from "@web3api/test-env-js"; +} from "@polywrap/test-env-js"; import { createWeb3ApiClient, Web3ApiClientConfig } from "../.."; -import { Client, PluginModule } from "@web3api/core-js"; -import { GetPathToTestApis } from "@web3api/test-cases"; +import { Client, PluginModule } from "@polywrap/core-js"; +import { GetPathToTestApis } from "@polywrap/test-cases"; jest.setTimeout(200000); diff --git a/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts b/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts index 4c0d32c74a..c95f1549d0 100644 --- a/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts +++ b/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts @@ -10,8 +10,8 @@ import { runCLI, ensAddresses, providers -} from "@web3api/test-env-js"; -import { GetPathToTestApis } from "@web3api/test-cases"; +} from "@polywrap/test-env-js"; +import { GetPathToTestApis } from "@polywrap/test-cases"; jest.setTimeout(200000); diff --git a/packages/js/client/src/__tests__/e2e/wasm-rs.ts b/packages/js/client/src/__tests__/e2e/wasm-rs.ts index 042ee7af23..eada39b1d8 100644 --- a/packages/js/client/src/__tests__/e2e/wasm-rs.ts +++ b/packages/js/client/src/__tests__/e2e/wasm-rs.ts @@ -9,8 +9,8 @@ import { initTestEnvironment, stopTestEnvironment, providers -} from "@web3api/test-env-js"; -import { GetPathToTestApis } from "@web3api/test-cases"; +} from "@polywrap/test-env-js"; +import { GetPathToTestApis } from "@polywrap/test-cases"; jest.setTimeout(1200000); diff --git a/packages/js/client/src/__tests__/e2e/workflow-test-cases.ts b/packages/js/client/src/__tests__/e2e/workflow-test-cases.ts index 0fa2a2ea82..50605b33db 100644 --- a/packages/js/client/src/__tests__/e2e/workflow-test-cases.ts +++ b/packages/js/client/src/__tests__/e2e/workflow-test-cases.ts @@ -1,4 +1,4 @@ -import { Workflow } from "@web3api/core-js"; +import { Workflow } from "@polywrap/core-js"; export const sanityWorkflow: Workflow = { name: "simple-storage", diff --git a/packages/js/client/src/__tests__/e2e/workflow.spec.ts b/packages/js/client/src/__tests__/e2e/workflow.spec.ts index 99af788574..c92951c853 100644 --- a/packages/js/client/src/__tests__/e2e/workflow.spec.ts +++ b/packages/js/client/src/__tests__/e2e/workflow.spec.ts @@ -1,11 +1,11 @@ -import { GetPathToTestApis } from "@web3api/test-cases"; +import { GetPathToTestApis } from "@polywrap/test-cases"; import { buildAndDeployApi, initTestEnvironment, stopTestEnvironment, ensAddresses, providers -} from "@web3api/test-env-js"; +} from "@polywrap/test-env-js"; import { createWeb3ApiClient, Web3ApiClient, Web3ApiClientConfig } from "../.."; import { outPropWorkflow, sanityWorkflow } from "./workflow-test-cases"; diff --git a/packages/js/client/src/createWeb3ApiClient.ts b/packages/js/client/src/createWeb3ApiClient.ts index 86b2aa3a7d..f71bc0f3f5 100644 --- a/packages/js/client/src/createWeb3ApiClient.ts +++ b/packages/js/client/src/createWeb3ApiClient.ts @@ -4,8 +4,8 @@ import { Web3ApiClient, Web3ApiClientConfig } from "./Web3ApiClient"; import { PluginConfigs, modules, uris } from "./pluginConfigs"; -import { PluginRegistration } from "@web3api/core-js"; -import { Tracer } from "@web3api/tracing-js"; +import { PluginRegistration } from "@polywrap/core-js"; +import { Tracer } from "@polywrap/tracing-js"; export { PluginConfigs }; diff --git a/packages/js/client/src/default-client-config.ts b/packages/js/client/src/default-client-config.ts index 96c4649a54..edfde42d24 100644 --- a/packages/js/client/src/default-client-config.ts +++ b/packages/js/client/src/default-client-config.ts @@ -11,17 +11,17 @@ import { CacheResolver, PluginResolver, RedirectsResolver, -} from "@web3api/core-js"; -import { ipfsPlugin } from "@web3api/ipfs-plugin-js"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; -import { ensPlugin } from "@web3api/ens-plugin-js"; -import { graphNodePlugin } from "@web3api/graph-node-plugin-js"; -import { httpPlugin } from "@web3api/http-plugin-js"; -import { filesystemPlugin } from "@web3api/fs-plugin-js"; -import { uts46Plugin } from "@web3api/uts46-plugin-js"; -import { sha3Plugin } from "@web3api/sha3-plugin-js"; -import { loggerPlugin } from "@web3api/logger-plugin-js"; -import { Tracer } from "@web3api/tracing-js"; +} from "@polywrap/core-js"; +import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; +import { ensPlugin } from "@polywrap/ens-plugin-js"; +import { graphNodePlugin } from "@polywrap/graph-node-plugin-js"; +import { httpPlugin } from "@polywrap/http-plugin-js"; +import { filesystemPlugin } from "@polywrap/fs-plugin-js"; +import { uts46Plugin } from "@polywrap/uts46-plugin-js"; +import { sha3Plugin } from "@polywrap/sha3-plugin-js"; +import { loggerPlugin } from "@polywrap/logger-plugin-js"; +import { Tracer } from "@polywrap/tracing-js"; export const getDefaultClientConfig = Tracer.traceFunc( "client-js: getDefaultClientConfig", diff --git a/packages/js/client/src/index.ts b/packages/js/client/src/index.ts index 9bf4ad4ebe..6dd4c3b3cb 100644 --- a/packages/js/client/src/index.ts +++ b/packages/js/client/src/index.ts @@ -2,4 +2,4 @@ export * from "./Web3ApiClient"; export * from "./createWeb3ApiClient"; export * from "./default-client-config"; export * from "./wasm"; -export * from "@web3api/core-js"; +export * from "@polywrap/core-js"; diff --git a/packages/js/client/src/plugin/PluginWeb3Api.ts b/packages/js/client/src/plugin/PluginWeb3Api.ts index 14a2c740f9..f1a4a9294e 100644 --- a/packages/js/client/src/plugin/PluginWeb3Api.ts +++ b/packages/js/client/src/plugin/PluginWeb3Api.ts @@ -14,8 +14,8 @@ import { Env, msgpackEncode, msgpackDecode, -} from "@web3api/core-js"; -import { Tracer } from "@web3api/tracing-js"; +} from "@polywrap/core-js"; +import { Tracer } from "@polywrap/tracing-js"; export class PluginWeb3Api extends Api { private _instance: PluginModule | undefined; diff --git a/packages/js/client/src/pluginConfigs/Ens.ts b/packages/js/client/src/pluginConfigs/Ens.ts index d4493fcd17..0f1d89ab5c 100644 --- a/packages/js/client/src/pluginConfigs/Ens.ts +++ b/packages/js/client/src/pluginConfigs/Ens.ts @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable prettier/prettier */ -/// Types generated from @web3api/ens-plugin-js build files: +/// Types generated from @polywrap/ens-plugin-js build files: /// build/index.d.ts export interface EnsPluginConfig extends Record { diff --git a/packages/js/client/src/pluginConfigs/Ethereum.ts b/packages/js/client/src/pluginConfigs/Ethereum.ts index 39e1472f85..b20732fa45 100644 --- a/packages/js/client/src/pluginConfigs/Ethereum.ts +++ b/packages/js/client/src/pluginConfigs/Ethereum.ts @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable prettier/prettier */ -/// Types generated from @web3api/ethereum-plugin-js build files: +/// Types generated from @polywrap/ethereum-plugin-js build files: /// build/index.d.ts, build/Connection.d.ts export interface EthereumPluginConfig extends Record { diff --git a/packages/js/client/src/pluginConfigs/Ipfs.ts b/packages/js/client/src/pluginConfigs/Ipfs.ts index 176d67058f..98e94f3e3b 100644 --- a/packages/js/client/src/pluginConfigs/Ipfs.ts +++ b/packages/js/client/src/pluginConfigs/Ipfs.ts @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable prettier/prettier */ -/// Types generated from @web3api/ipfs-plugin-js build files: +/// Types generated from @polywrap/ipfs-plugin-js build files: /// build/index.d.ts export interface IpfsPluginConfig extends Record { diff --git a/packages/js/client/src/pluginConfigs/index.ts b/packages/js/client/src/pluginConfigs/index.ts index 3ce709f489..d8bdb1096a 100644 --- a/packages/js/client/src/pluginConfigs/index.ts +++ b/packages/js/client/src/pluginConfigs/index.ts @@ -13,9 +13,9 @@ interface PluginConfigs { } const modules: Record = { - ipfs: "@web3api/ipfs-plugin-js", - ethereum: "@web3api/ethereum-plugin-js", - ens: "@web3api/ens-plugin-js", + ipfs: "@polywrap/ipfs-plugin-js", + ethereum: "@polywrap/ethereum-plugin-js", + ens: "@polywrap/ens-plugin-js", }; const uris: Record = { diff --git a/packages/js/client/src/wasm/WasmWeb3Api.ts b/packages/js/client/src/wasm/WasmWeb3Api.ts index d8d430426b..efd6af7e27 100644 --- a/packages/js/client/src/wasm/WasmWeb3Api.ts +++ b/packages/js/client/src/wasm/WasmWeb3Api.ts @@ -21,9 +21,9 @@ import { GetFileOptions, msgpackEncode, msgpackDecode, -} from "@web3api/core-js"; -import { Tracer } from "@web3api/tracing-js"; -import { AsyncWasmInstance } from "@web3api/asyncify-js"; +} from "@polywrap/core-js"; +import { Tracer } from "@polywrap/tracing-js"; +import { AsyncWasmInstance } from "@polywrap/asyncify-js"; type InvokeResult = | { type: "InvokeResult"; invokeResult: ArrayBuffer } diff --git a/packages/js/client/src/wasm/imports.ts b/packages/js/client/src/wasm/imports.ts index 870c334eac..453a35eb9e 100644 --- a/packages/js/client/src/wasm/imports.ts +++ b/packages/js/client/src/wasm/imports.ts @@ -5,7 +5,7 @@ import { readBytes, readString, writeBytes, writeString } from "./buffer"; import { Client } from ".."; import { State } from "./WasmWeb3Api"; -import { msgpackEncode } from "@web3api/core-js"; +import { msgpackEncode } from "@polywrap/core-js"; export const createImports = (config: { client: Client; diff --git a/packages/js/core/package.json b/packages/js/core/package.json index 1a1190cd36..54a4b8ea05 100644 --- a/packages/js/core/package.json +++ b/packages/js/core/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/core-js", + "name": "@polywrap/core-js", "description": "Web3API Javascript Core", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -21,8 +21,8 @@ }, "dependencies": { "@msgpack/msgpack": "2.7.2", - "@web3api/manifest-schemas": "0.0.1-prealpha.85", - "@web3api/tracing-js": "0.0.1-prealpha.85", + "@polywrap/manifest-schemas": "0.0.1-prealpha.85", + "@polywrap/tracing-js": "0.0.1-prealpha.85", "graphql": "15.5.0", "graphql-tag": "2.10.4", "js-yaml": "3.14.0", @@ -33,7 +33,7 @@ "@types/jest": "26.0.8", "@types/prettier": "2.6.0", "@types/semver": "7.3.8", - "@web3api/os-js": "0.0.1-prealpha.85", + "@polywrap/os-js": "0.0.1-prealpha.85", "jest": "26.6.3", "json-schema-to-typescript": "10.1.3", "mustache": "4.0.1", diff --git a/packages/js/core/scripts/manifest/deserialize-ts.mustache b/packages/js/core/scripts/manifest/deserialize-ts.mustache index ec7d88954d..fe7f0190c1 100644 --- a/packages/js/core/scripts/manifest/deserialize-ts.mustache +++ b/packages/js/core/scripts/manifest/deserialize-ts.mustache @@ -16,7 +16,7 @@ import { DeserializeManifestOptions } from "../../"; import { compare } from "semver"; import YAML from "js-yaml"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const deserialize{{type}} = Tracer.traceFunc( "core: deserialize{{type}}", diff --git a/packages/js/core/scripts/manifest/generateFormatTypes.js b/packages/js/core/scripts/manifest/generateFormatTypes.js index 4443d7446c..9654b83125 100644 --- a/packages/js/core/scripts/manifest/generateFormatTypes.js +++ b/packages/js/core/scripts/manifest/generateFormatTypes.js @@ -1,13 +1,13 @@ const SchemaToTypescript = require("json-schema-to-typescript"); -const os = require("@web3api/os-js"); +const os = require("@polywrap/os-js"); const fs = require("fs"); const path = require("path"); const Mustache = require("mustache"); async function generateFormatTypes() { - // Fetch all schemas within the @web3api/manifest-schemas/formats directory + // Fetch all schemas within the @polywrap/manifest-schemas/formats directory const formatsDir = path.join( - path.dirname(require.resolve("@web3api/manifest-schemas")), + path.dirname(require.resolve("@polywrap/manifest-schemas")), "formats" ); diff --git a/packages/js/core/scripts/manifest/migrate-ts.mustache b/packages/js/core/scripts/manifest/migrate-ts.mustache index 3a55ddf133..acb1153c75 100644 --- a/packages/js/core/scripts/manifest/migrate-ts.mustache +++ b/packages/js/core/scripts/manifest/migrate-ts.mustache @@ -17,7 +17,7 @@ import { } from "./migrators/{{version}}_to_{{#latest}}{{version}}{{/latest}}"; {{/prevFormats}} -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; type Migrator = { [key in {{#latest}}{{type}}{{/latest}}Formats]?: (m: Any{{#latest}}{{type}}{{/latest}}) => {{#latest}}{{type}}{{/latest}}; diff --git a/packages/js/core/scripts/manifest/validate-ts.mustache b/packages/js/core/scripts/manifest/validate-ts.mustache index 1ecce52828..691fa5d402 100644 --- a/packages/js/core/scripts/manifest/validate-ts.mustache +++ b/packages/js/core/scripts/manifest/validate-ts.mustache @@ -10,9 +10,9 @@ import { } from "."; {{#validators.length}}import * as Validators from "../../validators";{{/validators.length}} {{#formats}} -import schema_{{tsVersion}} from "@web3api/manifest-schemas/formats/{{dir}}/{{version}}.json"; +import schema_{{tsVersion}} from "@polywrap/manifest-schemas/formats/{{dir}}/{{version}}.json"; {{/formats}} -import { Tracer } from "@web3api/tracing-js" +import { Tracer } from "@polywrap/tracing-js" import { Schema, diff --git a/packages/js/core/src/algorithms/apply-redirects.ts b/packages/js/core/src/algorithms/apply-redirects.ts index 336139a1ff..0f684dc40c 100644 --- a/packages/js/core/src/algorithms/apply-redirects.ts +++ b/packages/js/core/src/algorithms/apply-redirects.ts @@ -1,6 +1,6 @@ import { Uri, UriRedirect } from "../types"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const applyRedirects = Tracer.traceFunc( "core: applyRedirects", diff --git a/packages/js/core/src/algorithms/filter-results.ts b/packages/js/core/src/algorithms/filter-results.ts index fe2c6e2ed4..b25b6f7f0a 100644 --- a/packages/js/core/src/algorithms/filter-results.ts +++ b/packages/js/core/src/algorithms/filter-results.ts @@ -1,4 +1,4 @@ -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; /* eslint-disable @typescript-eslint/no-explicit-any */ export const filterResults = Tracer.traceFunc( diff --git a/packages/js/core/src/algorithms/find-plugin-package.ts b/packages/js/core/src/algorithms/find-plugin-package.ts index 900a9df41c..bc7393ab14 100644 --- a/packages/js/core/src/algorithms/find-plugin-package.ts +++ b/packages/js/core/src/algorithms/find-plugin-package.ts @@ -1,6 +1,6 @@ import { Uri, PluginPackage, PluginRegistration } from "../types"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const findPluginPackage = Tracer.traceFunc( "core: findPluginPackage", diff --git a/packages/js/core/src/algorithms/get-implementations.ts b/packages/js/core/src/algorithms/get-implementations.ts index e4d5b7317b..6381e039b4 100644 --- a/packages/js/core/src/algorithms/get-implementations.ts +++ b/packages/js/core/src/algorithms/get-implementations.ts @@ -1,7 +1,7 @@ import { Uri, UriRedirect, InterfaceImplementations } from "../types"; import { applyRedirects } from "./apply-redirects"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const getImplementations = Tracer.traceFunc( "core: getImplementations", diff --git a/packages/js/core/src/algorithms/parse-query.ts b/packages/js/core/src/algorithms/parse-query.ts index cc7db67705..56df62a1b4 100644 --- a/packages/js/core/src/algorithms/parse-query.ts +++ b/packages/js/core/src/algorithms/parse-query.ts @@ -1,7 +1,7 @@ import { QueryApiInvocations, QueryDocument, Uri } from "../types"; import { SelectionSetNode, ValueNode } from "graphql"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const parseQuery = Tracer.traceFunc( "core: parseQuery", diff --git a/packages/js/core/src/interfaces/uri-resolver.ts b/packages/js/core/src/interfaces/uri-resolver.ts index e6d831f1c3..b2d2168358 100644 --- a/packages/js/core/src/interfaces/uri-resolver.ts +++ b/packages/js/core/src/interfaces/uri-resolver.ts @@ -1,7 +1,7 @@ // TODO: https://github.com/web3-api/monorepo/issues/101 import { Uri, InvokeHandler, InvokeApiResult } from "../"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export interface MaybeUriOrManifest { uri?: string; diff --git a/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts index c1d283de79..4052043484 100644 --- a/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts @@ -16,7 +16,7 @@ import { DeserializeManifestOptions } from "../../"; import { compare } from "semver"; import YAML from "js-yaml"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const deserializeAppManifest = Tracer.traceFunc( "core: deserializeAppManifest", diff --git a/packages/js/core/src/manifest/formats/web3api.app/migrate.ts b/packages/js/core/src/manifest/formats/web3api.app/migrate.ts index a7c9782528..357cb54d2e 100644 --- a/packages/js/core/src/manifest/formats/web3api.app/migrate.ts +++ b/packages/js/core/src/manifest/formats/web3api.app/migrate.ts @@ -15,7 +15,7 @@ import { migrate as migrate_0_0_1_prealpha_1_to_0_0_1_prealpha_2 } from "./migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; type Migrator = { [key in AppManifestFormats]?: (m: AnyAppManifest) => AppManifest; diff --git a/packages/js/core/src/manifest/formats/web3api.app/validate.ts b/packages/js/core/src/manifest/formats/web3api.app/validate.ts index 8b7904f765..ced730a31c 100644 --- a/packages/js/core/src/manifest/formats/web3api.app/validate.ts +++ b/packages/js/core/src/manifest/formats/web3api.app/validate.ts @@ -9,9 +9,9 @@ import { AppManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@web3api/manifest-schemas/formats/web3api.app/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@web3api/manifest-schemas/formats/web3api.app/0.0.1-prealpha.2.json"; -import { Tracer } from "@web3api/tracing-js" +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.app/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.app/0.0.1-prealpha.2.json"; +import { Tracer } from "@polywrap/tracing-js" import { Schema, diff --git a/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts index 18913b7d77..2f8e44bd58 100644 --- a/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts @@ -16,7 +16,7 @@ import { DeserializeManifestOptions } from "../../"; import { compare } from "semver"; import YAML from "js-yaml"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const deserializeBuildManifest = Tracer.traceFunc( "core: deserializeBuildManifest", diff --git a/packages/js/core/src/manifest/formats/web3api.build/migrate.ts b/packages/js/core/src/manifest/formats/web3api.build/migrate.ts index 53d9a92311..4b6463aca7 100644 --- a/packages/js/core/src/manifest/formats/web3api.build/migrate.ts +++ b/packages/js/core/src/manifest/formats/web3api.build/migrate.ts @@ -18,7 +18,7 @@ import { migrate as migrate_0_0_1_prealpha_2_to_0_0_1_prealpha_3 } from "./migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; type Migrator = { [key in BuildManifestFormats]?: (m: AnyBuildManifest) => BuildManifest; diff --git a/packages/js/core/src/manifest/formats/web3api.build/validate.ts b/packages/js/core/src/manifest/formats/web3api.build/validate.ts index 64f058cac9..fd87ed0f55 100644 --- a/packages/js/core/src/manifest/formats/web3api.build/validate.ts +++ b/packages/js/core/src/manifest/formats/web3api.build/validate.ts @@ -9,10 +9,10 @@ import { BuildManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@web3api/manifest-schemas/formats/web3api.build/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@web3api/manifest-schemas/formats/web3api.build/0.0.1-prealpha.2.json"; -import schema_0_0_1_prealpha_3 from "@web3api/manifest-schemas/formats/web3api.build/0.0.1-prealpha.3.json"; -import { Tracer } from "@web3api/tracing-js" +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.build/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.build/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/web3api.build/0.0.1-prealpha.3.json"; +import { Tracer } from "@polywrap/tracing-js" import { Schema, diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts index 06b9345ed9..a922ea0b19 100644 --- a/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts @@ -16,7 +16,7 @@ import { DeserializeManifestOptions } from "../../"; import { compare } from "semver"; import YAML from "js-yaml"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const deserializeDeployManifest = Tracer.traceFunc( "core: deserializeDeployManifest", diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/migrate.ts b/packages/js/core/src/manifest/formats/web3api.deploy/migrate.ts index 2fc59247af..3288f21e3f 100644 --- a/packages/js/core/src/manifest/formats/web3api.deploy/migrate.ts +++ b/packages/js/core/src/manifest/formats/web3api.deploy/migrate.ts @@ -12,7 +12,7 @@ import { } from "."; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; type Migrator = { [key in DeployManifestFormats]?: (m: AnyDeployManifest) => DeployManifest; diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/validate.ts b/packages/js/core/src/manifest/formats/web3api.deploy/validate.ts index ad9ac6ba76..b0d36d34cf 100644 --- a/packages/js/core/src/manifest/formats/web3api.deploy/validate.ts +++ b/packages/js/core/src/manifest/formats/web3api.deploy/validate.ts @@ -9,8 +9,8 @@ import { DeployManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@web3api/manifest-schemas/formats/web3api.deploy/0.0.1-prealpha.1.json"; -import { Tracer } from "@web3api/tracing-js" +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.deploy/0.0.1-prealpha.1.json"; +import { Tracer } from "@polywrap/tracing-js" import { Schema, diff --git a/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts index 8e84ae2c9d..46d338d1c4 100644 --- a/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts @@ -16,7 +16,7 @@ import { DeserializeManifestOptions } from "../../"; import { compare } from "semver"; import YAML from "js-yaml"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const deserializeInfraManifest = Tracer.traceFunc( "core: deserializeInfraManifest", diff --git a/packages/js/core/src/manifest/formats/web3api.infra/migrate.ts b/packages/js/core/src/manifest/formats/web3api.infra/migrate.ts index 083e038bcf..0103c2ad8f 100644 --- a/packages/js/core/src/manifest/formats/web3api.infra/migrate.ts +++ b/packages/js/core/src/manifest/formats/web3api.infra/migrate.ts @@ -15,7 +15,7 @@ import { migrate as migrate_0_0_1_prealpha_1_to_0_0_1_prealpha_2 } from "./migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; type Migrator = { [key in InfraManifestFormats]?: (m: AnyInfraManifest) => InfraManifest; diff --git a/packages/js/core/src/manifest/formats/web3api.infra/validate.ts b/packages/js/core/src/manifest/formats/web3api.infra/validate.ts index 57bf1acf04..ef2178936b 100644 --- a/packages/js/core/src/manifest/formats/web3api.infra/validate.ts +++ b/packages/js/core/src/manifest/formats/web3api.infra/validate.ts @@ -9,9 +9,9 @@ import { InfraManifestFormats } from "."; -import schema_0_0_1_prealpha_1 from "@web3api/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@web3api/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.2.json"; -import { Tracer } from "@web3api/tracing-js" +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.2.json"; +import { Tracer } from "@polywrap/tracing-js" import { Schema, diff --git a/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts index 1ef8f267c3..0793a63090 100644 --- a/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts @@ -16,7 +16,7 @@ import { DeserializeManifestOptions } from "../../"; import { compare } from "semver"; import YAML from "js-yaml"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const deserializeMetaManifest = Tracer.traceFunc( "core: deserializeMetaManifest", diff --git a/packages/js/core/src/manifest/formats/web3api.meta/migrate.ts b/packages/js/core/src/manifest/formats/web3api.meta/migrate.ts index 30db1a8ac7..8f5d4704a8 100644 --- a/packages/js/core/src/manifest/formats/web3api.meta/migrate.ts +++ b/packages/js/core/src/manifest/formats/web3api.meta/migrate.ts @@ -18,7 +18,7 @@ import { migrate as migrate_0_0_1_prealpha_2_to_0_0_1_prealpha_3 } from "./migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; type Migrator = { [key in MetaManifestFormats]?: (m: AnyMetaManifest) => MetaManifest; diff --git a/packages/js/core/src/manifest/formats/web3api.meta/validate.ts b/packages/js/core/src/manifest/formats/web3api.meta/validate.ts index e176bb02f2..98b9ffdb10 100644 --- a/packages/js/core/src/manifest/formats/web3api.meta/validate.ts +++ b/packages/js/core/src/manifest/formats/web3api.meta/validate.ts @@ -9,10 +9,10 @@ import { MetaManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@web3api/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@web3api/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.2.json"; -import schema_0_0_1_prealpha_3 from "@web3api/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.3.json"; -import { Tracer } from "@web3api/tracing-js" +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.3.json"; +import { Tracer } from "@polywrap/tracing-js" import { Schema, diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts index d514e04cd4..9aac33aba0 100644 --- a/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts @@ -16,7 +16,7 @@ import { DeserializeManifestOptions } from "../../"; import { compare } from "semver"; import YAML from "js-yaml"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const deserializePluginManifest = Tracer.traceFunc( "core: deserializePluginManifest", diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/migrate.ts b/packages/js/core/src/manifest/formats/web3api.plugin/migrate.ts index 8c96739ef0..0993c1f1b2 100644 --- a/packages/js/core/src/manifest/formats/web3api.plugin/migrate.ts +++ b/packages/js/core/src/manifest/formats/web3api.plugin/migrate.ts @@ -18,7 +18,7 @@ import { migrate as migrate_0_0_1_prealpha_2_to_0_0_1_prealpha_3 } from "./migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; type Migrator = { [key in PluginManifestFormats]?: (m: AnyPluginManifest) => PluginManifest; diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/validate.ts b/packages/js/core/src/manifest/formats/web3api.plugin/validate.ts index 929bf3b67f..12fbeda61e 100644 --- a/packages/js/core/src/manifest/formats/web3api.plugin/validate.ts +++ b/packages/js/core/src/manifest/formats/web3api.plugin/validate.ts @@ -9,10 +9,10 @@ import { PluginManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@web3api/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@web3api/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.2.json"; -import schema_0_0_1_prealpha_3 from "@web3api/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.3.json"; -import { Tracer } from "@web3api/tracing-js" +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.3.json"; +import { Tracer } from "@polywrap/tracing-js" import { Schema, diff --git a/packages/js/core/src/manifest/formats/web3api/deserialize.ts b/packages/js/core/src/manifest/formats/web3api/deserialize.ts index d39c12915e..5a8e0bfdb8 100644 --- a/packages/js/core/src/manifest/formats/web3api/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api/deserialize.ts @@ -16,7 +16,7 @@ import { DeserializeManifestOptions } from "../../"; import { compare } from "semver"; import YAML from "js-yaml"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const deserializeWeb3ApiManifest = Tracer.traceFunc( "core: deserializeWeb3ApiManifest", diff --git a/packages/js/core/src/manifest/formats/web3api/migrate.ts b/packages/js/core/src/manifest/formats/web3api/migrate.ts index 6e51668f99..e0ac8a69f4 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrate.ts +++ b/packages/js/core/src/manifest/formats/web3api/migrate.ts @@ -36,7 +36,7 @@ import { migrate as migrate_0_0_1_prealpha_8_to_0_0_1_prealpha_9 } from "./migrators/0.0.1-prealpha.8_to_0.0.1-prealpha.9"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; type Migrator = { [key in Web3ApiManifestFormats]?: (m: AnyWeb3ApiManifest) => Web3ApiManifest; diff --git a/packages/js/core/src/manifest/formats/web3api/validate.ts b/packages/js/core/src/manifest/formats/web3api/validate.ts index 0e66f72341..208fd8831b 100644 --- a/packages/js/core/src/manifest/formats/web3api/validate.ts +++ b/packages/js/core/src/manifest/formats/web3api/validate.ts @@ -9,16 +9,16 @@ import { Web3ApiManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.2.json"; -import schema_0_0_1_prealpha_3 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.3.json"; -import schema_0_0_1_prealpha_4 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.4.json"; -import schema_0_0_1_prealpha_5 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.5.json"; -import schema_0_0_1_prealpha_6 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.6.json"; -import schema_0_0_1_prealpha_7 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.7.json"; -import schema_0_0_1_prealpha_8 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.8.json"; -import schema_0_0_1_prealpha_9 from "@web3api/manifest-schemas/formats/web3api/0.0.1-prealpha.9.json"; -import { Tracer } from "@web3api/tracing-js" +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.3.json"; +import schema_0_0_1_prealpha_4 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.4.json"; +import schema_0_0_1_prealpha_5 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.5.json"; +import schema_0_0_1_prealpha_6 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.6.json"; +import schema_0_0_1_prealpha_7 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.7.json"; +import schema_0_0_1_prealpha_8 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.8.json"; +import schema_0_0_1_prealpha_9 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.9.json"; +import { Tracer } from "@polywrap/tracing-js" import { Schema, diff --git a/packages/js/core/src/types/Env.ts b/packages/js/core/src/types/Env.ts index 477b68f429..ac158b15e7 100644 --- a/packages/js/core/src/types/Env.ts +++ b/packages/js/core/src/types/Env.ts @@ -1,6 +1,6 @@ import { Uri } from "."; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export interface Env { /** Uri of Web3Api */ diff --git a/packages/js/core/src/types/InterfaceImplementations.ts b/packages/js/core/src/types/InterfaceImplementations.ts index 9b02aaddfd..5e8f51cd9b 100644 --- a/packages/js/core/src/types/InterfaceImplementations.ts +++ b/packages/js/core/src/types/InterfaceImplementations.ts @@ -1,6 +1,6 @@ import { Uri } from "."; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export interface InterfaceImplementations { interface: TUri; diff --git a/packages/js/core/src/types/PluginRegistration.ts b/packages/js/core/src/types/PluginRegistration.ts index c9888ff881..039ea1a9a6 100644 --- a/packages/js/core/src/types/PluginRegistration.ts +++ b/packages/js/core/src/types/PluginRegistration.ts @@ -1,6 +1,6 @@ import { PluginPackage, Uri } from "."; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export interface PluginRegistration { uri: TUri; diff --git a/packages/js/core/src/types/Query.ts b/packages/js/core/src/types/Query.ts index 2e257c2278..47162d9a9b 100644 --- a/packages/js/core/src/types/Query.ts +++ b/packages/js/core/src/types/Query.ts @@ -1,6 +1,6 @@ import { Uri, InvokeApiOptions, ClientConfig } from "./"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; import { DocumentNode } from "graphql"; import gql from "graphql-tag"; diff --git a/packages/js/core/src/types/Uri.ts b/packages/js/core/src/types/Uri.ts index 2027156ef0..06fe987947 100644 --- a/packages/js/core/src/types/Uri.ts +++ b/packages/js/core/src/types/Uri.ts @@ -1,4 +1,4 @@ -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; /** URI configuration */ export interface UriConfig { diff --git a/packages/js/core/src/types/UriRedirect.ts b/packages/js/core/src/types/UriRedirect.ts index 013aee6796..b286dad6f1 100644 --- a/packages/js/core/src/types/UriRedirect.ts +++ b/packages/js/core/src/types/UriRedirect.ts @@ -1,6 +1,6 @@ import { Uri } from "."; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export interface UriRedirect { from: TUri; diff --git a/packages/js/core/src/uri-resolution/core/resolveUri.ts b/packages/js/core/src/uri-resolution/core/resolveUri.ts index 3b4a797a31..4632b214b6 100644 --- a/packages/js/core/src/uri-resolution/core/resolveUri.ts +++ b/packages/js/core/src/uri-resolution/core/resolveUri.ts @@ -6,7 +6,7 @@ import { UriResolver } from "./types/UriResolver"; import { ResolveUriErrorType, ResolveUriResult } from "./types"; import { InternalResolverError } from "./types/InternalResolverError"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export const resolveUri = async ( uri: Uri, diff --git a/packages/js/core/src/uri-resolution/resolvers/extendable/UriResolverWrapper.ts b/packages/js/core/src/uri-resolution/resolvers/extendable/UriResolverWrapper.ts index e0581e758b..800fb4b89f 100644 --- a/packages/js/core/src/uri-resolution/resolvers/extendable/UriResolverWrapper.ts +++ b/packages/js/core/src/uri-resolution/resolvers/extendable/UriResolverWrapper.ts @@ -12,7 +12,7 @@ import { import { CreateApiFunc } from "./types/CreateApiFunc"; import { getEnvFromUriOrResolutionStack } from "../getEnvFromUriOrResolutionStack"; -import { Tracer } from "@web3api/tracing-js"; +import { Tracer } from "@polywrap/tracing-js"; export class UriResolverWrapper implements UriResolver { constructor( diff --git a/packages/js/os/package.json b/packages/js/os/package.json index 13a032da0f..9053088295 100644 --- a/packages/js/os/package.json +++ b/packages/js/os/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/os-js", + "name": "@polywrap/os-js", "description": "Web3API Javascript OS Utilities", "version": "0.0.1-prealpha.85", "license": "MIT", diff --git a/packages/js/plugins/ens/package.json b/packages/js/plugins/ens/package.json index f53c941c79..cbce827e5c 100644 --- a/packages/js/plugins/ens/package.json +++ b/packages/js/plugins/ens/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/ens-plugin-js", + "name": "@polywrap/ens-plugin-js", "description": "Web3API ENS Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", @@ -23,7 +23,7 @@ "dependencies": { "@ethersproject/address": "5.0.7", "@ethersproject/basex": "5.0.7", - "@web3api/core-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", "ethers": "5.0.7" }, "devDependencies": { diff --git a/packages/js/plugins/ens/src/index.ts b/packages/js/plugins/ens/src/index.ts index 53e8e2d951..e52b171536 100644 --- a/packages/js/plugins/ens/src/index.ts +++ b/packages/js/plugins/ens/src/index.ts @@ -12,7 +12,7 @@ import { import { ethers } from "ethers"; import { Base58 } from "@ethersproject/basex"; import { getAddress } from "@ethersproject/address"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; export type Address = string; diff --git a/packages/js/plugins/ens/src/w3-man/index.ts b/packages/js/plugins/ens/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/ens/src/w3-man/index.ts +++ b/packages/js/plugins/ens/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/ens/src/w3-man/manifest.ts b/packages/js/plugins/ens/src/w3-man/manifest.ts index 41ca650b30..bdf0be5286 100644 --- a/packages/js/plugins/ens/src/w3-man/manifest.ts +++ b/packages/js/plugins/ens/src/w3-man/manifest.ts @@ -5,7 +5,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/ens/src/w3-man/module.ts b/packages/js/plugins/ens/src/w3-man/module.ts index f46b1cd373..fb6ec175b7 100644 --- a/packages/js/plugins/ens/src/w3-man/module.ts +++ b/packages/js/plugins/ens/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_tryResolveUri extends Record { authority: Types.String; diff --git a/packages/js/plugins/ens/src/w3-man/types.ts b/packages/js/plugins/ens/src/w3-man/types.ts index 5607417570..c2b716ea96 100644 --- a/packages/js/plugins/ens/src/w3-man/types.ts +++ b/packages/js/plugins/ens/src/w3-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@web3api/core-js"; +import { Client, InvokeApiResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/js/plugins/ethereum/package.json b/packages/js/plugins/ethereum/package.json index 559f710274..cfa3e229f3 100644 --- a/packages/js/plugins/ethereum/package.json +++ b/packages/js/plugins/ethereum/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/ethereum-plugin-js", + "name": "@polywrap/ethereum-plugin-js", "description": "Web3API Ethereum Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --detectOpenHandles --verbose", @@ -23,16 +23,16 @@ "dependencies": { "@ethersproject/address": "5.0.7", "@ethersproject/providers": "5.0.7", - "@web3api/core-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", "ethers": "5.0.7" }, "devDependencies": { "@types/jest": "26.0.8", "@types/prettier": "2.6.0", - "@web3api/client-js": "0.0.1-prealpha.85", - "@web3api/ens-plugin-js": "0.0.1-prealpha.85", - "@web3api/ipfs-plugin-js": "0.0.1-prealpha.85", - "@web3api/test-env-js": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", + "@polywrap/ens-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ipfs-plugin-js": "0.0.1-prealpha.85", + "@polywrap/test-env-js": "0.0.1-prealpha.85", "eth-ens-namehash": "2.0.8", "jest": "26.6.3", "js-sha3": "0.8.0", diff --git a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts index 8c4a72c7d2..2de2022a27 100644 --- a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts @@ -1,16 +1,16 @@ import { ethereumPlugin } from ".."; import * as Schema from "../w3-man"; -import { Web3ApiClient, defaultIpfsProviders } from "@web3api/client-js"; -import { ensPlugin } from "@web3api/ens-plugin-js"; -import { ipfsPlugin } from "@web3api/ipfs-plugin-js"; +import { Web3ApiClient, defaultIpfsProviders } from "@polywrap/client-js"; +import { ensPlugin } from "@polywrap/ens-plugin-js"; +import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; import { initTestEnvironment, stopTestEnvironment, buildApi, ensAddresses, providers -} from "@web3api/test-env-js"; +} from "@polywrap/test-env-js"; import { Wallet } from "ethers"; import { ethers } from "ethers"; diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/package.json b/packages/js/plugins/ethereum/src/__tests__/integration/package.json index 79507d99f1..2202f2e1af 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/package.json +++ b/packages/js/plugins/ethereum/src/__tests__/integration/package.json @@ -11,9 +11,9 @@ "deploy": "npx w3 deploy" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.85" + "@polywrap/wasm-as": "0.0.1-prealpha.85" }, "devDependencies": { - "@web3api/cli": "0.0.1-prealpha.85" + "polywrap": "0.0.1-prealpha.85" } } diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts b/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts index 6eebe97d54..874ebbd4e2 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts +++ b/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts @@ -33,7 +33,7 @@ import { Input_sendTransactionAndWait, Input_signMessage } from "./w3"; -import { BigInt } from "@web3api/wasm-as"; +import { BigInt } from "@polywrap/wasm-as"; export function callContractView( input: Input_callContractView diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/web3api.build.yaml b/packages/js/plugins/ethereum/src/__tests__/integration/web3api.build.yaml index 39ff7f1e76..8b9498473b 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/web3api.build.yaml +++ b/packages/js/plugins/ethereum/src/__tests__/integration/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "16.13.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/js/plugins/ethereum/src/index.ts b/packages/js/plugins/ethereum/src/index.ts index 5e1299fc6e..bcc3d95c1b 100644 --- a/packages/js/plugins/ethereum/src/index.ts +++ b/packages/js/plugins/ethereum/src/index.ts @@ -48,7 +48,7 @@ import { parseArgs } from "./utils/parsing"; import { ethers } from "ethers"; import { defaultAbiCoder } from "ethers/lib/utils"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; export interface EthereumPluginConfig extends Record { networks: ConnectionConfigs; diff --git a/packages/js/plugins/ethereum/src/w3-man/index.ts b/packages/js/plugins/ethereum/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/ethereum/src/w3-man/index.ts +++ b/packages/js/plugins/ethereum/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/ethereum/src/w3-man/manifest.ts b/packages/js/plugins/ethereum/src/w3-man/manifest.ts index 41ca650b30..bdf0be5286 100644 --- a/packages/js/plugins/ethereum/src/w3-man/manifest.ts +++ b/packages/js/plugins/ethereum/src/w3-man/manifest.ts @@ -5,7 +5,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/ethereum/src/w3-man/module.ts b/packages/js/plugins/ethereum/src/w3-man/module.ts index 81dc8cbec6..902e0c9a6b 100644 --- a/packages/js/plugins/ethereum/src/w3-man/module.ts +++ b/packages/js/plugins/ethereum/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_callContractView extends Record { address: Types.String; diff --git a/packages/js/plugins/filesystem/package.json b/packages/js/plugins/filesystem/package.json index 8ba9e08fc8..67071d42cc 100644 --- a/packages/js/plugins/filesystem/package.json +++ b/packages/js/plugins/filesystem/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/fs-plugin-js", + "name": "@polywrap/fs-plugin-js", "description": "Web3API File System Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -13,25 +13,25 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { - "@web3api/core-js": "0.0.1-prealpha.85" + "@polywrap/core-js": "0.0.1-prealpha.85" }, "devDependencies": { "@types/jest": "26.0.8", "@types/prettier": "2.6.0", - "@web3api/client-js": "0.0.1-prealpha.85", - "@web3api/ens-plugin-js": "0.0.1-prealpha.85", - "@web3api/ethereum-plugin-js": "0.0.1-prealpha.85", - "@web3api/ipfs-plugin-js": "0.0.1-prealpha.85", - "@web3api/test-cases": "0.0.1-prealpha.85", - "@web3api/test-env-js": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", + "@polywrap/ens-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ipfs-plugin-js": "0.0.1-prealpha.85", + "@polywrap/test-cases": "0.0.1-prealpha.85", + "@polywrap/test-env-js": "0.0.1-prealpha.85", "jest": "26.6.3", "rimraf": "3.0.2", "ts-jest": "26.5.4", diff --git a/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts b/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts index 8a3fec7903..4ffbb3493f 100644 --- a/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts @@ -5,16 +5,16 @@ import { initTestEnvironment, stopTestEnvironment, providers -} from "@web3api/test-env-js"; +} from "@polywrap/test-env-js"; import { Web3ApiClient, Web3ApiClientConfig, defaultIpfsProviders, -} from "@web3api/client-js"; -import { GetPathToTestApis } from "@web3api/test-cases"; -import { ipfsPlugin } from "@web3api/ipfs-plugin-js"; -import { ensPlugin } from "@web3api/ens-plugin-js"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; +} from "@polywrap/client-js"; +import { GetPathToTestApis } from "@polywrap/test-cases"; +import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; +import { ensPlugin } from "@polywrap/ens-plugin-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; import fs from "fs"; import path from "path"; diff --git a/packages/js/plugins/filesystem/src/index.ts b/packages/js/plugins/filesystem/src/index.ts index e1f42caf13..7c6dcddd96 100644 --- a/packages/js/plugins/filesystem/src/index.ts +++ b/packages/js/plugins/filesystem/src/index.ts @@ -10,7 +10,7 @@ import { import path from "path"; import fs from "fs"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; export type FilesystemPluginConfig = Record; diff --git a/packages/js/plugins/filesystem/src/w3-man/index.ts b/packages/js/plugins/filesystem/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/filesystem/src/w3-man/index.ts +++ b/packages/js/plugins/filesystem/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/filesystem/src/w3-man/manifest.ts b/packages/js/plugins/filesystem/src/w3-man/manifest.ts index 41ca650b30..bdf0be5286 100644 --- a/packages/js/plugins/filesystem/src/w3-man/manifest.ts +++ b/packages/js/plugins/filesystem/src/w3-man/manifest.ts @@ -5,7 +5,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/filesystem/src/w3-man/module.ts b/packages/js/plugins/filesystem/src/w3-man/module.ts index f46b1cd373..fb6ec175b7 100644 --- a/packages/js/plugins/filesystem/src/w3-man/module.ts +++ b/packages/js/plugins/filesystem/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_tryResolveUri extends Record { authority: Types.String; diff --git a/packages/js/plugins/filesystem/src/w3-man/types.ts b/packages/js/plugins/filesystem/src/w3-man/types.ts index 24eb865592..0672a29a99 100644 --- a/packages/js/plugins/filesystem/src/w3-man/types.ts +++ b/packages/js/plugins/filesystem/src/w3-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@web3api/core-js"; +import { Client, InvokeApiResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/js/plugins/graph-node/package.json b/packages/js/plugins/graph-node/package.json index d07afbdf9b..2a771ebef5 100644 --- a/packages/js/plugins/graph-node/package.json +++ b/packages/js/plugins/graph-node/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/graph-node-plugin-js", + "name": "@polywrap/graph-node-plugin-js", "description": "Web3API Graph Node Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -13,16 +13,16 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { - "@web3api/core-js": "0.0.1-prealpha.85", - "@web3api/http-plugin-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", + "@polywrap/http-plugin-js": "0.0.1-prealpha.85", "apollo-link": "1.2.14", "apollo-link-http": "1.5.17", "cross-fetch": "3.0.5", @@ -31,7 +31,7 @@ "devDependencies": { "@types/jest": "26.0.8", "@types/prettier": "2.6.0", - "@web3api/client-js": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", "jest": "26.6.3", "rimraf": "3.0.2", "ts-jest": "26.5.4", diff --git a/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts b/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts index 2f7ce37629..6448cca4d2 100644 --- a/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts @@ -1,5 +1,5 @@ import { GraphNodePlugin, plugin } from ".."; -import { Web3ApiClient } from "@web3api/client-js"; +import { Web3ApiClient } from "@polywrap/client-js"; const uri = "ens/graph-node.web3api.eth"; const provider = "https://api.thegraph.com"; diff --git a/packages/js/plugins/graph-node/src/index.ts b/packages/js/plugins/graph-node/src/index.ts index 61520f302f..a169bcd0a7 100644 --- a/packages/js/plugins/graph-node/src/index.ts +++ b/packages/js/plugins/graph-node/src/index.ts @@ -6,7 +6,7 @@ import { manifest, } from "./w3-man"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; export interface RequestError { errors: { diff --git a/packages/js/plugins/graph-node/src/w3-man/index.ts b/packages/js/plugins/graph-node/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/graph-node/src/w3-man/index.ts +++ b/packages/js/plugins/graph-node/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/graph-node/src/w3-man/manifest.ts b/packages/js/plugins/graph-node/src/w3-man/manifest.ts index 41ca650b30..bdf0be5286 100644 --- a/packages/js/plugins/graph-node/src/w3-man/manifest.ts +++ b/packages/js/plugins/graph-node/src/w3-man/manifest.ts @@ -5,7 +5,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/graph-node/src/w3-man/module.ts b/packages/js/plugins/graph-node/src/w3-man/module.ts index da4a604cd1..f966dbe16e 100644 --- a/packages/js/plugins/graph-node/src/w3-man/module.ts +++ b/packages/js/plugins/graph-node/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_querySubgraph extends Record { subgraphAuthor: Types.String; diff --git a/packages/js/plugins/graph-node/src/w3-man/types.ts b/packages/js/plugins/graph-node/src/w3-man/types.ts index 15b7d02dc9..4fedc8a7c0 100644 --- a/packages/js/plugins/graph-node/src/w3-man/types.ts +++ b/packages/js/plugins/graph-node/src/w3-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@web3api/core-js"; +import { Client, InvokeApiResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/js/plugins/http/package.json b/packages/js/plugins/http/package.json index f463ad6cb1..af078f9a65 100644 --- a/packages/js/plugins/http/package.json +++ b/packages/js/plugins/http/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/http-plugin-js", + "name": "@polywrap/http-plugin-js", "description": "Web3API HTTP Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -13,24 +13,24 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { - "@web3api/core-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", "axios": "0.21.4" }, "devDependencies": { "@types/jest": "26.0.8", "@types/prettier": "2.6.0", - "@web3api/client-js": "0.0.1-prealpha.85", - "@web3api/ens-plugin-js": "0.0.1-prealpha.85", - "@web3api/ipfs-plugin-js": "0.0.1-prealpha.85", - "@web3api/test-env-js": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", + "@polywrap/ens-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ipfs-plugin-js": "0.0.1-prealpha.85", + "@polywrap/test-env-js": "0.0.1-prealpha.85", "jest": "26.6.3", "nock": "13.0.7", "rimraf": "3.0.2", diff --git a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts index 871891744c..1116ac2327 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts @@ -1,7 +1,7 @@ import { httpPlugin } from "../.."; import { Response } from "../../w3-man"; -import { Web3ApiClient } from "@web3api/client-js" +import { Web3ApiClient } from "@polywrap/client-js" import nock from "nock"; jest.setTimeout(360000) diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts index db35843936..71b04469fa 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts @@ -1,10 +1,10 @@ import { httpPlugin } from "../.."; import { Response } from "../../w3"; -import { Web3ApiClient } from "@web3api/client-js" +import { Web3ApiClient } from "@polywrap/client-js" import { buildApi -} from "@web3api/test-env-js"; +} from "@polywrap/test-env-js"; import nock from "nock"; jest.setTimeout(360000) diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/package.json b/packages/js/plugins/http/src/__tests__/e2e/integration/package.json index f48d3bb461..86f1204436 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/package.json +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/package.json @@ -12,9 +12,9 @@ "deploy:web3api": "npx w3 build --ipfs http://localhost:5001 --test-ens simplestorage.eth" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.85" + "@polywrap/wasm-as": "0.0.1-prealpha.85" }, "devDependencies": { - "@web3api/cli": "0.0.1-prealpha.85" + "polywrap": "0.0.1-prealpha.85" } } diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/web3api.build.yaml b/packages/js/plugins/http/src/__tests__/e2e/integration/web3api.build.yaml index 674f32ebd5..83d4f93831 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/web3api.build.yaml +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../../wasm/as diff --git a/packages/js/plugins/http/src/index.ts b/packages/js/plugins/http/src/index.ts index a21e15f7e6..9422fc7d90 100644 --- a/packages/js/plugins/http/src/index.ts +++ b/packages/js/plugins/http/src/index.ts @@ -9,7 +9,7 @@ import { import { fromAxiosResponse, toAxiosRequestConfig } from "./util"; import axios from "axios"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; export type HttpPluginConfig = Record; diff --git a/packages/js/plugins/http/src/w3-man/index.ts b/packages/js/plugins/http/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/http/src/w3-man/index.ts +++ b/packages/js/plugins/http/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/http/src/w3-man/manifest.ts b/packages/js/plugins/http/src/w3-man/manifest.ts index 41ca650b30..bdf0be5286 100644 --- a/packages/js/plugins/http/src/w3-man/manifest.ts +++ b/packages/js/plugins/http/src/w3-man/manifest.ts @@ -5,7 +5,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/http/src/w3-man/module.ts b/packages/js/plugins/http/src/w3-man/module.ts index 7b336ac5ef..c702c01eb5 100644 --- a/packages/js/plugins/http/src/w3-man/module.ts +++ b/packages/js/plugins/http/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_get extends Record { url: Types.String; diff --git a/packages/js/plugins/ipfs/package.json b/packages/js/plugins/ipfs/package.json index b59761a922..4f4b01c99e 100644 --- a/packages/js/plugins/ipfs/package.json +++ b/packages/js/plugins/ipfs/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/ipfs-plugin-js", + "name": "@polywrap/ipfs-plugin-js", "description": "Web3API IPFS Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", @@ -22,7 +22,7 @@ }, "dependencies": { "@dorgjelli-test/ipfs-http-client-lite": "0.3.1", - "@web3api/core-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", "abort-controller": "3.0.0", "cids": "^1.1.4", "is-ipfs": "1.0.3" diff --git a/packages/js/plugins/ipfs/src/index.ts b/packages/js/plugins/ipfs/src/index.ts index e71613beed..f67e97cd17 100644 --- a/packages/js/plugins/ipfs/src/index.ts +++ b/packages/js/plugins/ipfs/src/index.ts @@ -15,7 +15,7 @@ import { import { IpfsClient } from "./utils/IpfsClient"; import { execSimple, execFallbacks } from "./utils/exec"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const isIPFS = require("is-ipfs"); diff --git a/packages/js/plugins/ipfs/src/w3-man/index.ts b/packages/js/plugins/ipfs/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/ipfs/src/w3-man/index.ts +++ b/packages/js/plugins/ipfs/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/ipfs/src/w3-man/manifest.ts b/packages/js/plugins/ipfs/src/w3-man/manifest.ts index 18126678b4..f7b9e13f5e 100644 --- a/packages/js/plugins/ipfs/src/w3-man/manifest.ts +++ b/packages/js/plugins/ipfs/src/w3-man/manifest.ts @@ -3,7 +3,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/ipfs/src/w3-man/module.ts b/packages/js/plugins/ipfs/src/w3-man/module.ts index c6227ba796..ee6664ef40 100644 --- a/packages/js/plugins/ipfs/src/w3-man/module.ts +++ b/packages/js/plugins/ipfs/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_catFile extends Record { cid: Types.String; diff --git a/packages/js/plugins/ipfs/src/w3-man/types.ts b/packages/js/plugins/ipfs/src/w3-man/types.ts index 11774e8bc3..bfedabd61c 100644 --- a/packages/js/plugins/ipfs/src/w3-man/types.ts +++ b/packages/js/plugins/ipfs/src/w3-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@web3api/core-js"; +import { Client, InvokeApiResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/js/plugins/logger/README.md b/packages/js/plugins/logger/README.md index 2d165a2cb3..9ffcf3b02d 100644 --- a/packages/js/plugins/logger/README.md +++ b/packages/js/plugins/logger/README.md @@ -12,7 +12,7 @@ Console Logger plugin implements the `w3://ens/logger.core.web3api.eth` core Web ## Example ```ts -import { loggerPlugin, LogLevel } from "@web3api/logger-plugin-js"; +import { loggerPlugin, LogLevel } from "@polywrap/logger-plugin-js"; const client = new Web3ApiClient({ plugins: [{ diff --git a/packages/js/plugins/logger/package.json b/packages/js/plugins/logger/package.json index 29c70c0750..f1397128c8 100644 --- a/packages/js/plugins/logger/package.json +++ b/packages/js/plugins/logger/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/logger-plugin-js", + "name": "@polywrap/logger-plugin-js", "description": "Web3API Javascript Logger Plugin", "license": "MIT", "repository": { @@ -13,20 +13,20 @@ "main": "build/index.js", "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { - "@web3api/core-js": "0.0.1-prealpha.85" + "@polywrap/core-js": "0.0.1-prealpha.85" }, "devDependencies": { "@types/jest": "26.0.8", "@types/prettier": "2.6.0", - "@web3api/client-js": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", "jest": "26.6.3", "rimraf": "3.0.2", "ts-jest": "26.5.4", diff --git a/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts index f0edcdeae7..3e580b1f48 100644 --- a/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts @@ -1,4 +1,4 @@ -import { Web3ApiClient } from "@web3api/client-js"; +import { Web3ApiClient } from "@polywrap/client-js"; describe("log method", () => { diff --git a/packages/js/plugins/logger/src/index.ts b/packages/js/plugins/logger/src/index.ts index bba9beb2ed..d2739ed055 100644 --- a/packages/js/plugins/logger/src/index.ts +++ b/packages/js/plugins/logger/src/index.ts @@ -6,7 +6,7 @@ import { manifest, } from "./w3-man"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; export type LogFunc = (level: Logger_LogLevel, message: string) => boolean; diff --git a/packages/js/plugins/logger/src/w3-man/index.ts b/packages/js/plugins/logger/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/logger/src/w3-man/index.ts +++ b/packages/js/plugins/logger/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/logger/src/w3-man/manifest.ts b/packages/js/plugins/logger/src/w3-man/manifest.ts index 41ca650b30..bdf0be5286 100644 --- a/packages/js/plugins/logger/src/w3-man/manifest.ts +++ b/packages/js/plugins/logger/src/w3-man/manifest.ts @@ -5,7 +5,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/logger/src/w3-man/module.ts b/packages/js/plugins/logger/src/w3-man/module.ts index 5b11407d23..ded6effc40 100644 --- a/packages/js/plugins/logger/src/w3-man/module.ts +++ b/packages/js/plugins/logger/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_log extends Record { level: Types.Logger_LogLevel; diff --git a/packages/js/plugins/logger/src/w3-man/types.ts b/packages/js/plugins/logger/src/w3-man/types.ts index 94520b365c..078745b3ba 100644 --- a/packages/js/plugins/logger/src/w3-man/types.ts +++ b/packages/js/plugins/logger/src/w3-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@web3api/core-js"; +import { Client, InvokeApiResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/js/plugins/sha3/package.json b/packages/js/plugins/sha3/package.json index 78d93ac6f1..ea51a31dd9 100644 --- a/packages/js/plugins/sha3/package.json +++ b/packages/js/plugins/sha3/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/sha3-plugin-js", + "name": "@polywrap/sha3-plugin-js", "description": "Web3API SHA3 Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -13,15 +13,15 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { - "@web3api/core-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", "js-sha3": "0.8.0" }, "devDependencies": { diff --git a/packages/js/plugins/sha3/src/__tests__/index.test.ts b/packages/js/plugins/sha3/src/__tests__/index.test.ts index 1e48993107..5b07067b2f 100644 --- a/packages/js/plugins/sha3/src/__tests__/index.test.ts +++ b/packages/js/plugins/sha3/src/__tests__/index.test.ts @@ -1,4 +1,4 @@ -import { Web3ApiClient } from "@web3api/client-js" +import { Web3ApiClient } from "@polywrap/client-js" import { sha3_512, sha3_384, diff --git a/packages/js/plugins/sha3/src/index.ts b/packages/js/plugins/sha3/src/index.ts index 06a5516be7..ae92f2a960 100644 --- a/packages/js/plugins/sha3/src/index.ts +++ b/packages/js/plugins/sha3/src/index.ts @@ -31,7 +31,7 @@ import { shake_128, shake_256, } from "js-sha3"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; export interface Sha3PluginConfig extends Record {} diff --git a/packages/js/plugins/sha3/src/w3-man/index.ts b/packages/js/plugins/sha3/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/sha3/src/w3-man/index.ts +++ b/packages/js/plugins/sha3/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/sha3/src/w3-man/manifest.ts b/packages/js/plugins/sha3/src/w3-man/manifest.ts index 41ca650b30..bdf0be5286 100644 --- a/packages/js/plugins/sha3/src/w3-man/manifest.ts +++ b/packages/js/plugins/sha3/src/w3-man/manifest.ts @@ -5,7 +5,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/sha3/src/w3-man/module.ts b/packages/js/plugins/sha3/src/w3-man/module.ts index 87ad5b79a9..0b7ded2bd9 100644 --- a/packages/js/plugins/sha3/src/w3-man/module.ts +++ b/packages/js/plugins/sha3/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_sha3_512 extends Record { message: Types.String; diff --git a/packages/js/plugins/uts46/package.json b/packages/js/plugins/uts46/package.json index 39315e765c..a4fb3f5cd8 100644 --- a/packages/js/plugins/uts46/package.json +++ b/packages/js/plugins/uts46/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/uts46-plugin-js", + "name": "@polywrap/uts46-plugin-js", "description": "Web3API IDNA-UTS #46 Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -13,15 +13,15 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/@web3api/cli/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", + "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { - "@web3api/core-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", "idna-uts46-hx": "3.4.0" }, "devDependencies": { diff --git a/packages/js/plugins/uts46/src/__tests__/index.test.ts b/packages/js/plugins/uts46/src/__tests__/index.test.ts index b7c0d86455..09960aa0ad 100644 --- a/packages/js/plugins/uts46/src/__tests__/index.test.ts +++ b/packages/js/plugins/uts46/src/__tests__/index.test.ts @@ -1,4 +1,4 @@ -import { Web3ApiClient } from "@web3api/client-js"; +import { Web3ApiClient } from "@polywrap/client-js"; import { uts46Plugin } from ".."; const uts46 = require("idna-uts46-hx/uts46bundle.js"); diff --git a/packages/js/plugins/uts46/src/index.ts b/packages/js/plugins/uts46/src/index.ts index 5d9db9b712..3b35646b98 100644 --- a/packages/js/plugins/uts46/src/index.ts +++ b/packages/js/plugins/uts46/src/index.ts @@ -8,7 +8,7 @@ import { manifest, } from "./w3-man"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; // eslint-disable-next-line @typescript-eslint/no-require-imports,@typescript-eslint/no-var-requires const uts46 = require("idna-uts46-hx/uts46bundle.js"); diff --git a/packages/js/plugins/uts46/src/w3-man/index.ts b/packages/js/plugins/uts46/src/w3-man/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/js/plugins/uts46/src/w3-man/index.ts +++ b/packages/js/plugins/uts46/src/w3-man/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uts46/src/w3-man/manifest.ts b/packages/js/plugins/uts46/src/w3-man/manifest.ts index 41ca650b30..bdf0be5286 100644 --- a/packages/js/plugins/uts46/src/w3-man/manifest.ts +++ b/packages/js/plugins/uts46/src/w3-man/manifest.ts @@ -5,7 +5,7 @@ import { schema } from "./"; -import { PluginPackageManifest } from "@web3api/core-js"; +import { PluginPackageManifest } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/js/plugins/uts46/src/w3-man/module.ts b/packages/js/plugins/uts46/src/w3-man/module.ts index 259113a169..2b34f4b0e9 100644 --- a/packages/js/plugins/uts46/src/w3-man/module.ts +++ b/packages/js/plugins/uts46/src/w3-man/module.ts @@ -5,7 +5,7 @@ import * as Types from "./types"; -import { Client, PluginModule, MaybeAsync } from "@web3api/core-js"; +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; export interface Input_toAscii extends Record { value: Types.String; diff --git a/packages/js/react/package.json b/packages/js/react/package.json index bba79ba2b8..25d043e1f2 100644 --- a/packages/js/react/package.json +++ b/packages/js/react/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/react", + "name": "@polywrap/react", "description": "Web3API React Integration", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -19,8 +19,8 @@ "test:watch": "yarn test --watch" }, "dependencies": { - "@web3api/client-js": "0.0.1-prealpha.85", - "@web3api/core-js": "0.0.1-prealpha.85" + "@polywrap/client-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85" }, "devDependencies": { "@testing-library/react": "11.2.5", @@ -29,12 +29,12 @@ "@types/prettier": "2.6.0", "@types/react": "16.9.0", "@types/react-dom": "16.9.0", - "@web3api/cli": "0.0.1-prealpha.85", - "@web3api/ens-plugin-js": "0.0.1-prealpha.85", - "@web3api/ethereum-plugin-js": "0.0.1-prealpha.85", - "@web3api/ipfs-plugin-js": "0.0.1-prealpha.85", - "@web3api/test-cases": "0.0.1-prealpha.85", - "@web3api/test-env-js": "0.0.1-prealpha.85", + "polywrap": "0.0.1-prealpha.85", + "@polywrap/ens-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.85", + "@polywrap/ipfs-plugin-js": "0.0.1-prealpha.85", + "@polywrap/test-cases": "0.0.1-prealpha.85", + "@polywrap/test-env-js": "0.0.1-prealpha.85", "jest": "26.6.3", "jest-environment-jsdom": "^26.0.1", "rimraf": "3.0.2", diff --git a/packages/js/react/src/__tests__/app/SimpleStorage.tsx b/packages/js/react/src/__tests__/app/SimpleStorage.tsx index c74efb6ac3..7599f348dc 100644 --- a/packages/js/react/src/__tests__/app/SimpleStorage.tsx +++ b/packages/js/react/src/__tests__/app/SimpleStorage.tsx @@ -1,5 +1,5 @@ -import { useWeb3ApiQuery, Web3ApiProvider, useWeb3ApiClient, createWeb3ApiProvider } from "@web3api/react"; -import { PluginRegistration } from "@web3api/client-js"; +import { useWeb3ApiQuery, Web3ApiProvider, useWeb3ApiClient, createWeb3ApiProvider } from "@polywrap/react"; +import { PluginRegistration } from "@polywrap/client-js"; // eslint-disable-next-line import/no-extraneous-dependencies import React from "react"; diff --git a/packages/js/react/src/__tests__/integration.spec.tsx b/packages/js/react/src/__tests__/integration.spec.tsx index 46cc35e603..2023998604 100644 --- a/packages/js/react/src/__tests__/integration.spec.tsx +++ b/packages/js/react/src/__tests__/integration.spec.tsx @@ -8,9 +8,9 @@ import { buildAndDeployApi, ensAddresses, providers -} from "@web3api/test-env-js"; -import { GetPathToTestApis } from "@web3api/test-cases"; -import { PluginRegistration } from "@web3api/core-js"; +} from "@polywrap/test-env-js"; +import { GetPathToTestApis } from "@polywrap/test-cases"; +import { PluginRegistration } from "@polywrap/core-js"; // eslint-disable-next-line import/no-extraneous-dependencies import React from "react"; diff --git a/packages/js/react/src/__tests__/plugins.ts b/packages/js/react/src/__tests__/plugins.ts index 25cad56bdf..c093feccac 100644 --- a/packages/js/react/src/__tests__/plugins.ts +++ b/packages/js/react/src/__tests__/plugins.ts @@ -1,8 +1,8 @@ -import { PluginRegistration } from "@web3api/core-js"; -import { defaultIpfsProviders } from "@web3api/client-js"; -import { plugin as ensPlugin } from "@web3api/ens-plugin-js"; -import { plugin as ethereumPlugin } from "@web3api/ethereum-plugin-js"; -import { plugin as ipfsPlugin } from "@web3api/ipfs-plugin-js"; +import { PluginRegistration } from "@polywrap/core-js"; +import { defaultIpfsProviders } from "@polywrap/client-js"; +import { plugin as ensPlugin } from "@polywrap/ens-plugin-js"; +import { plugin as ethereumPlugin } from "@polywrap/ethereum-plugin-js"; +import { plugin as ipfsPlugin } from "@polywrap/ipfs-plugin-js"; export function createPlugins( ensAddress: string, diff --git a/packages/js/react/src/__tests__/useWeb3ApiClient.spec.tsx b/packages/js/react/src/__tests__/useWeb3ApiClient.spec.tsx index d83e343f78..03b39710ad 100644 --- a/packages/js/react/src/__tests__/useWeb3ApiClient.spec.tsx +++ b/packages/js/react/src/__tests__/useWeb3ApiClient.spec.tsx @@ -6,13 +6,13 @@ import { } from ".."; import { createPlugins } from "./plugins"; -import { PluginRegistration } from "@web3api/core-js"; +import { PluginRegistration } from "@polywrap/core-js"; import { ensAddresses, providers, initTestEnvironment, stopTestEnvironment -} from "@web3api/test-env-js"; +} from "@polywrap/test-env-js"; import { renderHook, diff --git a/packages/js/react/src/__tests__/useWeb3ApiInvoke.spec.tsx b/packages/js/react/src/__tests__/useWeb3ApiInvoke.spec.tsx index 5d39655506..32aea982dd 100644 --- a/packages/js/react/src/__tests__/useWeb3ApiInvoke.spec.tsx +++ b/packages/js/react/src/__tests__/useWeb3ApiInvoke.spec.tsx @@ -6,15 +6,15 @@ import { import { UseWeb3ApiInvokeProps } from "../invoke"; import { createPlugins } from "./plugins"; -import { PluginRegistration } from "@web3api/core-js"; +import { PluginRegistration } from "@polywrap/core-js"; import { initTestEnvironment, stopTestEnvironment, buildAndDeployApi, ensAddresses, providers -} from "@web3api/test-env-js"; -import { GetPathToTestApis } from "@web3api/test-cases"; +} from "@polywrap/test-env-js"; +import { GetPathToTestApis } from "@polywrap/test-cases"; import { renderHook, diff --git a/packages/js/react/src/__tests__/useWeb3ApiQuery.spec.tsx b/packages/js/react/src/__tests__/useWeb3ApiQuery.spec.tsx index f8c7589e14..e2880c84a3 100644 --- a/packages/js/react/src/__tests__/useWeb3ApiQuery.spec.tsx +++ b/packages/js/react/src/__tests__/useWeb3ApiQuery.spec.tsx @@ -8,15 +8,15 @@ import { } from "../query" import { createPlugins } from "./plugins"; -import { PluginRegistration } from "@web3api/core-js"; +import { PluginRegistration } from "@polywrap/core-js"; import { initTestEnvironment, stopTestEnvironment, buildAndDeployApi, ensAddresses, providers -} from "@web3api/test-env-js"; -import { GetPathToTestApis } from "@web3api/test-cases"; +} from "@polywrap/test-env-js"; +import { GetPathToTestApis } from "@polywrap/test-cases"; import { renderHook, diff --git a/packages/js/react/src/client.tsx b/packages/js/react/src/client.tsx index 68c4256358..e158a2094b 100644 --- a/packages/js/react/src/client.tsx +++ b/packages/js/react/src/client.tsx @@ -2,7 +2,7 @@ import { PROVIDERS, PRIMARY_PROVIDER } from "./provider"; // eslint-disable-next-line import/no-extraneous-dependencies import React from "react"; -import { Web3ApiClient } from "@web3api/client-js"; +import { Web3ApiClient } from "@polywrap/client-js"; export interface UseWeb3ApiClientProps { provider?: string; diff --git a/packages/js/react/src/invoke.tsx b/packages/js/react/src/invoke.tsx index 453bf7c290..042a40aa7c 100644 --- a/packages/js/react/src/invoke.tsx +++ b/packages/js/react/src/invoke.tsx @@ -1,7 +1,7 @@ import { useWeb3ApiClient } from "./client"; import { useStateReducer } from "./state"; -import { InvokeApiOptions, InvokeApiResult } from "@web3api/core-js"; +import { InvokeApiOptions, InvokeApiResult } from "@polywrap/core-js"; export interface UseWeb3ApiInvokeState< TData = unknown diff --git a/packages/js/react/src/provider.tsx b/packages/js/react/src/provider.tsx index 461b58b5e4..b399a87974 100644 --- a/packages/js/react/src/provider.tsx +++ b/packages/js/react/src/provider.tsx @@ -1,6 +1,6 @@ // eslint-disable-next-line import/no-extraneous-dependencies import React from "react"; -import { Web3ApiClient, Web3ApiClientConfig } from "@web3api/client-js"; +import { Web3ApiClient, Web3ApiClientConfig } from "@polywrap/client-js"; type ClientContext = React.Context diff --git a/packages/js/react/src/query.tsx b/packages/js/react/src/query.tsx index c2fa052eac..4d1c359910 100644 --- a/packages/js/react/src/query.tsx +++ b/packages/js/react/src/query.tsx @@ -1,7 +1,7 @@ import { useWeb3ApiClient } from "./client"; import { useStateReducer } from "./state"; -import { QueryApiResult, QueryApiOptions } from "@web3api/core-js"; +import { QueryApiResult, QueryApiOptions } from "@polywrap/core-js"; export interface UseWeb3ApiQueryState< TData extends Record = Record diff --git a/packages/js/test-env/package.json b/packages/js/test-env/package.json index 038a629456..aef89daab6 100644 --- a/packages/js/test-env/package.json +++ b/packages/js/test-env/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-env-js", + "name": "@polywrap/test-env-js", "description": "Web3API Test Helpers", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -17,9 +17,9 @@ "copy:wrappers": "copyfiles ./src/wrappers/**/**/* ./build/wrappers/ -u 2" }, "dependencies": { - "@web3api/core-js": "0.0.1-prealpha.85", - "@web3api/client-js": "0.0.1-prealpha.85", - "@web3api/ethereum-plugin-js": "0.0.1-prealpha.85", + "@polywrap/core-js": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", + "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.85", "axios": "0.21.2", "js-yaml": "4.1.0", "spawn-command": "0.0.2-1" diff --git a/packages/js/test-env/src/index.ts b/packages/js/test-env/src/index.ts index 94be920cfa..03a913ec0f 100644 --- a/packages/js/test-env/src/index.ts +++ b/packages/js/test-env/src/index.ts @@ -6,9 +6,9 @@ import spawn from "spawn-command"; import axios from "axios"; import fs from "fs"; import yaml from "js-yaml"; -import { deserializeWeb3ApiManifest, Uri } from "@web3api/core-js"; -import { Web3ApiClient } from "@web3api/client-js"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; +import { deserializeWeb3ApiManifest, Uri } from "@polywrap/core-js"; +import { Web3ApiClient } from "@polywrap/client-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; export const ensAddresses = { ensAddress: "0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab", diff --git a/packages/js/tracing/package.json b/packages/js/tracing/package.json index 7901424ff4..7f6cfe8bce 100644 --- a/packages/js/tracing/package.json +++ b/packages/js/tracing/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/tracing-js", + "name": "@polywrap/tracing-js", "description": "Web3API Core Tracing", "version": "0.0.1-prealpha.85", "license": "MIT", diff --git a/packages/manifest-schemas/package.json b/packages/manifest-schemas/package.json index 80c2426429..977a5c27db 100644 --- a/packages/manifest-schemas/package.json +++ b/packages/manifest-schemas/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/manifest-schemas", + "name": "@polywrap/manifest-schemas", "description": "Web3API Manifest Schemas", "version": "0.0.1-prealpha.85", "license": "MIT", diff --git a/packages/schema/bind/package.json b/packages/schema/bind/package.json index 1d97b9dbd4..2f6be78fd0 100644 --- a/packages/schema/bind/package.json +++ b/packages/schema/bind/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/schema-bind", + "name": "@polywrap/schema-bind", "description": "Web3API Schema Binding", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -20,8 +20,8 @@ "copy:templates": "copyfiles -u 1 src/**/*.mustache build/" }, "dependencies": { - "@web3api/os-js": "0.0.1-prealpha.85", - "@web3api/schema-parse": "0.0.1-prealpha.85", + "@polywrap/os-js": "0.0.1-prealpha.85", + "@polywrap/schema-parse": "0.0.1-prealpha.85", "mustache": "4.0.1" }, "devDependencies": { @@ -29,7 +29,7 @@ "@types/lodash": "4.14.178", "@types/mustache": "4.0.1", "@types/prettier": "2.6.0", - "@web3api/test-cases": "0.0.1-prealpha.85", + "@polywrap/test-cases": "0.0.1-prealpha.85", "copyfiles": "2.4.1", "jest": "26.6.3", "rimraf": "3.0.2", diff --git a/packages/schema/bind/src/__tests__/index.ts b/packages/schema/bind/src/__tests__/index.ts index a90f0e8f2b..770ee1190a 100644 --- a/packages/schema/bind/src/__tests__/index.ts +++ b/packages/schema/bind/src/__tests__/index.ts @@ -2,9 +2,9 @@ import { BindOptions, BindLanguage } from "../"; import fs from "fs"; import path from "path"; -import { parseSchema } from "@web3api/schema-parse"; -import { GetPathToBindTestFiles } from "@web3api/test-cases"; -import { normalizeLineEndings } from "@web3api/os-js"; +import { parseSchema } from "@polywrap/schema-parse"; +import { GetPathToBindTestFiles } from "@polywrap/test-cases"; +import { normalizeLineEndings } from "@polywrap/os-js"; const root = GetPathToBindTestFiles(); diff --git a/packages/schema/bind/src/__tests__/test-cases.spec.ts b/packages/schema/bind/src/__tests__/test-cases.spec.ts index cd17e2ec8e..a8307b9033 100644 --- a/packages/schema/bind/src/__tests__/test-cases.spec.ts +++ b/packages/schema/bind/src/__tests__/test-cases.spec.ts @@ -10,7 +10,7 @@ import { writeFileSync, alphabeticalNamedSort, OutputEntry -} from "@web3api/os-js"; +} from "@polywrap/os-js"; import fs from "fs"; import path from "path"; diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/index.ts b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/index.ts index dfab8d614a..f8b26d6e2e 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/index.ts +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/index.ts @@ -10,8 +10,8 @@ import { addFirstLast, extendType, toPrefixedGraphQLType, -} from "@web3api/schema-parse"; -import { OutputEntry, readDirectorySync } from "@web3api/os-js"; +} from "@polywrap/schema-parse"; +import { OutputEntry, readDirectorySync } from "@polywrap/os-js"; import path from "path"; const templatesDir = readDirectorySync(path.join(__dirname, "./templates")); diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/entry-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/entry-ts.mustache index fe047eef7a..f9bcf2a31f 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/entry-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/entry-ts.mustache @@ -5,7 +5,7 @@ import { w3_sanitize_env, w3_abort, InvokeArgs -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; {{#moduleType}} {{#methods.length}} diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/module-type/index-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/module-type/index-ts.mustache index 1a7b12d67f..5a0e15a748 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/module-type/index-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/module-type/index-ts.mustache @@ -6,7 +6,7 @@ import { BigNumber, JSON, Result -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; {{#methods.length}} import { {{#methods}} diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/object-type/index-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/object-type/index-ts.mustache index 126a888c48..ab841d2923 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/object-type/index-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/object-type/index-ts.mustache @@ -7,7 +7,7 @@ import { JSON, JSONSerializer, JSONDeserializer, -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { serialize{{type}}, deserialize{{type}}, diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/interface-type/index-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/interface-type/index-ts.mustache index bdd27e0f92..5c490a835e 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/interface-type/index-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/interface-type/index-ts.mustache @@ -3,7 +3,7 @@ {{#enabled}} import { w3_getImplementations -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; {{/enabled}} {{/getImplementations}} {{/capabilities}} diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/object-type/index-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/object-type/index-ts.mustache index a6c5f56306..9bdd689ad6 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/object-type/index-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/object-type/index-ts.mustache @@ -7,7 +7,7 @@ import { JSON, JSONSerializer, JSONDeserializer, -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { serialize{{type}}, deserialize{{type}}, diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/serialization_imports.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/serialization_imports.mustache index 7b565e1752..8aeb5aa792 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/serialization_imports.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/serialization_imports.mustache @@ -9,4 +9,4 @@ import { BigNumber, JSON, Context -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/index.ts b/packages/schema/bind/src/bindings/rust/wasm-rs/index.ts index 42a60aaa3b..909c383b63 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/index.ts +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/index.ts @@ -12,8 +12,8 @@ import { toPrefixedGraphQLType, hasImports, methodParentPointers, -} from "@web3api/schema-parse"; -import { OutputEntry, readDirectorySync } from "@web3api/os-js"; +} from "@polywrap/schema-parse"; +import { OutputEntry, readDirectorySync } from "@polywrap/os-js"; import path from "path"; const templatesDir = readDirectorySync(path.join(__dirname, "./templates")); diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/transforms/byRef.ts b/packages/schema/bind/src/bindings/rust/wasm-rs/transforms/byRef.ts index bd6b2dc1fe..37f805b674 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/transforms/byRef.ts +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/transforms/byRef.ts @@ -1,4 +1,4 @@ -import { TypeInfoTransforms, AnyDefinition } from "@web3api/schema-parse"; +import { TypeInfoTransforms, AnyDefinition } from "@polywrap/schema-parse"; export function byRef(): TypeInfoTransforms { return { diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/transforms/propertyDeps.ts b/packages/schema/bind/src/bindings/rust/wasm-rs/transforms/propertyDeps.ts index 3f4ee39d45..3ea0d595c6 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/transforms/propertyDeps.ts +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/transforms/propertyDeps.ts @@ -8,7 +8,7 @@ import { AnyDefinition, ModuleDefinition, TypeInfoTransforms, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; interface PropertyDep { crate: string; diff --git a/packages/schema/bind/src/bindings/typescript/app-ts/index.ts b/packages/schema/bind/src/bindings/typescript/app-ts/index.ts index f5c97bd5eb..995d81bea1 100644 --- a/packages/schema/bind/src/bindings/typescript/app-ts/index.ts +++ b/packages/schema/bind/src/bindings/typescript/app-ts/index.ts @@ -11,7 +11,7 @@ import { toPrefixedGraphQLType, methodParentPointers, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; import path from "path"; export { Functions }; diff --git a/packages/schema/bind/src/bindings/typescript/app-ts/templates/types-ts.mustache b/packages/schema/bind/src/bindings/typescript/app-ts/templates/types-ts.mustache index 575bd22f19..bb6cf60d1b 100644 --- a/packages/schema/bind/src/bindings/typescript/app-ts/templates/types-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/app-ts/templates/types-ts.mustache @@ -5,7 +5,7 @@ import * as Types from "./"; import { Client, InvokeApiResult -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts index aa24ed5848..278322cb4e 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts @@ -12,7 +12,7 @@ import { toPrefixedGraphQLType, methodParentPointers, interfaceUris, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; import path from "path"; export { Functions }; diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/index-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/index-ts.mustache index ff371c0cd8..f367d143d9 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/index-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/index-ts.mustache @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache index edc98649c7..9a6f3b20da 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/module-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/module-ts.mustache index bd6f431b06..527e8a3df3 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/module-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/module-ts.mustache @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; {{#moduleType}} {{#methods}} diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/types-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/types-ts.mustache index ec5e61b775..f1355faaab 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/types-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/types-ts.mustache @@ -8,7 +8,7 @@ import * as Types from "./"; import { Client, InvokeApiResult -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/schema/bind/src/bindings/utils/templates.ts b/packages/schema/bind/src/bindings/utils/templates.ts index 2923092b12..fac191d695 100644 --- a/packages/schema/bind/src/bindings/utils/templates.ts +++ b/packages/schema/bind/src/bindings/utils/templates.ts @@ -1,4 +1,4 @@ -import { OutputEntry, readDirectorySync } from "@web3api/os-js"; +import { OutputEntry, readDirectorySync } from "@polywrap/os-js"; import Mustache from "mustache"; import path from "path"; diff --git a/packages/schema/bind/src/types.ts b/packages/schema/bind/src/types.ts index bdd626cb33..9508b2466c 100644 --- a/packages/schema/bind/src/types.ts +++ b/packages/schema/bind/src/types.ts @@ -1,5 +1,5 @@ -import { TypeInfo } from "@web3api/schema-parse"; -import { OutputDirectory } from "@web3api/os-js"; +import { TypeInfo } from "@polywrap/schema-parse"; +import { OutputDirectory } from "@polywrap/os-js"; export type BindLanguage = "wasm-as" | "wasm-rs" | "plugin-ts" | "app-ts"; diff --git a/packages/schema/compose/package.json b/packages/schema/compose/package.json index 57e0ccf59e..80d1864cff 100644 --- a/packages/schema/compose/package.json +++ b/packages/schema/compose/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/schema-compose", + "name": "@polywrap/schema-compose", "description": "Web3API Schema Composition", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -19,7 +19,7 @@ "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { - "@web3api/schema-parse": "0.0.1-prealpha.85", + "@polywrap/schema-parse": "0.0.1-prealpha.85", "graphql": "15.5.0", "mustache": "4.0.1" }, @@ -27,7 +27,7 @@ "@types/jest": "26.0.8", "@types/mustache": "4.0.1", "@types/prettier": "2.6.0", - "@web3api/test-cases": "0.0.1-prealpha.85", + "@polywrap/test-cases": "0.0.1-prealpha.85", "jest": "26.6.3", "rimraf": "3.0.2", "ts-jest": "26.5.4", diff --git a/packages/schema/compose/src/__tests__/env.spec.ts b/packages/schema/compose/src/__tests__/env.spec.ts index b2772edc57..8ecc904a83 100644 --- a/packages/schema/compose/src/__tests__/env.spec.ts +++ b/packages/schema/compose/src/__tests__/env.spec.ts @@ -1,4 +1,4 @@ -import { createObjectDefinition, createPropertyDefinition } from "@web3api/schema-parse"; +import { createObjectDefinition, createPropertyDefinition } from "@polywrap/schema-parse"; import { checkDuplicateEnvProperties } from "../env"; describe("Check duplicate environment properties", () => { diff --git a/packages/schema/compose/src/__tests__/index.ts b/packages/schema/compose/src/__tests__/index.ts index 80c7d2a8c9..8f8ccbeaf7 100644 --- a/packages/schema/compose/src/__tests__/index.ts +++ b/packages/schema/compose/src/__tests__/index.ts @@ -3,12 +3,12 @@ import { ComposerOutput, ComposerOptions, ComposerFilter } from ".."; import path from "path"; import { readdirSync, Dirent } from "fs"; -import { TypeInfo } from "@web3api/schema-parse"; +import { TypeInfo } from "@polywrap/schema-parse"; import { GetPathToComposeTestFiles, readFileIfExists, readNamedExportIfExists, -} from "@web3api/test-cases" +} from "@polywrap/test-cases" const root = GetPathToComposeTestFiles(); diff --git a/packages/schema/compose/src/env.ts b/packages/schema/compose/src/env.ts index 086d851a39..55da64e76c 100644 --- a/packages/schema/compose/src/env.ts +++ b/packages/schema/compose/src/env.ts @@ -3,7 +3,7 @@ import { MODULE_NAME, AnyDefinition, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export function validateEnv(info: TypeInfo): void { if (info.envType.client) { diff --git a/packages/schema/compose/src/index.ts b/packages/schema/compose/src/index.ts index 20cffecc4e..a35dfab224 100644 --- a/packages/schema/compose/src/index.ts +++ b/packages/schema/compose/src/index.ts @@ -3,7 +3,7 @@ import { resolveImportsAndParseSchemas } from "./resolve"; import { renderSchema } from "./render"; import { validateEnv } from "./env"; -import { TypeInfo, combineTypeInfo } from "@web3api/schema-parse"; +import { TypeInfo, combineTypeInfo } from "@polywrap/schema-parse"; export * from "./types"; export { renderSchema }; diff --git a/packages/schema/compose/src/parse.ts b/packages/schema/compose/src/parse.ts index 888af9ee1e..6ad58e5624 100644 --- a/packages/schema/compose/src/parse.ts +++ b/packages/schema/compose/src/parse.ts @@ -2,7 +2,7 @@ import { ExternalImport, LocalImport, SYNTAX_REFERENCE, Use } from "./types"; import { getDuplicates } from "./utils"; import Path from "path"; -import { CapabilityType } from "@web3api/schema-parse"; +import { CapabilityType } from "@polywrap/schema-parse"; export function parseUse(useStatements: RegExpMatchArray[]): Use[] { const uses: Use[] = []; diff --git a/packages/schema/compose/src/render.ts b/packages/schema/compose/src/render.ts index 33012b035c..a529791dc6 100644 --- a/packages/schema/compose/src/render.ts +++ b/packages/schema/compose/src/render.ts @@ -9,7 +9,7 @@ import { transformTypeInfo, moduleCapabilities, addAnnotations, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; // Remove mustache's built-in HTML escaping Mustache.escape = (value) => value; diff --git a/packages/schema/compose/src/resolve.ts b/packages/schema/compose/src/resolve.ts index 91855cebe9..04100edad6 100644 --- a/packages/schema/compose/src/resolve.ts +++ b/packages/schema/compose/src/resolve.ts @@ -50,7 +50,7 @@ import { createObjectDefinition, createModuleDefinition, isClientEnvType, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; type ImplementationWithInterfaces = { typeName: string; diff --git a/packages/schema/compose/src/templates/header.mustache.ts b/packages/schema/compose/src/templates/header.mustache.ts index 382a472c0c..7c70a2164a 100644 --- a/packages/schema/compose/src/templates/header.mustache.ts +++ b/packages/schema/compose/src/templates/header.mustache.ts @@ -1,4 +1,4 @@ -import { header } from "@web3api/schema-parse"; +import { header } from "@polywrap/schema-parse"; import Mustache from "mustache"; // Remove mustache's built-in HTML escaping diff --git a/packages/schema/compose/src/types.ts b/packages/schema/compose/src/types.ts index cf76409eaa..ef69c821c2 100644 --- a/packages/schema/compose/src/types.ts +++ b/packages/schema/compose/src/types.ts @@ -1,4 +1,4 @@ -import { CapabilityType } from "@web3api/schema-parse"; +import { CapabilityType } from "@polywrap/schema-parse"; export interface SchemaFile { schema: string; diff --git a/packages/schema/parse/package.json b/packages/schema/parse/package.json index 5157325cd0..2e102d5882 100644 --- a/packages/schema/parse/package.json +++ b/packages/schema/parse/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/schema-parse", + "name": "@polywrap/schema-parse", "description": "Web3API Schema Parsing", "version": "0.0.1-prealpha.85", "license": "MIT", @@ -26,7 +26,7 @@ "@types/deep-equal": "1.0.1", "@types/jest": "26.0.8", "@types/prettier": "2.6.0", - "@web3api/test-cases": "0.0.1-prealpha.85", + "@polywrap/test-cases": "0.0.1-prealpha.85", "jest": "26.6.3", "rimraf": "3.0.2", "ts-jest": "26.5.4", diff --git a/packages/schema/parse/src/__tests__/index.ts b/packages/schema/parse/src/__tests__/index.ts index 295d049dd8..fa569a9e3c 100644 --- a/packages/schema/parse/src/__tests__/index.ts +++ b/packages/schema/parse/src/__tests__/index.ts @@ -7,7 +7,7 @@ import { GetPathToParseTestFiles, readFileIfExists, readNamedExportIfExists -} from "@web3api/test-cases" +} from "@polywrap/test-cases" const root = GetPathToParseTestFiles(); diff --git a/packages/templates/api/assemblyscript/package.json b/packages/templates/api/assemblyscript/package.json index 4f1105a5c2..b4aee5c593 100644 --- a/packages/templates/api/assemblyscript/package.json +++ b/packages/templates/api/assemblyscript/package.json @@ -21,8 +21,8 @@ "@types/jest": "27.0.3", "@types/node": "16.11.11", "@types/prettier": "2.6.0", - "@web3api/cli": "0.0.1-prealpha.85", - "@web3api/ethereum-plugin-js": "0.0.1-prealpha.85", + "polywrap": "0.0.1-prealpha.85", + "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.85", "assemblyscript": "0.19.1", "ethers": "5.0.7", "jest": "26.6.3", @@ -32,6 +32,6 @@ "typescript": "4.0.7" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.84" + "@polywrap/wasm-as": "0.0.1-prealpha.85" } } diff --git a/packages/templates/api/assemblyscript/scripts/deploy-contract.js b/packages/templates/api/assemblyscript/scripts/deploy-contract.js index c1b33662a1..471d10c40c 100644 --- a/packages/templates/api/assemblyscript/scripts/deploy-contract.js +++ b/packages/templates/api/assemblyscript/scripts/deploy-contract.js @@ -1,6 +1,6 @@ const buildContract = require("./build-contract"); -const { initTestEnvironment, stopTestEnvironment, providers } = require("@web3api/test-env-js"); -const { EthereumPlugin } = require("@web3api/ethereum-plugin-js"); +const { initTestEnvironment, stopTestEnvironment, providers } = require("@polywrap/test-env-js"); +const { EthereumPlugin } = require("@polywrap/ethereum-plugin-js"); const fs = require("fs"); async function main() { diff --git a/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts b/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts index 76dabe74c8..e2f74cda87 100644 --- a/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts +++ b/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts @@ -1,11 +1,11 @@ -import { Web3ApiClient } from "@web3api/client-js"; +import { Web3ApiClient } from "@polywrap/client-js"; import { buildApi, initTestEnvironment, stopTestEnvironment, providers, ensAddresses -} from "@web3api/test-env-js"; +} from "@polywrap/test-env-js"; import * as App from "../types/w3"; import path from "path"; diff --git a/packages/templates/api/assemblyscript/src/__tests__/utils.ts b/packages/templates/api/assemblyscript/src/__tests__/utils.ts index 546c3e12c9..6c60c39d25 100644 --- a/packages/templates/api/assemblyscript/src/__tests__/utils.ts +++ b/packages/templates/api/assemblyscript/src/__tests__/utils.ts @@ -1,7 +1,7 @@ -import { ClientConfig } from "@web3api/client-js"; -import { ensPlugin } from "@web3api/ens-plugin-js"; -import { ethereumPlugin } from "@web3api/ethereum-plugin-js"; -import { ipfsPlugin } from "@web3api/ipfs-plugin-js"; +import { ClientConfig } from "@polywrap/client-js"; +import { ensPlugin } from "@polywrap/ens-plugin-js"; +import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; +import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; export function getPlugins( ethereum: string, diff --git a/packages/templates/api/interface/package.json b/packages/templates/api/interface/package.json index 86655e882a..99f6913eb2 100644 --- a/packages/templates/api/interface/package.json +++ b/packages/templates/api/interface/package.json @@ -11,6 +11,6 @@ "test": "yarn test:env:up && yarn deploy && yarn test:env:down" }, "devDependencies": { - "@web3api/cli": "0.0.1-prealpha.85" + "polywrap": "0.0.1-prealpha.85" } } diff --git a/packages/templates/app/typescript-node/package.json b/packages/templates/app/typescript-node/package.json index d688cb6676..13d499a393 100644 --- a/packages/templates/app/typescript-node/package.json +++ b/packages/templates/app/typescript-node/package.json @@ -8,11 +8,11 @@ "test": "ts-node ./src/index.ts" }, "dependencies": { - "@web3api/client-js": "0.0.1-prealpha.85" + "@polywrap/client-js": "0.0.1-prealpha.85" }, "devDependencies": { "@types/node": "12.12.26", - "@web3api/cli": "0.0.1-prealpha.85", + "polywrap": "0.0.1-prealpha.85", "ts-node": "10.7.0", "typescript": "4.0.7" } diff --git a/packages/templates/app/typescript-node/src/index.ts b/packages/templates/app/typescript-node/src/index.ts index 4680b21590..144273f38b 100644 --- a/packages/templates/app/typescript-node/src/index.ts +++ b/packages/templates/app/typescript-node/src/index.ts @@ -1,6 +1,6 @@ import { HelloWorld_Module, Ethereum_Module } from "./w3"; -import { Web3ApiClient } from "@web3api/client-js"; +import { Web3ApiClient } from "@polywrap/client-js"; const client = new Web3ApiClient(); diff --git a/packages/templates/app/typescript-react/package.json b/packages/templates/app/typescript-react/package.json index ff6988f771..10670f6ac1 100644 --- a/packages/templates/app/typescript-react/package.json +++ b/packages/templates/app/typescript-react/package.json @@ -10,8 +10,8 @@ ] }, "dependencies": { - "@web3api/client-js": "0.0.1-prealpha.85", - "@web3api/react": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", + "@polywrap/react": "0.0.1-prealpha.85", "http-proxy": "1.18.1", "http-proxy-middleware": "1.0.6", "react": "16.13.1", @@ -27,7 +27,7 @@ "@types/react": "16.9.0", "@types/react-dom": "16.9.0", "@types/react-lottie": "1.2.5", - "@web3api/cli": "0.0.1-prealpha.85" + "polywrap": "0.0.1-prealpha.85" }, "scripts": { "start": "react-scripts start", diff --git a/packages/templates/app/typescript-react/src/App.tsx b/packages/templates/app/typescript-react/src/App.tsx index 440091d3e3..2a44cf6224 100644 --- a/packages/templates/app/typescript-react/src/App.tsx +++ b/packages/templates/app/typescript-react/src/App.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Web3ApiProvider } from '@web3api/react'; +import { Web3ApiProvider } from '@polywrap/react'; import { HelloWorld } from './HelloWorld'; import { Header } from './Header'; import Logo from './logo.png'; diff --git a/packages/templates/app/typescript-react/src/HelloWorld.tsx b/packages/templates/app/typescript-react/src/HelloWorld.tsx index 578da91453..d27ef19603 100644 --- a/packages/templates/app/typescript-react/src/HelloWorld.tsx +++ b/packages/templates/app/typescript-react/src/HelloWorld.tsx @@ -1,6 +1,6 @@ import { HelloWorld_Query } from './w3'; import React from 'react'; -import { useWeb3ApiClient } from '@web3api/react'; +import { useWeb3ApiClient } from '@polywrap/react'; import { ToastContainer, toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; diff --git a/packages/templates/package.json b/packages/templates/package.json index 6638ff308a..77c9e9b0b8 100644 --- a/packages/templates/package.json +++ b/packages/templates/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/templates", + "name": "@polywrap/templates", "description": "Web3API Templates", "version": "0.0.1-prealpha.85", "license": "MIT", diff --git a/packages/templates/plugin/typescript/package.json b/packages/templates/plugin/typescript/package.json index 373cd83c29..3a6baec50b 100644 --- a/packages/templates/plugin/typescript/package.json +++ b/packages/templates/plugin/typescript/package.json @@ -12,13 +12,13 @@ "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { - "@web3api/core-js": "0.0.1-prealpha.85" + "@polywrap/core-js": "0.0.1-prealpha.85" }, "devDependencies": { "@types/jest": "26.0.8", "@types/prettier": "2.6.0", - "@web3api/cli": "0.0.1-prealpha.85", - "@web3api/client-js": "0.0.1-prealpha.85", + "polywrap": "0.0.1-prealpha.85", + "@polywrap/client-js": "0.0.1-prealpha.85", "jest": "26.6.3", "rimraf": "3.0.2", "ts-jest": "26.5.4", diff --git a/packages/templates/plugin/typescript/src/__tests__/e2e.spec.ts b/packages/templates/plugin/typescript/src/__tests__/e2e.spec.ts index 009d15b838..9a8f7cf2cc 100644 --- a/packages/templates/plugin/typescript/src/__tests__/e2e.spec.ts +++ b/packages/templates/plugin/typescript/src/__tests__/e2e.spec.ts @@ -1,4 +1,4 @@ -import { Web3ApiClient } from "@web3api/client-js"; +import { Web3ApiClient } from "@polywrap/client-js"; import { samplePlugin } from "../"; describe("e2e", () => { diff --git a/packages/templates/plugin/typescript/src/index.ts b/packages/templates/plugin/typescript/src/index.ts index 0f286e3ee5..0abda3a22b 100644 --- a/packages/templates/plugin/typescript/src/index.ts +++ b/packages/templates/plugin/typescript/src/index.ts @@ -1,6 +1,6 @@ import { Module, Input_sampleMethod, manifest } from "./w3"; -import { PluginFactory } from "@web3api/core-js"; +import { PluginFactory } from "@polywrap/core-js"; export interface SamplePluginConfig extends Record { defaultValue: string; diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/package.json b/packages/test-cases/cases/apis/wasm-as/asyncify/package.json index f99bda2987..7342f98cb4 100644 --- a/packages/test-cases/cases/apis/wasm-as/asyncify/package.json +++ b/packages/test-cases/cases/apis/wasm-as/asyncify/package.json @@ -2,7 +2,7 @@ "name": "test-case-asyncify", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/asyncify/web3api.build.yaml index afb160d6b0..88c558f8ae 100644 --- a/packages/test-cases/cases/apis/wasm-as/asyncify/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/asyncify/web3api.build.yaml @@ -4,5 +4,5 @@ docker: config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/package.json b/packages/test-cases/cases/apis/wasm-as/bigint-type/package.json index 3dd317cb30..1649c80af1 100644 --- a/packages/test-cases/cases/apis/wasm-as/bigint-type/package.json +++ b/packages/test-cases/cases/apis/wasm-as/bigint-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-bigint-type", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts b/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts index 33fbf33d82..961d280d44 100644 --- a/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts @@ -1,7 +1,7 @@ import { Input_method } from "./w3"; -import { BigInt } from "@web3api/wasm-as"; +import { BigInt } from "@polywrap/wasm-as"; export function method(input: Input_method): BigInt { let result = input.arg1.mul(input.obj.prop1); diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.build.yaml index c3ffc064a2..ae03b98c69 100644 --- a/packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.build.yaml @@ -4,5 +4,5 @@ docker: config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/package.json b/packages/test-cases/cases/apis/wasm-as/bignumber-type/package.json index 581f32d280..fa3b0e585e 100644 --- a/packages/test-cases/cases/apis/wasm-as/bignumber-type/package.json +++ b/packages/test-cases/cases/apis/wasm-as/bignumber-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-bignumber-type", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.65", + "@polywrap/wasm-as": "0.0.1-prealpha.65", "assemblyscript": "0.19.1" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts b/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts index 2156b10d40..23f49b93df 100644 --- a/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts @@ -1,7 +1,7 @@ import { Input_method } from "./w3"; -import { BigNumber } from "@web3api/wasm-as"; +import { BigNumber } from "@polywrap/wasm-as"; export function method(input: Input_method): BigNumber { let result = input.arg1.mul(input.obj.prop1); diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.build.yaml index f50455e217..44c908910a 100644 --- a/packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.build.yaml @@ -4,5 +4,5 @@ docker: config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/bytes-type/package.json b/packages/test-cases/cases/apis/wasm-as/bytes-type/package.json index c99bd63433..e2844562d3 100644 --- a/packages/test-cases/cases/apis/wasm-as/bytes-type/package.json +++ b/packages/test-cases/cases/apis/wasm-as/bytes-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-bytes-type", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.build.yaml index f1a764be2f..f582d66941 100644 --- a/packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.build.yaml @@ -4,5 +4,5 @@ docker: config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/enum-types/package.json b/packages/test-cases/cases/apis/wasm-as/enum-types/package.json index 95d109cbaa..fb6d71b0eb 100644 --- a/packages/test-cases/cases/apis/wasm-as/enum-types/package.json +++ b/packages/test-cases/cases/apis/wasm-as/enum-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-enum-types", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/enum-types/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/enum-types/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/apis/wasm-as/enum-types/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/enum-types/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/env-client-types/package.json b/packages/test-cases/cases/apis/wasm-as/env-client-types/package.json index c7db61e95f..65379b66e2 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-client-types/package.json +++ b/packages/test-cases/cases/apis/wasm-as/env-client-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-env-client-types", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.28", + "@polywrap/wasm-as": "0.0.1-prealpha.28", "assemblyscript": "0.19.5" } } diff --git a/packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.build.yaml index e36a4de895..9b7a60706a 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.build.yaml @@ -4,5 +4,5 @@ config: include: - ./src linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/env-types/package.json b/packages/test-cases/cases/apis/wasm-as/env-types/package.json index 7131d3a4db..89d7b9fb2f 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-types/package.json +++ b/packages/test-cases/cases/apis/wasm-as/env-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-complex-env-types", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } diff --git a/packages/test-cases/cases/apis/wasm-as/env-types/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/env-types/web3api.build.yaml index e36a4de895..9b7a60706a 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-types/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/env-types/web3api.build.yaml @@ -4,5 +4,5 @@ config: include: - ./src linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/package.json b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/package.json index 67d35d12c4..f666ee6954 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/package.json +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/package.json @@ -2,7 +2,7 @@ "name": "test-case-implementation", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.build.yaml index 2cf967618b..9f8b2d1fc6 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/package.json b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/package.json index 67d35d12c4..f666ee6954 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/package.json +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/package.json @@ -2,7 +2,7 @@ "name": "test-case-implementation", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.build.yaml index 89daa790db..adad924da3 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.build.yaml @@ -4,5 +4,5 @@ docker: config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/package.json b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/package.json index 4b40761c8c..d7e1d6fa20 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/package.json +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/package.json @@ -2,7 +2,7 @@ "name": "test-case-interface-invoke", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.build.yaml index 2cf967618b..9f8b2d1fc6 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/package.json b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/package.json index 4b40761c8c..d7e1d6fa20 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/package.json +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/package.json @@ -2,7 +2,7 @@ "name": "test-case-interface-invoke", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.build.yaml index 2cf967618b..9f8b2d1fc6 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/invalid-types/package.json b/packages/test-cases/cases/apis/wasm-as/invalid-types/package.json index 16821fa2e9..251475e4c1 100644 --- a/packages/test-cases/cases/apis/wasm-as/invalid-types/package.json +++ b/packages/test-cases/cases/apis/wasm-as/invalid-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-invalid-types", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/package.json b/packages/test-cases/cases/apis/wasm-as/json-type/package.json index 2b34901022..32e1f192cd 100644 --- a/packages/test-cases/cases/apis/wasm-as/json-type/package.json +++ b/packages/test-cases/cases/apis/wasm-as/json-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-json-type", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts b/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts index ea546c4dbf..14b73ad2aa 100644 --- a/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts @@ -3,7 +3,7 @@ import { Input_toJson, Pair } from "./w3"; -import { JSON } from "@web3api/wasm-as"; +import { JSON } from "@polywrap/wasm-as"; export function fromJson(input: Input_fromJson): Pair { return Pair.fromJson(input.json); diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/json-type/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/apis/wasm-as/json-type/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/json-type/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/large-types/package.json b/packages/test-cases/cases/apis/wasm-as/large-types/package.json index 80df036bf5..50f011fd84 100644 --- a/packages/test-cases/cases/apis/wasm-as/large-types/package.json +++ b/packages/test-cases/cases/apis/wasm-as/large-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-large-types", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/large-types/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/large-types/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/apis/wasm-as/large-types/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/large-types/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/map-type/package.json b/packages/test-cases/cases/apis/wasm-as/map-type/package.json index b1ac318cf1..df3b344f35 100644 --- a/packages/test-cases/cases/apis/wasm-as/map-type/package.json +++ b/packages/test-cases/cases/apis/wasm-as/map-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-map-type", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.1" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/map-type/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/map-type/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/apis/wasm-as/map-type/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/map-type/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/number-types/package.json b/packages/test-cases/cases/apis/wasm-as/number-types/package.json index 17679aa5b4..b4b9e98ed5 100644 --- a/packages/test-cases/cases/apis/wasm-as/number-types/package.json +++ b/packages/test-cases/cases/apis/wasm-as/number-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-number-types", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/number-types/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/number-types/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/apis/wasm-as/number-types/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/number-types/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/object-types/package.json b/packages/test-cases/cases/apis/wasm-as/object-types/package.json index f5fca14d6e..2ff56b1624 100644 --- a/packages/test-cases/cases/apis/wasm-as/object-types/package.json +++ b/packages/test-cases/cases/apis/wasm-as/object-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-object-types", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/object-types/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/object-types/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/apis/wasm-as/object-types/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/object-types/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/reserved-words/package.json b/packages/test-cases/cases/apis/wasm-as/reserved-words/package.json index eb2c17b461..ee2ad5aeb9 100644 --- a/packages/test-cases/cases/apis/wasm-as/reserved-words/package.json +++ b/packages/test-cases/cases/apis/wasm-as/reserved-words/package.json @@ -2,7 +2,7 @@ "name": "test-case-reserved-words", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/simple-env-types/package.json b/packages/test-cases/cases/apis/wasm-as/simple-env-types/package.json index 39f3f02f99..8c7c831e1d 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-env-types/package.json +++ b/packages/test-cases/cases/apis/wasm-as/simple-env-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-simple-env-types", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.84", + "@polywrap/wasm-as": "0.0.1-prealpha.84", "assemblyscript": "0.19.1" } } diff --git a/packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.build.yaml index 6cbb1025d5..47b6b59027 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.build.yaml @@ -4,5 +4,5 @@ config: include: - ./src linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/package.json b/packages/test-cases/cases/apis/wasm-as/simple-storage/package.json index 379935652b..570fe88d18 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-storage/package.json +++ b/packages/test-cases/cases/apis/wasm-as/simple-storage/package.json @@ -2,7 +2,7 @@ "name": "test-case-simple-storage", "private": true, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.58", + "@polywrap/wasm-as": "0.0.1-prealpha.58", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.build.yaml b/packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.build.yaml index cf88af6a08..90a6b87e3c 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.build.yaml +++ b/packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.build.yaml @@ -4,5 +4,5 @@ config: include: - ./src linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/bind/sanity/output/app-ts/types.ts b/packages/test-cases/cases/bind/sanity/output/app-ts/types.ts index d5fcbe8199..4b2ee5f140 100644 --- a/packages/test-cases/cases/bind/sanity/output/app-ts/types.ts +++ b/packages/test-cases/cases/bind/sanity/output/app-ts/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; import { Client, InvokeApiResult -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/module.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/module.ts index 215683c052..1c0f5d2c1a 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/module.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_moduleMethod extends Record { str: Types.String; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/types.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/types.ts index 9fbd6db334..41753ce856 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/types.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/types.ts @@ -8,7 +8,7 @@ import * as Types from "./"; import { Client, InvokeApiResult -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/AnotherType/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/AnotherType/index.ts index c2a0d7a6e7..cd97ce73c5 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/AnotherType/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/AnotherType/index.ts @@ -7,7 +7,7 @@ import { JSON, JSONSerializer, JSONDeserializer, -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { serializeAnotherType, deserializeAnotherType, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/AnotherType/serialization.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/AnotherType/serialization.ts index 3da23914d7..f29e52aad3 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/AnotherType/serialization.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/AnotherType/serialization.ts @@ -9,7 +9,7 @@ import { BigNumber, JSON, Context -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { AnotherType } from "./"; import * as Types from ".."; diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/CustomType/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/CustomType/index.ts index 665d0ce051..0edc7a7894 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/CustomType/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/CustomType/index.ts @@ -7,7 +7,7 @@ import { JSON, JSONSerializer, JSONDeserializer, -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { serializeCustomType, deserializeCustomType, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/CustomType/serialization.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/CustomType/serialization.ts index b4f7c752d6..2529b4cb63 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/CustomType/serialization.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/CustomType/serialization.ts @@ -9,7 +9,7 @@ import { BigNumber, JSON, Context -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { CustomType } from "./"; import * as Types from ".."; diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/Env/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/Env/index.ts index cefc38e2a6..09dee2ac73 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/Env/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/Env/index.ts @@ -7,7 +7,7 @@ import { JSON, JSONSerializer, JSONDeserializer, -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { serializeEnv, deserializeEnv, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/Env/serialization.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/Env/serialization.ts index 49ccbc43ea..601434c3e0 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/Env/serialization.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/Env/serialization.ts @@ -9,7 +9,7 @@ import { BigNumber, JSON, Context -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { Env } from "./"; import * as Types from ".."; diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/Module/serialization.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/Module/serialization.ts index 20db30c4d4..6ee48d0a3e 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/Module/serialization.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/Module/serialization.ts @@ -9,7 +9,7 @@ import { BigNumber, JSON, Context -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import * as Types from ".."; export class Input_moduleMethod { diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/TestImport/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/TestImport/index.ts index b2d31c7b2b..b82721c695 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/TestImport/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/TestImport/index.ts @@ -1,6 +1,6 @@ import { w3_getImplementations -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; export class TestImport { static uri: string = "testimport.uri.eth" diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/entry.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/entry.ts index 4f50286a10..e152595cf0 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/entry.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/entry.ts @@ -5,7 +5,7 @@ import { w3_sanitize_env, w3_abort, InvokeArgs -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { moduleMethodWrapped, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_AnotherObject/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_AnotherObject/index.ts index 3557830a78..6a52f417bb 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_AnotherObject/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_AnotherObject/index.ts @@ -7,7 +7,7 @@ import { JSON, JSONSerializer, JSONDeserializer, -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { serializeTestImport_AnotherObject, deserializeTestImport_AnotherObject, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_AnotherObject/serialization.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_AnotherObject/serialization.ts index 8e10e098cc..cfbe766951 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_AnotherObject/serialization.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_AnotherObject/serialization.ts @@ -9,7 +9,7 @@ import { BigNumber, JSON, Context -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { TestImport_AnotherObject } from "./"; import * as Types from "../.."; diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/index.ts index f2ef844179..5114d786bd 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/index.ts @@ -6,7 +6,7 @@ import { BigNumber, JSON, Result -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { serializeimportedMethodArgs, deserializeimportedMethodResult, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/serialization.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/serialization.ts index b17960d35b..65a08566f7 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/serialization.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/serialization.ts @@ -9,7 +9,7 @@ import { BigNumber, JSON, Context -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import * as Types from "../.."; export class Input_importedMethod { diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Object/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Object/index.ts index 4a8fcd9061..fc03152ed8 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Object/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Object/index.ts @@ -7,7 +7,7 @@ import { JSON, JSONSerializer, JSONDeserializer, -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { serializeTestImport_Object, deserializeTestImport_Object, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Object/serialization.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Object/serialization.ts index 5680183372..623dcdc2d5 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Object/serialization.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Object/serialization.ts @@ -9,7 +9,7 @@ import { BigNumber, JSON, Context -} from "@web3api/wasm-as"; +} from "@polywrap/wasm-as"; import { TestImport_Object } from "./"; import * as Types from "../.."; diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json b/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.build.yaml b/packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.build.yaml index 2cf967618b..9f8b2d1fc6 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json b/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.build.yaml b/packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.build.yaml index c01d43bc8c..811c654ab4 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.build.yaml @@ -5,6 +5,6 @@ config: - ./src - ./package.json linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as filter: /\.(test|spec)\.(js|ts)$/gm diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json b/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.build.yaml b/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.build.yaml index 361bbbf549..e1b2fed645 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.build.yaml @@ -5,5 +5,5 @@ config: - ./src - ./package.json linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile index 20251a4da7..92c21b6ded 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile +++ b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile @@ -9,14 +9,14 @@ RUN apk --no-cache --virtual build-dependencies add \ WORKDIR /linked-packages -COPY .w3/web3api/build/linked-packages/@web3api/wasm-as ./@web3api/wasm-as +COPY .w3/web3api/build/linked-packages/@polywrap/wasm-as ./@polywrap/wasm-as WORKDIR /project # Install deps in its own step, making rebuilds faster # when just the Web3API schema & implementation files change COPY package.json . -RUN npx json -I -f package.json -e "this.dependencies['@web3api/wasm-as']='../linked-packages/@web3api/wasm-as'" +RUN npx json -I -f package.json -e "this.dependencies['@polywrap/wasm-as']='../linked-packages/@polywrap/wasm-as'" RUN yarn # Copy all manifest files diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.build.yaml b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.build.yaml index 97a68a1d65..5f1915bbc3 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.build.yaml @@ -7,5 +7,5 @@ config: - ./src - ./package.json linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.build.yaml b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.build.yaml index 7da8616f8a..7cb5d9b496 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.build.yaml @@ -5,9 +5,9 @@ config: - ./src - ./package.json linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as filter: /\.(test|spec)\.(js|ts)$/gm - - name: "@web3api/ethereum-plugin-js" + - name: "@polywrap/ethereum-plugin-js" path: ../../../../../../js/plugins/ethereum filter: /\.(test|spec)\.(js|ts)$/gm diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.build.yaml b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.build.yaml index 2cf967618b..9f8b2d1fc6 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json index 3b78e56fc8..a1ea7d1610 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.1" diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.build.yaml b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.build.yaml index 5e7fc2ef43..26edeb8145 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.build.yaml @@ -10,5 +10,5 @@ config: - ./src - ./package.json linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json b/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json +++ b/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.build.yaml b/packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.build.yaml index 2cf967618b..9f8b2d1fc6 100644 --- a/packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json +++ b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.build.yaml b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.build.yaml index 2cf967618b..9f8b2d1fc6 100644 --- a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json index 6a9de35f38..c7ad6ced55 100644 --- a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json +++ b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -7,7 +7,7 @@ "build": "w3 build" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.build.yaml b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.build.yaml index 2cf967618b..9f8b2d1fc6 100644 --- a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.gen.ts b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.gen.ts index 276e3bb3fc..fce1b571cc 100644 --- a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.gen.ts +++ b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.gen.ts @@ -1,5 +1,5 @@ -import { GenerateBindingFn, BindOptions, BindOutput } from "@web3api/schema-bind"; -import { OutputDirectory } from "@web3api/os-js"; +import { GenerateBindingFn, BindOptions, BindOutput } from "@polywrap/schema-bind"; +import { OutputDirectory } from "@polywrap/os-js"; import Mustache from "mustache"; import path from "path"; import fs from "fs"; diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json b/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json index ee29102104..c5153f2dbb 100644 --- a/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json +++ b/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -10,7 +10,7 @@ "test:env:down": "w3 infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.build.yaml b/packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json b/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json index ee29102104..c5153f2dbb 100644 --- a/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json +++ b/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -10,7 +10,7 @@ "test:env:down": "w3 infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.build.yaml b/packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json b/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json index ee29102104..c5153f2dbb 100644 --- a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json +++ b/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -10,7 +10,7 @@ "test:env:down": "w3 infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.build.yaml b/packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json b/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json index ee29102104..c5153f2dbb 100644 --- a/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json +++ b/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -10,7 +10,7 @@ "test:env:down": "w3 infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.build.yaml b/packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json index 68e1cfde60..dee3802c65 100644 --- a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json +++ b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -10,7 +10,7 @@ "test:env:down": "w3 test-env down" }, "dependencies": { - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.build.yaml b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/api/query/client-async-config.js b/packages/test-cases/cases/cli/api/query/client-async-config.js index 10735828aa..a133eb7ca6 100644 --- a/packages/test-cases/cases/cli/api/query/client-async-config.js +++ b/packages/test-cases/cases/cli/api/query/client-async-config.js @@ -1,4 +1,4 @@ -const { PluginModule } = require("@web3api/core-js"); +const { PluginModule } = require("@polywrap/core-js"); const mockPlugin = () => { diff --git a/packages/test-cases/cases/cli/api/query/client-async-config.ts b/packages/test-cases/cases/cli/api/query/client-async-config.ts index ca14274d4b..171eca442f 100644 --- a/packages/test-cases/cases/cli/api/query/client-async-config.ts +++ b/packages/test-cases/cases/cli/api/query/client-async-config.ts @@ -1,5 +1,5 @@ -import { Web3ApiClientConfig } from "@web3api/client-js"; -import { PluginModule } from "@web3api/core-js"; +import { Web3ApiClientConfig } from "@polywrap/client-js"; +import { PluginModule } from "@polywrap/core-js"; interface Config extends Record { val: number; diff --git a/packages/test-cases/cases/cli/api/query/client-config.js b/packages/test-cases/cases/cli/api/query/client-config.js index 49396f29b3..acdf73f2a2 100644 --- a/packages/test-cases/cases/cli/api/query/client-config.js +++ b/packages/test-cases/cases/cli/api/query/client-config.js @@ -1,4 +1,4 @@ -const { PluginModule } = require("@web3api/core-js"); +const { PluginModule } = require("@polywrap/core-js"); const mockPlugin = () => { diff --git a/packages/test-cases/cases/cli/api/query/client-config.ts b/packages/test-cases/cases/cli/api/query/client-config.ts index 5821512701..95133c8685 100644 --- a/packages/test-cases/cases/cli/api/query/client-config.ts +++ b/packages/test-cases/cases/cli/api/query/client-config.ts @@ -1,5 +1,5 @@ -import { Web3ApiClientConfig } from "@web3api/client-js"; -import { PluginModule } from "@web3api/core-js"; +import { Web3ApiClientConfig } from "@polywrap/client-js"; +import { PluginModule } from "@polywrap/core-js"; interface Config extends Record { val: number; diff --git a/packages/test-cases/cases/cli/api/query/deploy-contracts.js b/packages/test-cases/cases/cli/api/query/deploy-contracts.js index 90025aed29..16bca44ca1 100644 --- a/packages/test-cases/cases/cli/api/query/deploy-contracts.js +++ b/packages/test-cases/cases/cli/api/query/deploy-contracts.js @@ -1,4 +1,4 @@ -const { EthereumPlugin } = require("@web3api/ethereum-plugin-js"); +const { EthereumPlugin } = require("@polywrap/ethereum-plugin-js"); const fs = require("fs"); async function main() { diff --git a/packages/test-cases/cases/cli/api/query/package.json b/packages/test-cases/cases/cli/api/query/package.json index a06205ca13..c2600551ff 100644 --- a/packages/test-cases/cases/cli/api/query/package.json +++ b/packages/test-cases/cases/cli/api/query/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/test-project", + "name": "@polywrap/test-project", "version": "0.0.1-prealpha.72", "license": "MIT", "private": true, @@ -10,8 +10,8 @@ "test:env:down": "w3 infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@web3api/ethereum-plugin-js": "0.0.1-prealpha.72", - "@web3api/wasm-as": "0.0.1-prealpha.72" + "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.72", + "@polywrap/wasm-as": "0.0.1-prealpha.72" }, "devDependencies": { "assemblyscript": "0.19.5", diff --git a/packages/test-cases/cases/cli/api/query/web3api.build.yaml b/packages/test-cases/cases/cli/api/query/web3api.build.yaml index ecef0619bf..e897cd3cdc 100644 --- a/packages/test-cases/cases/cli/api/query/web3api.build.yaml +++ b/packages/test-cases/cases/cli/api/query/web3api.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 config: node_version: "14.16.0" linked_packages: - - name: "@web3api/wasm-as" + - name: "@polywrap/wasm-as" path: ../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/infra/local-packages/dev-server/package.json b/packages/test-cases/cases/cli/infra/local-packages/dev-server/package.json index 3f7e89f2f4..a65139984f 100644 --- a/packages/test-cases/cases/cli/infra/local-packages/dev-server/package.json +++ b/packages/test-cases/cases/cli/infra/local-packages/dev-server/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/dev-server-infra", + "name": "@polywrap/dev-server-infra", "version": "0.0.1-prealpha.44", "files": [ "docker-compose.yaml", diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/index.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/manifest.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/module.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/module.ts index 6b0aa5629b..71ba212f4b 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_methodOne extends Record { str: Types.String; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/types.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/types.ts index b89d8ec8f6..597470d371 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/types.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/types.ts @@ -8,7 +8,7 @@ import * as Types from "./"; import { Client, InvokeApiResult -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/index.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/manifest.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/module.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/module.ts index 37566574a4..ab3e9cb648 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_method extends Record { str: Types.String; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/types.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/types.ts index b89d8ec8f6..597470d371 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/types.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/types.ts @@ -8,7 +8,7 @@ import * as Types from "./"; import { Client, InvokeApiResult -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/index.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/manifest.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/module.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/module.ts index 8e94aa6eee..c368ee205f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_method extends Record { str: Types.String; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/types.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/types.ts index 89f6b7730a..76da08bfbc 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/types.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/types.ts @@ -8,7 +8,7 @@ import * as Types from "./"; import { Client, InvokeApiResult -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/index.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/index.ts index ff371c0cd8..f367d143d9 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/index.ts @@ -6,4 +6,4 @@ export * from "./manifest"; export * from "./module"; export * from "./types"; -export { Client } from "@web3api/core-js"; +export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/manifest.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/module.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/module.ts index 189128d590..64ecf076bc 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_sanitizeEnv extends Record { env: Types.ClientEnv; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/types.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/types.ts index 0f39eb4c01..41334cf7c9 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/types.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/types.ts @@ -8,7 +8,7 @@ import * as Types from "./"; import { Client, InvokeApiResult -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts index dc773f1892..7e5ffbae7d 100644 --- a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts @@ -12,7 +12,7 @@ import { createEnumPropertyDefinition, createObjectRef, createTypeInfo -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts index 6318377a2b..15d72042cb 100644 --- a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts @@ -6,7 +6,7 @@ import { createObjectPropertyDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts index 006b8be5d3..52ab74bc3f 100644 --- a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts @@ -6,7 +6,7 @@ import { createObjectPropertyDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts index 0044965536..cde655ddf1 100644 --- a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts @@ -13,7 +13,7 @@ import { createEnumPropertyDefinition, createObjectRef, createTypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts index 2bd6dce08b..a7785cc6b4 100644 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts @@ -6,7 +6,7 @@ import { createScalarPropertyDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts index 50558d16aa..9d1aa0b8c6 100644 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts @@ -7,7 +7,7 @@ import { createScalarPropertyDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts index 15c9da8072..801a2c7514 100644 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts @@ -6,7 +6,7 @@ import { createScalarPropertyDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts index 5d28d9e259..15d11abd62 100644 --- a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts @@ -7,7 +7,7 @@ import { createInterfaceImplementedDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts index 3909c2395e..af9099dcb4 100644 --- a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts @@ -3,7 +3,7 @@ import { createObjectDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts index f55eff3403..b89f1184b6 100644 --- a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts @@ -6,7 +6,7 @@ import { createInterfaceImplementedDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts index 6ebe613959..a1d703b8c2 100644 --- a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts @@ -6,7 +6,7 @@ import { createInterfaceImplementedDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts index 79a25f193f..c2ec45c02d 100644 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts @@ -4,7 +4,7 @@ import { createImportedModuleDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts index a8a5505181..2d0d64bdc8 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts @@ -7,7 +7,7 @@ import { createImportedObjectDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts index a8ec2381e5..9b4d2e32a0 100644 --- a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts @@ -9,7 +9,7 @@ import { createScalarDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts index a8078a56fc..4f89f7f026 100644 --- a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts @@ -10,7 +10,7 @@ import { createScalarDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts index 2893a37fb5..27c4e33b67 100644 --- a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts @@ -10,7 +10,7 @@ import { createScalarDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts index aca4c4c734..db5ee1041c 100644 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts @@ -8,7 +8,7 @@ import { createMapPropertyDefinition, createMapKeyDefinition, createScalarDefinition, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts index 5262f91eb0..b540b50ff7 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts @@ -11,7 +11,7 @@ import { createMapKeyDefinition, createScalarDefinition, createArrayDefinition, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts index 324ab3d361..dc77a206c6 100644 --- a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts @@ -6,7 +6,7 @@ import { createTypeInfo, createEnvDefinition, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/006-env-types/01-client-env/output/module.ts b/packages/test-cases/cases/compose/006-env-types/01-client-env/output/module.ts index 690a9159dc..9be3133c06 100644 --- a/packages/test-cases/cases/compose/006-env-types/01-client-env/output/module.ts +++ b/packages/test-cases/cases/compose/006-env-types/01-client-env/output/module.ts @@ -7,7 +7,7 @@ import { createEnvDefinition, TypeInfo, createObjectPropertyDefinition, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/cases/compose/sanity/output/module.ts b/packages/test-cases/cases/compose/sanity/output/module.ts index 0ba0e645e3..357d7c6b61 100644 --- a/packages/test-cases/cases/compose/sanity/output/module.ts +++ b/packages/test-cases/cases/compose/sanity/output/module.ts @@ -19,7 +19,7 @@ import { createEnvDefinition, createTypeInfo, TypeInfo, -} from "@web3api/schema-parse"; +} from "@polywrap/schema-parse"; export const typeInfo: TypeInfo = { ...createTypeInfo(), diff --git a/packages/test-cases/index.ts b/packages/test-cases/index.ts index 60fc163c1e..93a6e4f7bc 100644 --- a/packages/test-cases/index.ts +++ b/packages/test-cases/index.ts @@ -1,7 +1,7 @@ import path from "path"; import { readFileSync, existsSync } from "fs"; -import { normalizeLineEndings } from "@web3api/os-js"; +import { normalizeLineEndings } from "@polywrap/os-js"; export const GetPathToBindTestFiles = () => `${__dirname}/cases/bind` export const GetPathToComposeTestFiles = () => `${__dirname}/cases/compose` diff --git a/packages/test-cases/package.json b/packages/test-cases/package.json index 7ce5bc7fa3..e0e6cf688b 100644 --- a/packages/test-cases/package.json +++ b/packages/test-cases/package.json @@ -1,11 +1,11 @@ { - "name": "@web3api/test-cases", + "name": "@polywrap/test-cases", "description": "Reusable Web3API Test Cases", "private": true, "version": "0.0.1-prealpha.85", "license": "MIT", "main": "index.ts", "dependencies": { - "@web3api/os-js": "0.0.1-prealpha.85" + "@polywrap/os-js": "0.0.1-prealpha.85" } } diff --git a/packages/wasm/as/package.json b/packages/wasm/as/package.json index 2972b2fb00..6e1207b95c 100644 --- a/packages/wasm/as/package.json +++ b/packages/wasm/as/package.json @@ -1,5 +1,5 @@ { - "name": "@web3api/wasm-as", + "name": "@polywrap/wasm-as", "description": "Web3API Assemblyscript Runtime", "version": "0.0.1-prealpha.85", "license": "MIT", diff --git a/yarn.lock b/yarn.lock index a4162c4f96..00c0fefc54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3670,9 +3670,9 @@ integrity sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw== "@types/node@*": - version "17.0.42" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.42.tgz#d7e8f22700efc94d125103075c074396b5f41f9b" - integrity sha512-Q5BPGyGKcvQgAMbsr7qEGN/kIPN6zZecYYABeTDBizOsau+2NMdSVTar9UQw21A2+JyA2KRNDYaYrPB0Rpk2oQ== + version "17.0.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.43.tgz#7f16898cdd791c9d64069000ad448b47b3ca8353" + integrity sha512-jnUpgw8fL9kP2iszfIDyBQtw5Mf4/XSqy0Loc1J9pI14ejL83XcCEvSf50Gs/4ET0I9VCCDoOfufQysj0S66xA== "@types/node@12.12.26": version "12.12.26" @@ -3950,17 +3950,6 @@ "@web3api/assemblyscript-json" "1.2.0" as-base64 "^0.2.0" -"@web3api/wasm-as@0.0.1-prealpha.84": - version "0.0.1-prealpha.84" - resolved "https://registry.yarnpkg.com/@web3api/wasm-as/-/wasm-as-0.0.1-prealpha.84.tgz#db7fe81d857d6605adec3e632f16e3ddb2d6a873" - integrity sha512-xKRqrMVFVeU68qpsDFJ6rNZHJxHNB0Tm6F4fIxEvW2/cL2uvWJmG6Nf0A1vUm1BERrdMKlF6PL/ZZxj6FlTZag== - dependencies: - "@serial-as/transform" "1.0.2" - "@web3api/serial-as-json" "1.0.4" - as-bigint "0.5.3" - as-bignumber "0.2.0" - as-container "0.6.1" - "@webassemblyjs/ast@1.8.5": version "1.8.5" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" @@ -7331,9 +7320,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.147: - version "1.4.154" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.154.tgz#d69c60499fc467a6c59591d29183e520afbc78a1" - integrity sha512-GbV9djOkrnj6xmW+YYVVEI3VCQnJ0pnSTu7TW2JyjKd5cakoiSaG5R4RbEtfaD92GsY10DzbU3GYRe+IOA9kqA== + version "1.4.155" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.155.tgz#9c7190bf5e8608c5a5e4953b1ccf0facf3d1b49d" + integrity sha512-niPzKBSYPG06gxLKO0c2kEmgdRMTtIbNrBlvD31Ld8Q57b/K0218U4j8u/OOt25XE1eFOn47FcmQVdx9R1qqxA== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" From f4888e8d33181e76775817d2cb59697807e877dc Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 14 Jun 2022 19:49:00 -0700 Subject: [PATCH 02/17] w3 rename --- .eslintrc.js | 6 +- .gitignore | 5 +- package.json | 2 +- packages/cli/bin/{w3 => polywrap} | 0 packages/cli/copyfiles.ts | 2 +- packages/cli/jest.config.js | 6 +- packages/cli/lang/en.json | 24 +- packages/cli/lang/es.json | 24 +- packages/cli/package.json | 2 +- packages/cli/src/__tests__/e2e/app.spec.ts | 14 +- packages/cli/src/__tests__/e2e/build.spec.ts | 12 +- .../cli/src/__tests__/e2e/codegen.spec.ts | 18 +- packages/cli/src/__tests__/e2e/create.spec.ts | 22 +- packages/cli/src/__tests__/e2e/deploy.spec.ts | 20 +- packages/cli/src/__tests__/e2e/help.spec.ts | 8 +- packages/cli/src/__tests__/e2e/infra.spec.ts | 68 +- .../cli/src/__tests__/e2e/no-command.spec.ts | 12 +- packages/cli/src/__tests__/e2e/plugin.spec.ts | 6 +- packages/cli/src/__tests__/e2e/query.spec.ts | 22 +- packages/cli/src/__tests__/e2e/utils.ts | 2 +- .../cli/src/__tests__/unit/docker.spec.ts | 4 +- packages/cli/src/commands/app.ts | 2 +- packages/cli/src/commands/build.ts | 2 +- packages/cli/src/commands/codegen.ts | 2 +- packages/cli/src/commands/infra.ts | 2 +- packages/cli/src/commands/plugin.ts | 2 +- packages/cli/src/lib/CacheDirectory.ts | 2 +- packages/cli/src/lib/Compiler.ts | 50 +- .../wasm/assemblyscript/Dockerfile.mustache | 4 +- .../wasm/rust/Dockerfile.mustache | 6 +- .../defaults/build-images/wasm/rust/index.ts | 2 +- .../lib/defaults/deploy-modules/ens/index.ts | 2 +- .../deploy-modules/local-dev-ens/index.ts | 2 +- packages/cli/src/lib/helpers/client.ts | 6 +- packages/cli/src/lib/infra/Infra.ts | 2 +- packages/cli/src/lib/option-parsers/app.ts | 2 +- .../cli/src/lib/option-parsers/codegen.ts | 2 +- packages/cli/src/lib/option-parsers/plugin.ts | 2 +- packages/cli/src/lib/project/AppProject.ts | 2 +- packages/cli/src/lib/project/PluginProject.ts | 2 +- .../cli/src/lib/project/Web3ApiProject.ts | 2 +- .../cli/src/lib/test-env/client-config.ts | 6 +- packages/core-interfaces/logger/package.json | 8 +- .../core-interfaces/uri-resolver/package.json | 8 +- .../src/__tests__/AsyncWasmInstance.spec.ts | 10 +- .../src/__tests__/cases/multipleSleep.ts | 4 +- .../src/__tests__/cases/simpleSleep.ts | 4 +- .../js/client/scripts/extractPluginConfigs.ts | 6 +- .../__tests__/core/interface-impls.spec.ts | 58 +- .../src/__tests__/core/plugin-wrapper.spec.ts | 24 +- .../src/__tests__/core/resolveUri.spec.ts | 30 +- .../client/src/__tests__/core/sanity.spec.ts | 32 +- .../src/__tests__/core/wasm-wrapper.spec.ts | 12 +- .../js/client/src/__tests__/e2e/env.spec.ts | 2 +- .../js/client/src/__tests__/e2e/test-cases.ts | 4 +- .../client/src/__tests__/e2e/wasm-as.spec.ts | 8 +- .../js/client/src/__tests__/e2e/wasm-rs.ts | 2 +- .../js/client/src/default-client-config.ts | 26 +- .../js/client/src/plugin/PluginWeb3Api.ts | 6 +- packages/js/client/src/pluginConfigs/index.ts | 6 +- packages/js/client/src/wasm/WasmWeb3Api.ts | 18 +- packages/js/client/src/wasm/imports.ts | 78 +-- packages/js/client/src/wasm/types.ts | 54 +- .../InterfaceImplementations.spec.ts | 8 +- .../src/__tests__/PluginRegistrations.spec.ts | 4 +- packages/js/core/src/__tests__/Uri.spec.ts | 20 +- .../js/core/src/__tests__/UriRedirect.spec.ts | 8 +- .../src/__tests__/apply-redirects.spec.ts | 12 +- .../src/__tests__/get-implementations.spec.ts | 18 +- .../js/core/src/__tests__/parse-query.spec.ts | 2 +- .../js/core/src/__tests__/resolveUri.spec.ts | 26 +- .../src/interfaces/core-interface-uris.ts | 4 +- packages/js/core/src/types/Plugin.ts | 8 +- packages/js/core/src/types/Uri.ts | 32 +- packages/js/plugins/ens/package.json | 4 +- packages/js/plugins/ens/src/index.ts | 4 +- packages/js/plugins/ethereum/package.json | 4 +- .../js/plugins/ethereum/src/Connection.ts | 2 +- .../ethereum/src/__tests__/e2e.spec.ts | 12 +- .../src/__tests__/integration/.gitignore | 2 +- .../src/__tests__/integration/package.json | 8 +- .../src/__tests__/integration/src/index.ts | 2 +- .../__tests__/integration/src/schema.graphql | 2 +- packages/js/plugins/ethereum/src/index.ts | 2 +- .../js/plugins/ethereum/src/utils/mapping.ts | 2 +- packages/js/plugins/ethereum/tsconfig.json | 2 +- packages/js/plugins/filesystem/package.json | 4 +- .../filesystem/src/__tests__/e2e.spec.ts | 8 +- packages/js/plugins/filesystem/src/index.ts | 2 +- packages/js/plugins/graph-node/package.json | 4 +- packages/js/plugins/graph-node/src/index.ts | 2 +- packages/js/plugins/http/README.md | 4 +- packages/js/plugins/http/package.json | 4 +- .../http/src/__tests__/e2e/e2e.spec.ts | 22 +- .../src/__tests__/e2e/integration.spec.ts | 4 +- .../src/__tests__/e2e/integration/.gitignore | 2 +- .../__tests__/e2e/integration/package.json | 8 +- .../__tests__/e2e/integration/schema.graphql | 2 +- .../__tests__/e2e/integration/src/index.ts | 2 +- .../http/src/__tests__/unit/index.test.ts | 2 +- .../http/src/__tests__/unit/util.test.ts | 2 +- packages/js/plugins/http/src/index.ts | 2 +- packages/js/plugins/http/src/util.ts | 2 +- packages/js/plugins/http/tsconfig.json | 2 +- packages/js/plugins/ipfs/package.json | 4 +- packages/js/plugins/ipfs/src/index.ts | 2 +- packages/js/plugins/logger/README.md | 10 +- packages/js/plugins/logger/package.json | 4 +- .../logger/src/__tests__/e2e/e2e.spec.ts | 2 +- packages/js/plugins/logger/src/index.ts | 2 +- packages/js/plugins/sha3/package.json | 4 +- .../plugins/sha3/src/__tests__/index.test.ts | 24 +- packages/js/plugins/sha3/src/index.ts | 2 +- packages/js/plugins/uts46/package.json | 4 +- .../plugins/uts46/src/__tests__/index.test.ts | 8 +- packages/js/plugins/uts46/src/index.ts | 2 +- packages/js/react/src/__tests__/plugins.ts | 6 +- packages/js/test-env/src/index.ts | 18 +- .../test-env/src/wrappers/ens/schema.graphql | 28 +- .../wasm-as/templates/entry-ts.mustache | 30 +- .../imported/module-type/index-ts.mustache | 8 +- .../interface-type/index-ts.mustache | 4 +- .../rust/wasm-rs/templates/entry-rs.mustache | 12 +- .../imported/module-type/mod-rs.mustache | 2 +- .../templates/interface-type/mod-rs.mustache | 4 +- packages/schema/parse/.eslintrc.js | 2 +- .../templates/api/assemblyscript/.gitignore | 4 +- .../templates/api/assemblyscript/package.json | 12 +- .../api/assemblyscript/recipes/e2e.json | 2 +- .../src/__tests__/e2e/integration.spec.ts | 2 +- .../src/__tests__/types/web3api.app.yaml | 2 +- .../api/assemblyscript/src/__tests__/utils.ts | 6 +- .../templates/api/assemblyscript/src/index.ts | 2 +- .../api/assemblyscript/src/schema.graphql | 2 +- packages/templates/api/interface/.gitignore | 2 +- packages/templates/api/interface/package.json | 8 +- .../app/typescript-node/package.json | 2 +- .../app/typescript-node/src/index.ts | 2 +- .../app/typescript-react/package.json | 2 +- .../app/typescript-react/src/HelloWorld.tsx | 2 +- .../templates/plugin/typescript/package.json | 2 +- .../templates/plugin/typescript/src/index.ts | 2 +- .../apis/wasm-as/asyncify/schema.graphql | 2 +- .../cases/apis/wasm-as/asyncify/src/index.ts | 2 +- .../apis/wasm-as/bigint-type/src/index.ts | 2 +- .../apis/wasm-as/bignumber-type/src/index.ts | 2 +- .../apis/wasm-as/bytes-type/src/index.ts | 2 +- .../apis/wasm-as/enum-types/src/index.ts | 2 +- .../wasm-as/env-client-types/src/index.ts | 2 +- .../cases/apis/wasm-as/env-types/src/index.ts | 2 +- .../implementations/test-api/schema.graphql | 2 +- .../implementations/test-api/src/index.ts | 2 +- .../implementations/test-api/web3api.yaml | 2 +- .../test-use-getImpl/schema.graphql | 2 +- .../test-use-getImpl/src/index.ts | 2 +- .../test-use-getImpl/web3api.yaml | 2 +- .../interface-invoke/test-api/schema.graphql | 2 +- .../interface-invoke/test-api/src/index.ts | 2 +- .../interface-invoke/test-api/web3api.yaml | 2 +- .../test-implementation/schema.graphql | 2 +- .../test-implementation/src/index.ts | 2 +- .../test-implementation/web3api.yaml | 2 +- .../apis/wasm-as/invalid-types/src/index.ts | 2 +- .../cases/apis/wasm-as/json-type/src/index.ts | 2 +- .../apis/wasm-as/large-types/src/index.ts | 2 +- .../cases/apis/wasm-as/map-type/src/index.ts | 2 +- .../apis/wasm-as/number-types/src/index.ts | 2 +- .../apis/wasm-as/object-types/src/index.ts | 2 +- .../apis/wasm-as/reserved-words/src/index.ts | 2 +- .../wasm-as/simple-env-types/src/index.ts | 2 +- .../wasm-as/simple-storage/schema.graphql | 2 +- .../apis/wasm-as/simple-storage/src/index.ts | 4 +- .../apis/wasm-rs/asyncify/schema.graphql | 2 +- .../cases/apis/wasm-rs/asyncify/src/lib.rs | 8 +- .../cases/apis/wasm-rs/bigint-type/src/lib.rs | 4 +- .../apis/wasm-rs/bignumber-type/src/lib.rs | 4 +- .../cases/apis/wasm-rs/bytes-type/src/lib.rs | 4 +- .../cases/apis/wasm-rs/enum-types/src/lib.rs | 4 +- .../implementations/test-api/schema.graphql | 2 +- .../implementations/test-api/src/lib.rs | 4 +- .../implementations/test-api/web3api.yaml | 2 +- .../test-use-getImpl/schema.graphql | 2 +- .../test-use-getImpl/src/lib.rs | 4 +- .../test-use-getImpl/web3api.yaml | 2 +- .../apis/wasm-rs/invalid-types/src/lib.rs | 4 +- .../cases/apis/wasm-rs/json-type/src/lib.rs | 4 +- .../cases/apis/wasm-rs/large-types/src/lib.rs | 4 +- .../cases/apis/wasm-rs/map-type/src/lib.rs | 4 +- .../apis/wasm-rs/number-types/src/lib.rs | 4 +- .../apis/wasm-rs/object-types/src/lib.rs | 4 +- .../wasm-rs/simple-storage/schema.graphql | 2 +- .../apis/wasm-rs/simple-storage/src/lib.rs | 6 +- .../sanity/output/wasm-as/TestImport/index.ts | 4 +- .../cases/bind/sanity/output/wasm-as/entry.ts | 28 +- .../imported/TestImport_Module/index.ts | 8 +- .../cases/bind/sanity/output/wasm-rs/entry.rs | 14 +- .../imported/test_import_module/mod.rs | 4 +- .../sanity/output/wasm-rs/test_import/mod.rs | 4 +- .../cli/api/build-cmd/001-sanity/package.json | 2 +- .../cli/api/build-cmd/001-sanity/src/index.ts | 2 +- .../build-cmd/004-default-build/package.json | 2 +- .../build-cmd/004-default-build/src/index.ts | 2 +- .../005-default-dockerfile/package.json | 2 +- .../005-default-dockerfile/src/index.ts | 2 +- .../006-custom-dockerfile/Dockerfile | 6 +- .../006-custom-dockerfile/package.json | 2 +- .../006-custom-dockerfile/src/index.ts | 2 +- .../007-linked-packages/package.json | 2 +- .../007-linked-packages/src/index.ts | 2 +- .../api/build-cmd/008-metadata/package.json | 2 +- .../api/build-cmd/008-metadata/src/index.ts | 2 +- .../009-docker-buildx/expected/output.json | 4 +- .../build-cmd/009-docker-buildx/package.json | 2 +- .../build-cmd/009-docker-buildx/src/index.ts | 2 +- .../cli/api/codegen/001-sanity/package.json | 2 +- .../cli/api/codegen/001-sanity/src/index.ts | 2 +- .../002-invalid-codegen-script/package.json | 2 +- .../002-invalid-codegen-script/src/index.ts | 2 +- .../codegen/003-codegen-script/package.json | 2 +- .../codegen/003-codegen-script/src/index.ts | 2 +- .../cli/api/deploy/001-sanity/package.json | 8 +- .../cli/api/deploy/001-sanity/src/index.ts | 2 +- .../cli/api/deploy/002-no-ext/package.json | 8 +- .../cli/api/deploy/002-no-ext/src/index.ts | 2 +- .../deploy/003-invalid-config/package.json | 8 +- .../deploy/003-invalid-config/src/index.ts | 2 +- .../api/deploy/004-fail-between/package.json | 8 +- .../api/deploy/004-fail-between/src/index.ts | 2 +- .../005-non-loaded-env-var/package.json | 8 +- .../005-non-loaded-env-var/src/index.ts | 2 +- .../cli/api/query/client-async-config.js | 8 +- .../cli/api/query/client-async-config.ts | 8 +- .../cases/cli/api/query/client-config.js | 8 +- .../cases/cli/api/query/client-config.ts | 8 +- .../cases/cli/api/query/package.json | 6 +- .../cases/cli/api/query/schema.graphql | 2 +- .../cases/cli/api/query/src/index.ts | 4 +- .../cli/app/codegen/001-sanity/schema.graphql | 2 +- .../codegen/002-with-plugin/schema.graphql | 2 +- .../codegen/002-with-plugin/web3api.app.yaml | 2 +- .../codegen/003-multi-import/schema.graphql | 4 +- .../codegen/003-multi-import/web3api.app.yaml | 4 +- .../001-sanity/expected/src/w3/index.ts | 9 - .../001-sanity/expected/src/w3/manifest.ts | 15 - .../001-sanity/expected/src/w3/module.ts | 37 - .../001-sanity/expected/src/w3/schema.ts | 380 ----------- .../001-sanity/expected/src/w3/types.ts | 640 ------------------ .../plugin/codegen/001-sanity/src/index.ts | 2 +- .../expected/src/w3/index.ts | 9 - .../expected/src/w3/manifest.ts | 15 - .../expected/src/w3/module.ts | 28 - .../expected/src/w3/schema.ts | 376 ---------- .../expected/src/w3/types.ts | 640 ------------------ .../codegen/002-single-module/src/index.ts | 2 +- .../codegen/003-env/expected/src/w3/index.ts | 9 - .../003-env/expected/src/w3/manifest.ts | 15 - .../codegen/003-env/expected/src/w3/module.ts | 27 - .../codegen/003-env/expected/src/w3/schema.ts | 58 -- .../codegen/003-env/expected/src/w3/types.ts | 46 -- .../cli/plugin/codegen/003-env/src/index.ts | 2 +- .../expected/src/w3/index.ts | 9 - .../expected/src/w3/manifest.ts | 15 - .../expected/src/w3/module.ts | 37 - .../expected/src/w3/schema.ts | 66 -- .../expected/src/w3/types.ts | 49 -- .../codegen/004-env-sanitization/src/index.ts | 2 +- packages/wasm/as/as-pect.config.js | 8 +- packages/wasm/as/assembly/abort.ts | 8 +- packages/wasm/as/assembly/debug-log.ts | 8 +- packages/wasm/as/assembly/env.ts | 22 +- .../wasm/as/assembly/get-implementations.ts | 24 +- .../as/assembly/implementation-subinvoke.ts | 32 +- packages/wasm/as/assembly/invoke.ts | 24 +- packages/wasm/as/assembly/subinvoke.ts | 32 +- packages/wasm/rs/src/abort.rs | 10 +- packages/wasm/rs/src/debug_log.rs | 10 +- packages/wasm/rs/src/env.rs | 24 +- packages/wasm/rs/src/get_implementations.rs | 26 +- packages/wasm/rs/src/invoke.rs | 26 +- packages/wasm/rs/src/subinvoke.rs | 34 +- 280 files changed, 969 insertions(+), 3448 deletions(-) rename packages/cli/bin/{w3 => polywrap} (100%) delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/index.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/module.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/schema.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/types.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/index.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/module.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/schema.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/types.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/index.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/module.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/schema.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/types.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/index.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/module.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/schema.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/types.ts diff --git a/.eslintrc.js b/.eslintrc.js index b441934587..dee198d5b9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { root: true, ignorePatterns: [ - "**/w3/**/*.*", + "**/polywrap/**/*.*", "**/infra-modules/**/*.*", "**/build/**/*.*", "**/__tests__/**/*.*", @@ -40,8 +40,8 @@ module.exports = { ], format: ["camelCase"], leadingUnderscore: "allow" }, - //web3 api host methods doesn"t satisfy neither camel or snake - {selector: ["objectLiteralMethod", "typeMethod"], filter: {regex: "^_w3_.*", match: true}, format: null}, + //wrap host methods doesn"t satisfy neither camel or snake + {selector: ["objectLiteralMethod", "typeMethod"], filter: {regex: "^_wrap_.*", match: true}, format: null}, //variable must be in camel or upper case {selector: "variable", format: ["camelCase", "UPPER_CASE"], leadingUnderscore: "allow"}, //classes and types must be in PascalCase diff --git a/.gitignore b/.gitignore index 7e52aca1eb..14405b7139 100644 --- a/.gitignore +++ b/.gitignore @@ -5,14 +5,15 @@ yarn-error.log coverage .vscode *.log -w3 -.w3 +polywrap +.polywrap .DS_Store report.* target **/*.rs.bk Cargo.lock bin +!packages/cli/bin pkg wasm-pack.log .env diff --git a/package.json b/package.json index 38677685be..eed6c21db9 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "scripts": { "reset": "yarn clean && yarn && yarn build", - "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.w3", + "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap", "dependencies:install": "cd dependencies && yarn", "build": "yarn build:core && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && yarn build:plugins:patch", "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/clie* --ignore @polywrap/react --ignore @polywrap/test-env-js", diff --git a/packages/cli/bin/w3 b/packages/cli/bin/polywrap similarity index 100% rename from packages/cli/bin/w3 rename to packages/cli/bin/polywrap diff --git a/packages/cli/copyfiles.ts b/packages/cli/copyfiles.ts index 7f401a15e2..b32300610d 100644 --- a/packages/cli/copyfiles.ts +++ b/packages/cli/copyfiles.ts @@ -9,7 +9,7 @@ const ignore = [ ".idea", ".log", ".vscode", - ".w3", + ".polywrap", ".rs.bk", ".lock", ]; diff --git a/packages/cli/jest.config.js b/packages/cli/jest.config.js index 485bf61f18..f5c2979551 100644 --- a/packages/cli/jest.config.js +++ b/packages/cli/jest.config.js @@ -9,13 +9,13 @@ module.exports = { }, }, modulePathIgnorePatterns: [ - "/src/__tests__/project/.w3" + "/src/__tests__/project/.polywrap" ], testPathIgnorePatterns: [ - "/src/__tests__/project/.w3" + "/src/__tests__/project/.polywrap" ], transformIgnorePatterns: [ - "/src/__tests__/project/.w3" + "/src/__tests__/project/.polywrap" ], setupFilesAfterEnv: ["./jest.setup.js"], }; diff --git a/packages/cli/lang/en.json b/packages/cli/lang/en.json index 1d35692aec..d5af4247e9 100644 --- a/packages/cli/lang/en.json +++ b/packages/cli/lang/en.json @@ -82,7 +82,7 @@ "commands_codegen_options_o_path": "path", "commands_options_options": "options", "commands_codegen_success": "Types were generated successfully", - "commands_create_description": "Create a new project with w3 CLI", + "commands_create_description": "Create a new project with polywrap CLI", "commands_create_directoryExists": "Directory with name {dir} already exists", "commands_create_error_commandFail": "Command failed: {error}", "commands_create_error_noCommand": "Please provide a command", @@ -152,31 +152,31 @@ "commands_query_error_clientConfigNotObject": "Custom client config must be an object", "commands_query_error_redirectsExportNotArray": "Exported redirects must be an array", "commands_query_error_redirectsItemNotValid": "Redirect at index {index} must be an object with properties 'from' and 'to'", - "commands_query_error_redirectsItemFromNotString": "Redirect property 'from' at index {index} must be a valid w3:// URI string", - "commands_query_error_redirectsItemToNotStringOrObject": "Redirect property 'to' at index {index} must be a valid w3:// URI string, or a plugin", + "commands_query_error_redirectsItemFromNotString": "Redirect property 'from' at index {index} must be a valid wrap:// URI string", + "commands_query_error_redirectsItemToNotStringOrObject": "Redirect property 'to' at index {index} must be a valid wrap:// URI string, or a plugin", "commands_query_error_redirectsItemToNotValidPlugin": "Redirect property 'to' at index {index} must be a valid plugin instance", "commands_query_error_pluginsExportNotArray": "Exported plugins must be an array", "commands_query_error_pluginsItemNotObject": "Plugin at index {index} must be an object with properties 'uri' and 'plugin'", - "commands_query_error_pluginsItemUriNotString": "Plugin property 'uri' at index {index} must be a valid w3:// URI string", + "commands_query_error_pluginsItemUriNotString": "Plugin property 'uri' at index {index} must be a valid wrap:// URI string", "commands_query_error_pluginsItemPluginNotObject": "Plugin property 'plugin' at index {index} must be an object with properties 'factory' and 'manifest'", "commands_query_error_pluginsItemPluginFactoryNotFunction": "Plugin property 'plugin.factory' at index {index} must be a function", "commands_query_error_pluginsItemPluginManifestNotObject": "Plugin property 'plugin.manifest' at index {index} must be an object", "commands_query_error_interfacesExportNotArray": "Exported interfaces must be an array", "commands_query_error_interfacesItemNotObject": "Interface at index {index} must be an object with properties 'interface' and 'implementations'", - "commands_query_error_interfacesItemInterfaceNotString": "Interface property 'interface' at index {index} must be a valid w3:// URI string", + "commands_query_error_interfacesItemInterfaceNotString": "Interface property 'interface' at index {index} must be a valid wrap:// URI string", "commands_query_error_interfacesItemImplementationsNotArray": "Interface property 'implementations' at index {index} must be an array", "commands_query_error_interfacesItemImplementationsEmpty": "Interface property 'implementations' at index {index} must not be an empty array", - "commands_query_error_interfacesItemImplementationsItemNotString": "Implementation at index ({index}, {implementationIndex}) must be a valid w3:// URI string", + "commands_query_error_interfacesItemImplementationsItemNotString": "Implementation at index ({index}, {implementationIndex}) must be a valid wrap:// URI string", "commands_query_error_envsExportNotArray": "Exported envs must be an array", "commands_query_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri' and optional properties 'common', 'query', and 'mutation'", - "commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid w3:// URI string", + "commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string", "commands_query_error_envsItemModuleNotObject": "Env property 'module' at index {index} must be an object", "commands_query_description": "Query Web3APIs using recipe scripts", "commands_query_error_missingScript": "Required argument {script} is missing", "commands_query_error_noApi": "API needs to be initialized", "commands_query_error_readFail": "Failed to read query {query}", "commands_query_error_noRecipeScriptFound": "Recipe script not found at path: {path}", - "commands_query_error_noTestEnvFound": "w3 test-env not found, please run 'w3 infra up --modules=eth-ens-ipfs'", + "commands_query_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'", "commands_testEnv_description": "Manage a test environment for Web3API", "commands_testEnv_error_never": "This should never happen...", "commands_testEnv_error_noCommand": "No command given", @@ -190,14 +190,14 @@ "commands_testEnv_startup_error": "Failed to start test environment", "commands_testEnv_startup_text": "Starting test environment...", "commands_testEnv_startup_warning": "Warning starting test environment", - "commands_w3_error_notACommand": "is not a command", - "commands_w3_helpPrompt": "Type {command} to view common commands", + "commands_polywrap_error_notACommand": "is not a command", + "commands_polywrap_helpPrompt": "Type {command} to view common commands", "lib_codeGenerator_genCodeError": "Failed to generate types", "lib_codeGenerator_genCodeText": "Generate types", "lib_codeGenerator_genCodeWarning": "Warnings while generating types", "lib_codeGenerator_genTemplateStep": "Generating types from {path}", "lib_codeGenerator_wrongGenFile": "The generation file provided is wrong.", - "lib_codeGenerator_templateNoModify": "NOTE: This is generated by 'w3 codegen', DO NOT MODIFY", + "lib_codeGenerator_templateNoModify": "NOTE: This is generated by 'polywrap codegen', DO NOT MODIFY", "lib_codeGenerator_nogenerateBindingMethod": "The generation file provided doesn't have the 'generateBinding' method.", "lib_codeGenerator_noComposedSchema": "The schema does not exist, please define one.", "lib_codeGenerator_typeInfoMissing": "The TypeInfo is missing from the composer output.", @@ -217,7 +217,7 @@ "lib_compiler_noInterfaceModule": "Interfaces cannot have implementation file", "lib_compiler_step": "Compiling WASM module", "lib_compiler_noNodeModules": "could not locate {folder} in parent directories of web3api manifest", - "lib_compiler_noInvoke": "WASM module is missing the _w3_invoke export. This should never happen...", + "lib_compiler_noInvoke": "WASM module is missing the _wrap_invoke export. This should never happen...", "lib_compiler_invalid_module": "Invalid Wasm module found. {modulePath} is invalid. Error: {error}", "lib_compiler_cannotBuildInterfaceModules": "Cannot build modules for an Interface Web3API", "lib_compiler_outputMetadataText": "Metadata written", diff --git a/packages/cli/lang/es.json b/packages/cli/lang/es.json index d067eab83f..1ed5655aab 100644 --- a/packages/cli/lang/es.json +++ b/packages/cli/lang/es.json @@ -83,7 +83,7 @@ "commands_codegen_options_o_path": "path", "commands_options_options": "options", "commands_codegen_success": "Types were generated successfully", - "commands_create_description": "Create a new project with w3 CLI", + "commands_create_description": "Create a new project with polywrap CLI", "commands_create_directoryExists": "Directory with name {dir} already exists", "commands_create_error_commandFail": "Command failed: {error}", "commands_create_error_noCommand": "Please provide a command", @@ -153,31 +153,31 @@ "commands_query_error_clientConfigNotObject": "Custom client config must be an object", "commands_query_error_redirectsExportNotArray": "Exported redirects must be an array", "commands_query_error_redirectsItemNotValid": "Redirect at index {index} must be an object with properties 'from' and 'to'", - "commands_query_error_redirectsItemFromNotString": "Redirect property 'from' at index {index} must be a valid w3:// URI string", - "commands_query_error_redirectsItemToNotStringOrObject": "Redirect property 'to' at index {index} must be a valid w3:// URI string, or a plugin", + "commands_query_error_redirectsItemFromNotString": "Redirect property 'from' at index {index} must be a valid wrap:// URI string", + "commands_query_error_redirectsItemToNotStringOrObject": "Redirect property 'to' at index {index} must be a valid wrap:// URI string, or a plugin", "commands_query_error_redirectsItemToNotValidPlugin": "Redirect property 'to' at index {index} must be a valid plugin instance", "commands_query_error_pluginsExportNotArray": "Exported plugins must be an array", "commands_query_error_pluginsItemNotObject": "Plugin at index {index} must be an object with properties 'uri' and 'plugin'", - "commands_query_error_pluginsItemUriNotString": "Plugin property 'uri' at index {index} must be a valid w3:// URI string", + "commands_query_error_pluginsItemUriNotString": "Plugin property 'uri' at index {index} must be a valid wrap:// URI string", "commands_query_error_pluginsItemPluginNotObject": "Plugin property 'plugin' at index {index} must be an object with properties 'factory' and 'manifest'", "commands_query_error_pluginsItemPluginFactoryNotFunction": "Plugin property 'plugin.factory' at index {index} must be a function", "commands_query_error_pluginsItemPluginManifestNotObject": "Plugin property 'plugin.manifest' at index {index} must be an object", "commands_query_error_interfacesExportNotArray": "Exported interfaces must be an array", "commands_query_error_interfacesItemNotObject": "Interface at index {index} must be an object with properties 'interface' and 'implementations'", - "commands_query_error_interfacesItemInterfaceNotString": "Interface property 'interface' at index {index} must be a valid w3:// URI string", + "commands_query_error_interfacesItemInterfaceNotString": "Interface property 'interface' at index {index} must be a valid wrap:// URI string", "commands_query_error_interfacesItemImplementationsNotArray": "Interface property 'implementations' at index {index} must be an array", "commands_query_error_interfacesItemImplementationsEmpty": "Interface property 'implementations' at index {index} must not be an empty array", - "commands_query_error_interfacesItemImplementationsItemNotString": "Implementation at index ({index}, {implementationIndex}) must be a valid w3:// URI string", + "commands_query_error_interfacesItemImplementationsItemNotString": "Implementation at index ({index}, {implementationIndex}) must be a valid wrap:// URI string", "commands_query_error_envsExportNotArray": "Exported envs must be an array", "commands_query_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri'", - "commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid w3:// URI string", + "commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string", "commands_query_error_envsItemModuleNotObject": "Env property 'common' at index {index} must be an object", "commands_query_description": "Query Web3APIs using recipe scripts", "commands_query_error_missingScript": "Required argument {script} is missing", "commands_query_error_noApi": "API needs to be initialized", "commands_query_error_readFail": "Failed to read query {query}", "commands_query_error_noRecipeScriptFound": "Recipe script not found at path: {path}", - "commands_query_error_noTestEnvFound": "w3 test-env not found, please run 'w3 infra up --modules=eth-ens-ipfs'", + "commands_query_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'", "commands_testEnv_description": "Manage a test environment for Web3API", "commands_testEnv_error_never": "This should never happen...", "commands_testEnv_error_noCommand": "No command given", @@ -191,14 +191,14 @@ "commands_testEnv_startup_error": "Failed to start test environment", "commands_testEnv_startup_text": "Starting test environment...", "commands_testEnv_startup_warning": "Warning starting test environment", - "commands_w3_error_notACommand": "is not a command", - "commands_w3_helpPrompt": "Type {command} to view common commands", + "commands_polywrap_error_notACommand": "is not a command", + "commands_polywrap_helpPrompt": "Type {command} to view common commands", "lib_codeGenerator_genCodeError": "Failed to generate types", "lib_codeGenerator_genCodeText": "Generate types", "lib_codeGenerator_genCodeWarning": "Warnings while generating types", "lib_codeGenerator_genTemplateStep": "Generating types from {path}", "lib_codeGenerator_wrongGenFile": "The generation file provided is wrong.", - "lib_codeGenerator_templateNoModify": "NOTE: This is generated by 'w3 codegen', DO NOT MODIFY", + "lib_codeGenerator_templateNoModify": "NOTE: This is generated by 'polywrap codegen', DO NOT MODIFY", "lib_codeGenerator_nogenerateBindingMethod": "The generation file provided doesn't have the 'generateBinding' method.", "lib_codeGenerator_noComposedSchema": "The schema does not exist, please define one.", "lib_codeGenerator_typeInfoMissing": "The TypeInfo is missing from the composer output.", @@ -218,7 +218,7 @@ "lib_compiler_noInterfaceModule": "Interfaces cannot have implementation file", "lib_compiler_step": "Compiling WASM module", "lib_compiler_noNodeModules": "could not locate {folder} in parent directories of web3api manifest", - "lib_compiler_noInvoke": "WASM module is missing the _w3_invoke export. This should never happen...", + "lib_compiler_noInvoke": "WASM module is missing the _wrap_invoke export. This should never happen...", "lib_compiler_invalid_module": "Invalid Wasm module found. {modulePath} is invalid. Error: {error}", "lib_compiler_cannotBuildInterfaceModules": "Cannot build modules for an Interface Web3API", "lib_compiler_outputMetadataText": "Metadata written", diff --git a/packages/cli/package.json b/packages/cli/package.json index f16b932152..04f7071b24 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -13,7 +13,7 @@ "lang" ], "bin": { - "w3": "bin/w3" + "polywrap": "bin/polywrap" }, "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json && yarn build:build-images && yarn build:deploy-modules && yarn build:infra-modules", diff --git a/packages/cli/src/__tests__/e2e/app.spec.ts b/packages/cli/src/__tests__/e2e/app.spec.ts index 0670a5c491..0eb1cae8e0 100644 --- a/packages/cli/src/__tests__/e2e/app.spec.ts +++ b/packages/cli/src/__tests__/e2e/app.spec.ts @@ -1,4 +1,4 @@ -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; import { GetPathToCliTestFiles } from "@polywrap/test-cases"; @@ -6,7 +6,7 @@ import path from "path"; import fs from "fs"; -const HELP = `Usage: w3 app|a [options] [command] +const HELP = `Usage: polywrap app|a [options] [command] Build/generate types for your app @@ -39,7 +39,7 @@ describe("e2e tests for app command", () => { { args: ["app", "--help"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -53,7 +53,7 @@ describe("e2e tests for app command", () => { { args: ["app", "--output-dir"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -67,7 +67,7 @@ describe("e2e tests for app command", () => { { args: ["app", "codegen", "--codegen-dir"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -81,7 +81,7 @@ describe("e2e tests for app command", () => { { args: ["app", "codegen", "--ens"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -101,7 +101,7 @@ describe("e2e tests for app command", () => { { args: ["app", "codegen"], cwd: testCaseDir, - cli: w3Cli, + cli: polywrapCli, }, ); diff --git a/packages/cli/src/__tests__/e2e/build.spec.ts b/packages/cli/src/__tests__/e2e/build.spec.ts index 08f8d6cc6a..103861b678 100644 --- a/packages/cli/src/__tests__/e2e/build.spec.ts +++ b/packages/cli/src/__tests__/e2e/build.spec.ts @@ -1,12 +1,12 @@ import { Web3ApiProject, loadBuildManifest } from "../../lib"; -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; import { GetPathToCliTestFiles } from "@polywrap/test-cases"; import fs from "fs"; import path from "path"; -const HELP = `Usage: w3 build|b [options] +const HELP = `Usage: polywrap build|b [options] Builds a Web3API @@ -37,7 +37,7 @@ describe("e2e tests for build command", () => { { args: ["build", "--help"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -51,7 +51,7 @@ describe("e2e tests for build command", () => { { args: ["build", "--output-dir"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -69,7 +69,7 @@ describe("e2e tests for build command", () => { await project.cacheDefaultBuildImage(); - const cacheBuildEnvPath = path.join(projectRoot, ".w3/web3api/build/image") + const cacheBuildEnvPath = path.join(projectRoot, ".polywrap/web3api/build/image") const cachedBuildManifest = await loadBuildManifest( path.join(cacheBuildEnvPath, "web3api.build.yaml") ); @@ -90,7 +90,7 @@ describe("e2e tests for build command", () => { { args: ["build", "-v"], cwd: testCaseDir, - cli: w3Cli, + cli: polywrapCli, }, ); diff --git a/packages/cli/src/__tests__/e2e/codegen.spec.ts b/packages/cli/src/__tests__/e2e/codegen.spec.ts index a2e03f72a5..3cc9959d5e 100644 --- a/packages/cli/src/__tests__/e2e/codegen.spec.ts +++ b/packages/cli/src/__tests__/e2e/codegen.spec.ts @@ -1,5 +1,5 @@ import { defaultWeb3ApiManifest } from "../../lib"; -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; import { GetPathToCliTestFiles } from "@polywrap/test-cases"; @@ -7,7 +7,7 @@ import path from "path"; import fs from "fs"; import rimraf from "rimraf"; -const HELP = `Usage: w3 codegen|g [options] +const HELP = `Usage: polywrap codegen|g [options] Auto-generate API Types @@ -15,7 +15,7 @@ Options: -m, --manifest-file Path to the Web3API manifest file (default: ${defaultWeb3ApiManifest.join(" | ")}) -c, --codegen-dir Output directory for the generated code - (default: ./w3) + (default: ./polywrap) -s, --script Path to a custom generation script (JavaScript | TypeScript) -i, --ipfs [] IPFS node to load external schemas (default: @@ -38,7 +38,7 @@ describe("e2e tests for codegen command", () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["codegen", "--help"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); @@ -50,7 +50,7 @@ describe("e2e tests for codegen command", () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["codegen", "--ens"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); @@ -64,7 +64,7 @@ describe("e2e tests for codegen command", () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["codegen", "--script", `web3api-invalid.gen.js`], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }); const genFile = path.normalize( @@ -82,7 +82,7 @@ describe("e2e tests for codegen command", () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["codegen", "--script", `web3api-norun.gen.js`], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); @@ -98,7 +98,7 @@ describe("e2e tests for codegen command", () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["codegen"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); @@ -127,7 +127,7 @@ describe("e2e tests for codegen command", () => { let { exitCode, stdout, stderr } = await runCLI({ args: ["codegen", ...cmdArgs], cwd: testCaseDir, - cli: w3Cli, + cli: polywrapCli, }); stdout = clearStyle(stdout); diff --git a/packages/cli/src/__tests__/e2e/create.spec.ts b/packages/cli/src/__tests__/e2e/create.spec.ts index 2ed77fa315..7ec7e6afb1 100644 --- a/packages/cli/src/__tests__/e2e/create.spec.ts +++ b/packages/cli/src/__tests__/e2e/create.spec.ts @@ -1,11 +1,11 @@ -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; import rimraf from "rimraf"; -const HELP = `Usage: w3 create|c [options] [command] +const HELP = `Usage: polywrap create|c [options] [command] -Create a new project with w3 CLI +Create a new project with polywrap CLI Options: -h, --help display help for command @@ -23,7 +23,7 @@ describe("e2e tests for create command", () => { test("Should show help text", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["create", "--help"], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); @@ -34,7 +34,7 @@ describe("e2e tests for create command", () => { test("Should throw error for missing parameter - type", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["create"], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); @@ -45,7 +45,7 @@ describe("e2e tests for create command", () => { test("Should throw error for missing parameter - lang", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["create", "type"], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); @@ -56,7 +56,7 @@ describe("e2e tests for create command", () => { test("Should throw error for missing parameter - name", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["create", "type", "lang"], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); @@ -67,7 +67,7 @@ describe("e2e tests for create command", () => { test("Should throw error for invalid parameter - type", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["create", "unknown", "app", "name"], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); @@ -78,7 +78,7 @@ describe("e2e tests for create command", () => { test("Should throw error for invalid parameter - lang", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["create", "api", "unknown", "name"], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); @@ -89,7 +89,7 @@ describe("e2e tests for create command", () => { test("Should throw error for invalid parameter - output-dir", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["create", "api", "assemblyscript", "name", "-o"], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); @@ -110,7 +110,7 @@ describe("e2e tests for create command", () => { `${__dirname}/test`, ], cwd: __dirname, - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); diff --git a/packages/cli/src/__tests__/e2e/deploy.spec.ts b/packages/cli/src/__tests__/e2e/deploy.spec.ts index 46b6cc0869..56bc48d432 100644 --- a/packages/cli/src/__tests__/e2e/deploy.spec.ts +++ b/packages/cli/src/__tests__/e2e/deploy.spec.ts @@ -1,4 +1,4 @@ -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { initTestEnvironment, @@ -14,7 +14,7 @@ import { Wallet } from "@ethersproject/wallet"; import path from "path"; import fs from "fs"; -const HELP = `Usage: w3 deploy|d [options] +const HELP = `Usage: polywrap deploy|d [options] Deploys/Publishes a Web3API @@ -52,7 +52,7 @@ const setup = async (domainNames: string[]) => { ENS_REG_ADDR: ensAddress }; - const ethereumPluginUri = "w3://ens/ethereum.web3api.eth" + const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth" const client = new Web3ApiClient({ plugins: [ { @@ -109,7 +109,7 @@ describe("e2e tests for deploy command", () => { { args: ["build", "-v"], cwd: getTestCaseDir(i), - cli: w3Cli, + cli: polywrapCli, }, ); } @@ -126,7 +126,7 @@ describe("e2e tests for deploy command", () => { { args: ["deploy", "--help"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -140,7 +140,7 @@ describe("e2e tests for deploy command", () => { { args: ["deploy"], cwd: getTestCaseDir(0), - cli: w3Cli, + cli: polywrapCli, env: process.env as Record }, ); @@ -162,7 +162,7 @@ describe("e2e tests for deploy command", () => { { args: ["deploy"], cwd: getTestCaseDir(1), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -182,7 +182,7 @@ describe("e2e tests for deploy command", () => { { args: ["deploy"], cwd: getTestCaseDir(2), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -197,7 +197,7 @@ describe("e2e tests for deploy command", () => { { args: ["deploy"], cwd: getTestCaseDir(3), - cli: w3Cli, + cli: polywrapCli, }, ); @@ -222,7 +222,7 @@ describe("e2e tests for deploy command", () => { { args: ["deploy"], cwd: getTestCaseDir(4), - cli: w3Cli, + cli: polywrapCli, }, ); diff --git a/packages/cli/src/__tests__/e2e/help.spec.ts b/packages/cli/src/__tests__/e2e/help.spec.ts index d1437355bf..de0e748414 100644 --- a/packages/cli/src/__tests__/e2e/help.spec.ts +++ b/packages/cli/src/__tests__/e2e/help.spec.ts @@ -1,9 +1,9 @@ -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; -const HELP = `Usage: w3 [options] [command] +const HELP = `Usage: polywrap [options] [command] Options: -h, --help display help for command @@ -12,7 +12,7 @@ Commands: app|a Build/generate types for your app build|b [options] Builds a Web3API codegen|g [options] Auto-generate API Types - create|c Create a new project with w3 CLI + create|c Create a new project with polywrap CLI deploy|d [options] Deploys/Publishes a Web3API plugin|p Build/generate types for the plugin query|q [options] Query Web3APIs using recipe scripts @@ -25,7 +25,7 @@ describe("e2e tests for no help", () => { test("Should display the help content", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["help"], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); diff --git a/packages/cli/src/__tests__/e2e/infra.spec.ts b/packages/cli/src/__tests__/e2e/infra.spec.ts index 1c7b9fcdf4..6d7c4b4e4c 100644 --- a/packages/cli/src/__tests__/e2e/infra.spec.ts +++ b/packages/cli/src/__tests__/e2e/infra.spec.ts @@ -1,7 +1,7 @@ import fs from 'fs'; import path from "path"; import net from "net"; -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { GetPathToCliTestFiles } from "@polywrap/test-cases"; import { runCLI } from "@polywrap/test-env-js"; @@ -14,7 +14,7 @@ const testCaseRoot = path.join(GetPathToCliTestFiles(), "infra"); const getTestCaseDir = (index: number) => path.join(testCaseRoot, testCases[index]); -const HELP = `Usage: w3 infra|i [options] +const HELP = `Usage: polywrap infra|i [options] Manage infrastructure for your Web3API @@ -87,11 +87,11 @@ const waitForPorts = (ports: { port: number; expected: boolean }[]) => { }); }; -const runW3CLI = (args: string[], cwd: string) => +const runPolywrapCli = (args: string[], cwd: string) => runCLI({ args, cwd, - cli: w3Cli, + cli: polywrapCli, env: process.env as Record }); @@ -109,12 +109,12 @@ describe("e2e tests for infra command", () => { describe("Sanity", () => { afterEach(async () => { - await runW3CLI( + await runPolywrapCli( ["infra", "down", "-v"], getTestCaseDir(0), ); - await runW3CLI( + await runPolywrapCli( ["infra", "down", "-v", "--modules=eth-ens-ipfs"], getTestCaseDir(0), ); @@ -127,7 +127,7 @@ describe("e2e tests for infra command", () => { }); test("Should throw error for no command given", async () => { - const { exitCode: code, stderr: error } = await runW3CLI( + const { exitCode: code, stderr: error } = await runPolywrapCli( ["infra"], getTestCaseDir(0), ); @@ -137,7 +137,7 @@ describe("e2e tests for infra command", () => { }); test("Should show help text", async () => { - const { exitCode: code, stdout: output, stderr: error } = await runW3CLI( + const { exitCode: code, stdout: output, stderr: error } = await runPolywrapCli( ["infra", "--help"], getTestCaseDir(0), ); @@ -148,7 +148,7 @@ describe("e2e tests for infra command", () => { }); test("Extracts composed docker manifest's environment variable list", async () => { - const { exitCode: code, stdout: output } = await runW3CLI( + const { exitCode: code, stdout: output } = await runPolywrapCli( ["infra", "vars"], getTestCaseDir(0), ); @@ -162,7 +162,7 @@ describe("e2e tests for infra command", () => { }); test("Validates and displays composed docker manifest", async () => { - const { exitCode: code, stdout: output } = await runW3CLI( + const { exitCode: code, stdout: output } = await runPolywrapCli( ["infra", "config"], getTestCaseDir(0), ); @@ -176,7 +176,7 @@ describe("e2e tests for infra command", () => { }); test("Sets environment up with all modules if no --modules are passed", async () => { - await runW3CLI( + await runPolywrapCli( ["infra", "down", "--manifest=./web3api.infra.yaml"], getTestCaseDir(0), ); @@ -187,7 +187,7 @@ describe("e2e tests for infra command", () => { { port: 8545, expected: false } ]); - await runW3CLI( + await runPolywrapCli( ["infra", "up", "--manifest=./web3api.infra.yaml"], getTestCaseDir(0), ); @@ -200,7 +200,7 @@ describe("e2e tests for infra command", () => { }); test("Should correctly fetch default & local module", async () => { - await runW3CLI( + await runPolywrapCli( ["infra", "up"], getTestCaseDir(4), ); @@ -210,14 +210,14 @@ describe("e2e tests for infra command", () => { { port: 8546, expected: true }, ]); - await runW3CLI( + await runPolywrapCli( ["infra", "down"], getTestCaseDir(4), ); }); test("Should correctly open one process for default module because modules flag overwrites it", async () => { - await runW3CLI( + await runPolywrapCli( ["infra", "up", "--modules=eth-ens-ipfs"], getTestCaseDir(4), ); @@ -226,14 +226,14 @@ describe("e2e tests for infra command", () => { { port: 5001, expected: true }, ]); - await runW3CLI( + await runPolywrapCli( ["infra", "down", "--modules=eth-ens-ipfs"], getTestCaseDir(4), ); }); test("Should throw because default module declared in manifest is not recognized", async () => { - const { stderr } = await runW3CLI( + const { stderr } = await runPolywrapCli( ["infra", "up", "--manifest=./web3api.infra.wrong.yaml"], getTestCaseDir(4), ); @@ -244,7 +244,7 @@ describe("e2e tests for infra command", () => { }); test("Should correctly fetch different local modules when they are declared as folder or file", async () => { - await runW3CLI( + await runPolywrapCli( ["infra", "up"], getTestCaseDir(4), ); @@ -255,14 +255,14 @@ describe("e2e tests for infra command", () => { { port: 8547, expected: true }, ]); - await runW3CLI( + await runPolywrapCli( ["infra", "down"], getTestCaseDir(4), ); }); test("Tears down environment", async () => { - await runW3CLI( + await runPolywrapCli( ["infra", "up"], getTestCaseDir(0), ); @@ -273,7 +273,7 @@ describe("e2e tests for infra command", () => { { port: 8545, expected: true } ]); - await runW3CLI( + await runPolywrapCli( ["infra", "down"], getTestCaseDir(0), ); @@ -286,7 +286,7 @@ describe("e2e tests for infra command", () => { }); test("Sets environment up with only selected modules", async () => { - await runW3CLI( + await runPolywrapCli( ["infra", "up", "--modules=ipfs"], getTestCaseDir(0), ); @@ -297,7 +297,7 @@ describe("e2e tests for infra command", () => { { port: 8545, expected: false } ]); - await runW3CLI( + await runPolywrapCli( ["infra", "down", "--modules=ipfs"], getTestCaseDir(0), ); @@ -308,7 +308,7 @@ describe("e2e tests for infra command", () => { }); test("Should throw error for --modules that don't exist in infra manifest and are not default modules", async () => { - const { exitCode: code, stderr } = await runW3CLI( + const { exitCode: code, stderr } = await runPolywrapCli( [ "infra", "config", @@ -324,7 +324,7 @@ describe("e2e tests for infra command", () => { }); test("Should setup and use a default module if --modules arg is passed and the module does not exist in the manifest", async () => { - await runW3CLI( + await runPolywrapCli( [ "infra", "up", @@ -341,7 +341,7 @@ describe("e2e tests for infra command", () => { }) test("If a module declared in manifest has the same name of a default module, the manifest's should take precedence", async () => { - const { stdout: withManifestModOutput } = await runW3CLI( + const { stdout: withManifestModOutput } = await runPolywrapCli( [ "infra", "config", @@ -355,7 +355,7 @@ describe("e2e tests for infra command", () => { expect(withManifestModSanitizedOutput).toContain("dev-server:") - const { stdout: withoutManifestModOutput } = await runW3CLI( + const { stdout: withoutManifestModOutput } = await runPolywrapCli( [ "infra", "config", @@ -372,7 +372,7 @@ describe("e2e tests for infra command", () => { test("Should set up a default environment if no manifest is present, but --modules option is passed", async () => { - await runW3CLI( + await runPolywrapCli( [ "infra", "up", @@ -390,7 +390,7 @@ describe("e2e tests for infra command", () => { test("Should not include default modules if no --modules option is passed and manifest exists", async () => { - const { stdout } = await runW3CLI( + const { stdout } = await runPolywrapCli( [ "infra", "config", @@ -406,7 +406,7 @@ describe("e2e tests for infra command", () => { test("Should fail if no manifest is present and no --modules option is passed", async () => { - const { exitCode, stderr } = await runW3CLI( + const { exitCode, stderr } = await runPolywrapCli( [ "infra", "config", @@ -422,7 +422,7 @@ describe("e2e tests for infra command", () => { describe("Duplicates", () => { test("Should handle duplicate services", async () => { - await runW3CLI( + await runPolywrapCli( [ "infra", "up", @@ -436,14 +436,14 @@ describe("e2e tests for infra command", () => { { port: 8545, expected: true } ]); - await runW3CLI( + await runPolywrapCli( ["infra", "down", "--modules=ganache,dev-server"], getTestCaseDir(1), ); }); test("Should correctly duplicate pkg in different module", async () => { - await runW3CLI( + await runPolywrapCli( [ "infra", "up", @@ -456,7 +456,7 @@ describe("e2e tests for infra command", () => { { port: 5001, expected: true }, ]); - await runW3CLI( + await runPolywrapCli( ["infra", "down", "--modules=ipfs,ipfs-duplicate"], getTestCaseDir(1), ); diff --git a/packages/cli/src/__tests__/e2e/no-command.spec.ts b/packages/cli/src/__tests__/e2e/no-command.spec.ts index d657276c24..91819f2d2e 100644 --- a/packages/cli/src/__tests__/e2e/no-command.spec.ts +++ b/packages/cli/src/__tests__/e2e/no-command.spec.ts @@ -1,9 +1,9 @@ -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; -const HELP = `Usage: w3 [options] [command] +const HELP = `Usage: polywrap [options] [command] Options: -h, --help display help for command @@ -12,7 +12,7 @@ Commands: app|a Build/generate types for your app build|b [options] Builds a Web3API codegen|g [options] Auto-generate API Types - create|c Create a new project with w3 CLI + create|c Create a new project with polywrap CLI deploy|d [options] Deploys/Publishes a Web3API plugin|p Build/generate types for the plugin query|q [options] Query Web3APIs using recipe scripts @@ -25,17 +25,17 @@ describe("e2e tests for no command", () => { test("Should throw error for unrecognized command", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: ["unknown"], - cli: w3Cli + cli: polywrapCli }); expect(code).toEqual(1); expect(error).toBe(`error: unknown command 'unknown'\n`); expect(output).toEqual(``); }); - test("Should let the user to type w3 help", async () => { + test("Should let the user to type polywrap help", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ args: [], - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(1); expect(clearStyle(error)).toBe(clearStyle(HELP)); diff --git a/packages/cli/src/__tests__/e2e/plugin.spec.ts b/packages/cli/src/__tests__/e2e/plugin.spec.ts index 51408e2354..951c0147d5 100644 --- a/packages/cli/src/__tests__/e2e/plugin.spec.ts +++ b/packages/cli/src/__tests__/e2e/plugin.spec.ts @@ -6,7 +6,7 @@ import { compareSync } from "dir-compare"; import path from "path"; import fs from "fs"; -const HELP = `Usage: w3 plugin|p [options] [command] +const HELP = `Usage: polywrap plugin|p [options] [command] Build/generate types for the plugin @@ -118,8 +118,8 @@ describe("e2e tests for plugin command", () => { expect(clearStyle(output)).toEqual(CODEGEN_SUCCESS); const expectedTypesResult = compareSync( - `${testCaseDir}/src/w3`, - `${testCaseDir}/expected/src/w3`, + `${testCaseDir}/src/polywrap`, + `${testCaseDir}/expected/src/polywrap`, { compareContent: true } ); expect(expectedTypesResult.differences).toBe(0); diff --git a/packages/cli/src/__tests__/e2e/query.spec.ts b/packages/cli/src/__tests__/e2e/query.spec.ts index 79dbb72483..b240201eab 100644 --- a/packages/cli/src/__tests__/e2e/query.spec.ts +++ b/packages/cli/src/__tests__/e2e/query.spec.ts @@ -2,7 +2,7 @@ import fs from "fs"; import path from "path"; import yaml from "js-yaml"; -import { clearStyle, w3Cli } from "./utils"; +import { clearStyle, polywrapCli } from "./utils"; import { buildAndDeployApi, providers, initTestEnvironment, runCLI, stopTestEnvironment } from "@polywrap/test-env-js"; import { GetPathToCliTestFiles } from "@polywrap/test-cases"; @@ -16,7 +16,7 @@ import { jest.setTimeout(200000); -const HELP = `Usage: w3 query|q [options] +const HELP = `Usage: polywrap query|q [options] Query Web3APIs using recipe scripts @@ -49,7 +49,7 @@ describe("sanity tests for query command", () => { const { exitCode, stdout, stderr } = await runCLI({ args: ["query"], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(exitCode).toEqual(1); @@ -61,7 +61,7 @@ describe("sanity tests for query command", () => { const { exitCode, stdout, stderr } = await runCLI({ args: ["query", "./recipes/e2e.json", "--client-config"], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(exitCode).toEqual(1); @@ -102,7 +102,7 @@ describe("e2e tests for query command", () => { const { exitCode: code, stdout: output, stderr: queryErr } = await runCLI({ args: ["query", "./recipes/e2e.json"], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(queryErr).toBe(""); @@ -118,7 +118,7 @@ describe("e2e tests for query command", () => { const { exitCode: code, stdout: output, stderr: queryErr } = await runCLI({ args: ["query", "./recipes/e2e.yaml"], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); @@ -140,7 +140,7 @@ describe("e2e tests for query command", () => { const { exitCode: code, stdout: output, stderr: queryErr } = await runCLI({ args: ["query", "./recipes/e2e.json"], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); @@ -167,7 +167,7 @@ describe("e2e tests for query command", () => { "./recipes/output.json", ], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); @@ -198,7 +198,7 @@ describe("e2e tests for query command", () => { "./recipes/output.yaml", ], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); @@ -233,7 +233,7 @@ describe("e2e tests for query command", () => { "--quiet", ], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(code).toEqual(0); @@ -258,7 +258,7 @@ describe("e2e tests for query command", () => { config, ], cwd: testCaseRoot, - cli: w3Cli, + cli: polywrapCli, }); expect(stderr).toBeFalsy(); diff --git a/packages/cli/src/__tests__/e2e/utils.ts b/packages/cli/src/__tests__/e2e/utils.ts index f1ef76bee0..fe561fbdde 100644 --- a/packages/cli/src/__tests__/e2e/utils.ts +++ b/packages/cli/src/__tests__/e2e/utils.ts @@ -5,4 +5,4 @@ export const clearStyle = (styled: string) => { ); }; -export const w3Cli = `${__dirname}/../../../bin/w3`; +export const polywrapCli = `${__dirname}/../../../bin/polywrap`; diff --git a/packages/cli/src/__tests__/unit/docker.spec.ts b/packages/cli/src/__tests__/unit/docker.spec.ts index d61e11aa0e..a4b494d0b6 100644 --- a/packages/cli/src/__tests__/unit/docker.spec.ts +++ b/packages/cli/src/__tests__/unit/docker.spec.ts @@ -1,4 +1,4 @@ -import { w3Cli } from "../e2e/utils"; +import { polywrapCli } from "../e2e/utils"; import { initTestEnvironment, runCLI, stopTestEnvironment } from "@polywrap/test-env-js"; import { GetPathToCliTestFiles } from "@polywrap/test-cases"; @@ -20,7 +20,7 @@ describe("e2e tests for docker", () => { runCLI({ args: ["build", "-v"], cwd: path.join(GetPathToCliTestFiles(), "api/build-cmd/001-sanity"), - cli: w3Cli + cli: polywrapCli }).then((result: { exitCode: number; stdout: string; stderr: string }) => { const { exitCode, stderr } = result; expect(stderr.indexOf("Conflict. The container name \"/root-build-image\" is already in use")).toBeLessThan(0); diff --git a/packages/cli/src/commands/app.ts b/packages/cli/src/commands/app.ts index c0fe7ec35e..0f49325704 100644 --- a/packages/cli/src/commands/app.ts +++ b/packages/cli/src/commands/app.ts @@ -13,7 +13,7 @@ import { import { Web3ApiClient } from "@polywrap/client-js"; import * as path from "path"; -const defaultOutputTypesDir = "./src/w3"; +const defaultOutputTypesDir = "./src/polywrap"; type AppCommandOptions = { manifestFile: string; diff --git a/packages/cli/src/commands/build.ts b/packages/cli/src/commands/build.ts index 8e13956ab9..55031bd675 100644 --- a/packages/cli/src/commands/build.ts +++ b/packages/cli/src/commands/build.ts @@ -148,7 +148,7 @@ async function run(options: BuildCommandOptions) { const watcher = new Watcher(); watcher.start(project.getManifestDir(), { - ignored: [outputDir + "/**", project.getManifestDir() + "/**/w3/**"], + ignored: [outputDir + "/**", project.getManifestDir() + "/**/polywrap/**"], ignoreInitial: true, execute: async (events: WatchEvent[]) => { // Log all of the events encountered diff --git a/packages/cli/src/commands/codegen.ts b/packages/cli/src/commands/codegen.ts index 99daefde89..66a8624df6 100644 --- a/packages/cli/src/commands/codegen.ts +++ b/packages/cli/src/commands/codegen.ts @@ -15,7 +15,7 @@ import { import path from "path"; import { filesystem } from "gluegun"; -const defaultCodegenDir = "./w3"; +const defaultCodegenDir = "./polywrap"; const nodeStr = intlMsg.commands_codegen_options_i_node(); const pathStr = intlMsg.commands_codegen_options_o_path(); const addrStr = intlMsg.commands_codegen_options_e_address(); diff --git a/packages/cli/src/commands/infra.ts b/packages/cli/src/commands/infra.ts index 22695eb4d4..adac7e6948 100644 --- a/packages/cli/src/commands/infra.ts +++ b/packages/cli/src/commands/infra.ts @@ -103,7 +103,7 @@ Default Modules: \n${readdirSync(DEFAULT_MODULES_PATH) .map((m) => `\n- ${m}`) .join("")} -Example: 'w3 infra up --modules=eth-ens-ipfs'.` +Example: 'polywrap infra up --modules=eth-ens-ipfs'.` ); } } diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index fca30f9c9f..27ad0e36ec 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -18,7 +18,7 @@ import path from "path"; import fs from "fs"; const defaultPublishDir = "./build"; -const defaultCodegenDir = "./w3"; +const defaultCodegenDir = "./polywrap"; const pathStr = intlMsg.commands_plugin_options_path(); const defaultManifestStr = defaultPluginManifest.join(" | "); const nodeStr = intlMsg.commands_plugin_options_i_node(); diff --git a/packages/cli/src/lib/CacheDirectory.ts b/packages/cli/src/lib/CacheDirectory.ts index 55c7734efc..345931afb0 100644 --- a/packages/cli/src/lib/CacheDirectory.ts +++ b/packages/cli/src/lib/CacheDirectory.ts @@ -12,7 +12,7 @@ export interface CacheDirectoryConfig { export class CacheDirectory { constructor( protected _config: CacheDirectoryConfig, - protected _cacheDirName: string = ".w3" + protected _cacheDirName: string = ".polywrap" ) {} public getCacheDir(): string { diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index 006ec0b70c..e6016672af 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -17,7 +17,7 @@ import { import { Web3ApiManifest, BuildManifest, MetaManifest } from "@polywrap/core-js"; import { WasmWeb3Api } from "@polywrap/client-js"; -import { W3Imports } from "@polywrap/client-js/build/wasm/types"; +import { WrapImports } from "@polywrap/client-js/build/wasm/types"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; import { ComposerOutput } from "@polywrap/schema-compose"; import { writeFileSync, writeDirectorySync } from "@polywrap/os-js"; @@ -270,7 +270,7 @@ export class Compiler { // If the dockerfile path isn't provided, generate it if (!buildManifest?.docker?.dockerfile) { - // Make sure the default template is in the cached .w3/web3api/build/image folder + // Make sure the default template is in the cached .polywrap/web3api/build/image folder await project.cacheDefaultBuildImage(); dockerfile = generateDockerfile( @@ -432,28 +432,28 @@ export class Compiler { private async _validateWasmModule(buildDir: string): Promise { const modulePath = path.join(buildDir, `module.wasm`); const wasmSource = fs.readFileSync(modulePath); - const w3Imports: Record void> = { - __w3_subinvoke: () => {}, - __w3_subinvoke_result_len: () => {}, - __w3_subinvoke_result: () => {}, - __w3_subinvoke_error_len: () => {}, - __w3_subinvoke_error: () => {}, - __w3_subinvokeImplementation: () => {}, - __w3_subinvokeImplementation_result_len: () => {}, - __w3_subinvokeImplementation_result: () => {}, - __w3_subinvokeImplementation_error_len: () => {}, - __w3_subinvokeImplementation_error: () => {}, - __w3_invoke_args: () => {}, - __w3_invoke_result: () => {}, - __w3_invoke_error: () => {}, - __w3_getImplementations: () => {}, - __w3_getImplementations_result_len: () => {}, - __w3_getImplementations_result: () => {}, - __w3_abort: () => {}, - __w3_debug_log: () => {}, - __w3_load_env: () => {}, - __w3_sanitize_env_args: () => {}, - __w3_sanitize_env_result: () => {}, + const wrapImports: Record void> = { + __wrap_subinvoke: () => {}, + __wrap_subinvoke_result_len: () => {}, + __wrap_subinvoke_result: () => {}, + __wrap_subinvoke_error_len: () => {}, + __wrap_subinvoke_error: () => {}, + __wrap_subinvokeImplementation: () => {}, + __wrap_subinvokeImplementation_result_len: () => {}, + __wrap_subinvokeImplementation_result: () => {}, + __wrap_subinvokeImplementation_error_len: () => {}, + __wrap_subinvokeImplementation_error: () => {}, + __wrap_invoke_args: () => {}, + __wrap_invoke_result: () => {}, + __wrap_invoke_error: () => {}, + __wrap_getImplementations: () => {}, + __wrap_getImplementations_result_len: () => {}, + __wrap_getImplementations_result: () => {}, + __wrap_abort: () => {}, + __wrap_debug_log: () => {}, + __wrap_load_env: () => {}, + __wrap_sanitize_env_args: () => {}, + __wrap_sanitize_env_result: () => {}, }; try { @@ -464,7 +464,7 @@ export class Compiler { env: { memory, }, - w3: w3Imports, + wrap: wrapImports, }, requiredExports: WasmWeb3Api.requiredExports, }); diff --git a/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/Dockerfile.mustache b/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/Dockerfile.mustache index 6b2221fa5d..5547210b1a 100644 --- a/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/Dockerfile.mustache +++ b/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/Dockerfile.mustache @@ -33,10 +33,10 @@ COPY {{.}} {{.}} COPY {{dir}} {{dir}} # Build the module at {{dir}} -RUN ./node_modules/.bin/asc {{dir}}/w3/entry.ts \ +RUN ./node_modules/.bin/asc {{dir}}/polywrap/entry.ts \ --path ./node_modules \ --outFile ./build/{{name}}.wasm \ - --use abort={{dir}}/w3/entry/w3Abort \ + --use abort={{dir}}/polywrap/entry/wrapAbort \ --optimize --importMemory \ --runtime stub \ --runPasses asyncify \ diff --git a/packages/cli/src/lib/defaults/build-images/wasm/rust/Dockerfile.mustache b/packages/cli/src/lib/defaults/build-images/wasm/rust/Dockerfile.mustache index 775deea16f..640fff8dbc 100644 --- a/packages/cli/src/lib/defaults/build-images/wasm/rust/Dockerfile.mustache +++ b/packages/cli/src/lib/defaults/build-images/wasm/rust/Dockerfile.mustache @@ -64,8 +64,8 @@ RUN rm -rf {{dir}}/Cargo.lock # Ensure the Wasm module is configured to use imported memory ENV RUSTFLAGS="-C link-arg=-z -C link-arg=stack-size=65536 -C link-arg=--import-memory" -# Enable the w3-invoke feature for the {{dir}} module -RUN toml set ./{{dir}}/Cargo.toml features.w3-invoke [] > ./{{dir}}/Cargo-local.toml && \ +# Enable the wrap-invoke feature for the {{dir}} module +RUN toml set ./{{dir}}/Cargo.toml features.wrap-invoke [] > ./{{dir}}/Cargo-local.toml && \ rm -rf ./{{dir}}/Cargo.toml && \ mv ./{{dir}}/Cargo-local.toml ./{{dir}}/Cargo.toml && \ true @@ -84,7 +84,7 @@ RUN sed -i 's/"\[cdylib,rlib\]"/\["cdylib","rlib"\]/g' ./{{dir}}/Cargo.toml # Build the module at {{dir}} RUN cargo +nightly build --manifest-path ./{{dir}}/Cargo.toml \ - --target wasm32-unknown-unknown --release --features "w3-invoke" + --target wasm32-unknown-unknown --release --features "wrap-invoke" # Make the build directory RUN rm -rf ./build diff --git a/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts b/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts index fe60c01372..7888e3bb66 100644 --- a/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts +++ b/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts @@ -12,6 +12,6 @@ export function getCompilerOverrides(): CompilerOverrides { throw Error(intlMsg.lib_wasm_rust_invalidModule({ path: module })); } }, - generationSubPath: "src/w3", + generationSubPath: "src/polywrap", }; } diff --git a/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts b/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts index 83ec3d3298..fd187f91b9 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts @@ -41,7 +41,7 @@ class ENSPublisher implements Deployer { ? new Wallet(config.privateKey).connect(connectionProvider) : undefined; - const ethereumPluginUri = "w3://ens/ethereum.web3api.eth"; + const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth"; const ensWrapperUri = `fs/${path.join( path.dirname(require.resolve("@polywrap/test-env-js")), "wrappers", diff --git a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts index 171035b612..4f075e1dd0 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts @@ -28,7 +28,7 @@ class LocalDevENSPublisher implements Deployer { } const cid = uri.path; - const ethereumPluginUri = "w3://ens/ethereum.web3api.eth"; + const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth"; const client = new Web3ApiClient({ plugins: [ diff --git a/packages/cli/src/lib/helpers/client.ts b/packages/cli/src/lib/helpers/client.ts index e7d3473803..dd812880e4 100644 --- a/packages/cli/src/lib/helpers/client.ts +++ b/packages/cli/src/lib/helpers/client.ts @@ -15,7 +15,7 @@ export function getSimpleClient(config: SimpleClientConfig): Web3ApiClient { const plugins: PluginRegistration[] = []; if (ensAddress) { plugins.push({ - uri: "w3://ens/ens.web3api.eth", + uri: "wrap://ens/ens.web3api.eth", plugin: ensPlugin({ addresses: { testnet: ensAddress, @@ -25,7 +25,7 @@ export function getSimpleClient(config: SimpleClientConfig): Web3ApiClient { } if (ethProvider) { plugins.push({ - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -37,7 +37,7 @@ export function getSimpleClient(config: SimpleClientConfig): Web3ApiClient { } if (ipfsProvider) { plugins.push({ - uri: "w3://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.web3api.eth", plugin: ipfsPlugin({ provider: ipfsProvider, fallbackProviders: defaultIpfsProviders, diff --git a/packages/cli/src/lib/infra/Infra.ts b/packages/cli/src/lib/infra/Infra.ts index cd29110ff8..11901ff135 100644 --- a/packages/cli/src/lib/infra/Infra.ts +++ b/packages/cli/src/lib/infra/Infra.ts @@ -230,7 +230,7 @@ export class Infra { this._writeFileToCacheFromAbsPath(composePath, fileContent); } - // Compose package.json under .w3 folder and install deps + // Compose package.json under .polywrap folder and install deps private async _fetchRemoteModules( modules: NamedRemoteModule[], installationDir: string diff --git a/packages/cli/src/lib/option-parsers/app.ts b/packages/cli/src/lib/option-parsers/app.ts index 21b4fcc06c..7e0285a57b 100644 --- a/packages/cli/src/lib/option-parsers/app.ts +++ b/packages/cli/src/lib/option-parsers/app.ts @@ -4,7 +4,7 @@ import { resolvePathIfExists } from "../system"; import path from "path"; -const defaultAppCodegenDir = "./src/w3"; +const defaultAppCodegenDir = "./src/polywrap"; export function parseAppManifestFileOption( manifestFile: string | undefined, diff --git a/packages/cli/src/lib/option-parsers/codegen.ts b/packages/cli/src/lib/option-parsers/codegen.ts index 7b3ed6f37d..159d3d4012 100644 --- a/packages/cli/src/lib/option-parsers/codegen.ts +++ b/packages/cli/src/lib/option-parsers/codegen.ts @@ -1,6 +1,6 @@ import path from "path"; -const defaultCodegenDir = "./w3"; +const defaultCodegenDir = "./polywrap"; export function parseCodegenDirOption( codegenDir: string | undefined, diff --git a/packages/cli/src/lib/option-parsers/plugin.ts b/packages/cli/src/lib/option-parsers/plugin.ts index 2789b1bbc6..700bc37cc5 100644 --- a/packages/cli/src/lib/option-parsers/plugin.ts +++ b/packages/cli/src/lib/option-parsers/plugin.ts @@ -5,7 +5,7 @@ import { resolvePathIfExists } from "../system"; import path from "path"; const defaultPluginPublishDir = "./build"; -const defaultPluginCodegenDir = "./w3"; +const defaultPluginCodegenDir = "./polywrap"; export function parsePluginManifestFileOption( manifestFile: string | undefined, diff --git a/packages/cli/src/lib/project/AppProject.ts b/packages/cli/src/lib/project/AppProject.ts index b1b99b2adb..470e8aa7e3 100644 --- a/packages/cli/src/lib/project/AppProject.ts +++ b/packages/cli/src/lib/project/AppProject.ts @@ -119,7 +119,7 @@ export class AppProject extends Project { }); } - private _getGenerationDirectory(generationSubPath = "src/w3"): string { + private _getGenerationDirectory(generationSubPath = "src/polywrap"): string { return path.join(this.getManifestDir(), generationSubPath); } } diff --git a/packages/cli/src/lib/project/PluginProject.ts b/packages/cli/src/lib/project/PluginProject.ts index de8644dae5..082c3a1c22 100644 --- a/packages/cli/src/lib/project/PluginProject.ts +++ b/packages/cli/src/lib/project/PluginProject.ts @@ -135,7 +135,7 @@ export class PluginProject extends Project { private _getGenerationDirectory( entryPoint: string, - generationSubPath = "w3" + generationSubPath = "polywrap" ): string { const absolute = path.isAbsolute(entryPoint) ? entryPoint diff --git a/packages/cli/src/lib/project/Web3ApiProject.ts b/packages/cli/src/lib/project/Web3ApiProject.ts index 5c0f132d73..edf07b72b5 100644 --- a/packages/cli/src/lib/project/Web3ApiProject.ts +++ b/packages/cli/src/lib/project/Web3ApiProject.ts @@ -544,7 +544,7 @@ export class Web3ApiProject extends Project { private _getGenerationDirectory( entryPoint: string, - generationSubPath = "w3" + generationSubPath = "polywrap" ): string { const absolute = path.isAbsolute(entryPoint) ? entryPoint diff --git a/packages/cli/src/lib/test-env/client-config.ts b/packages/cli/src/lib/test-env/client-config.ts index d861346717..918128a6ed 100644 --- a/packages/cli/src/lib/test-env/client-config.ts +++ b/packages/cli/src/lib/test-env/client-config.ts @@ -27,7 +27,7 @@ export async function getTestEnvClientConfig(): Promise< // maybe have it exported from test-env. const plugins: PluginRegistration[] = [ { - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -37,14 +37,14 @@ export async function getTestEnvClientConfig(): Promise< }), }, { - uri: "w3://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.web3api.eth", plugin: ipfsPlugin({ provider: ipfsProvider, fallbackProviders: defaultIpfsProviders, }), }, { - uri: "w3://ens/ens.web3api.eth", + uri: "wrap://ens/ens.web3api.eth", plugin: ensPlugin({ addresses: { testnet: ensAddress, diff --git a/packages/core-interfaces/logger/package.json b/packages/core-interfaces/logger/package.json index f244f68055..e8b4f6f2fb 100644 --- a/packages/core-interfaces/logger/package.json +++ b/packages/core-interfaces/logger/package.json @@ -4,11 +4,11 @@ "private": true, "version": "0.0.1-prealpha.85", "scripts": { - "build": "npx w3 build", + "build": "npx polywrap build", "lint": "eslint --color -c ../../../.eslintrc.js .", - "test:env:up": "npx w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "npx w3 infra down --modules=eth-ens-ipfs", - "deploy": "npx w3 build --ipfs http://localhost:5001" + "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 build --ipfs http://localhost:5001" }, "devDependencies": { "polywrap": "0.0.1-prealpha.85" diff --git a/packages/core-interfaces/uri-resolver/package.json b/packages/core-interfaces/uri-resolver/package.json index 8aeb7ccbd5..24065eee3b 100644 --- a/packages/core-interfaces/uri-resolver/package.json +++ b/packages/core-interfaces/uri-resolver/package.json @@ -4,11 +4,11 @@ "private": true, "version": "0.0.1-prealpha.85", "scripts": { - "build": "npx w3 build", + "build": "npx polywrap build", "lint": "eslint --color -c ../../../.eslintrc.js .", - "test:env:up": "npx w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "npx w3 infra down --modules=eth-ens-ipfs", - "deploy": "npx w3 build --ipfs http://localhost:5001" + "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 build --ipfs http://localhost:5001" }, "devDependencies": { "polywrap": "0.0.1-prealpha.85" diff --git a/packages/js/asyncify/src/__tests__/AsyncWasmInstance.spec.ts b/packages/js/asyncify/src/__tests__/AsyncWasmInstance.spec.ts index 7f374a7ab5..698e67d9b7 100644 --- a/packages/js/asyncify/src/__tests__/AsyncWasmInstance.spec.ts +++ b/packages/js/asyncify/src/__tests__/AsyncWasmInstance.spec.ts @@ -74,7 +74,7 @@ describe("AsyncWasmInstance", () => { const instance = await AsyncWasmInstance.createInstance({ module, imports: { - w3: { + wrap: { log: (x: number) => { logs.push(x); }, @@ -109,7 +109,7 @@ describe("AsyncWasmInstance", () => { const instance = await AsyncWasmInstance.createInstance({ module, imports: { - w3: { + wrap: { log: (x: number) => { logs.push(x); }, @@ -144,7 +144,7 @@ describe("AsyncWasmInstance", () => { const instance = await AsyncWasmInstance.createInstance({ module, imports: { - w3: { + wrap: { log: (x: number) => { logs.push(x); }, @@ -183,7 +183,7 @@ describe("AsyncWasmInstance", () => { const instance = await AsyncWasmInstance.createInstance({ module, imports: { - w3: { + wrap: { log: (x: number) => { logs.push(x); }, @@ -250,7 +250,7 @@ describe("AsyncWasmInstance", () => { const instance = await AsyncWasmInstance.createInstance({ module, imports: { - w3: { + wrap: { log: (x: number) => { logs.push(x); }, diff --git a/packages/js/asyncify/src/__tests__/cases/multipleSleep.ts b/packages/js/asyncify/src/__tests__/cases/multipleSleep.ts index ffa46be9d3..469799b462 100644 --- a/packages/js/asyncify/src/__tests__/cases/multipleSleep.ts +++ b/packages/js/asyncify/src/__tests__/cases/multipleSleep.ts @@ -1,7 +1,7 @@ -@external("w3", "asyncFunc") +@external("wrap", "asyncFunc") declare function asyncFunc(ms: number): void; -@external("w3", "log") +@external("wrap", "log") declare function log(value: number): void; export function main(): void { diff --git a/packages/js/asyncify/src/__tests__/cases/simpleSleep.ts b/packages/js/asyncify/src/__tests__/cases/simpleSleep.ts index 34be041c7b..3935cfe0ae 100644 --- a/packages/js/asyncify/src/__tests__/cases/simpleSleep.ts +++ b/packages/js/asyncify/src/__tests__/cases/simpleSleep.ts @@ -1,7 +1,7 @@ -@external("w3", "asyncFunc") +@external("wrap", "asyncFunc") declare function asyncFunc(): void; -@external("w3", "log") +@external("wrap", "log") declare function log(value: number): void; export function main(): void { diff --git a/packages/js/client/scripts/extractPluginConfigs.ts b/packages/js/client/scripts/extractPluginConfigs.ts index 59f11b130b..413a8d2b0c 100644 --- a/packages/js/client/scripts/extractPluginConfigs.ts +++ b/packages/js/client/scripts/extractPluginConfigs.ts @@ -22,7 +22,7 @@ const plugins: PluginConfigSource[] = [ { name: "Ipfs", module: "@polywrap/ipfs-plugin-js", - uri: "w3://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.web3api.eth", config: "IpfsPluginConfig", files: [ { @@ -34,7 +34,7 @@ const plugins: PluginConfigSource[] = [ { name: "Ethereum", module: "@polywrap/ethereum-plugin-js", - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", config: "EthereumPluginConfig", files: [ { @@ -65,7 +65,7 @@ const plugins: PluginConfigSource[] = [ { name: "Ens", module: "@polywrap/ens-plugin-js", - uri: "w3://ens/ens.web3api.eth", + uri: "wrap://ens/ens.web3api.eth", config: "EnsPluginConfig", files: [ { diff --git a/packages/js/client/src/__tests__/core/interface-impls.spec.ts b/packages/js/client/src/__tests__/core/interface-impls.spec.ts index 83e1d76530..abebcf343d 100644 --- a/packages/js/client/src/__tests__/core/interface-impls.spec.ts +++ b/packages/js/client/src/__tests__/core/interface-impls.spec.ts @@ -20,9 +20,9 @@ describe("interface-impls", () => { return client; }; it("should register interface implementations successfully", () => { - const interfaceUri = "w3://ens/some-interface1.eth"; - const implementation1Uri = "w3://ens/some-implementation1.eth"; - const implementation2Uri = "w3://ens/some-implementation2.eth"; + const interfaceUri = "wrap://ens/some-interface1.eth"; + const implementation1Uri = "wrap://ens/some-implementation1.eth"; + const implementation2Uri = "wrap://ens/some-implementation2.eth"; const client = new Web3ApiClient({ interfaces: [ @@ -55,14 +55,14 @@ describe("interface-impls", () => { }); it("should get all implementations of interface", async () => { - const interface1Uri = "w3://ens/some-interface1.eth"; - const interface2Uri = "w3://ens/some-interface2.eth"; - const interface3Uri = "w3://ens/some-interface3.eth"; + const interface1Uri = "wrap://ens/some-interface1.eth"; + const interface2Uri = "wrap://ens/some-interface2.eth"; + const interface3Uri = "wrap://ens/some-interface3.eth"; - const implementation1Uri = "w3://ens/some-implementation.eth"; - const implementation2Uri = "w3://ens/some-implementation2.eth"; - const implementation3Uri = "w3://ens/some-implementation3.eth"; - const implementation4Uri = "w3://ens/some-implementation4.eth"; + const implementation1Uri = "wrap://ens/some-implementation.eth"; + const implementation2Uri = "wrap://ens/some-implementation2.eth"; + const implementation3Uri = "wrap://ens/some-implementation3.eth"; + const implementation4Uri = "wrap://ens/some-implementation4.eth"; const client = await getClient({ redirects: [ @@ -133,11 +133,11 @@ describe("interface-impls", () => { }); it("should not register plugins with an interface uri (without default plugins)", () => { - const interface1Uri = "w3://ens/some-interface1.eth"; - const interface2Uri = "w3://ens/some-interface2.eth"; - const interface3Uri = "w3://ens/some-interface3.eth"; + const interface1Uri = "wrap://ens/some-interface1.eth"; + const interface2Uri = "wrap://ens/some-interface2.eth"; + const interface3Uri = "wrap://ens/some-interface3.eth"; - const implementationUri = "w3://ens/some-implementation.eth"; + const implementationUri = "wrap://ens/some-implementation.eth"; expect(() => { new Web3ApiClient({ @@ -187,9 +187,9 @@ describe("interface-impls", () => { }); it("should not register plugins with an interface uri (with default plugins)", async () => { - const interfaceUri = "w3://ens/some-interface.eth"; + const interfaceUri = "wrap://ens/some-interface.eth"; - const implementationUri = "w3://ens/some-implementation.eth"; + const implementationUri = "wrap://ens/some-implementation.eth"; await expect(async () => { await getClient({ @@ -220,9 +220,9 @@ describe("interface-impls", () => { }); it("should merge user-defined interface implementations with each other", async () => { - const interfaceUri = "w3://ens/interface.eth"; - const implementationUri1 = "w3://ens/implementation1.eth"; - const implementationUri2 = "w3://ens/implementation2.eth"; + const interfaceUri = "wrap://ens/interface.eth"; + const implementationUri1 = "wrap://ens/implementation1.eth"; + const implementationUri2 = "wrap://ens/implementation2.eth"; const client = new Web3ApiClient({ interfaces: [ @@ -252,8 +252,8 @@ describe("interface-impls", () => { it("should merge user-defined interface implementations with defaults", async () => { const interfaceUri = coreInterfaceUris.uriResolver.uri; - const implementationUri1 = "w3://ens/implementation1.eth"; - const implementationUri2 = "w3://ens/implementation2.eth"; + const implementationUri1 = "wrap://ens/implementation1.eth"; + const implementationUri2 = "wrap://ens/implementation2.eth"; const client = new Web3ApiClient({ interfaces: [ @@ -285,10 +285,10 @@ describe("interface-impls", () => { }); test("get implementations - do not return plugins that are not explicitly registered", () => { - const interfaceUri = "w3://ens/some-interface.eth"; + const interfaceUri = "wrap://ens/some-interface.eth"; - const implementation1Uri = "w3://ens/some-implementation1.eth"; - const implementation2Uri = "w3://ens/some-implementation2.eth"; + const implementation1Uri = "wrap://ens/some-implementation1.eth"; + const implementation2Uri = "wrap://ens/some-implementation2.eth"; const client = new Web3ApiClient({ plugins: [ @@ -320,10 +320,10 @@ describe("interface-impls", () => { }); test("get implementations - return implementations for plugins which don't have interface stated in manifest", () => { - const interfaceUri = "w3://ens/some-interface.eth"; + const interfaceUri = "wrap://ens/some-interface.eth"; - const implementation1Uri = "w3://ens/some-implementation1.eth"; - const implementation2Uri = "w3://ens/some-implementation2.eth"; + const implementation1Uri = "wrap://ens/some-implementation1.eth"; + const implementation2Uri = "wrap://ens/some-implementation2.eth"; const client = new Web3ApiClient({ plugins: [ @@ -361,8 +361,8 @@ describe("interface-impls", () => { const oldInterfaceUri = "ens/old.eth"; const newInterfaceUri = "ens/new.eth"; - const implementation1Uri = "w3://ens/some-implementation1.eth"; - const implementation2Uri = "w3://ens/some-implementation2.eth"; + const implementation1Uri = "wrap://ens/some-implementation1.eth"; + const implementation2Uri = "wrap://ens/some-implementation2.eth"; const client = new Web3ApiClient({ redirects: [ diff --git a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts index 4db62ff3ab..b27a1fc921 100644 --- a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts @@ -8,15 +8,15 @@ import { jest.setTimeout(200000); const defaultPlugins = [ - "w3://ens/ipfs.web3api.eth", - "w3://ens/ens.web3api.eth", - "w3://ens/ethereum.web3api.eth", - "w3://ens/http.web3api.eth", - "w3://ens/js-logger.web3api.eth", - "w3://ens/uts46.web3api.eth", - "w3://ens/sha3.web3api.eth", - "w3://ens/graph-node.web3api.eth", - "w3://ens/fs.web3api.eth", + "wrap://ens/ipfs.web3api.eth", + "wrap://ens/ens.web3api.eth", + "wrap://ens/ethereum.web3api.eth", + "wrap://ens/http.web3api.eth", + "wrap://ens/js-logger.web3api.eth", + "wrap://ens/uts46.web3api.eth", + "wrap://ens/sha3.web3api.eth", + "wrap://ens/graph-node.web3api.eth", + "wrap://ens/fs.web3api.eth", ]; describe("plugin-wrapper", () => { @@ -60,7 +60,7 @@ describe("plugin-wrapper", () => { }; test("plugin registration - with default plugins", () => { - const implementationUri = "w3://ens/some-implementation.eth"; + const implementationUri = "wrap://ens/some-implementation.eth"; const client = new Web3ApiClient({ plugins: [ @@ -85,7 +85,7 @@ describe("plugin-wrapper", () => { test("getSchema -- plugin schema", async () => { const client = await getClient(); const schema: string = await client.getSchema( - "w3://ens/js-logger.web3api.eth" + "wrap://ens/js-logger.web3api.eth" ); expect(schema).toStrictEqual( @@ -172,7 +172,7 @@ enum Logger_LogLevel @imported( }); it("plugin map types", async () => { - const implementationUri = "w3://ens/some-implementation.eth"; + const implementationUri = "wrap://ens/some-implementation.eth"; const mockPlugin = mockMapPlugin(); const client = await getClient({ plugins: [ diff --git a/packages/js/client/src/__tests__/core/resolveUri.spec.ts b/packages/js/client/src/__tests__/core/resolveUri.spec.ts index 180b6a913a..ee24acf231 100644 --- a/packages/js/client/src/__tests__/core/resolveUri.spec.ts +++ b/packages/js/client/src/__tests__/core/resolveUri.spec.ts @@ -298,7 +298,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: false, - implementationUri: new Uri("w3://ens/ens.web3api.eth"), + implementationUri: new Uri("wrap://ens/ens.web3api.eth"), }, }, { @@ -331,7 +331,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: true, - implementationUri: new Uri("w3://ens/ipfs.web3api.eth"), + implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), }, }, ]); @@ -395,7 +395,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: true, - implementationUri: new Uri("w3://ens/ipfs.web3api.eth"), + implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), }, }, ]); @@ -442,7 +442,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: false, - implementationUri: new Uri("w3://ens/ens.web3api.eth"), + implementationUri: new Uri("wrap://ens/ens.web3api.eth"), }, }, { @@ -522,7 +522,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: true, - implementationUri: new Uri("w3://ens/ipfs.web3api.eth"), + implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), }, }, ]); @@ -561,7 +561,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: false, - implementationUri: new Uri("w3://ens/ens.web3api.eth"), + implementationUri: new Uri("wrap://ens/ens.web3api.eth"), }, }, { @@ -586,7 +586,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: true, - implementationUri: new Uri("w3://ens/ipfs.web3api.eth"), + implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), }, }, ]); @@ -650,7 +650,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: true, - implementationUri: new Uri("w3://ens/ipfs.web3api.eth"), + implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), }, }, ]); @@ -697,7 +697,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: false, - implementationUri: new Uri("w3://ens/ens.web3api.eth"), + implementationUri: new Uri("wrap://ens/ens.web3api.eth"), }, }, { @@ -730,7 +730,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: true, - implementationUri: new Uri("w3://ens/ipfs.web3api.eth"), + implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), }, }, ]); @@ -803,7 +803,7 @@ describe("resolveUri", () => { result: { uri: ipfsUri, api: false, - implementationUri: new Uri("w3://ens/ens.web3api.eth"), + implementationUri: new Uri("wrap://ens/ens.web3api.eth"), }, }, { @@ -1008,7 +1008,7 @@ describe("resolveUri", () => { expect(error.type).toEqual(ResolveUriErrorType.InternalResolver); expect(error.error?.message).toEqual( - "Could not load the following URI Resolver implementations: w3://ens/test-resolver.eth" + "Could not load the following URI Resolver implementations: wrap://ens/test-resolver.eth" ); }); @@ -1024,7 +1024,7 @@ describe("resolveUri", () => { const { success, failedUriResolvers } = await client.loadUriResolvers(); expect(success).toBeFalsy(); - expect(failedUriResolvers).toEqual(["w3://ens/test-resolver.eth"]); + expect(failedUriResolvers).toEqual(["wrap://ens/test-resolver.eth"]); const { error } = await client.resolveUri("ens/test.eth"); expect(error).toBeTruthy(); @@ -1035,7 +1035,7 @@ describe("resolveUri", () => { expect(error.type).toEqual(ResolveUriErrorType.InternalResolver); expect(error.error?.message).toEqual( - "Could not load the following URI Resolver implementations: w3://ens/test-resolver.eth" + "Could not load the following URI Resolver implementations: wrap://ens/test-resolver.eth" ); }); @@ -1051,6 +1051,6 @@ describe("resolveUri", () => { expect(error).toBeFalsy(); expect(api).toBeFalsy(); - expect(uri?.uri).toEqual("w3://ens/test.eth"); + expect(uri?.uri).toEqual("wrap://ens/test.eth"); }); }); diff --git a/packages/js/client/src/__tests__/core/sanity.spec.ts b/packages/js/client/src/__tests__/core/sanity.spec.ts index 158cd1c542..04b47c1786 100644 --- a/packages/js/client/src/__tests__/core/sanity.spec.ts +++ b/packages/js/client/src/__tests__/core/sanity.spec.ts @@ -15,28 +15,28 @@ describe("sanity", () => { expect(client.getRedirects()).toStrictEqual([]); expect(client.getPlugins().map((x) => x.uri)).toStrictEqual([ - new Uri("w3://ens/ipfs.web3api.eth"), - new Uri("w3://ens/ens.web3api.eth"), - new Uri("w3://ens/ethereum.web3api.eth"), - new Uri("w3://ens/http.web3api.eth"), - new Uri("w3://ens/js-logger.web3api.eth"), - new Uri("w3://ens/uts46.web3api.eth"), - new Uri("w3://ens/sha3.web3api.eth"), - new Uri("w3://ens/graph-node.web3api.eth"), - new Uri("w3://ens/fs.web3api.eth"), + new Uri("wrap://ens/ipfs.web3api.eth"), + new Uri("wrap://ens/ens.web3api.eth"), + new Uri("wrap://ens/ethereum.web3api.eth"), + new Uri("wrap://ens/http.web3api.eth"), + new Uri("wrap://ens/js-logger.web3api.eth"), + new Uri("wrap://ens/uts46.web3api.eth"), + new Uri("wrap://ens/sha3.web3api.eth"), + new Uri("wrap://ens/graph-node.web3api.eth"), + new Uri("wrap://ens/fs.web3api.eth"), ]); expect(client.getInterfaces()).toStrictEqual([ { interface: coreInterfaceUris.uriResolver, implementations: [ - new Uri("w3://ens/ipfs.web3api.eth"), - new Uri("w3://ens/ens.web3api.eth"), - new Uri("w3://ens/fs.web3api.eth"), + new Uri("wrap://ens/ipfs.web3api.eth"), + new Uri("wrap://ens/ens.web3api.eth"), + new Uri("wrap://ens/fs.web3api.eth"), ], }, { interface: coreInterfaceUris.logger, - implementations: [new Uri("w3://ens/js-logger.web3api.eth")], + implementations: [new Uri("wrap://ens/js-logger.web3api.eth")], }, ]); }); @@ -56,8 +56,8 @@ describe("sanity", () => { }); test("redirect registration", () => { - const implementation1Uri = "w3://ens/some-implementation1.eth"; - const implementation2Uri = "w3://ens/some-implementation2.eth"; + const implementation1Uri = "wrap://ens/some-implementation1.eth"; + const implementation2Uri = "wrap://ens/some-implementation2.eth"; const client = new Web3ApiClient({ redirects: [ @@ -79,7 +79,7 @@ describe("sanity", () => { }); test("loadWeb3Api - pass string or Uri", async () => { - const implementationUri = "w3://ens/some-implementation.eth"; + const implementationUri = "wrap://ens/some-implementation.eth"; const schemaStr = "test-schema"; const client = new Web3ApiClient({ diff --git a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts index 2b731ecd9f..baa55d0b3c 100644 --- a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts @@ -126,7 +126,7 @@ describe("wasm-wrapper", () => { const client = await getClient({ plugins: [ { - uri: "w3://ens/mock.web3api.eth", + uri: "wrap://ens/mock.web3api.eth", plugin: mockPlugin(), }, ], @@ -135,7 +135,7 @@ describe("wasm-wrapper", () => { const redirects = [ { from: apiUri, - to: "w3://ens/mock.web3api.eth", + to: "wrap://ens/mock.web3api.eth", }, ]; @@ -156,7 +156,7 @@ describe("wasm-wrapper", () => { const client = await getClient({ plugins: [ { - uri: "w3://ens/mock.web3api.eth", + uri: "wrap://ens/mock.web3api.eth", plugin: mockPlugin(), }, ], @@ -165,7 +165,7 @@ describe("wasm-wrapper", () => { const redirects = [ { from: apiUri, - to: "w3://ens/mock.web3api.eth", + to: "wrap://ens/mock.web3api.eth", }, ]; @@ -303,14 +303,14 @@ describe("wasm-wrapper", () => { `); await expect(() => - client.getManifest(new Uri("w3://ens/ipfs.web3api.eth"), { + client.getManifest(new Uri("wrap://ens/ipfs.web3api.eth"), { type: "web3api", }) ).rejects.toThrow( "client.getManifest(...) is not implemented for Plugins." ); await expect(() => - client.getFile(new Uri("w3://ens/ipfs.web3api.eth"), { + client.getFile(new Uri("wrap://ens/ipfs.web3api.eth"), { path: "./index.js", }) ).rejects.toThrow("client.getFile(...) is not implemented for Plugins."); diff --git a/packages/js/client/src/__tests__/e2e/env.spec.ts b/packages/js/client/src/__tests__/e2e/env.spec.ts index 1c6dc603d0..cf6d983d8a 100644 --- a/packages/js/client/src/__tests__/e2e/env.spec.ts +++ b/packages/js/client/src/__tests__/e2e/env.spec.ts @@ -355,7 +355,7 @@ describe("env", () => { }); test("plugin env types", async () => { - const implementationUri = "w3://ens/some-implementation.eth"; + const implementationUri = "wrap://ens/some-implementation.eth"; const envPlugin = mockEnvPlugin(); const client = await getClient({ plugins: [ diff --git a/packages/js/client/src/__tests__/e2e/test-cases.ts b/packages/js/client/src/__tests__/e2e/test-cases.ts index d7e7078195..0c0a047e91 100644 --- a/packages/js/client/src/__tests__/e2e/test-cases.ts +++ b/packages/js/client/src/__tests__/e2e/test-cases.ts @@ -402,7 +402,7 @@ export const runEnumTypesTest = async ( expect(method1a.errors).toBeTruthy(); expect((method1a.errors as Error[])[0].message).toMatch( - /__w3_abort: Invalid value for enum 'SanityEnum': 5/gm + /__wrap_abort: Invalid value for enum 'SanityEnum': 5/gm ); const method1b = await client.query({ @@ -438,7 +438,7 @@ export const runEnumTypesTest = async ( expect(method1c.errors).toBeTruthy(); // @ts-ignore expect(method1c.errors[0].message).toMatch( - /__w3_abort: Invalid key for enum 'SanityEnum': INVALID/gm + /__wrap_abort: Invalid key for enum 'SanityEnum': INVALID/gm ); const method2a = await client.query({ diff --git a/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts b/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts index c95f1549d0..c9eaecc9af 100644 --- a/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts +++ b/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts @@ -155,7 +155,7 @@ describe("wasm-as test cases", () => { const interfaceUri = `fs/${interfacePath}/build`; const implementationPath = `${GetPathToTestApis()}/wasm-as/implementations/test-api` - const implementationUri = `w3://fs/${implementationPath}/build` + const implementationUri = `wrap://fs/${implementationPath}/build` await buildApi(interfacePath); await buildApi(implementationPath); @@ -175,10 +175,10 @@ describe("wasm-as test cases", () => { }); it("implementations - getImplementations", async () => { - const interfaceUri = "w3://ens/interface.eth" + const interfaceUri = "wrap://ens/interface.eth" const implementationPath = `${GetPathToTestApis()}/wasm-as/implementations/test-use-getImpl` - const implementationUri = `w3://fs/${implementationPath}/build`; + const implementationUri = `wrap://fs/${implementationPath}/build`; await buildApi(implementationPath); @@ -197,7 +197,7 @@ describe("wasm-as test cases", () => { }); it("e2e Interface invoke method", async () => { - const interfaceUri = "w3://ens/interface.eth"; + const interfaceUri = "wrap://ens/interface.eth"; const implementationPath = `${GetPathToTestApis()}/wasm-as/interface-invoke/test-implementation` const implementationUri = `fs/${implementationPath}/build`; diff --git a/packages/js/client/src/__tests__/e2e/wasm-rs.ts b/packages/js/client/src/__tests__/e2e/wasm-rs.ts index eada39b1d8..e652cdedb3 100644 --- a/packages/js/client/src/__tests__/e2e/wasm-rs.ts +++ b/packages/js/client/src/__tests__/e2e/wasm-rs.ts @@ -152,7 +152,7 @@ describe("wasm-rs test cases", () => { }); it("implementations - getImplementations", async () => { - const interfaceUri = "w3://ens/interface.eth" + const interfaceUri = "wrap://ens/interface.eth" const implementationPath = `${GetPathToTestApis()}/wasm-rs/implementations/test-use-getImpl` diff --git a/packages/js/client/src/default-client-config.ts b/packages/js/client/src/default-client-config.ts index edfde42d24..d93f474ccb 100644 --- a/packages/js/client/src/default-client-config.ts +++ b/packages/js/client/src/default-client-config.ts @@ -32,7 +32,7 @@ export const getDefaultClientConfig = Tracer.traceFunc( plugins: [ // IPFS is required for downloading Web3API packages { - uri: new Uri("w3://ens/ipfs.web3api.eth"), + uri: new Uri("wrap://ens/ipfs.web3api.eth"), plugin: ipfsPlugin({ provider: defaultIpfsProviders[0], fallbackProviders: defaultIpfsProviders.slice(1), @@ -40,11 +40,11 @@ export const getDefaultClientConfig = Tracer.traceFunc( }, // ENS is required for resolving domain to IPFS hashes { - uri: new Uri("w3://ens/ens.web3api.eth"), + uri: new Uri("wrap://ens/ens.web3api.eth"), plugin: ensPlugin({}), }, { - uri: new Uri("w3://ens/ethereum.web3api.eth"), + uri: new Uri("wrap://ens/ethereum.web3api.eth"), plugin: ethereumPlugin({ networks: { mainnet: { @@ -55,29 +55,29 @@ export const getDefaultClientConfig = Tracer.traceFunc( }), }, { - uri: new Uri("w3://ens/http.web3api.eth"), + uri: new Uri("wrap://ens/http.web3api.eth"), plugin: httpPlugin({}), }, { - uri: new Uri("w3://ens/js-logger.web3api.eth"), + uri: new Uri("wrap://ens/js-logger.web3api.eth"), plugin: loggerPlugin({}), }, { - uri: new Uri("w3://ens/uts46.web3api.eth"), + uri: new Uri("wrap://ens/uts46.web3api.eth"), plugin: uts46Plugin({}), }, { - uri: new Uri("w3://ens/sha3.web3api.eth"), + uri: new Uri("wrap://ens/sha3.web3api.eth"), plugin: sha3Plugin({}), }, { - uri: new Uri("w3://ens/graph-node.web3api.eth"), + uri: new Uri("wrap://ens/graph-node.web3api.eth"), plugin: graphNodePlugin({ provider: "https://api.thegraph.com", }), }, { - uri: new Uri("w3://ens/fs.web3api.eth"), + uri: new Uri("wrap://ens/fs.web3api.eth"), plugin: filesystemPlugin({}), }, ], @@ -85,14 +85,14 @@ export const getDefaultClientConfig = Tracer.traceFunc( { interface: coreInterfaceUris.uriResolver, implementations: [ - new Uri("w3://ens/ipfs.web3api.eth"), - new Uri("w3://ens/ens.web3api.eth"), - new Uri("w3://ens/fs.web3api.eth"), + new Uri("wrap://ens/ipfs.web3api.eth"), + new Uri("wrap://ens/ens.web3api.eth"), + new Uri("wrap://ens/fs.web3api.eth"), ], }, { interface: coreInterfaceUris.logger, - implementations: [new Uri("w3://ens/js-logger.web3api.eth")], + implementations: [new Uri("wrap://ens/js-logger.web3api.eth")], }, ], uriResolvers: [ diff --git a/packages/js/client/src/plugin/PluginWeb3Api.ts b/packages/js/client/src/plugin/PluginWeb3Api.ts index f1a4a9294e..82a1cec682 100644 --- a/packages/js/client/src/plugin/PluginWeb3Api.ts +++ b/packages/js/client/src/plugin/PluginWeb3Api.ts @@ -98,7 +98,7 @@ export class PluginWeb3Api extends Api { // Invoke the function try { - const result = (await module._w3_invoke( + const result = (await module._wrap_invoke( method, jsInput, client @@ -166,13 +166,13 @@ export class PluginWeb3Api extends Api { ): Promise { if (this._sanitizedEnv === undefined) { const clientEnv = this._getClientEnv(); - this._sanitizedEnv = await pluginModule._w3_sanitize_env( + this._sanitizedEnv = await pluginModule._wrap_sanitize_env( clientEnv, client ); } - pluginModule._w3_load_env(this._sanitizedEnv || {}); + pluginModule._wrap_load_env(this._sanitizedEnv || {}); } @Tracer.traceMethod("PluginWeb3Api: _getClientEnv") diff --git a/packages/js/client/src/pluginConfigs/index.ts b/packages/js/client/src/pluginConfigs/index.ts index d8bdb1096a..3b233fe759 100644 --- a/packages/js/client/src/pluginConfigs/index.ts +++ b/packages/js/client/src/pluginConfigs/index.ts @@ -19,9 +19,9 @@ const modules: Record = { }; const uris: Record = { - ipfs: "w3://ens/ipfs.web3api.eth", - ethereum: "w3://ens/ethereum.web3api.eth", - ens: "w3://ens/ens.web3api.eth", + ipfs: "wrap://ens/ipfs.web3api.eth", + ethereum: "wrap://ens/ethereum.web3api.eth", + ens: "wrap://ens/ens.web3api.eth", }; export { PluginConfigs, modules, uris }; diff --git a/packages/js/client/src/wasm/WasmWeb3Api.ts b/packages/js/client/src/wasm/WasmWeb3Api.ts index efd6af7e27..8c5e37bbe1 100644 --- a/packages/js/client/src/wasm/WasmWeb3Api.ts +++ b/packages/js/client/src/wasm/WasmWeb3Api.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { W3Exports } from "./types"; +import { WrapExports } from "./types"; import { createImports } from "./imports"; import { @@ -64,7 +64,7 @@ export interface State { } export class WasmWeb3Api extends Api { - public static requiredExports: readonly string[] = ["_w3_invoke"]; + public static requiredExports: readonly string[] = ["_wrap_invoke"]; private _schema?: string; private _wasm: ArrayBuffer | undefined = undefined; @@ -216,11 +216,11 @@ export class WasmWeb3Api extends Api { requiredExports: WasmWeb3Api.requiredExports, }); - const exports = instance.exports as W3Exports; + const exports = instance.exports as WrapExports; await this._sanitizeAndLoadEnv(state, exports); - const result = await exports._w3_invoke( + const result = await exports._wrap_invoke( state.method.length, state.args.byteLength ); @@ -314,18 +314,18 @@ export class WasmWeb3Api extends Api { @Tracer.traceMethod("WasmWeb3Api: _sanitizeAndLoadEnv") private async _sanitizeAndLoadEnv( state: State, - exports: W3Exports + exports: WrapExports ): Promise { - if (hasExport("_w3_load_env", exports)) { + if (hasExport("_wrap_load_env", exports)) { if (this._sanitizedEnv !== undefined) { state.env = this._sanitizedEnv as ArrayBuffer; } else { const clientEnv = this._getClientEnv(); - if (hasExport("_w3_sanitize_env", exports)) { + if (hasExport("_wrap_sanitize_env", exports)) { state.sanitizeEnv.args = msgpackEncode({ env: clientEnv }); - await exports._w3_sanitize_env(state.sanitizeEnv.args.byteLength); + await exports._wrap_sanitize_env(state.sanitizeEnv.args.byteLength); state.env = state.sanitizeEnv.result as ArrayBuffer; this._sanitizedEnv = state.env; } else { @@ -334,7 +334,7 @@ export class WasmWeb3Api extends Api { } } - await exports._w3_load_env(state.env.byteLength); + await exports._wrap_load_env(state.env.byteLength); } } diff --git a/packages/js/client/src/wasm/imports.ts b/packages/js/client/src/wasm/imports.ts index 453a35eb9e..727faf47c1 100644 --- a/packages/js/client/src/wasm/imports.ts +++ b/packages/js/client/src/wasm/imports.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { u32, W3Imports } from "./types"; +import { u32, WrapImports } from "./types"; import { readBytes, readString, writeBytes, writeString } from "./buffer"; import { Client } from ".."; import { State } from "./WasmWeb3Api"; @@ -12,12 +12,12 @@ export const createImports = (config: { memory: WebAssembly.Memory; state: State; abort: (message: string) => never; -}): W3Imports => { +}): WrapImports => { const { memory, state, client, abort } = config; return { - w3: { - __w3_subinvoke: async ( + wrap: { + __wrap_subinvoke: async ( uriPtr: u32, uriLen: u32, methodPtr: u32, @@ -56,38 +56,38 @@ export const createImports = (config: { return !error; }, // Give WASM the size of the result - __w3_subinvoke_result_len: (): u32 => { + __wrap_subinvoke_result_len: (): u32 => { if (!state.subinvoke.result) { - abort("__w3_subinvoke_result_len: subinvoke.result is not set"); + abort("__wrap_subinvoke_result_len: subinvoke.result is not set"); return 0; } return state.subinvoke.result.byteLength; }, // Copy the subinvoke result into WASM - __w3_subinvoke_result: (ptr: u32): void => { + __wrap_subinvoke_result: (ptr: u32): void => { if (!state.subinvoke.result) { - abort("__w3_subinvoke_result: subinvoke.result is not set"); + abort("__wrap_subinvoke_result: subinvoke.result is not set"); return; } writeBytes(state.subinvoke.result, memory.buffer, ptr); }, // Give WASM the size of the error - __w3_subinvoke_error_len: (): u32 => { + __wrap_subinvoke_error_len: (): u32 => { if (!state.subinvoke.error) { - abort("__w3_subinvoke_error_len: subinvoke.error is not set"); + abort("__wrap_subinvoke_error_len: subinvoke.error is not set"); return 0; } return state.subinvoke.error.length; }, // Copy the subinvoke error into WASM - __w3_subinvoke_error: (ptr: u32): void => { + __wrap_subinvoke_error: (ptr: u32): void => { if (!state.subinvoke.error) { - abort("__w3_subinvoke_error: subinvoke.error is not set"); + abort("__wrap_subinvoke_error: subinvoke.error is not set"); return; } writeString(state.subinvoke.error, memory.buffer, ptr); }, - __w3_subinvokeImplementation: async ( + __wrap_subinvokeImplementation: async ( interfaceUriPtr: u32, interfaceUriLen: u32, implUriPtr: u32, @@ -128,100 +128,100 @@ export const createImports = (config: { return !error; }, - __w3_subinvokeImplementation_result_len: (): u32 => { + __wrap_subinvokeImplementation_result_len: (): u32 => { if (!state.subinvokeImplementation.result) { abort( - "__w3_subinvokeImplementation_result_len: subinvokeImplementation.result is not set" + "__wrap_subinvokeImplementation_result_len: subinvokeImplementation.result is not set" ); return 0; } return state.subinvokeImplementation.result.byteLength; }, - __w3_subinvokeImplementation_result: (ptr: u32): void => { + __wrap_subinvokeImplementation_result: (ptr: u32): void => { if (!state.subinvokeImplementation.result) { abort( - "__w3_subinvokeImplementation_result: subinvokeImplementation.result is not set" + "__wrap_subinvokeImplementation_result: subinvokeImplementation.result is not set" ); return; } writeBytes(state.subinvokeImplementation.result, memory.buffer, ptr); }, - __w3_subinvokeImplementation_error_len: (): u32 => { + __wrap_subinvokeImplementation_error_len: (): u32 => { if (!state.subinvokeImplementation.error) { abort( - "__w3_subinvokeImplementation_error_len: subinvokeImplementation.error is not set" + "__wrap_subinvokeImplementation_error_len: subinvokeImplementation.error is not set" ); return 0; } return state.subinvokeImplementation.error.length; }, - __w3_subinvokeImplementation_error: (ptr: u32): void => { + __wrap_subinvokeImplementation_error: (ptr: u32): void => { if (!state.subinvokeImplementation.error) { abort( - "__w3_subinvokeImplementation_error: subinvokeImplementation.error is not set" + "__wrap_subinvokeImplementation_error: subinvokeImplementation.error is not set" ); return; } writeString(state.subinvokeImplementation.error, memory.buffer, ptr); }, // Copy the invocation's method & args into WASM - __w3_invoke_args: (methodPtr: u32, argsPtr: u32): void => { + __wrap_invoke_args: (methodPtr: u32, argsPtr: u32): void => { if (!state.method) { - abort("__w3_invoke_args: method is not set"); + abort("__wrap_invoke_args: method is not set"); return; } if (!state.args) { - abort("__w3_invoke_args: args is not set"); + abort("__wrap_invoke_args: args is not set"); return; } writeString(state.method, memory.buffer, methodPtr); writeBytes(state.args, memory.buffer, argsPtr); }, // Store the invocation's result - __w3_invoke_result: (ptr: u32, len: u32): void => { + __wrap_invoke_result: (ptr: u32, len: u32): void => { state.invoke.result = readBytes(memory.buffer, ptr, len); }, // Store the invocation's error - __w3_invoke_error: (ptr: u32, len: u32): void => { + __wrap_invoke_error: (ptr: u32, len: u32): void => { state.invoke.error = readString(memory.buffer, ptr, len); }, - __w3_getImplementations: (uriPtr: u32, uriLen: u32): boolean => { + __wrap_getImplementations: (uriPtr: u32, uriLen: u32): boolean => { const uri = readString(memory.buffer, uriPtr, uriLen); const result = client.getImplementations(uri, {}); state.getImplementationsResult = msgpackEncode(result); return result.length > 0; }, - __w3_getImplementations_result_len: (): u32 => { + __wrap_getImplementations_result_len: (): u32 => { if (!state.getImplementationsResult) { - abort("__w3_getImplementations_result_len: result is not set"); + abort("__wrap_getImplementations_result_len: result is not set"); return 0; } return state.getImplementationsResult.byteLength; }, - __w3_getImplementations_result: (ptr: u32): void => { + __wrap_getImplementations_result: (ptr: u32): void => { if (!state.getImplementationsResult) { - abort("__w3_getImplementations_result: result is not set"); + abort("__wrap_getImplementations_result: result is not set"); return; } writeBytes(state.getImplementationsResult, memory.buffer, ptr); }, - __w3_load_env: (ptr: u32): void => { + __wrap_load_env: (ptr: u32): void => { if (state.env) { writeBytes(state.env, memory.buffer, ptr); } }, - __w3_sanitize_env_args: (ptr: u32): void => { + __wrap_sanitize_env_args: (ptr: u32): void => { if (!state.sanitizeEnv.args) { - abort("__w3_sanitize_env: args is not set"); + abort("__wrap_sanitize_env: args is not set"); return; } writeBytes(state.sanitizeEnv.args, memory.buffer, ptr); }, - __w3_sanitize_env_result: (ptr: u32, len: u32): void => { + __wrap_sanitize_env_result: (ptr: u32, len: u32): void => { state.sanitizeEnv.result = readBytes(memory.buffer, ptr, len); }, - __w3_abort: ( + __wrap_abort: ( msgPtr: u32, msgLen: u32, filePtr: u32, @@ -233,12 +233,12 @@ export const createImports = (config: { const file = readString(memory.buffer, filePtr, fileLen); abort( - `__w3_abort: ${msg}\nFile: ${file}\nLocation: [${line},${column}]` + `__wrap_abort: ${msg}\nFile: ${file}\nLocation: [${line},${column}]` ); }, - __w3_debug_log: (ptr: u32, len: u32): void => { + __wrap_debug_log: (ptr: u32, len: u32): void => { const msg = readString(memory.buffer, ptr, len); - console.debug(`__w3_debug_log: ${msg}`); + console.debug(`__wrap_debug_log: ${msg}`); }, }, env: { diff --git a/packages/js/client/src/wasm/types.ts b/packages/js/client/src/wasm/types.ts index f6489ea373..ad86c9c91f 100644 --- a/packages/js/client/src/wasm/types.ts +++ b/packages/js/client/src/wasm/types.ts @@ -3,15 +3,15 @@ export type u32 = number; -export interface W3Exports extends WebAssembly.Exports { - _w3_invoke: (nameLen: u32, argsLen: u32) => boolean; - _w3_load_env: (envLen: u32) => void; - _w3_sanitize_env: (argsLen: u32) => void; +export interface WrapExports extends WebAssembly.Exports { + _wrap_invoke: (nameLen: u32, argsLen: u32) => boolean; + _wrap_load_env: (envLen: u32) => void; + _wrap_sanitize_env: (argsLen: u32) => void; } -export interface W3Imports extends WebAssembly.Imports { - w3: { - __w3_subinvoke: ( +export interface WrapImports extends WebAssembly.Imports { + wrap: { + __wrap_subinvoke: ( uriPtr: u32, uriLen: u32, methodPtr: u32, @@ -19,11 +19,11 @@ export interface W3Imports extends WebAssembly.Imports { inputPtr: u32, inputLen: u32 ) => Promise; - __w3_subinvoke_result_len: () => u32; - __w3_subinvoke_result: (ptr: u32) => void; - __w3_subinvoke_error_len: () => u32; - __w3_subinvoke_error: (ptr: u32) => void; - __w3_subinvokeImplementation: ( + __wrap_subinvoke_result_len: () => u32; + __wrap_subinvoke_result: (ptr: u32) => void; + __wrap_subinvoke_error_len: () => u32; + __wrap_subinvoke_error: (ptr: u32) => void; + __wrap_subinvokeImplementation: ( interfaceUriPtr: u32, interfaceUriLen: u32, implUriPtr: u32, @@ -33,17 +33,17 @@ export interface W3Imports extends WebAssembly.Imports { inputPtr: u32, inputLen: u32 ) => Promise; - __w3_subinvokeImplementation_result_len: () => u32; - __w3_subinvokeImplementation_result: (ptr: u32) => void; - __w3_subinvokeImplementation_error_len: () => u32; - __w3_subinvokeImplementation_error: (ptr: u32) => void; - __w3_invoke_args: (methodPtr: u32, argsPtr: u32) => void; - __w3_invoke_result: (ptr: u32, len: u32) => void; - __w3_invoke_error: (ptr: u32, len: u32) => void; - __w3_getImplementations: (uriPtr: u32, uriLen: u32) => boolean; - __w3_getImplementations_result_len: () => u32; - __w3_getImplementations_result: (ptr: u32) => void; - __w3_abort: ( + __wrap_subinvokeImplementation_result_len: () => u32; + __wrap_subinvokeImplementation_result: (ptr: u32) => void; + __wrap_subinvokeImplementation_error_len: () => u32; + __wrap_subinvokeImplementation_error: (ptr: u32) => void; + __wrap_invoke_args: (methodPtr: u32, argsPtr: u32) => void; + __wrap_invoke_result: (ptr: u32, len: u32) => void; + __wrap_invoke_error: (ptr: u32, len: u32) => void; + __wrap_getImplementations: (uriPtr: u32, uriLen: u32) => boolean; + __wrap_getImplementations_result_len: () => u32; + __wrap_getImplementations_result: (ptr: u32) => void; + __wrap_abort: ( msgPtr: u32, msgLen: u32, filePtr: u32, @@ -51,10 +51,10 @@ export interface W3Imports extends WebAssembly.Imports { line: u32, column: u32 ) => void; - __w3_debug_log: (ptr: u32, len: u32) => void; - __w3_load_env: (ptr: u32) => void; - __w3_sanitize_env_args: (ptr: u32) => void; - __w3_sanitize_env_result: (ptr: u32, len: u32) => void; + __wrap_debug_log: (ptr: u32, len: u32) => void; + __wrap_load_env: (ptr: u32) => void; + __wrap_sanitize_env_args: (ptr: u32) => void; + __wrap_sanitize_env_result: (ptr: u32, len: u32) => void; }; env: { memory: WebAssembly.Memory; diff --git a/packages/js/core/src/__tests__/InterfaceImplementations.spec.ts b/packages/js/core/src/__tests__/InterfaceImplementations.spec.ts index 0b4bd442b0..283365e762 100644 --- a/packages/js/core/src/__tests__/InterfaceImplementations.spec.ts +++ b/packages/js/core/src/__tests__/InterfaceImplementations.spec.ts @@ -11,15 +11,15 @@ describe("sanitizeInterfaceImplementations", () => { it("Returns interfaces from interfaces definitions", () => { const interfaces = sanitizeInterfaceImplementations([ { - interface: "w3://w3/interface", - implementations: ["w3://w3/api1", "w3://w3/api2"] + interface: "wrap://polywrap/interface", + implementations: ["wrap://polywrap/api1", "wrap://polywrap/api2"] } ]); expect(interfaces).toEqual([ { - interface: new Uri("w3://w3/interface"), - implementations: [new Uri("w3://w3/api1"), new Uri("w3://w3/api2")] + interface: new Uri("wrap://polywrap/interface"), + implementations: [new Uri("wrap://polywrap/api1"), new Uri("wrap://polywrap/api2")] } ]); }); diff --git a/packages/js/core/src/__tests__/PluginRegistrations.spec.ts b/packages/js/core/src/__tests__/PluginRegistrations.spec.ts index fbce4568f5..3d02843967 100644 --- a/packages/js/core/src/__tests__/PluginRegistrations.spec.ts +++ b/packages/js/core/src/__tests__/PluginRegistrations.spec.ts @@ -11,14 +11,14 @@ describe("sanitizePluginRegistrations", () => { it("Returns plugins from plugins definitions", () => { const plugins = sanitizePluginRegistrations([ { - uri: "w3://w3/api", + uri: "wrap://polywrap/api", plugin: {} as PluginPackage, } ]); expect(plugins).toEqual([ { - uri: new Uri("w3://w3/api"), + uri: new Uri("wrap://polywrap/api"), plugin: {} as PluginPackage } ]); diff --git a/packages/js/core/src/__tests__/Uri.spec.ts b/packages/js/core/src/__tests__/Uri.spec.ts index adb17ad76b..f38bfa7f1e 100644 --- a/packages/js/core/src/__tests__/Uri.spec.ts +++ b/packages/js/core/src/__tests__/Uri.spec.ts @@ -2,10 +2,10 @@ import { Uri } from "../"; import { UriConfig } from "../types/Uri"; describe("Uri", () => { - it("Inserts a w3:// scheme when one is not present", () => { + it("Inserts a wrap:// scheme when one is not present", () => { const uri = new Uri("/authority-v2/path.to.thing.root/sub/path"); - expect(uri.uri).toEqual("w3://authority-v2/path.to.thing.root/sub/path"); + expect(uri.uri).toEqual("wrap://authority-v2/path.to.thing.root/sub/path"); expect(uri.authority).toEqual("authority-v2"); expect(uri.path).toEqual("path.to.thing.root/sub/path"); }); @@ -15,16 +15,16 @@ describe("Uri", () => { }); it("Fails if an authority is not present", () => { - expect(() => new Uri("w3://path")).toThrowError(/URI is malformed,/); + expect(() => new Uri("wrap://path")).toThrowError(/URI is malformed,/); }); it("Fails if a path is not present", () => { - expect(() => new Uri("w3://authority/")).toThrowError(/URI is malformed,/); + expect(() => new Uri("wrap://authority/")).toThrowError(/URI is malformed,/); }); it("Fails if scheme is not at the beginning", () => { - expect(() => new Uri("path/w3://something")).toThrowError( - /The w3:\/\/ scheme must/ + expect(() => new Uri("path/wrap://something")).toThrowError( + /The wrap:\/\/ scheme must/ ); }); @@ -33,19 +33,19 @@ describe("Uri", () => { }); it("Returns true if URI is valid", () => { - expect(Uri.isValidUri("w3://valid/uri")).toBeTruthy(); + expect(Uri.isValidUri("wrap://valid/uri")).toBeTruthy(); }); it("Returns false if URI is invalid", () => { - expect(Uri.isValidUri("w3://.....")).toBeFalsy(); + expect(Uri.isValidUri("wrap://.....")).toBeFalsy(); }); it("Returns a parsed URI configuration from isValidUri", () => { const config: UriConfig = {} as UriConfig; - expect(Uri.isValidUri("w3://valid/uri", config)).toBeTruthy(); + expect(Uri.isValidUri("wrap://valid/uri", config)).toBeTruthy(); expect(config).toMatchObject({ - uri: "w3://valid/uri", + uri: "wrap://valid/uri", authority: "valid", path: "uri", }); diff --git a/packages/js/core/src/__tests__/UriRedirect.spec.ts b/packages/js/core/src/__tests__/UriRedirect.spec.ts index 70651123e8..d186fa49ad 100644 --- a/packages/js/core/src/__tests__/UriRedirect.spec.ts +++ b/packages/js/core/src/__tests__/UriRedirect.spec.ts @@ -11,15 +11,15 @@ describe("sanitizeUriRedirects", () => { it("Returns uri redirects from uri redirect definitions", () => { const redirects = sanitizeUriRedirects([ { - from: "w3://w3/api", - to: "w3://w3/api" + from: "wrap://polywrap/api", + to: "wrap://polywrap/api" } ]); expect(redirects).toEqual([ { - from: new Uri("w3://w3/api"), - to: new Uri("w3://w3/api") + from: new Uri("wrap://polywrap/api"), + to: new Uri("wrap://polywrap/api") } ]); }); diff --git a/packages/js/core/src/__tests__/apply-redirects.spec.ts b/packages/js/core/src/__tests__/apply-redirects.spec.ts index cd051e2371..c81ac071ea 100644 --- a/packages/js/core/src/__tests__/apply-redirects.spec.ts +++ b/packages/js/core/src/__tests__/apply-redirects.spec.ts @@ -6,8 +6,8 @@ import { describe("applyRedirects", () => { it("works with the typical use case", () => { - const uri1 = "w3://ens/some-uri1.eth"; - const uri2 = "w3://ens/some-uri2.eth"; + const uri1 = "wrap://ens/some-uri1.eth"; + const uri2 = "wrap://ens/some-uri2.eth"; const redirectedUri = applyRedirects(new Uri(uri1), [ { @@ -20,9 +20,9 @@ describe("applyRedirects", () => { }); it("works with the redirect stack overrides", () => { - const uri1 = "w3://ens/some-uri1.eth"; - const uri2 = "w3://ens/some-uri2.eth"; - const uri3 = "w3://ens/some-uri3.eth"; + const uri1 = "wrap://ens/some-uri1.eth"; + const uri2 = "wrap://ens/some-uri2.eth"; + const uri3 = "wrap://ens/some-uri3.eth"; const redirectedUri = applyRedirects(new Uri(uri1), [ { @@ -39,7 +39,7 @@ describe("applyRedirects", () => { }); it("can not redirect to self", () => { - const uri = "w3://ens/some-uri.eth"; + const uri = "wrap://ens/some-uri.eth"; expect(() => { applyRedirects(new Uri(uri), [ diff --git a/packages/js/core/src/__tests__/get-implementations.spec.ts b/packages/js/core/src/__tests__/get-implementations.spec.ts index a4446ff036..330abed01c 100644 --- a/packages/js/core/src/__tests__/get-implementations.spec.ts +++ b/packages/js/core/src/__tests__/get-implementations.spec.ts @@ -8,13 +8,13 @@ import { InterfaceImplementations } from "../types"; describe("getImplementations", () => { it("works with complex redirects", () => { - const interface1Uri = "w3://ens/some-interface1.eth"; - const interface2Uri = "w3://ens/some-interface2.eth"; - const interface3Uri = "w3://ens/some-interface3.eth"; + const interface1Uri = "wrap://ens/some-interface1.eth"; + const interface2Uri = "wrap://ens/some-interface2.eth"; + const interface3Uri = "wrap://ens/some-interface3.eth"; - const implementation1Uri = "w3://ens/some-implementation.eth"; - const implementation2Uri = "w3://ens/some-implementation2.eth"; - const implementation3Uri = "w3://ens/some-implementation3.eth"; + const implementation1Uri = "wrap://ens/some-implementation.eth"; + const implementation2Uri = "wrap://ens/some-implementation2.eth"; + const implementation3Uri = "wrap://ens/some-implementation3.eth"; const redirects: UriRedirect[] = [ { @@ -87,10 +87,10 @@ describe("getImplementations", () => { }); it("interface implementations are not redirected", () => { - const interface1Uri = "w3://ens/some-interface1.eth"; + const interface1Uri = "wrap://ens/some-interface1.eth"; - const implementation1Uri = "w3://ens/some-implementation.eth"; - const implementation2Uri = "w3://ens/some-implementation2.eth"; + const implementation1Uri = "wrap://ens/some-implementation.eth"; + const implementation2Uri = "wrap://ens/some-implementation2.eth"; const redirects: UriRedirect[] = [ { diff --git a/packages/js/core/src/__tests__/parse-query.spec.ts b/packages/js/core/src/__tests__/parse-query.spec.ts index 24493b299e..df788898b3 100644 --- a/packages/js/core/src/__tests__/parse-query.spec.ts +++ b/packages/js/core/src/__tests__/parse-query.spec.ts @@ -1,7 +1,7 @@ import { createQueryDocument, parseQuery, QueryApiInvocations, Uri } from "../"; describe("parseQuery", () => { - const dummy = new Uri("w3://dumb/dummy"); + const dummy = new Uri("wrap://dumb/dummy"); it("works in the typical case", () => { const doc = createQueryDocument(` diff --git a/packages/js/core/src/__tests__/resolveUri.spec.ts b/packages/js/core/src/__tests__/resolveUri.spec.ts index cc5f02aab5..698e6e4d3b 100644 --- a/packages/js/core/src/__tests__/resolveUri.spec.ts +++ b/packages/js/core/src/__tests__/resolveUri.spec.ts @@ -226,9 +226,9 @@ describe("resolveUri", () => { ]; const apis: Record = { - "w3://ens/ens": ensApi as unknown as PluginModule, - "w3://ens/ipfs": ipfsApi as unknown as PluginModule, - "w3://ens/my-plugin": pluginApi as unknown as PluginModule, + "wrap://ens/ens": ensApi as unknown as PluginModule, + "wrap://ens/ipfs": ipfsApi as unknown as PluginModule, + "wrap://ens/my-plugin": pluginApi as unknown as PluginModule, }; const uriResolvers: UriResolver[] = [ @@ -251,11 +251,11 @@ describe("resolveUri", () => { ]; it("sanity", () => { - const api = new Uri("w3://ens/ens"); - const file = new Uri("w3/some-file"); - const path = "w3/some-path"; + const api = new Uri("wrap://ens/ens"); + const file = new Uri("wrap/some-file"); + const path = "wrap/some-path"; const query = UriResolverInterface.Query; - const uri = new Uri("w3/some-uri"); + const uri = new Uri("wrap/some-uri"); expect(query.tryResolveUri(client(apis).invoke, api, uri)).toBeDefined(); expect(query.getFile(client(apis).invoke, file, path)).toBeDefined(); @@ -281,7 +281,7 @@ describe("resolveUri", () => { manifest: { format: "0.0.1-prealpha.9", }, - uriResolver: "w3://ens/ipfs", + uriResolver: "wrap://ens/ipfs", }); }); @@ -305,7 +305,7 @@ describe("resolveUri", () => { manifest: { format: "0.0.1-prealpha.9", }, - uriResolver: "w3://ens/my-plugin", + uriResolver: "wrap://ens/my-plugin", }); }); @@ -330,7 +330,7 @@ describe("resolveUri", () => { format: "0.0.1-prealpha.9", dog: "cat", }, - uriResolver: "w3://ens/ipfs", + uriResolver: "wrap://ens/ipfs", }); }); @@ -354,7 +354,7 @@ describe("resolveUri", () => { manifest: { format: "0.0.1-prealpha.9", }, - uriResolver: "w3://ens/my-plugin", + uriResolver: "wrap://ens/my-plugin", }); }); @@ -403,7 +403,7 @@ describe("resolveUri", () => { new Map(), ).catch((e: Error) => expect(e.message).toMatch( - "Redirect missing the from property.\nEncountered while resolving w3://some/api" + "Redirect missing the from property.\nEncountered while resolving wrap://some/api" ) ); }); @@ -460,7 +460,7 @@ describe("resolveUri", () => { client( { ...apis, - "w3://ens/ipfs": faultyIpfsApi as unknown as PluginModule + "wrap://ens/ipfs": faultyIpfsApi as unknown as PluginModule }, plugins, interfaces diff --git a/packages/js/core/src/interfaces/core-interface-uris.ts b/packages/js/core/src/interfaces/core-interface-uris.ts index c1e9f25ff4..dcfc1a37fb 100644 --- a/packages/js/core/src/interfaces/core-interface-uris.ts +++ b/packages/js/core/src/interfaces/core-interface-uris.ts @@ -1,6 +1,6 @@ import { Uri } from "../"; export const coreInterfaceUris = { - uriResolver: new Uri("w3://ens/uri-resolver.core.web3api.eth"), - logger: new Uri("w3://ens/logger.core.web3api.eth"), + uriResolver: new Uri("wrap://ens/uri-resolver.core.web3api.eth"), + logger: new Uri("wrap://ens/logger.core.web3api.eth"), }; diff --git a/packages/js/core/src/types/Plugin.ts b/packages/js/core/src/types/Plugin.ts index cadfb5d8b5..982460cd61 100644 --- a/packages/js/core/src/types/Plugin.ts +++ b/packages/js/core/src/types/Plugin.ts @@ -34,16 +34,16 @@ export abstract class PluginModule< return this._config; } - public _w3_load_env(env: TEnv): void { + public _wrap_load_env(env: TEnv): void { this._env = env; } - public async _w3_sanitize_env( + public async _wrap_sanitize_env( clientEnv: TClientEnv, client: Client ): Promise { if (this.getMethod("sanitizeEnv")) { - return this._w3_invoke( + return this._wrap_invoke( "sanitizeEnv", clientEnv, client @@ -53,7 +53,7 @@ export abstract class PluginModule< } } - public async _w3_invoke< + public async _wrap_invoke< TInput extends Record = Record, TResult = unknown >(method: string, input: TInput, client: Client): Promise { diff --git a/packages/js/core/src/types/Uri.ts b/packages/js/core/src/types/Uri.ts index 06fe987947..37d451ce4a 100644 --- a/packages/js/core/src/types/Uri.ts +++ b/packages/js/core/src/types/Uri.ts @@ -9,14 +9,14 @@ export interface UriConfig { /** * A Web3API URI. Some examples of valid URIs are: - * w3://ipfs/QmHASH - * w3://ens/sub.dimain.eth - * w3://fs/directory/file.txt - * w3://uns/domain.crypto + * wrap://ipfs/QmHASH + * wrap://ens/sub.dimain.eth + * wrap://fs/directory/file.txt + * wrap://uns/domain.crypto * * Breaking down the various parts of the URI, as it applies * to [the URI standard](https://tools.ietf.org/html/rfc3986#section-3): - * **w3://** - URI Scheme: differentiates Web3API URIs. + * **wrap://** - URI Scheme: differentiates Web3API URIs. * **ipfs/** - URI Authority: allows the Web3API URI resolution algorithm to determine an authoritative URI resolver. * **sub.domain.eth** - URI Path: tells the Authority where the API resides. */ @@ -78,23 +78,23 @@ export class Uri { processed = processed.substring(1); } - // Check for the w3:// scheme, add if it isn't there - const w3SchemeIdx = processed.indexOf("w3://"); + // Check for the wrap:// scheme, add if it isn't there + const wrapSchemeIdx = processed.indexOf("wrap://"); - // If it's missing the w3:// scheme, add it - if (w3SchemeIdx === -1) { - processed = "w3://" + processed; + // If it's missing the wrap:// scheme, add it + if (wrapSchemeIdx === -1) { + processed = "wrap://" + processed; } - // If the w3:// is not in the beginning, throw an error - if (w3SchemeIdx > -1 && w3SchemeIdx !== 0) { + // If the wrap:// is not in the beginning, throw an error + if (wrapSchemeIdx > -1 && wrapSchemeIdx !== 0) { throw Error( - "The w3:// scheme must be at the beginning of the URI string" + "The wrap:// scheme must be at the beginning of the URI string" ); } // Extract the authoriy & path - let result = processed.match(/w3:\/\/([a-z][a-z0-9-_]+)\/(.*)/); + let result = processed.match(/wrap:\/\/([a-z][a-z0-9-_]+)\/(.*)/); // Remove all empty strings if (result) { @@ -104,8 +104,8 @@ export class Uri { if (!result || result.length !== 3) { throw Error( `URI is malformed, here are some examples of valid URIs:\n` + - `w3://ipfs/QmHASH\n` + - `w3://ens/domain.eth\n` + + `wrap://ipfs/QmHASH\n` + + `wrap://ens/domain.eth\n` + `ens/domain.eth\n\n` + `Invalid URI Received: ${uri}` ); diff --git a/packages/js/plugins/ens/package.json b/packages/js/plugins/ens/package.json index cbce827e5c..2c0730fdbd 100644 --- a/packages/js/plugins/ens/package.json +++ b/packages/js/plugins/ens/package.json @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/ens/src/index.ts b/packages/js/plugins/ens/src/index.ts index e52b171536..c54d4e5b76 100644 --- a/packages/js/plugins/ens/src/index.ts +++ b/packages/js/plugins/ens/src/index.ts @@ -7,7 +7,7 @@ import { Bytes, Ethereum_Module, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import { ethers } from "ethers"; import { Base58 } from "@ethersproject/basex"; @@ -81,7 +81,7 @@ export class EnsPlugin extends Module { let ensAddress = EnsPlugin.defaultAddress; // Remove the ENS URI scheme & authority - domain = domain.replace("w3://", ""); + domain = domain.replace("wrap://", ""); domain = domain.replace("ens/", ""); // Check for non-default network diff --git a/packages/js/plugins/ethereum/package.json b/packages/js/plugins/ethereum/package.json index cfa3e229f3..7d5db581c7 100644 --- a/packages/js/plugins/ethereum/package.json +++ b/packages/js/plugins/ethereum/package.json @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --detectOpenHandles --verbose", diff --git a/packages/js/plugins/ethereum/src/Connection.ts b/packages/js/plugins/ethereum/src/Connection.ts index 9e54a7e3e1..8c35a4fcff 100644 --- a/packages/js/plugins/ethereum/src/Connection.ts +++ b/packages/js/plugins/ethereum/src/Connection.ts @@ -1,4 +1,4 @@ -import { Connection as SchemaConnection } from "./w3-man"; +import { Connection as SchemaConnection } from "./polywrap-man"; import { Signer, ethers } from "ethers"; import { diff --git a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts index 2de2022a27..55d9dae7d7 100644 --- a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts @@ -1,5 +1,5 @@ import { ethereumPlugin } from ".."; -import * as Schema from "../w3-man"; +import * as Schema from "../polywrap-man"; import { Web3ApiClient, defaultIpfsProviders } from "@polywrap/client-js"; import { ensPlugin } from "@polywrap/ens-plugin-js"; @@ -50,7 +50,7 @@ describe("Ethereum Plugin", () => { client = new Web3ApiClient({ plugins: [ { - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -64,14 +64,14 @@ describe("Ethereum Plugin", () => { }), }, { - uri: "w3://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.web3api.eth", plugin: ipfsPlugin({ provider: providers.ipfs, fallbackProviders: defaultIpfsProviders, }), }, { - uri: "w3://ens/ens.web3api.eth", + uri: "wrap://ens/ens.web3api.eth", plugin: ensPlugin({ query: { addresses: { @@ -751,7 +751,7 @@ describe("Ethereum Plugin", () => { config: { envs: [ { - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", env: { connection: { networkNameOrChainId: "mainnet", @@ -784,7 +784,7 @@ describe("Ethereum Plugin", () => { config: { envs: [ { - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", env: { connection: { node: "https://polygon-rpc.com", diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/.gitignore b/packages/js/plugins/ethereum/src/__tests__/integration/.gitignore index 1e8f0fdefe..a15402b528 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/.gitignore +++ b/packages/js/plugins/ethereum/src/__tests__/integration/.gitignore @@ -1,3 +1,3 @@ build node_modules -w3 +polywrap diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/package.json b/packages/js/plugins/ethereum/src/__tests__/integration/package.json index 2202f2e1af..40f454a34c 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/package.json +++ b/packages/js/plugins/ethereum/src/__tests__/integration/package.json @@ -5,10 +5,10 @@ "version": "0.0.1-prealpha.85", "scripts": { "build": "yarn build:web3api", - "build:web3api": "npx w3 build", - "test:env:up": "npx w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "npx w3 infra down --modules=eth-ens-ipfs", - "deploy": "npx w3 deploy" + "build:web3api": "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" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.85" diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts b/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts index 874ebbd4e2..e313ab106a 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts +++ b/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts @@ -32,7 +32,7 @@ import { Input_sendTransaction, Input_sendTransactionAndWait, Input_signMessage -} from "./w3"; +} from "./polywrap"; import { BigInt } from "@polywrap/wasm-as"; export function callContractView( diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql b/packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql index 160de2e694..dcef75eaec 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql +++ b/packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection, Network, EventNotification, StaticTxResult, TxOverrides, TxRequest, TxReceipt, TxResponse } into Ethereum from "w3://ens/ethereum.web3api.eth" +#import { Module, Connection, Network, EventNotification, StaticTxResult, TxOverrides, TxRequest, TxReceipt, TxResponse } into Ethereum from "wrap://ens/ethereum.web3api.eth" type Module { callContractView( diff --git a/packages/js/plugins/ethereum/src/index.ts b/packages/js/plugins/ethereum/src/index.ts index bcc3d95c1b..f077027c14 100644 --- a/packages/js/plugins/ethereum/src/index.ts +++ b/packages/js/plugins/ethereum/src/index.ts @@ -36,7 +36,7 @@ import { Network, Connection as SchemaConnection, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import { Connections, Connection, diff --git a/packages/js/plugins/ethereum/src/utils/mapping.ts b/packages/js/plugins/ethereum/src/utils/mapping.ts index fefca4c89e..80c416a109 100644 --- a/packages/js/plugins/ethereum/src/utils/mapping.ts +++ b/packages/js/plugins/ethereum/src/utils/mapping.ts @@ -1,4 +1,4 @@ -import { Access, TxReceipt, TxResponse, TxRequest, Log } from "../w3-man"; +import { Access, TxReceipt, TxResponse, TxRequest, Log } from "../polywrap-man"; import { ethers } from "ethers"; diff --git a/packages/js/plugins/ethereum/tsconfig.json b/packages/js/plugins/ethereum/tsconfig.json index 4a5f4564af..720d843436 100644 --- a/packages/js/plugins/ethereum/tsconfig.json +++ b/packages/js/plugins/ethereum/tsconfig.json @@ -7,6 +7,6 @@ "./src/**/*.ts" ], "exclude": [ - "./**/.w3/**/*.ts" + "./**/.polywrap/**/*.ts" ] } diff --git a/packages/js/plugins/filesystem/package.json b/packages/js/plugins/filesystem/package.json index 67071d42cc..8fffa82dc2 100644 --- a/packages/js/plugins/filesystem/package.json +++ b/packages/js/plugins/filesystem/package.json @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts b/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts index 4ffbb3493f..94fc1750ac 100644 --- a/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts @@ -29,12 +29,12 @@ describe("Filesystem plugin", () => { const config: Partial = { plugins: [ { - uri: "w3://ens/fs.web3api.eth", + uri: "wrap://ens/fs.web3api.eth", plugin: filesystemPlugin({ }), }, // IPFS is required for downloading Web3API packages { - uri: "w3://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.web3api.eth", plugin: ipfsPlugin({ provider: providers.ipfs, fallbackProviders: defaultIpfsProviders, @@ -42,7 +42,7 @@ describe("Filesystem plugin", () => { }, // ENS is required for resolving domain to IPFS hashes { - uri: "w3://ens/ens.web3api.eth", + uri: "wrap://ens/ens.web3api.eth", plugin: ensPlugin({ addresses: { testnet: ensAddresses.ensAddress, @@ -50,7 +50,7 @@ describe("Filesystem plugin", () => { }), }, { - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", plugin: ethereumPlugin({ networks: { testnet: { diff --git a/packages/js/plugins/filesystem/src/index.ts b/packages/js/plugins/filesystem/src/index.ts index 7c6dcddd96..2431a0fd9c 100644 --- a/packages/js/plugins/filesystem/src/index.ts +++ b/packages/js/plugins/filesystem/src/index.ts @@ -6,7 +6,7 @@ import { UriResolver_MaybeUriOrManifest, Bytes, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import path from "path"; import fs from "fs"; diff --git a/packages/js/plugins/graph-node/package.json b/packages/js/plugins/graph-node/package.json index 2a771ebef5..841939948b 100644 --- a/packages/js/plugins/graph-node/package.json +++ b/packages/js/plugins/graph-node/package.json @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/graph-node/src/index.ts b/packages/js/plugins/graph-node/src/index.ts index a169bcd0a7..1c581761dc 100644 --- a/packages/js/plugins/graph-node/src/index.ts +++ b/packages/js/plugins/graph-node/src/index.ts @@ -4,7 +4,7 @@ import { Input_querySubgraph, HTTP_Module, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/http/README.md b/packages/js/plugins/http/README.md index 483756af11..b1373286f9 100644 --- a/packages/js/plugins/http/README.md +++ b/packages/js/plugins/http/README.md @@ -14,7 +14,7 @@ Below is sample invocation of the `GET` request with custom request headers and ```ts const response = await web3ApiClient.query<{ get: Response }>({ -uri: new Uri("w3://ens/http.web3api.eth"), +uri: new Uri("wrap://ens/http.web3api.eth"), query: ` query { get( @@ -36,7 +36,7 @@ Below is sample invocation of the `POST` request with custom request headers and ```ts const response = await web3ApiClient.query<{ get: Response }>({ - uri: new Uri("w3://ens/http.web3api.eth"), + uri: new Uri("wrap://ens/http.web3api.eth"), query: ` query { post( diff --git a/packages/js/plugins/http/package.json b/packages/js/plugins/http/package.json index af078f9a65..13b66007d9 100644 --- a/packages/js/plugins/http/package.json +++ b/packages/js/plugins/http/package.json @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts index 1116ac2327..3e6230d4d7 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts @@ -1,5 +1,5 @@ import { httpPlugin } from "../.."; -import { Response } from "../../w3-man"; +import { Response } from "../../polywrap-man"; import { Web3ApiClient } from "@polywrap/client-js" import nock from "nock"; @@ -18,7 +18,7 @@ describe("e2e tests for HttpPlugin", () => { web3ApiClient = new Web3ApiClient({ plugins: [ { - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", plugin: httpPlugin({ }), }, ] @@ -34,7 +34,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(200, '{data: "test-response"}') const response = await web3ApiClient.query<{ get: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { get( @@ -62,7 +62,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(200, '{data: "test-response"}') const response = await web3ApiClient.query<{ get: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { get( @@ -91,7 +91,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(200, '{data: "test-response"}', { 'X-Response-Header': "resp-foo" }) const response = await web3ApiClient.query<{ get: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { get( @@ -125,7 +125,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(404) const response = await web3ApiClient.query<{ get: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { get( @@ -163,7 +163,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(200, resPayloadStringfified) const response = await web3ApiClient.query<{ post: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { post( @@ -195,7 +195,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(200, '{data: "test-response"}') const response = await web3ApiClient.query<{ post: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { post( @@ -224,7 +224,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(200, '{data: "test-response"}') const response = await web3ApiClient.query<{ post: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { post( @@ -254,7 +254,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(200, '{data: "test-response"}', { 'X-Response-Header': "resp-foo" }) const response = await web3ApiClient.query<{ post: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { post( @@ -289,7 +289,7 @@ describe("e2e tests for HttpPlugin", () => { .reply(404) const response = await web3ApiClient.query<{ get: Response }>({ - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", query: ` query { post( diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts index 71b04469fa..090ef0815f 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts @@ -1,5 +1,5 @@ import { httpPlugin } from "../.."; -import { Response } from "../../w3"; +import { Response } from "../../polywrap"; import { Web3ApiClient } from "@polywrap/client-js" import { @@ -27,7 +27,7 @@ describe("e2e tests for HttpPlugin", () => { client = new Web3ApiClient({ plugins: [ { - uri: "w3://ens/http.web3api.eth", + uri: "wrap://ens/http.web3api.eth", plugin: httpPlugin({ }), }, ], diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/.gitignore b/packages/js/plugins/http/src/__tests__/e2e/integration/.gitignore index 1e8f0fdefe..a15402b528 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/.gitignore +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/.gitignore @@ -1,3 +1,3 @@ build node_modules -w3 +polywrap diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/package.json b/packages/js/plugins/http/src/__tests__/e2e/integration/package.json index 86f1204436..418c8defe7 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/package.json +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/package.json @@ -5,11 +5,11 @@ "version": "0.0.1-prealpha.85", "scripts": { "build": "yarn build:web3api", - "build:web3api": "npx w3 build", - "test:env:up": "npx w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "npx w3 infra down --modules=eth-ens-ipfs", + "build:web3api": "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": "yarn deploy:web3api", - "deploy:web3api": "npx w3 build --ipfs http://localhost:5001 --test-ens simplestorage.eth" + "deploy:web3api": "npx polywrap build --ipfs http://localhost:5001 --test-ens simplestorage.eth" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.85" diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/schema.graphql b/packages/js/plugins/http/src/__tests__/e2e/integration/schema.graphql index a92b600953..387daedd54 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/schema.graphql +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Request, Response } into HTTP from "w3://ens/http.web3api.eth" +#import { Module, Request, Response } into HTTP from "wrap://ens/http.web3api.eth" type Module { get( diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/src/index.ts b/packages/js/plugins/http/src/__tests__/e2e/integration/src/index.ts index 1ff2a0167c..0d665cc558 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/src/index.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/src/index.ts @@ -3,7 +3,7 @@ import { HTTP_Response, Input_get, Input_post, -} from "./w3"; +} from "./polywrap"; export function get(input: Input_get): HTTP_Response | null { return HTTP_Module.get({ diff --git a/packages/js/plugins/http/src/__tests__/unit/index.test.ts b/packages/js/plugins/http/src/__tests__/unit/index.test.ts index 70a9b2b392..649601dbfc 100644 --- a/packages/js/plugins/http/src/__tests__/unit/index.test.ts +++ b/packages/js/plugins/http/src/__tests__/unit/index.test.ts @@ -1,5 +1,5 @@ import { HttpPlugin } from "../.."; -import { ResponseTypeEnum, Client } from "../../w3"; +import { ResponseTypeEnum, Client } from "../../polywrap"; import axios, { AxiosResponse, AxiosRequestConfig } from "axios"; diff --git a/packages/js/plugins/http/src/__tests__/unit/util.test.ts b/packages/js/plugins/http/src/__tests__/unit/util.test.ts index e7a3cc8275..52382aef57 100644 --- a/packages/js/plugins/http/src/__tests__/unit/util.test.ts +++ b/packages/js/plugins/http/src/__tests__/unit/util.test.ts @@ -1,5 +1,5 @@ import { fromAxiosResponse, toAxiosRequestConfig } from "../../util"; -import { ResponseTypeEnum } from "../../w3"; +import { ResponseTypeEnum } from "../../polywrap"; describe("converting axios response", () => { test("response type: text", () => { diff --git a/packages/js/plugins/http/src/index.ts b/packages/js/plugins/http/src/index.ts index 9422fc7d90..96dbfc875a 100644 --- a/packages/js/plugins/http/src/index.ts +++ b/packages/js/plugins/http/src/index.ts @@ -5,7 +5,7 @@ import { Input_post, Response, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import { fromAxiosResponse, toAxiosRequestConfig } from "./util"; import axios from "axios"; diff --git a/packages/js/plugins/http/src/util.ts b/packages/js/plugins/http/src/util.ts index 9ef92384dc..03dafa9c5e 100644 --- a/packages/js/plugins/http/src/util.ts +++ b/packages/js/plugins/http/src/util.ts @@ -1,4 +1,4 @@ -import { Request, Response, ResponseTypeEnum, Header } from "./w3-man"; +import { Request, Response, ResponseTypeEnum, Header } from "./polywrap-man"; import { AxiosResponse, AxiosRequestConfig } from "axios"; diff --git a/packages/js/plugins/http/tsconfig.json b/packages/js/plugins/http/tsconfig.json index 4a5f4564af..720d843436 100644 --- a/packages/js/plugins/http/tsconfig.json +++ b/packages/js/plugins/http/tsconfig.json @@ -7,6 +7,6 @@ "./src/**/*.ts" ], "exclude": [ - "./**/.w3/**/*.ts" + "./**/.polywrap/**/*.ts" ] } diff --git a/packages/js/plugins/ipfs/package.json b/packages/js/plugins/ipfs/package.json index 4f4b01c99e..5af7d9858e 100644 --- a/packages/js/plugins/ipfs/package.json +++ b/packages/js/plugins/ipfs/package.json @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/ipfs/src/index.ts b/packages/js/plugins/ipfs/src/index.ts index f67e97cd17..a529bc8e92 100644 --- a/packages/js/plugins/ipfs/src/index.ts +++ b/packages/js/plugins/ipfs/src/index.ts @@ -11,7 +11,7 @@ import { Env, UriResolver_MaybeUriOrManifest, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import { IpfsClient } from "./utils/IpfsClient"; import { execSimple, execFallbacks } from "./utils/exec"; diff --git a/packages/js/plugins/logger/README.md b/packages/js/plugins/logger/README.md index 9ffcf3b02d..cbb704b406 100644 --- a/packages/js/plugins/logger/README.md +++ b/packages/js/plugins/logger/README.md @@ -1,6 +1,6 @@ # Consoler Logger Plugin -Console Logger plugin implements the `w3://ens/logger.core.web3api.eth` core Web3API interface. By default it logs all events using the Javascript `console` module. Different logging mechanisms can be set using the `LoggerConfig`. +Console Logger plugin implements the `wrap://ens/logger.core.web3api.eth` core Web3API interface. By default it logs all events using the Javascript `console` module. Different logging mechanisms can be set using the `LoggerConfig`. ## Log levels @@ -16,12 +16,12 @@ import { loggerPlugin, LogLevel } from "@polywrap/logger-plugin-js"; const client = new Web3ApiClient({ plugins: [{ - from: "w3://ens/js-logger.web3api.eth", + from: "wrap://ens/js-logger.web3api.eth", to: loggerPlugin() }], interfaces: [{ - interface: "w3://ens/logger.core.web3api.eth", - implementations: ["w3://ens/js-logger.web3api.eth"], + interface: "wrap://ens/logger.core.web3api.eth", + implementations: ["wrap://ens/js-logger.web3api.eth"], }] }); @@ -29,7 +29,7 @@ const client = new Web3ApiClient({ // loggerPlugin((level: LogLevel, message: string) => { ... }) const response = await client.query<{ log: boolean }>({ - uri: "w3://ens/js-logger.web3api.eth", + uri: "wrap://ens/js-logger.web3api.eth", query: ` query { log( diff --git a/packages/js/plugins/logger/package.json b/packages/js/plugins/logger/package.json index f1397128c8..2d34edb858 100644 --- a/packages/js/plugins/logger/package.json +++ b/packages/js/plugins/logger/package.json @@ -13,8 +13,8 @@ "main": "build/index.js", "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts index 3e580b1f48..6d985089c3 100644 --- a/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts @@ -6,7 +6,7 @@ describe("log method", () => { const web3ApiClient = new Web3ApiClient() const response = await web3ApiClient.query<{ log: boolean }>({ - uri: "w3://ens/js-logger.web3api.eth", + uri: "wrap://ens/js-logger.web3api.eth", query: ` query { log( diff --git a/packages/js/plugins/logger/src/index.ts b/packages/js/plugins/logger/src/index.ts index d2739ed055..2adcc0e4b9 100644 --- a/packages/js/plugins/logger/src/index.ts +++ b/packages/js/plugins/logger/src/index.ts @@ -4,7 +4,7 @@ import { Logger_LogLevel, Logger_LogLevelEnum, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/sha3/package.json b/packages/js/plugins/sha3/package.json index ea51a31dd9..783e3f5f6f 100644 --- a/packages/js/plugins/sha3/package.json +++ b/packages/js/plugins/sha3/package.json @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/sha3/src/__tests__/index.test.ts b/packages/js/plugins/sha3/src/__tests__/index.test.ts index 5b07067b2f..94dad607ae 100644 --- a/packages/js/plugins/sha3/src/__tests__/index.test.ts +++ b/packages/js/plugins/sha3/src/__tests__/index.test.ts @@ -22,7 +22,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { client = new Web3ApiClient({ plugins: [ { - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", plugin: sha3Plugin({ }), }, ] @@ -32,7 +32,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("sha3_512 matches", async () => { const expected = sha3_512(testMessage) const response = await client.query<{ sha3_512: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { sha3_512(message: "${testMessage}") @@ -48,7 +48,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("sha3_384 matches", async () => { const expected = sha3_384(testMessage) const response = await client.query<{ sha3_384: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { sha3_384(message: "${testMessage}") @@ -64,7 +64,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("sha3_256 matches", async () => { const expected = sha3_256(testMessage) const response = await client.query<{ sha3_256: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { sha3_256(message: "${testMessage}") @@ -80,7 +80,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("sha3_224 matches", async () => { const expected = sha3_224(testMessage) const response = await client.query<{ sha3_224: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { sha3_224(message: "${testMessage}") @@ -96,7 +96,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("keccak512 matches", async () => { const expected = keccak512(testMessage) const response = await client.query<{ keccak_512: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { keccak_512(message: "${testMessage}") @@ -112,7 +112,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("keccak384 matches", async () => { const expected = keccak384(testMessage) const response = await client.query<{ keccak_384: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { keccak_384(message: "${testMessage}") @@ -128,7 +128,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("keccak256 matches", async () => { const expected = keccak256(testMessage) const response = await client.query<{ keccak_256: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { keccak_256(message: "${testMessage}") @@ -146,7 +146,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { const testMessageBuffer = encoder.encode(testMessage); const expected = keccak256(testMessageBuffer) const response = await client.query<{ buffer_keccak_256: Uint8Array }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { buffer_keccak_256(message: $message) @@ -165,7 +165,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("keccak224 matches", async () => { const expected = keccak224(testMessage) const response = await client.query<{ keccak_224: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { keccak_224(message: "${testMessage}") @@ -181,7 +181,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("shake128 matches", async () => { const expected = shake128(testMessage, 256) const response = await client.query<{ shake_128: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { shake_128(message: "${testMessage}", outputBits: 256) @@ -197,7 +197,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("shake256 matches", async () => { const expected = shake256(testMessage, 512) const response = await client.query<{ shake_256: string }>({ - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", query: ` query { shake_256(message: "${testMessage}", outputBits: 512) diff --git a/packages/js/plugins/sha3/src/index.ts b/packages/js/plugins/sha3/src/index.ts index ae92f2a960..183dd445ed 100644 --- a/packages/js/plugins/sha3/src/index.ts +++ b/packages/js/plugins/sha3/src/index.ts @@ -17,7 +17,7 @@ import { Input_shake_128, Input_shake_256, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import { sha3_512, diff --git a/packages/js/plugins/uts46/package.json b/packages/js/plugins/uts46/package.json index a4fb3f5cd8..14346fae62 100644 --- a/packages/js/plugins/uts46/package.json +++ b/packages/js/plugins/uts46/package.json @@ -13,8 +13,8 @@ ], "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", - "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/w3 plugin codegen", - "codegen:patch": "node ../../../cli/bin/w3 plugin codegen && rimraf ./src/w3", + "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uts46/src/__tests__/index.test.ts b/packages/js/plugins/uts46/src/__tests__/index.test.ts index 09960aa0ad..fdbf4f06e4 100644 --- a/packages/js/plugins/uts46/src/__tests__/index.test.ts +++ b/packages/js/plugins/uts46/src/__tests__/index.test.ts @@ -11,7 +11,7 @@ describe("IDNA UTS #46", () => { client = new Web3ApiClient({ plugins: [ { - uri: "w3://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.web3api.eth", plugin: uts46Plugin({ }), }, ], @@ -22,7 +22,7 @@ describe("IDNA UTS #46", () => { it("ToAscii matches", async () => { const expected = uts46.toAscii(textToConvert); const response = await client.query<{ toAscii: string }>({ - uri: "w3://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.web3api.eth", query: ` query { toAscii(value: "${textToConvert}") @@ -49,7 +49,7 @@ describe("IDNA UTS #46", () => { it("ToUnicode matches", async () => { const expected = uts46.toUnicode(textToConvert); const response = await client.query<{ toUnicode: string }>({ - uri: "w3://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.web3api.eth", query: ` query { toUnicode(value: "${textToConvert}") @@ -65,7 +65,7 @@ describe("IDNA UTS #46", () => { it("Convert matches", async () => { const expected = uts46.convert(textToConvert); const response = await client.query<{ convert: string }>({ - uri: "w3://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.web3api.eth", query: ` query { convert(value: "${textToConvert}") diff --git a/packages/js/plugins/uts46/src/index.ts b/packages/js/plugins/uts46/src/index.ts index 3b35646b98..acfba675da 100644 --- a/packages/js/plugins/uts46/src/index.ts +++ b/packages/js/plugins/uts46/src/index.ts @@ -6,7 +6,7 @@ import { Input_convert, ConvertResult, manifest, -} from "./w3-man"; +} from "./polywrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/react/src/__tests__/plugins.ts b/packages/js/react/src/__tests__/plugins.ts index c093feccac..9f5ba7c842 100644 --- a/packages/js/react/src/__tests__/plugins.ts +++ b/packages/js/react/src/__tests__/plugins.ts @@ -11,7 +11,7 @@ export function createPlugins( ): PluginRegistration[] { return [ { - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -21,14 +21,14 @@ export function createPlugins( }), }, { - uri: "w3://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.web3api.eth", plugin: ipfsPlugin({ provider: ipfsProvider, fallbackProviders: defaultIpfsProviders, }), }, { - uri: "w3://ens/ens.web3api.eth", + uri: "wrap://ens/ens.web3api.eth", plugin: ensPlugin({ addresses: { testnet: ensAddress, diff --git a/packages/js/test-env/src/index.ts b/packages/js/test-env/src/index.ts index 03a913ec0f..3a6a0d03f3 100644 --- a/packages/js/test-env/src/index.ts +++ b/packages/js/test-env/src/index.ts @@ -22,8 +22,8 @@ export const providers = { ethereum: "http://localhost:8545", }; -const monorepoCli = `${__dirname}/../../../cli/bin/w3`; -const npmCli = `${__dirname}/../../cli/bin/w3`; +const monorepoCli = `${__dirname}/../../../cli/bin/polywrap`; +const npmCli = `${__dirname}/../../cli/bin/polywrap`; async function awaitResponse( url: string, @@ -198,10 +198,10 @@ export async function buildApi(apiAbsPath: string): Promise { }); if (buildExitCode !== 0) { - console.error(`w3 exited with code: ${buildExitCode}`); + console.error(`polywrap exited with code: ${buildExitCode}`); console.log(`stderr:\n${buildStderr}`); console.log(`stdout:\n${buildStdout}`); - throw Error("w3 CLI failed"); + throw Error("polywrap CLI failed"); } } @@ -236,7 +236,7 @@ export async function buildAndDeployApi({ // register ENS domain const ensWrapperUri = `fs/${__dirname}/wrappers/ens`; - const ethereumPluginUri = "w3://ens/ethereum.web3api.eth"; + const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth"; const client = new Web3ApiClient({ plugins: [ @@ -355,10 +355,10 @@ export async function buildAndDeployApi({ }); if (deployExitCode !== 0) { - console.error(`w3 exited with code: ${deployExitCode}`); + console.error(`polywrap exited with code: ${deployExitCode}`); console.log(`stderr:\n${deployStderr}`); console.log(`stdout:\n${deployStdout}`); - throw Error("w3 CLI failed"); + throw Error("polywrap CLI failed"); } // remove manually configured manifests @@ -367,11 +367,11 @@ export async function buildAndDeployApi({ fs.unlinkSync(tempDeployManifestPath); // get the IPFS CID of the published package - const extractCID = /(w3:\/\/ipfs\/[A-Za-z0-9]+)/; + const extractCID = /(wrap:\/\/ipfs\/[A-Za-z0-9]+)/; const result = deployStdout.match(extractCID); if (!result) { - throw Error(`W3 CLI output missing IPFS CID.\nOutput: ${deployStdout}`); + throw Error(`polywrap CLI output missing IPFS CID.\nOutput: ${deployStdout}`); } const apiCid = new Uri(result[1]).path; diff --git a/packages/js/test-env/src/wrappers/ens/schema.graphql b/packages/js/test-env/src/wrappers/ens/schema.graphql index 2179e6b9a5..7932d6636a 100644 --- a/packages/js/test-env/src/wrappers/ens/schema.graphql +++ b/packages/js/test-env/src/wrappers/ens/schema.graphql @@ -337,7 +337,7 @@ type TxOverrides { ### Imported Modules START ### type Ethereum_Module @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Module" ) { @@ -495,7 +495,7 @@ type Ethereum_Module @imported( } type UTS46_Module @imported( - uri: "w3://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.web3api.eth", namespace: "UTS46", nativeType: "Module" ) { @@ -513,7 +513,7 @@ type UTS46_Module @imported( } type SHA3_Module @imported( - uri: "w3://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.web3api.eth", namespace: "SHA3", nativeType: "Module" ) { @@ -573,7 +573,7 @@ type SHA3_Module @imported( ### Imported Objects START ### type Ethereum_Connection @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Connection" ) { @@ -582,7 +582,7 @@ type Ethereum_Connection @imported( } type Ethereum_TxOverrides @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { @@ -592,7 +592,7 @@ type Ethereum_TxOverrides @imported( } type Ethereum_StaticTxResult @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { @@ -601,7 +601,7 @@ type Ethereum_StaticTxResult @imported( } type Ethereum_TxRequest @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { @@ -617,7 +617,7 @@ type Ethereum_TxRequest @imported( } type Ethereum_TxReceipt @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { @@ -641,7 +641,7 @@ type Ethereum_TxReceipt @imported( } type Ethereum_Log @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Log" ) { @@ -657,7 +657,7 @@ type Ethereum_Log @imported( } type Ethereum_EventNotification @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { @@ -667,7 +667,7 @@ type Ethereum_EventNotification @imported( } type Ethereum_Network @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Network" ) { @@ -677,7 +677,7 @@ type Ethereum_Network @imported( } type Ethereum_TxResponse @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxResponse" ) { @@ -703,7 +703,7 @@ type Ethereum_TxResponse @imported( } type Ethereum_Access @imported( - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Access" ) { @@ -712,7 +712,7 @@ type Ethereum_Access @imported( } type UTS46_ConvertResult @imported( - uri: "w3://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.web3api.eth", namespace: "UTS46", nativeType: "ConvertResult" ) { diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/entry-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/entry-ts.mustache index f9bcf2a31f..0c5b96e3fa 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/entry-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/entry-ts.mustache @@ -1,9 +1,9 @@ import { - w3_invoke_args, - w3_invoke, - w3_load_env, - w3_sanitize_env, - w3_abort, + wrap_invoke_args, + wrap_invoke, + wrap_load_env, + wrap_sanitize_env, + wrap_abort, InvokeArgs } from "@polywrap/wasm-as"; @@ -25,8 +25,8 @@ import { } from "./Env"; {{/envType.sanitized}} -export function _w3_invoke(method_size: u32, args_size: u32): bool { - const args: InvokeArgs = w3_invoke_args( +export function _wrap_invoke(method_size: u32, args_size: u32): bool { + const args: InvokeArgs = wrap_invoke_args( method_size, args_size ); @@ -34,35 +34,35 @@ export function _w3_invoke(method_size: u32, args_size: u32): bool { {{#moduleType}} {{#methods}} {{^first}}else {{/first}}if (args.method == "{{name}}") { - return w3_invoke(args, {{name}}Wrapped); + return wrap_invoke(args, {{name}}Wrapped); } {{/methods}} {{/moduleType}} else { - return w3_invoke(args, null); + return wrap_invoke(args, null); } } {{#envType.sanitized}} -export function _w3_load_env(env_size: u32): void { - const envBuf = w3_load_env(env_size); +export function _wrap_load_env(env_size: u32): void { + const envBuf = wrap_load_env(env_size); env = Env.fromBuffer(envBuf); } {{/envType.sanitized}} {{#envType.client}} -export function _w3_sanitize_env(args_size: u32): void { - w3_sanitize_env(args_size, sanitizeEnvWrapped); +export function _wrap_sanitize_env(args_size: u32): void { + wrap_sanitize_env(args_size, sanitizeEnvWrapped); } {{/envType.client}} -export function w3Abort( +export function wrapAbort( msg: string | null, file: string | null, line: u32, column: u32 ): void { - w3_abort( + wrap_abort( msg ? msg : "", file ? file : "", line, diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/module-type/index-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/module-type/index-ts.mustache index 5a0e15a748..1b2b569b9a 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/module-type/index-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/imported/module-type/index-ts.mustache @@ -1,6 +1,6 @@ import { - w3_subinvoke, - w3_subinvokeImplementation, + wrap_subinvoke, + wrap_subinvokeImplementation, Nullable, BigInt, BigNumber, @@ -28,7 +28,7 @@ export class {{type}} { input: Input_{{name}} ): Result<{{#return}}{{#toWasm}}{{toGraphQLType}}{{/toWasm}}{{/return}}, string> { const args = serialize{{name}}Args(input); - const result = w3_subinvoke( + const result = wrap_subinvoke( "{{uri}}", "{{name}}", args @@ -66,7 +66,7 @@ export class {{type}} { input: Input_{{name}} ): Result<{{#return}}{{#toWasm}}{{toGraphQLType}}{{/toWasm}}{{/return}}, string> { const args = serialize{{name}}Args(input); - const result = w3_subinvokeImplementation( + const result = wrap_subinvokeImplementation( "{{uri}}", this.uri, "{{name}}", diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/interface-type/index-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/interface-type/index-ts.mustache index 5c490a835e..a4fefdb36e 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/interface-type/index-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm-as/templates/interface-type/index-ts.mustache @@ -2,7 +2,7 @@ {{#getImplementations}} {{#enabled}} import { - w3_getImplementations + wrap_getImplementations } from "@polywrap/wasm-as"; {{/enabled}} {{/getImplementations}} @@ -15,7 +15,7 @@ export class {{namespace}} { {{#getImplementations}} {{#enabled}} public static getImplementations(): string[] { - return w3_getImplementations(this.uri); + return wrap_getImplementations(this.uri); } {{/enabled}} {{/getImplementations}} diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/entry-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/entry-rs.mustache index cfa1bed737..6d051bb661 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/entry-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/entry-rs.mustache @@ -13,20 +13,20 @@ use web3api_wasm_rs::{ InvokeArgs, }; -#[cfg(feature = "w3-invoke")] +#[cfg(feature = "wrap-invoke")] #[no_mangle] -pub extern "C" fn _w3_invoke(method_size: u32, args_size: u32) -> bool { +pub extern "C" fn _wrap_invoke(method_size: u32, args_size: u32) -> bool { // Ensure the abort handler is properly setup - abort::w3_abort_setup(); + abort::wrap_abort_setup(); - let args: InvokeArgs = invoke::w3_invoke_args(method_size, args_size); + let args: InvokeArgs = invoke::wrap_invoke_args(method_size, args_size); match args.method.as_str() { {{#moduleType}} {{#methods}} - "{{name}}" => invoke::w3_invoke(args, Some({{#toLower}}{{name}}{{/toLower}}_wrapped)), + "{{name}}" => invoke::wrap_invoke(args, Some({{#toLower}}{{name}}{{/toLower}}_wrapped)), {{/methods}} {{/moduleType}} - _ => invoke::w3_invoke(args, None), + _ => invoke::wrap_invoke(args, None), } } diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/mod-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/mod-rs.mustache index 48bc878d83..33344e8bc5 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/mod-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/mod-rs.mustache @@ -39,7 +39,7 @@ impl {{#toUpper}}{{type}}{{/toUpper}} { pub fn {{#toLower}}{{name}}{{/toLower}}(input: &Input{{#toUpper}}{{name}}{{/toUpper}}) -> Result<{{#return}}{{#toWasm}}{{toGraphQLType}}{{/toWasm}}{{/return}}, String> { let uri = {{#parent}}{{#toUpper}}{{type}}{{/toUpper}}{{/parent}}::URI; let args = serialize_{{#toLower}}{{name}}{{/toLower}}_args(input).map_err(|e| e.to_string())?; - let result = subinvoke::w3_subinvoke( + let result = subinvoke::wrap_subinvoke( uri, "{{name}}", args, diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/interface-type/mod-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/interface-type/mod-rs.mustache index 64f2c06592..414dfa1b90 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/interface-type/mod-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/interface-type/mod-rs.mustache @@ -1,7 +1,7 @@ {{#capabilities}} {{#getImplementations}} {{#enabled}} -use web3api_wasm_rs::w3_get_implementations; +use web3api_wasm_rs::wrap_get_implementations; {{/enabled}} {{/getImplementations}} {{/capabilities}} @@ -15,7 +15,7 @@ impl {{#toUpper}}{{namespace}}{{/toUpper}} { {{#getImplementations}} {{#enabled}} pub fn get_implementations() -> Vec { - w3_get_implementations(Self::uri) + wrap_get_implementations(Self::uri) } {{/enabled}} {{/getImplementations}} diff --git a/packages/schema/parse/.eslintrc.js b/packages/schema/parse/.eslintrc.js index a4dc1d2f71..d74cf51a67 100644 --- a/packages/schema/parse/.eslintrc.js +++ b/packages/schema/parse/.eslintrc.js @@ -33,7 +33,7 @@ module.exports = { leadingUnderscore: "allow" }, //web3 api host methods doesn"t satisfy neither camel or snake - {selector: ["objectLiteralMethod", "typeMethod"], filter: {regex: "^_w3_.*", match: true}, format: null}, + {selector: ["objectLiteralMethod", "typeMethod"], filter: {regex: "^_wrap_.*", match: true}, format: null}, //variable must be in camel or upper case {selector: "variable", format: ["camelCase", "PascalCase", "UPPER_CASE"], leadingUnderscore: "allow"}, //classes and types must be in PascalCase diff --git a/packages/templates/api/assemblyscript/.gitignore b/packages/templates/api/assemblyscript/.gitignore index 5e7557c54b..d2fa03fb18 100644 --- a/packages/templates/api/assemblyscript/.gitignore +++ b/packages/templates/api/assemblyscript/.gitignore @@ -1,4 +1,4 @@ build node_modules -w3 -.w3 +polywrap +.polywrap diff --git a/packages/templates/api/assemblyscript/package.json b/packages/templates/api/assemblyscript/package.json index b4aee5c593..8ae66650f4 100644 --- a/packages/templates/api/assemblyscript/package.json +++ b/packages/templates/api/assemblyscript/package.json @@ -5,17 +5,17 @@ "version": "0.0.1-prealpha.85", "scripts": { "build": "yarn build:contract && yarn build:web3api", - "build:web3api": "npx w3 build", + "build:web3api": "npx polywrap build", "build:contract": "node ./scripts/build-contract.js", - "test:env:up": "npx w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "npx w3 infra down --modules=eth-ens-ipfs", + "test:env:up": "npx polywrap infra up --modules=eth-ens-ipfs", + "test:env:down": "npx polywrap infra down --modules=eth-ens-ipfs", "deploy": "yarn deploy:contract && yarn deploy:web3api", - "deploy:web3api": "npx w3 deploy", + "deploy:web3api": "npx polywrap deploy", "deploy:contract": "node ./scripts/deploy-contract.js", "test": "yarn test:e2e && yarn test:recipe", "test:e2e": "yarn build && yarn test:e2e:codegen && jest --passWithNoTests --runInBand --verbose", - "test:e2e:codegen": "npx w3 app codegen -m ./src/__tests__/types/web3api.app.yaml -c ./src/__tests__/types/w3", - "test:recipe": "yarn build && yarn test:env:up && yarn deploy:contract && npx w3 query ./recipes/e2e.json && yarn test:env:down" + "test:e2e:codegen": "npx polywrap app codegen -m ./src/__tests__/types/web3api.app.yaml -c ./src/__tests__/types/polywrap", + "test:recipe": "yarn build && yarn test:env:up && yarn deploy:contract && npx polywrap query ./recipes/e2e.json && yarn test:env:down" }, "devDependencies": { "@types/jest": "27.0.3", diff --git a/packages/templates/api/assemblyscript/recipes/e2e.json b/packages/templates/api/assemblyscript/recipes/e2e.json index 354abdc098..e5c1dd1edc 100644 --- a/packages/templates/api/assemblyscript/recipes/e2e.json +++ b/packages/templates/api/assemblyscript/recipes/e2e.json @@ -1,6 +1,6 @@ [ { - "api": "w3://fs/./build", + "api": "wrap://fs/./build", "constants": "./constants.json" }, { diff --git a/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts b/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts index e2f74cda87..3c7a850ca7 100644 --- a/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts +++ b/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts @@ -6,7 +6,7 @@ import { providers, ensAddresses } from "@polywrap/test-env-js"; -import * as App from "../types/w3"; +import * as App from "../types/polywrap"; import path from "path"; import { getPlugins } from "../utils"; diff --git a/packages/templates/api/assemblyscript/src/__tests__/types/web3api.app.yaml b/packages/templates/api/assemblyscript/src/__tests__/types/web3api.app.yaml index 62ae0c7495..afaf861b9b 100644 --- a/packages/templates/api/assemblyscript/src/__tests__/types/web3api.app.yaml +++ b/packages/templates/api/assemblyscript/src/__tests__/types/web3api.app.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.1 language: app/typescript schema: ./schema.graphql import_redirects: - - uri: "w3://ens/simple-storage.eth" + - uri: "wrap://ens/simple-storage.eth" schema: "../../../build/schema.graphql" diff --git a/packages/templates/api/assemblyscript/src/__tests__/utils.ts b/packages/templates/api/assemblyscript/src/__tests__/utils.ts index 6c60c39d25..6a7bfb7c12 100644 --- a/packages/templates/api/assemblyscript/src/__tests__/utils.ts +++ b/packages/templates/api/assemblyscript/src/__tests__/utils.ts @@ -12,15 +12,15 @@ export function getPlugins( redirects: [], plugins: [ { - uri: "w3://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.web3api.eth", plugin: ipfsPlugin({ provider: ipfs }), }, { - uri: "w3://ens/ens.web3api.eth", + uri: "wrap://ens/ens.web3api.eth", plugin: ensPlugin({ addresses: { testnet: ensAddress } }), }, { - uri: "w3://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.web3api.eth", plugin: ethereumPlugin({ networks: { testnet: { diff --git a/packages/templates/api/assemblyscript/src/index.ts b/packages/templates/api/assemblyscript/src/index.ts index adb97a3358..6e41a6bd4d 100644 --- a/packages/templates/api/assemblyscript/src/index.ts +++ b/packages/templates/api/assemblyscript/src/index.ts @@ -3,7 +3,7 @@ import { Input_deployContract, Input_setData, Input_getData, -} from "./w3"; +} from "./polywrap"; import { abi, bytecode } from "./contracts/SimpleStorage"; export function getData(input: Input_getData): u32 { diff --git a/packages/templates/api/assemblyscript/src/schema.graphql b/packages/templates/api/assemblyscript/src/schema.graphql index d2d109cdf5..7c14f2ec6e 100644 --- a/packages/templates/api/assemblyscript/src/schema.graphql +++ b/packages/templates/api/assemblyscript/src/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "w3://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" type Module { getData( diff --git a/packages/templates/api/interface/.gitignore b/packages/templates/api/interface/.gitignore index 1e8f0fdefe..a15402b528 100644 --- a/packages/templates/api/interface/.gitignore +++ b/packages/templates/api/interface/.gitignore @@ -1,3 +1,3 @@ build node_modules -w3 +polywrap diff --git a/packages/templates/api/interface/package.json b/packages/templates/api/interface/package.json index 99f6913eb2..556fb66b8a 100644 --- a/packages/templates/api/interface/package.json +++ b/packages/templates/api/interface/package.json @@ -4,10 +4,10 @@ "private": true, "version": "0.0.1-prealpha.85", "scripts": { - "build": "npx w3 build", - "test:env:up": "npx w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "npx w3 infra down --modules=eth-ens-ipfs", - "deploy": "npx w3 deploy", + "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:env:up && yarn deploy && yarn test:env:down" }, "devDependencies": { diff --git a/packages/templates/app/typescript-node/package.json b/packages/templates/app/typescript-node/package.json index 13d499a393..74a2a8bdab 100644 --- a/packages/templates/app/typescript-node/package.json +++ b/packages/templates/app/typescript-node/package.json @@ -4,7 +4,7 @@ "private": true, "version": "0.0.1-prealpha.85", "scripts": { - "build": "npx w3 app codegen", + "build": "npx polywrap app codegen", "test": "ts-node ./src/index.ts" }, "dependencies": { diff --git a/packages/templates/app/typescript-node/src/index.ts b/packages/templates/app/typescript-node/src/index.ts index 144273f38b..9528216e0a 100644 --- a/packages/templates/app/typescript-node/src/index.ts +++ b/packages/templates/app/typescript-node/src/index.ts @@ -1,4 +1,4 @@ -import { HelloWorld_Module, Ethereum_Module } from "./w3"; +import { HelloWorld_Module, Ethereum_Module } from "./polywrap"; import { Web3ApiClient } from "@polywrap/client-js"; diff --git a/packages/templates/app/typescript-react/package.json b/packages/templates/app/typescript-react/package.json index 10670f6ac1..3f49140435 100644 --- a/packages/templates/app/typescript-react/package.json +++ b/packages/templates/app/typescript-react/package.json @@ -34,7 +34,7 @@ "prestart": "yarn codegen", "build": "react-scripts build", "prebuild": "yarn codegen", - "codegen": "npx w3 app codegen", + "codegen": "npx polywrap app codegen", "test": "react-scripts test", "eject": "react-scripts eject" }, diff --git a/packages/templates/app/typescript-react/src/HelloWorld.tsx b/packages/templates/app/typescript-react/src/HelloWorld.tsx index d27ef19603..d9478f204e 100644 --- a/packages/templates/app/typescript-react/src/HelloWorld.tsx +++ b/packages/templates/app/typescript-react/src/HelloWorld.tsx @@ -1,4 +1,4 @@ -import { HelloWorld_Query } from './w3'; +import { HelloWorld_Query } from './polywrap'; import React from 'react'; import { useWeb3ApiClient } from '@polywrap/react'; import { ToastContainer, toast } from 'react-toastify'; diff --git a/packages/templates/plugin/typescript/package.json b/packages/templates/plugin/typescript/package.json index 3a6baec50b..93ab79ef35 100644 --- a/packages/templates/plugin/typescript/package.json +++ b/packages/templates/plugin/typescript/package.json @@ -6,7 +6,7 @@ "main": "build/index.js", "scripts": { "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.json", - "codegen": "npx w3 plugin codegen", + "codegen": "npx polywrap plugin codegen", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", "test:watch": "jest --watch --passWithNoTests --verbose" diff --git a/packages/templates/plugin/typescript/src/index.ts b/packages/templates/plugin/typescript/src/index.ts index 0abda3a22b..0646ba08fb 100644 --- a/packages/templates/plugin/typescript/src/index.ts +++ b/packages/templates/plugin/typescript/src/index.ts @@ -1,4 +1,4 @@ -import { Module, Input_sampleMethod, manifest } from "./w3"; +import { Module, Input_sampleMethod, manifest } from "./polywrap"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/schema.graphql b/packages/test-cases/cases/apis/wasm-as/asyncify/schema.graphql index af98e37e47..75e23c020a 100644 --- a/packages/test-cases/cases/apis/wasm-as/asyncify/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-as/asyncify/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "w3://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" type Module { getData( diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/src/index.ts b/packages/test-cases/cases/apis/wasm-as/asyncify/src/index.ts index 35364ed3a4..b95a41454d 100644 --- a/packages/test-cases/cases/apis/wasm-as/asyncify/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/asyncify/src/index.ts @@ -8,7 +8,7 @@ import { Input_setDataWithManyArgs, Input_setDataWithManyStructuredArgs, Ethereum_Module, -} from "./w3"; +} from "./polywrap"; export function getData(input: Input_getData): u32 { const res = Ethereum_Module.callContractView({ diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts b/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts index 961d280d44..2468686c59 100644 --- a/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts @@ -1,6 +1,6 @@ import { Input_method -} from "./w3"; +} from "./polywrap"; import { BigInt } from "@polywrap/wasm-as"; export function method(input: Input_method): BigInt { diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts b/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts index 23f49b93df..f37f0b2641 100644 --- a/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts @@ -1,6 +1,6 @@ import { Input_method -} from "./w3"; +} from "./polywrap"; import { BigNumber } from "@polywrap/wasm-as"; export function method(input: Input_method): BigNumber { diff --git a/packages/test-cases/cases/apis/wasm-as/bytes-type/src/index.ts b/packages/test-cases/cases/apis/wasm-as/bytes-type/src/index.ts index 8a3fec2d17..4fb4403278 100644 --- a/packages/test-cases/cases/apis/wasm-as/bytes-type/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/bytes-type/src/index.ts @@ -1,6 +1,6 @@ import { Input_bytesMethod -} from "./w3"; +} from "./polywrap"; export function bytesMethod(input: Input_bytesMethod): ArrayBuffer { const argStr = String.UTF8.decode(input.arg.prop); diff --git a/packages/test-cases/cases/apis/wasm-as/enum-types/src/index.ts b/packages/test-cases/cases/apis/wasm-as/enum-types/src/index.ts index bb80eca642..de59a04f0c 100644 --- a/packages/test-cases/cases/apis/wasm-as/enum-types/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/enum-types/src/index.ts @@ -2,7 +2,7 @@ import { SanityEnum, Input_method1, Input_method2, -} from "./w3"; +} from "./polywrap"; export function method1(input: Input_method1): SanityEnum { return input.en; diff --git a/packages/test-cases/cases/apis/wasm-as/env-client-types/src/index.ts b/packages/test-cases/cases/apis/wasm-as/env-client-types/src/index.ts index e4303c7076..4968ff9200 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-client-types/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/env-client-types/src/index.ts @@ -3,7 +3,7 @@ import { Input_environment, Input_sanitizeEnv, Env -} from "./w3"; +} from "./polywrap"; export function environment(input: Input_environment): Env { return env as Env; diff --git a/packages/test-cases/cases/apis/wasm-as/env-types/src/index.ts b/packages/test-cases/cases/apis/wasm-as/env-types/src/index.ts index a4ba0e3286..f8a4de5ff5 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-types/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/env-types/src/index.ts @@ -2,7 +2,7 @@ import { env, Env, Input_moduleEnv, -} from "./w3"; +} from "./polywrap"; export function moduleEnv(input: Input_moduleEnv): Env { return env as Env; diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/schema.graphql b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/schema.graphql index 781bd43984..0b28cfb495 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, InterfaceType } into Interface from "w3://ens/interface.eth" +#import { Module, InterfaceType } into Interface from "wrap://ens/interface.eth" type Module implements Interface_Module { moduleMethod( diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/src/index.ts b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/src/index.ts index 6c1ac5b146..d2d6eaa93d 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/src/index.ts @@ -1,4 +1,4 @@ -import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType } from "./w3"; +import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType } from "./polywrap"; export function moduleMethod(input: Input_moduleMethod): ImplementationType { return input.arg; diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.yaml b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.yaml index 3d8ba3e13c..2e491ccbb0 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.yaml +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.yaml @@ -5,5 +5,5 @@ language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts import_redirects: - - uri: w3://ens/interface.eth + - uri: wrap://ens/interface.eth schema: ../test-interface/build/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/schema.graphql b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/schema.graphql index 9dcfb190ac..bd51ae7828 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, InterfaceType } into Interface from "w3://ens/interface.eth" +#import { Module, InterfaceType } into Interface from "wrap://ens/interface.eth" #use { getImplementations } for Interface type Module implements Interface_Module { diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/src/index.ts b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/src/index.ts index c8681a0295..77e9d502b1 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/src/index.ts @@ -1,4 +1,4 @@ -import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType, Interface } from "./w3"; +import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType, Interface } from "./polywrap"; export function moduleImplementations(): string[] { return Interface.getImplementations(); diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.yaml b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.yaml index ffef20364f..1ea1375a29 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.yaml +++ b/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.yaml @@ -5,5 +5,5 @@ language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts import_redirects: - - uri: w3://ens/interface.eth + - uri: wrap://ens/interface.eth schema: ../test-interface/build/schema.graphql \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/schema.graphql b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/schema.graphql index 23dd84fccb..408e02f804 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, InterfaceType } into Interface from "w3://ens/interface.eth" +#import { Module, InterfaceType } into Interface from "wrap://ens/interface.eth" #use { getImplementations } for Interface type Module { diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/src/index.ts b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/src/index.ts index 728c93b85d..dd3014d327 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/src/index.ts @@ -3,7 +3,7 @@ import { Interface_Module, Input_moduleMethod, ImplementationType -} from "./w3"; +} from "./polywrap"; export function moduleMethod(input: Input_moduleMethod): ImplementationType { const uris = Interface.getImplementations(); diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.yaml b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.yaml index 5493e5ed05..ef3a0030cc 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.yaml +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.yaml @@ -5,5 +5,5 @@ language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts import_redirects: - - uri: w3://ens/interface.eth + - uri: wrap://ens/interface.eth schema: ../test-interface/build/schema.graphql \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/schema.graphql b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/schema.graphql index 781bd43984..0b28cfb495 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, InterfaceType } into Interface from "w3://ens/interface.eth" +#import { Module, InterfaceType } into Interface from "wrap://ens/interface.eth" type Module implements Interface_Module { moduleMethod( diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/src/index.ts b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/src/index.ts index 6c1ac5b146..d2d6eaa93d 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/src/index.ts @@ -1,4 +1,4 @@ -import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType } from "./w3"; +import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType } from "./polywrap"; export function moduleMethod(input: Input_moduleMethod): ImplementationType { return input.arg; diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.yaml b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.yaml index 2e9e3f5c9a..3844df462c 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.yaml +++ b/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.yaml @@ -5,5 +5,5 @@ language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts import_redirects: - - uri: w3://ens/interface.eth + - uri: wrap://ens/interface.eth schema: ../test-interface/build/schema.graphql \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/invalid-types/src/index.ts b/packages/test-cases/cases/apis/wasm-as/invalid-types/src/index.ts index b2e8b9c980..6625867e20 100644 --- a/packages/test-cases/cases/apis/wasm-as/invalid-types/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/invalid-types/src/index.ts @@ -4,7 +4,7 @@ import { Input_arrayMethod, Input_intMethod, Input_uIntMethod -} from "./w3"; +} from "./polywrap"; export function boolMethod(input: Input_boolMethod): bool { return input.arg; diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts b/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts index 14b73ad2aa..190e75728c 100644 --- a/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts @@ -2,7 +2,7 @@ import { Input_fromJson, Input_toJson, Pair -} from "./w3"; +} from "./polywrap"; import { JSON } from "@polywrap/wasm-as"; export function fromJson(input: Input_fromJson): Pair { diff --git a/packages/test-cases/cases/apis/wasm-as/large-types/src/index.ts b/packages/test-cases/cases/apis/wasm-as/large-types/src/index.ts index cabcd75a69..d114128c94 100644 --- a/packages/test-cases/cases/apis/wasm-as/large-types/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/large-types/src/index.ts @@ -1,7 +1,7 @@ import { Input_method, LargeCollection, -} from "./w3"; +} from "./polywrap"; export function method(input: Input_method): LargeCollection { return input.largeCollection; diff --git a/packages/test-cases/cases/apis/wasm-as/map-type/src/index.ts b/packages/test-cases/cases/apis/wasm-as/map-type/src/index.ts index 99bf80323e..87cb22c7f7 100644 --- a/packages/test-cases/cases/apis/wasm-as/map-type/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/map-type/src/index.ts @@ -1,7 +1,7 @@ import { Input_getKey, Input_returnMap -} from "./w3"; +} from "./polywrap"; export function getKey(input: Input_getKey): i32 { let result = input.map.get(input.key); diff --git a/packages/test-cases/cases/apis/wasm-as/number-types/src/index.ts b/packages/test-cases/cases/apis/wasm-as/number-types/src/index.ts index 5077ea26b9..b72b7444ad 100644 --- a/packages/test-cases/cases/apis/wasm-as/number-types/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/number-types/src/index.ts @@ -5,7 +5,7 @@ import { Input_u16Method, Input_i32Method, Input_u32Method, -} from "./w3"; +} from "./polywrap"; export function i8Method(input: Input_i8Method): i8 { const firstInt = input.first; diff --git a/packages/test-cases/cases/apis/wasm-as/object-types/src/index.ts b/packages/test-cases/cases/apis/wasm-as/object-types/src/index.ts index 94da635c5e..cd3fd88b7b 100644 --- a/packages/test-cases/cases/apis/wasm-as/object-types/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/object-types/src/index.ts @@ -5,7 +5,7 @@ import { Input_method5, Output, Arg2 -} from "./w3"; +} from "./polywrap"; export function method1(input: Input_method1): Output[] { return [ diff --git a/packages/test-cases/cases/apis/wasm-as/reserved-words/src/index.ts b/packages/test-cases/cases/apis/wasm-as/reserved-words/src/index.ts index 729e944eca..6bb3edf565 100644 --- a/packages/test-cases/cases/apis/wasm-as/reserved-words/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/reserved-words/src/index.ts @@ -1,7 +1,7 @@ import { Input_method1, Result, -} from "./w3"; +} from "./polywrap"; export function method1(input: Input_method1): Result { return { diff --git a/packages/test-cases/cases/apis/wasm-as/simple-env-types/src/index.ts b/packages/test-cases/cases/apis/wasm-as/simple-env-types/src/index.ts index fa6c7ee82c..6ea935d023 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-env-types/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/simple-env-types/src/index.ts @@ -1,4 +1,4 @@ -import { env, Env, Input_getEnv } from "./w3"; +import { env, Env, Input_getEnv } from "./polywrap"; export function getEnv(input: Input_getEnv): Env { return env as Env; diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/schema.graphql b/packages/test-cases/cases/apis/wasm-as/simple-storage/schema.graphql index d66625ec9d..b951d40938 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-storage/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-as/simple-storage/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "w3://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" type Module { getData( diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/src/index.ts b/packages/test-cases/cases/apis/wasm-as/simple-storage/src/index.ts index f3f58ffa37..8b6cddd166 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-storage/src/index.ts +++ b/packages/test-cases/cases/apis/wasm-as/simple-storage/src/index.ts @@ -1,11 +1,11 @@ -import { Ethereum_Module } from "./w3/imported"; +import { Ethereum_Module } from "./polywrap/imported"; import { Input_getData, Input_tryGetData, Input_throwGetData, Input_setData, Input_deployContract -} from "./w3"; +} from "./polywrap"; export function getData(input: Input_getData): u32 { const res = Ethereum_Module.callContractView({ diff --git a/packages/test-cases/cases/apis/wasm-rs/asyncify/schema.graphql b/packages/test-cases/cases/apis/wasm-rs/asyncify/schema.graphql index af98e37e47..75e23c020a 100644 --- a/packages/test-cases/cases/apis/wasm-rs/asyncify/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-rs/asyncify/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "w3://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" type Module { getData( diff --git a/packages/test-cases/cases/apis/wasm-rs/asyncify/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/asyncify/src/lib.rs index 38edeb2583..755d06b1cb 100644 --- a/packages/test-cases/cases/apis/wasm-rs/asyncify/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/asyncify/src/lib.rs @@ -1,8 +1,8 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; use web3api_wasm_rs::JSON; -use w3::imported::ethereum_module; -use w3::module; +use polywrap::imported::ethereum_module; +use polywrap::module; pub fn get_data(input: module::InputGetData) -> u32 { match EthereumModule::call_contract_view( diff --git a/packages/test-cases/cases/apis/wasm-rs/bigint-type/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/bigint-type/src/lib.rs index cd00d90942..9c6df619f5 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bigint-type/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/bigint-type/src/lib.rs @@ -1,8 +1,8 @@ use std::ops::Mul; use web3api_wasm_rs::BigInt; -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn method(input: InputMethod) -> BigInt { let mut result = input.arg1.mul(input.obj.prop1); diff --git a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/bignumber-type/src/lib.rs index 269e001b6a..1c0c93b4ab 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/bignumber-type/src/lib.rs @@ -1,8 +1,8 @@ use std::ops::Mul; use web3api_wasm_rs::BigNumber; -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn method(input: InputMethod) -> BigNumber { let mut result = input.arg1.mul(input.obj.prop1); diff --git a/packages/test-cases/cases/apis/wasm-rs/bytes-type/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/bytes-type/src/lib.rs index 2fa6586ed1..5aafffc5f0 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bytes-type/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/bytes-type/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn bytes_method(input: InputBytesMethod) -> Vec { let arg_str = match String::from_utf8(input.arg.prop) { diff --git a/packages/test-cases/cases/apis/wasm-rs/enum-types/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/enum-types/src/lib.rs index f4e80afeef..02190abd4a 100644 --- a/packages/test-cases/cases/apis/wasm-rs/enum-types/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/enum-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn method1(input: InputMethod1) -> SanityEnum { input.en diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/schema.graphql b/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/schema.graphql index 781bd43984..0b28cfb495 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, InterfaceType } into Interface from "w3://ens/interface.eth" +#import { Module, InterfaceType } into Interface from "wrap://ens/interface.eth" type Module implements Interface_Module { moduleMethod( diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/src/lib.rs index c5d4fcdd94..845d2786f1 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn module_method(input: InputModuleMethod) -> ImplementationType { input.arg diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.yaml b/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.yaml index 98bc8fdf58..eb24e991f3 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.yaml +++ b/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.yaml @@ -5,5 +5,5 @@ build: ./web3api.build.yaml schema: ./schema.graphql module: ./Cargo.toml import_redirects: - - uri: w3://ens/interface.eth + - uri: wrap://ens/interface.eth schema: ../test-interface/build/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/schema.graphql b/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/schema.graphql index 9dcfb190ac..bd51ae7828 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, InterfaceType } into Interface from "w3://ens/interface.eth" +#import { Module, InterfaceType } into Interface from "wrap://ens/interface.eth" #use { getImplementations } for Interface type Module implements Interface_Module { diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/src/lib.rs index cb6a4445c7..0db6aff8b4 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn module_implementations() -> Vec { Interface::get_implementations() diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.yaml b/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.yaml index 21114a9bea..707980246b 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.yaml +++ b/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.yaml @@ -5,5 +5,5 @@ language: wasm/rust schema: ./schema.graphql module: ./Cargo.toml import_redirects: - - uri: w3://ens/interface.eth + - uri: wrap://ens/interface.eth schema: ../test-interface/build/schema.graphql \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-rs/invalid-types/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/invalid-types/src/lib.rs index 315da95fb6..463d54cdd2 100644 --- a/packages/test-cases/cases/apis/wasm-rs/invalid-types/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/invalid-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn bool_method(input: InputBoolMethod) -> bool { input.arg diff --git a/packages/test-cases/cases/apis/wasm-rs/json-type/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/json-type/src/lib.rs index 07d922eb3f..1bf10bbda0 100644 --- a/packages/test-cases/cases/apis/wasm-rs/json-type/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/json-type/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; use web3api_wasm_rs::JSON; use serde_json::*; diff --git a/packages/test-cases/cases/apis/wasm-rs/large-types/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/large-types/src/lib.rs index 5522be6fb8..858a9f0998 100644 --- a/packages/test-cases/cases/apis/wasm-rs/large-types/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/large-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn method(input: InputMethod) -> LargeCollection { input.large_collection diff --git a/packages/test-cases/cases/apis/wasm-rs/map-type/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/map-type/src/lib.rs index 6fd47e974a..ef3396bc9b 100644 --- a/packages/test-cases/cases/apis/wasm-rs/map-type/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/map-type/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; use web3api_wasm_rs::Map; pub fn get_key(input: InputGetKey) -> i32 { diff --git a/packages/test-cases/cases/apis/wasm-rs/number-types/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/number-types/src/lib.rs index 39df7c93ae..1df2cd0305 100644 --- a/packages/test-cases/cases/apis/wasm-rs/number-types/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/number-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn i8_method(input: InputI8Method) -> i8 { input.first + input.second diff --git a/packages/test-cases/cases/apis/wasm-rs/object-types/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/object-types/src/lib.rs index 0785373e8e..728a1e5963 100644 --- a/packages/test-cases/cases/apis/wasm-rs/object-types/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/object-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod w3; -pub use w3::*; +pub mod polywrap; +pub use polywrap::*; pub fn method1(input: InputMethod1) -> Vec { vec![ diff --git a/packages/test-cases/cases/apis/wasm-rs/simple-storage/schema.graphql b/packages/test-cases/cases/apis/wasm-rs/simple-storage/schema.graphql index d66625ec9d..b951d40938 100644 --- a/packages/test-cases/cases/apis/wasm-rs/simple-storage/schema.graphql +++ b/packages/test-cases/cases/apis/wasm-rs/simple-storage/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "w3://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" type Module { getData( diff --git a/packages/test-cases/cases/apis/wasm-rs/simple-storage/src/lib.rs b/packages/test-cases/cases/apis/wasm-rs/simple-storage/src/lib.rs index b0a28bdbc4..6fddb667ef 100644 --- a/packages/test-cases/cases/apis/wasm-rs/simple-storage/src/lib.rs +++ b/packages/test-cases/cases/apis/wasm-rs/simple-storage/src/lib.rs @@ -1,7 +1,7 @@ -pub mod w3; +pub mod polywrap; use web3api_wasm_rs::JSON; -use w3::imported::ethereum_module; -pub use w3::*; +use polywrap::imported::ethereum_module; +pub use polywrap::*; pub fn get_data(input: InputGetData) -> i32 { match EthereumModule::call_contract_view(ðereum_module::InputCallContractView { diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/TestImport/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/TestImport/index.ts index b82721c695..8ab00e6d1c 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/TestImport/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/TestImport/index.ts @@ -1,11 +1,11 @@ import { - w3_getImplementations + wrap_getImplementations } from "@polywrap/wasm-as"; export class TestImport { static uri: string = "testimport.uri.eth" public static getImplementations(): string[] { - return w3_getImplementations(this.uri); + return wrap_getImplementations(this.uri); } } \ No newline at end of file diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/entry.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/entry.ts index e152595cf0..5299535000 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/entry.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/entry.ts @@ -1,9 +1,9 @@ import { - w3_invoke_args, - w3_invoke, - w3_load_env, - w3_sanitize_env, - w3_abort, + wrap_invoke_args, + wrap_invoke, + wrap_load_env, + wrap_sanitize_env, + wrap_abort, InvokeArgs } from "@polywrap/wasm-as"; @@ -18,35 +18,35 @@ import { Env } from "./Env"; -export function _w3_invoke(method_size: u32, args_size: u32): bool { - const args: InvokeArgs = w3_invoke_args( +export function _wrap_invoke(method_size: u32, args_size: u32): bool { + const args: InvokeArgs = wrap_invoke_args( method_size, args_size ); if (args.method == "moduleMethod") { - return w3_invoke(args, moduleMethodWrapped); + return wrap_invoke(args, moduleMethodWrapped); } else if (args.method == "objectMethod") { - return w3_invoke(args, objectMethodWrapped); + return wrap_invoke(args, objectMethodWrapped); } else { - return w3_invoke(args, null); + return wrap_invoke(args, null); } } -export function _w3_load_env(env_size: u32): void { - const envBuf = w3_load_env(env_size); +export function _wrap_load_env(env_size: u32): void { + const envBuf = wrap_load_env(env_size); env = Env.fromBuffer(envBuf); } -export function w3Abort( +export function wrapAbort( msg: string | null, file: string | null, line: u32, column: u32 ): void { - w3_abort( + wrap_abort( msg ? msg : "", file ? file : "", line, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/index.ts b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/index.ts index 5114d786bd..5246bae2bd 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/wasm-as/imported/TestImport_Module/index.ts @@ -1,6 +1,6 @@ import { - w3_subinvoke, - w3_subinvokeImplementation, + wrap_subinvoke, + wrap_subinvokeImplementation, Nullable, BigInt, BigNumber, @@ -31,7 +31,7 @@ export class TestImport_Module { input: Input_importedMethod ): Result { const args = serializeimportedMethodArgs(input); - const result = w3_subinvokeImplementation( + const result = wrap_subinvokeImplementation( "testimport.uri.eth", this.uri, "importedMethod", @@ -53,7 +53,7 @@ export class TestImport_Module { input: Input_anotherMethod ): Result { const args = serializeanotherMethodArgs(input); - const result = w3_subinvokeImplementation( + const result = wrap_subinvokeImplementation( "testimport.uri.eth", this.uri, "anotherMethod", diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/entry.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/entry.rs index 03006f664b..7fd9b6e14d 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/entry.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/entry.rs @@ -8,17 +8,17 @@ use web3api_wasm_rs::{ InvokeArgs, }; -#[cfg(feature = "w3-invoke")] +#[cfg(feature = "wrap-invoke")] #[no_mangle] -pub extern "C" fn _w3_invoke(method_size: u32, args_size: u32) -> bool { +pub extern "C" fn _wrap_invoke(method_size: u32, args_size: u32) -> bool { // Ensure the abort handler is properly setup - abort::w3_abort_setup(); + abort::wrap_abort_setup(); - let args: InvokeArgs = invoke::w3_invoke_args(method_size, args_size); + let args: InvokeArgs = invoke::wrap_invoke_args(method_size, args_size); match args.method.as_str() { - "moduleMethod" => invoke::w3_invoke(args, Some(module_method_wrapped)), - "objectMethod" => invoke::w3_invoke(args, Some(object_method_wrapped)), - _ => invoke::w3_invoke(args, None), + "moduleMethod" => invoke::wrap_invoke(args, Some(module_method_wrapped)), + "objectMethod" => invoke::wrap_invoke(args, Some(object_method_wrapped)), + _ => invoke::wrap_invoke(args, None), } } diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/mod.rs index 7b9bac0d54..63deb2ade7 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/mod.rs @@ -34,7 +34,7 @@ impl TestImportModule { pub fn imported_method(input: &InputImportedMethod) -> Result, String> { let uri = TestImportModule::URI; let args = serialize_imported_method_args(input).map_err(|e| e.to_string())?; - let result = subinvoke::w3_subinvoke( + let result = subinvoke::wrap_subinvoke( uri, "importedMethod", args, @@ -45,7 +45,7 @@ impl TestImportModule { pub fn another_method(input: &InputAnotherMethod) -> Result { let uri = TestImportModule::URI; let args = serialize_another_method_args(input).map_err(|e| e.to_string())?; - let result = subinvoke::w3_subinvoke( + let result = subinvoke::wrap_subinvoke( uri, "anotherMethod", args, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/test_import/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/test_import/mod.rs index c66e8c4e66..7cc90c771b 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/test_import/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/test_import/mod.rs @@ -1,4 +1,4 @@ -use web3api_wasm_rs::w3_get_implementations; +use web3api_wasm_rs::wrap_get_implementations; pub struct TestImport {} @@ -6,6 +6,6 @@ impl TestImport { const uri: &'static str = "testimport.uri.eth"; pub fn get_implementations() -> Vec { - w3_get_implementations(Self::uri) + wrap_get_implementations(Self::uri) } } \ No newline at end of file diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json b/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/index.ts +++ b/packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json b/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/index.ts +++ b/packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json b/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/index.ts +++ b/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile index 92c21b6ded..f7447179d3 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile +++ b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile @@ -9,7 +9,7 @@ RUN apk --no-cache --virtual build-dependencies add \ WORKDIR /linked-packages -COPY .w3/web3api/build/linked-packages/@polywrap/wasm-as ./@polywrap/wasm-as +COPY .polywrap/web3api/build/linked-packages/@polywrap/wasm-as ./@polywrap/wasm-as WORKDIR /project @@ -28,10 +28,10 @@ COPY ./src ./src COPY ./package.json ./package.json # Build the module at src -RUN ./node_modules/.bin/asc src/w3/entry.ts \ +RUN ./node_modules/.bin/asc src/polywrap/entry.ts \ --path ./node_modules \ --outFile ./build/module.wasm \ - --use abort=src/w3/entry/w3Abort \ + --use abort=src/polywrap/entry/wrapAbort \ --optimize --debug --importMemory \ --runtime stub \ --runPasses asyncify diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/index.ts +++ b/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/index.ts +++ b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/index.ts +++ b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/expected/output.json b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/expected/output.json index f224e5d9cb..eb209aa6d5 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/expected/output.json +++ b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/expected/output.json @@ -8,7 +8,7 @@ ], "exitCode": 0, "files": [ - ".w3/web3api/build/image/cache/index.json", - ".w3/web3api/build/image/cache/blobs/sha256/" + ".polywrap/web3api/build/image/cache/index.json", + ".polywrap/web3api/build/image/cache/blobs/sha256/" ] } diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json index a1ea7d1610..934b9abfb0 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json +++ b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/index.ts +++ b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json b/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json +++ b/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/src/index.ts b/packages/test-cases/cases/cli/api/codegen/001-sanity/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/codegen/001-sanity/src/index.ts +++ b/packages/test-cases/cases/cli/api/codegen/001-sanity/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json +++ b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/src/index.ts b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/src/index.ts +++ b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json index c7ad6ced55..06c2689137 100644 --- a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json +++ b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json @@ -4,7 +4,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build" + "build": "polywrap build" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/src/index.ts b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/src/index.ts index 6d5ba30c9d..0a0cc28044 100644 --- a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/src/index.ts +++ b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./w3"; +import { Input_method } from "./polywrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json b/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json index c5153f2dbb..ae9e395c81 100644 --- a/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json +++ b/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json @@ -4,10 +4,10 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build", - "deploy": "w3 deploy", - "test:env:up": "w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "w3 infra down --modules=eth-ens-ipfs" + "build": "polywrap build", + "deploy": "polywrap deploy", + "test:env:up": "polywrap infra up --modules=eth-ens-ipfs", + "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/src/index.ts b/packages/test-cases/cases/cli/api/deploy/001-sanity/src/index.ts index 0b5ae11277..c51c40ae58 100644 --- a/packages/test-cases/cases/cli/api/deploy/001-sanity/src/index.ts +++ b/packages/test-cases/cases/cli/api/deploy/001-sanity/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./w3"; +import { Input_get } from "./polywrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json b/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json index c5153f2dbb..ae9e395c81 100644 --- a/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json +++ b/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json @@ -4,10 +4,10 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build", - "deploy": "w3 deploy", - "test:env:up": "w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "w3 infra down --modules=eth-ens-ipfs" + "build": "polywrap build", + "deploy": "polywrap deploy", + "test:env:up": "polywrap infra up --modules=eth-ens-ipfs", + "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/src/index.ts b/packages/test-cases/cases/cli/api/deploy/002-no-ext/src/index.ts index 0b5ae11277..c51c40ae58 100644 --- a/packages/test-cases/cases/cli/api/deploy/002-no-ext/src/index.ts +++ b/packages/test-cases/cases/cli/api/deploy/002-no-ext/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./w3"; +import { Input_get } from "./polywrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json b/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json index c5153f2dbb..ae9e395c81 100644 --- a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json +++ b/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json @@ -4,10 +4,10 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build", - "deploy": "w3 deploy", - "test:env:up": "w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "w3 infra down --modules=eth-ens-ipfs" + "build": "polywrap build", + "deploy": "polywrap deploy", + "test:env:up": "polywrap infra up --modules=eth-ens-ipfs", + "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/src/index.ts b/packages/test-cases/cases/cli/api/deploy/003-invalid-config/src/index.ts index 0b5ae11277..c51c40ae58 100644 --- a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/src/index.ts +++ b/packages/test-cases/cases/cli/api/deploy/003-invalid-config/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./w3"; +import { Input_get } from "./polywrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json b/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json index c5153f2dbb..ae9e395c81 100644 --- a/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json +++ b/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json @@ -4,10 +4,10 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build", - "deploy": "w3 deploy", - "test:env:up": "w3 infra up --modules=eth-ens-ipfs", - "test:env:down": "w3 infra down --modules=eth-ens-ipfs" + "build": "polywrap build", + "deploy": "polywrap deploy", + "test:env:up": "polywrap infra up --modules=eth-ens-ipfs", + "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/src/index.ts b/packages/test-cases/cases/cli/api/deploy/004-fail-between/src/index.ts index 0b5ae11277..c51c40ae58 100644 --- a/packages/test-cases/cases/cli/api/deploy/004-fail-between/src/index.ts +++ b/packages/test-cases/cases/cli/api/deploy/004-fail-between/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./w3"; +import { Input_get } from "./polywrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json index dee3802c65..1ead2be272 100644 --- a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json +++ b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json @@ -4,10 +4,10 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build", - "deploy": "w3 deploy", - "test:env:up": "w3 test-env up", - "test:env:down": "w3 test-env down" + "build": "polywrap build", + "deploy": "polywrap deploy", + "test:env:up": "polywrap test-env up", + "test:env:down": "polywrap test-env down" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.72" diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/src/index.ts b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/src/index.ts index 0b5ae11277..c51c40ae58 100644 --- a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/src/index.ts +++ b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./w3"; +import { Input_get } from "./polywrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/query/client-async-config.js b/packages/test-cases/cases/cli/api/query/client-async-config.js index a133eb7ca6..cafb9c8356 100644 --- a/packages/test-cases/cases/cli/api/query/client-async-config.js +++ b/packages/test-cases/cases/cli/api/query/client-async-config.js @@ -25,21 +25,21 @@ const mockPlugin = () => { async function getClientConfig(defaultConfigs) { if (defaultConfigs.plugins) { defaultConfigs.plugins.push({ - uri: "w3://ens/mock.eth", + uri: "wrap://ens/mock.eth", plugin: mockPlugin(), }); } else { defaultConfigs.plugins = [ { - uri: "w3://ens/mock.eth", + uri: "wrap://ens/mock.eth", plugin: mockPlugin(), }, ]; } defaultConfigs.redirects = [ { - from: "w3://ens/testnet/simplestorage.eth", - to: "w3://ens/mock.eth", + from: "wrap://ens/testnet/simplestorage.eth", + to: "wrap://ens/mock.eth", }, ]; return defaultConfigs; diff --git a/packages/test-cases/cases/cli/api/query/client-async-config.ts b/packages/test-cases/cases/cli/api/query/client-async-config.ts index 171eca442f..e4105e496c 100644 --- a/packages/test-cases/cases/cli/api/query/client-async-config.ts +++ b/packages/test-cases/cases/cli/api/query/client-async-config.ts @@ -29,21 +29,21 @@ const mockPlugin = () => { export async function getClientConfig(defaultConfigs: Partial): Promise> { if (defaultConfigs.plugins) { defaultConfigs.plugins.push({ - uri: "w3://ens/mock.eth", + uri: "wrap://ens/mock.eth", plugin: mockPlugin(), }); } else { defaultConfigs.plugins = [ { - uri: "w3://ens/mock.eth", + uri: "wrap://ens/mock.eth", plugin: mockPlugin(), }, ]; } defaultConfigs.redirects = [ { - from: "w3://ens/testnet/simplestorage.eth", - to: "w3://ens/mock.eth", + from: "wrap://ens/testnet/simplestorage.eth", + to: "wrap://ens/mock.eth", }, ]; return defaultConfigs; diff --git a/packages/test-cases/cases/cli/api/query/client-config.js b/packages/test-cases/cases/cli/api/query/client-config.js index acdf73f2a2..711b490b7c 100644 --- a/packages/test-cases/cases/cli/api/query/client-config.js +++ b/packages/test-cases/cases/cli/api/query/client-config.js @@ -26,21 +26,21 @@ const mockPlugin = () => { function getClientConfig(defaultConfigs) { if (defaultConfigs.plugins) { defaultConfigs.plugins.push({ - uri: "w3://ens/mock.eth", + uri: "wrap://ens/mock.eth", plugin: mockPlugin(), }); } else { defaultConfigs.plugins = [ { - uri: "w3://ens/mock.eth", + uri: "wrap://ens/mock.eth", plugin: mockPlugin(), }, ]; } defaultConfigs.redirects = [ { - from: "w3://ens/testnet/simplestorage.eth", - to: "w3://ens/mock.eth", + from: "wrap://ens/testnet/simplestorage.eth", + to: "wrap://ens/mock.eth", }, ]; return defaultConfigs; diff --git a/packages/test-cases/cases/cli/api/query/client-config.ts b/packages/test-cases/cases/cli/api/query/client-config.ts index 95133c8685..7e7a9594ed 100644 --- a/packages/test-cases/cases/cli/api/query/client-config.ts +++ b/packages/test-cases/cases/cli/api/query/client-config.ts @@ -30,21 +30,21 @@ const mockPlugin = () => { export function getClientConfig(defaultConfigs: Partial) { if (defaultConfigs.plugins) { defaultConfigs.plugins.push({ - uri: "w3://ens/mock.eth", + uri: "wrap://ens/mock.eth", plugin: mockPlugin(), }); } else { defaultConfigs.plugins = [ { - uri: "w3://ens/mock.eth", + uri: "wrap://ens/mock.eth", plugin: mockPlugin(), }, ]; } defaultConfigs.redirects = [ { - from: "w3://ens/testnet/simplestorage.eth", - to: "w3://ens/mock.eth", + from: "wrap://ens/testnet/simplestorage.eth", + to: "wrap://ens/mock.eth", }, ]; return defaultConfigs; diff --git a/packages/test-cases/cases/cli/api/query/package.json b/packages/test-cases/cases/cli/api/query/package.json index c2600551ff..249d1407e3 100644 --- a/packages/test-cases/cases/cli/api/query/package.json +++ b/packages/test-cases/cases/cli/api/query/package.json @@ -4,10 +4,10 @@ "license": "MIT", "private": true, "scripts": { - "build": "w3 build", + "build": "polywrap build", "contracts:deploy": "node ./deploy-contracts.js", - "test:env:up": "w3 infra up --modules=eth-ens-ipfs && yarn contracts:deploy", - "test:env:down": "w3 infra down --modules=eth-ens-ipfs" + "test:env:up": "polywrap infra up --modules=eth-ens-ipfs && yarn contracts:deploy", + "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.72", diff --git a/packages/test-cases/cases/cli/api/query/schema.graphql b/packages/test-cases/cases/cli/api/query/schema.graphql index 390ceaab07..dbf08d084a 100644 --- a/packages/test-cases/cases/cli/api/query/schema.graphql +++ b/packages/test-cases/cases/cli/api/query/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "w3://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" type Module { getData( diff --git a/packages/test-cases/cases/cli/api/query/src/index.ts b/packages/test-cases/cases/cli/api/query/src/index.ts index bc9a390a11..f2192e0aa2 100644 --- a/packages/test-cases/cases/cli/api/query/src/index.ts +++ b/packages/test-cases/cases/cli/api/query/src/index.ts @@ -1,10 +1,10 @@ -import { Ethereum_Module } from "./w3/imported"; +import { Ethereum_Module } from "./polywrap/imported"; import { Input_getData, Input_setData, Input_deployContract, SetDataResult -} from "./w3"; +} from "./polywrap"; export function getData(input: Input_getData): u32 { const res = Ethereum_Module.callContractView({ diff --git a/packages/test-cases/cases/cli/app/codegen/001-sanity/schema.graphql b/packages/test-cases/cases/cli/app/codegen/001-sanity/schema.graphql index df243ee66b..c3ac9d494f 100644 --- a/packages/test-cases/cases/cli/app/codegen/001-sanity/schema.graphql +++ b/packages/test-cases/cases/cli/app/codegen/001-sanity/schema.graphql @@ -1 +1 @@ -#import * into Ethereum from "w3://ens/ethereum.web3api.eth" +#import * into Ethereum from "wrap://ens/ethereum.web3api.eth" diff --git a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/schema.graphql b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/schema.graphql index 7d1dae9d32..245f3c4c73 100644 --- a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/schema.graphql +++ b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/schema.graphql @@ -1 +1 @@ -#import * into HTTP from "w3://ens/plugin.eth" +#import * into HTTP from "wrap://ens/plugin.eth" diff --git a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/web3api.app.yaml b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/web3api.app.yaml index 9d5a7502ce..33a030383d 100644 --- a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/web3api.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/web3api.app.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.1 language: app/typescript schema: ./schema.graphql import_redirects: - - uri: "w3://ens/plugin.eth" + - uri: "wrap://ens/plugin.eth" schema: "./../../../../../../js/plugins/http/build/schema.graphql" diff --git a/packages/test-cases/cases/cli/app/codegen/003-multi-import/schema.graphql b/packages/test-cases/cases/cli/app/codegen/003-multi-import/schema.graphql index 06667938c7..a0334d5000 100644 --- a/packages/test-cases/cases/cli/app/codegen/003-multi-import/schema.graphql +++ b/packages/test-cases/cases/cli/app/codegen/003-multi-import/schema.graphql @@ -1,2 +1,2 @@ -#import * into Ethereum from "w3://ens/ethereum.web3api.eth" -#import * into Console from "w3://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" +#import * into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import * into Console from "wrap://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" diff --git a/packages/test-cases/cases/cli/app/codegen/003-multi-import/web3api.app.yaml b/packages/test-cases/cases/cli/app/codegen/003-multi-import/web3api.app.yaml index c6b9dc7c93..c5b7c76b9c 100644 --- a/packages/test-cases/cases/cli/app/codegen/003-multi-import/web3api.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/003-multi-import/web3api.app.yaml @@ -2,7 +2,7 @@ format: 0.0.1-prealpha.1 language: app/typescript schema: ./schema.graphql import_redirects: - - uri: "w3://ens/ethereum.web3api.eth" + - uri: "wrap://ens/ethereum.web3api.eth" schema: "./../../../../../../js/plugins/ethereum/build/schema.graphql" - - uri: "w3://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" + - uri: "wrap://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" schema: "./../../../../../../js/plugins/logger/build/schema.graphql" diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/index.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/manifest.ts deleted file mode 100644 index 730cf8326f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/manifest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -// @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [ - ], -}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/module.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/module.ts deleted file mode 100644 index 71ba212f4b..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/module.ts +++ /dev/null @@ -1,37 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -import * as Types from "./types"; - -import { - Client, - PluginModule, - MaybeAsync -} from "@polywrap/core-js"; - -export interface Input_methodOne extends Record { - str: Types.String; - optStr?: Types.String | null; -} - -export interface Input_methodTwo extends Record { - arg: Types.UInt32; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule< - TConfig, - Types.Env -> { - - abstract methodOne( - input: Input_methodOne, - client: Client - ): MaybeAsync; - - abstract methodTwo( - input: Input_methodTwo, - client: Client - ): MaybeAsync; -} diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/schema.ts deleted file mode 100644 index 29807e38af..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/schema.ts +++ /dev/null @@ -1,380 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - methodOne( - str: String! - optStr: String - ): Object! - - methodTwo( - arg: UInt32! - ): String! -} - -type Env { - arg1: String! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### -`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/types.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/types.ts deleted file mode 100644 index 597470d371..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/w3/types.ts +++ /dev/null @@ -1,640 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -// @ts-ignore -import * as Types from "./"; - -// @ts-ignore -import { - Client, - InvokeApiResult -} from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -export interface Env extends Record { - arg1: Types.String; -} -/// Envs END /// - -/// Objects START /// -export interface Object { - u: Types.UInt; - array: Array; - bytes?: Types.Bytes | null; -} - -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Connection { - node?: Types.String | null; - networkNameOrChainId?: Types.String | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxOverrides { - gasLimit?: Types.BigInt | null; - gasPrice?: Types.BigInt | null; - value?: Types.BigInt | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_StaticTxResult { - result: Types.String; - error: Types.Boolean; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxRequest { - to?: Types.String | null; - from?: Types.String | null; - nonce?: Types.UInt32 | null; - gasLimit?: Types.BigInt | null; - gasPrice?: Types.BigInt | null; - data?: Types.String | null; - value?: Types.BigInt | null; - chainId?: Types.BigInt | null; - type?: Types.UInt32 | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxReceipt { - to: Types.String; - from: Types.String; - contractAddress: Types.String; - transactionIndex: Types.UInt32; - root?: Types.String | null; - gasUsed: Types.BigInt; - logsBloom: Types.String; - transactionHash: Types.String; - logs: Array; - blockNumber: Types.BigInt; - blockHash: Types.String; - confirmations: Types.UInt32; - cumulativeGasUsed: Types.BigInt; - effectiveGasPrice: Types.BigInt; - byzantium: Types.Boolean; - type: Types.UInt32; - status?: Types.UInt32 | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Log { - blockNumber: Types.BigInt; - blockHash: Types.String; - transactionIndex: Types.UInt32; - removed: Types.Boolean; - address: Types.String; - data: Types.String; - topics: Array; - transactionHash: Types.String; - logIndex: Types.UInt32; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_EventNotification { - data: Types.String; - address: Types.String; - log: Types.Ethereum_Log; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Network { - name: Types.String; - chainId: Types.BigInt; - ensAddress?: Types.String | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxResponse { - hash: Types.String; - to?: Types.String | null; - from: Types.String; - nonce: Types.UInt32; - gasLimit: Types.BigInt; - gasPrice?: Types.BigInt | null; - data: Types.String; - value: Types.BigInt; - chainId: Types.BigInt; - blockNumber?: Types.BigInt | null; - blockHash?: Types.String | null; - timestamp?: Types.UInt32 | null; - confirmations: Types.UInt32; - raw?: Types.String | null; - r?: Types.String | null; - s?: Types.String | null; - v?: Types.UInt32 | null; - type?: Types.UInt32 | null; - accessList?: Array | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Access { - address: Types.String; - storageKeys: Array; -} - -/// Imported Objects END /// - -/// Imported Modules START /// - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractView extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractStatic extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getBalance extends Record { - address: Types.String; - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_encodeParams extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_encodeFunction extends Record { - method: Types.String; - args?: Array | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_solidityPack extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_solidityKeccak256 extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_soliditySha256 extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerAddress extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerBalance extends Record { - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerTransactionCount extends Record { - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getGasPrice extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_estimateTransactionGas extends Record { - tx: Types.Ethereum_TxRequest; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_estimateContractCallGas extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_checkAddress extends Record { - address: Types.String; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_toWei extends Record { - eth: Types.String; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_toEth extends Record { - wei: Types.BigInt; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_awaitTransaction extends Record { - txHash: Types.String; - confirmations: Types.UInt32; - timeout: Types.UInt32; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_waitForEvent extends Record { - address: Types.String; - event: Types.String; - args?: Array | null; - timeout?: Types.UInt32 | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getNetwork extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractMethod extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractMethodAndWait extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_sendTransaction extends Record { - tx: Types.Ethereum_TxRequest; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_sendTransactionAndWait extends Record { - tx: Types.Ethereum_TxRequest; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_deployContract extends Record { - abi: Types.String; - bytecode: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_signMessage extends Record { - message: Types.String; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_sendRPC extends Record { - method: Types.String; - params: Array; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export const Ethereum_Module = { - callContractView: async ( - input: Ethereum_Module_Input_callContractView, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractView", - input - }); - }, - - callContractStatic: async ( - input: Ethereum_Module_Input_callContractStatic, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractStatic", - input - }); - }, - - getBalance: async ( - input: Ethereum_Module_Input_getBalance, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getBalance", - input - }); - }, - - encodeParams: async ( - input: Ethereum_Module_Input_encodeParams, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "encodeParams", - input - }); - }, - - encodeFunction: async ( - input: Ethereum_Module_Input_encodeFunction, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "encodeFunction", - input - }); - }, - - solidityPack: async ( - input: Ethereum_Module_Input_solidityPack, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "solidityPack", - input - }); - }, - - solidityKeccak256: async ( - input: Ethereum_Module_Input_solidityKeccak256, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "solidityKeccak256", - input - }); - }, - - soliditySha256: async ( - input: Ethereum_Module_Input_soliditySha256, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "soliditySha256", - input - }); - }, - - getSignerAddress: async ( - input: Ethereum_Module_Input_getSignerAddress, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerAddress", - input - }); - }, - - getSignerBalance: async ( - input: Ethereum_Module_Input_getSignerBalance, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerBalance", - input - }); - }, - - getSignerTransactionCount: async ( - input: Ethereum_Module_Input_getSignerTransactionCount, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerTransactionCount", - input - }); - }, - - getGasPrice: async ( - input: Ethereum_Module_Input_getGasPrice, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getGasPrice", - input - }); - }, - - estimateTransactionGas: async ( - input: Ethereum_Module_Input_estimateTransactionGas, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "estimateTransactionGas", - input - }); - }, - - estimateContractCallGas: async ( - input: Ethereum_Module_Input_estimateContractCallGas, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "estimateContractCallGas", - input - }); - }, - - checkAddress: async ( - input: Ethereum_Module_Input_checkAddress, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "checkAddress", - input - }); - }, - - toWei: async ( - input: Ethereum_Module_Input_toWei, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "toWei", - input - }); - }, - - toEth: async ( - input: Ethereum_Module_Input_toEth, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "toEth", - input - }); - }, - - awaitTransaction: async ( - input: Ethereum_Module_Input_awaitTransaction, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "awaitTransaction", - input - }); - }, - - waitForEvent: async ( - input: Ethereum_Module_Input_waitForEvent, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "waitForEvent", - input - }); - }, - - getNetwork: async ( - input: Ethereum_Module_Input_getNetwork, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getNetwork", - input - }); - }, - - callContractMethod: async ( - input: Ethereum_Module_Input_callContractMethod, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractMethod", - input - }); - }, - - callContractMethodAndWait: async ( - input: Ethereum_Module_Input_callContractMethodAndWait, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractMethodAndWait", - input - }); - }, - - sendTransaction: async ( - input: Ethereum_Module_Input_sendTransaction, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "sendTransaction", - input - }); - }, - - sendTransactionAndWait: async ( - input: Ethereum_Module_Input_sendTransactionAndWait, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "sendTransactionAndWait", - input - }); - }, - - deployContract: async ( - input: Ethereum_Module_Input_deployContract, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "deployContract", - input - }); - }, - - signMessage: async ( - input: Ethereum_Module_Input_signMessage, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "signMessage", - input - }); - }, - - sendRPC: async ( - input: Ethereum_Module_Input_sendRPC, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "sendRPC", - input - }); - } -} - -/// Imported Modules END /// diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/src/index.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/src/index.ts index a90217eeab..b0b0a36b96 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/src/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/src/index.ts @@ -1 +1 @@ -export * from "./w3"; +export * from "./polywrap"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/index.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/manifest.ts deleted file mode 100644 index 730cf8326f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/manifest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -// @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [ - ], -}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/module.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/module.ts deleted file mode 100644 index ab3e9cb648..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/module.ts +++ /dev/null @@ -1,28 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -import * as Types from "./types"; - -import { - Client, - PluginModule, - MaybeAsync -} from "@polywrap/core-js"; - -export interface Input_method extends Record { - str: Types.String; - optStr?: Types.String | null; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule< - TConfig, - Types.Env -> { - - abstract method( - input: Input_method, - client: Client - ): MaybeAsync; -} diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/schema.ts deleted file mode 100644 index 15964c9474..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/schema.ts +++ /dev/null @@ -1,376 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - method( - str: String! - optStr: String - ): Object! -} - -type Env { - arg1: String! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### -`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/types.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/types.ts deleted file mode 100644 index 597470d371..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/w3/types.ts +++ /dev/null @@ -1,640 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -// @ts-ignore -import * as Types from "./"; - -// @ts-ignore -import { - Client, - InvokeApiResult -} from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -export interface Env extends Record { - arg1: Types.String; -} -/// Envs END /// - -/// Objects START /// -export interface Object { - u: Types.UInt; - array: Array; - bytes?: Types.Bytes | null; -} - -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Connection { - node?: Types.String | null; - networkNameOrChainId?: Types.String | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxOverrides { - gasLimit?: Types.BigInt | null; - gasPrice?: Types.BigInt | null; - value?: Types.BigInt | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_StaticTxResult { - result: Types.String; - error: Types.Boolean; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxRequest { - to?: Types.String | null; - from?: Types.String | null; - nonce?: Types.UInt32 | null; - gasLimit?: Types.BigInt | null; - gasPrice?: Types.BigInt | null; - data?: Types.String | null; - value?: Types.BigInt | null; - chainId?: Types.BigInt | null; - type?: Types.UInt32 | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxReceipt { - to: Types.String; - from: Types.String; - contractAddress: Types.String; - transactionIndex: Types.UInt32; - root?: Types.String | null; - gasUsed: Types.BigInt; - logsBloom: Types.String; - transactionHash: Types.String; - logs: Array; - blockNumber: Types.BigInt; - blockHash: Types.String; - confirmations: Types.UInt32; - cumulativeGasUsed: Types.BigInt; - effectiveGasPrice: Types.BigInt; - byzantium: Types.Boolean; - type: Types.UInt32; - status?: Types.UInt32 | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Log { - blockNumber: Types.BigInt; - blockHash: Types.String; - transactionIndex: Types.UInt32; - removed: Types.Boolean; - address: Types.String; - data: Types.String; - topics: Array; - transactionHash: Types.String; - logIndex: Types.UInt32; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_EventNotification { - data: Types.String; - address: Types.String; - log: Types.Ethereum_Log; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Network { - name: Types.String; - chainId: Types.BigInt; - ensAddress?: Types.String | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxResponse { - hash: Types.String; - to?: Types.String | null; - from: Types.String; - nonce: Types.UInt32; - gasLimit: Types.BigInt; - gasPrice?: Types.BigInt | null; - data: Types.String; - value: Types.BigInt; - chainId: Types.BigInt; - blockNumber?: Types.BigInt | null; - blockHash?: Types.String | null; - timestamp?: Types.UInt32 | null; - confirmations: Types.UInt32; - raw?: Types.String | null; - r?: Types.String | null; - s?: Types.String | null; - v?: Types.UInt32 | null; - type?: Types.UInt32 | null; - accessList?: Array | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Access { - address: Types.String; - storageKeys: Array; -} - -/// Imported Objects END /// - -/// Imported Modules START /// - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractView extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractStatic extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getBalance extends Record { - address: Types.String; - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_encodeParams extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_encodeFunction extends Record { - method: Types.String; - args?: Array | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_solidityPack extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_solidityKeccak256 extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_soliditySha256 extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerAddress extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerBalance extends Record { - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerTransactionCount extends Record { - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getGasPrice extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_estimateTransactionGas extends Record { - tx: Types.Ethereum_TxRequest; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_estimateContractCallGas extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_checkAddress extends Record { - address: Types.String; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_toWei extends Record { - eth: Types.String; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_toEth extends Record { - wei: Types.BigInt; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_awaitTransaction extends Record { - txHash: Types.String; - confirmations: Types.UInt32; - timeout: Types.UInt32; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_waitForEvent extends Record { - address: Types.String; - event: Types.String; - args?: Array | null; - timeout?: Types.UInt32 | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getNetwork extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractMethod extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractMethodAndWait extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_sendTransaction extends Record { - tx: Types.Ethereum_TxRequest; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_sendTransactionAndWait extends Record { - tx: Types.Ethereum_TxRequest; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_deployContract extends Record { - abi: Types.String; - bytecode: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_signMessage extends Record { - message: Types.String; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_sendRPC extends Record { - method: Types.String; - params: Array; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export const Ethereum_Module = { - callContractView: async ( - input: Ethereum_Module_Input_callContractView, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractView", - input - }); - }, - - callContractStatic: async ( - input: Ethereum_Module_Input_callContractStatic, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractStatic", - input - }); - }, - - getBalance: async ( - input: Ethereum_Module_Input_getBalance, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getBalance", - input - }); - }, - - encodeParams: async ( - input: Ethereum_Module_Input_encodeParams, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "encodeParams", - input - }); - }, - - encodeFunction: async ( - input: Ethereum_Module_Input_encodeFunction, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "encodeFunction", - input - }); - }, - - solidityPack: async ( - input: Ethereum_Module_Input_solidityPack, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "solidityPack", - input - }); - }, - - solidityKeccak256: async ( - input: Ethereum_Module_Input_solidityKeccak256, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "solidityKeccak256", - input - }); - }, - - soliditySha256: async ( - input: Ethereum_Module_Input_soliditySha256, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "soliditySha256", - input - }); - }, - - getSignerAddress: async ( - input: Ethereum_Module_Input_getSignerAddress, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerAddress", - input - }); - }, - - getSignerBalance: async ( - input: Ethereum_Module_Input_getSignerBalance, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerBalance", - input - }); - }, - - getSignerTransactionCount: async ( - input: Ethereum_Module_Input_getSignerTransactionCount, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerTransactionCount", - input - }); - }, - - getGasPrice: async ( - input: Ethereum_Module_Input_getGasPrice, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getGasPrice", - input - }); - }, - - estimateTransactionGas: async ( - input: Ethereum_Module_Input_estimateTransactionGas, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "estimateTransactionGas", - input - }); - }, - - estimateContractCallGas: async ( - input: Ethereum_Module_Input_estimateContractCallGas, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "estimateContractCallGas", - input - }); - }, - - checkAddress: async ( - input: Ethereum_Module_Input_checkAddress, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "checkAddress", - input - }); - }, - - toWei: async ( - input: Ethereum_Module_Input_toWei, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "toWei", - input - }); - }, - - toEth: async ( - input: Ethereum_Module_Input_toEth, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "toEth", - input - }); - }, - - awaitTransaction: async ( - input: Ethereum_Module_Input_awaitTransaction, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "awaitTransaction", - input - }); - }, - - waitForEvent: async ( - input: Ethereum_Module_Input_waitForEvent, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "waitForEvent", - input - }); - }, - - getNetwork: async ( - input: Ethereum_Module_Input_getNetwork, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getNetwork", - input - }); - }, - - callContractMethod: async ( - input: Ethereum_Module_Input_callContractMethod, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractMethod", - input - }); - }, - - callContractMethodAndWait: async ( - input: Ethereum_Module_Input_callContractMethodAndWait, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractMethodAndWait", - input - }); - }, - - sendTransaction: async ( - input: Ethereum_Module_Input_sendTransaction, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "sendTransaction", - input - }); - }, - - sendTransactionAndWait: async ( - input: Ethereum_Module_Input_sendTransactionAndWait, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "sendTransactionAndWait", - input - }); - }, - - deployContract: async ( - input: Ethereum_Module_Input_deployContract, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "deployContract", - input - }); - }, - - signMessage: async ( - input: Ethereum_Module_Input_signMessage, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "signMessage", - input - }); - }, - - sendRPC: async ( - input: Ethereum_Module_Input_sendRPC, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "sendRPC", - input - }); - } -} - -/// Imported Modules END /// diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/src/index.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/src/index.ts index a90217eeab..b0b0a36b96 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/src/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/src/index.ts @@ -1 +1 @@ -export * from "./w3"; +export * from "./polywrap"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/index.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/manifest.ts deleted file mode 100644 index 730cf8326f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/manifest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -// @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [ - ], -}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/module.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/module.ts deleted file mode 100644 index c368ee205f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/module.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -import * as Types from "./types"; - -import { - Client, - PluginModule, - MaybeAsync -} from "@polywrap/core-js"; - -export interface Input_method extends Record { - str: Types.String; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule< - TConfig, - Types.Env -> { - - abstract method( - input: Input_method, - client: Client - ): MaybeAsync; -} diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/schema.ts deleted file mode 100644 index 1f08effce4..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/schema.ts +++ /dev/null @@ -1,58 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module { - method( - str: String! - ): String! -} - -type Env { - arg1: String! -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### -`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/types.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/types.ts deleted file mode 100644 index 76da08bfbc..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/w3/types.ts +++ /dev/null @@ -1,46 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -// @ts-ignore -import * as Types from "./"; - -// @ts-ignore -import { - Client, - InvokeApiResult -} from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -export interface Env extends Record { - arg1: Types.String; -} -/// Envs END /// - -/// Objects START /// -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/// Imported Objects END /// - -/// Imported Modules START /// - -/// Imported Modules END /// diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/src/index.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/src/index.ts index a90217eeab..b0b0a36b96 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/src/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/src/index.ts @@ -1 +1 @@ -export * from "./w3"; +export * from "./polywrap"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/index.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/manifest.ts deleted file mode 100644 index 730cf8326f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/manifest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -// @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [ - ], -}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/module.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/module.ts deleted file mode 100644 index 64ecf076bc..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/module.ts +++ /dev/null @@ -1,37 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -import * as Types from "./types"; - -import { - Client, - PluginModule, - MaybeAsync -} from "@polywrap/core-js"; - -export interface Input_sanitizeEnv extends Record { - env: Types.ClientEnv; -} - -export interface Input_method extends Record { - str: Types.String; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule< - TConfig, - Types.Env, - Types.ClientEnv -> { - - abstract sanitizeEnv( - input: Input_sanitizeEnv, - client: Client - ): MaybeAsync; - - abstract method( - input: Input_method, - client: Client - ): MaybeAsync; -} diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/schema.ts deleted file mode 100644 index 061f45c087..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/schema.ts +++ /dev/null @@ -1,66 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module { - sanitizeEnv( - env: ClientEnv! - ): Env! - - method( - str: String! - ): String! -} - -type ClientEnv { - bar: UInt32! -} - -type Env { - queryArg: String! -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### -`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/types.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/types.ts deleted file mode 100644 index 41334cf7c9..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/w3/types.ts +++ /dev/null @@ -1,49 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -// @ts-ignore -import * as Types from "./"; - -// @ts-ignore -import { - Client, - InvokeApiResult -} from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -export interface ClientEnv extends Record { - bar: Types.UInt32; -} -export interface Env extends Record { - queryArg: Types.String; -} -/// Envs END /// - -/// Objects START /// -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/// Imported Objects END /// - -/// Imported Modules START /// - -/// Imported Modules END /// diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/src/index.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/src/index.ts index a90217eeab..b0b0a36b96 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/src/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/src/index.ts @@ -1 +1 @@ -export * from "./w3"; +export * from "./polywrap"; diff --git a/packages/wasm/as/as-pect.config.js b/packages/wasm/as/as-pect.config.js index fa07a05f8f..8ef56ccf75 100644 --- a/packages/wasm/as/as-pect.config.js +++ b/packages/wasm/as/as-pect.config.js @@ -29,10 +29,10 @@ module.exports = { * Add your required AssemblyScript imports here. */ imports: { - w3: { - __w3_invoke_args: () => { }, - __w3_invoke_result: () => { }, - __w3_invoke_error: () => { } + wrap: { + __wrap_invoke_args: () => { }, + __wrap_invoke_result: () => { }, + __wrap_invoke_error: () => { } } }, /** diff --git a/packages/wasm/as/assembly/abort.ts b/packages/wasm/as/assembly/abort.ts index b0a24ef40b..69518981f9 100644 --- a/packages/wasm/as/assembly/abort.ts +++ b/packages/wasm/as/assembly/abort.ts @@ -1,8 +1,8 @@ /* eslint-disable */ // Abort Execution -@external("w3", "__w3_abort") -export declare function __w3_abort( +@external("wrap", "__wrap_abort") +export declare function __wrap_abort( msg_ptr: u32, msg_len: u32, file_ptr: u32, @@ -12,7 +12,7 @@ export declare function __w3_abort( ): void; // Helper for aborting -export function w3_abort( +export function wrap_abort( msg: string, file: string, line: u32, @@ -20,7 +20,7 @@ export function w3_abort( ): void { const msgBuf = String.UTF8.encode(msg); const fileBuf = String.UTF8.encode(file); - __w3_abort( + __wrap_abort( changetype(msgBuf), msgBuf.byteLength, changetype(fileBuf), fileBuf.byteLength, line, column diff --git a/packages/wasm/as/assembly/debug-log.ts b/packages/wasm/as/assembly/debug-log.ts index 51e5eb0273..524a1857cb 100644 --- a/packages/wasm/as/assembly/debug-log.ts +++ b/packages/wasm/as/assembly/debug-log.ts @@ -1,16 +1,16 @@ /* eslint-disable */ // Debug Log -@external("w3", "__w3_debug_log") -export declare function __w3_debug_log( +@external("wrap", "__wrap_debug_log") +export declare function __wrap_debug_log( ptr: u32, len: u32, ): void; // Helper for debug logging -export function w3_debug_log(msg: string): void { +export function wrap_debug_log(msg: string): void { const msgBuf = String.UTF8.encode(msg); - __w3_debug_log( + __wrap_debug_log( changetype(msgBuf), msgBuf.byteLength ); } diff --git a/packages/wasm/as/assembly/env.ts b/packages/wasm/as/assembly/env.ts index eb98ccb3f4..5ef50bd856 100644 --- a/packages/wasm/as/assembly/env.ts +++ b/packages/wasm/as/assembly/env.ts @@ -2,31 +2,31 @@ import { InvokeFunction } from "./invoke"; // Load Env Variables -@external("w3", "__w3_load_env") -export declare function __w3_load_env(enviroment_ptr: u32): void; +@external("wrap", "__wrap_load_env") +export declare function __wrap_load_env(enviroment_ptr: u32): void; // Get Sanitize Env Arguments -@external("w3", "__w3_sanitize_env_args") -export declare function __w3_sanitize_env_args(args_ptr: u32): void; +@external("wrap", "__wrap_sanitize_env_args") +export declare function __wrap_sanitize_env_args(args_ptr: u32): void; // Set Sanitize Env Result -@external("w3", "__w3_sanitize_env_result") -export declare function __w3_sanitize_env_result(ptr: u32, len: u32): void; +@external("wrap", "__wrap_sanitize_env_result") +export declare function __wrap_sanitize_env_result(ptr: u32, len: u32): void; -export function w3_load_env(env_size: u32): ArrayBuffer { +export function wrap_load_env(env_size: u32): ArrayBuffer { const envBuf = new ArrayBuffer(env_size); - __w3_load_env(changetype(envBuf)); + __wrap_load_env(changetype(envBuf)); return envBuf; } -export function w3_sanitize_env(args_size: u32, fn: InvokeFunction): void { +export function wrap_sanitize_env(args_size: u32, fn: InvokeFunction): void { const argsBuf = new ArrayBuffer(args_size); - __w3_sanitize_env_args( + __wrap_sanitize_env_args( changetype(argsBuf) ); const result = fn(argsBuf); - __w3_sanitize_env_result( + __wrap_sanitize_env_result( changetype(result), result.byteLength ); diff --git a/packages/wasm/as/assembly/get-implementations.ts b/packages/wasm/as/assembly/get-implementations.ts index 72b63d66bb..b82ac572e1 100644 --- a/packages/wasm/as/assembly/get-implementations.ts +++ b/packages/wasm/as/assembly/get-implementations.ts @@ -2,23 +2,23 @@ import { ReadDecoder, Read } from "./msgpack"; -@external("w3", "__w3_getImplementations") -export declare function __w3_getImplementations( +@external("wrap", "__wrap_getImplementations") +export declare function __wrap_getImplementations( uri_ptr: u32, uri_len: u32 ): bool; -@external("w3", "__w3_getImplementations_result_len") -export declare function __w3_getImplementations_result_len(): u32; +@external("wrap", "__wrap_getImplementations_result_len") +export declare function __wrap_getImplementations_result_len(): u32; -@external("w3", "__w3_getImplementations_result") -export declare function __w3_getImplementations_result(ptr: u32): void; +@external("wrap", "__wrap_getImplementations_result") +export declare function __wrap_getImplementations_result(ptr: u32): void; -export function w3_getImplementations( +export function wrap_getImplementations( uri: string ): string[] { const uriBuf = String.UTF8.encode(uri); - const success = __w3_getImplementations( + const success = __wrap_getImplementations( changetype(uriBuf), uriBuf.byteLength ); @@ -26,17 +26,17 @@ export function w3_getImplementations( return []; } - const resultLen = __w3_getImplementations_result_len(); + const resultLen = __wrap_getImplementations_result_len(); const resultBuffer = new ArrayBuffer(resultLen); - __w3_getImplementations_result(changetype(resultBuffer)); + __wrap_getImplementations_result(changetype(resultBuffer)); // Deserialize the msgpack buffer, // which contains an array of strings const decoder = new ReadDecoder(resultBuffer); decoder.context().push( - "__w3_getImplementations_result", + "__wrap_getImplementations_result", "string[]", - "__w3_getImplementations successful" + "__wrap_getImplementations successful" ); const result: string[] = decoder.readArray( diff --git a/packages/wasm/as/assembly/implementation-subinvoke.ts b/packages/wasm/as/assembly/implementation-subinvoke.ts index 5a5d5f1b13..1795489e7f 100644 --- a/packages/wasm/as/assembly/implementation-subinvoke.ts +++ b/packages/wasm/as/assembly/implementation-subinvoke.ts @@ -3,8 +3,8 @@ import { Result } from "./containers"; // Implementation Subinvoke API -@external("w3", "__w3_subinvokeImplementation") -export declare function __w3_subinvokeImplementation( +@external("wrap", "__wrap_subinvokeImplementation") +export declare function __wrap_subinvokeImplementation( interface_uri_ptr: u32, interface_uri_len: u32, impl_uri_ptr: u32, impl_uri_len: u32, method_ptr: u32, method_len: u32, @@ -12,19 +12,19 @@ export declare function __w3_subinvokeImplementation( ): bool; // Implementation Subinvoke Result -@external("w3", "__w3_subinvokeImplementation_result_len") -export declare function __w3_subinvokeImplementation_result_len(): u32; -@external("w3", "__w3_subinvokeImplementation_result") -export declare function __w3_subinvokeImplementation_result(ptr: u32): void; +@external("wrap", "__wrap_subinvokeImplementation_result_len") +export declare function __wrap_subinvokeImplementation_result_len(): u32; +@external("wrap", "__wrap_subinvokeImplementation_result") +export declare function __wrap_subinvokeImplementation_result(ptr: u32): void; // Subinvoke Error -@external("w3", "__w3_subinvokeImplementation_error_len") -export declare function __w3_subinvokeImplementation_error_len(): u32; -@external("w3", "__w3_subinvokeImplementation_error") -export declare function __w3_subinvokeImplementation_error(ptr: u32): void; +@external("wrap", "__wrap_subinvokeImplementation_error_len") +export declare function __wrap_subinvokeImplementation_error_len(): u32; +@external("wrap", "__wrap_subinvokeImplementation_error") +export declare function __wrap_subinvokeImplementation_error(ptr: u32): void; // Implementation Subinvoke API Helper -export function w3_subinvokeImplementation( +export function wrap_subinvokeImplementation( interfaceUri: string, implUri: string, method: string, @@ -34,7 +34,7 @@ export function w3_subinvokeImplementation( const implUriBuf = String.UTF8.encode(implUri); const methodBuf = String.UTF8.encode(method); - const success = __w3_subinvokeImplementation( + const success = __wrap_subinvokeImplementation( changetype(interfaceUriBuf), interfaceUriBuf.byteLength, changetype(implUriBuf), implUriBuf.byteLength, changetype(methodBuf), methodBuf.byteLength, @@ -42,16 +42,16 @@ export function w3_subinvokeImplementation( ); if (!success) { - const errorLen = __w3_subinvokeImplementation_error_len(); + const errorLen = __wrap_subinvokeImplementation_error_len(); const messageBuf = new ArrayBuffer(errorLen); - __w3_subinvokeImplementation_error(changetype(messageBuf)); + __wrap_subinvokeImplementation_error(changetype(messageBuf)); const message = String.UTF8.decode(messageBuf); return Result.Err(message); } - const resultLen = __w3_subinvokeImplementation_result_len(); + const resultLen = __wrap_subinvokeImplementation_result_len(); const resultBuffer = new ArrayBuffer(resultLen); - __w3_subinvokeImplementation_result(changetype(resultBuffer)); + __wrap_subinvokeImplementation_result(changetype(resultBuffer)); return Result.Ok(resultBuffer); } diff --git a/packages/wasm/as/assembly/invoke.ts b/packages/wasm/as/assembly/invoke.ts index 45f1f7bdb8..f06454f5a6 100644 --- a/packages/wasm/as/assembly/invoke.ts +++ b/packages/wasm/as/assembly/invoke.ts @@ -1,16 +1,16 @@ /* eslint-disable */ // Get Invoke Arguments -@external("w3", "__w3_invoke_args") -export declare function __w3_invoke_args(method_ptr: u32, args_ptr: u32): void; +@external("wrap", "__wrap_invoke_args") +export declare function __wrap_invoke_args(method_ptr: u32, args_ptr: u32): void; // Set Invoke Result -@external("w3", "__w3_invoke_result") -export declare function __w3_invoke_result(ptr: u32, len: u32): void; +@external("wrap", "__wrap_invoke_result") +export declare function __wrap_invoke_result(ptr: u32, len: u32): void; // Set Invoke Error -@external("w3", "__w3_invoke_error") -export declare function __w3_invoke_error(ptr: u32, len: u32): void; +@external("wrap", "__wrap_invoke_error") +export declare function __wrap_invoke_error(ptr: u32, len: u32): void; // Keep track of all invokable functions export type InvokeFunction = (argsBuf: ArrayBuffer) => ArrayBuffer; @@ -23,10 +23,10 @@ export class InvokeArgs { } // Helper for fetching invoke args -export function w3_invoke_args(method_size: u32, args_size: u32): InvokeArgs { +export function wrap_invoke_args(method_size: u32, args_size: u32): InvokeArgs { const methodBuf = new ArrayBuffer(method_size); const argsBuf = new ArrayBuffer(args_size); - __w3_invoke_args( + __wrap_invoke_args( changetype(methodBuf), changetype(argsBuf) ); @@ -38,11 +38,11 @@ export function w3_invoke_args(method_size: u32, args_size: u32): InvokeArgs { ); } -// Helper for handling _w3_invoke -export function w3_invoke(args: InvokeArgs, fn: InvokeFunction | null): bool { +// Helper for handling _wrap_invoke +export function wrap_invoke(args: InvokeArgs, fn: InvokeFunction | null): bool { if (fn) { const result = fn(args.args); - __w3_invoke_result( + __wrap_invoke_result( changetype(result), result.byteLength ); @@ -51,7 +51,7 @@ export function w3_invoke(args: InvokeArgs, fn: InvokeFunction | null): bool { const message = String.UTF8.encode( `Could not find invoke function "${args.method}"` ); - __w3_invoke_error( + __wrap_invoke_error( changetype(message), message.byteLength ); diff --git a/packages/wasm/as/assembly/subinvoke.ts b/packages/wasm/as/assembly/subinvoke.ts index 92ddb4d885..de2f0f8630 100644 --- a/packages/wasm/as/assembly/subinvoke.ts +++ b/packages/wasm/as/assembly/subinvoke.ts @@ -3,27 +3,27 @@ import { Result } from "./containers"; // Subinvoke API -@external("w3", "__w3_subinvoke") -export declare function __w3_subinvoke( +@external("wrap", "__wrap_subinvoke") +export declare function __wrap_subinvoke( uri_ptr: u32, uri_len: u32, method_ptr: u32, method_len: u32, input_ptr: u32, input_len: u32 ): bool; // Subinvoke Result -@external("w3", "__w3_subinvoke_result_len") -export declare function __w3_subinvoke_result_len(): u32; -@external("w3", "__w3_subinvoke_result") -export declare function __w3_subinvoke_result(ptr: u32): void; +@external("wrap", "__wrap_subinvoke_result_len") +export declare function __wrap_subinvoke_result_len(): u32; +@external("wrap", "__wrap_subinvoke_result") +export declare function __wrap_subinvoke_result(ptr: u32): void; // Subinvoke Error -@external("w3", "__w3_subinvoke_error_len") -export declare function __w3_subinvoke_error_len(): u32; -@external("w3", "__w3_subinvoke_error") -export declare function __w3_subinvoke_error(ptr: u32): void; +@external("wrap", "__wrap_subinvoke_error_len") +export declare function __wrap_subinvoke_error_len(): u32; +@external("wrap", "__wrap_subinvoke_error") +export declare function __wrap_subinvoke_error(ptr: u32): void; // Subinvoke API Helper -export function w3_subinvoke( +export function wrap_subinvoke( uri: string, method: string, input: ArrayBuffer @@ -31,23 +31,23 @@ export function w3_subinvoke( const uriBuf = String.UTF8.encode(uri); const methodBuf = String.UTF8.encode(method); - const success = __w3_subinvoke( + const success = __wrap_subinvoke( changetype(uriBuf), uriBuf.byteLength, changetype(methodBuf), methodBuf.byteLength, changetype(input), input.byteLength ); if (!success) { - const errorLen = __w3_subinvoke_error_len(); + const errorLen = __wrap_subinvoke_error_len(); const messageBuf = new ArrayBuffer(errorLen); - __w3_subinvoke_error(changetype(messageBuf)); + __wrap_subinvoke_error(changetype(messageBuf)); const message = String.UTF8.decode(messageBuf); return Result.Err(message); } - const resultLen = __w3_subinvoke_result_len(); + const resultLen = __wrap_subinvoke_result_len(); const resultBuffer = new ArrayBuffer(resultLen); - __w3_subinvoke_result(changetype(resultBuffer)); + __wrap_subinvoke_result(changetype(resultBuffer)); return Result.Ok(resultBuffer); } diff --git a/packages/wasm/rs/src/abort.rs b/packages/wasm/rs/src/abort.rs index 19616d7d93..561753279c 100644 --- a/packages/wasm/rs/src/abort.rs +++ b/packages/wasm/rs/src/abort.rs @@ -1,8 +1,8 @@ -#[link(wasm_import_module = "w3")] +#[link(wasm_import_module = "wrap")] extern "C" { /// Get Abort Arguments - #[link_name = "__w3_abort"] - pub fn __w3_abort( + #[link_name = "__wrap_abort"] + pub fn __wrap_abort( msg_ptr: u32, msg_len: u32, file_ptr: u32, @@ -13,7 +13,7 @@ extern "C" { } /// Helper for aborting -pub fn w3_abort_setup() { +pub fn wrap_abort_setup() { std::panic::set_hook(Box::new(|panic_info| { let payload = panic_info.payload(); let message = match payload @@ -40,7 +40,7 @@ pub fn w3_abort_setup() { None => 0, }; unsafe { - __w3_abort( + __wrap_abort( message.as_ptr() as u32, msg_len, file.as_ptr() as u32, diff --git a/packages/wasm/rs/src/debug_log.rs b/packages/wasm/rs/src/debug_log.rs index 285236f357..5bc3035052 100644 --- a/packages/wasm/rs/src/debug_log.rs +++ b/packages/wasm/rs/src/debug_log.rs @@ -1,11 +1,11 @@ -#[link(wasm_import_module = "w3")] +#[link(wasm_import_module = "wrap")] extern "C" { /// Get Abort Arguments - #[link_name = "__w3_debug_log"] - pub fn __w3_debug_log(ptr: u32, len: u32); + #[link_name = "__wrap_debug_log"] + pub fn __wrap_debug_log(ptr: u32, len: u32); } -pub fn w3_debug_log(msg: &str) { +pub fn wrap_debug_log(msg: &str) { let msg_bytes = msg.as_bytes(); - unsafe { __w3_debug_log(msg_bytes.as_ptr() as u32, msg_bytes.len() as u32) }; + unsafe { __wrap_debug_log(msg_bytes.as_ptr() as u32, msg_bytes.len() as u32) }; } diff --git a/packages/wasm/rs/src/env.rs b/packages/wasm/rs/src/env.rs index 4105166af0..4aeff6fab8 100644 --- a/packages/wasm/rs/src/env.rs +++ b/packages/wasm/rs/src/env.rs @@ -1,35 +1,35 @@ use crate::invoke::InvokeFunction; use crate::malloc::alloc; -#[link(wasm_import_module = "w3")] +#[link(wasm_import_module = "wrap")] extern "C" { // Load Env Variables - #[link_name = "__w3_load_env"] - pub fn __w3_load_env(environment_ptr: u32); + #[link_name = "__wrap_load_env"] + pub fn __wrap_load_env(environment_ptr: u32); // Get Sanitized Env Arguments - #[link_name = "__w3_sanitize_env_args"] - pub fn __w3_sanitize_env_args(args_ptr: u32); + #[link_name = "__wrap_sanitize_env_args"] + pub fn __wrap_sanitize_env_args(args_ptr: u32); // Set Sanitized Env Result - #[link_name = "__w3_sanitize_env_result"] - pub fn __w3_sanitize_env_result(ptr: u32, len: u32); + #[link_name = "__wrap_sanitize_env_result"] + pub fn __wrap_sanitize_env_result(ptr: u32, len: u32); } -pub fn w3_load_env(env_size: u32) -> Vec { +pub fn wrap_load_env(env_size: u32) -> Vec { let env_size_ptr = alloc(env_size as usize); let env_buf = unsafe { Vec::from_raw_parts(env_size_ptr, env_size as usize, env_size as usize) }; - unsafe { __w3_load_env(env_buf.as_ptr() as u32) }; + unsafe { __wrap_load_env(env_buf.as_ptr() as u32) }; env_buf } -pub fn w3_sanitize_env(args_size: u32, func: InvokeFunction) { +pub fn wrap_sanitize_env(args_size: u32, func: InvokeFunction) { let args_size_ptr = alloc(args_size as usize); let args_buf = unsafe { Vec::from_raw_parts(args_size_ptr, args_size as usize, args_size as usize) }; - unsafe { __w3_sanitize_env_args(args_buf.as_ptr() as u32) }; + unsafe { __wrap_sanitize_env_args(args_buf.as_ptr() as u32) }; let result = func(&args_buf); let result_len = result.len() as u32; - unsafe { __w3_sanitize_env_result(result.as_ptr() as u32, result_len) }; + unsafe { __wrap_sanitize_env_result(result.as_ptr() as u32, result_len) }; } diff --git a/packages/wasm/rs/src/get_implementations.rs b/packages/wasm/rs/src/get_implementations.rs index bb3cc7bab8..d64f1076ea 100644 --- a/packages/wasm/rs/src/get_implementations.rs +++ b/packages/wasm/rs/src/get_implementations.rs @@ -1,38 +1,38 @@ use crate::{malloc::alloc, Context, Read, ReadDecoder}; -#[link(wasm_import_module = "w3")] +#[link(wasm_import_module = "wrap")] extern "C" { - #[link_name = "__w3_getImplementations"] - pub fn __w3_getImplementations(uri_ptr: u32, uri_len: u32) -> bool; + #[link_name = "__wrap_getImplementations"] + pub fn __wrap_getImplementations(uri_ptr: u32, uri_len: u32) -> bool; - #[link_name = "__w3_getImplementations_result_len"] - pub fn __w3_getImplementations_result_len() -> u32; + #[link_name = "__wrap_getImplementations_result_len"] + pub fn __wrap_getImplementations_result_len() -> u32; - #[link_name = "__w3_getImplementations_result"] - pub fn __w3_getImplementations_result(ptr: u32); + #[link_name = "__wrap_getImplementations_result"] + pub fn __wrap_getImplementations_result(ptr: u32); } -pub fn w3_get_implementations(uri: &str) -> Vec { +pub fn wrap_get_implementations(uri: &str) -> Vec { let success = - unsafe { __w3_getImplementations(uri.as_bytes().as_ptr() as u32, uri.len() as u32) }; + unsafe { __wrap_getImplementations(uri.as_bytes().as_ptr() as u32, uri.len() as u32) }; if !success { return vec![]; } - let result_len = unsafe { __w3_getImplementations_result_len() }; + let result_len = unsafe { __wrap_getImplementations_result_len() }; let result_len_ptr = alloc(result_len as usize); let result_buffer = unsafe { Vec::from_raw_parts(result_len_ptr, result_len as usize, result_len as usize) }; - unsafe { __w3_getImplementations_result(result_buffer.as_ptr() as u32) }; + unsafe { __wrap_getImplementations_result(result_buffer.as_ptr() as u32) }; // deserialize the `msgpack` buffer, // which contains a `Vec` let mut decoder = ReadDecoder::new(&result_buffer, Context::new()); decoder.context().push( - "__w3_getImplementations_result", + "__wrap_getImplementations_result", "Vec", - "__w3_getImplementations successful", + "__wrap_getImplementations successful", ); decoder.read_array(|reader| reader.read_string()).unwrap() } diff --git a/packages/wasm/rs/src/invoke.rs b/packages/wasm/rs/src/invoke.rs index 859462e4fa..f449c67b28 100644 --- a/packages/wasm/rs/src/invoke.rs +++ b/packages/wasm/rs/src/invoke.rs @@ -1,18 +1,18 @@ use crate::malloc::alloc; -#[link(wasm_import_module = "w3")] +#[link(wasm_import_module = "wrap")] extern "C" { /// Get Invoke Arguments - #[link_name = "__w3_invoke_args"] - pub fn __w3_invoke_args(method_ptr: u32, args_ptr: u32); + #[link_name = "__wrap_invoke_args"] + pub fn __wrap_invoke_args(method_ptr: u32, args_ptr: u32); /// Set Invoke Result - #[link_name = "__w3_invoke_result"] - pub fn __w3_invoke_result(ptr: u32, len: u32); + #[link_name = "__wrap_invoke_result"] + pub fn __wrap_invoke_result(ptr: u32, len: u32); /// Set Invoke Error - #[link_name = "__w3_invoke_error"] - pub fn __w3_invoke_error(ptr: u32, len: u32); + #[link_name = "__wrap_invoke_error"] + pub fn __wrap_invoke_error(ptr: u32, len: u32); } /// Keep track of all invokable functions @@ -24,11 +24,11 @@ pub struct InvokeArgs { } /// Helper for fetching invoke args -pub fn w3_invoke_args(method_size: u32, args_size: u32) -> InvokeArgs { +pub fn wrap_invoke_args(method_size: u32, args_size: u32) -> InvokeArgs { let method_size_ptr = alloc(method_size as usize); let args_size_ptr = alloc(args_size as usize); - unsafe { __w3_invoke_args(method_size_ptr as u32, args_size_ptr as u32) }; + unsafe { __wrap_invoke_args(method_size_ptr as u32, args_size_ptr as u32) }; let method = unsafe { String::from_raw_parts(method_size_ptr, method_size as usize, method_size as usize) @@ -39,20 +39,20 @@ pub fn w3_invoke_args(method_size: u32, args_size: u32) -> InvokeArgs { InvokeArgs { method, args } } -/// Helper for handling `_w3_invoke` -pub fn w3_invoke(args: InvokeArgs, opt_invoke_func: Option) -> bool { +/// Helper for handling `_wrap_invoke` +pub fn wrap_invoke(args: InvokeArgs, opt_invoke_func: Option) -> bool { match opt_invoke_func { Some(func) => { let result = func(args.args.as_slice()); let res_len = result.len() as u32; - unsafe { __w3_invoke_result(result.as_ptr() as u32, res_len) }; + unsafe { __wrap_invoke_result(result.as_ptr() as u32, res_len) }; true } None => { let message = format!("Could not find invoke function {}", &args.method); let msg_bytes = message.as_bytes(); let msg_len = msg_bytes.len() as u32; - unsafe { __w3_invoke_error(msg_bytes.as_ptr() as u32, msg_len) }; + unsafe { __wrap_invoke_error(msg_bytes.as_ptr() as u32, msg_len) }; false } } diff --git a/packages/wasm/rs/src/subinvoke.rs b/packages/wasm/rs/src/subinvoke.rs index 705c249ca9..b5afb07e59 100644 --- a/packages/wasm/rs/src/subinvoke.rs +++ b/packages/wasm/rs/src/subinvoke.rs @@ -1,10 +1,10 @@ use crate::malloc::alloc; -#[link(wasm_import_module = "w3")] +#[link(wasm_import_module = "wrap")] extern "C" { /// Subinvoke API - #[link_name = "__w3_subinvoke"] - pub fn __w3_subinvoke( + #[link_name = "__wrap_subinvoke"] + pub fn __wrap_subinvoke( uri_ptr: u32, uri_len: u32, method_ptr: u32, @@ -14,22 +14,22 @@ extern "C" { ) -> bool; /// Subinvoke Result - #[link_name = "__w3_subinvoke_result_len"] - pub fn __w3_subinvoke_result_len() -> u32; + #[link_name = "__wrap_subinvoke_result_len"] + pub fn __wrap_subinvoke_result_len() -> u32; - #[link_name = "__w3_subinvoke_result"] - pub fn __w3_subinvoke_result(ptr: u32); + #[link_name = "__wrap_subinvoke_result"] + pub fn __wrap_subinvoke_result(ptr: u32); /// Subinvoke Error - #[link_name = "__w3_subinvoke_error_len"] - pub fn __w3_subinvoke_error_len() -> u32; + #[link_name = "__wrap_subinvoke_error_len"] + pub fn __wrap_subinvoke_error_len() -> u32; - #[link_name = "__w3_subinvoke_error"] - pub fn __w3_subinvoke_error(ptr: u32); + #[link_name = "__wrap_subinvoke_error"] + pub fn __wrap_subinvoke_error(ptr: u32); } /// Subinvoke API Helper -pub fn w3_subinvoke( +pub fn wrap_subinvoke( uri: &str, method: &str, input: Vec, @@ -38,7 +38,7 @@ pub fn w3_subinvoke( let method_buf = method.as_bytes(); let success = unsafe { - __w3_subinvoke( + __wrap_subinvoke( uri_buf.as_ptr() as u32, uri_buf.len() as u32, method_buf.as_ptr() as u32, @@ -48,17 +48,17 @@ pub fn w3_subinvoke( ) }; if !success { - let error_len = unsafe { __w3_subinvoke_error_len() }; + let error_len = unsafe { __wrap_subinvoke_error_len() }; let error_len_ptr = alloc(error_len as usize); - unsafe { __w3_subinvoke_error(error_len_ptr as u32) }; + unsafe { __wrap_subinvoke_error(error_len_ptr as u32) }; let error = unsafe { String::from_raw_parts(error_len_ptr, error_len as usize, error_len as usize) }; return Err(error); } - let result_len = unsafe { __w3_subinvoke_result_len() }; + let result_len = unsafe { __wrap_subinvoke_result_len() }; let result_len_ptr = alloc(result_len as usize); - unsafe { __w3_subinvoke_result(result_len_ptr as u32) }; + unsafe { __wrap_subinvoke_result(result_len_ptr as u32) }; let result_buf = unsafe { Vec::from_raw_parts(result_len_ptr, result_len as usize, result_len as usize) }; Ok(result_buf) From 157d16f1612994a776b529d9c9a4bf0a60d4e21d Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 14 Jun 2022 19:54:16 -0700 Subject: [PATCH 03/17] w3 folder rename --- .../js/plugins/ens/src/polywrap-man/index.ts | 9 + .../plugins/ens/src/polywrap-man/manifest.ts | 13 + .../js/plugins/ens/src/polywrap-man/module.ts | 31 + .../js/plugins/ens/src/polywrap-man/schema.ts | 315 +++++++++ .../js/plugins/ens/src/polywrap-man/types.ts | 523 ++++++++++++++ .../ethereum/src/polywrap-man/index.ts | 9 + .../ethereum/src/polywrap-man/manifest.ts | 13 + .../ethereum/src/polywrap-man/module.ts | 295 ++++++++ .../ethereum/src/polywrap-man/schema.ts | 305 +++++++++ .../ethereum/src/polywrap-man/types.ts | 140 ++++ .../filesystem/src/polywrap-man/index.ts | 9 + .../filesystem/src/polywrap-man/manifest.ts | 13 + .../filesystem/src/polywrap-man/module.ts | 31 + .../filesystem/src/polywrap-man/schema.ts | 88 +++ .../filesystem/src/polywrap-man/types.ts | 83 +++ .../graph-node/src/polywrap-man/index.ts | 9 + .../graph-node/src/polywrap-man/manifest.ts | 13 + .../graph-node/src/polywrap-man/module.ts | 23 + .../graph-node/src/polywrap-man/schema.ts | 130 ++++ .../graph-node/src/polywrap-man/types.ts | 115 ++++ .../js/plugins/http/src/polywrap-man/index.ts | 9 + .../plugins/http/src/polywrap-man/manifest.ts | 13 + .../plugins/http/src/polywrap-man/module.ts | 32 + .../plugins/http/src/polywrap-man/schema.ts | 89 +++ .../js/plugins/http/src/polywrap-man/types.ts | 71 ++ .../js/plugins/ipfs/src/polywrap-man/index.ts | 9 + .../plugins/ipfs/src/polywrap-man/manifest.ts | 11 + .../plugins/ipfs/src/polywrap-man/module.ts | 60 ++ .../plugins/ipfs/src/polywrap-man/schema.ts | 130 ++++ .../js/plugins/ipfs/src/polywrap-man/types.ts | 97 +++ .../plugins/logger/src/polywrap-man/index.ts | 9 + .../logger/src/polywrap-man/manifest.ts | 13 + .../plugins/logger/src/polywrap-man/module.ts | 19 + .../plugins/logger/src/polywrap-man/schema.ts | 82 +++ .../plugins/logger/src/polywrap-man/types.ts | 72 ++ .../js/plugins/sha3/src/polywrap-man/index.ts | 9 + .../plugins/sha3/src/polywrap-man/manifest.ts | 13 + .../plugins/sha3/src/polywrap-man/module.ts | 122 ++++ .../plugins/sha3/src/polywrap-man/schema.ts | 100 +++ .../js/plugins/sha3/src/polywrap-man/types.ts | 34 + .../plugins/uts46/src/polywrap-man/index.ts | 9 + .../uts46/src/polywrap-man/manifest.ts | 13 + .../plugins/uts46/src/polywrap-man/module.ts | 39 ++ .../plugins/uts46/src/polywrap-man/schema.ts | 67 ++ .../plugins/uts46/src/polywrap-man/types.ts | 43 ++ .../001-sanity/expected/src/polywrap/index.ts | 9 + .../expected/src/polywrap/manifest.ts | 15 + .../expected/src/polywrap/module.ts | 37 + .../expected/src/polywrap/schema.ts | 380 +++++++++++ .../001-sanity/expected/src/polywrap/types.ts | 640 ++++++++++++++++++ .../expected/src/polywrap/index.ts | 9 + .../expected/src/polywrap/manifest.ts | 15 + .../expected/src/polywrap/module.ts | 28 + .../expected/src/polywrap/schema.ts | 376 ++++++++++ .../expected/src/polywrap/types.ts | 640 ++++++++++++++++++ .../003-env/expected/src/polywrap/index.ts | 9 + .../003-env/expected/src/polywrap/manifest.ts | 15 + .../003-env/expected/src/polywrap/module.ts | 27 + .../003-env/expected/src/polywrap/schema.ts | 58 ++ .../003-env/expected/src/polywrap/types.ts | 46 ++ .../expected/src/polywrap /index.ts | 9 + .../expected/src/polywrap /manifest.ts | 15 + .../expected/src/polywrap /module.ts | 37 + .../expected/src/polywrap /schema.ts | 66 ++ .../expected/src/polywrap /types.ts | 49 ++ 65 files changed, 5812 insertions(+) create mode 100644 packages/js/plugins/ens/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/ens/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/ens/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/ens/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/ens/src/polywrap-man/types.ts create mode 100644 packages/js/plugins/ethereum/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/ethereum/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/ethereum/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/ethereum/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/ethereum/src/polywrap-man/types.ts create mode 100644 packages/js/plugins/filesystem/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/filesystem/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/filesystem/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/filesystem/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/filesystem/src/polywrap-man/types.ts create mode 100644 packages/js/plugins/graph-node/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/graph-node/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/graph-node/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/graph-node/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/graph-node/src/polywrap-man/types.ts create mode 100644 packages/js/plugins/http/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/http/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/http/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/http/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/http/src/polywrap-man/types.ts create mode 100644 packages/js/plugins/ipfs/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/ipfs/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/ipfs/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/ipfs/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/ipfs/src/polywrap-man/types.ts create mode 100644 packages/js/plugins/logger/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/logger/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/logger/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/logger/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/logger/src/polywrap-man/types.ts create mode 100644 packages/js/plugins/sha3/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/sha3/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/sha3/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/sha3/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/sha3/src/polywrap-man/types.ts create mode 100644 packages/js/plugins/uts46/src/polywrap-man/index.ts create mode 100644 packages/js/plugins/uts46/src/polywrap-man/manifest.ts create mode 100644 packages/js/plugins/uts46/src/polywrap-man/module.ts create mode 100644 packages/js/plugins/uts46/src/polywrap-man/schema.ts create mode 100644 packages/js/plugins/uts46/src/polywrap-man/types.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/index.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/manifest.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/module.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/types.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/index.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/manifest.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/module.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/types.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/index.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/manifest.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/module.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/types.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /index.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /manifest.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /module.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /types.ts diff --git a/packages/js/plugins/ens/src/polywrap-man/index.ts b/packages/js/plugins/ens/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/ens/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/ens/src/polywrap-man/manifest.ts b/packages/js/plugins/ens/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..bdf0be5286 --- /dev/null +++ b/packages/js/plugins/ens/src/polywrap-man/manifest.ts @@ -0,0 +1,13 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/ens/src/polywrap-man/module.ts b/packages/js/plugins/ens/src/polywrap-man/module.ts new file mode 100644 index 0000000000..fb6ec175b7 --- /dev/null +++ b/packages/js/plugins/ens/src/polywrap-man/module.ts @@ -0,0 +1,31 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +export interface Input_getFile extends Record { + path: Types.String; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract tryResolveUri( + input: Input_tryResolveUri, + client: Client + ): MaybeAsync; + + abstract getFile( + input: Input_getFile, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/ens/src/polywrap-man/schema.ts b/packages/js/plugins/ens/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..8696cd6ca3 --- /dev/null +++ b/packages/js/plugins/ens/src/polywrap-man/schema.ts @@ -0,0 +1,315 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module implements UriResolver_Module @imports( + types: [ + "UriResolver_Module", + "UriResolver_MaybeUriOrManifest", + "Ethereum_Module", + "Ethereum_Connection", + "Ethereum_TxOverrides", + "Ethereum_StaticTxResult", + "Ethereum_TxRequest", + "Ethereum_TxReceipt", + "Ethereum_Log", + "Ethereum_EventNotification", + "Ethereum_Network" + ] +) { + tryResolveUri( + authority: String! + path: String! + ): UriResolver_MaybeUriOrManifest + + getFile( + path: String! + ): Bytes +} + +### Imported Modules START ### + +type UriResolver_Module @imported( + uri: "ens/uri-resolver.core.web3api.eth", + namespace: "UriResolver", + nativeType: "Module" +) { + tryResolveUri( + authority: String! + path: String! + ): UriResolver_MaybeUriOrManifest + + getFile( + path: String! + ): Bytes +} + +type Ethereum_Module @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Module" +) { + callContractView( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + callContractStatic( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_StaticTxResult! + + getBalance( + address: String! + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + encodeParams( + types: [String!]! + values: [String!]! + ): String! + + encodeFunction( + method: String! + args: [String!] + ): String! + + solidityPack( + types: [String!]! + values: [String!]! + ): String! + + solidityKeccak256( + types: [String!]! + values: [String!]! + ): String! + + soliditySha256( + types: [String!]! + values: [String!]! + ): String! + + getSignerAddress( + connection: Ethereum_Connection + ): String! + + getSignerBalance( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getSignerTransactionCount( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getGasPrice( + connection: Ethereum_Connection + ): BigInt! + + estimateTransactionGas( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): BigInt! + + estimateContractCallGas( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): BigInt! + + checkAddress( + address: String! + ): Boolean! + + toWei( + eth: String! + ): BigInt! + + toEth( + wei: BigInt! + ): String! + + awaitTransaction( + txHash: String! + confirmations: UInt32! + timeout: UInt32! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + waitForEvent( + address: String! + event: String! + args: [String!] + timeout: UInt32 + connection: Ethereum_Connection + ): Ethereum_EventNotification! + + getNetwork( + connection: Ethereum_Connection + ): Ethereum_Network! +} + +### Imported Modules END ### + +### Imported Objects START ### + +type UriResolver_MaybeUriOrManifest @imported( + uri: "ens/uri-resolver.core.web3api.eth", + namespace: "UriResolver", + nativeType: "MaybeUriOrManifest" +) { + uri: String + manifest: String +} + +type Ethereum_Connection @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Connection" +) { + node: String + networkNameOrChainId: String +} + +type Ethereum_TxOverrides @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxOverrides" +) { + gasLimit: BigInt + gasPrice: BigInt + value: BigInt +} + +type Ethereum_StaticTxResult @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "StaticTxResult" +) { + result: String! + error: Boolean! +} + +type Ethereum_TxRequest @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxRequest" +) { + to: String + from: String + nonce: UInt32 + gasLimit: BigInt + gasPrice: BigInt + data: String + value: BigInt + chainId: BigInt + type: UInt32 +} + +type Ethereum_TxReceipt @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxReceipt" +) { + to: String! + from: String! + contractAddress: String! + transactionIndex: UInt32! + root: String + gasUsed: BigInt! + logsBloom: String! + transactionHash: String! + logs: [Ethereum_Log!]! + blockNumber: BigInt! + blockHash: String! + confirmations: UInt32! + cumulativeGasUsed: BigInt! + effectiveGasPrice: BigInt! + byzantium: Boolean! + type: UInt32! + status: UInt32 +} + +type Ethereum_Log @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Log" +) { + blockNumber: BigInt! + blockHash: String! + transactionIndex: UInt32! + removed: Boolean! + address: String! + data: String! + topics: [String!]! + transactionHash: String! + logIndex: UInt32! +} + +type Ethereum_EventNotification @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "EventNotification" +) { + data: String! + address: String! + log: Ethereum_Log! +} + +type Ethereum_Network @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Network" +) { + name: String! + chainId: BigInt! + ensAddress: String +} + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/ens/src/polywrap-man/types.ts b/packages/js/plugins/ens/src/polywrap-man/types.ts new file mode 100644 index 0000000000..c2b716ea96 --- /dev/null +++ b/packages/js/plugins/ens/src/polywrap-man/types.ts @@ -0,0 +1,523 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./"; + +import { Client, InvokeApiResult } from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +/// Envs END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +export interface UriResolver_MaybeUriOrManifest { + uri?: Types.String | null; + manifest?: Types.String | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Connection { + node?: Types.String | null; + networkNameOrChainId?: Types.String | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxOverrides { + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + value?: Types.BigInt | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_StaticTxResult { + result: Types.String; + error: Types.Boolean; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxRequest { + to?: Types.String | null; + from?: Types.String | null; + nonce?: Types.UInt32 | null; + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + data?: Types.String | null; + value?: Types.BigInt | null; + chainId?: Types.BigInt | null; + type?: Types.UInt32 | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxReceipt { + to: Types.String; + from: Types.String; + contractAddress: Types.String; + transactionIndex: Types.UInt32; + root?: Types.String | null; + gasUsed: Types.BigInt; + logsBloom: Types.String; + transactionHash: Types.String; + logs: Array; + blockNumber: Types.BigInt; + blockHash: Types.String; + confirmations: Types.UInt32; + cumulativeGasUsed: Types.BigInt; + effectiveGasPrice: Types.BigInt; + byzantium: Types.Boolean; + type: Types.UInt32; + status?: Types.UInt32 | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Log { + blockNumber: Types.BigInt; + blockHash: Types.String; + transactionIndex: Types.UInt32; + removed: Types.Boolean; + address: Types.String; + data: Types.String; + topics: Array; + transactionHash: Types.String; + logIndex: Types.UInt32; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_EventNotification { + data: Types.String; + address: Types.String; + log: Types.Ethereum_Log; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Network { + name: Types.String; + chainId: Types.BigInt; + ensAddress?: Types.String | null; +} + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +interface UriResolver_Module_Input_tryResolveUri + extends Record { + authority: Types.String; + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +interface UriResolver_Module_Input_getFile extends Record { + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +export const UriResolver_Module = { + tryResolveUri: async ( + input: UriResolver_Module_Input_tryResolveUri, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.web3api.eth", + method: "tryResolveUri", + input, + }); + }, + + getFile: async ( + input: UriResolver_Module_Input_getFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.web3api.eth", + method: "getFile", + input, + }); + }, +}; + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractView + extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractStatic + extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getBalance extends Record { + address: Types.String; + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_encodeParams extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_encodeFunction extends Record { + method: Types.String; + args?: Array | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_solidityPack extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_solidityKeccak256 + extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_soliditySha256 extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerAddress + extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerBalance + extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerTransactionCount + extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getGasPrice extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_estimateTransactionGas + extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_estimateContractCallGas + extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_checkAddress extends Record { + address: Types.String; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_toWei extends Record { + eth: Types.String; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_toEth extends Record { + wei: Types.BigInt; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_awaitTransaction + extends Record { + txHash: Types.String; + confirmations: Types.UInt32; + timeout: Types.UInt32; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_waitForEvent extends Record { + address: Types.String; + event: Types.String; + args?: Array | null; + timeout?: Types.UInt32 | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getNetwork extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export const Ethereum_Module = { + callContractView: async ( + input: Ethereum_Module_Input_callContractView, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractView", + input, + }); + }, + + callContractStatic: async ( + input: Ethereum_Module_Input_callContractStatic, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractStatic", + input, + }); + }, + + getBalance: async ( + input: Ethereum_Module_Input_getBalance, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getBalance", + input, + }); + }, + + encodeParams: async ( + input: Ethereum_Module_Input_encodeParams, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "encodeParams", + input, + }); + }, + + encodeFunction: async ( + input: Ethereum_Module_Input_encodeFunction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "encodeFunction", + input, + }); + }, + + solidityPack: async ( + input: Ethereum_Module_Input_solidityPack, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "solidityPack", + input, + }); + }, + + solidityKeccak256: async ( + input: Ethereum_Module_Input_solidityKeccak256, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "solidityKeccak256", + input, + }); + }, + + soliditySha256: async ( + input: Ethereum_Module_Input_soliditySha256, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "soliditySha256", + input, + }); + }, + + getSignerAddress: async ( + input: Ethereum_Module_Input_getSignerAddress, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerAddress", + input, + }); + }, + + getSignerBalance: async ( + input: Ethereum_Module_Input_getSignerBalance, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerBalance", + input, + }); + }, + + getSignerTransactionCount: async ( + input: Ethereum_Module_Input_getSignerTransactionCount, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerTransactionCount", + input, + }); + }, + + getGasPrice: async ( + input: Ethereum_Module_Input_getGasPrice, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getGasPrice", + input, + }); + }, + + estimateTransactionGas: async ( + input: Ethereum_Module_Input_estimateTransactionGas, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "estimateTransactionGas", + input, + }); + }, + + estimateContractCallGas: async ( + input: Ethereum_Module_Input_estimateContractCallGas, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "estimateContractCallGas", + input, + }); + }, + + checkAddress: async ( + input: Ethereum_Module_Input_checkAddress, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "checkAddress", + input, + }); + }, + + toWei: async ( + input: Ethereum_Module_Input_toWei, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "toWei", + input, + }); + }, + + toEth: async ( + input: Ethereum_Module_Input_toEth, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "toEth", + input, + }); + }, + + awaitTransaction: async ( + input: Ethereum_Module_Input_awaitTransaction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "awaitTransaction", + input, + }); + }, + + waitForEvent: async ( + input: Ethereum_Module_Input_waitForEvent, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "waitForEvent", + input, + }); + }, + + getNetwork: async ( + input: Ethereum_Module_Input_getNetwork, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getNetwork", + input, + }); + }, +}; + +/// Imported Modules END /// diff --git a/packages/js/plugins/ethereum/src/polywrap-man/index.ts b/packages/js/plugins/ethereum/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/ethereum/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/ethereum/src/polywrap-man/manifest.ts b/packages/js/plugins/ethereum/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..bdf0be5286 --- /dev/null +++ b/packages/js/plugins/ethereum/src/polywrap-man/manifest.ts @@ -0,0 +1,13 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/ethereum/src/polywrap-man/module.ts b/packages/js/plugins/ethereum/src/polywrap-man/module.ts new file mode 100644 index 0000000000..902e0c9a6b --- /dev/null +++ b/packages/js/plugins/ethereum/src/polywrap-man/module.ts @@ -0,0 +1,295 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_callContractView extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; +} + +export interface Input_callContractStatic extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; + txOverrides?: Types.TxOverrides | null; +} + +export interface Input_getBalance extends Record { + address: Types.String; + blockTag?: Types.BigInt | null; + connection?: Types.Connection | null; +} + +export interface Input_encodeParams extends Record { + types: Array; + values: Array; +} + +export interface Input_encodeFunction extends Record { + method: Types.String; + args?: Array | null; +} + +export interface Input_solidityPack extends Record { + types: Array; + values: Array; +} + +export interface Input_solidityKeccak256 extends Record { + types: Array; + values: Array; +} + +export interface Input_soliditySha256 extends Record { + types: Array; + values: Array; +} + +export interface Input_getSignerAddress extends Record { + connection?: Types.Connection | null; +} + +export interface Input_getSignerBalance extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Connection | null; +} + +export interface Input_getSignerTransactionCount + extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Connection | null; +} + +export interface Input_getGasPrice extends Record { + connection?: Types.Connection | null; +} + +export interface Input_estimateTransactionGas extends Record { + tx: Types.TxRequest; + connection?: Types.Connection | null; +} + +export interface Input_estimateContractCallGas extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; + txOverrides?: Types.TxOverrides | null; +} + +export interface Input_checkAddress extends Record { + address: Types.String; +} + +export interface Input_toWei extends Record { + eth: Types.String; +} + +export interface Input_toEth extends Record { + wei: Types.BigInt; +} + +export interface Input_awaitTransaction extends Record { + txHash: Types.String; + confirmations: Types.UInt32; + timeout: Types.UInt32; + connection?: Types.Connection | null; +} + +export interface Input_waitForEvent extends Record { + address: Types.String; + event: Types.String; + args?: Array | null; + timeout?: Types.UInt32 | null; + connection?: Types.Connection | null; +} + +export interface Input_getNetwork extends Record { + connection?: Types.Connection | null; +} + +export interface Input_callContractMethod extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; + txOverrides?: Types.TxOverrides | null; +} + +export interface Input_callContractMethodAndWait + extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; + txOverrides?: Types.TxOverrides | null; +} + +export interface Input_sendTransaction extends Record { + tx: Types.TxRequest; + connection?: Types.Connection | null; +} + +export interface Input_sendTransactionAndWait extends Record { + tx: Types.TxRequest; + connection?: Types.Connection | null; +} + +export interface Input_deployContract extends Record { + abi: Types.String; + bytecode: Types.String; + args?: Array | null; + connection?: Types.Connection | null; +} + +export interface Input_signMessage extends Record { + message: Types.String; + connection?: Types.Connection | null; +} + +export interface Input_sendRPC extends Record { + method: Types.String; + params: Array; + connection?: Types.Connection | null; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract callContractView( + input: Input_callContractView, + client: Client + ): MaybeAsync; + + abstract callContractStatic( + input: Input_callContractStatic, + client: Client + ): MaybeAsync; + + abstract getBalance( + input: Input_getBalance, + client: Client + ): MaybeAsync; + + abstract encodeParams( + input: Input_encodeParams, + client: Client + ): MaybeAsync; + + abstract encodeFunction( + input: Input_encodeFunction, + client: Client + ): MaybeAsync; + + abstract solidityPack( + input: Input_solidityPack, + client: Client + ): MaybeAsync; + + abstract solidityKeccak256( + input: Input_solidityKeccak256, + client: Client + ): MaybeAsync; + + abstract soliditySha256( + input: Input_soliditySha256, + client: Client + ): MaybeAsync; + + abstract getSignerAddress( + input: Input_getSignerAddress, + client: Client + ): MaybeAsync; + + abstract getSignerBalance( + input: Input_getSignerBalance, + client: Client + ): MaybeAsync; + + abstract getSignerTransactionCount( + input: Input_getSignerTransactionCount, + client: Client + ): MaybeAsync; + + abstract getGasPrice( + input: Input_getGasPrice, + client: Client + ): MaybeAsync; + + abstract estimateTransactionGas( + input: Input_estimateTransactionGas, + client: Client + ): MaybeAsync; + + abstract estimateContractCallGas( + input: Input_estimateContractCallGas, + client: Client + ): MaybeAsync; + + abstract checkAddress( + input: Input_checkAddress, + client: Client + ): MaybeAsync; + + abstract toWei(input: Input_toWei, client: Client): MaybeAsync; + + abstract toEth(input: Input_toEth, client: Client): MaybeAsync; + + abstract awaitTransaction( + input: Input_awaitTransaction, + client: Client + ): MaybeAsync; + + abstract waitForEvent( + input: Input_waitForEvent, + client: Client + ): MaybeAsync; + + abstract getNetwork( + input: Input_getNetwork, + client: Client + ): MaybeAsync; + + abstract callContractMethod( + input: Input_callContractMethod, + client: Client + ): MaybeAsync; + + abstract callContractMethodAndWait( + input: Input_callContractMethodAndWait, + client: Client + ): MaybeAsync; + + abstract sendTransaction( + input: Input_sendTransaction, + client: Client + ): MaybeAsync; + + abstract sendTransactionAndWait( + input: Input_sendTransactionAndWait, + client: Client + ): MaybeAsync; + + abstract deployContract( + input: Input_deployContract, + client: Client + ): MaybeAsync; + + abstract signMessage( + input: Input_signMessage, + client: Client + ): MaybeAsync; + + abstract sendRPC( + input: Input_sendRPC, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/ethereum/src/polywrap-man/schema.ts b/packages/js/plugins/ethereum/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..e22f4043f8 --- /dev/null +++ b/packages/js/plugins/ethereum/src/polywrap-man/schema.ts @@ -0,0 +1,305 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module { + callContractView( + address: String! + method: String! + args: [String!] + connection: Connection + ): String! + + callContractStatic( + address: String! + method: String! + args: [String!] + connection: Connection + txOverrides: TxOverrides + ): StaticTxResult! + + getBalance( + address: String! + blockTag: BigInt + connection: Connection + ): BigInt! + + encodeParams( + types: [String!]! + values: [String!]! + ): String! + + encodeFunction( + method: String! + args: [String!] + ): String! + + solidityPack( + types: [String!]! + values: [String!]! + ): String! + + solidityKeccak256( + types: [String!]! + values: [String!]! + ): String! + + soliditySha256( + types: [String!]! + values: [String!]! + ): String! + + getSignerAddress( + connection: Connection + ): String! + + getSignerBalance( + blockTag: BigInt + connection: Connection + ): BigInt! + + getSignerTransactionCount( + blockTag: BigInt + connection: Connection + ): BigInt! + + getGasPrice( + connection: Connection + ): BigInt! + + estimateTransactionGas( + tx: TxRequest! + connection: Connection + ): BigInt! + + estimateContractCallGas( + address: String! + method: String! + args: [String!] + connection: Connection + txOverrides: TxOverrides + ): BigInt! + + checkAddress( + address: String! + ): Boolean! + + toWei( + eth: String! + ): BigInt! + + toEth( + wei: BigInt! + ): String! + + awaitTransaction( + txHash: String! + confirmations: UInt32! + timeout: UInt32! + connection: Connection + ): TxReceipt! + + waitForEvent( + address: String! + event: String! + args: [String!] + timeout: UInt32 + connection: Connection + ): EventNotification! + + getNetwork( + connection: Connection + ): Network! + + callContractMethod( + address: String! + method: String! + args: [String!] + connection: Connection + txOverrides: TxOverrides + ): TxResponse! + + callContractMethodAndWait( + address: String! + method: String! + args: [String!] + connection: Connection + txOverrides: TxOverrides + ): TxReceipt! + + sendTransaction( + tx: TxRequest! + connection: Connection + ): TxResponse! + + sendTransactionAndWait( + tx: TxRequest! + connection: Connection + ): TxReceipt! + + deployContract( + abi: String! + bytecode: String! + args: [String!] + connection: Connection + ): String! + + signMessage( + message: String! + connection: Connection + ): String! + + sendRPC( + method: String! + params: [String!]! + connection: Connection + ): String +} + +type Env { + connection: Connection +} + +type TxReceipt { + to: String! + from: String! + contractAddress: String! + transactionIndex: UInt32! + root: String + gasUsed: BigInt! + logsBloom: String! + transactionHash: String! + logs: [Log!]! + blockNumber: BigInt! + blockHash: String! + confirmations: UInt32! + cumulativeGasUsed: BigInt! + effectiveGasPrice: BigInt! + byzantium: Boolean! + type: UInt32! + status: UInt32 +} + +type Log { + blockNumber: BigInt! + blockHash: String! + transactionIndex: UInt32! + removed: Boolean! + address: String! + data: String! + topics: [String!]! + transactionHash: String! + logIndex: UInt32! +} + +type TxResponse { + hash: String! + to: String + from: String! + nonce: UInt32! + gasLimit: BigInt! + gasPrice: BigInt + data: String! + value: BigInt! + chainId: BigInt! + blockNumber: BigInt + blockHash: String + timestamp: UInt32 + confirmations: UInt32! + raw: String + r: String + s: String + v: UInt32 + type: UInt32 + accessList: [Access!] +} + +type Access { + address: String! + storageKeys: [String!]! +} + +type TxRequest { + to: String + from: String + nonce: UInt32 + gasLimit: BigInt + gasPrice: BigInt + data: String + value: BigInt + chainId: BigInt + type: UInt32 +} + +type TxOverrides { + gasLimit: BigInt + gasPrice: BigInt + value: BigInt +} + +type StaticTxResult { + result: String! + error: Boolean! +} + +type EventNotification { + data: String! + address: String! + log: Log! +} + +type Connection { + node: String + networkNameOrChainId: String +} + +type Network { + name: String! + chainId: BigInt! + ensAddress: String +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/ethereum/src/polywrap-man/types.ts b/packages/js/plugins/ethereum/src/polywrap-man/types.ts new file mode 100644 index 0000000000..28682eaf17 --- /dev/null +++ b/packages/js/plugins/ethereum/src/polywrap-man/types.ts @@ -0,0 +1,140 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +export interface Env extends Record { + connection?: Types.Connection | null; +} +/// Envs END /// + +/// Objects START /// +export interface TxReceipt { + to: Types.String; + from: Types.String; + contractAddress: Types.String; + transactionIndex: Types.UInt32; + root?: Types.String | null; + gasUsed: Types.BigInt; + logsBloom: Types.String; + transactionHash: Types.String; + logs: Array; + blockNumber: Types.BigInt; + blockHash: Types.String; + confirmations: Types.UInt32; + cumulativeGasUsed: Types.BigInt; + effectiveGasPrice: Types.BigInt; + byzantium: Types.Boolean; + type: Types.UInt32; + status?: Types.UInt32 | null; +} + +export interface Log { + blockNumber: Types.BigInt; + blockHash: Types.String; + transactionIndex: Types.UInt32; + removed: Types.Boolean; + address: Types.String; + data: Types.String; + topics: Array; + transactionHash: Types.String; + logIndex: Types.UInt32; +} + +export interface TxResponse { + hash: Types.String; + to?: Types.String | null; + from: Types.String; + nonce: Types.UInt32; + gasLimit: Types.BigInt; + gasPrice?: Types.BigInt | null; + data: Types.String; + value: Types.BigInt; + chainId: Types.BigInt; + blockNumber?: Types.BigInt | null; + blockHash?: Types.String | null; + timestamp?: Types.UInt32 | null; + confirmations: Types.UInt32; + raw?: Types.String | null; + r?: Types.String | null; + s?: Types.String | null; + v?: Types.UInt32 | null; + type?: Types.UInt32 | null; + accessList?: Array | null; +} + +export interface Access { + address: Types.String; + storageKeys: Array; +} + +export interface TxRequest { + to?: Types.String | null; + from?: Types.String | null; + nonce?: Types.UInt32 | null; + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + data?: Types.String | null; + value?: Types.BigInt | null; + chainId?: Types.BigInt | null; + type?: Types.UInt32 | null; +} + +export interface TxOverrides { + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + value?: Types.BigInt | null; +} + +export interface StaticTxResult { + result: Types.String; + error: Types.Boolean; +} + +export interface EventNotification { + data: Types.String; + address: Types.String; + log: Types.Log; +} + +export interface Connection { + node?: Types.String | null; + networkNameOrChainId?: Types.String | null; +} + +export interface Network { + name: Types.String; + chainId: Types.BigInt; + ensAddress?: Types.String | null; +} + +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// diff --git a/packages/js/plugins/filesystem/src/polywrap-man/index.ts b/packages/js/plugins/filesystem/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/filesystem/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/filesystem/src/polywrap-man/manifest.ts b/packages/js/plugins/filesystem/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..bdf0be5286 --- /dev/null +++ b/packages/js/plugins/filesystem/src/polywrap-man/manifest.ts @@ -0,0 +1,13 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/filesystem/src/polywrap-man/module.ts b/packages/js/plugins/filesystem/src/polywrap-man/module.ts new file mode 100644 index 0000000000..fb6ec175b7 --- /dev/null +++ b/packages/js/plugins/filesystem/src/polywrap-man/module.ts @@ -0,0 +1,31 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +export interface Input_getFile extends Record { + path: Types.String; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract tryResolveUri( + input: Input_tryResolveUri, + client: Client + ): MaybeAsync; + + abstract getFile( + input: Input_getFile, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/filesystem/src/polywrap-man/schema.ts b/packages/js/plugins/filesystem/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..260f41c9f8 --- /dev/null +++ b/packages/js/plugins/filesystem/src/polywrap-man/schema.ts @@ -0,0 +1,88 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module implements UriResolver_Module @imports( + types: [ + "UriResolver_Module", + "UriResolver_MaybeUriOrManifest" + ] +) { + tryResolveUri( + authority: String! + path: String! + ): UriResolver_MaybeUriOrManifest + + getFile( + path: String! + ): Bytes +} + +### Imported Modules START ### + +type UriResolver_Module @imported( + uri: "ens/uri-resolver.core.web3api.eth", + namespace: "UriResolver", + nativeType: "Module" +) { + tryResolveUri( + authority: String! + path: String! + ): UriResolver_MaybeUriOrManifest + + getFile( + path: String! + ): Bytes +} + +### Imported Modules END ### + +### Imported Objects START ### + +type UriResolver_MaybeUriOrManifest @imported( + uri: "ens/uri-resolver.core.web3api.eth", + namespace: "UriResolver", + nativeType: "MaybeUriOrManifest" +) { + uri: String + manifest: String +} + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/filesystem/src/polywrap-man/types.ts b/packages/js/plugins/filesystem/src/polywrap-man/types.ts new file mode 100644 index 0000000000..0672a29a99 --- /dev/null +++ b/packages/js/plugins/filesystem/src/polywrap-man/types.ts @@ -0,0 +1,83 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./"; + +import { Client, InvokeApiResult } from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +/// Envs END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +export interface UriResolver_MaybeUriOrManifest { + uri?: Types.String | null; + manifest?: Types.String | null; +} + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +interface UriResolver_Module_Input_tryResolveUri + extends Record { + authority: Types.String; + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +interface UriResolver_Module_Input_getFile extends Record { + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +export const UriResolver_Module = { + tryResolveUri: async ( + input: UriResolver_Module_Input_tryResolveUri, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.web3api.eth", + method: "tryResolveUri", + input, + }); + }, + + getFile: async ( + input: UriResolver_Module_Input_getFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.web3api.eth", + method: "getFile", + input, + }); + }, +}; + +/// Imported Modules END /// diff --git a/packages/js/plugins/graph-node/src/polywrap-man/index.ts b/packages/js/plugins/graph-node/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/graph-node/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/graph-node/src/polywrap-man/manifest.ts b/packages/js/plugins/graph-node/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..bdf0be5286 --- /dev/null +++ b/packages/js/plugins/graph-node/src/polywrap-man/manifest.ts @@ -0,0 +1,13 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/graph-node/src/polywrap-man/module.ts b/packages/js/plugins/graph-node/src/polywrap-man/module.ts new file mode 100644 index 0000000000..f966dbe16e --- /dev/null +++ b/packages/js/plugins/graph-node/src/polywrap-man/module.ts @@ -0,0 +1,23 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_querySubgraph extends Record { + subgraphAuthor: Types.String; + subgraphName: Types.String; + query: Types.String; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract querySubgraph( + input: Input_querySubgraph, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/graph-node/src/polywrap-man/schema.ts b/packages/js/plugins/graph-node/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..4d278e9218 --- /dev/null +++ b/packages/js/plugins/graph-node/src/polywrap-man/schema.ts @@ -0,0 +1,130 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module @imports( + types: [ + "HTTP_Module", + "HTTP_Request", + "HTTP_Header", + "HTTP_UrlParam", + "HTTP_ResponseType", + "HTTP_Response" + ] +) { + querySubgraph( + subgraphAuthor: String! + subgraphName: String! + query: String! + ): String! +} + +### Imported Modules START ### + +type HTTP_Module @imported( + uri: "ens/http.web3api.eth", + namespace: "HTTP", + nativeType: "Module" +) { + get( + url: String! + request: HTTP_Request + ): HTTP_Response + + post( + url: String! + request: HTTP_Request + ): HTTP_Response +} + +### Imported Modules END ### + +### Imported Objects START ### + +type HTTP_Request @imported( + uri: "ens/http.web3api.eth", + namespace: "HTTP", + nativeType: "Request" +) { + headers: [HTTP_Header!] + urlParams: [HTTP_UrlParam!] + responseType: HTTP_ResponseType! + body: String +} + +type HTTP_Header @imported( + uri: "ens/http.web3api.eth", + namespace: "HTTP", + nativeType: "Header" +) { + key: String! + value: String! +} + +type HTTP_UrlParam @imported( + uri: "ens/http.web3api.eth", + namespace: "HTTP", + nativeType: "UrlParam" +) { + key: String! + value: String! +} + +type HTTP_Response @imported( + uri: "ens/http.web3api.eth", + namespace: "HTTP", + nativeType: "Response" +) { + status: Int! + statusText: String! + headers: [HTTP_Header!] + body: String +} + +enum HTTP_ResponseType @imported( + uri: "ens/http.web3api.eth", + namespace: "HTTP", + nativeType: "ResponseType" +) { + TEXT + BINARY +} + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/graph-node/src/polywrap-man/types.ts b/packages/js/plugins/graph-node/src/polywrap-man/types.ts new file mode 100644 index 0000000000..4fedc8a7c0 --- /dev/null +++ b/packages/js/plugins/graph-node/src/polywrap-man/types.ts @@ -0,0 +1,115 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./"; + +import { Client, InvokeApiResult } from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +/// Envs END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/http.web3api.eth" */ +export interface HTTP_Request { + headers?: Array | null; + urlParams?: Array | null; + responseType: Types.HTTP_ResponseType; + body?: Types.String | null; +} + +/* URI: "ens/http.web3api.eth" */ +export interface HTTP_Header { + key: Types.String; + value: Types.String; +} + +/* URI: "ens/http.web3api.eth" */ +export interface HTTP_UrlParam { + key: Types.String; + value: Types.String; +} + +/* URI: "ens/http.web3api.eth" */ +export interface HTTP_Response { + status: Types.Int; + statusText: Types.String; + headers?: Array | null; + body?: Types.String | null; +} + +/* URI: "ens/http.web3api.eth" */ +export enum HTTP_ResponseTypeEnum { + TEXT, + BINARY, +} + +export type HTTP_ResponseTypeString = "TEXT" | "BINARY"; + +export type HTTP_ResponseType = HTTP_ResponseTypeEnum | HTTP_ResponseTypeString; + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/http.web3api.eth" */ +interface HTTP_Module_Input_get extends Record { + url: Types.String; + request?: Types.HTTP_Request | null; +} + +/* URI: "ens/http.web3api.eth" */ +interface HTTP_Module_Input_post extends Record { + url: Types.String; + request?: Types.HTTP_Request | null; +} + +/* URI: "ens/http.web3api.eth" */ +export const HTTP_Module = { + get: async ( + input: HTTP_Module_Input_get, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/http.web3api.eth", + method: "get", + input, + }); + }, + + post: async ( + input: HTTP_Module_Input_post, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/http.web3api.eth", + method: "post", + input, + }); + }, +}; + +/// Imported Modules END /// diff --git a/packages/js/plugins/http/src/polywrap-man/index.ts b/packages/js/plugins/http/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/http/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/http/src/polywrap-man/manifest.ts b/packages/js/plugins/http/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..bdf0be5286 --- /dev/null +++ b/packages/js/plugins/http/src/polywrap-man/manifest.ts @@ -0,0 +1,13 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/http/src/polywrap-man/module.ts b/packages/js/plugins/http/src/polywrap-man/module.ts new file mode 100644 index 0000000000..c702c01eb5 --- /dev/null +++ b/packages/js/plugins/http/src/polywrap-man/module.ts @@ -0,0 +1,32 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_get extends Record { + url: Types.String; + request?: Types.Request | null; +} + +export interface Input_post extends Record { + url: Types.String; + request?: Types.Request | null; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract get( + input: Input_get, + client: Client + ): MaybeAsync; + + abstract post( + input: Input_post, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/http/src/polywrap-man/schema.ts b/packages/js/plugins/http/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..fd42af3d5f --- /dev/null +++ b/packages/js/plugins/http/src/polywrap-man/schema.ts @@ -0,0 +1,89 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module { + get( + url: String! + request: Request + ): Response + + post( + url: String! + request: Request + ): Response +} + +type Header { + key: String! + value: String! +} + +type UrlParam { + key: String! + value: String! +} + +type Response { + status: Int! + statusText: String! + headers: [Header!] + body: String +} + +type Request { + headers: [Header!] + urlParams: [UrlParam!] + responseType: ResponseType! + body: String +} + +enum ResponseType { + TEXT + BINARY +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/http/src/polywrap-man/types.ts b/packages/js/plugins/http/src/polywrap-man/types.ts new file mode 100644 index 0000000000..4e8098ca01 --- /dev/null +++ b/packages/js/plugins/http/src/polywrap-man/types.ts @@ -0,0 +1,71 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +/// Envs END /// + +/// Objects START /// +export interface Header { + key: Types.String; + value: Types.String; +} + +export interface UrlParam { + key: Types.String; + value: Types.String; +} + +export interface Response { + status: Types.Int; + statusText: Types.String; + headers?: Array | null; + body?: Types.String | null; +} + +export interface Request { + headers?: Array | null; + urlParams?: Array | null; + responseType: Types.ResponseType; + body?: Types.String | null; +} + +/// Objects END /// + +/// Enums START /// +export enum ResponseTypeEnum { + TEXT, + BINARY, +} + +export type ResponseTypeString = "TEXT" | "BINARY"; + +export type ResponseType = ResponseTypeEnum | ResponseTypeString; + +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// diff --git a/packages/js/plugins/ipfs/src/polywrap-man/index.ts b/packages/js/plugins/ipfs/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/ipfs/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/ipfs/src/polywrap-man/manifest.ts b/packages/js/plugins/ipfs/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..f7b9e13f5e --- /dev/null +++ b/packages/js/plugins/ipfs/src/polywrap-man/manifest.ts @@ -0,0 +1,11 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/ipfs/src/polywrap-man/module.ts b/packages/js/plugins/ipfs/src/polywrap-man/module.ts new file mode 100644 index 0000000000..ee6664ef40 --- /dev/null +++ b/packages/js/plugins/ipfs/src/polywrap-man/module.ts @@ -0,0 +1,60 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_catFile extends Record { + cid: Types.String; + options?: Types.Options | null; +} + +export interface Input_resolve extends Record { + cid: Types.String; + options?: Types.Options | null; +} + +export interface Input_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +export interface Input_getFile extends Record { + path: Types.String; +} + +export interface Input_addFile extends Record { + data: Types.Bytes; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract catFile( + input: Input_catFile, + client: Client + ): MaybeAsync; + + abstract resolve( + input: Input_resolve, + client: Client + ): MaybeAsync; + + abstract tryResolveUri( + input: Input_tryResolveUri, + client: Client + ): MaybeAsync; + + abstract getFile( + input: Input_getFile, + client: Client + ): MaybeAsync; + + abstract addFile( + input: Input_addFile, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/ipfs/src/polywrap-man/schema.ts b/packages/js/plugins/ipfs/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..df29254e24 --- /dev/null +++ b/packages/js/plugins/ipfs/src/polywrap-man/schema.ts @@ -0,0 +1,130 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module implements UriResolver_Module @imports( + types: [ + "UriResolver_Module", + "UriResolver_MaybeUriOrManifest" + ] +) { + catFile( + cid: String! + options: Options + ): Bytes! + + resolve( + cid: String! + options: Options + ): ResolveResult + + tryResolveUri( + authority: String! + path: String! + ): UriResolver_MaybeUriOrManifest + + getFile( + path: String! + ): Bytes + + addFile( + data: Bytes! + ): String! +} + +type Env { + """ + Disable querying providers in parallel when resolving URIs + """ + disableParallelRequests: Boolean +} + +type ResolveResult { + cid: String! + provider: String! +} + +type Options { + """ + Timeout (in ms) for the operation. +Fallback providers are used if timeout is reached. + """ + timeout: UInt32 + """ + The IPFS provider to be used + """ + provider: String + """ + Disable querying providers in parallel when resolving URIs + """ + disableParallelRequests: Boolean +} + +### Imported Modules START ### + +type UriResolver_Module @imported( + uri: "ens/uri-resolver.core.web3api.eth", + namespace: "UriResolver", + nativeType: "Module" +) { + tryResolveUri( + authority: String! + path: String! + ): UriResolver_MaybeUriOrManifest + + getFile( + path: String! + ): Bytes +} + +### Imported Modules END ### + +### Imported Objects START ### + +type UriResolver_MaybeUriOrManifest @imported( + uri: "ens/uri-resolver.core.web3api.eth", + namespace: "UriResolver", + nativeType: "MaybeUriOrManifest" +) { + uri: String + manifest: String +} + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/ipfs/src/polywrap-man/types.ts b/packages/js/plugins/ipfs/src/polywrap-man/types.ts new file mode 100644 index 0000000000..bfedabd61c --- /dev/null +++ b/packages/js/plugins/ipfs/src/polywrap-man/types.ts @@ -0,0 +1,97 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./"; + +import { Client, InvokeApiResult } from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +export interface Env extends Record { + disableParallelRequests?: Types.Boolean | null; +} +/// Envs END /// + +/// Objects START /// +export interface ResolveResult { + cid: Types.String; + provider: Types.String; +} + +export interface Options { + timeout?: Types.UInt32 | null; + provider?: Types.String | null; + disableParallelRequests?: Types.Boolean | null; +} + +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +export interface UriResolver_MaybeUriOrManifest { + uri?: Types.String | null; + manifest?: Types.String | null; +} + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +interface UriResolver_Module_Input_tryResolveUri + extends Record { + authority: Types.String; + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +interface UriResolver_Module_Input_getFile extends Record { + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.web3api.eth" */ +export const UriResolver_Module = { + tryResolveUri: async ( + input: UriResolver_Module_Input_tryResolveUri, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.web3api.eth", + method: "tryResolveUri", + input, + }); + }, + + getFile: async ( + input: UriResolver_Module_Input_getFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.web3api.eth", + method: "getFile", + input, + }); + }, +}; + +/// Imported Modules END /// diff --git a/packages/js/plugins/logger/src/polywrap-man/index.ts b/packages/js/plugins/logger/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/logger/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/logger/src/polywrap-man/manifest.ts b/packages/js/plugins/logger/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..bdf0be5286 --- /dev/null +++ b/packages/js/plugins/logger/src/polywrap-man/manifest.ts @@ -0,0 +1,13 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/logger/src/polywrap-man/module.ts b/packages/js/plugins/logger/src/polywrap-man/module.ts new file mode 100644 index 0000000000..ded6effc40 --- /dev/null +++ b/packages/js/plugins/logger/src/polywrap-man/module.ts @@ -0,0 +1,19 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_log extends Record { + level: Types.Logger_LogLevel; + message: Types.String; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract log(input: Input_log, client: Client): MaybeAsync; +} diff --git a/packages/js/plugins/logger/src/polywrap-man/schema.ts b/packages/js/plugins/logger/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..9a541f8e8c --- /dev/null +++ b/packages/js/plugins/logger/src/polywrap-man/schema.ts @@ -0,0 +1,82 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module implements Logger_Module @imports( + types: [ + "Logger_Module", + "Logger_LogLevel" + ] +) { + log( + level: Logger_LogLevel! + message: String! + ): Boolean! +} + +### Imported Modules START ### + +type Logger_Module @imported( + uri: "ens/logger.core.web3api.eth", + namespace: "Logger", + nativeType: "Module" +) { + log( + level: Logger_LogLevel! + message: String! + ): Boolean! +} + +### Imported Modules END ### + +### Imported Objects START ### + +enum Logger_LogLevel @imported( + uri: "ens/logger.core.web3api.eth", + namespace: "Logger", + nativeType: "LogLevel" +) { + DEBUG + INFO + WARN + ERROR +} + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/logger/src/polywrap-man/types.ts b/packages/js/plugins/logger/src/polywrap-man/types.ts new file mode 100644 index 0000000000..078745b3ba --- /dev/null +++ b/packages/js/plugins/logger/src/polywrap-man/types.ts @@ -0,0 +1,72 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./"; + +import { Client, InvokeApiResult } from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +/// Envs END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/logger.core.web3api.eth" */ +export enum Logger_LogLevelEnum { + DEBUG, + INFO, + WARN, + ERROR, +} + +export type Logger_LogLevelString = "DEBUG" | "INFO" | "WARN" | "ERROR"; + +export type Logger_LogLevel = Logger_LogLevelEnum | Logger_LogLevelString; + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/logger.core.web3api.eth" */ +interface Logger_Module_Input_log extends Record { + level: Types.Logger_LogLevel; + message: Types.String; +} + +/* URI: "ens/logger.core.web3api.eth" */ +export const Logger_Module = { + log: async ( + input: Logger_Module_Input_log, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/logger.core.web3api.eth", + method: "log", + input, + }); + }, +}; + +/// Imported Modules END /// diff --git a/packages/js/plugins/sha3/src/polywrap-man/index.ts b/packages/js/plugins/sha3/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/sha3/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/sha3/src/polywrap-man/manifest.ts b/packages/js/plugins/sha3/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..bdf0be5286 --- /dev/null +++ b/packages/js/plugins/sha3/src/polywrap-man/manifest.ts @@ -0,0 +1,13 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/sha3/src/polywrap-man/module.ts b/packages/js/plugins/sha3/src/polywrap-man/module.ts new file mode 100644 index 0000000000..0b7ded2bd9 --- /dev/null +++ b/packages/js/plugins/sha3/src/polywrap-man/module.ts @@ -0,0 +1,122 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_sha3_512 extends Record { + message: Types.String; +} + +export interface Input_sha3_384 extends Record { + message: Types.String; +} + +export interface Input_sha3_256 extends Record { + message: Types.String; +} + +export interface Input_sha3_224 extends Record { + message: Types.String; +} + +export interface Input_keccak_512 extends Record { + message: Types.String; +} + +export interface Input_keccak_384 extends Record { + message: Types.String; +} + +export interface Input_keccak_256 extends Record { + message: Types.String; +} + +export interface Input_keccak_224 extends Record { + message: Types.String; +} + +export interface Input_hex_keccak_256 extends Record { + message: Types.String; +} + +export interface Input_buffer_keccak_256 extends Record { + message: Types.Bytes; +} + +export interface Input_shake_128 extends Record { + message: Types.String; + outputBits: Types.Int; +} + +export interface Input_shake_256 extends Record { + message: Types.String; + outputBits: Types.Int; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract sha3_512( + input: Input_sha3_512, + client: Client + ): MaybeAsync; + + abstract sha3_384( + input: Input_sha3_384, + client: Client + ): MaybeAsync; + + abstract sha3_256( + input: Input_sha3_256, + client: Client + ): MaybeAsync; + + abstract sha3_224( + input: Input_sha3_224, + client: Client + ): MaybeAsync; + + abstract keccak_512( + input: Input_keccak_512, + client: Client + ): MaybeAsync; + + abstract keccak_384( + input: Input_keccak_384, + client: Client + ): MaybeAsync; + + abstract keccak_256( + input: Input_keccak_256, + client: Client + ): MaybeAsync; + + abstract keccak_224( + input: Input_keccak_224, + client: Client + ): MaybeAsync; + + abstract hex_keccak_256( + input: Input_hex_keccak_256, + client: Client + ): MaybeAsync; + + abstract buffer_keccak_256( + input: Input_buffer_keccak_256, + client: Client + ): MaybeAsync; + + abstract shake_128( + input: Input_shake_128, + client: Client + ): MaybeAsync; + + abstract shake_256( + input: Input_shake_256, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/sha3/src/polywrap-man/schema.ts b/packages/js/plugins/sha3/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..461d822423 --- /dev/null +++ b/packages/js/plugins/sha3/src/polywrap-man/schema.ts @@ -0,0 +1,100 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module { + sha3_512( + message: String! + ): String! + + sha3_384( + message: String! + ): String! + + sha3_256( + message: String! + ): String! + + sha3_224( + message: String! + ): String! + + keccak_512( + message: String! + ): String! + + keccak_384( + message: String! + ): String! + + keccak_256( + message: String! + ): String! + + keccak_224( + message: String! + ): String! + + hex_keccak_256( + message: String! + ): String! + + buffer_keccak_256( + message: Bytes! + ): String! + + shake_128( + message: String! + outputBits: Int! + ): String! + + shake_256( + message: String! + outputBits: Int! + ): String! +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/sha3/src/polywrap-man/types.ts b/packages/js/plugins/sha3/src/polywrap-man/types.ts new file mode 100644 index 0000000000..4888424e2e --- /dev/null +++ b/packages/js/plugins/sha3/src/polywrap-man/types.ts @@ -0,0 +1,34 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +/// Envs END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// diff --git a/packages/js/plugins/uts46/src/polywrap-man/index.ts b/packages/js/plugins/uts46/src/polywrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/uts46/src/polywrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uts46/src/polywrap-man/manifest.ts b/packages/js/plugins/uts46/src/polywrap-man/manifest.ts new file mode 100644 index 0000000000..bdf0be5286 --- /dev/null +++ b/packages/js/plugins/uts46/src/polywrap-man/manifest.ts @@ -0,0 +1,13 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +import { PluginPackageManifest } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [], +}; diff --git a/packages/js/plugins/uts46/src/polywrap-man/module.ts b/packages/js/plugins/uts46/src/polywrap-man/module.ts new file mode 100644 index 0000000000..2b34f4b0e9 --- /dev/null +++ b/packages/js/plugins/uts46/src/polywrap-man/module.ts @@ -0,0 +1,39 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./types"; + +import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; + +export interface Input_toAscii extends Record { + value: Types.String; +} + +export interface Input_toUnicode extends Record { + value: Types.String; +} + +export interface Input_convert extends Record { + value: Types.String; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule { + abstract toAscii( + input: Input_toAscii, + client: Client + ): MaybeAsync; + + abstract toUnicode( + input: Input_toUnicode, + client: Client + ): MaybeAsync; + + abstract convert( + input: Input_convert, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/uts46/src/polywrap-man/schema.ts b/packages/js/plugins/uts46/src/polywrap-man/schema.ts new file mode 100644 index 0000000000..dc870fd524 --- /dev/null +++ b/packages/js/plugins/uts46/src/polywrap-man/schema.ts @@ -0,0 +1,67 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module { + toAscii( + value: String! + ): String! + + toUnicode( + value: String! + ): String! + + convert( + value: String! + ): ConvertResult! +} + +type ConvertResult { + IDN: String! + PC: String! +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### +`; diff --git a/packages/js/plugins/uts46/src/polywrap-man/types.ts b/packages/js/plugins/uts46/src/polywrap-man/types.ts new file mode 100644 index 0000000000..d27c658cf2 --- /dev/null +++ b/packages/js/plugins/uts46/src/polywrap-man/types.ts @@ -0,0 +1,43 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as Types from "./"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +/// Envs END /// + +/// Objects START /// +export interface ConvertResult { + IDN: Types.String; + PC: Types.String; +} + +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/index.ts new file mode 100644 index 0000000000..ff371c0cd8 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@web3api/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/manifest.ts new file mode 100644 index 0000000000..4d35c2182f --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/manifest.ts @@ -0,0 +1,15 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@web3api/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [ + ], +}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/module.ts new file mode 100644 index 0000000000..6b0aa5629b --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/module.ts @@ -0,0 +1,37 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@web3api/core-js"; + +export interface Input_methodOne extends Record { + str: Types.String; + optStr?: Types.String | null; +} + +export interface Input_methodTwo extends Record { + arg: Types.UInt32; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule< + TConfig, + Types.Env +> { + + abstract methodOne( + input: Input_methodOne, + client: Client + ): MaybeAsync; + + abstract methodTwo( + input: Input_methodTwo, + client: Client + ): MaybeAsync; +} diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/schema.ts new file mode 100644 index 0000000000..29807e38af --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/schema.ts @@ -0,0 +1,380 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema: string = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module @imports( + types: [ + "Ethereum_Module", + "Ethereum_Connection", + "Ethereum_TxOverrides", + "Ethereum_StaticTxResult", + "Ethereum_TxRequest", + "Ethereum_TxReceipt", + "Ethereum_Log", + "Ethereum_EventNotification", + "Ethereum_Network", + "Ethereum_TxResponse", + "Ethereum_Access" + ] +) { + methodOne( + str: String! + optStr: String + ): Object! + + methodTwo( + arg: UInt32! + ): String! +} + +type Env { + arg1: String! +} + +type Object { + u: UInt! + array: [Boolean!]! + bytes: Bytes +} + +### Imported Modules START ### + +type Ethereum_Module @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Module" +) { + callContractView( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + callContractStatic( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_StaticTxResult! + + getBalance( + address: String! + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + encodeParams( + types: [String!]! + values: [String!]! + ): String! + + encodeFunction( + method: String! + args: [String!] + ): String! + + solidityPack( + types: [String!]! + values: [String!]! + ): String! + + solidityKeccak256( + types: [String!]! + values: [String!]! + ): String! + + soliditySha256( + types: [String!]! + values: [String!]! + ): String! + + getSignerAddress( + connection: Ethereum_Connection + ): String! + + getSignerBalance( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getSignerTransactionCount( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getGasPrice( + connection: Ethereum_Connection + ): BigInt! + + estimateTransactionGas( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): BigInt! + + estimateContractCallGas( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): BigInt! + + checkAddress( + address: String! + ): Boolean! + + toWei( + eth: String! + ): BigInt! + + toEth( + wei: BigInt! + ): String! + + awaitTransaction( + txHash: String! + confirmations: UInt32! + timeout: UInt32! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + waitForEvent( + address: String! + event: String! + args: [String!] + timeout: UInt32 + connection: Ethereum_Connection + ): Ethereum_EventNotification! + + getNetwork( + connection: Ethereum_Connection + ): Ethereum_Network! + + callContractMethod( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_TxResponse! + + callContractMethodAndWait( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_TxReceipt! + + sendTransaction( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): Ethereum_TxResponse! + + sendTransactionAndWait( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + deployContract( + abi: String! + bytecode: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + signMessage( + message: String! + connection: Ethereum_Connection + ): String! + + sendRPC( + method: String! + params: [String!]! + connection: Ethereum_Connection + ): String +} + +### Imported Modules END ### + +### Imported Objects START ### + +type Ethereum_Connection @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Connection" +) { + node: String + networkNameOrChainId: String +} + +type Ethereum_TxOverrides @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxOverrides" +) { + gasLimit: BigInt + gasPrice: BigInt + value: BigInt +} + +type Ethereum_StaticTxResult @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "StaticTxResult" +) { + result: String! + error: Boolean! +} + +type Ethereum_TxRequest @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxRequest" +) { + to: String + from: String + nonce: UInt32 + gasLimit: BigInt + gasPrice: BigInt + data: String + value: BigInt + chainId: BigInt + type: UInt32 +} + +type Ethereum_TxReceipt @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxReceipt" +) { + to: String! + from: String! + contractAddress: String! + transactionIndex: UInt32! + root: String + gasUsed: BigInt! + logsBloom: String! + transactionHash: String! + logs: [Ethereum_Log!]! + blockNumber: BigInt! + blockHash: String! + confirmations: UInt32! + cumulativeGasUsed: BigInt! + effectiveGasPrice: BigInt! + byzantium: Boolean! + type: UInt32! + status: UInt32 +} + +type Ethereum_Log @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Log" +) { + blockNumber: BigInt! + blockHash: String! + transactionIndex: UInt32! + removed: Boolean! + address: String! + data: String! + topics: [String!]! + transactionHash: String! + logIndex: UInt32! +} + +type Ethereum_EventNotification @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "EventNotification" +) { + data: String! + address: String! + log: Ethereum_Log! +} + +type Ethereum_Network @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Network" +) { + name: String! + chainId: BigInt! + ensAddress: String +} + +type Ethereum_TxResponse @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxResponse" +) { + hash: String! + to: String + from: String! + nonce: UInt32! + gasLimit: BigInt! + gasPrice: BigInt + data: String! + value: BigInt! + chainId: BigInt! + blockNumber: BigInt + blockHash: String + timestamp: UInt32 + confirmations: UInt32! + raw: String + r: String + s: String + v: UInt32 + type: UInt32 + accessList: [Ethereum_Access!] +} + +type Ethereum_Access @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Access" +) { + address: String! + storageKeys: [String!]! +} + +### Imported Objects END ### +`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/types.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/types.ts new file mode 100644 index 0000000000..b89d8ec8f6 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/types.ts @@ -0,0 +1,640 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeApiResult +} from "@web3api/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +export interface Env extends Record { + arg1: Types.String; +} +/// Envs END /// + +/// Objects START /// +export interface Object { + u: Types.UInt; + array: Array; + bytes?: Types.Bytes | null; +} + +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Connection { + node?: Types.String | null; + networkNameOrChainId?: Types.String | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxOverrides { + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + value?: Types.BigInt | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_StaticTxResult { + result: Types.String; + error: Types.Boolean; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxRequest { + to?: Types.String | null; + from?: Types.String | null; + nonce?: Types.UInt32 | null; + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + data?: Types.String | null; + value?: Types.BigInt | null; + chainId?: Types.BigInt | null; + type?: Types.UInt32 | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxReceipt { + to: Types.String; + from: Types.String; + contractAddress: Types.String; + transactionIndex: Types.UInt32; + root?: Types.String | null; + gasUsed: Types.BigInt; + logsBloom: Types.String; + transactionHash: Types.String; + logs: Array; + blockNumber: Types.BigInt; + blockHash: Types.String; + confirmations: Types.UInt32; + cumulativeGasUsed: Types.BigInt; + effectiveGasPrice: Types.BigInt; + byzantium: Types.Boolean; + type: Types.UInt32; + status?: Types.UInt32 | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Log { + blockNumber: Types.BigInt; + blockHash: Types.String; + transactionIndex: Types.UInt32; + removed: Types.Boolean; + address: Types.String; + data: Types.String; + topics: Array; + transactionHash: Types.String; + logIndex: Types.UInt32; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_EventNotification { + data: Types.String; + address: Types.String; + log: Types.Ethereum_Log; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Network { + name: Types.String; + chainId: Types.BigInt; + ensAddress?: Types.String | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxResponse { + hash: Types.String; + to?: Types.String | null; + from: Types.String; + nonce: Types.UInt32; + gasLimit: Types.BigInt; + gasPrice?: Types.BigInt | null; + data: Types.String; + value: Types.BigInt; + chainId: Types.BigInt; + blockNumber?: Types.BigInt | null; + blockHash?: Types.String | null; + timestamp?: Types.UInt32 | null; + confirmations: Types.UInt32; + raw?: Types.String | null; + r?: Types.String | null; + s?: Types.String | null; + v?: Types.UInt32 | null; + type?: Types.UInt32 | null; + accessList?: Array | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Access { + address: Types.String; + storageKeys: Array; +} + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractView extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractStatic extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getBalance extends Record { + address: Types.String; + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_encodeParams extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_encodeFunction extends Record { + method: Types.String; + args?: Array | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_solidityPack extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_solidityKeccak256 extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_soliditySha256 extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerAddress extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerBalance extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerTransactionCount extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getGasPrice extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_estimateTransactionGas extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_estimateContractCallGas extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_checkAddress extends Record { + address: Types.String; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_toWei extends Record { + eth: Types.String; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_toEth extends Record { + wei: Types.BigInt; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_awaitTransaction extends Record { + txHash: Types.String; + confirmations: Types.UInt32; + timeout: Types.UInt32; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_waitForEvent extends Record { + address: Types.String; + event: Types.String; + args?: Array | null; + timeout?: Types.UInt32 | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getNetwork extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractMethod extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractMethodAndWait extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_sendTransaction extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_sendTransactionAndWait extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_deployContract extends Record { + abi: Types.String; + bytecode: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_signMessage extends Record { + message: Types.String; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_sendRPC extends Record { + method: Types.String; + params: Array; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export const Ethereum_Module = { + callContractView: async ( + input: Ethereum_Module_Input_callContractView, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractView", + input + }); + }, + + callContractStatic: async ( + input: Ethereum_Module_Input_callContractStatic, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractStatic", + input + }); + }, + + getBalance: async ( + input: Ethereum_Module_Input_getBalance, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getBalance", + input + }); + }, + + encodeParams: async ( + input: Ethereum_Module_Input_encodeParams, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "encodeParams", + input + }); + }, + + encodeFunction: async ( + input: Ethereum_Module_Input_encodeFunction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "encodeFunction", + input + }); + }, + + solidityPack: async ( + input: Ethereum_Module_Input_solidityPack, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "solidityPack", + input + }); + }, + + solidityKeccak256: async ( + input: Ethereum_Module_Input_solidityKeccak256, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "solidityKeccak256", + input + }); + }, + + soliditySha256: async ( + input: Ethereum_Module_Input_soliditySha256, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "soliditySha256", + input + }); + }, + + getSignerAddress: async ( + input: Ethereum_Module_Input_getSignerAddress, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerAddress", + input + }); + }, + + getSignerBalance: async ( + input: Ethereum_Module_Input_getSignerBalance, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerBalance", + input + }); + }, + + getSignerTransactionCount: async ( + input: Ethereum_Module_Input_getSignerTransactionCount, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerTransactionCount", + input + }); + }, + + getGasPrice: async ( + input: Ethereum_Module_Input_getGasPrice, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getGasPrice", + input + }); + }, + + estimateTransactionGas: async ( + input: Ethereum_Module_Input_estimateTransactionGas, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "estimateTransactionGas", + input + }); + }, + + estimateContractCallGas: async ( + input: Ethereum_Module_Input_estimateContractCallGas, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "estimateContractCallGas", + input + }); + }, + + checkAddress: async ( + input: Ethereum_Module_Input_checkAddress, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "checkAddress", + input + }); + }, + + toWei: async ( + input: Ethereum_Module_Input_toWei, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "toWei", + input + }); + }, + + toEth: async ( + input: Ethereum_Module_Input_toEth, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "toEth", + input + }); + }, + + awaitTransaction: async ( + input: Ethereum_Module_Input_awaitTransaction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "awaitTransaction", + input + }); + }, + + waitForEvent: async ( + input: Ethereum_Module_Input_waitForEvent, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "waitForEvent", + input + }); + }, + + getNetwork: async ( + input: Ethereum_Module_Input_getNetwork, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getNetwork", + input + }); + }, + + callContractMethod: async ( + input: Ethereum_Module_Input_callContractMethod, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractMethod", + input + }); + }, + + callContractMethodAndWait: async ( + input: Ethereum_Module_Input_callContractMethodAndWait, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractMethodAndWait", + input + }); + }, + + sendTransaction: async ( + input: Ethereum_Module_Input_sendTransaction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "sendTransaction", + input + }); + }, + + sendTransactionAndWait: async ( + input: Ethereum_Module_Input_sendTransactionAndWait, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "sendTransactionAndWait", + input + }); + }, + + deployContract: async ( + input: Ethereum_Module_Input_deployContract, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "deployContract", + input + }); + }, + + signMessage: async ( + input: Ethereum_Module_Input_signMessage, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "signMessage", + input + }); + }, + + sendRPC: async ( + input: Ethereum_Module_Input_sendRPC, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "sendRPC", + input + }); + } +} + +/// Imported Modules END /// diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/index.ts new file mode 100644 index 0000000000..ff371c0cd8 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@web3api/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/manifest.ts new file mode 100644 index 0000000000..4d35c2182f --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/manifest.ts @@ -0,0 +1,15 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@web3api/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [ + ], +}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/module.ts new file mode 100644 index 0000000000..37566574a4 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/module.ts @@ -0,0 +1,28 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@web3api/core-js"; + +export interface Input_method extends Record { + str: Types.String; + optStr?: Types.String | null; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule< + TConfig, + Types.Env +> { + + abstract method( + input: Input_method, + client: Client + ): MaybeAsync; +} diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/schema.ts new file mode 100644 index 0000000000..15964c9474 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/schema.ts @@ -0,0 +1,376 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema: string = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module @imports( + types: [ + "Ethereum_Module", + "Ethereum_Connection", + "Ethereum_TxOverrides", + "Ethereum_StaticTxResult", + "Ethereum_TxRequest", + "Ethereum_TxReceipt", + "Ethereum_Log", + "Ethereum_EventNotification", + "Ethereum_Network", + "Ethereum_TxResponse", + "Ethereum_Access" + ] +) { + method( + str: String! + optStr: String + ): Object! +} + +type Env { + arg1: String! +} + +type Object { + u: UInt! + array: [Boolean!]! + bytes: Bytes +} + +### Imported Modules START ### + +type Ethereum_Module @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Module" +) { + callContractView( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + callContractStatic( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_StaticTxResult! + + getBalance( + address: String! + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + encodeParams( + types: [String!]! + values: [String!]! + ): String! + + encodeFunction( + method: String! + args: [String!] + ): String! + + solidityPack( + types: [String!]! + values: [String!]! + ): String! + + solidityKeccak256( + types: [String!]! + values: [String!]! + ): String! + + soliditySha256( + types: [String!]! + values: [String!]! + ): String! + + getSignerAddress( + connection: Ethereum_Connection + ): String! + + getSignerBalance( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getSignerTransactionCount( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getGasPrice( + connection: Ethereum_Connection + ): BigInt! + + estimateTransactionGas( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): BigInt! + + estimateContractCallGas( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): BigInt! + + checkAddress( + address: String! + ): Boolean! + + toWei( + eth: String! + ): BigInt! + + toEth( + wei: BigInt! + ): String! + + awaitTransaction( + txHash: String! + confirmations: UInt32! + timeout: UInt32! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + waitForEvent( + address: String! + event: String! + args: [String!] + timeout: UInt32 + connection: Ethereum_Connection + ): Ethereum_EventNotification! + + getNetwork( + connection: Ethereum_Connection + ): Ethereum_Network! + + callContractMethod( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_TxResponse! + + callContractMethodAndWait( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_TxReceipt! + + sendTransaction( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): Ethereum_TxResponse! + + sendTransactionAndWait( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + deployContract( + abi: String! + bytecode: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + signMessage( + message: String! + connection: Ethereum_Connection + ): String! + + sendRPC( + method: String! + params: [String!]! + connection: Ethereum_Connection + ): String +} + +### Imported Modules END ### + +### Imported Objects START ### + +type Ethereum_Connection @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Connection" +) { + node: String + networkNameOrChainId: String +} + +type Ethereum_TxOverrides @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxOverrides" +) { + gasLimit: BigInt + gasPrice: BigInt + value: BigInt +} + +type Ethereum_StaticTxResult @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "StaticTxResult" +) { + result: String! + error: Boolean! +} + +type Ethereum_TxRequest @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxRequest" +) { + to: String + from: String + nonce: UInt32 + gasLimit: BigInt + gasPrice: BigInt + data: String + value: BigInt + chainId: BigInt + type: UInt32 +} + +type Ethereum_TxReceipt @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxReceipt" +) { + to: String! + from: String! + contractAddress: String! + transactionIndex: UInt32! + root: String + gasUsed: BigInt! + logsBloom: String! + transactionHash: String! + logs: [Ethereum_Log!]! + blockNumber: BigInt! + blockHash: String! + confirmations: UInt32! + cumulativeGasUsed: BigInt! + effectiveGasPrice: BigInt! + byzantium: Boolean! + type: UInt32! + status: UInt32 +} + +type Ethereum_Log @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Log" +) { + blockNumber: BigInt! + blockHash: String! + transactionIndex: UInt32! + removed: Boolean! + address: String! + data: String! + topics: [String!]! + transactionHash: String! + logIndex: UInt32! +} + +type Ethereum_EventNotification @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "EventNotification" +) { + data: String! + address: String! + log: Ethereum_Log! +} + +type Ethereum_Network @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Network" +) { + name: String! + chainId: BigInt! + ensAddress: String +} + +type Ethereum_TxResponse @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "TxResponse" +) { + hash: String! + to: String + from: String! + nonce: UInt32! + gasLimit: BigInt! + gasPrice: BigInt + data: String! + value: BigInt! + chainId: BigInt! + blockNumber: BigInt + blockHash: String + timestamp: UInt32 + confirmations: UInt32! + raw: String + r: String + s: String + v: UInt32 + type: UInt32 + accessList: [Ethereum_Access!] +} + +type Ethereum_Access @imported( + uri: "ens/ethereum.web3api.eth", + namespace: "Ethereum", + nativeType: "Access" +) { + address: String! + storageKeys: [String!]! +} + +### Imported Objects END ### +`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/types.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/types.ts new file mode 100644 index 0000000000..b89d8ec8f6 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/types.ts @@ -0,0 +1,640 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeApiResult +} from "@web3api/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +export interface Env extends Record { + arg1: Types.String; +} +/// Envs END /// + +/// Objects START /// +export interface Object { + u: Types.UInt; + array: Array; + bytes?: Types.Bytes | null; +} + +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Connection { + node?: Types.String | null; + networkNameOrChainId?: Types.String | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxOverrides { + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + value?: Types.BigInt | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_StaticTxResult { + result: Types.String; + error: Types.Boolean; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxRequest { + to?: Types.String | null; + from?: Types.String | null; + nonce?: Types.UInt32 | null; + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + data?: Types.String | null; + value?: Types.BigInt | null; + chainId?: Types.BigInt | null; + type?: Types.UInt32 | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxReceipt { + to: Types.String; + from: Types.String; + contractAddress: Types.String; + transactionIndex: Types.UInt32; + root?: Types.String | null; + gasUsed: Types.BigInt; + logsBloom: Types.String; + transactionHash: Types.String; + logs: Array; + blockNumber: Types.BigInt; + blockHash: Types.String; + confirmations: Types.UInt32; + cumulativeGasUsed: Types.BigInt; + effectiveGasPrice: Types.BigInt; + byzantium: Types.Boolean; + type: Types.UInt32; + status?: Types.UInt32 | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Log { + blockNumber: Types.BigInt; + blockHash: Types.String; + transactionIndex: Types.UInt32; + removed: Types.Boolean; + address: Types.String; + data: Types.String; + topics: Array; + transactionHash: Types.String; + logIndex: Types.UInt32; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_EventNotification { + data: Types.String; + address: Types.String; + log: Types.Ethereum_Log; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Network { + name: Types.String; + chainId: Types.BigInt; + ensAddress?: Types.String | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_TxResponse { + hash: Types.String; + to?: Types.String | null; + from: Types.String; + nonce: Types.UInt32; + gasLimit: Types.BigInt; + gasPrice?: Types.BigInt | null; + data: Types.String; + value: Types.BigInt; + chainId: Types.BigInt; + blockNumber?: Types.BigInt | null; + blockHash?: Types.String | null; + timestamp?: Types.UInt32 | null; + confirmations: Types.UInt32; + raw?: Types.String | null; + r?: Types.String | null; + s?: Types.String | null; + v?: Types.UInt32 | null; + type?: Types.UInt32 | null; + accessList?: Array | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export interface Ethereum_Access { + address: Types.String; + storageKeys: Array; +} + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractView extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractStatic extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getBalance extends Record { + address: Types.String; + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_encodeParams extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_encodeFunction extends Record { + method: Types.String; + args?: Array | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_solidityPack extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_solidityKeccak256 extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_soliditySha256 extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerAddress extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerBalance extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getSignerTransactionCount extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getGasPrice extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_estimateTransactionGas extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_estimateContractCallGas extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_checkAddress extends Record { + address: Types.String; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_toWei extends Record { + eth: Types.String; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_toEth extends Record { + wei: Types.BigInt; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_awaitTransaction extends Record { + txHash: Types.String; + confirmations: Types.UInt32; + timeout: Types.UInt32; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_waitForEvent extends Record { + address: Types.String; + event: Types.String; + args?: Array | null; + timeout?: Types.UInt32 | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_getNetwork extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractMethod extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_callContractMethodAndWait extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_sendTransaction extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_sendTransactionAndWait extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_deployContract extends Record { + abi: Types.String; + bytecode: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_signMessage extends Record { + message: Types.String; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +interface Ethereum_Module_Input_sendRPC extends Record { + method: Types.String; + params: Array; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.web3api.eth" */ +export const Ethereum_Module = { + callContractView: async ( + input: Ethereum_Module_Input_callContractView, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractView", + input + }); + }, + + callContractStatic: async ( + input: Ethereum_Module_Input_callContractStatic, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractStatic", + input + }); + }, + + getBalance: async ( + input: Ethereum_Module_Input_getBalance, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getBalance", + input + }); + }, + + encodeParams: async ( + input: Ethereum_Module_Input_encodeParams, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "encodeParams", + input + }); + }, + + encodeFunction: async ( + input: Ethereum_Module_Input_encodeFunction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "encodeFunction", + input + }); + }, + + solidityPack: async ( + input: Ethereum_Module_Input_solidityPack, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "solidityPack", + input + }); + }, + + solidityKeccak256: async ( + input: Ethereum_Module_Input_solidityKeccak256, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "solidityKeccak256", + input + }); + }, + + soliditySha256: async ( + input: Ethereum_Module_Input_soliditySha256, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "soliditySha256", + input + }); + }, + + getSignerAddress: async ( + input: Ethereum_Module_Input_getSignerAddress, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerAddress", + input + }); + }, + + getSignerBalance: async ( + input: Ethereum_Module_Input_getSignerBalance, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerBalance", + input + }); + }, + + getSignerTransactionCount: async ( + input: Ethereum_Module_Input_getSignerTransactionCount, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getSignerTransactionCount", + input + }); + }, + + getGasPrice: async ( + input: Ethereum_Module_Input_getGasPrice, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getGasPrice", + input + }); + }, + + estimateTransactionGas: async ( + input: Ethereum_Module_Input_estimateTransactionGas, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "estimateTransactionGas", + input + }); + }, + + estimateContractCallGas: async ( + input: Ethereum_Module_Input_estimateContractCallGas, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "estimateContractCallGas", + input + }); + }, + + checkAddress: async ( + input: Ethereum_Module_Input_checkAddress, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "checkAddress", + input + }); + }, + + toWei: async ( + input: Ethereum_Module_Input_toWei, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "toWei", + input + }); + }, + + toEth: async ( + input: Ethereum_Module_Input_toEth, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "toEth", + input + }); + }, + + awaitTransaction: async ( + input: Ethereum_Module_Input_awaitTransaction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "awaitTransaction", + input + }); + }, + + waitForEvent: async ( + input: Ethereum_Module_Input_waitForEvent, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "waitForEvent", + input + }); + }, + + getNetwork: async ( + input: Ethereum_Module_Input_getNetwork, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "getNetwork", + input + }); + }, + + callContractMethod: async ( + input: Ethereum_Module_Input_callContractMethod, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractMethod", + input + }); + }, + + callContractMethodAndWait: async ( + input: Ethereum_Module_Input_callContractMethodAndWait, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "callContractMethodAndWait", + input + }); + }, + + sendTransaction: async ( + input: Ethereum_Module_Input_sendTransaction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "sendTransaction", + input + }); + }, + + sendTransactionAndWait: async ( + input: Ethereum_Module_Input_sendTransactionAndWait, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "sendTransactionAndWait", + input + }); + }, + + deployContract: async ( + input: Ethereum_Module_Input_deployContract, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "deployContract", + input + }); + }, + + signMessage: async ( + input: Ethereum_Module_Input_signMessage, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "signMessage", + input + }); + }, + + sendRPC: async ( + input: Ethereum_Module_Input_sendRPC, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.web3api.eth", + method: "sendRPC", + input + }); + } +} + +/// Imported Modules END /// diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/index.ts new file mode 100644 index 0000000000..ff371c0cd8 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@web3api/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/manifest.ts new file mode 100644 index 0000000000..4d35c2182f --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/manifest.ts @@ -0,0 +1,15 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@web3api/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [ + ], +}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/module.ts new file mode 100644 index 0000000000..8e94aa6eee --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/module.ts @@ -0,0 +1,27 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@web3api/core-js"; + +export interface Input_method extends Record { + str: Types.String; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule< + TConfig, + Types.Env +> { + + abstract method( + input: Input_method, + client: Client + ): MaybeAsync; +} diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/schema.ts new file mode 100644 index 0000000000..1f08effce4 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/schema.ts @@ -0,0 +1,58 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema: string = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module { + method( + str: String! + ): String! +} + +type Env { + arg1: String! +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### +`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/types.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/types.ts new file mode 100644 index 0000000000..89f6b7730a --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/types.ts @@ -0,0 +1,46 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeApiResult +} from "@web3api/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +export interface Env extends Record { + arg1: Types.String; +} +/// Envs END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /index.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /index.ts new file mode 100644 index 0000000000..ff371c0cd8 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@web3api/core-js"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /manifest.ts new file mode 100644 index 0000000000..4d35c2182f --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /manifest.ts @@ -0,0 +1,15 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@web3api/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [ + ], +}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /module.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /module.ts new file mode 100644 index 0000000000..189128d590 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /module.ts @@ -0,0 +1,37 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@web3api/core-js"; + +export interface Input_sanitizeEnv extends Record { + env: Types.ClientEnv; +} + +export interface Input_method extends Record { + str: Types.String; +} + +export abstract class Module< + TConfig extends Record +> extends PluginModule< + TConfig, + Types.Env, + Types.ClientEnv +> { + + abstract sanitizeEnv( + input: Input_sanitizeEnv, + client: Client + ): MaybeAsync; + + abstract method( + input: Input_method, + client: Client + ): MaybeAsync; +} diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /schema.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /schema.ts new file mode 100644 index 0000000000..061f45c087 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /schema.ts @@ -0,0 +1,66 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema: string = `### Web3API Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +### Web3API Header END ### + +type Module { + sanitizeEnv( + env: ClientEnv! + ): Env! + + method( + str: String! + ): String! +} + +type ClientEnv { + bar: UInt32! +} + +type Env { + queryArg: String! +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### +`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /types.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /types.ts new file mode 100644 index 0000000000..0f39eb4c01 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /types.ts @@ -0,0 +1,49 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeApiResult +} from "@web3api/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = ArrayBuffer; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Envs START /// +export interface ClientEnv extends Record { + bar: Types.UInt32; +} +export interface Env extends Record { + queryArg: Types.String; +} +/// Envs END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// From 8d4b1c58e9028505359da030619c26bb2140c3fa Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 14 Jun 2022 20:39:08 -0700 Subject: [PATCH 04/17] update ENS wrapper --- .../js/test-env/src/wrappers/ens/module.wasm | Bin 265375 -> 265432 bytes .../test-env/src/wrappers/ens/schema.graphql | 28 +++++++++--------- .../src/wrappers/ens/web3api.build.json | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/js/test-env/src/wrappers/ens/module.wasm b/packages/js/test-env/src/wrappers/ens/module.wasm index e49aefcbdd168a48c886a6a916bc80155e7f5fb0..b7acf38ee0bcaff1bbf249a31bca111e9956b9cc 100644 GIT binary patch delta 18883 zcmdUXd3;P)`}mx5CW%ZUi7kmGk|41Ku|=pQLoF?}yj5>oC1|U*N+`8fCQ4D0WVqxh zLMGO#Aw#rd84Oix$Y||?A*xEsL{Uq^?>Xn*nIvfYZr?wC>Bl7JIoq>u_f9jH1e{$G zU>NvTD%GebjUSrm8z0Yq#Sa~pFn)r{TfizSu#sawO&I-Q{Lt|qeWD^_CP10_Wa2P+ zQspDyHDve#V_=dP2R^?p{=@O(6UM7N#ca(NX2*Z{$;2@e;>UbARz<~;44$8Abf#%bAoepG`)^m7ZVUHJq-`aX&#Y7D&@Bw z)taipnD&|~QA;Oi^QHTd%}KsgzkVb9{73!S#GZ4u{xCx9(kl)Bpw5F*t40$83Jy2C1M zflAv*>gyjQwTy}iFe88ie^F^01ZcEG(gp;>pjU9kS(Tij(Z`8e*G6lTTDIs;9c`rPErt`FRM27!u}OVfj-bv1(vFss@Prnv>fs6h zY=xjBIeS}ept#`UHr?^sZ`+K(ziY?hOs+IH_9I;EjOB}~wH-l>(u}qzspF{Bzg=%U zcvU+aGapyM-eMXm&3+|=IdGsa!9kbyYdj2jDy9861T08s`&#Brm2CwPa zaZ{4>gv#GXYy6Ra+Qp~tC;qotd^*IZ@g#>h#HZnuSSdaYr^VmmQ+Gz}5}yw7X*erp z#i!w%_*;A$&Wpe8{L|nmuD3}uI<-Z#wsnd`QZIK34YZw5)nzqNz&`w6xXK4VwZ@#P zaTTeTEl(9j141F>EfPw#c4*Rzjqo&IP-z!aSk{XT%cb&bR`CwCozXI|+V zOLRFkx>ca~t8S04nTO-DN^6kpJ$rdLub`et;l29HlB8M+&R=PuB=wp~%sGBAz|L#X|Rlr`+9oK{<3}@%{Z85CXd}j9 z9l4EMem|A!oKn%W*QM zKQY2r14stE)`CDd6cwHx)Ow;6Ba^f;vSQJa;^dX2`*aajgj^giK#tddA@7kY(jT8} z)S$>*)0-xQP~$ae!K4~Fzf71xH1>xwMy{O?T{~?W-6QuD?m}!0lP+kC2(bL zA;|FK3A8EGJyyZ91iDFMyNYxC-wh}lN zO?ohO6s{RMEtNPV=d_QQv-n>WvAIMMG46O?#8Tey?1f1?x%DS4R~YPET31TeHTQKf z8S(Ih6D6cKJR`KGR6lvSx4pHZws0jC-AU-$wbH_wE2%L?y7GRQ4pXmZTot21WCCqN-!I@#mxpJKl4+o0DE+rRLk*r_5<>B~Q zrR^wf&g$Y}yUyW*=Zx^=u)QjYn1ZFGmA;a5&Prx}s*<8tb(PM~?aqwPRMMVRujPC^ zFNsC&PbOhJa>QWpuqG28L+Gd6aWE})D~>Iva!M%GIFdeR^x^z!mbagt5bjkQ97mW}!&6mtsu~K}AuR?EP ziA+~2LAvTmLl&>2&Y9A2(-B25%QtevX#z1+H%m&|-%Z*8-KleycLeQSV zmL7FWvHuGatcgBR`gqwLjqVGgwS9?{-Vg%JnVo@D+P*+4t3h5eL4KAKA>Nw3!bL7h z5HA{>=^DROfG$FX0IB0=X=7G*g-Vz7E^sQj^fn=%nyx~%&e^r9E!7zGFOh&v|928F zrbt82xRmOznJ<)Q4MmM=BXd86AYYLC9MO^ud1zqAOfEi_GToUbn4Y)^W4A#ton_x9 z8s~!Y_$C}gUYZyF9lrmr#t5YEmO)yW2qG<1>Hb1fL{6B+lTb&hlysprG%F^a(zfGi ziZ&$O|wN`h{J_)V5Ly>4kls6KQ==eqkf9<(mhax;S}`iMuVm3 zkD{gcxBz(j1X-@JuP8^haJ)@Ut;C39KV|zX|K!a4m#u>vLH4=s9%iFr6+%AwY9XJL z^G-DW85j1ypjY;lg3uZlyHoorLFmSd`4m&hFC8P1u6vFwWy{hlsEUxam^7AZT)nPw zu6~iEyn>a~yat8&Qg1}<56cIXzjsH*wVW0uo^S&D-FV&|t@lvek+0P3*Ok<^PHMKQ zn^gT~cVf#KdJ|R7vHnFwNB)M0e)F8xar`oOyIc{E4u5YYE(GNO@ViH;#+CI=S$9t$ zLqGX_BvO3wcUQc2+cx@9pZlqp7B0Py`0BD>#CPRGq%8Yy@%545AL~^(7&T+Y>a1#bZbeF)v<4 zFyFMaAS4b`xGgUb23j?-P+bmEHXMd{kim*Aq)(;6jB1T=*@L*^)sV-r(9e^!MdI(iXBf-uR8$e}zOyekmQ-+7*5sa1hcC7?rHZ^B~-q<9ll zD=slOhaf@y5-&KOMuH(;LmGP+FfFx1nuf?;I|H(6km^v)hwLXhIPXKw%QgbreF--b zzlxlA=vq-wf3hO!LtRFW^#*h7Ad;p}5A{xhiPeBUwZR-f-uJfcBrjGS{_>)*zO^k= zD-k=Ty6s??L`Fl{A@YuLCWH;9HSpHv)m&VGN_R*sY#dBEvmB-1to39fqy@T{X?Ktb zkY9(^g&{!%6ClnYxN?MSB@SrrO~WBN75Qe^fp}Vm1{16VM1BB6(iA2=5lrf$@UG+g zRIqbJ4bD!kOE7MevNE{>>^)BES*F({aaa)jSxz1cX`!S6#D|g(UY4D|DNpyRL8HZA zQv77!KS|h;|KZ_e>x=0+l!Rk_CGvI4pgN=i#?b93-QB31Hz1)dX7mn7sq0z-zttsk zH7Fac0srBOqr@BR;2KD6nV`@q~4eLA!_K`2CKUxQN)0R4QxWXdN>Yq zv8-uAIuOLCpeeyZ8#K*GXJ$A;q@l%CEW?_SZp6cUgzN6cXcUC;DA6A0$#)R6Xinlh zjJbSjQgebW2#cdRd7^esANcWrK+w-H`7)l6lm*A9{BpJ(Po%brJ`K z$MJ&%_6czavBP~1(H-EIbllj3_$bRA=|Dx?OOM4%T;ZL;m0pBYgI% z8*=njgxH{8SA@tXXLd!110uS)A)j<3$=W&6yK7{C4I&>!sxn%72i93j7seZhtbGnfDMW@q^c((^~}Feem8}WKd~aL#JdFr7aC&fV=?&I|w$U zejm{~EZERUBc9w+ojYOg+r-F>Rsx;$v?pZ0Lry9__k1_XeQvYvbSA_PB)k9Ix!5#j zv>9$U*bBgdpW#qCKB2K?;vg~--2h(7l}t1WYSVp0I?=y6Z!ut_05w+WKJa}w#C_G% zbEt=8p5zB@h7fE)@HJw)=o>H`gFS&ZhPFcqb`5aW!B@Dt2H-!8Txh@@3s-*U4Q}O? zWLH6itElX@BJ4*%<@d>jvi|0e_l3Wy_5p&8`~dmp#~&cr2*DpBn7bkQY$*8AvjtQ>jmVm^2j}n;FABA8uf)t+kjz+K<8jVJoq3(T)< zTlUI!Wv67vz^ z&_t*%oJ`s?XC{FKfg}R@PI1p-#Eyk!Q!ux|+%7zYgu{?NRB2TJhVNK-eJUBR9JO~U zhVxpd<#6r+gQoFgL`+YdRvOcfrxKqE7=Gli{?2qXP9>~Q{fvz8{(EB2E}NSZ}TJh?+~v97_!i#XM28U^P{X zlp}5~kO<;t)GRe;RCSB}EAoJqT?aEKQw#K1LG~&U8#88}17f}$0dZ4lfJ`^G?P4Ki zDs2yEGhMVxPZ5^wMZBQPG};;(W)gqs>4kD$HjQf**B9x^^=K%VM&~e0jU>my8j^l^ zKn0BDvd&~qr|uMb?Pqe%7rIJt;Jq1CR-vsLp+YsK1tC=}zpo;z{{@M4fVAFJN%w(E zj2TmeNwid?_}@w`VI!)osD6M;PUQLNKG5$?>PlhV5?taVOOR#r7*t06p!Z%f70zrX zTU>HY+k$0)5{zEkFA4xu+!#y2RMv$%a$?Kg-a$o(|dN)>A=kv5VUB z+4(bt+Izd7qt=4dM!90JMYr#HN-ap~g>po~l0$B4TxCcH(ATAYaJw3*Uuuv4C7s6K zc?!fU5l&~nW98|*>Z?fAO((9h>^hEawyZEM`+p=0u>T4JPLd%md0J1B+b(%#pC;wn zu>riHUenU(40-0Jy4eNAvj?KLD(l%j=r^V0#=_`)bmPVpNH~QNz!pzk5kR={8W-Je ze8EN3eDft096wDXz!u?N7U%)NE%jlQ5Ta zFLB76`sj+_RGg1&w;@;ErSHhAitD~uQP^$+*nFR~gn$C#hmJk8K;A#E!0q}^$skLo zYvfKj8?ijPPU75J)9D7eMr5G!cs^bFr0FSIMkqWJbYRgecAlF z$b!bFY4vhk+(UW829BLZ?rxguj-VJ6W8u9B-1cidnRB?U98Y7xClV`V%s$T2`swG~ z>_&dp24f^0AoKj$U9P<%oHnmd-6gWqo0bWuH5$-*E{^-}S6qz44>mVM7o&T|RrXOs zne&4l2ti~wQdV8}gOJ87b1 z;hH~;zCyYqx44!I&@cWFewDbqJlAyL9epX!S-5J8RloT|N&#ObyoO7?b1Twc2_|{p z`O`_1Vky$BG9Be%zO4#)9Ri|h9gD3pwJ>aRO%9~3sHdEX^XI~l7fc$FFuGMb45qarnXI^kc z|CeUNg|o4t5DqsNA)LDbF!X_2gxqZSs_Ko!DsC=(nAeyp9dKbOBAa~@Alz9?Ih##5 zNE<2w=7xitEUz@78cJ3F8GrBJPTE^c%Q)4tFxOth&6gc=ttzC^o$xh?HMoeO2b zzS@pHAk4W)2zJ!J+}Lw~y~F=mvLqN@P>FXyUsb2`H!@tAZfa*_u-qzj=Ssg;l5?do zU1(OR-`S>i`<>6JGaWkWX)j*4k4P^ewZJch_AOVyTd;r+B^uizDyo0y4GS7Xa{}{T zqbsNr1m6-~=Y0E0<{RtD`DS1GZ}IK<6!X7KLY`}f95}$#wFLH#y7PiHP8B zUS*kOjr-I2L}S2qO4$_CF`Q1dJR3m6+%YubZMw(hw|{*{G(0-Ki^^zU1}8?LMp@rQ z&e$_x=xB5meFsuCW%d>S7H8UHbz5Ge{i{&`=yB!QY=>?`xvK$Ny}^fUT@25^i=WbH8h6PiZtYq|Q?h3E0Dq(? zibA}n-4yD2sL0DgshRUrn<;AXIjI}>-6 zm{wJ|W>F==wHefg^sh-m!5J*Abu<;@o#{`M7}kI84po0yW=vqVjd(^N`Ok|;Id5~7 z8bjxbh~q9Gi>h)JepS7RQ^tKF4=Kmy(Zi*#aDhjuD@4*d=xMl1Y31&v%lU0^X*_p+ zc?1jk%?9L#-J)GU2cb#l2yPs51^&P9DJcc?%X>=9nL{8hh=jeYsnmhqP(k7;4EyDi z>HkfK>0&h@__7@)IjHaslkg0VYOrDk`cnDPo2$z-WEm=vZ7XNByVG=CK1=B|waTEI zk@Gn&PIBw`!LoG)jdA-9XC^gb&|YAq(JnER)+KEyCd}rWq$@00NqaDxg+kmd@|vZ| zD%u|Pal4Q}0vtW>epm^Z9@nI3N1}Q6*9Bk)iglgf>Prg1GKpCkp7U~$Iy2?MrhMh{ zpHzdg1@dZ8u=!lz3%PQBppq+#kmarlF9!;dl~#osB@b|?&sPKG^jW-t0Iu}8Pd2@U z&Gl_4ke%qVL~c|IhHR$qYS1!WjqBaVXb81!gmLeYs?w!Te4zLkb_@cx(2W`=Zd0P; z-s89mGjPXoS_8Z9HjT~do;#9*FYDPXH*)CY(oW+}579t_b0>+9CG|Txh!^{X7EI{v zaC#ehWdn@gF8mGMK{r!o*rUkzx%|4XQplsL!LHO*MTXBeYX7=A6^=;M^kt-5nr8Eg z|4-9wk+Mgfr4j#=`c!sk?)vme>V%_nCEUvnxRV=K zY1;1~2Z^WY?$WdpwwU!spFIrm>?Oyms7`zKhojoO@B~i z{qspIG357w;muQ+m-1A>AU{NRoDvVwLr#~?weczSY3k~_i}p>&Gq}tK)6Te;3Bmrx z!J@I?YHMN-Cl)f!ibKzxb+2~y8frk#b2#UKx#!$-*lnl{j&rU)MA!4w)rS~&zO)aK zd9Q3+|J@5T3g0k>Ir(y3RFu#CCVvYPI$V@N>n;lU{;muMUBVTzY}a2>nz+f;g~_*& zE2rj{-IY`PW%-Q5m))YS=8!>24t|cP8IB@IRA67q=X8{x1-yBM`eI79AB&|!Ldqix z=p2pxuv>nQ3s8P`2);%yl$CqQH3S===FbQ&m3I1dA?(`M>9_7q`?(u54h`K><0fWG zRCf@Z7yumb!)+RgzY6(C2O)Q8Bz4Y*u6JlNylo;5 zaYx1-8cm%G;P@TfX@h$>#4Qm{oHRl&Cys3J86TNpH6PjG6d&247)R8(8k!b~js1(n z#@R(U=>QWS>EI$CnL&M5Y;1j3jNTI?OUhl^k>MS=_i@q&CHHX>pQ=3&qqiR5$O+T= z$N(Gp$N?vDM0G2`^AEhy2~mHD$w7aJjkEa32H)ZcU%P>ee;|=YsQ3^kZP4l=PCDR2 zJ~D!yk8H3@p1UT`ReQwmu(W?fXELhG1zR!ZIcE5>gkJP;-?bSlzH0-sy0I`^ zyQUj!h`h+_hL@S)K{tk9BY~RTl{=j(VY3zZo$V}#yR-IcFUM)@Ts-&n3S?t?FE*(H z$+h^s#ol4$fMvwnEElT*FSQyv4`eOtsN6r=+=@PN?cGC_is0XkR4RahtSQs#{eaA4 zfpB{uYeKcTmb&k;7!O(;Y#BI|b@d}w$Vyj_EO=L}}sSPBh;2K*Z^P{(_<2V*U@+}X?p?=W9_7=k@EJ986@ZBUfoEH87<37hDnonjesObQV zOJYGVeKH=Nj{`oFjWZ+zqNlK6cs!Z;!IjCZI(}K`$z&D@J*FT|#Rp-*G~AXj1-F?F z$=g;=!2=5q@tG*V3s;_FQQfW;m${es`240h2 z3aLZ&Kg!dBYldV*r9l#|vAzI~=itI0`6aDUM2Sf(%D1Jeg>p;oPl^C%BAPvQNTZ*Q z1ycRV^58IaRb&OKcl269NTfOMtS^IT7YAn$Y58<|;q7W~9 zC=XDR)X;M_s$VXQn#~5_*1fY?H=2J*s5Us~;C$E@+)OS(^cUO0Ge@|FARb&Q<)#L-d3>Ql*+~MV z3@f~YUol$Fx*`%$a5N2_bFq^%zBM!9_sj0wVJ%>wfpumXcg4CY5LCq8g^CMU17`Xi zzgTvcjpHMHyT*D?7UlH?=zL^eaa?mZ zKl@Yb!!p|Dy9fnc_)tEC>sP?Xst;8YR3lJyAE0IGABid9RYxsC%`-hJqZF-d$n6b_ zSXEL8wneB!`p5FDu=Hn(xXR%7yR^?(P|%+#MYX-GK1^B6nyIz9PZW0KKSL8#q!fZ)Htr>W+n#ATI$Oto0!C zW_lfg$VpU9sjg9A>WLhf412D9AR zGCq}IF13nnYV1p6gu;pwHHGRox z2m;%3=7*Y_x10gXpD*76Nh`P$na^nmg0(A9w@i8hd+wooy0`*;mL8%q(edP_Kscvm z;5-%whcc1pxv7M!XAo31vKcf#tvnrQdQ0(3!--kUUv})d26;j4EX3Ff$yqFtvw`jdTT%UT zSw)I(m$?V^KVyY_g@1)|N`QR(8ogNIit?ll#w4ZLdX!Rzk>4B)Y3qd_OW_y!~?e>L>k%tGMF2G)RPtdTE^%Xd+O$)p<08(9eErEBF$ zp}wp4vpQftjZD5}LJv^9Ru+j!I2vt4k(k!Ww-4Tk4ib%NBb&oa>lI2h!OjNC9~m%-d=M!b@?uu4pu zfiJFeT}Cu|L&6sH$r+nv2x^(|Hci2`+#hAJMLs*gw;YDnEoI0Xn8Tgt7Wux^98~dq zD9YhX$dO^0PE^1VTd|-hgtV>9LNmUTuYB)YHlAi!UmUv=xm3JYCd@Gqul;@}Cv2bW*=kskNrhri1u%tB`%l2A<^I7C*w>1z zH}PLpVZIf8d9M8T7XEjk{I^J|F7l)F`^C8dA7FYt0sn~~t!cl^Mve@ni z2EN*jiH`oDSO$Cez@!YW^Fgi{1R>c|FxUD}LAVgY_Mp4SIK<--R#JOdZ&rK=oe(b) zGY-3T25a*@919o3h9WOM4E=2^f)`UFZn-Qx7LM4Em3k<$v1&EP;7xxK&Ih1Q|2Ny6=`$k3F$ebq>wlF2{X!o{F>vOX~3R~}N+DV+Eg5z5?#xaR)K2C#gfpgoG9 zJ>Q^3;!%xQ{#W?bN~OjhPxF_^xA(k-L>Diia!ek73$tUa2yS5pVO<7s&+t6MN<6`N zi(wSD!sbGB#<|PIUjJ|xI{de`5E6gGo2~eOTwH^ZkY~hwZgW>{L=2Z>z{Hq06B&?n zhr7uv$a{h)?!F@~{p}9sZzg=;!^wr|PLa3FcOuZbTG@?x@=TVyMqc7SR5c8FqWs|X zdy7!VGT>nm^4JQYclo{RsNCepyNmv_7)LG+hy=O^^!Xk6SNydC$0WWfBrZiS7k`g6 z#NfSNTpZ7bF;u@nX4$5DLSVb@vEfXQPg2LOMj|@gXQ|AD&qPJb=GuMCeG73Uh;Hxz zbHU5o|>IQ@W)p?b5d6>tB+R#NL`c@Xdr2N+I-E*^b|V$tJ+$)a7zjJprfrC6cT zBhI0%_~w}&fyPIe?O|T@i04K4bPXvB0`p^xnI;H*!c)L)@>zSH2v#0{g5goW9d6%Y zZ@`yNxpEcbb2q_|Qo?bfA=6^02=GBgM0eer=I?}|mr-_UC9E?wS>?fu*;vBgE@ACh zu~m>c6!cFSCO5m~OV2$;mulKAFD`z{I+J4P^bBKvF+K|tT)}`blj`@P!cXL0o?o%} zrn)oB-KQ|ID^WM4`tM;PQLm-whdE;^HE;=>|JLU2rw}#^nSt+S45n7>KyhQsqiWtPwI>uPmpsy_maJk$r!B@}t6BWdAL*zKtf5j`AaZXZu| z3{K&%NHBS-1CWSa2x6vV3co9QsmD^&aTxa-GJlbmx+AXm$x9uHdmr;(7(*+lF?q|A zuN+fB-5Fuo71U^7C%8L_q$d;={nT5HMfZ=e`yL*((Ocb{75<1u%u_4gM5@GF6=i<3 z8IYw>V|W%_1C5$@4G>TdQZ?$zhz0%~Lro_+IYHp$^ZDTKqaMzzr>NYCNcF)xGEP&_ ceTR44_Yp@_^~EKoGZZeN6Z9=@Hw{$%Kj)yi>Hq)$ delta 18893 zcmdUXd3=ml+wh!oW+IvF#9Fdhizb%V9x_xcRnituOI1~s))xEP7+TfVVB)S^mI)EH z2SYIEkcq99sL@heFhN^%FwrV1c&~HLEQxrYx9#`5e|-7}%((aDgenkW zRX8loTqzd6N0grLKWOymk)u_9I8#-ua#e1P-zz?~YV@En_qA>~zc`%3 zbGnoEBw{h~*K%ClD4ZwdaAplnk0qHo?P?z*;l(XKdWou{neM78MMuZ#ij^958b1H@PtK*8t_2cmK zg$7Nk8V{+WNi-W8R#_9RidKK56M(SFfpDt|i&IuLNGF*}Lc^{a`(c$XQ!zCBg&Gbi z<6iirJYQH2cg8Zlm*Pf68`p@KmDX|V1007`VNo$er%{#yv~#06 z#E~f~SEjb=j`tjGWy7Nlt#@nm$5lG27+cp+hPGLW=Y%JGkBhG+{0ld>Y1<4T zW7=+pP8q{F7c^9BUXw} zm;8QKtQ4Q-bK<*QtnoX+|8Xd*+O@E~5II%6lKZ5n#h3IUz1(&qtes#j#GQ=iv~O#40HBhPEW; zoWnz_5P7Nc^Dw+qX+1n05Bh%iT)cR|i1*cqq(eD8Vi7Sa14s4@aQyB$);4l$pz#kh za$!6T;lwMfa)oHM?u8^BK}o9)ow1z*9!>$mWAA}sIRl(Sg1n0zz8%DH_`w|_Gxb6$ipVb;4 zc;S3MBEMt8d94|tcKpTFj%o-sE8k3v!?_z1%~}WQjuCOexl1WH=YU5kw716mC$cc7 z#^j-d+3&dpX`j-GxgNR&IdE!qs(ci?awxde##LK(B((s z6xZqYh;y{fgY%QMh_l4)#Ag*0{n=iA9Pil#5%1t8CMK(b^4S`RHldu}fsED@8 z=_MPq#?Oe({w3jR#6^>{!PJ>h`)5dKMa6t|T?t~T?XuGL(-(bmq4tZ)O)ub?g7FYJ zL=bp}6DTDkC5Dm_6X%JNcCLyN^m&kyla$((QJ-fEtGD0NHe$@e{j%)hF1>xnKnOsiAFs6I4C(f^=DUoiWJ zhg!$dQuO6)I*I0NT=rLpqxwuGX06-4;qN%EvuYtFTV@F}L9%n^oU1~pZ8?(ml2UMf z?o*1^j5@M}rnSG&i8@vYO*?g=fMN={#qlBPV)er1?k#%@d3JGl0ciktdFGsQd52cN zvJ|Bvrrf)N_Oud-E#tc!_y4xTH3^GSLU+_qetWzYDav@_rf5MsQp!|nfi9TDEU*zRu`M`CFbB2tAtaG% z9b3u}1|O=4g%}}5Lk_sZ3OF^S8V`Y^j>IS_e^!uTkO%#-TJs!?s4;$l(S8u#9dpOr zhZ;EJM?7oLl*VfHTYYOPkq8K#LjB>(awN=s(6Vv_6B`KgC+;l4^0Ggn?lb{j2_Qp) zc#e=>PNzY;ucQ>7jes8l2&SeyH~~_{lN=bTC7m>xTRF($2E_ytN1$;VX-3t7nC`|x z_!wFNqJqe7DS9XjB0c>*P6g8HQ(gjw1=jQC#WoloEErZCOnOicLu7dZ!@@`xP3AX5 z$Lo_wI1@$&Qu{X$*@?UeXSdKmf4oypcTSG9WQ7wuWyYNZ!qxO6xD-L&@|+hvn^c1v zc{CI*?I3mCY_XrBEnvfJ(uSJn!1SHOJ&2@)bF2a+ZXi6xg0O1HHp$7hMj|c#aXENxBXQ?rkoN}V z47N;tjts#9>X~W$YhaEf^^~{?jpP^G*q~=7_HT%3m>W&re|Cz`YQ{8hlnT{j{(`td(AgS)rifBx&!CsqO5hbYm zkll6g5QpV_9dbrZGGS{2vOZ8&v-}{YU6y+9JM_JF{6g7rBxi6`w@<`JThyb6{t<4F?H*p9e^4_s?R zdg0Qxjmg^@b3V6(WsOm!=A%S+LIvb&QpHlc3Aw0_@ge3fDP%}tIGt9LbyO#!*1Dip zbJC@}K=TsEKR_;1!+=(#F1+2F1i+@|WC}Wp1}!)}yhw*hEyzr~{)vF_5(ZvvNp@)L z`;bDg*JM>7t~H6OP~OW&%CFjoR6@^IWH(Y*zBNB=KZm^AntXv`yTKvCh@eFqar~Y( zUIqpwkR7P_2NJxyDzwF2cF1V!h5U*Tsy_hZ+mX)hgZ8x(2X#s0iv;G7h!6+V&~eB? ze*I7#LTpgPAri%Q?GZ&6JZkUV^-2d^V}uhOypX7u#mOsQ_CkK+5Iaoj$RXn7Z#yEy z1+OM~Axo0TbUdd)ol%iu0(=NkJlE?7rbG6M1I z@d|k#58L_*84+yzj_5w8!bzS~2`|~98+jRLKkp{i-s>jTzWu5g9eq`d8g&<=W!=R{ z-NSv(SMr>z@*JgyIOhz`;+>t6#oFv-KC(Rb8X3i?dAB?D2!c&L$uL}1y%!nG95yn4 zP+xD)qz%OOCNH~vZ^_0zb)4^s*=||Er zZNb~Q)*~EyO5AV6^(W`GMpV)gJq{FB<988k=3u#+Hz^p7mE98?K>4k-g7ReI60IE< zxbPQ`6P*e>G=C5Gao@wW9KqEG3g6ReAcB3q2cq5=mnXbW&et>JN_h*n#H!K~iEv5P zyr#shEpZU87F{uMHeX$%b{oO)dC zKD+raL4B`b2sVD}1-BZGU?aRa9KmKEIAMgqr0)oFvA&&y1t$E;JnUm~|1FudS5@Lt zI}9923biipdgz`)qEOx=QV?uJE991l1idv1!A8rZQDidquy#lVML4z$4p{b%A-U>G zK5wd)_i=9;1dcrHe`TyCRY6~ogp`cx&sQcv5Iu=BV){%1jdzjS5MRl=1Ot2v*f)t_ z=9oU2lnC-IVDw}%+Ia|D( zVqnBnyhP>$)2EW^o_rwdW0^q(rD7@|N*Q=F)tzbgb~Imn8jw z#SEl2@#D#j-fB6&kW^5Y;LHJ7H<4N(Whu$?a0j#WDr&XPou~KzG`yTzxDDP&YysOQ z(*z)y9(7V|2z!4DZG*PDe2O=3JU@k680JpOC|5PuG?i9xYs1ErS&y>2j>N59F<^kDt(=&jE`23y?;%79FcizJ?H^SaU2X-K)2LqE#gL%Fyb}R}6{d1(2rNJgL&m$WP+I>3$Pd1Y+ z0a7+ZmjxFWV&;ZQUPI_NRN69{{@u~O7g{algp5+Ij;@c?m>qj&E3nCCvK)x&n?ZAB44PUNxfDt8Dc?( z^!^XL2(&!fPrfeAi@ZZ#ioKN(q#X7F|6j_W%-=Yb-ZDtA;Zl%KJ-~L1sELmc@!yr@ z!%sm{If9Rq2v*WEEza*r8n&Y$^(1*W%%daAs4f7jS3k(xg2mVR?KIF5bc!4-?Gi$y zOZf9g;Sw62Cbj=fa0!;dCGN;Gg3HzO-WVYwNwgnYxf$#QKI5uHTEKBX>T#LAP?A~> z*V-ZOqIWIEkQR`65rdHfE(ov)Ev?UDXnE<9FSOjevdEmc@oXwitqTCSDHD2}CBW+nO}^(#@% zz`ZKe;U}MYS+MRQgkqwFrOQ~9Nw4SVdNIZb7s+(?*#-Cq1F-e>W13qmljy?SZ$n8s$=NOUq*?(h{O;do97|nz*5eba|f5YexTf zb|Spg?Jyy@n$k<9I-4c8IXyv8h-oe9JZxFT zw4ypn9bZ9sEFJnc`jX7PfI`|@;&E#K-JA_smENAScLBv%?M=LY4tFQs!Yg@NlfydD z!=79jT6d(GNLE2d8sqWwvM*r4zCaX42yAZnYK#N$-8?!BHg};*F~lWz6)bUdBji#^=3y!s~1 z^{^?t59MiU-bb_<<}Vq2kQX+~3w>!1k8KqbP$dbvH8G~sw@n-cdNPd$pWR7%d`SneoDwW_7wJn3CeP|N2 z8%jG!?BE(svB}{B^S%?qv9fEz*?-du&s;^Z7ryZs zjc@+Ki?{K8B>)@WkD$+Jx-vi?irxWVn=^y|7`gQKBCCD6)iea{#9#7S%RassN`Rfz> zDWoV$@y_=qQO`RG{NYg*rq=N{Lt>R@RHbdS<`uN$GbH|esEW*!{!x`GGLh0%sv*Kx zrP^0;e^RnagjMq}^bPfu1bY zHubp2^`%V1g6>g^57N!>T31x{=rmMy+h&;!Y)zx((KY07R;56_iR7(kXK;V17lw`p z3x03A%hLp-`mGS2UOH94Hdq_#xCVu*X&pFn8naz)YT~iif3qhh+{}fF5SEIKc^T%t zeKAKxksFlki^*q?ye}p;Ua1IEr{PBPRxTV*f2^&E9>*ujIi-1AuoMl;>v>i}+IFlv zeEo#aGHDY`_;zN}MjlsN9+*+^w2acq6CAEQB9Guoot@jExu8q~Z&DI6aGQCsLitpm5Z zGmqO_#EXl;ITRcGRu7mrt+ge4)`6b94xc%iEn!>fL~mI&cRR%w0BsPlgI*^tc)SDM zy&e|t6i%%EF1i_OgIq51A4(8nzz3umzs_b@_gjjx1@tHSAB7pRQqf9uR!c>l}GP zE+qbIWq8=YTd;cT*jtrl9V^Y;Q^&?1qP2Vt-Rr`G)`B$;@x{%Mm$k6|2pY4^GUX^O zL_fO+1)t~BjTy&iAFY0`N3ghGE_cA-|r;G6hEhBvM4NVn&Z=iS?2#%rSSk%xz9hgr7@)!0An_`iw@(N7YQK`J%avHIhYmks zhFC%u>ivv9!fr|WnQrr1J-JR3(dsSjZ(t5aT?e7_uXHXxpE~_3-9wRe>9=TYl!x^e zh6)$lyhZV~e2BP>BO`RYP3us-0fyhE@%V~D1`bgy`*D)$=ffYjai<-syTr~{T{vlm zv3z8Qm3(A_d_Kart@+3SwTk%0mC(CLY@CWiylX=dPP*VE9~nV&M{I0(M{MjTN1uw3 zW!oLvmf@P;@8YBxYX5;tjnM56G5VN~9Pl+C>ERR~*`XLm)Rh5o_wYss^t>k~XWkPV zv-!vj7jQ&fTR?Lki8R7X_i@q;Z{NpB^iOh@ev1~AA&9BvD`$GL(E%8q-^iZuS8;?>8f`%w)4d;~gl66a-iV$;<~NL)95i~OS!%bsp*fA4-zO65dtA{J`M`sENOztMXi%)`|P4L&Z`XR3N zmn(EmOM|yrGYvIWwG141Km*7b*s|2=@ERq_Ufny}AMYEeh-X{pGp2E6QLvt9G z!d@o%usMa*rq1TDc^b~$O2G}L7Lb<3@L}1PObxY1u@ThN5(;nQ^!iaOjuy0prF&SV z&_?ohHx9+yN2AQCA;Ge646CiC*#}_y$9Ty16WHt2a1hcAI7pd+Cnik9L-G&8^yvuE zPh_#Q*gb8T$eKXdBvzI5gZh(L9e92c3qdi2Pr_GllJPq=9g^F|Ou}vXhvcd2Cb1^e zaG1|jhP#tkB(ok?!GLWzdSNmf0edI2ieR41%F}`)5dIn7dKw3;_=pN#+lN%qDeN8M zgaK1nGiu707i3T27l=V+h@8r_P&9=_&|)7Xl4c*1B=(ub8bRC?78Ws1HCFYZYM5$_ zDh|JmK|vb6ljlW$g_K*TB6qEB$nB|kgVR0e_c1FE8~xN_)O1{KKu9b~NB=SVfM(kz z%$$m=f>T)-EwD?{bM**$Ih93I(+Rl-8L9^3G!_E0`NDiR7`GyyeS`Aw0H;Yd=%yi` z8%@LS1^jz6YWSh_L5T5FkO(+GjcKX#2d_}eLy#VE$Ua#bqJ@5XR*5=KmOe2A`cG&6 z+7_z1$R^bFQ(jt{&;s9}8bnWLRjBDl?{qa7j1WXrKb<3b`srgYOh<~XWxx?L5bP`i zeuaZgXS^um<-S2AoSMNRhzS~hf;w6K6Z~Glzb8@CIl04t6SUx*RDmBpVXrgmc@^X? zMulqoDSL-z7s#p2pK=4ZAaO;ZYaybXx(cM$E+I6oyl5J>qU9Z zg_*1gnn2iR=#x#Cpv7mb7wYQV&zOap3cdRGIxWV5+o05NU=}J`_GPZ@m7#bR8czOY zIUV&m*8?1Uj5B>cM^8|2McM=!h&ptHYNYCY)gX^egZ*=4boNz=%5z_^Cd_$NCA~xD zGL{HG%|v{ktYsCSM?pG&QkC^uZSbrys?n-}==-?$iU-pI)|gl!;Y&82X8$5DKlCLU zWd1MiqtWq&%zdp~ZJ4f;;CUzf6CqU=vYShM(rMxzu{kdv0X< z85RbSvspvP-G#36p~5}EeJ|#y0r&Yim7(uf+^IfrQ_VGC0Lp4GcU}BPXN9z{SQ0CK zpaR=Y)NGen|EJ_>g$1Y&1%J9ReftUvVklu~naAov#sU@}Di4vLx`Kxizt%fhBshpV z0+!t=fnXs1HEwYUA*ZIZIF^ln(I!F>Dw`S(rn3<&`>_f}oo9`Z#QNaKVSZrD#<{ms zSg;>=CQpRtZ_ICqdukpoe#=6sNe}v^NP4%07+b8+cOg1h({#woz_?&Wxx+b}sAru{ z0;8*!ARq?62jOpWq6C`xzq$elTf|+_3`ohvGy5+>gL2M*Ff(%f+eIvu7JmXK*5Ju~ z7PI%L^HV4~h09JYM*mPS(~ZXx6hZM!$XkxfMlL}$wSFe|v~sal;9A1!p|V#svDFw3 z@=RBauj^YFOGoX3^oIO#I&UdGZ-Lz5gxp2DT`%R0|9%0 zx)R)7ig=pl$UD))_`|!)SbbVB2aH*G0CIaYEto4$tCz`UQ0F`^=GAjch4F`a3##Iu|aOTo>7tI!u1mdKsQS0OVDCdrJ9Tb|QHSF^_4oJ|>g zrb!8X!ahrukn>bbels=s3TY7uw%M zbx+-lHne{Ot0}mk%U&r3nVgM+G_8_iKbnmSYgjFbXuCmpxB(l`9a`7$D@#(Jyb&{J zD~#I6>ac>f_%{QXatqQH8LE{~) z1~@F32N}MRD}r|j_BYyre#hyCVRom6X*+oCZk2dkzs{<|@g1ngrrnaa=yzuzwtIG> zVDk46=<$ffLclK8o@M6}9!ENQ9rBAbAFDv_kA#KJYCIKl_TauC5CY1VaW8!Rm zZV$3G`=A`W&IbhtrDVU@!|!(w(EpdmW5RPeQ9Kr$-y?#A7Z5tWl&dJWm5d$9(!LgHSYbbKfGaYG0!k$K6u9I}tKM(sZiy1lH2W!XNKUV|iB zniXPg6P+@w#Ob`^?1{f6Pnd88Q(2uAj$c9i3TDF#KOwtAucG%YHbCJ+l=JqhC?*Un zg_n`(XRqS&;yHZTDr%YsqXN{msdXO2+(!1Isn4MKMyOQCqN*k~mp4aaH1q!Gij5SE zJWJWn)GtGv18x20Rh9rBI#@6dBlasexA+&7P(G~v1ry?8MPf1O8pq-*D7u3SGOr1B z$i0TVu`Yn6E`)Wzj++Xg-*trLrvtf#2%*Jb(g|`PqKGih+#480@)t_5FN%2PFpA_a z61Rp$dojl^I_Dx7Ow=`C;`b~heFYYv_SH;{oL>wl{zR@}^mE&Pyc0uy_7ZtP@;9h- zQ=Hs;nIxZ{IFV1*3`yAHn*#5(H(76zoqmh^on>+v1}5%Jqi=I>x?HZd-^SHWxO5vc zxa=$nIwN}Olx)n{gMMdqsm=r$E)=A71-x^e^?-;X9Atkj&%=}zuU#qG^=lFGvtT9X zX9WnkgGz3I#&`JYRdO}vvix?}9qyA>dwC@?*AdjYMnYcAz~G5j*Qd_4a$mRK@s{Fs z65U^Z=TciQbw_)b>&|+3=Pp}?3anDVy4*WP>hVkW%*n_X;_jeBtli63KnYqIgKxiS@%;} z*?vXUSlJ%nJgx#kOuZDXXgyO~@IS$k-e9U)Jr|iDs8RQ(#fM>_MtzW4k4ikTM)dvY z3g9(AHKxw_QWhpZbu6{|2Ib)=-VSlPA=+{{Z8|26C#jrz1Ttt_IYiqDLH_DG%y68F zt`xlDuMVN;--Lii_^V?P!!&=y2Ae3t&L8=!M6A0MdpgKxEJtSQTYA0rr14G%<8^H0hP-VVeI nvQNpuK0Yw~D9^4R#Lxaw&I|}rzs^jj@ttHVYIlB+I_Q4@Bt>og diff --git a/packages/js/test-env/src/wrappers/ens/schema.graphql b/packages/js/test-env/src/wrappers/ens/schema.graphql index 7932d6636a..8ef4b4be26 100644 --- a/packages/js/test-env/src/wrappers/ens/schema.graphql +++ b/packages/js/test-env/src/wrappers/ens/schema.graphql @@ -337,7 +337,7 @@ type TxOverrides { ### Imported Modules START ### type Ethereum_Module @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Module" ) { @@ -495,7 +495,7 @@ type Ethereum_Module @imported( } type UTS46_Module @imported( - uri: "wrap://ens/uts46.web3api.eth", + uri: "ens/uts46.web3api.eth", namespace: "UTS46", nativeType: "Module" ) { @@ -513,7 +513,7 @@ type UTS46_Module @imported( } type SHA3_Module @imported( - uri: "wrap://ens/sha3.web3api.eth", + uri: "ens/sha3.web3api.eth", namespace: "SHA3", nativeType: "Module" ) { @@ -573,7 +573,7 @@ type SHA3_Module @imported( ### Imported Objects START ### type Ethereum_Connection @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Connection" ) { @@ -582,7 +582,7 @@ type Ethereum_Connection @imported( } type Ethereum_TxOverrides @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { @@ -592,7 +592,7 @@ type Ethereum_TxOverrides @imported( } type Ethereum_StaticTxResult @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { @@ -601,7 +601,7 @@ type Ethereum_StaticTxResult @imported( } type Ethereum_TxRequest @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { @@ -617,7 +617,7 @@ type Ethereum_TxRequest @imported( } type Ethereum_TxReceipt @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { @@ -641,7 +641,7 @@ type Ethereum_TxReceipt @imported( } type Ethereum_Log @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Log" ) { @@ -657,7 +657,7 @@ type Ethereum_Log @imported( } type Ethereum_EventNotification @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { @@ -667,7 +667,7 @@ type Ethereum_EventNotification @imported( } type Ethereum_Network @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Network" ) { @@ -677,7 +677,7 @@ type Ethereum_Network @imported( } type Ethereum_TxResponse @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxResponse" ) { @@ -703,7 +703,7 @@ type Ethereum_TxResponse @imported( } type Ethereum_Access @imported( - uri: "wrap://ens/ethereum.web3api.eth", + uri: "ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Access" ) { @@ -712,7 +712,7 @@ type Ethereum_Access @imported( } type UTS46_ConvertResult @imported( - uri: "wrap://ens/uts46.web3api.eth", + uri: "ens/uts46.web3api.eth", namespace: "UTS46", nativeType: "ConvertResult" ) { diff --git a/packages/js/test-env/src/wrappers/ens/web3api.build.json b/packages/js/test-env/src/wrappers/ens/web3api.build.json index 11207f2be7..6a1667ec41 100644 --- a/packages/js/test-env/src/wrappers/ens/web3api.build.json +++ b/packages/js/test-env/src/wrappers/ens/web3api.build.json @@ -1,6 +1,6 @@ { "format": "0.0.1-prealpha.3", "docker": { - "buildImageId": "sha256:8116d16c4e0b42f1c27becb3e952d266d6a8b8045f4dc2ebaba8ddfbd93d52be\n" + "buildImageId": "sha256:c5ef5a402f3fb9166b41afd13a5820b13620c2d1d43c46f6688ae860c55925b0\n" } } \ No newline at end of file From f01966d677be3decd4495a2478b47e76cd8aea65 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 14 Jun 2022 20:40:51 -0700 Subject: [PATCH 05/17] Web3ApiClient Rename --- packages/cli/lang/en.json | 2 +- packages/cli/lang/es.json | 2 +- packages/cli/src/__tests__/e2e/deploy.spec.ts | 4 +- packages/cli/src/__tests__/e2e/query.spec.ts | 2 +- packages/cli/src/commands/app.ts | 4 +- packages/cli/src/commands/query.ts | 4 +- packages/cli/src/lib/SchemaComposer.ts | 6 +- .../lib/defaults/deploy-modules/ens/index.ts | 4 +- .../deploy-modules/local-dev-ens/index.ts | 4 +- packages/cli/src/lib/helpers/client.ts | 6 +- .../{Web3ApiClient.ts => PolywrapClient.ts} | 62 +++++++++---------- .../__tests__/core/interface-impls.spec.ts | 16 ++--- .../src/__tests__/core/plugin-wrapper.spec.ts | 8 +-- .../src/__tests__/core/resolveUri.spec.ts | 12 ++-- .../client/src/__tests__/core/sanity.spec.ts | 16 ++--- .../js/client/src/__tests__/e2e/test-cases.ts | 30 ++++----- .../client/src/__tests__/e2e/workflow.spec.ts | 4 +- packages/js/client/src/createWeb3ApiClient.ts | 8 +-- packages/js/client/src/index.ts | 2 +- .../scripts/manifest/deserialize-ts.mustache | 2 +- .../formats/web3api.app/deserialize.ts | 2 +- .../formats/web3api.build/deserialize.ts | 2 +- .../formats/web3api.deploy/deserialize.ts | 2 +- .../formats/web3api.infra/deserialize.ts | 2 +- .../formats/web3api.meta/deserialize.ts | 2 +- .../formats/web3api.plugin/deserialize.ts | 2 +- .../manifest/formats/web3api/deserialize.ts | 2 +- .../ethereum/src/__tests__/e2e.spec.ts | 6 +- .../filesystem/src/__tests__/e2e.spec.ts | 6 +- .../graph-node/src/__tests__/e2e.spec.ts | 4 +- .../http/src/__tests__/e2e/e2e.spec.ts | 6 +- .../src/__tests__/e2e/integration.spec.ts | 6 +- packages/js/plugins/logger/README.md | 2 +- .../logger/src/__tests__/e2e/e2e.spec.ts | 4 +- .../plugins/sha3/src/__tests__/index.test.ts | 6 +- .../plugins/uts46/src/__tests__/index.test.ts | 6 +- packages/js/react/src/client.tsx | 8 +-- packages/js/react/src/provider.tsx | 12 ++-- packages/js/test-env/src/index.ts | 4 +- packages/js/tracing/README.md | 6 +- .../src/__tests__/e2e/integration.spec.ts | 6 +- .../app/typescript-node/src/index.ts | 4 +- .../typescript/src/__tests__/e2e.spec.ts | 8 +-- 43 files changed, 153 insertions(+), 153 deletions(-) rename packages/js/client/src/{Web3ApiClient.ts => PolywrapClient.ts} (94%) diff --git a/packages/cli/lang/en.json b/packages/cli/lang/en.json index d5af4247e9..b05ad0f2ad 100644 --- a/packages/cli/lang/en.json +++ b/packages/cli/lang/en.json @@ -142,7 +142,7 @@ "commands_plugin_options_codegen": "Output directory for the generated types (default: {default})", "commands_query_options_configPath": "config-path", "commands_query_options_outputFilePath": "output-file-path", - "commands_query_options_config": "Add custom configuration to the Web3ApiClient", + "commands_query_options_config": "Add custom configuration to the PolywrapClient", "commands_query_options_outputFile": "Output file path for the query result", "commands_query_options_quiet": "Suppress output", "commands_query_error_outputFileMissing": "{option} option missing {argument} argument", diff --git a/packages/cli/lang/es.json b/packages/cli/lang/es.json index 1ed5655aab..d5a722f372 100644 --- a/packages/cli/lang/es.json +++ b/packages/cli/lang/es.json @@ -143,7 +143,7 @@ "commands_plugin_options_codegen": "Output directory for the generated types (default: {default})", "commands_query_options_configPath": "config-path", "commands_query_options_outputFilePath": "output-file-path", - "commands_query_options_config": "Add custom configuration to the Web3ApiClient", + "commands_query_options_config": "Add custom configuration to the PolywrapClient", "commands_query_options_outputFile": "Output file path for the query result", "commands_query_options_quiet": "Suppress output", "commands_query_error_outputFileMissing": "{option} option missing {argument} argument", diff --git a/packages/cli/src/__tests__/e2e/deploy.spec.ts b/packages/cli/src/__tests__/e2e/deploy.spec.ts index 56bc48d432..33c94ec53e 100644 --- a/packages/cli/src/__tests__/e2e/deploy.spec.ts +++ b/packages/cli/src/__tests__/e2e/deploy.spec.ts @@ -8,7 +8,7 @@ import { providers } from "@polywrap/test-env-js"; import { GetPathToCliTestFiles } from "@polywrap/test-cases"; -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; import { Wallet } from "@ethersproject/wallet"; import path from "path"; @@ -53,7 +53,7 @@ const setup = async (domainNames: string[]) => { }; const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth" - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: ethereumPluginUri, diff --git a/packages/cli/src/__tests__/e2e/query.spec.ts b/packages/cli/src/__tests__/e2e/query.spec.ts index b240201eab..96be087a2c 100644 --- a/packages/cli/src/__tests__/e2e/query.spec.ts +++ b/packages/cli/src/__tests__/e2e/query.spec.ts @@ -25,7 +25,7 @@ Arguments: Options: -c, --client-config Add custom configuration to the - Web3ApiClient + PolywrapClient -o, --output-file Output file path for the query result -q, --quiet Suppress output -h, --help display help for command diff --git a/packages/cli/src/commands/app.ts b/packages/cli/src/commands/app.ts index 0f49325704..04fc5fe6d8 100644 --- a/packages/cli/src/commands/app.ts +++ b/packages/cli/src/commands/app.ts @@ -10,7 +10,7 @@ import { parseAppCodegenDirOption, } from "../lib"; -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; import * as path from "path"; const defaultOutputTypesDir = "./src/polywrap"; @@ -71,7 +71,7 @@ async function run(options: AppCommandOptions) { // Get providers and client const { ipfsProvider, ethProvider } = await getTestEnvProviders(ipfs); const ensAddress: string | undefined = ens; - const client: Web3ApiClient = getSimpleClient({ + const client: PolywrapClient = getSimpleClient({ ensAddress, ethProvider, ipfsProvider, diff --git a/packages/cli/src/commands/query.ts b/packages/cli/src/commands/query.ts index aed6b6b1b5..66fb8216ae 100644 --- a/packages/cli/src/commands/query.ts +++ b/packages/cli/src/commands/query.ts @@ -5,7 +5,7 @@ import { parseRecipeOutputFilePathOption, } from "../lib"; -import { Web3ApiClient, Web3ApiClientConfig } from "@polywrap/client-js"; +import { PolywrapClient, Web3ApiClientConfig } from "@polywrap/client-js"; import gql from "graphql-tag"; import path from "path"; import yaml from "js-yaml"; @@ -50,7 +50,7 @@ export const query: Command = { async function run(recipePath: string, options: QueryCommandOptions) { const { clientConfig, outputFile, quiet } = options; - const client = new Web3ApiClient(clientConfig); + const client = new PolywrapClient(clientConfig); function getParser(path: string) { return path.endsWith(".yaml") || path.endsWith(".yml") diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index b31e1e1715..e5026d08ce 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -3,7 +3,7 @@ import { Project, AnyManifest, getSimpleClient } from "./"; -import { Uri, Web3ApiClient } from "@polywrap/client-js"; +import { Uri, PolywrapClient } from "@polywrap/client-js"; import { composeSchema, ComposerOutput, @@ -23,11 +23,11 @@ export interface SchemaComposerConfig { ensAddress?: string; ethProvider?: string; ipfsProvider?: string; - client?: Web3ApiClient; + client?: PolywrapClient; } export class SchemaComposer { - private _client: Web3ApiClient; + private _client: PolywrapClient; private _composerOutput: ComposerOutput | undefined; constructor(private _config: SchemaComposerConfig) { diff --git a/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts b/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts index fd187f91b9..965470fb27 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts @@ -5,7 +5,7 @@ import { Deployer } from "../../../deploy/deployer"; import { Wallet } from "@ethersproject/wallet"; import { JsonRpcProvider } from "@ethersproject/providers"; import { Uri } from "@polywrap/core-js"; -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; import path from "path"; import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; @@ -48,7 +48,7 @@ class ENSPublisher implements Deployer { "ens" )}`; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: ethereumPluginUri, diff --git a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts index 4f075e1dd0..13ffc04be6 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts @@ -5,7 +5,7 @@ import { Deployer } from "../../../deploy/deployer"; import { Uri } from "@polywrap/core-js"; import { ensAddresses } from "@polywrap/test-env-js"; import path from "path"; -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; const contentHash = require("content-hash"); @@ -30,7 +30,7 @@ class LocalDevENSPublisher implements Deployer { const cid = uri.path; const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: ethereumPluginUri, diff --git a/packages/cli/src/lib/helpers/client.ts b/packages/cli/src/lib/helpers/client.ts index dd812880e4..150cafddba 100644 --- a/packages/cli/src/lib/helpers/client.ts +++ b/packages/cli/src/lib/helpers/client.ts @@ -2,7 +2,7 @@ import { PluginRegistration } from "@polywrap/core-js"; import { ensPlugin } from "@polywrap/ens-plugin-js"; import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; -import { Web3ApiClient, defaultIpfsProviders } from "@polywrap/client-js"; +import { PolywrapClient, defaultIpfsProviders } from "@polywrap/client-js"; interface SimpleClientConfig { ensAddress?: string; @@ -10,7 +10,7 @@ interface SimpleClientConfig { ipfsProvider?: string; } -export function getSimpleClient(config: SimpleClientConfig): Web3ApiClient { +export function getSimpleClient(config: SimpleClientConfig): PolywrapClient { const { ensAddress, ethProvider, ipfsProvider } = config; const plugins: PluginRegistration[] = []; if (ensAddress) { @@ -44,5 +44,5 @@ export function getSimpleClient(config: SimpleClientConfig): Web3ApiClient { }), }); } - return new Web3ApiClient({ plugins }); + return new PolywrapClient({ plugins }); } diff --git a/packages/js/client/src/Web3ApiClient.ts b/packages/js/client/src/PolywrapClient.ts similarity index 94% rename from packages/js/client/src/Web3ApiClient.ts rename to packages/js/client/src/PolywrapClient.ts index 5e18648e88..1b942ed3b9 100644 --- a/packages/js/client/src/Web3ApiClient.ts +++ b/packages/js/client/src/PolywrapClient.ts @@ -55,7 +55,7 @@ export interface Web3ApiClientConfig tracingEnabled: boolean; } -export class Web3ApiClient implements Client { +export class PolywrapClient implements Client { // TODO: the API cache needs to be more like a routing table. // It should help us keep track of what URI's map to what APIs, // and handle cases where the are multiple jumps. For example, if @@ -80,7 +80,7 @@ export class Web3ApiClient implements Client { try { this.setTracingEnabled(!!config?.tracingEnabled); - Tracer.startSpan("Web3ApiClient: constructor"); + Tracer.startSpan("PolywrapClient: constructor"); if (config) { this._config = { @@ -118,47 +118,47 @@ export class Web3ApiClient implements Client { public setTracingEnabled(enable: boolean): void { if (enable) { - Tracer.enableTracing("Web3ApiClient"); + Tracer.enableTracing("PolywrapClient"); } else { Tracer.disableTracing(); } this._config.tracingEnabled = enable; } - @Tracer.traceMethod("Web3ApiClient: getRedirects") + @Tracer.traceMethod("PolywrapClient: getRedirects") public getRedirects( options: GetRedirectsOptions = {} ): readonly UriRedirect[] { return this._getConfig(options.contextId).redirects; } - @Tracer.traceMethod("Web3ApiClient: getPlugins") + @Tracer.traceMethod("PolywrapClient: getPlugins") public getPlugins( options: GetPluginsOptions = {} ): readonly PluginRegistration[] { return this._getConfig(options.contextId).plugins; } - @Tracer.traceMethod("Web3ApiClient: getInterfaces") + @Tracer.traceMethod("PolywrapClient: getInterfaces") public getInterfaces( options: GetInterfacesOptions = {} ): readonly InterfaceImplementations[] { return this._getConfig(options.contextId).interfaces; } - @Tracer.traceMethod("Web3ApiClient: getEnvs") + @Tracer.traceMethod("PolywrapClient: getEnvs") public getEnvs(options: GetEnvsOptions = {}): readonly Env[] { return this._getConfig(options.contextId).envs; } - @Tracer.traceMethod("Web3ApiClient: getUriResolvers") + @Tracer.traceMethod("PolywrapClient: getUriResolvers") public getUriResolvers( options: GetUriResolversOptions = {} ): readonly UriResolver[] { return this._getConfig(options.contextId).uriResolvers; } - @Tracer.traceMethod("Web3ApiClient: getEnvByUri") + @Tracer.traceMethod("PolywrapClient: getEnvByUri") public getEnvByUri( uri: TUri, options: GetEnvsOptions @@ -170,7 +170,7 @@ export class Web3ApiClient implements Client { ); } - @Tracer.traceMethod("Web3ApiClient: getSchema") + @Tracer.traceMethod("PolywrapClient: getSchema") public async getSchema( uri: TUri, options: GetSchemaOptions = {} @@ -180,7 +180,7 @@ export class Web3ApiClient implements Client { return await api.getSchema(client); } - @Tracer.traceMethod("Web3ApiClient: getManifest") + @Tracer.traceMethod("PolywrapClient: getManifest") public async getManifest< TUri extends Uri | string, TManifestArtifactType extends ManifestArtifactType @@ -193,7 +193,7 @@ export class Web3ApiClient implements Client { return await api.getManifest(options, client); } - @Tracer.traceMethod("Web3ApiClient: getFile") + @Tracer.traceMethod("PolywrapClient: getFile") public async getFile( uri: TUri, options: GetFileOptions @@ -203,7 +203,7 @@ export class Web3ApiClient implements Client { return await api.getFile(options, client); } - @Tracer.traceMethod("Web3ApiClient: getImplementations") + @Tracer.traceMethod("PolywrapClient: getImplementations") public getImplementations( uri: TUri, options: GetImplementationsOptions = {} @@ -224,7 +224,7 @@ export class Web3ApiClient implements Client { ) as TUri[]); } - @Tracer.traceMethod("Web3ApiClient: query") + @Tracer.traceMethod("PolywrapClient: query") public async query< TData extends Record = Record, TVariables extends Record = Record, @@ -307,7 +307,7 @@ export class Web3ApiClient implements Client { return result; } - @Tracer.traceMethod("Web3ApiClient: invoke") + @Tracer.traceMethod("PolywrapClient: invoke") public async invoke( options: InvokeApiOptions ): Promise> { @@ -341,7 +341,7 @@ export class Web3ApiClient implements Client { return result; } - @Tracer.traceMethod("Web3ApiClient: run") + @Tracer.traceMethod("PolywrapClient: run") public async run< TData extends Record = Record, TUri extends Uri | string = string @@ -357,7 +357,7 @@ export class Web3ApiClient implements Client { ); } - @Tracer.traceMethod("Web3ApiClient: subscribe") + @Tracer.traceMethod("PolywrapClient: subscribe") public subscribe< TData extends Record = Record, TVariables extends Record = Record, @@ -370,7 +370,7 @@ export class Web3ApiClient implements Client { options.config ); // eslint-disable-next-line @typescript-eslint/no-this-alias - const thisClient: Web3ApiClient = this; + const thisClient: PolywrapClient = this; const client = contextualizeClient(this, contextId); const typedOptions: SubscribeOptions = { @@ -452,7 +452,7 @@ export class Web3ApiClient implements Client { return subscription; } - @Tracer.traceMethod("Web3ApiClient: resolveUri") + @Tracer.traceMethod("PolywrapClient: resolveUri") public async resolveUri( uri: TUri, options?: ResolveUriOptions @@ -502,7 +502,7 @@ export class Web3ApiClient implements Client { }; } - @Tracer.traceMethod("Web3ApiClient: loadUriResolverWrappers") + @Tracer.traceMethod("PolywrapClient: loadUriResolverWrappers") public async loadUriResolvers(): Promise<{ success: boolean; failedUriResolvers: string[]; @@ -551,12 +551,12 @@ export class Web3ApiClient implements Client { } } - @Tracer.traceMethod("Web3ApiClient: isContextualized") + @Tracer.traceMethod("PolywrapClient: isContextualized") private _isContextualized(contextId: string | undefined): boolean { return !!contextId && this._contexts.has(contextId); } - @Tracer.traceMethod("Web3ApiClient: getConfig") + @Tracer.traceMethod("PolywrapClient: getConfig") private _getConfig(contextId?: string): Readonly> { if (contextId) { const context = this._contexts.get(contextId); @@ -570,7 +570,7 @@ export class Web3ApiClient implements Client { } } - @Tracer.traceMethod("Web3ApiClient: sanitizeConfig") + @Tracer.traceMethod("PolywrapClient: sanitizeConfig") private _sanitizeConfig(): void { this._sanitizePlugins(); this._sanitizeInterfacesAndImplementations(); @@ -578,7 +578,7 @@ export class Web3ApiClient implements Client { // Make sure plugin URIs are unique // If not, use the first occurrence of the plugin - @Tracer.traceMethod("Web3ApiClient: sanitizePlugins") + @Tracer.traceMethod("PolywrapClient: sanitizePlugins") private _sanitizePlugins(): void { const plugins = this._config.plugins; // Plugin map used to keep track of plugins with same URI @@ -612,7 +612,7 @@ export class Web3ApiClient implements Client { // Make sure interface URIs are unique and that all of their implementation URIs are unique // If not, then merge them - @Tracer.traceMethod("Web3ApiClient: sanitizeInterfacesAndImplementations") + @Tracer.traceMethod("PolywrapClient: sanitizeInterfacesAndImplementations") private _sanitizeInterfacesAndImplementations(): void { const interfaces = this._config.interfaces; // Interface hash map used to keep track of interfaces with same URI @@ -663,7 +663,7 @@ export class Web3ApiClient implements Client { this._config.interfaces = sanitizedInterfaces; } - @Tracer.traceMethod("Web3ApiClient: validateConfig") + @Tracer.traceMethod("PolywrapClient: validateConfig") private _validateConfig(): void { // Require plugins to use non-interface URIs const pluginUris = this.getPlugins().map((x) => x.uri.uri); @@ -680,7 +680,7 @@ export class Web3ApiClient implements Client { } } - @Tracer.traceMethod("Web3ApiClient: toUri") + @Tracer.traceMethod("PolywrapClient: toUri") private _toUri(uri: Uri | string): Uri { if (typeof uri === "string") { return new Uri(uri); @@ -698,7 +698,7 @@ export class Web3ApiClient implements Client { * 3. !parentId && context -> create context ID, default config as "base", cache context * 4. parentId && context -> create context ID, parent config as "base", cache context */ - @Tracer.traceMethod("Web3ApiClient: setContext") + @Tracer.traceMethod("PolywrapClient: setContext") private _setContext( parentId: string | undefined, context: Partial | undefined @@ -737,14 +737,14 @@ export class Web3ApiClient implements Client { }; } - @Tracer.traceMethod("Web3ApiClient: clearContext") + @Tracer.traceMethod("PolywrapClient: clearContext") private _clearContext(contextId: string | undefined): void { if (contextId) { this._contexts.delete(contextId); } } - @Tracer.traceMethod("Web3ApiClient: _loadWeb3Api") + @Tracer.traceMethod("PolywrapClient: _loadWeb3Api") private async _loadWeb3Api(uri: Uri, options?: Contextualized): Promise { const { api, uriHistory, error } = await this.resolveUri(uri, { contextId: options?.contextId, @@ -793,7 +793,7 @@ export class Web3ApiClient implements Client { } const contextualizeClient = ( - client: Web3ApiClient, + client: PolywrapClient, contextId: string | undefined ): Client => contextId diff --git a/packages/js/client/src/__tests__/core/interface-impls.spec.ts b/packages/js/client/src/__tests__/core/interface-impls.spec.ts index abebcf343d..aeaf55049f 100644 --- a/packages/js/client/src/__tests__/core/interface-impls.spec.ts +++ b/packages/js/client/src/__tests__/core/interface-impls.spec.ts @@ -4,7 +4,7 @@ import { getDefaultClientConfig, Uri, PluginModule, - Web3ApiClient, + PolywrapClient, Web3ApiClientConfig, } from "../.."; @@ -24,7 +24,7 @@ describe("interface-impls", () => { const implementation1Uri = "wrap://ens/some-implementation1.eth"; const implementation2Uri = "wrap://ens/some-implementation2.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ interfaces: [ { interface: interfaceUri, @@ -140,7 +140,7 @@ describe("interface-impls", () => { const implementationUri = "wrap://ens/some-implementation.eth"; expect(() => { - new Web3ApiClient({ + new PolywrapClient({ plugins: [ { uri: interface1Uri, @@ -224,7 +224,7 @@ describe("interface-impls", () => { const implementationUri1 = "wrap://ens/implementation1.eth"; const implementationUri2 = "wrap://ens/implementation2.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ interfaces: [ { interface: interfaceUri, @@ -255,7 +255,7 @@ describe("interface-impls", () => { const implementationUri1 = "wrap://ens/implementation1.eth"; const implementationUri2 = "wrap://ens/implementation2.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ interfaces: [ { interface: interfaceUri, @@ -290,7 +290,7 @@ describe("interface-impls", () => { const implementation1Uri = "wrap://ens/some-implementation1.eth"; const implementation2Uri = "wrap://ens/some-implementation2.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: implementation1Uri, @@ -325,7 +325,7 @@ describe("interface-impls", () => { const implementation1Uri = "wrap://ens/some-implementation1.eth"; const implementation2Uri = "wrap://ens/some-implementation2.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: implementation1Uri, @@ -364,7 +364,7 @@ describe("interface-impls", () => { const implementation1Uri = "wrap://ens/some-implementation1.eth"; const implementation2Uri = "wrap://ens/some-implementation2.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ redirects: [ { from: oldInterfaceUri, diff --git a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts index b27a1fc921..9aef3ad601 100644 --- a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts @@ -1,6 +1,6 @@ import { Web3ApiClientConfig, - Web3ApiClient, + PolywrapClient, createWeb3ApiClient, PluginModule, } from "../.."; @@ -62,7 +62,7 @@ describe("plugin-wrapper", () => { test("plugin registration - with default plugins", () => { const implementationUri = "wrap://ens/some-implementation.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: implementationUri, @@ -228,7 +228,7 @@ enum Logger_LogLevel @imported( }, }; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: pluginUriToOverride, @@ -267,7 +267,7 @@ enum Logger_LogLevel @imported( }, }; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: pluginUriToOverride, diff --git a/packages/js/client/src/__tests__/core/resolveUri.spec.ts b/packages/js/client/src/__tests__/core/resolveUri.spec.ts index ee24acf231..6c72efa804 100644 --- a/packages/js/client/src/__tests__/core/resolveUri.spec.ts +++ b/packages/js/client/src/__tests__/core/resolveUri.spec.ts @@ -2,7 +2,7 @@ import { createWeb3ApiClient, Uri, Web3ApiClientConfig, - Web3ApiClient, + PolywrapClient, PluginModule, } from "../.."; import { @@ -853,7 +853,7 @@ describe("resolveUri", () => { const ensUri = new Uri(`ens/test`); const redirectUri = new Uri(`ens/redirect.eth`); - const client = await new Web3ApiClient({ + const client = await new PolywrapClient({ uriResolvers: [ { name: "CustomResolver", @@ -938,7 +938,7 @@ describe("resolveUri", () => { const ensUri = new Uri(`ens/test`); const redirectUri = new Uri(`ens/redirect.eth`); - const client = await new Web3ApiClient(); + const client = await new PolywrapClient(); const result = await client.resolveUri(ensUri, { config: { @@ -990,7 +990,7 @@ describe("resolveUri", () => { }); it("custom wrapper resolver does not cause infinite recursion when resolved at runtime", async () => { - const client = await new Web3ApiClient({ + const client = await new PolywrapClient({ interfaces: [ { interface: "ens/uri-resolver.core.web3api.eth", @@ -1013,7 +1013,7 @@ describe("resolveUri", () => { }); it("unresolvable custom wrapper resolver is found when preloaded", async () => { - const client = await new Web3ApiClient({ + const client = await new PolywrapClient({ interfaces: [ { interface: "ens/uri-resolver.core.web3api.eth", @@ -1040,7 +1040,7 @@ describe("resolveUri", () => { }); it("can preload API resolvers", async () => { - const client = await new Web3ApiClient(); + const client = await new PolywrapClient(); const { success, failedUriResolvers } = await client.loadUriResolvers(); diff --git a/packages/js/client/src/__tests__/core/sanity.spec.ts b/packages/js/client/src/__tests__/core/sanity.spec.ts index 04b47c1786..59e72f8d9a 100644 --- a/packages/js/client/src/__tests__/core/sanity.spec.ts +++ b/packages/js/client/src/__tests__/core/sanity.spec.ts @@ -3,7 +3,7 @@ import { } from "@polywrap/core-js"; import { Uri, - Web3ApiClient, + PolywrapClient, } from "../.."; jest.setTimeout(200000); @@ -11,7 +11,7 @@ jest.setTimeout(200000); describe("sanity", () => { test("default client config", () => { - const client = new Web3ApiClient(); + const client = new PolywrapClient(); expect(client.getRedirects()).toStrictEqual([]); expect(client.getPlugins().map((x) => x.uri)).toStrictEqual([ @@ -42,16 +42,16 @@ describe("sanity", () => { }); test("client noDefaults flag works as expected", async () => { - let client = new Web3ApiClient(); + let client = new PolywrapClient(); expect(client.getPlugins().length !== 0).toBeTruthy(); - client = new Web3ApiClient({}, {}); + client = new PolywrapClient({}, {}); expect(client.getPlugins().length !== 0).toBeTruthy(); - client = new Web3ApiClient({}, { noDefaults: false }); + client = new PolywrapClient({}, { noDefaults: false }); expect(client.getPlugins().length !== 0).toBeTruthy(); - client = new Web3ApiClient({}, { noDefaults: true }); + client = new PolywrapClient({}, { noDefaults: true }); expect(client.getPlugins().length === 0).toBeTruthy(); }); @@ -59,7 +59,7 @@ describe("sanity", () => { const implementation1Uri = "wrap://ens/some-implementation1.eth"; const implementation2Uri = "wrap://ens/some-implementation2.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ redirects: [ { from: implementation1Uri, @@ -82,7 +82,7 @@ describe("sanity", () => { const implementationUri = "wrap://ens/some-implementation.eth"; const schemaStr = "test-schema"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: implementationUri, diff --git a/packages/js/client/src/__tests__/e2e/test-cases.ts b/packages/js/client/src/__tests__/e2e/test-cases.ts index 0c0a047e91..4be62ba4b3 100644 --- a/packages/js/client/src/__tests__/e2e/test-cases.ts +++ b/packages/js/client/src/__tests__/e2e/test-cases.ts @@ -1,8 +1,8 @@ -import { Web3ApiClient, Uri } from "../../"; +import { PolywrapClient, Uri } from "../../"; import { BigNumber } from "bignumber.js"; export const runAsyncifyTest = async ( - client: Web3ApiClient, + client: PolywrapClient, apiUri: string ) => { const deploy = await client.query<{ @@ -235,7 +235,7 @@ export const runAsyncifyTest = async ( export const runBigIntTypeTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { { @@ -295,7 +295,7 @@ export const runBigIntTypeTest = async ( }; export const runBigNumberTypeTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { { @@ -356,7 +356,7 @@ export const runBigNumberTypeTest = async ( }; export const runBytesTypeTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { @@ -386,7 +386,7 @@ export const runBytesTypeTest = async ( }; export const runEnumTypesTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { const method1a = await client.query({ @@ -460,7 +460,7 @@ export const runEnumTypesTest = async ( }; export const runImplementationsTest = async ( - client: Web3ApiClient, + client: PolywrapClient, interfaceUri: string, implementationUri: string ) => { @@ -503,7 +503,7 @@ export const runImplementationsTest = async ( }; export const runGetImplementationsTest = async ( - client: Web3ApiClient, + client: PolywrapClient, interfaceUri: string, implementationUri: string ) => { @@ -532,7 +532,7 @@ export const runGetImplementationsTest = async ( }; export const runInvalidTypesTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { const invalidBoolIntSent = await client.query({ @@ -629,7 +629,7 @@ export const runInvalidTypesTest = async ( }; export const runJsonTypeTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { const fromJson = await client.invoke<{ x: number; y: number }>({ @@ -669,7 +669,7 @@ export const runJsonTypeTest = async ( }; export const runLargeTypesTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { const largeStr = new Array(5000).join("web3api "); @@ -716,7 +716,7 @@ export const runLargeTypesTest = async ( }; export const runNumberTypesTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { const i8Underflow = await client.query<{ @@ -859,7 +859,7 @@ export const runNumberTypesTest = async ( }; export const runObjectTypesTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { const method1a = await client.query<{ @@ -1085,7 +1085,7 @@ export const runObjectTypesTest = async ( }; export const runMapTypeTest = async ( - client: Web3ApiClient, + client: PolywrapClient, uri: string ) => { @@ -1139,7 +1139,7 @@ export const runMapTypeTest = async ( }; export const runSimpleStorageTest = async ( - client: Web3ApiClient, + client: PolywrapClient, apiUri: string ) => { const deploy = await client.query<{ diff --git a/packages/js/client/src/__tests__/e2e/workflow.spec.ts b/packages/js/client/src/__tests__/e2e/workflow.spec.ts index c92951c853..c230d1c582 100644 --- a/packages/js/client/src/__tests__/e2e/workflow.spec.ts +++ b/packages/js/client/src/__tests__/e2e/workflow.spec.ts @@ -6,7 +6,7 @@ import { ensAddresses, providers } from "@polywrap/test-env-js"; -import { createWeb3ApiClient, Web3ApiClient, Web3ApiClientConfig } from "../.."; +import { createWeb3ApiClient, PolywrapClient, Web3ApiClientConfig } from "../.."; import { outPropWorkflow, sanityWorkflow } from "./workflow-test-cases"; jest.setTimeout(200000); @@ -50,7 +50,7 @@ describe("workflow", () => { }); describe("simple-storage", () => { - let client: Web3ApiClient; + let client: PolywrapClient; beforeAll(async () => { await buildAndDeployApi({ diff --git a/packages/js/client/src/createWeb3ApiClient.ts b/packages/js/client/src/createWeb3ApiClient.ts index f71bc0f3f5..f67491ef23 100644 --- a/packages/js/client/src/createWeb3ApiClient.ts +++ b/packages/js/client/src/createWeb3ApiClient.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable prefer-const */ -import { Web3ApiClient, Web3ApiClientConfig } from "./Web3ApiClient"; +import { PolywrapClient, Web3ApiClientConfig } from "./PolywrapClient"; import { PluginConfigs, modules, uris } from "./pluginConfigs"; import { PluginRegistration } from "@polywrap/core-js"; @@ -14,7 +14,7 @@ export const createWeb3ApiClient = Tracer.traceFunc( async ( pluginConfigs: PluginConfigs, config?: Partial - ): Promise => { + ): Promise => { const plugins: PluginRegistration[] = []; for (const plugin of Object.keys(pluginConfigs)) { @@ -71,12 +71,12 @@ export const createWeb3ApiClient = Tracer.traceFunc( } if (config) { - return new Web3ApiClient({ + return new PolywrapClient({ ...config, plugins: [...plugins, ...(config.plugins ? config.plugins : [])], }); } else { - return new Web3ApiClient({ plugins }); + return new PolywrapClient({ plugins }); } } ); diff --git a/packages/js/client/src/index.ts b/packages/js/client/src/index.ts index 6dd4c3b3cb..b753fb2f7b 100644 --- a/packages/js/client/src/index.ts +++ b/packages/js/client/src/index.ts @@ -1,4 +1,4 @@ -export * from "./Web3ApiClient"; +export * from "./PolywrapClient"; export * from "./createWeb3ApiClient"; export * from "./default-client-config"; export * from "./wasm"; diff --git a/packages/js/core/scripts/manifest/deserialize-ts.mustache b/packages/js/core/scripts/manifest/deserialize-ts.mustache index fe7f0190c1..8027283980 100644 --- a/packages/js/core/scripts/manifest/deserialize-ts.mustache +++ b/packages/js/core/scripts/manifest/deserialize-ts.mustache @@ -51,7 +51,7 @@ export const deserialize{{type}} = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${any{{type}}.format}, please upgrade your Web3ApiClient package.` + `Cannot downgrade Web3API version ${any{{type}}.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts index 4052043484..377d86965d 100644 --- a/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeAppManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyAppManifest.format}, please upgrade your Web3ApiClient package.` + `Cannot downgrade Web3API version ${anyAppManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts index 2f8e44bd58..2038fff745 100644 --- a/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeBuildManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyBuildManifest.format}, please upgrade your Web3ApiClient package.` + `Cannot downgrade Web3API version ${anyBuildManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts index a922ea0b19..cc013874d3 100644 --- a/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeDeployManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyDeployManifest.format}, please upgrade your Web3ApiClient package.` + `Cannot downgrade Web3API version ${anyDeployManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts index 46d338d1c4..506f258b67 100644 --- a/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeInfraManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyInfraManifest.format}, please upgrade your Web3ApiClient package.` + `Cannot downgrade Web3API version ${anyInfraManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts index 0793a63090..2ba33c1217 100644 --- a/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeMetaManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyMetaManifest.format}, please upgrade your Web3ApiClient package.` + `Cannot downgrade Web3API version ${anyMetaManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts b/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts index 9aac33aba0..1d4f30bda2 100644 --- a/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts @@ -51,7 +51,7 @@ export const deserializePluginManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyPluginManifest.format}, please upgrade your Web3ApiClient package.` + `Cannot downgrade Web3API version ${anyPluginManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api/deserialize.ts b/packages/js/core/src/manifest/formats/web3api/deserialize.ts index 5a8e0bfdb8..e288ddec3c 100644 --- a/packages/js/core/src/manifest/formats/web3api/deserialize.ts +++ b/packages/js/core/src/manifest/formats/web3api/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeWeb3ApiManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyWeb3ApiManifest.format}, please upgrade your Web3ApiClient package.` + `Cannot downgrade Web3API version ${anyWeb3ApiManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts index 55d9dae7d7..3348a04a71 100644 --- a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts @@ -1,7 +1,7 @@ import { ethereumPlugin } from ".."; import * as Schema from "../polywrap-man"; -import { Web3ApiClient, defaultIpfsProviders } from "@polywrap/client-js"; +import { PolywrapClient, defaultIpfsProviders } from "@polywrap/client-js"; import { ensPlugin } from "@polywrap/ens-plugin-js"; import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; import { @@ -31,7 +31,7 @@ const contracts = { jest.setTimeout(360000); describe("Ethereum Plugin", () => { - let client: Web3ApiClient; + let client: PolywrapClient; let ensAddress: string; let resolverAddress: string; let registrarAddress: string; @@ -47,7 +47,7 @@ describe("Ethereum Plugin", () => { resolverAddress = ensAddresses.resolverAddress; registrarAddress = ensAddresses.registrarAddress - client = new Web3ApiClient({ + client = new PolywrapClient({ plugins: [ { uri: "wrap://ens/ethereum.web3api.eth", diff --git a/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts b/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts index 94fc1750ac..c3af204007 100644 --- a/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts @@ -7,7 +7,7 @@ import { providers } from "@polywrap/test-env-js"; import { - Web3ApiClient, + PolywrapClient, Web3ApiClientConfig, defaultIpfsProviders, } from "@polywrap/client-js"; @@ -21,7 +21,7 @@ import path from "path"; jest.setTimeout(360000); describe("Filesystem plugin", () => { - let client: Web3ApiClient; + let client: PolywrapClient; beforeAll(async () => { await initTestEnvironment(); @@ -62,7 +62,7 @@ describe("Filesystem plugin", () => { }, ], }; - client = new Web3ApiClient(config); + client = new PolywrapClient(config); }); afterAll(async () => { diff --git a/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts b/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts index 6448cca4d2..4add444ebc 100644 --- a/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts @@ -1,5 +1,5 @@ import { GraphNodePlugin, plugin } from ".."; -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; const uri = "ens/graph-node.web3api.eth"; const provider = "https://api.thegraph.com"; @@ -7,7 +7,7 @@ const provider = "https://api.thegraph.com"; jest.setTimeout(30000); describe("Graph Node Plugin", () => { - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [{ uri, plugin: plugin({ diff --git a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts index 3e6230d4d7..90368fa8c7 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts @@ -1,7 +1,7 @@ import { httpPlugin } from "../.."; import { Response } from "../../polywrap-man"; -import { Web3ApiClient } from "@polywrap/client-js" +import { PolywrapClient } from "@polywrap/client-js" import nock from "nock"; jest.setTimeout(360000) @@ -12,10 +12,10 @@ const defaultReplyHeaders = { } describe("e2e tests for HttpPlugin", () => { - let web3ApiClient: Web3ApiClient; + let web3ApiClient: PolywrapClient; beforeEach(() => { - web3ApiClient = new Web3ApiClient({ + web3ApiClient = new PolywrapClient({ plugins: [ { uri: "wrap://ens/http.web3api.eth", diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts index 090ef0815f..db679c683c 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts @@ -1,7 +1,7 @@ import { httpPlugin } from "../.."; import { Response } from "../../polywrap"; -import { Web3ApiClient } from "@polywrap/client-js" +import { PolywrapClient } from "@polywrap/client-js" import { buildApi } from "@polywrap/test-env-js"; @@ -18,13 +18,13 @@ describe("e2e tests for HttpPlugin", () => { describe("integration", () => { - let client: Web3ApiClient; + let client: PolywrapClient; const apiPath = `${__dirname}/integration` const uri = `fs/${apiPath}/build` beforeAll(async () => { - client = new Web3ApiClient({ + client = new PolywrapClient({ plugins: [ { uri: "wrap://ens/http.web3api.eth", diff --git a/packages/js/plugins/logger/README.md b/packages/js/plugins/logger/README.md index cbb704b406..32fbbb98c4 100644 --- a/packages/js/plugins/logger/README.md +++ b/packages/js/plugins/logger/README.md @@ -14,7 +14,7 @@ Console Logger plugin implements the `wrap://ens/logger.core.web3api.eth` core W ```ts import { loggerPlugin, LogLevel } from "@polywrap/logger-plugin-js"; -const client = new Web3ApiClient({ +const client = new PolywrapClient({ plugins: [{ from: "wrap://ens/js-logger.web3api.eth", to: loggerPlugin() diff --git a/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts index 6d985089c3..949f01a824 100644 --- a/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts @@ -1,9 +1,9 @@ -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; describe("log method", () => { it("logs to console appropriate level", async () => { - const web3ApiClient = new Web3ApiClient() + const web3ApiClient = new PolywrapClient() const response = await web3ApiClient.query<{ log: boolean }>({ uri: "wrap://ens/js-logger.web3api.eth", diff --git a/packages/js/plugins/sha3/src/__tests__/index.test.ts b/packages/js/plugins/sha3/src/__tests__/index.test.ts index 94dad607ae..a00dad8e19 100644 --- a/packages/js/plugins/sha3/src/__tests__/index.test.ts +++ b/packages/js/plugins/sha3/src/__tests__/index.test.ts @@ -1,4 +1,4 @@ -import { Web3ApiClient } from "@polywrap/client-js" +import { PolywrapClient } from "@polywrap/client-js" import { sha3_512, sha3_384, @@ -16,10 +16,10 @@ import { sha3Plugin } from ".."; const testMessage = "test message to hash" describe("js-sha3 algorithms returned values match the plugin's", () => { - let client: Web3ApiClient + let client: PolywrapClient beforeAll(() => { - client = new Web3ApiClient({ + client = new PolywrapClient({ plugins: [ { uri: "wrap://ens/sha3.web3api.eth", diff --git a/packages/js/plugins/uts46/src/__tests__/index.test.ts b/packages/js/plugins/uts46/src/__tests__/index.test.ts index fdbf4f06e4..02c9178c4a 100644 --- a/packages/js/plugins/uts46/src/__tests__/index.test.ts +++ b/packages/js/plugins/uts46/src/__tests__/index.test.ts @@ -1,14 +1,14 @@ -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; import { uts46Plugin } from ".."; const uts46 = require("idna-uts46-hx/uts46bundle.js"); const textToConvert = "xn-bb-eka.at"; describe("IDNA UTS #46", () => { - let client: Web3ApiClient; + let client: PolywrapClient; beforeAll(() => { - client = new Web3ApiClient({ + client = new PolywrapClient({ plugins: [ { uri: "wrap://ens/uts46.web3api.eth", diff --git a/packages/js/react/src/client.tsx b/packages/js/react/src/client.tsx index e158a2094b..77126bba37 100644 --- a/packages/js/react/src/client.tsx +++ b/packages/js/react/src/client.tsx @@ -2,13 +2,13 @@ import { PROVIDERS, PRIMARY_PROVIDER } from "./provider"; // eslint-disable-next-line import/no-extraneous-dependencies import React from "react"; -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; export interface UseWeb3ApiClientProps { provider?: string; } -export function useWeb3ApiClient(props?: UseWeb3ApiClientProps): Web3ApiClient { +export function useWeb3ApiClient(props?: UseWeb3ApiClientProps): PolywrapClient { const provider = props?.provider ?? PRIMARY_PROVIDER; if (!PROVIDERS[provider]) { @@ -17,14 +17,14 @@ export function useWeb3ApiClient(props?: UseWeb3ApiClientProps): Web3ApiClient { ); } - // Get the Web3ApiClient from the provider in our DOM hierarchy + // Get the PolywrapClient from the provider in our DOM hierarchy const client = React.useContext( PROVIDERS[provider].ClientContext ); if (!client || Object.keys(client).length === 0) { throw new Error( - `The requested Web3APIProvider \"${provider}\" was not found within the DOM hierarchy. We could not get the Web3ApiClient through the provider context.` + `The requested Web3APIProvider \"${provider}\" was not found within the DOM hierarchy. We could not get the PolywrapClient through the provider context.` ) } diff --git a/packages/js/react/src/provider.tsx b/packages/js/react/src/provider.tsx index b399a87974..049c19ecf2 100644 --- a/packages/js/react/src/provider.tsx +++ b/packages/js/react/src/provider.tsx @@ -1,12 +1,12 @@ // eslint-disable-next-line import/no-extraneous-dependencies import React from "react"; -import { Web3ApiClient, Web3ApiClientConfig } from "@polywrap/client-js"; +import { PolywrapClient, Web3ApiClientConfig } from "@polywrap/client-js"; -type ClientContext = React.Context +type ClientContext = React.Context interface Web3ApiProviderState { ClientContext: ClientContext; - client?: Web3ApiClient; + client?: PolywrapClient; } interface Web3ApiProviderMap { @@ -30,7 +30,7 @@ export function createWeb3ApiProvider( // Reserve the provider slot PROVIDERS[name] = { - ClientContext: React.createContext({} as Web3ApiClient) + ClientContext: React.createContext({} as PolywrapClient) }; return ({ envs, redirects, plugins, interfaces, children }) => { @@ -47,7 +47,7 @@ export function createWeb3ApiProvider( } // Instantiate the client - PROVIDERS[name].client = new Web3ApiClient({ redirects, plugins, interfaces, envs }); + PROVIDERS[name].client = new PolywrapClient({ redirects, plugins, interfaces, envs }); setClientCreated(true); @@ -62,7 +62,7 @@ export function createWeb3ApiProvider( const ClientProvider = PROVIDERS[name].ClientContext.Provider; return clientCreated ? ( - + {children} ) : null; diff --git a/packages/js/test-env/src/index.ts b/packages/js/test-env/src/index.ts index 3a6a0d03f3..023e4b8154 100644 --- a/packages/js/test-env/src/index.ts +++ b/packages/js/test-env/src/index.ts @@ -7,7 +7,7 @@ import axios from "axios"; import fs from "fs"; import yaml from "js-yaml"; import { deserializeWeb3ApiManifest, Uri } from "@polywrap/core-js"; -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; export const ensAddresses = { @@ -238,7 +238,7 @@ export async function buildAndDeployApi({ const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth"; - const client = new Web3ApiClient({ + const client = new PolywrapClient({ plugins: [ { uri: ethereumPluginUri, diff --git a/packages/js/tracing/README.md b/packages/js/tracing/README.md index 8fa2e1e59a..4f49244786 100644 --- a/packages/js/tracing/README.md +++ b/packages/js/tracing/README.md @@ -8,16 +8,16 @@ docker run -d -p 9411:9411 openzipkin/zipkin ``` -2. Enable tracing when creating the `Web3ApiClient` +2. Enable tracing when creating the `PolywrapClient` ```typescript - const client = new Web3ApiClient({ + const client = new PolywrapClient({ ..., tracingEnabled: true }) ``` - Or you can turn on tracing while running the `Web3ApiClient` by calling the `tracingEnabled` method of `Web3ApiClient`. + Or you can turn on tracing while running the `PolywrapClient` by calling the `tracingEnabled` method of `PolywrapClient`. ```typescript // Turn tracing off diff --git a/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts b/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts index 3c7a850ca7..aeb43de0f3 100644 --- a/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts +++ b/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts @@ -1,4 +1,4 @@ -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; import { buildApi, initTestEnvironment, @@ -16,7 +16,7 @@ jest.setTimeout(500000); describe("SimpleStorage", () => { const CONNECTION = { networkNameOrChainId: "testnet" }; - let client: Web3ApiClient; + let client: PolywrapClient; const apiPath: string = path.join( path.resolve(__dirname), @@ -30,7 +30,7 @@ describe("SimpleStorage", () => { await initTestEnvironment(); const config = getPlugins(providers.ethereum, providers.ipfs, ensAddresses.ensAddress); - client = new Web3ApiClient(config); + client = new PolywrapClient(config); await buildApi(apiPath); }); diff --git a/packages/templates/app/typescript-node/src/index.ts b/packages/templates/app/typescript-node/src/index.ts index 9528216e0a..a88982038b 100644 --- a/packages/templates/app/typescript-node/src/index.ts +++ b/packages/templates/app/typescript-node/src/index.ts @@ -1,8 +1,8 @@ import { HelloWorld_Module, Ethereum_Module } from "./polywrap"; -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; -const client = new Web3ApiClient(); +const client = new PolywrapClient(); async function main() { console.log("Invoking: logMessage"); diff --git a/packages/templates/plugin/typescript/src/__tests__/e2e.spec.ts b/packages/templates/plugin/typescript/src/__tests__/e2e.spec.ts index 9a8f7cf2cc..746339efc9 100644 --- a/packages/templates/plugin/typescript/src/__tests__/e2e.spec.ts +++ b/packages/templates/plugin/typescript/src/__tests__/e2e.spec.ts @@ -1,14 +1,14 @@ -import { Web3ApiClient } from "@polywrap/client-js"; +import { PolywrapClient } from "@polywrap/client-js"; import { samplePlugin } from "../"; describe("e2e", () => { - let client: Web3ApiClient; + let client: PolywrapClient; const uri = "ens/sampleplugin.eth"; beforeAll(() => { - // Add the samplePlugin to the Web3ApiClient - client = new Web3ApiClient({ + // Add the samplePlugin to the PolywrapClient + client = new PolywrapClient({ plugins: [ { uri: uri, From 2ceddad3743cacf01b1c1d67ccf98678298129d2 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 14 Jun 2022 21:23:59 -0700 Subject: [PATCH 06/17] Web3Api partial rename --- packages/cli/src/__tests__/e2e/build.spec.ts | 4 +-- packages/cli/src/commands/build.ts | 4 +-- packages/cli/src/commands/codegen.ts | 4 +-- packages/cli/src/commands/deploy.ts | 4 +-- packages/cli/src/lib/Compiler.ts | 12 +++---- .../{Web3ApiProject.ts => WasmProject.ts} | 32 ++++++++--------- packages/cli/src/lib/project/index.ts | 2 +- ...t.spec.ts => createPolywrapClient.spec.ts} | 2 +- ...b3ApiClient.ts => createPolywrapClient.ts} | 0 .../js/client/src/default-client-config.ts | 8 ++--- packages/js/client/src/index.ts | 2 +- .../{PluginWeb3Api.ts => PluginWrapper.ts} | 18 +++++----- .../wasm/{WasmWeb3Api.ts => WasmWrapper.ts} | 36 +++++++++---------- packages/js/client/src/wasm/imports.ts | 2 +- packages/js/client/src/wasm/index.ts | 2 +- packages/js/react/src/__tests__/env/index.ts | 2 +- ...nt.spec.tsx => usePolywrapClient.spec.tsx} | 0 ...ke.spec.tsx => usePolywrapInvoke.spec.tsx} | 0 ...ery.spec.tsx => usePolywrapQuery.spec.tsx} | 0 yarn.lock | 6 ++-- 20 files changed, 70 insertions(+), 70 deletions(-) rename packages/cli/src/lib/project/{Web3ApiProject.ts => WasmProject.ts} (93%) rename packages/js/client/src/__tests__/core/{createWeb3ApiClient.spec.ts => createPolywrapClient.spec.ts} (96%) rename packages/js/client/src/{createWeb3ApiClient.ts => createPolywrapClient.ts} (100%) rename packages/js/client/src/plugin/{PluginWeb3Api.ts => PluginWrapper.ts} (89%) rename packages/js/client/src/wasm/{WasmWeb3Api.ts => WasmWrapper.ts} (89%) rename packages/js/react/src/__tests__/{useWeb3ApiClient.spec.tsx => usePolywrapClient.spec.tsx} (100%) rename packages/js/react/src/__tests__/{useWeb3ApiInvoke.spec.tsx => usePolywrapInvoke.spec.tsx} (100%) rename packages/js/react/src/__tests__/{useWeb3ApiQuery.spec.tsx => usePolywrapQuery.spec.tsx} (100%) diff --git a/packages/cli/src/__tests__/e2e/build.spec.ts b/packages/cli/src/__tests__/e2e/build.spec.ts index 103861b678..776fb92ade 100644 --- a/packages/cli/src/__tests__/e2e/build.spec.ts +++ b/packages/cli/src/__tests__/e2e/build.spec.ts @@ -1,4 +1,4 @@ -import { Web3ApiProject, loadBuildManifest } from "../../lib"; +import { WasmProject, loadBuildManifest } from "../../lib"; import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; @@ -62,7 +62,7 @@ describe("e2e tests for build command", () => { test("Adds uuid-v4 suffix to build image if no build manifest specified", async () => { const projectRoot = getTestCaseDir(0); - const project = new Web3ApiProject({ + const project = new WasmProject({ rootDir: projectRoot, web3apiManifestPath: path.join(projectRoot, "web3api.yaml") }); diff --git a/packages/cli/src/commands/build.ts b/packages/cli/src/commands/build.ts index 55031bd675..419c4e5c2e 100644 --- a/packages/cli/src/commands/build.ts +++ b/packages/cli/src/commands/build.ts @@ -1,7 +1,7 @@ import { Command, Program } from "./types"; import { Compiler, - Web3ApiProject, + WasmProject, SchemaComposer, Watcher, WatchEvent, @@ -68,7 +68,7 @@ async function run(options: BuildCommandOptions) { return; } - const project = new Web3ApiProject({ + const project = new WasmProject({ rootDir: path.dirname(manifestFile), web3apiManifestPath: manifestFile, quiet: !verbose, diff --git a/packages/cli/src/commands/codegen.ts b/packages/cli/src/commands/codegen.ts index 66a8624df6..a2c5bb7709 100644 --- a/packages/cli/src/commands/codegen.ts +++ b/packages/cli/src/commands/codegen.ts @@ -2,7 +2,7 @@ import { Command, Program } from "./types"; import { CodeGenerator, Compiler, - Web3ApiProject, + WasmProject, SchemaComposer, intlMsg, defaultWeb3ApiManifest, @@ -79,7 +79,7 @@ async function run(options: CodegenCommandOptions) { const ensAddress: string | undefined = ens; // Web3Api Project - const project = new Web3ApiProject({ + const project = new WasmProject({ rootDir: path.dirname(manifestFile), web3apiManifestPath: manifestFile, }); diff --git a/packages/cli/src/commands/deploy.ts b/packages/cli/src/commands/deploy.ts index 47c009a971..9558e54275 100644 --- a/packages/cli/src/commands/deploy.ts +++ b/packages/cli/src/commands/deploy.ts @@ -1,7 +1,7 @@ /* eslint-disable prefer-const */ import { intlMsg, - Web3ApiProject, + WasmProject, defaultWeb3ApiManifest, DeployPackage, parseWasmManifestFileOption, @@ -51,7 +51,7 @@ export const deploy: Command = { async function run(options: DeployCommandOptions): Promise { const { manifestFile, verbose } = options; - const project = new Web3ApiProject({ + const project = new WasmProject({ rootDir: nodePath.dirname(manifestFile), web3apiManifestPath: manifestFile, quiet: verbose ? false : true, diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index e6016672af..c32cf79d5d 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { - Web3ApiProject, + WasmProject, SchemaComposer, withSpinner, outputManifest, @@ -16,7 +16,7 @@ import { } from "./"; import { Web3ApiManifest, BuildManifest, MetaManifest } from "@polywrap/core-js"; -import { WasmWeb3Api } from "@polywrap/client-js"; +import { WasmWrapper } from "@polywrap/client-js"; import { WrapImports } from "@polywrap/client-js/build/wasm/types"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; import { ComposerOutput } from "@polywrap/schema-compose"; @@ -38,7 +38,7 @@ export interface CompilerOverrides { export interface CompilerConfig { outputDir: string; - project: Web3ApiProject; + project: WasmProject; schemaComposer: SchemaComposer; } @@ -276,7 +276,7 @@ export class Compiler { dockerfile = generateDockerfile( project.getCachePath( path.join( - Web3ApiProject.cacheLayout.buildImageDir, + WasmProject.cacheLayout.buildImageDir, "Dockerfile.mustache" ) ), @@ -296,7 +296,7 @@ export class Compiler { if (cache == true) { cacheDir = project.getCachePath( - Web3ApiProject.cacheLayout.buildImageCacheDir + WasmProject.cacheLayout.buildImageCacheDir ); } else if (cache) { if (!path.isAbsolute(cache)) { @@ -466,7 +466,7 @@ export class Compiler { }, wrap: wrapImports, }, - requiredExports: WasmWeb3Api.requiredExports, + requiredExports: WasmWrapper.requiredExports, }); } catch (error) { throw Error( diff --git a/packages/cli/src/lib/project/Web3ApiProject.ts b/packages/cli/src/lib/project/WasmProject.ts similarity index 93% rename from packages/cli/src/lib/project/Web3ApiProject.ts rename to packages/cli/src/lib/project/WasmProject.ts index edf07b72b5..ee382f577d 100644 --- a/packages/cli/src/lib/project/Web3ApiProject.ts +++ b/packages/cli/src/lib/project/WasmProject.ts @@ -43,7 +43,7 @@ export interface Web3ApiProjectConfig extends ProjectConfig { metaManifestPath?: string; } -export class Web3ApiProject extends Project { +export class WasmProject extends Project { private _web3apiManifest: Web3ApiManifest | undefined; private _buildManifest: BuildManifest | undefined; private _deployManifest: DeployManifest | undefined; @@ -65,7 +65,7 @@ export class Web3ApiProject extends Project { constructor(protected _config: Web3ApiProjectConfig) { super(_config, { rootDir: _config.rootDir, - subDir: Web3ApiProject.cacheLayout.root, + subDir: WasmProject.cacheLayout.root, }); } @@ -82,11 +82,11 @@ export class Web3ApiProject extends Project { this._deployManifest = undefined; this._defaultBuildImageCached = false; this._defaultDeployModulesCached = false; - this._cache.removeCacheDir(Web3ApiProject.cacheLayout.buildImageDir); + this._cache.removeCacheDir(WasmProject.cacheLayout.buildImageDir); this._cache.removeCacheDir( - Web3ApiProject.cacheLayout.buildLinkedPackagesDir + WasmProject.cacheLayout.buildLinkedPackagesDir ); - this._cache.removeCacheDir(Web3ApiProject.cacheLayout.deployDir); + this._cache.removeCacheDir(WasmProject.cacheLayout.deployDir); } public async validate(): Promise { @@ -200,7 +200,7 @@ export class Web3ApiProject extends Project { // Return the cached manifest this._config.buildManifestPath = path.join( - this._cache.getCachePath(Web3ApiProject.cacheLayout.buildImageDir), + this._cache.getCachePath(WasmProject.cacheLayout.buildImageDir), "web3api.build.yaml" ); return this._config.buildManifestPath; @@ -220,7 +220,7 @@ export class Web3ApiProject extends Project { const root = this.getManifestDir(); const cacheDir = this._cache.getCachePath( - Web3ApiProject.cacheLayout.buildLinkedPackagesDir + WasmProject.cacheLayout.buildLinkedPackagesDir ); // Add default config variables @@ -261,14 +261,14 @@ export class Web3ApiProject extends Project { public async getBuildUuid(): Promise { // Load the cached build UUID let uuid = this._cache.readCacheFile( - Web3ApiProject.cacheLayout.buildUuidFile + WasmProject.cacheLayout.buildUuidFile ); // If none was present, generate one if (!uuid) { uuid = createUUID(); this._cache.writeCacheFile( - Web3ApiProject.cacheLayout.buildUuidFile, + WasmProject.cacheLayout.buildUuidFile, uuid, "utf-8" ); @@ -287,7 +287,7 @@ export class Web3ApiProject extends Project { const defaultBuildManifestFilename = "web3api.build.yaml"; const defaultPath = `${__dirname}/../defaults/build-images/${language}/${defaultBuildManifestFilename}`; const buildImageCachePath = this._cache.getCachePath( - Web3ApiProject.cacheLayout.buildImageDir + WasmProject.cacheLayout.buildImageDir ); if (!fs.existsSync(defaultPath)) { @@ -300,11 +300,11 @@ export class Web3ApiProject extends Project { } // Clean the directory - this._cache.removeCacheDir(Web3ApiProject.cacheLayout.buildImageDir); + this._cache.removeCacheDir(WasmProject.cacheLayout.buildImageDir); // Copy default build image files into cache await this._cache.copyIntoCache( - Web3ApiProject.cacheLayout.buildImageDir, + WasmProject.cacheLayout.buildImageDir, `${__dirname}/../defaults/build-images/${language}/*`, { up: true } ); @@ -334,7 +334,7 @@ export class Web3ApiProject extends Project { if (buildManifest.linked_packages) { const rootDir = this.getManifestDir(); const cacheSubPath = this._cache.getCachePath( - Web3ApiProject.cacheLayout.buildLinkedPackagesDir + WasmProject.cacheLayout.buildLinkedPackagesDir ); buildManifest.linked_packages.map( @@ -424,7 +424,7 @@ export class Web3ApiProject extends Project { } const cachePath = this._cache.getCachePath( - `${Web3ApiProject.cacheLayout.deployModulesDir}/${moduleName}` + `${WasmProject.cacheLayout.deployModulesDir}/${moduleName}` ); const manifestExtPath = path.join(cachePath, "web3api.deploy.ext.json"); @@ -443,11 +443,11 @@ export class Web3ApiProject extends Project { return; } - this._cache.removeCacheDir(Web3ApiProject.cacheLayout.deployModulesDir); + this._cache.removeCacheDir(WasmProject.cacheLayout.deployModulesDir); for await (const deployModule of modules) { await this._cache.copyIntoCache( - `${Web3ApiProject.cacheLayout.deployModulesDir}/${deployModule}`, + `${WasmProject.cacheLayout.deployModulesDir}/${deployModule}`, `${__dirname}/../defaults/deploy-modules/${deployModule}/*`, { up: true } ); diff --git a/packages/cli/src/lib/project/index.ts b/packages/cli/src/lib/project/index.ts index cacf83786a..1464426aa0 100644 --- a/packages/cli/src/lib/project/index.ts +++ b/packages/cli/src/lib/project/index.ts @@ -1,4 +1,4 @@ export * from "./Project"; -export * from "./Web3ApiProject"; +export * from "./WasmProject"; export * from "./PluginProject"; export * from "./AppProject"; diff --git a/packages/js/client/src/__tests__/core/createWeb3ApiClient.spec.ts b/packages/js/client/src/__tests__/core/createPolywrapClient.spec.ts similarity index 96% rename from packages/js/client/src/__tests__/core/createWeb3ApiClient.spec.ts rename to packages/js/client/src/__tests__/core/createPolywrapClient.spec.ts index f77092c033..0e319d3f94 100644 --- a/packages/js/client/src/__tests__/core/createWeb3ApiClient.spec.ts +++ b/packages/js/client/src/__tests__/core/createPolywrapClient.spec.ts @@ -1,4 +1,4 @@ -import { createWeb3ApiClient, PluginConfigs } from "../../createWeb3ApiClient"; +import { createWeb3ApiClient, PluginConfigs } from "../../createPolywrapClient"; describe("createWeb3ApiClient", () => { it("Should throw because the plugin requested it's not installed ", async () => { diff --git a/packages/js/client/src/createWeb3ApiClient.ts b/packages/js/client/src/createPolywrapClient.ts similarity index 100% rename from packages/js/client/src/createWeb3ApiClient.ts rename to packages/js/client/src/createPolywrapClient.ts diff --git a/packages/js/client/src/default-client-config.ts b/packages/js/client/src/default-client-config.ts index d93f474ccb..6dd748f3ac 100644 --- a/packages/js/client/src/default-client-config.ts +++ b/packages/js/client/src/default-client-config.ts @@ -1,5 +1,5 @@ -import { ClientConfig, WasmWeb3Api } from "."; -import { PluginWeb3Api } from "./plugin/PluginWeb3Api"; +import { ClientConfig, WasmWrapper } from "."; +import { PluginWrapper } from "./plugin/PluginWrapper"; import { Uri, @@ -103,7 +103,7 @@ export const getDefaultClientConfig = Tracer.traceFunc( uri: Uri, plugin: PluginPackage, environment: Env | undefined - ) => new PluginWeb3Api(uri, plugin, environment) + ) => new PluginWrapper(uri, plugin, environment) ), new ExtendableUriResolver( ( @@ -112,7 +112,7 @@ export const getDefaultClientConfig = Tracer.traceFunc( uriResolver: string, environment: Env | undefined ) => { - return new WasmWeb3Api(uri, manifest, uriResolver, environment); + return new WasmWrapper(uri, manifest, uriResolver, environment); } ), ], diff --git a/packages/js/client/src/index.ts b/packages/js/client/src/index.ts index b753fb2f7b..f9784b93f9 100644 --- a/packages/js/client/src/index.ts +++ b/packages/js/client/src/index.ts @@ -1,5 +1,5 @@ export * from "./PolywrapClient"; -export * from "./createWeb3ApiClient"; +export * from "./createPolywrapClient"; export * from "./default-client-config"; export * from "./wasm"; export * from "@polywrap/core-js"; diff --git a/packages/js/client/src/plugin/PluginWeb3Api.ts b/packages/js/client/src/plugin/PluginWrapper.ts similarity index 89% rename from packages/js/client/src/plugin/PluginWeb3Api.ts rename to packages/js/client/src/plugin/PluginWrapper.ts index 82a1cec682..a3d88be93c 100644 --- a/packages/js/client/src/plugin/PluginWeb3Api.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -17,7 +17,7 @@ import { } from "@polywrap/core-js"; import { Tracer } from "@polywrap/tracing-js"; -export class PluginWeb3Api extends Api { +export class PluginWrapper extends Api { private _instance: PluginModule | undefined; private _sanitizedEnv: Record | undefined = undefined; @@ -29,7 +29,7 @@ export class PluginWeb3Api extends Api { ) { super(); - Tracer.startSpan("PluginWeb3Api: constructor"); + Tracer.startSpan("PluginWrapper: constructor"); Tracer.setAttribute("input", { uri: this._uri, plugin: this._plugin, @@ -56,7 +56,7 @@ export class PluginWeb3Api extends Api { throw Error("client.getFile(...) is not implemented for Plugins."); } - @Tracer.traceMethod("PluginWeb3Api: invoke") + @Tracer.traceMethod("PluginWrapper: invoke") public async invoke( options: InvokeApiOptions, client: Client @@ -67,11 +67,11 @@ export class PluginWeb3Api extends Api { const module = this._getInstance(); if (!module) { - throw new Error(`PluginWeb3Api: module "${module}" not found.`); + throw new Error(`PluginWrapper: module "${module}" not found.`); } if (!module.getMethod(method)) { - throw new Error(`PluginWeb3Api: method "${method}" not found.`); + throw new Error(`PluginWrapper: method "${method}" not found.`); } // Sanitize & load the module's environment @@ -87,7 +87,7 @@ export class PluginWeb3Api extends Api { if (typeof result !== "object") { throw new Error( - `PluginWeb3Api: decoded MsgPack input did not result in an object.\nResult: ${result}` + `PluginWrapper: decoded MsgPack input did not result in an object.\nResult: ${result}` ); } @@ -140,7 +140,7 @@ export class PluginWeb3Api extends Api { } } catch (e) { throw Error( - `PluginWeb3Api: invocation exception encountered.\n` + + `PluginWrapper: invocation exception encountered.\n` + `uri: ${this._uri.uri}\nmodule: ${module}\n` + `method: ${method}\nresultFilter: ${resultFilter}\n` + `input: ${JSON.stringify(jsInput, null, 2)}\n` + @@ -159,7 +159,7 @@ export class PluginWeb3Api extends Api { return this._instance; } - @Tracer.traceMethod("PluginWeb3Api: _sanitizeAndLoadEnv") + @Tracer.traceMethod("PluginWrapper: _sanitizeAndLoadEnv") private async _sanitizeAndLoadEnv( client: Client, pluginModule: PluginModule @@ -175,7 +175,7 @@ export class PluginWeb3Api extends Api { pluginModule._wrap_load_env(this._sanitizedEnv || {}); } - @Tracer.traceMethod("PluginWeb3Api: _getClientEnv") + @Tracer.traceMethod("PluginWrapper: _getClientEnv") private _getClientEnv(): Record { if (!this._clientEnv?.env) { return {}; diff --git a/packages/js/client/src/wasm/WasmWeb3Api.ts b/packages/js/client/src/wasm/WasmWrapper.ts similarity index 89% rename from packages/js/client/src/wasm/WasmWeb3Api.ts rename to packages/js/client/src/wasm/WasmWrapper.ts index 8c5e37bbe1..ce8f0f585f 100644 --- a/packages/js/client/src/wasm/WasmWeb3Api.ts +++ b/packages/js/client/src/wasm/WasmWrapper.ts @@ -63,7 +63,7 @@ export interface State { env?: ArrayBuffer; } -export class WasmWeb3Api extends Api { +export class WasmWrapper extends Api { public static requiredExports: readonly string[] = ["_wrap_invoke"]; private _schema?: string; @@ -78,7 +78,7 @@ export class WasmWeb3Api extends Api { ) { super(); - Tracer.startSpan("WasmWeb3Api: constructor"); + Tracer.startSpan("WasmWrapper: constructor"); Tracer.setAttribute("input", { uri: this._uri, manifest: this._manifest, @@ -88,7 +88,7 @@ export class WasmWeb3Api extends Api { Tracer.endSpan(); } - @Tracer.traceMethod("WasmWeb3Api: getManifest") + @Tracer.traceMethod("WasmWrapper: getManifest") public async getManifest( options: GetManifestOptions, client: Client @@ -114,7 +114,7 @@ export class WasmWeb3Api extends Api { } } if (!manifest) { - throw new Error("WasmWeb3Api: Manifest was not found."); + throw new Error("WasmWrapper: Manifest was not found."); } switch (options.type) { case "build": @@ -132,7 +132,7 @@ export class WasmWeb3Api extends Api { } } - @Tracer.traceMethod("WasmWeb3Api: getFile") + @Tracer.traceMethod("WasmWrapper: getFile") public async getFile( options: GetFileOptions, client: Client @@ -154,7 +154,7 @@ export class WasmWeb3Api extends Api { // If nothing is returned, the file was not found if (!data) { throw Error( - `WasmWeb3Api: File was not found.\nURI: ${this._uri}\nSubpath: ${path}` + `WasmWrapper: File was not found.\nURI: ${this._uri}\nSubpath: ${path}` ); } @@ -164,7 +164,7 @@ export class WasmWeb3Api extends Api { if (!text) { throw Error( - `WasmWeb3Api: Decoding the file's bytes array failed.\nBytes: ${data}` + `WasmWrapper: Decoding the file's bytes array failed.\nBytes: ${data}` ); } return text; @@ -172,7 +172,7 @@ export class WasmWeb3Api extends Api { return data; } - @Tracer.traceMethod("WasmWeb3Api: invoke") + @Tracer.traceMethod("WasmWrapper: invoke") public async invoke( options: InvokeApiOptions, client: Client @@ -198,7 +198,7 @@ export class WasmWeb3Api extends Api { const abort = (message: string) => { throw new Error( - `WasmWeb3Api: Wasm module aborted execution.\nURI: ${this._uri.uri}\n` + + `WasmWrapper: Wasm module aborted execution.\nURI: ${this._uri.uri}\n` + `Method: ${method}\n` + `Input: ${JSON.stringify(input, null, 2)}\nMessage: ${message}.\n` ); @@ -213,7 +213,7 @@ export class WasmWeb3Api extends Api { memory, abort, }), - requiredExports: WasmWeb3Api.requiredExports, + requiredExports: WasmWrapper.requiredExports, }); const exports = instance.exports as WrapExports; @@ -230,7 +230,7 @@ export class WasmWeb3Api extends Api { switch (invokeResult.type) { case "InvokeError": { throw Error( - `WasmWeb3Api: invocation exception encountered.\n` + + `WasmWrapper: invocation exception encountered.\n` + `uri: ${this._uri.uri}\n` + `method: ${method}\n` + `input: ${JSON.stringify(input, null, 2)}\n` + @@ -250,14 +250,14 @@ export class WasmWeb3Api extends Api { } as InvokeApiResult; } catch (err) { throw Error( - `WasmWeb3Api: Failed to decode query result.\nResult: ${JSON.stringify( + `WasmWrapper: Failed to decode query result.\nResult: ${JSON.stringify( invokeResult.invokeResult )}\nError: ${err}` ); } } default: { - throw Error(`WasmWeb3Api: Unknown state "${state}"`); + throw Error(`WasmWrapper: Unknown state "${state}"`); } } } catch (error) { @@ -267,7 +267,7 @@ export class WasmWeb3Api extends Api { } } - @Tracer.traceMethod("WasmWeb3Api: getSchema") + @Tracer.traceMethod("WasmWrapper: getSchema") public async getSchema(client: Client): Promise { if (this._schema) { return this._schema; @@ -284,7 +284,7 @@ export class WasmWeb3Api extends Api { return this._schema; } - @Tracer.traceMethod("WasmWeb3Api: _processInvokeResult") + @Tracer.traceMethod("WasmWrapper: _processInvokeResult") private _processInvokeResult( state: State, result: boolean, @@ -311,7 +311,7 @@ export class WasmWeb3Api extends Api { } } - @Tracer.traceMethod("WasmWeb3Api: _sanitizeAndLoadEnv") + @Tracer.traceMethod("WasmWrapper: _sanitizeAndLoadEnv") private async _sanitizeAndLoadEnv( state: State, exports: WrapExports @@ -338,7 +338,7 @@ export class WasmWeb3Api extends Api { } } - @Tracer.traceMethod("WasmWeb3Api: _getClientEnv") + @Tracer.traceMethod("WasmWrapper: _getClientEnv") private _getClientEnv(): Record { if (!this._clientEnv?.env) { return {}; @@ -346,7 +346,7 @@ export class WasmWeb3Api extends Api { return this._clientEnv.env; } - @Tracer.traceMethod("WasmWeb3Api: getWasmModule") + @Tracer.traceMethod("WasmWrapper: getWasmModule") private async _getWasmModule(client: Client): Promise { if (this._wasm !== undefined) { return this._wasm as ArrayBuffer; diff --git a/packages/js/client/src/wasm/imports.ts b/packages/js/client/src/wasm/imports.ts index 727faf47c1..aa7de8db29 100644 --- a/packages/js/client/src/wasm/imports.ts +++ b/packages/js/client/src/wasm/imports.ts @@ -3,7 +3,7 @@ import { u32, WrapImports } from "./types"; import { readBytes, readString, writeBytes, writeString } from "./buffer"; import { Client } from ".."; -import { State } from "./WasmWeb3Api"; +import { State } from "./WasmWrapper"; import { msgpackEncode } from "@polywrap/core-js"; diff --git a/packages/js/client/src/wasm/index.ts b/packages/js/client/src/wasm/index.ts index 14999b16aa..72cce952c5 100644 --- a/packages/js/client/src/wasm/index.ts +++ b/packages/js/client/src/wasm/index.ts @@ -1 +1 @@ -export { WasmWeb3Api } from "./WasmWeb3Api"; +export { WasmWrapper } from "./WasmWrapper"; diff --git a/packages/js/react/src/__tests__/env/index.ts b/packages/js/react/src/__tests__/env/index.ts index 77cab8bf80..0bd1d408dd 100644 --- a/packages/js/react/src/__tests__/env/index.ts +++ b/packages/js/react/src/__tests__/env/index.ts @@ -1,7 +1,7 @@ const Environment = require("jest-environment-jsdom"); /** - * A custom environment to set the TextEncoder that is required by ../client/src/wasm/WasmWeb3Api.ts. + * A custom environment to set the TextEncoder that is required by ../client/src/wasm/WasmWrapper.ts. */ module.exports = class CustomTestEnvironment extends Environment { async setup() { diff --git a/packages/js/react/src/__tests__/useWeb3ApiClient.spec.tsx b/packages/js/react/src/__tests__/usePolywrapClient.spec.tsx similarity index 100% rename from packages/js/react/src/__tests__/useWeb3ApiClient.spec.tsx rename to packages/js/react/src/__tests__/usePolywrapClient.spec.tsx diff --git a/packages/js/react/src/__tests__/useWeb3ApiInvoke.spec.tsx b/packages/js/react/src/__tests__/usePolywrapInvoke.spec.tsx similarity index 100% rename from packages/js/react/src/__tests__/useWeb3ApiInvoke.spec.tsx rename to packages/js/react/src/__tests__/usePolywrapInvoke.spec.tsx diff --git a/packages/js/react/src/__tests__/useWeb3ApiQuery.spec.tsx b/packages/js/react/src/__tests__/usePolywrapQuery.spec.tsx similarity index 100% rename from packages/js/react/src/__tests__/useWeb3ApiQuery.spec.tsx rename to packages/js/react/src/__tests__/usePolywrapQuery.spec.tsx diff --git a/yarn.lock b/yarn.lock index 00c0fefc54..fef8a7d385 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5640,9 +5640,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001349: - version "1.0.30001352" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001352.tgz#cc6f5da3f983979ad1e2cdbae0505dccaa7c6a12" - integrity sha512-GUgH8w6YergqPQDGWhJGt8GDRnY0L/iJVQcU3eJ46GYf52R8tk0Wxp0PymuFVZboJYXGiCqwozAYZNRjVj6IcA== + version "1.0.30001353" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001353.tgz#c21014dea3bd0a15f34c5cc4cf94e9e8d6dea27d" + integrity sha512-GqItFu1lCW4OGd4f47TVQXAGxca8K9Bz3cBb872ZskMo6FIQhiHCc7QjBL7Bb4XannbV+Gq0yHhFVxONW6C/XQ== capture-exit@^2.0.0: version "2.0.0" From aa5250b7df269d7784d92e3da65f553c6fa15e54 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 15 Jun 2022 15:40:51 -0700 Subject: [PATCH 07/17] fin renaming --- .eslintrc.js | 2 +- .github/workflows/release-pr.yaml | 22 +- .github/workflows/release-publish.yaml | 16 +- .gitignore | 2 +- package.json | 3 +- packages/cli/README.md | 2 +- packages/cli/lang/en.json | 64 +-- packages/cli/lang/es.json | 64 +-- packages/cli/package.json | 6 +- packages/cli/src/__tests__/e2e/app.spec.ts | 4 +- packages/cli/src/__tests__/e2e/build.spec.ts | 14 +- .../cli/src/__tests__/e2e/codegen.spec.ts | 18 +- packages/cli/src/__tests__/e2e/create.spec.ts | 14 +- packages/cli/src/__tests__/e2e/deploy.spec.ts | 10 +- packages/cli/src/__tests__/e2e/help.spec.ts | 10 +- packages/cli/src/__tests__/e2e/infra.spec.ts | 18 +- .../cli/src/__tests__/e2e/no-command.spec.ts | 10 +- packages/cli/src/__tests__/e2e/plugin.spec.ts | 12 +- packages/cli/src/__tests__/e2e/query.spec.ts | 12 +- .../cli/src/__tests__/unit/docker.spec.ts | 2 +- packages/cli/src/commands/app.ts | 2 +- packages/cli/src/commands/build.ts | 8 +- packages/cli/src/commands/codegen.ts | 10 +- packages/cli/src/commands/create.ts | 12 +- packages/cli/src/commands/deploy.ts | 6 +- packages/cli/src/commands/infra.ts | 2 +- packages/cli/src/commands/plugin.ts | 4 +- packages/cli/src/commands/query.ts | 12 +- packages/cli/src/lib/CodeGenerator.ts | 14 +- packages/cli/src/lib/Compiler.ts | 56 +- .../wasm/assemblyscript/Dockerfile.mustache | 26 +- ...build.ext.json => polywrap.build.ext.json} | 0 ...web3api.build.yaml => polywrap.build.yaml} | 0 .../wasm/rust/Dockerfile.mustache | 32 +- .../defaults/build-images/wasm/rust/index.ts | 6 +- ...build.ext.json => polywrap.build.ext.json} | 0 ...web3api.build.yaml => polywrap.build.yaml} | 0 .../lib/defaults/deploy-modules/ens/index.ts | 2 +- ...ploy.ext.json => polywrap.deploy.ext.json} | 0 ...ploy.ext.json => polywrap.deploy.ext.json} | 0 .../deploy-modules/local-dev-ens/index.ts | 2 +- ...ploy.ext.json => polywrap.deploy.ext.json} | 0 packages/cli/src/lib/helpers/client.ts | 6 +- .../src/lib/helpers/validate-client-config.ts | 4 +- packages/cli/src/lib/infra/Infra.ts | 2 +- .../infra/fetchers/NodeDependencyFetcher.ts | 2 +- packages/cli/src/lib/manifest/app/load.ts | 2 +- packages/cli/src/lib/manifest/index.ts | 6 +- packages/cli/src/lib/manifest/language.ts | 4 +- packages/cli/src/lib/manifest/output.ts | 4 +- packages/cli/src/lib/manifest/plugin/load.ts | 4 +- .../manifest/{web3api => polywrap}/index.ts | 0 .../{web3api => polywrap}/languages.ts | 18 +- .../manifest/{web3api => polywrap}/load.ts | 28 +- packages/cli/src/lib/option-parsers/app.ts | 2 +- .../cli/src/lib/option-parsers/codegen.ts | 2 +- packages/cli/src/lib/option-parsers/plugin.ts | 2 +- packages/cli/src/lib/option-parsers/query.ts | 8 +- packages/cli/src/lib/option-parsers/wasm.ts | 4 +- packages/cli/src/lib/project/AppProject.ts | 4 +- packages/cli/src/lib/project/PluginProject.ts | 4 +- .../{WasmProject.ts => PolywrapProject.ts} | 122 ++-- packages/cli/src/lib/project/index.ts | 2 +- .../cli/src/lib/test-env/client-config.ts | 10 +- packages/core-interfaces/logger/README.md | 4 +- packages/core-interfaces/logger/package.json | 2 +- .../logger/{web3api.yaml => polywrap.yaml} | 0 .../core-interfaces/uri-resolver/README.md | 2 +- .../{web3api.yaml => polywrap.yaml} | 0 packages/js/asyncify/package.json | 2 +- packages/js/client/package.json | 4 +- .../js/client/scripts/extractPluginConfigs.ts | 6 +- packages/js/client/src/PolywrapClient.ts | 100 ++-- .../core/createPolywrapClient.spec.ts | 8 +- .../__tests__/core/interface-impls.spec.ts | 8 +- .../src/__tests__/core/plugin-wrapper.spec.ts | 36 +- .../src/__tests__/core/resolveUri.spec.ts | 242 ++++---- .../client/src/__tests__/core/sanity.spec.ts | 28 +- .../src/__tests__/core/wasm-wrapper.spec.ts | 92 +-- .../js/client/src/__tests__/e2e/env.spec.ts | 64 +-- .../js/client/src/__tests__/e2e/test-cases.ts | 56 +- .../client/src/__tests__/e2e/wasm-as.spec.ts | 142 ++--- .../js/client/src/__tests__/e2e/wasm-rs.ts | 140 ++--- .../client/src/__tests__/e2e/workflow.spec.ts | 14 +- .../js/client/src/createPolywrapClient.ts | 10 +- .../js/client/src/default-client-config.ts | 32 +- .../js/client/src/plugin/PluginWrapper.ts | 12 +- packages/js/client/src/pluginConfigs/index.ts | 6 +- packages/js/client/src/wasm/WasmWrapper.ts | 30 +- packages/js/core/jest.config.js | 2 +- packages/js/core/package.json | 4 +- .../scripts/manifest/deserialize-ts.mustache | 2 +- .../scripts/manifest/generateFormatTypes.js | 2 +- .../InterfaceImplementations.spec.ts | 4 +- .../src/__tests__/PluginRegistrations.spec.ts | 4 +- .../src/__tests__/PolywrapManifest.spec.ts | 35 ++ .../js/core/src/__tests__/UriRedirect.spec.ts | 8 +- .../src/__tests__/Web3ApiManifest.spec.ts | 35 -- .../file-string-malformed/polywrap.yaml} | 0 .../incorrect-version-format/polywrap.yaml} | 0 .../manifest/{web3api => polywrap}/main.ts | 0 .../not-accepted-field/polywrap.yaml} | 0 .../required-field-missing/polywrap.yaml} | 0 .../{web3api => polywrap}/schema.graphql | 0 .../wrong-type/polywrap.yaml} | 0 .../js/core/src/__tests__/parse-query.spec.ts | 10 +- .../js/core/src/__tests__/resolveUri.spec.ts | 182 +++--- .../src/algorithms/get-implementations.ts | 10 +- .../js/core/src/algorithms/parse-query.ts | 6 +- .../src/interfaces/core-interface-uris.ts | 4 +- .../js/core/src/interfaces/uri-resolver.ts | 16 +- .../js/core/src/manifest/formats/index.ts | 30 +- .../0.0.1-prealpha.1.ts | 0 .../0.0.1-prealpha.2.ts | 0 .../deserialize.ts | 2 +- .../{web3api.app => polywrap.app}/index.ts | 0 .../{web3api.app => polywrap.app}/migrate.ts | 0 .../0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts | 0 .../{web3api.app => polywrap.app}/validate.ts | 6 +- .../0.0.1-prealpha.1.ts | 0 .../0.0.1-prealpha.2.ts | 0 .../0.0.1-prealpha.3.ts | 0 .../deserialize.ts | 2 +- .../index.ts | 0 .../migrate.ts | 0 .../0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts | 0 .../0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts | 0 .../validate.ts | 6 +- .../0.0.1-prealpha.1.ts | 0 .../deserialize.ts | 2 +- .../index.ts | 0 .../migrate.ts | 0 .../validate.ts | 4 +- .../0.0.1-prealpha.1.ts | 0 .../0.0.1-prealpha.2.ts | 0 .../deserialize.ts | 2 +- .../index.ts | 0 .../migrate.ts | 0 .../0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts | 0 .../validate.ts | 4 +- .../0.0.1-prealpha.1.ts | 0 .../0.0.1-prealpha.2.ts | 0 .../0.0.1-prealpha.3.ts | 0 .../deserialize.ts | 2 +- .../{web3api.meta => polywrap.meta}/index.ts | 0 .../migrate.ts | 0 .../0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts | 0 .../0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts | 0 .../validate.ts | 6 +- .../0.0.1-prealpha.1.ts | 0 .../0.0.1-prealpha.2.ts | 0 .../0.0.1-prealpha.3.ts | 0 .../deserialize.ts | 2 +- .../index.ts | 0 .../migrate.ts | 0 .../0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts | 0 .../0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts | 0 .../validate.ts | 6 +- .../{web3api => polywrap}/0.0.1-prealpha.1.ts | 4 +- .../{web3api => polywrap}/0.0.1-prealpha.2.ts | 4 +- .../{web3api => polywrap}/0.0.1-prealpha.3.ts | 4 +- .../{web3api => polywrap}/0.0.1-prealpha.4.ts | 4 +- .../{web3api => polywrap}/0.0.1-prealpha.5.ts | 4 +- .../{web3api => polywrap}/0.0.1-prealpha.6.ts | 4 +- .../{web3api => polywrap}/0.0.1-prealpha.7.ts | 4 +- .../{web3api => polywrap}/0.0.1-prealpha.8.ts | 4 +- .../{web3api => polywrap}/0.0.1-prealpha.9.ts | 4 +- .../manifest/formats/polywrap/deserialize.ts | 61 ++ .../src/manifest/formats/polywrap/index.ts | 79 +++ .../formats/{web3api => polywrap}/migrate.ts | 28 +- .../0.0.1-prealpha.1_to_0.0.1-prealpha.9.ts | 4 +- .../0.0.1-prealpha.2_to_0.0.1-prealpha.9.ts | 4 +- .../0.0.1-prealpha.3_to_0.0.1-prealpha.9.ts | 4 +- .../0.0.1-prealpha.4_to_0.0.1-prealpha.9.ts | 4 +- .../0.0.1-prealpha.5_to_0.0.1-prealpha.9.ts | 4 +- .../0.0.1-prealpha.6_to_0.0.1-prealpha.9.ts | 4 +- .../0.0.1-prealpha.7_to_0.0.1-prealpha.9.ts | 4 +- .../0.0.1-prealpha.8_to_0.0.1-prealpha.9.ts | 4 +- .../formats/{web3api => polywrap}/validate.ts | 40 +- .../manifest/formats/web3api/deserialize.ts | 61 -- .../src/manifest/formats/web3api/index.ts | 79 --- packages/js/core/src/manifest/validators.ts | 2 +- packages/js/core/src/types/Env.ts | 2 +- packages/js/core/src/types/Invoke.ts | 16 +- packages/js/core/src/types/Plugin.ts | 2 +- packages/js/core/src/types/Query.ts | 26 +- packages/js/core/src/types/Subscription.ts | 16 +- packages/js/core/src/types/Uri.ts | 8 +- packages/js/core/src/types/Workflow.ts | 6 +- .../js/core/src/types/{Api.ts => Wrapper.ts} | 28 +- packages/js/core/src/types/index.ts | 2 +- .../src/uri-resolution/core/resolveUri.ts | 18 +- .../core/types/ResolveUriResult.ts | 4 +- .../core/types/UriResolutionHistory.ts | 4 +- .../core/types/UriResolutionInfo.ts | 2 +- .../core/types/UriResolutionResult.ts | 4 +- .../uri-resolution/core/types/UriResolver.ts | 4 +- .../resolvers/cache/CacheResolver.ts | 8 +- .../extendable/ExtendableUriResolver.ts | 20 +- .../extendable/UriResolverWrapper.ts | 18 +- .../resolvers/extendable/index.ts | 2 +- .../extendable/types/CreateApiFunc.ts | 8 - .../extendable/types/CreateWrapperFunc.ts | 8 + .../resolvers/plugin/PluginResolver.ts | 12 +- packages/js/core/src/workflow/JobRunner.ts | 8 +- packages/js/os/package.json | 4 +- packages/js/plugins/ens/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 2 +- packages/js/plugins/ens/src/index.ts | 4 +- packages/js/plugins/ens/src/schema.graphql | 4 +- packages/js/plugins/ens/src/w3-man/schema.ts | 315 ----------- packages/js/plugins/ens/src/w3-man/types.ts | 523 ------------------ .../src/{polywrap-man => wrap-man}/index.ts | 0 .../{polywrap-man => wrap-man}/manifest.ts | 0 .../src/{polywrap-man => wrap-man}/module.ts | 0 .../src/{polywrap-man => wrap-man}/schema.ts | 26 +- .../src/{polywrap-man => wrap-man}/types.ts | 156 +++--- packages/js/plugins/ethereum/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../js/plugins/ethereum/src/Connection.ts | 2 +- .../ethereum/src/__tests__/e2e.spec.ts | 20 +- .../src/__tests__/integration/.gitignore | 2 +- .../src/__tests__/integration/package.json | 4 +- ...web3api.build.yaml => polywrap.build.yaml} | 0 .../{web3api.yaml => polywrap.yaml} | 2 +- .../src/__tests__/integration/src/index.ts | 2 +- .../__tests__/integration/src/schema.graphql | 2 +- packages/js/plugins/ethereum/src/index.ts | 2 +- .../ethereum/src/polywrap-man/schema.ts | 305 ---------- .../js/plugins/ethereum/src/utils/mapping.ts | 2 +- .../js/plugins/ethereum/src/w3-man/module.ts | 295 ---------- .../js/plugins/ethereum/src/w3-man/types.ts | 140 ----- .../w3-man => ethereum/src/wrap-man}/index.ts | 0 .../src/wrap-man}/manifest.ts | 0 .../src/{polywrap-man => wrap-man}/module.ts | 0 .../src/{w3-man => wrap-man}/schema.ts | 4 +- .../src/{polywrap-man => wrap-man}/types.ts | 0 packages/js/plugins/filesystem/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 2 +- .../filesystem/src/__tests__/e2e.spec.ts | 36 +- packages/js/plugins/filesystem/src/index.ts | 8 +- .../filesystem/src/polywrap-man/module.ts | 31 -- .../filesystem/src/polywrap-man/schema.ts | 88 --- .../filesystem/src/polywrap-man/types.ts | 83 --- .../js/plugins/filesystem/src/schema.graphql | 2 +- .../plugins/filesystem/src/w3-man/module.ts | 31 -- .../src/wrap-man}/index.ts | 0 .../src/wrap-man}/manifest.ts | 0 .../src/wrap-man}/module.ts | 0 .../src/{w3-man => wrap-man}/schema.ts | 8 +- .../src/{w3-man => wrap-man}/types.ts | 18 +- packages/js/plugins/graph-node/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../graph-node/src/__tests__/e2e.spec.ts | 2 +- packages/js/plugins/graph-node/src/index.ts | 2 +- .../graph-node/src/polywrap-man/types.ts | 115 ---- .../js/plugins/graph-node/src/schema.graphql | 2 +- .../plugins/graph-node/src/w3-man/module.ts | 23 - .../plugins/graph-node/src/w3-man/schema.ts | 130 ----- .../src/wrap-man}/index.ts | 0 .../src/wrap-man}/manifest.ts | 0 .../src/{polywrap-man => wrap-man}/module.ts | 0 .../src/{polywrap-man => wrap-man}/schema.ts | 16 +- .../src/{w3-man => wrap-man}/types.ts | 26 +- packages/js/plugins/http/README.md | 8 +- packages/js/plugins/http/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../http/src/__tests__/e2e/e2e.spec.ts | 44 +- .../src/__tests__/e2e/integration.spec.ts | 12 +- .../src/__tests__/e2e/integration/.gitignore | 2 +- .../__tests__/e2e/integration/package.json | 8 +- ...web3api.build.yaml => polywrap.build.yaml} | 0 .../{web3api.yaml => polywrap.yaml} | 2 +- .../__tests__/e2e/integration/schema.graphql | 2 +- .../__tests__/e2e/integration/src/index.ts | 2 +- .../http/src/__tests__/unit/index.test.ts | 2 +- .../http/src/__tests__/unit/util.test.ts | 2 +- packages/js/plugins/http/src/index.ts | 2 +- .../plugins/http/src/polywrap-man/manifest.ts | 13 - packages/js/plugins/http/src/util.ts | 2 +- .../js/plugins/http/src/w3-man/manifest.ts | 13 - packages/js/plugins/http/src/w3-man/module.ts | 32 -- packages/js/plugins/http/src/w3-man/schema.ts | 89 --- packages/js/plugins/http/src/w3-man/types.ts | 71 --- .../src/wrap-man}/index.ts | 0 .../src/wrap-man}/manifest.ts | 0 .../src/{polywrap-man => wrap-man}/module.ts | 0 .../src/{polywrap-man => wrap-man}/schema.ts | 4 +- .../src/{polywrap-man => wrap-man}/types.ts | 0 packages/js/plugins/ipfs/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 2 +- packages/js/plugins/ipfs/src/index.ts | 12 +- packages/js/plugins/ipfs/src/schema.graphql | 2 +- .../js/plugins/ipfs/src/w3-man/manifest.ts | 11 - packages/js/plugins/ipfs/src/w3-man/module.ts | 60 -- packages/js/plugins/ipfs/src/w3-man/schema.ts | 130 ----- packages/js/plugins/ipfs/src/w3-man/types.ts | 97 ---- .../src/w3-man => ipfs/src/wrap-man}/index.ts | 0 .../{polywrap-man => wrap-man}/manifest.ts | 0 .../src/{polywrap-man => wrap-man}/module.ts | 0 .../src/{polywrap-man => wrap-man}/schema.ts | 8 +- .../src/{polywrap-man => wrap-man}/types.ts | 18 +- packages/js/plugins/logger/README.md | 10 +- packages/js/plugins/logger/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 2 +- .../logger/src/__tests__/e2e/e2e.spec.ts | 6 +- packages/js/plugins/logger/src/index.ts | 2 +- .../logger/src/polywrap-man/manifest.ts | 13 - .../plugins/logger/src/polywrap-man/types.ts | 72 --- packages/js/plugins/logger/src/schema.graphql | 2 +- .../js/plugins/logger/src/w3-man/index.ts | 9 - .../js/plugins/logger/src/w3-man/manifest.ts | 13 - .../js/plugins/logger/src/w3-man/module.ts | 19 - .../js/plugins/logger/src/w3-man/schema.ts | 82 --- .../src/wrap-man}/index.ts | 0 .../src/wrap-man}/manifest.ts | 0 .../src/{polywrap-man => wrap-man}/module.ts | 0 .../src/{polywrap-man => wrap-man}/schema.ts | 8 +- .../logger/src/{w3-man => wrap-man}/types.ts | 12 +- packages/js/plugins/sha3/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../plugins/sha3/src/__tests__/index.test.ts | 24 +- packages/js/plugins/sha3/src/index.ts | 2 +- .../js/plugins/sha3/src/polywrap-man/index.ts | 9 - .../plugins/sha3/src/polywrap-man/manifest.ts | 13 - packages/js/plugins/sha3/src/w3-man/index.ts | 9 - .../js/plugins/sha3/src/w3-man/manifest.ts | 13 - packages/js/plugins/sha3/src/w3-man/module.ts | 122 ---- packages/js/plugins/sha3/src/w3-man/schema.ts | 100 ---- packages/js/plugins/sha3/src/w3-man/types.ts | 34 -- .../src/w3-man => sha3/src/wrap-man}/index.ts | 0 .../src/wrap-man}/manifest.ts | 0 .../src/{polywrap-man => wrap-man}/module.ts | 0 .../src/{polywrap-man => wrap-man}/schema.ts | 4 +- .../src/{polywrap-man => wrap-man}/types.ts | 0 packages/js/plugins/uts46/package.json | 6 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../plugins/uts46/src/__tests__/index.test.ts | 8 +- packages/js/plugins/uts46/src/index.ts | 2 +- .../plugins/uts46/src/polywrap-man/index.ts | 9 - .../uts46/src/polywrap-man/manifest.ts | 13 - packages/js/plugins/uts46/src/w3-man/index.ts | 9 - .../js/plugins/uts46/src/w3-man/manifest.ts | 13 - .../js/plugins/uts46/src/w3-man/module.ts | 39 -- .../js/plugins/uts46/src/w3-man/schema.ts | 67 --- packages/js/plugins/uts46/src/w3-man/types.ts | 43 -- .../src/wrap-man}/index.ts | 0 .../w3-man => uts46/src/wrap-man}/manifest.ts | 0 .../src/{polywrap-man => wrap-man}/module.ts | 0 .../src/{polywrap-man => wrap-man}/schema.ts | 4 +- .../src/{polywrap-man => wrap-man}/types.ts | 0 packages/js/react/package.json | 4 +- .../react/src/__tests__/app/SimpleStorage.tsx | 18 +- .../react/src/__tests__/integration.spec.tsx | 22 +- packages/js/react/src/__tests__/plugins.ts | 6 +- .../src/__tests__/usePolywrapClient.spec.tsx | 32 +- .../src/__tests__/usePolywrapInvoke.spec.tsx | 62 +-- .../src/__tests__/usePolywrapQuery.spec.tsx | 68 +-- packages/js/react/src/client.tsx | 8 +- packages/js/react/src/index.tsx | 8 +- packages/js/react/src/invoke.tsx | 32 +- packages/js/react/src/provider.tsx | 24 +- packages/js/react/src/query.tsx | 32 +- packages/js/test-env/package.json | 4 +- packages/js/test-env/src/index.ts | 50 +- ...web3api.build.json => polywrap.build.json} | 0 .../ens/{web3api.json => polywrap.json} | 2 +- .../test-env/src/wrappers/ens/schema.graphql | 32 +- packages/js/tracing/package.json | 4 +- .../0.0.1-prealpha.1.json | 2 +- .../0.0.1-prealpha.2.json | 2 +- .../0.0.1-prealpha.1.json | 0 .../0.0.1-prealpha.2.json | 0 .../0.0.1-prealpha.3.json | 0 .../0.0.1-prealpha.1.json | 2 +- .../0.0.1-prealpha.1.json | 0 .../0.0.1-prealpha.2.json | 0 .../0.0.1-prealpha.1.json | 0 .../0.0.1-prealpha.2.json | 0 .../0.0.1-prealpha.3.json | 0 .../0.0.1-prealpha.1.json | 0 .../0.0.1-prealpha.2.json | 0 .../0.0.1-prealpha.3.json | 0 .../0.0.1-prealpha.1.json | 2 +- .../0.0.1-prealpha.2.json | 2 +- .../0.0.1-prealpha.3.json | 2 +- .../0.0.1-prealpha.4.json | 2 +- .../0.0.1-prealpha.5.json | 2 +- .../0.0.1-prealpha.6.json | 2 +- .../0.0.1-prealpha.7.json | 2 +- .../0.0.1-prealpha.8.json | 2 +- .../0.0.1-prealpha.9.json | 2 +- packages/manifest-schemas/package.json | 4 +- packages/schema/bind/README.md | 6 +- packages/schema/bind/package.json | 4 +- .../bind/src/__tests__/test-cases.spec.ts | 2 +- .../rust/wasm-rs/templates/entry-rs.mustache | 2 +- .../templates/enum-type/mod-rs.mustache | 2 +- .../imported/enum-type/mod-rs.mustache | 2 +- .../imported/module-type/mod-rs.mustache | 2 +- .../module-type/serialization-rs.mustache | 2 +- .../imported/object-type/mod-rs.mustache | 2 +- .../object-type/serialization-rs.mustache | 2 +- .../templates/interface-type/mod-rs.mustache | 2 +- .../module-type/serialization-rs.mustache | 2 +- .../templates/object-type/mod-rs.mustache | 2 +- .../object-type/serialization-rs.mustache | 2 +- .../app-ts/templates/types-ts.mustache | 4 +- .../plugin-ts/templates/types-ts.mustache | 6 +- packages/schema/compose/package.json | 4 +- .../compose/src/__tests__/test-cases.spec.ts | 2 +- packages/schema/compose/src/parse.ts | 2 +- packages/schema/compose/src/resolve.ts | 4 +- packages/schema/parse/.eslintrc.js | 2 +- packages/schema/parse/package.json | 4 +- .../parse/src/__tests__/test-cases.spec.ts | 2 +- .../parse/src/__tests__/transforms.spec.ts | 2 +- .../src/__tests__/validate-directives.spec.ts | 2 +- .../src/__tests__/validate-types.spec.ts | 2 +- packages/schema/parse/src/header.ts | 4 +- .../app/typescript-node/package.json | 2 +- .../app/typescript-node/schema.graphql | 4 +- .../app/typescript-node/src/index.ts | 2 +- .../polywrap.app.yaml} | 0 .../app/typescript-react/schema.graphql | 2 +- .../app/typescript-react/src/App.tsx | 6 +- .../app/typescript-react/src/Header.tsx | 4 +- .../app/typescript-react/src/HelloWorld.tsx | 6 +- packages/templates/package.json | 4 +- .../templates/plugin/typescript/package.json | 2 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../templates/plugin/typescript/src/index.ts | 2 +- .../{api => wasm}/assemblyscript/.gitignore | 2 +- .../{api => wasm}/assemblyscript/.nvmrc | 0 .../{api => wasm}/assemblyscript/README.md | 4 +- .../assemblyscript/jest.config.js | 0 .../assemblyscript/meta/icon.png | Bin .../assemblyscript/meta/link.svg | 0 .../assemblyscript/meta/test.graphql | 0 .../assemblyscript/meta/test.json | 0 .../{api => wasm}/assemblyscript/package.json | 14 +- .../assemblyscript/polywrap.build.yaml} | 0 .../assemblyscript/polywrap.deploy.yaml} | 0 .../assemblyscript/polywrap.meta.yaml} | 0 .../assemblyscript/polywrap.yaml} | 6 +- .../assemblyscript/recipes/constants.json | 0 .../assemblyscript/recipes/e2e.json | 2 +- .../assemblyscript/recipes/get.graphql | 0 .../assemblyscript/recipes/set.graphql | 0 .../assemblyscript/scripts/build-contract.js | 0 .../assemblyscript/scripts/deploy-contract.js | 0 .../src/__tests__/e2e/integration.spec.ts | 16 +- .../src/__tests__/types/polywrap.app.yaml} | 0 .../src/__tests__/types/schema.graphql | 0 .../assemblyscript/src/__tests__/utils.ts | 6 +- .../src/contracts/SimpleStorage.json | 0 .../src/contracts/SimpleStorage.sol | 0 .../src/contracts/SimpleStorage.ts | 0 .../{api => wasm}/assemblyscript/src/index.ts | 2 +- .../assemblyscript/src/schema.graphql | 2 +- .../assemblyscript/tsconfig.build.json | 0 .../assemblyscript/tsconfig.json | 0 .../{api => wasm}/interface/.gitignore | 2 +- .../templates/{api => wasm}/interface/.nvmrc | 0 .../{api => wasm}/interface/README.md | 4 +- .../{api => wasm}/interface/meta/icon.png | Bin .../{api => wasm}/interface/meta/link.svg | 0 .../{api => wasm}/interface/meta/test.graphql | 0 .../{api => wasm}/interface/meta/test.json | 0 .../{api => wasm}/interface/package.json | 4 +- .../interface/polywrap.deploy.yaml} | 0 .../interface/polywrap.meta.yaml} | 0 .../interface/polywrap.yaml} | 4 +- .../{api => wasm}/interface/schema.graphql | 0 .../cases/bind/sanity/input/schema.graphql | 4 +- .../cases/bind/sanity/output/app-ts/schema.ts | 4 +- .../cases/bind/sanity/output/app-ts/types.ts | 6 +- .../bind/sanity/output/plugin-ts/schema.ts | 4 +- .../bind/sanity/output/plugin-ts/types.ts | 6 +- .../sanity/output/wasm-rs/another_type/mod.rs | 2 +- .../wasm-rs/another_type/serialization.rs | 2 +- .../sanity/output/wasm-rs/custom_enum/mod.rs | 2 +- .../sanity/output/wasm-rs/custom_type/mod.rs | 2 +- .../wasm-rs/custom_type/serialization.rs | 2 +- .../cases/bind/sanity/output/wasm-rs/entry.rs | 2 +- .../test_import_another_object/mod.rs | 2 +- .../serialization.rs | 2 +- .../wasm-rs/imported/test_import_enum/mod.rs | 2 +- .../imported/test_import_module/mod.rs | 2 +- .../test_import_module/serialization.rs | 2 +- .../imported/test_import_object/mod.rs | 2 +- .../test_import_object/serialization.rs | 2 +- .../output/wasm-rs/module/serialization.rs | 2 +- .../sanity/output/wasm-rs/test_import/mod.rs | 2 +- .../007-linked-packages/expected/output.json | 8 - .../007-linked-packages/src/index.ts | 5 - .../api/build-cmd/008-metadata/src/index.ts | 5 - .../build-cmd/009-docker-buildx/src/index.ts | 5 - .../cli/api/codegen/001-sanity/src/index.ts | 5 - .../002-invalid-codegen-script/cmd.json | 3 - .../002-invalid-codegen-script/src/index.ts | 5 - .../api/codegen/003-codegen-script/cmd.json | 3 - .../codegen/003-codegen-script/src/index.ts | 5 - .../005-non-loaded-env-var/src/index.ts | 5 - .../query/web3api-deploy-invalid-config.yaml | 7 - .../cli/api/query/web3api-deploy-no-ext.yaml | 7 - .../cases/cli/api/query/web3api.yaml | 7 - .../app/codegen/001-sanity/polywrap.app.yaml} | 0 .../cli/app/codegen/001-sanity/schema.graphql | 2 +- .../app/codegen/001-sanity/web3api.app.yaml | 3 - .../{web3api.app.yaml => polywrap.app.yaml} | 0 .../{web3api.app.yaml => polywrap.app.yaml} | 2 +- .../codegen/003-multi-import/schema.graphql | 2 +- ...web3api.infra.yaml => polywrap.infra.yaml} | 0 ...web3api.infra.yaml => polywrap.infra.yaml} | 0 ...web3api.infra.yaml => polywrap.infra.yaml} | 0 ...a.wrong.yaml => polywrap.infra.wrong.yaml} | 0 ...web3api.infra.yaml => polywrap.infra.yaml} | 0 ...b3api.plugin.json => polywrap.plugin.json} | 0 .../expected/build-artifacts/schema.graphql | 26 +- .../001-sanity/expected/src/polywrap/index.ts | 9 - .../001-sanity/expected/src/wrap}/index.ts | 0 .../src/{polywrap => wrap}/manifest.ts | 2 +- .../expected/src/{polywrap => wrap}/module.ts | 2 +- .../expected/src/{polywrap => wrap}/schema.ts | 26 +- .../expected/src/wrap}/types.ts | 188 +++---- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../plugin/codegen/001-sanity/schema.graphql | 2 +- .../plugin/codegen/001-sanity/src/index.ts | 2 +- ...b3api.plugin.json => polywrap.plugin.json} | 0 .../expected/build-artifacts/schema.graphql | 26 +- .../expected/src/polywrap/index.ts | 9 - .../expected/src/wrap}/index.ts | 0 .../src/{polywrap => wrap}/manifest.ts | 2 +- .../expected/src/{polywrap => wrap}/module.ts | 2 +- .../expected/src/{polywrap => wrap}/schema.ts | 26 +- .../expected/src/wrap}/types.ts | 188 +++---- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../codegen/002-single-module/schema.graphql | 2 +- .../codegen/002-single-module/src/index.ts | 2 +- ...b3api.plugin.json => polywrap.plugin.json} | 0 .../expected/build-artifacts/schema.graphql | 4 +- .../003-env/expected/src/polywrap/index.ts | 9 - .../003-env/expected/src/wrap}/index.ts | 0 .../src/{polywrap => wrap}/manifest.ts | 2 +- .../expected/src/{polywrap => wrap}/module.ts | 2 +- .../expected/src/{polywrap => wrap}/schema.ts | 4 +- .../expected/src/{polywrap => wrap}/types.ts | 4 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../cli/plugin/codegen/003-env/src/index.ts | 2 +- ...b3api.plugin.json => polywrap.plugin.json} | 0 .../expected/build-artifacts/schema.graphql | 4 +- .../expected/src/polywrap /index.ts | 9 - .../expected/src/wrap}/index.ts | 0 .../src/{polywrap => wrap}/manifest.ts | 2 +- .../src/{polywrap => wrap}/module.ts | 2 +- .../src/{polywrap => wrap}/schema.ts | 4 +- .../expected/src/{polywrap => wrap}/types.ts | 4 +- ...b3api.plugin.yaml => polywrap.plugin.yaml} | 0 .../codegen/004-env-sanitization/src/index.ts | 2 +- .../cli/{api => wasm}/build-cmd/.gitignore | 0 .../build-cmd/001-sanity/expected/output.json | 4 +- .../build-cmd/001-sanity/package.json | 0 .../build-cmd/001-sanity/polywrap.build.yaml} | 0 .../build-cmd/001-sanity/polywrap.yaml} | 2 +- .../build-cmd/001-sanity}/src/index.ts | 2 +- .../build-cmd/001-sanity/src/schema.graphql | 0 .../expected/output.json | 0 .../002-invalid-manifest-1/polywrap.yaml} | 0 .../expected/output.json | 0 .../003-invalid-manifest-2/polywrap.yaml} | 0 .../004-default-build/expected/output.json | 4 +- .../build-cmd/004-default-build/package.json | 0 .../004-default-build/polywrap.build.yaml} | 0 .../004-default-build/polywrap.yaml} | 2 +- .../build-cmd/004-default-build}/src/index.ts | 2 +- .../004-default-build/src/schema.graphql | 0 .../expected/output.json | 4 +- .../005-default-dockerfile/package.json | 0 .../polywrap.build.yaml} | 0 .../005-default-dockerfile/polywrap.yaml} | 2 +- .../005-default-dockerfile/src/index.ts | 2 +- .../005-default-dockerfile/src/schema.graphql | 0 .../006-custom-dockerfile/Dockerfile | 12 +- .../expected/output.json | 4 +- .../006-custom-dockerfile/package.json | 0 .../polywrap.build.yaml} | 0 .../006-custom-dockerfile/polywrap.yaml} | 2 +- .../006-custom-dockerfile}/src/index.ts | 2 +- .../006-custom-dockerfile/src/schema.graphql | 0 .../007-linked-packages/expected/output.json | 8 + .../007-linked-packages/package.json | 0 .../007-linked-packages/polywrap.build.yaml} | 0 .../007-linked-packages/polywrap.yaml} | 2 +- .../007-linked-packages/src/index.ts | 5 + .../007-linked-packages/src/schema.graphql | 0 .../008-metadata/expected/output.json | 6 +- .../build-cmd/008-metadata/meta/icon.png | 0 .../build-cmd/008-metadata/meta/link.svg | 0 .../build-cmd/008-metadata/meta/test.graphql | 0 .../build-cmd/008-metadata/meta/test.json | 0 .../build-cmd/008-metadata/package.json | 0 .../008-metadata/polywrap.build.yaml} | 0 .../008-metadata/polywrap.meta.yaml} | 0 .../build-cmd/008-metadata/polywrap.yaml} | 4 +- .../wasm/build-cmd/008-metadata/src/index.ts | 5 + .../build-cmd/008-metadata/src/schema.graphql | 0 .../009-docker-buildx/expected/output.json | 8 +- .../build-cmd/009-docker-buildx/package.json | 0 .../009-docker-buildx/polywrap.build.yaml} | 0 .../009-docker-buildx/polywrap.yaml} | 2 +- .../build-cmd/009-docker-buildx/src/index.ts | 5 + .../009-docker-buildx/src/schema.graphql | 0 .../codegen/001-sanity/expected/output.json | 0 .../codegen/001-sanity/package.json | 0 .../codegen/001-sanity/polywrap-norun.gen.js} | 0 .../codegen/001-sanity/polywrap.build.yaml} | 0 .../codegen/001-sanity/schema.graphql | 0 .../cli/wasm/codegen/001-sanity/src/index.ts | 5 + .../002-invalid-codegen-script/cmd.json | 3 + .../expected/output.json | 0 .../002-invalid-codegen-script/package.json | 0 .../polywrap-norun.gen.js} | 0 .../polywrap.build.yaml} | 0 .../002-invalid-codegen-script/schema.graphql | 0 .../002-invalid-codegen-script/src/index.ts | 5 + .../templates/schema.mustache | 0 .../wasm/codegen/003-codegen-script/cmd.json | 3 + .../003-codegen-script/expected/output.json | 0 .../codegen/003-codegen-script/package.json | 0 .../003-codegen-script/polywrap.build.yaml} | 0 .../003-codegen-script/polywrap.gen.ts} | 0 .../codegen/003-codegen-script/schema.graphql | 0 .../codegen/003-codegen-script/src/index.ts | 5 + .../templates/schema.mustache | 0 .../deploy/001-sanity/package.json | 0 .../deploy/001-sanity/polywrap.build.yaml} | 0 .../deploy/001-sanity/polywrap.deploy.yaml} | 0 .../deploy/001-sanity/polywrap.yaml} | 4 +- .../deploy/001-sanity/schema.graphql | 0 .../deploy/001-sanity/src/index.ts | 2 +- .../deploy/002-no-ext/package.json | 0 .../deploy/002-no-ext/polywrap.build.yaml} | 0 .../deploy/002-no-ext/polywrap.deploy.yaml} | 0 .../deploy/002-no-ext/polywrap.yaml} | 4 +- .../deploy/002-no-ext/schema.graphql | 0 .../deploy/002-no-ext/src/index.ts | 2 +- .../deploy/003-invalid-config/package.json | 0 .../003-invalid-config/polywrap.build.yaml} | 0 .../003-invalid-config/polywrap.deploy.yaml} | 0 .../deploy/003-invalid-config/polywrap.yaml} | 4 +- .../deploy/003-invalid-config/schema.graphql | 0 .../deploy/003-invalid-config/src/index.ts | 2 +- .../deploy/004-fail-between/package.json | 0 .../004-fail-between/polywrap.build.yaml} | 0 .../004-fail-between/polywrap.deploy.yaml} | 0 .../deploy/004-fail-between/polywrap.yaml} | 4 +- .../deploy/004-fail-between/schema.graphql | 0 .../deploy/004-fail-between/src/index.ts | 2 +- .../005-non-loaded-env-var/package.json | 0 .../polywrap.build.yaml} | 0 .../polywrap.deploy.yaml} | 0 .../005-non-loaded-env-var/polywrap.yaml} | 4 +- .../005-non-loaded-env-var/schema.graphql | 0 .../005-non-loaded-env-var/src/index.ts | 5 + .../cases/cli/{api => wasm}/query/.gitignore | 0 .../query/client-async-config.js | 0 .../query/client-async-config.ts | 4 +- .../cli/{api => wasm}/query/client-config.js | 0 .../cli/{api => wasm}/query/client-config.ts | 4 +- .../{api => wasm}/query/deploy-contracts.js | 0 .../cli/{api => wasm}/query/package.json | 0 .../wasm/query/polywrap.build.yaml} | 0 .../query/polywrap.deploy.fail-between.yaml} | 3 +- .../polywrap.deploy.invalid-config.yaml} | 4 +- .../query/polywrap.deploy.no-ext.yaml} | 3 +- .../query/polywrap.deploy.yaml} | 0 .../web3api.yaml => wasm/query/polywrap.yaml} | 3 +- .../query/recipes/constants.json | 0 .../query/recipes/constants.yaml | 0 .../cli/{api => wasm}/query/recipes/e2e.json | 2 +- .../cli/{api => wasm}/query/recipes/e2e.yaml | 2 +- .../{api => wasm}/query/recipes/get.graphql | 0 .../{api => wasm}/query/recipes/set.graphql | 0 .../cli/{api => wasm}/query/schema.graphql | 2 +- .../query/src/contracts/SimpleStorage.json | 0 .../query/src/contracts/SimpleStorage.sol | 0 .../cli/{api => wasm}/query/src/index.ts | 4 +- .../00-sanity/output/module.graphql | 4 +- .../01-nested-objects/output/module.graphql | 4 +- .../02-recursive/output/module.graphql | 4 +- .../03-wild-card/output/module.graphql | 4 +- .../imports-ext/external.eth/schema.graphql | 4 +- .../00-sanity/output/module.graphql | 4 +- .../imports-ext/external.eth/schema.graphql | 4 +- .../output/module.graphql | 4 +- .../imports-ext/external.eth/schema.graphql | 4 +- .../02-wild-card/output/module.graphql | 4 +- .../01-sanity/output/module.graphql | 4 +- .../00-sanity/output/module.graphql | 4 +- .../01-inherited/output/module.graphql | 4 +- .../output/module.graphql | 4 +- .../imports-ext/external.eth/schema.graphql | 4 +- .../03-external-import/output/module.graphql | 4 +- .../imports-ext/base.eth/schema.graphql | 4 +- .../imports-ext/derived.eth/schema.graphql | 4 +- .../output/module.graphql | 4 +- .../00-sanity/output/module.graphql | 4 +- .../01-inherited/output/module.graphql | 4 +- .../output/module.graphql | 4 +- .../imports-ext/external.eth/schema.graphql | 4 +- .../03-external-import/output/module.graphql | 4 +- .../imports-ext/base.eth/schema.graphql | 4 +- .../imports-ext/derived.eth/schema.graphql | 4 +- .../output/module.graphql | 4 +- .../00-sanity/output/module.graphql | 4 +- .../01-client-env/output/module.graphql | 4 +- .../just.module.eth/schema.graphql | 4 +- .../test-interface.eth/schema.graphql | 4 +- .../imports-ext/test.eth/schema.graphql | 4 +- .../compose/sanity/output/module.graphql | 4 +- .../wasm-as/asyncify/package.json | 0 .../wasm-as/asyncify/polywrap.build.yaml} | 0 .../wasm-as/asyncify/polywrap.yaml} | 2 +- .../wasm-as/asyncify/schema.graphql | 2 +- .../wasm-as/asyncify/src/index.ts | 2 +- .../wasm-as/bigint-type/package.json | 0 .../wasm-as/bigint-type/polywrap.build.yaml} | 0 .../wasm-as/bigint-type/polywrap.yaml} | 2 +- .../wasm-as/bigint-type/schema.graphql | 0 .../wasm-as/bigint-type/src/index.ts | 2 +- .../wasm-as/bignumber-type/package.json | 0 .../bignumber-type/polywrap.build.yaml} | 0 .../wasm-as/bignumber-type/polywrap.yaml} | 2 +- .../wasm-as/bignumber-type/schema.graphql | 0 .../wasm-as/bignumber-type/src/index.ts | 2 +- .../wasm-as/bytes-type/package.json | 0 .../wasm-as/bytes-type/polywrap.build.yaml} | 0 .../wasm-as/bytes-type/polywrap.yaml} | 2 +- .../wasm-as/bytes-type/schema.graphql | 0 .../wasm-as/bytes-type/src/index.ts | 2 +- .../wasm-as/enum-types/package.json | 0 .../wasm-as/enum-types/polywrap.build.yaml} | 0 .../wasm-as/enum-types/polywrap.yaml} | 2 +- .../wasm-as/enum-types/schema.graphql | 0 .../wasm-as/enum-types/src/index.ts | 2 +- .../wasm-as/env-client-types/package.json | 0 .../env-client-types/polywrap.build.yaml} | 0 .../wasm-as/env-client-types/polywrap.yaml} | 2 +- .../wasm-as/env-client-types/src/index.ts | 2 +- .../env-client-types/src/schema.graphql | 0 .../wasm-as/env-types/package.json | 0 .../wasm-as/env-types/polywrap.build.yaml} | 0 .../wasm-as/env-types/polywrap.yaml} | 2 +- .../wasm-as/env-types/src/index.ts | 2 +- .../wasm-as/env-types/src/schema.graphql | 0 .../test-interface/polywrap.yaml} | 0 .../test-interface/schema.graphql | 0 .../test-use-getImpl}/package.json | 0 .../test-use-getImpl/polywrap.build.yaml} | 0 .../test-use-getImpl/polywrap.yaml} | 2 +- .../test-use-getImpl/schema.graphql | 0 .../test-use-getImpl/src/index.ts | 2 +- .../test-wrapper}/package.json | 0 .../test-wrapper/polywrap.build.yaml} | 0 .../test-wrapper/polywrap.yaml} | 4 +- .../test-wrapper}/schema.graphql | 0 .../test-wrapper}/src/index.ts | 2 +- .../test-implementation}/package.json | 0 .../test-implementation/polywrap.build.yaml} | 0 .../test-implementation/polywrap.yaml} | 2 +- .../test-implementation/schema.graphql | 0 .../test-implementation}/src/index.ts | 2 +- .../test-interface/polywrap.yaml} | 0 .../test-interface/schema.graphql | 0 .../test-wrapper}/package.json | 0 .../test-wrapper/polywrap.build.yaml} | 0 .../test-wrapper/polywrap.yaml} | 4 +- .../test-wrapper}/schema.graphql | 0 .../test-wrapper}/src/index.ts | 2 +- .../wasm-as/invalid-types/package.json | 0 .../invalid-types/polywrap.build.yaml} | 0 .../wasm-as/invalid-types/polywrap.yaml} | 2 +- .../wasm-as/invalid-types/schema.graphql | 0 .../wasm-as/invalid-types/src/index.ts | 2 +- .../wasm-as/json-type/package.json | 0 .../wasm-as/json-type/polywrap.build.yaml} | 0 .../wasm-as/json-type/polywrap.yaml} | 2 +- .../wasm-as/json-type/schema.graphql | 0 .../wasm-as/json-type/src/index.ts | 2 +- .../wasm-as/large-types/package.json | 0 .../wasm-as/large-types/polywrap.build.yaml} | 0 .../wasm-as/large-types/polywrap.yaml} | 2 +- .../wasm-as/large-types/schema.graphql | 0 .../wasm-as/large-types/src/index.ts | 2 +- .../wasm-as/map-type/package.json | 0 .../wasm-as/map-type/polywrap.build.yaml} | 0 .../wasm-as/map-type/polywrap.yaml} | 2 +- .../wasm-as/map-type/schema.graphql | 0 .../wasm-as/map-type/src/index.ts | 2 +- .../wasm-as/number-types/package.json | 0 .../wasm-as/number-types/polywrap.build.yaml} | 0 .../wasm-as/number-types/polywrap.yaml} | 2 +- .../wasm-as/number-types/schema.graphql | 0 .../wasm-as/number-types/src/index.ts | 2 +- .../wasm-as/object-types/package.json | 0 .../wasm-as/object-types/polywrap.build.yaml} | 0 .../wasm-as/object-types/polywrap.yaml} | 2 +- .../wasm-as/object-types/schema.graphql | 0 .../wasm-as/object-types/src/index.ts | 2 +- .../wasm-as/reserved-words/package.json | 0 .../reserved-words/polywrap.build.yaml} | 0 .../wasm-as/reserved-words/polywrap.yaml} | 2 +- .../wasm-as/reserved-words/schema.graphql | 0 .../wasm-as/reserved-words/src/index.ts | 2 +- .../wasm-as/simple-env-types/package.json | 0 .../simple-env-types/polywrap.build.yaml} | 0 .../wasm-as/simple-env-types/polywrap.yaml} | 2 +- .../wasm-as/simple-env-types/src/index.ts | 2 +- .../simple-env-types/src/schema.graphql | 0 .../wasm-as/simple-storage/package.json | 0 .../simple-storage/polywrap.build.yaml} | 0 .../simple-storage/polywrap.meta.yaml} | 0 .../wasm-as/simple-storage/polywrap.yaml} | 4 +- .../wasm-as/simple-storage/schema.graphql | 2 +- .../wasm-as/simple-storage/src/index.ts | 4 +- .../wasm-rs/asyncify/Cargo.toml | 4 +- .../wasm-rs/asyncify/polywrap.build.yaml} | 2 +- .../wasm-rs/asyncify/polywrap.yaml} | 2 +- .../wasm-rs/asyncify/schema.graphql | 2 +- .../wasm-rs/asyncify/src/lib.rs | 10 +- .../wasm-rs/bigint-type/Cargo.toml | 2 +- .../wasm-rs/bigint-type/polywrap.build.yaml} | 2 +- .../wasm-rs/bigint-type/polywrap.yaml} | 2 +- .../wasm-rs/bigint-type/schema.graphql | 0 .../wasm-rs/bigint-type/src/lib.rs | 6 +- .../wasm-rs/bignumber-type/Cargo.toml | 2 +- .../bignumber-type/polywrap.build.yaml} | 2 +- .../wasm-rs/bignumber-type/polywrap.yaml} | 2 +- .../wasm-rs/bignumber-type/schema.graphql | 0 .../wasm-rs/bignumber-type/src/lib.rs | 6 +- .../wasm-rs/bytes-type/Cargo.toml | 2 +- .../wasm-rs/bytes-type/polywrap.build.yaml} | 2 +- .../wasm-rs/bytes-type/polywrap.yaml} | 2 +- .../wasm-rs/bytes-type/schema.graphql | 0 .../wasm-rs/bytes-type/src/lib.rs | 4 +- .../wasm-rs/enum-types/Cargo.toml | 2 +- .../wasm-rs/enum-types/polywrap.build.yaml} | 2 +- .../wasm-rs/enum-types/polywrap.yaml} | 2 +- .../wasm-rs/enum-types/schema.graphql | 0 .../wasm-rs/enum-types/src/lib.rs | 4 +- .../test-interface/polywrap.yaml} | 0 .../test-interface/schema.graphql | 0 .../test-use-getImpl/Cargo.toml | 2 +- .../test-use-getImpl/polywrap.build.yaml} | 2 +- .../test-use-getImpl/polywrap.yaml} | 2 +- .../test-use-getImpl/schema.graphql | 0 .../test-use-getImpl/src/lib.rs | 4 +- .../implementations/test-wrapper}/Cargo.toml | 4 +- .../test-wrapper/polywrap.build.yaml} | 4 +- .../test-wrapper/polywrap.yaml} | 4 +- .../test-wrapper}/schema.graphql | 0 .../implementations/test-wrapper}/src/lib.rs | 4 +- .../wasm-rs/invalid-types/Cargo.toml | 2 +- .../invalid-types/polywrap.build.yaml} | 2 +- .../wasm-rs/invalid-types/polywrap.yaml} | 2 +- .../wasm-rs/invalid-types/schema.graphql | 0 .../wasm-rs/invalid-types/src/lib.rs | 4 +- .../wasm-rs/json-type/Cargo.toml | 2 +- .../wasm-rs/json-type/polywrap.build.yaml} | 2 +- .../wasm-rs/json-type/polywrap.yaml} | 2 +- .../wasm-rs/json-type/schema.graphql | 0 .../wasm-rs/json-type/src/lib.rs | 6 +- .../wasm-rs/large-types/Cargo.toml | 2 +- .../wasm-rs/large-types/polywrap.build.yaml} | 2 +- .../wasm-rs/large-types/polywrap.yaml} | 2 +- .../wasm-rs/large-types/schema.graphql | 0 .../wasm-rs/large-types/src/lib.rs | 4 +- .../wasm-rs/map-type/Cargo.toml | 2 +- .../wasm-rs/map-type/polywrap.build.yaml} | 2 +- .../wasm-rs/map-type/polywrap.yaml} | 2 +- .../wasm-rs/map-type/schema.graphql | 0 .../wasm-rs/map-type/src/lib.rs | 6 +- .../wasm-rs/number-types/Cargo.toml | 2 +- .../wasm-rs/number-types/polywrap.build.yaml} | 2 +- .../wasm-rs/number-types/polywrap.yaml} | 2 +- .../wasm-rs/number-types/schema.graphql | 0 .../wasm-rs/number-types/src/lib.rs | 4 +- .../wasm-rs/object-types/Cargo.toml | 2 +- .../wasm-rs/object-types/polywrap.build.yaml} | 2 +- .../wasm-rs/object-types/polywrap.yaml} | 2 +- .../wasm-rs/object-types/schema.graphql | 0 .../wasm-rs/object-types/src/lib.rs | 4 +- .../wasm-rs/simple-storage/Cargo.toml | 4 +- .../simple-storage/polywrap.build.yaml} | 2 +- .../wasm-rs/simple-storage/polywrap.yaml} | 2 +- .../wasm-rs/simple-storage/schema.graphql | 2 +- .../wasm-rs/simple-storage/src/lib.rs | 8 +- packages/test-cases/index.ts | 2 +- packages/test-cases/package.json | 2 +- .../as/assembly/__tests__/msgpack.spec.ts | 4 +- .../as/assembly/implementation-subinvoke.ts | 4 +- packages/wasm/as/assembly/json/index.ts | 2 +- packages/wasm/as/assembly/subinvoke.ts | 4 +- packages/wasm/as/package.json | 6 +- packages/wasm/rs/Cargo.toml | 6 +- packages/wasm/rs/src/subinvoke.rs | 4 +- packages/wasm/rs/tests/context_spec.rs | 2 +- packages/wasm/rs/tests/msgpack_spec.rs | 2 +- packages/wasm/rs/tests/test_decode.rs | 2 +- packages/wasm/rs/tests/test_encode.rs | 2 +- tokenlog.json | 2 +- 912 files changed, 2662 insertions(+), 6016 deletions(-) rename packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/{web3api.build.ext.json => polywrap.build.ext.json} (100%) rename packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/{web3api.build.yaml => polywrap.build.yaml} (100%) rename packages/cli/src/lib/defaults/build-images/wasm/rust/{web3api.build.ext.json => polywrap.build.ext.json} (100%) rename packages/cli/src/lib/defaults/build-images/wasm/rust/{web3api.build.yaml => polywrap.build.yaml} (100%) rename packages/cli/src/lib/defaults/deploy-modules/ens/{web3api.deploy.ext.json => polywrap.deploy.ext.json} (100%) rename packages/cli/src/lib/defaults/deploy-modules/ipfs/{web3api.deploy.ext.json => polywrap.deploy.ext.json} (100%) rename packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/{web3api.deploy.ext.json => polywrap.deploy.ext.json} (100%) rename packages/cli/src/lib/manifest/{web3api => polywrap}/index.ts (100%) rename packages/cli/src/lib/manifest/{web3api => polywrap}/languages.ts (55%) rename packages/cli/src/lib/manifest/{web3api => polywrap}/load.ts (91%) rename packages/cli/src/lib/project/{WasmProject.ts => PolywrapProject.ts} (80%) rename packages/core-interfaces/logger/{web3api.yaml => polywrap.yaml} (100%) rename packages/core-interfaces/uri-resolver/{web3api.yaml => polywrap.yaml} (100%) create mode 100644 packages/js/core/src/__tests__/PolywrapManifest.spec.ts delete mode 100644 packages/js/core/src/__tests__/Web3ApiManifest.spec.ts rename packages/js/core/src/__tests__/manifest/{web3api/file-string-malformed/web3api.yaml => polywrap/file-string-malformed/polywrap.yaml} (100%) rename packages/js/core/src/__tests__/manifest/{web3api/incorrect-version-format/web3api.yaml => polywrap/incorrect-version-format/polywrap.yaml} (100%) rename packages/js/core/src/__tests__/manifest/{web3api => polywrap}/main.ts (100%) rename packages/js/core/src/__tests__/manifest/{web3api/not-accepted-field/web3api.yaml => polywrap/not-accepted-field/polywrap.yaml} (100%) rename packages/js/core/src/__tests__/manifest/{web3api/required-field-missing/web3api.yaml => polywrap/required-field-missing/polywrap.yaml} (100%) rename packages/js/core/src/__tests__/manifest/{web3api => polywrap}/schema.graphql (100%) rename packages/js/core/src/__tests__/manifest/{web3api/wrong-type/web3api.yaml => polywrap/wrong-type/polywrap.yaml} (100%) rename packages/js/core/src/manifest/formats/{web3api.app => polywrap.app}/0.0.1-prealpha.1.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.app => polywrap.app}/0.0.1-prealpha.2.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.app => polywrap.app}/deserialize.ts (93%) rename packages/js/core/src/manifest/formats/{web3api.app => polywrap.app}/index.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.app => polywrap.app}/migrate.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.app => polywrap.app}/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.app => polywrap.app}/validate.ts (92%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/0.0.1-prealpha.1.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/0.0.1-prealpha.2.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/deserialize.ts (93%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/index.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/migrate.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.build => polywrap.build}/validate.ts (94%) rename packages/js/core/src/manifest/formats/{web3api.deploy => polywrap.deploy}/0.0.1-prealpha.1.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.deploy => polywrap.deploy}/deserialize.ts (93%) rename packages/js/core/src/manifest/formats/{web3api.deploy => polywrap.deploy}/index.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.deploy => polywrap.deploy}/migrate.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.deploy => polywrap.deploy}/validate.ts (93%) rename packages/js/core/src/manifest/formats/{web3api.infra => polywrap.infra}/0.0.1-prealpha.1.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.infra => polywrap.infra}/0.0.1-prealpha.2.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.infra => polywrap.infra}/deserialize.ts (93%) rename packages/js/core/src/manifest/formats/{web3api.infra => polywrap.infra}/index.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.infra => polywrap.infra}/migrate.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.infra => polywrap.infra}/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.infra => polywrap.infra}/validate.ts (94%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/0.0.1-prealpha.1.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/0.0.1-prealpha.2.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/deserialize.ts (93%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/index.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/migrate.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.meta => polywrap.meta}/validate.ts (94%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/0.0.1-prealpha.1.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/0.0.1-prealpha.2.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/deserialize.ts (93%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/index.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/migrate.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts (100%) rename packages/js/core/src/manifest/formats/{web3api.plugin => polywrap.plugin}/validate.ts (93%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.1.ts (91%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.2.ts (90%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.3.ts (90%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.4.ts (90%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.5.ts (90%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.6.ts (90%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.7.ts (90%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.8.ts (90%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/0.0.1-prealpha.9.ts (88%) create mode 100644 packages/js/core/src/manifest/formats/polywrap/deserialize.ts create mode 100644 packages/js/core/src/manifest/formats/polywrap/index.ts rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrate.ts (74%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.9.ts (59%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.9.ts (59%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrators/0.0.1-prealpha.3_to_0.0.1-prealpha.9.ts (59%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrators/0.0.1-prealpha.4_to_0.0.1-prealpha.9.ts (59%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrators/0.0.1-prealpha.5_to_0.0.1-prealpha.9.ts (59%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrators/0.0.1-prealpha.6_to_0.0.1-prealpha.9.ts (59%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrators/0.0.1-prealpha.7_to_0.0.1-prealpha.9.ts (59%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/migrators/0.0.1-prealpha.8_to_0.0.1-prealpha.9.ts (59%) rename packages/js/core/src/manifest/formats/{web3api => polywrap}/validate.ts (71%) delete mode 100644 packages/js/core/src/manifest/formats/web3api/deserialize.ts delete mode 100644 packages/js/core/src/manifest/formats/web3api/index.ts rename packages/js/core/src/types/{Api.ts => Wrapper.ts} (68%) delete mode 100644 packages/js/core/src/uri-resolution/resolvers/extendable/types/CreateApiFunc.ts create mode 100644 packages/js/core/src/uri-resolution/resolvers/extendable/types/CreateWrapperFunc.ts rename packages/js/plugins/ens/{web3api.plugin.yaml => polywrap.plugin.yaml} (81%) delete mode 100644 packages/js/plugins/ens/src/w3-man/schema.ts delete mode 100644 packages/js/plugins/ens/src/w3-man/types.ts rename packages/js/plugins/ens/src/{polywrap-man => wrap-man}/index.ts (100%) rename packages/js/plugins/ens/src/{polywrap-man => wrap-man}/manifest.ts (100%) rename packages/js/plugins/ens/src/{polywrap-man => wrap-man}/module.ts (100%) rename packages/js/plugins/ens/src/{polywrap-man => wrap-man}/schema.ts (91%) rename packages/js/plugins/ens/src/{polywrap-man => wrap-man}/types.ts (75%) rename packages/js/plugins/ethereum/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) rename packages/js/plugins/ethereum/src/__tests__/integration/{web3api.build.yaml => polywrap.build.yaml} (100%) rename packages/js/plugins/ethereum/src/__tests__/integration/{web3api.yaml => polywrap.yaml} (82%) delete mode 100644 packages/js/plugins/ethereum/src/polywrap-man/schema.ts delete mode 100644 packages/js/plugins/ethereum/src/w3-man/module.ts delete mode 100644 packages/js/plugins/ethereum/src/w3-man/types.ts rename packages/js/plugins/{ens/src/w3-man => ethereum/src/wrap-man}/index.ts (100%) rename packages/js/plugins/{ens/src/w3-man => ethereum/src/wrap-man}/manifest.ts (100%) rename packages/js/plugins/ethereum/src/{polywrap-man => wrap-man}/module.ts (100%) rename packages/js/plugins/ethereum/src/{w3-man => wrap-man}/schema.ts (98%) rename packages/js/plugins/ethereum/src/{polywrap-man => wrap-man}/types.ts (100%) rename packages/js/plugins/filesystem/{web3api.plugin.yaml => polywrap.plugin.yaml} (81%) delete mode 100644 packages/js/plugins/filesystem/src/polywrap-man/module.ts delete mode 100644 packages/js/plugins/filesystem/src/polywrap-man/schema.ts delete mode 100644 packages/js/plugins/filesystem/src/polywrap-man/types.ts delete mode 100644 packages/js/plugins/filesystem/src/w3-man/module.ts rename packages/js/plugins/{ethereum/src/polywrap-man => filesystem/src/wrap-man}/index.ts (100%) rename packages/js/plugins/{ethereum/src/polywrap-man => filesystem/src/wrap-man}/manifest.ts (100%) rename packages/js/plugins/{ens/src/w3-man => filesystem/src/wrap-man}/module.ts (100%) rename packages/js/plugins/filesystem/src/{w3-man => wrap-man}/schema.ts (88%) rename packages/js/plugins/filesystem/src/{w3-man => wrap-man}/types.ts (77%) rename packages/js/plugins/graph-node/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) delete mode 100644 packages/js/plugins/graph-node/src/polywrap-man/types.ts delete mode 100644 packages/js/plugins/graph-node/src/w3-man/module.ts delete mode 100644 packages/js/plugins/graph-node/src/w3-man/schema.ts rename packages/js/plugins/{ethereum/src/w3-man => graph-node/src/wrap-man}/index.ts (100%) rename packages/js/plugins/{ethereum/src/w3-man => graph-node/src/wrap-man}/manifest.ts (100%) rename packages/js/plugins/graph-node/src/{polywrap-man => wrap-man}/module.ts (100%) rename packages/js/plugins/graph-node/src/{polywrap-man => wrap-man}/schema.ts (87%) rename packages/js/plugins/graph-node/src/{w3-man => wrap-man}/types.ts (80%) rename packages/js/plugins/http/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) rename packages/js/plugins/http/src/__tests__/e2e/integration/{web3api.build.yaml => polywrap.build.yaml} (100%) rename packages/js/plugins/http/src/__tests__/e2e/integration/{web3api.yaml => polywrap.yaml} (81%) delete mode 100644 packages/js/plugins/http/src/polywrap-man/manifest.ts delete mode 100644 packages/js/plugins/http/src/w3-man/manifest.ts delete mode 100644 packages/js/plugins/http/src/w3-man/module.ts delete mode 100644 packages/js/plugins/http/src/w3-man/schema.ts delete mode 100644 packages/js/plugins/http/src/w3-man/types.ts rename packages/js/plugins/{filesystem/src/polywrap-man => http/src/wrap-man}/index.ts (100%) rename packages/js/plugins/{filesystem/src/polywrap-man => http/src/wrap-man}/manifest.ts (100%) rename packages/js/plugins/http/src/{polywrap-man => wrap-man}/module.ts (100%) rename packages/js/plugins/http/src/{polywrap-man => wrap-man}/schema.ts (93%) rename packages/js/plugins/http/src/{polywrap-man => wrap-man}/types.ts (100%) rename packages/js/plugins/ipfs/{web3api.plugin.yaml => polywrap.plugin.yaml} (81%) delete mode 100644 packages/js/plugins/ipfs/src/w3-man/manifest.ts delete mode 100644 packages/js/plugins/ipfs/src/w3-man/module.ts delete mode 100644 packages/js/plugins/ipfs/src/w3-man/schema.ts delete mode 100644 packages/js/plugins/ipfs/src/w3-man/types.ts rename packages/js/plugins/{filesystem/src/w3-man => ipfs/src/wrap-man}/index.ts (100%) rename packages/js/plugins/ipfs/src/{polywrap-man => wrap-man}/manifest.ts (100%) rename packages/js/plugins/ipfs/src/{polywrap-man => wrap-man}/module.ts (100%) rename packages/js/plugins/ipfs/src/{polywrap-man => wrap-man}/schema.ts (92%) rename packages/js/plugins/ipfs/src/{polywrap-man => wrap-man}/types.ts (80%) rename packages/js/plugins/logger/{web3api.plugin.yaml => polywrap.plugin.yaml} (83%) delete mode 100644 packages/js/plugins/logger/src/polywrap-man/manifest.ts delete mode 100644 packages/js/plugins/logger/src/polywrap-man/types.ts delete mode 100644 packages/js/plugins/logger/src/w3-man/index.ts delete mode 100644 packages/js/plugins/logger/src/w3-man/manifest.ts delete mode 100644 packages/js/plugins/logger/src/w3-man/module.ts delete mode 100644 packages/js/plugins/logger/src/w3-man/schema.ts rename packages/js/plugins/{graph-node/src/polywrap-man => logger/src/wrap-man}/index.ts (100%) rename packages/js/plugins/{filesystem/src/w3-man => logger/src/wrap-man}/manifest.ts (100%) rename packages/js/plugins/logger/src/{polywrap-man => wrap-man}/module.ts (100%) rename packages/js/plugins/logger/src/{polywrap-man => wrap-man}/schema.ts (88%) rename packages/js/plugins/logger/src/{w3-man => wrap-man}/types.ts (83%) rename packages/js/plugins/sha3/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) delete mode 100644 packages/js/plugins/sha3/src/polywrap-man/index.ts delete mode 100644 packages/js/plugins/sha3/src/polywrap-man/manifest.ts delete mode 100644 packages/js/plugins/sha3/src/w3-man/index.ts delete mode 100644 packages/js/plugins/sha3/src/w3-man/manifest.ts delete mode 100644 packages/js/plugins/sha3/src/w3-man/module.ts delete mode 100644 packages/js/plugins/sha3/src/w3-man/schema.ts delete mode 100644 packages/js/plugins/sha3/src/w3-man/types.ts rename packages/js/plugins/{graph-node/src/w3-man => sha3/src/wrap-man}/index.ts (100%) rename packages/js/plugins/{graph-node/src/polywrap-man => sha3/src/wrap-man}/manifest.ts (100%) rename packages/js/plugins/sha3/src/{polywrap-man => wrap-man}/module.ts (100%) rename packages/js/plugins/sha3/src/{polywrap-man => wrap-man}/schema.ts (94%) rename packages/js/plugins/sha3/src/{polywrap-man => wrap-man}/types.ts (100%) rename packages/js/plugins/uts46/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) delete mode 100644 packages/js/plugins/uts46/src/polywrap-man/index.ts delete mode 100644 packages/js/plugins/uts46/src/polywrap-man/manifest.ts delete mode 100644 packages/js/plugins/uts46/src/w3-man/index.ts delete mode 100644 packages/js/plugins/uts46/src/w3-man/manifest.ts delete mode 100644 packages/js/plugins/uts46/src/w3-man/module.ts delete mode 100644 packages/js/plugins/uts46/src/w3-man/schema.ts delete mode 100644 packages/js/plugins/uts46/src/w3-man/types.ts rename packages/js/plugins/{http/src/polywrap-man => uts46/src/wrap-man}/index.ts (100%) rename packages/js/plugins/{graph-node/src/w3-man => uts46/src/wrap-man}/manifest.ts (100%) rename packages/js/plugins/uts46/src/{polywrap-man => wrap-man}/module.ts (100%) rename packages/js/plugins/uts46/src/{polywrap-man => wrap-man}/schema.ts (92%) rename packages/js/plugins/uts46/src/{polywrap-man => wrap-man}/types.ts (100%) rename packages/js/test-env/src/wrappers/ens/{web3api.build.json => polywrap.build.json} (100%) rename packages/js/test-env/src/wrappers/ens/{web3api.json => polywrap.json} (80%) rename packages/manifest-schemas/formats/{web3api.app => polywrap.app}/0.0.1-prealpha.1.json (95%) rename packages/manifest-schemas/formats/{web3api.app => polywrap.app}/0.0.1-prealpha.2.json (96%) rename packages/manifest-schemas/formats/{web3api.build => polywrap.build}/0.0.1-prealpha.1.json (100%) rename packages/manifest-schemas/formats/{web3api.build => polywrap.build}/0.0.1-prealpha.2.json (100%) rename packages/manifest-schemas/formats/{web3api.build => polywrap.build}/0.0.1-prealpha.3.json (100%) rename packages/manifest-schemas/formats/{web3api.deploy => polywrap.deploy}/0.0.1-prealpha.1.json (95%) rename packages/manifest-schemas/formats/{web3api.infra => polywrap.infra}/0.0.1-prealpha.1.json (100%) rename packages/manifest-schemas/formats/{web3api.infra => polywrap.infra}/0.0.1-prealpha.2.json (100%) rename packages/manifest-schemas/formats/{web3api.meta => polywrap.meta}/0.0.1-prealpha.1.json (100%) rename packages/manifest-schemas/formats/{web3api.meta => polywrap.meta}/0.0.1-prealpha.2.json (100%) rename packages/manifest-schemas/formats/{web3api.meta => polywrap.meta}/0.0.1-prealpha.3.json (100%) rename packages/manifest-schemas/formats/{web3api.plugin => polywrap.plugin}/0.0.1-prealpha.1.json (100%) rename packages/manifest-schemas/formats/{web3api.plugin => polywrap.plugin}/0.0.1-prealpha.2.json (100%) rename packages/manifest-schemas/formats/{web3api.plugin => polywrap.plugin}/0.0.1-prealpha.3.json (100%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.1.json (98%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.2.json (98%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.3.json (98%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.4.json (98%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.5.json (98%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.6.json (98%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.7.json (98%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.8.json (98%) rename packages/manifest-schemas/formats/{web3api => polywrap}/0.0.1-prealpha.9.json (97%) rename packages/templates/app/{typescript-node/web3api.app.yaml => typescript-react/polywrap.app.yaml} (100%) rename packages/templates/plugin/typescript/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) rename packages/templates/{api => wasm}/assemblyscript/.gitignore (76%) rename packages/templates/{api => wasm}/assemblyscript/.nvmrc (100%) rename packages/templates/{api => wasm}/assemblyscript/README.md (76%) rename packages/templates/{api => wasm}/assemblyscript/jest.config.js (100%) rename packages/templates/{api => wasm}/assemblyscript/meta/icon.png (100%) rename packages/templates/{api => wasm}/assemblyscript/meta/link.svg (100%) rename packages/templates/{api => wasm}/assemblyscript/meta/test.graphql (100%) rename packages/templates/{api => wasm}/assemblyscript/meta/test.json (100%) rename packages/templates/{api => wasm}/assemblyscript/package.json (75%) rename packages/templates/{api/assemblyscript/web3api.build.yaml => wasm/assemblyscript/polywrap.build.yaml} (100%) rename packages/templates/{api/assemblyscript/web3api.deploy.yaml => wasm/assemblyscript/polywrap.deploy.yaml} (100%) rename packages/templates/{api/assemblyscript/web3api.meta.yaml => wasm/assemblyscript/polywrap.meta.yaml} (100%) rename packages/templates/{api/assemblyscript/web3api.yaml => wasm/assemblyscript/polywrap.yaml} (59%) rename packages/templates/{api => wasm}/assemblyscript/recipes/constants.json (100%) rename packages/templates/{api => wasm}/assemblyscript/recipes/e2e.json (95%) rename packages/templates/{api => wasm}/assemblyscript/recipes/get.graphql (100%) rename packages/templates/{api => wasm}/assemblyscript/recipes/set.graphql (100%) rename packages/templates/{api => wasm}/assemblyscript/scripts/build-contract.js (100%) rename packages/templates/{api => wasm}/assemblyscript/scripts/deploy-contract.js (100%) rename packages/templates/{api => wasm}/assemblyscript/src/__tests__/e2e/integration.spec.ts (90%) rename packages/templates/{api/assemblyscript/src/__tests__/types/web3api.app.yaml => wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml} (100%) rename packages/templates/{api => wasm}/assemblyscript/src/__tests__/types/schema.graphql (100%) rename packages/templates/{api => wasm}/assemblyscript/src/__tests__/utils.ts (85%) rename packages/templates/{api => wasm}/assemblyscript/src/contracts/SimpleStorage.json (100%) rename packages/templates/{api => wasm}/assemblyscript/src/contracts/SimpleStorage.sol (100%) rename packages/templates/{api => wasm}/assemblyscript/src/contracts/SimpleStorage.ts (100%) rename packages/templates/{api => wasm}/assemblyscript/src/index.ts (97%) rename packages/templates/{api => wasm}/assemblyscript/src/schema.graphql (94%) rename packages/templates/{api => wasm}/assemblyscript/tsconfig.build.json (100%) rename packages/templates/{api => wasm}/assemblyscript/tsconfig.json (100%) rename packages/templates/{api => wasm}/interface/.gitignore (67%) rename packages/templates/{api => wasm}/interface/.nvmrc (100%) rename packages/templates/{api => wasm}/interface/README.md (71%) rename packages/templates/{api => wasm}/interface/meta/icon.png (100%) rename packages/templates/{api => wasm}/interface/meta/link.svg (100%) rename packages/templates/{api => wasm}/interface/meta/test.graphql (100%) rename packages/templates/{api => wasm}/interface/meta/test.json (100%) rename packages/templates/{api => wasm}/interface/package.json (82%) rename packages/templates/{api/interface/web3api.deploy.yaml => wasm/interface/polywrap.deploy.yaml} (100%) rename packages/templates/{api/interface/web3api.meta.yaml => wasm/interface/polywrap.meta.yaml} (100%) rename packages/templates/{api/interface/web3api.yaml => wasm/interface/polywrap.yaml} (58%) rename packages/templates/{api => wasm}/interface/schema.graphql (100%) delete mode 100644 packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/expected/output.json delete mode 100644 packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/index.ts delete mode 100644 packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/index.ts delete mode 100644 packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/index.ts delete mode 100644 packages/test-cases/cases/cli/api/codegen/001-sanity/src/index.ts delete mode 100644 packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/cmd.json delete mode 100644 packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/src/index.ts delete mode 100644 packages/test-cases/cases/cli/api/codegen/003-codegen-script/cmd.json delete mode 100644 packages/test-cases/cases/cli/api/codegen/003-codegen-script/src/index.ts delete mode 100644 packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/src/index.ts delete mode 100644 packages/test-cases/cases/cli/api/query/web3api-deploy-invalid-config.yaml delete mode 100644 packages/test-cases/cases/cli/api/query/web3api-deploy-no-ext.yaml delete mode 100644 packages/test-cases/cases/cli/api/query/web3api.yaml rename packages/{templates/app/typescript-react/web3api.app.yaml => test-cases/cases/cli/app/codegen/001-sanity/polywrap.app.yaml} (100%) delete mode 100644 packages/test-cases/cases/cli/app/codegen/001-sanity/web3api.app.yaml rename packages/test-cases/cases/cli/app/codegen/002-with-plugin/{web3api.app.yaml => polywrap.app.yaml} (100%) rename packages/test-cases/cases/cli/app/codegen/003-multi-import/{web3api.app.yaml => polywrap.app.yaml} (87%) rename packages/test-cases/cases/cli/infra/001-sanity/{web3api.infra.yaml => polywrap.infra.yaml} (100%) rename packages/test-cases/cases/cli/infra/002-duplicate-service-names/{web3api.infra.yaml => polywrap.infra.yaml} (100%) rename packages/test-cases/cases/cli/infra/003-precedence/{web3api.infra.yaml => polywrap.infra.yaml} (100%) rename packages/test-cases/cases/cli/infra/005-sanity-default-module/{web3api.infra.wrong.yaml => polywrap.infra.wrong.yaml} (100%) rename packages/test-cases/cases/cli/infra/005-sanity-default-module/{web3api.infra.yaml => polywrap.infra.yaml} (100%) rename packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/{web3api.plugin.json => polywrap.plugin.json} (100%) delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/index.ts rename packages/{js/plugins/http/src/w3-man => test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap}/index.ts (100%) rename packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/{polywrap => wrap}/manifest.ts (81%) rename packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/{polywrap => wrap}/module.ts (96%) rename packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/{polywrap => wrap}/schema.ts (93%) rename packages/test-cases/cases/cli/plugin/codegen/{002-single-module/expected/src/polywrap => 001-sanity/expected/src/wrap}/types.ts (77%) rename packages/test-cases/cases/cli/plugin/codegen/001-sanity/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) rename packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/{web3api.plugin.json => polywrap.plugin.json} (100%) delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/index.ts rename packages/{js/plugins/ipfs/src/polywrap-man => test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap}/index.ts (100%) rename packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/{polywrap => wrap}/manifest.ts (81%) rename packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/{polywrap => wrap}/module.ts (94%) rename packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/{polywrap => wrap}/schema.ts (92%) rename packages/test-cases/cases/cli/plugin/codegen/{001-sanity/expected/src/polywrap => 002-single-module/expected/src/wrap}/types.ts (77%) rename packages/test-cases/cases/cli/plugin/codegen/002-single-module/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) rename packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/{web3api.plugin.json => polywrap.plugin.json} (100%) delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/index.ts rename packages/{js/plugins/ipfs/src/w3-man => test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap}/index.ts (100%) rename packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/{polywrap => wrap}/manifest.ts (81%) rename packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/{polywrap => wrap}/module.ts (94%) rename packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/{polywrap => wrap}/schema.ts (90%) rename packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/{polywrap => wrap}/types.ts (95%) rename packages/test-cases/cases/cli/plugin/codegen/003-env/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) rename packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/{web3api.plugin.json => polywrap.plugin.json} (100%) delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /index.ts rename packages/{js/plugins/logger/src/polywrap-man => test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap}/index.ts (100%) rename packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/{polywrap => wrap}/manifest.ts (81%) rename packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/{polywrap => wrap}/module.ts (96%) rename packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/{polywrap => wrap}/schema.ts (90%) rename packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/{polywrap => wrap}/types.ts (95%) rename packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/{web3api.plugin.yaml => polywrap.plugin.yaml} (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/.gitignore (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/001-sanity/expected/output.json (59%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/001-sanity/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-api/web3api.build.yaml => cli/wasm/build-cmd/001-sanity/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/001-sanity/web3api.yaml => wasm/build-cmd/001-sanity/polywrap.yaml} (81%) rename packages/test-cases/cases/cli/{api/build-cmd/006-custom-dockerfile => wasm/build-cmd/001-sanity}/src/index.ts (64%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/001-sanity/src/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/002-invalid-manifest-1/expected/output.json (100%) rename packages/test-cases/cases/cli/{api/build-cmd/002-invalid-manifest-1/web3api.yaml => wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml} (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/003-invalid-manifest-2/expected/output.json (100%) rename packages/test-cases/cases/cli/{api/build-cmd/003-invalid-manifest-2/web3api.yaml => wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml} (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/004-default-build/expected/output.json (59%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/004-default-build/package.json (100%) rename packages/test-cases/cases/cli/{api/build-cmd/004-default-build/web3api.build.yaml => wasm/build-cmd/004-default-build/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/004-default-build/web3api.yaml => wasm/build-cmd/004-default-build/polywrap.yaml} (81%) rename packages/test-cases/cases/cli/{api/build-cmd/001-sanity => wasm/build-cmd/004-default-build}/src/index.ts (64%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/004-default-build/src/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/005-default-dockerfile/expected/output.json (59%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/005-default-dockerfile/package.json (100%) rename packages/test-cases/cases/cli/{api/build-cmd/005-default-dockerfile/web3api.build.yaml => wasm/build-cmd/005-default-dockerfile/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/005-default-dockerfile/web3api.yaml => wasm/build-cmd/005-default-dockerfile/polywrap.yaml} (81%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/005-default-dockerfile/src/index.ts (64%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/005-default-dockerfile/src/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/006-custom-dockerfile/Dockerfile (69%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/006-custom-dockerfile/expected/output.json (59%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/006-custom-dockerfile/package.json (100%) rename packages/test-cases/cases/cli/{api/build-cmd/006-custom-dockerfile/web3api.build.yaml => wasm/build-cmd/006-custom-dockerfile/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/006-custom-dockerfile/web3api.yaml => wasm/build-cmd/006-custom-dockerfile/polywrap.yaml} (81%) rename packages/test-cases/cases/cli/{api/build-cmd/004-default-build => wasm/build-cmd/006-custom-dockerfile}/src/index.ts (64%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/006-custom-dockerfile/src/schema.graphql (100%) create mode 100644 packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/expected/output.json rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/007-linked-packages/package.json (100%) rename packages/test-cases/cases/cli/{api/build-cmd/007-linked-packages/web3api.build.yaml => wasm/build-cmd/007-linked-packages/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/007-linked-packages/web3api.yaml => wasm/build-cmd/007-linked-packages/polywrap.yaml} (81%) create mode 100644 packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/src/index.ts rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/007-linked-packages/src/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/008-metadata/expected/output.json (69%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/008-metadata/meta/icon.png (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/008-metadata/meta/link.svg (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/008-metadata/meta/test.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/008-metadata/meta/test.json (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/008-metadata/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-api/web3api.build.yaml => cli/wasm/build-cmd/008-metadata/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/008-metadata/web3api.meta.yaml => wasm/build-cmd/008-metadata/polywrap.meta.yaml} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/008-metadata/web3api.yaml => wasm/build-cmd/008-metadata/polywrap.yaml} (69%) create mode 100644 packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/src/index.ts rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/008-metadata/src/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/009-docker-buildx/expected/output.json (53%) rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/009-docker-buildx/package.json (100%) rename packages/test-cases/cases/cli/{api/build-cmd/009-docker-buildx/web3api.build.yaml => wasm/build-cmd/009-docker-buildx/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/009-docker-buildx/web3api.yaml => wasm/build-cmd/009-docker-buildx/polywrap.yaml} (81%) create mode 100644 packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/src/index.ts rename packages/test-cases/cases/cli/{api => wasm}/build-cmd/009-docker-buildx/src/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/codegen/001-sanity/expected/output.json (100%) rename packages/test-cases/cases/cli/{api => wasm}/codegen/001-sanity/package.json (100%) rename packages/test-cases/cases/cli/{api/codegen/001-sanity/web3api-norun.gen.js => wasm/codegen/001-sanity/polywrap-norun.gen.js} (100%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-implementation/web3api.build.yaml => cli/wasm/codegen/001-sanity/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api => wasm}/codegen/001-sanity/schema.graphql (100%) create mode 100644 packages/test-cases/cases/cli/wasm/codegen/001-sanity/src/index.ts create mode 100644 packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/cmd.json rename packages/test-cases/cases/cli/{api => wasm}/codegen/002-invalid-codegen-script/expected/output.json (100%) rename packages/test-cases/cases/cli/{api => wasm}/codegen/002-invalid-codegen-script/package.json (100%) rename packages/test-cases/cases/cli/{api/codegen/002-invalid-codegen-script/web3api-norun.gen.js => wasm/codegen/002-invalid-codegen-script/polywrap-norun.gen.js} (100%) rename packages/test-cases/cases/cli/{api/build-cmd/001-sanity/web3api.build.yaml => wasm/codegen/002-invalid-codegen-script/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api => wasm}/codegen/002-invalid-codegen-script/schema.graphql (100%) create mode 100644 packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/src/index.ts rename packages/test-cases/cases/cli/{api => wasm}/codegen/002-invalid-codegen-script/templates/schema.mustache (100%) create mode 100644 packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/cmd.json rename packages/test-cases/cases/cli/{api => wasm}/codegen/003-codegen-script/expected/output.json (100%) rename packages/test-cases/cases/cli/{api => wasm}/codegen/003-codegen-script/package.json (100%) rename packages/test-cases/cases/cli/{api/build-cmd/008-metadata/web3api.build.yaml => wasm/codegen/003-codegen-script/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/codegen/003-codegen-script/web3api.gen.ts => wasm/codegen/003-codegen-script/polywrap.gen.ts} (100%) rename packages/test-cases/cases/cli/{api => wasm}/codegen/003-codegen-script/schema.graphql (100%) create mode 100644 packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/src/index.ts rename packages/test-cases/cases/cli/{api => wasm}/codegen/003-codegen-script/templates/schema.mustache (100%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/001-sanity/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/enum-types/web3api.build.yaml => cli/wasm/deploy/001-sanity/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/001-sanity/web3api.deploy.yaml => wasm/deploy/001-sanity/polywrap.deploy.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/001-sanity/web3api.yaml => wasm/deploy/001-sanity/polywrap.yaml} (67%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/001-sanity/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/001-sanity/src/index.ts (62%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/002-no-ext/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/invalid-types/web3api.build.yaml => cli/wasm/deploy/002-no-ext/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/002-no-ext/web3api.deploy.yaml => wasm/deploy/002-no-ext/polywrap.deploy.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/002-no-ext/web3api.yaml => wasm/deploy/002-no-ext/polywrap.yaml} (67%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/002-no-ext/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/002-no-ext/src/index.ts (62%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/003-invalid-config/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/json-type/web3api.build.yaml => cli/wasm/deploy/003-invalid-config/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/003-invalid-config/web3api.deploy.yaml => wasm/deploy/003-invalid-config/polywrap.deploy.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/003-invalid-config/web3api.yaml => wasm/deploy/003-invalid-config/polywrap.yaml} (68%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/003-invalid-config/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/003-invalid-config/src/index.ts (62%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/004-fail-between/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/large-types/web3api.build.yaml => cli/wasm/deploy/004-fail-between/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/004-fail-between/web3api.deploy.yaml => wasm/deploy/004-fail-between/polywrap.deploy.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/004-fail-between/web3api.yaml => wasm/deploy/004-fail-between/polywrap.yaml} (68%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/004-fail-between/schema.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/004-fail-between/src/index.ts (62%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/005-non-loaded-env-var/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/map-type/web3api.build.yaml => cli/wasm/deploy/005-non-loaded-env-var/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/005-non-loaded-env-var/web3api.deploy.yaml => wasm/deploy/005-non-loaded-env-var/polywrap.deploy.yaml} (100%) rename packages/test-cases/cases/cli/{api/deploy/005-non-loaded-env-var/web3api.yaml => wasm/deploy/005-non-loaded-env-var/polywrap.yaml} (67%) rename packages/test-cases/cases/cli/{api => wasm}/deploy/005-non-loaded-env-var/schema.graphql (100%) create mode 100644 packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/src/index.ts rename packages/test-cases/cases/cli/{api => wasm}/query/.gitignore (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/client-async-config.js (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/client-async-config.ts (84%) rename packages/test-cases/cases/cli/{api => wasm}/query/client-config.js (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/client-config.ts (87%) rename packages/test-cases/cases/cli/{api => wasm}/query/deploy-contracts.js (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/number-types/web3api.build.yaml => cli/wasm/query/polywrap.build.yaml} (100%) rename packages/test-cases/cases/cli/{api/codegen/003-codegen-script/web3api.yaml => wasm/query/polywrap.deploy.fail-between.yaml} (62%) rename packages/test-cases/cases/cli/{api/query/web3api-deploy-fail-between.yaml => wasm/query/polywrap.deploy.invalid-config.yaml} (61%) rename packages/test-cases/cases/cli/{api/codegen/002-invalid-codegen-script/web3api.yaml => wasm/query/polywrap.deploy.no-ext.yaml} (64%) rename packages/test-cases/cases/cli/{api/query/web3api.deploy.yaml => wasm/query/polywrap.deploy.yaml} (100%) rename packages/test-cases/cases/cli/{api/codegen/001-sanity/web3api.yaml => wasm/query/polywrap.yaml} (67%) rename packages/test-cases/cases/cli/{api => wasm}/query/recipes/constants.json (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/recipes/constants.yaml (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/recipes/e2e.json (80%) rename packages/test-cases/cases/cli/{api => wasm}/query/recipes/e2e.yaml (76%) rename packages/test-cases/cases/cli/{api => wasm}/query/recipes/get.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/recipes/set.graphql (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/schema.graphql (95%) rename packages/test-cases/cases/cli/{api => wasm}/query/src/contracts/SimpleStorage.json (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/src/contracts/SimpleStorage.sol (100%) rename packages/test-cases/cases/cli/{api => wasm}/query/src/index.ts (96%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/asyncify/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/asyncify/web3api.build.yaml => wrappers/wasm-as/asyncify/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/asyncify/web3api.yaml => wrappers/wasm-as/asyncify/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/asyncify/schema.graphql (98%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/asyncify/src/index.ts (99%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bigint-type/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/bigint-type/web3api.build.yaml => wrappers/wasm-as/bigint-type/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/bigint-type/web3api.yaml => wrappers/wasm-as/bigint-type/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bigint-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bigint-type/src/index.ts (94%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bignumber-type/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/bignumber-type/web3api.build.yaml => wrappers/wasm-as/bignumber-type/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/bignumber-type/web3api.yaml => wrappers/wasm-as/bignumber-type/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bignumber-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bignumber-type/src/index.ts (94%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bytes-type/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/bytes-type/web3api.build.yaml => wrappers/wasm-as/bytes-type/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/map-type/web3api.yaml => wrappers/wasm-as/bytes-type/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bytes-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/bytes-type/src/index.ts (92%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/enum-types/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/object-types/web3api.build.yaml => wrappers/wasm-as/enum-types/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/enum-types/web3api.yaml => wrappers/wasm-as/enum-types/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/enum-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/enum-types/src/index.ts (91%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/env-client-types/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/env-client-types/web3api.build.yaml => wrappers/wasm-as/env-client-types/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/env-client-types/web3api.yaml => wrappers/wasm-as/env-client-types/polywrap.yaml} (81%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/env-client-types/src/index.ts (93%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/env-client-types/src/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/env-types/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/env-types/web3api.build.yaml => wrappers/wasm-as/env-types/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/env-types/web3api.yaml => wrappers/wasm-as/env-types/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/env-types/src/index.ts (85%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/env-types/src/schema.graphql (100%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-interface/web3api.yaml => wrappers/wasm-as/implementations/test-interface/polywrap.yaml} (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/implementations/test-interface/schema.graphql (100%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-api => wrappers/wasm-as/implementations/test-use-getImpl}/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-use-getImpl/web3api.build.yaml => wrappers/wasm-as/implementations/test-use-getImpl/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-use-getImpl/web3api.yaml => wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml} (88%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/implementations/test-use-getImpl/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/implementations/test-use-getImpl/src/index.ts (89%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-use-getImpl => wrappers/wasm-as/implementations/test-wrapper}/package.json (100%) rename packages/test-cases/cases/{cli/api/codegen/001-sanity/web3api.build.yaml => wrappers/wasm-as/implementations/test-wrapper/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-api/web3api.yaml => wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml} (81%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-api => wrappers/wasm-as/implementations/test-wrapper}/schema.graphql (100%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-implementation => wrappers/wasm-as/implementations/test-wrapper}/src/index.ts (89%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-api => wrappers/wasm-as/interface-invoke/test-implementation}/package.json (100%) rename packages/test-cases/cases/{cli/api/codegen/002-invalid-codegen-script/web3api.build.yaml => wrappers/wasm-as/interface-invoke/test-implementation/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-implementation/web3api.yaml => wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml} (88%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/interface-invoke/test-implementation/schema.graphql (100%) rename packages/test-cases/cases/{apis/wasm-as/implementations/test-api => wrappers/wasm-as/interface-invoke/test-implementation}/src/index.ts (89%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-interface/web3api.yaml => wrappers/wasm-as/interface-invoke/test-interface/polywrap.yaml} (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/interface-invoke/test-interface/schema.graphql (100%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-implementation => wrappers/wasm-as/interface-invoke/test-wrapper}/package.json (100%) rename packages/test-cases/cases/{cli/api/codegen/003-codegen-script/web3api.build.yaml => wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-api/web3api.yaml => wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml} (81%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-api => wrappers/wasm-as/interface-invoke/test-wrapper}/schema.graphql (100%) rename packages/test-cases/cases/{apis/wasm-as/interface-invoke/test-api => wrappers/wasm-as/interface-invoke/test-wrapper}/src/index.ts (95%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/invalid-types/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/reserved-words/web3api.build.yaml => wrappers/wasm-as/invalid-types/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/invalid-types/web3api.yaml => wrappers/wasm-as/invalid-types/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/invalid-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/invalid-types/src/index.ts (96%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/json-type/package.json (100%) rename packages/test-cases/cases/{cli/api/deploy/001-sanity/web3api.build.yaml => wrappers/wasm-as/json-type/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/json-type/web3api.yaml => wrappers/wasm-as/json-type/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/json-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/json-type/src/index.ts (93%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/large-types/package.json (100%) rename packages/test-cases/cases/{cli/api/deploy/002-no-ext/web3api.build.yaml => wrappers/wasm-as/large-types/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/large-types/web3api.yaml => wrappers/wasm-as/large-types/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/large-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/large-types/src/index.ts (87%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/map-type/package.json (100%) rename packages/test-cases/cases/{cli/api/deploy/003-invalid-config/web3api.build.yaml => wrappers/wasm-as/map-type/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/bytes-type/web3api.yaml => wrappers/wasm-as/map-type/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/map-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/map-type/src/index.ts (92%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/number-types/package.json (100%) rename packages/test-cases/cases/{cli/api/deploy/004-fail-between/web3api.build.yaml => wrappers/wasm-as/number-types/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/number-types/web3api.yaml => wrappers/wasm-as/number-types/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/number-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/number-types/src/index.ts (98%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/object-types/package.json (100%) rename packages/test-cases/cases/{cli/api/deploy/005-non-loaded-env-var/web3api.build.yaml => wrappers/wasm-as/object-types/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/object-types/web3api.yaml => wrappers/wasm-as/object-types/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/object-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/object-types/src/index.ts (97%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/reserved-words/package.json (100%) rename packages/test-cases/cases/{cli/api/query/web3api.build.yaml => wrappers/wasm-as/reserved-words/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/reserved-words/web3api.yaml => wrappers/wasm-as/reserved-words/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/reserved-words/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/reserved-words/src/index.ts (88%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/simple-env-types/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/simple-env-types/web3api.build.yaml => wrappers/wasm-as/simple-env-types/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/simple-env-types/web3api.yaml => wrappers/wasm-as/simple-env-types/polywrap.yaml} (81%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/simple-env-types/src/index.ts (58%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/simple-env-types/src/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/simple-storage/package.json (100%) rename packages/test-cases/cases/{apis/wasm-as/simple-storage/web3api.build.yaml => wrappers/wasm-as/simple-storage/polywrap.build.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/simple-storage/web3api.meta.yaml => wrappers/wasm-as/simple-storage/polywrap.meta.yaml} (100%) rename packages/test-cases/cases/{apis/wasm-as/simple-storage/web3api.yaml => wrappers/wasm-as/simple-storage/polywrap.yaml} (68%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/simple-storage/schema.graphql (95%) rename packages/test-cases/cases/{apis => wrappers}/wasm-as/simple-storage/src/index.ts (97%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/asyncify/Cargo.toml (78%) rename packages/test-cases/cases/{apis/wasm-rs/asyncify/web3api.build.yaml => wrappers/wasm-rs/asyncify/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/asyncify/web3api.yaml => wrappers/wasm-rs/asyncify/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/asyncify/schema.graphql (98%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/asyncify/src/lib.rs (97%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bigint-type/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/bigint-type/web3api.build.yaml => wrappers/wasm-rs/bigint-type/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/bigint-type/web3api.yaml => wrappers/wasm-rs/bigint-type/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bigint-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bigint-type/src/lib.rs (82%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bignumber-type/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/bignumber-type/web3api.build.yaml => wrappers/wasm-rs/bignumber-type/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/bignumber-type/web3api.yaml => wrappers/wasm-rs/bignumber-type/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bignumber-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bignumber-type/src/lib.rs (81%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bytes-type/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/bytes-type/web3api.build.yaml => wrappers/wasm-rs/bytes-type/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/bytes-type/web3api.yaml => wrappers/wasm-rs/bytes-type/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bytes-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/bytes-type/src/lib.rs (86%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/enum-types/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/enum-types/web3api.build.yaml => wrappers/wasm-rs/enum-types/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/enum-types/web3api.yaml => wrappers/wasm-rs/enum-types/polywrap.yaml} (77%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/enum-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/enum-types/src/lib.rs (79%) rename packages/test-cases/cases/{apis/wasm-rs/implementations/test-interface/web3api.yaml => wrappers/wasm-rs/implementations/test-interface/polywrap.yaml} (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/implementations/test-interface/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/implementations/test-use-getImpl/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/implementations/test-use-getImpl/web3api.build.yaml => wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.build.yaml} (81%) rename packages/test-cases/cases/{apis/wasm-rs/implementations/test-use-getImpl/web3api.yaml => wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml} (88%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/implementations/test-use-getImpl/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/implementations/test-use-getImpl/src/lib.rs (87%) rename packages/test-cases/cases/{apis/wasm-rs/implementations/test-api => wrappers/wasm-rs/implementations/test-wrapper}/Cargo.toml (76%) rename packages/test-cases/cases/{apis/wasm-rs/implementations/test-api/web3api.build.yaml => wrappers/wasm-rs/implementations/test-wrapper/polywrap.build.yaml} (60%) rename packages/test-cases/cases/{apis/wasm-rs/implementations/test-api/web3api.yaml => wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/implementations/test-api => wrappers/wasm-rs/implementations/test-wrapper}/schema.graphql (100%) rename packages/test-cases/cases/{apis/wasm-rs/implementations/test-api => wrappers/wasm-rs/implementations/test-wrapper}/src/lib.rs (82%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/invalid-types/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/invalid-types/web3api.build.yaml => wrappers/wasm-rs/invalid-types/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/invalid-types/web3api.yaml => wrappers/wasm-rs/invalid-types/polywrap.yaml} (79%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/invalid-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/invalid-types/src/lib.rs (90%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/json-type/Cargo.toml (89%) rename packages/test-cases/cases/{apis/wasm-rs/json-type/web3api.build.yaml => wrappers/wasm-rs/json-type/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/json-type/web3api.yaml => wrappers/wasm-rs/json-type/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/json-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/json-type/src/lib.rs (77%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/large-types/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/large-types/web3api.build.yaml => wrappers/wasm-rs/large-types/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/large-types/web3api.yaml => wrappers/wasm-rs/large-types/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/large-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/large-types/src/lib.rs (68%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/map-type/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/map-type/web3api.build.yaml => wrappers/wasm-rs/map-type/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/map-type/web3api.yaml => wrappers/wasm-rs/map-type/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/map-type/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/map-type/src/lib.rs (71%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/number-types/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/number-types/web3api.build.yaml => wrappers/wasm-rs/number-types/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/number-types/web3api.yaml => wrappers/wasm-rs/number-types/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/number-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/number-types/src/lib.rs (92%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/object-types/Cargo.toml (88%) rename packages/test-cases/cases/{apis/wasm-rs/object-types/web3api.build.yaml => wrappers/wasm-rs/object-types/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/object-types/web3api.yaml => wrappers/wasm-rs/object-types/polywrap.yaml} (78%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/object-types/schema.graphql (100%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/object-types/src/lib.rs (97%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/simple-storage/Cargo.toml (77%) rename packages/test-cases/cases/{apis/wasm-rs/simple-storage/web3api.build.yaml => wrappers/wasm-rs/simple-storage/polywrap.build.yaml} (80%) rename packages/test-cases/cases/{apis/wasm-rs/simple-storage/web3api.yaml => wrappers/wasm-rs/simple-storage/polywrap.yaml} (79%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/simple-storage/schema.graphql (95%) rename packages/test-cases/cases/{apis => wrappers}/wasm-rs/simple-storage/src/lib.rs (96%) diff --git a/.eslintrc.js b/.eslintrc.js index dee198d5b9..054aebb416 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { root: true, ignorePatterns: [ - "**/polywrap/**/*.*", + "**/wrap/**/*.*", "**/infra-modules/**/*.*", "**/build/**/*.*", "**/__tests__/**/*.*", diff --git a/.github/workflows/release-pr.yaml b/.github/workflows/release-pr.yaml index a915e1f48c..7fb80a399c 100644 --- a/.github/workflows/release-pr.yaml +++ b/.github/workflows/release-pr.yaml @@ -8,7 +8,7 @@ jobs: if: | github.event.issue.pull_request && startsWith(github.event.comment.body, '/workflows/release-pr') && - github.event.comment.user.login != 'web3-api-build-bot' + github.event.comment.user.login != 'polywrap-build-bot' runs-on: ubuntu-18.04 steps: - name: Checkout @@ -31,7 +31,7 @@ jobs: if: ${{env.IS_PUBLISHER == 'false'}} uses: actions/github-script@0.8.0 with: - github-token: ${{secrets.WEB3_API_BUILD_BOT_PAT}} + github-token: ${{secrets.POLYWRAP_BUILD_BOT_PAT}} script: | github.issues.createComment({ issue_number: context.issue.number, @@ -62,7 +62,7 @@ jobs: if: ${{env.TAG_EXISTS == 'true'}} uses: actions/github-script@0.8.0 with: - github-token: ${{secrets.WEB3_API_BUILD_BOT_PAT}} + github-token: ${{secrets.POLYWRAP_BUILD_BOT_PAT}} script: | github.issues.createComment({ issue_number: context.issue.number, @@ -87,7 +87,7 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} - name: Set env.BOT to Build Bot's Username - run: echo BOT=web3-api-build-bot >> $GITHUB_ENV + run: echo BOT=polywrap-build-bot >> $GITHUB_ENV - name: Read VERSION into env.RELEASE_VERSION run: echo RELEASE_VERSION=$(cat VERSION) >> $GITHUB_ENV @@ -95,7 +95,7 @@ jobs: - name: Building Release PR... uses: actions/github-script@0.8.0 with: - github-token: ${{secrets.WEB3_API_BUILD_BOT_PAT}} + github-token: ${{secrets.POLYWRAP_BUILD_BOT_PAT}} script: | github.issues.createComment({ issue_number: context.issue.number, @@ -123,7 +123,7 @@ jobs: git config --global user.name '${{env.BOT}}' git config --global user.email '${{env.BOT}}@users.noreply.github.com' env: - GITHUB_TOKEN: ${{ secrets.WEB3_API_BUILD_BOT_PAT }} + GITHUB_TOKEN: ${{ secrets.POLYWRAP_BUILD_BOT_PAT }} - name: Apply Rust Version & Commit working-directory: ./packages/wasm/rs @@ -139,18 +139,18 @@ jobs: id: cpr uses: peter-evans/create-pull-request@v3 with: - token: ${{ secrets.WEB3_API_BUILD_BOT_PAT }} + token: ${{ secrets.POLYWRAP_BUILD_BOT_PAT }} push-to-fork: ${{env.BOT}}/${{github.event.repository.name}} branch: release/${{env.RELEASE_VERSION}} base: ${{ github.event.pull_request.head.ref }} committer: GitHub author: ${{env.BOT}} <${{env.BOT}}@users.noreply.github.com> commit-message: "${{env.RELEASE_VERSION}}" - title: 'Web3API ${{env.RELEASE_VERSION}}' + title: 'Polywrap ${{env.RELEASE_VERSION}}' body: | - ## Web3API ${{env.RELEASE_VERSION}} + ## Polywrap ${{env.RELEASE_VERSION}} - TODO: Add "Web3API-Release" Label + TODO: Add "Polywrap-Release" Label ### Breaking Changes @@ -167,7 +167,7 @@ jobs: - name: Release PR Created... uses: actions/github-script@0.8.0 with: - github-token: ${{secrets.WEB3_API_BUILD_BOT_PAT}} + github-token: ${{secrets.POLYWRAP_BUILD_BOT_PAT}} script: | github.issues.createComment({ issue_number: context.issue.number, diff --git a/.github/workflows/release-publish.yaml b/.github/workflows/release-publish.yaml index e0103adaea..cd12aa7fc8 100644 --- a/.github/workflows/release-publish.yaml +++ b/.github/workflows/release-publish.yaml @@ -8,7 +8,7 @@ jobs: Publish-GitHub-Release: name: GitHub Release if: | - github.event.pull_request.user.login == 'web3-api-build-bot' && + github.event.pull_request.user.login == 'polywrap-build-bot' && github.event.pull_request.merged == true runs-on: ubuntu-18.04 steps: @@ -82,7 +82,7 @@ jobs: Publish-NPM-Release: name: NPM Release if: | - github.event.pull_request.user.login == 'web3-api-build-bot' && + github.event.pull_request.user.login == 'polywrap-build-bot' && github.event.pull_request.merged == true runs-on: ubuntu-18.04 steps: @@ -106,7 +106,7 @@ jobs: if: ${{env.TAG_EXISTS}} == 'false' run: | npm config set registry https://registry.npmjs.org/ - npm config set //registry.npmjs.org/:_authToken=${{secrets.WEB3_API_BUILD_BOT_NPM_PAT}} + npm config set //registry.npmjs.org/:_authToken=${{secrets.POLYWRAP_BUILD_BOT_NPM_PAT}} echo $(npm whoami --registry https://registry.npmjs.org/) - name: Install JS dependencies @@ -121,7 +121,7 @@ jobs: if: ${{env.TAG_EXISTS}} == 'false' run: yarn publish:npm env: - NPM_AUTH_TOKEN: ${{secrets.WEB3_API_BUILD_BOT_NPM_PAT}} + NPM_AUTH_TOKEN: ${{secrets.POLYWRAP_BUILD_BOT_NPM_PAT}} - uses: actions/github-script@0.8.0 if: ${{env.TAG_EXISTS}} == 'false' @@ -132,13 +132,13 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: '**[NPM Release Published](https://www.npmjs.com/search?q=%40web3api) `${{env.RELEASE_VERSION}}`** 🎉' + body: '**[NPM Release Published](https://www.npmjs.com/search?q=%40polywrap) `${{env.RELEASE_VERSION}}`** 🎉' }) Publish-Crates-dot-io-Release: name: crates.io Release if: | - github.event.pull_request.user.login == 'web3-api-build-bot' && + github.event.pull_request.user.login == 'polywrap-build-bot' && github.event.pull_request.merged == true runs-on: ubuntu-18.04 steps: @@ -169,7 +169,7 @@ jobs: - name: Upload Rust Crates To Crates.io if: ${{env.TAG_EXISTS}} == 'false' working-directory: ./packages/wasm/rs - run: cargo publish --token ${{secrets.WEB3_API_BUILD_BOT_CRATES_PAT}} + run: cargo publish --token ${{secrets.POLYWRAP_BUILD_BOT_CRATES_PAT}} - uses: actions/github-script@0.8.0 if: ${{env.TAG_EXISTS}} == 'false' @@ -180,5 +180,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: '**[Crates.io Release Published](https://crates.io/search?q=web3api) `${{env.RELEASE_VERSION}}`** 🎉' + body: '**[Crates.io Release Published](https://crates.io/search?q=polywrap) `${{env.RELEASE_VERSION}}`** 🎉' }) diff --git a/.gitignore b/.gitignore index 14405b7139..a7f975fdd7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ yarn-error.log coverage .vscode *.log -polywrap +wrap .polywrap .DS_Store report.* diff --git a/package.json b/package.json index eed6c21db9..0cdafa3379 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,10 @@ "private": true, "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "workspaces": { "packages": [ - "./packages/apis/**", "./packages/cli", "./packages/core-interfaces/**", "./packages/js/**", diff --git a/packages/cli/README.md b/packages/cli/README.md index c39dafcad3..f0cfc9e7fd 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -1,4 +1,4 @@ -# Web3API CLI +# Polywrap CLI TODO: - introduce high level usages (create, build, test, publish) - type --help for full usage diff --git a/packages/cli/lang/en.json b/packages/cli/lang/en.json index b05ad0f2ad..708a48faee 100644 --- a/packages/cli/lang/en.json +++ b/packages/cli/lang/en.json @@ -1,19 +1,19 @@ { - "commands_build_description": "Builds a Web3API", + "commands_build_description": "Builds a Polywrap", "commands_build_error_manifestPathMissing": "{option} option missing {argument} argument", "commands_build_error_manifestNotFound": "Manifest not found. Search paths used: {paths}", "commands_build_error_outputDirMissingPath": "{option} option missing {argument} argument", "commands_build_keypressListener_exit": "Exit: [CTRL + C], [ESC], or [Q]", "commands_build_keypressListener_watching": "Watching", "commands_build_options_h": "Show usage information", - "commands_build_options_m": "Path to the Web3API Build manifest file (default: {default})", + "commands_build_options_m": "Path to the Polywrap Build manifest file (default: {default})", "commands_build_options_o": "Output directory for build results (default: build/)", "commands_build_options_o_path": "path", "commands_build_options_options": "options", "commands_build_options_t": "Use the development server's ENS instance", "commands_build_options_w": "Automatically rebuild when changes are made (default: false)", "commands_build_options_v": "Verbose output (default: false)", - "commands_infra_description": "Manage infrastructure for your Web3API", + "commands_infra_description": "Manage infrastructure for your Polywrap", "commands_infra_actions_subtitle": "Infra allows you to execute the following commands:", "commands_infra_options_options": "options", "commands_infra_options_manifest": "manifest", @@ -25,10 +25,10 @@ "commands_infra_moduleName": "module-name", "commands_infra_manifestPath": "manifest-path", "commands_infra_manifestPathDescription": "Infra Manifest path", - "commands_infra_command_up": "Start Web3API infrastructure", - "commands_infra_command_down": "Stop Web3API infrastructure", - "commands_infra_command_vars": "Show Web3API infrastructure's required .env variables", - "commands_infra_command_config": "Validate and display Web3API infrastructure's bundled docker-compose manifest", + "commands_infra_command_up": "Start Polywrap infrastructure", + "commands_infra_command_down": "Stop Polywrap infrastructure", + "commands_infra_command_vars": "Show Polywrap infrastructure's required .env variables", + "commands_infra_command_config": "Validate and display Polywrap infrastructure's bundled docker-compose manifest", "commands_infra_error_never": "This should never happen...", "commands_infra_error_noCommand": "No command given", "commands_infra_error_unrecognizedCommand": "Unrecognized command: {command}", @@ -52,12 +52,12 @@ "commands_infra_manifest_warning": "Warning aggregating manifest", "commands_infra_manifest_error": "Error aggregating manifest", "commands_build_uriViewers": "URI Viewers", - "commands_deploy_description": "Deploys/Publishes a Web3API", + "commands_deploy_description": "Deploys/Publishes a Polywrap", "commands_deploy_options_options": "options", "commands_deploy_options_o_path": "path", "commands_deploy_options_o_string": "string", "commands_deploy_options_h": "Show usage information", - "commands_deploy_options_m": "Path to the Web3API Deploy manifest file (default: {default})", + "commands_deploy_options_m": "Path to the Polywrap Deploy manifest file (default: {default})", "commands_deploy_options_n": "Name of the deployment to execute", "commands_deploy_options_c": "Argument for deployment's publish step, in case deploy step is absent", "commands_deploy_options_v": "Verbose output (default: false)", @@ -66,7 +66,7 @@ "commands_deploy_error_pathMissing": "{option} option missing {argument} argument", "commands_deploy_error_nameMissing": "{option} option missing {argument} argument", "commands_deploy_error_cidMissing": "{option} option missing {argument} argument", - "commands_codegen_description": "Auto-generate API Types", + "commands_codegen_description": "Auto-generate Wrapper Types", "commands_codegen_error_domain": "domain", "commands_codegen_error_optionMissingArgument": "{option} option missing {argument} argument", "commands_codegen_options_codegen": "Output directory for the generated code (default: {default})", @@ -76,7 +76,7 @@ "commands_codegen_options_s": "Path to a custom generation script (JavaScript | TypeScript)", "commands_codegen_options_i": "IPFS node to load external schemas (default: ipfs.io & localhost)", "commands_codegen_options_i_node": "node", - "commands_codegen_options_m": "Path to the Web3API manifest file (default: {default})", + "commands_codegen_options_m": "Path to the Polywrap manifest file (default: {default})", "commands_build_options_manifest": "manifest", "commands_codegen_options_o": "Output directory for custom generated types (default: 'types/')", "commands_codegen_options_o_path": "path", @@ -93,9 +93,9 @@ "commands_create_error_unrecognizedLanguage": "Unrecognized language", "commands_create_options_command": "command", "commands_create_options_commands": "Commands", - "commands_create_options_createApp": "Create a Web3API application", - "commands_create_options_createPlugin": "Create a Web3API plugin", - "commands_create_options_createProject": "Create a Web3API project", + "commands_create_options_createApp": "Create a Polywrap application", + "commands_create_options_createPlugin": "Create a Polywrap plugin", + "commands_create_options_createProject": "Create a Polywrap project", "commands_create_options_h": "Show usage information", "commands_create_options_lang": "lang", "commands_create_options_langs": "langs", @@ -105,15 +105,15 @@ "commands_query_options_recipeScript": "Path to recipe script", "commands_create_overwritePrompt": "Do you want to overwrite this directory?", "commands_create_overwriting": "Overwriting {dir}...", - "commands_create_readyApp": "You are ready to build an app using Web3API", - "commands_create_readyPlugin": "You are ready to build a plugin into a Web3API", - "commands_create_readyProtocol": "You are ready to turn your protocol into a Web3API", + "commands_create_readyApp": "You are ready to build an app using Polywrap", + "commands_create_readyPlugin": "You are ready to build a plugin into a Polywrap", + "commands_create_readyProtocol": "You are ready to turn your protocol into a Polywrap", "commands_create_settingUp": "Setting everything up...", "commands_app_description": "Build/generate types for your app", "commands_app_codegen": "Generate code for the app", "commands_app_options_command": "command", "commands_app_options_codegen": "Output directory for the generated code (default: {default})", - "commands_app_options_m": "Path to the Web3API App manifest file (default: {default})", + "commands_app_options_m": "Path to the Polywrap App manifest file (default: {default})", "commands_app_success": "Code was generated successfully", "commands_app_namespace_success": "Generated {content} for namespace {namespace}", "commands_app_topLevel_success": "Generated top-level code for app", @@ -136,7 +136,7 @@ "commands_plugin_options_i_node": "node", "commands_plugin_options_lang": "lang", "commands_plugin_options_langs": "langs", - "commands_plugin_options_m": "Path to the Web3API Plugin manifest file (default: {default})", + "commands_plugin_options_m": "Path to the Polywrap Plugin manifest file (default: {default})", "commands_plugin_options_path": "path", "commands_plugin_options_publish": "Output path for the built schema and manifest (default: {default})", "commands_plugin_options_codegen": "Output directory for the generated types (default: {default})", @@ -171,13 +171,13 @@ "commands_query_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri' and optional properties 'common', 'query', and 'mutation'", "commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string", "commands_query_error_envsItemModuleNotObject": "Env property 'module' at index {index} must be an object", - "commands_query_description": "Query Web3APIs using recipe scripts", + "commands_query_description": "Query Polywraps using recipe scripts", "commands_query_error_missingScript": "Required argument {script} is missing", - "commands_query_error_noApi": "API needs to be initialized", + "commands_query_error_noWrapper": "Wrapper needs to be initialized", "commands_query_error_readFail": "Failed to read query {query}", "commands_query_error_noRecipeScriptFound": "Recipe script not found at path: {path}", "commands_query_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'", - "commands_testEnv_description": "Manage a test environment for Web3API", + "commands_testEnv_description": "Manage a test environment for Polywrap", "commands_testEnv_error_never": "This should never happen...", "commands_testEnv_error_noCommand": "No command given", "commands_testEnv_error_unrecognizedCommand": "Unrecognized command: {command}", @@ -201,12 +201,12 @@ "lib_codeGenerator_nogenerateBindingMethod": "The generation file provided doesn't have the 'generateBinding' method.", "lib_codeGenerator_noComposedSchema": "The schema does not exist, please define one.", "lib_codeGenerator_typeInfoMissing": "The TypeInfo is missing from the composer output.", - "lib_compiler_compileError": "Failed to compile Web3API", - "lib_compiler_compileText": "Compile Web3API", - "lib_compiler_compileWarning": "Warnings while compiling Web3API", - "lib_compiler_codegenError": "Failed to generate Web3API schema bindings", - "lib_compiler_codegenText": "Codegen Web3API schema bindings", - "lib_compiler_codegenWarning": "Warnings while generating Web3API schema bindings", + "lib_compiler_compileError": "Failed to compile Polywrap", + "lib_compiler_compileText": "Compile Polywrap", + "lib_compiler_compileWarning": "Warnings while compiling Polywrap", + "lib_compiler_codegenError": "Failed to generate Polywrap schema bindings", + "lib_compiler_codegenText": "Codegen Polywrap schema bindings", + "lib_compiler_codegenWarning": "Warnings while generating Polywrap schema bindings", "lib_compiler_compileWasmModulesError": "Failed to compile Wasm modules", "lib_compiler_compileWasmModulesText": "Compile Wasm modules", "lib_compiler_compileWasmModulesWarning": "Warnings while compiling Wasm modules", @@ -216,10 +216,10 @@ "lib_compiler_missingModule": "Missing module definition", "lib_compiler_noInterfaceModule": "Interfaces cannot have implementation file", "lib_compiler_step": "Compiling WASM module", - "lib_compiler_noNodeModules": "could not locate {folder} in parent directories of web3api manifest", + "lib_compiler_noNodeModules": "could not locate {folder} in parent directories of polywrap manifest", "lib_compiler_noInvoke": "WASM module is missing the _wrap_invoke export. This should never happen...", "lib_compiler_invalid_module": "Invalid Wasm module found. {modulePath} is invalid. Error: {error}", - "lib_compiler_cannotBuildInterfaceModules": "Cannot build modules for an Interface Web3API", + "lib_compiler_cannotBuildInterfaceModules": "Cannot build modules for an Interface Polywrap", "lib_compiler_outputMetadataText": "Metadata written", "lib_compiler_outputMetadataError": "Failed to output metadata", "lib_compiler_outputMetadataWarning": "Warnings writing metadata", @@ -247,10 +247,10 @@ "lib_helpers_docker_projectBuildFolderMissing": "Build image `{image}` missing build artifact `{artifact}` in folder /project/build", "lib_helpers_parameters_unexpectedValue": "Unexpected value provided for one or more of {options}. See --help for more information.", "lib_language_unsupportedManifestLanguage": "The manifest's language {language} is not supported. Please use one of the supported lanauges: {supported}", - "lib_language_noInterfaceCodegen": "Code generation cannot be run for Web3API Interface projects", + "lib_language_noInterfaceCodegen": "Code generation cannot be run for Polywrap Interface projects", "lib_system_env_var_not_found": "Environment variable not found: `{variableName}`", "lib_publishers_ipfsPublisher_urlMalformed": "IPFS URL Malformed", - "lib_project_invalid_manifest_language": "Unrecognized manifest language `{language}`. Fix: Please modify your web3api.yaml file to include a valid language field. Supported Manifest Languages: {validTypes}", + "lib_project_invalid_manifest_language": "Unrecognized manifest language `{language}`. Fix: Please modify your polywrap.yaml file to include a valid language field. Supported Manifest Languages: {validTypes}", "lib_project_invalid_manifest_language_pathed": "Unsupported manifest language `{language}`.Debug: No default manifest found at {defaultPath}. Please make contact with the Polywrap CLI development community.", "lib_project_language_not_found": "Manifest language not found. Please include the `language` property in the manifest file.", "lib_project_app_uri_support": "The app command supports only filesystem URIs for plugins. Examples:", diff --git a/packages/cli/lang/es.json b/packages/cli/lang/es.json index d5a722f372..e4bda218ad 100644 --- a/packages/cli/lang/es.json +++ b/packages/cli/lang/es.json @@ -1,13 +1,13 @@ { - "commands_build_description": "Builds a Web3API", + "commands_build_description": "Builds a Polywrap", "commands_build_error_manifestPathMissing": "{option} option missing {argument} argument", "commands_build_error_manifestNotFound": "Manifest not found. Search paths used: {paths}", "commands_build_error_outputDirMissingPath": "{option} option missing {argument} argument", "commands_build_keypressListener_exit": "Exit: [CTRL + C], [ESC], or [Q]", "commands_build_keypressListener_watching": "Watching", "commands_build_options_h": "Show usage information", - "commands_build_options_m": "Path to the Web3API Build manifest file (default: {default})", + "commands_build_options_m": "Path to the Polywrap Build manifest file (default: {default})", "commands_build_options_o": "Output directory for build results (default: build/)", "commands_build_options_o_path": "path", "commands_build_options_options": "options", @@ -15,7 +15,7 @@ "commands_build_options_w": "Automatically rebuild when changes are made (default: false)", "commands_build_options_v": "Verbose output (default: false)", "commands_build_uriViewers": "URI Viewers", - "commands_infra_description": "Manage infrastructure for your Web3API", + "commands_infra_description": "Manage infrastructure for your Polywrap", "commands_infra_actions_subtitle": "Infra allows you to execute the following commands:", "commands_infra_options_options": "options", "commands_infra_options_manifest": "manifest", @@ -27,10 +27,10 @@ "commands_infra_moduleName": "module-name", "commands_infra_manifestPath": "manifest-path", "commands_infra_manifestPathDescription": "Infra Manifest path", - "commands_infra_command_up": "Start Web3API infrastructure", - "commands_infra_command_down": "Stop Web3API infrastructure", - "commands_infra_command_vars": "Show Web3API infrastructure's required .env variables", - "commands_infra_command_config": "Validate and display Web3API infrastructure's bundled docker-compose manifest", + "commands_infra_command_up": "Start Polywrap infrastructure", + "commands_infra_command_down": "Stop Polywrap infrastructure", + "commands_infra_command_vars": "Show Polywrap infrastructure's required .env variables", + "commands_infra_command_config": "Validate and display Polywrap infrastructure's bundled docker-compose manifest", "commands_infra_error_never": "This should never happen...", "commands_infra_error_noCommand": "No command given", "commands_infra_error_unrecognizedCommand": "Unrecognized command: {command}", @@ -53,12 +53,12 @@ "commands_infra_manifest_text": "Aggregating manifest", "commands_infra_manifest_warning": "Warning aggregating manifest", "commands_infra_manifest_error": "Error aggregating manifest", - "commands_deploy_description": "Deploys/Publishes a Web3API", + "commands_deploy_description": "Deploys/Publishes a Polywrap", "commands_deploy_options_options": "options", "commands_deploy_options_o_path": "path", "commands_deploy_options_o_string": "string", "commands_deploy_options_h": "Show usage information", - "commands_deploy_options_m": "Path to the Web3API Deploy manifest file (default: {default})", + "commands_deploy_options_m": "Path to the Polywrap Deploy manifest file (default: {default})", "commands_deploy_options_n": "Name of the deployment to execute", "commands_deploy_options_c": "Argument for deployment's publish step, in case deploy step is absent", "commands_deploy_options_v": "Verbose output (default: false)", @@ -67,7 +67,7 @@ "commands_deploy_error_pathMissing": "{option} option missing {argument} argument", "commands_deploy_error_nameMissing": "{option} option missing {argument} argument", "commands_deploy_error_cidMissing": "{option} option missing {argument} argument", - "commands_codegen_description": "Auto-generate API Types", + "commands_codegen_description": "Auto-generate Wrapper Types", "commands_codegen_error_domain": "domain", "commands_codegen_error_optionMissingArgument": "{option} option missing {argument} argument", "commands_codegen_options_codegen": "Output directory for the generated code (default: {default})", @@ -77,7 +77,7 @@ "commands_codegen_options_s": "Path to a custom generation script (JavaScript | TypeScript)", "commands_codegen_options_i": "IPFS node to load external schemas (default: ipfs.io & localhost)", "commands_codegen_options_i_node": "node", - "commands_codegen_options_m": "Path to the Web3API manifest file (default: {default})", + "commands_codegen_options_m": "Path to the Polywrap manifest file (default: {default})", "commands_build_options_manifest": "manifest", "commands_codegen_options_o": "Output directory for custom generated types (default: 'types/')", "commands_codegen_options_o_path": "path", @@ -94,9 +94,9 @@ "commands_create_error_unrecognizedLanguage": "Unrecognized language", "commands_create_options_command": "command", "commands_create_options_commands": "Commands", - "commands_create_options_createApp": "Create a Web3API application", - "commands_create_options_createPlugin": "Create a Web3API plugin", - "commands_create_options_createProject": "Create a Web3API project", + "commands_create_options_createApp": "Create a Polywrap application", + "commands_create_options_createPlugin": "Create a Polywrap plugin", + "commands_create_options_createProject": "Create a Polywrap project", "commands_create_options_h": "Show usage information", "commands_create_options_lang": "lang", "commands_create_options_langs": "langs", @@ -106,15 +106,15 @@ "commands_query_options_recipeScript": "Path to recipe script", "commands_create_overwritePrompt": "Do you want to overwrite this directory?", "commands_create_overwriting": "Overwriting {dir}...", - "commands_create_readyApp": "You are ready to build an app using Web3API", - "commands_create_readyPlugin": "You are ready to build a plugin into a Web3API", - "commands_create_readyProtocol": "You are ready to turn your protocol into a Web3API", + "commands_create_readyApp": "You are ready to build an app using Polywrap", + "commands_create_readyPlugin": "You are ready to build a plugin into a Polywrap", + "commands_create_readyProtocol": "You are ready to turn your protocol into a Polywrap", "commands_create_settingUp": "Setting everything up...", "commands_app_description": "Build/generate types for your app", "commands_app_codegen": "Generate code for the app", "commands_app_options_command": "command", "commands_app_options_codegen": "Output directory for the generated code (default: {default})", - "commands_app_options_m": "Path to the Web3API App manifest file (default: {default})", + "commands_app_options_m": "Path to the Polywrap App manifest file (default: {default})", "commands_app_success": "Code was generated successfully", "commands_app_namespace_success": "Generated {content} for namespace {namespace}", "commands_app_topLevel_success": "Generated top-level code for app", @@ -137,7 +137,7 @@ "commands_plugin_options_i_node": "node", "commands_plugin_options_lang": "lang", "commands_plugin_options_langs": "langs", - "commands_plugin_options_m": "Path to the Web3API Plugin manifest file (default: {default})", + "commands_plugin_options_m": "Path to the Polywrap Plugin manifest file (default: {default})", "commands_plugin_options_path": "path", "commands_plugin_options_publish": "Output path for the built schema and manifest (default: {default})", "commands_plugin_options_codegen": "Output directory for the generated types (default: {default})", @@ -172,13 +172,13 @@ "commands_query_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri'", "commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string", "commands_query_error_envsItemModuleNotObject": "Env property 'common' at index {index} must be an object", - "commands_query_description": "Query Web3APIs using recipe scripts", + "commands_query_description": "Query Polywraps using recipe scripts", "commands_query_error_missingScript": "Required argument {script} is missing", - "commands_query_error_noApi": "API needs to be initialized", + "commands_query_error_noWrapper": "Wrapper needs to be initialized", "commands_query_error_readFail": "Failed to read query {query}", "commands_query_error_noRecipeScriptFound": "Recipe script not found at path: {path}", "commands_query_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'", - "commands_testEnv_description": "Manage a test environment for Web3API", + "commands_testEnv_description": "Manage a test environment for Polywrap", "commands_testEnv_error_never": "This should never happen...", "commands_testEnv_error_noCommand": "No command given", "commands_testEnv_error_unrecognizedCommand": "Unrecognized command: {command}", @@ -202,12 +202,12 @@ "lib_codeGenerator_nogenerateBindingMethod": "The generation file provided doesn't have the 'generateBinding' method.", "lib_codeGenerator_noComposedSchema": "The schema does not exist, please define one.", "lib_codeGenerator_typeInfoMissing": "The TypeInfo is missing from the composer output.", - "lib_compiler_compileError": "Failed to compile Web3API", - "lib_compiler_compileText": "Compile Web3API", - "lib_compiler_compileWarning": "Warnings while compiling Web3API", - "lib_compiler_codegenError": "Failed to generate Web3API schema bindings", - "lib_compiler_codegenText": "Codegen Web3API schema bindings", - "lib_compiler_codegenWarning": "Warnings while generating Web3API schema bindings", + "lib_compiler_compileError": "Failed to compile Polywrap", + "lib_compiler_compileText": "Compile Polywrap", + "lib_compiler_compileWarning": "Warnings while compiling Polywrap", + "lib_compiler_codegenError": "Failed to generate Polywrap schema bindings", + "lib_compiler_codegenText": "Codegen Polywrap schema bindings", + "lib_compiler_codegenWarning": "Warnings while generating Polywrap schema bindings", "lib_compiler_compileWasmModulesError": "Failed to compile Wasm modules", "lib_compiler_compileWasmModulesText": "Compile Wasm modules", "lib_compiler_compileWasmModulesWarning": "Warnings while compiling Wasm modules", @@ -217,10 +217,10 @@ "lib_compiler_missingModule": "Missing module definition", "lib_compiler_noInterfaceModule": "Interfaces cannot have implementation file", "lib_compiler_step": "Compiling WASM module", - "lib_compiler_noNodeModules": "could not locate {folder} in parent directories of web3api manifest", + "lib_compiler_noNodeModules": "could not locate {folder} in parent directories of polywrap manifest", "lib_compiler_noInvoke": "WASM module is missing the _wrap_invoke export. This should never happen...", "lib_compiler_invalid_module": "Invalid Wasm module found. {modulePath} is invalid. Error: {error}", - "lib_compiler_cannotBuildInterfaceModules": "Cannot build modules for an Interface Web3API", + "lib_compiler_cannotBuildInterfaceModules": "Cannot build modules for an Interface Polywrap", "lib_compiler_outputMetadataText": "Metadata written", "lib_compiler_outputMetadataError": "Failed to output metadata", "lib_compiler_outputMetadataWarning": "Warnings writing metadata", @@ -248,10 +248,10 @@ "lib_helpers_docker_projectBuildFolderMissing": "Build image `{image}` missing build artifact `{artifact}` in folder /project/build", "lib_helpers_parameters_unexpectedValue": "Unexpected value provided for one or more of {options}. See --help for more information.", "lib_language_unsupportedManifestLanguage": "The manifest's language {language} is not supported. Please use one of the supported lanauges: {supported}", - "lib_language_noInterfaceCodegen": "Code generation cannot be run for Web3API Interface projects", + "lib_language_noInterfaceCodegen": "Code generation cannot be run for Polywrap Interface projects", "lib_system_env_var_not_found": "Environment variable not found: `{variableName}`", "lib_publishers_ipfsPublisher_urlMalformed": "IPFS URL Malformed", - "lib_project_invalid_manifest_language": "Unrecognized manifest language `{language}`. Fix: Please modify your web3api.yaml file to include a valid language field. Supported Manifest Languages: {validTypes}", + "lib_project_invalid_manifest_language": "Unrecognized manifest language `{language}`. Fix: Please modify your polywrap.yaml file to include a valid language field. Supported Manifest Languages: {validTypes}", "lib_project_invalid_manifest_language_pathed": "Unsupported manifest language `{language}`.Debug: No default manifest found at {defaultPath}. Please make contact with the Polywrap CLI development community.", "lib_project_language_not_found": "Manifest language not found. Please include the `language` property in the manifest file.", "lib_project_app_uri_support": "The app command supports only filesystem URIs for plugins. Examples:", diff --git a/packages/cli/package.json b/packages/cli/package.json index 04f7071b24..eb1a7cea55 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,11 +1,11 @@ { "name": "polywrap", - "description": "Web3API CLI", + "description": "Polywrap CLI", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "files": [ "build", @@ -18,7 +18,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json && yarn build:build-images && yarn build:deploy-modules && yarn build:infra-modules", "build:build-images": "copyfiles ./src/lib/defaults/build-images/**/**/* ./build/lib/defaults/build-images/ -u 4", - "build:deploy-modules": "copyfiles ./src/lib/defaults/deploy-modules/**/web3api.deploy.ext.json ./build/lib/defaults/deploy-modules -u 4", + "build:deploy-modules": "copyfiles ./src/lib/defaults/deploy-modules/**/polywrap.deploy.ext.json ./build/lib/defaults/deploy-modules -u 4", "build:infra-modules": "ts-node ./copyfiles ./src/lib/defaults/infra-modules ./build/lib/defaults/infra-modules", "prebuild": "ts-node ./scripts/generateIntlTypes.ts", "build:fast": "rimraf ./build && tsc --project tsconfig.build.json", diff --git a/packages/cli/src/__tests__/e2e/app.spec.ts b/packages/cli/src/__tests__/e2e/app.spec.ts index 0eb1cae8e0..f6a7f82b32 100644 --- a/packages/cli/src/__tests__/e2e/app.spec.ts +++ b/packages/cli/src/__tests__/e2e/app.spec.ts @@ -18,8 +18,8 @@ Commands: help [command] display help for command ` -const CODEGEN_SUCCESS = `- Manifest loaded from ./web3api.app.yaml -✔ Manifest loaded from ./web3api.app.yaml +const CODEGEN_SUCCESS = `- Manifest loaded from ./polywrap.app.yaml +✔ Manifest loaded from ./polywrap.app.yaml - Generate types ✔ Generate types 🔥 Code was generated successfully 🔥 diff --git a/packages/cli/src/__tests__/e2e/build.spec.ts b/packages/cli/src/__tests__/e2e/build.spec.ts index 776fb92ade..9b9fbbf6f8 100644 --- a/packages/cli/src/__tests__/e2e/build.spec.ts +++ b/packages/cli/src/__tests__/e2e/build.spec.ts @@ -8,11 +8,11 @@ import path from "path"; const HELP = `Usage: polywrap build|b [options] -Builds a Web3API +Builds a Polywrap Options: - -m, --manifest-file Path to the Web3API Build manifest file (default: - web3api.yaml | web3api.yml) + -m, --manifest-file Path to the Polywrap Build manifest file (default: + polywrap.yaml | polywrap.yml) -o, --output-dir Output directory for build results (default: build/) -w, --watch Automatically rebuild when changes are made @@ -24,7 +24,7 @@ Options: jest.setTimeout(500000); describe("e2e tests for build command", () => { - const testCaseRoot = path.join(GetPathToCliTestFiles(), "api/build-cmd"); + const testCaseRoot = path.join(GetPathToCliTestFiles(), "wasm/build-cmd"); const testCases = fs.readdirSync(testCaseRoot, { withFileTypes: true }) .filter((dirent) => dirent.isDirectory()) @@ -64,14 +64,14 @@ describe("e2e tests for build command", () => { const projectRoot = getTestCaseDir(0); const project = new WasmProject({ rootDir: projectRoot, - web3apiManifestPath: path.join(projectRoot, "web3api.yaml") + polywrapManifestPath: path.join(projectRoot, "polywrap.yaml") }); await project.cacheDefaultBuildImage(); - const cacheBuildEnvPath = path.join(projectRoot, ".polywrap/web3api/build/image") + const cacheBuildEnvPath = path.join(projectRoot, ".polywrap/wasm/build/image") const cachedBuildManifest = await loadBuildManifest( - path.join(cacheBuildEnvPath, "web3api.build.yaml") + path.join(cacheBuildEnvPath, "polywrap.build.yaml") ); const buildImageName = cachedBuildManifest.docker?.name diff --git a/packages/cli/src/__tests__/e2e/codegen.spec.ts b/packages/cli/src/__tests__/e2e/codegen.spec.ts index 3cc9959d5e..b78634cdae 100644 --- a/packages/cli/src/__tests__/e2e/codegen.spec.ts +++ b/packages/cli/src/__tests__/e2e/codegen.spec.ts @@ -1,4 +1,4 @@ -import { defaultWeb3ApiManifest } from "../../lib"; +import { defaultPolywrapManifest } from "../../lib"; import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; @@ -9,13 +9,13 @@ import rimraf from "rimraf"; const HELP = `Usage: polywrap codegen|g [options] -Auto-generate API Types +Auto-generate Wrapper Types Options: - -m, --manifest-file Path to the Web3API manifest file (default: - ${defaultWeb3ApiManifest.join(" | ")}) + -m, --manifest-file Path to the Polywrap manifest file (default: + ${defaultPolywrapManifest.join(" | ")}) -c, --codegen-dir Output directory for the generated code - (default: ./polywrap) + (default: ./wrap) -s, --script Path to a custom generation script (JavaScript | TypeScript) -i, --ipfs [] IPFS node to load external schemas (default: @@ -26,7 +26,7 @@ Options: `; describe("e2e tests for codegen command", () => { - const testCaseRoot = path.join(GetPathToCliTestFiles(), "api/codegen"); + const testCaseRoot = path.join(GetPathToCliTestFiles(), "wasm/codegen"); const testCases = fs .readdirSync(testCaseRoot, { withFileTypes: true }) .filter((dirent) => dirent.isDirectory()) @@ -62,13 +62,13 @@ describe("e2e tests for codegen command", () => { test("Should throw error for invalid generation file - wrong file", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ - args: ["codegen", "--script", `web3api-invalid.gen.js`], + args: ["codegen", "--script", `polywrap-invalid.gen.js`], cwd: getTestCaseDir(0), cli: polywrapCli, }); const genFile = path.normalize( - `${getTestCaseDir(0)}/web3api-invalid.gen.js` + `${getTestCaseDir(0)}/polywrap-invalid.gen.js` ); expect(code).toEqual(1); @@ -80,7 +80,7 @@ describe("e2e tests for codegen command", () => { test("Should throw error for invalid generation file - no run() method", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ - args: ["codegen", "--script", `web3api-norun.gen.js`], + args: ["codegen", "--script", `polywrap-norun.gen.js`], cwd: getTestCaseDir(0), cli: polywrapCli, }); diff --git a/packages/cli/src/__tests__/e2e/create.spec.ts b/packages/cli/src/__tests__/e2e/create.spec.ts index 7ec7e6afb1..59dd585c56 100644 --- a/packages/cli/src/__tests__/e2e/create.spec.ts +++ b/packages/cli/src/__tests__/e2e/create.spec.ts @@ -11,11 +11,11 @@ Options: -h, --help display help for command Commands: - api [options] Create a Web3API project langs: + wasm [options] Create a Polywrap project langs: assemblyscript, interface - app [options] Create a Web3API application langs: + app [options] Create a Polywrap application langs: typescript-node, typescript-react - plugin [options] Create a Web3API plugin langs: typescript + plugin [options] Create a Polywrap plugin langs: typescript help [command] display help for command `; @@ -77,7 +77,7 @@ describe("e2e tests for create command", () => { test("Should throw error for invalid parameter - lang", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ - args: ["create", "api", "unknown", "name"], + args: ["create", "wasm", "unknown", "name"], cli: polywrapCli, }); @@ -88,7 +88,7 @@ describe("e2e tests for create command", () => { test("Should throw error for invalid parameter - output-dir", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ - args: ["create", "api", "assemblyscript", "name", "-o"], + args: ["create", "wasm", "assemblyscript", "name", "-o"], cli: polywrapCli, }); @@ -103,7 +103,7 @@ describe("e2e tests for create command", () => { const { exitCode: code, stdout: output } = await runCLI({ args: [ "create", - "api", + "wasm", "assemblyscript", "test", "-o", @@ -115,7 +115,7 @@ describe("e2e tests for create command", () => { expect(code).toEqual(0); expect(clearStyle(output)).toContain( - `🔥 You are ready to turn your protocol into a Web3API 🔥` + `🔥 You are ready to turn your protocol into a Polywrap 🔥` ); rimraf.sync(`${__dirname}/test`); diff --git a/packages/cli/src/__tests__/e2e/deploy.spec.ts b/packages/cli/src/__tests__/e2e/deploy.spec.ts index 33c94ec53e..f9b7638d60 100644 --- a/packages/cli/src/__tests__/e2e/deploy.spec.ts +++ b/packages/cli/src/__tests__/e2e/deploy.spec.ts @@ -16,16 +16,16 @@ import fs from "fs"; const HELP = `Usage: polywrap deploy|d [options] -Deploys/Publishes a Web3API +Deploys/Publishes a Polywrap Options: - -m, --manifest-file Path to the Web3API Deploy manifest file - (default: web3api.yaml | web3api.yml) + -m, --manifest-file Path to the Polywrap Deploy manifest file + (default: polywrap.yaml | polywrap.yml) -v, --verbose Verbose output (default: false) -h, --help display help for command `; -const testCaseRoot = path.join(GetPathToCliTestFiles(), "api/deploy"); +const testCaseRoot = path.join(GetPathToCliTestFiles(), "wasm/deploy"); const testCases = fs.readdirSync(testCaseRoot, { withFileTypes: true }) .filter((dirent) => dirent.isDirectory()) @@ -52,7 +52,7 @@ const setup = async (domainNames: string[]) => { ENS_REG_ADDR: ensAddress }; - const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth" + const ethereumPluginUri = "wrap://ens/ethereum.polywrap.eth" const client = new PolywrapClient({ plugins: [ { diff --git a/packages/cli/src/__tests__/e2e/help.spec.ts b/packages/cli/src/__tests__/e2e/help.spec.ts index de0e748414..3fa9fc5923 100644 --- a/packages/cli/src/__tests__/e2e/help.spec.ts +++ b/packages/cli/src/__tests__/e2e/help.spec.ts @@ -10,13 +10,13 @@ Options: Commands: app|a Build/generate types for your app - build|b [options] Builds a Web3API - codegen|g [options] Auto-generate API Types + build|b [options] Builds a Polywrap + codegen|g [options] Auto-generate Wrapper Types create|c Create a new project with polywrap CLI - deploy|d [options] Deploys/Publishes a Web3API + deploy|d [options] Deploys/Publishes a Polywrap plugin|p Build/generate types for the plugin - query|q [options] Query Web3APIs using recipe scripts - infra|i [options] Manage infrastructure for your Web3API + query|q [options] Query Polywraps using recipe scripts + infra|i [options] Manage infrastructure for your Polywrap help [command] display help for command `; diff --git a/packages/cli/src/__tests__/e2e/infra.spec.ts b/packages/cli/src/__tests__/e2e/infra.spec.ts index 6d7c4b4e4c..e3144dca26 100644 --- a/packages/cli/src/__tests__/e2e/infra.spec.ts +++ b/packages/cli/src/__tests__/e2e/infra.spec.ts @@ -16,19 +16,19 @@ const testCaseRoot = path.join(GetPathToCliTestFiles(), "infra"); const HELP = `Usage: polywrap infra|i [options] -Manage infrastructure for your Web3API +Manage infrastructure for your Polywrap Arguments: action Infra allows you to execute the following commands: - up Start Web3API infrastructure - down Stop Web3API infrastructure - config Validate and display Web3API infrastructure's bundled docker-compose manifest - vars Show Web3API infrastructure's required .env variables + up Start Polywrap infrastructure + down Stop Polywrap infrastructure + config Validate and display Polywrap infrastructure's bundled docker-compose manifest + vars Show Polywrap infrastructure's required .env variables (choices: "up", "down", "vars", "config") Options: - --manifest Infra Manifest path (default: "web3api.infra.yaml") + --manifest Infra Manifest path (default: "polywrap.infra.yaml") -m, --modules Use only specified modules -v, --verbose Verbose output (default: false) -h, --help display help for command @@ -177,7 +177,7 @@ describe("e2e tests for infra command", () => { test("Sets environment up with all modules if no --modules are passed", async () => { await runPolywrapCli( - ["infra", "down", "--manifest=./web3api.infra.yaml"], + ["infra", "down", "--manifest=./polywrap.infra.yaml"], getTestCaseDir(0), ); @@ -188,7 +188,7 @@ describe("e2e tests for infra command", () => { ]); await runPolywrapCli( - ["infra", "up", "--manifest=./web3api.infra.yaml"], + ["infra", "up", "--manifest=./polywrap.infra.yaml"], getTestCaseDir(0), ); @@ -234,7 +234,7 @@ describe("e2e tests for infra command", () => { test("Should throw because default module declared in manifest is not recognized", async () => { const { stderr } = await runPolywrapCli( - ["infra", "up", "--manifest=./web3api.infra.wrong.yaml"], + ["infra", "up", "--manifest=./polywrap.infra.wrong.yaml"], getTestCaseDir(4), ); diff --git a/packages/cli/src/__tests__/e2e/no-command.spec.ts b/packages/cli/src/__tests__/e2e/no-command.spec.ts index 91819f2d2e..7987acac51 100644 --- a/packages/cli/src/__tests__/e2e/no-command.spec.ts +++ b/packages/cli/src/__tests__/e2e/no-command.spec.ts @@ -10,13 +10,13 @@ Options: Commands: app|a Build/generate types for your app - build|b [options] Builds a Web3API - codegen|g [options] Auto-generate API Types + build|b [options] Builds a Polywrap + codegen|g [options] Auto-generate Wrapper Types create|c Create a new project with polywrap CLI - deploy|d [options] Deploys/Publishes a Web3API + deploy|d [options] Deploys/Publishes a Polywrap plugin|p Build/generate types for the plugin - query|q [options] Query Web3APIs using recipe scripts - infra|i [options] Manage infrastructure for your Web3API + query|q [options] Query Polywraps using recipe scripts + infra|i [options] Manage infrastructure for your Polywrap help [command] display help for command `; diff --git a/packages/cli/src/__tests__/e2e/plugin.spec.ts b/packages/cli/src/__tests__/e2e/plugin.spec.ts index 951c0147d5..c2fd2b8457 100644 --- a/packages/cli/src/__tests__/e2e/plugin.spec.ts +++ b/packages/cli/src/__tests__/e2e/plugin.spec.ts @@ -18,12 +18,12 @@ Commands: help [command] display help for command `; -const CODEGEN_SUCCESS = `- Manifest loaded from ./web3api.plugin.yaml -✔ Manifest loaded from ./web3api.plugin.yaml +const CODEGEN_SUCCESS = `- Manifest loaded from ./polywrap.plugin.yaml +✔ Manifest loaded from ./polywrap.plugin.yaml - Generate types ✔ Generate types -- Manifest written to ./build/web3api.plugin.json -✔ Manifest written to ./build/web3api.plugin.json +- Manifest written to ./build/polywrap.plugin.json +✔ Manifest written to ./build/polywrap.plugin.json `; describe("e2e tests for plugin command", () => { @@ -118,8 +118,8 @@ describe("e2e tests for plugin command", () => { expect(clearStyle(output)).toEqual(CODEGEN_SUCCESS); const expectedTypesResult = compareSync( - `${testCaseDir}/src/polywrap`, - `${testCaseDir}/expected/src/polywrap`, + `${testCaseDir}/src/wrap`, + `${testCaseDir}/expected/src/wrap`, { compareContent: true } ); expect(expectedTypesResult.differences).toBe(0); diff --git a/packages/cli/src/__tests__/e2e/query.spec.ts b/packages/cli/src/__tests__/e2e/query.spec.ts index 96be087a2c..8fa3da21fe 100644 --- a/packages/cli/src/__tests__/e2e/query.spec.ts +++ b/packages/cli/src/__tests__/e2e/query.spec.ts @@ -4,7 +4,7 @@ import yaml from "js-yaml"; import { clearStyle, polywrapCli } from "./utils"; -import { buildAndDeployApi, providers, initTestEnvironment, runCLI, stopTestEnvironment } from "@polywrap/test-env-js"; +import { buildAndDeployWrapper, providers, initTestEnvironment, runCLI, stopTestEnvironment } from "@polywrap/test-env-js"; import { GetPathToCliTestFiles } from "@polywrap/test-cases"; import { normalizeLineEndings } from "@polywrap/os-js"; import { @@ -18,7 +18,7 @@ jest.setTimeout(200000); const HELP = `Usage: polywrap query|q [options] -Query Web3APIs using recipe scripts +Query Polywraps using recipe scripts Arguments: recipe Path to recipe script @@ -32,7 +32,7 @@ Options: `; describe("sanity tests for query command", () => { - const testCaseRoot = path.join(GetPathToCliTestFiles(), "api/query"); + const testCaseRoot = path.join(GetPathToCliTestFiles(), "wasm/query"); test("Should show help text", async () => { const { exitCode: code, stdout: output, stderr: error } = await runCLI({ @@ -73,7 +73,7 @@ describe("sanity tests for query command", () => { }); describe("e2e tests for query command", () => { - const testCaseRoot = path.join(GetPathToCliTestFiles(), "api/query"); + const testCaseRoot = path.join(GetPathToCliTestFiles(), "wasm/query"); beforeAll(async () => { await initTestEnvironment(); @@ -86,8 +86,8 @@ describe("e2e tests for query command", () => { expect(deployErr).toBe(""); - await buildAndDeployApi({ - apiAbsPath: testCaseRoot, + await buildAndDeployWrapper({ + wrapperAbsPath: testCaseRoot, ipfsProvider: providers.ipfs, ethereumProvider: providers.ethereum, ensName: "simplestorage.eth", diff --git a/packages/cli/src/__tests__/unit/docker.spec.ts b/packages/cli/src/__tests__/unit/docker.spec.ts index a4b494d0b6..6732ec1129 100644 --- a/packages/cli/src/__tests__/unit/docker.spec.ts +++ b/packages/cli/src/__tests__/unit/docker.spec.ts @@ -19,7 +19,7 @@ describe("e2e tests for docker", () => { promises.push( runCLI({ args: ["build", "-v"], - cwd: path.join(GetPathToCliTestFiles(), "api/build-cmd/001-sanity"), + cwd: path.join(GetPathToCliTestFiles(), "wasm/build-cmd/001-sanity"), cli: polywrapCli }).then((result: { exitCode: number; stdout: string; stderr: string }) => { const { exitCode, stderr } = result; diff --git a/packages/cli/src/commands/app.ts b/packages/cli/src/commands/app.ts index 04fc5fe6d8..e58ade9c69 100644 --- a/packages/cli/src/commands/app.ts +++ b/packages/cli/src/commands/app.ts @@ -13,7 +13,7 @@ import { import { PolywrapClient } from "@polywrap/client-js"; import * as path from "path"; -const defaultOutputTypesDir = "./src/polywrap"; +const defaultOutputTypesDir = "./src/wrap"; type AppCommandOptions = { manifestFile: string; diff --git a/packages/cli/src/commands/build.ts b/packages/cli/src/commands/build.ts index 419c4e5c2e..a7d5eb11f3 100644 --- a/packages/cli/src/commands/build.ts +++ b/packages/cli/src/commands/build.ts @@ -7,7 +7,7 @@ import { WatchEvent, watchEventName, intlMsg, - defaultWeb3ApiManifest, + defaultPolywrapManifest, isDockerInstalled, FileLock, parseWasmManifestFileOption, @@ -18,7 +18,7 @@ import { print } from "gluegun"; import path from "path"; import readline from "readline"; -const defaultManifestStr = defaultWeb3ApiManifest.join(" | "); +const defaultManifestStr = defaultPolywrapManifest.join(" | "); const pathStr = intlMsg.commands_build_options_o_path(); type BuildCommandOptions = { @@ -70,7 +70,7 @@ async function run(options: BuildCommandOptions) { const project = new WasmProject({ rootDir: path.dirname(manifestFile), - web3apiManifestPath: manifestFile, + polywrapManifestPath: manifestFile, quiet: !verbose, }); await project.validate(); @@ -148,7 +148,7 @@ async function run(options: BuildCommandOptions) { const watcher = new Watcher(); watcher.start(project.getManifestDir(), { - ignored: [outputDir + "/**", project.getManifestDir() + "/**/polywrap/**"], + ignored: [outputDir + "/**", project.getManifestDir() + "/**/wrap/**"], ignoreInitial: true, execute: async (events: WatchEvent[]) => { // Log all of the events encountered diff --git a/packages/cli/src/commands/codegen.ts b/packages/cli/src/commands/codegen.ts index a2c5bb7709..7230612c26 100644 --- a/packages/cli/src/commands/codegen.ts +++ b/packages/cli/src/commands/codegen.ts @@ -5,7 +5,7 @@ import { WasmProject, SchemaComposer, intlMsg, - defaultWeb3ApiManifest, + defaultPolywrapManifest, getTestEnvProviders, parseCodegenDirOption, parseCodegenScriptOption, @@ -15,11 +15,11 @@ import { import path from "path"; import { filesystem } from "gluegun"; -const defaultCodegenDir = "./polywrap"; +const defaultCodegenDir = "./wrap"; const nodeStr = intlMsg.commands_codegen_options_i_node(); const pathStr = intlMsg.commands_codegen_options_o_path(); const addrStr = intlMsg.commands_codegen_options_e_address(); -const defaultManifestStr = defaultWeb3ApiManifest.join(" | "); +const defaultManifestStr = defaultPolywrapManifest.join(" | "); type CodegenCommandOptions = { manifestFile: string; @@ -78,10 +78,10 @@ async function run(options: CodegenCommandOptions) { const { ipfsProvider, ethProvider } = await getTestEnvProviders(ipfs); const ensAddress: string | undefined = ens; - // Web3Api Project + // Polywrap Project const project = new WasmProject({ rootDir: path.dirname(manifestFile), - web3apiManifestPath: manifestFile, + polywrapManifestPath: manifestFile, }); await project.validate(); const schemaComposer = new SchemaComposer({ diff --git a/packages/cli/src/commands/create.ts b/packages/cli/src/commands/create.ts index 1efa73913f..71f39cce18 100644 --- a/packages/cli/src/commands/create.ts +++ b/packages/cli/src/commands/create.ts @@ -13,7 +13,7 @@ const createPluginStr = intlMsg.commands_create_options_createPlugin(); const pathStr = intlMsg.commands_create_options_o_path(); const supportedLangs = { - api: ["assemblyscript", "interface"] as const, + wasm: ["assemblyscript", "interface"] as const, app: ["typescript-node", "typescript-react"] as const, plugin: ["typescript"] as const, }; @@ -32,13 +32,13 @@ export const create: Command = { .description(intlMsg.commands_create_description()); createCommand - .command("api") + .command("wasm") .description( - `${createProjStr} ${langsStr}: ${supportedLangs.api.join(", ")}` + `${createProjStr} ${langsStr}: ${supportedLangs.wasm.join(", ")}` ) .addArgument( new Argument("", langStr) - .choices(supportedLangs.api) + .choices(supportedLangs.wasm) .argRequired() ) .addArgument(new Argument("", nameStr).argRequired()) @@ -47,7 +47,7 @@ export const create: Command = { `${intlMsg.commands_create_options_o()}` ) .action(async (langStr, nameStr, options) => { - await run("api", langStr, nameStr, options); + await run("wasm", langStr, nameStr, options); }); createCommand @@ -127,7 +127,7 @@ async function run( .then(() => { console.log(); let readyMessage; - if (command === "api") { + if (command === "wasm") { readyMessage = intlMsg.commands_create_readyProtocol(); } else if (command === "app") { readyMessage = intlMsg.commands_create_readyApp(); diff --git a/packages/cli/src/commands/deploy.ts b/packages/cli/src/commands/deploy.ts index 9558e54275..e455a32921 100644 --- a/packages/cli/src/commands/deploy.ts +++ b/packages/cli/src/commands/deploy.ts @@ -2,7 +2,7 @@ import { intlMsg, WasmProject, - defaultWeb3ApiManifest, + defaultPolywrapManifest, DeployPackage, parseWasmManifestFileOption, } from "../lib"; @@ -15,7 +15,7 @@ import { print } from "gluegun"; import { Uri, DeployManifest } from "@polywrap/core-js"; import { validate } from "jsonschema"; -const defaultManifestStr = defaultWeb3ApiManifest.join(" | "); +const defaultManifestStr = defaultPolywrapManifest.join(" | "); const pathStr = intlMsg.commands_deploy_options_o_path(); type DeployCommandOptions = { @@ -53,7 +53,7 @@ async function run(options: DeployCommandOptions): Promise { const project = new WasmProject({ rootDir: nodePath.dirname(manifestFile), - web3apiManifestPath: manifestFile, + polywrapManifestPath: manifestFile, quiet: verbose ? false : true, }); await project.validate(); diff --git a/packages/cli/src/commands/infra.ts b/packages/cli/src/commands/infra.ts index adac7e6948..6a5e5d2b93 100644 --- a/packages/cli/src/commands/infra.ts +++ b/packages/cli/src/commands/infra.ts @@ -62,7 +62,7 @@ export const infra: Command = { .option( `--manifest <${manifestNameStr}>`, intlMsg.commands_infra_manifestPathDescription(), - "web3api.infra.yaml" + "polywrap.infra.yaml" ) .option( `-m, --modules <${moduleNameStr},${moduleNameStr}>`, diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index 27ad0e36ec..e72e8771f9 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -18,7 +18,7 @@ import path from "path"; import fs from "fs"; const defaultPublishDir = "./build"; -const defaultCodegenDir = "./polywrap"; +const defaultCodegenDir = "./wrap"; const pathStr = intlMsg.commands_plugin_options_path(); const defaultManifestStr = defaultPluginManifest.join(" | "); const nodeStr = intlMsg.commands_plugin_options_i_node(); @@ -128,7 +128,7 @@ async function run(options: PluginCommandOptions) { ComposerFilter.Schema ); const publishSchemaPath = path.join(publishDir, "schema.graphql"); - const publishManifestPath = path.join(publishDir, "web3api.plugin.json"); + const publishManifestPath = path.join(publishDir, "polywrap.plugin.json"); if (!fs.existsSync(publishDir)) { fs.mkdirSync(publishDir); diff --git a/packages/cli/src/commands/query.ts b/packages/cli/src/commands/query.ts index 66fb8216ae..ec970f5822 100644 --- a/packages/cli/src/commands/query.ts +++ b/packages/cli/src/commands/query.ts @@ -5,14 +5,14 @@ import { parseRecipeOutputFilePathOption, } from "../lib"; -import { PolywrapClient, Web3ApiClientConfig } from "@polywrap/client-js"; +import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js"; import gql from "graphql-tag"; import path from "path"; import yaml from "js-yaml"; import fs from "fs"; type QueryCommandOptions = { - clientConfig: Partial; + clientConfig: Partial; outputFile?: string; quiet?: boolean; }; @@ -65,9 +65,9 @@ async function run(recipePath: string, options: QueryCommandOptions) { let constants: Record = {}; for (const task of recipe) { - if (task.api) { - uri = task.api; - recipeOutput.push({ api: task.api }); + if (task.wrapper) { + uri = task.wrapper; + recipeOutput.push({ wrapper: task.wrapper }); } if (task.constants) { @@ -125,7 +125,7 @@ async function run(recipePath: string, options: QueryCommandOptions) { } if (!uri) { - throw Error(intlMsg.commands_query_error_noApi()); + throw Error(intlMsg.commands_query_error_noWrapper()); } if (!quiet) { diff --git a/packages/cli/src/lib/CodeGenerator.ts b/packages/cli/src/lib/CodeGenerator.ts index 37059f8f65..8c80bee808 100644 --- a/packages/cli/src/lib/CodeGenerator.ts +++ b/packages/cli/src/lib/CodeGenerator.ts @@ -3,9 +3,9 @@ import { withSpinner, isTypescriptFile, importTypescriptModule, - web3apiManifestLanguages, - isWeb3ApiManifestLanguage, - web3apiManifestLanguageToBindLanguage, + polywrapManifestLanguages, + isPolywrapManifestLanguage, + polywrapManifestLanguageToBindLanguage, pluginManifestLanguages, isPluginManifestLanguage, pluginManifestLanguageToBindLanguage, @@ -42,7 +42,7 @@ export class CodeGenerator { public async generate(): Promise { try { - // Compile the API + // Compile the Wrapper await this._generateCode(); return true; @@ -59,8 +59,8 @@ export class CodeGenerator { const language = await project.getManifestLanguage(); let bindLanguage: BindLanguage | undefined; - if (isWeb3ApiManifestLanguage(language)) { - bindLanguage = web3apiManifestLanguageToBindLanguage(language); + if (isPolywrapManifestLanguage(language)) { + bindLanguage = polywrapManifestLanguageToBindLanguage(language); } else if (isPluginManifestLanguage(language)) { bindLanguage = pluginManifestLanguageToBindLanguage(language); } else if (isAppManifestLanguage(language)) { @@ -72,7 +72,7 @@ export class CodeGenerator { intlMsg.lib_language_unsupportedManifestLanguage({ language: language, supported: [ - ...Object.keys(web3apiManifestLanguages), + ...Object.keys(polywrapManifestLanguages), ...Object.keys(pluginManifestLanguages), ...Object.keys(appManifestLanguages), ].join(", "), diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index c32cf79d5d..e2fac3490c 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -15,7 +15,7 @@ import { resetDir, } from "./"; -import { Web3ApiManifest, BuildManifest, MetaManifest } from "@polywrap/core-js"; +import { PolywrapManifest, BuildManifest, MetaManifest } from "@polywrap/core-js"; import { WasmWrapper } from "@polywrap/client-js"; import { WrapImports } from "@polywrap/client-js/build/wasm/types"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; @@ -26,13 +26,13 @@ import fs from "fs"; import path from "path"; interface CompilerState { - web3ApiManifest: Web3ApiManifest; + polywrapManifest: PolywrapManifest; composerOutput: ComposerOutput; compilerOverrides?: CompilerOverrides; } export interface CompilerOverrides { - validateManifest: (manifest: Web3ApiManifest) => void; + validateManifest: (manifest: PolywrapManifest) => void; generationSubPath: string; } @@ -102,7 +102,7 @@ export class Compiler { // Generate the bindings await this._generateCode(state); - // Compile the API + // Compile the Wrapper buildManifest = await this._buildModules(state); } @@ -110,7 +110,7 @@ export class Compiler { const metaManifest = await this._outputMetadata(); await this._outputManifests( - state.web3ApiManifest, + state.polywrapManifest, buildManifest, metaManifest ); @@ -155,14 +155,14 @@ export class Compiler { const { project } = this._config; - // Get the Web3ApiManifest - const web3ApiManifest = await project.getManifest(); + // Get the PolywrapManifest + const polywrapManifest = await project.getManifest(); // Compose the schema const composerOutput = await this._composeSchema(); // Allow the build-image to validate the manifest & override functionality - const buildImageDir = `${__dirname}/defaults/build-images/${web3ApiManifest.language}`; + const buildImageDir = `${__dirname}/defaults/build-images/${polywrapManifest.language}`; const buildImageEntryFile = path.join(buildImageDir, "index.ts"); let compilerOverrides: CompilerOverrides | undefined; @@ -177,13 +177,13 @@ export class Compiler { if (compilerOverrides) { // Validate the manifest for the given build-image if (compilerOverrides.validateManifest) { - compilerOverrides.validateManifest(web3ApiManifest); + compilerOverrides.validateManifest(polywrapManifest); } } } const state: CompilerState = { - web3ApiManifest: Object.assign({}, web3ApiManifest), + polywrapManifest: Object.assign({}, polywrapManifest), composerOutput, compilerOverrides, }; @@ -196,7 +196,7 @@ export class Compiler { private async _isInterface(): Promise { const state = await this._getCompilerState(); - return state.web3ApiManifest.language === "interface"; + return state.polywrapManifest.language === "interface"; } private async _composeSchema(): Promise { @@ -228,7 +228,7 @@ export class Compiler { private async _buildModules(state: CompilerState): Promise { const { outputDir } = this._config; - const { web3ApiManifest } = state; + const { polywrapManifest } = state; if (await this._isInterface()) { throw Error(intlMsg.lib_compiler_cannotBuildInterfaceModules()); @@ -240,10 +240,10 @@ export class Compiler { // Validate the Wasm module await this._validateWasmModule(outputDir); - // Update the Web3ApiManifest - web3ApiManifest.module = "./module.wasm"; - web3ApiManifest.schema = "./schema.graphql"; - web3ApiManifest.build = "./web3api.build.json"; + // Update the PolywrapManifest + polywrapManifest.module = "./module.wasm"; + polywrapManifest.schema = "./schema.graphql"; + polywrapManifest.build = "./polywrap.build.json"; // Create the BuildManifest return { @@ -270,7 +270,7 @@ export class Compiler { // If the dockerfile path isn't provided, generate it if (!buildManifest?.docker?.dockerfile) { - // Make sure the default template is in the cached .polywrap/web3api/build/image folder + // Make sure the default template is in the cached .polywrap/wasm/build/image folder await project.cacheDefaultBuildImage(); dockerfile = generateDockerfile( @@ -357,30 +357,30 @@ export class Compiler { "utf-8" ); - // Update the Web3ApiManifest schema paths - state.web3ApiManifest = { - ...state.web3ApiManifest, + // Update the PolywrapManifest schema paths + state.polywrapManifest = { + ...state.polywrapManifest, schema: "./schema.graphql", }; } private async _outputManifests( - web3ApiManifest: Web3ApiManifest, + polywrapManifest: PolywrapManifest, buildManifest?: BuildManifest, metaManifest?: MetaManifest ): Promise { const { outputDir, project } = this._config; await outputManifest( - web3ApiManifest, - path.join(outputDir, "web3api.json"), + polywrapManifest, + path.join(outputDir, "polywrap.json"), project.quiet ); if (buildManifest) { await outputManifest( buildManifest, - path.join(outputDir, "web3api.build.json"), + path.join(outputDir, "polywrap.build.json"), project.quiet ); } @@ -388,7 +388,7 @@ export class Compiler { if (metaManifest) { await outputManifest( metaManifest, - path.join(outputDir, "web3api.meta.json"), + path.join(outputDir, "polywrap.meta.json"), project.quiet ); } @@ -411,19 +411,19 @@ export class Compiler { } private _validateState(state: CompilerState) { - const { composerOutput, web3ApiManifest } = state; + const { composerOutput, polywrapManifest } = state; if (!composerOutput.schema) { const missingSchemaMessage = intlMsg.lib_compiler_missingSchema(); throw Error(missingSchemaMessage); } - if (web3ApiManifest.language !== "interface" && !web3ApiManifest.module) { + if (polywrapManifest.language !== "interface" && !polywrapManifest.module) { const missingModuleMessage = intlMsg.lib_compiler_missingModule(); throw Error(missingModuleMessage); } - if (web3ApiManifest.language === "interface" && web3ApiManifest.module) { + if (polywrapManifest.language === "interface" && polywrapManifest.module) { const noInterfaceModule = intlMsg.lib_compiler_noInterfaceModule(); throw Error(noInterfaceModule); } diff --git a/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/Dockerfile.mustache b/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/Dockerfile.mustache index 5547210b1a..e7519b153c 100644 --- a/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/Dockerfile.mustache +++ b/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/Dockerfile.mustache @@ -2,43 +2,43 @@ FROM node:{{node_version}}-alpine as base RUN apk --no-cache --virtual build-dependencies add bash -{{#web3api_linked_packages.length}} +{{#polywrap_linked_packages.length}} WORKDIR /linked-packages -{{/web3api_linked_packages.length}} +{{/polywrap_linked_packages.length}} -{{#web3api_linked_packages}} +{{#polywrap_linked_packages}} COPY {{dir}} ./{{name}} -{{/web3api_linked_packages}} +{{/polywrap_linked_packages}} WORKDIR /project # Install deps in its own step, making rebuilds faster -# when just the Web3API schema & implementation files change +# when just the Polywrap schema & implementation files change COPY package.json . -{{#web3api_linked_packages}} +{{#polywrap_linked_packages}} RUN npx json -I -f package.json -e "this.dependencies['{{name}}']='../linked-packages/{{name}}'" -{{/web3api_linked_packages}} +{{/polywrap_linked_packages}} RUN yarn # Copy all manifest files -{{#web3api_manifests}} +{{#polywrap_manifests}} COPY {{.}} . -{{/web3api_manifests}} +{{/polywrap_manifests}} # Copy all source files {{#include}} COPY {{.}} {{.}} {{/include}} -{{#web3api_module}} +{{#polywrap_module}} COPY {{dir}} {{dir}} # Build the module at {{dir}} -RUN ./node_modules/.bin/asc {{dir}}/polywrap/entry.ts \ +RUN ./node_modules/.bin/asc {{dir}}/wrap/entry.ts \ --path ./node_modules \ --outFile ./build/{{name}}.wasm \ - --use abort={{dir}}/polywrap/entry/wrapAbort \ + --use abort={{dir}}/wrap/entry/wrapAbort \ --optimize --importMemory \ --runtime stub \ --runPasses asyncify \ --transform @serial-as/transform -{{/web3api_module}} +{{/polywrap_module}} diff --git a/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/web3api.build.ext.json b/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/polywrap.build.ext.json similarity index 100% rename from packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/web3api.build.ext.json rename to packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/polywrap.build.ext.json diff --git a/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/web3api.build.yaml b/packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/polywrap.build.yaml similarity index 100% rename from packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/web3api.build.yaml rename to packages/cli/src/lib/defaults/build-images/wasm/assemblyscript/polywrap.build.yaml diff --git a/packages/cli/src/lib/defaults/build-images/wasm/rust/Dockerfile.mustache b/packages/cli/src/lib/defaults/build-images/wasm/rust/Dockerfile.mustache index 640fff8dbc..c44b90e96f 100644 --- a/packages/cli/src/lib/defaults/build-images/wasm/rust/Dockerfile.mustache +++ b/packages/cli/src/lib/defaults/build-images/wasm/rust/Dockerfile.mustache @@ -21,44 +21,44 @@ RUN cargo install toml-cli # Install wasm-snip RUN cargo install wasm-snip -{{#web3api_linked_packages.length}} +{{#polywrap_linked_packages.length}} WORKDIR /linked-packages -{{/web3api_linked_packages.length}} +{{/polywrap_linked_packages.length}} -{{#web3api_linked_packages}} +{{#polywrap_linked_packages}} COPY {{dir}} ./{{name}} -{{/web3api_linked_packages}} +{{/polywrap_linked_packages}} WORKDIR /project # Copy all manifest files -{{#web3api_manifests}} +{{#polywrap_manifests}} COPY {{.}} . -{{/web3api_manifests}} +{{/polywrap_manifests}} # Copy all source files {{#include}} COPY {{.}} {{.}} {{/include}} -{{#web3api_module}} +{{#polywrap_module}} COPY {{dir}} {{dir}} -{{/web3api_module}} +{{/polywrap_module}} -{{#web3api_linked_packages.length}} +{{#polywrap_linked_packages.length}} # Link any local packages -{{#web3api_linked_packages}} +{{#polywrap_linked_packages}} RUN PACKAGE_NAME={{name}}; \ - {{#web3api_module}} + {{#polywrap_module}} toml set ./{{dir}}/Cargo.toml dependencies.$PACKAGE_NAME.path /linked-packages/$PACKAGE_NAME > ./{{dir}}/Cargo-local.toml && \ rm -rf ./{{dir}}/Cargo.toml && \ mv ./{{dir}}/Cargo-local.toml ./{{dir}}/Cargo.toml && \ - {{/web3api_module}} + {{/polywrap_module}} true -{{/web3api_linked_packages}} -{{/web3api_linked_packages.length}} +{{/polywrap_linked_packages}} +{{/polywrap_linked_packages.length}} # Remove any Cargo.lock files -{{#web3api_module}} +{{#polywrap_module}} RUN rm -rf {{dir}}/Cargo.lock # Ensure the Wasm module is configured to use imported memory @@ -95,4 +95,4 @@ RUN WASM_MODULE=$(ls ./{{dir}}/target/wasm32-unknown-unknown/release/*.wasm); \ wasm-snip $WASM_MODULE -o ./build/snipped_{{name}}.wasm && \ wasm-opt --asyncify -Os ./build/snipped_{{name}}.wasm -o ./build/{{name}}.wasm && \ rm -rf ./build/snipped_{{name}}.wasm -{{/web3api_module}} +{{/polywrap_module}} diff --git a/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts b/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts index 7888e3bb66..fab0ac6679 100644 --- a/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts +++ b/packages/cli/src/lib/defaults/build-images/wasm/rust/index.ts @@ -1,17 +1,17 @@ import { CompilerOverrides } from "../../../../Compiler"; import { intlMsg } from "../../../../intl"; -import { Web3ApiManifest } from "@polywrap/core-js"; +import { PolywrapManifest } from "@polywrap/core-js"; export function getCompilerOverrides(): CompilerOverrides { return { - validateManifest: (manifest: Web3ApiManifest) => { + validateManifest: (manifest: PolywrapManifest) => { const module = manifest.module; if (module && module.indexOf("Cargo.toml") === -1) { throw Error(intlMsg.lib_wasm_rust_invalidModule({ path: module })); } }, - generationSubPath: "src/polywrap", + generationSubPath: "src/wrap", }; } diff --git a/packages/cli/src/lib/defaults/build-images/wasm/rust/web3api.build.ext.json b/packages/cli/src/lib/defaults/build-images/wasm/rust/polywrap.build.ext.json similarity index 100% rename from packages/cli/src/lib/defaults/build-images/wasm/rust/web3api.build.ext.json rename to packages/cli/src/lib/defaults/build-images/wasm/rust/polywrap.build.ext.json diff --git a/packages/cli/src/lib/defaults/build-images/wasm/rust/web3api.build.yaml b/packages/cli/src/lib/defaults/build-images/wasm/rust/polywrap.build.yaml similarity index 100% rename from packages/cli/src/lib/defaults/build-images/wasm/rust/web3api.build.yaml rename to packages/cli/src/lib/defaults/build-images/wasm/rust/polywrap.build.yaml diff --git a/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts b/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts index 965470fb27..ca332885d9 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/ens/index.ts @@ -41,7 +41,7 @@ class ENSPublisher implements Deployer { ? new Wallet(config.privateKey).connect(connectionProvider) : undefined; - const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth"; + const ethereumPluginUri = "wrap://ens/ethereum.polywrap.eth"; const ensWrapperUri = `fs/${path.join( path.dirname(require.resolve("@polywrap/test-env-js")), "wrappers", diff --git a/packages/cli/src/lib/defaults/deploy-modules/ens/web3api.deploy.ext.json b/packages/cli/src/lib/defaults/deploy-modules/ens/polywrap.deploy.ext.json similarity index 100% rename from packages/cli/src/lib/defaults/deploy-modules/ens/web3api.deploy.ext.json rename to packages/cli/src/lib/defaults/deploy-modules/ens/polywrap.deploy.ext.json diff --git a/packages/cli/src/lib/defaults/deploy-modules/ipfs/web3api.deploy.ext.json b/packages/cli/src/lib/defaults/deploy-modules/ipfs/polywrap.deploy.ext.json similarity index 100% rename from packages/cli/src/lib/defaults/deploy-modules/ipfs/web3api.deploy.ext.json rename to packages/cli/src/lib/defaults/deploy-modules/ipfs/polywrap.deploy.ext.json diff --git a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts index 13ffc04be6..de86cf6747 100644 --- a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts +++ b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/index.ts @@ -28,7 +28,7 @@ class LocalDevENSPublisher implements Deployer { } const cid = uri.path; - const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth"; + const ethereumPluginUri = "wrap://ens/ethereum.polywrap.eth"; const client = new PolywrapClient({ plugins: [ diff --git a/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/web3api.deploy.ext.json b/packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/polywrap.deploy.ext.json similarity index 100% rename from packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/web3api.deploy.ext.json rename to packages/cli/src/lib/defaults/deploy-modules/local-dev-ens/polywrap.deploy.ext.json diff --git a/packages/cli/src/lib/helpers/client.ts b/packages/cli/src/lib/helpers/client.ts index 150cafddba..dce6742480 100644 --- a/packages/cli/src/lib/helpers/client.ts +++ b/packages/cli/src/lib/helpers/client.ts @@ -15,7 +15,7 @@ export function getSimpleClient(config: SimpleClientConfig): PolywrapClient { const plugins: PluginRegistration[] = []; if (ensAddress) { plugins.push({ - uri: "wrap://ens/ens.web3api.eth", + uri: "wrap://ens/ens.polywrap.eth", plugin: ensPlugin({ addresses: { testnet: ensAddress, @@ -25,7 +25,7 @@ export function getSimpleClient(config: SimpleClientConfig): PolywrapClient { } if (ethProvider) { plugins.push({ - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -37,7 +37,7 @@ export function getSimpleClient(config: SimpleClientConfig): PolywrapClient { } if (ipfsProvider) { plugins.push({ - uri: "wrap://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.polywrap.eth", plugin: ipfsPlugin({ provider: ipfsProvider, fallbackProviders: defaultIpfsProviders, diff --git a/packages/cli/src/lib/helpers/validate-client-config.ts b/packages/cli/src/lib/helpers/validate-client-config.ts index d353ffec61..767007cfcd 100644 --- a/packages/cli/src/lib/helpers/validate-client-config.ts +++ b/packages/cli/src/lib/helpers/validate-client-config.ts @@ -7,7 +7,7 @@ import { PluginRegistration, Uri, UriRedirect, - Web3ApiClientConfig, + PolywrapClientConfig, } from "@polywrap/client-js"; export function validateRedirects( @@ -168,7 +168,7 @@ export function validateEnvs( } export function validateClientConfig( - config: Partial + config: Partial ): void { if (!config || typeof config !== "object") { throw new Error(intlMsg.commands_query_error_clientConfigNotObject()); diff --git a/packages/cli/src/lib/infra/Infra.ts b/packages/cli/src/lib/infra/Infra.ts index 11901ff135..d3bf286d2d 100644 --- a/packages/cli/src/lib/infra/Infra.ts +++ b/packages/cli/src/lib/infra/Infra.ts @@ -321,7 +321,7 @@ export class Infra { m.path ); - // Write new docker-compose manifests with corrected build path and 'web3api' prefix + // Write new docker-compose manifests with corrected build path and 'polywrap' prefix const newComposeFile = YAML.dump(composeFileWithCorrectPaths); this._writeFileToCacheFromAbsPath(m.path, newComposeFile); }); diff --git a/packages/cli/src/lib/infra/fetchers/NodeDependencyFetcher.ts b/packages/cli/src/lib/infra/fetchers/NodeDependencyFetcher.ts index 4a9b283f8c..812517ae65 100644 --- a/packages/cli/src/lib/infra/fetchers/NodeDependencyFetcher.ts +++ b/packages/cli/src/lib/infra/fetchers/NodeDependencyFetcher.ts @@ -22,7 +22,7 @@ export class NodeDependencyFetcher extends InfraDependencyFetcher { protected composePackageJson(packages: InfraPackageArg[]): void { const packageJson = { - name: "web3api-infra", + name: "polywrap-infra", version: "1.0.0", private: true, dependencies: packages.reduce((acc, current) => { diff --git a/packages/cli/src/lib/manifest/app/load.ts b/packages/cli/src/lib/manifest/app/load.ts index 117036387d..236902e353 100644 --- a/packages/cli/src/lib/manifest/app/load.ts +++ b/packages/cli/src/lib/manifest/app/load.ts @@ -3,7 +3,7 @@ import { displayPath, withSpinner, intlMsg } from "../../"; import { AppManifest, deserializeAppManifest } from "@polywrap/core-js"; import fs from "fs"; -export const defaultAppManifest = ["web3api.app.yaml", "web3api.app.yml"]; +export const defaultAppManifest = ["polywrap.app.yaml", "polywrap.app.yml"]; export async function loadAppManifest( manifestPath: string, diff --git a/packages/cli/src/lib/manifest/index.ts b/packages/cli/src/lib/manifest/index.ts index 39d8b4dc65..228bbc0ef5 100644 --- a/packages/cli/src/lib/manifest/index.ts +++ b/packages/cli/src/lib/manifest/index.ts @@ -1,9 +1,9 @@ export * from "./app"; export * from "./plugin"; -export * from "./web3api"; +export * from "./polywrap"; export * from "./language"; export * from "./output"; -import { Web3ApiManifest, PluginManifest, AppManifest } from "@polywrap/core-js"; +import { PolywrapManifest, PluginManifest, AppManifest } from "@polywrap/core-js"; -export type AnyManifest = Web3ApiManifest | PluginManifest | AppManifest; +export type AnyManifest = PolywrapManifest | PluginManifest | AppManifest; diff --git a/packages/cli/src/lib/manifest/language.ts b/packages/cli/src/lib/manifest/language.ts index 949e51b260..d4931470d3 100644 --- a/packages/cli/src/lib/manifest/language.ts +++ b/packages/cli/src/lib/manifest/language.ts @@ -1,10 +1,10 @@ import { - Web3ApiManifestLanguage, + PolywrapManifestLanguage, PluginManifestLanguage, AppManifestLanguage, } from "./"; export type AnyManifestLanguage = - | Web3ApiManifestLanguage + | PolywrapManifestLanguage | PluginManifestLanguage | AppManifestLanguage; diff --git a/packages/cli/src/lib/manifest/output.ts b/packages/cli/src/lib/manifest/output.ts index 8b549a8243..2027b0cb14 100644 --- a/packages/cli/src/lib/manifest/output.ts +++ b/packages/cli/src/lib/manifest/output.ts @@ -2,7 +2,7 @@ import { displayPath, withSpinner, intlMsg } from "../"; import { BuildManifest, - Web3ApiManifest, + PolywrapManifest, MetaManifest, PluginManifest, } from "@polywrap/core-js"; @@ -12,7 +12,7 @@ import path from "path"; import fs from "fs"; export async function outputManifest( - manifest: Web3ApiManifest | BuildManifest | MetaManifest | PluginManifest, + manifest: PolywrapManifest | BuildManifest | MetaManifest | PluginManifest, manifestPath: string, quiet = false ): Promise { diff --git a/packages/cli/src/lib/manifest/plugin/load.ts b/packages/cli/src/lib/manifest/plugin/load.ts index b1ed87c6c3..856a40f683 100644 --- a/packages/cli/src/lib/manifest/plugin/load.ts +++ b/packages/cli/src/lib/manifest/plugin/load.ts @@ -4,8 +4,8 @@ import { PluginManifest, deserializePluginManifest } from "@polywrap/core-js"; import fs from "fs"; export const defaultPluginManifest = [ - "web3api.plugin.yaml", - "web3api.plugin.yml", + "polywrap.plugin.yaml", + "polywrap.plugin.yml", ]; export async function loadPluginManifest( diff --git a/packages/cli/src/lib/manifest/web3api/index.ts b/packages/cli/src/lib/manifest/polywrap/index.ts similarity index 100% rename from packages/cli/src/lib/manifest/web3api/index.ts rename to packages/cli/src/lib/manifest/polywrap/index.ts diff --git a/packages/cli/src/lib/manifest/web3api/languages.ts b/packages/cli/src/lib/manifest/polywrap/languages.ts similarity index 55% rename from packages/cli/src/lib/manifest/web3api/languages.ts rename to packages/cli/src/lib/manifest/polywrap/languages.ts index c3c238a759..501c2aded6 100644 --- a/packages/cli/src/lib/manifest/web3api/languages.ts +++ b/packages/cli/src/lib/manifest/polywrap/languages.ts @@ -2,24 +2,24 @@ import { intlMsg } from "../../intl"; import { BindLanguage } from "@polywrap/schema-bind"; -export const web3apiManifestLanguages = { +export const polywrapManifestLanguages = { "wasm/assemblyscript": "wasm/assemblyscript", "wasm/rust": "wasm/rust", interface: "interface", }; -export type Web3ApiManifestLanguages = typeof web3apiManifestLanguages; +export type PolywrapManifestLanguages = typeof polywrapManifestLanguages; -export type Web3ApiManifestLanguage = keyof Web3ApiManifestLanguages; +export type PolywrapManifestLanguage = keyof PolywrapManifestLanguages; -export function isWeb3ApiManifestLanguage( +export function isPolywrapManifestLanguage( language: string -): language is Web3ApiManifestLanguage { - return language in web3apiManifestLanguages; +): language is PolywrapManifestLanguage { + return language in polywrapManifestLanguages; } -export function web3apiManifestLanguageToBindLanguage( - manifestLanguage: Web3ApiManifestLanguage +export function polywrapManifestLanguageToBindLanguage( + manifestLanguage: PolywrapManifestLanguage ): BindLanguage { switch (manifestLanguage) { case "wasm/assemblyscript": @@ -32,7 +32,7 @@ export function web3apiManifestLanguageToBindLanguage( throw Error( intlMsg.lib_language_unsupportedManifestLanguage({ language: manifestLanguage, - supported: Object.keys(web3apiManifestLanguages).join(", "), + supported: Object.keys(polywrapManifestLanguages).join(", "), }) ); } diff --git a/packages/cli/src/lib/manifest/web3api/load.ts b/packages/cli/src/lib/manifest/polywrap/load.ts similarity index 91% rename from packages/cli/src/lib/manifest/web3api/load.ts rename to packages/cli/src/lib/manifest/polywrap/load.ts index b54e1b591d..cb303c067d 100644 --- a/packages/cli/src/lib/manifest/web3api/load.ts +++ b/packages/cli/src/lib/manifest/polywrap/load.ts @@ -7,11 +7,11 @@ import { } from "../../"; import { - Web3ApiManifest, + PolywrapManifest, BuildManifest, MetaManifest, DeployManifest, - deserializeWeb3ApiManifest, + deserializePolywrapManifest, deserializeBuildManifest, deserializeMetaManifest, deserializeDeployManifest, @@ -22,13 +22,13 @@ import { Schema as JsonSchema } from "jsonschema"; import path from "path"; import fs from "fs"; -export const defaultWeb3ApiManifest = ["web3api.yaml", "web3api.yml"]; +export const defaultPolywrapManifest = ["polywrap.yaml", "polywrap.yml"]; -export async function loadWeb3ApiManifest( +export async function loadPolywrapManifest( manifestPath: string, quiet = false -): Promise { - const run = (): Promise => { +): Promise { + const run = (): Promise => { const manifest = fs.readFileSync(manifestPath, "utf-8"); if (!manifest) { @@ -39,7 +39,7 @@ export async function loadWeb3ApiManifest( } try { - const result = deserializeWeb3ApiManifest(manifest); + const result = deserializePolywrapManifest(manifest); return Promise.resolve(result); } catch (e) { return Promise.reject(e); @@ -57,11 +57,11 @@ export async function loadWeb3ApiManifest( async (_spinner) => { return await run(); } - )) as Web3ApiManifest; + )) as PolywrapManifest; } } -export const defaultBuildManifest = ["web3api.build.yaml", "web3api.build.yml"]; +export const defaultBuildManifest = ["polywrap.build.yaml", "polywrap.build.yml"]; export async function loadBuildManifest( manifestPath: string, @@ -80,7 +80,7 @@ export async function loadBuildManifest( // Load the custom json-schema extension if it exists const configSchemaPath = path.join( path.dirname(manifestPath), - "/web3api.build.ext.json" + "/polywrap.build.ext.json" ); let extSchema: JsonSchema | undefined = undefined; @@ -119,8 +119,8 @@ export async function loadBuildManifest( } export const defaultDeployManifest = [ - "web3api.deploy.yaml", - "web3api.deploy.yml", + "polywrap.deploy.yaml", + "polywrap.deploy.yml", ]; export async function loadDeployManifest( @@ -170,7 +170,7 @@ export async function loadDeployManifestExt( const run = (): JsonSchema | undefined => { const configSchemaPath = path.join( path.dirname(manifestExtPath), - "/web3api.deploy.ext.json" + "/polywrap.deploy.ext.json" ); let extSchema: JsonSchema | undefined; @@ -203,7 +203,7 @@ export async function loadDeployManifestExt( } } -export const defaultMetaManifest = ["web3api.meta.yaml", "web3api.meta.yml"]; +export const defaultMetaManifest = ["polywrap.meta.yaml", "polywrap.meta.yml"]; export async function loadMetaManifest( manifestPath: string, diff --git a/packages/cli/src/lib/option-parsers/app.ts b/packages/cli/src/lib/option-parsers/app.ts index 7e0285a57b..d783f93ec0 100644 --- a/packages/cli/src/lib/option-parsers/app.ts +++ b/packages/cli/src/lib/option-parsers/app.ts @@ -4,7 +4,7 @@ import { resolvePathIfExists } from "../system"; import path from "path"; -const defaultAppCodegenDir = "./src/polywrap"; +const defaultAppCodegenDir = "./src/wrap"; export function parseAppManifestFileOption( manifestFile: string | undefined, diff --git a/packages/cli/src/lib/option-parsers/codegen.ts b/packages/cli/src/lib/option-parsers/codegen.ts index 159d3d4012..e6f8a6924b 100644 --- a/packages/cli/src/lib/option-parsers/codegen.ts +++ b/packages/cli/src/lib/option-parsers/codegen.ts @@ -1,6 +1,6 @@ import path from "path"; -const defaultCodegenDir = "./polywrap"; +const defaultCodegenDir = "./wrap"; export function parseCodegenDirOption( codegenDir: string | undefined, diff --git a/packages/cli/src/lib/option-parsers/plugin.ts b/packages/cli/src/lib/option-parsers/plugin.ts index 700bc37cc5..7fc835d801 100644 --- a/packages/cli/src/lib/option-parsers/plugin.ts +++ b/packages/cli/src/lib/option-parsers/plugin.ts @@ -5,7 +5,7 @@ import { resolvePathIfExists } from "../system"; import path from "path"; const defaultPluginPublishDir = "./build"; -const defaultPluginCodegenDir = "./polywrap"; +const defaultPluginCodegenDir = "./wrap"; export function parsePluginManifestFileOption( manifestFile: string | undefined, diff --git a/packages/cli/src/lib/option-parsers/query.ts b/packages/cli/src/lib/option-parsers/query.ts index 5384b4c1a5..cfe529364d 100644 --- a/packages/cli/src/lib/option-parsers/query.ts +++ b/packages/cli/src/lib/option-parsers/query.ts @@ -5,7 +5,7 @@ import { validateClientConfig } from "../helpers"; import path from "path"; import fs from "fs"; -import { Web3ApiClientConfig } from "@polywrap/client-js"; +import { PolywrapClientConfig } from "@polywrap/client-js"; import { executeMaybeAsyncFunction } from "@polywrap/core-js"; export function parseRecipeScriptPathOption( @@ -24,8 +24,8 @@ export function parseRecipeScriptPathOption( export async function parseClientConfigOption( _clientConfig: string | undefined, _: unknown -): Promise> { - let finalClientConfig: Partial; +): Promise> { + let finalClientConfig: Partial; try { finalClientConfig = await getTestEnvClientConfig(); @@ -75,7 +75,7 @@ export async function parseClientConfigOption( } export async function defaultClientConfigOption(): Promise< - Partial + Partial > { return await parseClientConfigOption(undefined, undefined); } diff --git a/packages/cli/src/lib/option-parsers/wasm.ts b/packages/cli/src/lib/option-parsers/wasm.ts index f15431a541..7634936a0e 100644 --- a/packages/cli/src/lib/option-parsers/wasm.ts +++ b/packages/cli/src/lib/option-parsers/wasm.ts @@ -1,5 +1,5 @@ import { intlMsg } from "../intl"; -import { defaultWeb3ApiManifest } from "../manifest"; +import { defaultPolywrapManifest } from "../manifest"; import { resolvePathIfExists } from "../system"; export function parseWasmManifestFileOption( @@ -8,7 +8,7 @@ export function parseWasmManifestFileOption( ): string { const manifestPaths = manifestFile ? [manifestFile as string] - : defaultWeb3ApiManifest; + : defaultPolywrapManifest; manifestFile = resolvePathIfExists(manifestPaths); diff --git a/packages/cli/src/lib/project/AppProject.ts b/packages/cli/src/lib/project/AppProject.ts index 470e8aa7e3..bf13baa276 100644 --- a/packages/cli/src/lib/project/AppProject.ts +++ b/packages/cli/src/lib/project/AppProject.ts @@ -50,7 +50,7 @@ export class AppProject extends Project { ); } - /// Manifest (web3api.app.yaml) + /// Manifest (polywrap.app.yaml) public async getName(): Promise { return (await this.getManifest()).name; @@ -119,7 +119,7 @@ export class AppProject extends Project { }); } - private _getGenerationDirectory(generationSubPath = "src/polywrap"): string { + private _getGenerationDirectory(generationSubPath = "src/wrap"): string { return path.join(this.getManifestDir(), generationSubPath); } } diff --git a/packages/cli/src/lib/project/PluginProject.ts b/packages/cli/src/lib/project/PluginProject.ts index 082c3a1c22..6321a02ba7 100644 --- a/packages/cli/src/lib/project/PluginProject.ts +++ b/packages/cli/src/lib/project/PluginProject.ts @@ -50,7 +50,7 @@ export class PluginProject extends Project { ); } - /// Manifest (web3api.plugin.yaml) + /// Manifest (polywrap.plugin.yaml) public async getName(): Promise { return (await this.getManifest()).name; @@ -135,7 +135,7 @@ export class PluginProject extends Project { private _getGenerationDirectory( entryPoint: string, - generationSubPath = "polywrap" + generationSubPath = "wrap" ): string { const absolute = path.isAbsolute(entryPoint) ? entryPoint diff --git a/packages/cli/src/lib/project/WasmProject.ts b/packages/cli/src/lib/project/PolywrapProject.ts similarity index 80% rename from packages/cli/src/lib/project/WasmProject.ts rename to packages/cli/src/lib/project/PolywrapProject.ts index ee382f577d..05d90c9459 100644 --- a/packages/cli/src/lib/project/WasmProject.ts +++ b/packages/cli/src/lib/project/PolywrapProject.ts @@ -3,26 +3,26 @@ import { ProjectConfig, Project } from "."; import { - loadWeb3ApiManifest, + loadPolywrapManifest, loadBuildManifest, loadMetaManifest, generateDockerImageName, createUUID, - Web3ApiManifestLanguage, - web3apiManifestLanguages, - isWeb3ApiManifestLanguage, + PolywrapManifestLanguage, + polywrapManifestLanguages, + isPolywrapManifestLanguage, outputManifest, intlMsg, loadDeployManifest, loadDeployManifestExt, - web3apiManifestLanguageToBindLanguage, + polywrapManifestLanguageToBindLanguage, resetDir, } from ".."; import { Deployer } from "../deploy"; import { BuildManifest, - Web3ApiManifest, + PolywrapManifest, MetaManifest, DeployManifest, } from "@polywrap/core-js"; @@ -36,15 +36,15 @@ import { Schema as JsonSchema } from "jsonschema"; import fs from "fs"; import fsExtra from "fs-extra"; -export interface Web3ApiProjectConfig extends ProjectConfig { - web3apiManifestPath: string; +export interface PolywrapProjectConfig extends ProjectConfig { + polywrapManifestPath: string; buildManifestPath?: string; deployManifestPath?: string; metaManifestPath?: string; } -export class WasmProject extends Project { - private _web3apiManifest: Web3ApiManifest | undefined; +export class PolywrapProject extends Project { + private _polywrapManifest: PolywrapManifest | undefined; private _buildManifest: BuildManifest | undefined; private _deployManifest: DeployManifest | undefined; private _metaManifest: MetaManifest | undefined; @@ -52,7 +52,7 @@ export class WasmProject extends Project { private _defaultDeployModulesCached = false; public static cacheLayout = { - root: "web3api/", + root: "wasm/", buildDir: "build/", buildImageDir: "build/image/", buildImageCacheDir: "build/image/cache", @@ -62,10 +62,10 @@ export class WasmProject extends Project { deployModulesDir: "deploy/modules/", }; - constructor(protected _config: Web3ApiProjectConfig) { + constructor(protected _config: PolywrapProjectConfig) { super(_config, { rootDir: _config.rootDir, - subDir: WasmProject.cacheLayout.root, + subDir: PolywrapProject.cacheLayout.root, }); } @@ -76,38 +76,38 @@ export class WasmProject extends Project { /// Project Base Methods public reset(): void { - this._web3apiManifest = undefined; + this._polywrapManifest = undefined; this._buildManifest = undefined; this._metaManifest = undefined; this._deployManifest = undefined; this._defaultBuildImageCached = false; this._defaultDeployModulesCached = false; - this._cache.removeCacheDir(WasmProject.cacheLayout.buildImageDir); + this._cache.removeCacheDir(PolywrapProject.cacheLayout.buildImageDir); this._cache.removeCacheDir( - WasmProject.cacheLayout.buildLinkedPackagesDir + PolywrapProject.cacheLayout.buildLinkedPackagesDir ); - this._cache.removeCacheDir(WasmProject.cacheLayout.deployDir); + this._cache.removeCacheDir(PolywrapProject.cacheLayout.deployDir); } public async validate(): Promise { return Promise.resolve(); } - /// Manifest (web3api.yaml) + /// Manifest (polywrap.yaml) public async getName(): Promise { return (await this.getManifest()).name; } - public async getManifest(): Promise { - if (!this._web3apiManifest) { - this._web3apiManifest = await loadWeb3ApiManifest( + public async getManifest(): Promise { + if (!this._polywrapManifest) { + this._polywrapManifest = await loadPolywrapManifest( this.getManifestPath(), this._config.quiet ); } - return Promise.resolve(this._web3apiManifest); + return Promise.resolve(this._polywrapManifest); } public getManifestDir(): string { @@ -115,19 +115,19 @@ export class WasmProject extends Project { } public getManifestPath(): string { - return this._config.web3apiManifestPath; + return this._config.polywrapManifestPath; } - public async getManifestLanguage(): Promise { + public async getManifestLanguage(): Promise { const language = (await this.getManifest()).language; Project.validateManifestLanguage( language, - web3apiManifestLanguages, - isWeb3ApiManifestLanguage + polywrapManifestLanguages, + isPolywrapManifestLanguage ); - return language as Web3ApiManifestLanguage; + return language as PolywrapManifestLanguage; } /// Schema @@ -162,7 +162,7 @@ export class WasmProject extends Project { // Clean the code generation resetDir(moduleDirectory); - const bindLanguage = web3apiManifestLanguageToBindLanguage( + const bindLanguage = polywrapManifestLanguageToBindLanguage( await this.getManifestLanguage() ); @@ -177,20 +177,20 @@ export class WasmProject extends Project { return bindSchema(options); } - /// Web3API Build Manifest (web3api.build.yaml) + /// Polywrap Build Manifest (polywrap.build.yaml) public async getBuildManifestPath(): Promise { - const web3apiManifest = await this.getManifest(); + const polywrapManifest = await this.getManifest(); // If a custom build manifest path is configured if (this._config.buildManifestPath) { return this._config.buildManifestPath; } - // If the web3api.yaml manifest specifies a custom build manifest - else if (web3apiManifest.build) { + // If the polywrap.yaml manifest specifies a custom build manifest + else if (polywrapManifest.build) { this._config.buildManifestPath = path.join( this.getManifestDir(), - web3apiManifest.build + polywrapManifest.build ); return this._config.buildManifestPath; } @@ -200,8 +200,8 @@ export class WasmProject extends Project { // Return the cached manifest this._config.buildManifestPath = path.join( - this._cache.getCachePath(WasmProject.cacheLayout.buildImageDir), - "web3api.build.yaml" + this._cache.getCachePath(PolywrapProject.cacheLayout.buildImageDir), + "polywrap.build.yaml" ); return this._config.buildManifestPath; } @@ -220,18 +220,18 @@ export class WasmProject extends Project { const root = this.getManifestDir(); const cacheDir = this._cache.getCachePath( - WasmProject.cacheLayout.buildLinkedPackagesDir + PolywrapProject.cacheLayout.buildLinkedPackagesDir ); // Add default config variables const module = await this._getModule(); const defaultConfig: Record = { - web3api_manifests: (await this.getManifestPaths()).map( + polywrap_manifests: (await this.getManifestPaths()).map( (path: string) => { return normalizePath(path); } ), - web3api_linked_packages: this._buildManifest.linked_packages?.map( + polywrap_linked_packages: this._buildManifest.linked_packages?.map( (linkedPackage: { name: string }) => ({ dir: path.relative(root, path.join(cacheDir, linkedPackage.name)), name: linkedPackage.name, @@ -239,7 +239,7 @@ export class WasmProject extends Project { ), }; if (module) { - defaultConfig["web3api_module"] = { + defaultConfig["polywrap_module"] = { name: "module", dir: normalizePath(module), }; @@ -261,14 +261,14 @@ export class WasmProject extends Project { public async getBuildUuid(): Promise { // Load the cached build UUID let uuid = this._cache.readCacheFile( - WasmProject.cacheLayout.buildUuidFile + PolywrapProject.cacheLayout.buildUuidFile ); // If none was present, generate one if (!uuid) { uuid = createUUID(); this._cache.writeCacheFile( - WasmProject.cacheLayout.buildUuidFile, + PolywrapProject.cacheLayout.buildUuidFile, uuid, "utf-8" ); @@ -284,10 +284,10 @@ export class WasmProject extends Project { const language = await this.getManifestLanguage(); - const defaultBuildManifestFilename = "web3api.build.yaml"; + const defaultBuildManifestFilename = "polywrap.build.yaml"; const defaultPath = `${__dirname}/../defaults/build-images/${language}/${defaultBuildManifestFilename}`; const buildImageCachePath = this._cache.getCachePath( - WasmProject.cacheLayout.buildImageDir + PolywrapProject.cacheLayout.buildImageDir ); if (!fs.existsSync(defaultPath)) { @@ -300,11 +300,11 @@ export class WasmProject extends Project { } // Clean the directory - this._cache.removeCacheDir(WasmProject.cacheLayout.buildImageDir); + this._cache.removeCacheDir(PolywrapProject.cacheLayout.buildImageDir); // Copy default build image files into cache await this._cache.copyIntoCache( - WasmProject.cacheLayout.buildImageDir, + PolywrapProject.cacheLayout.buildImageDir, `${__dirname}/../defaults/build-images/${language}/*`, { up: true } ); @@ -334,7 +334,7 @@ export class WasmProject extends Project { if (buildManifest.linked_packages) { const rootDir = this.getManifestDir(); const cacheSubPath = this._cache.getCachePath( - WasmProject.cacheLayout.buildLinkedPackagesDir + PolywrapProject.cacheLayout.buildLinkedPackagesDir ); buildManifest.linked_packages.map( @@ -369,20 +369,20 @@ export class WasmProject extends Project { } } - /// Web3API Deploy Manifest (web3api.deploy.yaml) + /// Polywrap Deploy Manifest (polywrap.deploy.yaml) public async getDeployManifestPath(): Promise { - const web3apiManifest = await this.getManifest(); + const polywrapManifest = await this.getManifest(); // If a custom deploy manifest path is configured if (this._config.deployManifestPath) { return this._config.deployManifestPath; } - // If the web3api.yaml manifest specifies a custom deploy manifest - else if (web3apiManifest.deploy) { + // If the polywrap.yaml manifest specifies a custom deploy manifest + else if (polywrapManifest.deploy) { this._config.deployManifestPath = path.join( this.getManifestDir(), - web3apiManifest.deploy + polywrapManifest.deploy ); return this._config.deployManifestPath; } @@ -424,10 +424,10 @@ export class WasmProject extends Project { } const cachePath = this._cache.getCachePath( - `${WasmProject.cacheLayout.deployModulesDir}/${moduleName}` + `${PolywrapProject.cacheLayout.deployModulesDir}/${moduleName}` ); - const manifestExtPath = path.join(cachePath, "web3api.deploy.ext.json"); + const manifestExtPath = path.join(cachePath, "polywrap.deploy.ext.json"); const manifestExt = await loadDeployManifestExt(manifestExtPath); @@ -443,11 +443,11 @@ export class WasmProject extends Project { return; } - this._cache.removeCacheDir(WasmProject.cacheLayout.deployModulesDir); + this._cache.removeCacheDir(PolywrapProject.cacheLayout.deployModulesDir); for await (const deployModule of modules) { await this._cache.copyIntoCache( - `${WasmProject.cacheLayout.deployModulesDir}/${deployModule}`, + `${PolywrapProject.cacheLayout.deployModulesDir}/${deployModule}`, `${__dirname}/../defaults/deploy-modules/${deployModule}/*`, { up: true } ); @@ -456,20 +456,20 @@ export class WasmProject extends Project { this._defaultDeployModulesCached = true; } - /// Web3API Meta Manifest (web3api.build.yaml) + /// Polywrap Meta Manifest (polywrap.build.yaml) public async getMetaManifestPath(): Promise { - const web3apiManifest = await this.getManifest(); + const polywrapManifest = await this.getManifest(); // If a custom meta manifest path is configured if (this._config.metaManifestPath) { return this._config.metaManifestPath; } - // If the web3api.yaml manifest specifies a custom meta manifest - else if (web3apiManifest.meta) { + // If the polywrap.yaml manifest specifies a custom meta manifest + else if (polywrapManifest.meta) { this._config.metaManifestPath = path.join( this.getManifestDir(), - web3apiManifest.meta + polywrapManifest.meta ); return this._config.metaManifestPath; } @@ -544,7 +544,7 @@ export class WasmProject extends Project { private _getGenerationDirectory( entryPoint: string, - generationSubPath = "polywrap" + generationSubPath = "wrap" ): string { const absolute = path.isAbsolute(entryPoint) ? entryPoint diff --git a/packages/cli/src/lib/project/index.ts b/packages/cli/src/lib/project/index.ts index 1464426aa0..fa69df9540 100644 --- a/packages/cli/src/lib/project/index.ts +++ b/packages/cli/src/lib/project/index.ts @@ -1,4 +1,4 @@ export * from "./Project"; -export * from "./WasmProject"; +export * from "./PolywrapProject"; export * from "./PluginProject"; export * from "./AppProject"; diff --git a/packages/cli/src/lib/test-env/client-config.ts b/packages/cli/src/lib/test-env/client-config.ts index 918128a6ed..7b9b7c6287 100644 --- a/packages/cli/src/lib/test-env/client-config.ts +++ b/packages/cli/src/lib/test-env/client-config.ts @@ -2,7 +2,7 @@ import { getTestEnvProviders } from "./providers"; import { PluginRegistration, - Web3ApiClientConfig, + PolywrapClientConfig, defaultIpfsProviders, } from "@polywrap/client-js"; import { ensPlugin } from "@polywrap/ens-plugin-js"; @@ -11,7 +11,7 @@ import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; import { ensAddresses } from "@polywrap/test-env-js"; export async function getTestEnvClientConfig(): Promise< - Partial + Partial > { const providers = await getTestEnvProviders(); const ipfsProvider = providers.ipfsProvider; @@ -27,7 +27,7 @@ export async function getTestEnvClientConfig(): Promise< // maybe have it exported from test-env. const plugins: PluginRegistration[] = [ { - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -37,14 +37,14 @@ export async function getTestEnvClientConfig(): Promise< }), }, { - uri: "wrap://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.polywrap.eth", plugin: ipfsPlugin({ provider: ipfsProvider, fallbackProviders: defaultIpfsProviders, }), }, { - uri: "wrap://ens/ens.web3api.eth", + uri: "wrap://ens/ens.polywrap.eth", plugin: ensPlugin({ addresses: { testnet: ensAddress, diff --git a/packages/core-interfaces/logger/README.md b/packages/core-interfaces/logger/README.md index 218f331fff..f9c27060a3 100644 --- a/packages/core-interfaces/logger/README.md +++ b/packages/core-interfaces/logger/README.md @@ -1,4 +1,4 @@ -# Web3API Logger Interface +# Polywrap Logger Interface # How To Run @@ -9,5 +9,5 @@ ## Start Test Environment `yarn test:env:up` -## Build & Deploy Web3API +## Build & Deploy Polywrap `yarn deploy` \ No newline at end of file diff --git a/packages/core-interfaces/logger/package.json b/packages/core-interfaces/logger/package.json index e8b4f6f2fb..08cc167510 100644 --- a/packages/core-interfaces/logger/package.json +++ b/packages/core-interfaces/logger/package.json @@ -1,6 +1,6 @@ { "name": "logger-interface", - "description": "Web3API Logger Interface", + "description": "Polywrap Logger Interface", "private": true, "version": "0.0.1-prealpha.85", "scripts": { diff --git a/packages/core-interfaces/logger/web3api.yaml b/packages/core-interfaces/logger/polywrap.yaml similarity index 100% rename from packages/core-interfaces/logger/web3api.yaml rename to packages/core-interfaces/logger/polywrap.yaml diff --git a/packages/core-interfaces/uri-resolver/README.md b/packages/core-interfaces/uri-resolver/README.md index 299a44873b..11e9a3cd9c 100644 --- a/packages/core-interfaces/uri-resolver/README.md +++ b/packages/core-interfaces/uri-resolver/README.md @@ -9,5 +9,5 @@ ## Start Test Environment `yarn test:env:up` -## Build & Deploy Web3API +## Build & Deploy Polywrap `yarn deploy` \ No newline at end of file diff --git a/packages/core-interfaces/uri-resolver/web3api.yaml b/packages/core-interfaces/uri-resolver/polywrap.yaml similarity index 100% rename from packages/core-interfaces/uri-resolver/web3api.yaml rename to packages/core-interfaces/uri-resolver/polywrap.yaml diff --git a/packages/js/asyncify/package.json b/packages/js/asyncify/package.json index 950af1ef1f..8f5b13bf49 100644 --- a/packages/js/asyncify/package.json +++ b/packages/js/asyncify/package.json @@ -5,7 +5,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/js/client/package.json b/packages/js/client/package.json index e2a4b39970..fdd6921966 100644 --- a/packages/js/client/package.json +++ b/packages/js/client/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/client-js", - "description": "Web3API Javascript Client", + "description": "Polywrap Javascript Client", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/js/client/scripts/extractPluginConfigs.ts b/packages/js/client/scripts/extractPluginConfigs.ts index 413a8d2b0c..5805618e38 100644 --- a/packages/js/client/scripts/extractPluginConfigs.ts +++ b/packages/js/client/scripts/extractPluginConfigs.ts @@ -22,7 +22,7 @@ const plugins: PluginConfigSource[] = [ { name: "Ipfs", module: "@polywrap/ipfs-plugin-js", - uri: "wrap://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.polywrap.eth", config: "IpfsPluginConfig", files: [ { @@ -34,7 +34,7 @@ const plugins: PluginConfigSource[] = [ { name: "Ethereum", module: "@polywrap/ethereum-plugin-js", - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", config: "EthereumPluginConfig", files: [ { @@ -65,7 +65,7 @@ const plugins: PluginConfigSource[] = [ { name: "Ens", module: "@polywrap/ens-plugin-js", - uri: "wrap://ens/ens.web3api.eth", + uri: "wrap://ens/ens.polywrap.eth", config: "EnsPluginConfig", files: [ { diff --git a/packages/js/client/src/PolywrapClient.ts b/packages/js/client/src/PolywrapClient.ts index 1b942ed3b9..ad20f2b125 100644 --- a/packages/js/client/src/PolywrapClient.ts +++ b/packages/js/client/src/PolywrapClient.ts @@ -2,8 +2,8 @@ import { getDefaultClientConfig } from "./default-client-config"; import { v4 as uuid } from "uuid"; import { - Api, - ApiCache, + Wrapper, + WrapperCache, Client, ClientConfig, Env, @@ -16,11 +16,11 @@ import { GetRedirectsOptions, GetSchemaOptions, InterfaceImplementations, - InvokeApiOptions, - InvokeApiResult, + InvokeOptions, + InvokeResult, PluginRegistration, - QueryApiOptions, - QueryApiResult, + QueryOptions, + QueryResult, SubscribeOptions, Subscription, Uri, @@ -50,18 +50,18 @@ import { } from "@polywrap/core-js"; import { Tracer } from "@polywrap/tracing-js"; -export interface Web3ApiClientConfig +export interface PolywrapClientConfig extends ClientConfig { tracingEnabled: boolean; } export class PolywrapClient implements Client { - // TODO: the API cache needs to be more like a routing table. - // It should help us keep track of what URI's map to what APIs, + // TODO: the Wrapper cache needs to be more like a routing table. + // It should help us keep track of what URI's map to what Wrappers, // and handle cases where the are multiple jumps. For example, if // A => B => C, then the cache should have A => C, and B => C. - private _apiCache: ApiCache = new Map(); - private _config: Web3ApiClientConfig = { + private _wrapperCache: WrapperCache = new Map(); + private _config: PolywrapClientConfig = { redirects: [], plugins: [], interfaces: [], @@ -71,10 +71,10 @@ export class PolywrapClient implements Client { }; // Invoke specific contexts - private _contexts: Map> = new Map(); + private _contexts: Map> = new Map(); constructor( - config?: Partial, + config?: Partial, options?: { noDefaults?: boolean } ) { try { @@ -175,9 +175,9 @@ export class PolywrapClient implements Client { uri: TUri, options: GetSchemaOptions = {} ): Promise { - const api = await this._loadWeb3Api(this._toUri(uri), options); + const wrapper = await this._loadWrapper(this._toUri(uri), options); const client = contextualizeClient(this, options.contextId); - return await api.getSchema(client); + return await wrapper.getSchema(client); } @Tracer.traceMethod("PolywrapClient: getManifest") @@ -188,9 +188,9 @@ export class PolywrapClient implements Client { uri: TUri, options: GetManifestOptions ): Promise> { - const api = await this._loadWeb3Api(this._toUri(uri), options); + const wrapper = await this._loadWrapper(this._toUri(uri), options); const client = contextualizeClient(this, options.contextId); - return await api.getManifest(options, client); + return await wrapper.getManifest(options, client); } @Tracer.traceMethod("PolywrapClient: getFile") @@ -198,9 +198,9 @@ export class PolywrapClient implements Client { uri: TUri, options: GetFileOptions ): Promise { - const api = await this._loadWeb3Api(this._toUri(uri), options); + const wrapper = await this._loadWrapper(this._toUri(uri), options); const client = contextualizeClient(this, options.contextId); - return await api.getFile(options, client); + return await wrapper.getFile(options, client); } @Tracer.traceMethod("PolywrapClient: getImplementations") @@ -230,17 +230,17 @@ export class PolywrapClient implements Client { TVariables extends Record = Record, TUri extends Uri | string = string >( - options: QueryApiOptions - ): Promise> { + options: QueryOptions + ): Promise> { const { contextId, shouldClearContext } = this._setContext( options.contextId, options.config ); - let result: QueryApiResult; + let result: QueryResult; try { - const typedOptions: QueryApiOptions = { + const typedOptions: QueryOptions = { ...options, uri: this._toUri(options.uri), }; @@ -257,7 +257,7 @@ export class PolywrapClient implements Client { // Execute all invocations in parallel const parallelInvocations: Promise<{ name: string; - result: InvokeApiResult; + result: InvokeResult; }>[] = []; for (const invocationName of Object.keys(queryInvocations)) { @@ -309,25 +309,25 @@ export class PolywrapClient implements Client { @Tracer.traceMethod("PolywrapClient: invoke") public async invoke( - options: InvokeApiOptions - ): Promise> { + options: InvokeOptions + ): Promise> { const { contextId, shouldClearContext } = this._setContext( options.contextId, options.config ); - let result: InvokeApiResult; + let result: InvokeResult; try { - const typedOptions: InvokeApiOptions = { + const typedOptions: InvokeOptions = { ...options, contextId: contextId, uri: this._toUri(options.uri), }; - const api = await this._loadWeb3Api(typedOptions.uri, { contextId }); + const wrapper = await this._loadWrapper(typedOptions.uri, { contextId }); - result = (await api.invoke( + result = (await wrapper.invoke( typedOptions, contextualizeClient(this, contextId) )) as TData; @@ -363,7 +363,7 @@ export class PolywrapClient implements Client { TVariables extends Record = Record, TUri extends Uri | string = string >( - options: SubscribeOptions + options: SubscribeOptions ): Subscription { const { contextId, shouldClearContext } = this._setContext( options.contextId, @@ -401,7 +401,7 @@ export class PolywrapClient implements Client { } subscription.isActive = false; }, - async *[Symbol.asyncIterator](): AsyncGenerator> { + async *[Symbol.asyncIterator](): AsyncGenerator> { let timeout: NodeJS.Timeout | undefined = undefined; subscription.isActive = true; @@ -427,7 +427,7 @@ export class PolywrapClient implements Client { break; } - const result: QueryApiResult = await client.query({ + const result: QueryResult = await client.query({ uri: uri, query: query, variables: variables, @@ -476,17 +476,17 @@ export class PolywrapClient implements Client { uriResolvers = uriResolvers.filter((x) => x.name !== CacheResolver.name); } - const { api, uri: resolvedUri, uriHistory, error } = await resolveUri( + const { wrapper, uri: resolvedUri, uriHistory, error } = await resolveUri( this._toUri(uri), uriResolvers, client, - this._apiCache + this._wrapperCache ); // Update cache for all URIs in the chain - if (cacheWrite && api) { + if (cacheWrite && wrapper) { for (const item of uriHistory.getResolutionPath().stack) { - this._apiCache.set(item.sourceUri.uri, api); + this._wrapperCache.set(item.sourceUri.uri, wrapper); } } @@ -495,7 +495,7 @@ export class PolywrapClient implements Client { } return { - api, + wrapper, uri: resolvedUri, uriHistory, error, @@ -526,7 +526,7 @@ export class PolywrapClient implements Client { return extendableUriResolver.loadUriResolverWrappers( this, - this._apiCache, + this._wrapperCache, uriResolverImpls ); } @@ -557,7 +557,7 @@ export class PolywrapClient implements Client { } @Tracer.traceMethod("PolywrapClient: getConfig") - private _getConfig(contextId?: string): Readonly> { + private _getConfig(contextId?: string): Readonly> { if (contextId) { const context = this._contexts.get(contextId); if (!context) { @@ -701,7 +701,7 @@ export class PolywrapClient implements Client { @Tracer.traceMethod("PolywrapClient: setContext") private _setContext( parentId: string | undefined, - context: Partial | undefined + context: Partial | undefined ): { contextId: string | undefined; shouldClearContext: boolean; @@ -744,13 +744,13 @@ export class PolywrapClient implements Client { } } - @Tracer.traceMethod("PolywrapClient: _loadWeb3Api") - private async _loadWeb3Api(uri: Uri, options?: Contextualized): Promise { - const { api, uriHistory, error } = await this.resolveUri(uri, { + @Tracer.traceMethod("PolywrapClient: _loadWrapper") + private async _loadWrapper(uri: Uri, options?: Contextualized): Promise { + const { wrapper, uriHistory, error } = await this.resolveUri(uri, { contextId: options?.contextId, }); - if (!api) { + if (!wrapper) { if (error) { const errorMessage = error.error?.message ?? ""; @@ -788,7 +788,7 @@ export class PolywrapClient implements Client { } } - return api; + return wrapper; } } @@ -803,13 +803,13 @@ const contextualizeClient = ( TVariables extends Record = Record, TUri extends Uri | string = string >( - options: QueryApiOptions - ): Promise> => { + options: QueryOptions + ): Promise> => { return client.query({ ...options, contextId }); }, invoke: ( - options: InvokeApiOptions - ): Promise> => { + options: InvokeOptions + ): Promise> => { return client.invoke({ ...options, contextId }); }, subscribe: < diff --git a/packages/js/client/src/__tests__/core/createPolywrapClient.spec.ts b/packages/js/client/src/__tests__/core/createPolywrapClient.spec.ts index 0e319d3f94..f80dd06f30 100644 --- a/packages/js/client/src/__tests__/core/createPolywrapClient.spec.ts +++ b/packages/js/client/src/__tests__/core/createPolywrapClient.spec.ts @@ -1,6 +1,6 @@ -import { createWeb3ApiClient, PluginConfigs } from "../../createPolywrapClient"; +import { createPolywrapClient, PluginConfigs } from "../../createPolywrapClient"; -describe("createWeb3ApiClient", () => { +describe("createPolywrapClient", () => { it("Should throw because the plugin requested it's not installed ", async () => { const clientParams = { nonExistantPlugin: { @@ -8,8 +8,8 @@ describe("createWeb3ApiClient", () => { }, } as PluginConfigs; - await expect(createWeb3ApiClient(clientParams)).rejects.toThrow( - "Requested plugin \"nonExistantPlugin\" is not a supported createWeb3ApiClient plugin." + await expect(createPolywrapClient(clientParams)).rejects.toThrow( + "Requested plugin \"nonExistantPlugin\" is not a supported createPolywrapClient plugin." ); }); }); diff --git a/packages/js/client/src/__tests__/core/interface-impls.spec.ts b/packages/js/client/src/__tests__/core/interface-impls.spec.ts index aeaf55049f..266ef84d6c 100644 --- a/packages/js/client/src/__tests__/core/interface-impls.spec.ts +++ b/packages/js/client/src/__tests__/core/interface-impls.spec.ts @@ -1,18 +1,18 @@ import { coreInterfaceUris, - createWeb3ApiClient, + createPolywrapClient, getDefaultClientConfig, Uri, PluginModule, PolywrapClient, - Web3ApiClientConfig, + PolywrapClientConfig, } from "../.."; jest.setTimeout(200000); describe("interface-impls", () => { - const getClient = async (config?: Partial) => { - const client = await createWeb3ApiClient( + const getClient = async (config?: Partial) => { + const client = await createPolywrapClient( {}, config ); diff --git a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts index 9aef3ad601..6aa93c0b03 100644 --- a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts @@ -1,27 +1,27 @@ import { - Web3ApiClientConfig, + PolywrapClientConfig, PolywrapClient, - createWeb3ApiClient, + createPolywrapClient, PluginModule, } from "../.."; jest.setTimeout(200000); const defaultPlugins = [ - "wrap://ens/ipfs.web3api.eth", - "wrap://ens/ens.web3api.eth", - "wrap://ens/ethereum.web3api.eth", - "wrap://ens/http.web3api.eth", - "wrap://ens/js-logger.web3api.eth", - "wrap://ens/uts46.web3api.eth", - "wrap://ens/sha3.web3api.eth", - "wrap://ens/graph-node.web3api.eth", - "wrap://ens/fs.web3api.eth", + "wrap://ens/ipfs.polywrap.eth", + "wrap://ens/ens.polywrap.eth", + "wrap://ens/ethereum.polywrap.eth", + "wrap://ens/http.polywrap.eth", + "wrap://ens/js-logger.polywrap.eth", + "wrap://ens/uts46.polywrap.eth", + "wrap://ens/sha3.polywrap.eth", + "wrap://ens/graph-node.polywrap.eth", + "wrap://ens/fs.polywrap.eth", ]; describe("plugin-wrapper", () => { - const getClient = async (config?: Partial) => { - return await createWeb3ApiClient( + const getClient = async (config?: Partial) => { + return await createPolywrapClient( {}, config ); @@ -85,11 +85,11 @@ describe("plugin-wrapper", () => { test("getSchema -- plugin schema", async () => { const client = await getClient(); const schema: string = await client.getSchema( - "wrap://ens/js-logger.web3api.eth" + "wrap://ens/js-logger.polywrap.eth" ); expect(schema).toStrictEqual( - `### Web3API Header START ### + `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -124,7 +124,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module implements Logger_Module @imports( types: [ @@ -141,7 +141,7 @@ type Module implements Logger_Module @imports( ### Imported Modules START ### type Logger_Module @imported( - uri: "ens/logger.core.web3api.eth", + uri: "ens/logger.core.polywrap.eth", namespace: "Logger", nativeType: "Module" ) { @@ -156,7 +156,7 @@ type Logger_Module @imported( ### Imported Objects START ### enum Logger_LogLevel @imported( - uri: "ens/logger.core.web3api.eth", + uri: "ens/logger.core.polywrap.eth", namespace: "Logger", nativeType: "LogLevel" ) { diff --git a/packages/js/client/src/__tests__/core/resolveUri.spec.ts b/packages/js/client/src/__tests__/core/resolveUri.spec.ts index 6c72efa804..95b101b533 100644 --- a/packages/js/client/src/__tests__/core/resolveUri.spec.ts +++ b/packages/js/client/src/__tests__/core/resolveUri.spec.ts @@ -1,19 +1,19 @@ import { - createWeb3ApiClient, + createPolywrapClient, Uri, - Web3ApiClientConfig, + PolywrapClientConfig, PolywrapClient, PluginModule, } from "../.."; import { - buildAndDeployApi, + buildAndDeployWrapper, initTestEnvironment, runCLI, stopTestEnvironment, ensAddresses, providers } from "@polywrap/test-env-js"; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; import { ResolveUriErrorType } from "@polywrap/core-js"; jest.setTimeout(200000); @@ -32,8 +32,8 @@ describe("resolveUri", () => { await stopTestEnvironment(); }); - const getClient = async (config?: Partial) => { - return createWeb3ApiClient( + const getClient = async (config?: Partial) => { + return createPolywrapClient( { ethereum: { networks: { @@ -61,7 +61,7 @@ describe("resolveUri", () => { const result = await client.resolveUri(uri); expect(result.uri).toEqual(uri); - expect(result.api).toBeFalsy(); + expect(result.wrapper).toBeFalsy(); expect(result.error).toBeFalsy(); expect(result.uriHistory.getResolutionPath().getUriResolvers()).toEqual([]); @@ -72,7 +72,7 @@ describe("resolveUri", () => { sourceUri: uri, result: { uri: uri, - api: false, + wrapper: false, }, }, { @@ -80,7 +80,7 @@ describe("resolveUri", () => { sourceUri: uri, result: { uri: uri, - api: false, + wrapper: false, }, }, { @@ -88,7 +88,7 @@ describe("resolveUri", () => { sourceUri: uri, result: { uri: uri, - api: false, + wrapper: false, }, }, { @@ -96,7 +96,7 @@ describe("resolveUri", () => { sourceUri: uri, result: { uri: uri, - api: false, + wrapper: false, }, }, ]); @@ -130,7 +130,7 @@ describe("resolveUri", () => { const result = await client.resolveUri(fromUri); expect(result.uri).toEqual(toUri2); - expect(result.api).toBeFalsy(); + expect(result.wrapper).toBeFalsy(); expect(result.error).toBeFalsy(); expect(result.uriHistory.getResolutionPath().getUriResolvers()).toEqual([ @@ -143,7 +143,7 @@ describe("resolveUri", () => { sourceUri: fromUri, result: { uri: toUri2, - api: false, + wrapper: false, }, }, { @@ -151,7 +151,7 @@ describe("resolveUri", () => { sourceUri: toUri2, result: { uri: toUri2, - api: false, + wrapper: false, }, }, { @@ -159,7 +159,7 @@ describe("resolveUri", () => { sourceUri: toUri2, result: { uri: toUri2, - api: false, + wrapper: false, }, }, { @@ -167,7 +167,7 @@ describe("resolveUri", () => { sourceUri: toUri2, result: { uri: toUri2, - api: false, + wrapper: false, }, }, { @@ -175,7 +175,7 @@ describe("resolveUri", () => { sourceUri: toUri2, result: { uri: toUri2, - api: false, + wrapper: false, }, }, ]); @@ -213,7 +213,7 @@ describe("resolveUri", () => { sourceUri: pluginUri, result: { uri: pluginUri, - api: false, + wrapper: false, }, }, { @@ -221,7 +221,7 @@ describe("resolveUri", () => { sourceUri: pluginUri, result: { uri: pluginUri, - api: false, + wrapper: false, }, }, { @@ -229,26 +229,26 @@ describe("resolveUri", () => { sourceUri: pluginUri, result: { uri: pluginUri, - api: true, + wrapper: true, }, }, ]); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); expect(result.uri).toEqual(pluginUri); expect(result.error).toBeFalsy(); }); - it("can resolve api", async () => { + it("can resolve wrapper", async () => { await runCLI({ args: ["build"], - cwd: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-interface`, + cwd: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-interface`, }); const client = await getClient(); - const deployResult = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-api`, + const deployResult = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-wrapper`, ipfsProvider, ethereumProvider: ethProvider, }); @@ -258,7 +258,7 @@ describe("resolveUri", () => { const result = await client.resolveUri(ensUri); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); expect(result.uri).toEqual(ipfsUri); expect(result.error).toBeFalsy(); @@ -273,7 +273,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -281,7 +281,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -289,7 +289,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -297,8 +297,8 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ipfsUri, - api: false, - implementationUri: new Uri("wrap://ens/ens.web3api.eth"), + wrapper: false, + implementationUri: new Uri("wrap://ens/ens.polywrap.eth"), }, }, { @@ -306,7 +306,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -314,7 +314,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -322,7 +322,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -330,8 +330,8 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: true, - implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), + wrapper: true, + implementationUri: new Uri("wrap://ens/ipfs.polywrap.eth"), }, }, ]); @@ -340,13 +340,13 @@ describe("resolveUri", () => { it("can resolve cache", async () => { await runCLI({ args: ["build"], - cwd: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-interface`, + cwd: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-interface`, }); const client = await getClient(); - const deployResult = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-api`, + const deployResult = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-wrapper`, ipfsProvider, ethereumProvider: ethProvider, }); @@ -356,7 +356,7 @@ describe("resolveUri", () => { const result = await client.resolveUri(ipfsUri); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); expect(result.uri).toEqual(ipfsUri); expect(result.error).toBeFalsy(); @@ -370,7 +370,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -378,7 +378,7 @@ describe("resolveUri", () => { uriResolver: "CacheResolver", result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -386,7 +386,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -394,15 +394,15 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: true, - implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), + wrapper: true, + implementationUri: new Uri("wrap://ens/ipfs.polywrap.eth"), }, }, ]); const result2 = await client.resolveUri(ensUri); - expect(result2.api).toBeTruthy(); + expect(result2.wrapper).toBeTruthy(); expect(result2.uri).toEqual(ipfsUri); expect(result2.error).toBeFalsy(); @@ -417,7 +417,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -425,7 +425,7 @@ describe("resolveUri", () => { uriResolver: "CacheResolver", result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -433,7 +433,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -441,8 +441,8 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ipfsUri, - api: false, - implementationUri: new Uri("wrap://ens/ens.web3api.eth"), + wrapper: false, + implementationUri: new Uri("wrap://ens/ens.polywrap.eth"), }, }, { @@ -450,7 +450,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -458,7 +458,7 @@ describe("resolveUri", () => { uriResolver: "CacheResolver", result: { uri: ipfsUri, - api: true, + wrapper: true, }, }, ]); @@ -467,13 +467,13 @@ describe("resolveUri", () => { it("can resolve cache - noCacheRead", async () => { await runCLI({ args: ["build"], - cwd: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-interface`, + cwd: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-interface`, }); const client = await getClient(); - const deployResult = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-api`, + const deployResult = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-wrapper`, ipfsProvider, ethereumProvider: ethProvider, }); @@ -483,7 +483,7 @@ describe("resolveUri", () => { const result = await client.resolveUri(ipfsUri); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); expect(result.uri).toEqual(ipfsUri); expect(result.error).toBeFalsy(); @@ -497,7 +497,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -505,7 +505,7 @@ describe("resolveUri", () => { uriResolver: "CacheResolver", result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -513,7 +513,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -521,15 +521,15 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: true, - implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), + wrapper: true, + implementationUri: new Uri("wrap://ens/ipfs.polywrap.eth"), }, }, ]); const result2 = await client.resolveUri(ensUri, { noCacheRead: true }); - expect(result2.api).toBeTruthy(); + expect(result2.wrapper).toBeTruthy(); expect(result2.uri).toEqual(ipfsUri); expect(result2.error).toBeFalsy(); @@ -544,7 +544,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -552,7 +552,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -560,8 +560,8 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ipfsUri, - api: false, - implementationUri: new Uri("wrap://ens/ens.web3api.eth"), + wrapper: false, + implementationUri: new Uri("wrap://ens/ens.polywrap.eth"), }, }, { @@ -569,7 +569,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -577,7 +577,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -585,8 +585,8 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: true, - implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), + wrapper: true, + implementationUri: new Uri("wrap://ens/ipfs.polywrap.eth"), }, }, ]); @@ -595,13 +595,13 @@ describe("resolveUri", () => { it("can resolve cache - noCacheWrite", async () => { await runCLI({ args: ["build"], - cwd: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-interface`, + cwd: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-interface`, }); const client = await getClient(); - const deployResult = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-api`, + const deployResult = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-wrapper`, ipfsProvider, ethereumProvider: ethProvider, }); @@ -611,7 +611,7 @@ describe("resolveUri", () => { const result = await client.resolveUri(ipfsUri, { noCacheWrite: true }); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); expect(result.uri).toEqual(ipfsUri); expect(result.error).toBeFalsy(); @@ -625,7 +625,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -633,7 +633,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -641,7 +641,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -649,15 +649,15 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: true, - implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), + wrapper: true, + implementationUri: new Uri("wrap://ens/ipfs.polywrap.eth"), }, }, ]); const result2 = await client.resolveUri(ensUri); - expect(result2.api).toBeTruthy(); + expect(result2.wrapper).toBeTruthy(); expect(result2.uri).toEqual(ipfsUri); expect(result2.error).toBeFalsy(); @@ -672,7 +672,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -680,7 +680,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -688,7 +688,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -696,8 +696,8 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ipfsUri, - api: false, - implementationUri: new Uri("wrap://ens/ens.web3api.eth"), + wrapper: false, + implementationUri: new Uri("wrap://ens/ens.polywrap.eth"), }, }, { @@ -705,7 +705,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -713,7 +713,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -721,7 +721,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: false, + wrapper: false, }, }, { @@ -729,21 +729,21 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: ipfsUri, - api: true, - implementationUri: new Uri("wrap://ens/ipfs.web3api.eth"), + wrapper: true, + implementationUri: new Uri("wrap://ens/ipfs.polywrap.eth"), }, }, ]); }); - it("can resolve api with redirects", async () => { + it("can resolve wrapper with redirects", async () => { await runCLI({ args: ["build"], - cwd: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-interface`, + cwd: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-interface`, }); - const deployResult = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-api`, + const deployResult = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-wrapper`, ipfsProvider, ethereumProvider: ethProvider, }); @@ -763,7 +763,7 @@ describe("resolveUri", () => { const result = await client.resolveUri(ensUri); - expect(result.api).toBeFalsy(); + expect(result.wrapper).toBeFalsy(); expect(result.uri).toEqual(redirectUri); expect(result.error).toBeFalsy(); @@ -778,7 +778,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -786,7 +786,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -794,7 +794,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ensUri, - api: false, + wrapper: false, }, }, { @@ -802,8 +802,8 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: ipfsUri, - api: false, - implementationUri: new Uri("wrap://ens/ens.web3api.eth"), + wrapper: false, + implementationUri: new Uri("wrap://ens/ens.polywrap.eth"), }, }, { @@ -811,7 +811,7 @@ describe("resolveUri", () => { sourceUri: ipfsUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -819,7 +819,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -827,7 +827,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -835,7 +835,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -843,7 +843,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, ]); @@ -874,7 +874,7 @@ describe("resolveUri", () => { const result = await client.resolveUri(ensUri); - expect(result.api).toBeFalsy(); + expect(result.wrapper).toBeFalsy(); expect(result.uri).toEqual(redirectUri); expect(result.error).toBeFalsy(); @@ -888,7 +888,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -896,7 +896,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -904,7 +904,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -912,7 +912,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -920,7 +920,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -928,7 +928,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, ]); @@ -961,7 +961,7 @@ describe("resolveUri", () => { }, }); - expect(result.api).toBeFalsy(); + expect(result.wrapper).toBeFalsy(); expect(result.uri).toEqual(redirectUri); expect(result.error).toBeFalsy(); @@ -975,7 +975,7 @@ describe("resolveUri", () => { sourceUri: ensUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, { @@ -983,7 +983,7 @@ describe("resolveUri", () => { sourceUri: redirectUri, result: { uri: redirectUri, - api: false, + wrapper: false, }, }, ]); @@ -993,7 +993,7 @@ describe("resolveUri", () => { const client = await new PolywrapClient({ interfaces: [ { - interface: "ens/uri-resolver.core.web3api.eth", + interface: "ens/uri-resolver.core.polywrap.eth", implementations: ["ens/test-resolver.eth"], }, ], @@ -1016,7 +1016,7 @@ describe("resolveUri", () => { const client = await new PolywrapClient({ interfaces: [ { - interface: "ens/uri-resolver.core.web3api.eth", + interface: "ens/uri-resolver.core.polywrap.eth", implementations: ["ens/test-resolver.eth"], }, ], @@ -1039,7 +1039,7 @@ describe("resolveUri", () => { ); }); - it("can preload API resolvers", async () => { + it("can preload wrapper resolvers", async () => { const client = await new PolywrapClient(); const { success, failedUriResolvers } = await client.loadUriResolvers(); @@ -1047,10 +1047,10 @@ describe("resolveUri", () => { expect(success).toBeTruthy(); expect(failedUriResolvers.length).toEqual(0); - const { error, uri, api } = await client.resolveUri("ens/test.eth"); + const { error, uri, wrapper } = await client.resolveUri("ens/test.eth"); expect(error).toBeFalsy(); - expect(api).toBeFalsy(); + expect(wrapper).toBeFalsy(); expect(uri?.uri).toEqual("wrap://ens/test.eth"); }); }); diff --git a/packages/js/client/src/__tests__/core/sanity.spec.ts b/packages/js/client/src/__tests__/core/sanity.spec.ts index 59e72f8d9a..70d9c4ab92 100644 --- a/packages/js/client/src/__tests__/core/sanity.spec.ts +++ b/packages/js/client/src/__tests__/core/sanity.spec.ts @@ -15,28 +15,28 @@ describe("sanity", () => { expect(client.getRedirects()).toStrictEqual([]); expect(client.getPlugins().map((x) => x.uri)).toStrictEqual([ - new Uri("wrap://ens/ipfs.web3api.eth"), - new Uri("wrap://ens/ens.web3api.eth"), - new Uri("wrap://ens/ethereum.web3api.eth"), - new Uri("wrap://ens/http.web3api.eth"), - new Uri("wrap://ens/js-logger.web3api.eth"), - new Uri("wrap://ens/uts46.web3api.eth"), - new Uri("wrap://ens/sha3.web3api.eth"), - new Uri("wrap://ens/graph-node.web3api.eth"), - new Uri("wrap://ens/fs.web3api.eth"), + new Uri("wrap://ens/ipfs.polywrap.eth"), + new Uri("wrap://ens/ens.polywrap.eth"), + new Uri("wrap://ens/ethereum.polywrap.eth"), + new Uri("wrap://ens/http.polywrap.eth"), + new Uri("wrap://ens/js-logger.polywrap.eth"), + new Uri("wrap://ens/uts46.polywrap.eth"), + new Uri("wrap://ens/sha3.polywrap.eth"), + new Uri("wrap://ens/graph-node.polywrap.eth"), + new Uri("wrap://ens/fs.polywrap.eth"), ]); expect(client.getInterfaces()).toStrictEqual([ { interface: coreInterfaceUris.uriResolver, implementations: [ - new Uri("wrap://ens/ipfs.web3api.eth"), - new Uri("wrap://ens/ens.web3api.eth"), - new Uri("wrap://ens/fs.web3api.eth"), + new Uri("wrap://ens/ipfs.polywrap.eth"), + new Uri("wrap://ens/ens.polywrap.eth"), + new Uri("wrap://ens/fs.polywrap.eth"), ], }, { interface: coreInterfaceUris.logger, - implementations: [new Uri("wrap://ens/js-logger.web3api.eth")], + implementations: [new Uri("wrap://ens/js-logger.polywrap.eth")], }, ]); }); @@ -78,7 +78,7 @@ describe("sanity", () => { ]); }); - test("loadWeb3Api - pass string or Uri", async () => { + test("loadPolywrap - pass string or Uri", async () => { const implementationUri = "wrap://ens/some-implementation.eth"; const schemaStr = "test-schema"; diff --git a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts index baa55d0b3c..a80b7acf86 100644 --- a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts @@ -1,5 +1,5 @@ import { - buildApi, + buildWrapper, ensAddresses, initTestEnvironment, stopTestEnvironment, @@ -7,19 +7,19 @@ import { } from "@polywrap/test-env-js"; import { Uri, - createWeb3ApiClient, - Web3ApiClientConfig, + createPolywrapClient, + PolywrapClientConfig, PluginModule, Subscription, - Web3ApiManifest, + PolywrapManifest, BuildManifest, MetaManifest, - deserializeWeb3ApiManifest, + deserializePolywrapManifest, deserializeBuildManifest, deserializeMetaManifest, msgpackDecode } from "../.."; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; import fs from "fs"; jest.setTimeout(200000); @@ -29,8 +29,8 @@ describe("wasm-wrapper", () => { let ethProvider: string; let ensAddress: string; - const apiPath = `${GetPathToTestApis()}/wasm-as/simple-storage` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/simple-storage` + const wrapperUri = `fs/${wrapperPath}/build` beforeAll(async () => { await initTestEnvironment(); @@ -38,15 +38,15 @@ describe("wasm-wrapper", () => { ethProvider = providers.ethereum; ensAddress = ensAddresses.ensAddress; - await buildApi(apiPath); + await buildWrapper(wrapperPath); }); afterAll(async () => { await stopTestEnvironment(); }); - const getClient = async (config?: Partial) => { - return createWeb3ApiClient( + const getClient = async (config?: Partial) => { + return createPolywrapClient( { ethereum: { networks: { @@ -88,7 +88,7 @@ describe("wasm-wrapper", () => { test("invoke with decode defaulted to true works as expected", async () => { const client = await getClient(); const result = await client.invoke({ - uri: apiUri, + uri: wrapperUri, method: "deployContract", input: { connection: { @@ -106,7 +106,7 @@ describe("wasm-wrapper", () => { test("invoke with decode set to false works as expected", async () => { const client = await getClient(); const result = await client.invoke({ - uri: apiUri, + uri: wrapperUri, method: "deployContract", input: { connection: { @@ -126,7 +126,7 @@ describe("wasm-wrapper", () => { const client = await getClient({ plugins: [ { - uri: "wrap://ens/mock.web3api.eth", + uri: "wrap://ens/mock.polywrap.eth", plugin: mockPlugin(), }, ], @@ -134,13 +134,13 @@ describe("wasm-wrapper", () => { const redirects = [ { - from: apiUri, - to: "wrap://ens/mock.web3api.eth", + from: wrapperUri, + to: "wrap://ens/mock.polywrap.eth", }, ]; const result = await client.invoke({ - uri: apiUri, + uri: wrapperUri, method: "deployContract", input: {}, config: { @@ -156,7 +156,7 @@ describe("wasm-wrapper", () => { const client = await getClient({ plugins: [ { - uri: "wrap://ens/mock.web3api.eth", + uri: "wrap://ens/mock.polywrap.eth", plugin: mockPlugin(), }, ], @@ -164,15 +164,15 @@ describe("wasm-wrapper", () => { const redirects = [ { - from: apiUri, - to: "wrap://ens/mock.web3api.eth", + from: wrapperUri, + to: "wrap://ens/mock.polywrap.eth", }, ]; const deploy = await client.query<{ deployContract: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { deployContract( @@ -194,7 +194,7 @@ describe("wasm-wrapper", () => { const get = await client.query<{ getData: number; }>({ - uri: apiUri, + uri: wrapperUri, query: ` query { getData( @@ -217,7 +217,7 @@ describe("wasm-wrapper", () => { const getFail = await client.query<{ getData: number; }>({ - uri: apiUri, + uri: wrapperUri, query: ` query { getData( @@ -234,54 +234,54 @@ describe("wasm-wrapper", () => { expect(getFail.data?.getData).toBeFalsy(); }); - test("getManifest -- web3api manifest, build manifest, meta manifest", async () => { + test("getManifest -- polywrap manifest, build manifest, meta manifest", async () => { const client = await getClient(); const actualManifestStr: string = fs.readFileSync( - `${GetPathToTestApis()}/wasm-as/simple-storage/build/web3api.json`, + `${GetPathToTestWrappers()}/wasm-as/simple-storage/build/polywrap.json`, "utf8" ); - const actualManifest: Web3ApiManifest = deserializeWeb3ApiManifest( + const actualManifest: PolywrapManifest = deserializePolywrapManifest( actualManifestStr ); - const manifest: Web3ApiManifest = await client.getManifest(apiUri, { - type: "web3api", + const manifest: PolywrapManifest = await client.getManifest(wrapperUri, { + type: "polywrap", }); expect(manifest).toStrictEqual(actualManifest); const actualBuildManifestStr: string = fs.readFileSync( - `${GetPathToTestApis()}/wasm-as/simple-storage/build/web3api.build.json`, + `${GetPathToTestWrappers()}/wasm-as/simple-storage/build/polywrap.build.json`, "utf8" ); const actualBuildManifest: BuildManifest = deserializeBuildManifest( actualBuildManifestStr ); - const buildManifest: BuildManifest = await client.getManifest(apiUri, { + const buildManifest: BuildManifest = await client.getManifest(wrapperUri, { type: "build", }); expect(buildManifest).toStrictEqual(actualBuildManifest); const actualMetaManifestStr: string = fs.readFileSync( - `${GetPathToTestApis()}/wasm-as/simple-storage/build/web3api.meta.json`, + `${GetPathToTestWrappers()}/wasm-as/simple-storage/build/polywrap.meta.json`, "utf8" ); const actualMetaManifest: MetaManifest = deserializeMetaManifest( actualMetaManifestStr ); - const metaManifest: MetaManifest = await client.getManifest(apiUri, { + const metaManifest: MetaManifest = await client.getManifest(wrapperUri, { type: "meta", }); expect(metaManifest).toStrictEqual(actualMetaManifest); }); - test("getFile -- simple-storage web3api", async () => { + test("getFile -- simple-storage polywrap", async () => { const client = await getClient(); - const manifest: Web3ApiManifest = await client.getManifest(apiUri, { - type: "web3api", + const manifest: PolywrapManifest = await client.getManifest(wrapperUri, { + type: "polywrap", }); - const fileStr: string = (await client.getFile(apiUri, { + const fileStr: string = (await client.getFile(wrapperUri, { path: manifest.schema as string, encoding: "utf8", })) as string; @@ -291,7 +291,7 @@ describe("wasm-wrapper", () => { ): Int! `); - const fileBuffer: ArrayBuffer = (await client.getFile(apiUri, { + const fileBuffer: ArrayBuffer = (await client.getFile(wrapperUri, { path: manifest.schema!, })) as ArrayBuffer; const decoder = new TextDecoder("utf8"); @@ -303,14 +303,14 @@ describe("wasm-wrapper", () => { `); await expect(() => - client.getManifest(new Uri("wrap://ens/ipfs.web3api.eth"), { - type: "web3api", + client.getManifest(new Uri("wrap://ens/ipfs.polywrap.eth"), { + type: "polywrap", }) ).rejects.toThrow( "client.getManifest(...) is not implemented for Plugins." ); await expect(() => - client.getFile(new Uri("wrap://ens/ipfs.web3api.eth"), { + client.getFile(new Uri("wrap://ens/ipfs.polywrap.eth"), { path: "./index.js", }) ).rejects.toThrow("client.getFile(...) is not implemented for Plugins."); @@ -322,7 +322,7 @@ describe("wasm-wrapper", () => { const deploy = await client.query<{ deployContract: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { deployContract( @@ -348,7 +348,7 @@ describe("wasm-wrapper", () => { await client.query<{ setData: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { setData( @@ -372,7 +372,7 @@ describe("wasm-wrapper", () => { }> = client.subscribe<{ getData: number; }>({ - uri: apiUri, + uri: wrapperUri, query: ` query { getData( @@ -410,7 +410,7 @@ describe("wasm-wrapper", () => { const deploy = await client.query<{ deployContract: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { deployContract( @@ -436,7 +436,7 @@ describe("wasm-wrapper", () => { await client.query<{ setData: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { setData( @@ -460,7 +460,7 @@ describe("wasm-wrapper", () => { }> = client.subscribe<{ getData: number; }>({ - uri: apiUri, + uri: wrapperUri, query: ` query { getData( diff --git a/packages/js/client/src/__tests__/e2e/env.spec.ts b/packages/js/client/src/__tests__/e2e/env.spec.ts index cf6d983d8a..1c37f195ce 100644 --- a/packages/js/client/src/__tests__/e2e/env.spec.ts +++ b/packages/js/client/src/__tests__/e2e/env.spec.ts @@ -1,15 +1,15 @@ import { - buildApi, + buildWrapper, } from "@polywrap/test-env-js"; -import { createWeb3ApiClient, Web3ApiClientConfig } from "../.."; +import { createPolywrapClient, PolywrapClientConfig } from "../.."; import { Client, PluginModule } from "@polywrap/core-js"; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; jest.setTimeout(200000); describe("env", () => { - const getClient = async (config?: Partial) => { - return createWeb3ApiClient( + const getClient = async (config?: Partial) => { + return createPolywrapClient( {}, config ); @@ -46,16 +46,16 @@ describe("env", () => { describe("simple env types", () => { let client: Client; - const apiPath = `${GetPathToTestApis()}/wasm-as/simple-env-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/simple-env-types` + const wrapperUri = `fs/${wrapperPath}/build` beforeAll(async () => { - await buildApi(apiPath); + await buildWrapper(wrapperPath); client = await getClient({ envs: [ { - uri: apiUri, + uri: wrapperUri, env: { str: "module string", requiredInt: 1, @@ -67,7 +67,7 @@ describe("env", () => { test("module: getEnv - when set", async () => { const queryEnv = await client.query({ - uri: apiUri, + uri: wrapperUri, query: ` query { getEnv( @@ -85,7 +85,7 @@ describe("env", () => { test("module: getEnv - when not set", async () => { const queryEnv = await client.query({ - uri: apiUri, + uri: wrapperUri, query: ` query { getEnv( @@ -107,7 +107,7 @@ describe("env", () => { test("module: getEnv - when set incorrectly", async () => { const queryEnv = await client.query({ - uri: apiUri, + uri: wrapperUri, query: ` query { getEnv( @@ -118,7 +118,7 @@ describe("env", () => { config: { envs: [ { - uri: apiUri, + uri: wrapperUri, env: { str: "string", requiredInt: "99", @@ -140,16 +140,16 @@ describe("env", () => { describe("complex env types", () => { let client: Client; - const apiPath = `${GetPathToTestApis()}/wasm-as/env-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/env-types` + const wrapperUri = `fs/${wrapperPath}/build` beforeAll(async () => { - await buildApi(apiPath); + await buildWrapper(wrapperPath); client = await getClient({ envs: [ { - uri: apiUri, + uri: wrapperUri, env: { object: { prop: "object string", @@ -168,7 +168,7 @@ describe("env", () => { test("mockEnv", async () => { const moduleEnv = await client.query({ - uri: apiUri, + uri: wrapperUri, query: ` query { moduleEnv( @@ -198,7 +198,7 @@ describe("env", () => { test("module time env types", async () => { const moduleEnv = await client.query({ - uri: apiUri, + uri: wrapperUri, query: ` query { moduleEnv( @@ -226,7 +226,7 @@ describe("env", () => { }); const mockUpdatedEnv = await client.query({ - uri: apiUri, + uri: wrapperUri, query: ` query { moduleEnv( @@ -237,7 +237,7 @@ describe("env", () => { config: { envs: [ { - uri: apiUri, + uri: wrapperUri, env: { object: { prop: "object another string", @@ -276,16 +276,16 @@ describe("env", () => { describe("env client types", () => { let client: Client; - const apiPath = `${GetPathToTestApis()}/wasm-as/env-client-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/env-client-types` + const wrapperUri = `fs/${wrapperPath}/build` beforeAll(async () => { - await buildApi(apiPath); + await buildWrapper(wrapperPath); client = await getClient({ envs: [ { - uri: apiUri, + uri: wrapperUri, env: { str: "string", }, @@ -296,7 +296,7 @@ describe("env", () => { test("module", async () => { const mockEnd = await client.query({ - uri: apiUri, + uri: wrapperUri, query: ` query { environment( @@ -315,15 +315,15 @@ describe("env", () => { }); test("set env when not required", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/enum-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/enum-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); const client = await getClient({ envs: [ { - uri: apiUri, + uri: wrapperUri, env: { str: "string", }, @@ -332,7 +332,7 @@ describe("env", () => { }); const mockEnv = await client.query({ - uri: apiUri, + uri: wrapperUri, query: ` query { method1(en: 0) @@ -341,7 +341,7 @@ describe("env", () => { config: { envs: [ { - uri: apiUri, + uri: wrapperUri, env: { str: "string", }, diff --git a/packages/js/client/src/__tests__/e2e/test-cases.ts b/packages/js/client/src/__tests__/e2e/test-cases.ts index 4be62ba4b3..52d8c0de63 100644 --- a/packages/js/client/src/__tests__/e2e/test-cases.ts +++ b/packages/js/client/src/__tests__/e2e/test-cases.ts @@ -3,12 +3,12 @@ import { BigNumber } from "bignumber.js"; export const runAsyncifyTest = async ( client: PolywrapClient, - apiUri: string + wrapperUri: string ) => { const deploy = await client.query<{ deployContract: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { deployContract( @@ -33,7 +33,7 @@ export const runAsyncifyTest = async ( const subsequentInvokes = await client.query<{ subsequentInvokes: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { subsequentInvokes( @@ -56,7 +56,7 @@ export const runAsyncifyTest = async ( const localVarMethod = await client.query<{ localVarMethod: boolean; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { localVarMethod( @@ -76,7 +76,7 @@ export const runAsyncifyTest = async ( const globalVarMethod = await client.query<{ globalVarMethod: boolean; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { globalVarMethod( @@ -93,12 +93,12 @@ export const runAsyncifyTest = async ( expect(globalVarMethod.data).toBeTruthy(); expect(globalVarMethod.data?.globalVarMethod).toEqual(true); - const largeStr = new Array(10000).join("web3api "); + const largeStr = new Array(10000).join("polywrap "); const setDataWithLargeArgs = await client.query<{ setDataWithLargeArgs: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { setDataWithLargeArgs( @@ -122,7 +122,7 @@ export const runAsyncifyTest = async ( const setDataWithManyArgs = await client.query<{ setDataWithManyArgs: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { setDataWithManyArgs( @@ -146,25 +146,25 @@ export const runAsyncifyTest = async ( } `, variables: { - valueA: "web3api a", - valueB: "web3api b", - valueC: "web3api c", - valueD: "web3api d", - valueE: "web3api e", - valueF: "web3api f", - valueG: "web3api g", - valueH: "web3api h", - valueI: "web3api i", - valueJ: "web3api j", - valueK: "web3api k", - valueL: "web3api l", + valueA: "polywrap a", + valueB: "polywrap b", + valueC: "polywrap c", + valueD: "polywrap d", + valueE: "polywrap e", + valueF: "polywrap f", + valueG: "polywrap g", + valueH: "polywrap h", + valueI: "polywrap i", + valueJ: "polywrap j", + valueK: "polywrap k", + valueL: "polywrap l", }, }); expect(setDataWithManyArgs.errors).toBeFalsy(); expect(setDataWithManyArgs.data).toBeTruthy(); expect(setDataWithManyArgs.data?.setDataWithManyArgs).toEqual( - "web3api aweb3api bweb3api cweb3api dweb3api eweb3api fweb3api gweb3api hweb3api iweb3api jweb3api kweb3api l" + "polywrap apolywrap bpolywrap cpolywrap dpolywrap epolywrap fpolywrap gpolywrap hpolywrap ipolywrap jpolywrap kpolywrap l" ); const createObj = (i: number) => { @@ -187,7 +187,7 @@ export const runAsyncifyTest = async ( const setDataWithManyStructuredArgs = await client.query<{ setDataWithManyStructuredArgs: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { setDataWithManyStructuredArgs( @@ -672,7 +672,7 @@ export const runLargeTypesTest = async ( client: PolywrapClient, uri: string ) => { - const largeStr = new Array(5000).join("web3api "); + const largeStr = new Array(5000).join("polywrap "); const largeBytes = new Uint8Array(Buffer.from(largeStr)); const largeStrArray = []; const largeBytesArray = []; @@ -1140,12 +1140,12 @@ export const runMapTypeTest = async ( export const runSimpleStorageTest = async ( client: PolywrapClient, - apiUri: string + wrapperUri: string ) => { const deploy = await client.query<{ deployContract: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { deployContract( @@ -1169,7 +1169,7 @@ export const runSimpleStorageTest = async ( const set = await client.query<{ setData: string; }>({ - uri: apiUri, + uri: wrapperUri, query: ` mutation { setData( @@ -1195,7 +1195,7 @@ export const runSimpleStorageTest = async ( secondGetData: number; thirdGetData: number; }>({ - uri: apiUri, + uri: wrapperUri, query: ` query { getData( @@ -1231,7 +1231,7 @@ export const runSimpleStorageTest = async ( secondGetData: number; thirdGetData: number; }>({ - uri: apiUri, + uri: wrapperUri, query: ` query { getData( diff --git a/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts b/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts index c9eaecc9af..cb9258c3ef 100644 --- a/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts +++ b/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts @@ -1,17 +1,17 @@ import { - Web3ApiClientConfig, - createWeb3ApiClient, + PolywrapClientConfig, + createPolywrapClient, } from "../../"; import * as TestCases from "./test-cases"; import { - buildApi, + buildWrapper, initTestEnvironment, stopTestEnvironment, runCLI, ensAddresses, providers } from "@polywrap/test-env-js"; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; jest.setTimeout(200000); @@ -31,8 +31,8 @@ describe("wasm-as test cases", () => { await stopTestEnvironment(); }); - const getClient = async (config?: Partial) => { - return createWeb3ApiClient({ + const getClient = async (config?: Partial) => { + return createPolywrapClient({ ethereum: { networks: { testnet: { @@ -50,79 +50,79 @@ describe("wasm-as test cases", () => { } it("asyncify", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/asyncify` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/asyncify` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runAsyncifyTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("bigint-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/bigint-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/bigint-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runBigIntTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("bignumber-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/bignumber-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/bignumber-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runBigNumberTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("bytes-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/bytes-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/bytes-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runBytesTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("enum-types", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/enum-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/enum-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runEnumTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("map-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/map-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/map-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runMapTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("reserved-words", async () => { const client = await getClient(); - const apiPath = `${GetPathToTestApis()}/wasm-as/reserved-words` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/reserved-words` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); - const ensUri = apiUri; + await buildWrapper(wrapperPath); + const ensUri = wrapperUri; const query = await client.query<{ method1: { @@ -151,14 +151,14 @@ describe("wasm-as test cases", () => { }); it("implementations - e2e", async () => { - const interfacePath = `${GetPathToTestApis()}/wasm-as/implementations/test-interface` + const interfacePath = `${GetPathToTestWrappers()}/wasm-as/implementations/test-interface` const interfaceUri = `fs/${interfacePath}/build`; - const implementationPath = `${GetPathToTestApis()}/wasm-as/implementations/test-api` + const implementationPath = `${GetPathToTestWrappers()}/wasm-as/implementations/test-wrapper` const implementationUri = `wrap://fs/${implementationPath}/build` - await buildApi(interfacePath); - await buildApi(implementationPath); + await buildWrapper(interfacePath); + await buildWrapper(implementationPath); const client = await getClient({ interfaces: [ @@ -177,10 +177,10 @@ describe("wasm-as test cases", () => { it("implementations - getImplementations", async () => { const interfaceUri = "wrap://ens/interface.eth" - const implementationPath = `${GetPathToTestApis()}/wasm-as/implementations/test-use-getImpl` + const implementationPath = `${GetPathToTestWrappers()}/wasm-as/implementations/test-use-getImpl` const implementationUri = `wrap://fs/${implementationPath}/build`; - await buildApi(implementationPath); + await buildWrapper(implementationPath); const client = await getClient({ interfaces: [ @@ -199,16 +199,16 @@ describe("wasm-as test cases", () => { it("e2e Interface invoke method", async () => { const interfaceUri = "wrap://ens/interface.eth"; - const implementationPath = `${GetPathToTestApis()}/wasm-as/interface-invoke/test-implementation` + const implementationPath = `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-implementation` const implementationUri = `fs/${implementationPath}/build`; // Build interface polywrapper await runCLI({ args: ["build"], - cwd: `${GetPathToTestApis()}/wasm-as/interface-invoke/test-interface`, + cwd: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-interface`, }); - await buildApi(implementationPath); + await buildWrapper(implementationPath); const client = await getClient({ interfaces: [ @@ -219,15 +219,15 @@ describe("wasm-as test cases", () => { ], }); - const apiPath = `${GetPathToTestApis()}/wasm-as/interface-invoke/test-api` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-wrapper` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); const query = await client.query<{ moduleMethod: string; }>({ - uri: apiUri, + uri: wrapperUri, query: `query{ moduleMethod( arg: { @@ -247,68 +247,68 @@ describe("wasm-as test cases", () => { }); it("invalid type errors", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/invalid-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/invalid-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runInvalidTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("JSON-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/json-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/json-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runJsonTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("large-types", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/large-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/large-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runLargeTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("number-types under and overflows", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/number-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/number-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runNumberTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("object-types", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/object-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/object-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runObjectTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("simple-storage", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-as/simple-storage` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-as/simple-storage` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runSimpleStorageTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); }); diff --git a/packages/js/client/src/__tests__/e2e/wasm-rs.ts b/packages/js/client/src/__tests__/e2e/wasm-rs.ts index e652cdedb3..10fbbaed0f 100644 --- a/packages/js/client/src/__tests__/e2e/wasm-rs.ts +++ b/packages/js/client/src/__tests__/e2e/wasm-rs.ts @@ -1,16 +1,16 @@ import { - Web3ApiClientConfig, - createWeb3ApiClient, + PolywrapClientConfig, + createPolywrapClient, } from "../../"; import * as TestCases from "./test-cases"; import { - buildApi, + buildWrapper, ensAddresses, initTestEnvironment, stopTestEnvironment, providers } from "@polywrap/test-env-js"; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; jest.setTimeout(1200000); @@ -30,8 +30,8 @@ describe("wasm-rs test cases", () => { await stopTestEnvironment(); }); - const getClient = async (config?: Partial) => { - return createWeb3ApiClient({ + const getClient = async (config?: Partial) => { + return createPolywrapClient({ ethereum: { networks: { testnet: { @@ -49,91 +49,91 @@ describe("wasm-rs test cases", () => { } it("asyncify", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/asyncify` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/asyncify` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runAsyncifyTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("bigint-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/bigint-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/bigint-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi(apiPath); + await buildWrapper(wrapperPath); await TestCases.runBigIntTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("bignumber-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/bignumber-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/bignumber-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runBigNumberTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("bytes-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/bytes-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/bytes-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runBytesTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("enum-types", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/enum-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/enum-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runEnumTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("map-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/map-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/map-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runMapTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("implementations - e2e", async () => { - const interfacePath = `${GetPathToTestApis()}/wasm-rs/implementations/test-interface` + const interfacePath = `${GetPathToTestWrappers()}/wasm-rs/implementations/test-interface` const interfaceUri = `fs/${interfacePath}/build`; - const implementationPath = `${GetPathToTestApis()}/wasm-rs/implementations/test-api` + const implementationPath = `${GetPathToTestWrappers()}/wasm-rs/implementations/test-wrapper` const implementationUri = `fs/${implementationPath}/build`; - await buildApi( + await buildWrapper( interfacePath ); - await buildApi( + await buildWrapper( implementationPath ); @@ -154,9 +154,9 @@ describe("wasm-rs test cases", () => { it("implementations - getImplementations", async () => { const interfaceUri = "wrap://ens/interface.eth" - const implementationPath = `${GetPathToTestApis()}/wasm-rs/implementations/test-use-getImpl` + const implementationPath = `${GetPathToTestWrappers()}/wasm-rs/implementations/test-use-getImpl` - await buildApi( + await buildWrapper( implementationPath ); @@ -177,80 +177,80 @@ describe("wasm-rs test cases", () => { }); it("invalid type errors", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/invalid-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/invalid-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runInvalidTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("JSON-type", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/json-type` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/json-type` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runJsonTypeTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("large-types", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/large-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/large-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runLargeTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("number-types under and overflows", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/number-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/number-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runNumberTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("object-types", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/object-types` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/object-types` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runObjectTypesTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); it("simple-storage", async () => { - const apiPath = `${GetPathToTestApis()}/wasm-rs/simple-storage` - const apiUri = `fs/${apiPath}/build` + const wrapperPath = `${GetPathToTestWrappers()}/wasm-rs/simple-storage` + const wrapperUri = `fs/${wrapperPath}/build` - await buildApi( - apiPath + await buildWrapper( + wrapperPath ); await TestCases.runSimpleStorageTest( - await getClient(), apiUri + await getClient(), wrapperUri ); }); }); diff --git a/packages/js/client/src/__tests__/e2e/workflow.spec.ts b/packages/js/client/src/__tests__/e2e/workflow.spec.ts index c230d1c582..b6f8745424 100644 --- a/packages/js/client/src/__tests__/e2e/workflow.spec.ts +++ b/packages/js/client/src/__tests__/e2e/workflow.spec.ts @@ -1,12 +1,12 @@ -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; import { - buildAndDeployApi, + buildAndDeployWrapper, initTestEnvironment, stopTestEnvironment, ensAddresses, providers } from "@polywrap/test-env-js"; -import { createWeb3ApiClient, PolywrapClient, Web3ApiClientConfig } from "../.."; +import { createPolywrapClient, PolywrapClient, PolywrapClientConfig } from "../.."; import { outPropWorkflow, sanityWorkflow } from "./workflow-test-cases"; jest.setTimeout(200000); @@ -23,8 +23,8 @@ describe("workflow", () => { ensAddress = ensAddresses.ensAddress; }); - const getClient = async (config?: Partial) => { - return createWeb3ApiClient( + const getClient = async (config?: Partial) => { + return createPolywrapClient( { ethereum: { networks: { @@ -53,8 +53,8 @@ describe("workflow", () => { let client: PolywrapClient; beforeAll(async () => { - await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/simple-storage`, + await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/simple-storage`, ipfsProvider, ethereumProvider: ethProvider, ensName: "simple-storage.eth", diff --git a/packages/js/client/src/createPolywrapClient.ts b/packages/js/client/src/createPolywrapClient.ts index f67491ef23..a68d704194 100644 --- a/packages/js/client/src/createPolywrapClient.ts +++ b/packages/js/client/src/createPolywrapClient.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable prefer-const */ -import { PolywrapClient, Web3ApiClientConfig } from "./PolywrapClient"; +import { PolywrapClient, PolywrapClientConfig } from "./PolywrapClient"; import { PluginConfigs, modules, uris } from "./pluginConfigs"; import { PluginRegistration } from "@polywrap/core-js"; @@ -9,11 +9,11 @@ import { Tracer } from "@polywrap/tracing-js"; export { PluginConfigs }; -export const createWeb3ApiClient = Tracer.traceFunc( - "createWeb3ApiClient", +export const createPolywrapClient = Tracer.traceFunc( + "createPolywrapClient", async ( pluginConfigs: PluginConfigs, - config?: Partial + config?: Partial ): Promise => { const plugins: PluginRegistration[] = []; @@ -22,7 +22,7 @@ export const createWeb3ApiClient = Tracer.traceFunc( if (!modules[plugin]) { throw Error( - `Requested plugin "${plugin}" is not a supported createWeb3ApiClient plugin.` + `Requested plugin "${plugin}" is not a supported createPolywrapClient plugin.` ); } diff --git a/packages/js/client/src/default-client-config.ts b/packages/js/client/src/default-client-config.ts index 6dd748f3ac..8443721c22 100644 --- a/packages/js/client/src/default-client-config.ts +++ b/packages/js/client/src/default-client-config.ts @@ -5,7 +5,7 @@ import { Uri, coreInterfaceUris, PluginPackage, - Web3ApiManifest, + PolywrapManifest, Env, ExtendableUriResolver, CacheResolver, @@ -30,9 +30,9 @@ export const getDefaultClientConfig = Tracer.traceFunc( envs: [], redirects: [], plugins: [ - // IPFS is required for downloading Web3API packages + // IPFS is required for downloading Polywrap packages { - uri: new Uri("wrap://ens/ipfs.web3api.eth"), + uri: new Uri("wrap://ens/ipfs.polywrap.eth"), plugin: ipfsPlugin({ provider: defaultIpfsProviders[0], fallbackProviders: defaultIpfsProviders.slice(1), @@ -40,11 +40,11 @@ export const getDefaultClientConfig = Tracer.traceFunc( }, // ENS is required for resolving domain to IPFS hashes { - uri: new Uri("wrap://ens/ens.web3api.eth"), + uri: new Uri("wrap://ens/ens.polywrap.eth"), plugin: ensPlugin({}), }, { - uri: new Uri("wrap://ens/ethereum.web3api.eth"), + uri: new Uri("wrap://ens/ethereum.polywrap.eth"), plugin: ethereumPlugin({ networks: { mainnet: { @@ -55,29 +55,29 @@ export const getDefaultClientConfig = Tracer.traceFunc( }), }, { - uri: new Uri("wrap://ens/http.web3api.eth"), + uri: new Uri("wrap://ens/http.polywrap.eth"), plugin: httpPlugin({}), }, { - uri: new Uri("wrap://ens/js-logger.web3api.eth"), + uri: new Uri("wrap://ens/js-logger.polywrap.eth"), plugin: loggerPlugin({}), }, { - uri: new Uri("wrap://ens/uts46.web3api.eth"), + uri: new Uri("wrap://ens/uts46.polywrap.eth"), plugin: uts46Plugin({}), }, { - uri: new Uri("wrap://ens/sha3.web3api.eth"), + uri: new Uri("wrap://ens/sha3.polywrap.eth"), plugin: sha3Plugin({}), }, { - uri: new Uri("wrap://ens/graph-node.web3api.eth"), + uri: new Uri("wrap://ens/graph-node.polywrap.eth"), plugin: graphNodePlugin({ provider: "https://api.thegraph.com", }), }, { - uri: new Uri("wrap://ens/fs.web3api.eth"), + uri: new Uri("wrap://ens/fs.polywrap.eth"), plugin: filesystemPlugin({}), }, ], @@ -85,14 +85,14 @@ export const getDefaultClientConfig = Tracer.traceFunc( { interface: coreInterfaceUris.uriResolver, implementations: [ - new Uri("wrap://ens/ipfs.web3api.eth"), - new Uri("wrap://ens/ens.web3api.eth"), - new Uri("wrap://ens/fs.web3api.eth"), + new Uri("wrap://ens/ipfs.polywrap.eth"), + new Uri("wrap://ens/ens.polywrap.eth"), + new Uri("wrap://ens/fs.polywrap.eth"), ], }, { interface: coreInterfaceUris.logger, - implementations: [new Uri("wrap://ens/js-logger.web3api.eth")], + implementations: [new Uri("wrap://ens/js-logger.polywrap.eth")], }, ], uriResolvers: [ @@ -108,7 +108,7 @@ export const getDefaultClientConfig = Tracer.traceFunc( new ExtendableUriResolver( ( uri: Uri, - manifest: Web3ApiManifest, + manifest: PolywrapManifest, uriResolver: string, environment: Env | undefined ) => { diff --git a/packages/js/client/src/plugin/PluginWrapper.ts b/packages/js/client/src/plugin/PluginWrapper.ts index a3d88be93c..cc39da01ac 100644 --- a/packages/js/client/src/plugin/PluginWrapper.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -1,10 +1,10 @@ import { - Api, + Wrapper, Client, filterResults, GetManifestOptions, - InvokeApiOptions, - InvokeApiResult, + InvokeOptions, + InvokeResult, PluginModule, PluginPackage, Uri, @@ -17,7 +17,7 @@ import { } from "@polywrap/core-js"; import { Tracer } from "@polywrap/tracing-js"; -export class PluginWrapper extends Api { +export class PluginWrapper extends Wrapper { private _instance: PluginModule | undefined; private _sanitizedEnv: Record | undefined = undefined; @@ -58,9 +58,9 @@ export class PluginWrapper extends Api { @Tracer.traceMethod("PluginWrapper: invoke") public async invoke( - options: InvokeApiOptions, + options: InvokeOptions, client: Client - ): Promise> { + ): Promise> { try { const { method, resultFilter } = options; const input = options.input || {}; diff --git a/packages/js/client/src/pluginConfigs/index.ts b/packages/js/client/src/pluginConfigs/index.ts index 3b233fe759..7c6e9f06fc 100644 --- a/packages/js/client/src/pluginConfigs/index.ts +++ b/packages/js/client/src/pluginConfigs/index.ts @@ -19,9 +19,9 @@ const modules: Record = { }; const uris: Record = { - ipfs: "wrap://ens/ipfs.web3api.eth", - ethereum: "wrap://ens/ethereum.web3api.eth", - ens: "wrap://ens/ens.web3api.eth", + ipfs: "wrap://ens/ipfs.polywrap.eth", + ethereum: "wrap://ens/ethereum.polywrap.eth", + ens: "wrap://ens/ens.polywrap.eth", }; export { PluginConfigs, modules, uris }; diff --git a/packages/js/client/src/wasm/WasmWrapper.ts b/packages/js/client/src/wasm/WasmWrapper.ts index ce8f0f585f..4e830579f2 100644 --- a/packages/js/client/src/wasm/WasmWrapper.ts +++ b/packages/js/client/src/wasm/WasmWrapper.ts @@ -3,14 +3,14 @@ import { WrapExports } from "./types"; import { createImports } from "./imports"; import { - InvokeApiOptions, - InvokeApiResult, - Api, - Web3ApiManifest, + InvokeOptions, + InvokeResult, + Wrapper, + PolywrapManifest, Uri, Client, GetManifestOptions, - deserializeWeb3ApiManifest, + deserializePolywrapManifest, deserializeBuildManifest, deserializeMetaManifest, AnyManifestArtifact, @@ -63,7 +63,7 @@ export interface State { env?: ArrayBuffer; } -export class WasmWrapper extends Api { +export class WasmWrapper extends Wrapper { public static requiredExports: readonly string[] = ["_wrap_invoke"]; private _schema?: string; @@ -72,7 +72,7 @@ export class WasmWrapper extends Api { constructor( private _uri: Uri, - private _manifest: Web3ApiManifest, + private _manifest: PolywrapManifest, private _uriResolver: string, private _clientEnv?: Env ) { @@ -98,7 +98,7 @@ export class WasmWrapper extends Api { } let manifest: string | undefined; const fileTitle: string = - options.type === "web3api" ? "web3api" : "web3api." + options.type; + options.type === "polywrap" ? "polywrap" : "polywrap." + options.type; const manifestExts = ["json", "yaml", "yml"]; for (const ext of manifestExts) { @@ -126,7 +126,7 @@ export class WasmWrapper extends Api { manifest ) as AnyManifestArtifact; default: - return deserializeWeb3ApiManifest( + return deserializePolywrapManifest( manifest ) as AnyManifestArtifact; } @@ -140,8 +140,8 @@ export class WasmWrapper extends Api { const { path, encoding } = options; const { data, error } = await UriResolverInterface.Query.getFile( ( - options: InvokeApiOptions - ): Promise> => client.invoke(options), + options: InvokeOptions + ): Promise> => client.invoke(options), // TODO: support all types of URI resolvers (cache, etc) new Uri(this._uriResolver), combinePaths(this._uri.path, path) @@ -174,9 +174,9 @@ export class WasmWrapper extends Api { @Tracer.traceMethod("WasmWrapper: invoke") public async invoke( - options: InvokeApiOptions, + options: InvokeOptions, client: Client - ): Promise> { + ): Promise> { try { const { method, noDecode } = options; const input = options.input || {}; @@ -241,13 +241,13 @@ export class WasmWrapper extends Api { if (noDecode) { return { data: invokeResult.invokeResult, - } as InvokeApiResult; + } as InvokeResult; } try { return { data: msgpackDecode(invokeResult.invokeResult as ArrayBuffer), - } as InvokeApiResult; + } as InvokeResult; } catch (err) { throw Error( `WasmWrapper: Failed to decode query result.\nResult: ${JSON.stringify( diff --git a/packages/js/core/jest.config.js b/packages/js/core/jest.config.js index b156259895..6ac4f82580 100644 --- a/packages/js/core/jest.config.js +++ b/packages/js/core/jest.config.js @@ -3,7 +3,7 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', testMatch: ["**/?(*.)+(spec|test).[jt]s?(x)"], - modulePathIgnorePatterns: ['./src/__tests__/apis'], + modulePathIgnorePatterns: ['./src/__tests__/wrappers'], globals: { 'ts-jest': { diagnostics: false diff --git a/packages/js/core/package.json b/packages/js/core/package.json index 54a4b8ea05..b78e834af1 100644 --- a/packages/js/core/package.json +++ b/packages/js/core/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/core-js", - "description": "Web3API Javascript Core", + "description": "Polywrap Javascript Core", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/js/core/scripts/manifest/deserialize-ts.mustache b/packages/js/core/scripts/manifest/deserialize-ts.mustache index 8027283980..65a8e45188 100644 --- a/packages/js/core/scripts/manifest/deserialize-ts.mustache +++ b/packages/js/core/scripts/manifest/deserialize-ts.mustache @@ -51,7 +51,7 @@ export const deserialize{{type}} = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${any{{type}}.format}, please upgrade your PolywrapClient package.` + `Cannot downgrade Polywrap version ${any{{type}}.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/scripts/manifest/generateFormatTypes.js b/packages/js/core/scripts/manifest/generateFormatTypes.js index 9654b83125..d46882c057 100644 --- a/packages/js/core/scripts/manifest/generateFormatTypes.js +++ b/packages/js/core/scripts/manifest/generateFormatTypes.js @@ -11,7 +11,7 @@ async function generateFormatTypes() { "formats" ); - // Get all format types (web3api, web3api.build, etc) + // Get all format types (polywrap, polywrap.build, etc) const formatTypes = fs.readdirSync( formatsDir, { withFileTypes: true } ).filter((dirent) => dirent.isDirectory); diff --git a/packages/js/core/src/__tests__/InterfaceImplementations.spec.ts b/packages/js/core/src/__tests__/InterfaceImplementations.spec.ts index 283365e762..6321e92dd4 100644 --- a/packages/js/core/src/__tests__/InterfaceImplementations.spec.ts +++ b/packages/js/core/src/__tests__/InterfaceImplementations.spec.ts @@ -12,14 +12,14 @@ describe("sanitizeInterfaceImplementations", () => { const interfaces = sanitizeInterfaceImplementations([ { interface: "wrap://polywrap/interface", - implementations: ["wrap://polywrap/api1", "wrap://polywrap/api2"] + implementations: ["wrap://polywrap/wrapper1", "wrap://polywrap/wrapper2"] } ]); expect(interfaces).toEqual([ { interface: new Uri("wrap://polywrap/interface"), - implementations: [new Uri("wrap://polywrap/api1"), new Uri("wrap://polywrap/api2")] + implementations: [new Uri("wrap://polywrap/wrapper1"), new Uri("wrap://polywrap/wrapper2")] } ]); }); diff --git a/packages/js/core/src/__tests__/PluginRegistrations.spec.ts b/packages/js/core/src/__tests__/PluginRegistrations.spec.ts index 3d02843967..630c818f2f 100644 --- a/packages/js/core/src/__tests__/PluginRegistrations.spec.ts +++ b/packages/js/core/src/__tests__/PluginRegistrations.spec.ts @@ -11,14 +11,14 @@ describe("sanitizePluginRegistrations", () => { it("Returns plugins from plugins definitions", () => { const plugins = sanitizePluginRegistrations([ { - uri: "wrap://polywrap/api", + uri: "wrap://polywrap/wrapper", plugin: {} as PluginPackage, } ]); expect(plugins).toEqual([ { - uri: new Uri("wrap://polywrap/api"), + uri: new Uri("wrap://polywrap/wrapper"), plugin: {} as PluginPackage } ]); diff --git a/packages/js/core/src/__tests__/PolywrapManifest.spec.ts b/packages/js/core/src/__tests__/PolywrapManifest.spec.ts new file mode 100644 index 0000000000..c407b2e183 --- /dev/null +++ b/packages/js/core/src/__tests__/PolywrapManifest.spec.ts @@ -0,0 +1,35 @@ +import { deserializePolywrapManifest } from "../manifest"; + +import fs from "fs"; + +describe("Polywrap Manifest Validation", () => { + it("Should throw file string does not exist error", async () => { + const manifestPath = __dirname + "/manifest/polywrap/file-string-malformed/polywrap.yaml"; + const manifest = fs.readFileSync(manifestPath, "utf-8"); + + expect(() => deserializePolywrapManifest(manifest)).toThrowError(/instance.schema does not conform to the "graphqlFile" format/); + }); + it("Should throw incorrect version format error", async () => { + const manifestPath = __dirname + "/manifest/polywrap/incorrect-version-format/polywrap.yaml"; + const manifest = fs.readFileSync(manifestPath, "utf-8"); + + expect(() => deserializePolywrapManifest(manifest)).toThrowError(/Unrecognized PolywrapManifest schema format/); + }); + it("Should throw not accepted field error", async () => { + const manifestPath = __dirname + "/manifest/polywrap/not-accepted-field/polywrap.yaml"; + const manifest = fs.readFileSync(manifestPath, "utf-8"); + + expect(() => deserializePolywrapManifest(manifest)).toThrowError(/not allowed to have the additional property "not_accepted_field"/); + }); + it("Should throw required field missing error", async () => { + const manifestPath = __dirname + "/manifest/polywrap/required-field-missing/polywrap.yaml"; + const manifest = fs.readFileSync(manifestPath, "utf-8"); + expect(() => deserializePolywrapManifest(manifest)).toThrowError(/instance requires property "schema"/); + }); + it("Should throw wrong type error", async () => { + const manifestPath = __dirname + "/manifest/polywrap/wrong-type/polywrap.yaml"; + const manifest = fs.readFileSync(manifestPath, "utf-8"); + + expect(() => deserializePolywrapManifest(manifest)).toThrowError(/instance.module is not of a type\(s\) string/); + }); +}); diff --git a/packages/js/core/src/__tests__/UriRedirect.spec.ts b/packages/js/core/src/__tests__/UriRedirect.spec.ts index d186fa49ad..ea208904a2 100644 --- a/packages/js/core/src/__tests__/UriRedirect.spec.ts +++ b/packages/js/core/src/__tests__/UriRedirect.spec.ts @@ -11,15 +11,15 @@ describe("sanitizeUriRedirects", () => { it("Returns uri redirects from uri redirect definitions", () => { const redirects = sanitizeUriRedirects([ { - from: "wrap://polywrap/api", - to: "wrap://polywrap/api" + from: "wrap://polywrap/wrapper", + to: "wrap://polywrap/wrapper" } ]); expect(redirects).toEqual([ { - from: new Uri("wrap://polywrap/api"), - to: new Uri("wrap://polywrap/api") + from: new Uri("wrap://polywrap/wrapper"), + to: new Uri("wrap://polywrap/wrapper") } ]); }); diff --git a/packages/js/core/src/__tests__/Web3ApiManifest.spec.ts b/packages/js/core/src/__tests__/Web3ApiManifest.spec.ts deleted file mode 100644 index 1dafcdc668..0000000000 --- a/packages/js/core/src/__tests__/Web3ApiManifest.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { deserializeWeb3ApiManifest } from "../manifest"; - -import fs from "fs"; - -describe("Web3API Manifest Validation", () => { - it("Should throw file string does not exist error", async () => { - const manifestPath = __dirname + "/manifest/web3api/file-string-malformed/web3api.yaml"; - const manifest = fs.readFileSync(manifestPath, "utf-8"); - - expect(() => deserializeWeb3ApiManifest(manifest)).toThrowError(/instance.schema does not conform to the "graphqlFile" format/); - }); - it("Should throw incorrect version format error", async () => { - const manifestPath = __dirname + "/manifest/web3api/incorrect-version-format/web3api.yaml"; - const manifest = fs.readFileSync(manifestPath, "utf-8"); - - expect(() => deserializeWeb3ApiManifest(manifest)).toThrowError(/Unrecognized Web3ApiManifest schema format/); - }); - it("Should throw not accepted field error", async () => { - const manifestPath = __dirname + "/manifest/web3api/not-accepted-field/web3api.yaml"; - const manifest = fs.readFileSync(manifestPath, "utf-8"); - - expect(() => deserializeWeb3ApiManifest(manifest)).toThrowError(/not allowed to have the additional property "not_accepted_field"/); - }); - it("Should throw required field missing error", async () => { - const manifestPath = __dirname + "/manifest/web3api/required-field-missing/web3api.yaml"; - const manifest = fs.readFileSync(manifestPath, "utf-8"); - expect(() => deserializeWeb3ApiManifest(manifest)).toThrowError(/instance requires property "schema"/); - }); - it("Should throw wrong type error", async () => { - const manifestPath = __dirname + "/manifest/web3api/wrong-type/web3api.yaml"; - const manifest = fs.readFileSync(manifestPath, "utf-8"); - - expect(() => deserializeWeb3ApiManifest(manifest)).toThrowError(/instance.module is not of a type\(s\) string/); - }); -}); diff --git a/packages/js/core/src/__tests__/manifest/web3api/file-string-malformed/web3api.yaml b/packages/js/core/src/__tests__/manifest/polywrap/file-string-malformed/polywrap.yaml similarity index 100% rename from packages/js/core/src/__tests__/manifest/web3api/file-string-malformed/web3api.yaml rename to packages/js/core/src/__tests__/manifest/polywrap/file-string-malformed/polywrap.yaml diff --git a/packages/js/core/src/__tests__/manifest/web3api/incorrect-version-format/web3api.yaml b/packages/js/core/src/__tests__/manifest/polywrap/incorrect-version-format/polywrap.yaml similarity index 100% rename from packages/js/core/src/__tests__/manifest/web3api/incorrect-version-format/web3api.yaml rename to packages/js/core/src/__tests__/manifest/polywrap/incorrect-version-format/polywrap.yaml diff --git a/packages/js/core/src/__tests__/manifest/web3api/main.ts b/packages/js/core/src/__tests__/manifest/polywrap/main.ts similarity index 100% rename from packages/js/core/src/__tests__/manifest/web3api/main.ts rename to packages/js/core/src/__tests__/manifest/polywrap/main.ts diff --git a/packages/js/core/src/__tests__/manifest/web3api/not-accepted-field/web3api.yaml b/packages/js/core/src/__tests__/manifest/polywrap/not-accepted-field/polywrap.yaml similarity index 100% rename from packages/js/core/src/__tests__/manifest/web3api/not-accepted-field/web3api.yaml rename to packages/js/core/src/__tests__/manifest/polywrap/not-accepted-field/polywrap.yaml diff --git a/packages/js/core/src/__tests__/manifest/web3api/required-field-missing/web3api.yaml b/packages/js/core/src/__tests__/manifest/polywrap/required-field-missing/polywrap.yaml similarity index 100% rename from packages/js/core/src/__tests__/manifest/web3api/required-field-missing/web3api.yaml rename to packages/js/core/src/__tests__/manifest/polywrap/required-field-missing/polywrap.yaml diff --git a/packages/js/core/src/__tests__/manifest/web3api/schema.graphql b/packages/js/core/src/__tests__/manifest/polywrap/schema.graphql similarity index 100% rename from packages/js/core/src/__tests__/manifest/web3api/schema.graphql rename to packages/js/core/src/__tests__/manifest/polywrap/schema.graphql diff --git a/packages/js/core/src/__tests__/manifest/web3api/wrong-type/web3api.yaml b/packages/js/core/src/__tests__/manifest/polywrap/wrong-type/polywrap.yaml similarity index 100% rename from packages/js/core/src/__tests__/manifest/web3api/wrong-type/web3api.yaml rename to packages/js/core/src/__tests__/manifest/polywrap/wrong-type/polywrap.yaml diff --git a/packages/js/core/src/__tests__/parse-query.spec.ts b/packages/js/core/src/__tests__/parse-query.spec.ts index df788898b3..a789f1543f 100644 --- a/packages/js/core/src/__tests__/parse-query.spec.ts +++ b/packages/js/core/src/__tests__/parse-query.spec.ts @@ -1,4 +1,4 @@ -import { createQueryDocument, parseQuery, QueryApiInvocations, Uri } from "../"; +import { createQueryDocument, parseQuery, QueryInvocations, Uri } from "../"; describe("parseQuery", () => { const dummy = new Uri("wrap://dumb/dummy"); @@ -36,7 +36,7 @@ describe("parseQuery", () => { varTwo: 55, }); - const expected: QueryApiInvocations = { + const expected: QueryInvocations = { someMethod: { uri: dummy, method: "someMethod", @@ -141,7 +141,7 @@ describe("parseQuery", () => { varTwo: 55, }); - const method1: QueryApiInvocations = { + const method1: QueryInvocations = { someMethod: { uri: dummy, method: "someMethod", @@ -165,7 +165,7 @@ describe("parseQuery", () => { } } }; - const method2: QueryApiInvocations = { + const method2: QueryInvocations = { anotherMethod: { uri: dummy, method: "anotherMethod", @@ -182,7 +182,7 @@ describe("parseQuery", () => { } }; - const expected: QueryApiInvocations = { + const expected: QueryInvocations = { ...method1, ...method2, mutationSomeMethod: method1.someMethod, diff --git a/packages/js/core/src/__tests__/resolveUri.spec.ts b/packages/js/core/src/__tests__/resolveUri.spec.ts index 698e6e4d3b..199c0fce2a 100644 --- a/packages/js/core/src/__tests__/resolveUri.spec.ts +++ b/packages/js/core/src/__tests__/resolveUri.spec.ts @@ -2,13 +2,13 @@ import { UriResolverInterface, coreInterfaceUris, Client, - InvokeApiOptions, - InvokeApiResult, - Web3ApiManifest, + InvokeOptions, + InvokeResult, + PolywrapManifest, PluginModule, PluginPackage, - QueryApiOptions, - QueryApiResult, + QueryOptions, + QueryResult, Uri, UriRedirect, AnyManifestArtifact, @@ -18,7 +18,7 @@ import { RedirectsResolver, ExtendableUriResolver, PluginResolver, - Api, + Wrapper, Env, GetFileOptions, GetImplementationsOptions, @@ -31,7 +31,7 @@ import { describe("resolveUri", () => { const client = ( - apis: Record, + wrappers: Record, plugins: PluginRegistration[] = [], interfaces: InterfaceImplementations[] = [], redirects: UriRedirect[] = [] @@ -45,8 +45,8 @@ describe("resolveUri", () => { TData extends Record = Record, TVariables extends Record = Record >( - _options: QueryApiOptions - ): Promise> => { + _options: QueryOptions + ): Promise> => { return Promise.resolve({ data: ({ foo: "foo", @@ -54,15 +54,15 @@ describe("resolveUri", () => { }); }, invoke: ( - options: InvokeApiOptions - ): Promise> => { + options: InvokeOptions + ): Promise> => { let uri = options.uri; if (Uri.isUri(uri)) { uri = uri.uri; } return Promise.resolve({ // @ts-ignore - data: apis[uri]?.[options.method]( + data: wrappers[uri]?.[options.method]( options.input as Record, {} as Client ) as TData @@ -79,7 +79,7 @@ describe("resolveUri", () => { isActive: false, stop: () => {}, async *[Symbol.asyncIterator](): AsyncGenerator< - QueryApiResult + QueryResult > {}, }; }, @@ -96,7 +96,7 @@ describe("resolveUri", () => { const manifest = { format: "0.0.1-prealpha.8", language: "", - __type: "Web3ApiManifest", + __type: "PolywrapManifest", }; return Promise.resolve(manifest as AnyManifestArtifact); }, @@ -111,13 +111,13 @@ describe("resolveUri", () => { }, } as unknown) as Client); - const createPluginApi = (uri: Uri, plugin: PluginPackage): Api => { + const createPluginWrapper = (uri: Uri, plugin: PluginPackage): Wrapper => { return { invoke: () => Promise.resolve({ uri, plugin, - } as InvokeApiResult), + } as InvokeResult), getSchema: (_client: Client): Promise => Promise.resolve(""), getFile: (options: GetFileOptions, client: Client) => Promise.resolve(""), getManifest: ( @@ -134,18 +134,18 @@ describe("resolveUri", () => { }; }; - const createApi = ( + const createWrapper = ( uri: Uri, - manifest: Web3ApiManifest, + manifest: PolywrapManifest, uriResolver: string - ): Api => { + ): Wrapper => { return { invoke: () => Promise.resolve({ uri, manifest, uriResolver, - } as InvokeApiResult), + } as InvokeResult), getSchema: (_client: Client): Promise => Promise.resolve(""), getFile: (options: GetFileOptions, client: Client) => Promise.resolve(""), getManifest: ( @@ -157,14 +157,14 @@ describe("resolveUri", () => { language: "", module: "", schema: "", - __type: "Web3ApiManifest", + __type: "PolywrapManifest", }; return Promise.resolve(manifest as AnyManifestArtifact); }, }; }; - const ensApi = { + const ensWrapper = { tryResolveUri: ( input: { authority: string; path: string }, _client: Client @@ -175,7 +175,7 @@ describe("resolveUri", () => { }, }; - const ipfsApi = { + const ipfsWrapper = { tryResolveUri: ( input: { authority: string; path: string }, _client: Client @@ -189,7 +189,7 @@ describe("resolveUri", () => { } }; - const pluginApi = { + const pluginWrapper = { tryResolveUri: ( input: { authority: string; path: string }, _client: Client @@ -225,25 +225,25 @@ describe("resolveUri", () => { }, ]; - const apis: Record = { - "wrap://ens/ens": ensApi as unknown as PluginModule, - "wrap://ens/ipfs": ipfsApi as unknown as PluginModule, - "wrap://ens/my-plugin": pluginApi as unknown as PluginModule, + const wrappers: Record = { + "wrap://ens/ens": ensWrapper as unknown as PluginModule, + "wrap://ens/ipfs": ipfsWrapper as unknown as PluginModule, + "wrap://ens/my-plugin": pluginWrapper as unknown as PluginModule, }; const uriResolvers: UriResolver[] = [ new RedirectsResolver(), new PluginResolver((uri: Uri, plugin: PluginPackage) => - createPluginApi(uri, plugin) + createPluginWrapper(uri, plugin) ), new ExtendableUriResolver( ( uri: Uri, - manifest: Web3ApiManifest, + manifest: PolywrapManifest, uriResolver: string, environment: Env | undefined ) => { - return createApi(uri, manifest, uriResolver); + return createWrapper(uri, manifest, uriResolver); }, { noValidate: true }, true @@ -251,32 +251,32 @@ describe("resolveUri", () => { ]; it("sanity", () => { - const api = new Uri("wrap://ens/ens"); + const wrapper = new Uri("wrap://ens/ens"); const file = new Uri("wrap/some-file"); const path = "wrap/some-path"; const query = UriResolverInterface.Query; const uri = new Uri("wrap/some-uri"); - expect(query.tryResolveUri(client(apis).invoke, api, uri)).toBeDefined(); - expect(query.getFile(client(apis).invoke, file, path)).toBeDefined(); + expect(query.tryResolveUri(client(wrappers).invoke, wrapper, uri)).toBeDefined(); + expect(query.getFile(client(wrappers).invoke, file, path)).toBeDefined(); }); it("works in the typical case", async () => { const result = await resolveUri( new Uri("ens/test.eth"), uriResolvers, - client(apis, plugins, interfaces), - new Map(), + client(wrappers, plugins, interfaces), + new Map(), ); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); - const apiIdentity = await result.api!.invoke( - {} as InvokeApiOptions, + const wrapperIdentity = await result.wrapper!.invoke( + {} as InvokeOptions, {} as Client ); - expect(apiIdentity).toMatchObject({ + expect(wrapperIdentity).toMatchObject({ uri: new Uri("ipfs/QmHash"), manifest: { format: "0.0.1-prealpha.9", @@ -289,18 +289,18 @@ describe("resolveUri", () => { const result = await resolveUri( new Uri("my/something-different"), uriResolvers, - client(apis, plugins, interfaces), - new Map(), + client(wrappers, plugins, interfaces), + new Map(), ); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); - const apiIdentity = await result.api!.invoke( - {} as InvokeApiOptions, + const wrapperIdentity = await result.wrapper!.invoke( + {} as InvokeOptions, {} as Client ); - expect(apiIdentity).toMatchObject({ + expect(wrapperIdentity).toMatchObject({ uri: new Uri("my/something-different"), manifest: { format: "0.0.1-prealpha.9", @@ -309,22 +309,22 @@ describe("resolveUri", () => { }); }); - it("works when direct query a Web3API that implements the uri-resolver", async () => { + it("works when direct query a Polywrap that implements the uri-resolver", async () => { const result = await resolveUri( new Uri("ens/ens"), uriResolvers, - client(apis, plugins, interfaces), - new Map(), + client(wrappers, plugins, interfaces), + new Map(), ); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); - const apiIdentity = await result.api!.invoke( - {} as InvokeApiOptions, + const wrapperIdentity = await result.wrapper!.invoke( + {} as InvokeOptions, {} as Client ); - expect(apiIdentity).toMatchObject({ + expect(wrapperIdentity).toMatchObject({ uri: new Uri("ipfs/QmHash"), manifest: { format: "0.0.1-prealpha.9", @@ -334,22 +334,22 @@ describe("resolveUri", () => { }); }); - it("works when direct query a plugin Web3API that implements the uri-resolver", async () => { + it("works when direct query a plugin Polywrap that implements the uri-resolver", async () => { const result = await resolveUri( new Uri("my/something-different"), uriResolvers, - client(apis, plugins, interfaces), - new Map(), + client(wrappers, plugins, interfaces), + new Map(), ); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); - const apiIdentity = await result.api!.invoke( - {} as InvokeApiOptions, + const wrapperIdentity = await result.wrapper!.invoke( + {} as InvokeOptions, {} as Client ); - expect(apiIdentity).toMatchObject({ + expect(wrapperIdentity).toMatchObject({ uri: new Uri("my/something-different"), manifest: { format: "0.0.1-prealpha.9", @@ -361,22 +361,22 @@ describe("resolveUri", () => { it("returns an error when circular redirect loops are found", async () => { const circular: UriRedirect[] = [ { - from: new Uri("some/api"), - to: new Uri("ens/api"), + from: new Uri("some/wrapper"), + to: new Uri("ens/wrapper"), }, { - from: new Uri("ens/api"), - to: new Uri("some/api"), + from: new Uri("ens/wrapper"), + to: new Uri("some/wrapper"), }, ]; expect.assertions(1); return resolveUri( - new Uri("some/api"), + new Uri("some/wrapper"), uriResolvers, - client(apis, plugins, interfaces, circular), - new Map(), + client(wrappers, plugins, interfaces, circular), + new Map(), ).catch((e: Error) => expect(e.message).toMatch(/Infinite loop while resolving URI/) ); @@ -385,34 +385,34 @@ describe("resolveUri", () => { it("throws when redirect missing the from property", async () => { const missingFromProperty: UriRedirect[] = [ { - from: new Uri("some/api"), - to: new Uri("ens/api"), + from: new Uri("some/wrapper"), + to: new Uri("ens/wrapper"), }, { from: null as any, - to: new Uri("another/api"), + to: new Uri("another/wrapper"), }, ]; expect.assertions(1); return resolveUri( - new Uri("some/api"), + new Uri("some/wrapper"), uriResolvers, - client(apis, plugins, interfaces, missingFromProperty), - new Map(), + client(wrappers, plugins, interfaces, missingFromProperty), + new Map(), ).catch((e: Error) => expect(e.message).toMatch( - "Redirect missing the from property.\nEncountered while resolving wrap://some/api" + "Redirect missing the from property.\nEncountered while resolving wrap://some/wrapper" ) ); }); - it("works when a Web3API registers a Plugin", async () => { + it("works when a Polywrap registers a Plugin", async () => { const pluginRegistrations: PluginRegistration[] = [ ...plugins, { - uri: new Uri("some/api"), + uri: new Uri("some/wrapper"), plugin: { factory: () => ({} as Plugin), manifest: { @@ -424,24 +424,24 @@ describe("resolveUri", () => { ]; const result = await resolveUri( - new Uri("some/api"), + new Uri("some/wrapper"), uriResolvers, - client(apis, pluginRegistrations, interfaces), - new Map(), + client(wrappers, pluginRegistrations, interfaces), + new Map(), ); - expect(result.api).toBeTruthy(); + expect(result.wrapper).toBeTruthy(); - const apiIdentity = await result.api!.invoke( - {} as InvokeApiOptions, + const wrapperIdentity = await result.wrapper!.invoke( + {} as InvokeOptions, {} as Client ); - expect(apiIdentity.error).toBeUndefined(); + expect(wrapperIdentity.error).toBeUndefined(); }); - it("returns URI when it does not resolve to an API", async () => { - const faultyIpfsApi = { + it("returns URI when it does not resolve to an Wrapper", async () => { + const faultyIpfsWrapper = { tryResolveUri: ( input: { authority: string; path: string }, _client: Client @@ -452,24 +452,24 @@ describe("resolveUri", () => { }, }; - const uri = new Uri("some/api"); + const uri = new Uri("some/wrapper"); - const { uri: resolvedUri, api, error } = await resolveUri( + const { uri: resolvedUri, wrapper, error } = await resolveUri( uri, uriResolvers, client( { - ...apis, - "wrap://ens/ipfs": faultyIpfsApi as unknown as PluginModule + ...wrappers, + "wrap://ens/ipfs": faultyIpfsWrapper as unknown as PluginModule }, plugins, interfaces ), - new Map(), + new Map(), ); expect(resolvedUri).toEqual(uri); - expect(api).toBeFalsy(); + expect(wrapper).toBeFalsy(); expect(error).toBeFalsy(); }); }); diff --git a/packages/js/core/src/algorithms/get-implementations.ts b/packages/js/core/src/algorithms/get-implementations.ts index 6381e039b4..799143f0a9 100644 --- a/packages/js/core/src/algorithms/get-implementations.ts +++ b/packages/js/core/src/algorithms/get-implementations.ts @@ -6,7 +6,7 @@ import { Tracer } from "@polywrap/tracing-js"; export const getImplementations = Tracer.traceFunc( "core: getImplementations", ( - apiInterfaceUri: Uri, + wrapperInterfaceUri: Uri, interfaces: readonly InterfaceImplementations[], redirects?: readonly UriRedirect[] ): Uri[] => { @@ -21,14 +21,14 @@ export const getImplementations = Tracer.traceFunc( const addAllImplementationsFromImplementationsArray = ( implementationsArray: readonly InterfaceImplementations[], - apiInterfaceUri: Uri + wrapperInterfaceUri: Uri ) => { for (const interfaceImplementations of implementationsArray) { const fullyResolvedUri = redirects ? applyRedirects(interfaceImplementations.interface, redirects) : interfaceImplementations.interface; - if (Uri.equals(fullyResolvedUri, apiInterfaceUri)) { + if (Uri.equals(fullyResolvedUri, wrapperInterfaceUri)) { for (const implementation of interfaceImplementations.implementations) { addUniqueResult(implementation); } @@ -36,10 +36,10 @@ export const getImplementations = Tracer.traceFunc( } }; - let finalUri = apiInterfaceUri; + let finalUri = wrapperInterfaceUri; if (redirects) { - finalUri = applyRedirects(apiInterfaceUri, redirects); + finalUri = applyRedirects(wrapperInterfaceUri, redirects); } addAllImplementationsFromImplementationsArray(interfaces, finalUri); diff --git a/packages/js/core/src/algorithms/parse-query.ts b/packages/js/core/src/algorithms/parse-query.ts index 56df62a1b4..99c4de4000 100644 --- a/packages/js/core/src/algorithms/parse-query.ts +++ b/packages/js/core/src/algorithms/parse-query.ts @@ -1,4 +1,4 @@ -import { QueryApiInvocations, QueryDocument, Uri } from "../types"; +import { QueryInvocations, QueryDocument, Uri } from "../types"; import { SelectionSetNode, ValueNode } from "graphql"; import { Tracer } from "@polywrap/tracing-js"; @@ -9,12 +9,12 @@ export const parseQuery = Tracer.traceFunc( uri: Uri, doc: QueryDocument, variables?: Record - ): QueryApiInvocations => { + ): QueryInvocations => { if (doc.definitions.length === 0) { throw Error("Empty query document found."); } - const queryInvocations: QueryApiInvocations = {}; + const queryInvocations: QueryInvocations = {}; for (const def of doc.definitions) { if (def.kind !== "OperationDefinition") { diff --git a/packages/js/core/src/interfaces/core-interface-uris.ts b/packages/js/core/src/interfaces/core-interface-uris.ts index dcfc1a37fb..317ea5f684 100644 --- a/packages/js/core/src/interfaces/core-interface-uris.ts +++ b/packages/js/core/src/interfaces/core-interface-uris.ts @@ -1,6 +1,6 @@ import { Uri } from "../"; export const coreInterfaceUris = { - uriResolver: new Uri("wrap://ens/uri-resolver.core.web3api.eth"), - logger: new Uri("wrap://ens/logger.core.web3api.eth"), + uriResolver: new Uri("wrap://ens/uri-resolver.core.polywrap.eth"), + logger: new Uri("wrap://ens/logger.core.polywrap.eth"), }; diff --git a/packages/js/core/src/interfaces/uri-resolver.ts b/packages/js/core/src/interfaces/uri-resolver.ts index b2d2168358..1473298488 100644 --- a/packages/js/core/src/interfaces/uri-resolver.ts +++ b/packages/js/core/src/interfaces/uri-resolver.ts @@ -1,5 +1,5 @@ -// TODO: https://github.com/web3-api/monorepo/issues/101 -import { Uri, InvokeHandler, InvokeApiResult } from "../"; +// TODO: https://github.com/polywrap/monorepo/issues/101 +import { Uri, InvokeHandler, InvokeResult } from "../"; import { Tracer } from "@polywrap/tracing-js"; @@ -14,11 +14,11 @@ export const Query = { "core: uri-resolver: tryResolveUri", async ( invoke: InvokeHandler["invoke"], - api: Uri, + wrapper: Uri, uri: Uri - ): Promise> => { + ): Promise> => { return invoke({ - uri: api.uri, + uri: wrapper.uri, method: `tryResolveUri`, input: { authority: uri.authority, @@ -31,11 +31,11 @@ export const Query = { "core: uri-resolver: getFile", async ( invoke: InvokeHandler["invoke"], - api: Uri, + wrapper: Uri, path: string - ): Promise> => { + ): Promise> => { return invoke({ - uri: api.uri, + uri: wrapper.uri, method: "getFile", input: { path, diff --git a/packages/js/core/src/manifest/formats/index.ts b/packages/js/core/src/manifest/formats/index.ts index 64cc99a177..c1bae5a6f0 100644 --- a/packages/js/core/src/manifest/formats/index.ts +++ b/packages/js/core/src/manifest/formats/index.ts @@ -1,19 +1,19 @@ -export * from "./web3api"; -export * from "./web3api.build"; -export * from "./web3api.infra"; -export * from "./web3api.deploy"; -export * from "./web3api.meta"; -export * from "./web3api.plugin"; -export * from "./web3api.app"; +export * from "./polywrap"; +export * from "./polywrap.build"; +export * from "./polywrap.infra"; +export * from "./polywrap.deploy"; +export * from "./polywrap.meta"; +export * from "./polywrap.plugin"; +export * from "./polywrap.app"; -import { Web3ApiManifest } from "./web3api"; -import { BuildManifest } from "./web3api.build"; -import { InfraManifest } from "./web3api.infra"; -import { DeployManifest } from "./web3api.deploy"; -import { MetaManifest } from "./web3api.meta"; +import { PolywrapManifest } from "./polywrap"; +import { BuildManifest } from "./polywrap.build"; +import { InfraManifest } from "./polywrap.infra"; +import { DeployManifest } from "./polywrap.deploy"; +import { MetaManifest } from "./polywrap.meta"; export type ManifestArtifactType = - | "web3api" + | "polywrap" | "meta" | "build" | "deploy" @@ -21,8 +21,8 @@ export type ManifestArtifactType = export type AnyManifestArtifact< TManifestType extends ManifestArtifactType -> = TManifestType extends "web3api" - ? Web3ApiManifest +> = TManifestType extends "polywrap" + ? PolywrapManifest : TManifestType extends "build" ? BuildManifest : TManifestType extends "infra" diff --git a/packages/js/core/src/manifest/formats/web3api.app/0.0.1-prealpha.1.ts b/packages/js/core/src/manifest/formats/polywrap.app/0.0.1-prealpha.1.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.app/0.0.1-prealpha.1.ts rename to packages/js/core/src/manifest/formats/polywrap.app/0.0.1-prealpha.1.ts diff --git a/packages/js/core/src/manifest/formats/web3api.app/0.0.1-prealpha.2.ts b/packages/js/core/src/manifest/formats/polywrap.app/0.0.1-prealpha.2.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.app/0.0.1-prealpha.2.ts rename to packages/js/core/src/manifest/formats/polywrap.app/0.0.1-prealpha.2.ts diff --git a/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts b/packages/js/core/src/manifest/formats/polywrap.app/deserialize.ts similarity index 93% rename from packages/js/core/src/manifest/formats/web3api.app/deserialize.ts rename to packages/js/core/src/manifest/formats/polywrap.app/deserialize.ts index 377d86965d..d9fce0ee76 100644 --- a/packages/js/core/src/manifest/formats/web3api.app/deserialize.ts +++ b/packages/js/core/src/manifest/formats/polywrap.app/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeAppManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyAppManifest.format}, please upgrade your PolywrapClient package.` + `Cannot downgrade Polywrap version ${anyAppManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.app/index.ts b/packages/js/core/src/manifest/formats/polywrap.app/index.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.app/index.ts rename to packages/js/core/src/manifest/formats/polywrap.app/index.ts diff --git a/packages/js/core/src/manifest/formats/web3api.app/migrate.ts b/packages/js/core/src/manifest/formats/polywrap.app/migrate.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.app/migrate.ts rename to packages/js/core/src/manifest/formats/polywrap.app/migrate.ts diff --git a/packages/js/core/src/manifest/formats/web3api.app/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts b/packages/js/core/src/manifest/formats/polywrap.app/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.app/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts rename to packages/js/core/src/manifest/formats/polywrap.app/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts diff --git a/packages/js/core/src/manifest/formats/web3api.app/validate.ts b/packages/js/core/src/manifest/formats/polywrap.app/validate.ts similarity index 92% rename from packages/js/core/src/manifest/formats/web3api.app/validate.ts rename to packages/js/core/src/manifest/formats/polywrap.app/validate.ts index ced730a31c..7e7a4a4477 100644 --- a/packages/js/core/src/manifest/formats/web3api.app/validate.ts +++ b/packages/js/core/src/manifest/formats/polywrap.app/validate.ts @@ -9,8 +9,8 @@ import { AppManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.app/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.app/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/polywrap.app/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/polywrap.app/0.0.1-prealpha.2.json"; import { Tracer } from "@polywrap/tracing-js" import { @@ -33,7 +33,7 @@ const validator = new Validator(); Validator.prototype.customFormats.appLanguage = Validators.appLanguage; Validator.prototype.customFormats.file = Validators.file; -Validator.prototype.customFormats.web3apiUri = Validators.web3apiUri; +Validator.prototype.customFormats.polywrapUri = Validators.polywrapUri; Validator.prototype.customFormats.schemaFile = Validators.schemaFile; Validator.prototype.customFormats.packageName = Validators.packageName; diff --git a/packages/js/core/src/manifest/formats/web3api.build/0.0.1-prealpha.1.ts b/packages/js/core/src/manifest/formats/polywrap.build/0.0.1-prealpha.1.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.build/0.0.1-prealpha.1.ts rename to packages/js/core/src/manifest/formats/polywrap.build/0.0.1-prealpha.1.ts diff --git a/packages/js/core/src/manifest/formats/web3api.build/0.0.1-prealpha.2.ts b/packages/js/core/src/manifest/formats/polywrap.build/0.0.1-prealpha.2.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.build/0.0.1-prealpha.2.ts rename to packages/js/core/src/manifest/formats/polywrap.build/0.0.1-prealpha.2.ts diff --git a/packages/js/core/src/manifest/formats/web3api.build/0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.build/0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.build/0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.build/0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts b/packages/js/core/src/manifest/formats/polywrap.build/deserialize.ts similarity index 93% rename from packages/js/core/src/manifest/formats/web3api.build/deserialize.ts rename to packages/js/core/src/manifest/formats/polywrap.build/deserialize.ts index 2038fff745..afb44828c1 100644 --- a/packages/js/core/src/manifest/formats/web3api.build/deserialize.ts +++ b/packages/js/core/src/manifest/formats/polywrap.build/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeBuildManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyBuildManifest.format}, please upgrade your PolywrapClient package.` + `Cannot downgrade Polywrap version ${anyBuildManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.build/index.ts b/packages/js/core/src/manifest/formats/polywrap.build/index.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.build/index.ts rename to packages/js/core/src/manifest/formats/polywrap.build/index.ts diff --git a/packages/js/core/src/manifest/formats/web3api.build/migrate.ts b/packages/js/core/src/manifest/formats/polywrap.build/migrate.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.build/migrate.ts rename to packages/js/core/src/manifest/formats/polywrap.build/migrate.ts diff --git a/packages/js/core/src/manifest/formats/web3api.build/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.build/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.build/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.build/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.build/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.build/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.build/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.build/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.build/validate.ts b/packages/js/core/src/manifest/formats/polywrap.build/validate.ts similarity index 94% rename from packages/js/core/src/manifest/formats/web3api.build/validate.ts rename to packages/js/core/src/manifest/formats/polywrap.build/validate.ts index fd87ed0f55..ffa751200f 100644 --- a/packages/js/core/src/manifest/formats/web3api.build/validate.ts +++ b/packages/js/core/src/manifest/formats/polywrap.build/validate.ts @@ -9,9 +9,9 @@ import { BuildManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.build/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.build/0.0.1-prealpha.2.json"; -import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/web3api.build/0.0.1-prealpha.3.json"; +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.3.json"; import { Tracer } from "@polywrap/tracing-js" import { diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/0.0.1-prealpha.1.ts b/packages/js/core/src/manifest/formats/polywrap.deploy/0.0.1-prealpha.1.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.deploy/0.0.1-prealpha.1.ts rename to packages/js/core/src/manifest/formats/polywrap.deploy/0.0.1-prealpha.1.ts diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts b/packages/js/core/src/manifest/formats/polywrap.deploy/deserialize.ts similarity index 93% rename from packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts rename to packages/js/core/src/manifest/formats/polywrap.deploy/deserialize.ts index cc013874d3..29aebd0d5e 100644 --- a/packages/js/core/src/manifest/formats/web3api.deploy/deserialize.ts +++ b/packages/js/core/src/manifest/formats/polywrap.deploy/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeDeployManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyDeployManifest.format}, please upgrade your PolywrapClient package.` + `Cannot downgrade Polywrap version ${anyDeployManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/index.ts b/packages/js/core/src/manifest/formats/polywrap.deploy/index.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.deploy/index.ts rename to packages/js/core/src/manifest/formats/polywrap.deploy/index.ts diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/migrate.ts b/packages/js/core/src/manifest/formats/polywrap.deploy/migrate.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.deploy/migrate.ts rename to packages/js/core/src/manifest/formats/polywrap.deploy/migrate.ts diff --git a/packages/js/core/src/manifest/formats/web3api.deploy/validate.ts b/packages/js/core/src/manifest/formats/polywrap.deploy/validate.ts similarity index 93% rename from packages/js/core/src/manifest/formats/web3api.deploy/validate.ts rename to packages/js/core/src/manifest/formats/polywrap.deploy/validate.ts index b0d36d34cf..62232865eb 100644 --- a/packages/js/core/src/manifest/formats/web3api.deploy/validate.ts +++ b/packages/js/core/src/manifest/formats/polywrap.deploy/validate.ts @@ -9,7 +9,7 @@ import { DeployManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.deploy/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/polywrap.deploy/0.0.1-prealpha.1.json"; import { Tracer } from "@polywrap/tracing-js" import { @@ -29,7 +29,7 @@ const schemas: DeployManifestSchemas = { const validator = new Validator(); -Validator.prototype.customFormats.web3apiUri = Validators.web3apiUri; +Validator.prototype.customFormats.polywrapUri = Validators.polywrapUri; export const validateDeployManifest = Tracer.traceFunc( "core: validateDeployManifest", diff --git a/packages/js/core/src/manifest/formats/web3api.infra/0.0.1-prealpha.1.ts b/packages/js/core/src/manifest/formats/polywrap.infra/0.0.1-prealpha.1.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.infra/0.0.1-prealpha.1.ts rename to packages/js/core/src/manifest/formats/polywrap.infra/0.0.1-prealpha.1.ts diff --git a/packages/js/core/src/manifest/formats/web3api.infra/0.0.1-prealpha.2.ts b/packages/js/core/src/manifest/formats/polywrap.infra/0.0.1-prealpha.2.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.infra/0.0.1-prealpha.2.ts rename to packages/js/core/src/manifest/formats/polywrap.infra/0.0.1-prealpha.2.ts diff --git a/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts b/packages/js/core/src/manifest/formats/polywrap.infra/deserialize.ts similarity index 93% rename from packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts rename to packages/js/core/src/manifest/formats/polywrap.infra/deserialize.ts index 506f258b67..fc28d02786 100644 --- a/packages/js/core/src/manifest/formats/web3api.infra/deserialize.ts +++ b/packages/js/core/src/manifest/formats/polywrap.infra/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeInfraManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyInfraManifest.format}, please upgrade your PolywrapClient package.` + `Cannot downgrade Polywrap version ${anyInfraManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.infra/index.ts b/packages/js/core/src/manifest/formats/polywrap.infra/index.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.infra/index.ts rename to packages/js/core/src/manifest/formats/polywrap.infra/index.ts diff --git a/packages/js/core/src/manifest/formats/web3api.infra/migrate.ts b/packages/js/core/src/manifest/formats/polywrap.infra/migrate.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.infra/migrate.ts rename to packages/js/core/src/manifest/formats/polywrap.infra/migrate.ts diff --git a/packages/js/core/src/manifest/formats/web3api.infra/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts b/packages/js/core/src/manifest/formats/polywrap.infra/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.infra/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts rename to packages/js/core/src/manifest/formats/polywrap.infra/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2.ts diff --git a/packages/js/core/src/manifest/formats/web3api.infra/validate.ts b/packages/js/core/src/manifest/formats/polywrap.infra/validate.ts similarity index 94% rename from packages/js/core/src/manifest/formats/web3api.infra/validate.ts rename to packages/js/core/src/manifest/formats/polywrap.infra/validate.ts index ef2178936b..452c36fa84 100644 --- a/packages/js/core/src/manifest/formats/web3api.infra/validate.ts +++ b/packages/js/core/src/manifest/formats/polywrap.infra/validate.ts @@ -9,8 +9,8 @@ import { InfraManifestFormats } from "."; -import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/polywrap.infra/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/polywrap.infra/0.0.1-prealpha.2.json"; import { Tracer } from "@polywrap/tracing-js" import { diff --git a/packages/js/core/src/manifest/formats/web3api.meta/0.0.1-prealpha.1.ts b/packages/js/core/src/manifest/formats/polywrap.meta/0.0.1-prealpha.1.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.meta/0.0.1-prealpha.1.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/0.0.1-prealpha.1.ts diff --git a/packages/js/core/src/manifest/formats/web3api.meta/0.0.1-prealpha.2.ts b/packages/js/core/src/manifest/formats/polywrap.meta/0.0.1-prealpha.2.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.meta/0.0.1-prealpha.2.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/0.0.1-prealpha.2.ts diff --git a/packages/js/core/src/manifest/formats/web3api.meta/0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.meta/0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.meta/0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts b/packages/js/core/src/manifest/formats/polywrap.meta/deserialize.ts similarity index 93% rename from packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/deserialize.ts index 2ba33c1217..8d9abd7a4a 100644 --- a/packages/js/core/src/manifest/formats/web3api.meta/deserialize.ts +++ b/packages/js/core/src/manifest/formats/polywrap.meta/deserialize.ts @@ -51,7 +51,7 @@ export const deserializeMetaManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyMetaManifest.format}, please upgrade your PolywrapClient package.` + `Cannot downgrade Polywrap version ${anyMetaManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.meta/index.ts b/packages/js/core/src/manifest/formats/polywrap.meta/index.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.meta/index.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/index.ts diff --git a/packages/js/core/src/manifest/formats/web3api.meta/migrate.ts b/packages/js/core/src/manifest/formats/polywrap.meta/migrate.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.meta/migrate.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/migrate.ts diff --git a/packages/js/core/src/manifest/formats/web3api.meta/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.meta/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.meta/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.meta/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.meta/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.meta/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.meta/validate.ts b/packages/js/core/src/manifest/formats/polywrap.meta/validate.ts similarity index 94% rename from packages/js/core/src/manifest/formats/web3api.meta/validate.ts rename to packages/js/core/src/manifest/formats/polywrap.meta/validate.ts index 98b9ffdb10..7d0b3b1849 100644 --- a/packages/js/core/src/manifest/formats/web3api.meta/validate.ts +++ b/packages/js/core/src/manifest/formats/polywrap.meta/validate.ts @@ -9,9 +9,9 @@ import { MetaManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.2.json"; -import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.3.json"; +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.3.json"; import { Tracer } from "@polywrap/tracing-js" import { diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/0.0.1-prealpha.1.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/0.0.1-prealpha.1.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.plugin/0.0.1-prealpha.1.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/0.0.1-prealpha.1.ts diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/0.0.1-prealpha.2.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/0.0.1-prealpha.2.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.plugin/0.0.1-prealpha.2.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/0.0.1-prealpha.2.ts diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.plugin/0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/deserialize.ts similarity index 93% rename from packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/deserialize.ts index 1d4f30bda2..287a94021c 100644 --- a/packages/js/core/src/manifest/formats/web3api.plugin/deserialize.ts +++ b/packages/js/core/src/manifest/formats/polywrap.plugin/deserialize.ts @@ -51,7 +51,7 @@ export const deserializePluginManifest = Tracer.traceFunc( } else if (versionCompare === 1) { // Downgrade throw Error( - `Cannot downgrade Web3API version ${anyPluginManifest.format}, please upgrade your PolywrapClient package.` + `Cannot downgrade Polywrap version ${anyPluginManifest.format}, please upgrade your PolywrapClient package.` ); } else { // Latest diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/index.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/index.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.plugin/index.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/index.ts diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/migrate.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/migrate.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.plugin/migrate.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/migrate.ts diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.plugin/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts similarity index 100% rename from packages/js/core/src/manifest/formats/web3api.plugin/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3.ts diff --git a/packages/js/core/src/manifest/formats/web3api.plugin/validate.ts b/packages/js/core/src/manifest/formats/polywrap.plugin/validate.ts similarity index 93% rename from packages/js/core/src/manifest/formats/web3api.plugin/validate.ts rename to packages/js/core/src/manifest/formats/polywrap.plugin/validate.ts index 12fbeda61e..025f0ccee4 100644 --- a/packages/js/core/src/manifest/formats/web3api.plugin/validate.ts +++ b/packages/js/core/src/manifest/formats/polywrap.plugin/validate.ts @@ -9,9 +9,9 @@ import { PluginManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.2.json"; -import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.3.json"; +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.3.json"; import { Tracer } from "@polywrap/tracing-js" import { diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.1.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.1.ts similarity index 91% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.1.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.1.ts index f3f34a16dd..fb0fd37720 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.1.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.1.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.1"; description?: string; repository?: string; @@ -32,5 +32,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.2.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.2.ts similarity index 90% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.2.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.2.ts index 0c5f999364..e544c2f433 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.2.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.2.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.2"; repository?: string; build?: string; @@ -25,5 +25,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.3.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.3.ts similarity index 90% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.3.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.3.ts index 31c552c53e..ea5dfc289a 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.3.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.3.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.3"; repository?: string; build?: string; @@ -26,5 +26,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.4.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.4.ts similarity index 90% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.4.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.4.ts index 239976560a..655bbed663 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.4.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.4.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.4"; repository?: string; build?: string; @@ -25,5 +25,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.5.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.5.ts similarity index 90% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.5.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.5.ts index ff67c503ca..b5f086875e 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.5.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.5.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.5"; build?: string; meta?: string; @@ -25,5 +25,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.6.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.6.ts similarity index 90% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.6.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.6.ts index 7bc0575940..e274e2d418 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.6.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.6.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.6"; build?: string; meta?: string; @@ -25,5 +25,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.7.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.7.ts similarity index 90% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.7.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.7.ts index 1a95c7f9b3..7295a599e7 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.7.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.7.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.7"; name: string; build?: string; @@ -26,5 +26,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.8.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.8.ts similarity index 90% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.8.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.8.ts index b91746ec0e..dc98edbd44 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.8.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.8.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.8"; name: string; build?: string; @@ -27,5 +27,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.9.ts similarity index 88% rename from packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.9.ts index 882a037698..534b871144 100644 --- a/packages/js/core/src/manifest/formats/web3api/0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/0.0.1-prealpha.9.ts @@ -6,7 +6,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export interface Web3ApiManifest { +export interface PolywrapManifest { format: "0.0.1-prealpha.9"; name: string; build?: string; @@ -19,5 +19,5 @@ export interface Web3ApiManifest { uri: string; schema: string; }[]; - __type: "Web3ApiManifest"; + __type: "PolywrapManifest"; } diff --git a/packages/js/core/src/manifest/formats/polywrap/deserialize.ts b/packages/js/core/src/manifest/formats/polywrap/deserialize.ts new file mode 100644 index 0000000000..def04e45c3 --- /dev/null +++ b/packages/js/core/src/manifest/formats/polywrap/deserialize.ts @@ -0,0 +1,61 @@ +/* eslint-disable */ +/** + * This file was automatically generated by scripts/manifest/deserialize-ts.mustache. + * DO NOT MODIFY IT BY HAND. Instead, modify scripts/manifest/deserialize-ts.mustache, + * and run node ./scripts/manifest/generateFormatTypes.js to regenerate this file. + */ + +import { + PolywrapManifest, + AnyPolywrapManifest, + migratePolywrapManifest, + validatePolywrapManifest, + latestPolywrapManifestFormat, +} from "."; +import { DeserializeManifestOptions } from "../../"; + +import { compare } from "semver"; +import YAML from "js-yaml"; +import { Tracer } from "@polywrap/tracing-js"; + +export const deserializePolywrapManifest = Tracer.traceFunc( + "core: deserializePolywrapManifest", + (manifest: string, options?: DeserializeManifestOptions): PolywrapManifest => { + let anyPolywrapManifest: AnyPolywrapManifest | undefined; + try { + anyPolywrapManifest = JSON.parse(manifest) as AnyPolywrapManifest; + } catch (e) { + anyPolywrapManifest = YAML.safeLoad(manifest) as + | AnyPolywrapManifest + | undefined; + } + + if (!anyPolywrapManifest) { + throw Error(`Unable to parse PolywrapManifest: ${manifest}`); + } + + if (!options || !options.noValidate) { + validatePolywrapManifest(anyPolywrapManifest, options?.extSchema); + } + + anyPolywrapManifest.__type = "PolywrapManifest"; + + const versionCompare = compare( + anyPolywrapManifest.format, + latestPolywrapManifestFormat + ); + + if (versionCompare === -1) { + // Upgrade + return migratePolywrapManifest(anyPolywrapManifest, latestPolywrapManifestFormat); + } else if (versionCompare === 1) { + // Downgrade + throw Error( + `Cannot downgrade Polywrap version ${anyPolywrapManifest.format}, please upgrade your PolywrapClient package.` + ); + } else { + // Latest + return anyPolywrapManifest as PolywrapManifest; + } + } +); diff --git a/packages/js/core/src/manifest/formats/polywrap/index.ts b/packages/js/core/src/manifest/formats/polywrap/index.ts new file mode 100644 index 0000000000..3222826aa8 --- /dev/null +++ b/packages/js/core/src/manifest/formats/polywrap/index.ts @@ -0,0 +1,79 @@ +/* eslint-disable */ +/** + * This file was automatically generated by scripts/manifest/index-ts.mustache. + * DO NOT MODIFY IT BY HAND. Instead, modify scripts/manifest/index-ts.mustache, + * and run node ./scripts/manifest/generateFormatTypes.js to regenerate this file. + */ + +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_1 +} from "./0.0.1-prealpha.1"; +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_2 +} from "./0.0.1-prealpha.2"; +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_3 +} from "./0.0.1-prealpha.3"; +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_4 +} from "./0.0.1-prealpha.4"; +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_5 +} from "./0.0.1-prealpha.5"; +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_6 +} from "./0.0.1-prealpha.6"; +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_7 +} from "./0.0.1-prealpha.7"; +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_8 +} from "./0.0.1-prealpha.8"; +import { + PolywrapManifest as PolywrapManifest0_0_1_prealpha_9 +} from "./0.0.1-prealpha.9"; + +export { + PolywrapManifest0_0_1_prealpha_1, + PolywrapManifest0_0_1_prealpha_2, + PolywrapManifest0_0_1_prealpha_3, + PolywrapManifest0_0_1_prealpha_4, + PolywrapManifest0_0_1_prealpha_5, + PolywrapManifest0_0_1_prealpha_6, + PolywrapManifest0_0_1_prealpha_7, + PolywrapManifest0_0_1_prealpha_8, + PolywrapManifest0_0_1_prealpha_9, +}; + +export enum PolywrapManifestFormats { + "0.0.1-prealpha.1" = "0.0.1-prealpha.1", + "0.0.1-prealpha.2" = "0.0.1-prealpha.2", + "0.0.1-prealpha.3" = "0.0.1-prealpha.3", + "0.0.1-prealpha.4" = "0.0.1-prealpha.4", + "0.0.1-prealpha.5" = "0.0.1-prealpha.5", + "0.0.1-prealpha.6" = "0.0.1-prealpha.6", + "0.0.1-prealpha.7" = "0.0.1-prealpha.7", + "0.0.1-prealpha.8" = "0.0.1-prealpha.8", + "0.0.1-prealpha.9" = "0.0.1-prealpha.9", +} + +export type AnyPolywrapManifest = + | PolywrapManifest0_0_1_prealpha_1 + | PolywrapManifest0_0_1_prealpha_2 + | PolywrapManifest0_0_1_prealpha_3 + | PolywrapManifest0_0_1_prealpha_4 + | PolywrapManifest0_0_1_prealpha_5 + | PolywrapManifest0_0_1_prealpha_6 + | PolywrapManifest0_0_1_prealpha_7 + | PolywrapManifest0_0_1_prealpha_8 + | PolywrapManifest0_0_1_prealpha_9 + +export type PolywrapManifest = PolywrapManifest0_0_1_prealpha_9; + +export const latestPolywrapManifestFormat = PolywrapManifestFormats["0.0.1-prealpha.9"] + +export { migratePolywrapManifest } from "./migrate"; + +export { deserializePolywrapManifest } from "./deserialize"; + +export { validatePolywrapManifest } from "./validate"; diff --git a/packages/js/core/src/manifest/formats/web3api/migrate.ts b/packages/js/core/src/manifest/formats/polywrap/migrate.ts similarity index 74% rename from packages/js/core/src/manifest/formats/web3api/migrate.ts rename to packages/js/core/src/manifest/formats/polywrap/migrate.ts index e0ac8a69f4..59a545e250 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrate.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrate.ts @@ -5,10 +5,10 @@ * and run node ./scripts/manifest/generateFormatTypes.js to regenerate this file. */ import { - AnyWeb3ApiManifest, - Web3ApiManifest, - Web3ApiManifestFormats, - latestWeb3ApiManifestFormat + AnyPolywrapManifest, + PolywrapManifest, + PolywrapManifestFormats, + latestPolywrapManifestFormat } from "."; import { @@ -39,7 +39,7 @@ import { import { Tracer } from "@polywrap/tracing-js"; type Migrator = { - [key in Web3ApiManifestFormats]?: (m: AnyWeb3ApiManifest) => Web3ApiManifest; + [key in PolywrapManifestFormats]?: (m: AnyPolywrapManifest) => PolywrapManifest; }; export const migrators: Migrator = { @@ -53,23 +53,23 @@ export const migrators: Migrator = { "0.0.1-prealpha.8": migrate_0_0_1_prealpha_8_to_0_0_1_prealpha_9, }; -export const migrateWeb3ApiManifest = Tracer.traceFunc( - "core: migrateWeb3ApiManifest", - (manifest: AnyWeb3ApiManifest, to: Web3ApiManifestFormats): Web3ApiManifest => { - const from = manifest.format as Web3ApiManifestFormats; +export const migratePolywrapManifest = Tracer.traceFunc( + "core: migratePolywrapManifest", + (manifest: AnyPolywrapManifest, to: PolywrapManifestFormats): PolywrapManifest => { + const from = manifest.format as PolywrapManifestFormats; - if (from === latestWeb3ApiManifestFormat) { - return manifest as Web3ApiManifest; + if (from === latestPolywrapManifestFormat) { + return manifest as PolywrapManifest; } - if (!(from in Web3ApiManifestFormats)) { - throw new Error(`Unrecognized Web3ApiManifestFormat "${manifest.format}"`); + if (!(from in PolywrapManifestFormats)) { + throw new Error(`Unrecognized PolywrapManifestFormat "${manifest.format}"`); } const migrator = migrators[from]; if (!migrator) { throw new Error( - `Migrator from Web3ApiManifestFormat "${from}" to "${to}" is not available` + `Migrator from PolywrapManifestFormat "${from}" to "${to}" is not available` ); } diff --git a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.9.ts similarity index 59% rename from packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.9.ts index 92626e7837..877fcae7b2 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.9.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Web3ApiManifest as OldManifest } from "../0.0.1-prealpha.1"; -import { Web3ApiManifest as NewManifest } from "../0.0.1-prealpha.9"; +import { PolywrapManifest as OldManifest } from "../0.0.1-prealpha.1"; +import { PolywrapManifest as NewManifest } from "../0.0.1-prealpha.9"; export function migrate(_: OldManifest): NewManifest { throw new Error( diff --git a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.9.ts similarity index 59% rename from packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.9.ts index 72286eb823..feb614ae29 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.9.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Web3ApiManifest as OldManifest } from "../0.0.1-prealpha.2"; -import { Web3ApiManifest as NewManifest } from "../0.0.1-prealpha.9"; +import { PolywrapManifest as OldManifest } from "../0.0.1-prealpha.2"; +import { PolywrapManifest as NewManifest } from "../0.0.1-prealpha.9"; export function migrate(_: OldManifest): NewManifest { throw new Error( diff --git a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.3_to_0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.3_to_0.0.1-prealpha.9.ts similarity index 59% rename from packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.3_to_0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.3_to_0.0.1-prealpha.9.ts index 790f3c94d2..f18ff04d05 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.3_to_0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.3_to_0.0.1-prealpha.9.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Web3ApiManifest as OldManifest } from "../0.0.1-prealpha.3"; -import { Web3ApiManifest as NewManifest } from "../0.0.1-prealpha.9"; +import { PolywrapManifest as OldManifest } from "../0.0.1-prealpha.3"; +import { PolywrapManifest as NewManifest } from "../0.0.1-prealpha.9"; export function migrate(_: OldManifest): NewManifest { throw new Error( diff --git a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.4_to_0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.4_to_0.0.1-prealpha.9.ts similarity index 59% rename from packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.4_to_0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.4_to_0.0.1-prealpha.9.ts index e09fc79965..ed81776103 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.4_to_0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.4_to_0.0.1-prealpha.9.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Web3ApiManifest as OldManifest } from "../0.0.1-prealpha.4"; -import { Web3ApiManifest as NewManifest } from "../0.0.1-prealpha.9"; +import { PolywrapManifest as OldManifest } from "../0.0.1-prealpha.4"; +import { PolywrapManifest as NewManifest } from "../0.0.1-prealpha.9"; export function migrate(_: OldManifest): NewManifest { throw new Error( diff --git a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.5_to_0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.5_to_0.0.1-prealpha.9.ts similarity index 59% rename from packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.5_to_0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.5_to_0.0.1-prealpha.9.ts index 7e6f258706..4356bd3545 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.5_to_0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.5_to_0.0.1-prealpha.9.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Web3ApiManifest as OldManifest } from "../0.0.1-prealpha.5"; -import { Web3ApiManifest as NewManifest } from "../0.0.1-prealpha.9"; +import { PolywrapManifest as OldManifest } from "../0.0.1-prealpha.5"; +import { PolywrapManifest as NewManifest } from "../0.0.1-prealpha.9"; export function migrate(_: OldManifest): NewManifest { throw new Error( diff --git a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.6_to_0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.6_to_0.0.1-prealpha.9.ts similarity index 59% rename from packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.6_to_0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.6_to_0.0.1-prealpha.9.ts index 995f23c168..dcdc22e593 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.6_to_0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.6_to_0.0.1-prealpha.9.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Web3ApiManifest as OldManifest } from "../0.0.1-prealpha.6"; -import { Web3ApiManifest as NewManifest } from "../0.0.1-prealpha.9"; +import { PolywrapManifest as OldManifest } from "../0.0.1-prealpha.6"; +import { PolywrapManifest as NewManifest } from "../0.0.1-prealpha.9"; export function migrate(_: OldManifest): NewManifest { throw new Error( diff --git a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.7_to_0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.7_to_0.0.1-prealpha.9.ts similarity index 59% rename from packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.7_to_0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.7_to_0.0.1-prealpha.9.ts index 85cf95e622..fa157c927d 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.7_to_0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.7_to_0.0.1-prealpha.9.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Web3ApiManifest as OldManifest } from "../0.0.1-prealpha.7"; -import { Web3ApiManifest as NewManifest } from "../0.0.1-prealpha.9"; +import { PolywrapManifest as OldManifest } from "../0.0.1-prealpha.7"; +import { PolywrapManifest as NewManifest } from "../0.0.1-prealpha.9"; export function migrate(_: OldManifest): NewManifest { throw new Error( diff --git a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.8_to_0.0.1-prealpha.9.ts b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.8_to_0.0.1-prealpha.9.ts similarity index 59% rename from packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.8_to_0.0.1-prealpha.9.ts rename to packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.8_to_0.0.1-prealpha.9.ts index 573879c79d..6821a4761f 100644 --- a/packages/js/core/src/manifest/formats/web3api/migrators/0.0.1-prealpha.8_to_0.0.1-prealpha.9.ts +++ b/packages/js/core/src/manifest/formats/polywrap/migrators/0.0.1-prealpha.8_to_0.0.1-prealpha.9.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Web3ApiManifest as OldManifest } from "../0.0.1-prealpha.8"; -import { Web3ApiManifest as NewManifest } from "../0.0.1-prealpha.9"; +import { PolywrapManifest as OldManifest } from "../0.0.1-prealpha.8"; +import { PolywrapManifest as NewManifest } from "../0.0.1-prealpha.9"; export function migrate(_: OldManifest): NewManifest { throw new Error( diff --git a/packages/js/core/src/manifest/formats/web3api/validate.ts b/packages/js/core/src/manifest/formats/polywrap/validate.ts similarity index 71% rename from packages/js/core/src/manifest/formats/web3api/validate.ts rename to packages/js/core/src/manifest/formats/polywrap/validate.ts index 208fd8831b..4ab8fc752f 100644 --- a/packages/js/core/src/manifest/formats/web3api/validate.ts +++ b/packages/js/core/src/manifest/formats/polywrap/validate.ts @@ -5,19 +5,19 @@ * and run node ./scripts/manifest/generateFormatTypes.js to regenerate this file. */ import { - AnyWeb3ApiManifest, - Web3ApiManifestFormats + AnyPolywrapManifest, + PolywrapManifestFormats } from "."; import * as Validators from "../../validators"; -import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.1.json"; -import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.2.json"; -import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.3.json"; -import schema_0_0_1_prealpha_4 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.4.json"; -import schema_0_0_1_prealpha_5 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.5.json"; -import schema_0_0_1_prealpha_6 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.6.json"; -import schema_0_0_1_prealpha_7 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.7.json"; -import schema_0_0_1_prealpha_8 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.8.json"; -import schema_0_0_1_prealpha_9 from "@polywrap/manifest-schemas/formats/web3api/0.0.1-prealpha.9.json"; +import schema_0_0_1_prealpha_1 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.1.json"; +import schema_0_0_1_prealpha_2 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.2.json"; +import schema_0_0_1_prealpha_3 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.3.json"; +import schema_0_0_1_prealpha_4 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.4.json"; +import schema_0_0_1_prealpha_5 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.5.json"; +import schema_0_0_1_prealpha_6 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.6.json"; +import schema_0_0_1_prealpha_7 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.7.json"; +import schema_0_0_1_prealpha_8 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.8.json"; +import schema_0_0_1_prealpha_9 from "@polywrap/manifest-schemas/formats/polywrap/0.0.1-prealpha.9.json"; import { Tracer } from "@polywrap/tracing-js" import { @@ -27,11 +27,11 @@ import { ValidatorResult } from "jsonschema"; -type Web3ApiManifestSchemas = { - [key in Web3ApiManifestFormats]: Schema | undefined +type PolywrapManifestSchemas = { + [key in PolywrapManifestFormats]: Schema | undefined }; -const schemas: Web3ApiManifestSchemas = { +const schemas: PolywrapManifestSchemas = { "0.0.1-prealpha.1": schema_0_0_1_prealpha_1, "0.0.1-prealpha.2": schema_0_0_1_prealpha_2, "0.0.1-prealpha.3": schema_0_0_1_prealpha_3, @@ -52,22 +52,22 @@ Validator.prototype.customFormats.graphqlFile = Validators.graphqlFile; Validator.prototype.customFormats.manifestFile = Validators.manifestFile; Validator.prototype.customFormats.packageName = Validators.packageName; -export const validateWeb3ApiManifest = Tracer.traceFunc( - "core: validateWeb3ApiManifest", +export const validatePolywrapManifest = Tracer.traceFunc( + "core: validatePolywrapManifest", ( - manifest: AnyWeb3ApiManifest, + manifest: AnyPolywrapManifest, extSchema: Schema | undefined = undefined ): void => { - const schema = schemas[manifest.format as Web3ApiManifestFormats]; + const schema = schemas[manifest.format as PolywrapManifestFormats]; if (!schema) { - throw Error(`Unrecognized Web3ApiManifest schema format "${manifest.format}"\nmanifest: ${JSON.stringify(manifest, null, 2)}`); + throw Error(`Unrecognized PolywrapManifest schema format "${manifest.format}"\nmanifest: ${JSON.stringify(manifest, null, 2)}`); } const throwIfErrors = (result: ValidatorResult) => { if (result.errors.length) { throw new Error([ - `Validation errors encountered while sanitizing Web3ApiManifest format ${manifest.format}`, + `Validation errors encountered while sanitizing PolywrapManifest format ${manifest.format}`, ...result.errors.map((error: ValidationError) => error.toString()) ].join("\n")); } diff --git a/packages/js/core/src/manifest/formats/web3api/deserialize.ts b/packages/js/core/src/manifest/formats/web3api/deserialize.ts deleted file mode 100644 index e288ddec3c..0000000000 --- a/packages/js/core/src/manifest/formats/web3api/deserialize.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable */ -/** - * This file was automatically generated by scripts/manifest/deserialize-ts.mustache. - * DO NOT MODIFY IT BY HAND. Instead, modify scripts/manifest/deserialize-ts.mustache, - * and run node ./scripts/manifest/generateFormatTypes.js to regenerate this file. - */ - -import { - Web3ApiManifest, - AnyWeb3ApiManifest, - migrateWeb3ApiManifest, - validateWeb3ApiManifest, - latestWeb3ApiManifestFormat, -} from "."; -import { DeserializeManifestOptions } from "../../"; - -import { compare } from "semver"; -import YAML from "js-yaml"; -import { Tracer } from "@polywrap/tracing-js"; - -export const deserializeWeb3ApiManifest = Tracer.traceFunc( - "core: deserializeWeb3ApiManifest", - (manifest: string, options?: DeserializeManifestOptions): Web3ApiManifest => { - let anyWeb3ApiManifest: AnyWeb3ApiManifest | undefined; - try { - anyWeb3ApiManifest = JSON.parse(manifest) as AnyWeb3ApiManifest; - } catch (e) { - anyWeb3ApiManifest = YAML.safeLoad(manifest) as - | AnyWeb3ApiManifest - | undefined; - } - - if (!anyWeb3ApiManifest) { - throw Error(`Unable to parse Web3ApiManifest: ${manifest}`); - } - - if (!options || !options.noValidate) { - validateWeb3ApiManifest(anyWeb3ApiManifest, options?.extSchema); - } - - anyWeb3ApiManifest.__type = "Web3ApiManifest"; - - const versionCompare = compare( - anyWeb3ApiManifest.format, - latestWeb3ApiManifestFormat - ); - - if (versionCompare === -1) { - // Upgrade - return migrateWeb3ApiManifest(anyWeb3ApiManifest, latestWeb3ApiManifestFormat); - } else if (versionCompare === 1) { - // Downgrade - throw Error( - `Cannot downgrade Web3API version ${anyWeb3ApiManifest.format}, please upgrade your PolywrapClient package.` - ); - } else { - // Latest - return anyWeb3ApiManifest as Web3ApiManifest; - } - } -); diff --git a/packages/js/core/src/manifest/formats/web3api/index.ts b/packages/js/core/src/manifest/formats/web3api/index.ts deleted file mode 100644 index d124124404..0000000000 --- a/packages/js/core/src/manifest/formats/web3api/index.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* eslint-disable */ -/** - * This file was automatically generated by scripts/manifest/index-ts.mustache. - * DO NOT MODIFY IT BY HAND. Instead, modify scripts/manifest/index-ts.mustache, - * and run node ./scripts/manifest/generateFormatTypes.js to regenerate this file. - */ - -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_1 -} from "./0.0.1-prealpha.1"; -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_2 -} from "./0.0.1-prealpha.2"; -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_3 -} from "./0.0.1-prealpha.3"; -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_4 -} from "./0.0.1-prealpha.4"; -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_5 -} from "./0.0.1-prealpha.5"; -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_6 -} from "./0.0.1-prealpha.6"; -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_7 -} from "./0.0.1-prealpha.7"; -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_8 -} from "./0.0.1-prealpha.8"; -import { - Web3ApiManifest as Web3ApiManifest0_0_1_prealpha_9 -} from "./0.0.1-prealpha.9"; - -export { - Web3ApiManifest0_0_1_prealpha_1, - Web3ApiManifest0_0_1_prealpha_2, - Web3ApiManifest0_0_1_prealpha_3, - Web3ApiManifest0_0_1_prealpha_4, - Web3ApiManifest0_0_1_prealpha_5, - Web3ApiManifest0_0_1_prealpha_6, - Web3ApiManifest0_0_1_prealpha_7, - Web3ApiManifest0_0_1_prealpha_8, - Web3ApiManifest0_0_1_prealpha_9, -}; - -export enum Web3ApiManifestFormats { - "0.0.1-prealpha.1" = "0.0.1-prealpha.1", - "0.0.1-prealpha.2" = "0.0.1-prealpha.2", - "0.0.1-prealpha.3" = "0.0.1-prealpha.3", - "0.0.1-prealpha.4" = "0.0.1-prealpha.4", - "0.0.1-prealpha.5" = "0.0.1-prealpha.5", - "0.0.1-prealpha.6" = "0.0.1-prealpha.6", - "0.0.1-prealpha.7" = "0.0.1-prealpha.7", - "0.0.1-prealpha.8" = "0.0.1-prealpha.8", - "0.0.1-prealpha.9" = "0.0.1-prealpha.9", -} - -export type AnyWeb3ApiManifest = - | Web3ApiManifest0_0_1_prealpha_1 - | Web3ApiManifest0_0_1_prealpha_2 - | Web3ApiManifest0_0_1_prealpha_3 - | Web3ApiManifest0_0_1_prealpha_4 - | Web3ApiManifest0_0_1_prealpha_5 - | Web3ApiManifest0_0_1_prealpha_6 - | Web3ApiManifest0_0_1_prealpha_7 - | Web3ApiManifest0_0_1_prealpha_8 - | Web3ApiManifest0_0_1_prealpha_9 - -export type Web3ApiManifest = Web3ApiManifest0_0_1_prealpha_9; - -export const latestWeb3ApiManifestFormat = Web3ApiManifestFormats["0.0.1-prealpha.9"] - -export { migrateWeb3ApiManifest } from "./migrate"; - -export { deserializeWeb3ApiManifest } from "./deserialize"; - -export { validateWeb3ApiManifest } from "./validate"; diff --git a/packages/js/core/src/manifest/validators.ts b/packages/js/core/src/manifest/validators.ts index 433dd2b2fb..066e0499da 100644 --- a/packages/js/core/src/manifest/validators.ts +++ b/packages/js/core/src/manifest/validators.ts @@ -120,7 +120,7 @@ export function regexString(regex: unknown): boolean { return isValid; } -export function web3apiUri(uri: unknown): boolean { +export function polywrapUri(uri: unknown): boolean { return typeof uri === "string" && Uri.isValidUri(uri); } diff --git a/packages/js/core/src/types/Env.ts b/packages/js/core/src/types/Env.ts index ac158b15e7..a845f3a45f 100644 --- a/packages/js/core/src/types/Env.ts +++ b/packages/js/core/src/types/Env.ts @@ -3,7 +3,7 @@ import { Uri } from "."; import { Tracer } from "@polywrap/tracing-js"; export interface Env { - /** Uri of Web3Api */ + /** Uri of wrapper */ uri: TUri; /** Env variables used by the module */ diff --git a/packages/js/core/src/types/Invoke.ts b/packages/js/core/src/types/Invoke.ts index 8ea3e81aed..3e48582c8b 100644 --- a/packages/js/core/src/types/Invoke.ts +++ b/packages/js/core/src/types/Invoke.ts @@ -1,11 +1,11 @@ import { ClientConfig, Uri } from "."; -/** Options required for an API invocation. */ -export interface InvokeApiOptions< +/** Options required for an Wrapper invocation. */ +export interface InvokeOptions< TUri extends Uri | string = string, TClientConfig extends ClientConfig = ClientConfig > { - /** The API's URI */ + /** The Wrapper's URI */ uri: TUri; /** Method to be executed. */ @@ -18,7 +18,7 @@ export interface InvokeApiOptions< input?: Record | ArrayBuffer; /** - * Filters the [[InvokeApiResult]] data properties. The key + * Filters the [[InvokeResult]] data properties. The key * of this map is the property's name, while the value is * either true (meaning select this prop), or a nested named map, * allowing for the filtering of nested objects. @@ -43,11 +43,11 @@ export interface InvokeApiOptions< } /** - * Result of an API invocation. + * Result of an Wrapper invocation. * * @template TData Type of the invoke result data. */ -export interface InvokeApiResult { +export interface InvokeResult { /** * Invoke result data. The type of this value is the return type * of the method. If undefined, it means something went wrong. @@ -62,6 +62,6 @@ export interface InvokeApiResult { export interface InvokeHandler { invoke( - options: InvokeApiOptions - ): Promise>; + options: InvokeOptions + ): Promise>; } diff --git a/packages/js/core/src/types/Plugin.ts b/packages/js/core/src/types/Plugin.ts index 982460cd61..08233ac8eb 100644 --- a/packages/js/core/src/types/Plugin.ts +++ b/packages/js/core/src/types/Plugin.ts @@ -89,7 +89,7 @@ export abstract class PluginModule< /** The plugin package's manifest */ export interface PluginPackageManifest { - /** The API's schema */ + /** The Wrapper's schema */ schema: string; /** All interface schemas implemented by this plugin. */ diff --git a/packages/js/core/src/types/Query.ts b/packages/js/core/src/types/Query.ts index 47162d9a9b..0cf4cfa9cb 100644 --- a/packages/js/core/src/types/Query.ts +++ b/packages/js/core/src/types/Query.ts @@ -1,4 +1,4 @@ -import { Uri, InvokeApiOptions, ClientConfig } from "./"; +import { Uri, InvokeOptions, ClientConfig } from "./"; import { Tracer } from "@polywrap/tracing-js"; import { DocumentNode } from "graphql"; @@ -15,18 +15,18 @@ export const createQueryDocument = Tracer.traceFunc( } ); -/** Options required for an API query. */ -export interface QueryApiOptions< +/** Options required for an Wrapper query. */ +export interface QueryOptions< TVariables extends Record = Record, TUri extends Uri | string = string, TClientConfig extends ClientConfig = ClientConfig > { - /** The API's URI */ + /** The Wrapper's URI */ uri: TUri; /** * The GraphQL query to parse and execute, leading to one or more - * API invocations. + * Wrapper invocations. */ query: string | QueryDocument; @@ -47,17 +47,17 @@ export interface QueryApiOptions< } /** - * The result of an API query, which is the aggregate - * of one or more [[InvokeApiResult | invocation results]]. + * The result of an Wrapper query, which is the aggregate + * of one or more [[InvokeResult | invocation results]]. * * @template TData Type of the query result data. */ -export interface QueryApiResult< +export interface QueryResult< TData extends Record = Record > { /** * Query result data. The type of this value is a named map, - * where the key is the method's name, and value is the [[InvokeApiResult]]'s data. + * where the key is the method's name, and value is the [[InvokeResult]]'s data. * This is done to allow for parallel invocations within a * single query document. In case of method name collisions, * a postfix of `_0` will be applied, where 0 will be incremented for @@ -71,8 +71,8 @@ export interface QueryApiResult< errors?: Error[]; } -export interface QueryApiInvocations { - [methodOrAlias: string]: InvokeApiOptions; +export interface QueryInvocations { + [methodOrAlias: string]: InvokeOptions; } /** A type that can parse & execute a given query */ @@ -82,6 +82,6 @@ export interface QueryHandler { TVariables extends Record = Record, TUri extends Uri | string = string >( - options: QueryApiOptions - ): Promise>; + options: QueryOptions + ): Promise>; } diff --git a/packages/js/core/src/types/Subscription.ts b/packages/js/core/src/types/Subscription.ts index ed6c77ea18..3f11c8c962 100644 --- a/packages/js/core/src/types/Subscription.ts +++ b/packages/js/core/src/types/Subscription.ts @@ -1,8 +1,8 @@ import { Uri } from "./Uri"; import { ClientConfig } from "./Client"; -import { QueryApiOptions, QueryApiResult } from "./Query"; +import { QueryOptions, QueryResult } from "./Query"; -/** Defines the frequency of API invocations for an API subscription */ +/** Defines the frequency of Wrapper invocations for an Wrapper subscription */ export interface SubscriptionFrequency { ms?: number; sec?: number; @@ -10,20 +10,20 @@ export interface SubscriptionFrequency { hours?: number; } -/** Options required for an API subscription. */ +/** Options required for an Wrapper subscription. */ export interface SubscribeOptions< TVariables extends Record = Record, TUri extends Uri | string = string, TClientConfig extends ClientConfig = ClientConfig -> extends QueryApiOptions { +> extends QueryOptions { /** - * The frequency of API invocations. Defaults to one query per minute. + * The frequency of Wrapper invocations. Defaults to one query per minute. */ frequency?: SubscriptionFrequency; } /** - * An API subscription, which implements the AsyncIterator protocol, is an + * An Wrapper subscription, which implements the AsyncIterator protocol, is an * AsyncIterable that yields query results at a specified frequency. * @template TData Type of the query result. */ @@ -31,7 +31,7 @@ export interface Subscription< TData extends Record = Record > { /** - * The frequency of API invocations. + * The frequency of Wrapper invocations. */ frequency: number; /** @@ -47,7 +47,7 @@ export interface Subscription< * Implementation of AsyncIterator protocol makes the Subscription an * AsyncIterable, allowing use in for await...of loops. */ - [Symbol.asyncIterator](): AsyncGenerator>; + [Symbol.asyncIterator](): AsyncGenerator>; } export interface SubscriptionHandler { diff --git a/packages/js/core/src/types/Uri.ts b/packages/js/core/src/types/Uri.ts index 37d451ce4a..f8c8d44450 100644 --- a/packages/js/core/src/types/Uri.ts +++ b/packages/js/core/src/types/Uri.ts @@ -8,7 +8,7 @@ export interface UriConfig { } /** - * A Web3API URI. Some examples of valid URIs are: + * A Polywrap URI. Some examples of valid URIs are: * wrap://ipfs/QmHASH * wrap://ens/sub.dimain.eth * wrap://fs/directory/file.txt @@ -16,9 +16,9 @@ export interface UriConfig { * * Breaking down the various parts of the URI, as it applies * to [the URI standard](https://tools.ietf.org/html/rfc3986#section-3): - * **wrap://** - URI Scheme: differentiates Web3API URIs. - * **ipfs/** - URI Authority: allows the Web3API URI resolution algorithm to determine an authoritative URI resolver. - * **sub.domain.eth** - URI Path: tells the Authority where the API resides. + * **wrap://** - URI Scheme: differentiates Polywrap URIs. + * **ipfs/** - URI Authority: allows the Polywrap URI resolution algorithm to determine an authoritative URI resolver. + * **sub.domain.eth** - URI Path: tells the Authority where the Wrapper resides. */ export class Uri { private _config: UriConfig; diff --git a/packages/js/core/src/types/Workflow.ts b/packages/js/core/src/types/Workflow.ts index c55e733e07..d2668b3e22 100644 --- a/packages/js/core/src/types/Workflow.ts +++ b/packages/js/core/src/types/Workflow.ts @@ -1,5 +1,5 @@ import { ClientConfig, Uri } from "."; -import { InvokeApiResult } from "./Invoke"; +import { InvokeResult } from "./Invoke"; import { MaybeAsync } from "./MaybeAsync"; export type Step = { @@ -34,8 +34,8 @@ export interface RunOptions< onExecution?( id: string, - data?: InvokeApiResult["data"], - error?: InvokeApiResult["error"] + data?: InvokeResult["data"], + error?: InvokeResult["error"] ): MaybeAsync; } diff --git a/packages/js/core/src/types/Api.ts b/packages/js/core/src/types/Wrapper.ts similarity index 68% rename from packages/js/core/src/types/Api.ts rename to packages/js/core/src/types/Wrapper.ts index d14f180afe..b9308c81b9 100644 --- a/packages/js/core/src/types/Api.ts +++ b/packages/js/core/src/types/Wrapper.ts @@ -3,39 +3,39 @@ import { Client, GetFileOptions, GetManifestOptions, - InvokeApiOptions, - InvokeApiResult, + InvokeOptions, + InvokeResult, } from "."; import { AnyManifestArtifact, ManifestArtifactType } from "../manifest"; /** - * The API definition, which can be used to spawn - * many invocations of this particular API. Internally + * The Wrapper definition, which can be used to spawn + * many invocations of this particular Wrapper. Internally * this class may do things like caching WASM bytecode, spawning * worker threads, or indexing into resolvers to find the requested method. */ -export abstract class Api { +export abstract class Wrapper { /** - * Invoke the API based on the provided [[InvokeApiOptions]] + * Invoke the Wrapper based on the provided [[InvokeOptions]] * * @param options Options for this invocation. * @param client The client instance requesting this invocation. * This client will be used for any sub-invokes that occur. */ public abstract invoke( - options: InvokeApiOptions, + options: InvokeOptions, client: Client - ): Promise>; + ): Promise>; /** - * Get the API's schema + * Get the Wrapper's schema * * @param client The client instance the schema. */ public abstract getSchema(client: Client): Promise; /** - * Get the API's manifest + * Get the Wrapper's manifest * * @param options Configuration options for manifest retrieval * @param client The client instance requesting the manifest. @@ -48,8 +48,8 @@ export abstract class Api { ): Promise>; /** - * Get a file from the API package. - * Not implemented for plugin apis. + * Get a file from the Wrapper package. + * Not implemented for plugin wrappers. * * @param options Configuration options for file retrieval * @param client The client instance requesting the file. @@ -60,5 +60,5 @@ export abstract class Api { ): Promise; } -/** Cache of API definitions, mapping the API's URI to its definition */ -export type ApiCache = Map; +/** Cache of Wrapper definitions, mapping the Wrapper's URI to its definition */ +export type WrapperCache = Map; diff --git a/packages/js/core/src/types/index.ts b/packages/js/core/src/types/index.ts index 034439b8c1..5b604d3c3c 100644 --- a/packages/js/core/src/types/index.ts +++ b/packages/js/core/src/types/index.ts @@ -1,4 +1,4 @@ -export * from "./Api"; +export * from "./Wrapper"; export * from "./Client"; export * from "./Invoke"; export * from "./MaybeAsync"; diff --git a/packages/js/core/src/uri-resolution/core/resolveUri.ts b/packages/js/core/src/uri-resolution/core/resolveUri.ts index 4632b214b6..a027150027 100644 --- a/packages/js/core/src/uri-resolution/core/resolveUri.ts +++ b/packages/js/core/src/uri-resolution/core/resolveUri.ts @@ -1,4 +1,4 @@ -import { Api, ApiCache, Client, Uri } from "../../types"; +import { Wrapper, WrapperCache, Client, Uri } from "../../types"; import { UriResolutionHistory } from "./types/UriResolutionHistory"; import { UriResolutionStack } from "./types/UriResolutionStack"; import { UriResolutionResult } from "./types/UriResolutionResult"; @@ -12,14 +12,14 @@ export const resolveUri = async ( uri: Uri, uriResolvers: readonly UriResolver[], client: Client, - cache: ApiCache + cache: WrapperCache ): Promise => { // Keep track of past URIs to avoid infinite loops const visitedUriMap: Map = new Map(); const uriResolutionStack: UriResolutionStack = []; let currentUri: Uri = uri; - let api: Api | undefined; + let wrapper: Wrapper | undefined; let runAgain = true; @@ -35,7 +35,7 @@ export const resolveUri = async ( if (infiniteLoopDetected) { return { uri: currentUri, - api, + wrapper, uriHistory: new UriResolutionHistory(uriResolutionStack), error: infiniteLoopDetected ? { @@ -54,12 +54,12 @@ export const resolveUri = async ( trackUriHistory(currentUri, resolver, result, uriResolutionStack); - if (result.api) { - api = result.api; + if (result.wrapper) { + wrapper = result.wrapper; Tracer.addEvent("uri-resolver-redirect", { from: currentUri.uri, - to: "api", + to: "wrapper", }); break; @@ -84,7 +84,7 @@ export const resolveUri = async ( return { uri: currentUri, - api, + wrapper, uriHistory: new UriResolutionHistory(uriResolutionStack), }; }; @@ -114,7 +114,7 @@ const trackUriHistory = ( sourceUri, result: { ...result, - api: !!result.api, + wrapper: !!result.wrapper, }, }); }; diff --git a/packages/js/core/src/uri-resolution/core/types/ResolveUriResult.ts b/packages/js/core/src/uri-resolution/core/types/ResolveUriResult.ts index 14a032214b..11a8427de4 100644 --- a/packages/js/core/src/uri-resolution/core/types/ResolveUriResult.ts +++ b/packages/js/core/src/uri-resolution/core/types/ResolveUriResult.ts @@ -1,9 +1,9 @@ -import { Api, Uri } from "../../../types"; +import { Wrapper, Uri } from "../../../types"; import { UriResolutionHistory } from "../../.."; import { ResolveUriError } from "./ResolveUriError"; export type ResolveUriResult = { - api?: Api; + wrapper?: Wrapper; uri?: Uri; uriHistory: UriResolutionHistory; error?: ResolveUriError; diff --git a/packages/js/core/src/uri-resolution/core/types/UriResolutionHistory.ts b/packages/js/core/src/uri-resolution/core/types/UriResolutionHistory.ts index c3d8983d7e..5508c94805 100644 --- a/packages/js/core/src/uri-resolution/core/types/UriResolutionHistory.ts +++ b/packages/js/core/src/uri-resolution/core/types/UriResolutionHistory.ts @@ -19,11 +19,11 @@ export class UriResolutionHistory { ); } - // Resolution path includes the list of resolvers that redirected to another URI or returned the API + // Resolution path includes the list of resolvers that redirected to another URI or returned the Wrapper getResolutionPath(): UriResolutionHistory { const path: UriResolutionHistory = new UriResolutionHistory( this.stack.filter( - (x) => x.sourceUri.uri !== x.result.uri.uri || x.result.api + (x) => x.sourceUri.uri !== x.result.uri.uri || x.result.wrapper ) ); diff --git a/packages/js/core/src/uri-resolution/core/types/UriResolutionInfo.ts b/packages/js/core/src/uri-resolution/core/types/UriResolutionInfo.ts index d04fc255bf..b49d69eed2 100644 --- a/packages/js/core/src/uri-resolution/core/types/UriResolutionInfo.ts +++ b/packages/js/core/src/uri-resolution/core/types/UriResolutionInfo.ts @@ -5,6 +5,6 @@ export interface UriResolutionInfo { sourceUri: Uri; result: { uri: Uri; - api: boolean; + wrapper: boolean; }; } diff --git a/packages/js/core/src/uri-resolution/core/types/UriResolutionResult.ts b/packages/js/core/src/uri-resolution/core/types/UriResolutionResult.ts index f92845e7b7..b59c7c3996 100644 --- a/packages/js/core/src/uri-resolution/core/types/UriResolutionResult.ts +++ b/packages/js/core/src/uri-resolution/core/types/UriResolutionResult.ts @@ -1,7 +1,7 @@ -import { Api, Uri } from "../../.."; +import { Wrapper, Uri } from "../../.."; export interface UriResolutionResult { uri: Uri; - api?: Api; + wrapper?: Wrapper; error?: Error; } diff --git a/packages/js/core/src/uri-resolution/core/types/UriResolver.ts b/packages/js/core/src/uri-resolution/core/types/UriResolver.ts index 30a8ee9e81..6bd5f4f7e8 100644 --- a/packages/js/core/src/uri-resolution/core/types/UriResolver.ts +++ b/packages/js/core/src/uri-resolution/core/types/UriResolver.ts @@ -1,4 +1,4 @@ -import { ApiCache, Client, Uri } from "../../../types"; +import { WrapperCache, Client, Uri } from "../../../types"; import { UriResolutionResult, UriResolutionStack } from "."; export abstract class UriResolver { @@ -7,7 +7,7 @@ export abstract class UriResolver { public abstract resolveUri( uri: Uri, client: Client, - cache: ApiCache, + cache: WrapperCache, resolutionPath: UriResolutionStack ): Promise; } diff --git a/packages/js/core/src/uri-resolution/resolvers/cache/CacheResolver.ts b/packages/js/core/src/uri-resolution/resolvers/cache/CacheResolver.ts index 276d783208..ac556fd118 100644 --- a/packages/js/core/src/uri-resolution/resolvers/cache/CacheResolver.ts +++ b/packages/js/core/src/uri-resolution/resolvers/cache/CacheResolver.ts @@ -1,4 +1,4 @@ -import { Uri, Client, ApiCache } from "../../../types"; +import { Uri, Client, WrapperCache } from "../../../types"; import { UriResolver, UriResolutionResult } from "../../core"; export class CacheResolver implements UriResolver { @@ -9,13 +9,13 @@ export class CacheResolver implements UriResolver { public async resolveUri( uri: Uri, client: Client, - cache: ApiCache + cache: WrapperCache ): Promise { - const api = cache.get(uri.uri); + const wrapper = cache.get(uri.uri); return Promise.resolve({ uri: uri, - api: api, + wrapper: wrapper, }); } } diff --git a/packages/js/core/src/uri-resolution/resolvers/extendable/ExtendableUriResolver.ts b/packages/js/core/src/uri-resolution/resolvers/extendable/ExtendableUriResolver.ts index 17ec987307..abd0c89fca 100644 --- a/packages/js/core/src/uri-resolution/resolvers/extendable/ExtendableUriResolver.ts +++ b/packages/js/core/src/uri-resolution/resolvers/extendable/ExtendableUriResolver.ts @@ -1,12 +1,12 @@ import { Uri, Client, - ApiCache, + WrapperCache, getImplementations, coreInterfaceUris, DeserializeManifestOptions, } from "../../.."; -import { CreateApiFunc } from "./types/CreateApiFunc"; +import { CreateWrapperFunc } from "./types/CreateWrapperFunc"; import { UriResolutionResult } from "../../core/types/UriResolutionResult"; import { UriResolver, UriResolutionStack } from "../../core"; import { UriResolverWrapper } from "./UriResolverWrapper"; @@ -20,7 +20,7 @@ export class ExtendableUriResolver implements UriResolver { private _hasLoadedUriResolvers: boolean; constructor( - private readonly _createApi: CreateApiFunc, + private readonly _createWrapper: CreateWrapperFunc, private _deserializeOptions?: DeserializeManifestOptions, disablePreload?: boolean ) { @@ -36,7 +36,7 @@ export class ExtendableUriResolver implements UriResolver { async resolveUri( uri: Uri, client: Client, - cache: ApiCache, + cache: WrapperCache, resolutionPath: UriResolutionStack ): Promise { const uriResolverImpls = getImplementations( @@ -75,10 +75,10 @@ export class ExtendableUriResolver implements UriResolver { resolutionPath ); - if (result.api || (result.uri && uri.uri !== result.uri.uri)) { + if (result.wrapper || (result.uri && uri.uri !== result.uri.uri)) { return { uri: result.uri, - api: result.api, + wrapper: result.wrapper, implementationUri: resolver.implementationUri, }; } @@ -91,7 +91,7 @@ export class ExtendableUriResolver implements UriResolver { async loadUriResolverWrappers( client: Client, - cache: ApiCache, + cache: WrapperCache, implementationUris: Uri[] ): Promise<{ success: boolean; @@ -115,13 +115,13 @@ export class ExtendableUriResolver implements UriResolver { while ((implementationUri = implementationsToLoad.dequeue())) { // Use only the bootstrap resolvers to resolve the resolverUri // If successful, it is automatically cached - const { api } = await client.resolveUri(implementationUri, { + const { wrapper } = await client.resolveUri(implementationUri, { config: { uriResolvers: bootstrapUriResolvers, }, }); - if (!api) { + if (!wrapper) { // If not successful, add the resolver to the end of the queue implementationsToLoad.enqueue(implementationUri); failedAttempts++; @@ -156,7 +156,7 @@ export class ExtendableUriResolver implements UriResolver { for (const implementationUri of implementationUris) { const uriResolverImpl = new UriResolverWrapper( implementationUri, - this._createApi, + this._createWrapper, this._deserializeOptions ); diff --git a/packages/js/core/src/uri-resolution/resolvers/extendable/UriResolverWrapper.ts b/packages/js/core/src/uri-resolution/resolvers/extendable/UriResolverWrapper.ts index 800fb4b89f..a8cdef56d0 100644 --- a/packages/js/core/src/uri-resolution/resolvers/extendable/UriResolverWrapper.ts +++ b/packages/js/core/src/uri-resolution/resolvers/extendable/UriResolverWrapper.ts @@ -1,15 +1,15 @@ import { UriResolverInterface } from "../../../interfaces"; import { DeserializeManifestOptions, - deserializeWeb3ApiManifest, + deserializePolywrapManifest, } from "../../../manifest"; -import { Uri, ApiCache, Client, InvokeHandler } from "../../../types"; +import { Uri, WrapperCache, Client, InvokeHandler } from "../../../types"; import { UriResolver, UriResolutionStack, UriResolutionResult, } from "../../core"; -import { CreateApiFunc } from "./types/CreateApiFunc"; +import { CreateWrapperFunc } from "./types/CreateWrapperFunc"; import { getEnvFromUriOrResolutionStack } from "../getEnvFromUriOrResolutionStack"; import { Tracer } from "@polywrap/tracing-js"; @@ -17,7 +17,7 @@ import { Tracer } from "@polywrap/tracing-js"; export class UriResolverWrapper implements UriResolver { constructor( public readonly implementationUri: Uri, - private readonly createApi: CreateApiFunc, + private readonly createWrapper: CreateWrapperFunc, private readonly deserializeOptions?: DeserializeManifestOptions ) {} @@ -28,7 +28,7 @@ export class UriResolverWrapper implements UriResolver { async resolveUri( uri: Uri, client: Client, - cache: ApiCache, + cache: WrapperCache, resolutionPath: UriResolutionStack ): Promise { const result = await tryResolveUriWithImplementation( @@ -49,8 +49,8 @@ export class UriResolverWrapper implements UriResolver { }; } else if (result.manifest) { // We've found our manifest at the current implementation, - // meaning the URI resolver can also be used as an API resolver - const manifest = deserializeWeb3ApiManifest( + // meaning the URI resolver can also be used as an Wrapper resolver + const manifest = deserializePolywrapManifest( result.manifest, this.deserializeOptions ); @@ -60,7 +60,7 @@ export class UriResolverWrapper implements UriResolver { resolutionPath, client ); - const api = this.createApi( + const wrapper = this.createWrapper( uri, manifest, this.implementationUri.uri, @@ -69,7 +69,7 @@ export class UriResolverWrapper implements UriResolver { return { uri, - api, + wrapper, }; } diff --git a/packages/js/core/src/uri-resolution/resolvers/extendable/index.ts b/packages/js/core/src/uri-resolution/resolvers/extendable/index.ts index 374a96da7e..1a7958e44d 100644 --- a/packages/js/core/src/uri-resolution/resolvers/extendable/index.ts +++ b/packages/js/core/src/uri-resolution/resolvers/extendable/index.ts @@ -1,3 +1,3 @@ -export * from "./types/CreateApiFunc"; +export * from "./types/CreateWrapperFunc"; export * from "./ExtendableUriResolver"; export * from "./UriResolverWrapper"; diff --git a/packages/js/core/src/uri-resolution/resolvers/extendable/types/CreateApiFunc.ts b/packages/js/core/src/uri-resolution/resolvers/extendable/types/CreateApiFunc.ts deleted file mode 100644 index 720621bf07..0000000000 --- a/packages/js/core/src/uri-resolution/resolvers/extendable/types/CreateApiFunc.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Uri, Api, Web3ApiManifest, Env } from "../../../.."; - -export type CreateApiFunc = ( - uri: Uri, - manifest: Web3ApiManifest, - uriResolver: string, // name or URI - environment: Env | undefined -) => Api; diff --git a/packages/js/core/src/uri-resolution/resolvers/extendable/types/CreateWrapperFunc.ts b/packages/js/core/src/uri-resolution/resolvers/extendable/types/CreateWrapperFunc.ts new file mode 100644 index 0000000000..b46ba51345 --- /dev/null +++ b/packages/js/core/src/uri-resolution/resolvers/extendable/types/CreateWrapperFunc.ts @@ -0,0 +1,8 @@ +import { Uri, Wrapper, PolywrapManifest, Env } from "../../../.."; + +export type CreateWrapperFunc = ( + uri: Uri, + manifest: PolywrapManifest, + uriResolver: string, // name or URI + environment: Env | undefined +) => Wrapper; diff --git a/packages/js/core/src/uri-resolution/resolvers/plugin/PluginResolver.ts b/packages/js/core/src/uri-resolution/resolvers/plugin/PluginResolver.ts index 9eecab54b6..0617587d28 100644 --- a/packages/js/core/src/uri-resolution/resolvers/plugin/PluginResolver.ts +++ b/packages/js/core/src/uri-resolution/resolvers/plugin/PluginResolver.ts @@ -4,16 +4,16 @@ import { UriResolutionResult, UriResolutionStack, } from "../../core"; -import { Api, ApiCache, Client, Env, PluginPackage, Uri } from "../../../types"; +import { Wrapper, WrapperCache, Client, Env, PluginPackage, Uri } from "../../../types"; import { findPluginPackage } from "../../../algorithms"; export class PluginResolver implements UriResolver { constructor( - private readonly createPluginApi: ( + private readonly createPluginWrapper: ( uri: Uri, plugin: PluginPackage, environment: Env | undefined - ) => Api + ) => Wrapper ) {} public get name(): string { @@ -23,7 +23,7 @@ export class PluginResolver implements UriResolver { async resolveUri( uri: Uri, client: Client, - cache: ApiCache, + cache: WrapperCache, resolutionPath: UriResolutionStack ): Promise { const plugin = findPluginPackage(uri, client.getPlugins({})); @@ -35,11 +35,11 @@ export class PluginResolver implements UriResolver { client ); - const api = this.createPluginApi(uri, plugin, environment); + const wrapper = this.createPluginWrapper(uri, plugin, environment); return { uri, - api, + wrapper, }; } diff --git a/packages/js/core/src/workflow/JobRunner.ts b/packages/js/core/src/workflow/JobRunner.ts index 7499f49b67..d8ac17be06 100644 --- a/packages/js/core/src/workflow/JobRunner.ts +++ b/packages/js/core/src/workflow/JobRunner.ts @@ -1,7 +1,7 @@ import { Client, executeMaybeAsyncFunction, - InvokeApiResult, + InvokeResult, Job, MaybeAsync, Uri, @@ -19,14 +19,14 @@ export class JobRunner< TData extends unknown = unknown, TUri extends Uri | string = string > { - private jobOutput: Map>; + private jobOutput: Map>; constructor( private client: Client, private onExecution?: ( id: string, - data?: InvokeApiResult["data"], - error?: InvokeApiResult["error"] + data?: InvokeResult["data"], + error?: InvokeResult["error"] ) => MaybeAsync ) { this.jobOutput = new Map(); diff --git a/packages/js/os/package.json b/packages/js/os/package.json index 9053088295..ae7a813629 100644 --- a/packages/js/os/package.json +++ b/packages/js/os/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/os-js", - "description": "Web3API Javascript OS Utilities", + "description": "Polywrap Javascript OS Utilities", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/js/plugins/ens/package.json b/packages/js/plugins/ens/package.json index 2c0730fdbd..ff231b6ecc 100644 --- a/packages/js/plugins/ens/package.json +++ b/packages/js/plugins/ens/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/ens-plugin-js", - "description": "Web3API ENS Javascript Plugin", + "description": "Polywrap ENS Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/ens/web3api.plugin.yaml b/packages/js/plugins/ens/polywrap.plugin.yaml similarity index 81% rename from packages/js/plugins/ens/web3api.plugin.yaml rename to packages/js/plugins/ens/polywrap.plugin.yaml index 77f8953bd3..8e6d1877cd 100644 --- a/packages/js/plugins/ens/web3api.plugin.yaml +++ b/packages/js/plugins/ens/polywrap.plugin.yaml @@ -4,5 +4,5 @@ name: Ens module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - - uri: "ens/uri-resolver.core.web3api.eth" + - uri: "ens/uri-resolver.core.polywrap.eth" schema: ../../../core-interfaces/uri-resolver/src/query.graphql diff --git a/packages/js/plugins/ens/src/index.ts b/packages/js/plugins/ens/src/index.ts index c54d4e5b76..95be562c7d 100644 --- a/packages/js/plugins/ens/src/index.ts +++ b/packages/js/plugins/ens/src/index.ts @@ -7,7 +7,7 @@ import { Bytes, Ethereum_Module, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import { ethers } from "ethers"; import { Base58 } from "@ethersproject/basex"; @@ -56,7 +56,7 @@ export class EnsPlugin extends Module { manifest: null, }; } catch (e) { - // TODO: logging https://github.com/web3-api/monorepo/issues/33 + // TODO: logging https://github.com/polywrap/monorepo/issues/33 } // Nothing found diff --git a/packages/js/plugins/ens/src/schema.graphql b/packages/js/plugins/ens/src/schema.graphql index b54dccbbf6..25518256f7 100644 --- a/packages/js/plugins/ens/src/schema.graphql +++ b/packages/js/plugins/ens/src/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, MaybeUriOrManifest } into UriResolver from "ens/uri-resolver.core.web3api.eth" -#import { Module } into Ethereum from "ens/ethereum.web3api.eth" +#import { Module, MaybeUriOrManifest } into UriResolver from "ens/uri-resolver.core.polywrap.eth" +#import { Module } into Ethereum from "ens/ethereum.polywrap.eth" type Module implements UriResolver_Module { } \ No newline at end of file diff --git a/packages/js/plugins/ens/src/w3-man/schema.ts b/packages/js/plugins/ens/src/w3-man/schema.ts deleted file mode 100644 index 8696cd6ca3..0000000000 --- a/packages/js/plugins/ens/src/w3-man/schema.ts +++ /dev/null @@ -1,315 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module implements UriResolver_Module @imports( - types: [ - "UriResolver_Module", - "UriResolver_MaybeUriOrManifest", - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network" - ] -) { - tryResolveUri( - authority: String! - path: String! - ): UriResolver_MaybeUriOrManifest - - getFile( - path: String! - ): Bytes -} - -### Imported Modules START ### - -type UriResolver_Module @imported( - uri: "ens/uri-resolver.core.web3api.eth", - namespace: "UriResolver", - nativeType: "Module" -) { - tryResolveUri( - authority: String! - path: String! - ): UriResolver_MaybeUriOrManifest - - getFile( - path: String! - ): Bytes -} - -type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! -} - -### Imported Modules END ### - -### Imported Objects START ### - -type UriResolver_MaybeUriOrManifest @imported( - uri: "ens/uri-resolver.core.web3api.eth", - namespace: "UriResolver", - nativeType: "MaybeUriOrManifest" -) { - uri: String - manifest: String -} - -type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/ens/src/w3-man/types.ts b/packages/js/plugins/ens/src/w3-man/types.ts deleted file mode 100644 index c2b716ea96..0000000000 --- a/packages/js/plugins/ens/src/w3-man/types.ts +++ /dev/null @@ -1,523 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./"; - -import { Client, InvokeApiResult } from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -/// Envs END /// - -/// Objects START /// -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -export interface UriResolver_MaybeUriOrManifest { - uri?: Types.String | null; - manifest?: Types.String | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Connection { - node?: Types.String | null; - networkNameOrChainId?: Types.String | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxOverrides { - gasLimit?: Types.BigInt | null; - gasPrice?: Types.BigInt | null; - value?: Types.BigInt | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_StaticTxResult { - result: Types.String; - error: Types.Boolean; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxRequest { - to?: Types.String | null; - from?: Types.String | null; - nonce?: Types.UInt32 | null; - gasLimit?: Types.BigInt | null; - gasPrice?: Types.BigInt | null; - data?: Types.String | null; - value?: Types.BigInt | null; - chainId?: Types.BigInt | null; - type?: Types.UInt32 | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_TxReceipt { - to: Types.String; - from: Types.String; - contractAddress: Types.String; - transactionIndex: Types.UInt32; - root?: Types.String | null; - gasUsed: Types.BigInt; - logsBloom: Types.String; - transactionHash: Types.String; - logs: Array; - blockNumber: Types.BigInt; - blockHash: Types.String; - confirmations: Types.UInt32; - cumulativeGasUsed: Types.BigInt; - effectiveGasPrice: Types.BigInt; - byzantium: Types.Boolean; - type: Types.UInt32; - status?: Types.UInt32 | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Log { - blockNumber: Types.BigInt; - blockHash: Types.String; - transactionIndex: Types.UInt32; - removed: Types.Boolean; - address: Types.String; - data: Types.String; - topics: Array; - transactionHash: Types.String; - logIndex: Types.UInt32; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_EventNotification { - data: Types.String; - address: Types.String; - log: Types.Ethereum_Log; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export interface Ethereum_Network { - name: Types.String; - chainId: Types.BigInt; - ensAddress?: Types.String | null; -} - -/// Imported Objects END /// - -/// Imported Modules START /// - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -interface UriResolver_Module_Input_tryResolveUri - extends Record { - authority: Types.String; - path: Types.String; -} - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -interface UriResolver_Module_Input_getFile extends Record { - path: Types.String; -} - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -export const UriResolver_Module = { - tryResolveUri: async ( - input: UriResolver_Module_Input_tryResolveUri, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", - method: "tryResolveUri", - input, - }); - }, - - getFile: async ( - input: UriResolver_Module_Input_getFile, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", - method: "getFile", - input, - }); - }, -}; - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractView - extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_callContractStatic - extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getBalance extends Record { - address: Types.String; - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_encodeParams extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_encodeFunction extends Record { - method: Types.String; - args?: Array | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_solidityPack extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_solidityKeccak256 - extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_soliditySha256 extends Record { - types: Array; - values: Array; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerAddress - extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerBalance - extends Record { - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getSignerTransactionCount - extends Record { - blockTag?: Types.BigInt | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getGasPrice extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_estimateTransactionGas - extends Record { - tx: Types.Ethereum_TxRequest; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_estimateContractCallGas - extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Ethereum_Connection | null; - txOverrides?: Types.Ethereum_TxOverrides | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_checkAddress extends Record { - address: Types.String; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_toWei extends Record { - eth: Types.String; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_toEth extends Record { - wei: Types.BigInt; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_awaitTransaction - extends Record { - txHash: Types.String; - confirmations: Types.UInt32; - timeout: Types.UInt32; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_waitForEvent extends Record { - address: Types.String; - event: Types.String; - args?: Array | null; - timeout?: Types.UInt32 | null; - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -interface Ethereum_Module_Input_getNetwork extends Record { - connection?: Types.Ethereum_Connection | null; -} - -/* URI: "ens/ethereum.web3api.eth" */ -export const Ethereum_Module = { - callContractView: async ( - input: Ethereum_Module_Input_callContractView, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractView", - input, - }); - }, - - callContractStatic: async ( - input: Ethereum_Module_Input_callContractStatic, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "callContractStatic", - input, - }); - }, - - getBalance: async ( - input: Ethereum_Module_Input_getBalance, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getBalance", - input, - }); - }, - - encodeParams: async ( - input: Ethereum_Module_Input_encodeParams, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "encodeParams", - input, - }); - }, - - encodeFunction: async ( - input: Ethereum_Module_Input_encodeFunction, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "encodeFunction", - input, - }); - }, - - solidityPack: async ( - input: Ethereum_Module_Input_solidityPack, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "solidityPack", - input, - }); - }, - - solidityKeccak256: async ( - input: Ethereum_Module_Input_solidityKeccak256, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "solidityKeccak256", - input, - }); - }, - - soliditySha256: async ( - input: Ethereum_Module_Input_soliditySha256, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "soliditySha256", - input, - }); - }, - - getSignerAddress: async ( - input: Ethereum_Module_Input_getSignerAddress, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerAddress", - input, - }); - }, - - getSignerBalance: async ( - input: Ethereum_Module_Input_getSignerBalance, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerBalance", - input, - }); - }, - - getSignerTransactionCount: async ( - input: Ethereum_Module_Input_getSignerTransactionCount, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getSignerTransactionCount", - input, - }); - }, - - getGasPrice: async ( - input: Ethereum_Module_Input_getGasPrice, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getGasPrice", - input, - }); - }, - - estimateTransactionGas: async ( - input: Ethereum_Module_Input_estimateTransactionGas, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "estimateTransactionGas", - input, - }); - }, - - estimateContractCallGas: async ( - input: Ethereum_Module_Input_estimateContractCallGas, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "estimateContractCallGas", - input, - }); - }, - - checkAddress: async ( - input: Ethereum_Module_Input_checkAddress, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "checkAddress", - input, - }); - }, - - toWei: async ( - input: Ethereum_Module_Input_toWei, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "toWei", - input, - }); - }, - - toEth: async ( - input: Ethereum_Module_Input_toEth, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "toEth", - input, - }); - }, - - awaitTransaction: async ( - input: Ethereum_Module_Input_awaitTransaction, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "awaitTransaction", - input, - }); - }, - - waitForEvent: async ( - input: Ethereum_Module_Input_waitForEvent, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "waitForEvent", - input, - }); - }, - - getNetwork: async ( - input: Ethereum_Module_Input_getNetwork, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/ethereum.web3api.eth", - method: "getNetwork", - input, - }); - }, -}; - -/// Imported Modules END /// diff --git a/packages/js/plugins/ens/src/polywrap-man/index.ts b/packages/js/plugins/ens/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/ens/src/polywrap-man/index.ts rename to packages/js/plugins/ens/src/wrap-man/index.ts diff --git a/packages/js/plugins/ens/src/polywrap-man/manifest.ts b/packages/js/plugins/ens/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/ens/src/polywrap-man/manifest.ts rename to packages/js/plugins/ens/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/ens/src/polywrap-man/module.ts b/packages/js/plugins/ens/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/ens/src/polywrap-man/module.ts rename to packages/js/plugins/ens/src/wrap-man/module.ts diff --git a/packages/js/plugins/ens/src/polywrap-man/schema.ts b/packages/js/plugins/ens/src/wrap-man/schema.ts similarity index 91% rename from packages/js/plugins/ens/src/polywrap-man/schema.ts rename to packages/js/plugins/ens/src/wrap-man/schema.ts index 8696cd6ca3..f4e12b184b 100644 --- a/packages/js/plugins/ens/src/polywrap-man/schema.ts +++ b/packages/js/plugins/ens/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module implements UriResolver_Module @imports( types: [ @@ -66,7 +66,7 @@ type Module implements UriResolver_Module @imports( ### Imported Modules START ### type UriResolver_Module @imported( - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", namespace: "UriResolver", nativeType: "Module" ) { @@ -81,7 +81,7 @@ type UriResolver_Module @imported( } type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Module" ) { @@ -199,7 +199,7 @@ type Ethereum_Module @imported( ### Imported Objects START ### type UriResolver_MaybeUriOrManifest @imported( - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", namespace: "UriResolver", nativeType: "MaybeUriOrManifest" ) { @@ -208,7 +208,7 @@ type UriResolver_MaybeUriOrManifest @imported( } type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Connection" ) { @@ -217,7 +217,7 @@ type Ethereum_Connection @imported( } type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { @@ -227,7 +227,7 @@ type Ethereum_TxOverrides @imported( } type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { @@ -236,7 +236,7 @@ type Ethereum_StaticTxResult @imported( } type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { @@ -252,7 +252,7 @@ type Ethereum_TxRequest @imported( } type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { @@ -276,7 +276,7 @@ type Ethereum_TxReceipt @imported( } type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Log" ) { @@ -292,7 +292,7 @@ type Ethereum_Log @imported( } type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { @@ -302,7 +302,7 @@ type Ethereum_EventNotification @imported( } type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Network" ) { diff --git a/packages/js/plugins/ens/src/polywrap-man/types.ts b/packages/js/plugins/ens/src/wrap-man/types.ts similarity index 75% rename from packages/js/plugins/ens/src/polywrap-man/types.ts rename to packages/js/plugins/ens/src/wrap-man/types.ts index c2b716ea96..de46821d8a 100644 --- a/packages/js/plugins/ens/src/polywrap-man/types.ts +++ b/packages/js/plugins/ens/src/wrap-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@polywrap/core-js"; +import { Client, InvokeResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; @@ -33,32 +33,32 @@ export type Boolean = boolean; /// Imported Objects START /// -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ export interface UriResolver_MaybeUriOrManifest { uri?: Types.String | null; manifest?: Types.String | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Connection { node?: Types.String | null; networkNameOrChainId?: Types.String | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxOverrides { gasLimit?: Types.BigInt | null; gasPrice?: Types.BigInt | null; value?: Types.BigInt | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_StaticTxResult { result: Types.String; error: Types.Boolean; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxRequest { to?: Types.String | null; from?: Types.String | null; @@ -71,7 +71,7 @@ export interface Ethereum_TxRequest { type?: Types.UInt32 | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxReceipt { to: Types.String; from: Types.String; @@ -92,7 +92,7 @@ export interface Ethereum_TxReceipt { status?: Types.UInt32 | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Log { blockNumber: Types.BigInt; blockHash: Types.String; @@ -105,14 +105,14 @@ export interface Ethereum_Log { logIndex: Types.UInt32; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_EventNotification { data: Types.String; address: Types.String; log: Types.Ethereum_Log; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Network { name: Types.String; chainId: Types.BigInt; @@ -123,26 +123,26 @@ export interface Ethereum_Network { /// Imported Modules START /// -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ interface UriResolver_Module_Input_tryResolveUri extends Record { authority: Types.String; path: Types.String; } -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ interface UriResolver_Module_Input_getFile extends Record { path: Types.String; } -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ export const UriResolver_Module = { tryResolveUri: async ( input: UriResolver_Module_Input_tryResolveUri, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", method: "tryResolveUri", input, }); @@ -151,16 +151,16 @@ export const UriResolver_Module = { getFile: async ( input: UriResolver_Module_Input_getFile, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", method: "getFile", input, }); }, }; -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_callContractView extends Record { address: Types.String; @@ -169,7 +169,7 @@ interface Ethereum_Module_Input_callContractView connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_callContractStatic extends Record { address: Types.String; @@ -179,77 +179,77 @@ interface Ethereum_Module_Input_callContractStatic txOverrides?: Types.Ethereum_TxOverrides | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getBalance extends Record { address: Types.String; blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_encodeParams extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_encodeFunction extends Record { method: Types.String; args?: Array | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_solidityPack extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_solidityKeccak256 extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_soliditySha256 extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerAddress extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerBalance extends Record { blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerTransactionCount extends Record { blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getGasPrice extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_estimateTransactionGas extends Record { tx: Types.Ethereum_TxRequest; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_estimateContractCallGas extends Record { address: Types.String; @@ -259,22 +259,22 @@ interface Ethereum_Module_Input_estimateContractCallGas txOverrides?: Types.Ethereum_TxOverrides | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_checkAddress extends Record { address: Types.String; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_toWei extends Record { eth: Types.String; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_toEth extends Record { wei: Types.BigInt; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_awaitTransaction extends Record { txHash: Types.String; @@ -283,7 +283,7 @@ interface Ethereum_Module_Input_awaitTransaction connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_waitForEvent extends Record { address: Types.String; event: Types.String; @@ -292,19 +292,19 @@ interface Ethereum_Module_Input_waitForEvent extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getNetwork extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export const Ethereum_Module = { callContractView: async ( input: Ethereum_Module_Input_callContractView, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractView", input, }); @@ -313,9 +313,9 @@ export const Ethereum_Module = { callContractStatic: async ( input: Ethereum_Module_Input_callContractStatic, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractStatic", input, }); @@ -324,9 +324,9 @@ export const Ethereum_Module = { getBalance: async ( input: Ethereum_Module_Input_getBalance, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getBalance", input, }); @@ -335,9 +335,9 @@ export const Ethereum_Module = { encodeParams: async ( input: Ethereum_Module_Input_encodeParams, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "encodeParams", input, }); @@ -346,9 +346,9 @@ export const Ethereum_Module = { encodeFunction: async ( input: Ethereum_Module_Input_encodeFunction, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "encodeFunction", input, }); @@ -357,9 +357,9 @@ export const Ethereum_Module = { solidityPack: async ( input: Ethereum_Module_Input_solidityPack, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "solidityPack", input, }); @@ -368,9 +368,9 @@ export const Ethereum_Module = { solidityKeccak256: async ( input: Ethereum_Module_Input_solidityKeccak256, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "solidityKeccak256", input, }); @@ -379,9 +379,9 @@ export const Ethereum_Module = { soliditySha256: async ( input: Ethereum_Module_Input_soliditySha256, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "soliditySha256", input, }); @@ -390,9 +390,9 @@ export const Ethereum_Module = { getSignerAddress: async ( input: Ethereum_Module_Input_getSignerAddress, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerAddress", input, }); @@ -401,9 +401,9 @@ export const Ethereum_Module = { getSignerBalance: async ( input: Ethereum_Module_Input_getSignerBalance, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerBalance", input, }); @@ -412,9 +412,9 @@ export const Ethereum_Module = { getSignerTransactionCount: async ( input: Ethereum_Module_Input_getSignerTransactionCount, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerTransactionCount", input, }); @@ -423,9 +423,9 @@ export const Ethereum_Module = { getGasPrice: async ( input: Ethereum_Module_Input_getGasPrice, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getGasPrice", input, }); @@ -434,9 +434,9 @@ export const Ethereum_Module = { estimateTransactionGas: async ( input: Ethereum_Module_Input_estimateTransactionGas, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "estimateTransactionGas", input, }); @@ -445,9 +445,9 @@ export const Ethereum_Module = { estimateContractCallGas: async ( input: Ethereum_Module_Input_estimateContractCallGas, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "estimateContractCallGas", input, }); @@ -456,9 +456,9 @@ export const Ethereum_Module = { checkAddress: async ( input: Ethereum_Module_Input_checkAddress, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "checkAddress", input, }); @@ -467,9 +467,9 @@ export const Ethereum_Module = { toWei: async ( input: Ethereum_Module_Input_toWei, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "toWei", input, }); @@ -478,9 +478,9 @@ export const Ethereum_Module = { toEth: async ( input: Ethereum_Module_Input_toEth, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "toEth", input, }); @@ -489,9 +489,9 @@ export const Ethereum_Module = { awaitTransaction: async ( input: Ethereum_Module_Input_awaitTransaction, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "awaitTransaction", input, }); @@ -500,9 +500,9 @@ export const Ethereum_Module = { waitForEvent: async ( input: Ethereum_Module_Input_waitForEvent, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "waitForEvent", input, }); @@ -511,9 +511,9 @@ export const Ethereum_Module = { getNetwork: async ( input: Ethereum_Module_Input_getNetwork, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getNetwork", input, }); diff --git a/packages/js/plugins/ethereum/package.json b/packages/js/plugins/ethereum/package.json index 7d5db581c7..057d9e0178 100644 --- a/packages/js/plugins/ethereum/package.json +++ b/packages/js/plugins/ethereum/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/ethereum-plugin-js", - "description": "Web3API Ethereum Javascript Plugin", + "description": "Polywrap Ethereum Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --detectOpenHandles --verbose", diff --git a/packages/js/plugins/ethereum/web3api.plugin.yaml b/packages/js/plugins/ethereum/polywrap.plugin.yaml similarity index 100% rename from packages/js/plugins/ethereum/web3api.plugin.yaml rename to packages/js/plugins/ethereum/polywrap.plugin.yaml diff --git a/packages/js/plugins/ethereum/src/Connection.ts b/packages/js/plugins/ethereum/src/Connection.ts index 8c35a4fcff..9bc730d6c7 100644 --- a/packages/js/plugins/ethereum/src/Connection.ts +++ b/packages/js/plugins/ethereum/src/Connection.ts @@ -1,4 +1,4 @@ -import { Connection as SchemaConnection } from "./polywrap-man"; +import { Connection as SchemaConnection } from "./wrap-man"; import { Signer, ethers } from "ethers"; import { diff --git a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts index 3348a04a71..def46094b5 100644 --- a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts @@ -1,5 +1,5 @@ import { ethereumPlugin } from ".."; -import * as Schema from "../polywrap-man"; +import * as Schema from "../wrap-man"; import { PolywrapClient, defaultIpfsProviders } from "@polywrap/client-js"; import { ensPlugin } from "@polywrap/ens-plugin-js"; @@ -7,7 +7,7 @@ import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; import { initTestEnvironment, stopTestEnvironment, - buildApi, + buildWrapper, ensAddresses, providers } from "@polywrap/test-env-js"; @@ -37,8 +37,8 @@ describe("Ethereum Plugin", () => { let registrarAddress: string; const signer = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const apiPath = `${__dirname}/integration` - const uri = `fs/${apiPath}/build` + const wrapperPath = `${__dirname}/integration` + const uri = `fs/${wrapperPath}/build` beforeAll(async () => { await initTestEnvironment(); @@ -50,7 +50,7 @@ describe("Ethereum Plugin", () => { client = new PolywrapClient({ plugins: [ { - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -64,14 +64,14 @@ describe("Ethereum Plugin", () => { }), }, { - uri: "wrap://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.polywrap.eth", plugin: ipfsPlugin({ provider: providers.ipfs, fallbackProviders: defaultIpfsProviders, }), }, { - uri: "wrap://ens/ens.web3api.eth", + uri: "wrap://ens/ens.polywrap.eth", plugin: ensPlugin({ query: { addresses: { @@ -83,7 +83,7 @@ describe("Ethereum Plugin", () => { ], }); - await buildApi(apiPath); + await buildWrapper(wrapperPath); }); afterAll(async () => { @@ -751,7 +751,7 @@ describe("Ethereum Plugin", () => { config: { envs: [ { - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", env: { connection: { networkNameOrChainId: "mainnet", @@ -784,7 +784,7 @@ describe("Ethereum Plugin", () => { config: { envs: [ { - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", env: { connection: { node: "https://polygon-rpc.com", diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/.gitignore b/packages/js/plugins/ethereum/src/__tests__/integration/.gitignore index a15402b528..ccc3d015c7 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/.gitignore +++ b/packages/js/plugins/ethereum/src/__tests__/integration/.gitignore @@ -1,3 +1,3 @@ build node_modules -polywrap +wrap diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/package.json b/packages/js/plugins/ethereum/src/__tests__/integration/package.json index 40f454a34c..b10c6cba47 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/package.json +++ b/packages/js/plugins/ethereum/src/__tests__/integration/package.json @@ -4,8 +4,8 @@ "private": true, "version": "0.0.1-prealpha.85", "scripts": { - "build": "yarn build:web3api", - "build:web3api": "npx polywrap build", + "build": "yarn build:polywrap", + "build:polywrap": "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" diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/web3api.build.yaml b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.build.yaml similarity index 100% rename from packages/js/plugins/ethereum/src/__tests__/integration/web3api.build.yaml rename to packages/js/plugins/ethereum/src/__tests__/integration/polywrap.build.yaml diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/web3api.yaml b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml similarity index 82% rename from packages/js/plugins/ethereum/src/__tests__/integration/web3api.yaml rename to packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml index 07d4580cad..355fed691b 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/web3api.yaml +++ b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: EthereumIntegration -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript module: ./src/index.ts schema: ./src/schema.graphql diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts b/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts index e313ab106a..dfdf2d05c2 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts +++ b/packages/js/plugins/ethereum/src/__tests__/integration/src/index.ts @@ -32,7 +32,7 @@ import { Input_sendTransaction, Input_sendTransactionAndWait, Input_signMessage -} from "./polywrap"; +} from "./wrap"; import { BigInt } from "@polywrap/wasm-as"; export function callContractView( diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql b/packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql index dcef75eaec..5f129f1215 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql +++ b/packages/js/plugins/ethereum/src/__tests__/integration/src/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection, Network, EventNotification, StaticTxResult, TxOverrides, TxRequest, TxReceipt, TxResponse } into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import { Module, Connection, Network, EventNotification, StaticTxResult, TxOverrides, TxRequest, TxReceipt, TxResponse } into Ethereum from "wrap://ens/ethereum.polywrap.eth" type Module { callContractView( diff --git a/packages/js/plugins/ethereum/src/index.ts b/packages/js/plugins/ethereum/src/index.ts index f077027c14..064a178583 100644 --- a/packages/js/plugins/ethereum/src/index.ts +++ b/packages/js/plugins/ethereum/src/index.ts @@ -36,7 +36,7 @@ import { Network, Connection as SchemaConnection, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import { Connections, Connection, diff --git a/packages/js/plugins/ethereum/src/polywrap-man/schema.ts b/packages/js/plugins/ethereum/src/polywrap-man/schema.ts deleted file mode 100644 index e22f4043f8..0000000000 --- a/packages/js/plugins/ethereum/src/polywrap-man/schema.ts +++ /dev/null @@ -1,305 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module { - callContractView( - address: String! - method: String! - args: [String!] - connection: Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Connection - txOverrides: TxOverrides - ): StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Connection - ): BigInt! - - getGasPrice( - connection: Connection - ): BigInt! - - estimateTransactionGas( - tx: TxRequest! - connection: Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Connection - txOverrides: TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Connection - ): TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Connection - ): EventNotification! - - getNetwork( - connection: Connection - ): Network! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Connection - txOverrides: TxOverrides - ): TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Connection - txOverrides: TxOverrides - ): TxReceipt! - - sendTransaction( - tx: TxRequest! - connection: Connection - ): TxResponse! - - sendTransactionAndWait( - tx: TxRequest! - connection: Connection - ): TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Connection - ): String! - - signMessage( - message: String! - connection: Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Connection - ): String -} - -type Env { - connection: Connection -} - -type TxReceipt { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Log { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type TxResponse { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Access!] -} - -type Access { - address: String! - storageKeys: [String!]! -} - -type TxRequest { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type TxOverrides { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type StaticTxResult { - result: String! - error: Boolean! -} - -type EventNotification { - data: String! - address: String! - log: Log! -} - -type Connection { - node: String - networkNameOrChainId: String -} - -type Network { - name: String! - chainId: BigInt! - ensAddress: String -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/ethereum/src/utils/mapping.ts b/packages/js/plugins/ethereum/src/utils/mapping.ts index 80c416a109..eb15b01667 100644 --- a/packages/js/plugins/ethereum/src/utils/mapping.ts +++ b/packages/js/plugins/ethereum/src/utils/mapping.ts @@ -1,4 +1,4 @@ -import { Access, TxReceipt, TxResponse, TxRequest, Log } from "../polywrap-man"; +import { Access, TxReceipt, TxResponse, TxRequest, Log } from "../wrap-man"; import { ethers } from "ethers"; diff --git a/packages/js/plugins/ethereum/src/w3-man/module.ts b/packages/js/plugins/ethereum/src/w3-man/module.ts deleted file mode 100644 index 902e0c9a6b..0000000000 --- a/packages/js/plugins/ethereum/src/w3-man/module.ts +++ /dev/null @@ -1,295 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_callContractView extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Connection | null; -} - -export interface Input_callContractStatic extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Connection | null; - txOverrides?: Types.TxOverrides | null; -} - -export interface Input_getBalance extends Record { - address: Types.String; - blockTag?: Types.BigInt | null; - connection?: Types.Connection | null; -} - -export interface Input_encodeParams extends Record { - types: Array; - values: Array; -} - -export interface Input_encodeFunction extends Record { - method: Types.String; - args?: Array | null; -} - -export interface Input_solidityPack extends Record { - types: Array; - values: Array; -} - -export interface Input_solidityKeccak256 extends Record { - types: Array; - values: Array; -} - -export interface Input_soliditySha256 extends Record { - types: Array; - values: Array; -} - -export interface Input_getSignerAddress extends Record { - connection?: Types.Connection | null; -} - -export interface Input_getSignerBalance extends Record { - blockTag?: Types.BigInt | null; - connection?: Types.Connection | null; -} - -export interface Input_getSignerTransactionCount - extends Record { - blockTag?: Types.BigInt | null; - connection?: Types.Connection | null; -} - -export interface Input_getGasPrice extends Record { - connection?: Types.Connection | null; -} - -export interface Input_estimateTransactionGas extends Record { - tx: Types.TxRequest; - connection?: Types.Connection | null; -} - -export interface Input_estimateContractCallGas extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Connection | null; - txOverrides?: Types.TxOverrides | null; -} - -export interface Input_checkAddress extends Record { - address: Types.String; -} - -export interface Input_toWei extends Record { - eth: Types.String; -} - -export interface Input_toEth extends Record { - wei: Types.BigInt; -} - -export interface Input_awaitTransaction extends Record { - txHash: Types.String; - confirmations: Types.UInt32; - timeout: Types.UInt32; - connection?: Types.Connection | null; -} - -export interface Input_waitForEvent extends Record { - address: Types.String; - event: Types.String; - args?: Array | null; - timeout?: Types.UInt32 | null; - connection?: Types.Connection | null; -} - -export interface Input_getNetwork extends Record { - connection?: Types.Connection | null; -} - -export interface Input_callContractMethod extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Connection | null; - txOverrides?: Types.TxOverrides | null; -} - -export interface Input_callContractMethodAndWait - extends Record { - address: Types.String; - method: Types.String; - args?: Array | null; - connection?: Types.Connection | null; - txOverrides?: Types.TxOverrides | null; -} - -export interface Input_sendTransaction extends Record { - tx: Types.TxRequest; - connection?: Types.Connection | null; -} - -export interface Input_sendTransactionAndWait extends Record { - tx: Types.TxRequest; - connection?: Types.Connection | null; -} - -export interface Input_deployContract extends Record { - abi: Types.String; - bytecode: Types.String; - args?: Array | null; - connection?: Types.Connection | null; -} - -export interface Input_signMessage extends Record { - message: Types.String; - connection?: Types.Connection | null; -} - -export interface Input_sendRPC extends Record { - method: Types.String; - params: Array; - connection?: Types.Connection | null; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract callContractView( - input: Input_callContractView, - client: Client - ): MaybeAsync; - - abstract callContractStatic( - input: Input_callContractStatic, - client: Client - ): MaybeAsync; - - abstract getBalance( - input: Input_getBalance, - client: Client - ): MaybeAsync; - - abstract encodeParams( - input: Input_encodeParams, - client: Client - ): MaybeAsync; - - abstract encodeFunction( - input: Input_encodeFunction, - client: Client - ): MaybeAsync; - - abstract solidityPack( - input: Input_solidityPack, - client: Client - ): MaybeAsync; - - abstract solidityKeccak256( - input: Input_solidityKeccak256, - client: Client - ): MaybeAsync; - - abstract soliditySha256( - input: Input_soliditySha256, - client: Client - ): MaybeAsync; - - abstract getSignerAddress( - input: Input_getSignerAddress, - client: Client - ): MaybeAsync; - - abstract getSignerBalance( - input: Input_getSignerBalance, - client: Client - ): MaybeAsync; - - abstract getSignerTransactionCount( - input: Input_getSignerTransactionCount, - client: Client - ): MaybeAsync; - - abstract getGasPrice( - input: Input_getGasPrice, - client: Client - ): MaybeAsync; - - abstract estimateTransactionGas( - input: Input_estimateTransactionGas, - client: Client - ): MaybeAsync; - - abstract estimateContractCallGas( - input: Input_estimateContractCallGas, - client: Client - ): MaybeAsync; - - abstract checkAddress( - input: Input_checkAddress, - client: Client - ): MaybeAsync; - - abstract toWei(input: Input_toWei, client: Client): MaybeAsync; - - abstract toEth(input: Input_toEth, client: Client): MaybeAsync; - - abstract awaitTransaction( - input: Input_awaitTransaction, - client: Client - ): MaybeAsync; - - abstract waitForEvent( - input: Input_waitForEvent, - client: Client - ): MaybeAsync; - - abstract getNetwork( - input: Input_getNetwork, - client: Client - ): MaybeAsync; - - abstract callContractMethod( - input: Input_callContractMethod, - client: Client - ): MaybeAsync; - - abstract callContractMethodAndWait( - input: Input_callContractMethodAndWait, - client: Client - ): MaybeAsync; - - abstract sendTransaction( - input: Input_sendTransaction, - client: Client - ): MaybeAsync; - - abstract sendTransactionAndWait( - input: Input_sendTransactionAndWait, - client: Client - ): MaybeAsync; - - abstract deployContract( - input: Input_deployContract, - client: Client - ): MaybeAsync; - - abstract signMessage( - input: Input_signMessage, - client: Client - ): MaybeAsync; - - abstract sendRPC( - input: Input_sendRPC, - client: Client - ): MaybeAsync; -} diff --git a/packages/js/plugins/ethereum/src/w3-man/types.ts b/packages/js/plugins/ethereum/src/w3-man/types.ts deleted file mode 100644 index 28682eaf17..0000000000 --- a/packages/js/plugins/ethereum/src/w3-man/types.ts +++ /dev/null @@ -1,140 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -export interface Env extends Record { - connection?: Types.Connection | null; -} -/// Envs END /// - -/// Objects START /// -export interface TxReceipt { - to: Types.String; - from: Types.String; - contractAddress: Types.String; - transactionIndex: Types.UInt32; - root?: Types.String | null; - gasUsed: Types.BigInt; - logsBloom: Types.String; - transactionHash: Types.String; - logs: Array; - blockNumber: Types.BigInt; - blockHash: Types.String; - confirmations: Types.UInt32; - cumulativeGasUsed: Types.BigInt; - effectiveGasPrice: Types.BigInt; - byzantium: Types.Boolean; - type: Types.UInt32; - status?: Types.UInt32 | null; -} - -export interface Log { - blockNumber: Types.BigInt; - blockHash: Types.String; - transactionIndex: Types.UInt32; - removed: Types.Boolean; - address: Types.String; - data: Types.String; - topics: Array; - transactionHash: Types.String; - logIndex: Types.UInt32; -} - -export interface TxResponse { - hash: Types.String; - to?: Types.String | null; - from: Types.String; - nonce: Types.UInt32; - gasLimit: Types.BigInt; - gasPrice?: Types.BigInt | null; - data: Types.String; - value: Types.BigInt; - chainId: Types.BigInt; - blockNumber?: Types.BigInt | null; - blockHash?: Types.String | null; - timestamp?: Types.UInt32 | null; - confirmations: Types.UInt32; - raw?: Types.String | null; - r?: Types.String | null; - s?: Types.String | null; - v?: Types.UInt32 | null; - type?: Types.UInt32 | null; - accessList?: Array | null; -} - -export interface Access { - address: Types.String; - storageKeys: Array; -} - -export interface TxRequest { - to?: Types.String | null; - from?: Types.String | null; - nonce?: Types.UInt32 | null; - gasLimit?: Types.BigInt | null; - gasPrice?: Types.BigInt | null; - data?: Types.String | null; - value?: Types.BigInt | null; - chainId?: Types.BigInt | null; - type?: Types.UInt32 | null; -} - -export interface TxOverrides { - gasLimit?: Types.BigInt | null; - gasPrice?: Types.BigInt | null; - value?: Types.BigInt | null; -} - -export interface StaticTxResult { - result: Types.String; - error: Types.Boolean; -} - -export interface EventNotification { - data: Types.String; - address: Types.String; - log: Types.Log; -} - -export interface Connection { - node?: Types.String | null; - networkNameOrChainId?: Types.String | null; -} - -export interface Network { - name: Types.String; - chainId: Types.BigInt; - ensAddress?: Types.String | null; -} - -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/// Imported Objects END /// - -/// Imported Modules START /// - -/// Imported Modules END /// diff --git a/packages/js/plugins/ens/src/w3-man/index.ts b/packages/js/plugins/ethereum/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/ens/src/w3-man/index.ts rename to packages/js/plugins/ethereum/src/wrap-man/index.ts diff --git a/packages/js/plugins/ens/src/w3-man/manifest.ts b/packages/js/plugins/ethereum/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/ens/src/w3-man/manifest.ts rename to packages/js/plugins/ethereum/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/ethereum/src/polywrap-man/module.ts b/packages/js/plugins/ethereum/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/ethereum/src/polywrap-man/module.ts rename to packages/js/plugins/ethereum/src/wrap-man/module.ts diff --git a/packages/js/plugins/ethereum/src/w3-man/schema.ts b/packages/js/plugins/ethereum/src/wrap-man/schema.ts similarity index 98% rename from packages/js/plugins/ethereum/src/w3-man/schema.ts rename to packages/js/plugins/ethereum/src/wrap-man/schema.ts index e22f4043f8..f39380e97d 100644 --- a/packages/js/plugins/ethereum/src/w3-man/schema.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { callContractView( diff --git a/packages/js/plugins/ethereum/src/polywrap-man/types.ts b/packages/js/plugins/ethereum/src/wrap-man/types.ts similarity index 100% rename from packages/js/plugins/ethereum/src/polywrap-man/types.ts rename to packages/js/plugins/ethereum/src/wrap-man/types.ts diff --git a/packages/js/plugins/filesystem/package.json b/packages/js/plugins/filesystem/package.json index 8fffa82dc2..5872c7346d 100644 --- a/packages/js/plugins/filesystem/package.json +++ b/packages/js/plugins/filesystem/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/fs-plugin-js", - "description": "Web3API File System Javascript Plugin", + "description": "Polywrap File System Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/filesystem/web3api.plugin.yaml b/packages/js/plugins/filesystem/polywrap.plugin.yaml similarity index 81% rename from packages/js/plugins/filesystem/web3api.plugin.yaml rename to packages/js/plugins/filesystem/polywrap.plugin.yaml index 21ececb756..14b28705ca 100644 --- a/packages/js/plugins/filesystem/web3api.plugin.yaml +++ b/packages/js/plugins/filesystem/polywrap.plugin.yaml @@ -4,5 +4,5 @@ name: Filesystem module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - - uri: "ens/uri-resolver.core.web3api.eth" + - uri: "ens/uri-resolver.core.polywrap.eth" schema: ../../../core-interfaces/uri-resolver/src/query.graphql diff --git a/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts b/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts index c3af204007..03b324aafd 100644 --- a/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/filesystem/src/__tests__/e2e.spec.ts @@ -1,6 +1,6 @@ import { filesystemPlugin } from "../index"; import { - buildApi, + buildWrapper, ensAddresses, initTestEnvironment, stopTestEnvironment, @@ -8,10 +8,10 @@ import { } from "@polywrap/test-env-js"; import { PolywrapClient, - Web3ApiClientConfig, + PolywrapClientConfig, defaultIpfsProviders, } from "@polywrap/client-js"; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; import { ensPlugin } from "@polywrap/ens-plugin-js"; import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; @@ -26,15 +26,15 @@ describe("Filesystem plugin", () => { beforeAll(async () => { await initTestEnvironment(); - const config: Partial = { + const config: Partial = { plugins: [ { - uri: "wrap://ens/fs.web3api.eth", + uri: "wrap://ens/fs.polywrap.eth", plugin: filesystemPlugin({ }), }, - // IPFS is required for downloading Web3API packages + // IPFS is required for downloading Polywrap packages { - uri: "wrap://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.polywrap.eth", plugin: ipfsPlugin({ provider: providers.ipfs, fallbackProviders: defaultIpfsProviders, @@ -42,7 +42,7 @@ describe("Filesystem plugin", () => { }, // ENS is required for resolving domain to IPFS hashes { - uri: "wrap://ens/ens.web3api.eth", + uri: "wrap://ens/ens.polywrap.eth", plugin: ensPlugin({ addresses: { testnet: ensAddresses.ensAddress, @@ -50,7 +50,7 @@ describe("Filesystem plugin", () => { }), }, { - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -69,16 +69,16 @@ describe("Filesystem plugin", () => { await stopTestEnvironment(); }); - it("invokes simple-storage api on local drive", async () => { - const apiPath = path.resolve( - `${GetPathToTestApis()}/wasm-as/simple-storage` + it("invokes simple-storage wrapper on local drive", async () => { + const wrapperPath = path.resolve( + `${GetPathToTestWrappers()}/wasm-as/simple-storage` ); - await buildApi(apiPath); + await buildWrapper(wrapperPath); - const fsPath = `${apiPath}/build`; + const fsPath = `${wrapperPath}/build`; const fsUri = `fs/${fsPath}`; - // query api from filesystem + // query wrapper from filesystem const deploy = await client.query<{ deployContract: string; }>({ @@ -105,14 +105,14 @@ describe("Filesystem plugin", () => { expect(schema).toBe(expectedSchema); // get the manifest - const manifest = await client.getManifest(fsUri, { type: "web3api" }); + const manifest = await client.getManifest(fsUri, { type: "polywrap" }); expect(manifest).toBeTruthy(); expect(manifest.language).toBe("wasm/assemblyscript"); // get a file - const file = await client.getFile(fsUri, { path: "web3api.json", encoding: "utf-8" }); - const expectedFile = await fs.promises.readFile(`${fsPath}/web3api.json`, "utf-8"); + const file = await client.getFile(fsUri, { path: "polywrap.json", encoding: "utf-8" }); + const expectedFile = await fs.promises.readFile(`${fsPath}/polywrap.json`, "utf-8"); expect(file).toBe(expectedFile); }); diff --git a/packages/js/plugins/filesystem/src/index.ts b/packages/js/plugins/filesystem/src/index.ts index 2431a0fd9c..694b1e35b1 100644 --- a/packages/js/plugins/filesystem/src/index.ts +++ b/packages/js/plugins/filesystem/src/index.ts @@ -6,7 +6,7 @@ import { UriResolver_MaybeUriOrManifest, Bytes, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import path from "path"; import fs from "fs"; @@ -24,9 +24,9 @@ export class FilesystemPlugin extends Module { } const manifestSearchPatterns = [ - "web3api.json", - "web3api.yaml", - "web3api.yml", + "polywrap.json", + "polywrap.yaml", + "polywrap.yml", ]; let manifest: string | undefined; diff --git a/packages/js/plugins/filesystem/src/polywrap-man/module.ts b/packages/js/plugins/filesystem/src/polywrap-man/module.ts deleted file mode 100644 index fb6ec175b7..0000000000 --- a/packages/js/plugins/filesystem/src/polywrap-man/module.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_tryResolveUri extends Record { - authority: Types.String; - path: Types.String; -} - -export interface Input_getFile extends Record { - path: Types.String; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract tryResolveUri( - input: Input_tryResolveUri, - client: Client - ): MaybeAsync; - - abstract getFile( - input: Input_getFile, - client: Client - ): MaybeAsync; -} diff --git a/packages/js/plugins/filesystem/src/polywrap-man/schema.ts b/packages/js/plugins/filesystem/src/polywrap-man/schema.ts deleted file mode 100644 index 260f41c9f8..0000000000 --- a/packages/js/plugins/filesystem/src/polywrap-man/schema.ts +++ /dev/null @@ -1,88 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module implements UriResolver_Module @imports( - types: [ - "UriResolver_Module", - "UriResolver_MaybeUriOrManifest" - ] -) { - tryResolveUri( - authority: String! - path: String! - ): UriResolver_MaybeUriOrManifest - - getFile( - path: String! - ): Bytes -} - -### Imported Modules START ### - -type UriResolver_Module @imported( - uri: "ens/uri-resolver.core.web3api.eth", - namespace: "UriResolver", - nativeType: "Module" -) { - tryResolveUri( - authority: String! - path: String! - ): UriResolver_MaybeUriOrManifest - - getFile( - path: String! - ): Bytes -} - -### Imported Modules END ### - -### Imported Objects START ### - -type UriResolver_MaybeUriOrManifest @imported( - uri: "ens/uri-resolver.core.web3api.eth", - namespace: "UriResolver", - nativeType: "MaybeUriOrManifest" -) { - uri: String - manifest: String -} - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/filesystem/src/polywrap-man/types.ts b/packages/js/plugins/filesystem/src/polywrap-man/types.ts deleted file mode 100644 index 0672a29a99..0000000000 --- a/packages/js/plugins/filesystem/src/polywrap-man/types.ts +++ /dev/null @@ -1,83 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./"; - -import { Client, InvokeApiResult } from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -/// Envs END /// - -/// Objects START /// -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -export interface UriResolver_MaybeUriOrManifest { - uri?: Types.String | null; - manifest?: Types.String | null; -} - -/// Imported Objects END /// - -/// Imported Modules START /// - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -interface UriResolver_Module_Input_tryResolveUri - extends Record { - authority: Types.String; - path: Types.String; -} - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -interface UriResolver_Module_Input_getFile extends Record { - path: Types.String; -} - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -export const UriResolver_Module = { - tryResolveUri: async ( - input: UriResolver_Module_Input_tryResolveUri, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", - method: "tryResolveUri", - input, - }); - }, - - getFile: async ( - input: UriResolver_Module_Input_getFile, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", - method: "getFile", - input, - }); - }, -}; - -/// Imported Modules END /// diff --git a/packages/js/plugins/filesystem/src/schema.graphql b/packages/js/plugins/filesystem/src/schema.graphql index 58429eb9ce..a9cd68ab2b 100644 --- a/packages/js/plugins/filesystem/src/schema.graphql +++ b/packages/js/plugins/filesystem/src/schema.graphql @@ -1,3 +1,3 @@ -#import { Module, MaybeUriOrManifest } into UriResolver from "ens/uri-resolver.core.web3api.eth" +#import { Module, MaybeUriOrManifest } into UriResolver from "ens/uri-resolver.core.polywrap.eth" type Module implements UriResolver_Module { } diff --git a/packages/js/plugins/filesystem/src/w3-man/module.ts b/packages/js/plugins/filesystem/src/w3-man/module.ts deleted file mode 100644 index fb6ec175b7..0000000000 --- a/packages/js/plugins/filesystem/src/w3-man/module.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_tryResolveUri extends Record { - authority: Types.String; - path: Types.String; -} - -export interface Input_getFile extends Record { - path: Types.String; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract tryResolveUri( - input: Input_tryResolveUri, - client: Client - ): MaybeAsync; - - abstract getFile( - input: Input_getFile, - client: Client - ): MaybeAsync; -} diff --git a/packages/js/plugins/ethereum/src/polywrap-man/index.ts b/packages/js/plugins/filesystem/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/ethereum/src/polywrap-man/index.ts rename to packages/js/plugins/filesystem/src/wrap-man/index.ts diff --git a/packages/js/plugins/ethereum/src/polywrap-man/manifest.ts b/packages/js/plugins/filesystem/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/ethereum/src/polywrap-man/manifest.ts rename to packages/js/plugins/filesystem/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/ens/src/w3-man/module.ts b/packages/js/plugins/filesystem/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/ens/src/w3-man/module.ts rename to packages/js/plugins/filesystem/src/wrap-man/module.ts diff --git a/packages/js/plugins/filesystem/src/w3-man/schema.ts b/packages/js/plugins/filesystem/src/wrap-man/schema.ts similarity index 88% rename from packages/js/plugins/filesystem/src/w3-man/schema.ts rename to packages/js/plugins/filesystem/src/wrap-man/schema.ts index 260f41c9f8..4c6de4fab4 100644 --- a/packages/js/plugins/filesystem/src/w3-man/schema.ts +++ b/packages/js/plugins/filesystem/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module implements UriResolver_Module @imports( types: [ @@ -57,7 +57,7 @@ type Module implements UriResolver_Module @imports( ### Imported Modules START ### type UriResolver_Module @imported( - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", namespace: "UriResolver", nativeType: "Module" ) { @@ -76,7 +76,7 @@ type UriResolver_Module @imported( ### Imported Objects START ### type UriResolver_MaybeUriOrManifest @imported( - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", namespace: "UriResolver", nativeType: "MaybeUriOrManifest" ) { diff --git a/packages/js/plugins/filesystem/src/w3-man/types.ts b/packages/js/plugins/filesystem/src/wrap-man/types.ts similarity index 77% rename from packages/js/plugins/filesystem/src/w3-man/types.ts rename to packages/js/plugins/filesystem/src/wrap-man/types.ts index 0672a29a99..e7db9ea1b7 100644 --- a/packages/js/plugins/filesystem/src/w3-man/types.ts +++ b/packages/js/plugins/filesystem/src/wrap-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@polywrap/core-js"; +import { Client, InvokeResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; @@ -33,7 +33,7 @@ export type Boolean = boolean; /// Imported Objects START /// -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ export interface UriResolver_MaybeUriOrManifest { uri?: Types.String | null; manifest?: Types.String | null; @@ -43,26 +43,26 @@ export interface UriResolver_MaybeUriOrManifest { /// Imported Modules START /// -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ interface UriResolver_Module_Input_tryResolveUri extends Record { authority: Types.String; path: Types.String; } -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ interface UriResolver_Module_Input_getFile extends Record { path: Types.String; } -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ export const UriResolver_Module = { tryResolveUri: async ( input: UriResolver_Module_Input_tryResolveUri, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", method: "tryResolveUri", input, }); @@ -71,9 +71,9 @@ export const UriResolver_Module = { getFile: async ( input: UriResolver_Module_Input_getFile, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", method: "getFile", input, }); diff --git a/packages/js/plugins/graph-node/package.json b/packages/js/plugins/graph-node/package.json index 841939948b..88fef8419d 100644 --- a/packages/js/plugins/graph-node/package.json +++ b/packages/js/plugins/graph-node/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/graph-node-plugin-js", - "description": "Web3API Graph Node Javascript Plugin", + "description": "Polywrap Graph Node Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/graph-node/web3api.plugin.yaml b/packages/js/plugins/graph-node/polywrap.plugin.yaml similarity index 100% rename from packages/js/plugins/graph-node/web3api.plugin.yaml rename to packages/js/plugins/graph-node/polywrap.plugin.yaml diff --git a/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts b/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts index 4add444ebc..03d3f113b5 100644 --- a/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/graph-node/src/__tests__/e2e.spec.ts @@ -1,7 +1,7 @@ import { GraphNodePlugin, plugin } from ".."; import { PolywrapClient } from "@polywrap/client-js"; -const uri = "ens/graph-node.web3api.eth"; +const uri = "ens/graph-node.polywrap.eth"; const provider = "https://api.thegraph.com"; jest.setTimeout(30000); diff --git a/packages/js/plugins/graph-node/src/index.ts b/packages/js/plugins/graph-node/src/index.ts index 1c581761dc..842bc0ca3e 100644 --- a/packages/js/plugins/graph-node/src/index.ts +++ b/packages/js/plugins/graph-node/src/index.ts @@ -4,7 +4,7 @@ import { Input_querySubgraph, HTTP_Module, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/graph-node/src/polywrap-man/types.ts b/packages/js/plugins/graph-node/src/polywrap-man/types.ts deleted file mode 100644 index 4fedc8a7c0..0000000000 --- a/packages/js/plugins/graph-node/src/polywrap-man/types.ts +++ /dev/null @@ -1,115 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./"; - -import { Client, InvokeApiResult } from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -/// Envs END /// - -/// Objects START /// -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/* URI: "ens/http.web3api.eth" */ -export interface HTTP_Request { - headers?: Array | null; - urlParams?: Array | null; - responseType: Types.HTTP_ResponseType; - body?: Types.String | null; -} - -/* URI: "ens/http.web3api.eth" */ -export interface HTTP_Header { - key: Types.String; - value: Types.String; -} - -/* URI: "ens/http.web3api.eth" */ -export interface HTTP_UrlParam { - key: Types.String; - value: Types.String; -} - -/* URI: "ens/http.web3api.eth" */ -export interface HTTP_Response { - status: Types.Int; - statusText: Types.String; - headers?: Array | null; - body?: Types.String | null; -} - -/* URI: "ens/http.web3api.eth" */ -export enum HTTP_ResponseTypeEnum { - TEXT, - BINARY, -} - -export type HTTP_ResponseTypeString = "TEXT" | "BINARY"; - -export type HTTP_ResponseType = HTTP_ResponseTypeEnum | HTTP_ResponseTypeString; - -/// Imported Objects END /// - -/// Imported Modules START /// - -/* URI: "ens/http.web3api.eth" */ -interface HTTP_Module_Input_get extends Record { - url: Types.String; - request?: Types.HTTP_Request | null; -} - -/* URI: "ens/http.web3api.eth" */ -interface HTTP_Module_Input_post extends Record { - url: Types.String; - request?: Types.HTTP_Request | null; -} - -/* URI: "ens/http.web3api.eth" */ -export const HTTP_Module = { - get: async ( - input: HTTP_Module_Input_get, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/http.web3api.eth", - method: "get", - input, - }); - }, - - post: async ( - input: HTTP_Module_Input_post, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/http.web3api.eth", - method: "post", - input, - }); - }, -}; - -/// Imported Modules END /// diff --git a/packages/js/plugins/graph-node/src/schema.graphql b/packages/js/plugins/graph-node/src/schema.graphql index fc0c137a87..faf378dfee 100644 --- a/packages/js/plugins/graph-node/src/schema.graphql +++ b/packages/js/plugins/graph-node/src/schema.graphql @@ -1,4 +1,4 @@ -#import { Module } into HTTP from "ens/http.web3api.eth" +#import { Module } into HTTP from "ens/http.polywrap.eth" type Module { querySubgraph( diff --git a/packages/js/plugins/graph-node/src/w3-man/module.ts b/packages/js/plugins/graph-node/src/w3-man/module.ts deleted file mode 100644 index f966dbe16e..0000000000 --- a/packages/js/plugins/graph-node/src/w3-man/module.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_querySubgraph extends Record { - subgraphAuthor: Types.String; - subgraphName: Types.String; - query: Types.String; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract querySubgraph( - input: Input_querySubgraph, - client: Client - ): MaybeAsync; -} diff --git a/packages/js/plugins/graph-node/src/w3-man/schema.ts b/packages/js/plugins/graph-node/src/w3-man/schema.ts deleted file mode 100644 index 4d278e9218..0000000000 --- a/packages/js/plugins/graph-node/src/w3-man/schema.ts +++ /dev/null @@ -1,130 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module @imports( - types: [ - "HTTP_Module", - "HTTP_Request", - "HTTP_Header", - "HTTP_UrlParam", - "HTTP_ResponseType", - "HTTP_Response" - ] -) { - querySubgraph( - subgraphAuthor: String! - subgraphName: String! - query: String! - ): String! -} - -### Imported Modules START ### - -type HTTP_Module @imported( - uri: "ens/http.web3api.eth", - namespace: "HTTP", - nativeType: "Module" -) { - get( - url: String! - request: HTTP_Request - ): HTTP_Response - - post( - url: String! - request: HTTP_Request - ): HTTP_Response -} - -### Imported Modules END ### - -### Imported Objects START ### - -type HTTP_Request @imported( - uri: "ens/http.web3api.eth", - namespace: "HTTP", - nativeType: "Request" -) { - headers: [HTTP_Header!] - urlParams: [HTTP_UrlParam!] - responseType: HTTP_ResponseType! - body: String -} - -type HTTP_Header @imported( - uri: "ens/http.web3api.eth", - namespace: "HTTP", - nativeType: "Header" -) { - key: String! - value: String! -} - -type HTTP_UrlParam @imported( - uri: "ens/http.web3api.eth", - namespace: "HTTP", - nativeType: "UrlParam" -) { - key: String! - value: String! -} - -type HTTP_Response @imported( - uri: "ens/http.web3api.eth", - namespace: "HTTP", - nativeType: "Response" -) { - status: Int! - statusText: String! - headers: [HTTP_Header!] - body: String -} - -enum HTTP_ResponseType @imported( - uri: "ens/http.web3api.eth", - namespace: "HTTP", - nativeType: "ResponseType" -) { - TEXT - BINARY -} - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/ethereum/src/w3-man/index.ts b/packages/js/plugins/graph-node/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/ethereum/src/w3-man/index.ts rename to packages/js/plugins/graph-node/src/wrap-man/index.ts diff --git a/packages/js/plugins/ethereum/src/w3-man/manifest.ts b/packages/js/plugins/graph-node/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/ethereum/src/w3-man/manifest.ts rename to packages/js/plugins/graph-node/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/graph-node/src/polywrap-man/module.ts b/packages/js/plugins/graph-node/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/graph-node/src/polywrap-man/module.ts rename to packages/js/plugins/graph-node/src/wrap-man/module.ts diff --git a/packages/js/plugins/graph-node/src/polywrap-man/schema.ts b/packages/js/plugins/graph-node/src/wrap-man/schema.ts similarity index 87% rename from packages/js/plugins/graph-node/src/polywrap-man/schema.ts rename to packages/js/plugins/graph-node/src/wrap-man/schema.ts index 4d278e9218..55b8a00c6a 100644 --- a/packages/js/plugins/graph-node/src/polywrap-man/schema.ts +++ b/packages/js/plugins/graph-node/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ @@ -58,7 +58,7 @@ type Module @imports( ### Imported Modules START ### type HTTP_Module @imported( - uri: "ens/http.web3api.eth", + uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "Module" ) { @@ -78,7 +78,7 @@ type HTTP_Module @imported( ### Imported Objects START ### type HTTP_Request @imported( - uri: "ens/http.web3api.eth", + uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "Request" ) { @@ -89,7 +89,7 @@ type HTTP_Request @imported( } type HTTP_Header @imported( - uri: "ens/http.web3api.eth", + uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "Header" ) { @@ -98,7 +98,7 @@ type HTTP_Header @imported( } type HTTP_UrlParam @imported( - uri: "ens/http.web3api.eth", + uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "UrlParam" ) { @@ -107,7 +107,7 @@ type HTTP_UrlParam @imported( } type HTTP_Response @imported( - uri: "ens/http.web3api.eth", + uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "Response" ) { @@ -118,7 +118,7 @@ type HTTP_Response @imported( } enum HTTP_ResponseType @imported( - uri: "ens/http.web3api.eth", + uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "ResponseType" ) { diff --git a/packages/js/plugins/graph-node/src/w3-man/types.ts b/packages/js/plugins/graph-node/src/wrap-man/types.ts similarity index 80% rename from packages/js/plugins/graph-node/src/w3-man/types.ts rename to packages/js/plugins/graph-node/src/wrap-man/types.ts index 4fedc8a7c0..18b622b929 100644 --- a/packages/js/plugins/graph-node/src/w3-man/types.ts +++ b/packages/js/plugins/graph-node/src/wrap-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@polywrap/core-js"; +import { Client, InvokeResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; @@ -33,7 +33,7 @@ export type Boolean = boolean; /// Imported Objects START /// -/* URI: "ens/http.web3api.eth" */ +/* URI: "ens/http.polywrap.eth" */ export interface HTTP_Request { headers?: Array | null; urlParams?: Array | null; @@ -41,19 +41,19 @@ export interface HTTP_Request { body?: Types.String | null; } -/* URI: "ens/http.web3api.eth" */ +/* URI: "ens/http.polywrap.eth" */ export interface HTTP_Header { key: Types.String; value: Types.String; } -/* URI: "ens/http.web3api.eth" */ +/* URI: "ens/http.polywrap.eth" */ export interface HTTP_UrlParam { key: Types.String; value: Types.String; } -/* URI: "ens/http.web3api.eth" */ +/* URI: "ens/http.polywrap.eth" */ export interface HTTP_Response { status: Types.Int; statusText: Types.String; @@ -61,7 +61,7 @@ export interface HTTP_Response { body?: Types.String | null; } -/* URI: "ens/http.web3api.eth" */ +/* URI: "ens/http.polywrap.eth" */ export enum HTTP_ResponseTypeEnum { TEXT, BINARY, @@ -75,26 +75,26 @@ export type HTTP_ResponseType = HTTP_ResponseTypeEnum | HTTP_ResponseTypeString; /// Imported Modules START /// -/* URI: "ens/http.web3api.eth" */ +/* URI: "ens/http.polywrap.eth" */ interface HTTP_Module_Input_get extends Record { url: Types.String; request?: Types.HTTP_Request | null; } -/* URI: "ens/http.web3api.eth" */ +/* URI: "ens/http.polywrap.eth" */ interface HTTP_Module_Input_post extends Record { url: Types.String; request?: Types.HTTP_Request | null; } -/* URI: "ens/http.web3api.eth" */ +/* URI: "ens/http.polywrap.eth" */ export const HTTP_Module = { get: async ( input: HTTP_Module_Input_get, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/http.web3api.eth", + uri: "ens/http.polywrap.eth", method: "get", input, }); @@ -103,9 +103,9 @@ export const HTTP_Module = { post: async ( input: HTTP_Module_Input_post, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/http.web3api.eth", + uri: "ens/http.polywrap.eth", method: "post", input, }); diff --git a/packages/js/plugins/http/README.md b/packages/js/plugins/http/README.md index b1373286f9..dc3ba4f459 100644 --- a/packages/js/plugins/http/README.md +++ b/packages/js/plugins/http/README.md @@ -13,8 +13,8 @@ Http plugin curently supports two different methods `GET` and `POST`. Similar to Below is sample invocation of the `GET` request with custom request headers and query parameters (`urlParams`). ```ts -const response = await web3ApiClient.query<{ get: Response }>({ -uri: new Uri("wrap://ens/http.web3api.eth"), +const response = await polywrapClient.query<{ get: Response }>({ +uri: new Uri("wrap://ens/http.polywrap.eth"), query: ` query { get( @@ -35,8 +35,8 @@ uri: new Uri("wrap://ens/http.web3api.eth"), Below is sample invocation of the `POST` request with custom request headers and query parameters (`urlParams`). It is also possible to set request body as shown below. ```ts -const response = await web3ApiClient.query<{ get: Response }>({ - uri: new Uri("wrap://ens/http.web3api.eth"), +const response = await polywrapClient.query<{ get: Response }>({ + uri: new Uri("wrap://ens/http.polywrap.eth"), query: ` query { post( diff --git a/packages/js/plugins/http/package.json b/packages/js/plugins/http/package.json index 13b66007d9..0b8be331f2 100644 --- a/packages/js/plugins/http/package.json +++ b/packages/js/plugins/http/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/http-plugin-js", - "description": "Web3API HTTP Javascript Plugin", + "description": "Polywrap HTTP Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/http/web3api.plugin.yaml b/packages/js/plugins/http/polywrap.plugin.yaml similarity index 100% rename from packages/js/plugins/http/web3api.plugin.yaml rename to packages/js/plugins/http/polywrap.plugin.yaml diff --git a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts index 90368fa8c7..45ff5f6a45 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts @@ -1,5 +1,5 @@ import { httpPlugin } from "../.."; -import { Response } from "../../polywrap-man"; +import { Response } from "../../wrap-man"; import { PolywrapClient } from "@polywrap/client-js" import nock from "nock"; @@ -12,13 +12,13 @@ const defaultReplyHeaders = { } describe("e2e tests for HttpPlugin", () => { - let web3ApiClient: PolywrapClient; + let polywrapClient: PolywrapClient; beforeEach(() => { - web3ApiClient = new PolywrapClient({ + polywrapClient = new PolywrapClient({ plugins: [ { - uri: "wrap://ens/http.web3api.eth", + uri: "wrap://ens/http.polywrap.eth", plugin: httpPlugin({ }), }, ] @@ -33,8 +33,8 @@ describe("e2e tests for HttpPlugin", () => { .get("/api") .reply(200, '{data: "test-response"}') - const response = await web3ApiClient.query<{ get: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ get: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { get( @@ -61,8 +61,8 @@ describe("e2e tests for HttpPlugin", () => { .get("/api") .reply(200, '{data: "test-response"}') - const response = await web3ApiClient.query<{ get: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ get: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { get( @@ -90,8 +90,8 @@ describe("e2e tests for HttpPlugin", () => { .query({ query: "foo" }) .reply(200, '{data: "test-response"}', { 'X-Response-Header': "resp-foo" }) - const response = await web3ApiClient.query<{ get: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ get: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { get( @@ -124,8 +124,8 @@ describe("e2e tests for HttpPlugin", () => { .get("/api") .reply(404) - const response = await web3ApiClient.query<{ get: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ get: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { get( @@ -162,8 +162,8 @@ describe("e2e tests for HttpPlugin", () => { .post("/api", reqPayloadStringified) .reply(200, resPayloadStringfified) - const response = await web3ApiClient.query<{ post: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ post: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { post( @@ -194,8 +194,8 @@ describe("e2e tests for HttpPlugin", () => { .post("/api", "{data: 'test-request'}") .reply(200, '{data: "test-response"}') - const response = await web3ApiClient.query<{ post: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ post: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { post( @@ -223,8 +223,8 @@ describe("e2e tests for HttpPlugin", () => { .post("/api", "{data: 'test-request'}") .reply(200, '{data: "test-response"}') - const response = await web3ApiClient.query<{ post: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ post: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { post( @@ -253,8 +253,8 @@ describe("e2e tests for HttpPlugin", () => { .query({ query: "foo" }) .reply(200, '{data: "test-response"}', { 'X-Response-Header': "resp-foo" }) - const response = await web3ApiClient.query<{ post: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ post: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { post( @@ -288,8 +288,8 @@ describe("e2e tests for HttpPlugin", () => { .post("/api") .reply(404) - const response = await web3ApiClient.query<{ get: Response }>({ - uri: "wrap://ens/http.web3api.eth", + const response = await polywrapClient.query<{ get: Response }>({ + uri: "wrap://ens/http.polywrap.eth", query: ` query { post( diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts index db679c683c..a611f67a21 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts @@ -1,9 +1,9 @@ import { httpPlugin } from "../.."; -import { Response } from "../../polywrap"; +import { Response } from "../../wrap"; import { PolywrapClient } from "@polywrap/client-js" import { - buildApi + buildWrapper } from "@polywrap/test-env-js"; import nock from "nock"; @@ -20,20 +20,20 @@ describe("e2e tests for HttpPlugin", () => { let client: PolywrapClient; - const apiPath = `${__dirname}/integration` - const uri = `fs/${apiPath}/build` + const wrapperPath = `${__dirname}/integration` + const uri = `fs/${wrapperPath}/build` beforeAll(async () => { client = new PolywrapClient({ plugins: [ { - uri: "wrap://ens/http.web3api.eth", + uri: "wrap://ens/http.polywrap.eth", plugin: httpPlugin({ }), }, ], }); - await buildApi(apiPath); + await buildWrapper(wrapperPath); }); it("get", async () => { diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/.gitignore b/packages/js/plugins/http/src/__tests__/e2e/integration/.gitignore index a15402b528..ccc3d015c7 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/.gitignore +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/.gitignore @@ -1,3 +1,3 @@ build node_modules -polywrap +wrap diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/package.json b/packages/js/plugins/http/src/__tests__/e2e/integration/package.json index 418c8defe7..eb9d3a7fc6 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/package.json +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/package.json @@ -4,12 +4,12 @@ "private": true, "version": "0.0.1-prealpha.85", "scripts": { - "build": "yarn build:web3api", - "build:web3api": "npx polywrap build", + "build": "yarn build:polywrap", + "build:polywrap": "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": "yarn deploy:web3api", - "deploy:web3api": "npx polywrap build --ipfs http://localhost:5001 --test-ens simplestorage.eth" + "deploy": "yarn deploy:polywrap", + "deploy:polywrap": "npx polywrap build --ipfs http://localhost:5001 --test-ens simplestorage.eth" }, "dependencies": { "@polywrap/wasm-as": "0.0.1-prealpha.85" diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/web3api.build.yaml b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.build.yaml similarity index 100% rename from packages/js/plugins/http/src/__tests__/e2e/integration/web3api.build.yaml rename to packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.build.yaml diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/web3api.yaml b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml similarity index 81% rename from packages/js/plugins/http/src/__tests__/e2e/integration/web3api.yaml rename to packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml index bae1ec9db5..0d337796fc 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/web3api.yaml +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: HTTP-Integration -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/schema.graphql b/packages/js/plugins/http/src/__tests__/e2e/integration/schema.graphql index 387daedd54..3689eba5cf 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/schema.graphql +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Request, Response } into HTTP from "wrap://ens/http.web3api.eth" +#import { Module, Request, Response } into HTTP from "wrap://ens/http.polywrap.eth" type Module { get( diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/src/index.ts b/packages/js/plugins/http/src/__tests__/e2e/integration/src/index.ts index 0d665cc558..335bdf66dd 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/src/index.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/src/index.ts @@ -3,7 +3,7 @@ import { HTTP_Response, Input_get, Input_post, -} from "./polywrap"; +} from "./wrap"; export function get(input: Input_get): HTTP_Response | null { return HTTP_Module.get({ diff --git a/packages/js/plugins/http/src/__tests__/unit/index.test.ts b/packages/js/plugins/http/src/__tests__/unit/index.test.ts index 649601dbfc..1bdbcbe243 100644 --- a/packages/js/plugins/http/src/__tests__/unit/index.test.ts +++ b/packages/js/plugins/http/src/__tests__/unit/index.test.ts @@ -1,5 +1,5 @@ import { HttpPlugin } from "../.."; -import { ResponseTypeEnum, Client } from "../../polywrap"; +import { ResponseTypeEnum, Client } from "../../wrap"; import axios, { AxiosResponse, AxiosRequestConfig } from "axios"; diff --git a/packages/js/plugins/http/src/__tests__/unit/util.test.ts b/packages/js/plugins/http/src/__tests__/unit/util.test.ts index 52382aef57..5e32775cb8 100644 --- a/packages/js/plugins/http/src/__tests__/unit/util.test.ts +++ b/packages/js/plugins/http/src/__tests__/unit/util.test.ts @@ -1,5 +1,5 @@ import { fromAxiosResponse, toAxiosRequestConfig } from "../../util"; -import { ResponseTypeEnum } from "../../polywrap"; +import { ResponseTypeEnum } from "../../wrap"; describe("converting axios response", () => { test("response type: text", () => { diff --git a/packages/js/plugins/http/src/index.ts b/packages/js/plugins/http/src/index.ts index 96dbfc875a..eab1c299a1 100644 --- a/packages/js/plugins/http/src/index.ts +++ b/packages/js/plugins/http/src/index.ts @@ -5,7 +5,7 @@ import { Input_post, Response, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import { fromAxiosResponse, toAxiosRequestConfig } from "./util"; import axios from "axios"; diff --git a/packages/js/plugins/http/src/polywrap-man/manifest.ts b/packages/js/plugins/http/src/polywrap-man/manifest.ts deleted file mode 100644 index bdf0be5286..0000000000 --- a/packages/js/plugins/http/src/polywrap-man/manifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/http/src/util.ts b/packages/js/plugins/http/src/util.ts index 03dafa9c5e..883a5db048 100644 --- a/packages/js/plugins/http/src/util.ts +++ b/packages/js/plugins/http/src/util.ts @@ -1,4 +1,4 @@ -import { Request, Response, ResponseTypeEnum, Header } from "./polywrap-man"; +import { Request, Response, ResponseTypeEnum, Header } from "./wrap-man"; import { AxiosResponse, AxiosRequestConfig } from "axios"; diff --git a/packages/js/plugins/http/src/w3-man/manifest.ts b/packages/js/plugins/http/src/w3-man/manifest.ts deleted file mode 100644 index bdf0be5286..0000000000 --- a/packages/js/plugins/http/src/w3-man/manifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/http/src/w3-man/module.ts b/packages/js/plugins/http/src/w3-man/module.ts deleted file mode 100644 index c702c01eb5..0000000000 --- a/packages/js/plugins/http/src/w3-man/module.ts +++ /dev/null @@ -1,32 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_get extends Record { - url: Types.String; - request?: Types.Request | null; -} - -export interface Input_post extends Record { - url: Types.String; - request?: Types.Request | null; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract get( - input: Input_get, - client: Client - ): MaybeAsync; - - abstract post( - input: Input_post, - client: Client - ): MaybeAsync; -} diff --git a/packages/js/plugins/http/src/w3-man/schema.ts b/packages/js/plugins/http/src/w3-man/schema.ts deleted file mode 100644 index fd42af3d5f..0000000000 --- a/packages/js/plugins/http/src/w3-man/schema.ts +++ /dev/null @@ -1,89 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module { - get( - url: String! - request: Request - ): Response - - post( - url: String! - request: Request - ): Response -} - -type Header { - key: String! - value: String! -} - -type UrlParam { - key: String! - value: String! -} - -type Response { - status: Int! - statusText: String! - headers: [Header!] - body: String -} - -type Request { - headers: [Header!] - urlParams: [UrlParam!] - responseType: ResponseType! - body: String -} - -enum ResponseType { - TEXT - BINARY -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/http/src/w3-man/types.ts b/packages/js/plugins/http/src/w3-man/types.ts deleted file mode 100644 index 4e8098ca01..0000000000 --- a/packages/js/plugins/http/src/w3-man/types.ts +++ /dev/null @@ -1,71 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -/// Envs END /// - -/// Objects START /// -export interface Header { - key: Types.String; - value: Types.String; -} - -export interface UrlParam { - key: Types.String; - value: Types.String; -} - -export interface Response { - status: Types.Int; - statusText: Types.String; - headers?: Array | null; - body?: Types.String | null; -} - -export interface Request { - headers?: Array | null; - urlParams?: Array | null; - responseType: Types.ResponseType; - body?: Types.String | null; -} - -/// Objects END /// - -/// Enums START /// -export enum ResponseTypeEnum { - TEXT, - BINARY, -} - -export type ResponseTypeString = "TEXT" | "BINARY"; - -export type ResponseType = ResponseTypeEnum | ResponseTypeString; - -/// Enums END /// - -/// Imported Objects START /// - -/// Imported Objects END /// - -/// Imported Modules START /// - -/// Imported Modules END /// diff --git a/packages/js/plugins/filesystem/src/polywrap-man/index.ts b/packages/js/plugins/http/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/filesystem/src/polywrap-man/index.ts rename to packages/js/plugins/http/src/wrap-man/index.ts diff --git a/packages/js/plugins/filesystem/src/polywrap-man/manifest.ts b/packages/js/plugins/http/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/filesystem/src/polywrap-man/manifest.ts rename to packages/js/plugins/http/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/http/src/polywrap-man/module.ts b/packages/js/plugins/http/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/http/src/polywrap-man/module.ts rename to packages/js/plugins/http/src/wrap-man/module.ts diff --git a/packages/js/plugins/http/src/polywrap-man/schema.ts b/packages/js/plugins/http/src/wrap-man/schema.ts similarity index 93% rename from packages/js/plugins/http/src/polywrap-man/schema.ts rename to packages/js/plugins/http/src/wrap-man/schema.ts index fd42af3d5f..e19ac44483 100644 --- a/packages/js/plugins/http/src/polywrap-man/schema.ts +++ b/packages/js/plugins/http/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { get( diff --git a/packages/js/plugins/http/src/polywrap-man/types.ts b/packages/js/plugins/http/src/wrap-man/types.ts similarity index 100% rename from packages/js/plugins/http/src/polywrap-man/types.ts rename to packages/js/plugins/http/src/wrap-man/types.ts diff --git a/packages/js/plugins/ipfs/package.json b/packages/js/plugins/ipfs/package.json index 5af7d9858e..d5b7150688 100644 --- a/packages/js/plugins/ipfs/package.json +++ b/packages/js/plugins/ipfs/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/ipfs-plugin-js", - "description": "Web3API IPFS Javascript Plugin", + "description": "Polywrap IPFS Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/ipfs/web3api.plugin.yaml b/packages/js/plugins/ipfs/polywrap.plugin.yaml similarity index 81% rename from packages/js/plugins/ipfs/web3api.plugin.yaml rename to packages/js/plugins/ipfs/polywrap.plugin.yaml index 54151d04fe..ea48e1428e 100644 --- a/packages/js/plugins/ipfs/web3api.plugin.yaml +++ b/packages/js/plugins/ipfs/polywrap.plugin.yaml @@ -4,5 +4,5 @@ language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - - uri: "ens/uri-resolver.core.web3api.eth" + - uri: "ens/uri-resolver.core.polywrap.eth" schema: ../../../core-interfaces/uri-resolver/src/query.graphql diff --git a/packages/js/plugins/ipfs/src/index.ts b/packages/js/plugins/ipfs/src/index.ts index a529bc8e92..bdbdd506e5 100644 --- a/packages/js/plugins/ipfs/src/index.ts +++ b/packages/js/plugins/ipfs/src/index.ts @@ -11,7 +11,7 @@ import { Env, UriResolver_MaybeUriOrManifest, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import { IpfsClient } from "./utils/IpfsClient"; import { execSimple, execFallbacks } from "./utils/exec"; @@ -89,7 +89,7 @@ export class IpfsPlugin extends Module { ); } - // uri-resolver.core.web3api.eth + // uri-resolver.core.polywrap.eth public async tryResolveUri( input: Input_tryResolveUri ): Promise { @@ -103,9 +103,9 @@ export class IpfsPlugin extends Module { } const manifestSearchPatterns = [ - "web3api.json", - "web3api.yaml", - "web3api.yml", + "polywrap.json", + "polywrap.yaml", + "polywrap.yml", ]; let manifest: string | undefined; @@ -121,7 +121,7 @@ export class IpfsPlugin extends Module { ); } catch (e) { // TODO: logging - // https://github.com/web3-api/monorepo/issues/33 + // https://github.com/polywrap/monorepo/issues/33 } } diff --git a/packages/js/plugins/ipfs/src/schema.graphql b/packages/js/plugins/ipfs/src/schema.graphql index b7885eea30..558a2b5803 100644 --- a/packages/js/plugins/ipfs/src/schema.graphql +++ b/packages/js/plugins/ipfs/src/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, MaybeUriOrManifest } into UriResolver from "ens/uri-resolver.core.web3api.eth" +#import { Module, MaybeUriOrManifest } into UriResolver from "ens/uri-resolver.core.polywrap.eth" type Env { """ diff --git a/packages/js/plugins/ipfs/src/w3-man/manifest.ts b/packages/js/plugins/ipfs/src/w3-man/manifest.ts deleted file mode 100644 index f7b9e13f5e..0000000000 --- a/packages/js/plugins/ipfs/src/w3-man/manifest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/ipfs/src/w3-man/module.ts b/packages/js/plugins/ipfs/src/w3-man/module.ts deleted file mode 100644 index ee6664ef40..0000000000 --- a/packages/js/plugins/ipfs/src/w3-man/module.ts +++ /dev/null @@ -1,60 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_catFile extends Record { - cid: Types.String; - options?: Types.Options | null; -} - -export interface Input_resolve extends Record { - cid: Types.String; - options?: Types.Options | null; -} - -export interface Input_tryResolveUri extends Record { - authority: Types.String; - path: Types.String; -} - -export interface Input_getFile extends Record { - path: Types.String; -} - -export interface Input_addFile extends Record { - data: Types.Bytes; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract catFile( - input: Input_catFile, - client: Client - ): MaybeAsync; - - abstract resolve( - input: Input_resolve, - client: Client - ): MaybeAsync; - - abstract tryResolveUri( - input: Input_tryResolveUri, - client: Client - ): MaybeAsync; - - abstract getFile( - input: Input_getFile, - client: Client - ): MaybeAsync; - - abstract addFile( - input: Input_addFile, - client: Client - ): MaybeAsync; -} diff --git a/packages/js/plugins/ipfs/src/w3-man/schema.ts b/packages/js/plugins/ipfs/src/w3-man/schema.ts deleted file mode 100644 index df29254e24..0000000000 --- a/packages/js/plugins/ipfs/src/w3-man/schema.ts +++ /dev/null @@ -1,130 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module implements UriResolver_Module @imports( - types: [ - "UriResolver_Module", - "UriResolver_MaybeUriOrManifest" - ] -) { - catFile( - cid: String! - options: Options - ): Bytes! - - resolve( - cid: String! - options: Options - ): ResolveResult - - tryResolveUri( - authority: String! - path: String! - ): UriResolver_MaybeUriOrManifest - - getFile( - path: String! - ): Bytes - - addFile( - data: Bytes! - ): String! -} - -type Env { - """ - Disable querying providers in parallel when resolving URIs - """ - disableParallelRequests: Boolean -} - -type ResolveResult { - cid: String! - provider: String! -} - -type Options { - """ - Timeout (in ms) for the operation. -Fallback providers are used if timeout is reached. - """ - timeout: UInt32 - """ - The IPFS provider to be used - """ - provider: String - """ - Disable querying providers in parallel when resolving URIs - """ - disableParallelRequests: Boolean -} - -### Imported Modules START ### - -type UriResolver_Module @imported( - uri: "ens/uri-resolver.core.web3api.eth", - namespace: "UriResolver", - nativeType: "Module" -) { - tryResolveUri( - authority: String! - path: String! - ): UriResolver_MaybeUriOrManifest - - getFile( - path: String! - ): Bytes -} - -### Imported Modules END ### - -### Imported Objects START ### - -type UriResolver_MaybeUriOrManifest @imported( - uri: "ens/uri-resolver.core.web3api.eth", - namespace: "UriResolver", - nativeType: "MaybeUriOrManifest" -) { - uri: String - manifest: String -} - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/ipfs/src/w3-man/types.ts b/packages/js/plugins/ipfs/src/w3-man/types.ts deleted file mode 100644 index bfedabd61c..0000000000 --- a/packages/js/plugins/ipfs/src/w3-man/types.ts +++ /dev/null @@ -1,97 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./"; - -import { Client, InvokeApiResult } from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -export interface Env extends Record { - disableParallelRequests?: Types.Boolean | null; -} -/// Envs END /// - -/// Objects START /// -export interface ResolveResult { - cid: Types.String; - provider: Types.String; -} - -export interface Options { - timeout?: Types.UInt32 | null; - provider?: Types.String | null; - disableParallelRequests?: Types.Boolean | null; -} - -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -export interface UriResolver_MaybeUriOrManifest { - uri?: Types.String | null; - manifest?: Types.String | null; -} - -/// Imported Objects END /// - -/// Imported Modules START /// - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -interface UriResolver_Module_Input_tryResolveUri - extends Record { - authority: Types.String; - path: Types.String; -} - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -interface UriResolver_Module_Input_getFile extends Record { - path: Types.String; -} - -/* URI: "ens/uri-resolver.core.web3api.eth" */ -export const UriResolver_Module = { - tryResolveUri: async ( - input: UriResolver_Module_Input_tryResolveUri, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", - method: "tryResolveUri", - input, - }); - }, - - getFile: async ( - input: UriResolver_Module_Input_getFile, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", - method: "getFile", - input, - }); - }, -}; - -/// Imported Modules END /// diff --git a/packages/js/plugins/filesystem/src/w3-man/index.ts b/packages/js/plugins/ipfs/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/filesystem/src/w3-man/index.ts rename to packages/js/plugins/ipfs/src/wrap-man/index.ts diff --git a/packages/js/plugins/ipfs/src/polywrap-man/manifest.ts b/packages/js/plugins/ipfs/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/ipfs/src/polywrap-man/manifest.ts rename to packages/js/plugins/ipfs/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/ipfs/src/polywrap-man/module.ts b/packages/js/plugins/ipfs/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/ipfs/src/polywrap-man/module.ts rename to packages/js/plugins/ipfs/src/wrap-man/module.ts diff --git a/packages/js/plugins/ipfs/src/polywrap-man/schema.ts b/packages/js/plugins/ipfs/src/wrap-man/schema.ts similarity index 92% rename from packages/js/plugins/ipfs/src/polywrap-man/schema.ts rename to packages/js/plugins/ipfs/src/wrap-man/schema.ts index df29254e24..df53cfe010 100644 --- a/packages/js/plugins/ipfs/src/polywrap-man/schema.ts +++ b/packages/js/plugins/ipfs/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module implements UriResolver_Module @imports( types: [ @@ -99,7 +99,7 @@ Fallback providers are used if timeout is reached. ### Imported Modules START ### type UriResolver_Module @imported( - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", namespace: "UriResolver", nativeType: "Module" ) { @@ -118,7 +118,7 @@ type UriResolver_Module @imported( ### Imported Objects START ### type UriResolver_MaybeUriOrManifest @imported( - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", namespace: "UriResolver", nativeType: "MaybeUriOrManifest" ) { diff --git a/packages/js/plugins/ipfs/src/polywrap-man/types.ts b/packages/js/plugins/ipfs/src/wrap-man/types.ts similarity index 80% rename from packages/js/plugins/ipfs/src/polywrap-man/types.ts rename to packages/js/plugins/ipfs/src/wrap-man/types.ts index bfedabd61c..5995af8e80 100644 --- a/packages/js/plugins/ipfs/src/polywrap-man/types.ts +++ b/packages/js/plugins/ipfs/src/wrap-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@polywrap/core-js"; +import { Client, InvokeResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; @@ -47,7 +47,7 @@ export interface Options { /// Imported Objects START /// -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ export interface UriResolver_MaybeUriOrManifest { uri?: Types.String | null; manifest?: Types.String | null; @@ -57,26 +57,26 @@ export interface UriResolver_MaybeUriOrManifest { /// Imported Modules START /// -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ interface UriResolver_Module_Input_tryResolveUri extends Record { authority: Types.String; path: Types.String; } -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ interface UriResolver_Module_Input_getFile extends Record { path: Types.String; } -/* URI: "ens/uri-resolver.core.web3api.eth" */ +/* URI: "ens/uri-resolver.core.polywrap.eth" */ export const UriResolver_Module = { tryResolveUri: async ( input: UriResolver_Module_Input_tryResolveUri, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", method: "tryResolveUri", input, }); @@ -85,9 +85,9 @@ export const UriResolver_Module = { getFile: async ( input: UriResolver_Module_Input_getFile, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/uri-resolver.core.web3api.eth", + uri: "ens/uri-resolver.core.polywrap.eth", method: "getFile", input, }); diff --git a/packages/js/plugins/logger/README.md b/packages/js/plugins/logger/README.md index 32fbbb98c4..2a9e593b30 100644 --- a/packages/js/plugins/logger/README.md +++ b/packages/js/plugins/logger/README.md @@ -1,6 +1,6 @@ # Consoler Logger Plugin -Console Logger plugin implements the `wrap://ens/logger.core.web3api.eth` core Web3API interface. By default it logs all events using the Javascript `console` module. Different logging mechanisms can be set using the `LoggerConfig`. +Console Logger plugin implements the `wrap://ens/logger.core.polywrap.eth` core Polywrap interface. By default it logs all events using the Javascript `console` module. Different logging mechanisms can be set using the `LoggerConfig`. ## Log levels @@ -16,12 +16,12 @@ import { loggerPlugin, LogLevel } from "@polywrap/logger-plugin-js"; const client = new PolywrapClient({ plugins: [{ - from: "wrap://ens/js-logger.web3api.eth", + from: "wrap://ens/js-logger.polywrap.eth", to: loggerPlugin() }], interfaces: [{ - interface: "wrap://ens/logger.core.web3api.eth", - implementations: ["wrap://ens/js-logger.web3api.eth"], + interface: "wrap://ens/logger.core.polywrap.eth", + implementations: ["wrap://ens/js-logger.polywrap.eth"], }] }); @@ -29,7 +29,7 @@ const client = new PolywrapClient({ // loggerPlugin((level: LogLevel, message: string) => { ... }) const response = await client.query<{ log: boolean }>({ - uri: "wrap://ens/js-logger.web3api.eth", + uri: "wrap://ens/js-logger.polywrap.eth", query: ` query { log( diff --git a/packages/js/plugins/logger/package.json b/packages/js/plugins/logger/package.json index 2d34edb858..c7d38bfabc 100644 --- a/packages/js/plugins/logger/package.json +++ b/packages/js/plugins/logger/package.json @@ -1,10 +1,10 @@ { "name": "@polywrap/logger-plugin-js", - "description": "Web3API Javascript Logger Plugin", + "description": "Polywrap Javascript Logger Plugin", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "files": [ "build" @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/logger/web3api.plugin.yaml b/packages/js/plugins/logger/polywrap.plugin.yaml similarity index 83% rename from packages/js/plugins/logger/web3api.plugin.yaml rename to packages/js/plugins/logger/polywrap.plugin.yaml index e69d6f08a7..76a67f99fe 100644 --- a/packages/js/plugins/logger/web3api.plugin.yaml +++ b/packages/js/plugins/logger/polywrap.plugin.yaml @@ -4,5 +4,5 @@ language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - - uri: "ens/logger.core.web3api.eth" + - uri: "ens/logger.core.polywrap.eth" schema: ../../../core-interfaces/logger/src/query.graphql diff --git a/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts index 949f01a824..744391c9d0 100644 --- a/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/logger/src/__tests__/e2e/e2e.spec.ts @@ -3,10 +3,10 @@ import { PolywrapClient } from "@polywrap/client-js"; describe("log method", () => { it("logs to console appropriate level", async () => { - const web3ApiClient = new PolywrapClient() + const polywrapClient = new PolywrapClient() - const response = await web3ApiClient.query<{ log: boolean }>({ - uri: "wrap://ens/js-logger.web3api.eth", + const response = await polywrapClient.query<{ log: boolean }>({ + uri: "wrap://ens/js-logger.polywrap.eth", query: ` query { log( diff --git a/packages/js/plugins/logger/src/index.ts b/packages/js/plugins/logger/src/index.ts index 2adcc0e4b9..7deeeef6fc 100644 --- a/packages/js/plugins/logger/src/index.ts +++ b/packages/js/plugins/logger/src/index.ts @@ -4,7 +4,7 @@ import { Logger_LogLevel, Logger_LogLevelEnum, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/logger/src/polywrap-man/manifest.ts b/packages/js/plugins/logger/src/polywrap-man/manifest.ts deleted file mode 100644 index bdf0be5286..0000000000 --- a/packages/js/plugins/logger/src/polywrap-man/manifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/logger/src/polywrap-man/types.ts b/packages/js/plugins/logger/src/polywrap-man/types.ts deleted file mode 100644 index 078745b3ba..0000000000 --- a/packages/js/plugins/logger/src/polywrap-man/types.ts +++ /dev/null @@ -1,72 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./"; - -import { Client, InvokeApiResult } from "@polywrap/core-js"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -/// Envs END /// - -/// Objects START /// -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/* URI: "ens/logger.core.web3api.eth" */ -export enum Logger_LogLevelEnum { - DEBUG, - INFO, - WARN, - ERROR, -} - -export type Logger_LogLevelString = "DEBUG" | "INFO" | "WARN" | "ERROR"; - -export type Logger_LogLevel = Logger_LogLevelEnum | Logger_LogLevelString; - -/// Imported Objects END /// - -/// Imported Modules START /// - -/* URI: "ens/logger.core.web3api.eth" */ -interface Logger_Module_Input_log extends Record { - level: Types.Logger_LogLevel; - message: Types.String; -} - -/* URI: "ens/logger.core.web3api.eth" */ -export const Logger_Module = { - log: async ( - input: Logger_Module_Input_log, - client: Client - ): Promise> => { - return client.invoke({ - uri: "ens/logger.core.web3api.eth", - method: "log", - input, - }); - }, -}; - -/// Imported Modules END /// diff --git a/packages/js/plugins/logger/src/schema.graphql b/packages/js/plugins/logger/src/schema.graphql index 60b0a684f5..06b2ec2b40 100644 --- a/packages/js/plugins/logger/src/schema.graphql +++ b/packages/js/plugins/logger/src/schema.graphql @@ -1,3 +1,3 @@ -#import { Module } into Logger from "ens/logger.core.web3api.eth" +#import { Module } into Logger from "ens/logger.core.polywrap.eth" type Module implements Logger_Module { } diff --git a/packages/js/plugins/logger/src/w3-man/index.ts b/packages/js/plugins/logger/src/w3-man/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/js/plugins/logger/src/w3-man/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/logger/src/w3-man/manifest.ts b/packages/js/plugins/logger/src/w3-man/manifest.ts deleted file mode 100644 index bdf0be5286..0000000000 --- a/packages/js/plugins/logger/src/w3-man/manifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/logger/src/w3-man/module.ts b/packages/js/plugins/logger/src/w3-man/module.ts deleted file mode 100644 index ded6effc40..0000000000 --- a/packages/js/plugins/logger/src/w3-man/module.ts +++ /dev/null @@ -1,19 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_log extends Record { - level: Types.Logger_LogLevel; - message: Types.String; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract log(input: Input_log, client: Client): MaybeAsync; -} diff --git a/packages/js/plugins/logger/src/w3-man/schema.ts b/packages/js/plugins/logger/src/w3-man/schema.ts deleted file mode 100644 index 9a541f8e8c..0000000000 --- a/packages/js/plugins/logger/src/w3-man/schema.ts +++ /dev/null @@ -1,82 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module implements Logger_Module @imports( - types: [ - "Logger_Module", - "Logger_LogLevel" - ] -) { - log( - level: Logger_LogLevel! - message: String! - ): Boolean! -} - -### Imported Modules START ### - -type Logger_Module @imported( - uri: "ens/logger.core.web3api.eth", - namespace: "Logger", - nativeType: "Module" -) { - log( - level: Logger_LogLevel! - message: String! - ): Boolean! -} - -### Imported Modules END ### - -### Imported Objects START ### - -enum Logger_LogLevel @imported( - uri: "ens/logger.core.web3api.eth", - namespace: "Logger", - nativeType: "LogLevel" -) { - DEBUG - INFO - WARN - ERROR -} - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/graph-node/src/polywrap-man/index.ts b/packages/js/plugins/logger/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/graph-node/src/polywrap-man/index.ts rename to packages/js/plugins/logger/src/wrap-man/index.ts diff --git a/packages/js/plugins/filesystem/src/w3-man/manifest.ts b/packages/js/plugins/logger/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/filesystem/src/w3-man/manifest.ts rename to packages/js/plugins/logger/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/logger/src/polywrap-man/module.ts b/packages/js/plugins/logger/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/logger/src/polywrap-man/module.ts rename to packages/js/plugins/logger/src/wrap-man/module.ts diff --git a/packages/js/plugins/logger/src/polywrap-man/schema.ts b/packages/js/plugins/logger/src/wrap-man/schema.ts similarity index 88% rename from packages/js/plugins/logger/src/polywrap-man/schema.ts rename to packages/js/plugins/logger/src/wrap-man/schema.ts index 9a541f8e8c..4176115ba5 100644 --- a/packages/js/plugins/logger/src/polywrap-man/schema.ts +++ b/packages/js/plugins/logger/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module implements Logger_Module @imports( types: [ @@ -53,7 +53,7 @@ type Module implements Logger_Module @imports( ### Imported Modules START ### type Logger_Module @imported( - uri: "ens/logger.core.web3api.eth", + uri: "ens/logger.core.polywrap.eth", namespace: "Logger", nativeType: "Module" ) { @@ -68,7 +68,7 @@ type Logger_Module @imported( ### Imported Objects START ### enum Logger_LogLevel @imported( - uri: "ens/logger.core.web3api.eth", + uri: "ens/logger.core.polywrap.eth", namespace: "Logger", nativeType: "LogLevel" ) { diff --git a/packages/js/plugins/logger/src/w3-man/types.ts b/packages/js/plugins/logger/src/wrap-man/types.ts similarity index 83% rename from packages/js/plugins/logger/src/w3-man/types.ts rename to packages/js/plugins/logger/src/wrap-man/types.ts index 078745b3ba..fa91f80b2c 100644 --- a/packages/js/plugins/logger/src/w3-man/types.ts +++ b/packages/js/plugins/logger/src/wrap-man/types.ts @@ -5,7 +5,7 @@ import * as Types from "./"; -import { Client, InvokeApiResult } from "@polywrap/core-js"; +import { Client, InvokeResult } from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; @@ -33,7 +33,7 @@ export type Boolean = boolean; /// Imported Objects START /// -/* URI: "ens/logger.core.web3api.eth" */ +/* URI: "ens/logger.core.polywrap.eth" */ export enum Logger_LogLevelEnum { DEBUG, INFO, @@ -49,20 +49,20 @@ export type Logger_LogLevel = Logger_LogLevelEnum | Logger_LogLevelString; /// Imported Modules START /// -/* URI: "ens/logger.core.web3api.eth" */ +/* URI: "ens/logger.core.polywrap.eth" */ interface Logger_Module_Input_log extends Record { level: Types.Logger_LogLevel; message: Types.String; } -/* URI: "ens/logger.core.web3api.eth" */ +/* URI: "ens/logger.core.polywrap.eth" */ export const Logger_Module = { log: async ( input: Logger_Module_Input_log, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/logger.core.web3api.eth", + uri: "ens/logger.core.polywrap.eth", method: "log", input, }); diff --git a/packages/js/plugins/sha3/package.json b/packages/js/plugins/sha3/package.json index 783e3f5f6f..006209aa6f 100644 --- a/packages/js/plugins/sha3/package.json +++ b/packages/js/plugins/sha3/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/sha3-plugin-js", - "description": "Web3API SHA3 Javascript Plugin", + "description": "Polywrap SHA3 Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/sha3/web3api.plugin.yaml b/packages/js/plugins/sha3/polywrap.plugin.yaml similarity index 100% rename from packages/js/plugins/sha3/web3api.plugin.yaml rename to packages/js/plugins/sha3/polywrap.plugin.yaml diff --git a/packages/js/plugins/sha3/src/__tests__/index.test.ts b/packages/js/plugins/sha3/src/__tests__/index.test.ts index a00dad8e19..1612299747 100644 --- a/packages/js/plugins/sha3/src/__tests__/index.test.ts +++ b/packages/js/plugins/sha3/src/__tests__/index.test.ts @@ -22,7 +22,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { client = new PolywrapClient({ plugins: [ { - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", plugin: sha3Plugin({ }), }, ] @@ -32,7 +32,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("sha3_512 matches", async () => { const expected = sha3_512(testMessage) const response = await client.query<{ sha3_512: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { sha3_512(message: "${testMessage}") @@ -48,7 +48,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("sha3_384 matches", async () => { const expected = sha3_384(testMessage) const response = await client.query<{ sha3_384: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { sha3_384(message: "${testMessage}") @@ -64,7 +64,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("sha3_256 matches", async () => { const expected = sha3_256(testMessage) const response = await client.query<{ sha3_256: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { sha3_256(message: "${testMessage}") @@ -80,7 +80,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("sha3_224 matches", async () => { const expected = sha3_224(testMessage) const response = await client.query<{ sha3_224: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { sha3_224(message: "${testMessage}") @@ -96,7 +96,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("keccak512 matches", async () => { const expected = keccak512(testMessage) const response = await client.query<{ keccak_512: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { keccak_512(message: "${testMessage}") @@ -112,7 +112,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("keccak384 matches", async () => { const expected = keccak384(testMessage) const response = await client.query<{ keccak_384: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { keccak_384(message: "${testMessage}") @@ -128,7 +128,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("keccak256 matches", async () => { const expected = keccak256(testMessage) const response = await client.query<{ keccak_256: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { keccak_256(message: "${testMessage}") @@ -146,7 +146,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { const testMessageBuffer = encoder.encode(testMessage); const expected = keccak256(testMessageBuffer) const response = await client.query<{ buffer_keccak_256: Uint8Array }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { buffer_keccak_256(message: $message) @@ -165,7 +165,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("keccak224 matches", async () => { const expected = keccak224(testMessage) const response = await client.query<{ keccak_224: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { keccak_224(message: "${testMessage}") @@ -181,7 +181,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("shake128 matches", async () => { const expected = shake128(testMessage, 256) const response = await client.query<{ shake_128: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { shake_128(message: "${testMessage}", outputBits: 256) @@ -197,7 +197,7 @@ describe("js-sha3 algorithms returned values match the plugin's", () => { it("shake256 matches", async () => { const expected = shake256(testMessage, 512) const response = await client.query<{ shake_256: string }>({ - uri: "wrap://ens/sha3.web3api.eth", + uri: "wrap://ens/sha3.polywrap.eth", query: ` query { shake_256(message: "${testMessage}", outputBits: 512) diff --git a/packages/js/plugins/sha3/src/index.ts b/packages/js/plugins/sha3/src/index.ts index 183dd445ed..7e7aac31c5 100644 --- a/packages/js/plugins/sha3/src/index.ts +++ b/packages/js/plugins/sha3/src/index.ts @@ -17,7 +17,7 @@ import { Input_shake_128, Input_shake_256, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import { sha3_512, diff --git a/packages/js/plugins/sha3/src/polywrap-man/index.ts b/packages/js/plugins/sha3/src/polywrap-man/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/js/plugins/sha3/src/polywrap-man/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/sha3/src/polywrap-man/manifest.ts b/packages/js/plugins/sha3/src/polywrap-man/manifest.ts deleted file mode 100644 index bdf0be5286..0000000000 --- a/packages/js/plugins/sha3/src/polywrap-man/manifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/sha3/src/w3-man/index.ts b/packages/js/plugins/sha3/src/w3-man/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/js/plugins/sha3/src/w3-man/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/sha3/src/w3-man/manifest.ts b/packages/js/plugins/sha3/src/w3-man/manifest.ts deleted file mode 100644 index bdf0be5286..0000000000 --- a/packages/js/plugins/sha3/src/w3-man/manifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/sha3/src/w3-man/module.ts b/packages/js/plugins/sha3/src/w3-man/module.ts deleted file mode 100644 index 0b7ded2bd9..0000000000 --- a/packages/js/plugins/sha3/src/w3-man/module.ts +++ /dev/null @@ -1,122 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_sha3_512 extends Record { - message: Types.String; -} - -export interface Input_sha3_384 extends Record { - message: Types.String; -} - -export interface Input_sha3_256 extends Record { - message: Types.String; -} - -export interface Input_sha3_224 extends Record { - message: Types.String; -} - -export interface Input_keccak_512 extends Record { - message: Types.String; -} - -export interface Input_keccak_384 extends Record { - message: Types.String; -} - -export interface Input_keccak_256 extends Record { - message: Types.String; -} - -export interface Input_keccak_224 extends Record { - message: Types.String; -} - -export interface Input_hex_keccak_256 extends Record { - message: Types.String; -} - -export interface Input_buffer_keccak_256 extends Record { - message: Types.Bytes; -} - -export interface Input_shake_128 extends Record { - message: Types.String; - outputBits: Types.Int; -} - -export interface Input_shake_256 extends Record { - message: Types.String; - outputBits: Types.Int; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract sha3_512( - input: Input_sha3_512, - client: Client - ): MaybeAsync; - - abstract sha3_384( - input: Input_sha3_384, - client: Client - ): MaybeAsync; - - abstract sha3_256( - input: Input_sha3_256, - client: Client - ): MaybeAsync; - - abstract sha3_224( - input: Input_sha3_224, - client: Client - ): MaybeAsync; - - abstract keccak_512( - input: Input_keccak_512, - client: Client - ): MaybeAsync; - - abstract keccak_384( - input: Input_keccak_384, - client: Client - ): MaybeAsync; - - abstract keccak_256( - input: Input_keccak_256, - client: Client - ): MaybeAsync; - - abstract keccak_224( - input: Input_keccak_224, - client: Client - ): MaybeAsync; - - abstract hex_keccak_256( - input: Input_hex_keccak_256, - client: Client - ): MaybeAsync; - - abstract buffer_keccak_256( - input: Input_buffer_keccak_256, - client: Client - ): MaybeAsync; - - abstract shake_128( - input: Input_shake_128, - client: Client - ): MaybeAsync; - - abstract shake_256( - input: Input_shake_256, - client: Client - ): MaybeAsync; -} diff --git a/packages/js/plugins/sha3/src/w3-man/schema.ts b/packages/js/plugins/sha3/src/w3-man/schema.ts deleted file mode 100644 index 461d822423..0000000000 --- a/packages/js/plugins/sha3/src/w3-man/schema.ts +++ /dev/null @@ -1,100 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module { - sha3_512( - message: String! - ): String! - - sha3_384( - message: String! - ): String! - - sha3_256( - message: String! - ): String! - - sha3_224( - message: String! - ): String! - - keccak_512( - message: String! - ): String! - - keccak_384( - message: String! - ): String! - - keccak_256( - message: String! - ): String! - - keccak_224( - message: String! - ): String! - - hex_keccak_256( - message: String! - ): String! - - buffer_keccak_256( - message: Bytes! - ): String! - - shake_128( - message: String! - outputBits: Int! - ): String! - - shake_256( - message: String! - outputBits: Int! - ): String! -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/sha3/src/w3-man/types.ts b/packages/js/plugins/sha3/src/w3-man/types.ts deleted file mode 100644 index 4888424e2e..0000000000 --- a/packages/js/plugins/sha3/src/w3-man/types.ts +++ /dev/null @@ -1,34 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -/// Envs END /// - -/// Objects START /// -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/// Imported Objects END /// - -/// Imported Modules START /// - -/// Imported Modules END /// diff --git a/packages/js/plugins/graph-node/src/w3-man/index.ts b/packages/js/plugins/sha3/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/graph-node/src/w3-man/index.ts rename to packages/js/plugins/sha3/src/wrap-man/index.ts diff --git a/packages/js/plugins/graph-node/src/polywrap-man/manifest.ts b/packages/js/plugins/sha3/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/graph-node/src/polywrap-man/manifest.ts rename to packages/js/plugins/sha3/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/sha3/src/polywrap-man/module.ts b/packages/js/plugins/sha3/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/sha3/src/polywrap-man/module.ts rename to packages/js/plugins/sha3/src/wrap-man/module.ts diff --git a/packages/js/plugins/sha3/src/polywrap-man/schema.ts b/packages/js/plugins/sha3/src/wrap-man/schema.ts similarity index 94% rename from packages/js/plugins/sha3/src/polywrap-man/schema.ts rename to packages/js/plugins/sha3/src/wrap-man/schema.ts index 461d822423..7bed343046 100644 --- a/packages/js/plugins/sha3/src/polywrap-man/schema.ts +++ b/packages/js/plugins/sha3/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { sha3_512( diff --git a/packages/js/plugins/sha3/src/polywrap-man/types.ts b/packages/js/plugins/sha3/src/wrap-man/types.ts similarity index 100% rename from packages/js/plugins/sha3/src/polywrap-man/types.ts rename to packages/js/plugins/sha3/src/wrap-man/types.ts diff --git a/packages/js/plugins/uts46/package.json b/packages/js/plugins/uts46/package.json index 14346fae62..aad796a709 100644 --- a/packages/js/plugins/uts46/package.json +++ b/packages/js/plugins/uts46/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/uts46-plugin-js", - "description": "Web3API IDNA-UTS #46 Javascript Plugin", + "description": "Polywrap IDNA-UTS #46 Javascript Plugin", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/polywrap", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uts46/web3api.plugin.yaml b/packages/js/plugins/uts46/polywrap.plugin.yaml similarity index 100% rename from packages/js/plugins/uts46/web3api.plugin.yaml rename to packages/js/plugins/uts46/polywrap.plugin.yaml diff --git a/packages/js/plugins/uts46/src/__tests__/index.test.ts b/packages/js/plugins/uts46/src/__tests__/index.test.ts index 02c9178c4a..eefa95f67e 100644 --- a/packages/js/plugins/uts46/src/__tests__/index.test.ts +++ b/packages/js/plugins/uts46/src/__tests__/index.test.ts @@ -11,7 +11,7 @@ describe("IDNA UTS #46", () => { client = new PolywrapClient({ plugins: [ { - uri: "wrap://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.polywrap.eth", plugin: uts46Plugin({ }), }, ], @@ -22,7 +22,7 @@ describe("IDNA UTS #46", () => { it("ToAscii matches", async () => { const expected = uts46.toAscii(textToConvert); const response = await client.query<{ toAscii: string }>({ - uri: "wrap://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.polywrap.eth", query: ` query { toAscii(value: "${textToConvert}") @@ -49,7 +49,7 @@ describe("IDNA UTS #46", () => { it("ToUnicode matches", async () => { const expected = uts46.toUnicode(textToConvert); const response = await client.query<{ toUnicode: string }>({ - uri: "wrap://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.polywrap.eth", query: ` query { toUnicode(value: "${textToConvert}") @@ -65,7 +65,7 @@ describe("IDNA UTS #46", () => { it("Convert matches", async () => { const expected = uts46.convert(textToConvert); const response = await client.query<{ convert: string }>({ - uri: "wrap://ens/uts46.web3api.eth", + uri: "wrap://ens/uts46.polywrap.eth", query: ` query { convert(value: "${textToConvert}") diff --git a/packages/js/plugins/uts46/src/index.ts b/packages/js/plugins/uts46/src/index.ts index acfba675da..7c096b4aa7 100644 --- a/packages/js/plugins/uts46/src/index.ts +++ b/packages/js/plugins/uts46/src/index.ts @@ -6,7 +6,7 @@ import { Input_convert, ConvertResult, manifest, -} from "./polywrap-man"; +} from "./wrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uts46/src/polywrap-man/index.ts b/packages/js/plugins/uts46/src/polywrap-man/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/js/plugins/uts46/src/polywrap-man/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uts46/src/polywrap-man/manifest.ts b/packages/js/plugins/uts46/src/polywrap-man/manifest.ts deleted file mode 100644 index bdf0be5286..0000000000 --- a/packages/js/plugins/uts46/src/polywrap-man/manifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/uts46/src/w3-man/index.ts b/packages/js/plugins/uts46/src/w3-man/index.ts deleted file mode 100644 index f367d143d9..0000000000 --- a/packages/js/plugins/uts46/src/w3-man/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uts46/src/w3-man/manifest.ts b/packages/js/plugins/uts46/src/w3-man/manifest.ts deleted file mode 100644 index bdf0be5286..0000000000 --- a/packages/js/plugins/uts46/src/w3-man/manifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -import { PluginPackageManifest } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [], -}; diff --git a/packages/js/plugins/uts46/src/w3-man/module.ts b/packages/js/plugins/uts46/src/w3-man/module.ts deleted file mode 100644 index 2b34f4b0e9..0000000000 --- a/packages/js/plugins/uts46/src/w3-man/module.ts +++ /dev/null @@ -1,39 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./types"; - -import { Client, PluginModule, MaybeAsync } from "@polywrap/core-js"; - -export interface Input_toAscii extends Record { - value: Types.String; -} - -export interface Input_toUnicode extends Record { - value: Types.String; -} - -export interface Input_convert extends Record { - value: Types.String; -} - -export abstract class Module< - TConfig extends Record -> extends PluginModule { - abstract toAscii( - input: Input_toAscii, - client: Client - ): MaybeAsync; - - abstract toUnicode( - input: Input_toUnicode, - client: Client - ): MaybeAsync; - - abstract convert( - input: Input_convert, - client: Client - ): MaybeAsync; -} diff --git a/packages/js/plugins/uts46/src/w3-man/schema.ts b/packages/js/plugins/uts46/src/w3-man/schema.ts deleted file mode 100644 index dc870fd524..0000000000 --- a/packages/js/plugins/uts46/src/w3-man/schema.ts +++ /dev/null @@ -1,67 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema = `### Web3API Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Web3API Header END ### - -type Module { - toAscii( - value: String! - ): String! - - toUnicode( - value: String! - ): String! - - convert( - value: String! - ): ConvertResult! -} - -type ConvertResult { - IDN: String! - PC: String! -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### -`; diff --git a/packages/js/plugins/uts46/src/w3-man/types.ts b/packages/js/plugins/uts46/src/w3-man/types.ts deleted file mode 100644 index d27c658cf2..0000000000 --- a/packages/js/plugins/uts46/src/w3-man/types.ts +++ /dev/null @@ -1,43 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as Types from "./"; - -export type UInt = number; -export type UInt8 = number; -export type UInt16 = number; -export type UInt32 = number; -export type Int = number; -export type Int8 = number; -export type Int16 = number; -export type Int32 = number; -export type Bytes = ArrayBuffer; -export type BigInt = string; -export type BigNumber = string; -export type Json = string; -export type String = string; -export type Boolean = boolean; - -/// Envs START /// -/// Envs END /// - -/// Objects START /// -export interface ConvertResult { - IDN: Types.String; - PC: Types.String; -} - -/// Objects END /// - -/// Enums START /// -/// Enums END /// - -/// Imported Objects START /// - -/// Imported Objects END /// - -/// Imported Modules START /// - -/// Imported Modules END /// diff --git a/packages/js/plugins/http/src/polywrap-man/index.ts b/packages/js/plugins/uts46/src/wrap-man/index.ts similarity index 100% rename from packages/js/plugins/http/src/polywrap-man/index.ts rename to packages/js/plugins/uts46/src/wrap-man/index.ts diff --git a/packages/js/plugins/graph-node/src/w3-man/manifest.ts b/packages/js/plugins/uts46/src/wrap-man/manifest.ts similarity index 100% rename from packages/js/plugins/graph-node/src/w3-man/manifest.ts rename to packages/js/plugins/uts46/src/wrap-man/manifest.ts diff --git a/packages/js/plugins/uts46/src/polywrap-man/module.ts b/packages/js/plugins/uts46/src/wrap-man/module.ts similarity index 100% rename from packages/js/plugins/uts46/src/polywrap-man/module.ts rename to packages/js/plugins/uts46/src/wrap-man/module.ts diff --git a/packages/js/plugins/uts46/src/polywrap-man/schema.ts b/packages/js/plugins/uts46/src/wrap-man/schema.ts similarity index 92% rename from packages/js/plugins/uts46/src/polywrap-man/schema.ts rename to packages/js/plugins/uts46/src/wrap-man/schema.ts index dc870fd524..268e68e8a3 100644 --- a/packages/js/plugins/uts46/src/polywrap-man/schema.ts +++ b/packages/js/plugins/uts46/src/wrap-man/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema = `### Web3API Header START ### +export const schema = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { toAscii( diff --git a/packages/js/plugins/uts46/src/polywrap-man/types.ts b/packages/js/plugins/uts46/src/wrap-man/types.ts similarity index 100% rename from packages/js/plugins/uts46/src/polywrap-man/types.ts rename to packages/js/plugins/uts46/src/wrap-man/types.ts diff --git a/packages/js/react/package.json b/packages/js/react/package.json index 25d043e1f2..fc42de60b5 100644 --- a/packages/js/react/package.json +++ b/packages/js/react/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/react", - "description": "Web3API React Integration", + "description": "Polywrap React Integration", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/js/react/src/__tests__/app/SimpleStorage.tsx b/packages/js/react/src/__tests__/app/SimpleStorage.tsx index 7599f348dc..12d7eaa503 100644 --- a/packages/js/react/src/__tests__/app/SimpleStorage.tsx +++ b/packages/js/react/src/__tests__/app/SimpleStorage.tsx @@ -1,10 +1,10 @@ -import { useWeb3ApiQuery, Web3ApiProvider, useWeb3ApiClient, createWeb3ApiProvider } from "@polywrap/react"; +import { usePolywrapQuery, PolywrapProvider, usePolywrapClient, createPolywrapProvider } from "@polywrap/react"; import { PluginRegistration } from "@polywrap/client-js"; // eslint-disable-next-line import/no-extraneous-dependencies import React from "react"; const SimpleStorage = ({ uri }: { uri: string }) => { - const { execute: deployContract, data: deployData } = useWeb3ApiQuery<{ + const { execute: deployContract, data: deployData } = usePolywrapQuery<{ deployContract: string }>({ uri, @@ -17,7 +17,7 @@ const SimpleStorage = ({ uri }: { uri: string }) => { }`, }); - const { execute: setData } = useWeb3ApiQuery({ + const { execute: setData } = usePolywrapQuery({ uri, query: `mutation { setData( @@ -34,7 +34,7 @@ const SimpleStorage = ({ uri }: { uri: string }) => { } }); - const { execute: getStorageData, data: currentStorage } = useWeb3ApiQuery({ + const { execute: getStorageData, data: currentStorage } = usePolywrapQuery({ uri, query: `query { getData( @@ -46,8 +46,8 @@ const SimpleStorage = ({ uri }: { uri: string }) => { }`, }); - const client1 = useWeb3ApiClient(); - const client2 = useWeb3ApiClient({ provider: "custom" }); + const client1 = usePolywrapClient(); + const client2 = usePolywrapClient({ provider: "custom" }); const updateStorageData = async () => { await setData(); @@ -72,7 +72,7 @@ const SimpleStorage = ({ uri }: { uri: string }) => { ); }; -const CustomProvider = createWeb3ApiProvider("custom"); +const CustomProvider = createPolywrapProvider("custom"); export const SimpleStorageContainer = ({ plugins, @@ -82,8 +82,8 @@ export const SimpleStorageContainer = ({ ensUri: string; }) => ( - + - + ); diff --git a/packages/js/react/src/__tests__/integration.spec.tsx b/packages/js/react/src/__tests__/integration.spec.tsx index 2023998604..976175f753 100644 --- a/packages/js/react/src/__tests__/integration.spec.tsx +++ b/packages/js/react/src/__tests__/integration.spec.tsx @@ -1,15 +1,15 @@ -import { createWeb3ApiProvider } from ".."; +import { createPolywrapProvider } from ".."; import { SimpleStorageContainer } from "./app/SimpleStorage"; import { createPlugins } from "./plugins"; import { initTestEnvironment, stopTestEnvironment, - buildAndDeployApi, + buildAndDeployWrapper, ensAddresses, providers } from "@polywrap/test-env-js"; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; import { PluginRegistration } from "@polywrap/core-js"; // eslint-disable-next-line import/no-extraneous-dependencies @@ -17,10 +17,10 @@ import React from "react"; import { render, fireEvent, screen, waitFor } from "@testing-library/react"; jest.setTimeout(360000); -describe("Web3API React Integration", () => { +describe("Polywrap React Integration", () => { let plugins: PluginRegistration[]; let ensUri: string; - let api: { + let wrapper: { ensDomain: string; ipfsCid: string; }; @@ -30,13 +30,13 @@ describe("Web3API React Integration", () => { plugins = createPlugins(ensAddresses.ensAddress, providers.ethereum, providers.ipfs); - api = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/simple-storage`, + wrapper = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/simple-storage`, ipfsProvider: providers.ipfs, ethereumProvider: providers.ethereum, }); - ensUri = `ens/testnet/${api.ensDomain}`; + ensUri = `ens/testnet/${wrapper.ensDomain}`; }); afterAll(async () => { @@ -67,10 +67,10 @@ describe("Web3API React Integration", () => { it("Should throw error because two providers with same key has been rendered ", () => { // @ts-ignore - const CustomWeb3ApiProvider = createWeb3ApiProvider("test"); + const CustomPolywrapProvider = createPolywrapProvider("test"); - expect(() => createWeb3ApiProvider("test")).toThrowError( - /A Web3Api provider already exists with the name \"test\"/ + expect(() => createPolywrapProvider("test")).toThrowError( + /A Polywrap provider already exists with the name \"test\"/ ); }); }); diff --git a/packages/js/react/src/__tests__/plugins.ts b/packages/js/react/src/__tests__/plugins.ts index 9f5ba7c842..59bdf2d77f 100644 --- a/packages/js/react/src/__tests__/plugins.ts +++ b/packages/js/react/src/__tests__/plugins.ts @@ -11,7 +11,7 @@ export function createPlugins( ): PluginRegistration[] { return [ { - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", plugin: ethereumPlugin({ networks: { testnet: { @@ -21,14 +21,14 @@ export function createPlugins( }), }, { - uri: "wrap://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.polywrap.eth", plugin: ipfsPlugin({ provider: ipfsProvider, fallbackProviders: defaultIpfsProviders, }), }, { - uri: "wrap://ens/ens.web3api.eth", + uri: "wrap://ens/ens.polywrap.eth", plugin: ensPlugin({ addresses: { testnet: ensAddress, diff --git a/packages/js/react/src/__tests__/usePolywrapClient.spec.tsx b/packages/js/react/src/__tests__/usePolywrapClient.spec.tsx index 03b39710ad..baa7359632 100644 --- a/packages/js/react/src/__tests__/usePolywrapClient.spec.tsx +++ b/packages/js/react/src/__tests__/usePolywrapClient.spec.tsx @@ -1,8 +1,8 @@ -import { UseWeb3ApiClientProps } from '../client'; +import { UsePolywrapClientProps } from '../client'; import { - Web3ApiProvider, - createWeb3ApiProvider, - useWeb3ApiClient + PolywrapProvider, + createPolywrapProvider, + usePolywrapClient } from ".."; import { createPlugins } from "./plugins"; @@ -22,7 +22,7 @@ import { jest.setTimeout(360000); -describe("useWeb3ApiClient hook", () => { +describe("usePolywrapClient hook", () => { let plugins: PluginRegistration[]; let WrapperProvider: RenderHookOptions; @@ -32,7 +32,7 @@ describe("useWeb3ApiClient hook", () => { plugins = createPlugins(ensAddresses.ensAddress, providers.ethereum, providers.ipfs); WrapperProvider = { - wrapper: Web3ApiProvider, + wrapper: PolywrapProvider, initialProps: { plugins, }, @@ -44,9 +44,9 @@ describe("useWeb3ApiClient hook", () => { }); function getClient( - options?: UseWeb3ApiClientProps + options?: UsePolywrapClientProps ) { - const hook = () => useWeb3ApiClient(options); + const hook = () => usePolywrapClient(options); const { result: hookResult } = renderHook(hook, WrapperProvider); @@ -63,32 +63,32 @@ describe("useWeb3ApiClient hook", () => { }); it("Should throw error because there's no provider with expected key ", async () => { - const props: UseWeb3ApiClientProps = { - provider: "Non existent Web3API Provider", + const props: UsePolywrapClientProps = { + provider: "Non existent Polywrap Provider", }; - const hook = () => useWeb3ApiClient(props); + const hook = () => usePolywrapClient(props); const { result } = renderHook(hook, WrapperProvider); expect(result.error?.message).toMatch( - /You are trying to use useWeb3ApiClient with provider \"Non existent Web3API Provider\"/ + /You are trying to use usePolywrapClient with provider \"Non existent Polywrap Provider\"/ ); }); it("Should throw error if provider is not within the DOM hierarchy", async () => { - createWeb3ApiProvider("other"); + createPolywrapProvider("other"); - const props: UseWeb3ApiClientProps = { + const props: UsePolywrapClientProps = { provider: "other" }; - const hook = () => useWeb3ApiClient(props); + const hook = () => usePolywrapClient(props); const { result } = renderHook(hook, WrapperProvider); expect(result.error?.message).toMatch( - /The requested Web3APIProvider \"other\" was not found within the DOM hierarchy/ + /The requested PolywrapProvider \"other\" was not found within the DOM hierarchy/ ); }); }); diff --git a/packages/js/react/src/__tests__/usePolywrapInvoke.spec.tsx b/packages/js/react/src/__tests__/usePolywrapInvoke.spec.tsx index 32aea982dd..4d47dbacd4 100644 --- a/packages/js/react/src/__tests__/usePolywrapInvoke.spec.tsx +++ b/packages/js/react/src/__tests__/usePolywrapInvoke.spec.tsx @@ -1,20 +1,20 @@ import { - useWeb3ApiInvoke, - Web3ApiProvider, - createWeb3ApiProvider, + usePolywrapInvoke, + PolywrapProvider, + createPolywrapProvider, } from ".."; -import { UseWeb3ApiInvokeProps } from "../invoke"; +import { UsePolywrapInvokeProps } from "../invoke"; import { createPlugins } from "./plugins"; import { PluginRegistration } from "@polywrap/core-js"; import { initTestEnvironment, stopTestEnvironment, - buildAndDeployApi, + buildAndDeployWrapper, ensAddresses, providers } from "@polywrap/test-env-js"; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; import { renderHook, @@ -25,7 +25,7 @@ import { jest.setTimeout(360000); -describe("useWeb3ApiInvoke hook", () => { +describe("usePolywrapInvoke hook", () => { let uri: string; let envUri: string; let plugins: PluginRegistration[]; @@ -34,14 +34,14 @@ describe("useWeb3ApiInvoke hook", () => { beforeAll(async () => { await initTestEnvironment(); - const { ensDomain } = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/simple-storage`, + const { ensDomain } = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/simple-storage`, ipfsProvider: providers.ipfs, ethereumProvider: providers.ethereum, }); - const { ensDomain: envEnsDomain } = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/simple-env-types`, + const { ensDomain: envEnsDomain } = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/simple-env-types`, ipfsProvider: providers.ipfs, ethereumProvider: providers.ethereum, }); @@ -50,7 +50,7 @@ describe("useWeb3ApiInvoke hook", () => { envUri = `ens/testnet/${envEnsDomain}`; plugins = createPlugins(ensAddresses.ensAddress, providers.ethereum, providers.ipfs); WrapperProvider = { - wrapper: Web3ApiProvider, + wrapper: PolywrapProvider, initialProps: { plugins, }, @@ -62,9 +62,9 @@ describe("useWeb3ApiInvoke hook", () => { }); async function sendQuery( - options: UseWeb3ApiInvokeProps + options: UsePolywrapInvokeProps ) { - const hook = () => useWeb3ApiInvoke(options); + const hook = () => usePolywrapInvoke(options); const { result: hookResult } = renderHook(hook, WrapperProvider); @@ -78,9 +78,9 @@ describe("useWeb3ApiInvoke hook", () => { } async function sendQueryWithExecVariables( - options: UseWeb3ApiInvokeProps + options: UsePolywrapInvokeProps ) { - const hook = () => useWeb3ApiInvoke({ + const hook = () => usePolywrapInvoke({ uri: options.uri, module: options.module, method: options.method, @@ -99,7 +99,7 @@ describe("useWeb3ApiInvoke hook", () => { } it("Should support passing env to client", async () => { - const deployQuery: UseWeb3ApiInvokeProps = { + const deployQuery: UsePolywrapInvokeProps = { uri: envUri, module: "query", method: "getEnv", @@ -128,7 +128,7 @@ describe("useWeb3ApiInvoke hook", () => { }); it("Should update storage data to five", async () => { - const deployInvoke: UseWeb3ApiInvokeProps = { + const deployInvoke: UsePolywrapInvokeProps = { uri, module: "mutation", method: "deployContract", @@ -141,7 +141,7 @@ describe("useWeb3ApiInvoke hook", () => { const { data: address } = await sendQuery(deployInvoke); - const setStorageInvocation: UseWeb3ApiInvokeProps = { + const setStorageInvocation: UsePolywrapInvokeProps = { uri, module: "mutation", method: "setData", @@ -158,7 +158,7 @@ describe("useWeb3ApiInvoke hook", () => { expect(result.error).toBeFalsy(); expect(result.data).toMatch(/0x/); - const getStorageDataInvocation: UseWeb3ApiInvokeProps = { + const getStorageDataInvocation: UsePolywrapInvokeProps = { uri, module: "query", method: "getData", @@ -175,8 +175,8 @@ describe("useWeb3ApiInvoke hook", () => { }); it("Should throw error because there's no provider with expected key ", async () => { - const getStorageDataInvocation: UseWeb3ApiInvokeProps = { - provider: "Non existent Web3API Provider", + const getStorageDataInvocation: UsePolywrapInvokeProps = { + provider: "Non existent Polywrap Provider", uri, module: "query", method: "getData", @@ -185,18 +185,18 @@ describe("useWeb3ApiInvoke hook", () => { }, }; - const getDataStorageHook = () => useWeb3ApiInvoke(getStorageDataInvocation); + const getDataStorageHook = () => usePolywrapInvoke(getStorageDataInvocation); const { result } = renderHook(getDataStorageHook); expect(result.error?.message).toMatch( - /You are trying to use useWeb3ApiClient with provider \"Non existent Web3API Provider\"/ + /You are trying to use usePolywrapClient with provider \"Non existent Polywrap Provider\"/ ); }); it("Should throw error if provider is not within the DOM hierarchy", async () => { - createWeb3ApiProvider("other"); + createPolywrapProvider("other"); - const getStorageDataInvocation: UseWeb3ApiInvokeProps = { + const getStorageDataInvocation: UsePolywrapInvokeProps = { provider: "other", uri, module: "query", @@ -206,16 +206,16 @@ describe("useWeb3ApiInvoke hook", () => { }, }; - const getDataStorageHook = () => useWeb3ApiInvoke(getStorageDataInvocation); + const getDataStorageHook = () => usePolywrapInvoke(getStorageDataInvocation); const { result } = renderHook(getDataStorageHook, WrapperProvider); expect(result.error?.message).toMatch( - /The requested Web3APIProvider \"other\" was not found within the DOM hierarchy/ + /The requested PolywrapProvider \"other\" was not found within the DOM hierarchy/ ); }); it("Should update storage data to three by setting value through variables passed to exec", async () => { - const deployInvoke: UseWeb3ApiInvokeProps = { + const deployInvoke: UsePolywrapInvokeProps = { uri, module: "mutation", method: "deployContract", @@ -228,7 +228,7 @@ describe("useWeb3ApiInvoke hook", () => { const { data: address } = await sendQueryWithExecVariables(deployInvoke); - const setStorageInvocation: UseWeb3ApiInvokeProps = { + const setStorageInvocation: UsePolywrapInvokeProps = { uri, module: "mutation", method: "setData", @@ -245,7 +245,7 @@ describe("useWeb3ApiInvoke hook", () => { expect(result.error).toBeFalsy(); expect(result.data).toMatch(/0x/); - const getStorageDataInvocation: UseWeb3ApiInvokeProps = { + const getStorageDataInvocation: UsePolywrapInvokeProps = { uri, module: "query", method: "getData", diff --git a/packages/js/react/src/__tests__/usePolywrapQuery.spec.tsx b/packages/js/react/src/__tests__/usePolywrapQuery.spec.tsx index e2880c84a3..a555bfc8d8 100644 --- a/packages/js/react/src/__tests__/usePolywrapQuery.spec.tsx +++ b/packages/js/react/src/__tests__/usePolywrapQuery.spec.tsx @@ -1,10 +1,10 @@ import { - useWeb3ApiQuery, - Web3ApiProvider, - createWeb3ApiProvider + usePolywrapQuery, + PolywrapProvider, + createPolywrapProvider } from ".."; import { - UseWeb3ApiQueryProps + UsePolywrapQueryProps } from "../query" import { createPlugins } from "./plugins"; @@ -12,11 +12,11 @@ import { PluginRegistration } from "@polywrap/core-js"; import { initTestEnvironment, stopTestEnvironment, - buildAndDeployApi, + buildAndDeployWrapper, ensAddresses, providers } from "@polywrap/test-env-js"; -import { GetPathToTestApis } from "@polywrap/test-cases"; +import { GetPathToTestWrappers } from "@polywrap/test-cases"; import { renderHook, @@ -27,7 +27,7 @@ import { jest.setTimeout(360000); -describe("useWeb3ApiQuery hook", () => { +describe("usePolywrapQuery hook", () => { let uri: string; let envUri: string; let plugins: PluginRegistration[]; @@ -36,14 +36,14 @@ describe("useWeb3ApiQuery hook", () => { beforeAll(async () => { await initTestEnvironment(); - const { ensDomain } = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/simple-storage`, + const { ensDomain } = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/simple-storage`, ipfsProvider: providers.ipfs, ethereumProvider: providers.ethereum, }); - const { ensDomain: envEnsDomain } = await buildAndDeployApi({ - apiAbsPath: `${GetPathToTestApis()}/wasm-as/simple-env-types`, + const { ensDomain: envEnsDomain } = await buildAndDeployWrapper({ + wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/simple-env-types`, ipfsProvider: providers.ipfs, ethereumProvider: providers.ethereum, }); @@ -52,7 +52,7 @@ describe("useWeb3ApiQuery hook", () => { envUri = `ens/testnet/${envEnsDomain}`; plugins = createPlugins(ensAddresses.ensAddress, providers.ethereum, providers.ipfs); WrapperProvider = { - wrapper: Web3ApiProvider, + wrapper: PolywrapProvider, initialProps: { plugins, }, @@ -64,9 +64,9 @@ describe("useWeb3ApiQuery hook", () => { }); async function sendQuery>( - options: UseWeb3ApiQueryProps + options: UsePolywrapQueryProps ) { - const hook = () => useWeb3ApiQuery(options); + const hook = () => usePolywrapQuery(options); const { result: hookResult } = renderHook(hook, WrapperProvider); @@ -80,9 +80,9 @@ describe("useWeb3ApiQuery hook", () => { } async function sendQueryWithExecVariables>( - options: UseWeb3ApiQueryProps + options: UsePolywrapQueryProps ) { - const hook = () => useWeb3ApiQuery({ uri: options.uri, query: options.query, provider: options.provider}); + const hook = () => usePolywrapQuery({ uri: options.uri, query: options.query, provider: options.provider}); const { result: hookResult } = renderHook(hook, WrapperProvider); @@ -96,7 +96,7 @@ describe("useWeb3ApiQuery hook", () => { } it("Should support passing env to client", async () => { - const deployQuery: UseWeb3ApiQueryProps = { + const deployQuery: UsePolywrapQueryProps = { uri: envUri, query: `query { getEnv(arg: "Alice") @@ -125,7 +125,7 @@ describe("useWeb3ApiQuery hook", () => { }); it("Should update storage data to five with hard coded value", async () => { - const deployQuery: UseWeb3ApiQueryProps = { + const deployQuery: UsePolywrapQueryProps = { uri, query: `mutation { deployContract ( @@ -140,7 +140,7 @@ describe("useWeb3ApiQuery hook", () => { deployContract: string }>(deployQuery); - const setStorageDataQuery: UseWeb3ApiQueryProps = { + const setStorageDataQuery: UsePolywrapQueryProps = { uri, query: ` mutation { @@ -159,7 +159,7 @@ describe("useWeb3ApiQuery hook", () => { expect(result.errors).toBeFalsy(); expect(result.data?.setData).toMatch(/0x/); - const getStorageDataQuery: UseWeb3ApiQueryProps = { + const getStorageDataQuery: UsePolywrapQueryProps = { uri, query: ` query { @@ -180,7 +180,7 @@ describe("useWeb3ApiQuery hook", () => { }); it("Should update storage data to five by setting value through variables", async () => { - const deployQuery: UseWeb3ApiQueryProps = { + const deployQuery: UsePolywrapQueryProps = { uri, query: `mutation { deployContract( @@ -195,7 +195,7 @@ describe("useWeb3ApiQuery hook", () => { deployContract: string }>(deployQuery); - const setStorageDataQuery: UseWeb3ApiQueryProps = { + const setStorageDataQuery: UsePolywrapQueryProps = { uri, query: ` mutation { @@ -217,7 +217,7 @@ describe("useWeb3ApiQuery hook", () => { expect(result.errors).toBeFalsy(); expect(result.data?.setData).toMatch(/0x/); - const getStorageDataQuery: UseWeb3ApiQueryProps = { + const getStorageDataQuery: UsePolywrapQueryProps = { uri, query: ` query { @@ -236,8 +236,8 @@ describe("useWeb3ApiQuery hook", () => { }); it("Should throw error because there's no provider with expected key ", async () => { - const getStorageDataQuery: UseWeb3ApiQueryProps = { - provider: "Non existent Web3API Provider", + const getStorageDataQuery: UsePolywrapQueryProps = { + provider: "Non existent Polywrap Provider", uri, query: `query { getData( @@ -246,18 +246,18 @@ describe("useWeb3ApiQuery hook", () => { }`, }; - const getDataStorageHook = () => useWeb3ApiQuery(getStorageDataQuery); + const getDataStorageHook = () => usePolywrapQuery(getStorageDataQuery); const { result } = renderHook(getDataStorageHook); expect(result.error?.message).toMatch( - /You are trying to use useWeb3ApiClient with provider \"Non existent Web3API Provider\"/ + /You are trying to use usePolywrapClient with provider \"Non existent Polywrap Provider\"/ ); }); it("Should throw error if provider is not within the DOM hierarchy", async () => { - createWeb3ApiProvider("other"); + createPolywrapProvider("other"); - const getStorageDataQuery: UseWeb3ApiQueryProps = { + const getStorageDataQuery: UsePolywrapQueryProps = { provider: "other", uri, query: `query { @@ -267,16 +267,16 @@ describe("useWeb3ApiQuery hook", () => { }`, }; - const getDataStorageHook = () => useWeb3ApiQuery(getStorageDataQuery); + const getDataStorageHook = () => usePolywrapQuery(getStorageDataQuery); const { result } = renderHook(getDataStorageHook, WrapperProvider); expect(result.error?.message).toMatch( - /The requested Web3APIProvider \"other\" was not found within the DOM hierarchy/ + /The requested PolywrapProvider \"other\" was not found within the DOM hierarchy/ ); }); it("Should update storage data to three by setting value through variables passed to exec", async () => { - const deployQuery: UseWeb3ApiQueryProps = { + const deployQuery: UsePolywrapQueryProps = { uri, query: `mutation { deployContract( @@ -291,7 +291,7 @@ describe("useWeb3ApiQuery hook", () => { deployContract: string }>(deployQuery); - const setStorageDataQuery: UseWeb3ApiQueryProps = { + const setStorageDataQuery: UsePolywrapQueryProps = { uri, query: ` mutation { @@ -313,7 +313,7 @@ describe("useWeb3ApiQuery hook", () => { expect(result.errors).toBeFalsy(); expect(result.data?.setData).toMatch(/0x/); - const getStorageDataQuery: UseWeb3ApiQueryProps = { + const getStorageDataQuery: UsePolywrapQueryProps = { uri, query: ` query { diff --git a/packages/js/react/src/client.tsx b/packages/js/react/src/client.tsx index 77126bba37..35979d58ae 100644 --- a/packages/js/react/src/client.tsx +++ b/packages/js/react/src/client.tsx @@ -4,16 +4,16 @@ import { PROVIDERS, PRIMARY_PROVIDER } from "./provider"; import React from "react"; import { PolywrapClient } from "@polywrap/client-js"; -export interface UseWeb3ApiClientProps { +export interface UsePolywrapClientProps { provider?: string; } -export function useWeb3ApiClient(props?: UseWeb3ApiClientProps): PolywrapClient { +export function usePolywrapClient(props?: UsePolywrapClientProps): PolywrapClient { const provider = props?.provider ?? PRIMARY_PROVIDER; if (!PROVIDERS[provider]) { throw new Error( - `You are trying to use useWeb3ApiClient with provider "${provider}" and it doesn't exists. To create a new provider, use createWeb3ApiProvider` + `You are trying to use usePolywrapClient with provider "${provider}" and it doesn't exists. To create a new provider, use createPolywrapProvider` ); } @@ -24,7 +24,7 @@ export function useWeb3ApiClient(props?: UseWeb3ApiClientProps): PolywrapClient if (!client || Object.keys(client).length === 0) { throw new Error( - `The requested Web3APIProvider \"${provider}\" was not found within the DOM hierarchy. We could not get the PolywrapClient through the provider context.` + `The requested PolywrapProvider \"${provider}\" was not found within the DOM hierarchy. We could not get the PolywrapClient through the provider context.` ) } diff --git a/packages/js/react/src/index.tsx b/packages/js/react/src/index.tsx index 13aca02f11..f6ec32c2d8 100644 --- a/packages/js/react/src/index.tsx +++ b/packages/js/react/src/index.tsx @@ -1,4 +1,4 @@ -export { createWeb3ApiProvider, Web3ApiProvider } from "./provider" -export { useWeb3ApiClient } from "./client"; -export { useWeb3ApiQuery } from "./query"; -export { useWeb3ApiInvoke } from "./invoke"; +export { createPolywrapProvider, PolywrapProvider } from "./provider" +export { usePolywrapClient } from "./client"; +export { usePolywrapQuery } from "./query"; +export { usePolywrapInvoke } from "./invoke"; diff --git a/packages/js/react/src/invoke.tsx b/packages/js/react/src/invoke.tsx index 042a40aa7c..3b40ec645d 100644 --- a/packages/js/react/src/invoke.tsx +++ b/packages/js/react/src/invoke.tsx @@ -1,45 +1,45 @@ -import { useWeb3ApiClient } from "./client"; +import { usePolywrapClient } from "./client"; import { useStateReducer } from "./state"; -import { InvokeApiOptions, InvokeApiResult } from "@polywrap/core-js"; +import { InvokeOptions, InvokeResult } from "@polywrap/core-js"; -export interface UseWeb3ApiInvokeState< +export interface UsePolywrapInvokeState< TData = unknown -> extends InvokeApiResult { +> extends InvokeResult { loading: boolean; } -export const INITIAL_QUERY_STATE: UseWeb3ApiInvokeState = { +export const INITIAL_QUERY_STATE: UsePolywrapInvokeState = { data: undefined, error: undefined, loading: false, }; -export interface UseWeb3ApiInvokeProps extends InvokeApiOptions { +export interface UsePolywrapInvokeProps extends InvokeOptions { provider?: string; } /* -Note that the initial values passed into the useWeb3ApiInvoke hook will be +Note that the initial values passed into the usePolywrapInvoke hook will be ignored when an ArrayBuffer is passed into execute(...). */ -export interface UseWeb3ApiInvoke< +export interface UsePolywrapInvoke< TData = unknown -> extends UseWeb3ApiInvokeState { +> extends UsePolywrapInvokeState { execute: ( input?: Record | ArrayBuffer - ) => Promise>; + ) => Promise>; } -export function useWeb3ApiInvoke< +export function usePolywrapInvoke< TData = unknown ->(props: UseWeb3ApiInvokeProps | InvokeApiOptions): UseWeb3ApiInvoke { +>(props: UsePolywrapInvokeProps | InvokeOptions): UsePolywrapInvoke { const provider = "provider" in props ? props.provider : undefined; - const client = useWeb3ApiClient({ provider }); + const client = usePolywrapClient({ provider }); - // Initialize the UseWeb3ApiQueryState - const { state, dispatch } = useStateReducer>( - INITIAL_QUERY_STATE as UseWeb3ApiInvokeState + // Initialize the UsePolywrapQueryState + const { state, dispatch } = useStateReducer>( + INITIAL_QUERY_STATE as UsePolywrapInvokeState ); const execute = async (input?: Record | ArrayBuffer) => { diff --git a/packages/js/react/src/provider.tsx b/packages/js/react/src/provider.tsx index 049c19ecf2..3ea64771ee 100644 --- a/packages/js/react/src/provider.tsx +++ b/packages/js/react/src/provider.tsx @@ -1,31 +1,31 @@ // eslint-disable-next-line import/no-extraneous-dependencies import React from "react"; -import { PolywrapClient, Web3ApiClientConfig } from "@polywrap/client-js"; +import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js"; type ClientContext = React.Context -interface Web3ApiProviderState { +interface PolywrapProviderState { ClientContext: ClientContext; client?: PolywrapClient; } -interface Web3ApiProviderMap { - [name: string]: Web3ApiProviderState; +interface PolywrapProviderMap { + [name: string]: PolywrapProviderState; } -export const PROVIDERS: Web3ApiProviderMap = {}; +export const PROVIDERS: PolywrapProviderMap = {}; -interface Web3ApiProviderProps extends Partial { } +interface PolywrapProviderProps extends Partial { } -export type Web3ApiProviderFC = React.FC; +export type PolywrapProviderFC = React.FC; -export function createWeb3ApiProvider( +export function createPolywrapProvider( name: string -): Web3ApiProviderFC { +): PolywrapProviderFC { // Make sure the provider isn't already set if (!!PROVIDERS[name]) { - throw new Error(`A Web3Api provider already exists with the name "${name}"`); + throw new Error(`A Polywrap provider already exists with the name "${name}"`); } // Reserve the provider slot @@ -42,7 +42,7 @@ export function createWeb3ApiProvider( // If the client has already been set for this provider if (PROVIDERS[name].client) { throw Error( - `Duplicate Web3ApiProvider detected. Please use "createWeb3ApiProvider("provider-name")".` + `Duplicate PolywrapProvider detected. Please use "createPolywrapProvider("provider-name")".` ); } @@ -71,4 +71,4 @@ export function createWeb3ApiProvider( export const PRIMARY_PROVIDER = "PRIMARY_PROVIDER"; -export const Web3ApiProvider = createWeb3ApiProvider(PRIMARY_PROVIDER); +export const PolywrapProvider = createPolywrapProvider(PRIMARY_PROVIDER); diff --git a/packages/js/react/src/query.tsx b/packages/js/react/src/query.tsx index 4d1c359910..750b0441ab 100644 --- a/packages/js/react/src/query.tsx +++ b/packages/js/react/src/query.tsx @@ -1,42 +1,42 @@ -import { useWeb3ApiClient } from "./client"; +import { usePolywrapClient } from "./client"; import { useStateReducer } from "./state"; -import { QueryApiResult, QueryApiOptions } from "@polywrap/core-js"; +import { QueryResult, QueryOptions } from "@polywrap/core-js"; -export interface UseWeb3ApiQueryState< +export interface UsePolywrapQueryState< TData extends Record = Record - > extends QueryApiResult { + > extends QueryResult { loading: boolean; } -export const INITIAL_QUERY_STATE: UseWeb3ApiQueryState = { +export const INITIAL_QUERY_STATE: UsePolywrapQueryState = { data: undefined, errors: undefined, loading: false, }; -export interface UseWeb3ApiQueryProps< +export interface UsePolywrapQueryProps< TVariables extends Record = Record - > extends QueryApiOptions { + > extends QueryOptions { provider?: string; } -export interface UseWeb3ApiQuery< +export interface UsePolywrapQuery< TData extends Record = Record - > extends UseWeb3ApiQueryState { + > extends UsePolywrapQueryState { execute: ( variables?: Record - ) => Promise>; + ) => Promise>; } -export function useWeb3ApiQuery< +export function usePolywrapQuery< TData extends Record = Record - >(props: UseWeb3ApiQueryProps): UseWeb3ApiQuery { - const client = useWeb3ApiClient({ provider: props.provider }); + >(props: UsePolywrapQueryProps): UsePolywrapQuery { + const client = usePolywrapClient({ provider: props.provider }); - // Initialize the UseWeb3ApiQueryState - const { state, dispatch } = useStateReducer>( - INITIAL_QUERY_STATE as UseWeb3ApiQueryState + // Initialize the UsePolywrapQueryState + const { state, dispatch } = useStateReducer>( + INITIAL_QUERY_STATE as UsePolywrapQueryState ); const execute = async (variables?: Record) => { diff --git a/packages/js/test-env/package.json b/packages/js/test-env/package.json index aef89daab6..94d59beacf 100644 --- a/packages/js/test-env/package.json +++ b/packages/js/test-env/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/test-env-js", - "description": "Web3API Test Helpers", + "description": "Polywrap Test Helpers", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/js/test-env/src/index.ts b/packages/js/test-env/src/index.ts index 023e4b8154..e2e8d0842a 100644 --- a/packages/js/test-env/src/index.ts +++ b/packages/js/test-env/src/index.ts @@ -6,7 +6,7 @@ import spawn from "spawn-command"; import axios from "axios"; import fs from "fs"; import yaml from "js-yaml"; -import { deserializeWeb3ApiManifest, Uri } from "@polywrap/core-js"; +import { deserializePolywrapManifest, Uri } from "@polywrap/core-js"; import { PolywrapClient } from "@polywrap/client-js"; import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; @@ -181,8 +181,8 @@ export const runCLI = async (options: { }; }; -export async function buildApi(apiAbsPath: string): Promise { - const manifestPath = `${apiAbsPath}/web3api.yaml`; +export async function buildWrapper(wrapperAbsPath: string): Promise { + const manifestPath = `${wrapperAbsPath}/polywrap.yaml`; const { exitCode: buildExitCode, stdout: buildStdout, @@ -193,7 +193,7 @@ export async function buildApi(apiAbsPath: string): Promise { "--manifest-file", manifestPath, "--output-dir", - `${apiAbsPath}/build`, + `${wrapperAbsPath}/build`, ], }); @@ -205,13 +205,13 @@ export async function buildApi(apiAbsPath: string): Promise { } } -export async function buildAndDeployApi({ - apiAbsPath, +export async function buildAndDeployWrapper({ + wrapperAbsPath, ipfsProvider, ethereumProvider, ensName, }: { - apiAbsPath: string; + wrapperAbsPath: string; ipfsProvider: string; ethereumProvider: string; ensName?: string; @@ -219,24 +219,24 @@ export async function buildAndDeployApi({ ensDomain: string; ipfsCid: string; }> { - const manifestPath = `${apiAbsPath}/web3api.yaml`; - const tempManifestFilename = `web3api-temp.yaml`; - const tempDeployManifestFilename = `web3api.deploy-temp.yaml`; - const tempManifestPath = path.join(apiAbsPath, tempManifestFilename); + const manifestPath = `${wrapperAbsPath}/polywrap.yaml`; + const tempManifestFilename = `polywrap-temp.yaml`; + const tempDeployManifestFilename = `polywrap.deploy-temp.yaml`; + const tempManifestPath = path.join(wrapperAbsPath, tempManifestFilename); const tempDeployManifestPath = path.join( - apiAbsPath, + wrapperAbsPath, tempDeployManifestFilename ); // create a new ENS domain - const apiEns = ensName ?? `${generateName()}.eth`; + const wrapperEns = ensName ?? `${generateName()}.eth`; - await buildApi(apiAbsPath); + await buildWrapper(wrapperAbsPath); // register ENS domain const ensWrapperUri = `fs/${__dirname}/wrappers/ens`; - const ethereumPluginUri = "wrap://ens/ethereum.web3api.eth"; + const ethereumPluginUri = "wrap://ens/ethereum.polywrap.eth"; const client = new PolywrapClient({ plugins: [ @@ -272,7 +272,7 @@ export async function buildAndDeployApi({ method: "registerDomainAndSubdomainsRecursively", uri: ensWrapperUri, input: { - domain: apiEns, + domain: wrapperEns, owner: signerAddress, resolverAddress: ensAddresses.resolverAddress, ttl: "0", @@ -286,7 +286,7 @@ export async function buildAndDeployApi({ if (!registerData) { throw new Error( - `Could not register domain '${apiEns}'` + + `Could not register domain '${wrapperEns}'` + (error ? `\nError: ${error.message}` : "") ); } @@ -306,14 +306,14 @@ export async function buildAndDeployApi({ // manually configure manifests - const { __type, ...web3apiManifest } = deserializeWeb3ApiManifest( + const { __type, ...polywrapManifest } = deserializePolywrapManifest( fs.readFileSync(manifestPath, "utf-8") ); fs.writeFileSync( tempManifestPath, yaml.dump({ - ...web3apiManifest, + ...polywrapManifest, deploy: `./${tempDeployManifestFilename}`, }) ); @@ -325,7 +325,7 @@ export async function buildAndDeployApi({ stages: { ipfsDeploy: { package: "ipfs", - uri: `fs/${apiAbsPath}/build`, + uri: `fs/${wrapperAbsPath}/build`, config: { gatewayUri: ipfsProvider, }, @@ -335,7 +335,7 @@ export async function buildAndDeployApi({ // eslint-disable-next-line @typescript-eslint/naming-convention depends_on: "ipfsDeploy", config: { - domainName: apiEns, + domainName: wrapperEns, provider: ethereumProvider, ensRegistryAddress: ensAddresses.ensAddress, }, @@ -344,7 +344,7 @@ export async function buildAndDeployApi({ }) ); - // deploy API + // deploy Wrapper const { exitCode: deployExitCode, @@ -374,10 +374,10 @@ export async function buildAndDeployApi({ throw Error(`polywrap CLI output missing IPFS CID.\nOutput: ${deployStdout}`); } - const apiCid = new Uri(result[1]).path; + const wrapperCid = new Uri(result[1]).path; return { - ensDomain: apiEns, - ipfsCid: apiCid, + ensDomain: wrapperEns, + ipfsCid: wrapperCid, }; } diff --git a/packages/js/test-env/src/wrappers/ens/web3api.build.json b/packages/js/test-env/src/wrappers/ens/polywrap.build.json similarity index 100% rename from packages/js/test-env/src/wrappers/ens/web3api.build.json rename to packages/js/test-env/src/wrappers/ens/polywrap.build.json diff --git a/packages/js/test-env/src/wrappers/ens/web3api.json b/packages/js/test-env/src/wrappers/ens/polywrap.json similarity index 80% rename from packages/js/test-env/src/wrappers/ens/web3api.json rename to packages/js/test-env/src/wrappers/ens/polywrap.json index e408652b98..6ce33dfa08 100644 --- a/packages/js/test-env/src/wrappers/ens/web3api.json +++ b/packages/js/test-env/src/wrappers/ens/polywrap.json @@ -2,7 +2,7 @@ "format": "0.0.1-prealpha.9", "name": "ENS", "language": "wasm/assemblyscript", - "build": "./web3api.build.json", + "build": "./polywrap.build.json", "schema": "./schema.graphql", "module": "./module.wasm" } \ No newline at end of file diff --git a/packages/js/test-env/src/wrappers/ens/schema.graphql b/packages/js/test-env/src/wrappers/ens/schema.graphql index 8ef4b4be26..6e2a3ca7bb 100644 --- a/packages/js/test-env/src/wrappers/ens/schema.graphql +++ b/packages/js/test-env/src/wrappers/ens/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ @@ -337,7 +337,7 @@ type TxOverrides { ### Imported Modules START ### type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Module" ) { @@ -495,7 +495,7 @@ type Ethereum_Module @imported( } type UTS46_Module @imported( - uri: "ens/uts46.web3api.eth", + uri: "ens/uts46.polywrap.eth", namespace: "UTS46", nativeType: "Module" ) { @@ -513,7 +513,7 @@ type UTS46_Module @imported( } type SHA3_Module @imported( - uri: "ens/sha3.web3api.eth", + uri: "ens/sha3.polywrap.eth", namespace: "SHA3", nativeType: "Module" ) { @@ -573,7 +573,7 @@ type SHA3_Module @imported( ### Imported Objects START ### type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Connection" ) { @@ -582,7 +582,7 @@ type Ethereum_Connection @imported( } type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { @@ -592,7 +592,7 @@ type Ethereum_TxOverrides @imported( } type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { @@ -601,7 +601,7 @@ type Ethereum_StaticTxResult @imported( } type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { @@ -617,7 +617,7 @@ type Ethereum_TxRequest @imported( } type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { @@ -641,7 +641,7 @@ type Ethereum_TxReceipt @imported( } type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Log" ) { @@ -657,7 +657,7 @@ type Ethereum_Log @imported( } type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { @@ -667,7 +667,7 @@ type Ethereum_EventNotification @imported( } type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Network" ) { @@ -677,7 +677,7 @@ type Ethereum_Network @imported( } type Ethereum_TxResponse @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxResponse" ) { @@ -703,7 +703,7 @@ type Ethereum_TxResponse @imported( } type Ethereum_Access @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Access" ) { @@ -712,7 +712,7 @@ type Ethereum_Access @imported( } type UTS46_ConvertResult @imported( - uri: "ens/uts46.web3api.eth", + uri: "ens/uts46.polywrap.eth", namespace: "UTS46", nativeType: "ConvertResult" ) { diff --git a/packages/js/tracing/package.json b/packages/js/tracing/package.json index 7f6cfe8bce..c67943aea3 100644 --- a/packages/js/tracing/package.json +++ b/packages/js/tracing/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/tracing-js", - "description": "Web3API Core Tracing", + "description": "Polywrap Core Tracing", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/manifest-schemas/formats/web3api.app/0.0.1-prealpha.1.json b/packages/manifest-schemas/formats/polywrap.app/0.0.1-prealpha.1.json similarity index 95% rename from packages/manifest-schemas/formats/web3api.app/0.0.1-prealpha.1.json rename to packages/manifest-schemas/formats/polywrap.app/0.0.1-prealpha.1.json index b673c10af7..b4e7046e86 100644 --- a/packages/manifest-schemas/formats/web3api.app/0.0.1-prealpha.1.json +++ b/packages/manifest-schemas/formats/polywrap.app/0.0.1-prealpha.1.json @@ -28,7 +28,7 @@ "properties": { "uri": { "type": "string", - "format": "web3apiUri" + "format": "polywrapUri" }, "schema": { "type": "string", diff --git a/packages/manifest-schemas/formats/web3api.app/0.0.1-prealpha.2.json b/packages/manifest-schemas/formats/polywrap.app/0.0.1-prealpha.2.json similarity index 96% rename from packages/manifest-schemas/formats/web3api.app/0.0.1-prealpha.2.json rename to packages/manifest-schemas/formats/polywrap.app/0.0.1-prealpha.2.json index cbfd7076b8..2b29b74b7f 100644 --- a/packages/manifest-schemas/formats/web3api.app/0.0.1-prealpha.2.json +++ b/packages/manifest-schemas/formats/polywrap.app/0.0.1-prealpha.2.json @@ -33,7 +33,7 @@ "properties": { "uri": { "type": "string", - "format": "web3apiUri" + "format": "polywrapUri" }, "schema": { "type": "string", diff --git a/packages/manifest-schemas/formats/web3api.build/0.0.1-prealpha.1.json b/packages/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.1.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.build/0.0.1-prealpha.1.json rename to packages/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.1.json diff --git a/packages/manifest-schemas/formats/web3api.build/0.0.1-prealpha.2.json b/packages/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.2.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.build/0.0.1-prealpha.2.json rename to packages/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.2.json diff --git a/packages/manifest-schemas/formats/web3api.build/0.0.1-prealpha.3.json b/packages/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.3.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.build/0.0.1-prealpha.3.json rename to packages/manifest-schemas/formats/polywrap.build/0.0.1-prealpha.3.json diff --git a/packages/manifest-schemas/formats/web3api.deploy/0.0.1-prealpha.1.json b/packages/manifest-schemas/formats/polywrap.deploy/0.0.1-prealpha.1.json similarity index 95% rename from packages/manifest-schemas/formats/web3api.deploy/0.0.1-prealpha.1.json rename to packages/manifest-schemas/formats/polywrap.deploy/0.0.1-prealpha.1.json index d2ebf6e2e7..09a2a1079b 100644 --- a/packages/manifest-schemas/formats/web3api.deploy/0.0.1-prealpha.1.json +++ b/packages/manifest-schemas/formats/polywrap.deploy/0.0.1-prealpha.1.json @@ -29,7 +29,7 @@ }, "uri": { "type": "string", - "format": "web3apiUri" + "format": "polywrapUri" } } } diff --git a/packages/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.1.json b/packages/manifest-schemas/formats/polywrap.infra/0.0.1-prealpha.1.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.1.json rename to packages/manifest-schemas/formats/polywrap.infra/0.0.1-prealpha.1.json diff --git a/packages/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.2.json b/packages/manifest-schemas/formats/polywrap.infra/0.0.1-prealpha.2.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.infra/0.0.1-prealpha.2.json rename to packages/manifest-schemas/formats/polywrap.infra/0.0.1-prealpha.2.json diff --git a/packages/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.1.json b/packages/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.1.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.1.json rename to packages/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.1.json diff --git a/packages/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.2.json b/packages/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.2.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.2.json rename to packages/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.2.json diff --git a/packages/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.3.json b/packages/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.3.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.meta/0.0.1-prealpha.3.json rename to packages/manifest-schemas/formats/polywrap.meta/0.0.1-prealpha.3.json diff --git a/packages/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.1.json b/packages/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.1.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.1.json rename to packages/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.1.json diff --git a/packages/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.2.json b/packages/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.2.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.2.json rename to packages/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.2.json diff --git a/packages/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.3.json b/packages/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.3.json similarity index 100% rename from packages/manifest-schemas/formats/web3api.plugin/0.0.1-prealpha.3.json rename to packages/manifest-schemas/formats/polywrap.plugin/0.0.1-prealpha.3.json diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.1.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.1.json similarity index 98% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.1.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.1.json index f2e0c9e9e4..64becc108b 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.1.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.1.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.2.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.2.json similarity index 98% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.2.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.2.json index b627b5d034..95bee5e6e9 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.2.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.2.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.3.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.3.json similarity index 98% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.3.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.3.json index 2e87c84df9..0cb60875d7 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.3.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.3.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.4.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.4.json similarity index 98% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.4.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.4.json index 4b4fc6a30a..edd4576818 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.4.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.4.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.5.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.5.json similarity index 98% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.5.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.5.json index 6310945dc1..6fdcd05337 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.5.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.5.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.6.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.6.json similarity index 98% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.6.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.6.json index f32f547b58..ea756a351e 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.6.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.6.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.7.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.7.json similarity index 98% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.7.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.7.json index a5237ec461..3aaddec8cc 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.7.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.7.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.8.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.8.json similarity index 98% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.8.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.8.json index 32d671cba5..47382f2e24 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.8.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.8.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.9.json b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.9.json similarity index 97% rename from packages/manifest-schemas/formats/web3api/0.0.1-prealpha.9.json rename to packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.9.json index bb4a76f941..6f81020573 100644 --- a/packages/manifest-schemas/formats/web3api/0.0.1-prealpha.9.json +++ b/packages/manifest-schemas/formats/polywrap/0.0.1-prealpha.9.json @@ -1,5 +1,5 @@ { - "id": "Web3ApiManifest", + "id": "PolywrapManifest", "type": "object", "additionalProperties": false, "required": [ diff --git a/packages/manifest-schemas/package.json b/packages/manifest-schemas/package.json index 977a5c27db..225819fa6e 100644 --- a/packages/manifest-schemas/package.json +++ b/packages/manifest-schemas/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/manifest-schemas", - "description": "Web3API Manifest Schemas", + "description": "Polywrap Manifest Schemas", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "./package.json", "scripts": { diff --git a/packages/schema/bind/README.md b/packages/schema/bind/README.md index 7954c98778..3f22aa80f8 100644 --- a/packages/schema/bind/README.md +++ b/packages/schema/bind/README.md @@ -1,10 +1,10 @@ -# Web3API Binding +# Polywrap Binding -Generates Web3API schema bindings for supported guest languages. +Generates Polywrap schema bindings for supported guest languages. ## Details -Web3API uses MessagePack as a common data interchange format between languages. This allows Web3API WASM modules, authored in different languages, to be run within a single host language (JS, Rust, Python, Go, C#, C++). +Polywrap uses MessagePack as a common data interchange format between languages. This allows Polywrap WASM modules, authored in different languages, to be run within a single host language (JS, Rust, Python, Go, C#, C++). MessagePack encoded data is sent between module boundaries. Decoding of the message will happen in the destination environment, using generated binding code, created by this package. diff --git a/packages/schema/bind/package.json b/packages/schema/bind/package.json index 2f6be78fd0..497b08ff2c 100644 --- a/packages/schema/bind/package.json +++ b/packages/schema/bind/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/schema-bind", - "description": "Web3API Schema Binding", + "description": "Polywrap Schema Binding", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/schema/bind/src/__tests__/test-cases.spec.ts b/packages/schema/bind/src/__tests__/test-cases.spec.ts index a8307b9033..450600d723 100644 --- a/packages/schema/bind/src/__tests__/test-cases.spec.ts +++ b/packages/schema/bind/src/__tests__/test-cases.spec.ts @@ -15,7 +15,7 @@ import { import fs from "fs"; import path from "path"; -describe("Web3API Binding Test Suite", () => { +describe("Polywrap Binding Test Suite", () => { const cases = fetchTestCases(); for (const test of cases) { diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/entry-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/entry-rs.mustache index 6d051bb661..210521da18 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/entry-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/entry-rs.mustache @@ -7,7 +7,7 @@ use crate::{ }; {{/methods.length}} {{/moduleType}} -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ abort, invoke, InvokeArgs, diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/enum-type/mod-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/enum-type/mod-rs.mustache index 0883279dbc..97f9c0c304 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/enum-type/mod-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/enum-type/mod-rs.mustache @@ -1,4 +1,4 @@ -use web3api_wasm_rs::{EnumTypeError}; +use polywrap_wasm_rs::{EnumTypeError}; use serde::{Serialize, Deserialize}; use std::convert::TryFrom; diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/enum-type/mod-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/enum-type/mod-rs.mustache index a47f8f351c..2cd8fecd3a 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/enum-type/mod-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/enum-type/mod-rs.mustache @@ -1,4 +1,4 @@ -use web3api_wasm_rs::EnumTypeError; +use polywrap_wasm_rs::EnumTypeError; use serde::{Serialize, Deserialize}; use std::convert::TryFrom; diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/mod-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/mod-rs.mustache index 33344e8bc5..80ee0b0b9d 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/mod-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/mod-rs.mustache @@ -1,5 +1,5 @@ use serde::{Serialize, Deserialize}; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/serialization-rs.mustache index 161c402362..36712389f3 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/module-type/serialization-rs.mustache @@ -1,6 +1,6 @@ {{#methods.length}} use serde::{Serialize, Deserialize}; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/object-type/mod-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/object-type/mod-rs.mustache index 07ff5235db..c9577cb271 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/object-type/mod-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/object-type/mod-rs.mustache @@ -1,6 +1,6 @@ use serde::{Serialize, Deserialize}; pub mod serialization; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/object-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/object-type/serialization-rs.mustache index 5be7d355f2..ac73008645 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/object-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/imported/object-type/serialization-rs.mustache @@ -1,5 +1,5 @@ use std::convert::TryFrom; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/interface-type/mod-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/interface-type/mod-rs.mustache index 414dfa1b90..4d800e1d8a 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/interface-type/mod-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/interface-type/mod-rs.mustache @@ -1,7 +1,7 @@ {{#capabilities}} {{#getImplementations}} {{#enabled}} -use web3api_wasm_rs::wrap_get_implementations; +use polywrap_wasm_rs::wrap_get_implementations; {{/enabled}} {{/getImplementations}} {{/capabilities}} diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/module-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/module-type/serialization-rs.mustache index 560004300e..0c0105b777 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/module-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/module-type/serialization-rs.mustache @@ -1,6 +1,6 @@ use serde::{Serialize, Deserialize}; use std::convert::TryFrom; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/object-type/mod-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/object-type/mod-rs.mustache index 49425daeaa..b158fa626a 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/object-type/mod-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/object-type/mod-rs.mustache @@ -1,6 +1,6 @@ use serde::{Serialize, Deserialize}; pub mod serialization; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/object-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/object-type/serialization-rs.mustache index 8feaed27f7..106e788b9e 100644 --- a/packages/schema/bind/src/bindings/rust/wasm-rs/templates/object-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm-rs/templates/object-type/serialization-rs.mustache @@ -1,5 +1,5 @@ use std::convert::TryFrom; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/schema/bind/src/bindings/typescript/app-ts/templates/types-ts.mustache b/packages/schema/bind/src/bindings/typescript/app-ts/templates/types-ts.mustache index bb6cf60d1b..c31bd634af 100644 --- a/packages/schema/bind/src/bindings/typescript/app-ts/templates/types-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/app-ts/templates/types-ts.mustache @@ -4,7 +4,7 @@ import * as Types from "./"; // @ts-ignore import { Client, - InvokeApiResult + InvokeResult } from "@polywrap/core-js"; export type UInt = number; @@ -102,7 +102,7 @@ export const {{type}} = { input: {{parent.type}}_Input_{{name}}, client: Client, uri: string = "{{parent.uri}}" - ): Promise> => { + ): Promise> => { return client.invoke<{{#return}}{{#toTypescript}}{{toGraphQLType}}{{/toTypescript}}{{/return}}>({ uri, method: "{{name}}", diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/types-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/types-ts.mustache index f1355faaab..116c7a4034 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/types-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/types-ts.mustache @@ -7,7 +7,7 @@ import * as Types from "./"; // @ts-ignore import { Client, - InvokeApiResult + InvokeResult } from "@polywrap/core-js"; export type UInt = number; @@ -121,7 +121,7 @@ export const {{type}} = { {{name}}: async ( input: {{parent.type}}_Input_{{name}}, client: Client - ): Promise> => { + ): Promise> => { return client.invoke<{{#return}}{{#toTypescript}}{{toGraphQLType}}{{/toTypescript}}{{/return}}>({ uri: "{{parent.uri}}", method: "{{name}}", @@ -146,7 +146,7 @@ export class {{type}} { public async {{name}} ( input: {{parent.type}}_Input_{{name}}, client: Client - ): Promise> { + ): Promise> { return client.invoke<{{#return}}{{#toTypescript}}{{toGraphQLType}}{{/toTypescript}}{{/return}}>({ uri: this.uri, method: "{{name}}", diff --git a/packages/schema/compose/package.json b/packages/schema/compose/package.json index 80d1864cff..435d7bc36c 100644 --- a/packages/schema/compose/package.json +++ b/packages/schema/compose/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/schema-compose", - "description": "Web3API Schema Composition", + "description": "Polywrap Schema Composition", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index 7fc807e432..d83f90b8c5 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -21,7 +21,7 @@ function removeFunctionProps(obj: unknown) { return obj; } -describe("Web3API Schema Composer Test Cases", () => { +describe("Polywrap Schema Composer Test Cases", () => { let cases = fetchTestCases(); for (const test of cases) { diff --git a/packages/schema/compose/src/parse.ts b/packages/schema/compose/src/parse.ts index 6ad58e5624..a1a38512e5 100644 --- a/packages/schema/compose/src/parse.ts +++ b/packages/schema/compose/src/parse.ts @@ -141,7 +141,7 @@ export function parseLocalImports( const index = importTypes.findIndex((str) => str.indexOf("_") > -1); if (index > -1) { throw Error( - `User defined types with '_' in their name are forbidden. This is used for Web3API import namespacing.` + `User defined types with '_' in their name are forbidden. This is used for Polywrap import namespacing.` ); } diff --git a/packages/schema/compose/src/resolve.ts b/packages/schema/compose/src/resolve.ts index 04100edad6..8bd5fcb77c 100644 --- a/packages/schema/compose/src/resolve.ts +++ b/packages/schema/compose/src/resolve.ts @@ -862,8 +862,8 @@ async function resolveLocalImports( throw Error(`Unable to resolve schema at "${path}"`); } - // Make sure the schema has the Web3API header - if (schema.indexOf("### Web3API Header START ###") === -1) { + // Make sure the schema has the Polywrap header + if (schema.indexOf("### Polywrap Header START ###") === -1) { schema = addHeader(schema); } diff --git a/packages/schema/parse/.eslintrc.js b/packages/schema/parse/.eslintrc.js index d74cf51a67..b315b11479 100644 --- a/packages/schema/parse/.eslintrc.js +++ b/packages/schema/parse/.eslintrc.js @@ -32,7 +32,7 @@ module.exports = { format: ["camelCase"], leadingUnderscore: "allow" }, - //web3 api host methods doesn"t satisfy neither camel or snake + //wrapper host methods doesn"t satisfy neither camel or snake {selector: ["objectLiteralMethod", "typeMethod"], filter: {regex: "^_wrap_.*", match: true}, format: null}, //variable must be in camel or upper case {selector: "variable", format: ["camelCase", "PascalCase", "UPPER_CASE"], leadingUnderscore: "allow"}, diff --git a/packages/schema/parse/package.json b/packages/schema/parse/package.json index 2e102d5882..8fc7dec7c9 100644 --- a/packages/schema/parse/package.json +++ b/packages/schema/parse/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/schema-parse", - "description": "Web3API Schema Parsing", + "description": "Polywrap Schema Parsing", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "build/index.js", "files": [ diff --git a/packages/schema/parse/src/__tests__/test-cases.spec.ts b/packages/schema/parse/src/__tests__/test-cases.spec.ts index 53bcdb4734..fc06209eaa 100644 --- a/packages/schema/parse/src/__tests__/test-cases.spec.ts +++ b/packages/schema/parse/src/__tests__/test-cases.spec.ts @@ -1,7 +1,7 @@ import { parseSchema } from "../"; import { fetchTestCases } from "./index"; -describe("Web3API Schema Parser Test Cases", () => { +describe("Polywrap Schema Parser Test Cases", () => { const cases = fetchTestCases(); for (const test of cases) { diff --git a/packages/schema/parse/src/__tests__/transforms.spec.ts b/packages/schema/parse/src/__tests__/transforms.spec.ts index 85c1b950c2..6556e482ec 100644 --- a/packages/schema/parse/src/__tests__/transforms.spec.ts +++ b/packages/schema/parse/src/__tests__/transforms.spec.ts @@ -68,7 +68,7 @@ type AnotherType { } `; -describe("Web3API Schema TypeInfo Transformations", () => { +describe("Polywrap Schema TypeInfo Transformations", () => { it("addFirstLast", () => { const typeInfo = parseSchema(schema1, { transforms: [addFirstLast], diff --git a/packages/schema/parse/src/__tests__/validate-directives.spec.ts b/packages/schema/parse/src/__tests__/validate-directives.spec.ts index 5a24718120..73355dea57 100644 --- a/packages/schema/parse/src/__tests__/validate-directives.spec.ts +++ b/packages/schema/parse/src/__tests__/validate-directives.spec.ts @@ -68,7 +68,7 @@ type Namespace_Object { `; -describe("Web3API Schema Directives Validation", () => { +describe("Polywrap Schema Directives Validation", () => { it("supportedDirectives", () => { expect(() => parseSchema(supportedDirectivesSchema, { validators: [ diff --git a/packages/schema/parse/src/__tests__/validate-types.spec.ts b/packages/schema/parse/src/__tests__/validate-types.spec.ts index 9583cd6c6c..6c5e446844 100644 --- a/packages/schema/parse/src/__tests__/validate-types.spec.ts +++ b/packages/schema/parse/src/__tests__/validate-types.spec.ts @@ -241,7 +241,7 @@ type A { } ` -describe("Web3API Schema Type Validation", () => { +describe("Polywrap Schema Type Validation", () => { it("typeDefinitions", () => { const exec = (schema: string) => () => parseSchema(schema, { validators: [typeValidators.getTypeDefinitionsValidator] diff --git a/packages/schema/parse/src/header.ts b/packages/schema/parse/src/header.ts index 4d2ac60204..0d6db6358a 100644 --- a/packages/schema/parse/src/header.ts +++ b/packages/schema/parse/src/header.ts @@ -1,4 +1,4 @@ -export const header = `### Web3API Header START ### +export const header = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,5 +33,5 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### `; diff --git a/packages/templates/app/typescript-node/package.json b/packages/templates/app/typescript-node/package.json index 74a2a8bdab..afe1388090 100644 --- a/packages/templates/app/typescript-node/package.json +++ b/packages/templates/app/typescript-node/package.json @@ -1,6 +1,6 @@ { "name": "templates-app-typescript-node", - "description": "Web3API App TypeScript Node Template", + "description": "Polywrap App TypeScript Node Template", "private": true, "version": "0.0.1-prealpha.85", "scripts": { diff --git a/packages/templates/app/typescript-node/schema.graphql b/packages/templates/app/typescript-node/schema.graphql index f074446683..768c732d75 100644 --- a/packages/templates/app/typescript-node/schema.graphql +++ b/packages/templates/app/typescript-node/schema.graphql @@ -1,2 +1,2 @@ -#import * into HelloWorld from "ens/helloworld.web3api.eth" -#import * into Ethereum from "ens/ethereum.web3api.eth" +#import * into HelloWorld from "ens/helloworld.polywrap.eth" +#import * into Ethereum from "ens/ethereum.polywrap.eth" diff --git a/packages/templates/app/typescript-node/src/index.ts b/packages/templates/app/typescript-node/src/index.ts index a88982038b..c2b453fb87 100644 --- a/packages/templates/app/typescript-node/src/index.ts +++ b/packages/templates/app/typescript-node/src/index.ts @@ -1,4 +1,4 @@ -import { HelloWorld_Module, Ethereum_Module } from "./polywrap"; +import { HelloWorld_Module, Ethereum_Module } from "./wrap"; import { PolywrapClient } from "@polywrap/client-js"; diff --git a/packages/templates/app/typescript-node/web3api.app.yaml b/packages/templates/app/typescript-react/polywrap.app.yaml similarity index 100% rename from packages/templates/app/typescript-node/web3api.app.yaml rename to packages/templates/app/typescript-react/polywrap.app.yaml diff --git a/packages/templates/app/typescript-react/schema.graphql b/packages/templates/app/typescript-react/schema.graphql index 1f5ff3b26c..af95f67752 100644 --- a/packages/templates/app/typescript-react/schema.graphql +++ b/packages/templates/app/typescript-react/schema.graphql @@ -1 +1 @@ -#import * into HelloWorld from "ens/helloworld.web3api.eth" +#import * into HelloWorld from "ens/helloworld.polywrap.eth" diff --git a/packages/templates/app/typescript-react/src/App.tsx b/packages/templates/app/typescript-react/src/App.tsx index 2a44cf6224..28ea06f839 100644 --- a/packages/templates/app/typescript-react/src/App.tsx +++ b/packages/templates/app/typescript-react/src/App.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Web3ApiProvider } from '@polywrap/react'; +import { PolywrapProvider } from '@polywrap/react'; import { HelloWorld } from './HelloWorld'; import { Header } from './Header'; import Logo from './logo.png'; @@ -7,12 +7,12 @@ import './App.css'; export const App: React.FC = () => { return ( - +
- + ); }; diff --git a/packages/templates/app/typescript-react/src/Header.tsx b/packages/templates/app/typescript-react/src/Header.tsx index e172ddd779..5e2ac283cf 100644 --- a/packages/templates/app/typescript-react/src/Header.tsx +++ b/packages/templates/app/typescript-react/src/Header.tsx @@ -5,14 +5,14 @@ export const Header: React.FC = () => {
Source Code ENS Domain diff --git a/packages/templates/app/typescript-react/src/HelloWorld.tsx b/packages/templates/app/typescript-react/src/HelloWorld.tsx index d9478f204e..4dba12c376 100644 --- a/packages/templates/app/typescript-react/src/HelloWorld.tsx +++ b/packages/templates/app/typescript-react/src/HelloWorld.tsx @@ -1,12 +1,12 @@ -import { HelloWorld_Query } from './polywrap'; +import { HelloWorld_Query } from './wrap'; import React from 'react'; -import { useWeb3ApiClient } from '@polywrap/react'; +import { usePolywrapClient } from '@polywrap/react'; import { ToastContainer, toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; export const HelloWorld: React.FC = () => { const [message, setMessage] = React.useState(''); - const client = useWeb3ApiClient(); + const client = usePolywrapClient(); const notify = () => toast('Take a look at your console!'); diff --git a/packages/templates/package.json b/packages/templates/package.json index 77c9e9b0b8..14cb3424bf 100644 --- a/packages/templates/package.json +++ b/packages/templates/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/templates", - "description": "Web3API Templates", + "description": "Polywrap Templates", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "scripts": { "test": "ts-node ./run-tests.ts", diff --git a/packages/templates/plugin/typescript/package.json b/packages/templates/plugin/typescript/package.json index 93ab79ef35..f6d69d1e58 100644 --- a/packages/templates/plugin/typescript/package.json +++ b/packages/templates/plugin/typescript/package.json @@ -1,6 +1,6 @@ { "name": "templates-plugin-typescript", - "description": "Web3API Plugin Typescript Template", + "description": "Polywrap Plugin Typescript Template", "private": true, "version": "0.0.1-prealpha.85", "main": "build/index.js", diff --git a/packages/templates/plugin/typescript/web3api.plugin.yaml b/packages/templates/plugin/typescript/polywrap.plugin.yaml similarity index 100% rename from packages/templates/plugin/typescript/web3api.plugin.yaml rename to packages/templates/plugin/typescript/polywrap.plugin.yaml diff --git a/packages/templates/plugin/typescript/src/index.ts b/packages/templates/plugin/typescript/src/index.ts index 0646ba08fb..66c51cab11 100644 --- a/packages/templates/plugin/typescript/src/index.ts +++ b/packages/templates/plugin/typescript/src/index.ts @@ -1,4 +1,4 @@ -import { Module, Input_sampleMethod, manifest } from "./polywrap"; +import { Module, Input_sampleMethod, manifest } from "./wrap"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/templates/api/assemblyscript/.gitignore b/packages/templates/wasm/assemblyscript/.gitignore similarity index 76% rename from packages/templates/api/assemblyscript/.gitignore rename to packages/templates/wasm/assemblyscript/.gitignore index d2fa03fb18..978369e67b 100644 --- a/packages/templates/api/assemblyscript/.gitignore +++ b/packages/templates/wasm/assemblyscript/.gitignore @@ -1,4 +1,4 @@ build node_modules -polywrap +wrap .polywrap diff --git a/packages/templates/api/assemblyscript/.nvmrc b/packages/templates/wasm/assemblyscript/.nvmrc similarity index 100% rename from packages/templates/api/assemblyscript/.nvmrc rename to packages/templates/wasm/assemblyscript/.nvmrc diff --git a/packages/templates/api/assemblyscript/README.md b/packages/templates/wasm/assemblyscript/README.md similarity index 76% rename from packages/templates/api/assemblyscript/README.md rename to packages/templates/wasm/assemblyscript/README.md index c5336e4b1c..19c4da62d8 100644 --- a/packages/templates/api/assemblyscript/README.md +++ b/packages/templates/wasm/assemblyscript/README.md @@ -1,5 +1,5 @@ -# SimpleStorage Demo Web3API -A simple starter template that uses a SimpleStorage.sol contract ethereum. For more information on how this project works, and a step by step on how to extend its behavior, see the documentation [here](https://docs.web3api.dev/developers/create-as-web3api). +# SimpleStorage Demo Polywrap +A simple starter template that uses a SimpleStorage.sol contract ethereum. For more information on how this project works, and a step by step on how to extend its behavior, see the documentation [here](https://docs.polywrap.io/). # How To Run diff --git a/packages/templates/api/assemblyscript/jest.config.js b/packages/templates/wasm/assemblyscript/jest.config.js similarity index 100% rename from packages/templates/api/assemblyscript/jest.config.js rename to packages/templates/wasm/assemblyscript/jest.config.js diff --git a/packages/templates/api/assemblyscript/meta/icon.png b/packages/templates/wasm/assemblyscript/meta/icon.png similarity index 100% rename from packages/templates/api/assemblyscript/meta/icon.png rename to packages/templates/wasm/assemblyscript/meta/icon.png diff --git a/packages/templates/api/assemblyscript/meta/link.svg b/packages/templates/wasm/assemblyscript/meta/link.svg similarity index 100% rename from packages/templates/api/assemblyscript/meta/link.svg rename to packages/templates/wasm/assemblyscript/meta/link.svg diff --git a/packages/templates/api/assemblyscript/meta/test.graphql b/packages/templates/wasm/assemblyscript/meta/test.graphql similarity index 100% rename from packages/templates/api/assemblyscript/meta/test.graphql rename to packages/templates/wasm/assemblyscript/meta/test.graphql diff --git a/packages/templates/api/assemblyscript/meta/test.json b/packages/templates/wasm/assemblyscript/meta/test.json similarity index 100% rename from packages/templates/api/assemblyscript/meta/test.json rename to packages/templates/wasm/assemblyscript/meta/test.json diff --git a/packages/templates/api/assemblyscript/package.json b/packages/templates/wasm/assemblyscript/package.json similarity index 75% rename from packages/templates/api/assemblyscript/package.json rename to packages/templates/wasm/assemblyscript/package.json index 8ae66650f4..ccd9cdad2b 100644 --- a/packages/templates/api/assemblyscript/package.json +++ b/packages/templates/wasm/assemblyscript/package.json @@ -1,20 +1,20 @@ { - "name": "templates-api-assemblyscript", - "description": "Web3API Assemblyscript Template", + "name": "templates-wrapper-assemblyscript", + "description": "Polywrap Assemblyscript Template", "private": true, "version": "0.0.1-prealpha.85", "scripts": { - "build": "yarn build:contract && yarn build:web3api", - "build:web3api": "npx polywrap build", + "build": "yarn build:contract && yarn build:polywrap", + "build:polywrap": "npx polywrap build", "build:contract": "node ./scripts/build-contract.js", "test:env:up": "npx polywrap infra up --modules=eth-ens-ipfs", "test:env:down": "npx polywrap infra down --modules=eth-ens-ipfs", - "deploy": "yarn deploy:contract && yarn deploy:web3api", - "deploy:web3api": "npx polywrap deploy", + "deploy": "yarn deploy:contract && yarn deploy:polywrap", + "deploy:polywrap": "npx polywrap deploy", "deploy:contract": "node ./scripts/deploy-contract.js", "test": "yarn test:e2e && yarn test:recipe", "test:e2e": "yarn build && yarn test:e2e:codegen && jest --passWithNoTests --runInBand --verbose", - "test:e2e:codegen": "npx polywrap app codegen -m ./src/__tests__/types/web3api.app.yaml -c ./src/__tests__/types/polywrap", + "test:e2e:codegen": "npx polywrap app codegen -m ./src/__tests__/types/polywrap.app.yaml -c ./src/__tests__/types/wrap", "test:recipe": "yarn build && yarn test:env:up && yarn deploy:contract && npx polywrap query ./recipes/e2e.json && yarn test:env:down" }, "devDependencies": { diff --git a/packages/templates/api/assemblyscript/web3api.build.yaml b/packages/templates/wasm/assemblyscript/polywrap.build.yaml similarity index 100% rename from packages/templates/api/assemblyscript/web3api.build.yaml rename to packages/templates/wasm/assemblyscript/polywrap.build.yaml diff --git a/packages/templates/api/assemblyscript/web3api.deploy.yaml b/packages/templates/wasm/assemblyscript/polywrap.deploy.yaml similarity index 100% rename from packages/templates/api/assemblyscript/web3api.deploy.yaml rename to packages/templates/wasm/assemblyscript/polywrap.deploy.yaml diff --git a/packages/templates/api/assemblyscript/web3api.meta.yaml b/packages/templates/wasm/assemblyscript/polywrap.meta.yaml similarity index 100% rename from packages/templates/api/assemblyscript/web3api.meta.yaml rename to packages/templates/wasm/assemblyscript/polywrap.meta.yaml diff --git a/packages/templates/api/assemblyscript/web3api.yaml b/packages/templates/wasm/assemblyscript/polywrap.yaml similarity index 59% rename from packages/templates/api/assemblyscript/web3api.yaml rename to packages/templates/wasm/assemblyscript/polywrap.yaml index 584455a514..a13b4c1ab8 100644 --- a/packages/templates/api/assemblyscript/web3api.yaml +++ b/packages/templates/wasm/assemblyscript/polywrap.yaml @@ -1,8 +1,8 @@ format: 0.0.1-prealpha.9 name: simple-storage language: wasm/assemblyscript -build: ./web3api.build.yaml -meta: ./web3api.meta.yaml -deploy: ./web3api.deploy.yaml +build: ./polywrap.build.yaml +meta: ./polywrap.meta.yaml +deploy: ./polywrap.deploy.yaml module: ./src/index.ts schema: ./src/schema.graphql \ No newline at end of file diff --git a/packages/templates/api/assemblyscript/recipes/constants.json b/packages/templates/wasm/assemblyscript/recipes/constants.json similarity index 100% rename from packages/templates/api/assemblyscript/recipes/constants.json rename to packages/templates/wasm/assemblyscript/recipes/constants.json diff --git a/packages/templates/api/assemblyscript/recipes/e2e.json b/packages/templates/wasm/assemblyscript/recipes/e2e.json similarity index 95% rename from packages/templates/api/assemblyscript/recipes/e2e.json rename to packages/templates/wasm/assemblyscript/recipes/e2e.json index e5c1dd1edc..33aeabdfce 100644 --- a/packages/templates/api/assemblyscript/recipes/e2e.json +++ b/packages/templates/wasm/assemblyscript/recipes/e2e.json @@ -1,6 +1,6 @@ [ { - "api": "wrap://fs/./build", + "wrapper": "wrap://fs/./build", "constants": "./constants.json" }, { diff --git a/packages/templates/api/assemblyscript/recipes/get.graphql b/packages/templates/wasm/assemblyscript/recipes/get.graphql similarity index 100% rename from packages/templates/api/assemblyscript/recipes/get.graphql rename to packages/templates/wasm/assemblyscript/recipes/get.graphql diff --git a/packages/templates/api/assemblyscript/recipes/set.graphql b/packages/templates/wasm/assemblyscript/recipes/set.graphql similarity index 100% rename from packages/templates/api/assemblyscript/recipes/set.graphql rename to packages/templates/wasm/assemblyscript/recipes/set.graphql diff --git a/packages/templates/api/assemblyscript/scripts/build-contract.js b/packages/templates/wasm/assemblyscript/scripts/build-contract.js similarity index 100% rename from packages/templates/api/assemblyscript/scripts/build-contract.js rename to packages/templates/wasm/assemblyscript/scripts/build-contract.js diff --git a/packages/templates/api/assemblyscript/scripts/deploy-contract.js b/packages/templates/wasm/assemblyscript/scripts/deploy-contract.js similarity index 100% rename from packages/templates/api/assemblyscript/scripts/deploy-contract.js rename to packages/templates/wasm/assemblyscript/scripts/deploy-contract.js diff --git a/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts b/packages/templates/wasm/assemblyscript/src/__tests__/e2e/integration.spec.ts similarity index 90% rename from packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts rename to packages/templates/wasm/assemblyscript/src/__tests__/e2e/integration.spec.ts index aeb43de0f3..aebf4f4915 100644 --- a/packages/templates/api/assemblyscript/src/__tests__/e2e/integration.spec.ts +++ b/packages/templates/wasm/assemblyscript/src/__tests__/e2e/integration.spec.ts @@ -1,12 +1,12 @@ import { PolywrapClient } from "@polywrap/client-js"; import { - buildApi, + buildWrapper, initTestEnvironment, stopTestEnvironment, providers, ensAddresses } from "@polywrap/test-env-js"; -import * as App from "../types/polywrap"; +import * as App from "../types/wrap"; import path from "path"; import { getPlugins } from "../utils"; @@ -18,13 +18,13 @@ describe("SimpleStorage", () => { let client: PolywrapClient; - const apiPath: string = path.join( + const wrapperPath: string = path.join( path.resolve(__dirname), "..", "..", ".." ); - const apiUri = `fs/${apiPath}/build`; + const wrapperUri = `fs/${wrapperPath}/build`; beforeAll(async () => { await initTestEnvironment(); @@ -32,7 +32,7 @@ describe("SimpleStorage", () => { const config = getPlugins(providers.ethereum, providers.ipfs, ensAddresses.ensAddress); client = new PolywrapClient(config); - await buildApi(apiPath); + await buildWrapper(wrapperPath); }); afterAll(async () => { @@ -46,7 +46,7 @@ describe("SimpleStorage", () => { connection: CONNECTION, }, client, - apiUri + wrapperUri ); expect(response).toBeTruthy(); @@ -64,7 +64,7 @@ describe("SimpleStorage", () => { value: value, }, client, - apiUri + wrapperUri ); expect(response).toBeTruthy(); @@ -79,7 +79,7 @@ describe("SimpleStorage", () => { const deployContractResponse = await App.SimpleStorage_Module.deployContract( { connection: CONNECTION }, client, - apiUri + wrapperUri ); expect(deployContractResponse).toBeTruthy(); expect(deployContractResponse.error).toBeFalsy(); diff --git a/packages/templates/api/assemblyscript/src/__tests__/types/web3api.app.yaml b/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml similarity index 100% rename from packages/templates/api/assemblyscript/src/__tests__/types/web3api.app.yaml rename to packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml diff --git a/packages/templates/api/assemblyscript/src/__tests__/types/schema.graphql b/packages/templates/wasm/assemblyscript/src/__tests__/types/schema.graphql similarity index 100% rename from packages/templates/api/assemblyscript/src/__tests__/types/schema.graphql rename to packages/templates/wasm/assemblyscript/src/__tests__/types/schema.graphql diff --git a/packages/templates/api/assemblyscript/src/__tests__/utils.ts b/packages/templates/wasm/assemblyscript/src/__tests__/utils.ts similarity index 85% rename from packages/templates/api/assemblyscript/src/__tests__/utils.ts rename to packages/templates/wasm/assemblyscript/src/__tests__/utils.ts index 6a7bfb7c12..8153057edd 100644 --- a/packages/templates/api/assemblyscript/src/__tests__/utils.ts +++ b/packages/templates/wasm/assemblyscript/src/__tests__/utils.ts @@ -12,15 +12,15 @@ export function getPlugins( redirects: [], plugins: [ { - uri: "wrap://ens/ipfs.web3api.eth", + uri: "wrap://ens/ipfs.polywrap.eth", plugin: ipfsPlugin({ provider: ipfs }), }, { - uri: "wrap://ens/ens.web3api.eth", + uri: "wrap://ens/ens.polywrap.eth", plugin: ensPlugin({ addresses: { testnet: ensAddress } }), }, { - uri: "wrap://ens/ethereum.web3api.eth", + uri: "wrap://ens/ethereum.polywrap.eth", plugin: ethereumPlugin({ networks: { testnet: { diff --git a/packages/templates/api/assemblyscript/src/contracts/SimpleStorage.json b/packages/templates/wasm/assemblyscript/src/contracts/SimpleStorage.json similarity index 100% rename from packages/templates/api/assemblyscript/src/contracts/SimpleStorage.json rename to packages/templates/wasm/assemblyscript/src/contracts/SimpleStorage.json diff --git a/packages/templates/api/assemblyscript/src/contracts/SimpleStorage.sol b/packages/templates/wasm/assemblyscript/src/contracts/SimpleStorage.sol similarity index 100% rename from packages/templates/api/assemblyscript/src/contracts/SimpleStorage.sol rename to packages/templates/wasm/assemblyscript/src/contracts/SimpleStorage.sol diff --git a/packages/templates/api/assemblyscript/src/contracts/SimpleStorage.ts b/packages/templates/wasm/assemblyscript/src/contracts/SimpleStorage.ts similarity index 100% rename from packages/templates/api/assemblyscript/src/contracts/SimpleStorage.ts rename to packages/templates/wasm/assemblyscript/src/contracts/SimpleStorage.ts diff --git a/packages/templates/api/assemblyscript/src/index.ts b/packages/templates/wasm/assemblyscript/src/index.ts similarity index 97% rename from packages/templates/api/assemblyscript/src/index.ts rename to packages/templates/wasm/assemblyscript/src/index.ts index 6e41a6bd4d..e8821b96f7 100644 --- a/packages/templates/api/assemblyscript/src/index.ts +++ b/packages/templates/wasm/assemblyscript/src/index.ts @@ -3,7 +3,7 @@ import { Input_deployContract, Input_setData, Input_getData, -} from "./polywrap"; +} from "./wrap"; import { abi, bytecode } from "./contracts/SimpleStorage"; export function getData(input: Input_getData): u32 { diff --git a/packages/templates/api/assemblyscript/src/schema.graphql b/packages/templates/wasm/assemblyscript/src/schema.graphql similarity index 94% rename from packages/templates/api/assemblyscript/src/schema.graphql rename to packages/templates/wasm/assemblyscript/src/schema.graphql index 7c14f2ec6e..1bd6a92b32 100644 --- a/packages/templates/api/assemblyscript/src/schema.graphql +++ b/packages/templates/wasm/assemblyscript/src/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.polywrap.eth" type Module { getData( diff --git a/packages/templates/api/assemblyscript/tsconfig.build.json b/packages/templates/wasm/assemblyscript/tsconfig.build.json similarity index 100% rename from packages/templates/api/assemblyscript/tsconfig.build.json rename to packages/templates/wasm/assemblyscript/tsconfig.build.json diff --git a/packages/templates/api/assemblyscript/tsconfig.json b/packages/templates/wasm/assemblyscript/tsconfig.json similarity index 100% rename from packages/templates/api/assemblyscript/tsconfig.json rename to packages/templates/wasm/assemblyscript/tsconfig.json diff --git a/packages/templates/api/interface/.gitignore b/packages/templates/wasm/interface/.gitignore similarity index 67% rename from packages/templates/api/interface/.gitignore rename to packages/templates/wasm/interface/.gitignore index a15402b528..ccc3d015c7 100644 --- a/packages/templates/api/interface/.gitignore +++ b/packages/templates/wasm/interface/.gitignore @@ -1,3 +1,3 @@ build node_modules -polywrap +wrap diff --git a/packages/templates/api/interface/.nvmrc b/packages/templates/wasm/interface/.nvmrc similarity index 100% rename from packages/templates/api/interface/.nvmrc rename to packages/templates/wasm/interface/.nvmrc diff --git a/packages/templates/api/interface/README.md b/packages/templates/wasm/interface/README.md similarity index 71% rename from packages/templates/api/interface/README.md rename to packages/templates/wasm/interface/README.md index 6aa16eebc6..465e65206d 100644 --- a/packages/templates/api/interface/README.md +++ b/packages/templates/wasm/interface/README.md @@ -1,4 +1,4 @@ -# Web3API Interface Example +# Polywrap Interface Example # How To Run @@ -9,5 +9,5 @@ ## Start Test Environment `yarn test:env:up` -## Build & Deploy Web3API +## Build & Deploy Polywrap `yarn deploy` \ No newline at end of file diff --git a/packages/templates/api/interface/meta/icon.png b/packages/templates/wasm/interface/meta/icon.png similarity index 100% rename from packages/templates/api/interface/meta/icon.png rename to packages/templates/wasm/interface/meta/icon.png diff --git a/packages/templates/api/interface/meta/link.svg b/packages/templates/wasm/interface/meta/link.svg similarity index 100% rename from packages/templates/api/interface/meta/link.svg rename to packages/templates/wasm/interface/meta/link.svg diff --git a/packages/templates/api/interface/meta/test.graphql b/packages/templates/wasm/interface/meta/test.graphql similarity index 100% rename from packages/templates/api/interface/meta/test.graphql rename to packages/templates/wasm/interface/meta/test.graphql diff --git a/packages/templates/api/interface/meta/test.json b/packages/templates/wasm/interface/meta/test.json similarity index 100% rename from packages/templates/api/interface/meta/test.json rename to packages/templates/wasm/interface/meta/test.json diff --git a/packages/templates/api/interface/package.json b/packages/templates/wasm/interface/package.json similarity index 82% rename from packages/templates/api/interface/package.json rename to packages/templates/wasm/interface/package.json index 556fb66b8a..43094134b9 100644 --- a/packages/templates/api/interface/package.json +++ b/packages/templates/wasm/interface/package.json @@ -1,6 +1,6 @@ { - "name": "templates-api-interface", - "description": "Web3API Interface Example", + "name": "templates-wrapper-interface", + "description": "Polywrap Interface Example", "private": true, "version": "0.0.1-prealpha.85", "scripts": { diff --git a/packages/templates/api/interface/web3api.deploy.yaml b/packages/templates/wasm/interface/polywrap.deploy.yaml similarity index 100% rename from packages/templates/api/interface/web3api.deploy.yaml rename to packages/templates/wasm/interface/polywrap.deploy.yaml diff --git a/packages/templates/api/interface/web3api.meta.yaml b/packages/templates/wasm/interface/polywrap.meta.yaml similarity index 100% rename from packages/templates/api/interface/web3api.meta.yaml rename to packages/templates/wasm/interface/polywrap.meta.yaml diff --git a/packages/templates/api/interface/web3api.yaml b/packages/templates/wasm/interface/polywrap.yaml similarity index 58% rename from packages/templates/api/interface/web3api.yaml rename to packages/templates/wasm/interface/polywrap.yaml index 42a6ed148f..59821a198c 100644 --- a/packages/templates/api/interface/web3api.yaml +++ b/packages/templates/wasm/interface/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: TODO language: interface -meta: ./web3api.meta.yaml -deploy: ./web3api.deploy.yaml +meta: ./polywrap.meta.yaml +deploy: ./polywrap.deploy.yaml schema: ./schema.graphql diff --git a/packages/templates/api/interface/schema.graphql b/packages/templates/wasm/interface/schema.graphql similarity index 100% rename from packages/templates/api/interface/schema.graphql rename to packages/templates/wasm/interface/schema.graphql diff --git a/packages/test-cases/cases/bind/sanity/input/schema.graphql b/packages/test-cases/cases/bind/sanity/input/schema.graphql index 8c25dcd20b..441cf33a77 100644 --- a/packages/test-cases/cases/bind/sanity/input/schema.graphql +++ b/packages/test-cases/cases/bind/sanity/input/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ diff --git a/packages/test-cases/cases/bind/sanity/output/app-ts/schema.ts b/packages/test-cases/cases/bind/sanity/output/app-ts/schema.ts index c32ba34476..d65fecce00 100644 --- a/packages/test-cases/cases/bind/sanity/output/app-ts/schema.ts +++ b/packages/test-cases/cases/bind/sanity/output/app-ts/schema.ts @@ -1,4 +1,4 @@ -export const schema: string = `### Web3API Header START ### +export const schema: string = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ diff --git a/packages/test-cases/cases/bind/sanity/output/app-ts/types.ts b/packages/test-cases/cases/bind/sanity/output/app-ts/types.ts index 4b2ee5f140..3bd22c19dc 100644 --- a/packages/test-cases/cases/bind/sanity/output/app-ts/types.ts +++ b/packages/test-cases/cases/bind/sanity/output/app-ts/types.ts @@ -4,7 +4,7 @@ import * as Types from "./"; // @ts-ignore import { Client, - InvokeApiResult + InvokeResult } from "@polywrap/core-js"; export type UInt = number; @@ -146,7 +146,7 @@ export const TestImport_Module = { input: TestImport_Module_Input_importedMethod, client: Client, uri: string = "testimport.uri.eth" - ): Promise> => { + ): Promise> => { return client.invoke({ uri, method: "importedMethod", @@ -158,7 +158,7 @@ export const TestImport_Module = { input: TestImport_Module_Input_anotherMethod, client: Client, uri: string = "testimport.uri.eth" - ): Promise> => { + ): Promise> => { return client.invoke({ uri, method: "anotherMethod", diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts index 7930e94ce1..20d53ea396 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema: string = `### Web3API Header START ### +export const schema: string = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/types.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/types.ts index 41753ce856..f63231ef88 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/types.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/types.ts @@ -7,7 +7,7 @@ import * as Types from "./"; // @ts-ignore import { Client, - InvokeApiResult + InvokeResult } from "@polywrap/core-js"; export type UInt = number; @@ -163,7 +163,7 @@ export class TestImport_Module { public async importedMethod ( input: TestImport_Module_Input_importedMethod, client: Client - ): Promise> { + ): Promise> { return client.invoke({ uri: this.uri, method: "importedMethod", @@ -174,7 +174,7 @@ export class TestImport_Module { public async anotherMethod ( input: TestImport_Module_Input_anotherMethod, client: Client - ): Promise> { + ): Promise> { return client.invoke({ uri: this.uri, method: "anotherMethod", diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/another_type/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/another_type/mod.rs index c3d4e971b7..8106b127e5 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/another_type/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/another_type/mod.rs @@ -1,6 +1,6 @@ use serde::{Serialize, Deserialize}; pub mod serialization; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/another_type/serialization.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/another_type/serialization.rs index e91c4e0dce..9f93c92f32 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/another_type/serialization.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/another_type/serialization.rs @@ -1,5 +1,5 @@ use std::convert::TryFrom; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_enum/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_enum/mod.rs index 1dbef50f49..dd8f6bb187 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_enum/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_enum/mod.rs @@ -1,4 +1,4 @@ -use web3api_wasm_rs::{EnumTypeError}; +use polywrap_wasm_rs::{EnumTypeError}; use serde::{Serialize, Deserialize}; use std::convert::TryFrom; diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_type/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_type/mod.rs index 8308c100c5..ed36d1900d 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_type/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_type/mod.rs @@ -1,6 +1,6 @@ use serde::{Serialize, Deserialize}; pub mod serialization; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_type/serialization.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_type/serialization.rs index 4bae63d1ef..fd55943a66 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_type/serialization.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/custom_type/serialization.rs @@ -1,5 +1,5 @@ use std::convert::TryFrom; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/entry.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/entry.rs index 7fd9b6e14d..61e182145f 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/entry.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/entry.rs @@ -2,7 +2,7 @@ use crate::{ module_method_wrapped, object_method_wrapped }; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ abort, invoke, InvokeArgs, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_another_object/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_another_object/mod.rs index 1a52c53f83..6f5c741152 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_another_object/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_another_object/mod.rs @@ -1,6 +1,6 @@ use serde::{Serialize, Deserialize}; pub mod serialization; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_another_object/serialization.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_another_object/serialization.rs index c07c881785..cc02f6e701 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_another_object/serialization.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_another_object/serialization.rs @@ -1,5 +1,5 @@ use std::convert::TryFrom; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_enum/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_enum/mod.rs index 17b65ac494..e0426d64f1 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_enum/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_enum/mod.rs @@ -1,4 +1,4 @@ -use web3api_wasm_rs::EnumTypeError; +use polywrap_wasm_rs::EnumTypeError; use serde::{Serialize, Deserialize}; use std::convert::TryFrom; diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/mod.rs index 63deb2ade7..a3229dfb3f 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/mod.rs @@ -1,5 +1,5 @@ use serde::{Serialize, Deserialize}; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/serialization.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/serialization.rs index 42f855a5b4..32a9e5a23b 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/serialization.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_module/serialization.rs @@ -1,5 +1,5 @@ use serde::{Serialize, Deserialize}; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_object/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_object/mod.rs index 438d6829a8..9da9ab7a82 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_object/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_object/mod.rs @@ -1,6 +1,6 @@ use serde::{Serialize, Deserialize}; pub mod serialization; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_object/serialization.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_object/serialization.rs index 901092ed7d..da0947cce0 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_object/serialization.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/imported/test_import_object/serialization.rs @@ -1,5 +1,5 @@ use std::convert::TryFrom; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/module/serialization.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/module/serialization.rs index 53388cbcaa..4aac4eaf93 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/module/serialization.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/module/serialization.rs @@ -1,6 +1,6 @@ use serde::{Serialize, Deserialize}; use std::convert::TryFrom; -use web3api_wasm_rs::{ +use polywrap_wasm_rs::{ BigInt, BigNumber, Map, diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-rs/test_import/mod.rs b/packages/test-cases/cases/bind/sanity/output/wasm-rs/test_import/mod.rs index 7cc90c771b..7cae6addae 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-rs/test_import/mod.rs +++ b/packages/test-cases/cases/bind/sanity/output/wasm-rs/test_import/mod.rs @@ -1,4 +1,4 @@ -use web3api_wasm_rs::wrap_get_implementations; +use polywrap_wasm_rs::wrap_get_implementations; pub struct TestImport {} diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/expected/output.json b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/expected/output.json deleted file mode 100644 index 9b1784b4d9..0000000000 --- a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/expected/output.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - "Artifacts written to ./build from the image `polywrap-build-env-", - "Manifest written to ./build/web3api.json", - "build/web3api.json" - ], - "exitCode": 0 -} diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/index.ts deleted file mode 100644 index 0a0cc28044..0000000000 --- a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Input_method } from "./polywrap"; - -export function method(input: Input_method): string { - return input.arg; -} diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/index.ts deleted file mode 100644 index 0a0cc28044..0000000000 --- a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Input_method } from "./polywrap"; - -export function method(input: Input_method): string { - return input.arg; -} diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/index.ts b/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/index.ts deleted file mode 100644 index 0a0cc28044..0000000000 --- a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Input_method } from "./polywrap"; - -export function method(input: Input_method): string { - return input.arg; -} diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/src/index.ts b/packages/test-cases/cases/cli/api/codegen/001-sanity/src/index.ts deleted file mode 100644 index 0a0cc28044..0000000000 --- a/packages/test-cases/cases/cli/api/codegen/001-sanity/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Input_method } from "./polywrap"; - -export function method(input: Input_method): string { - return input.arg; -} diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/cmd.json b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/cmd.json deleted file mode 100644 index 5ebb214090..0000000000 --- a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/cmd.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "args": ["--script", "web3api-norun.gen.js"] -} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/src/index.ts b/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/src/index.ts deleted file mode 100644 index 0a0cc28044..0000000000 --- a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Input_method } from "./polywrap"; - -export function method(input: Input_method): string { - return input.arg; -} diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/cmd.json b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/cmd.json deleted file mode 100644 index 254778625b..0000000000 --- a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/cmd.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "args": ["--script", "web3api.gen.ts"] -} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/src/index.ts b/packages/test-cases/cases/cli/api/codegen/003-codegen-script/src/index.ts deleted file mode 100644 index 0a0cc28044..0000000000 --- a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Input_method } from "./polywrap"; - -export function method(input: Input_method): string { - return input.arg; -} diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/src/index.ts b/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/src/index.ts deleted file mode 100644 index c51c40ae58..0000000000 --- a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Input_get } from "./polywrap"; - -export function get(input: Input_get): string { - return "foo"; -} diff --git a/packages/test-cases/cases/cli/api/query/web3api-deploy-invalid-config.yaml b/packages/test-cases/cases/cli/api/query/web3api-deploy-invalid-config.yaml deleted file mode 100644 index cd4656af91..0000000000 --- a/packages/test-cases/cases/cli/api/query/web3api-deploy-invalid-config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -format: 0.0.1-prealpha.9 -name: test-project -build: ./web3api.build.yaml -deploy: ./web3api.deploy.invalid-config.yaml -language: wasm/assemblyscript -schema: ./schema.graphql -module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/query/web3api-deploy-no-ext.yaml b/packages/test-cases/cases/cli/api/query/web3api-deploy-no-ext.yaml deleted file mode 100644 index 5f831162f0..0000000000 --- a/packages/test-cases/cases/cli/api/query/web3api-deploy-no-ext.yaml +++ /dev/null @@ -1,7 +0,0 @@ -format: 0.0.1-prealpha.9 -name: test-project -build: ./web3api.build.yaml -deploy: ./web3api.deploy.no-ext.yaml -language: wasm/assemblyscript -schema: ./schema.graphql -module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/query/web3api.yaml b/packages/test-cases/cases/cli/api/query/web3api.yaml deleted file mode 100644 index 5078aae935..0000000000 --- a/packages/test-cases/cases/cli/api/query/web3api.yaml +++ /dev/null @@ -1,7 +0,0 @@ -format: 0.0.1-prealpha.9 -name: test-project -build: ./web3api.build.yaml -deploy: ./web3api.deploy.yaml -language: wasm/assemblyscript -schema: ./schema.graphql -module: ./src/index.ts diff --git a/packages/templates/app/typescript-react/web3api.app.yaml b/packages/test-cases/cases/cli/app/codegen/001-sanity/polywrap.app.yaml similarity index 100% rename from packages/templates/app/typescript-react/web3api.app.yaml rename to packages/test-cases/cases/cli/app/codegen/001-sanity/polywrap.app.yaml diff --git a/packages/test-cases/cases/cli/app/codegen/001-sanity/schema.graphql b/packages/test-cases/cases/cli/app/codegen/001-sanity/schema.graphql index c3ac9d494f..33edff0f6a 100644 --- a/packages/test-cases/cases/cli/app/codegen/001-sanity/schema.graphql +++ b/packages/test-cases/cases/cli/app/codegen/001-sanity/schema.graphql @@ -1 +1 @@ -#import * into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import * into Ethereum from "wrap://ens/ethereum.polywrap.eth" diff --git a/packages/test-cases/cases/cli/app/codegen/001-sanity/web3api.app.yaml b/packages/test-cases/cases/cli/app/codegen/001-sanity/web3api.app.yaml deleted file mode 100644 index bbed2041c9..0000000000 --- a/packages/test-cases/cases/cli/app/codegen/001-sanity/web3api.app.yaml +++ /dev/null @@ -1,3 +0,0 @@ -format: 0.0.1-prealpha.1 -language: app/typescript -schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/web3api.app.yaml b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml similarity index 100% rename from packages/test-cases/cases/cli/app/codegen/002-with-plugin/web3api.app.yaml rename to packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml diff --git a/packages/test-cases/cases/cli/app/codegen/003-multi-import/web3api.app.yaml b/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml similarity index 87% rename from packages/test-cases/cases/cli/app/codegen/003-multi-import/web3api.app.yaml rename to packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml index c5b7c76b9c..212f20627f 100644 --- a/packages/test-cases/cases/cli/app/codegen/003-multi-import/web3api.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml @@ -2,7 +2,7 @@ format: 0.0.1-prealpha.1 language: app/typescript schema: ./schema.graphql import_redirects: - - uri: "wrap://ens/ethereum.web3api.eth" + - uri: "wrap://ens/ethereum.polywrap.eth" schema: "./../../../../../../js/plugins/ethereum/build/schema.graphql" - uri: "wrap://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" schema: "./../../../../../../js/plugins/logger/build/schema.graphql" diff --git a/packages/test-cases/cases/cli/app/codegen/003-multi-import/schema.graphql b/packages/test-cases/cases/cli/app/codegen/003-multi-import/schema.graphql index a0334d5000..7ede02a271 100644 --- a/packages/test-cases/cases/cli/app/codegen/003-multi-import/schema.graphql +++ b/packages/test-cases/cases/cli/app/codegen/003-multi-import/schema.graphql @@ -1,2 +1,2 @@ -#import * into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import * into Ethereum from "wrap://ens/ethereum.polywrap.eth" #import * into Console from "wrap://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" diff --git a/packages/test-cases/cases/cli/infra/001-sanity/web3api.infra.yaml b/packages/test-cases/cases/cli/infra/001-sanity/polywrap.infra.yaml similarity index 100% rename from packages/test-cases/cases/cli/infra/001-sanity/web3api.infra.yaml rename to packages/test-cases/cases/cli/infra/001-sanity/polywrap.infra.yaml diff --git a/packages/test-cases/cases/cli/infra/002-duplicate-service-names/web3api.infra.yaml b/packages/test-cases/cases/cli/infra/002-duplicate-service-names/polywrap.infra.yaml similarity index 100% rename from packages/test-cases/cases/cli/infra/002-duplicate-service-names/web3api.infra.yaml rename to packages/test-cases/cases/cli/infra/002-duplicate-service-names/polywrap.infra.yaml diff --git a/packages/test-cases/cases/cli/infra/003-precedence/web3api.infra.yaml b/packages/test-cases/cases/cli/infra/003-precedence/polywrap.infra.yaml similarity index 100% rename from packages/test-cases/cases/cli/infra/003-precedence/web3api.infra.yaml rename to packages/test-cases/cases/cli/infra/003-precedence/polywrap.infra.yaml diff --git a/packages/test-cases/cases/cli/infra/005-sanity-default-module/web3api.infra.wrong.yaml b/packages/test-cases/cases/cli/infra/005-sanity-default-module/polywrap.infra.wrong.yaml similarity index 100% rename from packages/test-cases/cases/cli/infra/005-sanity-default-module/web3api.infra.wrong.yaml rename to packages/test-cases/cases/cli/infra/005-sanity-default-module/polywrap.infra.wrong.yaml diff --git a/packages/test-cases/cases/cli/infra/005-sanity-default-module/web3api.infra.yaml b/packages/test-cases/cases/cli/infra/005-sanity-default-module/polywrap.infra.yaml similarity index 100% rename from packages/test-cases/cases/cli/infra/005-sanity-default-module/web3api.infra.yaml rename to packages/test-cases/cases/cli/infra/005-sanity-default-module/polywrap.infra.yaml diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/web3api.plugin.json b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/polywrap.plugin.json similarity index 100% rename from packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/web3api.plugin.json rename to packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/polywrap.plugin.json diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/schema.graphql index 1da22bb558..cebf63eccd 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/schema.graphql +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ @@ -73,7 +73,7 @@ type Object { ### Imported Modules START ### type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Module" ) { @@ -235,7 +235,7 @@ type Ethereum_Module @imported( ### Imported Objects START ### type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Connection" ) { @@ -244,7 +244,7 @@ type Ethereum_Connection @imported( } type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { @@ -254,7 +254,7 @@ type Ethereum_TxOverrides @imported( } type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { @@ -263,7 +263,7 @@ type Ethereum_StaticTxResult @imported( } type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { @@ -279,7 +279,7 @@ type Ethereum_TxRequest @imported( } type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { @@ -303,7 +303,7 @@ type Ethereum_TxReceipt @imported( } type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Log" ) { @@ -319,7 +319,7 @@ type Ethereum_Log @imported( } type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { @@ -329,7 +329,7 @@ type Ethereum_EventNotification @imported( } type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Network" ) { @@ -339,7 +339,7 @@ type Ethereum_Network @imported( } type Ethereum_TxResponse @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxResponse" ) { @@ -365,7 +365,7 @@ type Ethereum_TxResponse @imported( } type Ethereum_Access @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Access" ) { diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/index.ts deleted file mode 100644 index ff371c0cd8..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@web3api/core-js"; diff --git a/packages/js/plugins/http/src/w3-man/index.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/index.ts similarity index 100% rename from packages/js/plugins/http/src/w3-man/index.ts rename to packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/index.ts diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/manifest.ts similarity index 81% rename from packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/manifest.ts rename to packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/manifest.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/module.ts similarity index 96% rename from packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/module.ts rename to packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/module.ts index 6b0aa5629b..71ba212f4b 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_methodOne extends Record { str: Types.String; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/schema.ts similarity index 93% rename from packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/schema.ts rename to packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/schema.ts index 29807e38af..a16cb34492 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/schema.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema: string = `### Web3API Header START ### +export const schema: string = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ @@ -76,7 +76,7 @@ type Object { ### Imported Modules START ### type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Module" ) { @@ -238,7 +238,7 @@ type Ethereum_Module @imported( ### Imported Objects START ### type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Connection" ) { @@ -247,7 +247,7 @@ type Ethereum_Connection @imported( } type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { @@ -257,7 +257,7 @@ type Ethereum_TxOverrides @imported( } type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { @@ -266,7 +266,7 @@ type Ethereum_StaticTxResult @imported( } type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { @@ -282,7 +282,7 @@ type Ethereum_TxRequest @imported( } type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { @@ -306,7 +306,7 @@ type Ethereum_TxReceipt @imported( } type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Log" ) { @@ -322,7 +322,7 @@ type Ethereum_Log @imported( } type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { @@ -332,7 +332,7 @@ type Ethereum_EventNotification @imported( } type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Network" ) { @@ -342,7 +342,7 @@ type Ethereum_Network @imported( } type Ethereum_TxResponse @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxResponse" ) { @@ -368,7 +368,7 @@ type Ethereum_TxResponse @imported( } type Ethereum_Access @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Access" ) { diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/types.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/types.ts similarity index 77% rename from packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/types.ts rename to packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/types.ts index b89d8ec8f6..40d910d1b7 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/types.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/wrap/types.ts @@ -7,8 +7,8 @@ import * as Types from "./"; // @ts-ignore import { Client, - InvokeApiResult -} from "@web3api/core-js"; + InvokeResult +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; @@ -45,26 +45,26 @@ export interface Object { /// Imported Objects START /// -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Connection { node?: Types.String | null; networkNameOrChainId?: Types.String | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxOverrides { gasLimit?: Types.BigInt | null; gasPrice?: Types.BigInt | null; value?: Types.BigInt | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_StaticTxResult { result: Types.String; error: Types.Boolean; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxRequest { to?: Types.String | null; from?: Types.String | null; @@ -77,7 +77,7 @@ export interface Ethereum_TxRequest { type?: Types.UInt32 | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxReceipt { to: Types.String; from: Types.String; @@ -98,7 +98,7 @@ export interface Ethereum_TxReceipt { status?: Types.UInt32 | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Log { blockNumber: Types.BigInt; blockHash: Types.String; @@ -111,21 +111,21 @@ export interface Ethereum_Log { logIndex: Types.UInt32; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_EventNotification { data: Types.String; address: Types.String; log: Types.Ethereum_Log; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Network { name: Types.String; chainId: Types.BigInt; ensAddress?: Types.String | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxResponse { hash: Types.String; to?: Types.String | null; @@ -148,7 +148,7 @@ export interface Ethereum_TxResponse { accessList?: Array | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Access { address: Types.String; storageKeys: Array; @@ -158,7 +158,7 @@ export interface Ethereum_Access { /// Imported Modules START /// -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_callContractView extends Record { address: Types.String; method: Types.String; @@ -166,7 +166,7 @@ interface Ethereum_Module_Input_callContractView extends Record connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_callContractStatic extends Record { address: Types.String; method: Types.String; @@ -175,72 +175,72 @@ interface Ethereum_Module_Input_callContractStatic extends Record { address: Types.String; blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_encodeParams extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_encodeFunction extends Record { method: Types.String; args?: Array | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_solidityPack extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_solidityKeccak256 extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_soliditySha256 extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerAddress extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerBalance extends Record { blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerTransactionCount extends Record { blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getGasPrice extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_estimateTransactionGas extends Record { tx: Types.Ethereum_TxRequest; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_estimateContractCallGas extends Record { address: Types.String; method: Types.String; @@ -249,22 +249,22 @@ interface Ethereum_Module_Input_estimateContractCallGas extends Record { address: Types.String; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_toWei extends Record { eth: Types.String; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_toEth extends Record { wei: Types.BigInt; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_awaitTransaction extends Record { txHash: Types.String; confirmations: Types.UInt32; @@ -272,7 +272,7 @@ interface Ethereum_Module_Input_awaitTransaction extends Record connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_waitForEvent extends Record { address: Types.String; event: Types.String; @@ -281,12 +281,12 @@ interface Ethereum_Module_Input_waitForEvent extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getNetwork extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_callContractMethod extends Record { address: Types.String; method: Types.String; @@ -295,7 +295,7 @@ interface Ethereum_Module_Input_callContractMethod extends Record { address: Types.String; method: Types.String; @@ -304,19 +304,19 @@ interface Ethereum_Module_Input_callContractMethodAndWait extends Record { tx: Types.Ethereum_TxRequest; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_sendTransactionAndWait extends Record { tx: Types.Ethereum_TxRequest; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_deployContract extends Record { abi: Types.String; bytecode: Types.String; @@ -324,27 +324,27 @@ interface Ethereum_Module_Input_deployContract extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_signMessage extends Record { message: Types.String; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_sendRPC extends Record { method: Types.String; params: Array; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export const Ethereum_Module = { callContractView: async ( input: Ethereum_Module_Input_callContractView, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractView", input }); @@ -353,9 +353,9 @@ export const Ethereum_Module = { callContractStatic: async ( input: Ethereum_Module_Input_callContractStatic, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractStatic", input }); @@ -364,9 +364,9 @@ export const Ethereum_Module = { getBalance: async ( input: Ethereum_Module_Input_getBalance, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getBalance", input }); @@ -375,9 +375,9 @@ export const Ethereum_Module = { encodeParams: async ( input: Ethereum_Module_Input_encodeParams, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "encodeParams", input }); @@ -386,9 +386,9 @@ export const Ethereum_Module = { encodeFunction: async ( input: Ethereum_Module_Input_encodeFunction, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "encodeFunction", input }); @@ -397,9 +397,9 @@ export const Ethereum_Module = { solidityPack: async ( input: Ethereum_Module_Input_solidityPack, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "solidityPack", input }); @@ -408,9 +408,9 @@ export const Ethereum_Module = { solidityKeccak256: async ( input: Ethereum_Module_Input_solidityKeccak256, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "solidityKeccak256", input }); @@ -419,9 +419,9 @@ export const Ethereum_Module = { soliditySha256: async ( input: Ethereum_Module_Input_soliditySha256, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "soliditySha256", input }); @@ -430,9 +430,9 @@ export const Ethereum_Module = { getSignerAddress: async ( input: Ethereum_Module_Input_getSignerAddress, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerAddress", input }); @@ -441,9 +441,9 @@ export const Ethereum_Module = { getSignerBalance: async ( input: Ethereum_Module_Input_getSignerBalance, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerBalance", input }); @@ -452,9 +452,9 @@ export const Ethereum_Module = { getSignerTransactionCount: async ( input: Ethereum_Module_Input_getSignerTransactionCount, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerTransactionCount", input }); @@ -463,9 +463,9 @@ export const Ethereum_Module = { getGasPrice: async ( input: Ethereum_Module_Input_getGasPrice, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getGasPrice", input }); @@ -474,9 +474,9 @@ export const Ethereum_Module = { estimateTransactionGas: async ( input: Ethereum_Module_Input_estimateTransactionGas, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "estimateTransactionGas", input }); @@ -485,9 +485,9 @@ export const Ethereum_Module = { estimateContractCallGas: async ( input: Ethereum_Module_Input_estimateContractCallGas, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "estimateContractCallGas", input }); @@ -496,9 +496,9 @@ export const Ethereum_Module = { checkAddress: async ( input: Ethereum_Module_Input_checkAddress, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "checkAddress", input }); @@ -507,9 +507,9 @@ export const Ethereum_Module = { toWei: async ( input: Ethereum_Module_Input_toWei, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "toWei", input }); @@ -518,9 +518,9 @@ export const Ethereum_Module = { toEth: async ( input: Ethereum_Module_Input_toEth, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "toEth", input }); @@ -529,9 +529,9 @@ export const Ethereum_Module = { awaitTransaction: async ( input: Ethereum_Module_Input_awaitTransaction, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "awaitTransaction", input }); @@ -540,9 +540,9 @@ export const Ethereum_Module = { waitForEvent: async ( input: Ethereum_Module_Input_waitForEvent, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "waitForEvent", input }); @@ -551,9 +551,9 @@ export const Ethereum_Module = { getNetwork: async ( input: Ethereum_Module_Input_getNetwork, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getNetwork", input }); @@ -562,9 +562,9 @@ export const Ethereum_Module = { callContractMethod: async ( input: Ethereum_Module_Input_callContractMethod, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractMethod", input }); @@ -573,9 +573,9 @@ export const Ethereum_Module = { callContractMethodAndWait: async ( input: Ethereum_Module_Input_callContractMethodAndWait, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractMethodAndWait", input }); @@ -584,9 +584,9 @@ export const Ethereum_Module = { sendTransaction: async ( input: Ethereum_Module_Input_sendTransaction, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "sendTransaction", input }); @@ -595,9 +595,9 @@ export const Ethereum_Module = { sendTransactionAndWait: async ( input: Ethereum_Module_Input_sendTransactionAndWait, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "sendTransactionAndWait", input }); @@ -606,9 +606,9 @@ export const Ethereum_Module = { deployContract: async ( input: Ethereum_Module_Input_deployContract, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "deployContract", input }); @@ -617,9 +617,9 @@ export const Ethereum_Module = { signMessage: async ( input: Ethereum_Module_Input_signMessage, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "signMessage", input }); @@ -628,9 +628,9 @@ export const Ethereum_Module = { sendRPC: async ( input: Ethereum_Module_Input_sendRPC, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "sendRPC", input }); diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/web3api.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/polywrap.plugin.yaml similarity index 100% rename from packages/test-cases/cases/cli/plugin/codegen/001-sanity/web3api.plugin.yaml rename to packages/test-cases/cases/cli/plugin/codegen/001-sanity/polywrap.plugin.yaml diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/schema.graphql index a7e6d02960..acad0ae76c 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/schema.graphql +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/schema.graphql @@ -1,4 +1,4 @@ -#import { Module } into Ethereum from "ens/ethereum.web3api.eth" +#import { Module } into Ethereum from "ens/ethereum.polywrap.eth" type Module { methodOne( diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/src/index.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/src/index.ts index b0b0a36b96..5bb85ff3e4 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/src/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/src/index.ts @@ -1 +1 @@ -export * from "./polywrap"; +export * from "./wrap"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/web3api.plugin.json b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/polywrap.plugin.json similarity index 100% rename from packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/web3api.plugin.json rename to packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/polywrap.plugin.json diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/schema.graphql index 120044ea15..b4f0d1a6ff 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/schema.graphql +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ @@ -69,7 +69,7 @@ type Object { ### Imported Modules START ### type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Module" ) { @@ -231,7 +231,7 @@ type Ethereum_Module @imported( ### Imported Objects START ### type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Connection" ) { @@ -240,7 +240,7 @@ type Ethereum_Connection @imported( } type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { @@ -250,7 +250,7 @@ type Ethereum_TxOverrides @imported( } type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { @@ -259,7 +259,7 @@ type Ethereum_StaticTxResult @imported( } type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { @@ -275,7 +275,7 @@ type Ethereum_TxRequest @imported( } type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { @@ -299,7 +299,7 @@ type Ethereum_TxReceipt @imported( } type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Log" ) { @@ -315,7 +315,7 @@ type Ethereum_Log @imported( } type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { @@ -325,7 +325,7 @@ type Ethereum_EventNotification @imported( } type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Network" ) { @@ -335,7 +335,7 @@ type Ethereum_Network @imported( } type Ethereum_TxResponse @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxResponse" ) { @@ -361,7 +361,7 @@ type Ethereum_TxResponse @imported( } type Ethereum_Access @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Access" ) { diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/index.ts deleted file mode 100644 index ff371c0cd8..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@web3api/core-js"; diff --git a/packages/js/plugins/ipfs/src/polywrap-man/index.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/index.ts similarity index 100% rename from packages/js/plugins/ipfs/src/polywrap-man/index.ts rename to packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/index.ts diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/manifest.ts similarity index 81% rename from packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/manifest.ts rename to packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/manifest.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/module.ts similarity index 94% rename from packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/module.ts rename to packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/module.ts index 37566574a4..ab3e9cb648 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_method extends Record { str: Types.String; diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/schema.ts similarity index 92% rename from packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/schema.ts rename to packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/schema.ts index 15964c9474..ce65ca2dda 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/polywrap/schema.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema: string = `### Web3API Header START ### +export const schema: string = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ @@ -72,7 +72,7 @@ type Object { ### Imported Modules START ### type Ethereum_Module @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Module" ) { @@ -234,7 +234,7 @@ type Ethereum_Module @imported( ### Imported Objects START ### type Ethereum_Connection @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Connection" ) { @@ -243,7 +243,7 @@ type Ethereum_Connection @imported( } type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { @@ -253,7 +253,7 @@ type Ethereum_TxOverrides @imported( } type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { @@ -262,7 +262,7 @@ type Ethereum_StaticTxResult @imported( } type Ethereum_TxRequest @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { @@ -278,7 +278,7 @@ type Ethereum_TxRequest @imported( } type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { @@ -302,7 +302,7 @@ type Ethereum_TxReceipt @imported( } type Ethereum_Log @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Log" ) { @@ -318,7 +318,7 @@ type Ethereum_Log @imported( } type Ethereum_EventNotification @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { @@ -328,7 +328,7 @@ type Ethereum_EventNotification @imported( } type Ethereum_Network @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Network" ) { @@ -338,7 +338,7 @@ type Ethereum_Network @imported( } type Ethereum_TxResponse @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "TxResponse" ) { @@ -364,7 +364,7 @@ type Ethereum_TxResponse @imported( } type Ethereum_Access @imported( - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", namespace: "Ethereum", nativeType: "Access" ) { diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/types.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/types.ts similarity index 77% rename from packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/types.ts rename to packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/types.ts index b89d8ec8f6..40d910d1b7 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/src/polywrap/types.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/src/wrap/types.ts @@ -7,8 +7,8 @@ import * as Types from "./"; // @ts-ignore import { Client, - InvokeApiResult -} from "@web3api/core-js"; + InvokeResult +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; @@ -45,26 +45,26 @@ export interface Object { /// Imported Objects START /// -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Connection { node?: Types.String | null; networkNameOrChainId?: Types.String | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxOverrides { gasLimit?: Types.BigInt | null; gasPrice?: Types.BigInt | null; value?: Types.BigInt | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_StaticTxResult { result: Types.String; error: Types.Boolean; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxRequest { to?: Types.String | null; from?: Types.String | null; @@ -77,7 +77,7 @@ export interface Ethereum_TxRequest { type?: Types.UInt32 | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxReceipt { to: Types.String; from: Types.String; @@ -98,7 +98,7 @@ export interface Ethereum_TxReceipt { status?: Types.UInt32 | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Log { blockNumber: Types.BigInt; blockHash: Types.String; @@ -111,21 +111,21 @@ export interface Ethereum_Log { logIndex: Types.UInt32; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_EventNotification { data: Types.String; address: Types.String; log: Types.Ethereum_Log; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Network { name: Types.String; chainId: Types.BigInt; ensAddress?: Types.String | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_TxResponse { hash: Types.String; to?: Types.String | null; @@ -148,7 +148,7 @@ export interface Ethereum_TxResponse { accessList?: Array | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export interface Ethereum_Access { address: Types.String; storageKeys: Array; @@ -158,7 +158,7 @@ export interface Ethereum_Access { /// Imported Modules START /// -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_callContractView extends Record { address: Types.String; method: Types.String; @@ -166,7 +166,7 @@ interface Ethereum_Module_Input_callContractView extends Record connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_callContractStatic extends Record { address: Types.String; method: Types.String; @@ -175,72 +175,72 @@ interface Ethereum_Module_Input_callContractStatic extends Record { address: Types.String; blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_encodeParams extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_encodeFunction extends Record { method: Types.String; args?: Array | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_solidityPack extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_solidityKeccak256 extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_soliditySha256 extends Record { types: Array; values: Array; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerAddress extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerBalance extends Record { blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getSignerTransactionCount extends Record { blockTag?: Types.BigInt | null; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getGasPrice extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_estimateTransactionGas extends Record { tx: Types.Ethereum_TxRequest; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_estimateContractCallGas extends Record { address: Types.String; method: Types.String; @@ -249,22 +249,22 @@ interface Ethereum_Module_Input_estimateContractCallGas extends Record { address: Types.String; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_toWei extends Record { eth: Types.String; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_toEth extends Record { wei: Types.BigInt; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_awaitTransaction extends Record { txHash: Types.String; confirmations: Types.UInt32; @@ -272,7 +272,7 @@ interface Ethereum_Module_Input_awaitTransaction extends Record connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_waitForEvent extends Record { address: Types.String; event: Types.String; @@ -281,12 +281,12 @@ interface Ethereum_Module_Input_waitForEvent extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_getNetwork extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_callContractMethod extends Record { address: Types.String; method: Types.String; @@ -295,7 +295,7 @@ interface Ethereum_Module_Input_callContractMethod extends Record { address: Types.String; method: Types.String; @@ -304,19 +304,19 @@ interface Ethereum_Module_Input_callContractMethodAndWait extends Record { tx: Types.Ethereum_TxRequest; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_sendTransactionAndWait extends Record { tx: Types.Ethereum_TxRequest; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_deployContract extends Record { abi: Types.String; bytecode: Types.String; @@ -324,27 +324,27 @@ interface Ethereum_Module_Input_deployContract extends Record { connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_signMessage extends Record { message: Types.String; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ interface Ethereum_Module_Input_sendRPC extends Record { method: Types.String; params: Array; connection?: Types.Ethereum_Connection | null; } -/* URI: "ens/ethereum.web3api.eth" */ +/* URI: "ens/ethereum.polywrap.eth" */ export const Ethereum_Module = { callContractView: async ( input: Ethereum_Module_Input_callContractView, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractView", input }); @@ -353,9 +353,9 @@ export const Ethereum_Module = { callContractStatic: async ( input: Ethereum_Module_Input_callContractStatic, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractStatic", input }); @@ -364,9 +364,9 @@ export const Ethereum_Module = { getBalance: async ( input: Ethereum_Module_Input_getBalance, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getBalance", input }); @@ -375,9 +375,9 @@ export const Ethereum_Module = { encodeParams: async ( input: Ethereum_Module_Input_encodeParams, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "encodeParams", input }); @@ -386,9 +386,9 @@ export const Ethereum_Module = { encodeFunction: async ( input: Ethereum_Module_Input_encodeFunction, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "encodeFunction", input }); @@ -397,9 +397,9 @@ export const Ethereum_Module = { solidityPack: async ( input: Ethereum_Module_Input_solidityPack, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "solidityPack", input }); @@ -408,9 +408,9 @@ export const Ethereum_Module = { solidityKeccak256: async ( input: Ethereum_Module_Input_solidityKeccak256, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "solidityKeccak256", input }); @@ -419,9 +419,9 @@ export const Ethereum_Module = { soliditySha256: async ( input: Ethereum_Module_Input_soliditySha256, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "soliditySha256", input }); @@ -430,9 +430,9 @@ export const Ethereum_Module = { getSignerAddress: async ( input: Ethereum_Module_Input_getSignerAddress, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerAddress", input }); @@ -441,9 +441,9 @@ export const Ethereum_Module = { getSignerBalance: async ( input: Ethereum_Module_Input_getSignerBalance, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerBalance", input }); @@ -452,9 +452,9 @@ export const Ethereum_Module = { getSignerTransactionCount: async ( input: Ethereum_Module_Input_getSignerTransactionCount, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getSignerTransactionCount", input }); @@ -463,9 +463,9 @@ export const Ethereum_Module = { getGasPrice: async ( input: Ethereum_Module_Input_getGasPrice, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getGasPrice", input }); @@ -474,9 +474,9 @@ export const Ethereum_Module = { estimateTransactionGas: async ( input: Ethereum_Module_Input_estimateTransactionGas, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "estimateTransactionGas", input }); @@ -485,9 +485,9 @@ export const Ethereum_Module = { estimateContractCallGas: async ( input: Ethereum_Module_Input_estimateContractCallGas, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "estimateContractCallGas", input }); @@ -496,9 +496,9 @@ export const Ethereum_Module = { checkAddress: async ( input: Ethereum_Module_Input_checkAddress, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "checkAddress", input }); @@ -507,9 +507,9 @@ export const Ethereum_Module = { toWei: async ( input: Ethereum_Module_Input_toWei, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "toWei", input }); @@ -518,9 +518,9 @@ export const Ethereum_Module = { toEth: async ( input: Ethereum_Module_Input_toEth, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "toEth", input }); @@ -529,9 +529,9 @@ export const Ethereum_Module = { awaitTransaction: async ( input: Ethereum_Module_Input_awaitTransaction, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "awaitTransaction", input }); @@ -540,9 +540,9 @@ export const Ethereum_Module = { waitForEvent: async ( input: Ethereum_Module_Input_waitForEvent, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "waitForEvent", input }); @@ -551,9 +551,9 @@ export const Ethereum_Module = { getNetwork: async ( input: Ethereum_Module_Input_getNetwork, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "getNetwork", input }); @@ -562,9 +562,9 @@ export const Ethereum_Module = { callContractMethod: async ( input: Ethereum_Module_Input_callContractMethod, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractMethod", input }); @@ -573,9 +573,9 @@ export const Ethereum_Module = { callContractMethodAndWait: async ( input: Ethereum_Module_Input_callContractMethodAndWait, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "callContractMethodAndWait", input }); @@ -584,9 +584,9 @@ export const Ethereum_Module = { sendTransaction: async ( input: Ethereum_Module_Input_sendTransaction, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "sendTransaction", input }); @@ -595,9 +595,9 @@ export const Ethereum_Module = { sendTransactionAndWait: async ( input: Ethereum_Module_Input_sendTransactionAndWait, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "sendTransactionAndWait", input }); @@ -606,9 +606,9 @@ export const Ethereum_Module = { deployContract: async ( input: Ethereum_Module_Input_deployContract, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "deployContract", input }); @@ -617,9 +617,9 @@ export const Ethereum_Module = { signMessage: async ( input: Ethereum_Module_Input_signMessage, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "signMessage", input }); @@ -628,9 +628,9 @@ export const Ethereum_Module = { sendRPC: async ( input: Ethereum_Module_Input_sendRPC, client: Client - ): Promise> => { + ): Promise> => { return client.invoke({ - uri: "ens/ethereum.web3api.eth", + uri: "ens/ethereum.polywrap.eth", method: "sendRPC", input }); diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/web3api.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/polywrap.plugin.yaml similarity index 100% rename from packages/test-cases/cases/cli/plugin/codegen/002-single-module/web3api.plugin.yaml rename to packages/test-cases/cases/cli/plugin/codegen/002-single-module/polywrap.plugin.yaml diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/schema.graphql index 3df6ccc1cb..e6a76ae4db 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/schema.graphql +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/schema.graphql @@ -1,4 +1,4 @@ -#import { Module } into Ethereum from "ens/ethereum.web3api.eth" +#import { Module } into Ethereum from "ens/ethereum.polywrap.eth" type Module { method( diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/src/index.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/src/index.ts index b0b0a36b96..5bb85ff3e4 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/src/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/src/index.ts @@ -1 +1 @@ -export * from "./polywrap"; +export * from "./wrap"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/web3api.plugin.json b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/polywrap.plugin.json similarity index 100% rename from packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/web3api.plugin.json rename to packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/polywrap.plugin.json diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/schema.graphql index c9629d6aae..2f0728fa37 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/schema.graphql +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method( diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/index.ts deleted file mode 100644 index ff371c0cd8..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@web3api/core-js"; diff --git a/packages/js/plugins/ipfs/src/w3-man/index.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/index.ts similarity index 100% rename from packages/js/plugins/ipfs/src/w3-man/index.ts rename to packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/index.ts diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/manifest.ts similarity index 81% rename from packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/manifest.ts rename to packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/manifest.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/module.ts similarity index 94% rename from packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/module.ts rename to packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/module.ts index 8e94aa6eee..c368ee205f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_method extends Record { str: Types.String; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/schema.ts similarity index 90% rename from packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/schema.ts rename to packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/schema.ts index 1f08effce4..f3642e29f2 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/schema.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema: string = `### Web3API Header START ### +export const schema: string = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method( diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/types.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/types.ts similarity index 95% rename from packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/types.ts rename to packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/types.ts index 89f6b7730a..450bfe2967 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/polywrap/types.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/src/wrap/types.ts @@ -7,8 +7,8 @@ import * as Types from "./"; // @ts-ignore import { Client, - InvokeApiResult -} from "@web3api/core-js"; + InvokeResult +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/web3api.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/003-env/polywrap.plugin.yaml similarity index 100% rename from packages/test-cases/cases/cli/plugin/codegen/003-env/web3api.plugin.yaml rename to packages/test-cases/cases/cli/plugin/codegen/003-env/polywrap.plugin.yaml diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/src/index.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/src/index.ts index b0b0a36b96..5bb85ff3e4 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/src/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/src/index.ts @@ -1 +1 @@ -export * from "./polywrap"; +export * from "./wrap"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/web3api.plugin.json b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/polywrap.plugin.json similarity index 100% rename from packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/web3api.plugin.json rename to packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/polywrap.plugin.json diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/schema.graphql index 97fc785fe4..813f1be791 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/schema.graphql +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { sanitizeEnv( diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /index.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /index.ts deleted file mode 100644 index ff371c0cd8..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export * from "./schema"; -export * from "./manifest"; -export * from "./module"; -export * from "./types"; - -export { Client } from "@web3api/core-js"; diff --git a/packages/js/plugins/logger/src/polywrap-man/index.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/index.ts similarity index 100% rename from packages/js/plugins/logger/src/polywrap-man/index.ts rename to packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/index.ts diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/manifest.ts similarity index 81% rename from packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /manifest.ts rename to packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/manifest.ts index 4d35c2182f..730cf8326f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /manifest.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/manifest.ts @@ -6,7 +6,7 @@ import { schema } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@web3api/core-js"; +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { schema, diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /module.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/module.ts similarity index 96% rename from packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /module.ts rename to packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/module.ts index 189128d590..64ecf076bc 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/module.ts @@ -7,7 +7,7 @@ import { Client, PluginModule, MaybeAsync -} from "@web3api/core-js"; +} from "@polywrap/core-js"; export interface Input_sanitizeEnv extends Record { env: Types.ClientEnv; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /schema.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/schema.ts similarity index 90% rename from packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /schema.ts rename to packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/schema.ts index 061f45c087..6aed7ed063 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /schema.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/schema.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const schema: string = `### Web3API Header START ### +export const schema: string = `### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -36,7 +36,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { sanitizeEnv( diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /types.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/types.ts similarity index 95% rename from packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /types.ts rename to packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/types.ts index 0f39eb4c01..813097c637 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/polywrap /types.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/src/wrap/types.ts @@ -7,8 +7,8 @@ import * as Types from "./"; // @ts-ignore import { Client, - InvokeApiResult -} from "@web3api/core-js"; + InvokeResult +} from "@polywrap/core-js"; export type UInt = number; export type UInt8 = number; diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/web3api.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/polywrap.plugin.yaml similarity index 100% rename from packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/web3api.plugin.yaml rename to packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/polywrap.plugin.yaml diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/src/index.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/src/index.ts index b0b0a36b96..5bb85ff3e4 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/src/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/src/index.ts @@ -1 +1 @@ -export * from "./polywrap"; +export * from "./wrap"; diff --git a/packages/test-cases/cases/cli/api/build-cmd/.gitignore b/packages/test-cases/cases/cli/wasm/build-cmd/.gitignore similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/.gitignore rename to packages/test-cases/cases/cli/wasm/build-cmd/.gitignore diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/expected/output.json similarity index 59% rename from packages/test-cases/cases/cli/api/build-cmd/001-sanity/expected/output.json rename to packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/expected/output.json index 9b1784b4d9..2f5da39ad0 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/expected/output.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/expected/output.json @@ -1,8 +1,8 @@ { "stdout": [ "Artifacts written to ./build from the image `polywrap-build-env-", - "Manifest written to ./build/web3api.json", - "build/web3api.json" + "Manifest written to ./build/polywrap.json", + "build/polywrap.json" ], "exitCode": 0 } diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/001-sanity/package.json rename to packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml index 702c288318..370224c8aa 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: test-project -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript module: ./src/index.ts schema: ./src/schema.graphql diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/index.ts b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/src/index.ts similarity index 64% rename from packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/index.ts rename to packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/src/index.ts index 0a0cc28044..c044ed3188 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./polywrap"; +import { Input_method } from "./wrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/schema.graphql b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/schema.graphql rename to packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/src/schema.graphql diff --git a/packages/test-cases/cases/cli/api/build-cmd/002-invalid-manifest-1/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/expected/output.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/002-invalid-manifest-1/expected/output.json rename to packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/expected/output.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/002-invalid-manifest-1/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/002-invalid-manifest-1/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/003-invalid-manifest-2/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/expected/output.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/003-invalid-manifest-2/expected/output.json rename to packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/expected/output.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/003-invalid-manifest-2/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/003-invalid-manifest-2/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/expected/output.json similarity index 59% rename from packages/test-cases/cases/cli/api/build-cmd/004-default-build/expected/output.json rename to packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/expected/output.json index 9b1784b4d9..2f5da39ad0 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/expected/output.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/expected/output.json @@ -1,8 +1,8 @@ { "stdout": [ "Artifacts written to ./build from the image `polywrap-build-env-", - "Manifest written to ./build/web3api.json", - "build/web3api.json" + "Manifest written to ./build/polywrap.json", + "build/polywrap.json" ], "exitCode": 0 } diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/004-default-build/package.json rename to packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/package.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml index 9052f7655a..9ee4210456 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: test-project language: wasm/assemblyscript -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/index.ts b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/src/index.ts similarity index 64% rename from packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/index.ts rename to packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/src/index.ts index 0a0cc28044..c044ed3188 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./polywrap"; +import { Input_method } from "./wrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/schema.graphql b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/schema.graphql rename to packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/src/schema.graphql diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/expected/output.json similarity index 59% rename from packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/expected/output.json rename to packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/expected/output.json index 9b1784b4d9..2f5da39ad0 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/expected/output.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/expected/output.json @@ -1,8 +1,8 @@ { "stdout": [ "Artifacts written to ./build from the image `polywrap-build-env-", - "Manifest written to ./build/web3api.json", - "build/web3api.json" + "Manifest written to ./build/polywrap.json", + "build/polywrap.json" ], "exitCode": 0 } diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/package.json rename to packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/package.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml index 9f71d5f5c2..a847a9c734 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: default-dockerfile language: wasm/assemblyscript -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/index.ts b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/src/index.ts similarity index 64% rename from packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/index.ts rename to packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/src/index.ts index 0a0cc28044..c044ed3188 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./polywrap"; +import { Input_method } from "./wrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/schema.graphql b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/005-default-dockerfile/src/schema.graphql rename to packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/src/schema.graphql diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/Dockerfile similarity index 69% rename from packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile rename to packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/Dockerfile index f7447179d3..c8df8fd245 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/Dockerfile +++ b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/Dockerfile @@ -9,29 +9,29 @@ RUN apk --no-cache --virtual build-dependencies add \ WORKDIR /linked-packages -COPY .polywrap/web3api/build/linked-packages/@polywrap/wasm-as ./@polywrap/wasm-as +COPY .polywrap/wasm/build/linked-packages/@polywrap/wasm-as ./@polywrap/wasm-as WORKDIR /project # Install deps in its own step, making rebuilds faster -# when just the Web3API schema & implementation files change +# when just the Polywrap schema & implementation files change COPY package.json . RUN npx json -I -f package.json -e "this.dependencies['@polywrap/wasm-as']='../linked-packages/@polywrap/wasm-as'" RUN yarn # Copy all manifest files -COPY web3api.yaml . -COPY web3api.build.yaml . +COPY polywrap.yaml . +COPY polywrap.build.yaml . # Copy all source files COPY ./src ./src COPY ./package.json ./package.json # Build the module at src -RUN ./node_modules/.bin/asc src/polywrap/entry.ts \ +RUN ./node_modules/.bin/asc src/wrap/entry.ts \ --path ./node_modules \ --outFile ./build/module.wasm \ - --use abort=src/polywrap/entry/wrapAbort \ + --use abort=src/wrap/entry/wrapAbort \ --optimize --debug --importMemory \ --runtime stub \ --runPasses asyncify diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/expected/output.json similarity index 59% rename from packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/expected/output.json rename to packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/expected/output.json index 9b1784b4d9..2f5da39ad0 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/expected/output.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/expected/output.json @@ -1,8 +1,8 @@ { "stdout": [ "Artifacts written to ./build from the image `polywrap-build-env-", - "Manifest written to ./build/web3api.json", - "build/web3api.json" + "Manifest written to ./build/polywrap.json", + "build/polywrap.json" ], "exitCode": 0 } diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/package.json rename to packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/package.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml index 189ace08ef..0e2d2f1f4d 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: custom-dockerfile language: wasm/assemblyscript -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/index.ts b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/src/index.ts similarity index 64% rename from packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/index.ts rename to packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/src/index.ts index 0a0cc28044..c044ed3188 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/004-default-build/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/src/index.ts @@ -1,4 +1,4 @@ -import { Input_method } from "./polywrap"; +import { Input_method } from "./wrap"; export function method(input: Input_method): string { return input.arg; diff --git a/packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/schema.graphql b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/006-custom-dockerfile/src/schema.graphql rename to packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/src/schema.graphql diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/expected/output.json new file mode 100644 index 0000000000..2f5da39ad0 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/expected/output.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + "Artifacts written to ./build from the image `polywrap-build-env-", + "Manifest written to ./build/polywrap.json", + "build/polywrap.json" + ], + "exitCode": 0 +} diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/package.json rename to packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/package.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml index 8daaa5e227..54966e92c4 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: linked-packages language: wasm/assemblyscript -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/src/index.ts b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/src/index.ts new file mode 100644 index 0000000000..c044ed3188 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/src/index.ts @@ -0,0 +1,5 @@ +import { Input_method } from "./wrap"; + +export function method(input: Input_method): string { + return input.arg; +} diff --git a/packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/schema.graphql b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/007-linked-packages/src/schema.graphql rename to packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/src/schema.graphql diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/expected/output.json similarity index 69% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/expected/output.json rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/expected/output.json index 898b3f7156..31c089053b 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/expected/output.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/expected/output.json @@ -1,9 +1,9 @@ { "stdout": [ "Artifacts written to ./build from the image `polywrap-build-env-", - "Manifest written to ./build/web3api.json", - "build/web3api.json", - "build/web3api.meta.json", + "Manifest written to ./build/polywrap.json", + "build/polywrap.json", + "build/polywrap.meta.json", "build/meta/queries/test.graphql", "build/meta/queries/test.json", "build/meta/links/link.svg", diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/meta/icon.png b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/meta/icon.png similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/meta/icon.png rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/meta/icon.png diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/meta/link.svg b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/meta/link.svg similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/meta/link.svg rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/meta/link.svg diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/meta/test.graphql b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/meta/test.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/meta/test.graphql rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/meta/test.graphql diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/meta/test.json b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/meta/test.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/meta/test.json rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/meta/test.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/package.json rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.meta.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.meta.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.meta.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.meta.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml similarity index 69% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml index dfa5b0f19c..2901f01a20 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 name: test-project language: wasm/assemblyscript -meta: ./web3api.meta.yaml -build: ./web3api.build.yaml +meta: ./polywrap.meta.yaml +build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/src/index.ts b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/src/index.ts new file mode 100644 index 0000000000..c044ed3188 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/src/index.ts @@ -0,0 +1,5 @@ +import { Input_method } from "./wrap"; + +export function method(input: Input_method): string { + return input.arg; +} diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/schema.graphql b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/src/schema.graphql rename to packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/src/schema.graphql diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/expected/output.json b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/expected/output.json similarity index 53% rename from packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/expected/output.json rename to packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/expected/output.json index eb209aa6d5..9d8067dee4 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/expected/output.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/expected/output.json @@ -1,14 +1,14 @@ { "stdout": [ "Artifacts written to ./build from the image `polywrap-build-env-", - "Manifest written to ./build/web3api.json", - "build/web3api.json", + "Manifest written to ./build/polywrap.json", + "build/polywrap.json", "docker rmi polywrap-build-env-", "docker buildx rm polywrap-build-env-" ], "exitCode": 0, "files": [ - ".polywrap/web3api/build/image/cache/index.json", - ".polywrap/web3api/build/image/cache/blobs/sha256/" + ".polywrap/wasm/build/image/cache/index.json", + ".polywrap/wasm/build/image/cache/blobs/sha256/" ] } diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/package.json rename to packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/package.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.yaml rename to packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml index 2929baa4e0..e134d70004 100644 --- a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: test-project -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./src/schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/src/index.ts b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/src/index.ts new file mode 100644 index 0000000000..c044ed3188 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/src/index.ts @@ -0,0 +1,5 @@ +import { Input_method } from "./wrap"; + +export function method(input: Input_method): string { + return input.arg; +} diff --git a/packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/schema.graphql b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/009-docker-buildx/src/schema.graphql rename to packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/src/schema.graphql diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/expected/output.json b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/expected/output.json similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/001-sanity/expected/output.json rename to packages/test-cases/cases/cli/wasm/codegen/001-sanity/expected/output.json diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/package.json b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/001-sanity/package.json rename to packages/test-cases/cases/cli/wasm/codegen/001-sanity/package.json diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/web3api-norun.gen.js b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap-norun.gen.js similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/001-sanity/web3api-norun.gen.js rename to packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap-norun.gen.js diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/schema.graphql b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/001-sanity/schema.graphql rename to packages/test-cases/cases/cli/wasm/codegen/001-sanity/schema.graphql diff --git a/packages/test-cases/cases/cli/wasm/codegen/001-sanity/src/index.ts b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/src/index.ts new file mode 100644 index 0000000000..c044ed3188 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/src/index.ts @@ -0,0 +1,5 @@ +import { Input_method } from "./wrap"; + +export function method(input: Input_method): string { + return input.arg; +} diff --git a/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/cmd.json b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/cmd.json new file mode 100644 index 0000000000..00836ca2c7 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/cmd.json @@ -0,0 +1,3 @@ +{ + "args": ["--script", "polywrap-norun.gen.js"] +} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/expected/output.json b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/expected/output.json similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/expected/output.json rename to packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/expected/output.json diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/package.json rename to packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/package.json diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api-norun.gen.js b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap-norun.gen.js similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api-norun.gen.js rename to packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap-norun.gen.js diff --git a/packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/001-sanity/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/schema.graphql b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/schema.graphql rename to packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/schema.graphql diff --git a/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/src/index.ts b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/src/index.ts new file mode 100644 index 0000000000..c044ed3188 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/src/index.ts @@ -0,0 +1,5 @@ +import { Input_method } from "./wrap"; + +export function method(input: Input_method): string { + return input.arg; +} diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/templates/schema.mustache b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/templates/schema.mustache similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/templates/schema.mustache rename to packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/templates/schema.mustache diff --git a/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/cmd.json b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/cmd.json new file mode 100644 index 0000000000..64290f576f --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/cmd.json @@ -0,0 +1,3 @@ +{ + "args": ["--script", "polywrap.gen.ts"] +} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/expected/output.json b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/expected/output.json similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/003-codegen-script/expected/output.json rename to packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/expected/output.json diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/003-codegen-script/package.json rename to packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/package.json diff --git a/packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/build-cmd/008-metadata/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.gen.ts b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.gen.ts similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.gen.ts rename to packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.gen.ts diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/schema.graphql b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/003-codegen-script/schema.graphql rename to packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/schema.graphql diff --git a/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/src/index.ts b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/src/index.ts new file mode 100644 index 0000000000..c044ed3188 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/src/index.ts @@ -0,0 +1,5 @@ +import { Input_method } from "./wrap"; + +export function method(input: Input_method): string { + return input.arg; +} diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/templates/schema.mustache b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/templates/schema.mustache similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/003-codegen-script/templates/schema.mustache rename to packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/templates/schema.mustache diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/package.json b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/001-sanity/package.json rename to packages/test-cases/cases/cli/wasm/deploy/001-sanity/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/enum-types/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/enum-types/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.deploy.yaml b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.deploy.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.deploy.yaml rename to packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.yaml b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.yaml similarity index 67% rename from packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.yaml rename to packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.yaml index 2731f1fd45..5aa85aff92 100644 --- a/packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 name: deploy-sanity -build: ./web3api.build.yaml -deploy: ./web3api.deploy.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/schema.graphql b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/001-sanity/schema.graphql rename to packages/test-cases/cases/cli/wasm/deploy/001-sanity/schema.graphql diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/src/index.ts b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/src/index.ts similarity index 62% rename from packages/test-cases/cases/cli/api/deploy/001-sanity/src/index.ts rename to packages/test-cases/cases/cli/wasm/deploy/001-sanity/src/index.ts index c51c40ae58..1b02cda239 100644 --- a/packages/test-cases/cases/cli/api/deploy/001-sanity/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./polywrap"; +import { Input_get } from "./wrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/002-no-ext/package.json rename to packages/test-cases/cases/cli/wasm/deploy/002-no-ext/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.deploy.yaml b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.deploy.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.deploy.yaml rename to packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.yaml b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.yaml similarity index 67% rename from packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.yaml rename to packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.yaml index 3e1c6abf58..2becf240bf 100644 --- a/packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 name: deploy-no-ext -build: ./web3api.build.yaml -deploy: ./web3api.deploy.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/schema.graphql b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/002-no-ext/schema.graphql rename to packages/test-cases/cases/cli/wasm/deploy/002-no-ext/schema.graphql diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/src/index.ts b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/src/index.ts similarity index 62% rename from packages/test-cases/cases/cli/api/deploy/002-no-ext/src/index.ts rename to packages/test-cases/cases/cli/wasm/deploy/002-no-ext/src/index.ts index c51c40ae58..1b02cda239 100644 --- a/packages/test-cases/cases/cli/api/deploy/002-no-ext/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./polywrap"; +import { Input_get } from "./wrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/003-invalid-config/package.json rename to packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/json-type/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.deploy.yaml b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.deploy.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.deploy.yaml rename to packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.yaml b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.yaml similarity index 68% rename from packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.yaml rename to packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.yaml index f1cdb3cbdf..2ce86dd3b6 100644 --- a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 name: deploy-invalid-config -build: ./web3api.build.yaml -deploy: ./web3api.deploy.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/schema.graphql b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/003-invalid-config/schema.graphql rename to packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/schema.graphql diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/src/index.ts b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/src/index.ts similarity index 62% rename from packages/test-cases/cases/cli/api/deploy/003-invalid-config/src/index.ts rename to packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/src/index.ts index c51c40ae58..1b02cda239 100644 --- a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./polywrap"; +import { Input_get } from "./wrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/004-fail-between/package.json rename to packages/test-cases/cases/cli/wasm/deploy/004-fail-between/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/large-types/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/large-types/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.deploy.yaml b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.deploy.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.deploy.yaml rename to packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.yaml b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.yaml similarity index 68% rename from packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.yaml rename to packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.yaml index c612aeb34c..7a8b8ad91c 100644 --- a/packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 name: deploy-fail-between -build: ./web3api.build.yaml -deploy: ./web3api.deploy.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/schema.graphql b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/004-fail-between/schema.graphql rename to packages/test-cases/cases/cli/wasm/deploy/004-fail-between/schema.graphql diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/src/index.ts b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/src/index.ts similarity index 62% rename from packages/test-cases/cases/cli/api/deploy/004-fail-between/src/index.ts rename to packages/test-cases/cases/cli/wasm/deploy/004-fail-between/src/index.ts index c51c40ae58..1b02cda239 100644 --- a/packages/test-cases/cases/cli/api/deploy/004-fail-between/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/src/index.ts @@ -1,4 +1,4 @@ -import { Input_get } from "./polywrap"; +import { Input_get } from "./wrap"; export function get(input: Input_get): string { return "foo"; diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/package.json rename to packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/map-type/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/map-type/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.deploy.yaml b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.deploy.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.deploy.yaml rename to packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.yaml b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.yaml similarity index 67% rename from packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.yaml rename to packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.yaml index 2731f1fd45..5aa85aff92 100644 --- a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 name: deploy-sanity -build: ./web3api.build.yaml -deploy: ./web3api.deploy.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/schema.graphql b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/schema.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/schema.graphql rename to packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/schema.graphql diff --git a/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/src/index.ts b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/src/index.ts new file mode 100644 index 0000000000..1b02cda239 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/src/index.ts @@ -0,0 +1,5 @@ +import { Input_get } from "./wrap"; + +export function get(input: Input_get): string { + return "foo"; +} diff --git a/packages/test-cases/cases/cli/api/query/.gitignore b/packages/test-cases/cases/cli/wasm/query/.gitignore similarity index 100% rename from packages/test-cases/cases/cli/api/query/.gitignore rename to packages/test-cases/cases/cli/wasm/query/.gitignore diff --git a/packages/test-cases/cases/cli/api/query/client-async-config.js b/packages/test-cases/cases/cli/wasm/query/client-async-config.js similarity index 100% rename from packages/test-cases/cases/cli/api/query/client-async-config.js rename to packages/test-cases/cases/cli/wasm/query/client-async-config.js diff --git a/packages/test-cases/cases/cli/api/query/client-async-config.ts b/packages/test-cases/cases/cli/wasm/query/client-async-config.ts similarity index 84% rename from packages/test-cases/cases/cli/api/query/client-async-config.ts rename to packages/test-cases/cases/cli/wasm/query/client-async-config.ts index e4105e496c..6399fb916f 100644 --- a/packages/test-cases/cases/cli/api/query/client-async-config.ts +++ b/packages/test-cases/cases/cli/wasm/query/client-async-config.ts @@ -1,4 +1,4 @@ -import { Web3ApiClientConfig } from "@polywrap/client-js"; +import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; interface Config extends Record { @@ -26,7 +26,7 @@ const mockPlugin = () => { }; }; -export async function getClientConfig(defaultConfigs: Partial): Promise> { +export async function getClientConfig(defaultConfigs: Partial): Promise> { if (defaultConfigs.plugins) { defaultConfigs.plugins.push({ uri: "wrap://ens/mock.eth", diff --git a/packages/test-cases/cases/cli/api/query/client-config.js b/packages/test-cases/cases/cli/wasm/query/client-config.js similarity index 100% rename from packages/test-cases/cases/cli/api/query/client-config.js rename to packages/test-cases/cases/cli/wasm/query/client-config.js diff --git a/packages/test-cases/cases/cli/api/query/client-config.ts b/packages/test-cases/cases/cli/wasm/query/client-config.ts similarity index 87% rename from packages/test-cases/cases/cli/api/query/client-config.ts rename to packages/test-cases/cases/cli/wasm/query/client-config.ts index 7e7a9594ed..c465ed930b 100644 --- a/packages/test-cases/cases/cli/api/query/client-config.ts +++ b/packages/test-cases/cases/cli/wasm/query/client-config.ts @@ -1,4 +1,4 @@ -import { Web3ApiClientConfig } from "@polywrap/client-js"; +import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; interface Config extends Record { @@ -27,7 +27,7 @@ const mockPlugin = () => { }; }; -export function getClientConfig(defaultConfigs: Partial) { +export function getClientConfig(defaultConfigs: Partial) { if (defaultConfigs.plugins) { defaultConfigs.plugins.push({ uri: "wrap://ens/mock.eth", diff --git a/packages/test-cases/cases/cli/api/query/deploy-contracts.js b/packages/test-cases/cases/cli/wasm/query/deploy-contracts.js similarity index 100% rename from packages/test-cases/cases/cli/api/query/deploy-contracts.js rename to packages/test-cases/cases/cli/wasm/query/deploy-contracts.js diff --git a/packages/test-cases/cases/cli/api/query/package.json b/packages/test-cases/cases/cli/wasm/query/package.json similarity index 100% rename from packages/test-cases/cases/cli/api/query/package.json rename to packages/test-cases/cases/cli/wasm/query/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/number-types/web3api.build.yaml b/packages/test-cases/cases/cli/wasm/query/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/number-types/web3api.build.yaml rename to packages/test-cases/cases/cli/wasm/query/polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.yaml b/packages/test-cases/cases/cli/wasm/query/polywrap.deploy.fail-between.yaml similarity index 62% rename from packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.yaml rename to packages/test-cases/cases/cli/wasm/query/polywrap.deploy.fail-between.yaml index 6246d3b0a1..0eda186b92 100644 --- a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/query/polywrap.deploy.fail-between.yaml @@ -1,6 +1,7 @@ format: 0.0.1-prealpha.9 name: test-project -build: ./web3api.build.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.fail-between.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/query/web3api-deploy-fail-between.yaml b/packages/test-cases/cases/cli/wasm/query/polywrap.deploy.invalid-config.yaml similarity index 61% rename from packages/test-cases/cases/cli/api/query/web3api-deploy-fail-between.yaml rename to packages/test-cases/cases/cli/wasm/query/polywrap.deploy.invalid-config.yaml index 12b8f436dd..3dd65db4cd 100644 --- a/packages/test-cases/cases/cli/api/query/web3api-deploy-fail-between.yaml +++ b/packages/test-cases/cases/cli/wasm/query/polywrap.deploy.invalid-config.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 name: test-project -build: ./web3api.build.yaml -deploy: ./web3api.deploy.fail-between.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.invalid-config.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.yaml b/packages/test-cases/cases/cli/wasm/query/polywrap.deploy.no-ext.yaml similarity index 64% rename from packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.yaml rename to packages/test-cases/cases/cli/wasm/query/polywrap.deploy.no-ext.yaml index 6246d3b0a1..bc7303e5a2 100644 --- a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/query/polywrap.deploy.no-ext.yaml @@ -1,6 +1,7 @@ format: 0.0.1-prealpha.9 name: test-project -build: ./web3api.build.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.no-ext.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/query/web3api.deploy.yaml b/packages/test-cases/cases/cli/wasm/query/polywrap.deploy.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/query/web3api.deploy.yaml rename to packages/test-cases/cases/cli/wasm/query/polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.yaml b/packages/test-cases/cases/cli/wasm/query/polywrap.yaml similarity index 67% rename from packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.yaml rename to packages/test-cases/cases/cli/wasm/query/polywrap.yaml index 6246d3b0a1..c7bef1b925 100644 --- a/packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.yaml +++ b/packages/test-cases/cases/cli/wasm/query/polywrap.yaml @@ -1,6 +1,7 @@ format: 0.0.1-prealpha.9 name: test-project -build: ./web3api.build.yaml +build: ./polywrap.build.yaml +deploy: ./polywrap.deploy.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/api/query/recipes/constants.json b/packages/test-cases/cases/cli/wasm/query/recipes/constants.json similarity index 100% rename from packages/test-cases/cases/cli/api/query/recipes/constants.json rename to packages/test-cases/cases/cli/wasm/query/recipes/constants.json diff --git a/packages/test-cases/cases/cli/api/query/recipes/constants.yaml b/packages/test-cases/cases/cli/wasm/query/recipes/constants.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/query/recipes/constants.yaml rename to packages/test-cases/cases/cli/wasm/query/recipes/constants.yaml diff --git a/packages/test-cases/cases/cli/api/query/recipes/e2e.json b/packages/test-cases/cases/cli/wasm/query/recipes/e2e.json similarity index 80% rename from packages/test-cases/cases/cli/api/query/recipes/e2e.json rename to packages/test-cases/cases/cli/wasm/query/recipes/e2e.json index 981e187429..8ec251c88a 100644 --- a/packages/test-cases/cases/cli/api/query/recipes/e2e.json +++ b/packages/test-cases/cases/cli/wasm/query/recipes/e2e.json @@ -1,6 +1,6 @@ [ { - "api": "ens/testnet/simplestorage.eth", + "wrapper": "ens/testnet/simplestorage.eth", "constants": "./constants.json" }, { diff --git a/packages/test-cases/cases/cli/api/query/recipes/e2e.yaml b/packages/test-cases/cases/cli/wasm/query/recipes/e2e.yaml similarity index 76% rename from packages/test-cases/cases/cli/api/query/recipes/e2e.yaml rename to packages/test-cases/cases/cli/wasm/query/recipes/e2e.yaml index 88a98312d3..a0d0a624b7 100644 --- a/packages/test-cases/cases/cli/api/query/recipes/e2e.yaml +++ b/packages/test-cases/cases/cli/wasm/query/recipes/e2e.yaml @@ -1,4 +1,4 @@ -- api: ens/testnet/simplestorage.eth +- wrapper: ens/testnet/simplestorage.eth constants: ./constants.json - query: ./set.graphql variables: diff --git a/packages/test-cases/cases/cli/api/query/recipes/get.graphql b/packages/test-cases/cases/cli/wasm/query/recipes/get.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/query/recipes/get.graphql rename to packages/test-cases/cases/cli/wasm/query/recipes/get.graphql diff --git a/packages/test-cases/cases/cli/api/query/recipes/set.graphql b/packages/test-cases/cases/cli/wasm/query/recipes/set.graphql similarity index 100% rename from packages/test-cases/cases/cli/api/query/recipes/set.graphql rename to packages/test-cases/cases/cli/wasm/query/recipes/set.graphql diff --git a/packages/test-cases/cases/cli/api/query/schema.graphql b/packages/test-cases/cases/cli/wasm/query/schema.graphql similarity index 95% rename from packages/test-cases/cases/cli/api/query/schema.graphql rename to packages/test-cases/cases/cli/wasm/query/schema.graphql index dbf08d084a..133130d425 100644 --- a/packages/test-cases/cases/cli/api/query/schema.graphql +++ b/packages/test-cases/cases/cli/wasm/query/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.polywrap.eth" type Module { getData( diff --git a/packages/test-cases/cases/cli/api/query/src/contracts/SimpleStorage.json b/packages/test-cases/cases/cli/wasm/query/src/contracts/SimpleStorage.json similarity index 100% rename from packages/test-cases/cases/cli/api/query/src/contracts/SimpleStorage.json rename to packages/test-cases/cases/cli/wasm/query/src/contracts/SimpleStorage.json diff --git a/packages/test-cases/cases/cli/api/query/src/contracts/SimpleStorage.sol b/packages/test-cases/cases/cli/wasm/query/src/contracts/SimpleStorage.sol similarity index 100% rename from packages/test-cases/cases/cli/api/query/src/contracts/SimpleStorage.sol rename to packages/test-cases/cases/cli/wasm/query/src/contracts/SimpleStorage.sol diff --git a/packages/test-cases/cases/cli/api/query/src/index.ts b/packages/test-cases/cases/cli/wasm/query/src/index.ts similarity index 96% rename from packages/test-cases/cases/cli/api/query/src/index.ts rename to packages/test-cases/cases/cli/wasm/query/src/index.ts index f2192e0aa2..3abf40fd1d 100644 --- a/packages/test-cases/cases/cli/api/query/src/index.ts +++ b/packages/test-cases/cases/cli/wasm/query/src/index.ts @@ -1,10 +1,10 @@ -import { Ethereum_Module } from "./polywrap/imported"; +import { Ethereum_Module } from "./wrap/imported"; import { Input_getData, Input_setData, Input_deployContract, SetDataResult -} from "./polywrap"; +} from "./wrap"; export function getData(input: Input_getData): u32 { const res = Ethereum_Module.callContractView({ diff --git a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql index 696d3c70c6..31b6e4763f 100644 --- a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql +++ b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method1( diff --git a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql index 3231ecfc00..5bf0927353 100644 --- a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql +++ b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method: TypeA diff --git a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql index bf48685e78..4cfe9fade7 100644 --- a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql +++ b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method: TypeA diff --git a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql index 1837bd588b..d1d9153d15 100644 --- a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql +++ b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method1( diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/schema.graphql index 2a4de61a0e..bbfe2a8d2e 100644 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/schema.graphql +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -23,7 +23,7 @@ directive @imports( types: [String!]! ) on OBJECT -### Web3API Header END ### +### Polywrap Header END ### type ExternalType { str: String diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql index f351daa5ab..26bebaced8 100644 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/schema.graphql index 2a4de61a0e..bbfe2a8d2e 100644 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/schema.graphql +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -23,7 +23,7 @@ directive @imports( types: [String!]! ) on OBJECT -### Web3API Header END ### +### Polywrap Header END ### type ExternalType { str: String diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql index 955c5a4412..926c498d88 100644 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/schema.graphql index 2856d020c7..4f03f35e3e 100644 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/schema.graphql +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -22,7 +22,7 @@ directive @imports( types: [String!]! ) on OBJECT -### Web3API Header END ### +### Polywrap Header END ### type ExternalType { str: String diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql index ec9261e61a..92dc08b3fd 100644 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ diff --git a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql index 8e148c31ec..6b71650c66 100644 --- a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql +++ b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method1: DerivedType1 diff --git a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql index 2044c2ceb7..a669c91ef7 100644 --- a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql +++ b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module diff --git a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql index 465c038afb..5dee26cb1c 100644 --- a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql +++ b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method: DerivedType diff --git a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql index ab50829d1d..f87dcdfaf8 100644 --- a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql +++ b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method1: DerivedType diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/schema.graphql index 166e60f185..3c9f9ed59b 100644 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/schema.graphql +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -23,6 +23,6 @@ directive @imports( types: [String!]! ) on OBJECT -### Web3API Header END ### +### Polywrap Header END ### type Module diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql index 022fa1eab2..c666e31037 100644 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module implements Namespace_Module @imports( types: [ diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql index a3134c8f56..2d3b67d8fe 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -23,7 +23,7 @@ directive @imports( types: [String!]! ) on OBJECT -### Web3API Header END ### +### Polywrap Header END ### type ImportedBaseType diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql index a3134c8f56..2d3b67d8fe 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -23,7 +23,7 @@ directive @imports( types: [String!]! ) on OBJECT -### Web3API Header END ### +### Polywrap Header END ### type ImportedBaseType diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql index 18dfca6f4a..68c42ad58d 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ diff --git a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql index c5773daf76..b510efd0b0 100644 --- a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql +++ b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { requiredMapArgs( diff --git a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql index 0df075c300..51ebb8438f 100644 --- a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql +++ b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method( diff --git a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql index 108aa08bda..b6fa343a68 100644 --- a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql +++ b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method( diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/schema.graphql index f232bd82e7..ac2e933ab5 100644 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/schema.graphql +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { getMap: Map! @annotate(type: "Map!") diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql index 38b9675fab..180ecb2498 100644 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module implements Namespace_Module @imports( types: [ diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql index 565fa014af..90765f940e 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -23,7 +23,7 @@ directive @imports( types: [String!]! ) on OBJECT -### Web3API Header END ### +### Polywrap Header END ### type ImportedBaseType { requiredMap: Map! @annotate(type: "Map!") diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql index 565fa014af..90765f940e 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -23,7 +23,7 @@ directive @imports( types: [String!]! ) on OBJECT -### Web3API Header END ### +### Polywrap Header END ### type ImportedBaseType { requiredMap: Map! @annotate(type: "Map!") diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql index 6525cb0579..55ed5bb40a 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module @imports( types: [ diff --git a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql index 180e1c7770..b28bb21c53 100644 --- a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql +++ b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method( diff --git a/packages/test-cases/cases/compose/006-env-types/01-client-env/output/module.graphql b/packages/test-cases/cases/compose/006-env-types/01-client-env/output/module.graphql index 8b444a60bb..6c11789c21 100644 --- a/packages/test-cases/cases/compose/006-env-types/01-client-env/output/module.graphql +++ b/packages/test-cases/cases/compose/006-env-types/01-client-env/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method( diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/schema.graphql b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/schema.graphql index 458e8c7b16..fe3b556f28 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/schema.graphql +++ b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### type Module { method( diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/schema.graphql b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/schema.graphql index 164bc34474..1b0cd7611e 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/schema.graphql +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### """ Module comment diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/schema.graphql b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/schema.graphql index 26d9423a3c..b16fc0dd89 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/schema.graphql +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/schema.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### enum CustomEnum { STRING diff --git a/packages/test-cases/cases/compose/sanity/output/module.graphql b/packages/test-cases/cases/compose/sanity/output/module.graphql index edcd5849f5..8aa73ed460 100644 --- a/packages/test-cases/cases/compose/sanity/output/module.graphql +++ b/packages/test-cases/cases/compose/sanity/output/module.graphql @@ -1,4 +1,4 @@ -### Web3API Header START ### +### Polywrap Header START ### scalar UInt scalar UInt8 scalar UInt16 @@ -33,7 +33,7 @@ directive @enabled_interface on OBJECT directive @annotate(type: String!) on FIELD -### Web3API Header END ### +### Polywrap Header END ### """ Module comment diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/package.json b/packages/test-cases/cases/wrappers/wasm-as/asyncify/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/asyncify/package.json rename to packages/test-cases/cases/wrappers/wasm-as/asyncify/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/asyncify/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/asyncify/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml index e8af812414..6c22079407 100644 --- a/packages/test-cases/cases/apis/wasm-as/asyncify/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: Asyncify -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/asyncify/schema.graphql similarity index 98% rename from packages/test-cases/cases/apis/wasm-as/asyncify/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/asyncify/schema.graphql index 75e23c020a..124a0a578f 100644 --- a/packages/test-cases/cases/apis/wasm-as/asyncify/schema.graphql +++ b/packages/test-cases/cases/wrappers/wasm-as/asyncify/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.polywrap.eth" type Module { getData( diff --git a/packages/test-cases/cases/apis/wasm-as/asyncify/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/asyncify/src/index.ts similarity index 99% rename from packages/test-cases/cases/apis/wasm-as/asyncify/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/asyncify/src/index.ts index b95a41454d..14339e377a 100644 --- a/packages/test-cases/cases/apis/wasm-as/asyncify/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/asyncify/src/index.ts @@ -8,7 +8,7 @@ import { Input_setDataWithManyArgs, Input_setDataWithManyStructuredArgs, Ethereum_Module, -} from "./polywrap"; +} from "./wrap"; export function getData(input: Input_getData): u32 { const res = Ethereum_Module.callContractView({ diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bigint-type/package.json rename to packages/test-cases/cases/wrappers/wasm-as/bigint-type/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.yaml index 944cc60907..42fda78231 100644 --- a/packages/test-cases/cases/apis/wasm-as/bigint-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: BigInt -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bigint-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/bigint-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/src/index.ts similarity index 94% rename from packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/bigint-type/src/index.ts index 2468686c59..d98e6eb91c 100644 --- a/packages/test-cases/cases/apis/wasm-as/bigint-type/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/src/index.ts @@ -1,6 +1,6 @@ import { Input_method -} from "./polywrap"; +} from "./wrap"; import { BigInt } from "@polywrap/wasm-as"; export function method(input: Input_method): BigInt { diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bignumber-type/package.json rename to packages/test-cases/cases/wrappers/wasm-as/bignumber-type/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.yaml index 89f32e711e..0e72186d34 100644 --- a/packages/test-cases/cases/apis/wasm-as/bignumber-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: BigNumber -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bignumber-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/bignumber-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/src/index.ts similarity index 94% rename from packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/bignumber-type/src/index.ts index f37f0b2641..36f4dedecc 100644 --- a/packages/test-cases/cases/apis/wasm-as/bignumber-type/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/src/index.ts @@ -1,6 +1,6 @@ import { Input_method -} from "./polywrap"; +} from "./wrap"; import { BigNumber } from "@polywrap/wasm-as"; export function method(input: Input_method): BigNumber { diff --git a/packages/test-cases/cases/apis/wasm-as/bytes-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bytes-type/package.json rename to packages/test-cases/cases/wrappers/wasm-as/bytes-type/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/map-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/map-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.yaml index 3ddadbd65d..1e11e1666c 100644 --- a/packages/test-cases/cases/apis/wasm-as/map-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: BytesType -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/bytes-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/bytes-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/bytes-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/bytes-type/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/src/index.ts similarity index 92% rename from packages/test-cases/cases/apis/wasm-as/bytes-type/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/bytes-type/src/index.ts index 4fb4403278..1603d66a36 100644 --- a/packages/test-cases/cases/apis/wasm-as/bytes-type/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/src/index.ts @@ -1,6 +1,6 @@ import { Input_bytesMethod -} from "./polywrap"; +} from "./wrap"; export function bytesMethod(input: Input_bytesMethod): ArrayBuffer { const argStr = String.UTF8.decode(input.arg.prop); diff --git a/packages/test-cases/cases/apis/wasm-as/enum-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/enum-types/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/enum-types/package.json rename to packages/test-cases/cases/wrappers/wasm-as/enum-types/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/object-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/object-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/enum-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/enum-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.yaml index 28e9c2ebe8..f2d65bb484 100644 --- a/packages/test-cases/cases/apis/wasm-as/enum-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: EnumTypes -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/enum-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/enum-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/enum-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/enum-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/enum-types/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/enum-types/src/index.ts similarity index 91% rename from packages/test-cases/cases/apis/wasm-as/enum-types/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/enum-types/src/index.ts index de59a04f0c..d028211676 100644 --- a/packages/test-cases/cases/apis/wasm-as/enum-types/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/enum-types/src/index.ts @@ -2,7 +2,7 @@ import { SanityEnum, Input_method1, Input_method2, -} from "./polywrap"; +} from "./wrap"; export function method1(input: Input_method1): SanityEnum { return input.en; diff --git a/packages/test-cases/cases/apis/wasm-as/env-client-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/env-client-types/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/env-client-types/package.json rename to packages/test-cases/cases/wrappers/wasm-as/env-client-types/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/env-client-types/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/env-client-types/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/env-client-types/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/env-client-types/polywrap.yaml index 3dd2b24c3c..4f59942644 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-client-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/env-client-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: EnvClientType language: wasm/assemblyscript -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-as/env-client-types/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/env-client-types/src/index.ts similarity index 93% rename from packages/test-cases/cases/apis/wasm-as/env-client-types/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/env-client-types/src/index.ts index 4968ff9200..ad3d771ddc 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-client-types/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/env-client-types/src/index.ts @@ -3,7 +3,7 @@ import { Input_environment, Input_sanitizeEnv, Env -} from "./polywrap"; +} from "./wrap"; export function environment(input: Input_environment): Env { return env as Env; diff --git a/packages/test-cases/cases/apis/wasm-as/env-client-types/src/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/env-client-types/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/env-client-types/src/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/env-client-types/src/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/env-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/env-types/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/env-types/package.json rename to packages/test-cases/cases/wrappers/wasm-as/env-types/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/env-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/env-types/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/env-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/env-types/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/env-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/env-types/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/env-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/env-types/polywrap.yaml index 668aa391e8..7862585743 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/env-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: EnvType language: wasm/assemblyscript -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/env-types/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/env-types/src/index.ts similarity index 85% rename from packages/test-cases/cases/apis/wasm-as/env-types/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/env-types/src/index.ts index f8a4de5ff5..f2f9afa52b 100644 --- a/packages/test-cases/cases/apis/wasm-as/env-types/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/env-types/src/index.ts @@ -2,7 +2,7 @@ import { env, Env, Input_moduleEnv, -} from "./polywrap"; +} from "./wrap"; export function moduleEnv(input: Input_moduleEnv): Env { return env as Env; diff --git a/packages/test-cases/cases/apis/wasm-as/env-types/src/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/env-types/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/env-types/src/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/env-types/src/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-interface/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-interface/polywrap.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-interface/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-interface/polywrap.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-interface/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-interface/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-interface/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-interface/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/package.json b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-api/package.json rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml similarity index 88% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml index 1ea1375a29..42036eddb0 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: TestUseGetImpl -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/src/index.ts similarity index 89% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/src/index.ts index 77e9d502b1..b8edf54f4d 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/src/index.ts @@ -1,4 +1,4 @@ -import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType, Interface } from "./polywrap"; +import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType, Interface } from "./wrap"; export function moduleImplementations(): string[] { return Interface.getImplementations(); diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/package.json b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-use-getImpl/package.json rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/package.json diff --git a/packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/001-sanity/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml index 2e491ccbb0..ea228ef410 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 -name: TestApi -build: ./web3api.build.yaml +name: TestWrapper +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-api/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/src/index.ts similarity index 89% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/src/index.ts index d2d6eaa93d..54b76b9e6f 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/src/index.ts @@ -1,4 +1,4 @@ -import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType } from "./polywrap"; +import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType } from "./wrap"; export function moduleMethod(input: Input_moduleMethod): ImplementationType { return input.arg; diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/package.json b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/package.json rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/package.json diff --git a/packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/002-invalid-codegen-script/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml similarity index 88% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml index 3844df462c..6f3c386ac2 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: TestImplementation -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/src/index.ts similarity index 89% rename from packages/test-cases/cases/apis/wasm-as/implementations/test-api/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/src/index.ts index d2d6eaa93d..54b76b9e6f 100644 --- a/packages/test-cases/cases/apis/wasm-as/implementations/test-api/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/src/index.ts @@ -1,4 +1,4 @@ -import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType } from "./polywrap"; +import { Input_moduleMethod, Input_abstractModuleMethod, ImplementationType } from "./wrap"; export function moduleMethod(input: Input_moduleMethod): ImplementationType { return input.arg; diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-interface/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-interface/polywrap.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-interface/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-interface/polywrap.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-interface/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-interface/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-interface/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-interface/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/package.json b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-implementation/package.json rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/package.json diff --git a/packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/codegen/003-codegen-script/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml index ef3a0030cc..9d21cf2c5d 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 -name: TestApi -build: ./web3api.build.yaml +name: TestWrapper +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/src/index.ts similarity index 95% rename from packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/src/index.ts index dd3014d327..9a0fc61d84 100644 --- a/packages/test-cases/cases/apis/wasm-as/interface-invoke/test-api/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/src/index.ts @@ -3,7 +3,7 @@ import { Interface_Module, Input_moduleMethod, ImplementationType -} from "./polywrap"; +} from "./wrap"; export function moduleMethod(input: Input_moduleMethod): ImplementationType { const uris = Interface.getImplementations(); diff --git a/packages/test-cases/cases/apis/wasm-as/invalid-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/invalid-types/package.json rename to packages/test-cases/cases/wrappers/wasm-as/invalid-types/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.yaml index 132549ae84..b9c661ff6a 100644 --- a/packages/test-cases/cases/apis/wasm-as/invalid-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: InvalidTypes -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/invalid-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/invalid-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/invalid-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/invalid-types/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/src/index.ts similarity index 96% rename from packages/test-cases/cases/apis/wasm-as/invalid-types/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/invalid-types/src/index.ts index 6625867e20..6acff069d3 100644 --- a/packages/test-cases/cases/apis/wasm-as/invalid-types/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/src/index.ts @@ -4,7 +4,7 @@ import { Input_arrayMethod, Input_intMethod, Input_uIntMethod -} from "./polywrap"; +} from "./wrap"; export function boolMethod(input: Input_boolMethod): bool { return input.arg; diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/json-type/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/json-type/package.json rename to packages/test-cases/cases/wrappers/wasm-as/json-type/package.json diff --git a/packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/001-sanity/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/json-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.yaml index 6c4bca2965..377cf98c80 100644 --- a/packages/test-cases/cases/apis/wasm-as/json-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: JsonType -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/json-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/json-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/json-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/json-type/src/index.ts similarity index 93% rename from packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/json-type/src/index.ts index 190e75728c..1f9a6be8db 100644 --- a/packages/test-cases/cases/apis/wasm-as/json-type/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/json-type/src/index.ts @@ -2,7 +2,7 @@ import { Input_fromJson, Input_toJson, Pair -} from "./polywrap"; +} from "./wrap"; import { JSON } from "@polywrap/wasm-as"; export function fromJson(input: Input_fromJson): Pair { diff --git a/packages/test-cases/cases/apis/wasm-as/large-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/large-types/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/large-types/package.json rename to packages/test-cases/cases/wrappers/wasm-as/large-types/package.json diff --git a/packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/002-no-ext/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/large-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/large-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.yaml index c48d0a85b8..5a2ab3fc3c 100644 --- a/packages/test-cases/cases/apis/wasm-as/large-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: LargeTypes -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/large-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/large-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/large-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/large-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/large-types/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/large-types/src/index.ts similarity index 87% rename from packages/test-cases/cases/apis/wasm-as/large-types/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/large-types/src/index.ts index d114128c94..32cd45c661 100644 --- a/packages/test-cases/cases/apis/wasm-as/large-types/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/large-types/src/index.ts @@ -1,7 +1,7 @@ import { Input_method, LargeCollection, -} from "./polywrap"; +} from "./wrap"; export function method(input: Input_method): LargeCollection { return input.largeCollection; diff --git a/packages/test-cases/cases/apis/wasm-as/map-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/map-type/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/map-type/package.json rename to packages/test-cases/cases/wrappers/wasm-as/map-type/package.json diff --git a/packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/003-invalid-config/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.yaml index 3ddadbd65d..1e11e1666c 100644 --- a/packages/test-cases/cases/apis/wasm-as/bytes-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: BytesType -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/map-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/map-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/map-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/map-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/map-type/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/map-type/src/index.ts similarity index 92% rename from packages/test-cases/cases/apis/wasm-as/map-type/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/map-type/src/index.ts index 87cb22c7f7..5f0bb05693 100644 --- a/packages/test-cases/cases/apis/wasm-as/map-type/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/map-type/src/index.ts @@ -1,7 +1,7 @@ import { Input_getKey, Input_returnMap -} from "./polywrap"; +} from "./wrap"; export function getKey(input: Input_getKey): i32 { let result = input.map.get(input.key); diff --git a/packages/test-cases/cases/apis/wasm-as/number-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/number-types/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/number-types/package.json rename to packages/test-cases/cases/wrappers/wasm-as/number-types/package.json diff --git a/packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/004-fail-between/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/number-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/number-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.yaml index c59cdc324f..6a9ad3753e 100644 --- a/packages/test-cases/cases/apis/wasm-as/number-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: NumberTypes -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/number-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/number-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/number-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/number-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/number-types/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/number-types/src/index.ts similarity index 98% rename from packages/test-cases/cases/apis/wasm-as/number-types/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/number-types/src/index.ts index b72b7444ad..b328a25eec 100644 --- a/packages/test-cases/cases/apis/wasm-as/number-types/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/number-types/src/index.ts @@ -5,7 +5,7 @@ import { Input_u16Method, Input_i32Method, Input_u32Method, -} from "./polywrap"; +} from "./wrap"; export function i8Method(input: Input_i8Method): i8 { const firstInt = input.first; diff --git a/packages/test-cases/cases/apis/wasm-as/object-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/object-types/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/object-types/package.json rename to packages/test-cases/cases/wrappers/wasm-as/object-types/package.json diff --git a/packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/deploy/005-non-loaded-env-var/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/object-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/object-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.yaml index 3d9925bbe5..c03288c4be 100644 --- a/packages/test-cases/cases/apis/wasm-as/object-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: ObjectTypes -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/object-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/object-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/object-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/object-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/object-types/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/object-types/src/index.ts similarity index 97% rename from packages/test-cases/cases/apis/wasm-as/object-types/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/object-types/src/index.ts index cd3fd88b7b..e3e2c10291 100644 --- a/packages/test-cases/cases/apis/wasm-as/object-types/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/object-types/src/index.ts @@ -5,7 +5,7 @@ import { Input_method5, Output, Arg2 -} from "./polywrap"; +} from "./wrap"; export function method1(input: Input_method1): Output[] { return [ diff --git a/packages/test-cases/cases/apis/wasm-as/reserved-words/package.json b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/reserved-words/package.json rename to packages/test-cases/cases/wrappers/wasm-as/reserved-words/package.json diff --git a/packages/test-cases/cases/cli/api/query/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/cli/api/query/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.yaml index 9e8d319460..bdd603f59f 100644 --- a/packages/test-cases/cases/apis/wasm-as/reserved-words/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: ReservedWords -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/reserved-words/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/reserved-words/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/reserved-words/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/reserved-words/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/src/index.ts similarity index 88% rename from packages/test-cases/cases/apis/wasm-as/reserved-words/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/reserved-words/src/index.ts index 6bb3edf565..c804a2e4d0 100644 --- a/packages/test-cases/cases/apis/wasm-as/reserved-words/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/src/index.ts @@ -1,7 +1,7 @@ import { Input_method1, Result, -} from "./polywrap"; +} from "./wrap"; export function method1(input: Input_method1): Result { return { diff --git a/packages/test-cases/cases/apis/wasm-as/simple-env-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/simple-env-types/package.json rename to packages/test-cases/cases/wrappers/wasm-as/simple-env-types/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.yaml similarity index 81% rename from packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.yaml index a4efedc52c..264f60ac1c 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-env-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: SimpleEnvTypes language: wasm/assemblyscript -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/simple-env-types/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/src/index.ts similarity index 58% rename from packages/test-cases/cases/apis/wasm-as/simple-env-types/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/simple-env-types/src/index.ts index 6ea935d023..2481e52ed0 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-env-types/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/src/index.ts @@ -1,4 +1,4 @@ -import { env, Env, Input_getEnv } from "./polywrap"; +import { env, Env, Input_getEnv } from "./wrap"; export function getEnv(input: Input_getEnv): Env { return env as Env; diff --git a/packages/test-cases/cases/apis/wasm-as/simple-env-types/src/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/src/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/simple-env-types/src/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/simple-env-types/src/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/simple-storage/package.json rename to packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.build.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.build.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.meta.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.meta.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.meta.yaml rename to packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.meta.yaml diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml similarity index 68% rename from packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml index f514402967..29d368c717 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-storage/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 name: SimpleStorage language: wasm/assemblyscript -build: ./web3api.build.yaml -meta: ./web3api.meta.yaml +build: ./polywrap.build.yaml +meta: ./polywrap.meta.yaml schema: ./schema.graphql module: ./src/index.ts diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/schema.graphql b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/schema.graphql similarity index 95% rename from packages/test-cases/cases/apis/wasm-as/simple-storage/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-as/simple-storage/schema.graphql index b951d40938..6c139b9b76 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-storage/schema.graphql +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.polywrap.eth" type Module { getData( diff --git a/packages/test-cases/cases/apis/wasm-as/simple-storage/src/index.ts b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/src/index.ts similarity index 97% rename from packages/test-cases/cases/apis/wasm-as/simple-storage/src/index.ts rename to packages/test-cases/cases/wrappers/wasm-as/simple-storage/src/index.ts index 8b6cddd166..98ca74a11a 100644 --- a/packages/test-cases/cases/apis/wasm-as/simple-storage/src/index.ts +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/src/index.ts @@ -1,11 +1,11 @@ -import { Ethereum_Module } from "./polywrap/imported"; +import { Ethereum_Module } from "./wrap/imported"; import { Input_getData, Input_tryGetData, Input_throwGetData, Input_setData, Input_deployContract -} from "./polywrap"; +} from "./wrap"; export function getData(input: Input_getData): u32 { const res = Ethereum_Module.callContractView({ diff --git a/packages/test-cases/cases/apis/wasm-rs/asyncify/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/Cargo.toml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/asyncify/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/asyncify/Cargo.toml index 7ada7e3e6f..fb8692d9fd 100644 --- a/packages/test-cases/cases/apis/wasm-rs/asyncify/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "module" version = "0.1.0" -description = "Query module of asycify api" +description = "Query module of asycify wrapper" authors = [ "Kobby Pentangeli ", "Jordan Ellis " @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/asyncify/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/asyncify/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.build.yaml index fd006b7b2b..8850537b49 100644 --- a/packages/test-cases/cases/apis/wasm-rs/asyncify/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: asyncify-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/asyncify/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/asyncify/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml index afdcce050b..b3454d1dec 100644 --- a/packages/test-cases/cases/apis/wasm-rs/asyncify/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: Asyncify language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/asyncify/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/schema.graphql similarity index 98% rename from packages/test-cases/cases/apis/wasm-rs/asyncify/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/asyncify/schema.graphql index 75e23c020a..124a0a578f 100644 --- a/packages/test-cases/cases/apis/wasm-rs/asyncify/schema.graphql +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.polywrap.eth" type Module { getData( diff --git a/packages/test-cases/cases/apis/wasm-rs/asyncify/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/src/lib.rs similarity index 97% rename from packages/test-cases/cases/apis/wasm-rs/asyncify/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/asyncify/src/lib.rs index 755d06b1cb..6f3b7975f8 100644 --- a/packages/test-cases/cases/apis/wasm-rs/asyncify/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/src/lib.rs @@ -1,8 +1,8 @@ -pub mod polywrap; -pub use polywrap::*; -use web3api_wasm_rs::JSON; -use polywrap::imported::ethereum_module; -use polywrap::module; +pub mod wrap; +pub use wrap::*; +use polywrap_wasm_rs::JSON; +use wrap::imported::ethereum_module; +use wrap::module; pub fn get_data(input: module::InputGetData) -> u32 { match EthereumModule::call_contract_view( diff --git a/packages/test-cases/cases/apis/wasm-rs/bigint-type/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/bigint-type/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/bigint-type/Cargo.toml index 1dbb307eca..ab2ad4443d 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bigint-type/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/bigint-type/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/bigint-type/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.build.yaml index 4406bc1ee3..8e983f5ffc 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bigint-type/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: bigint-type-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/bigint-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/bigint-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.yaml index b1b10ced5e..fd3e5c4084 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bigint-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: BigInt language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/bigint-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/bigint-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/bigint-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/bigint-type/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/src/lib.rs similarity index 82% rename from packages/test-cases/cases/apis/wasm-rs/bigint-type/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/bigint-type/src/lib.rs index 9c6df619f5..8b85ad8f7f 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bigint-type/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/src/lib.rs @@ -1,8 +1,8 @@ use std::ops::Mul; -use web3api_wasm_rs::BigInt; -pub mod polywrap; -pub use polywrap::*; +use polywrap_wasm_rs::BigInt; +pub mod wrap; +pub use wrap::*; pub fn method(input: InputMethod) -> BigInt { let mut result = input.arg1.mul(input.obj.prop1); diff --git a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/bignumber-type/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/Cargo.toml index 1dbb307eca..ab2ad4443d 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/bignumber-type/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.build.yaml index 8f881a94aa..4fff51e98e 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: bignumber-type-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/bignumber-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.yaml index edefe5061a..1dfc580966 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: BigNumber language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/bignumber-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/src/lib.rs similarity index 81% rename from packages/test-cases/cases/apis/wasm-rs/bignumber-type/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/src/lib.rs index 1c0c93b4ab..a9015a4d6f 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bignumber-type/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/src/lib.rs @@ -1,8 +1,8 @@ use std::ops::Mul; -use web3api_wasm_rs::BigNumber; -pub mod polywrap; -pub use polywrap::*; +use polywrap_wasm_rs::BigNumber; +pub mod wrap; +pub use wrap::*; pub fn method(input: InputMethod) -> BigNumber { let mut result = input.arg1.mul(input.obj.prop1); diff --git a/packages/test-cases/cases/apis/wasm-rs/bytes-type/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/bytes-type/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/bytes-type/Cargo.toml index aed0a374c8..288aadb1be 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bytes-type/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/bytes-type/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/bytes-type/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.build.yaml index 7324439382..19e0af4397 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bytes-type/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: bytes-type-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/bytes-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/bytes-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.yaml index 3ef30356f3..6a1e0529c7 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bytes-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: Bytes language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/bytes-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/bytes-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/bytes-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/bytes-type/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/src/lib.rs similarity index 86% rename from packages/test-cases/cases/apis/wasm-rs/bytes-type/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/bytes-type/src/lib.rs index 5aafffc5f0..b272be08bb 100644 --- a/packages/test-cases/cases/apis/wasm-rs/bytes-type/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/src/lib.rs @@ -1,5 +1,5 @@ -pub mod polywrap; -pub use polywrap::*; +pub mod wrap; +pub use wrap::*; pub fn bytes_method(input: InputBytesMethod) -> Vec { let arg_str = match String::from_utf8(input.arg.prop) { diff --git a/packages/test-cases/cases/apis/wasm-rs/enum-types/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/enum-types/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/enum-types/Cargo.toml index 6261714143..1316b12d1b 100644 --- a/packages/test-cases/cases/apis/wasm-rs/enum-types/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/enum-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/enum-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.build.yaml index be38f45c46..d00960b897 100644 --- a/packages/test-cases/cases/apis/wasm-rs/enum-types/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: enum-types-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/enum-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.yaml similarity index 77% rename from packages/test-cases/cases/apis/wasm-rs/enum-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.yaml index b8214246fa..c7983d4ef0 100644 --- a/packages/test-cases/cases/apis/wasm-rs/enum-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: Enum language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/enum-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/enum-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/enum-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/enum-types/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/src/lib.rs similarity index 79% rename from packages/test-cases/cases/apis/wasm-rs/enum-types/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/enum-types/src/lib.rs index 02190abd4a..32962d3686 100644 --- a/packages/test-cases/cases/apis/wasm-rs/enum-types/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod polywrap; -pub use polywrap::*; +pub mod wrap; +pub use wrap::*; pub fn method1(input: InputMethod1) -> SanityEnum { input.en diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-interface/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-interface/polywrap.yaml similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-interface/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-interface/polywrap.yaml diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-interface/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-interface/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-interface/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-interface/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/Cargo.toml index 8692d989e9..2b7b10e41d 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = ["preserve_order"]} diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.build.yaml similarity index 81% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.build.yaml index 4c41d59d47..254ee20749 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: test-use-get-impl-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../../wasm/rs \ No newline at end of file diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml index 707980246b..3f1b298045 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: TestUseGetImpl -build: ./web3api.build.yaml +build: ./polywrap.build.yaml language: wasm/rust schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/src/lib.rs similarity index 87% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/src/lib.rs index 0db6aff8b4..823aa9f87a 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-use-getImpl/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/src/lib.rs @@ -1,5 +1,5 @@ -pub mod polywrap; -pub use polywrap::*; +pub mod wrap; +pub use wrap::*; pub fn module_implementations() -> Vec { Interface::get_implementations() diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/Cargo.toml similarity index 76% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-api/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/Cargo.toml index 8d661d538a..9f5e9e74c6 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "query" version = "0.1.0" -description = "Query module of test-api implementation" +description = "Query module of test-wrapper implementation" authors = [ "Kobby Pentangeli ", "Jordan Ellis " @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../../wasm/rs"} +polywrap-wasm-rs = { path = "../../../../../../../wasm/rs"} serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.build.yaml similarity index 60% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.build.yaml index 9100c8b97b..c771a969f1 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.build.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.2 docker: - name: test-api-wasm-rs + name: test-wrapper-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml index eb24e991f3..f7c94de70c 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml @@ -1,7 +1,7 @@ format: 0.0.1-prealpha.9 -name: TestApi +name: TestWrapper language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml import_redirects: diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-api/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/src/lib.rs similarity index 82% rename from packages/test-cases/cases/apis/wasm-rs/implementations/test-api/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/src/lib.rs index 845d2786f1..a001016170 100644 --- a/packages/test-cases/cases/apis/wasm-rs/implementations/test-api/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/src/lib.rs @@ -1,5 +1,5 @@ -pub mod polywrap; -pub use polywrap::*; +pub mod wrap; +pub use wrap::*; pub fn module_method(input: InputModuleMethod) -> ImplementationType { input.arg diff --git a/packages/test-cases/cases/apis/wasm-rs/invalid-types/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/invalid-types/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/invalid-types/Cargo.toml index 7ef0379549..d63c4dee83 100644 --- a/packages/test-cases/cases/apis/wasm-rs/invalid-types/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/invalid-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/invalid-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.build.yaml index e0e97cc167..d944e5e2aa 100644 --- a/packages/test-cases/cases/apis/wasm-rs/invalid-types/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: invalid-types-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/invalid-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.yaml similarity index 79% rename from packages/test-cases/cases/apis/wasm-rs/invalid-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.yaml index 080ba95e27..2dc10a066f 100644 --- a/packages/test-cases/cases/apis/wasm-rs/invalid-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: InvalidTypes language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/invalid-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/invalid-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/invalid-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/invalid-types/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/src/lib.rs similarity index 90% rename from packages/test-cases/cases/apis/wasm-rs/invalid-types/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/invalid-types/src/lib.rs index 463d54cdd2..c3cb9d7260 100644 --- a/packages/test-cases/cases/apis/wasm-rs/invalid-types/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod polywrap; -pub use polywrap::*; +pub mod wrap; +pub use wrap::*; pub fn bool_method(input: InputBoolMethod) -> bool { input.arg diff --git a/packages/test-cases/cases/apis/wasm-rs/json-type/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/json-type/Cargo.toml similarity index 89% rename from packages/test-cases/cases/apis/wasm-rs/json-type/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/json-type/Cargo.toml index 174a1cb82a..bcb4256ac1 100644 --- a/packages/test-cases/cases/apis/wasm-rs/json-type/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/json-type/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = ["preserve_order"]} diff --git a/packages/test-cases/cases/apis/wasm-rs/json-type/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/json-type/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.build.yaml index 55670e7aee..ce2700c255 100644 --- a/packages/test-cases/cases/apis/wasm-rs/json-type/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: json-type-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/json-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/json-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.yaml index 3295f90cba..705153f1ea 100644 --- a/packages/test-cases/cases/apis/wasm-rs/json-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: JsonType language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/json-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/json-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/json-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/json-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/json-type/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/json-type/src/lib.rs similarity index 77% rename from packages/test-cases/cases/apis/wasm-rs/json-type/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/json-type/src/lib.rs index 1bf10bbda0..9c157f5361 100644 --- a/packages/test-cases/cases/apis/wasm-rs/json-type/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/json-type/src/lib.rs @@ -1,6 +1,6 @@ -pub mod polywrap; -pub use polywrap::*; -use web3api_wasm_rs::JSON; +pub mod wrap; +pub use wrap::*; +use polywrap_wasm_rs::JSON; use serde_json::*; pub fn from_json(input: InputFromJson) -> Pair { diff --git a/packages/test-cases/cases/apis/wasm-rs/large-types/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/large-types/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/large-types/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/large-types/Cargo.toml index e43c8cbf19..9e8ae4b612 100644 --- a/packages/test-cases/cases/apis/wasm-rs/large-types/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/large-types/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/large-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/large-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.build.yaml index 8150a31719..14d785552b 100644 --- a/packages/test-cases/cases/apis/wasm-rs/large-types/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: large-types-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/large-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/large-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.yaml index 4be8d6524a..fd6299cd7f 100644 --- a/packages/test-cases/cases/apis/wasm-rs/large-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: LargeTypes language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/large-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/large-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/large-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/large-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/large-types/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/large-types/src/lib.rs similarity index 68% rename from packages/test-cases/cases/apis/wasm-rs/large-types/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/large-types/src/lib.rs index 858a9f0998..1bd56401d3 100644 --- a/packages/test-cases/cases/apis/wasm-rs/large-types/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/large-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod polywrap; -pub use polywrap::*; +pub mod wrap; +pub use wrap::*; pub fn method(input: InputMethod) -> LargeCollection { input.large_collection diff --git a/packages/test-cases/cases/apis/wasm-rs/map-type/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/map-type/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/map-type/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/map-type/Cargo.toml index e43c8cbf19..9e8ae4b612 100644 --- a/packages/test-cases/cases/apis/wasm-rs/map-type/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/map-type/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/map-type/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/map-type/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.build.yaml index 1a52c636b9..6ff265def5 100644 --- a/packages/test-cases/cases/apis/wasm-rs/map-type/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: map-type-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/map-type/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/map-type/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.yaml index 4d51213d3f..c978b9fa9f 100644 --- a/packages/test-cases/cases/apis/wasm-rs/map-type/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: MapType language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/map-type/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/map-type/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/map-type/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/map-type/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/map-type/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/map-type/src/lib.rs similarity index 71% rename from packages/test-cases/cases/apis/wasm-rs/map-type/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/map-type/src/lib.rs index ef3396bc9b..48f97e4a87 100644 --- a/packages/test-cases/cases/apis/wasm-rs/map-type/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/map-type/src/lib.rs @@ -1,6 +1,6 @@ -pub mod polywrap; -pub use polywrap::*; -use web3api_wasm_rs::Map; +pub mod wrap; +pub use wrap::*; +use polywrap_wasm_rs::Map; pub fn get_key(input: InputGetKey) -> i32 { *input.map.get(&input.key).unwrap() diff --git a/packages/test-cases/cases/apis/wasm-rs/number-types/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/number-types/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/number-types/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/number-types/Cargo.toml index a97553b7b3..2deed46dbd 100644 --- a/packages/test-cases/cases/apis/wasm-rs/number-types/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/number-types/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/number-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/number-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.build.yaml index 6f0e2120d6..1ec6a2644a 100644 --- a/packages/test-cases/cases/apis/wasm-rs/number-types/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: number-types-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/number-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/number-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.yaml index 57c640816e..145126a085 100644 --- a/packages/test-cases/cases/apis/wasm-rs/number-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: NumberTypes language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/number-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/number-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/number-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/number-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/number-types/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/number-types/src/lib.rs similarity index 92% rename from packages/test-cases/cases/apis/wasm-rs/number-types/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/number-types/src/lib.rs index 1df2cd0305..6480fce0a6 100644 --- a/packages/test-cases/cases/apis/wasm-rs/number-types/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/number-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod polywrap; -pub use polywrap::*; +pub mod wrap; +pub use wrap::*; pub fn i8_method(input: InputI8Method) -> i8 { input.first + input.second diff --git a/packages/test-cases/cases/apis/wasm-rs/object-types/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/object-types/Cargo.toml similarity index 88% rename from packages/test-cases/cases/apis/wasm-rs/object-types/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/object-types/Cargo.toml index 444fa3de1b..e8a6b399b6 100644 --- a/packages/test-cases/cases/apis/wasm-rs/object-types/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/object-types/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/object-types/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/object-types/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.build.yaml index 42c8ba986c..bf07035134 100644 --- a/packages/test-cases/cases/apis/wasm-rs/object-types/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: object-types-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/object-types/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.yaml similarity index 78% rename from packages/test-cases/cases/apis/wasm-rs/object-types/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.yaml index 1509332b27..e63f020b52 100644 --- a/packages/test-cases/cases/apis/wasm-rs/object-types/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: ObjectTypes language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/object-types/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/object-types/schema.graphql similarity index 100% rename from packages/test-cases/cases/apis/wasm-rs/object-types/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/object-types/schema.graphql diff --git a/packages/test-cases/cases/apis/wasm-rs/object-types/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/object-types/src/lib.rs similarity index 97% rename from packages/test-cases/cases/apis/wasm-rs/object-types/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/object-types/src/lib.rs index 728a1e5963..11a3d6916b 100644 --- a/packages/test-cases/cases/apis/wasm-rs/object-types/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/object-types/src/lib.rs @@ -1,5 +1,5 @@ -pub mod polywrap; -pub use polywrap::*; +pub mod wrap; +pub use wrap::*; pub fn method1(input: InputMethod1) -> Vec { vec![ diff --git a/packages/test-cases/cases/apis/wasm-rs/simple-storage/Cargo.toml b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/Cargo.toml similarity index 77% rename from packages/test-cases/cases/apis/wasm-rs/simple-storage/Cargo.toml rename to packages/test-cases/cases/wrappers/wasm-rs/simple-storage/Cargo.toml index fef75175e7..4ee9fd348a 100644 --- a/packages/test-cases/cases/apis/wasm-rs/simple-storage/Cargo.toml +++ b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "query" version = "0.1.0" -description = "Query module of simple-storage api" +description = "Query module of simple-storage wrapper" authors = [ "Kobby Pentangeli ", "Jordan Ellis " @@ -11,7 +11,7 @@ license = "MIT" edition = "2021" [dependencies] -web3api-wasm-rs = { path = "../../../../../../wasm/rs" } +polywrap-wasm-rs = { path = "../../../../../../wasm/rs" } serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/apis/wasm-rs/simple-storage/web3api.build.yaml b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.build.yaml similarity index 80% rename from packages/test-cases/cases/apis/wasm-rs/simple-storage/web3api.build.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.build.yaml index 71246a9fd0..081be72317 100644 --- a/packages/test-cases/cases/apis/wasm-rs/simple-storage/web3api.build.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.build.yaml @@ -2,5 +2,5 @@ format: 0.0.1-prealpha.2 docker: name: simple-storage-wasm-rs linked_packages: - - name: web3api-wasm-rs + - name: polywrap-wasm-rs path: ../../../../../wasm/rs diff --git a/packages/test-cases/cases/apis/wasm-rs/simple-storage/web3api.yaml b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.yaml similarity index 79% rename from packages/test-cases/cases/apis/wasm-rs/simple-storage/web3api.yaml rename to packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.yaml index c12da10a8c..f1c4979c68 100644 --- a/packages/test-cases/cases/apis/wasm-rs/simple-storage/web3api.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.yaml @@ -1,6 +1,6 @@ format: 0.0.1-prealpha.9 name: SimpleStorage language: wasm/rust -build: ./web3api.build.yaml +build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml diff --git a/packages/test-cases/cases/apis/wasm-rs/simple-storage/schema.graphql b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/schema.graphql similarity index 95% rename from packages/test-cases/cases/apis/wasm-rs/simple-storage/schema.graphql rename to packages/test-cases/cases/wrappers/wasm-rs/simple-storage/schema.graphql index b951d40938..6c139b9b76 100644 --- a/packages/test-cases/cases/apis/wasm-rs/simple-storage/schema.graphql +++ b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/schema.graphql @@ -1,4 +1,4 @@ -#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.web3api.eth" +#import { Module, Connection } into Ethereum from "wrap://ens/ethereum.polywrap.eth" type Module { getData( diff --git a/packages/test-cases/cases/apis/wasm-rs/simple-storage/src/lib.rs b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/src/lib.rs similarity index 96% rename from packages/test-cases/cases/apis/wasm-rs/simple-storage/src/lib.rs rename to packages/test-cases/cases/wrappers/wasm-rs/simple-storage/src/lib.rs index 6fddb667ef..90b0674af8 100644 --- a/packages/test-cases/cases/apis/wasm-rs/simple-storage/src/lib.rs +++ b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/src/lib.rs @@ -1,7 +1,7 @@ -pub mod polywrap; -use web3api_wasm_rs::JSON; -use polywrap::imported::ethereum_module; -pub use polywrap::*; +pub mod wrap; +use polywrap_wasm_rs::JSON; +use wrap::imported::ethereum_module; +pub use wrap::*; pub fn get_data(input: InputGetData) -> i32 { match EthereumModule::call_contract_view(ðereum_module::InputCallContractView { diff --git a/packages/test-cases/index.ts b/packages/test-cases/index.ts index 93a6e4f7bc..1276af9e9e 100644 --- a/packages/test-cases/index.ts +++ b/packages/test-cases/index.ts @@ -6,7 +6,7 @@ import { normalizeLineEndings } from "@polywrap/os-js"; export const GetPathToBindTestFiles = () => `${__dirname}/cases/bind` export const GetPathToComposeTestFiles = () => `${__dirname}/cases/compose` export const GetPathToParseTestFiles = () => `${__dirname}/cases/parse` -export const GetPathToTestApis = () => `${__dirname}/cases/apis` +export const GetPathToTestWrappers = () => `${__dirname}/cases/wrappers` export const GetPathToCliTestFiles = () => `${__dirname}/cases/cli`; export function readFileIfExists( diff --git a/packages/test-cases/package.json b/packages/test-cases/package.json index e0e6cf688b..7c22538785 100644 --- a/packages/test-cases/package.json +++ b/packages/test-cases/package.json @@ -1,6 +1,6 @@ { "name": "@polywrap/test-cases", - "description": "Reusable Web3API Test Cases", + "description": "Reusable Polywrap Test Cases", "private": true, "version": "0.0.1-prealpha.85", "license": "MIT", diff --git a/packages/wasm/as/assembly/__tests__/msgpack.spec.ts b/packages/wasm/as/assembly/__tests__/msgpack.spec.ts index ee5aa6189a..44ccfdbcc7 100644 --- a/packages/wasm/as/assembly/__tests__/msgpack.spec.ts +++ b/packages/wasm/as/assembly/__tests__/msgpack.spec.ts @@ -38,7 +38,7 @@ class Sanity { map: Map> = new Map>(); init(): void { - const largeString = new Array(10000).join("web3api "); + const largeString = new Array(10000).join("polywrap "); const largeBytes = String.UTF8.encode(largeString); this.nil = null; @@ -57,7 +57,7 @@ class Sanity { this.bigint = BigInt.fromString("3124124512598273468017578125"); this.bignumber = BigNumber.fromString("3124124512.598273468017578125"); this.json = JSON.parse(`{"foo": "bar", "bar": "baz"}`); - this.largeStr = new Array(10).join("web3api "); + this.largeStr = new Array(10).join("polywrap "); this.bytes = new ArrayBuffer(12); this.largeBytes = largeBytes; this.array = [10, 20, 30]; diff --git a/packages/wasm/as/assembly/implementation-subinvoke.ts b/packages/wasm/as/assembly/implementation-subinvoke.ts index 1795489e7f..561a530720 100644 --- a/packages/wasm/as/assembly/implementation-subinvoke.ts +++ b/packages/wasm/as/assembly/implementation-subinvoke.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import { Result } from "./containers"; -// Implementation Subinvoke API +// Implementation Subinvoke Interface @external("wrap", "__wrap_subinvokeImplementation") export declare function __wrap_subinvokeImplementation( @@ -23,7 +23,7 @@ export declare function __wrap_subinvokeImplementation_error_len(): u32; @external("wrap", "__wrap_subinvokeImplementation_error") export declare function __wrap_subinvokeImplementation_error(ptr: u32): void; -// Implementation Subinvoke API Helper +// Implementation Subinvoke Interface Helper export function wrap_subinvokeImplementation( interfaceUri: string, implUri: string, diff --git a/packages/wasm/as/assembly/json/index.ts b/packages/wasm/as/assembly/json/index.ts index dd01d736aa..55bcd86f73 100644 --- a/packages/wasm/as/assembly/json/index.ts +++ b/packages/wasm/as/assembly/json/index.ts @@ -2,4 +2,4 @@ export { ValueDeserializer as JSONDeserializer, ValueSerializer as JSONSerializer, JSON, -} from "@web3api/serial-as-json"; +} from "@polywrap/serial-as-json"; diff --git a/packages/wasm/as/assembly/subinvoke.ts b/packages/wasm/as/assembly/subinvoke.ts index de2f0f8630..9a963c6d89 100644 --- a/packages/wasm/as/assembly/subinvoke.ts +++ b/packages/wasm/as/assembly/subinvoke.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import { Result } from "./containers"; -// Subinvoke API +// Subinvoke Interface @external("wrap", "__wrap_subinvoke") export declare function __wrap_subinvoke( @@ -22,7 +22,7 @@ export declare function __wrap_subinvoke_error_len(): u32; @external("wrap", "__wrap_subinvoke_error") export declare function __wrap_subinvoke_error(ptr: u32): void; -// Subinvoke API Helper +// Subinvoke Interface Helper export function wrap_subinvoke( uri: string, method: string, diff --git a/packages/wasm/as/package.json b/packages/wasm/as/package.json index 6e1207b95c..e78d0ecc48 100644 --- a/packages/wasm/as/package.json +++ b/packages/wasm/as/package.json @@ -1,11 +1,11 @@ { "name": "@polywrap/wasm-as", - "description": "Web3API Assemblyscript Runtime", + "description": "Polywrap Assemblyscript Runtime", "version": "0.0.1-prealpha.85", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/web3-api/monorepo.git" + "url": "https://github.com/polywrap/monorepo.git" }, "main": "./assembly/index.ts", "files": [ @@ -22,7 +22,7 @@ }, "dependencies": { "@serial-as/transform": "1.0.2", - "@web3api/serial-as-json": "1.0.4", + "@polywrap/serial-as-json": "1.0.4", "as-bigint": "0.5.3", "as-bignumber": "0.2.0", "as-container": "0.6.1" diff --git a/packages/wasm/rs/Cargo.toml b/packages/wasm/rs/Cargo.toml index a63ed4b660..099ec94617 100644 --- a/packages/wasm/rs/Cargo.toml +++ b/packages/wasm/rs/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "web3api-wasm-rs" +name = "polywrap-wasm-rs" version = "0.0.1-prealpha.85" license = "MIT" -description = "Web3API's Rust-Wasm Runtime" +description = "Polywrap's Rust-Wasm Runtime" homepage = "https://polywrap.io" documentation = "https://docs.polywrap.io" repository = "https://github.com/polywrap/monorepo" @@ -11,7 +11,7 @@ authors = [ "Jordan Ellis ", "Nestor Amesty " ] -keywords = ["web3api", "wasm", "webassembly"] +keywords = ["polywrap", "wasm", "webassembly"] categories = ["wasm"] edition = "2021" diff --git a/packages/wasm/rs/src/subinvoke.rs b/packages/wasm/rs/src/subinvoke.rs index b5afb07e59..485470031b 100644 --- a/packages/wasm/rs/src/subinvoke.rs +++ b/packages/wasm/rs/src/subinvoke.rs @@ -2,7 +2,7 @@ use crate::malloc::alloc; #[link(wasm_import_module = "wrap")] extern "C" { - /// Subinvoke API + /// Subinvoke Interface #[link_name = "__wrap_subinvoke"] pub fn __wrap_subinvoke( uri_ptr: u32, @@ -28,7 +28,7 @@ extern "C" { pub fn __wrap_subinvoke_error(ptr: u32); } -/// Subinvoke API Helper +/// Subinvoke Interface Helper pub fn wrap_subinvoke( uri: &str, method: &str, diff --git a/packages/wasm/rs/tests/context_spec.rs b/packages/wasm/rs/tests/context_spec.rs index cf519e5f9d..905b6b7e0e 100644 --- a/packages/wasm/rs/tests/context_spec.rs +++ b/packages/wasm/rs/tests/context_spec.rs @@ -1,4 +1,4 @@ -use web3api_wasm_rs::Context; +use polywrap_wasm_rs::Context; #[test] fn push_and_pop_values() { diff --git a/packages/wasm/rs/tests/msgpack_spec.rs b/packages/wasm/rs/tests/msgpack_spec.rs index 038ee24e9d..6b4037e179 100644 --- a/packages/wasm/rs/tests/msgpack_spec.rs +++ b/packages/wasm/rs/tests/msgpack_spec.rs @@ -1,4 +1,4 @@ -use web3api_wasm_rs::{Context, DecodeError, EncodeError, Read, ReadDecoder, Write, WriteEncoder}; +use polywrap_wasm_rs::{Context, DecodeError, EncodeError, Read, ReadDecoder, Write, WriteEncoder}; // use std::collections::BTreeMap; #[derive(Debug, Clone, Default)] diff --git a/packages/wasm/rs/tests/test_decode.rs b/packages/wasm/rs/tests/test_decode.rs index 19449e21ed..293fd4e956 100644 --- a/packages/wasm/rs/tests/test_decode.rs +++ b/packages/wasm/rs/tests/test_decode.rs @@ -1,4 +1,4 @@ -use web3api_wasm_rs::{BigInt, Context, Read, ReadDecoder, JSON}; +use polywrap_wasm_rs::{BigInt, Context, Read, ReadDecoder, JSON}; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, PartialEq, Serialize)] diff --git a/packages/wasm/rs/tests/test_encode.rs b/packages/wasm/rs/tests/test_encode.rs index f900d88eb5..d375708bf4 100644 --- a/packages/wasm/rs/tests/test_encode.rs +++ b/packages/wasm/rs/tests/test_encode.rs @@ -1,4 +1,4 @@ -use web3api_wasm_rs::{BigInt, Context, Write, WriteEncoder, JSON}; +use polywrap_wasm_rs::{BigInt, Context, Write, WriteEncoder, JSON}; use std::collections::BTreeMap; #[test] diff --git a/tokenlog.json b/tokenlog.json index ad85899a39..3e153add9b 100644 --- a/tokenlog.json +++ b/tokenlog.json @@ -1,5 +1,5 @@ { - "org": "web3-api", + "org": "polywrap", "repo": "monorepo", "tokenAddress": "0x9F59E5Ed123C10D57E92629612511b14628D2799", "labels": ["feature-proposal"] From 247013d944cffad58e103f38184b4926b5010366 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 15 Jun 2022 15:53:14 -0700 Subject: [PATCH 08/17] build fixes --- packages/cli/src/__tests__/e2e/build.spec.ts | 4 +- packages/cli/src/commands/build.ts | 4 +- packages/cli/src/commands/codegen.ts | 4 +- packages/cli/src/commands/deploy.ts | 4 +- packages/cli/src/lib/Compiler.ts | 8 +-- packages/js/client/src/wasm/WasmWrapper.ts | 4 +- packages/wasm/as/assembly/json/index.ts | 2 +- packages/wasm/as/package.json | 2 +- yarn.lock | 58 ++++++++++---------- 9 files changed, 45 insertions(+), 45 deletions(-) diff --git a/packages/cli/src/__tests__/e2e/build.spec.ts b/packages/cli/src/__tests__/e2e/build.spec.ts index 9b9fbbf6f8..56f5bd71e2 100644 --- a/packages/cli/src/__tests__/e2e/build.spec.ts +++ b/packages/cli/src/__tests__/e2e/build.spec.ts @@ -1,4 +1,4 @@ -import { WasmProject, loadBuildManifest } from "../../lib"; +import { PolywrapProject, loadBuildManifest } from "../../lib"; import { clearStyle, polywrapCli } from "./utils"; import { runCLI } from "@polywrap/test-env-js"; @@ -62,7 +62,7 @@ describe("e2e tests for build command", () => { test("Adds uuid-v4 suffix to build image if no build manifest specified", async () => { const projectRoot = getTestCaseDir(0); - const project = new WasmProject({ + const project = new PolywrapProject({ rootDir: projectRoot, polywrapManifestPath: path.join(projectRoot, "polywrap.yaml") }); diff --git a/packages/cli/src/commands/build.ts b/packages/cli/src/commands/build.ts index a7d5eb11f3..98bed82949 100644 --- a/packages/cli/src/commands/build.ts +++ b/packages/cli/src/commands/build.ts @@ -1,7 +1,7 @@ import { Command, Program } from "./types"; import { Compiler, - WasmProject, + PolywrapProject, SchemaComposer, Watcher, WatchEvent, @@ -68,7 +68,7 @@ async function run(options: BuildCommandOptions) { return; } - const project = new WasmProject({ + const project = new PolywrapProject({ rootDir: path.dirname(manifestFile), polywrapManifestPath: manifestFile, quiet: !verbose, diff --git a/packages/cli/src/commands/codegen.ts b/packages/cli/src/commands/codegen.ts index 7230612c26..3f43881d9e 100644 --- a/packages/cli/src/commands/codegen.ts +++ b/packages/cli/src/commands/codegen.ts @@ -2,7 +2,7 @@ import { Command, Program } from "./types"; import { CodeGenerator, Compiler, - WasmProject, + PolywrapProject, SchemaComposer, intlMsg, defaultPolywrapManifest, @@ -79,7 +79,7 @@ async function run(options: CodegenCommandOptions) { const ensAddress: string | undefined = ens; // Polywrap Project - const project = new WasmProject({ + const project = new PolywrapProject({ rootDir: path.dirname(manifestFile), polywrapManifestPath: manifestFile, }); diff --git a/packages/cli/src/commands/deploy.ts b/packages/cli/src/commands/deploy.ts index e455a32921..98bdda4538 100644 --- a/packages/cli/src/commands/deploy.ts +++ b/packages/cli/src/commands/deploy.ts @@ -1,7 +1,7 @@ /* eslint-disable prefer-const */ import { intlMsg, - WasmProject, + PolywrapProject, defaultPolywrapManifest, DeployPackage, parseWasmManifestFileOption, @@ -51,7 +51,7 @@ export const deploy: Command = { async function run(options: DeployCommandOptions): Promise { const { manifestFile, verbose } = options; - const project = new WasmProject({ + const project = new PolywrapProject({ rootDir: nodePath.dirname(manifestFile), polywrapManifestPath: manifestFile, quiet: verbose ? false : true, diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index e2fac3490c..fbb1c52bd6 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { - WasmProject, + PolywrapProject, SchemaComposer, withSpinner, outputManifest, @@ -38,7 +38,7 @@ export interface CompilerOverrides { export interface CompilerConfig { outputDir: string; - project: WasmProject; + project: PolywrapProject; schemaComposer: SchemaComposer; } @@ -276,7 +276,7 @@ export class Compiler { dockerfile = generateDockerfile( project.getCachePath( path.join( - WasmProject.cacheLayout.buildImageDir, + PolywrapProject.cacheLayout.buildImageDir, "Dockerfile.mustache" ) ), @@ -296,7 +296,7 @@ export class Compiler { if (cache == true) { cacheDir = project.getCachePath( - WasmProject.cacheLayout.buildImageCacheDir + PolywrapProject.cacheLayout.buildImageCacheDir ); } else if (cache) { if (!path.isAbsolute(cache)) { diff --git a/packages/js/client/src/wasm/WasmWrapper.ts b/packages/js/client/src/wasm/WasmWrapper.ts index 4e830579f2..88899f1da5 100644 --- a/packages/js/client/src/wasm/WasmWrapper.ts +++ b/packages/js/client/src/wasm/WasmWrapper.ts @@ -25,7 +25,7 @@ import { import { Tracer } from "@polywrap/tracing-js"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; -type InvokeResult = +type InvokeResultOrError = | { type: "InvokeResult"; invokeResult: ArrayBuffer } | { type: "InvokeError"; invokeError: string }; @@ -289,7 +289,7 @@ export class WasmWrapper extends Wrapper { state: State, result: boolean, abort: (message: string) => never - ): InvokeResult { + ): InvokeResultOrError { if (result) { if (!state.invoke.result) { abort("Invoke result is missing."); diff --git a/packages/wasm/as/assembly/json/index.ts b/packages/wasm/as/assembly/json/index.ts index 55bcd86f73..dd01d736aa 100644 --- a/packages/wasm/as/assembly/json/index.ts +++ b/packages/wasm/as/assembly/json/index.ts @@ -2,4 +2,4 @@ export { ValueDeserializer as JSONDeserializer, ValueSerializer as JSONSerializer, JSON, -} from "@polywrap/serial-as-json"; +} from "@web3api/serial-as-json"; diff --git a/packages/wasm/as/package.json b/packages/wasm/as/package.json index e78d0ecc48..9680a0fd6e 100644 --- a/packages/wasm/as/package.json +++ b/packages/wasm/as/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@serial-as/transform": "1.0.2", - "@polywrap/serial-as-json": "1.0.4", + "@web3api/serial-as-json": "1.0.4", "as-bigint": "0.5.3", "as-bignumber": "0.2.0", "as-container": "0.6.1" diff --git a/yarn.lock b/yarn.lock index fef8a7d385..57019aadd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3081,10 +3081,10 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^11.2.0": - version "11.2.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" - integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== +"@octokit/openapi-types@^12.1.0": + version "12.1.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.1.0.tgz#a68b60e969f26dee0eb7d127c65a84967f2d3a6e" + integrity sha512-kQzJh3ZUv3lDpi6M+uekMRHULvf9DlWoI1XgKN6nPeGDzkSgtkhVq1MMz3bFKQ6H6GbdC3ZqG/a6VzKhIx0VeA== "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" @@ -3092,11 +3092,11 @@ integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== "@octokit/plugin-paginate-rest@^2.16.8": - version "2.17.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz#32e9c7cab2a374421d3d0de239102287d791bce7" - integrity sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw== + version "2.18.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.18.0.tgz#e412977782690a4134b0a4aa2f536cca7a2ca125" + integrity sha512-n5/AzIoy5Wzp85gqzSbR+dWQDHlyHZrGijnDfLh452547Ynu0hCvszH7EfRE0eqM5ZjfkplO0k+q+P8AAIIJEA== dependencies: - "@octokit/types" "^6.34.0" + "@octokit/types" "^6.35.0" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" @@ -3104,11 +3104,11 @@ integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== "@octokit/plugin-rest-endpoint-methods@^5.12.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.13.0.tgz#8c46109021a3412233f6f50d28786f8e552427ba" - integrity sha512-uJjMTkN1KaOIgNtUPMtIXDOjx6dGYysdIFhgA52x4xSadQCz3b/zJexvITDVpANnfKPW/+E0xkOvLntqMYpviA== + version "5.14.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.14.0.tgz#758e01ac40998e607feaea7f80220c69990814ae" + integrity sha512-MRnMs4Dcm1OSaz/g/RLr4YY9otgysS7vN5SUkHGd7t+R8323cHsHFoEWHYPSmgUC0BieHRhvnCRWb4i3Pl+Lgg== dependencies: - "@octokit/types" "^6.34.0" + "@octokit/types" "^6.35.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": @@ -3142,12 +3142,12 @@ "@octokit/plugin-request-log" "^1.0.4" "@octokit/plugin-rest-endpoint-methods" "^5.12.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.34.0": - version "6.34.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.34.0.tgz#c6021333334d1ecfb5d370a8798162ddf1ae8218" - integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.35.0": + version "6.35.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.35.0.tgz#11cd9a679c32b4a6c36459ae2ec3ac4de0104f71" + integrity sha512-DhLfdUuv3H37u6jBDfkwamypx3HflHg29b26nbA6iVFYkAlZ5cMEtu/9pQoihGnQE5M7jJFnNo25Rr1UwQNF8Q== dependencies: - "@octokit/openapi-types" "^11.2.0" + "@octokit/openapi-types" "^12.1.0" "@opentelemetry/api-metrics@0.20.0": version "0.20.0" @@ -3670,9 +3670,9 @@ integrity sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw== "@types/node@*": - version "17.0.43" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.43.tgz#7f16898cdd791c9d64069000ad448b47b3ca8353" - integrity sha512-jnUpgw8fL9kP2iszfIDyBQtw5Mf4/XSqy0Loc1J9pI14ejL83XcCEvSf50Gs/4ET0I9VCCDoOfufQysj0S66xA== + version "17.0.44" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.44.tgz#16dd0bb5338f016d8ca10631789f0d0612fe5d5b" + integrity sha512-gWYiOlu6Y4oyLYBvsJAPlwHbC8H4tX+tLsHy6Ee976wedwwZKrG2hFl3Y/HiH6bIyLTbDWQexQF/ohwKkOpUCg== "@types/node@12.12.26": version "12.12.26" @@ -5640,9 +5640,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001349: - version "1.0.30001353" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001353.tgz#c21014dea3bd0a15f34c5cc4cf94e9e8d6dea27d" - integrity sha512-GqItFu1lCW4OGd4f47TVQXAGxca8K9Bz3cBb872ZskMo6FIQhiHCc7QjBL7Bb4XannbV+Gq0yHhFVxONW6C/XQ== + version "1.0.30001354" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001354.tgz#95c5efdb64148bb4870771749b9a619304755ce5" + integrity sha512-mImKeCkyGDAHNywYFA4bqnLAzTUvVkqPvhY4DV47X+Gl2c5Z8c3KNETnXp14GQt11LvxE8AwjzGxJ+rsikiOzg== capture-exit@^2.0.0: version "2.0.0" @@ -7320,9 +7320,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.147: - version "1.4.155" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.155.tgz#9c7190bf5e8608c5a5e4953b1ccf0facf3d1b49d" - integrity sha512-niPzKBSYPG06gxLKO0c2kEmgdRMTtIbNrBlvD31Ld8Q57b/K0218U4j8u/OOt25XE1eFOn47FcmQVdx9R1qqxA== + version "1.4.157" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.157.tgz#25799684ed6f2be52bee2b716f9de257b24f3ba7" + integrity sha512-gteFnXPKsDAdm1U5vVuyrLnKOaR/x/SY+HjUQoHypLUYWJt4RaWU3PaiTBEkRDJh8/Zd8KC/EFjV+uPaHsjKFA== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" @@ -18693,8 +18693,8 @@ zen-observable@^0.8.0: integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== zone.js@^0.11.0: - version "0.11.5" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.5.tgz#ab0b449e91fadb5ebb2db189ffe1b7b6048dc8b1" - integrity sha512-D1/7VxEuQ7xk6z/kAROe4SUbd9CzxY4zOwVGnGHerd/SgLIVU5f4esDzQUsOCeArn933BZfWMKydH7l7dPEp0g== + version "0.11.6" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.6.tgz#c7cacfc298fe24bb585329ca04a44d9e2e840e74" + integrity sha512-umJqFtKyZlPli669gB1gOrRE9hxUUGkZr7mo878z+NEBJZZixJkKeVYfnoLa7g25SseUDc92OZrMKKHySyJrFg== dependencies: tslib "^2.3.0" From 214b6a9267349fdfca4f08cece294e9763745b44 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 15 Jun 2022 15:57:50 -0700 Subject: [PATCH 09/17] lint fixes --- packages/cli/src/lib/Compiler.ts | 6 +++++- packages/cli/src/lib/manifest/index.ts | 6 +++++- packages/cli/src/lib/manifest/polywrap/load.ts | 5 ++++- packages/js/client/src/PolywrapClient.ts | 5 ++++- .../uri-resolution/resolvers/plugin/PluginResolver.ts | 9 ++++++++- packages/js/test-env/src/index.ts | 4 +++- 6 files changed, 29 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index fbb1c52bd6..e519ee6206 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -15,7 +15,11 @@ import { resetDir, } from "./"; -import { PolywrapManifest, BuildManifest, MetaManifest } from "@polywrap/core-js"; +import { + PolywrapManifest, + BuildManifest, + MetaManifest, +} from "@polywrap/core-js"; import { WasmWrapper } from "@polywrap/client-js"; import { WrapImports } from "@polywrap/client-js/build/wasm/types"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; diff --git a/packages/cli/src/lib/manifest/index.ts b/packages/cli/src/lib/manifest/index.ts index 228bbc0ef5..7a32926103 100644 --- a/packages/cli/src/lib/manifest/index.ts +++ b/packages/cli/src/lib/manifest/index.ts @@ -4,6 +4,10 @@ export * from "./polywrap"; export * from "./language"; export * from "./output"; -import { PolywrapManifest, PluginManifest, AppManifest } from "@polywrap/core-js"; +import { + PolywrapManifest, + PluginManifest, + AppManifest, +} from "@polywrap/core-js"; export type AnyManifest = PolywrapManifest | PluginManifest | AppManifest; diff --git a/packages/cli/src/lib/manifest/polywrap/load.ts b/packages/cli/src/lib/manifest/polywrap/load.ts index cb303c067d..e1e6437917 100644 --- a/packages/cli/src/lib/manifest/polywrap/load.ts +++ b/packages/cli/src/lib/manifest/polywrap/load.ts @@ -61,7 +61,10 @@ export async function loadPolywrapManifest( } } -export const defaultBuildManifest = ["polywrap.build.yaml", "polywrap.build.yml"]; +export const defaultBuildManifest = [ + "polywrap.build.yaml", + "polywrap.build.yml", +]; export async function loadBuildManifest( manifestPath: string, diff --git a/packages/js/client/src/PolywrapClient.ts b/packages/js/client/src/PolywrapClient.ts index ad20f2b125..19d071ed03 100644 --- a/packages/js/client/src/PolywrapClient.ts +++ b/packages/js/client/src/PolywrapClient.ts @@ -745,7 +745,10 @@ export class PolywrapClient implements Client { } @Tracer.traceMethod("PolywrapClient: _loadWrapper") - private async _loadWrapper(uri: Uri, options?: Contextualized): Promise { + private async _loadWrapper( + uri: Uri, + options?: Contextualized + ): Promise { const { wrapper, uriHistory, error } = await this.resolveUri(uri, { contextId: options?.contextId, }); diff --git a/packages/js/core/src/uri-resolution/resolvers/plugin/PluginResolver.ts b/packages/js/core/src/uri-resolution/resolvers/plugin/PluginResolver.ts index 0617587d28..022452b01b 100644 --- a/packages/js/core/src/uri-resolution/resolvers/plugin/PluginResolver.ts +++ b/packages/js/core/src/uri-resolution/resolvers/plugin/PluginResolver.ts @@ -4,7 +4,14 @@ import { UriResolutionResult, UriResolutionStack, } from "../../core"; -import { Wrapper, WrapperCache, Client, Env, PluginPackage, Uri } from "../../../types"; +import { + Wrapper, + WrapperCache, + Client, + Env, + PluginPackage, + Uri, +} from "../../../types"; import { findPluginPackage } from "../../../algorithms"; export class PluginResolver implements UriResolver { diff --git a/packages/js/test-env/src/index.ts b/packages/js/test-env/src/index.ts index e2e8d0842a..c1bc32d15d 100644 --- a/packages/js/test-env/src/index.ts +++ b/packages/js/test-env/src/index.ts @@ -371,7 +371,9 @@ export async function buildAndDeployWrapper({ const result = deployStdout.match(extractCID); if (!result) { - throw Error(`polywrap CLI output missing IPFS CID.\nOutput: ${deployStdout}`); + throw Error( + `polywrap CLI output missing IPFS CID.\nOutput: ${deployStdout}` + ); } const wrapperCid = new Uri(result[1]).path; From 5d81f471d2e8096d370c9b1cb7340f1b222cdf41 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 15 Jun 2022 16:41:02 -0700 Subject: [PATCH 10/17] update ens wrapper embed --- .../client/src/__tests__/core/sanity.spec.ts | 3 ++- .../js/test-env/src/wrappers/ens/module.wasm | Bin 265432 -> 265431 bytes .../src/wrappers/ens/polywrap.build.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/js/client/src/__tests__/core/sanity.spec.ts b/packages/js/client/src/__tests__/core/sanity.spec.ts index 70d9c4ab92..24830635fb 100644 --- a/packages/js/client/src/__tests__/core/sanity.spec.ts +++ b/packages/js/client/src/__tests__/core/sanity.spec.ts @@ -1,5 +1,6 @@ import { coreInterfaceUris, + PluginModule } from "@polywrap/core-js"; import { Uri, @@ -87,7 +88,7 @@ describe("sanity", () => { { uri: implementationUri, plugin: { - factory: () => ({} as Plugin), + factory: () => ({} as PluginModule), manifest: { schema: schemaStr, implements: [], diff --git a/packages/js/test-env/src/wrappers/ens/module.wasm b/packages/js/test-env/src/wrappers/ens/module.wasm index b7acf38ee0bcaff1bbf249a31bca111e9956b9cc..b2c1d6fb85f2d089639d7a2d19b73fe3ae7fcd51 100644 GIT binary patch delta 17026 zcmdTrd3=o5+H=mC1e1giV$Ei&qDg2=t~EogRZEN8Qd<{lPgHBYG1P7(!&@FpFer*( zA{a}^#8O)@wjw4nv9(BYU5-*)k7{8{`KpN0!!m-uvuPvb=~D?W{v#BcFw z%oM+^{L|=tntxf9wJraFXxUrVM&wIGhXh(rt7@>SUZE-<{x3}BgP&ScO0#G`%B-hU z5ZQ^%C6<)TR?8_8HLgtp?km+ciWpK_wN3Ua<;YfPjX5f9h>{mpQ3>eOfEuo*wC!}1 zdRekmS_gFXCsm0rMKeb*UkjpJ99R)+@}Zh?P462x!} zk^M+z<=SVvQjYgnT7qPx4C*tHkPPK|->$@(@@~JOOyjs$Y}Y-xE9Kf}H3)OuRY5{` z(njh0MLTA6s35op>7e9%QH`4Nl*to6_0ru@X)Q|sFLhp~T#o6`o}@dmfTbsCgba!u z*j;1FlNadjD&68PC~F6;BUYvJSCf$*>sRskyWikJ_<4BnVruwJ`E1BX8tZNMjHI9ewL(@m5_!xgzg)(tueK`F-s~8Zf*1pwNOHhjHXsx^w`d^{tmCavzD+glm zKBXY$O-XM`z1ZbcQdPC_`v@#g_5WkeL zZ-x<#<4G~TKM{Ptq%r>Cp5O-{`a8$qu?V%}KfKId1)&yY&)9IByFJ#Vv0p_vN9Gn} z$KaeD3SwwaZ_A%}(9@LQ@k0o+KX%H|I-woYZ1i^OXtITb zC|l00P1!x=Ga~g|37c9K_cfpTt`}c~K48UY9Ot^nmK8B5+6Kl5FHWy9<@hv0nC^y3 zvFBG%;#T(X(%n>PTPR%%8Y}**{OC=U5|&v(Sv;c$)!kGaGmfEl?3o#ls?%}SG3IxD zG6_}Hp{hnyrL`$xb1M;hN|U)ERHK_hT$bd*Qu%G|Dr%ad%v+aM1lQOfow$P5n?xy= zKbs-KF~?j$hc^jV92Z(4)}a;`*3Z`yf&j8{m^a6F4nc%l3o^nohj2{$FE~XF-zg0i z9+T=lAGmgpJlI&#Lp(K1Q*t(UOc}T+haf%emmGgl0zpdir4hJg_|iAL95ac3kP=(I zg>qr(CXI1A(b{Jdt}C3hlue243AIm0x+*B9>l+Gbqn4{mi>dDv3W8d$D8IP@FG_+E zq^Kg7f}rXmr;3Zg*GZX>gP6KZlzEwz6yKS?O3JEL%sz`KduO&$maRtBL}qlF)gdMF zhr2{$(!W#;$U4J1OChF6=S!s!y8acVz*#_ygS3)y~3KV~&h+<9UgQRs-m++z> z8c~BmnG0=|MVoQkyp){HQB-4?|0250kF28B`Tq^AxlfB}O-iUaoN#Qr?sTe+60(cy zP5#41)T$`N+E%&0s~xp|uNbTyQ>N`k4(k@ah_X=hg|CM4E3;TIHH~qUJ=wgU2{y0V zzm6K=Wo))A5^VnMU^{AAEYx0i2=TTrc@b~UYSYqJ!~2yDl&eNs2I?jH7&K1dUlJ5U zX04QEC%g$q`X$^ZrukOxWD=}HsWU!3KhxdUf}wIF(favov}%a$MZ*-`Sq-}IIcJ}0 z9LtLkl(OX$(@x=4{LLjb7X!MEkj!C7U&`FfN`zWhA|>xCw#)HO zj0<(gu}bJptE_g^v0CWP`79exW477{qk2`#S?S!eKL^zfjxHee;87(OuEbp3sWGf6 zLKt`W%HwNj6l;*S;x5PW$*x>1XACBM+=to3@C)8RslxOI%#*GWgCz1@!4f0T~q z+-+_K8(u_m-fxKHhGGJ6D4qXwITa6o|8LCzedCpU>FpnI6pI+a?_Ri96?ErvkSj2zx%@ zEfBB!Y@L^B9q|uQ%IpkM9z0u*1T1^*Bw#^HQbhA>g4U0OEwB&`u`W1HF#j|6A|x8K zsjV;20fW`VOpFlbMGi@K4|lvsRUVmQkA*2Qe+J0t#6$0Bjb$#zxiD{^P;V&P8S}QZ zr(ST;o4D4XWsKGswiT`kB;}#Z1X>bimmvPmgI1Ivm|%c^N#cyv=J!exioqJ%l_JA@ zd9+?wLhFSV9H``6Di3E%kvGww!Lw3iC~^pfYDhb3+6Jfhl0Z17Aw2JZFdt&~F>WV~ zsM-g!%<53~YZ?F{zGSbIG35A??j>E`0p``E6%@lRf1f(;bkqvN{RFG>{YV$jntvJg9VL8Br2JtS?N{n0>GMZo7UDz67cWnwnROpga>v$| z>oyG_&hz5O`MxB(u2r4%*2wHyrF~XH2^)_atCK8^4yknP6Ui0SAVHk^9W_WVXC@AT zHOUN(9VNxZfeF~UnuI6ohiZ~*Z|dA&mH*q?sx_FFwDqG^d_tMFnoAEtG5g*Fr)!a` zqSkYsvbQ##;xJ#XO)jd53AWWE8+}C8n8ikxE{=V_aA#-XiM=GabXUEYqDGQ-dxTRrZ(zKk&@v}LWrQ`xN z3}`~$fKPjpQm~~lnSi!mFAA|1H7|^dBGbUD2`K}9{~%4BqAyfFPJwPBLHLi{O^uuk) zG^#rSo!jDB^1`KU$z(h$s2yqTWj(@W{AD|W?#*Hz)B&v*_uD#>QHWBP_ep>JGQCem z`B_gA?My0s-Z_~$syzObb`>YWv;^&o?o!$RhN z+1uTEXa?1LlJ}gx)U*F!g2&j6(BN{dX+K66-hc=)kNPLxC(PH7O0<~-TDGBy%#upr zN*kJ@#Kfy%?{}mU^zKEvIuAAV5={;JTsj42^d|fM${k(eMy2KEgVrsIcPqs7A>qVs zUeSjP!bIbMJIL`C4b>fhh<+qfV?;O?q-&cI8uTYv^cODYML)x_vUhAfD7TFUD9^_( z)!6w0RA$`gto$2)hWogW;X01sYM%=q)8umm7y1|o`GViR2U>hVGV54ysVvI5EmoGc zNQCdH;O}W|D{V)j^)CgFRL|p!GnG3O6;0N}WLhm9~QrY&hihg7v;a zRM2`leua#%Al%7_@WHs;0-XlqatDIB4kJMghH!TWU4|ekRs`w9;T)9)o~ShRK*b6l z4&~$@cAwpN7$^TQ^c=>SUkGn991l0b$HQ^Cr4ZbFgg~YD2y!LJj$nxjzcU@%e%w<_ zZtaHwF(d#6kL0&;1CuCsjv*o36h~rip)n$y8y}MLNh}G$+s4I`NUFPF-WW^TV_#^e z)K;9w0{xJA|JS4hL4uEsCJDr7?)42iUgo$c;`d0XGnRbf;b_$o8}4X*!Jdu{r)BHW z+v+Ni(w+hR&5FbqLdTIvW-tw0t#=`N$Bfv+&sPUv3wO@kM zHc}goU7)U0G1dpe(+ji;giRpL7&fF}aux{%-2}|PWICX~NP}U=1hUYX6NJKuiFl<< z3?@$`)wusz{x2dD1K&8(4z0a=oHObAt)y^3VX$%&W^ML3o^{;-pGh+78as)n5t)!K z$L4Sy=2~tG&m)k%2$>Lki~7Kh9kd)&Sd6LB#VMpAhE1RE@Mfo(#~vg#pvzQ(y({zN zsVEzb<)WuBelo{QCjo>yF2nKBq%9nuLE2M?4SIh=I-2{q04Kl9dU02AO2_oku1Ya_lbSKCv<^ zZ^|^_`#l+l>Nov+a;r$6$y;>#02T;#VbNEKXbe|8*>%Wl0#b{J?8lG_mlqKuD)7X` zM2}?~lv;}VY&9=lO1hz6yisH$Y#2+;7*t}H6K9`?C;pYyYOOQ%?>Dt<2@LGc9$^%0 zA5WX1zTgE;byX}YqTq`O2(`n?3GSTq@&syTn58MPjw-NaA`Nir-{Far5ofy)9IJ?I zVI^y@zNrj7;%HrBfP~djHw#viE6i|{z^O^J4b)ge+B4lR1p4V{2eWw%X+@dk*Vk17 zWN^ZI7w+K9t_LijZ-7N#XqT^>Vhc4;d_2^^vR0^pXk#n{?LP7zPrtbqh_#D-Kv$L2 zG}qfg=AblxbqU3co~R{(=gDMiDW3Q8z_|*pEW)f2ttv>!%YN88bSbax>B5Sq^~+X+L?<-RuOjG)_9oOAz4T_PCq zhX>P8udI8e=v(aLjz-odV%>8m!>XkThUI!PEUz%hm`2?$$b(tvWjY)nHU5rQcz3}; zv=fVY?jh2dGQ<6s^M~mk5NJM!xIBidY~$)5d-VT=J=FAom$`uuy~$}F*}iVgs!uY7 zV)3Fb;$$%<-SCxK<#&qsGmSOR#UvTua?g-?ys(HnNBaA_lxqdmmck<28`8I8Jl(hh zJ-6?9G8Wy(wDaTxQp6FJmX7GppSdG~`WHweFY6=X9}Ee1NC-^7!1G4)g9{`c%ibq~ zeJ5TXG5uu33_tdgh7I#sOVB; z`iX#9QwB_j4;5{S_^UEtKD~eIErhMrFlJAg@Dbqa@G8zrKyQHtP zHF2vttqNJYF*^6(K)hZ^XU5b(b~~QQtfY7%6Y3CrjY#usRiKCv%&=ty_B86UnnD?M zwa{iv_XmLli+ff`={ZiIz+-B=PeUn1!RB-kX+qv`N1EGQcw^q6h3QU29ZZ*Gx>Nc9 zt;y4!0gt5kPCY^a7@k9LT`C>%wbGDKmtr3z6O4zPu$!f!>`(MP5)ZTMQPFM6dyLzR ze?WA7=aSsgkX)Z{y8(_TQkH%Gz)aT_f^|=ck?C~QTq7TAAg6p57x3c7e78U(JOxFC zZhKDZ;Pau$(5)kF3!MmUPwi76rz7oXwi6mosdXxptxmszCz*ehi2gq|t7<+}B$jTo z`lZZYnUx3!x68outE9DuX|?dpEe|13v`cvP;`05KpIIk##z+$C{t9N##xXzoMNGcaOZPCQK(wrX=RFq7J?14@t^ZC zvjd)0p*_90Uv`*3sY+L1t~QlwE!Yu|1xm0vG>9I>XB9JqikKUO&=mF>X6q^@US_t` zG8ZD#sJrPXTr0O*Zkc~=x4fqL@7t|#v-kXkKGcwIHtisHvzfw-c_f@umkU2$m@pq} z>rw7@XVsH#_c0$@p=EtJ+*Dtx3b$OLD$o33z#ph8bKaueDK(^;b0Vl#jgqbL4*iyS zd&*#MV>;C9Rr$W>R!F7AJvXCiG2ThVO->6>Mp#f3~OamqZbH7bbH1(}<+ zq5EB)N48bW*j5Q8rLZ}~n>5a{7fvS7Vdmrxw2}Ii$a-l4{hy?PTwZA(qC}i2vmh>` zT#@#)fSoEQvzw2)(*)w}L4tWxPrAfKH+=9hU5e?;t&gcY;VavV^1zrrgf=!W>qXbN z%;s+!@h=nLe?q6AVM{<^CI{_XNqw|_F7=T&;>D`%0g}?qUlgMhkkawyDTBBeT^Ss{ zv-B}tWNtkeBb_tQNP5jkuMcy*1cE*(7#zcCwhO?W5!@d^Z7*-sL(LeP{F0VDf8j;s zCc398?X^w<-SUOX;*s{ZoaOWY56eq637Sn;7UqldyhNYX{Dq#n ztHVP3uTj);(D)B{K0kQfwia3yIyHCa%GJ-JhHX%GVbORZI$DljA!i-^uXVJ9^<-55 z|2Y0=D;^sP&Me(tL4*&FwiYvOBj7uU@YjG~=2D7J&~BPrB+|1*8Dv|Iy6U#IH85`n zw%**OxOuvfe(th5Y-)L?-)1bq@4GzBz_qlSXJ7E|s~r2fLYBI#91PKaS>=fCV&oNf zRr=WfVuUh2u*7$wY^}JQ|UjL?KfvhyQ5f?32Q0M1b z+&6d@E6vi~;Qw{8!VJ#|41SXey=qNr4uE}lT%6Df>{BeZ5=6Y`dD7&YO?rzBJ<{hkIk9;2s_vlEWfTZJN< za)S1C2?Yfd1neZWy8tMqAhY)=I?~&jLySL9tGWxtqD}G9&}RbHm)3jk7Y2kV%s*ox z$lI}~#-K;8=QuRg(81&-Y*j; zW!=9xlbgMGa2^UHFT1P8DVJ#-f{n;XKhBn%`R zlAqu^nES8LFgl+v^F*9VK^U} zU>Oe4N)Fz`#fJIt`#o9)#h!`^eE$Ioi%gMzHab1^ga}W8ZmzBLjTNM|RNT zh}U!b9^fSoxGpCvJQPctJrqla^N|U@=OZf|;v*~M@)17%eS{+;y!Qx47Wjsb?2w2f zs+(#)`G_XB!4yQ-lwIUcWj|@bx?-!`yrCuQf!{l{Y$_>fxvbLOQEN*dg1rJPVBS~K0q>j%rYox2z`39po%f7k*Z;;ajG$@QK|u| z7*)9HOVw!AS1_+P3yY|)QsHof>T6Ym>Kg=qt$Ih*2$%fTrkvia;#+k+Hhr!73Qv9e zueX?MeabEc!yP^IFH`JPd>q7TK#K`11o};2Igv5L@L<;;!5^LRUmPMoSoIm=7hN1H zzW*KA{s}8X^H0F!$t(auzh`PloydY|(n$%qH<4ARHs_$vzgRig?5*~v`crZmA=ODL z=>Ek9(nPC-nc{GjUmWwN8CIC5$79oU2zf7#g;M=#xkfh@FEUJGrC||Z*rc42%jx_a(TEsiD{_qtVAJZ3ZmevLlhFv z6@_S^kB$XW+qt6qOGCfOtfVGN^#%$@rPZHzlhTl86b`CD=ww!j>VI}mSAjtYK|FPn z1)lg-h-YcYnvC=&T_}E8`6&pty#RingY_5P7~|cAgJ3v6g_S3IXz(3t2-UvB-x>UO zTdL2LJM=g~GcsZFzfcNizhfV=q{}LZz03lu{u{-p0pq8#5T;GE$<4`A*@rYA2V6~1 zDKt>Ngt{`xk^rGMA5CMy%$B7Bzh|rp#7|>QXwnslN7gjfkmQ2@bXJ?{vmt6anx_ro zr!(_A`W%(dYisV98E(zZ@!;g48C-L(LfPr8BIM6trD?`hIUO<+6)PVH|H7GGGg)V9 zyT+FVfN4Baml=UZ{smgH_|xWtbtY>>ldenTtIlE#S?+Ze%v*))jVo9*+?a+GK3~r& zc%f?K-Vn!@_!>RL=c))On8jLX%#G~==R+~9>5nLh;2Vf7(x zH@@%mRNOH*An&_&7TT+ z=W*HjC9E&ao#w=3DGEV99nx3gvXM)<|C%oMG;y#d;8@D)ph;9tWb4p_q$jd(S;i~^ z$q!g>KKF)Nn4D!9sz>f@esOuoU&f|jyqL5cVTpPuyBH7Ny_{8N8F~WNQtCi>v>fqF znk(-_UsV$NuV8g)?p!de!UNFcN73APd0HJKn?myw+?ZD>qWPxIhyL4<2V}q(u_n^>&Y`bQS|af*QHZ7B=I3kC9V9N5J5Q}eW+Wy`W-PnwI=##~)_@yy(lS2N&_m;J zCW2{GmrL=^{t?A%TV9kDZ!rJJgXjuQ&o?xGg_H!wY&G;-&%$Y{5geP5N$b|L5j1rr zR7pgA*KS}FscltpIyY^^geZC=^P;xZFC`Wigi_lN5}%tJ5uf}Y1@+&>b@4A_Vq6lL*v)U|o zJwB-;sBosutOW}D-e&IDH%eaWx1gG4Kp7JQYTG1X{x=aJiwTt=7g{EBm$#)Trr|VW ziyOaaD4mS14z{wg$Z(S+9+g)O&9`#CB^SrdwY&^2-zxdhDTT{ttE6mX3R0$r$Zg2_ z4Jk-+ehQ>7L-PsRhCw578#LI4;?i#iZ6=yY>Nd6tiR!nV6J?gS4}Z!!arLW3wW%<2 z2U1|$DbL=p11(U$i$MB!=t`@_utwlGhnzogm}8&2ORj2f#<-oh8-|%#51P9h8ti02 zU^k<(B<_(b{B{cNNA5(wlkbFK8mWd!J9#pYD)G2=i&cYDJ5i65_Da^G=beJs?%RcO zvF#(!rGQn3QoAuurlt`dN!qww@;lUqO=s?pgo60)L5)mI=Lc7U?t754iTmN;9@Yb* zQ&|O(P?X?VJ?8e%KNauok&4_(I>1?15p=2OB)0Q~t2sDVfCJzd4uI`t70Pq3+6r^_ zL8=Z|S&Zg3bx>}twijiSaZu7NQm)o}k;Z%{_kc zwJ6*)HjpJA#m7t|(a)qFm6K&H{2J$=Js%_wo3AgTb{goh>_m+~qe zKl>IYR7o%|oy|Z(EAMBu(O{zY^W@^B6i2@W=)4=Ivv4SVfHg+7J_XwStP89-zz@fl zv3c-md5ATGz=H@$Jnc3fH7q;JBqnqDl>Us|sXl~*{4?&IpV8d2#W26mmtg%Mf(6GM zHl(vC81fV5|2A0p6XKWgGo7wML zaQbf@L227Aa#TKma66iM^CQd;j3=27&A22*dEp3GDtzD2NoZ|IJB!S1auj)Gg8@f* z+ICrDilJc?!eWncSeCf7O!*>`&WF(BJVafQ8zvq{*Pog#O@U=#XwJ`;#`Jy$21R`i zoXS8mwTbUHA^HNEbB_~9DW>GENX)abx^U?P76+-?ves+Q@XvMtN2K}sDmY9k2 z6kv%J9Z(X!cqUSS^Hxj&^tYsBo1Nyq&N;yBgva z$sw^rgao7lX7qVdSC*VdT}jQ8lG%G6i>-Wcoaaoqk6l!}anjFtW8wpOH5 zhVz$M87N3$B{4I>mxwH5PzwtMm2iox=@Y55JNN*TaEvBhpmHW^YCc3~GBZtjDiP)) z1pmuC=H`1a?E}CnOr*8~H9QjonZ7`>79%iGIGp0doDRnKDi!Z$KvK)5Ug{D@>VWE|}HkRxS#iZ8# zr`6AZ%|zW$*bzE`b|UMV2{~6$r%PVN5??=y!t(Jf(0>F5q2cbTHVNNjxQ}ZVUPXUx pgI!kzpY2!CZQEv3NL#`J-4)BoYpkdF#5H!4lCI`$H(AZv{{u~k%MSnm delta 17019 zcmdsed3?;**ZGt zYd+GH=#`^Qt;DP(G~4NCKd#bI#n3EN8PxoHVo=Jo_=%X5{1*QqHl=yX#yIn3%k>kS znX1x(I@3@5)h1r`C;5A`c(sdH(nU~hC z^I_^|zNpgKp_`Ue#rqm|?da#cj7yccuJOb)w_6)IOzY5Xnp$JKs?s@g@b@Zc`;t(G zV`$iyR8}s3v@PxEyNgSZl(Yf8#}ksGmvmI}KB-0x1xoz*5B==dRXUT>?^C^>!J*RGU{FuegP6eDlQbq) zW%y@3G=>6sf&He^J?^Zsa=_@BJx`0=fQZZ(rm~AJn5$)v+?TwLkHju zhleggBl~z*4~^|t@1c8!r3LDLQ$;XwWPQkdlT{3fQ0rc7rz5CEb&O743H@?tIc5E) z{>r{syia))`-0>*t={lts*A{k%s1yY~S<0LkC_H6DwzR{rEF*sI{IN!c+v8lPPsZPr*X z;XMDn3c0cP%nFZUX-|LCA1J~<(!$0LB+Po>tw-Cq_RRj!t;dhYSEEkX-{|o*`bY)8 z_ayHGxFlirn`zzS<`N_!f5MU?+EK%@N2IE{nE}mP)rruPNH)LCpHIN{P%WuPmDOF124#oYRir={u&+ zM$73m;|L4hA5S7wb*QQ_Rq4`|$izy-n$|QioNDax#N$XFGL@Svms7(;WzMSIKE#@o z;Xk;E1)V=>qFDcEj(5Z!@k~1XNwnfT+ZxG^uzJXTvYHT_AZrKvbAo3Pq_~aXBQk3s zr?lVv6Vy3TX|&*owC=gUjeFSs#;ETEm`$CNmAv(x(mq?5NAR`|-yVHd386}h#SMfK zYWvxy6K$w6yj)A=?BaDA{Zyi}&O`>U0%tC5ov{O<)~U!@dBvQ+rjR>ox}>z6{7RuN zs5wWu>76J}8G@^dTor<|bDT4&3$7)%F2th?M46LSNeP-Bq@*oh&a5+tvU7S{WyuP( z&Y48%JfmY;!|!epjUk~}Rp3R2Rn|gUk<(%{VNxPiKc^vWnVg7o!a7Oi~h|ow9H}ZZo9it#3j#&Nn`5#DF$aFX3 zB>PHvFB4K;zIPSXLvd0zEfi9|xxYO%EfRLGKY(;wzkQbO7C)koE`A=m|ACKk%h;WP zW+^OqpolR^iXp3J+LB}bgcDtiw25J^jmMcJ+aT)BP)~m95oEfd(yb-BV68@{hT$L3 zNJW2AgHAo`X$wTH`KXQiCpb=RCu0{b6(BWfUzSyYcTScmY7wE zQ1de6yl>_VNDT=7<&&Du}&x=_&20pzu{Txk33jTts9<)`sZ^7K|Pma z=SN;=5I()nUyxq+@hU&VDxwWnN^cES?mk|PEG&8AW?_CSQpEaefG(Is&bJZ`G0#6r z5CvL3AS4Dc)y8KyfiKj=Li7;nM-Iq{4>$ZsRi2)PABj|A{|J#Oif7=F8dD-ByGZ}Q z2!ANk1<~8?hkkI*pLo`wcZ}3H(+byAAmyO+I9d{BmLOX9K}$;z1R9_%N!%&h@j05Ukpj!An#37sE$aRnvsd^tE7KwiL@29E>CAe0ac(vbGlun97Ek_vD{Lpc0^ z$UtHb)Ndw@sX7p`W_2j@B@Kb_AhJ_x8S;WikCL7U0dwlo@`_=bHn5Htl$v2kun?6i zm~{2645)oO4AGJfeuf=H)COU2PD?(f)*TSmp1cC*H_|{Qrkh$V9(U*#W?5c_*eKI) zBTz<72SRQ+^1fTN;j^&PFhS;4;<0kuY1#zV%_7aIDG}ng5l^5g=t4&lGwkV0Ju3?; zkde@I7AXyJ{b+3o(!f-aY@+sU(62v@_A_ip0xcw+RN~U?{x;>|2eegCUMN45mrT8n zOF;Ma1RW$FN>>#!wT!PyKF4CEc+lJ(%weRC68&{U`Nldjs8|^Nj(7~SBgiMk18Qd8 zMHI*AT5{dG{=|LY>@h*bpzNB}NiU5=*(%-R5=!J)+*qAl)Y!KXooyFd@>PH+63W@% z5=B06BXX!vgG|#{xiat<*Q}~RIA}jmgIs>W&Lt$KRoa(zRil`WvLZ(37CTMNJuajnO zj^28mZ1uD5Lyo`}#VSE`GZG$B)+;#5uiJ-QL64?nC(68RGdxefpU?DbMrLqNy3x$z zNzkM@nSxC2YVMU-Pz$n^*x*15@3xSZWCk9zq@{P}2F_6De)y`D_n>{P#6cZn_(6ht zh`|{fgzEUVgZ%zMI-D^>0iTgHwrWjwQu{%8+!_y(+um%0i}aA$#(Pls8{+8i-|)`d z1Jv&# zMoYWkNWY+~`8@lr9@oAbuC>Dt-S|#R)$U|Cqo$p1zz_r* zdZ6{0q1wA-0JB-i+)sOX8xhT+dQb9(JEr<}BMfjKdlMR5t~2Zopfn$G5|pblHo3gdBcXHBQ)qsvNU?MPnX!98-1lZ zKPOW9FsL({yzdiv)siqCd4oKW7j<|E468{k(3dBr+yPW%`xh#bAcz=48Zzfn0*$tl zn$VzvcL^r`Ca`Y|!B)qDv0j*f$-fDV7>h8$b{;ab@zf({spnJ#0b%g)EUf~O<4ALf z5fU#V^wN*x(2RF;AmJPhgDvC80ykQSfT82@P6-*}$CGM2Bqe`C1Y`(`BkeH&^oVog zv704DOp1hM>+n>290z3i5I8{sve6R|U^vgi9yzu|>k)=|oxXrT?m|poVb^FNY}rD~ zLit6An$ArmFA=*Xa1!3^_Wa@dNfdOQOt8IWiJwfuiN<`+S1AWAu~SJ1mf#oQ=t$BI zj!q*Ts688cjUt^aeW#Oq*oe#dXPC>H`!wcaw(~+KFS|ANZ%~&2?xzA^mfe%VYI%FXdlWbWX!%Kwe|24 zrdb2nf@GnddRZ#(kIOPE49F)p5XRmwswW;#+=0vkevU;BiJw3q(sJ_@*-qTP?OIOeA*7i0?u5xaWQ@1!WH690u>1^{8;Wg8R77@H@oRcdv1jg4FtaO+Fw4e2t~|?+AlE$yoo8 zn3(eku|&DBKyu@sMUQypW4ZN6K%YlN)t>!?)FIRs58XS_cF>v74%9Xg@;cE@7CWKQ zlv*c4nd)>DJjnVpX!`$$k5vn#0&RMI?3dDi=3^pFTrUkzE|E4qe%3M=Pe9FZKNCxw zrD0G$rrv6$=pjaJQ(#yF+7(_YOGEvgQz&L!_)l3n(9e8JrR@Yw8q(@;wJhC1^5MG> zIxxyHl}1qhDQEUnil2At=vR@H_aIAp>Jy#a(x@CAN->w1D$s^hW0--5%2HEQriK|% zFob4l%sB7<@X%e*KCDc!mcnWMOx)uBaM})!tI(c)qBUlDzbajd0B#c1nXz*qtCuiK zL?}H>s9~D07E7aWn#P{fg$oOe;(VAlDI4yl-X^7pwA_igoBo9pW1aK=#EC`Fy{#1n z5ha7}?)?~a(SNy5^AtI&F4umd@Mk{O)uTKJ&!{JZ@O?fsL#z67xURmm74F5tRvv4i z|Lzi<4){T8&br`q5!>c0a(k+%h{ z=_Wz+&t=>lUx_z)I2zmrEyNv;EX~@|y`Cr}`!5#kzeJD#>>}}Qj=Ly^<4JU|CAA}M zto~cJp2gMwm1g$tw^1K%BrRCWC|jhNE#^*?m7wRH9yE#g`!HZx*OPwh;Tqn0k1j@3 zbL~Cq#ero$pd2&r8AxBVEct+b@9~#pRYibh zh*I!b1u%U@8)HU1`xPxoJk)r;Gh)Fab+r4tEuuVSY90Tqt-4Z7bvi=&*S{)E%)pOkYg#lea6D zmPUHAsGzcw(Q3V3_dU$nf}J^Ut!|lWq91$w4_jWoHM#|B^gEuI^Vv$;-M4M{SM`q> z?5lij$zA_ow*J%lM>HQB=6DO&e^&unv}AzQxQK<^SN(@!vc6KWNFBrV6@1Vg8g5jChxMrViX7J1I7Jwi{QWXBz)*9uiO@fhvnQ3@(36xeZ0Ebf$yS_-xJpPwOKc9y!MKmV{?^vQe5;;}Z2 zIp^)6qfR*TBIkY8vBvFxSVX!%dLNSItt=O1@c*CzW!j>=8V!B>W^AQXk;gIrrw!ueo}f<;qk)IoDlcig6+|waf7; zy9__Q^XN;6L$AV|%XF4Uu+{Uu<_|Tmc;8#<{7g@JU4dMqG29heU#DZ#$a?xMtWE6k zaO)PWN$pdh{B7C**=T#4)}qc?FoX{cump$Lh1q`_7dz*`Z?|bpWUiW%@0|}_oH#VW zNF3tq_fA}Eh73Nk!6QDhL5%{w^E>ESAa;)DL;Gr2k3(u-52p*nt$ugJ*7|qE*4}b7 zS&laIkpZ&#$PB@Eab$;A?&3%fpYo9n5^zMF`LOFQUSfxQ`LO)2VrlbV#nK^sWP*8o zgkKNfBP%%g$PS_RaAbft?%~J`qxi@MMjTP+B+K!8G_@@XPT!23<3-*3Em=1%$Th9l zyZCpDj!h;d%@rsA*DSlm70l_yBH=+V78ErKXTDUuqH2s! z|7>+$FIMrzIw}=zABu|`;P2;nB z%s3Vfy~nZ3pnSv1gm%Vj{&L4FOy@WTbK+SD#LQ!A$QaMUsPVX*c`}|=ry1_SkZ)L7 zSm&?SQdi+jb&>*xZ`fxv!6vs@<8W1I9MjTt8>A-Su_yF6(<6>WP?vj+el%WWn!rlI zV!kjX)4R1g%`P02g@6f6OA?^_1Xc@T`1^GJzAi=4+fmIt}rHPW)3yXDPTDkNg_XK7Cn@i8!6{%ych4?KglxHa z&t&#Cb>M*83R;E+LQ1GBQR789Bdq7+DJ+a-TvS2OV^#%{r?95fm?KHPIfcDMvLRwB zt3_Qo&|xZiWd~z+JreEgELclzhsY?%44O4xB{wIEP+2EYc8q?M|wuY%O& zxZb*y#lXEO$WHhgR-OwasriGTXSbfOdj$eMNIuD&D{ehR_>eTUopHLCT&BKWE(L7dO+CYC) z-2hae_(7GW&SUME<98LUe2+qB%WC@SLJMLi(VDo&| zfax+GN~(HoV_~p#JA04Q5{M@2@=kk z^9OSZ%J0Ki7VOWR@CiQN%o@QHU_EGp9!$x|(cp!w6pDS^LLPwQA#Vv95mzJpfe-4W z#FM~?YK7`lMdJG){Edl`lP3OGmjMkIq4m4s!LS?8oUjO;C3_+?G@~$oS%m6yOoDDP^H z6-K8#BN|D{4A5@C3*ye9V{w-GqS|UCCk59&H! zp;}I?;C#%NGz&v7^&R?-Yd*i^9oX#Tzy4j0v+ z35(<`MvgFU0I%@9;Y^qCt)#F-A$>xClUA~x%=Ik+a*Mqsj%lz8b>dnqWnsMKJ{)Ho z3FBHqAo4cr>sgAnY)qD#UGoEKHa)p05B_lW2TXg8WX{Man!Qx2K!mRet64NPnxu9Q zt!6{1aTzoxA9Jufv#@@&mu^B`(e;aCIH4 z%A@w2^{f`lSWQ4n)D^(Cp0z~XmfpZ4@meXnlnrQ(DbT>ofTpjLbJ=E`%YeSAJX)QfQ8JK}hFQ(A z5xQ?egE^9htYxQ3uQxlHT000c+8B>5=v--h-6-nV1l_aHAF?;G<;c#2&72*Jyu8{L zHUj68wjk;0TjeE3wy^5Vv6VpPB#eXAVp-z_r%})s4{@q9w#h}GTaXghHb}6rcWK6U z=)RSOF4)Sk&~~}t#jQft-L_(A$=)I75F4st=~kYz)8+kFud!-ydn=l2!cH=usCC{z zUYqKSkh2Z-k-m#Smq)BRys(|MMq&qV#|)5e^^tS^9cXhd{Ice9^hm=KJkqcOv5IRC zm0nxnN0htqoD{7H{Vje(Gsrl{NqGxe+A$2g^&<-g^KlkP)6YvC z|MDY;X!!jzo^6rST5#edio4Tclwt;caRnVWfcPVP)kQ%@>2lK6 z<*UvC4Ub~#O3Cpap$5ZI3_K~h(wRasFiSXcWmM~xff*B#d2WUP>Ny!0!n>WtK=A1? zWZ!s6uEO*z5LjKfb_~IO%4Iq2!G2YEe2wPMUPa88FR0R%FG5vzzLb)1mWRg?2_{@Y zhY!L4JTk={dxoAsYj;5W2~e6K0Q$8&ZB1i%{wS>rd#bMu!ASrB5PIayj^= z72&IssNR&D@(j#C!X*1}Y%Nesx^Qq`s-todCNu8K8plVN*JzDir7S(qt@VL7 zJo!V$c@{)n4|v+?3NK`#)jFVC78ZEMhmumEvxp0*iv*XCsD=P4gd2)*Bs{k?)45zy z5~Z@aCq43s_OE7Rw9kIz-QQH~>Xs|3)r`lIpxfCHX2Urb6#LwvrmBL%}87R_PKJ Date: Wed, 15 Jun 2022 17:12:21 -0700 Subject: [PATCH 11/17] fix ethereum plugin tests --- .../plugins/ethereum/src/__tests__/integration/package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/package.json b/packages/js/plugins/ethereum/src/__tests__/integration/package.json index b10c6cba47..eb2bd1ee21 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/package.json +++ b/packages/js/plugins/ethereum/src/__tests__/integration/package.json @@ -11,9 +11,7 @@ "deploy": "npx polywrap deploy" }, "dependencies": { - "@polywrap/wasm-as": "0.0.1-prealpha.85" - }, - "devDependencies": { - "polywrap": "0.0.1-prealpha.85" + "@polywrap/wasm-as": "0.0.1-prealpha.85", + "assemblyscript": "0.19.5" } } From eb19dde1aa605e20a20703ee22857b3a699d25e3 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 15 Jun 2022 17:28:48 -0700 Subject: [PATCH 12/17] fix http plugin test --- packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts index a611f67a21..ef2329c01b 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts @@ -1,5 +1,5 @@ import { httpPlugin } from "../.."; -import { Response } from "../../wrap"; +import { Response } from "../../wrap-man"; import { PolywrapClient } from "@polywrap/client-js" import { From 17bc0b88c489d3db7b0533971a56e4329f899d72 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 15 Jun 2022 17:56:34 -0700 Subject: [PATCH 13/17] fix http test --- packages/js/plugins/http/src/__tests__/unit/index.test.ts | 2 +- packages/js/plugins/http/src/__tests__/unit/util.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/js/plugins/http/src/__tests__/unit/index.test.ts b/packages/js/plugins/http/src/__tests__/unit/index.test.ts index 1bdbcbe243..92408db302 100644 --- a/packages/js/plugins/http/src/__tests__/unit/index.test.ts +++ b/packages/js/plugins/http/src/__tests__/unit/index.test.ts @@ -1,5 +1,5 @@ import { HttpPlugin } from "../.."; -import { ResponseTypeEnum, Client } from "../../wrap"; +import { ResponseTypeEnum, Client } from "../../wrap-man"; import axios, { AxiosResponse, AxiosRequestConfig } from "axios"; diff --git a/packages/js/plugins/http/src/__tests__/unit/util.test.ts b/packages/js/plugins/http/src/__tests__/unit/util.test.ts index 5e32775cb8..010aaa3440 100644 --- a/packages/js/plugins/http/src/__tests__/unit/util.test.ts +++ b/packages/js/plugins/http/src/__tests__/unit/util.test.ts @@ -1,5 +1,5 @@ import { fromAxiosResponse, toAxiosRequestConfig } from "../../util"; -import { ResponseTypeEnum } from "../../wrap"; +import { ResponseTypeEnum } from "../../wrap-man"; describe("converting axios response", () => { test("response type: text", () => { From 3aad1c9336e3f3682cb3a00089f44fce8a29b4b1 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 15 Jun 2022 18:00:57 -0700 Subject: [PATCH 14/17] fix http integration test --- .../plugins/http/src/__tests__/e2e/integration/package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/package.json b/packages/js/plugins/http/src/__tests__/e2e/integration/package.json index eb9d3a7fc6..d8575e7ab5 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/package.json +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/package.json @@ -12,9 +12,7 @@ "deploy:polywrap": "npx polywrap build --ipfs http://localhost:5001 --test-ens simplestorage.eth" }, "dependencies": { - "@polywrap/wasm-as": "0.0.1-prealpha.85" - }, - "devDependencies": { - "polywrap": "0.0.1-prealpha.85" + "@polywrap/wasm-as": "0.0.1-prealpha.85", + "assemblyscript": "0.19.5" } } From 76d0d6b9915e777ffb568d5eadffe5c400e85ab3 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 15 Jun 2022 19:01:45 -0700 Subject: [PATCH 15/17] fix cli tests --- packages/cli/src/__tests__/e2e/build.spec.ts | 4 ++-- packages/cli/src/__tests__/e2e/create.spec.ts | 6 ++++-- packages/cli/src/__tests__/e2e/test/test/package.json | 5 +++++ .../wasm/build-cmd/007-linked-packages/polywrap.build.yaml | 3 --- .../cases/cli/wasm/codegen/001-sanity/polywrap.yaml | 6 ++++++ .../wasm/codegen/002-invalid-codegen-script/polywrap.yaml | 6 ++++++ .../cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml | 6 ++++++ packages/test-cases/cases/cli/wasm/query/package.json | 3 +-- 8 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 packages/cli/src/__tests__/e2e/test/test/package.json create mode 100644 packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.yaml create mode 100644 packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.yaml create mode 100644 packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml diff --git a/packages/cli/src/__tests__/e2e/build.spec.ts b/packages/cli/src/__tests__/e2e/build.spec.ts index 56f5bd71e2..4630c29ee4 100644 --- a/packages/cli/src/__tests__/e2e/build.spec.ts +++ b/packages/cli/src/__tests__/e2e/build.spec.ts @@ -11,8 +11,8 @@ const HELP = `Usage: polywrap build|b [options] Builds a Polywrap Options: - -m, --manifest-file Path to the Polywrap Build manifest file (default: - polywrap.yaml | polywrap.yml) + -m, --manifest-file Path to the Polywrap Build manifest file + (default: polywrap.yaml | polywrap.yml) -o, --output-dir Output directory for build results (default: build/) -w, --watch Automatically rebuild when changes are made diff --git a/packages/cli/src/__tests__/e2e/create.spec.ts b/packages/cli/src/__tests__/e2e/create.spec.ts index 59dd585c56..54a4e5c134 100644 --- a/packages/cli/src/__tests__/e2e/create.spec.ts +++ b/packages/cli/src/__tests__/e2e/create.spec.ts @@ -15,7 +15,8 @@ Commands: assemblyscript, interface app [options] Create a Polywrap application langs: typescript-node, typescript-react - plugin [options] Create a Polywrap plugin langs: typescript + plugin [options] Create a Polywrap plugin langs: + typescript help [command] display help for command `; @@ -97,7 +98,8 @@ describe("e2e tests for create command", () => { expect(output).toBe(""); }); - test("Should successfully generate project", async () => { + // TODO: re-enable this post-polywrap init release + test.skip("Should successfully generate project", async () => { rimraf.sync(`${__dirname}/test`); const { exitCode: code, stdout: output } = await runCLI({ diff --git a/packages/cli/src/__tests__/e2e/test/test/package.json b/packages/cli/src/__tests__/e2e/test/test/package.json new file mode 100644 index 0000000000..47cd757a44 --- /dev/null +++ b/packages/cli/src/__tests__/e2e/test/test/package.json @@ -0,0 +1,5 @@ + +{ + "name": "template" +} + \ No newline at end of file diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.build.yaml index 7cb5d9b496..811c654ab4 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.build.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.build.yaml @@ -8,6 +8,3 @@ linked_packages: - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as filter: /\.(test|spec)\.(js|ts)$/gm - - name: "@polywrap/ethereum-plugin-js" - path: ../../../../../../js/plugins/ethereum - filter: /\.(test|spec)\.(js|ts)$/gm diff --git a/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.yaml b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.yaml new file mode 100644 index 0000000000..b8a9cd03c9 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.yaml @@ -0,0 +1,6 @@ +format: 0.0.1-prealpha.9 +name: test-project +build: ./polywrap.build.yaml +language: wasm/assemblyscript +schema: ./schema.graphql +module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.yaml b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.yaml new file mode 100644 index 0000000000..b8a9cd03c9 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.yaml @@ -0,0 +1,6 @@ +format: 0.0.1-prealpha.9 +name: test-project +build: ./polywrap.build.yaml +language: wasm/assemblyscript +schema: ./schema.graphql +module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml new file mode 100644 index 0000000000..b8a9cd03c9 --- /dev/null +++ b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml @@ -0,0 +1,6 @@ +format: 0.0.1-prealpha.9 +name: test-project +build: ./polywrap.build.yaml +language: wasm/assemblyscript +schema: ./schema.graphql +module: ./src/index.ts diff --git a/packages/test-cases/cases/cli/wasm/query/package.json b/packages/test-cases/cases/cli/wasm/query/package.json index 249d1407e3..5d5080e870 100644 --- a/packages/test-cases/cases/cli/wasm/query/package.json +++ b/packages/test-cases/cases/cli/wasm/query/package.json @@ -10,8 +10,7 @@ "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@polywrap/ethereum-plugin-js": "0.0.1-prealpha.72", - "@polywrap/wasm-as": "0.0.1-prealpha.72" + "@polywrap/wasm-as": "0.0.1-prealpha.85" }, "devDependencies": { "assemblyscript": "0.19.5", From abdd4d3b49302745fa345cd09500e550d15225d5 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 16 Jun 2022 09:54:52 -0700 Subject: [PATCH 16/17] fix typo --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0cdafa3379..df996d957c 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap", "dependencies:install": "cd dependencies && yarn", "build": "yarn build:core && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && yarn build:plugins:patch", - "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/clie* --ignore @polywrap/react --ignore @polywrap/test-env-js", + "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/client-js --ignore @polywrap/react --ignore @polywrap/test-env-js", "build:plugins": "lerna run build --scope @polywrap/*-plugin-js --concurrency 1", "build:client": "lerna run build --scope @polywrap/client-js --scope @polywrap/react", "build:test-env": "lerna run build --scope @polywrap/test-env-js", From 2ccedaa551dd2c3145d0b545ce40d53c3d6dfadb Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 16 Jun 2022 13:56:06 -0700 Subject: [PATCH 17/17] terminology fixes --- packages/cli/lang/en.json | 8 ++++---- packages/cli/lang/es.json | 8 ++++---- packages/cli/src/__tests__/e2e/build.spec.ts | 2 +- packages/cli/src/__tests__/e2e/create.spec.ts | 2 +- packages/cli/src/__tests__/e2e/help.spec.ts | 6 +++--- packages/cli/src/__tests__/e2e/infra.spec.ts | 2 +- packages/cli/src/__tests__/e2e/no-command.spec.ts | 6 +++--- packages/cli/src/__tests__/e2e/query.spec.ts | 2 +- packages/core-interfaces/logger/README.md | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/cli/lang/en.json b/packages/cli/lang/en.json index 708a48faee..bddbea1492 100644 --- a/packages/cli/lang/en.json +++ b/packages/cli/lang/en.json @@ -1,5 +1,5 @@ { - "commands_build_description": "Builds a Polywrap", + "commands_build_description": "Builds a wrapper", "commands_build_error_manifestPathMissing": "{option} option missing {argument} argument", "commands_build_error_manifestNotFound": "Manifest not found. Search paths used: {paths}", "commands_build_error_outputDirMissingPath": "{option} option missing {argument} argument", @@ -13,7 +13,7 @@ "commands_build_options_t": "Use the development server's ENS instance", "commands_build_options_w": "Automatically rebuild when changes are made (default: false)", "commands_build_options_v": "Verbose output (default: false)", - "commands_infra_description": "Manage infrastructure for your Polywrap", + "commands_infra_description": "Manage infrastructure for your wrapper", "commands_infra_actions_subtitle": "Infra allows you to execute the following commands:", "commands_infra_options_options": "options", "commands_infra_options_manifest": "manifest", @@ -95,7 +95,7 @@ "commands_create_options_commands": "Commands", "commands_create_options_createApp": "Create a Polywrap application", "commands_create_options_createPlugin": "Create a Polywrap plugin", - "commands_create_options_createProject": "Create a Polywrap project", + "commands_create_options_createProject": "Create a Polywrap wasm wrapper", "commands_create_options_h": "Show usage information", "commands_create_options_lang": "lang", "commands_create_options_langs": "langs", @@ -171,7 +171,7 @@ "commands_query_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri' and optional properties 'common', 'query', and 'mutation'", "commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string", "commands_query_error_envsItemModuleNotObject": "Env property 'module' at index {index} must be an object", - "commands_query_description": "Query Polywraps using recipe scripts", + "commands_query_description": "Query wrappers using recipe scripts", "commands_query_error_missingScript": "Required argument {script} is missing", "commands_query_error_noWrapper": "Wrapper needs to be initialized", "commands_query_error_readFail": "Failed to read query {query}", diff --git a/packages/cli/lang/es.json b/packages/cli/lang/es.json index e4bda218ad..0d994590e6 100644 --- a/packages/cli/lang/es.json +++ b/packages/cli/lang/es.json @@ -1,6 +1,6 @@ { - "commands_build_description": "Builds a Polywrap", + "commands_build_description": "Builds a wrapper", "commands_build_error_manifestPathMissing": "{option} option missing {argument} argument", "commands_build_error_manifestNotFound": "Manifest not found. Search paths used: {paths}", "commands_build_error_outputDirMissingPath": "{option} option missing {argument} argument", @@ -15,7 +15,7 @@ "commands_build_options_w": "Automatically rebuild when changes are made (default: false)", "commands_build_options_v": "Verbose output (default: false)", "commands_build_uriViewers": "URI Viewers", - "commands_infra_description": "Manage infrastructure for your Polywrap", + "commands_infra_description": "Manage infrastructure for your wrapper", "commands_infra_actions_subtitle": "Infra allows you to execute the following commands:", "commands_infra_options_options": "options", "commands_infra_options_manifest": "manifest", @@ -96,7 +96,7 @@ "commands_create_options_commands": "Commands", "commands_create_options_createApp": "Create a Polywrap application", "commands_create_options_createPlugin": "Create a Polywrap plugin", - "commands_create_options_createProject": "Create a Polywrap project", + "commands_create_options_createProject": "Create a Polywrap wasm wrapper", "commands_create_options_h": "Show usage information", "commands_create_options_lang": "lang", "commands_create_options_langs": "langs", @@ -172,7 +172,7 @@ "commands_query_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri'", "commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string", "commands_query_error_envsItemModuleNotObject": "Env property 'common' at index {index} must be an object", - "commands_query_description": "Query Polywraps using recipe scripts", + "commands_query_description": "Query wrappers using recipe scripts", "commands_query_error_missingScript": "Required argument {script} is missing", "commands_query_error_noWrapper": "Wrapper needs to be initialized", "commands_query_error_readFail": "Failed to read query {query}", diff --git a/packages/cli/src/__tests__/e2e/build.spec.ts b/packages/cli/src/__tests__/e2e/build.spec.ts index 4630c29ee4..b40f705b9f 100644 --- a/packages/cli/src/__tests__/e2e/build.spec.ts +++ b/packages/cli/src/__tests__/e2e/build.spec.ts @@ -8,7 +8,7 @@ import path from "path"; const HELP = `Usage: polywrap build|b [options] -Builds a Polywrap +Builds a wrapper Options: -m, --manifest-file Path to the Polywrap Build manifest file diff --git a/packages/cli/src/__tests__/e2e/create.spec.ts b/packages/cli/src/__tests__/e2e/create.spec.ts index 54a4e5c134..c8a0c3317f 100644 --- a/packages/cli/src/__tests__/e2e/create.spec.ts +++ b/packages/cli/src/__tests__/e2e/create.spec.ts @@ -11,7 +11,7 @@ Options: -h, --help display help for command Commands: - wasm [options] Create a Polywrap project langs: + wasm [options] Create a Polywrap wasm wrapper langs: assemblyscript, interface app [options] Create a Polywrap application langs: typescript-node, typescript-react diff --git a/packages/cli/src/__tests__/e2e/help.spec.ts b/packages/cli/src/__tests__/e2e/help.spec.ts index 3fa9fc5923..b4ee397923 100644 --- a/packages/cli/src/__tests__/e2e/help.spec.ts +++ b/packages/cli/src/__tests__/e2e/help.spec.ts @@ -10,13 +10,13 @@ Options: Commands: app|a Build/generate types for your app - build|b [options] Builds a Polywrap + build|b [options] Builds a wrapper codegen|g [options] Auto-generate Wrapper Types create|c Create a new project with polywrap CLI deploy|d [options] Deploys/Publishes a Polywrap plugin|p Build/generate types for the plugin - query|q [options] Query Polywraps using recipe scripts - infra|i [options] Manage infrastructure for your Polywrap + query|q [options] Query wrappers using recipe scripts + infra|i [options] Manage infrastructure for your wrapper help [command] display help for command `; diff --git a/packages/cli/src/__tests__/e2e/infra.spec.ts b/packages/cli/src/__tests__/e2e/infra.spec.ts index e3144dca26..09ab572bc6 100644 --- a/packages/cli/src/__tests__/e2e/infra.spec.ts +++ b/packages/cli/src/__tests__/e2e/infra.spec.ts @@ -16,7 +16,7 @@ const testCaseRoot = path.join(GetPathToCliTestFiles(), "infra"); const HELP = `Usage: polywrap infra|i [options] -Manage infrastructure for your Polywrap +Manage infrastructure for your wrapper Arguments: action diff --git a/packages/cli/src/__tests__/e2e/no-command.spec.ts b/packages/cli/src/__tests__/e2e/no-command.spec.ts index 7987acac51..057f42a800 100644 --- a/packages/cli/src/__tests__/e2e/no-command.spec.ts +++ b/packages/cli/src/__tests__/e2e/no-command.spec.ts @@ -10,13 +10,13 @@ Options: Commands: app|a Build/generate types for your app - build|b [options] Builds a Polywrap + build|b [options] Builds a wrapper codegen|g [options] Auto-generate Wrapper Types create|c Create a new project with polywrap CLI deploy|d [options] Deploys/Publishes a Polywrap plugin|p Build/generate types for the plugin - query|q [options] Query Polywraps using recipe scripts - infra|i [options] Manage infrastructure for your Polywrap + query|q [options] Query wrappers using recipe scripts + infra|i [options] Manage infrastructure for your wrapper help [command] display help for command `; diff --git a/packages/cli/src/__tests__/e2e/query.spec.ts b/packages/cli/src/__tests__/e2e/query.spec.ts index 8fa3da21fe..d3104013ae 100644 --- a/packages/cli/src/__tests__/e2e/query.spec.ts +++ b/packages/cli/src/__tests__/e2e/query.spec.ts @@ -18,7 +18,7 @@ jest.setTimeout(200000); const HELP = `Usage: polywrap query|q [options] -Query Polywraps using recipe scripts +Query wrappers using recipe scripts Arguments: recipe Path to recipe script diff --git a/packages/core-interfaces/logger/README.md b/packages/core-interfaces/logger/README.md index f9c27060a3..492e3350d9 100644 --- a/packages/core-interfaces/logger/README.md +++ b/packages/core-interfaces/logger/README.md @@ -9,5 +9,5 @@ ## Start Test Environment `yarn test:env:up` -## Build & Deploy Polywrap +## Build & Deploy Wrapper `yarn deploy` \ No newline at end of file