diff --git a/packages/api-client/eslint.config.mjs b/packages/api-client/eslint.config.mjs index 77a884b3b5..c2207ab1eb 100644 --- a/packages/api-client/eslint.config.mjs +++ b/packages/api-client/eslint.config.mjs @@ -1,7 +1,22 @@ import config from '@modrinth/tooling-config/eslint/nuxt.mjs' +import nPlugin from 'eslint-plugin-n' export default config.append([ { ignores: ['dist/'], }, + { + plugins: { + n: nPlugin, + }, + settings: { + n: { + tryExtensions: ['.js', '.ts', '.mjs', '.mts', '.cjs', '.cts', '.json', '.node'], + typescriptExtensionMap: [['.ts', '.js']], + }, + }, + rules: { + 'n/file-extension-in-import': ['error', 'always'], + }, + }, ]) diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 0e939f041e..a19100782e 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -47,6 +47,7 @@ "@modrinth/tooling-config": "workspace:*", "@tauri-apps/plugin-http": "^2.0.0", "esbuild": "0.27.2", + "eslint-plugin-n": "^18.2.1", "typescript": "^5.9.3" }, "peerDependencies": { diff --git a/packages/api-client/src/core/abstract-client.ts b/packages/api-client/src/core/abstract-client.ts index 70c2f1584f..86fa2c6422 100644 --- a/packages/api-client/src/core/abstract-client.ts +++ b/packages/api-client/src/core/abstract-client.ts @@ -1,14 +1,14 @@ -import type { InferredClientModules } from '../modules' -import { buildModuleStructure } from '../modules' -import type { BaseUrlConfig, ClientConfig } from '../types/client' -import type { RequestContext, RequestOptions } from '../types/request' -import type { UploadMetadata, UploadProgress, UploadRequestOptions } from '../types/upload' -import type { AbstractFeature } from './abstract-feature' -import type { AbstractModule } from './abstract-module' -import type { AbstractSyncClient } from './abstract-sync' -import { AbstractUploadClient } from './abstract-upload-client' -import type { AbstractWebSocketClient } from './abstract-websocket' -import { ModrinthApiError, ModrinthServerError } from './errors' +import type { InferredClientModules } from '../modules/index.js' +import { buildModuleStructure } from '../modules/index.js' +import type { BaseUrlConfig, ClientConfig } from '../types/client.js' +import type { RequestContext, RequestOptions } from '../types/request.js' +import type { UploadMetadata, UploadProgress, UploadRequestOptions } from '../types/upload.js' +import type { AbstractFeature } from './abstract-feature.js' +import type { AbstractModule } from './abstract-module.js' +import type { AbstractSyncClient } from './abstract-sync.js' +import { AbstractUploadClient } from './abstract-upload-client.js' +import type { AbstractWebSocketClient } from './abstract-websocket.js' +import { ModrinthApiError, ModrinthServerError } from './errors.js' type ArchonClientModules = Omit & { /** @deprecated Use `backups_queue_v1` for the Backups Queue API. */ diff --git a/packages/api-client/src/core/abstract-feature.ts b/packages/api-client/src/core/abstract-feature.ts index c324d4a57e..bda023f122 100644 --- a/packages/api-client/src/core/abstract-feature.ts +++ b/packages/api-client/src/core/abstract-feature.ts @@ -1,4 +1,4 @@ -import type { RequestContext } from '../types/request' +import type { RequestContext } from '../types/request.js' /** * Base configuration for features diff --git a/packages/api-client/src/core/abstract-module.ts b/packages/api-client/src/core/abstract-module.ts index f0a8fa8cab..d9355ffbb6 100644 --- a/packages/api-client/src/core/abstract-module.ts +++ b/packages/api-client/src/core/abstract-module.ts @@ -1,4 +1,4 @@ -import type { AbstractModrinthClient } from './abstract-client' +import type { AbstractModrinthClient } from './abstract-client.js' export abstract class AbstractModule { protected client: AbstractModrinthClient diff --git a/packages/api-client/src/core/abstract-sync.ts b/packages/api-client/src/core/abstract-sync.ts index a8e31c536e..eae4629208 100644 --- a/packages/api-client/src/core/abstract-sync.ts +++ b/packages/api-client/src/core/abstract-sync.ts @@ -1,7 +1,7 @@ import type mitt from 'mitt' -import type { Archon } from '../modules/archon/types' -import type { RequestOptions } from '../types/request' +import type { Archon } from '../modules/archon/types.js' +import type { RequestOptions } from '../types/request.js' export type SyncEventType = Archon.Sync.v1.SyncEvent['type'] diff --git a/packages/api-client/src/core/abstract-upload-client.ts b/packages/api-client/src/core/abstract-upload-client.ts index 5f3974ea73..32deb3b55b 100644 --- a/packages/api-client/src/core/abstract-upload-client.ts +++ b/packages/api-client/src/core/abstract-upload-client.ts @@ -1,4 +1,4 @@ -import type { UploadHandle, UploadRequestOptions } from '../types/upload' +import type { UploadHandle, UploadRequestOptions } from '../types/upload.js' /** * Abstract base class defining upload capability diff --git a/packages/api-client/src/core/abstract-websocket.ts b/packages/api-client/src/core/abstract-websocket.ts index 8d3e54ee29..aa61e32e43 100644 --- a/packages/api-client/src/core/abstract-websocket.ts +++ b/packages/api-client/src/core/abstract-websocket.ts @@ -1,6 +1,6 @@ import type mitt from 'mitt' -import type { Archon } from '../modules/archon/types' +import type { Archon } from '../modules/archon/types.js' export type WebSocketEventHandler< E extends Archon.Websocket.v0.WSEvent = Archon.Websocket.v0.WSEvent, diff --git a/packages/api-client/src/core/errors.ts b/packages/api-client/src/core/errors.ts index 6b958eb4d2..a5836e2d3a 100644 --- a/packages/api-client/src/core/errors.ts +++ b/packages/api-client/src/core/errors.ts @@ -1,5 +1,5 @@ -import type { ApiErrorData, ModrinthErrorResponse } from '../types/errors' -import { isModrinthErrorResponse } from '../types/errors' +import type { ApiErrorData, ModrinthErrorResponse } from '../types/errors.js' +import { isModrinthErrorResponse } from '../types/errors.js' /** * Base error class for all Modrinth API errors diff --git a/packages/api-client/src/features/auth.ts b/packages/api-client/src/features/auth.ts index 0172b06a97..0334e50e50 100644 --- a/packages/api-client/src/features/auth.ts +++ b/packages/api-client/src/features/auth.ts @@ -1,5 +1,5 @@ -import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature' -import type { RequestContext } from '../types/request' +import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature.js' +import type { RequestContext } from '../types/request.js' /** * Authentication feature configuration diff --git a/packages/api-client/src/features/circuit-breaker.ts b/packages/api-client/src/features/circuit-breaker.ts index cd846a3810..ed57bd937b 100644 --- a/packages/api-client/src/features/circuit-breaker.ts +++ b/packages/api-client/src/features/circuit-breaker.ts @@ -1,6 +1,6 @@ -import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature' -import { ModrinthApiError } from '../core/errors' -import type { RequestContext } from '../types/request' +import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature.js' +import { ModrinthApiError } from '../core/errors.js' +import type { RequestContext } from '../types/request.js' /** * Circuit breaker state diff --git a/packages/api-client/src/features/node-auth.ts b/packages/api-client/src/features/node-auth.ts index c526b68f92..40cd0b0101 100644 --- a/packages/api-client/src/features/node-auth.ts +++ b/packages/api-client/src/features/node-auth.ts @@ -1,7 +1,7 @@ -import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature' -import { ModrinthApiError } from '../core/errors' -import type { RequestContext } from '../types/request' -import { getNodeBaseUrl } from '../utils/node-url' +import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature.js' +import { ModrinthApiError } from '../core/errors.js' +import type { RequestContext } from '../types/request.js' +import { getNodeBaseUrl } from '../utils/node-url.js' /** * Node authentication credentials diff --git a/packages/api-client/src/features/panel-version.ts b/packages/api-client/src/features/panel-version.ts index 5f35bdd701..038bd2c875 100644 --- a/packages/api-client/src/features/panel-version.ts +++ b/packages/api-client/src/features/panel-version.ts @@ -1,5 +1,5 @@ -import { AbstractFeature } from '../core/abstract-feature' -import type { RequestContext } from '../types/request' +import { AbstractFeature } from '../core/abstract-feature.js' +import type { RequestContext } from '../types/request.js' export const PANEL_VERSION = 1 diff --git a/packages/api-client/src/features/retry.ts b/packages/api-client/src/features/retry.ts index 002f87da98..0f28236f2a 100644 --- a/packages/api-client/src/features/retry.ts +++ b/packages/api-client/src/features/retry.ts @@ -1,6 +1,6 @@ -import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature' -import { ModrinthApiError } from '../core/errors' -import type { RequestContext } from '../types/request' +import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature.js' +import { ModrinthApiError } from '../core/errors.js' +import type { RequestContext } from '../types/request.js' /** * Backoff strategy for retries diff --git a/packages/api-client/src/features/verbose-logging.ts b/packages/api-client/src/features/verbose-logging.ts index 960443daca..88097f398f 100644 --- a/packages/api-client/src/features/verbose-logging.ts +++ b/packages/api-client/src/features/verbose-logging.ts @@ -1,5 +1,5 @@ -import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature' -import type { RequestContext } from '../types/request' +import { AbstractFeature, type FeatureConfig } from '../core/abstract-feature.js' +import type { RequestContext } from '../types/request.js' export type VerboseLoggingConfig = FeatureConfig diff --git a/packages/api-client/src/index.ts b/packages/api-client/src/index.ts index 226adcbabd..7b5ceed538 100644 --- a/packages/api-client/src/index.ts +++ b/packages/api-client/src/index.ts @@ -1,5 +1,5 @@ -export { AbstractModrinthClient } from './core/abstract-client' -export { AbstractFeature, type FeatureConfig } from './core/abstract-feature' +export { AbstractModrinthClient } from './core/abstract-client.js' +export { AbstractFeature, type FeatureConfig } from './core/abstract-feature.js' export { AbstractSyncClient, type SyncConnection, @@ -10,46 +10,46 @@ export { type SyncStatus, type SyncStatusHandler, type SyncStatusState, -} from './core/abstract-sync' -export { AbstractUploadClient } from './core/abstract-upload-client' +} from './core/abstract-sync.js' +export { AbstractUploadClient } from './core/abstract-upload-client.js' export { AbstractWebSocketClient, type WebSocketConnection, type WebSocketEventHandler, type WebSocketStatus, -} from './core/abstract-websocket' -export { ModrinthApiError, ModrinthServerError } from './core/errors' -export { type AuthConfig, AuthFeature } from './features/auth' +} from './core/abstract-websocket.js' +export { ModrinthApiError, ModrinthServerError } from './core/errors.js' +export { type AuthConfig, AuthFeature } from './features/auth.js' export { type CircuitBreakerConfig, CircuitBreakerFeature, type CircuitBreakerState, type CircuitBreakerStorage, InMemoryCircuitBreakerStorage, -} from './features/circuit-breaker' -export { type NodeAuth, type NodeAuthConfig, NodeAuthFeature } from './features/node-auth' -export { PANEL_VERSION, PanelVersionFeature } from './features/panel-version' -export { type BackoffStrategy, type RetryConfig, RetryFeature } from './features/retry' -export { type VerboseLoggingConfig, VerboseLoggingFeature } from './features/verbose-logging' -export type { InferredClientModules } from './modules' -export * from './modules/types' -export { GenericModrinthClient } from './platform/generic' -export type { NuxtClientConfig } from './platform/nuxt' -export { NuxtCircuitBreakerStorage, NuxtModrinthClient } from './platform/nuxt' -export { GenericSyncClient } from './platform/sync-generic' -export type { TauriClientConfig } from './platform/tauri' -export { TauriModrinthClient } from './platform/tauri' -export { XHRUploadClient } from './platform/xhr-upload-client' -export { clearNodeAuthState, nodeAuthState, setNodeAuthState } from './state/node-auth' -export * from './types' -export { withJWTRetry } from './utils/jwt-retry' -export { getNodeWebSocketUrl } from './utils/node-url' -export { pingWebSocketUrl, type WebSocketPingOptions } from './utils/pingtest' +} from './features/circuit-breaker.js' +export { type NodeAuth, type NodeAuthConfig, NodeAuthFeature } from './features/node-auth.js' +export { PANEL_VERSION, PanelVersionFeature } from './features/panel-version.js' +export { type BackoffStrategy, type RetryConfig, RetryFeature } from './features/retry.js' +export { type VerboseLoggingConfig, VerboseLoggingFeature } from './features/verbose-logging.js' +export type { InferredClientModules } from './modules/index.js' +export * from './modules/types.js' +export { GenericModrinthClient } from './platform/generic.js' +export type { NuxtClientConfig } from './platform/nuxt.js' +export { NuxtCircuitBreakerStorage, NuxtModrinthClient } from './platform/nuxt.js' +export { GenericSyncClient } from './platform/sync-generic.js' +export type { TauriClientConfig } from './platform/tauri.js' +export { TauriModrinthClient } from './platform/tauri.js' +export { XHRUploadClient } from './platform/xhr-upload-client.js' +export { clearNodeAuthState, nodeAuthState, setNodeAuthState } from './state/node-auth.js' +export * from './types/index.js' +export { withJWTRetry } from './utils/jwt-retry.js' +export { getNodeWebSocketUrl } from './utils/node-url.js' +export { pingWebSocketUrl, type WebSocketPingOptions } from './utils/pingtest.js' export { type ParsedSseEvent, type ParsedSseItem, type ParsedSseRetry, parseSyncEventData, SseParser, -} from './utils/sse' -export type { Override, RawDecimal } from './utils/types' +} from './utils/sse.js' +export type { Override, RawDecimal } from './utils/types.js' diff --git a/packages/api-client/src/modules/archon/actions/v1.ts b/packages/api-client/src/modules/archon/actions/v1.ts index 88227bf0e8..59bdc8a2de 100644 --- a/packages/api-client/src/modules/archon/actions/v1.ts +++ b/packages/api-client/src/modules/archon/actions/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonActionsV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/backups-queue/v1.ts b/packages/api-client/src/modules/archon/backups-queue/v1.ts index 4e36201f14..b65865b009 100644 --- a/packages/api-client/src/modules/archon/backups-queue/v1.ts +++ b/packages/api-client/src/modules/archon/backups-queue/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonBackupsQueueV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/backups/v1.ts b/packages/api-client/src/modules/archon/backups/v1.ts index 589ee72b9d..8f57cddfb6 100644 --- a/packages/api-client/src/modules/archon/backups/v1.ts +++ b/packages/api-client/src/modules/archon/backups/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' /** * @deprecated Use `client.archon.backups_queue_v1` (Backups Queue API) instead. diff --git a/packages/api-client/src/modules/archon/content/v1.ts b/packages/api-client/src/modules/archon/content/v1.ts index fa0c951d6f..81b2f08196 100644 --- a/packages/api-client/src/modules/archon/content/v1.ts +++ b/packages/api-client/src/modules/archon/content/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonContentV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/index.ts b/packages/api-client/src/modules/archon/index.ts index 194ea0333e..560d04eca4 100644 --- a/packages/api-client/src/modules/archon/index.ts +++ b/packages/api-client/src/modules/archon/index.ts @@ -1,8 +1,8 @@ -export * from './actions/v1' -export * from './backups/v1' -export * from './backups-queue/v1' -export * from './content/v1' -export * from './properties/v1' -export * from './servers/v0' -export * from './servers/v1' -export * from './types' +export * from './actions/v1.js' +export * from './backups/v1.js' +export * from './backups-queue/v1.js' +export * from './content/v1.js' +export * from './properties/v1.js' +export * from './servers/v0.js' +export * from './servers/v1.js' +export * from './types.js' diff --git a/packages/api-client/src/modules/archon/nodes/internal.ts b/packages/api-client/src/modules/archon/nodes/internal.ts index 254f392c8c..65d0824bbb 100644 --- a/packages/api-client/src/modules/archon/nodes/internal.ts +++ b/packages/api-client/src/modules/archon/nodes/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonNodesInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/notices/v0.ts b/packages/api-client/src/modules/archon/notices/v0.ts index a6e76b0277..805f8a7aef 100644 --- a/packages/api-client/src/modules/archon/notices/v0.ts +++ b/packages/api-client/src/modules/archon/notices/v0.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonNoticesV0Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/options/v1.ts b/packages/api-client/src/modules/archon/options/v1.ts index 00b978c22a..38103b6b9f 100644 --- a/packages/api-client/src/modules/archon/options/v1.ts +++ b/packages/api-client/src/modules/archon/options/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonOptionsV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/properties/v1.ts b/packages/api-client/src/modules/archon/properties/v1.ts index d62fa911fd..ea34495adb 100644 --- a/packages/api-client/src/modules/archon/properties/v1.ts +++ b/packages/api-client/src/modules/archon/properties/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonPropertiesV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/server-users/v1.ts b/packages/api-client/src/modules/archon/server-users/v1.ts index ef5a144d18..f62f52a794 100644 --- a/packages/api-client/src/modules/archon/server-users/v1.ts +++ b/packages/api-client/src/modules/archon/server-users/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonServerUsersV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/servers/v0.ts b/packages/api-client/src/modules/archon/servers/v0.ts index 8a85532e21..e8321a0da9 100644 --- a/packages/api-client/src/modules/archon/servers/v0.ts +++ b/packages/api-client/src/modules/archon/servers/v0.ts @@ -1,6 +1,6 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { UploadHandle, UploadProgress } from '../../../types/upload' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { UploadHandle, UploadProgress } from '../../../types/upload.js' +import type { Archon } from '../types.js' export class ArchonServersV0Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/servers/v1.ts b/packages/api-client/src/modules/archon/servers/v1.ts index 9435bf11c7..271667022d 100644 --- a/packages/api-client/src/modules/archon/servers/v1.ts +++ b/packages/api-client/src/modules/archon/servers/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonServersV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/transfers/internal.ts b/packages/api-client/src/modules/archon/transfers/internal.ts index ccbedaffd8..c95f4625b2 100644 --- a/packages/api-client/src/modules/archon/transfers/internal.ts +++ b/packages/api-client/src/modules/archon/transfers/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Archon } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Archon } from '../types.js' export class ArchonTransfersInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/archon/types.ts b/packages/api-client/src/modules/archon/types.ts index 7add0d5a84..0c7d86a278 100644 --- a/packages/api-client/src/modules/archon/types.ts +++ b/packages/api-client/src/modules/archon/types.ts @@ -1,4 +1,4 @@ -import type { Labrinth } from '../labrinth/types' +import type { Labrinth } from '../labrinth/types.js' export namespace Archon { export namespace Nodes { diff --git a/packages/api-client/src/modules/index.ts b/packages/api-client/src/modules/index.ts index e435d2f823..3813e90984 100644 --- a/packages/api-client/src/modules/index.ts +++ b/packages/api-client/src/modules/index.ts @@ -1,62 +1,62 @@ -import type { AbstractModrinthClient } from '../core/abstract-client' -import type { AbstractModule } from '../core/abstract-module' -import { ArchonActionsV1Module } from './archon/actions/v1' -import { ArchonBackupsV1Module } from './archon/backups/v1' -import { ArchonBackupsQueueV1Module } from './archon/backups-queue/v1' -import { ArchonContentV1Module } from './archon/content/v1' -import { ArchonNodesInternalModule } from './archon/nodes/internal' -import { ArchonNoticesV0Module } from './archon/notices/v0' -import { ArchonOptionsV1Module } from './archon/options/v1' -import { ArchonPropertiesV1Module } from './archon/properties/v1' -import { ArchonServerUsersV1Module } from './archon/server-users/v1' -import { ArchonServersV0Module } from './archon/servers/v0' -import { ArchonServersV1Module } from './archon/servers/v1' -import { ArchonTransfersInternalModule } from './archon/transfers/internal' -import { ISO3166Module } from './iso3166' -import { KyrosContentV1Module } from './kyros/content/v1' -import { KyrosFilesV0Module } from './kyros/files/v0' -import { KyrosLogsV1Module } from './kyros/logs/v1' -import { KyrosUploadSessionsV1Module } from './kyros/upload-sessions/v1' -import { LabrinthVersionsV2Module, LabrinthVersionsV3Module } from './labrinth' -import { LabrinthAffiliateInternalModule } from './labrinth/affiliate/internal' -import { LabrinthAnalyticsV3Module } from './labrinth/analytics/v3' -import { LabrinthAttributionInternalModule } from './labrinth/attribution/internal' -import { LabrinthAuthInternalModule } from './labrinth/auth/internal' -import { LabrinthAuthV2Module } from './labrinth/auth/v2' -import { LabrinthBillingInternalModule } from './labrinth/billing/internal' -import { LabrinthCampaignInternalModule } from './labrinth/campaign/internal' -import { LabrinthCollectionsModule } from './labrinth/collections' -import { LabrinthContentV3Module } from './labrinth/content/v3' -import { LabrinthExternalProjectsInternalModule } from './labrinth/external-projects/internal' -import { LabrinthFriendsV3Module } from './labrinth/friends/v3' -import { LabrinthGlobalsInternalModule } from './labrinth/globals/internal' -import { LabrinthImagesV3Module } from './labrinth/images/v3' -import { LabrinthLimitsV3Module } from './labrinth/limits/v3' -import { LabrinthModerationInternalModule } from './labrinth/moderation/internal' -import { LabrinthNotificationsV2Module } from './labrinth/notifications/v2' -import { LabrinthOAuthInternalModule } from './labrinth/oauth/internal' -import { LabrinthOrganizationsV3Module } from './labrinth/organizations/v3' -import { LabrinthPatsV2Module } from './labrinth/pats/v2' -import { LabrinthPayoutV3Module } from './labrinth/payout/v3' -import { LabrinthPayoutsV3Module } from './labrinth/payouts/v3' -import { LabrinthProjectsV2Module } from './labrinth/projects/v2' -import { LabrinthProjectsV3Module } from './labrinth/projects/v3' -import { LabrinthReportsV3Module } from './labrinth/reports/v3' -import { LabrinthServerPingInternalModule } from './labrinth/server-ping/internal' -import { LabrinthSessionsV2Module } from './labrinth/sessions/v2' -import { LabrinthStateModule } from './labrinth/state' -import { LabrinthTagsV2Module } from './labrinth/tags/v2' -import { LabrinthTeamsV2Module } from './labrinth/teams/v2' -import { LabrinthTeamsV3Module } from './labrinth/teams/v3' -import { LabrinthTechReviewInternalModule } from './labrinth/tech-review/internal' -import { LabrinthThreadsV3Module } from './labrinth/threads/v3' -import { LabrinthUsersV2Module } from './labrinth/users/v2' -import { LabrinthUsersV3Module } from './labrinth/users/v3' -import { LauncherMetaManifestV0Module } from './launcher-meta/v0' -import { MclogsInsightsV1Module } from './mclogs/insights/v1' -import { MclogsLogsV1Module } from './mclogs/logs/v1' -import { PaperVersionsV3Module } from './paper/v3' -import { PurpurVersionsV2Module } from './purpur/v2' +import type { AbstractModrinthClient } from '../core/abstract-client.js' +import type { AbstractModule } from '../core/abstract-module.js' +import { ArchonActionsV1Module } from './archon/actions/v1.js' +import { ArchonBackupsV1Module } from './archon/backups/v1.js' +import { ArchonBackupsQueueV1Module } from './archon/backups-queue/v1.js' +import { ArchonContentV1Module } from './archon/content/v1.js' +import { ArchonNodesInternalModule } from './archon/nodes/internal.js' +import { ArchonNoticesV0Module } from './archon/notices/v0.js' +import { ArchonOptionsV1Module } from './archon/options/v1.js' +import { ArchonPropertiesV1Module } from './archon/properties/v1.js' +import { ArchonServerUsersV1Module } from './archon/server-users/v1.js' +import { ArchonServersV0Module } from './archon/servers/v0.js' +import { ArchonServersV1Module } from './archon/servers/v1.js' +import { ArchonTransfersInternalModule } from './archon/transfers/internal.js' +import { ISO3166Module } from './iso3166/index.js' +import { KyrosContentV1Module } from './kyros/content/v1.js' +import { KyrosFilesV0Module } from './kyros/files/v0.js' +import { KyrosLogsV1Module } from './kyros/logs/v1.js' +import { KyrosUploadSessionsV1Module } from './kyros/upload-sessions/v1.js' +import { LabrinthAffiliateInternalModule } from './labrinth/affiliate/internal.js' +import { LabrinthAnalyticsV3Module } from './labrinth/analytics/v3.js' +import { LabrinthAttributionInternalModule } from './labrinth/attribution/internal.js' +import { LabrinthAuthInternalModule } from './labrinth/auth/internal.js' +import { LabrinthAuthV2Module } from './labrinth/auth/v2.js' +import { LabrinthBillingInternalModule } from './labrinth/billing/internal.js' +import { LabrinthCampaignInternalModule } from './labrinth/campaign/internal.js' +import { LabrinthCollectionsModule } from './labrinth/collections.js' +import { LabrinthContentV3Module } from './labrinth/content/v3.js' +import { LabrinthExternalProjectsInternalModule } from './labrinth/external-projects/internal.js' +import { LabrinthFriendsV3Module } from './labrinth/friends/v3.js' +import { LabrinthGlobalsInternalModule } from './labrinth/globals/internal.js' +import { LabrinthImagesV3Module } from './labrinth/images/v3.js' +import { LabrinthVersionsV2Module, LabrinthVersionsV3Module } from './labrinth/index.js' +import { LabrinthLimitsV3Module } from './labrinth/limits/v3.js' +import { LabrinthModerationInternalModule } from './labrinth/moderation/internal.js' +import { LabrinthNotificationsV2Module } from './labrinth/notifications/v2.js' +import { LabrinthOAuthInternalModule } from './labrinth/oauth/internal.js' +import { LabrinthOrganizationsV3Module } from './labrinth/organizations/v3.js' +import { LabrinthPatsV2Module } from './labrinth/pats/v2.js' +import { LabrinthPayoutV3Module } from './labrinth/payout/v3.js' +import { LabrinthPayoutsV3Module } from './labrinth/payouts/v3.js' +import { LabrinthProjectsV2Module } from './labrinth/projects/v2.js' +import { LabrinthProjectsV3Module } from './labrinth/projects/v3.js' +import { LabrinthReportsV3Module } from './labrinth/reports/v3.js' +import { LabrinthServerPingInternalModule } from './labrinth/server-ping/internal.js' +import { LabrinthSessionsV2Module } from './labrinth/sessions/v2.js' +import { LabrinthStateModule } from './labrinth/state/index.js' +import { LabrinthTagsV2Module } from './labrinth/tags/v2.js' +import { LabrinthTeamsV2Module } from './labrinth/teams/v2.js' +import { LabrinthTeamsV3Module } from './labrinth/teams/v3.js' +import { LabrinthTechReviewInternalModule } from './labrinth/tech-review/internal.js' +import { LabrinthThreadsV3Module } from './labrinth/threads/v3.js' +import { LabrinthUsersV2Module } from './labrinth/users/v2.js' +import { LabrinthUsersV3Module } from './labrinth/users/v3.js' +import { LauncherMetaManifestV0Module } from './launcher-meta/v0.js' +import { MclogsInsightsV1Module } from './mclogs/insights/v1.js' +import { MclogsLogsV1Module } from './mclogs/logs/v1.js' +import { PaperVersionsV3Module } from './paper/v3.js' +import { PurpurVersionsV2Module } from './purpur/v2.js' type ModuleConstructor = new (client: AbstractModrinthClient) => AbstractModule diff --git a/packages/api-client/src/modules/iso3166/index.ts b/packages/api-client/src/modules/iso3166/index.ts index 741d657932..5e7b3fec15 100644 --- a/packages/api-client/src/modules/iso3166/index.ts +++ b/packages/api-client/src/modules/iso3166/index.ts @@ -1,9 +1,9 @@ import { $fetch } from 'ofetch' -import { AbstractModule } from '../../core/abstract-module' -import type { ISO3166 } from './types' +import { AbstractModule } from '../../core/abstract-module.js' +import type { ISO3166 } from './types.js' -export type { ISO3166 } from './types' +export type { ISO3166 } from './types.js' const ISO3166_REPO = 'https://raw.githubusercontent.com/ipregistry/iso3166/master' diff --git a/packages/api-client/src/modules/kyros/content/v1.ts b/packages/api-client/src/modules/kyros/content/v1.ts index 9f5f4f8b16..2b8ba8ecf2 100644 --- a/packages/api-client/src/modules/kyros/content/v1.ts +++ b/packages/api-client/src/modules/kyros/content/v1.ts @@ -1,6 +1,6 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { UploadHandle, UploadProgress } from '../../../types/upload' -import type { Archon } from '../../archon/types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { UploadHandle, UploadProgress } from '../../../types/upload.js' +import type { Archon } from '../../archon/types.js' export class KyrosContentV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/kyros/files/v0.ts b/packages/api-client/src/modules/kyros/files/v0.ts index b027294e33..5164f19db1 100644 --- a/packages/api-client/src/modules/kyros/files/v0.ts +++ b/packages/api-client/src/modules/kyros/files/v0.ts @@ -1,8 +1,8 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { UploadHandle, UploadProgress } from '../../../types/upload' -import { getNodeBaseUrl } from '../../../utils/node-url' -import type { Archon } from '../../archon/types' -import type { Kyros } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { UploadHandle, UploadProgress } from '../../../types/upload.js' +import { getNodeBaseUrl } from '../../../utils/node-url.js' +import type { Archon } from '../../archon/types.js' +import type { Kyros } from '../types.js' type NodeFsAuth = Pick diff --git a/packages/api-client/src/modules/kyros/logs/v1.ts b/packages/api-client/src/modules/kyros/logs/v1.ts index 01e4cc237a..2cd18a5be1 100644 --- a/packages/api-client/src/modules/kyros/logs/v1.ts +++ b/packages/api-client/src/modules/kyros/logs/v1.ts @@ -1,4 +1,4 @@ -import { AbstractModule } from '../../../core/abstract-module' +import { AbstractModule } from '../../../core/abstract-module.js' export class KyrosLogsV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/kyros/upload-sessions/v1.ts b/packages/api-client/src/modules/kyros/upload-sessions/v1.ts index d88d6dacc0..a4a3637311 100644 --- a/packages/api-client/src/modules/kyros/upload-sessions/v1.ts +++ b/packages/api-client/src/modules/kyros/upload-sessions/v1.ts @@ -1,6 +1,6 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { UploadHandle, UploadProgress } from '../../../types/upload' -import type { Kyros } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { UploadHandle, UploadProgress } from '../../../types/upload.js' +import type { Kyros } from '../types.js' export type UploadSessionFile = { file: File | Blob diff --git a/packages/api-client/src/modules/labrinth/affiliate/internal.ts b/packages/api-client/src/modules/labrinth/affiliate/internal.ts index eb67812627..2e9b82fdf9 100644 --- a/packages/api-client/src/modules/labrinth/affiliate/internal.ts +++ b/packages/api-client/src/modules/labrinth/affiliate/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthAffiliateInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/analytics/v3.ts b/packages/api-client/src/modules/labrinth/analytics/v3.ts index ba93ca4ac8..06ff7fef00 100644 --- a/packages/api-client/src/modules/labrinth/analytics/v3.ts +++ b/packages/api-client/src/modules/labrinth/analytics/v3.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthAnalyticsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/attribution/internal.ts b/packages/api-client/src/modules/labrinth/attribution/internal.ts index 1ee316ecf6..182c229998 100644 --- a/packages/api-client/src/modules/labrinth/attribution/internal.ts +++ b/packages/api-client/src/modules/labrinth/attribution/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' const BASE62_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' diff --git a/packages/api-client/src/modules/labrinth/auth/internal.ts b/packages/api-client/src/modules/labrinth/auth/internal.ts index 6050c5432f..20578fbea1 100644 --- a/packages/api-client/src/modules/labrinth/auth/internal.ts +++ b/packages/api-client/src/modules/labrinth/auth/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthAuthInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/auth/v2.ts b/packages/api-client/src/modules/labrinth/auth/v2.ts index 0a21546231..3ce5091f91 100644 --- a/packages/api-client/src/modules/labrinth/auth/v2.ts +++ b/packages/api-client/src/modules/labrinth/auth/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthAuthV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/billing/internal.ts b/packages/api-client/src/modules/labrinth/billing/internal.ts index fff2a6bfec..9537fe572e 100644 --- a/packages/api-client/src/modules/labrinth/billing/internal.ts +++ b/packages/api-client/src/modules/labrinth/billing/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthBillingInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/campaign/internal.ts b/packages/api-client/src/modules/labrinth/campaign/internal.ts index 4becefad6e..680775d578 100644 --- a/packages/api-client/src/modules/labrinth/campaign/internal.ts +++ b/packages/api-client/src/modules/labrinth/campaign/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthCampaignInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/collections.ts b/packages/api-client/src/modules/labrinth/collections.ts index d8e499bcc1..c9fe2121e2 100644 --- a/packages/api-client/src/modules/labrinth/collections.ts +++ b/packages/api-client/src/modules/labrinth/collections.ts @@ -1,5 +1,5 @@ import { AbstractModule } from '../../core/abstract-module.js' -import type { Labrinth } from '../types' +import type { Labrinth } from '../types.js' export class LabrinthCollectionsModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/content/v3.ts b/packages/api-client/src/modules/labrinth/content/v3.ts index 57af987945..664958c13f 100644 --- a/packages/api-client/src/modules/labrinth/content/v3.ts +++ b/packages/api-client/src/modules/labrinth/content/v3.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthContentV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/external-projects/internal.ts b/packages/api-client/src/modules/labrinth/external-projects/internal.ts index 3f03b9bc83..fc0970e785 100644 --- a/packages/api-client/src/modules/labrinth/external-projects/internal.ts +++ b/packages/api-client/src/modules/labrinth/external-projects/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthExternalProjectsInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/friends/v3.ts b/packages/api-client/src/modules/labrinth/friends/v3.ts index d946880dc5..da76529981 100644 --- a/packages/api-client/src/modules/labrinth/friends/v3.ts +++ b/packages/api-client/src/modules/labrinth/friends/v3.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthFriendsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/globals/internal.ts b/packages/api-client/src/modules/labrinth/globals/internal.ts index ddaee2dea2..e4077a9be2 100644 --- a/packages/api-client/src/modules/labrinth/globals/internal.ts +++ b/packages/api-client/src/modules/labrinth/globals/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthGlobalsInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/images/v3.ts b/packages/api-client/src/modules/labrinth/images/v3.ts index 7613f0debd..8a2fc24778 100644 --- a/packages/api-client/src/modules/labrinth/images/v3.ts +++ b/packages/api-client/src/modules/labrinth/images/v3.ts @@ -1,6 +1,6 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { UploadHandle } from '../../../types/upload' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { UploadHandle } from '../../../types/upload.js' +import type { Labrinth } from '../types.js' function buildImageQueryParams( ext: Labrinth.Images.v3.ImageExtension, diff --git a/packages/api-client/src/modules/labrinth/index.ts b/packages/api-client/src/modules/labrinth/index.ts index 38d23edd70..c659f1a349 100644 --- a/packages/api-client/src/modules/labrinth/index.ts +++ b/packages/api-client/src/modules/labrinth/index.ts @@ -1,31 +1,31 @@ -export * from './analytics/v3' -export * from './attribution/internal' -export * from './auth/internal' -export * from './auth/v2' -export * from './billing/internal' -export * from './collections' -export * from './content/v3' -export * from './external-projects/internal' -export * from './friends/v3' -export * from './globals/internal' -export * from './images/v3' -export * from './limits/v3' -export * from './moderation/internal' -export * from './notifications/v2' -export * from './oauth/internal' -export * from './organizations/v3' -export * from './pats/v2' -export * from './payout/v3' -export * from './payouts/v3' -export * from './projects/v2' -export * from './projects/v3' -export * from './reports/v3' -export * from './server-ping/internal' -export * from './sessions/v2' -export * from './state' -export * from './tech-review/internal' -export * from './threads/v3' -export * from './users/v2' -export * from './users/v3' -export * from './versions/v2' -export * from './versions/v3' +export * from './analytics/v3.js' +export * from './attribution/internal.js' +export * from './auth/internal.js' +export * from './auth/v2.js' +export * from './billing/internal.js' +export * from './collections.js' +export * from './content/v3.js' +export * from './external-projects/internal.js' +export * from './friends/v3.js' +export * from './globals/internal.js' +export * from './images/v3.js' +export * from './limits/v3.js' +export * from './moderation/internal.js' +export * from './notifications/v2.js' +export * from './oauth/internal.js' +export * from './organizations/v3.js' +export * from './pats/v2.js' +export * from './payout/v3.js' +export * from './payouts/v3.js' +export * from './projects/v2.js' +export * from './projects/v3.js' +export * from './reports/v3.js' +export * from './server-ping/internal.js' +export * from './sessions/v2.js' +export * from './state/index.js' +export * from './tech-review/internal.js' +export * from './threads/v3.js' +export * from './users/v2.js' +export * from './users/v3.js' +export * from './versions/v2.js' +export * from './versions/v3.js' diff --git a/packages/api-client/src/modules/labrinth/limits/v3.ts b/packages/api-client/src/modules/labrinth/limits/v3.ts index b0be7f3a99..2dc06594fc 100644 --- a/packages/api-client/src/modules/labrinth/limits/v3.ts +++ b/packages/api-client/src/modules/labrinth/limits/v3.ts @@ -1,5 +1,5 @@ import { AbstractModule } from '../../../core/abstract-module.js' -import type { Labrinth } from '../types' +import type { Labrinth } from '../types.js' export class LabrinthLimitsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/moderation/internal.ts b/packages/api-client/src/modules/labrinth/moderation/internal.ts index 33328f9969..c5242c3f99 100644 --- a/packages/api-client/src/modules/labrinth/moderation/internal.ts +++ b/packages/api-client/src/modules/labrinth/moderation/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthModerationInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/notifications/v2.ts b/packages/api-client/src/modules/labrinth/notifications/v2.ts index 4318e08604..ef330d060a 100644 --- a/packages/api-client/src/modules/labrinth/notifications/v2.ts +++ b/packages/api-client/src/modules/labrinth/notifications/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthNotificationsV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/oauth/internal.ts b/packages/api-client/src/modules/labrinth/oauth/internal.ts index 0b44186320..46af96cc43 100644 --- a/packages/api-client/src/modules/labrinth/oauth/internal.ts +++ b/packages/api-client/src/modules/labrinth/oauth/internal.ts @@ -1,6 +1,6 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { UploadHandle } from '../../../types/upload' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { UploadHandle } from '../../../types/upload.js' +import type { Labrinth } from '../types.js' export class LabrinthOAuthInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/organizations/v3.ts b/packages/api-client/src/modules/labrinth/organizations/v3.ts index 304616024c..227629b6c2 100644 --- a/packages/api-client/src/modules/labrinth/organizations/v3.ts +++ b/packages/api-client/src/modules/labrinth/organizations/v3.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthOrganizationsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/pats/v2.ts b/packages/api-client/src/modules/labrinth/pats/v2.ts index 0fe7fef1be..6fc8fd958d 100644 --- a/packages/api-client/src/modules/labrinth/pats/v2.ts +++ b/packages/api-client/src/modules/labrinth/pats/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthPatsV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/payout/v3.ts b/packages/api-client/src/modules/labrinth/payout/v3.ts index 95275794b6..d6d1b647cc 100644 --- a/packages/api-client/src/modules/labrinth/payout/v3.ts +++ b/packages/api-client/src/modules/labrinth/payout/v3.ts @@ -1,6 +1,6 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Override, RawDecimal } from '../../../utils/types' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Override, RawDecimal } from '../../../utils/types.js' +import type { Labrinth } from '../types.js' type RawPayoutBalance = Override< Labrinth.Payout.v3.PayoutBalance, diff --git a/packages/api-client/src/modules/labrinth/payouts/v3.ts b/packages/api-client/src/modules/labrinth/payouts/v3.ts index 5e52d7d347..b39af86705 100644 --- a/packages/api-client/src/modules/labrinth/payouts/v3.ts +++ b/packages/api-client/src/modules/labrinth/payouts/v3.ts @@ -1,5 +1,5 @@ import { AbstractModule } from '../../../core/abstract-module.js' -import type { Labrinth } from '../types' +import type { Labrinth } from '../types.js' export class LabrinthPayoutsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/projects/v2.ts b/packages/api-client/src/modules/labrinth/projects/v2.ts index 62197d23ca..a4d4b703e7 100644 --- a/packages/api-client/src/modules/labrinth/projects/v2.ts +++ b/packages/api-client/src/modules/labrinth/projects/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthProjectsV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/projects/v3.ts b/packages/api-client/src/modules/labrinth/projects/v3.ts index eb09712f83..41e873ef7f 100644 --- a/packages/api-client/src/modules/labrinth/projects/v3.ts +++ b/packages/api-client/src/modules/labrinth/projects/v3.ts @@ -1,6 +1,6 @@ -import { AbstractModule } from '../../../core/abstract-module' -import { ModrinthApiError } from '../../../core/errors' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import { ModrinthApiError } from '../../../core/errors.js' +import type { Labrinth } from '../types.js' export class LabrinthProjectsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/reports/v3.ts b/packages/api-client/src/modules/labrinth/reports/v3.ts index c702a00fbd..de3c378d40 100644 --- a/packages/api-client/src/modules/labrinth/reports/v3.ts +++ b/packages/api-client/src/modules/labrinth/reports/v3.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthReportsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/server-ping/internal.ts b/packages/api-client/src/modules/labrinth/server-ping/internal.ts index c655eca439..e6b4af78fa 100644 --- a/packages/api-client/src/modules/labrinth/server-ping/internal.ts +++ b/packages/api-client/src/modules/labrinth/server-ping/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthServerPingInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/sessions/v2.ts b/packages/api-client/src/modules/labrinth/sessions/v2.ts index 7fd971e6a4..d206456d7d 100644 --- a/packages/api-client/src/modules/labrinth/sessions/v2.ts +++ b/packages/api-client/src/modules/labrinth/sessions/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthSessionsV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/state/index.ts b/packages/api-client/src/modules/labrinth/state/index.ts index f82f36c737..65edd91d37 100644 --- a/packages/api-client/src/modules/labrinth/state/index.ts +++ b/packages/api-client/src/modules/labrinth/state/index.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthStateModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/tags/v2.ts b/packages/api-client/src/modules/labrinth/tags/v2.ts index f66c6edda6..ba7c16bc79 100644 --- a/packages/api-client/src/modules/labrinth/tags/v2.ts +++ b/packages/api-client/src/modules/labrinth/tags/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthTagsV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/teams/v2.ts b/packages/api-client/src/modules/labrinth/teams/v2.ts index bbc2e6c52a..8631ff39b3 100644 --- a/packages/api-client/src/modules/labrinth/teams/v2.ts +++ b/packages/api-client/src/modules/labrinth/teams/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthTeamsV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/teams/v3.ts b/packages/api-client/src/modules/labrinth/teams/v3.ts index 69347842d9..bcc4238096 100644 --- a/packages/api-client/src/modules/labrinth/teams/v3.ts +++ b/packages/api-client/src/modules/labrinth/teams/v3.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthTeamsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/tech-review/internal.ts b/packages/api-client/src/modules/labrinth/tech-review/internal.ts index e0a02c70b0..765e322a1f 100644 --- a/packages/api-client/src/modules/labrinth/tech-review/internal.ts +++ b/packages/api-client/src/modules/labrinth/tech-review/internal.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthTechReviewInternalModule extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/threads/v3.ts b/packages/api-client/src/modules/labrinth/threads/v3.ts index 52c9c436c6..2bbcf4fd84 100644 --- a/packages/api-client/src/modules/labrinth/threads/v3.ts +++ b/packages/api-client/src/modules/labrinth/threads/v3.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthThreadsV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/types.ts b/packages/api-client/src/modules/labrinth/types.ts index c7e8da75fb..c05681d9c0 100644 --- a/packages/api-client/src/modules/labrinth/types.ts +++ b/packages/api-client/src/modules/labrinth/types.ts @@ -1,5 +1,5 @@ -import type { RawDecimal } from '../../utils/types' -import type { ISO3166 } from '../iso3166/types' +import type { RawDecimal } from '../../utils/types.js' +import type { ISO3166 } from '../iso3166/types.js' export namespace Labrinth { export namespace Content { diff --git a/packages/api-client/src/modules/labrinth/users/v2.ts b/packages/api-client/src/modules/labrinth/users/v2.ts index 2f2cafdef0..e7f3cbcaae 100644 --- a/packages/api-client/src/modules/labrinth/users/v2.ts +++ b/packages/api-client/src/modules/labrinth/users/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthUsersV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/users/v3.ts b/packages/api-client/src/modules/labrinth/users/v3.ts index 90dfced927..47cbc1c5c4 100644 --- a/packages/api-client/src/modules/labrinth/users/v3.ts +++ b/packages/api-client/src/modules/labrinth/users/v3.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthUsersV3Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/versions/v2.ts b/packages/api-client/src/modules/labrinth/versions/v2.ts index 8c9df4083d..c6157b8de7 100644 --- a/packages/api-client/src/modules/labrinth/versions/v2.ts +++ b/packages/api-client/src/modules/labrinth/versions/v2.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Labrinth } from '../types.js' export class LabrinthVersionsV2Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/labrinth/versions/v3.ts b/packages/api-client/src/modules/labrinth/versions/v3.ts index a80710757a..c899b35c2d 100644 --- a/packages/api-client/src/modules/labrinth/versions/v3.ts +++ b/packages/api-client/src/modules/labrinth/versions/v3.ts @@ -1,6 +1,6 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { UploadHandle } from '../../../types/upload' -import type { Labrinth } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { UploadHandle } from '../../../types/upload.js' +import type { Labrinth } from '../types.js' const VERSION_UPLOAD_TIMEOUT_MS = 30 * 60 * 1000 diff --git a/packages/api-client/src/modules/launcher-meta/v0.ts b/packages/api-client/src/modules/launcher-meta/v0.ts index f4d6ff0e3b..43d787cfc7 100644 --- a/packages/api-client/src/modules/launcher-meta/v0.ts +++ b/packages/api-client/src/modules/launcher-meta/v0.ts @@ -1,7 +1,7 @@ -import { AbstractModule } from '../../core/abstract-module' -import type { LauncherMeta } from './types' +import { AbstractModule } from '../../core/abstract-module.js' +import type { LauncherMeta } from './types.js' -export type { LauncherMeta } from './types' +export type { LauncherMeta } from './types.js' const LAUNCHER_META_BASE_URL = 'https://launcher-meta.modrinth.com' diff --git a/packages/api-client/src/modules/mclogs/insights/v1.ts b/packages/api-client/src/modules/mclogs/insights/v1.ts index 26a4b7bfd0..00ce16b0cd 100644 --- a/packages/api-client/src/modules/mclogs/insights/v1.ts +++ b/packages/api-client/src/modules/mclogs/insights/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Mclogs } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Mclogs } from '../types.js' export class MclogsInsightsV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/mclogs/logs/v1.ts b/packages/api-client/src/modules/mclogs/logs/v1.ts index b3179d6a58..fdaa37b826 100644 --- a/packages/api-client/src/modules/mclogs/logs/v1.ts +++ b/packages/api-client/src/modules/mclogs/logs/v1.ts @@ -1,5 +1,5 @@ -import { AbstractModule } from '../../../core/abstract-module' -import type { Mclogs } from '../types' +import { AbstractModule } from '../../../core/abstract-module.js' +import type { Mclogs } from '../types.js' export class MclogsLogsV1Module extends AbstractModule { public getModuleID(): string { diff --git a/packages/api-client/src/modules/paper/v3.ts b/packages/api-client/src/modules/paper/v3.ts index 57aec48178..59d030ff38 100644 --- a/packages/api-client/src/modules/paper/v3.ts +++ b/packages/api-client/src/modules/paper/v3.ts @@ -1,7 +1,7 @@ -import { AbstractModule } from '../../core/abstract-module' -import type { Paper } from './types' +import { AbstractModule } from '../../core/abstract-module.js' +import type { Paper } from './types.js' -export type { Paper } from './types' +export type { Paper } from './types.js' const PAPER_BASE_URL = 'https://fill.papermc.io' diff --git a/packages/api-client/src/modules/purpur/v2.ts b/packages/api-client/src/modules/purpur/v2.ts index a4a566cabe..26c3144487 100644 --- a/packages/api-client/src/modules/purpur/v2.ts +++ b/packages/api-client/src/modules/purpur/v2.ts @@ -1,7 +1,7 @@ -import { AbstractModule } from '../../core/abstract-module' -import type { Purpur } from './types' +import { AbstractModule } from '../../core/abstract-module.js' +import type { Purpur } from './types.js' -export type { Purpur } from './types' +export type { Purpur } from './types.js' const PURPUR_BASE_URL = 'https://api.purpurmc.org' diff --git a/packages/api-client/src/modules/types.ts b/packages/api-client/src/modules/types.ts index d86e87723d..24f2ab23d8 100644 --- a/packages/api-client/src/modules/types.ts +++ b/packages/api-client/src/modules/types.ts @@ -1,8 +1,8 @@ -export * from './archon/types' -export * from './iso3166/types' -export * from './kyros/types' -export * from './labrinth/types' -export * from './launcher-meta/types' -export * from './mclogs/types' -export * from './paper/types' -export * from './purpur/types' +export * from './archon/types.js' +export * from './iso3166/types.js' +export * from './kyros/types.js' +export * from './labrinth/types.js' +export * from './launcher-meta/types.js' +export * from './mclogs/types.js' +export * from './paper/types.js' +export * from './purpur/types.js' diff --git a/packages/api-client/src/platform/generic.ts b/packages/api-client/src/platform/generic.ts index 7ec63b6824..26cd57d9a9 100644 --- a/packages/api-client/src/platform/generic.ts +++ b/packages/api-client/src/platform/generic.ts @@ -1,12 +1,12 @@ import { $fetch, FetchError } from 'ofetch' -import { ModrinthApiError } from '../core/errors' -import type { ClientConfig } from '../types/client' -import type { RequestOptions } from '../types/request' -import { appendRequestParams, parseResponseErrorData, toFetchBody } from '../utils/fetch' -import { GenericSyncClient } from './sync-generic' -import { GenericWebSocketClient } from './websocket-generic' -import { XHRUploadClient } from './xhr-upload-client' +import { ModrinthApiError } from '../core/errors.js' +import type { ClientConfig } from '../types/client.js' +import type { RequestOptions } from '../types/request.js' +import { appendRequestParams, parseResponseErrorData, toFetchBody } from '../utils/fetch.js' +import { GenericSyncClient } from './sync-generic.js' +import { GenericWebSocketClient } from './websocket-generic.js' +import { XHRUploadClient } from './xhr-upload-client.js' /** * Generic platform client using ofetch diff --git a/packages/api-client/src/platform/nuxt.ts b/packages/api-client/src/platform/nuxt.ts index a5308535ba..0d2dfe0503 100644 --- a/packages/api-client/src/platform/nuxt.ts +++ b/packages/api-client/src/platform/nuxt.ts @@ -1,14 +1,14 @@ import { FetchError } from 'ofetch' -import { ModrinthApiError } from '../core/errors' -import type { CircuitBreakerState, CircuitBreakerStorage } from '../features/circuit-breaker' -import type { ClientConfig } from '../types/client' -import type { RequestOptions } from '../types/request' -import type { UploadHandle, UploadRequestOptions } from '../types/upload' -import { appendRequestParams, parseResponseErrorData, toFetchBody } from '../utils/fetch' -import { GenericSyncClient } from './sync-generic' -import { GenericWebSocketClient } from './websocket-generic' -import { XHRUploadClient } from './xhr-upload-client' +import { ModrinthApiError } from '../core/errors.js' +import type { CircuitBreakerState, CircuitBreakerStorage } from '../features/circuit-breaker.js' +import type { ClientConfig } from '../types/client.js' +import type { RequestOptions } from '../types/request.js' +import type { UploadHandle, UploadRequestOptions } from '../types/upload.js' +import { appendRequestParams, parseResponseErrorData, toFetchBody } from '../utils/fetch.js' +import { GenericSyncClient } from './sync-generic.js' +import { GenericWebSocketClient } from './websocket-generic.js' +import { XHRUploadClient } from './xhr-upload-client.js' /** * Circuit breaker storage using Nuxt's useState diff --git a/packages/api-client/src/platform/sync-generic.ts b/packages/api-client/src/platform/sync-generic.ts index e43fbaf2da..7136e2c785 100644 --- a/packages/api-client/src/platform/sync-generic.ts +++ b/packages/api-client/src/platform/sync-generic.ts @@ -5,9 +5,9 @@ import { type SyncConnection, type SyncConnectOptions, type SyncEmitterEvents, -} from '../core/abstract-sync' -import type { Archon } from '../modules/archon/types' -import { type ParsedSseItem, parseSyncEventData, SseParser } from '../utils/sse' +} from '../core/abstract-sync.js' +import type { Archon } from '../modules/archon/types.js' +import { type ParsedSseItem, parseSyncEventData, SseParser } from '../utils/sse.js' type StreamReadResult = 'closed' | 'protocol-reconnect' diff --git a/packages/api-client/src/platform/tauri.ts b/packages/api-client/src/platform/tauri.ts index ac82b53edb..84372d5b7b 100644 --- a/packages/api-client/src/platform/tauri.ts +++ b/packages/api-client/src/platform/tauri.ts @@ -1,10 +1,10 @@ -import type { ModrinthApiError } from '../core/errors' -import type { ClientConfig } from '../types/client' -import type { RequestOptions } from '../types/request' -import { appendRequestParams, parseResponseErrorData, toFetchBody } from '../utils/fetch' -import { GenericSyncClient } from './sync-generic' -import { GenericWebSocketClient } from './websocket-generic' -import { XHRUploadClient } from './xhr-upload-client' +import type { ModrinthApiError } from '../core/errors.js' +import type { ClientConfig } from '../types/client.js' +import type { RequestOptions } from '../types/request.js' +import { appendRequestParams, parseResponseErrorData, toFetchBody } from '../utils/fetch.js' +import { GenericSyncClient } from './sync-generic.js' +import { GenericWebSocketClient } from './websocket-generic.js' +import { XHRUploadClient } from './xhr-upload-client.js' /** * Tauri-specific configuration diff --git a/packages/api-client/src/platform/websocket-generic.ts b/packages/api-client/src/platform/websocket-generic.ts index 19aa098f45..093d450cfe 100644 --- a/packages/api-client/src/platform/websocket-generic.ts +++ b/packages/api-client/src/platform/websocket-generic.ts @@ -1,8 +1,8 @@ import mitt from 'mitt' -import { AbstractWebSocketClient, type WebSocketConnection } from '../core/abstract-websocket' -import type { Archon } from '../modules/archon/types' -import { getNodeWebSocketUrl } from '../utils/node-url' +import { AbstractWebSocketClient, type WebSocketConnection } from '../core/abstract-websocket.js' +import type { Archon } from '../modules/archon/types.js' +import { getNodeWebSocketUrl } from '../utils/node-url.js' type WSEventMap = { [K in Archon.Websocket.v0.WSEvent as `${string}:${K['event']}`]: K diff --git a/packages/api-client/src/platform/xhr-upload-client.ts b/packages/api-client/src/platform/xhr-upload-client.ts index 7d6016d5b9..dfd5066814 100644 --- a/packages/api-client/src/platform/xhr-upload-client.ts +++ b/packages/api-client/src/platform/xhr-upload-client.ts @@ -1,12 +1,12 @@ -import { AbstractModrinthClient } from '../core/abstract-client' -import { ModrinthApiError } from '../core/errors' -import type { RequestContext } from '../types/request' +import { AbstractModrinthClient } from '../core/abstract-client.js' +import { ModrinthApiError } from '../core/errors.js' +import type { RequestContext } from '../types/request.js' import type { UploadHandle, UploadMetadata, UploadProgress, UploadRequestOptions, -} from '../types/upload' +} from '../types/upload.js' /** * Abstract client with XHR-based upload implementation diff --git a/packages/api-client/src/state/node-auth.ts b/packages/api-client/src/state/node-auth.ts index 1bd833b53b..9466f63f81 100644 --- a/packages/api-client/src/state/node-auth.ts +++ b/packages/api-client/src/state/node-auth.ts @@ -1,4 +1,4 @@ -import type { NodeAuth } from '../features/node-auth' +import type { NodeAuth } from '../features/node-auth.js' /** * Global node auth state. diff --git a/packages/api-client/src/types/client.ts b/packages/api-client/src/types/client.ts index 57d33105ef..a70fd3c2a6 100644 --- a/packages/api-client/src/types/client.ts +++ b/packages/api-client/src/types/client.ts @@ -1,5 +1,5 @@ -import type { AbstractFeature } from '../core/abstract-feature' -import type { RequestContext } from './request' +import type { AbstractFeature } from '../core/abstract-feature.js' +import type { RequestContext } from './request.js' export type MaybePromise = T | Promise export type UserAgentProvider = string | (() => MaybePromise) diff --git a/packages/api-client/src/types/index.ts b/packages/api-client/src/types/index.ts index 2fb40b14e4..43c439232c 100644 --- a/packages/api-client/src/types/index.ts +++ b/packages/api-client/src/types/index.ts @@ -1,20 +1,20 @@ -export type { FeatureConfig } from '../core/abstract-feature' -export type { AuthConfig } from '../features/auth' +export type { FeatureConfig } from '../core/abstract-feature.js' +export type { AuthConfig } from '../features/auth.js' export type { CircuitBreakerConfig, CircuitBreakerState, CircuitBreakerStorage, -} from '../features/circuit-breaker' -export type { BackoffStrategy, RetryConfig } from '../features/retry' -export type { Archon } from '../modules/archon/types' -export type { BaseUrlConfig, ClientConfig, RequestHooks } from './client' -export type { ApiErrorData, ModrinthErrorResponse } from './errors' -export { isModrinthErrorResponse } from './errors' -export type { HttpMethod, RequestContext, RequestOptions, ResponseData } from './request' +} from '../features/circuit-breaker.js' +export type { BackoffStrategy, RetryConfig } from '../features/retry.js' +export type { Archon } from '../modules/archon/types.js' +export type { BaseUrlConfig, ClientConfig, RequestHooks } from './client.js' +export type { ApiErrorData, ModrinthErrorResponse } from './errors.js' +export { isModrinthErrorResponse } from './errors.js' +export type { HttpMethod, RequestContext, RequestOptions, ResponseData } from './request.js' export type { UploadHandle, UploadMetadata, UploadProgress, UploadRequestOptions, UploadState, -} from './upload' +} from './upload.js' diff --git a/packages/api-client/src/types/upload.ts b/packages/api-client/src/types/upload.ts index 61e50dc94d..eb1d557f9b 100644 --- a/packages/api-client/src/types/upload.ts +++ b/packages/api-client/src/types/upload.ts @@ -1,4 +1,4 @@ -import type { RequestOptions } from './request' +import type { RequestOptions } from './request.js' /** * Progress information for file uploads diff --git a/packages/api-client/src/utils/fetch.ts b/packages/api-client/src/utils/fetch.ts index 9ab9c7ab0a..0fc24f121e 100644 --- a/packages/api-client/src/utils/fetch.ts +++ b/packages/api-client/src/utils/fetch.ts @@ -1,4 +1,4 @@ -import type { RequestOptions } from '../types/request' +import type { RequestOptions } from '../types/request.js' export function appendRequestParams(url: string, params?: RequestOptions['params']): string { if (!params) return url diff --git a/packages/api-client/src/utils/jwt-retry.ts b/packages/api-client/src/utils/jwt-retry.ts index 1ae0817bfc..d27de6b09c 100644 --- a/packages/api-client/src/utils/jwt-retry.ts +++ b/packages/api-client/src/utils/jwt-retry.ts @@ -1,4 +1,4 @@ -import { ModrinthApiError } from '../core/errors' +import { ModrinthApiError } from '../core/errors.js' /** * Wrap a function with JWT retry logic. diff --git a/packages/api-client/src/utils/sse.ts b/packages/api-client/src/utils/sse.ts index 8497196875..5135518213 100644 --- a/packages/api-client/src/utils/sse.ts +++ b/packages/api-client/src/utils/sse.ts @@ -1,4 +1,4 @@ -import type { Archon } from '../modules/archon/types' +import type { Archon } from '../modules/archon/types.js' export type ParsedSseEvent = { kind: 'event' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e5551e7046..66683547b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -462,6 +462,9 @@ importers: esbuild: specifier: 0.27.2 version: 0.27.2 + eslint-plugin-n: + specifier: ^18.2.1 + version: 18.2.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) typescript: specifier: ^5.9.3 version: 5.9.3 @@ -5937,6 +5940,12 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} + eslint-compat-utils@0.5.1: + resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} + engines: {node: '>=12'} + peerDependencies: + eslint: '>=6.0.0' + eslint-config-flat-gitignore@0.3.0: resolution: {integrity: sha512-0Ndxo4qGhcewjTzw52TK06Mc00aDtHNTdeeW2JfONgDcLkRO/n/BteMRzNVpLQYxdCC/dFEilfM9fjjpGIJ9Og==} peerDependencies: @@ -5960,6 +5969,12 @@ packages: unrs-resolver: optional: true + eslint-plugin-es-x@7.8.0: + resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '>=8' + eslint-plugin-import-x@4.16.1: resolution: {integrity: sha512-vPZZsiOKaBAIATpFE2uMI4w5IRwdv/FpQ+qZZMR4E+PeOcM4OeoEbqxRMnywdxP19TyB/3h6QBB0EWon7letSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5979,6 +5994,19 @@ packages: peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + eslint-plugin-n@18.2.1: + resolution: {integrity: sha512-aO3C9//yq8JIvYOi/T+jPvcZ9hZzpwzbR8esrYpFtgE9vpbyM8kn42AQOtIqYspVmpaSWr8X+nrlQuAJYxXAaw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + peerDependencies: + eslint: '>=8.57.1' + ts-declaration-location: ^1.0.6 + typescript: '>=5.0.0' + peerDependenciesMeta: + ts-declaration-location: + optional: true + typescript: + optional: true + eslint-plugin-prettier@5.5.5: resolution: {integrity: sha512-hscXkbqUZ2sPithAuLm5MXL+Wph+U7wHngPBv9OMWwlP8iaflyxpjTYZkmdgB4/vPIhemRlBEoLrH7UC1n7aUw==} engines: {node: ^14.18.0 || >=16.0.0} @@ -6410,6 +6438,9 @@ packages: resolution: {integrity: sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==} engines: {node: '>=20'} + globrex@0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + glsl-token-functions@1.0.1: resolution: {integrity: sha512-EigGhp1g+aUVeUNY7H1o5tL/bnwIB3/FcRREPr2E7Du+/UDXN24hDkaZ3e4aWHDjHr9lJ6YHXMISkwhUYg9UOg==} @@ -9804,8 +9835,8 @@ packages: vue-component-type-helpers@3.2.4: resolution: {integrity: sha512-05lR16HeZDcDpB23ku5b5f1fBOoHqFnMiKRr2CiEvbG5Ux4Yi0McmQBOET0dR0nxDXosxyVqv67q6CzS3AK8rw==} - vue-component-type-helpers@3.3.3: - resolution: {integrity: sha512-x4nsFpy5Pe8fqPzp/5vkTPeTTDBpAx4WVtV47Ejt0+2FQrq4pRRsJs7JmYRqMFzTu/LW+pCWEjQ3YVCkPV7f9g==} + vue-component-type-helpers@3.3.5: + resolution: {integrity: sha512-Fe1jyPJoUGpJOYKOri44jduR7My4yYINOMJISuMAbmrs+L5LbIDUc8NTWZYY3EJLK0yPLuCmcd5zoCsE4k2/KA==} vue-confetti-explosion@1.0.2: resolution: {integrity: sha512-80OboM3/6BItIoZ6DpNcZFqGpF607kjIVc5af56oKgtFmt5yWehvJeoYhkzYlqxrqdBe0Ko4Ie3bWrmLau+dJw==} @@ -13243,7 +13274,7 @@ snapshots: storybook: 10.2.4(@testing-library/dom@10.4.1)(prettier@3.8.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) type-fest: 2.19.0 vue: 3.5.27(typescript@5.9.3) - vue-component-type-helpers: 3.3.3 + vue-component-type-helpers: 3.3.5 '@stripe/stripe-js@7.9.0': {} @@ -15500,6 +15531,11 @@ snapshots: escape-string-regexp@5.0.0: {} + eslint-compat-utils@0.5.1(eslint@9.39.2(jiti@2.6.1)): + dependencies: + eslint: 9.39.2(jiti@2.6.1) + semver: 7.7.4 + eslint-config-flat-gitignore@0.3.0(eslint@9.39.2(jiti@1.21.7)): dependencies: '@eslint/compat': 1.4.1(eslint@9.39.2(jiti@1.21.7)) @@ -15527,6 +15563,13 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 + eslint-plugin-es-x@7.8.0(eslint@9.39.2(jiti@2.6.1)): + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) + '@eslint-community/regexpp': 4.12.2 + eslint: 9.39.2(jiti@2.6.1) + eslint-compat-utils: 0.5.1(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.54.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3))(eslint@9.39.2(jiti@1.21.7)): dependencies: '@typescript-eslint/types': 8.54.0 @@ -15593,6 +15636,20 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-plugin-n@18.2.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) + enhanced-resolve: 5.19.0 + eslint: 9.39.2(jiti@2.6.1) + eslint-plugin-es-x: 7.8.0(eslint@9.39.2(jiti@2.6.1)) + get-tsconfig: 4.13.1 + globals: 15.15.0 + globrex: 0.1.2 + ignore: 5.3.2 + semver: 7.7.4 + optionalDependencies: + typescript: 5.9.3 + eslint-plugin-prettier@5.5.5(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1))(prettier@3.8.1): dependencies: eslint: 9.39.2(jiti@2.6.1) @@ -16178,6 +16235,8 @@ snapshots: slash: 5.1.0 unicorn-magic: 0.4.0 + globrex@0.1.2: {} + glsl-token-functions@1.0.1: {} glsl-token-string@1.0.1: {} @@ -20292,7 +20351,7 @@ snapshots: vue-component-type-helpers@3.2.4: {} - vue-component-type-helpers@3.3.3: {} + vue-component-type-helpers@3.3.5: {} vue-confetti-explosion@1.0.2(vue@3.5.27(typescript@5.9.3)): dependencies: