Skip to content

Commit

Permalink
refactor(app-vite): queue generateTypes call instead of awaiting
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufkandemir committed Nov 12, 2024
1 parent 298f240 commit 4cbf57d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app-vite/lib/app-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ export class AppDevserver extends AppTool {
}

// to be called from inheriting class
async run (quasarConf, __isRetry) {
run (quasarConf, __isRetry) {
if (this.#diff('entryFiles', quasarConf)) {
this.#entryFiles.generate(quasarConf)
}

if (this.#diff('types', quasarConf)) {
await generateTypes(quasarConf)
void this.#queue(this.#runId, quasarConf, () => generateTypes(quasarConf))
}

if (__isRetry !== true) {
Expand Down
2 changes: 1 addition & 1 deletion app-vite/lib/modes/bex/bex-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class QuasarModeDevserver extends AppDevserver {
}

async run (quasarConf, __isRetry) {
const { diff, queue } = await super.run(quasarConf, __isRetry)
const { diff, queue } = super.run(quasarConf, __isRetry)

if (diff('distDir', quasarConf)) {
return queue(() => this.#stopWatchers(quasarConf))
Expand Down
4 changes: 2 additions & 2 deletions app-vite/lib/modes/capacitor/capacitor-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export class QuasarModeDevserver extends AppDevserver {
])
}

async run (quasarConf, __isRetry) {
const { diff, queue } = await super.run(quasarConf, __isRetry)
run (quasarConf, __isRetry) {
const { diff, queue } = super.run(quasarConf, __isRetry)

if (diff('vite', quasarConf)) {
return queue(() => this.#runVite(quasarConf))
Expand Down
4 changes: 2 additions & 2 deletions app-vite/lib/modes/cordova/cordova-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export class QuasarModeDevserver extends AppDevserver {
})
}

async run (quasarConf, __isRetry) {
const { diff, queue } = await super.run(quasarConf, __isRetry)
run (quasarConf, __isRetry) {
const { diff, queue } = super.run(quasarConf, __isRetry)

if (diff('vite', quasarConf)) {
return queue(() => this.#runVite(quasarConf))
Expand Down
4 changes: 2 additions & 2 deletions app-vite/lib/modes/electron/electron-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export class QuasarModeDevserver extends AppDevserver {
])
}

async run (quasarConf, __isRetry) {
const { diff, queue } = await super.run(quasarConf, __isRetry)
run (quasarConf, __isRetry) {
const { diff, queue } = super.run(quasarConf, __isRetry)

if (diff('vite', quasarConf)) {
return queue(() => this.#runVite(quasarConf))
Expand Down
4 changes: 2 additions & 2 deletions app-vite/lib/modes/pwa/pwa-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export class QuasarModeDevserver extends AppDevserver {
])
}

async run (quasarConf, __isRetry) {
const { diff, queue } = await super.run(quasarConf, __isRetry)
run (quasarConf, __isRetry) {
const { diff, queue } = super.run(quasarConf, __isRetry)

// also update ssr-devserver.js when changing here
if (diff('pwaManifest', quasarConf) === true) {
Expand Down
4 changes: 2 additions & 2 deletions app-vite/lib/modes/spa/spa-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { quasarSpaConfig } from './spa-config.js'
export class QuasarModeDevserver extends AppDevserver {
#server = null

async run (quasarConf, __isRetry) {
const { diff, queue } = await super.run(quasarConf, __isRetry)
run (quasarConf, __isRetry) {
const { diff, queue } = super.run(quasarConf, __isRetry)

if (diff('vite', quasarConf) === true) {
return queue(() => this.#runVite(quasarConf, diff('viteUrl', quasarConf)))
Expand Down
4 changes: 2 additions & 2 deletions app-vite/lib/modes/ssr/ssr-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ export class QuasarModeDevserver extends AppDevserver {
])
}

async run (quasarConf, __isRetry) {
const { diff, queue } = await super.run(quasarConf, __isRetry)
run (quasarConf, __isRetry) {
const { diff, queue } = super.run(quasarConf, __isRetry)

if (quasarConf.ssr.pwa === true) {
// also update pwa-devserver.js when changing here
Expand Down

0 comments on commit 4cbf57d

Please sign in to comment.