Skip to content

Commit

Permalink
fix: file extensions cli
Browse files Browse the repository at this point in the history
  • Loading branch information
dalechyn committed Nov 9, 2024
1 parent 179689a commit 3312d85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Cli/Commands/Generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export async function generate(options: Generate = {}) {
// Creating action.ts file
const actionFileContent = await format(dedent`
'use server'
import { fhubClient } from '../client.${isTypeScript ? 'ts' : 'js'}'
import { fhubClient } from '../client'
import { Actions } from 'fhub'
export function action(parameters${isTypeScript ? `: Actions.${namespaceName}.${functionName}.ParametersType` : ''}): ${isTypeScript ? `Promise<Actions.${namespaceName}.${functionName}.ReturnType>` : ''} {
Expand All @@ -129,7 +129,7 @@ export async function generate(options: Generate = {}) {
const hookContents = await (async () => {
if (hookType === 'Mutation') {
return await format(dedent`
import { action } from './action.${isTypeScript ? 'ts' : 'js'}'
import { action } from './action'
${
isTypeScript
? dedent`
Expand All @@ -152,7 +152,7 @@ export async function generate(options: Generate = {}) {
}

return format(dedent`
import { action } from './action.${isTypeScript ? 'ts' : 'js'}'
import { action } from './action'
${
isTypeScript
? dedent`
Expand Down

0 comments on commit 3312d85

Please sign in to comment.