Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
754ba22
removed plugins from core
nerfZael Sep 15, 2022
030f532
created plugin-js package
nerfZael Sep 15, 2022
e59f974
implemented plugin helper types in plugin-js package
nerfZael Sep 15, 2022
98cbaa1
removed plugins from uri-resolvers-js
nerfZael Sep 15, 2022
c388ebd
implemented wrapper and package resolvers
nerfZael Sep 15, 2022
0c3d0b5
exported package and wrapper registrations
nerfZael Sep 15, 2022
ff90a6b
exported all plugin helpers
nerfZael Sep 15, 2022
fb3aa35
removed plugins from config builder
nerfZael Sep 15, 2022
a8ecae9
remove plugins completely from core
nerfZael Sep 15, 2022
65c5756
updated plugin bindings to include PluginModule from plugin-js
nerfZael Sep 15, 2022
ee66381
updated plugins to work with plugin-js package
nerfZael Sep 15, 2022
ca00a63
updated test env to work with new plugin pattern
nerfZael Sep 15, 2022
e176b73
removed helper functions
nerfZael Sep 15, 2022
8261a87
adding a user defined resolver to default config
nerfZael Sep 15, 2022
b006858
fixed using wrong func
nerfZael Sep 15, 2022
4bc9548
removed plugins from client
nerfZael Sep 15, 2022
f2e0c51
removed plugins from cli
nerfZael Sep 15, 2022
e67bc1d
removed plugins from client and uri resolution tests
nerfZael Sep 15, 2022
2c2ef6d
wip updated tests to not use plugins in client config directly
nerfZael Sep 20, 2022
c6047fd
updated getClientWithEnsAndIpfs to not use defaults
nerfZael Sep 23, 2022
850a80b
showing clean uri history on error
nerfZael Sep 23, 2022
85a8294
fixed resolverLike still named resolvable
nerfZael Sep 23, 2022
133f3ba
changed wrong label
nerfZael Sep 23, 2022
e14fc17
using no default client in client and ipfs plugin tests
nerfZael Sep 23, 2022
6cacd1b
fixed test case expected output to expect new plugin-js package
nerfZael Sep 23, 2022
8beaf88
using new getClientWithEnsAndIpfs in client tests along with mockPlug…
nerfZael Sep 24, 2022
47f1c84
moved UriResolutionResult helper to uri-resolvers-js package and move…
nerfZael Sep 24, 2022
a2e65ce
argument of recursive resolver is now a resolver-like
nerfZael Sep 24, 2022
45119e6
removed redirects resolver as it is nnot needed
nerfZael Sep 24, 2022
57a9647
implemented StaticResolver and StaticResolverLike
nerfZael Sep 24, 2022
0cd86f4
improved plugin-js with helpers to create inline plugins
nerfZael Sep 24, 2022
8da4005
updated plugins to not use default config
nerfZael Sep 25, 2022
f4b5f92
merged with remote
nerfZael Sep 28, 2022
ef1b509
updated packages to 0.8.0
nerfZael Sep 28, 2022
e9f488c
fixes after merge with remote
nerfZael Sep 28, 2022
c13d948
fixes after merge with remote
nerfZael Sep 28, 2022
e874901
lint fix
nerfZael Sep 28, 2022
bada668
getClientConfig now works with config builder in test cases
nerfZael Sep 28, 2022
189164f
renamed UriRedirect to IUriRedirect and made IUriWrapper and IUriPack…
nerfZael Sep 30, 2022
39ef0d8
removed config builder from client
nerfZael Sep 30, 2022
ec519e6
implemented custom client config in config builder
nerfZael Sep 30, 2022
fca511f
fixed issues with inline plugins
nerfZael Sep 30, 2022
046adbd
replaced wrapper and package registrations with uri wrappers and uri …
nerfZael Sep 30, 2022
ec85c4c
added helper static 'from' methods to resolvers
nerfZael Sep 30, 2022
b40bbc1
cli config builder fixes wip
nerfZael Sep 30, 2022
be14a1c
updated client tests to work with new config builder
nerfZael Sep 30, 2022
c1b54f8
using new CustomClientConfig in cli
nerfZael Sep 30, 2022
6a6ea9f
lint fix
nerfZael Sep 30, 2022
d007cc5
fixed ipfs plugin tests client creation
nerfZael Sep 30, 2022
ffdc661
fixed ethereum plugin tests
nerfZael Sep 30, 2022
f0b23a9
fixed http plugin tests
nerfZael Oct 5, 2022
97746b1
fixed logger plugin tests
nerfZael Oct 5, 2022
3df6268
fixed ens resolver plugin tests
nerfZael Oct 5, 2022
6d63b81
fixed file system resolver plugin tests
nerfZael Oct 5, 2022
cbcbe49
fixed web socket plugin tests
nerfZael Oct 5, 2022
4b53661
fixed web socket plugin tests
nerfZael Oct 5, 2022
e05f8a5
fixed file system plugin tests
nerfZael Oct 5, 2022
d259848
moved createDefaultClient to deployer directories
nerfZael Oct 5, 2022
9a032cb
lint fix
nerfZael Oct 5, 2022
71f76b9
fixed http resolver tests
nerfZael Oct 5, 2022
404e1d4
fixed ipfs resolver tests
nerfZael Oct 5, 2022
f32738a
regenerated yarn lock
nerfZael Oct 5, 2022
2f11dee
merged with remote
nerfZael Oct 5, 2022
e8465b3
fixed issues after merge with remote
nerfZael Oct 6, 2022
f3e3aeb
renamed plugin-js directory to plugin
nerfZael Oct 6, 2022
d2465e1
merged with remote
nerfZael Oct 6, 2022
b0af3e9
fixed issues after merge
nerfZael Oct 6, 2022
cc90cb1
fixed config builder tests
nerfZael Oct 7, 2022
13a0fd0
fixed config builder tests
nerfZael Oct 7, 2022
2ab7ea4
updated readme
nerfZael Oct 7, 2022
5c86e18
added config builder methods to handle arrays
nerfZael Oct 7, 2022
85b0455
removed default plugin configs from the client
nerfZael Oct 7, 2022
0bade2c
removed manifest options arg
nerfZael Oct 7, 2022
c9ee609
using new client in the cli
nerfZael Oct 7, 2022
df4e643
fixed client tests
nerfZael Oct 7, 2022
f46f06d
config builder updates
nerfZael Oct 7, 2022
ac8dd5d
re-exporting resolvers and config builder
nerfZael Oct 7, 2022
d090ec7
implemented new default client
nerfZael Oct 7, 2022
0b756c9
fixed tests with new client
nerfZael Oct 7, 2022
ae3cd52
renamed buildUriResolver to UriResolver.from
nerfZael Oct 8, 2022
f6b14f7
using invoke uri if resolution path is not available
nerfZael Oct 8, 2022
592e1ab
fixed plugin tests
nerfZael Oct 8, 2022
0141754
merged with origin-dev
nerfZael Oct 8, 2022
58af177
fixed issues after merge with remote
nerfZael Oct 8, 2022
5b60ef8
fixed client test
nerfZael Oct 8, 2022
f7471b7
updated react package to use new client
nerfZael Oct 8, 2022
fbb567f
fixed issues after merge with remote
nerfZael Oct 9, 2022
44fc947
regenerated yarn lock
nerfZael Oct 10, 2022
81e3ceb
merged with remote
nerfZael Oct 10, 2022
1ae966f
bumped version of all packages
nerfZael Oct 10, 2022
a8981e9
regenerated yarn lock
nerfZael Oct 10, 2022
e6b9d08
included plugin package to core build command
nerfZael Oct 10, 2022
841e8d7
using from method instead of constructor
nerfZael Oct 10, 2022
72ec2ef
removed uneccessary deps
nerfZael Oct 10, 2022
4c317f0
reordered props
nerfZael Oct 10, 2022
7acfdea
removed unused dependency
nerfZael Oct 12, 2022
5e613af
removed unused function
nerfZael Oct 12, 2022
972170e
removed unused file
nerfZael Oct 12, 2022
6c33b32
lint fix
nerfZael Oct 12, 2022
5fcd919
using no defaults for ipfs and ens client in tests
nerfZael Oct 12, 2022
3b68f4a
merged with remote
nerfZael Oct 12, 2022
7313229
turned dev dependency into dependency
nerfZael Oct 12, 2022
c133218
moved configs to their own files
nerfZael Oct 12, 2022
d59f26f
merged with remote
nerfZael Oct 13, 2022
5dfd656
updated package versions
nerfZael Oct 13, 2022
a4a7b96
added missing dependency
nerfZael Oct 13, 2022
ba36b6e
added plugin-js to plugin template project
nerfZael Oct 13, 2022
0170742
merge origin-dev
dOrgJelli Oct 14, 2022
beb156b
chore: update packages to 0.9.2
dOrgJelli Oct 14, 2022
55cffe6
chore: remove typescript 4.0.7
dOrgJelli Oct 14, 2022
f71f86c
chore: improve WrapManifest typings in test config.ts
dOrgJelli Oct 14, 2022
3a589f8
fix: remove duplicate dependency in @polywrap/http-resolver-plugin-js
dOrgJelli Oct 14, 2022
dd9283f
chore: revert ipfs plugin regression
dOrgJelli Oct 14, 2022
bb820b3
fixed explicit cast of PolywrapClientConfig
nerfZael Oct 14, 2022
583cdc4
using full PolywrapCoreClientCon
nerfZael Oct 14, 2022
4d52ac5
optional fields for core client config
nerfZael Oct 17, 2022
6b05ee6
regenerated yarn lock
nerfZael Oct 21, 2022
00f162a
refactored exec options to have required fields as they are never und…
nerfZael Oct 21, 2022
944a8a9
lint fix
nerfZael Oct 21, 2022
589df19
merged with
nerfZael Oct 21, 2022
86f4a16
updated version numbers after merge with remote
nerfZael Oct 21, 2022
edbb71b
removed os-js from packages that dont use it
nerfZael Oct 21, 2022
c8b5875
moved comment out of method
nerfZael Oct 21, 2022
9630e02
renaming client and client config as core types
nerfZael Oct 21, 2022
1b420ba
renamed custom client config to client con
nerfZael Oct 21, 2022
4b4da40
chore: improve ExecOptions typing
dOrgJelli Oct 24, 2022
90b71af
Merge pull request #1360 from polywrap/nerfzael-refactor-ipfs-exec-op…
dOrgJelli Oct 24, 2022
ddf2e48
Merge branch 'nerfzael-remove-plugins-from-core-and-client' into nerf…
dOrgJelli Oct 24, 2022
3c28845
Merge pull request #1361 from polywrap/nerfzael-client-and-config-ren…
dOrgJelli Oct 24, 2022
a18ffbb
chore: add ClientConfig template argument default
dOrgJelli Oct 24, 2022
3cd2068
chore: lint fix
dOrgJelli Oct 24, 2022
a6e9c36
chore: fix IPFS plugin tests
dOrgJelli Oct 24, 2022
de5918d
chore: lint fix
dOrgJelli Oct 24, 2022
f2e75e6
chore: fix tests
dOrgJelli Oct 24, 2022
08baff3
chore: fix wasm-as tests
dOrgJelli Oct 24, 2022
8106329
fix: interface-impls js client test
dOrgJelli Oct 24, 2022
03247bb
fix: schema-bind tests
dOrgJelli Oct 24, 2022
05bfbd3
fix: cli plugin codegen tests
dOrgJelli Oct 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap",
"dependencies:install": "cd dependencies && yarn",
"preinstall": "yarn dependencies:install",
"build": "yarn build:core && yarn build:interfaces && yarn build:plugins && yarn build:resolver:plugins && yarn build:config && yarn build:client && yarn build:test-env && yarn build:cli",
"build": "yarn build:core && yarn build:interfaces && yarn link:schema && yarn build:plugins && yarn build:resolver:plugins && yarn build:config && yarn build:client && yarn build:test-env && yarn build:cli",
"build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore @polywrap/client-config-builder-js --ignore polywrap --ignore @polywrap/client-js --ignore @polywrap/react --ignore @polywrap/test-env-js --ignore @polywrap/*-interface",
"build:interfaces": "lerna run build --scope @polywrap/*-interface",
"build:plugins": "lerna run build --scope @polywrap/*-plugin-js --ignore @polywrap/*-resolver-plugin-js",
Expand Down
1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"@polywrap/ens-resolver-plugin-js": "0.9.3",
"@polywrap/ethereum-plugin-js": "0.9.3",
"@polywrap/ipfs-plugin-js": "0.9.3",
"@polywrap/msgpack-js": "0.9.3",
"@polywrap/os-js": "0.9.3",
"@polywrap/polywrap-manifest-types-js": "0.9.3",
"@polywrap/schema-bind": "0.9.3",
Expand Down
13 changes: 7 additions & 6 deletions packages/cli/src/__tests__/unit/jobrunner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ import { buildWrapper } from "@polywrap/test-env-js";
import { testCases } from "./jobrunner-test-cases";
import { JobRunner } from "../../lib";
import path from "path";
import { PolywrapClient } from "@polywrap/client-js";
import { ClientConfigBuilder, ClientConfig } from "@polywrap/client-config-builder-js";

jest.setTimeout(200000);

describe("workflow JobRunner", () => {

let client: PolywrapClient;
let defaultConfig: ClientConfig;

beforeAll(async () => {
await buildWrapper(
path.join(GetPathToTestWrappers(), "wasm-as", "simple-calculator")
);
client = new PolywrapClient({});
defaultConfig = new ClientConfigBuilder().addDefaults().build();
});

for (const testCase of testCases) {
it(testCase.name, async () => {
expect(client).toBeTruthy();
const ids = Object.keys(testCase.workflow.jobs);
const jobRunner = new JobRunner(client, testCase.onExecution);
const jobRunner = new JobRunner(
defaultConfig,
testCase.onExecution
);
await jobRunner.run(testCase.workflow.jobs, ids);
});
}
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import {

import path from "path";
import readline from "readline";
import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js";
import { PolywrapClient } from "@polywrap/client-js";
import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js";
import { ClientConfig } from "@polywrap/client-config-builder-js";

const defaultOutputDir = "./build";
const defaultStrategy = SupportedStrategies.VM;
Expand All @@ -37,7 +38,7 @@ const pathStr = intlMsg.commands_build_options_o_path();
type BuildCommandOptions = {
manifestFile: string;
outputDir: string;
clientConfig: Partial<PolywrapClientConfig>;
clientConfig: Partial<ClientConfig>;
codegen: boolean; // defaults to true
watch?: boolean;
strategy: SupportedStrategies;
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/commands/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ import {
} from "../lib";
import { ScriptCodegenerator } from "../lib/codegen/ScriptCodeGenerator";

import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js";
import { PolywrapClient } from "@polywrap/client-js";
import path from "path";
import fs from "fs";
import { ClientConfig } from "@polywrap/client-config-builder-js";

const defaultCodegenDir = "./src/wrap";
const defaultPublishDir = "./build";
Expand All @@ -33,7 +34,7 @@ type CodegenCommandOptions = {
codegenDir: string;
publishDir: string;
script?: string;
clientConfig: Partial<PolywrapClientConfig>;
clientConfig: Partial<ClientConfig>;
verbose?: boolean;
quiet?: boolean;
logFile?: string;
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/commands/docgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ import { scriptPath as jsdocScriptPath } from "../lib/docgen/jsdoc";
import { scriptPath as schemaScriptPath } from "../lib/docgen/schema";
import { ScriptCodegenerator } from "../lib/codegen/ScriptCodeGenerator";

import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js";
import { PolywrapClient } from "@polywrap/client-js";
import chalk from "chalk";
import { Argument } from "commander";
import { ClientConfig } from "@polywrap/client-config-builder-js";

const commandToPathMap: Record<string, string> = {
schema: schemaScriptPath,
Expand All @@ -35,7 +36,7 @@ const pathStr = intlMsg.commands_codegen_options_o_path();
type DocgenCommandOptions = {
manifestFile: string;
docgenDir: string;
clientConfig: Partial<PolywrapClientConfig>;
clientConfig: Partial<ClientConfig>;
imports: boolean;
verbose?: boolean;
quiet?: boolean;
Expand Down
7 changes: 3 additions & 4 deletions packages/cli/src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import {
} from "../lib";
import { createLogger } from "./utils/createLogger";

import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js";
import path from "path";
import yaml from "yaml";
import fs from "fs";
import { ClientConfig } from "@polywrap/client-config-builder-js";

type WorkflowCommandOptions = {
clientConfig: Partial<PolywrapClientConfig>;
clientConfig: Partial<ClientConfig>;
manifest: string;
jobs?: string[];
validationScript?: string;
Expand Down Expand Up @@ -95,7 +95,6 @@ const _run = async (options: WorkflowCommandOptions) => {
logFile,
} = options;
const logger = createLogger({ verbose, quiet, logFile });
const client = new PolywrapClient(clientConfig);

const manifestPath = path.resolve(manifest);
const workflow = await loadWorkflowManifest(manifestPath, logger);
Expand Down Expand Up @@ -128,7 +127,7 @@ const _run = async (options: WorkflowCommandOptions) => {
workflowOutput.push(output);
};

const jobRunner = new JobRunner(client, onExecution);
const jobRunner = new JobRunner(clientConfig, onExecution);
await jobRunner.run(workflow.jobs, jobs ?? Object.keys(workflow.jobs));

if (outputFile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ export class DockerImageBuildStrategy extends BuildStrategy<BuildImageId> {
}
await runCommand(
`docker buildx build -f ${dockerfile} -t ${imageName} ${rootDir} ${cacheFrom} ${cacheTo} --output=type=docker`,
this.project.logger
this.project.logger,
undefined,
undefined,
true
);
} else {
await runCommand(
Expand All @@ -277,7 +280,9 @@ export class DockerImageBuildStrategy extends BuildStrategy<BuildImageId> {
: {
// eslint-disable-next-line @typescript-eslint/naming-convention
DOCKER_BUILDKIT: "true",
}
},
undefined,
true
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { Deployer } from "../../../deploy";
import { Wallet } from "@ethersproject/wallet";
import { JsonRpcProvider } from "@ethersproject/providers";
import { Uri } from "@polywrap/core-js";
import { PolywrapClient } from "@polywrap/client-js";
import {
ethereumPlugin,
Connections,
Connection,
} from "@polywrap/ethereum-plugin-js";
import { embeddedWrappers } from "@polywrap/test-env-js";
import { PolywrapClient } from "@polywrap/client-js";

class ENSRecursiveNameRegisterPublisher implements Deployer {
async execute(
Expand Down Expand Up @@ -62,10 +62,10 @@ class ENSRecursiveNameRegisterPublisher implements Deployer {
to: embeddedWrappers.sha3,
},
],
plugins: [
packages: [
{
uri: ethereumPluginUri,
plugin: ethereumPlugin({
package: ethereumPlugin({
connections: new Connections({
networks: {
[network]: new Connection({
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/lib/defaults/deploy-modules/ens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { Deployer } from "../../../deploy";
import { Wallet } from "@ethersproject/wallet";
import { JsonRpcProvider } from "@ethersproject/providers";
import { Uri } from "@polywrap/core-js";
import { PolywrapClient } from "@polywrap/client-js";
import {
ethereumPlugin,
Connections,
Connection,
ethereumPlugin,
} from "@polywrap/ethereum-plugin-js";
import { embeddedWrappers } from "@polywrap/test-env-js";
import { PolywrapClient } from "@polywrap/client-js";

const contentHash = require("content-hash");

Expand Down Expand Up @@ -59,10 +59,10 @@ class ENSPublisher implements Deployer {
to: embeddedWrappers.sha3,
},
],
plugins: [
packages: [
{
uri: ethereumPluginUri,
plugin: ethereumPlugin({
package: ethereumPlugin({
connections: new Connections({
networks: {
[network]: new Connection({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"license": "MIT",
"dependencies": {
"@polywrap/msgpack-js": "0.7.0",
"@polywrap/msgpack-js": "0.9.3",
"@types/multer": "1.4.7",
"dotenv": "8.6.0",
"express": "4.18.1",
Expand Down
62 changes: 0 additions & 62 deletions packages/cli/src/lib/helpers/client.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/cli/src/lib/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./client";
export * from "./metadata";
export * from "./uuid";
export * from "./validate-client-config";
Expand Down
61 changes: 6 additions & 55 deletions packages/cli/src/lib/helpers/validate-client-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import { intlMsg } from "../intl";
import {
Env,
InterfaceImplementations,
PluginPackage,
PluginRegistration,
IUriRedirect,
Uri,
UriRedirect,
PolywrapClientConfig,
} from "@polywrap/client-js";
import { ClientConfig } from "@polywrap/client-config-builder-js";

export function validateRedirects<
TUri extends PluginPackage<unknown> | Uri | string
>(redirects: readonly UriRedirect<TUri>[]): void {
export function validateRedirects<TUri extends Uri | string>(
redirects: readonly IUriRedirect<TUri>[]
): void {
if (!Array.isArray(redirects)) {
throw new Error(intlMsg.commands_run_error_redirectsExportNotArray());
}
Expand Down Expand Up @@ -43,50 +41,6 @@ export function validateRedirects<
}
}

export function validatePlugins<TUri extends Uri | string = string>(
plugins: readonly PluginRegistration<TUri>[]
): void {
if (!Array.isArray(plugins)) {
throw new Error(intlMsg.commands_run_error_pluginsExportNotArray());
}

// Ensure each plugin in the array is valid
for (let i = 0; i < plugins.length; ++i) {
const plugin = plugins[i];
if (typeof plugin !== "object") {
throw new Error(
intlMsg.commands_run_error_pluginsItemNotObject({
index: i.toString(),
})
);
} else if (typeof plugin.uri !== "string") {
throw new Error(
intlMsg.commands_run_error_pluginsItemUriNotString({
index: i.toString(),
})
);
} else if (typeof plugin.plugin !== "object") {
throw new Error(
intlMsg.commands_run_error_pluginsItemPluginNotObject({
index: i.toString(),
})
);
} else if (typeof plugin.plugin.factory !== "function") {
throw new Error(
intlMsg.commands_run_error_pluginsItemPluginFactoryNotFunction({
index: i.toString(),
})
);
} else if (typeof plugin.plugin.manifest !== "object") {
throw new Error(
intlMsg.commands_run_error_pluginsItemPluginManifestNotObject({
index: i.toString(),
})
);
}
}
}

export function validateInterfaces<TUri extends Uri | string = string>(
interfaces: readonly InterfaceImplementations<TUri>[]
): void {
Expand Down Expand Up @@ -167,13 +121,10 @@ export function validateEnvs<TUri extends Uri | string = string>(
}
}

export function validateClientConfig(
config: Partial<PolywrapClientConfig>
): void {
export function validateClientConfig(config: Partial<ClientConfig>): void {
if (!config || typeof config !== "object") {
throw new Error(intlMsg.commands_run_error_clientConfigNotObject());
}
if (config.plugins) validatePlugins(config.plugins);
if (config.envs) validateEnvs(config.envs);
if (config.interfaces) validateInterfaces(config.interfaces);
if (config.redirects) validateRedirects(config.redirects);
Expand Down
Loading