diff --git a/packages/cli/src/__tests__/e2e/build.plugin.spec.ts b/packages/cli/src/__tests__/e2e/build.plugin.spec.ts index 942756bf29..0d43180952 100644 --- a/packages/cli/src/__tests__/e2e/build.plugin.spec.ts +++ b/packages/cli/src/__tests__/e2e/build.plugin.spec.ts @@ -38,7 +38,6 @@ describe("e2e tests for build command - plugin project", () => { }, { cwd: testCaseDir, }); - testCliOutput(testCaseDir, code, output, error); testBuildOutput(testCaseDir, buildDir); }); diff --git a/packages/js/client-config-builder/README.md b/packages/js/client-config-builder/README.md index c1bc868b5f..e19093738e 100644 --- a/packages/js/client-config-builder/README.md +++ b/packages/js/client-config-builder/README.md @@ -484,7 +484,7 @@ export const uriResolverExts: UriResolverExtBootloader = [ interface IDefaultPlugin { uri: Uri; - plugin: PluginPackage; + plugin: IWrapPackage; implements: Uri[]; } diff --git a/packages/js/client-config-builder/package.json b/packages/js/client-config-builder/package.json index 1e4e9a0f78..deae495d84 100644 --- a/packages/js/client-config-builder/package.json +++ b/packages/js/client-config-builder/package.json @@ -29,7 +29,6 @@ "@polywrap/file-system-plugin-js": "~0.10.0-pre", "@polywrap/http-plugin-js": "~0.10.0-pre", "@polywrap/logger-plugin-js": "0.10.0-pre.10", - "@polywrap/plugin-js": "0.10.0-pre.12", "@polywrap/uri-resolver-extensions-js": "0.10.0-pre.12", "@polywrap/uri-resolvers-js": "0.10.0-pre.12", "@polywrap/wasm-js": "0.10.0-pre.12", diff --git a/packages/js/client-config-builder/src/bundles/default.ts b/packages/js/client-config-builder/src/bundles/default.ts index 448872b054..d977f29d97 100644 --- a/packages/js/client-config-builder/src/bundles/default.ts +++ b/packages/js/client-config-builder/src/bundles/default.ts @@ -4,7 +4,6 @@ import * as ipfsHttpClient from "./embeds/ipfs-http-client/wrap"; import * as ipfsResolver from "./embeds/async-ipfs-resolver/wrap"; import { IWrapPackage, Uri } from "@polywrap/core-js"; -import { PluginPackage } from "@polywrap/plugin-js"; import { ethereumProviderPlugin, Connection, @@ -64,7 +63,7 @@ export const uriResolverExts: UriResolverExtBootloader = [ interface IDefaultPlugin { uri: Uri; - plugin: PluginPackage; + plugin: IWrapPackage; implements: Uri[]; } diff --git a/packages/js/client/src/__tests__/core/wrap-features/env-case.ts b/packages/js/client/src/__tests__/core/wrap-features/env-case.ts index 88864f6140..4360dd39f1 100644 --- a/packages/js/client/src/__tests__/core/wrap-features/env-case.ts +++ b/packages/js/client/src/__tests__/core/wrap-features/env-case.ts @@ -205,9 +205,9 @@ export const envTestCases = (implementation: string) => { resolver: RecursiveResolver.from([ { uri: implementationUri, - package: PluginPackage.from((module) => ({ - mockEnv: (): MockEnv => { - return module.env; + package: PluginPackage.from(() => ({ + mockEnv: (_, __, env: MockEnv): MockEnv => { + return env; }, })), }, diff --git a/packages/js/client/src/__tests__/helpers.ts b/packages/js/client/src/__tests__/helpers.ts index 2be08905d1..74a1a0b003 100644 --- a/packages/js/client/src/__tests__/helpers.ts +++ b/packages/js/client/src/__tests__/helpers.ts @@ -46,8 +46,8 @@ export const mockPluginRegistration = (uri: string | Uri) => { methodThatThrows: (_: unknown): string => { throw Error("I'm throwing!"); }, - mockEnv(): { a: number } & Record { - return this.env; + mockEnv(_, __, env): { a: number } & Record { + return env as unknown as { a: number } & Record; }, })), }; diff --git a/packages/js/plugin/package.json b/packages/js/plugin/package.json index c7364b466d..bf3cdfc161 100644 --- a/packages/js/plugin/package.json +++ b/packages/js/plugin/package.json @@ -25,6 +25,9 @@ "@polywrap/tracing-js": "0.10.0-pre.12", "@polywrap/wrap-manifest-types-js": "0.10.0-pre.12" }, + "peerDependencies": { + "@polywrap/core-js": "0.10.x" + }, "devDependencies": { "@types/jest": "26.0.8", "jest": "26.6.3", diff --git a/packages/js/plugin/src/PluginMethod.ts b/packages/js/plugin/src/PluginMethod.ts index 0e4fd77675..0575f94ba1 100644 --- a/packages/js/plugin/src/PluginMethod.ts +++ b/packages/js/plugin/src/PluginMethod.ts @@ -11,5 +11,6 @@ import { CoreClient, MaybeAsync } from "@polywrap/core-js"; */ export type PluginMethod< TArgs extends Record = Record, - TResult = unknown -> = (args: TArgs, client: CoreClient) => MaybeAsync; + TResult = unknown, + TEnv extends Record = Record +> = (args: TArgs, client: CoreClient, env: TEnv) => MaybeAsync; diff --git a/packages/js/plugin/src/PluginModule.ts b/packages/js/plugin/src/PluginModule.ts index 38c2f5730f..04dbbd649d 100644 --- a/packages/js/plugin/src/PluginModule.ts +++ b/packages/js/plugin/src/PluginModule.ts @@ -8,34 +8,26 @@ export abstract class PluginModule< TConfig, TEnv extends Record = Record > { - private _env: TEnv; private _config: TConfig; constructor(config: TConfig) { this._config = config; } - public get env(): TEnv { - return this._env; - } - public get config(): TConfig { return this._config; } - public setEnv(env: TEnv): void { - this._env = env; - } - public async _wrap_invoke< TArgs extends Record = Record, TResult = unknown >( method: string, args: TArgs, - client: CoreClient + client: CoreClient, + env: TEnv ): Promise> { - const fn = this.getMethod(method); + const fn = this.getMethod(method); if (!fn) { return ResultErr(Error(`Plugin missing method "${method}"`)); @@ -48,7 +40,7 @@ export abstract class PluginModule< } try { - const data = await fn(args, client); + const data = await fn(args, client, env); return ResultOk(data); } catch (e) { e.code = WrapErrorCode.WRAPPER_INVOKE_ABORTED; @@ -58,13 +50,14 @@ export abstract class PluginModule< public getMethod< TArgs extends Record = Record, - TResult = unknown + TResult = unknown, + TEnv extends Record = Record >(method: string): PluginMethod | undefined { const fn: - | PluginMethod + | PluginMethod | undefined = ((this as unknown) as Record< string, - PluginMethod + PluginMethod >)[method]; return fn?.bind(this); diff --git a/packages/js/plugin/src/PluginPackage.ts b/packages/js/plugin/src/PluginPackage.ts index 793d2ec685..6f42e72c2f 100644 --- a/packages/js/plugin/src/PluginPackage.ts +++ b/packages/js/plugin/src/PluginPackage.ts @@ -19,7 +19,7 @@ export class PluginPackage< TConfig, TEnv extends Record = Record >( - pluginModule: PluginModule, + pluginModule: PluginModule, manifest?: WrapManifest ): PluginPackage; static from = Record>( @@ -31,15 +31,15 @@ export class PluginPackage< TEnv extends Record = Record >( pluginModuleOrGetPluginFuncs: - | PluginModule + | PluginModule | GetPluginMethodsFunc, manifest?: WrapManifest ): PluginPackage { if (typeof pluginModuleOrGetPluginFuncs === "function") { - const getPluginFuncs = pluginModuleOrGetPluginFuncs as GetPluginMethodsFunc; + const getPluginFuncs = pluginModuleOrGetPluginFuncs as GetPluginMethodsFunc; return new PluginPackage( - new PluginModuleWithMethods(getPluginFuncs), + new PluginModuleWithMethods(getPluginFuncs), manifest || ({} as WrapManifest) ) as PluginPackage; } else { diff --git a/packages/js/plugin/src/PluginWrapper.ts b/packages/js/plugin/src/PluginWrapper.ts index 8ab78d2de4..7281f40b2c 100644 --- a/packages/js/plugin/src/PluginWrapper.ts +++ b/packages/js/plugin/src/PluginWrapper.ts @@ -49,8 +49,12 @@ export class PluginWrapper implements Wrapper { return ResultErr(error); } - // Set the module's environment - this._module.setEnv(options.env || {}); + // NOTE: this is used just in case the module instance + // we're interacting with is from versions < 0.10 + const genericModule = (this._module as unknown) as Record; + if (genericModule.setEnv) { + (genericModule.setEnv as (env: unknown) => void)(options.env || {}); + } let jsArgs: Record; @@ -77,7 +81,12 @@ export class PluginWrapper implements Wrapper { } // Invoke the function - const result = await this._module._wrap_invoke(method, jsArgs, client); + const result = await this._module._wrap_invoke( + method, + jsArgs, + client, + options.env || {} + ); if (result.ok) { const data = result.value; diff --git a/packages/js/plugin/src/utils/GetPluginMethodsFunc.ts b/packages/js/plugin/src/utils/GetPluginMethodsFunc.ts index 9cb2bd2d81..6d95ce1467 100644 --- a/packages/js/plugin/src/utils/GetPluginMethodsFunc.ts +++ b/packages/js/plugin/src/utils/GetPluginMethodsFunc.ts @@ -4,4 +4,7 @@ export type GetPluginMethodsFunc< TEnv extends Record = Record > = ( module: PluginModule -) => Record, unknown>>; +) => Record< + string, + PluginMethod, unknown, Record> +>; diff --git a/packages/js/plugin/src/utils/PluginModuleWithMethods.ts b/packages/js/plugin/src/utils/PluginModuleWithMethods.ts index f69a80a42a..03b1e6d639 100644 --- a/packages/js/plugin/src/utils/PluginModuleWithMethods.ts +++ b/packages/js/plugin/src/utils/PluginModuleWithMethods.ts @@ -20,7 +20,8 @@ export class PluginModuleWithMethods< >( method: string, args: TArgs, - client: CoreClient + client: CoreClient, + env: TEnv ): Promise> { const fn = this.getMethod(method); @@ -35,7 +36,7 @@ export class PluginModuleWithMethods< } try { - const data = await fn(args, client); + const data = await fn(args, client, env); return ResultOk(data); } catch (e) { e.code = WrapErrorCode.WRAPPER_INVOKE_ABORTED; @@ -47,9 +48,13 @@ export class PluginModuleWithMethods< TArgs extends Record = Record, TResult = unknown >(method: string): PluginMethod | undefined { - const fn: PluginMethod | undefined = this._getPluginMethods( - this - )[method] as PluginMethod; + const fn: + | PluginMethod + | undefined = this._getPluginMethods(this)[method] as PluginMethod< + TArgs, + TResult, + TEnv + >; return fn?.bind(this); } diff --git a/packages/js/wasm/package.json b/packages/js/wasm/package.json index 34a554daa0..6c75f1b41d 100644 --- a/packages/js/wasm/package.json +++ b/packages/js/wasm/package.json @@ -26,6 +26,9 @@ "@polywrap/tracing-js": "0.10.0-pre.12", "@polywrap/wrap-manifest-types-js": "0.10.0-pre.12" }, + "peerDependencies": { + "@polywrap/core-js": "0.10.x" + }, "devDependencies": { "@polywrap/cli-js": "0.10.0-pre.12", "@types/jest": "26.0.8", diff --git a/packages/schema/bind/src/bindings/typescript/plugin/templates/module-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin/templates/module-ts.mustache index 4441891954..ac87418014 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/templates/module-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin/templates/module-ts.mustache @@ -23,7 +23,8 @@ export abstract class Module extends PluginModule; {{^last}} 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 4f8dcb6dbb..96d6faf2fb 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 @@ -43,21 +43,25 @@ export interface Args_if { export abstract class Module extends PluginModule { abstract moduleMethod( args: Args_moduleMethod, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; abstract objectMethod( args: Args_objectMethod, - client: CoreClient + client: CoreClient, + env: Types.Env ): MaybeAsync; abstract optionalEnvMethod( args: Args_optionalEnvMethod, - client: CoreClient + client: CoreClient, + env?: Types.Env | null ): MaybeAsync; abstract if( args: Args_if, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; } diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/module.ts index 8a1f0fd9f1..cde1572906 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/module.ts @@ -20,11 +20,13 @@ export interface Args_methodTwo { export abstract class Module extends PluginModule { abstract methodOne( args: Args_methodOne, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; abstract methodTwo( args: Args_methodTwo, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; } diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/module.ts index e74a2c7a62..564b2cf3cc 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/module.ts @@ -16,6 +16,7 @@ export interface Args_method { export abstract class Module extends PluginModule { abstract method( args: Args_method, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; } diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/module.ts index 1b4fbba3ba..122cf48d5b 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/module.ts @@ -15,6 +15,7 @@ export interface Args_method { export abstract class Module extends PluginModule { abstract method( args: Args_method, - client: CoreClient + client: CoreClient, + env: Types.Env ): MaybeAsync; } diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts index 6518f6e3cc..2ca3663015 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts @@ -43,6 +43,9 @@ export const manifest: WrapManifest = { "type": "String" } ], + "env": { + "required": true + }, "kind": 64, "name": "method", "required": true, diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/003-env/schema.graphql index 62f5b70802..5e5d86c058 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/schema.graphql +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/schema.graphql @@ -5,5 +5,5 @@ type Env { type Module { method( str: String! - ): String! + ): String! @env(required: true) } diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/module.ts index 1b4fbba3ba..5b17d8d70f 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/module.ts @@ -15,6 +15,7 @@ export interface Args_method { export abstract class Module extends PluginModule { abstract method( args: Args_method, - client: CoreClient + client: CoreClient, + env?: Types.Env | null ): MaybeAsync; } diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts index 9e3fbbf09c..a9402e7bb6 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts @@ -43,6 +43,9 @@ export const manifest: WrapManifest = { "type": "String" } ], + "env": { + "required": false + }, "kind": 64, "name": "method", "required": true, diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/schema.graphql index 50786e40e4..130b524401 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/schema.graphql +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/schema.graphql @@ -5,5 +5,5 @@ type Env { type Module { method( str: String! - ): String! + ): String! @env(required: false) } diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/module.ts index 8a1f0fd9f1..cde1572906 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/module.ts @@ -20,11 +20,13 @@ export interface Args_methodTwo { export abstract class Module extends PluginModule { abstract methodOne( args: Args_methodOne, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; abstract methodTwo( args: Args_methodTwo, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; } diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/module.ts index 8a1f0fd9f1..cde1572906 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/module.ts @@ -20,11 +20,13 @@ export interface Args_methodTwo { export abstract class Module extends PluginModule { abstract methodOne( args: Args_methodOne, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; abstract methodTwo( args: Args_methodTwo, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; } diff --git a/packages/test-cases/cases/cli/plugin/codegen/007-interface-comments/expected/wrap/module.ts b/packages/test-cases/cases/cli/plugin/codegen/007-interface-comments/expected/wrap/module.ts index 6741068993..e20eb64fa9 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/007-interface-comments/expected/wrap/module.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/007-interface-comments/expected/wrap/module.ts @@ -19,11 +19,13 @@ export interface Args_methodB { export abstract class Module extends PluginModule { abstract methodA( args: Args_methodA, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; abstract methodB( args: Args_methodB, - client: CoreClient + client: CoreClient, + env?: null ): MaybeAsync; } diff --git a/packages/test-cases/index.ts b/packages/test-cases/index.ts index 203c8df770..8ee76fcfd8 100644 --- a/packages/test-cases/index.ts +++ b/packages/test-cases/index.ts @@ -1,6 +1,6 @@ import admZip from 'adm-zip'; -const axios = require("axios"); -const shell = require("shelljs"); +import axios from "axios"; +import shell from "shelljs"; 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 1a0217e633..0799ddc802 100644 --- a/packages/test-cases/package.json +++ b/packages/test-cases/package.json @@ -12,6 +12,7 @@ "@polywrap/os-js": "0.10.0-pre.12" }, "devDependencies": { + "@types/shelljs": "0.8.9", "@types/adm-zip": "0.5.0", "adm-zip": "0.5.10", "axios": "1.2.2", diff --git a/yarn.lock b/yarn.lock index e0d596bf96..c937883398 100644 --- a/yarn.lock +++ b/yarn.lock @@ -114,32 +114,32 @@ integrity sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.5": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.0.tgz#1341aefdcc14ccc7553fcc688dd8986a2daffc13" - integrity sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA== + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" + integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.0" + "@babel/generator" "^7.21.3" "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.21.0" + "@babel/helper-module-transforms" "^7.21.2" "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.0" + "@babel/parser" "^7.21.3" "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.0" - "@babel/types" "^7.21.0" + "@babel/traverse" "^7.21.3" + "@babel/types" "^7.21.3" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" semver "^6.3.0" -"@babel/generator@^7.21.0", "@babel/generator@^7.21.1": - version "7.21.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.1.tgz#951cc626057bc0af2c35cd23e9c64d384dea83dd" - integrity sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA== +"@babel/generator@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" + integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA== dependencies: - "@babel/types" "^7.21.0" + "@babel/types" "^7.21.3" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" @@ -182,7 +182,7 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.21.0": +"@babel/helper-module-transforms@^7.21.2": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== @@ -248,10 +248,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.0", "@babel/parser@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.2.tgz#dacafadfc6d7654c3051a66d6fe55b6cb2f2a0b3" - integrity sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" + integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -346,26 +346,26 @@ "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.2.tgz#ac7e1f27658750892e815e60ae90f382a46d8e75" - integrity sha512-ts5FFU/dSUPS13tv8XiEObDu9K+iagEKME9kAbaP7r0Y9KtZJZ+NGndDvWoRAYNpeWafbpFeki3q9QoMD6gxyw== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67" + integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.1" + "@babel/generator" "^7.21.3" "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-function-name" "^7.21.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.21.2" - "@babel/types" "^7.21.2" + "@babel/parser" "^7.21.3" + "@babel/types" "^7.21.3" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.2.tgz#92246f6e00f91755893c2876ad653db70c8310d1" - integrity sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw== +"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" + integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg== dependencies: "@babel/helper-string-parser" "^7.19.4" "@babel/helper-validator-identifier" "^7.19.1" @@ -2061,9 +2061,9 @@ integrity sha512-0nBr+VZNKm9tvNDZFstI3Pq1fCTEDK5OZTnVKNvBNAKgd0yIvmwsP4m61rEv7ZP+tOUjWJhROpxK5MsnlF911g== "@opentelemetry/api@^1.0.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.4.0.tgz#2c91791a9ba6ca0a0f4aaac5e45d58df13639ac8" - integrity sha512-IgMK9i3sFGNUqPMbjABm0G26g0QCKCUBfglhQ7rQq6WcxbKfEHRcmwsoER4hZcuYqJgkYn2OeuoJIv7Jsftp7g== + version "1.4.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.4.1.tgz#ff22eb2e5d476fbc2450a196e40dd243cc20c28f" + integrity sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA== "@opentelemetry/core@1.6.0": version "1.6.0" @@ -2161,9 +2161,9 @@ "@polywrap/wrap-manifest-types-js" "0.10.0-pre.10" "@polywrap/ethereum-provider-js@~0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@polywrap/ethereum-provider-js/-/ethereum-provider-js-0.2.3.tgz#3a2c16115ba3c5b1cf8136fe9d528770a0c4572f" - integrity sha512-TY2Y33Oitt1elBaM/3OXulRZ22vI3vA7+Y+XVzhV7Az37GJm1tR8NDL05g3wBFqlps6zoTdmfR0zmFVtFvvAtw== + version "0.2.4" + resolved "https://registry.yarnpkg.com/@polywrap/ethereum-provider-js/-/ethereum-provider-js-0.2.4.tgz#3df1a6548da191618bb5cae7928c7427e69e0030" + integrity sha512-64xRnniboxxHNZ4/gD6SS4T+QmJPUMbIYZ2hyLODb2QgH3qDBiU+i4gdiQ/BL3T8Sn/0iOxvTIgZalVDJRh2iw== dependencies: "@ethersproject/address" "5.7.0" "@ethersproject/providers" "5.7.0" @@ -2475,9 +2475,9 @@ integrity sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw== "@types/node@*", "@types/node@^18.14.6": - version "18.14.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.6.tgz#ae1973dd2b1eeb1825695bb11ebfb746d27e3e93" - integrity sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA== + version "18.15.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.3.tgz#f0b991c32cfc6a4e7f3399d6cb4b8cf9a0315014" + integrity sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -2532,6 +2532,14 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.8.tgz#508a27995498d7586dcecd77c25e289bfaf90c59" integrity sha512-D/2EJvAlCEtYFEYmmlGwbGXuK886HzyCc3nZX/tkFTQdEU8jZDAgiv08P162yB17y4ZXZoq7yFAnW4GDBb9Now== +"@types/shelljs@0.8.9": + version "0.8.9" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.9.tgz#45dd8501aa9882976ca3610517dac3831c2fbbf4" + integrity sha512-flVe1dvlrCyQJN/SGrnBxqHG+RzXrVKsmjD8WS/qYHpq5UPjfq7UWFBENP0ZuOl0g6OpAlL6iBoLSvKYUUmyQw== + dependencies: + "@types/glob" "*" + "@types/node" "*" + "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" @@ -2904,6 +2912,14 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + array-differ@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" @@ -3454,9 +3470,9 @@ camelcase@^6.0.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001449: - version "1.0.30001460" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001460.tgz#31d2e26f0a2309860ed3eff154e03890d9d851a7" - integrity sha512-Bud7abqjvEjipUkpLs4D7gR0l8hBYBHoa+tGtKJHvT2AYzLp1z7EmVkUT4ERpVUfca8S2HGIVs883D8pUH1ZzQ== + version "1.0.30001466" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001466.tgz#c1e6197c540392e09709ecaa9e3e403428c53375" + integrity sha512-ewtFBSfWjEmxUgNBSZItFSmVtvk9zkwkl1OfRZlKA8slltRN+/C/tuGVrF9styXkN36Yu3+SeJ1qkXxDEyNZ5w== capture-exit@^2.0.0: version "2.0.0" @@ -4282,9 +4298,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.4.284: - version "1.4.321" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.321.tgz#48b513fbeae39d431826bbafa2acb88309d8be55" - integrity sha512-ERuAqNq7YknVY3+47VbB+Q92kWH7O7sX3mkZINqZtsGJMQFb0dj71d5U3PRTihX03qt2NWIfZic2CCcGXOHJ7A== + version "1.4.330" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.330.tgz#4740378db7160d7210afb29800c74048cdf10a99" + integrity sha512-PqyefhybrVdjAJ45HaPLtuVaehiSw7C3ya0aad+rvmV53IVyXmYRk3pwIOb2TxTDTnmgQdn46NjMMaysx79/6Q== elliptic@6.5.4: version "6.5.4" @@ -4384,17 +4400,17 @@ error-ex@^1.2.0, error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.21.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" - integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== + version "1.21.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" + integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== dependencies: + array-buffer-byte-length "^1.0.0" available-typed-arrays "^1.0.5" call-bind "^1.0.2" es-set-tostringtag "^2.0.1" es-to-primitive "^1.2.1" - function-bind "^1.1.1" function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" + get-intrinsic "^1.2.0" get-symbol-description "^1.0.0" globalthis "^1.0.3" gopd "^1.0.1" @@ -4402,8 +4418,8 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: has-property-descriptors "^1.0.0" has-proto "^1.0.1" has-symbols "^1.0.3" - internal-slot "^1.0.4" - is-array-buffer "^3.0.1" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" is-callable "^1.2.7" is-negative-zero "^2.0.2" is-regex "^1.1.4" @@ -4411,11 +4427,12 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: is-string "^1.0.7" is-typed-array "^1.1.10" is-weakref "^1.0.2" - object-inspect "^1.12.2" + object-inspect "^1.12.3" object-keys "^1.1.1" object.assign "^4.1.4" regexp.prototype.flags "^1.4.3" safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.7" string.prototype.trimend "^1.0.6" string.prototype.trimstart "^1.0.6" typed-array-length "^1.0.4" @@ -5712,7 +5729,7 @@ inquirer@^7.3.3: strip-ansi "^6.0.0" through "^2.3.6" -internal-slot@^1.0.4: +internal-slot@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== @@ -5904,7 +5921,7 @@ is-arguments@^1.0.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-array-buffer@^3.0.1: +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== @@ -7556,9 +7573,9 @@ minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: yallist "^4.0.0" minipass@^4.0.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.4.tgz#7d0d97434b6a19f59c5c3221698b48bbf3b2cd06" - integrity sha512-lwycX3cBMTvcejsHITUgYj6Gy6A7Nh4Q6h9NP4sTHY1ccJlC7yKzDmiShEHsJ16Jf1nKGDEaiHxiltsJEvk0nQ== + version "4.2.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.5.tgz#9e0e5256f1e3513f8c34691dd68549e85b2c8ceb" + integrity sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q== minizlib@^1.3.3: version "1.3.3" @@ -8135,7 +8152,7 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.12.2, object-inspect@^1.9.0: +object-inspect@^1.12.3, object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== @@ -8902,9 +8919,9 @@ read@1, read@~1.0.1: mute-stream "~0.0.4" readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62" - integrity sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ== + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -9490,9 +9507,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.12" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" - integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== + version "3.0.13" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" + integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== split-on-first@^1.0.0: version "1.1.0" @@ -9605,6 +9622,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string.prototype.trim@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" + integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + string.prototype.trimend@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533"