Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
juice49 committed Jun 6, 2024
1 parent 69b34a1 commit cd5f1f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ async function externalizeSchema(
): Promise<ManifestV1Workspace> {
const schemaString = JSON.stringify(workspace.schema, null, 2)
const hash = createHash('sha1').update(schemaString).digest('hex')
// const filename = `${hash.slice(0, 8)}${SCHEMA_FILENAME_SUFFIX}`
const filename = `${workspace.name}${SCHEMA_FILENAME_SUFFIX}`
const filename = `${hash.slice(0, 8)}${SCHEMA_FILENAME_SUFFIX}`
// const filename = `${workspace.name}${SCHEMA_FILENAME_SUFFIX}`

await writeFile(join(staticPath, filename), schemaString)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
type CliCommandDefinition,
} from '@sanity/cli'

import {type DeployStudioActionFlags} from '../../actions/deploy/deployAction'
// xxx tmp
import deployAction, {type DeployStudioActionFlags} from '../../actions/deploy/deployAction'

const helpText = `
Options
Expand All @@ -25,9 +26,10 @@ const deployCommand: CliCommandDefinition = {
args: CliCommandArguments<DeployStudioActionFlags>,
context: CliCommandContext,
) => {
const mod = await import('../../actions/deploy/deployAction')

return mod.default(args, context)
// const mod = await import('../../actions/deploy/deployAction')
//
// return mod.default(args, context)
return deployAction(args, context)
},
helpText,
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity/src/_internal/cli/threads/extractSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const workspaceTransformers: Record<Format, WorkspaceTransformer> = {

/** @internal */
export type ExtractSchemaWorkerResult<TargetFormat extends Format = Format> = {
'direct': Pick<Workspace, 'name' | 'dataset'> & {schema: SchemaTypeDefinition[]}
'direct': Pick<Workspace, 'name' | 'dataset'> & {schema: SchemaTypeDefinition[]} // xxx
'groq-type-nodes': {schema: SchemaType}
}[TargetFormat]

Expand Down

0 comments on commit cd5f1f0

Please sign in to comment.