chore: Update old spec to builder

This commit is contained in:
BluJ
2023-05-02 14:22:32 -06:00
parent 747fa39c6c
commit 78d04219b9
2 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import { Config } from "./config" import { Config, topConfig } from "./config"
import { List } from "./list" import { List } from "./list"
import { Value } from "./value" import { Value } from "./value"
import { Variants } from "./variants" import { Variants } from "./variants"
@@ -10,4 +10,5 @@ export {
List, List,
Value, Value,
Variants, Variants,
topConfig,
} }

View File

@@ -37,7 +37,7 @@ export default async function makeFileContentFromOld(
) { ) {
const outputLines: string[] = [] const outputLines: string[] = []
outputLines.push(` outputLines.push(`
import {Config, Value, List, Variants} from '${startSdk}/lib/config/builder' import {Config, Value, List, Variants, topConfig} from '${startSdk}/lib/config/builder'
import {WrapperData} from '${wrapperData}' import {WrapperData} from '${wrapperData}'
`) `)
const data = await inputData const data = await inputData
@@ -45,7 +45,7 @@ export default async function makeFileContentFromOld(
const namedConsts = new Set(["Config", "Value", "List"]) const namedConsts = new Set(["Config", "Value", "List"])
const configName = newConst( const configName = newConst(
"configSpec", "configSpec",
`Config.withWrapperData<WrapperData>().of(${convertInputSpecInner(data)})`, `topConfig<WrapperData>()(${convertInputSpecInner(data)})`,
) )
const configMatcherName = newConst( const configMatcherName = newConst(
"matchConfigSpec", "matchConfigSpec",