chore: Update name

This commit is contained in:
BluJ
2023-05-09 14:10:02 -06:00
parent ba3527fc45
commit 0c187079de
5 changed files with 10 additions and 10 deletions

View File

@@ -9,7 +9,7 @@
```ts ```ts
{ {
startSdk: "start-sdk/lib", StartSdk: "start-sdk/lib",
} }
``` ```

View File

@@ -56,7 +56,7 @@ type AnyNeverCond<T extends any[], Then, Else> =
T extends [any, ...infer U] ? AnyNeverCond<U,Then, Else> : T extends [any, ...infer U] ? AnyNeverCond<U,Then, Else> :
never never
export class StartSDK<Manifest extends SDKManifest, Store> { export class StartSdk<Manifest extends SDKManifest, Store> {
private constructor() {} private constructor() {}
private anyOf<A>( private anyOf<A>(
a: A, a: A,
@@ -65,13 +65,13 @@ export class StartSDK<Manifest extends SDKManifest, Store> {
} }
static of() { static of() {
return new StartSDK<never, never>() return new StartSdk<never, never>()
} }
withManifest<Manifest extends SDKManifest = never>() { withManifest<Manifest extends SDKManifest = never>() {
return new StartSDK<Manifest, Store>() return new StartSdk<Manifest, Store>()
} }
withStore<Store extends Record<string, any>>() { withStore<Store extends Record<string, any>>() {
return new StartSDK<Manifest, Store>() return new StartSdk<Manifest, Store>()
} }
build() { build() {

View File

@@ -423,6 +423,6 @@ oldSpecToBuilder(
}, },
{ {
// convert this to `start-sdk/lib` for conversions // convert this to `start-sdk/lib` for conversions
startSdk: "./output.sdk", StartSdk: "./output.sdk",
}, },
) )

View File

@@ -1,7 +1,7 @@
import { StartSDK } from "../StartSdk" import { StartSdk } from "../StartSdk"
export type Manifest = any export type Manifest = any
export const sdk = StartSDK.of() export const sdk = StartSdk.of()
.withManifest<Manifest>() .withManifest<Manifest>()
.withStore<{ storeRoot: { storeLeaf: "value" } }>() .withStore<{ storeRoot: { storeLeaf: "value" } }>()
.build() .build()

View File

@@ -28,11 +28,11 @@ function isString(x: unknown): x is string {
export default async function makeFileContentFromOld( export default async function makeFileContentFromOld(
inputData: Promise<any> | any, inputData: Promise<any> | any,
{ startSdk = "start-sdk", nested = true } = {}, { StartSdk = "start-sdk", nested = true } = {},
) { ) {
const outputLines: string[] = [] const outputLines: string[] = []
outputLines.push(` outputLines.push(`
import { sdk } from "${startSdk}" import { sdk } from "${StartSdk}"
const {Config, List, Value, Variants} = sdk const {Config, List, Value, Variants} = sdk
`) `)
const data = await inputData const data = await inputData