chore: rename fundamentals to base (#9119)
This commit is contained in:
185 files changed
+183
-193
No files matched your search
+1
-1
@@ -12,7 +12,7 @@ storybook-static
|
||||
web-static
|
||||
public
|
||||
packages/backend/server/src/schema.gql
|
||||
packages/backend/server/src/fundamentals/error/errors.gen.ts
|
||||
packages/backend/server/src/base/error/errors.gen.ts
|
||||
packages/frontend/i18n/src/i18n-generated.ts
|
||||
packages/frontend/i18n/src/i18n-completenesses.json
|
||||
packages/frontend/graphql/src/graphql/index.ts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
|
||||
import { Config, SkipThrottle } from './base';
|
||||
import { Public } from './core/auth';
|
||||
import { Config, SkipThrottle } from './fundamentals';
|
||||
|
||||
@Controller('/info')
|
||||
export class AppController {
|
||||
|
||||
@@ -8,6 +8,20 @@ import { ScheduleModule } from '@nestjs/schedule';
|
||||
import { get } from 'lodash-es';
|
||||
|
||||
import { AppController } from './app.controller';
|
||||
import { getOptionalModuleMetadata } from './base';
|
||||
import { CacheModule } from './base/cache';
|
||||
import { AFFiNEConfig, ConfigModule, mergeConfigOverride } from './base/config';
|
||||
import { ErrorModule } from './base/error';
|
||||
import { EventModule } from './base/event';
|
||||
import { GqlModule } from './base/graphql';
|
||||
import { HelpersModule } from './base/helpers';
|
||||
import { MailModule } from './base/mailer';
|
||||
import { MetricsModule } from './base/metrics';
|
||||
import { MutexModule } from './base/mutex';
|
||||
import { PrismaModule } from './base/prisma';
|
||||
import { StorageProviderModule } from './base/storage';
|
||||
import { RateLimiterModule } from './base/throttler';
|
||||
import { WebSocketModule } from './base/websocket';
|
||||
import { AuthModule } from './core/auth';
|
||||
import { ADD_ENABLED_FEATURES, ServerConfigModule } from './core/config';
|
||||
import { DocStorageModule } from './core/doc';
|
||||
@@ -20,24 +34,6 @@ import { StorageModule } from './core/storage';
|
||||
import { SyncModule } from './core/sync';
|
||||
import { UserModule } from './core/user';
|
||||
import { WorkspaceModule } from './core/workspaces';
|
||||
import { getOptionalModuleMetadata } from './fundamentals';
|
||||
import { CacheModule } from './fundamentals/cache';
|
||||
import {
|
||||
AFFiNEConfig,
|
||||
ConfigModule,
|
||||
mergeConfigOverride,
|
||||
} from './fundamentals/config';
|
||||
import { ErrorModule } from './fundamentals/error';
|
||||
import { EventModule } from './fundamentals/event';
|
||||
import { GqlModule } from './fundamentals/graphql';
|
||||
import { HelpersModule } from './fundamentals/helpers';
|
||||
import { MailModule } from './fundamentals/mailer';
|
||||
import { MetricsModule } from './fundamentals/metrics';
|
||||
import { MutexModule } from './fundamentals/mutex';
|
||||
import { PrismaModule } from './fundamentals/prisma';
|
||||
import { StorageProviderModule } from './fundamentals/storage';
|
||||
import { RateLimiterModule } from './fundamentals/throttler';
|
||||
import { WebSocketModule } from './fundamentals/websocket';
|
||||
import { REGISTERED_PLUGINS } from './plugins';
|
||||
import { ENABLED_PLUGINS } from './plugins/registry';
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ import type { NestExpressApplication } from '@nestjs/platform-express';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.mjs';
|
||||
|
||||
import { AuthGuard } from './core/auth';
|
||||
import { ENABLED_FEATURES } from './core/config/server-feature';
|
||||
import {
|
||||
CacheInterceptor,
|
||||
CloudThrottlerGuard,
|
||||
GlobalExceptionFilter,
|
||||
} from './fundamentals';
|
||||
import { SocketIoAdapter, SocketIoAdapterImpl } from './fundamentals/websocket';
|
||||
} from './base';
|
||||
import { SocketIoAdapter, SocketIoAdapterImpl } from './base/websocket';
|
||||
import { AuthGuard } from './core/auth';
|
||||
import { ENABLED_FEATURES } from './core/config/server-feature';
|
||||
import { serverTimingAndCache } from './middleware/timing';
|
||||
|
||||
export async function createApp() {
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,8 +1,8 @@
|
||||
import { ApolloDriverConfig } from '@nestjs/apollo';
|
||||
|
||||
import { defineStartupConfig, ModuleConfig } from '../../fundamentals/config';
|
||||
import { defineStartupConfig, ModuleConfig } from '../../base/config';
|
||||
|
||||
declare module '../../fundamentals/config' {
|
||||
declare module '../../base/config' {
|
||||
interface AppConfig {
|
||||
graphql: ModuleConfig<ApolloDriverConfig>;
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { defineStartupConfig, ModuleConfig } from '../../fundamentals/config';
|
||||
import { defineStartupConfig, ModuleConfig } from '../../base/config';
|
||||
|
||||
export interface ServerStartupConfigurations {
|
||||
/**
|
||||
@@ -24,7 +24,7 @@ export interface ServerStartupConfigurations {
|
||||
path: string;
|
||||
}
|
||||
|
||||
declare module '../../fundamentals/config' {
|
||||
declare module '../../base/config' {
|
||||
interface AppConfig {
|
||||
server: ModuleConfig<ServerStartupConfigurations>;
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,7 @@ import {
|
||||
defineRuntimeConfig,
|
||||
defineStartupConfig,
|
||||
ModuleConfig,
|
||||
} from '../../fundamentals/config';
|
||||
} from '../../base/config';
|
||||
|
||||
export interface AuthStartupConfigurations {
|
||||
/**
|
||||
@@ -59,7 +59,7 @@ export interface AuthRuntimeConfigurations {
|
||||
};
|
||||
}
|
||||
|
||||
declare module '../../fundamentals/config' {
|
||||
declare module '../../base/config' {
|
||||
interface AppConfig {
|
||||
auth: ModuleConfig<AuthStartupConfigurations, AuthRuntimeConfigurations>;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
Throttle,
|
||||
URLHelper,
|
||||
UseNamedGuard,
|
||||
} from '../../fundamentals';
|
||||
} from '../../base';
|
||||
import { UserService } from '../user';
|
||||
import { validators } from '../utils/validators';
|
||||
import { Public } from './guard';
|
||||
|
||||
@@ -14,8 +14,8 @@ import {
|
||||
Config,
|
||||
getRequestResponseFromContext,
|
||||
parseCookies,
|
||||
} from '../../fundamentals';
|
||||
import { WEBSOCKET_OPTIONS } from '../../fundamentals/websocket';
|
||||
} from '../../base';
|
||||
import { WEBSOCKET_OPTIONS } from '../../base/websocket';
|
||||
import { AuthService } from './service';
|
||||
import { Session } from './session';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
SkipThrottle,
|
||||
Throttle,
|
||||
URLHelper,
|
||||
} from '../../fundamentals';
|
||||
} from '../../base';
|
||||
import { Admin } from '../common';
|
||||
import { UserService } from '../user';
|
||||
import { UserType } from '../user/types';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { PrismaClient } from '@prisma/client';
|
||||
import type { CookieOptions, Request, Response } from 'express';
|
||||
import { assign, pick } from 'lodash-es';
|
||||
|
||||
import { Config, MailService, SignUpForbidden } from '../../fundamentals';
|
||||
import { Config, MailService, SignUpForbidden } from '../../base';
|
||||
import { FeatureManagementService } from '../features/management';
|
||||
import { QuotaService } from '../quota/service';
|
||||
import { QuotaType } from '../quota/types';
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { ExecutionContext } from '@nestjs/common';
|
||||
import { createParamDecorator } from '@nestjs/common';
|
||||
import { User, UserSession } from '@prisma/client';
|
||||
|
||||
import { getRequestResponseFromContext } from '../../fundamentals';
|
||||
import { getRequestResponseFromContext } from '../../base';
|
||||
|
||||
/**
|
||||
* Used to fetch current user from the request context.
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Injectable } from '@nestjs/common';
|
||||
import { Cron, CronExpression } from '@nestjs/schedule';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
import { CryptoHelper } from '../../fundamentals/helpers';
|
||||
import { CryptoHelper } from '../../base/helpers';
|
||||
|
||||
export enum TokenType {
|
||||
SignIn,
|
||||
|
||||
@@ -6,10 +6,7 @@ import type {
|
||||
import { Injectable, UseGuards } from '@nestjs/common';
|
||||
import { ModuleRef } from '@nestjs/core';
|
||||
|
||||
import {
|
||||
ActionForbidden,
|
||||
getRequestResponseFromContext,
|
||||
} from '../../fundamentals';
|
||||
import { ActionForbidden, getRequestResponseFromContext } from '../../base';
|
||||
import { FeatureManagementService } from '../features/management';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { defineRuntimeConfig, ModuleConfig } from '../../fundamentals/config';
|
||||
import { defineRuntimeConfig, ModuleConfig } from '../../base/config';
|
||||
|
||||
export interface ServerFlags {
|
||||
earlyAccessControl: boolean;
|
||||
syncClientVersionCheck: boolean;
|
||||
}
|
||||
|
||||
declare module '../../fundamentals/config' {
|
||||
declare module '../../base/config' {
|
||||
interface AppConfig {
|
||||
flags: ModuleConfig<never, ServerFlags>;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import { RuntimeConfig, RuntimeConfigType } from '@prisma/client';
|
||||
import { GraphQLJSON, GraphQLJSONObject } from 'graphql-scalars';
|
||||
|
||||
import { Config, URLHelper } from '../../fundamentals';
|
||||
import { Config, URLHelper } from '../../base';
|
||||
import { Public } from '../auth';
|
||||
import { Admin } from '../common';
|
||||
import { FeatureType } from '../features';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
import { DeploymentType } from '../../fundamentals';
|
||||
import { DeploymentType } from '../../base';
|
||||
|
||||
export enum ServerFeature {
|
||||
Captcha = 'captcha',
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Controller, Get, Logger, Req, Res } from '@nestjs/common';
|
||||
import type { Request, Response } from 'express';
|
||||
import isMobile from 'is-mobile';
|
||||
|
||||
import { Config, metrics, URLHelper } from '../../fundamentals';
|
||||
import { Config, metrics, URLHelper } from '../../base';
|
||||
import { htmlSanitize } from '../../native';
|
||||
import { Public } from '../auth';
|
||||
import { PermissionService } from '../permission';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { applyUpdate, Doc } from 'yjs';
|
||||
|
||||
import { Cache, type EventPayload, OnEvent } from '../../fundamentals';
|
||||
import { Cache, type EventPayload, OnEvent } from '../../base';
|
||||
import { PgWorkspaceDocStorageAdapter } from '../doc';
|
||||
import {
|
||||
type PageDocContent,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
import { Mutex } from '../../../fundamentals';
|
||||
import { Mutex } from '../../../base';
|
||||
import { DocStorageOptions } from '../options';
|
||||
import { DocRecord, DocStorageAdapter } from '../storage';
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ import {
|
||||
FailedToUpsertSnapshot,
|
||||
metrics,
|
||||
Mutex,
|
||||
} from '../../../fundamentals';
|
||||
import { retryable } from '../../../fundamentals/utils/promise';
|
||||
} from '../../../base';
|
||||
import { retryable } from '../../../base/utils/promise';
|
||||
import { DocStorageOptions } from '../options';
|
||||
import {
|
||||
DocRecord,
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
defineRuntimeConfig,
|
||||
defineStartupConfig,
|
||||
ModuleConfig,
|
||||
} from '../../fundamentals/config';
|
||||
} from '../../base/config';
|
||||
|
||||
interface DocStartupConfigurations {
|
||||
manager: {
|
||||
@@ -46,7 +46,7 @@ interface DocRuntimeConfigurations {
|
||||
experimentalMergeWithYOcto: boolean;
|
||||
}
|
||||
|
||||
declare module '../../fundamentals/config' {
|
||||
declare module '../../base/config' {
|
||||
interface AppConfig {
|
||||
doc: ModuleConfig<DocStartupConfigurations, DocRuntimeConfigurations>;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
type EventPayload,
|
||||
metrics,
|
||||
OnEvent,
|
||||
} from '../../fundamentals';
|
||||
} from '../../base';
|
||||
import { PgWorkspaceDocStorageAdapter } from './adapters/workspace';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Config,
|
||||
mergeUpdatesInApplyWay as yotcoMergeUpdates,
|
||||
metrics,
|
||||
} from '../../fundamentals';
|
||||
} from '../../base';
|
||||
import { PermissionService } from '../permission';
|
||||
import { QuotaService } from '../quota';
|
||||
import { DocStorageOptions as IDocStorageOptions } from './storage';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
UndoManager,
|
||||
} from 'yjs';
|
||||
|
||||
import { CallMetric } from '../../../fundamentals';
|
||||
import { CallMetric } from '../../../base';
|
||||
import { Connection } from './connection';
|
||||
import { SingletonLocker } from './lock';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PrismaTransaction } from '../../fundamentals';
|
||||
import { PrismaTransaction } from '../../base';
|
||||
import { Feature, FeatureSchema, FeatureType } from './types';
|
||||
|
||||
class FeatureConfig<T extends FeatureType> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { Config, type EventPayload, OnEvent } from '../../fundamentals';
|
||||
import { Config, type EventPayload, OnEvent } from '../../base';
|
||||
import { UserService } from '../user/service';
|
||||
import { FeatureService } from './service';
|
||||
import { FeatureType } from './types';
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '@nestjs/graphql';
|
||||
import { difference } from 'lodash-es';
|
||||
|
||||
import { Config } from '../../fundamentals';
|
||||
import { Config } from '../../base';
|
||||
import { Admin } from '../common';
|
||||
import { UserType } from '../user/types';
|
||||
import { EarlyAccessType, FeatureManagementService } from './management';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
import { CannotDeleteAllAdminAccount } from '../../fundamentals';
|
||||
import { CannotDeleteAllAdminAccount } from '../../base';
|
||||
import { WorkspaceType } from '../workspaces/types';
|
||||
import { FeatureConfigType, getFeature } from './feature';
|
||||
import { FeatureKind, FeatureType } from './types';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
PrismaTransaction,
|
||||
SpaceAccessDenied,
|
||||
SpaceOwnerNotFound,
|
||||
} from '../../fundamentals';
|
||||
} from '../../base';
|
||||
import { FeatureKind } from '../features/types';
|
||||
import { QuotaType } from '../quota/types';
|
||||
import { Permission, PublicPageMode } from './types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { pick } from 'lodash-es';
|
||||
|
||||
import { PrismaTransaction } from '../../fundamentals';
|
||||
import { PrismaTransaction } from '../../base';
|
||||
import { formatDate, formatSize, Quota, QuotaSchema } from './types';
|
||||
|
||||
const QuotaCache = new Map<number, QuotaConfig>();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
import type { EventPayload } from '../../fundamentals';
|
||||
import { OnEvent, PrismaTransaction } from '../../fundamentals';
|
||||
import type { EventPayload } from '../../base';
|
||||
import { OnEvent, PrismaTransaction } from '../../base';
|
||||
import { FeatureManagementService } from '../features/management';
|
||||
import { FeatureKind } from '../features/types';
|
||||
import { QuotaConfig } from './quota';
|
||||
|
||||
Loaded 100 of 185 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user