Skip to content

Commit

Permalink
fix: downgrade quicktype, bring back schema generator, fix #753
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 4, 2025
1 parent 9033ce2 commit 7b9dd87
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 29 deletions.
7 changes: 4 additions & 3 deletions packages/devtools/client/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useCopy } from '~/composables/editor'
import { rpc } from '~/composables/rpc'
import { registerCommands } from '~/composables/state-commands'
import { splitScreenAvailable, splitScreenEnabled } from '~/composables/storage'
import { useSchemaInput } from './composables/state-schema'
import { useDevToolsOptions } from './composables/storage-options'
import { setupClientRPC } from './setup/client-rpc'
import { setupVueDevTools } from './setup/vue-devtools'
Expand Down Expand Up @@ -65,7 +66,7 @@ useEventListener('keydown', (e) => {
})
const { scale, sidebarExpanded } = useDevToolsOptions('ui')
// const dataSchema = useSchemaInput()
const dataSchema = useSchemaInput()
onMounted(async () => {
const injectClient = useInjectionClient()
Expand Down Expand Up @@ -157,8 +158,8 @@ registerCommands(() => [
</div>
<DisconnectIndicator />
<RestartDialogs />
<!-- <div v-lazy-show="dataSchema">
<div v-lazy-show="dataSchema">
<LazyDataSchemaDrawer />
</div> -->
</div>
</div>
</template>
5 changes: 2 additions & 3 deletions packages/devtools/client/components/ServerRouteDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,10 @@ const copy = useCopy()
<code v-if="response.contentType" text-xs op50>
{{ response.contentType }}
</code>
<!-- TODO: quicktype has some problem of bundling (it's in CJS), we remove this temporary -->
<!-- <DataSchemaButton
<DataSchemaButton
v-if="response.contentType === 'application/json'"
:getter="() => ({ input: responseContent })"
/> -->
/>
<div flex-auto />
<div op50>
Request finished in
Expand Down
5 changes: 2 additions & 3 deletions packages/devtools/client/components/StateEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,10 @@ async function refresh() {
<slot name="actions" v-bind="{ isOpen, name, state }" />
<template v-if="isOpen">
<NButton v-tooltip.bottom="'Refresh View'" title="Refresh View" icon="carbon-renew" :border="false" @click="refresh" />
<!-- TODO: quicktype has some problem of bundling (it's in CJS), we remove this temporary -->
<!-- <DataSchemaButton
<DataSchemaButton
v-if="proxy && !error"
:getter="() => ({ name, input: JSON.stringify(proxy) })"
/> -->
/>
</template>
</div>
<template v-if="isOpen || !name">
Expand Down
55 changes: 36 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ catalog:
pinia: ^2.3.1
pkg-types: ^1.3.1
prompts: ^2.4.2
quicktype-core: ^23.0.171
quicktype-core: 22.0.0
rc9: ^2.1.2
scule: ^1.3.0
semver: ^7.7.1
Expand Down

0 comments on commit 7b9dd87

Please sign in to comment.