refactor(imports): replace relative imports with path aliases (#2741)

This commit is contained in:
Hampus
2026-09-13 20:18:22 +02:00
committed by GitHub
parent a59b80ce11
commit 84dcf6b8a8
1834 changed files with 11601 additions and 10725 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import {
TABLE_MAX_COLUMNS,
TABLE_MAX_IDENT_CHARS,
TABLE_WIDE_TIER_PX,
} from '../src/table/DocsTableMetrics.ts';
} from '@/table/DocsTableMetrics.ts';
import {splitTableRow} from './DocsSource.ts';
export {
+2 -2
View File
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {checkAstroServerHealth} from '../src/server/AstroServer';
import {docsListenHost, docsListenPort} from '../src/server/DocsConfig';
import {checkAstroServerHealth} from '@/server/AstroServer';
import {docsListenHost, docsListenPort} from '@/server/DocsConfig';
await checkAstroServerHealth({
listenHost: docsListenHost(),
+2 -2
View File
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {runAstroServer} from '../src/server/AstroServer';
import {docsListenHost, docsListenPort, docsPublicEndpoint} from '../src/server/DocsConfig';
import {runAstroServer} from '@/server/AstroServer';
import {docsListenHost, docsListenPort, docsPublicEndpoint} from '@/server/DocsConfig';
await runAstroServer({
entrypoint: new URL('../dist/server/entry.mjs', import.meta.url),
+2 -3
View File
@@ -10,8 +10,7 @@ import {fileURLToPath} from 'node:url';
import {parseArgs} from 'node:util';
import {extractRoutesFromControllers} from '@fluxer/openapi/src/extractors/RouteExtractor';
import type {OpenAPIDocument} from '@fluxer/openapi/src/OpenAPITypes';
import {installerChecksumLine} from '../src/installer/InstallerDigest.ts';
import {installerChecksumLine} from '@/installer/InstallerDigest.ts';
import {type DocsRouteHeader, readRouteHeaders} from './DocsRouteHeaders.ts';
import {DOCS_ROOT, HTTP_METHODS, type MarkdownPage, readMarkdownPages, routeShape} from './DocsSource.ts';
@@ -1321,7 +1320,7 @@ console.log('self-hosting guide against deploy/self-hosting');
const digestBearing: Array<[string, string]> = [];
for (const endpoint of INSTALLER_ENDPOINTS) {
const source = await readFile(fileURLToPath(new URL(`../src/pages/${endpoint}`, import.meta.url)), 'utf8');
if (!source.includes("from '../installer/Installer'")) {
if (!source.includes("from '@/installer/Installer'")) {
problems.push(`src/pages/${endpoint} no longer serves the script through src/installer/Installer`);
}
digestBearing.push([`src/pages/${endpoint}`, source]);
-1
View File
@@ -8,7 +8,6 @@ import type {
OpenAPISchema as SchemaNode,
OpenAPIDocument as Spec,
} from '@fluxer/openapi/src/OpenAPITypes';
import {readRouteHeaders} from './DocsRouteHeaders.ts';
import {DOCS_ROOT, HTTP_METHODS, readMarkdownPages, routeShape, slugifyHeading, splitTableRow} from './DocsSource.ts';
-1
View File
@@ -3,7 +3,6 @@
import {readFile} from 'node:fs/promises';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import {DOCS_ROOT, listMarkdownFiles, slugifyHeading} from './DocsSource.ts';
const ASTRO_CONFIG = fileURLToPath(new URL('../astro.config.ts', import.meta.url));
@@ -1,7 +1,7 @@
---
// SPDX-License-Identifier: AGPL-3.0-or-later
import TableOfContentsList from './TableOfContentsList.astro';
import TableOfContentsList from '@/components/TableOfContentsList.astro';
const {toc} = Astro.locals.starlightRoute;
---
+3 -3
View File
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {installerChecksumLine, installerDigest} from './InstallerDigest';
import powershellInstallerSource from './install.ps1?raw';
import shellInstallerSource from './install.sh?raw';
import {installerChecksumLine, installerDigest} from '@/installer/InstallerDigest';
import powershellInstallerSource from '@/installer/install.ps1?raw';
import shellInstallerSource from '@/installer/install.sh?raw';
const CONTENT_TYPE = 'text/plain; charset=utf-8';
const CACHE_CONTROL = 'no-store';
+1 -1
View File
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import type {APIRoute} from 'astro';
import {installerChecksumResponse, powershellInstaller} from '../installer/Installer';
import {installerChecksumResponse, powershellInstaller} from '@/installer/Installer';
export const prerender = false;
+1 -1
View File
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import type {APIRoute} from 'astro';
import {installerScriptResponse, powershellInstaller} from '../installer/Installer';
import {installerScriptResponse, powershellInstaller} from '@/installer/Installer';
export const prerender = false;
+1 -1
View File
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import type {APIRoute} from 'astro';
import {installerChecksumResponse, shellInstaller} from '../installer/Installer';
import {installerChecksumResponse, shellInstaller} from '@/installer/Installer';
export const prerender = false;
+1 -1
View File
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import type {APIRoute} from 'astro';
import {installerScriptResponse, shellInstaller} from '../installer/Installer';
import {installerScriptResponse, shellInstaller} from '@/installer/Installer';
export const prerender = false;
+3 -3
View File
@@ -5,7 +5,7 @@ import {createServer, type IncomingMessage, type Server, type ServerResponse} fr
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import send from 'send';
import {type AstroServerShutdown, AstroServerTermination} from './AstroServerTermination';
import {type AstroServerShutdown, AstroServerTermination} from '@/server/AstroServerTermination';
import {
CanonicalNetworkProtocol,
getNodeErrorCode,
@@ -16,8 +16,8 @@ import {
MIMEType,
NodeErrorCode,
OUTBOUND_USER_AGENT,
} from './HTTPConstants';
import {siteSecurityHeaders} from './SecurityHeaders';
} from '@/server/HTTPConstants';
import {siteSecurityHeaders} from '@/server/SecurityHeaders';
const HEALTH_PATH = '/_health';
const HEALTH_RESPONSE_BODY = JSON.stringify({status: 'ok'});
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {HTTPHeader} from './HTTPConstants';
import {HTTPHeader} from '@/server/HTTPConstants';
const PERMISSIONS_POLICY =
'accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()';