mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 02:11:56 +00:00
chore: Update old spec to builder
This commit is contained in:
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user