From a76344d95f0bce20e87a77f7c814c394c1e41a78 Mon Sep 17 00:00:00 2001 From: BluJ Date: Wed, 10 May 2023 16:52:44 -0600 Subject: [PATCH] chore: Change the expected export --- lib/dependencyConfig/DependencyConfig.ts | 14 +++++++++----- lib/dependencyConfig/setupDependencyConfig.ts | 3 ++- lib/types.ts | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/dependencyConfig/DependencyConfig.ts b/lib/dependencyConfig/DependencyConfig.ts index 9f01f77..ecde744 100644 --- a/lib/dependencyConfig/DependencyConfig.ts +++ b/lib/dependencyConfig/DependencyConfig.ts @@ -1,4 +1,8 @@ -import { AutoConfigure, DeepPartial, Effects, ExpectedExports } from "../types" +import { + DependencyConfig as DependencyConfigType, + DeepPartial, + Effects, +} from "../types" import { Utils, utils } from "../util/utils" import { deepEqual } from "../util/deepEqual" import { deepMerge } from "../util/deepMerge" @@ -19,8 +23,8 @@ export class DependencyConfig< ) {} async check( - options: Parameters[0], - ): ReturnType { + options: Parameters[0], + ): ReturnType { const origConfig = JSON.parse(JSON.stringify(options.localConfig)) const newOptions = { ...options, @@ -41,8 +45,8 @@ export class DependencyConfig< throw new Error(`Check failed`) } async autoConfigure( - options: Parameters[0], - ): ReturnType { + options: Parameters[0], + ): ReturnType { const newOptions = { ...options, utils: utils(options.effects), diff --git a/lib/dependencyConfig/setupDependencyConfig.ts b/lib/dependencyConfig/setupDependencyConfig.ts index 475015b..536b257 100644 --- a/lib/dependencyConfig/setupDependencyConfig.ts +++ b/lib/dependencyConfig/setupDependencyConfig.ts @@ -1,5 +1,6 @@ import { Config } from "../config/builder/config" import { SDKManifest } from "../manifest/ManifestTypes" +import { ExpectedExports } from "../types" import { DependencyConfig } from "./DependencyConfig" export function setupDependencyConfig< @@ -17,6 +18,6 @@ export function setupDependencyConfig< any > }, -) { +): ExpectedExports.dependencyConfig { return autoConfigs } diff --git a/lib/types.ts b/lib/types.ts index 28feb6e..e6a749e 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -85,7 +85,7 @@ export namespace ExpectedExports { /** Auto configure is used to make sure that other dependencies have the values t * that this service could use. */ - export type autoConfig = Record + export type dependencyConfig = Record } export type TimeMs = number export type VersionString = string @@ -94,7 +94,7 @@ export type VersionString = string * AutoConfigure is used as the value to the key of package id, * this is used to make sure that other dependencies have the values that this service could use. */ -export type AutoConfigure = { +export type DependencyConfig = { /** Checks are called to make sure that our dependency is in the correct shape. If a known error is returned we know that the dependency needs modification */ check(options: { effects: Effects