From 463c2eef42cfeb31e0dbee8ea45b1061a1c13975 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Fri, 24 Jan 2025 19:12:56 -0500 Subject: [PATCH] appease eslint --- templates/docker-entrypoint.ejs | 2 +- test/base/windows/docker-entrypoint.js | 2 +- test/frameworks/nuxt-prisma/docker-entrypoint.js | 2 +- test/frameworks/remix-indie/docker-entrypoint.js | 2 +- test/frameworks/svelte-prisma/docker-entrypoint.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/docker-entrypoint.ejs b/templates/docker-entrypoint.ejs index d43d419..cbd5763 100755 --- a/templates/docker-entrypoint.ejs +++ b/templates/docker-entrypoint.ejs @@ -107,7 +107,7 @@ if (process.env.DATABASE_URL) { <%= tab(n) %>await exec('<%= npx %> prisma migrate deploy') <% } -%> <% if (prismaSeed && sqlite3 && (prismaFile || prismaEnv)) { -%> -<%= tab(n) %>if (newDb) await exec(<%- JSON.stringify(prismaSeed) %>) +<%= tab(n) %>if (newDb) await exec(<%- prismaSeed.match(/^[-.\/ \w]+$/) ? "'" + prismaSeed + "'" : JSON.stringify(prismaSeed) %>) <% } -%> <% } -%> <% if (nextjsGeneration) { -%> diff --git a/test/base/windows/docker-entrypoint.js b/test/base/windows/docker-entrypoint.js index f8d9700..7f6071e 100755 --- a/test/base/windows/docker-entrypoint.js +++ b/test/base/windows/docker-entrypoint.js @@ -12,7 +12,7 @@ const env = { ...process.env } const target = url.protocol === 'file:' && url.pathname const newDb = target && !fs.existsSync(target) await exec('npx prisma migrate deploy') - if (newDb) await exec("ts-node --require tsconfig-paths/register prisma/seed.ts") + if (newDb) await exec('ts-node --require tsconfig-paths/register prisma/seed.ts') } // launch application diff --git a/test/frameworks/nuxt-prisma/docker-entrypoint.js b/test/frameworks/nuxt-prisma/docker-entrypoint.js index 71459c5..97f7c0f 100755 --- a/test/frameworks/nuxt-prisma/docker-entrypoint.js +++ b/test/frameworks/nuxt-prisma/docker-entrypoint.js @@ -23,7 +23,7 @@ const env = { ...process.env } // prepare database await exec('npx prisma migrate deploy') - if (newDb) await exec("node prisma/seed.js") + if (newDb) await exec('node prisma/seed.js') } // launch application diff --git a/test/frameworks/remix-indie/docker-entrypoint.js b/test/frameworks/remix-indie/docker-entrypoint.js index f8d9700..7f6071e 100755 --- a/test/frameworks/remix-indie/docker-entrypoint.js +++ b/test/frameworks/remix-indie/docker-entrypoint.js @@ -12,7 +12,7 @@ const env = { ...process.env } const target = url.protocol === 'file:' && url.pathname const newDb = target && !fs.existsSync(target) await exec('npx prisma migrate deploy') - if (newDb) await exec("ts-node --require tsconfig-paths/register prisma/seed.ts") + if (newDb) await exec('ts-node --require tsconfig-paths/register prisma/seed.ts') } // launch application diff --git a/test/frameworks/svelte-prisma/docker-entrypoint.js b/test/frameworks/svelte-prisma/docker-entrypoint.js index eb57121..91a55f6 100755 --- a/test/frameworks/svelte-prisma/docker-entrypoint.js +++ b/test/frameworks/svelte-prisma/docker-entrypoint.js @@ -16,7 +16,7 @@ if (process.argv.slice(-2).join(' ') === 'node ./build/index.js') { // prepare database await exec('npx prisma migrate deploy') - if (newDb) await exec("tsx prisma/seed.ts") + if (newDb) await exec('tsx prisma/seed.ts') } // launch application