diff options
author | 2024-03-14 18:29:56 +0000 | |
---|---|---|
committer | 2024-03-14 18:29:56 +0000 | |
commit | cdf1ac1292ee97751ce82cfe571ce7e162376ff3 (patch) | |
tree | 5377695561d2984558dcddbe97f0ea72f9501ff7 | |
parent | 238f047b9d1ebc407f53d61ee61574b380a76ac9 (diff) | |
download | astro-cdf1ac1292ee97751ce82cfe571ce7e162376ff3.tar.gz astro-cdf1ac1292ee97751ce82cfe571ce7e162376ff3.tar.zst astro-cdf1ac1292ee97751ce82cfe571ce7e162376ff3.zip |
[ci] format
-rw-r--r-- | packages/db/src/core/cli/commands/link/index.ts | 2 | ||||
-rw-r--r-- | packages/db/src/core/cli/commands/push/index.ts | 2 | ||||
-rw-r--r-- | packages/db/src/core/cli/migration-queries.ts | 3 | ||||
-rw-r--r-- | packages/db/src/core/tokens.ts | 2 | ||||
-rw-r--r-- | packages/db/src/runtime/utils.ts | 2 |
5 files changed, 5 insertions, 6 deletions
diff --git a/packages/db/src/core/cli/commands/link/index.ts b/packages/db/src/core/cli/commands/link/index.ts index 0dae1c218..b58dff2e7 100644 --- a/packages/db/src/core/cli/commands/link/index.ts +++ b/packages/db/src/core/cli/commands/link/index.ts @@ -5,10 +5,10 @@ import { slug } from 'github-slugger'; import { bgRed, cyan } from 'kleur/colors'; import ora from 'ora'; import prompts from 'prompts'; +import { safeFetch } from '../../../../runtime/utils.js'; import { MISSING_SESSION_ID_ERROR } from '../../../errors.js'; import { PROJECT_ID_FILE, getSessionIdFromFile } from '../../../tokens.js'; import { type Result, getAstroStudioUrl } from '../../../utils.js'; -import { safeFetch } from '../../../../runtime/utils.js'; export async function cmd() { const sessionToken = await getSessionIdFromFile(); diff --git a/packages/db/src/core/cli/commands/push/index.ts b/packages/db/src/core/cli/commands/push/index.ts index fed1e1a70..b678c47f9 100644 --- a/packages/db/src/core/cli/commands/push/index.ts +++ b/packages/db/src/core/cli/commands/push/index.ts @@ -1,10 +1,10 @@ import type { AstroConfig } from 'astro'; import type { Arguments } from 'yargs-parser'; +import { safeFetch } from '../../../../runtime/utils.js'; import { MIGRATION_VERSION } from '../../../consts.js'; import { getManagedAppTokenOrExit } from '../../../tokens.js'; import { type DBConfig, type DBSnapshot } from '../../../types.js'; import { type Result, getRemoteDatabaseUrl } from '../../../utils.js'; -import { safeFetch } from '../../../../runtime/utils.js'; import { createCurrentSnapshot, createEmptySnapshot, diff --git a/packages/db/src/core/cli/migration-queries.ts b/packages/db/src/core/cli/migration-queries.ts index 0474f9bd1..13d296ce5 100644 --- a/packages/db/src/core/cli/migration-queries.ts +++ b/packages/db/src/core/cli/migration-queries.ts @@ -14,6 +14,7 @@ import { schemaTypeToSqlType, } from '../../runtime/queries.js'; import { isSerializedSQL } from '../../runtime/types.js'; +import { safeFetch } from '../../runtime/utils.js'; import { MIGRATION_VERSION } from '../consts.js'; import { RENAME_COLUMN_ERROR, RENAME_TABLE_ERROR } from '../errors.js'; import { columnSchema } from '../schemas.js'; @@ -33,8 +34,6 @@ import { type TextColumn, } from '../types.js'; import { type Result, getRemoteDatabaseUrl } from '../utils.js'; -import { safeFetch } from '../../runtime/utils.js'; - const sqlite = new SQLiteAsyncDialect(); const genTempTableName = customAlphabet('abcdefghijklmnopqrstuvwxyz', 10); diff --git a/packages/db/src/core/tokens.ts b/packages/db/src/core/tokens.ts index 88bb26ec5..379a3f681 100644 --- a/packages/db/src/core/tokens.ts +++ b/packages/db/src/core/tokens.ts @@ -4,9 +4,9 @@ import { join } from 'node:path'; import { pathToFileURL } from 'node:url'; import { green } from 'kleur/colors'; import ora from 'ora'; +import { safeFetch } from '../runtime/utils.js'; import { MISSING_PROJECT_ID_ERROR, MISSING_SESSION_ID_ERROR } from './errors.js'; import { getAstroStudioEnv, getAstroStudioUrl } from './utils.js'; -import { safeFetch } from '../runtime/utils.js'; export const SESSION_LOGIN_FILE = pathToFileURL(join(homedir(), '.astro', 'session-token')); export const PROJECT_ID_FILE = pathToFileURL(join(process.cwd(), '.astro', 'link')); diff --git a/packages/db/src/runtime/utils.ts b/packages/db/src/runtime/utils.ts index 32bc60a45..29160b22d 100644 --- a/packages/db/src/runtime/utils.ts +++ b/packages/db/src/runtime/utils.ts @@ -15,4 +15,4 @@ export async function safeFetch( } return response; -}
\ No newline at end of file +} |