adjusted imports

This commit is contained in:
Luke Hagar
2024-05-29 14:39:52 -07:00
parent 595e0f9195
commit 9f706f814f
5 changed files with 10 additions and 12 deletions

View File

@@ -1,6 +1,5 @@
<script lang="ts">
import { localStoragePrefix, newSpec } from '$lib';
import { setSpec } from '$lib/db';
import { newSpec, setSpec } from '$lib/db';
</script>
<button

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import { newSpec } from '$lib';
import { newSpec } from '$lib/db';
import { db, setSpec, type APISpec } from '$lib/db';
</script>

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import { newSpec } from '$lib';
import { newSpec } from '$lib/db';
import { db, setSpec, type APISpec } from '$lib/db';
export let spec: APISpec;

View File

@@ -1,9 +1,14 @@
import { openApiStore } from "$lib";
import { blankSpec, openApiStore } from "$lib";
import type { OpenAPIV3_1 } from "$lib/openAPITypes";
import Dexie, { type Table } from 'dexie';
import { writable, type Writable } from "svelte/store";
export const selectedSpec: Writable<APISpec | undefined> = writable(undefined)
export const newSpec: APISpec = {
name: 'OpenAPI',
spec: blankSpec
}
export const selectedSpec: Writable<APISpec | undefined> = writable(newSpec)
export const setSpec = (spec: APISpec) => {
selectedSpec.set(spec);

View File

@@ -1,4 +1,3 @@
import type { APISpec } from './db';
import type { OpenAPIV3_1 } from './openAPITypes';
import { writable, type Writable } from 'svelte/store';
@@ -40,11 +39,6 @@ export const blankSpec: OpenAPIV3_1.Document = {
}
}
export const newSpec: APISpec = {
name: 'OpenAPI',
spec: blankSpec
}
export const operationCount = (openApiDoc: OpenAPIV3_1.Document) => {
let count = 0;
for (const path in openApiDoc.paths) {