mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
[ci] format
This commit is contained in:
parent
1662aa8a85
commit
d4b88c79b2
2 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
|||
import { pathToFileURL } from './utils.js';
|
||||
import { type ColumnBuilderBaseConfig, type ColumnDataType, sql } from 'drizzle-orm';
|
||||
import {
|
||||
type IndexBuilder,
|
||||
|
@ -11,6 +10,7 @@ import {
|
|||
} from 'drizzle-orm/sqlite-core';
|
||||
import { type DBColumn, type DBTable } from '../core/types.js';
|
||||
import { type SerializedSQL, isSerializedSQL } from './types.js';
|
||||
import { pathToFileURL } from './utils.js';
|
||||
|
||||
export type { Table } from './types.js';
|
||||
export { createRemoteDatabaseClient, createLocalDatabaseClient } from './db-client.js';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AstroError } from 'astro/errors';
|
||||
|
||||
const isWindows = process?.platform === "win32";
|
||||
const isWindows = process?.platform === 'win32';
|
||||
|
||||
/**
|
||||
* Small wrapper around fetch that throws an error if the response is not OK. Allows for custom error handling as well through the onNotOK callback.
|
||||
|
@ -36,10 +36,10 @@ export default function slash(path: string) {
|
|||
}
|
||||
|
||||
export function pathToFileURL(path: string): URL {
|
||||
if(isWindows) {
|
||||
if (isWindows) {
|
||||
let slashed = slash(path);
|
||||
// Windows like C:/foo/bar
|
||||
if(!slashed.startsWith('/')) {
|
||||
if (!slashed.startsWith('/')) {
|
||||
slashed = '/' + slashed;
|
||||
}
|
||||
return new URL('file://' + slashed);
|
||||
|
|
Loading…
Add table
Reference in a new issue