mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 10:22:55 +08:00
build: prevent tsconfig includes sources outside (#2643)
This commit is contained in:
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -35,7 +35,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
- run: |
|
- name: Run checks
|
||||||
|
run: |
|
||||||
yarn i18n-codegen gen
|
yarn i18n-codegen gen
|
||||||
yarn typecheck
|
yarn typecheck
|
||||||
yarn lint --max-warnings=0
|
yarn lint --max-warnings=0
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
|
target
|
||||||
|
lib
|
||||||
|
test-results
|
||||||
|
|||||||
7
apps/electron/layers/constraints.d.ts
vendored
7
apps/electron/layers/constraints.d.ts
vendored
@@ -1,7 +0,0 @@
|
|||||||
/* eslint-disable @typescript-eslint/consistent-type-imports */
|
|
||||||
// This file contains the main process events
|
|
||||||
// It will guide preload and main process on the correct event types and payloads
|
|
||||||
|
|
||||||
declare type MainIPCHandlerMap = typeof import('./main/src/exposed').handlers;
|
|
||||||
|
|
||||||
declare type MainIPCEventMap = typeof import('./main/src/exposed').events;
|
|
||||||
@@ -6,6 +6,8 @@ import { v4 } from 'uuid';
|
|||||||
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
|
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
|
||||||
import * as Y from 'yjs';
|
import * as Y from 'yjs';
|
||||||
|
|
||||||
|
import type { MainIPCHandlerMap } from '../exposed';
|
||||||
|
|
||||||
const registeredHandlers = new Map<
|
const registeredHandlers = new Map<
|
||||||
string,
|
string,
|
||||||
((...args: any[]) => Promise<any>)[]
|
((...args: any[]) => Promise<any>)[]
|
||||||
|
|||||||
@@ -30,3 +30,7 @@ export const getExposedMeta = () => {
|
|||||||
events: eventsMeta,
|
events: eventsMeta,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type MainIPCHandlerMap = typeof handlers;
|
||||||
|
|
||||||
|
export type MainIPCEventMap = typeof events;
|
||||||
|
|||||||
6
apps/electron/layers/preload/preload.d.ts
vendored
6
apps/electron/layers/preload/preload.d.ts
vendored
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable @typescript-eslint/consistent-type-imports */
|
/* eslint-disable @typescript-eslint/consistent-type-imports */
|
||||||
|
|
||||||
interface Window {
|
declare interface Window {
|
||||||
apis: typeof import('./src/affine-apis').apis;
|
apis: import('./src/affine-apis').PreloadHandlers;
|
||||||
events: typeof import('./src/affine-apis').events;
|
events: import('./src/affine-apis').MainIPCEventMap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
||||||
/// <reference path="../../constraints.d.ts" />
|
|
||||||
|
|
||||||
// NOTE: we will generate preload types from this file
|
// NOTE: we will generate preload types from this file
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||||
|
import type {
|
||||||
|
MainIPCEventMap,
|
||||||
|
MainIPCHandlerMap,
|
||||||
|
} from '../../main/src/exposed';
|
||||||
|
|
||||||
type WithoutFirstParameter<T> = T extends (_: any, ...args: infer P) => infer R
|
type WithoutFirstParameter<T> = T extends (_: any, ...args: infer P) => infer R
|
||||||
? (...args: P) => R
|
? (...args: P) => R
|
||||||
: T;
|
: T;
|
||||||
@@ -15,7 +19,7 @@ type HandlersMap<N extends keyof MainIPCHandlerMap> = {
|
|||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
type PreloadHandlers = {
|
export type PreloadHandlers = {
|
||||||
[N in keyof MainIPCHandlerMap]: HandlersMap<N>;
|
[N in keyof MainIPCHandlerMap]: HandlersMap<N>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -88,3 +92,6 @@ const appInfo = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export { apis, appInfo, events };
|
export { apis, appInfo, events };
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||||
|
export type { MainIPCEventMap } from '../../main/src/exposed';
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"noImplicitOverride": true
|
"noImplicitOverride": true,
|
||||||
|
"noEmit": false
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules", "out", "dist"],
|
"exclude": ["node_modules", "out", "dist"],
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import { Empty } from '@affine/component';
|
import { Empty } from '@affine/component';
|
||||||
import type {
|
import type { ListData, TrashListData } from '@affine/component/page-list';
|
||||||
ListData,
|
|
||||||
TrashListData,
|
|
||||||
View,
|
|
||||||
} from '@affine/component/page-list';
|
|
||||||
import {
|
import {
|
||||||
filterByFilterList,
|
filterByFilterList,
|
||||||
PageList,
|
PageList,
|
||||||
PageListTrashView,
|
PageListTrashView,
|
||||||
} from '@affine/component/page-list';
|
} from '@affine/component/page-list';
|
||||||
|
import type { View } from '@affine/component/page-list/filter/shared-types';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { EdgelessIcon, PageIcon } from '@blocksuite/icons';
|
import { EdgelessIcon, PageIcon } from '@blocksuite/icons';
|
||||||
import type { PageMeta } from '@blocksuite/store';
|
import type { PageMeta } from '@blocksuite/store';
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
"test:unit:coverage": "vitest run --coverage",
|
"test:unit:coverage": "vitest run --coverage",
|
||||||
"postinstall": "i18n-codegen gen && husky install",
|
"postinstall": "i18n-codegen gen && husky install",
|
||||||
"notify": "node scripts/notify.mjs",
|
"notify": "node scripts/notify.mjs",
|
||||||
"typecheck": "tsc -b tsconfig.json"
|
"typecheck": "tsc -b tsconfig.json --diagnostics"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*": "prettier --write --ignore-unknown --cache",
|
"*": "prettier --write --ignore-unknown --cache",
|
||||||
|
|||||||
@@ -12,12 +12,13 @@ import { Condition } from '../filter/condition';
|
|||||||
import { tBoolean, tDate } from '../filter/logical/custom-type';
|
import { tBoolean, tDate } from '../filter/logical/custom-type';
|
||||||
import type {
|
import type {
|
||||||
Filter,
|
Filter,
|
||||||
FilterMatcherDataType,
|
|
||||||
LiteralValue,
|
LiteralValue,
|
||||||
Ref,
|
Ref,
|
||||||
VariableMap,
|
VariableMap,
|
||||||
} from '../filter/vars';
|
} from '../filter/shared-types';
|
||||||
import { filterMatcher, toLiteral } from '../filter/vars';
|
import { toLiteral } from '../filter/shared-types';
|
||||||
|
import type { FilterMatcherDataType } from '../filter/vars';
|
||||||
|
import { filterMatcher } from '../filter/vars';
|
||||||
import { filterByFilterList } from '../use-all-page-setting';
|
import { filterByFilterList } from '../use-all-page-setting';
|
||||||
|
|
||||||
const ref = (name: keyof VariableMap): Ref => {
|
const ref = (name: keyof VariableMap): Ref => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Menu, MenuItem } from '../../../ui/menu';
|
|||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
import { literalMatcher } from './literal-matcher';
|
import { literalMatcher } from './literal-matcher';
|
||||||
import type { TFunction, TType } from './logical/typesystem';
|
import type { TFunction, TType } from './logical/typesystem';
|
||||||
import type { Filter, Literal } from './vars';
|
import type { Filter, Literal } from './shared-types';
|
||||||
import { filterMatcher, VariableSelect, vars } from './vars';
|
import { filterMatcher, VariableSelect, vars } from './vars';
|
||||||
|
|
||||||
export const Condition = ({
|
export const Condition = ({
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { Filter, Literal, Ref } from './vars';
|
import type { Filter, Literal, Ref, VariableMap } from './shared-types';
|
||||||
import type { VariableMap } from './vars';
|
|
||||||
import { filterMatcher } from './vars';
|
import { filterMatcher } from './vars';
|
||||||
|
|
||||||
const evalRef = (ref: Ref, variableMap: VariableMap) => {
|
const evalRef = (ref: Ref, variableMap: VariableMap) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { CloseIcon, PlusIcon } from '@blocksuite/icons';
|
|||||||
import { Menu } from '../../..';
|
import { Menu } from '../../..';
|
||||||
import { Condition } from './condition';
|
import { Condition } from './condition';
|
||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
import type { Filter } from './vars';
|
import type { Filter } from './shared-types';
|
||||||
import { CreateFilterMenu } from './vars';
|
import { CreateFilterMenu } from './vars';
|
||||||
export const FilterList = ({
|
export const FilterList = ({
|
||||||
value,
|
value,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { tBoolean, tDate } from './logical/custom-type';
|
|||||||
import { Matcher } from './logical/matcher';
|
import { Matcher } from './logical/matcher';
|
||||||
import type { TType } from './logical/typesystem';
|
import type { TType } from './logical/typesystem';
|
||||||
import { typesystem } from './logical/typesystem';
|
import { typesystem } from './logical/typesystem';
|
||||||
import type { Literal } from './vars';
|
import type { Literal } from './shared-types';
|
||||||
|
|
||||||
export const literalMatcher = new Matcher<{
|
export const literalMatcher = new Matcher<{
|
||||||
render: (props: {
|
render: (props: {
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import { DateTimeIcon, FavoritedIcon } from '@blocksuite/icons';
|
||||||
|
import type { ReactElement } from 'react';
|
||||||
|
|
||||||
|
import { tBoolean, tDate } from './logical/custom-type';
|
||||||
|
import type { TType } from './logical/typesystem';
|
||||||
|
|
||||||
|
export type Ref = {
|
||||||
|
type: 'ref';
|
||||||
|
name: keyof VariableMap;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Filter = {
|
||||||
|
type: 'filter';
|
||||||
|
left: Ref;
|
||||||
|
funcName: string;
|
||||||
|
args: Literal[];
|
||||||
|
};
|
||||||
|
export type LiteralValue =
|
||||||
|
| number
|
||||||
|
| string
|
||||||
|
| boolean
|
||||||
|
| { [K: string]: LiteralValue }
|
||||||
|
| Array<LiteralValue>;
|
||||||
|
export const toLiteral = (value: LiteralValue): Literal => ({
|
||||||
|
type: 'literal',
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
export type Literal = {
|
||||||
|
type: 'literal';
|
||||||
|
value: LiteralValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type FilterVariable = {
|
||||||
|
name: keyof VariableMap;
|
||||||
|
type: TType;
|
||||||
|
icon: ReactElement;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const variableDefineMap = {
|
||||||
|
Created: {
|
||||||
|
type: tDate.create(),
|
||||||
|
icon: <DateTimeIcon />,
|
||||||
|
},
|
||||||
|
Updated: {
|
||||||
|
type: tDate.create(),
|
||||||
|
icon: <DateTimeIcon />,
|
||||||
|
},
|
||||||
|
'Is Favourited': {
|
||||||
|
type: tBoolean.create(),
|
||||||
|
icon: <FavoritedIcon />,
|
||||||
|
},
|
||||||
|
// Imported: {
|
||||||
|
// type: tBoolean.create(),
|
||||||
|
// },
|
||||||
|
// 'Daily Note': {
|
||||||
|
// type: tBoolean.create(),
|
||||||
|
// },
|
||||||
|
} as const;
|
||||||
|
export type VariableMap = {
|
||||||
|
[K in keyof typeof variableDefineMap]: LiteralValue;
|
||||||
|
};
|
||||||
|
export type View = {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
filterList: Filter[];
|
||||||
|
};
|
||||||
@@ -1,68 +1,20 @@
|
|||||||
import { DateTimeIcon, FavoritedIcon } from '@blocksuite/icons';
|
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import type { ReactElement, ReactNode } from 'react';
|
import type { ReactNode } from 'react';
|
||||||
|
|
||||||
import { MenuItem } from '../../../ui/menu';
|
import { MenuItem } from '../../../ui/menu';
|
||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
import { tBoolean, tDate } from './logical/custom-type';
|
import { tBoolean, tDate } from './logical/custom-type';
|
||||||
import { Matcher } from './logical/matcher';
|
import { Matcher } from './logical/matcher';
|
||||||
import type { TFunction, TType } from './logical/typesystem';
|
import type { TFunction } from './logical/typesystem';
|
||||||
import { tFunction, typesystem } from './logical/typesystem';
|
import { tFunction, typesystem } from './logical/typesystem';
|
||||||
|
import type {
|
||||||
|
Filter,
|
||||||
|
FilterVariable,
|
||||||
|
LiteralValue,
|
||||||
|
VariableMap,
|
||||||
|
} from './shared-types';
|
||||||
|
import { variableDefineMap } from './shared-types';
|
||||||
|
|
||||||
export type Ref = {
|
|
||||||
type: 'ref';
|
|
||||||
name: keyof VariableMap;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Filter = {
|
|
||||||
type: 'filter';
|
|
||||||
left: Ref;
|
|
||||||
funcName: string;
|
|
||||||
args: Literal[];
|
|
||||||
};
|
|
||||||
export type LiteralValue =
|
|
||||||
| number
|
|
||||||
| string
|
|
||||||
| boolean
|
|
||||||
| { [K: string]: LiteralValue }
|
|
||||||
| Array<LiteralValue>;
|
|
||||||
export const toLiteral = (value: LiteralValue): Literal => ({
|
|
||||||
type: 'literal',
|
|
||||||
value,
|
|
||||||
});
|
|
||||||
export type Literal = {
|
|
||||||
type: 'literal';
|
|
||||||
value: LiteralValue;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type FilterVariable = {
|
|
||||||
name: keyof VariableMap;
|
|
||||||
type: TType;
|
|
||||||
icon: ReactElement;
|
|
||||||
};
|
|
||||||
export const variableDefineMap = {
|
|
||||||
Created: {
|
|
||||||
type: tDate.create(),
|
|
||||||
icon: <DateTimeIcon />,
|
|
||||||
},
|
|
||||||
Updated: {
|
|
||||||
type: tDate.create(),
|
|
||||||
icon: <DateTimeIcon />,
|
|
||||||
},
|
|
||||||
'Is Favourited': {
|
|
||||||
type: tBoolean.create(),
|
|
||||||
icon: <FavoritedIcon />,
|
|
||||||
},
|
|
||||||
// Imported: {
|
|
||||||
// type: tBoolean.create(),
|
|
||||||
// },
|
|
||||||
// 'Daily Note': {
|
|
||||||
// type: tBoolean.create(),
|
|
||||||
// },
|
|
||||||
} as const;
|
|
||||||
export type VariableMap = {
|
|
||||||
[K in keyof typeof variableDefineMap]: LiteralValue;
|
|
||||||
};
|
|
||||||
export const vars: FilterVariable[] = Object.entries(variableDefineMap).map(
|
export const vars: FilterVariable[] = Object.entries(variableDefineMap).map(
|
||||||
([key, value]) => ({
|
([key, value]) => ({
|
||||||
name: key as keyof VariableMap,
|
name: key as keyof VariableMap,
|
||||||
|
|||||||
@@ -8,13 +8,7 @@ import useSWRImmutable from 'swr/immutable';
|
|||||||
import { NIL } from 'uuid';
|
import { NIL } from 'uuid';
|
||||||
|
|
||||||
import { evalFilterList } from './filter';
|
import { evalFilterList } from './filter';
|
||||||
import type { Filter, VariableMap } from './filter/vars';
|
import type { Filter, VariableMap, View } from './filter/shared-types';
|
||||||
|
|
||||||
export type View = {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
filterList: Filter[];
|
|
||||||
};
|
|
||||||
|
|
||||||
type PersistenceView = View;
|
type PersistenceView = View;
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import { useState } from 'react';
|
|||||||
|
|
||||||
import { Button, Input, Modal, ModalWrapper } from '../../..';
|
import { Button, Input, Modal, ModalWrapper } from '../../..';
|
||||||
import { FilterList } from '../filter';
|
import { FilterList } from '../filter';
|
||||||
import type { Filter } from '../filter/vars';
|
import type { Filter, View } from '../filter/shared-types';
|
||||||
import type { View } from '../use-all-page-setting';
|
|
||||||
import * as styles from './view-list.css';
|
import * as styles from './view-list.css';
|
||||||
|
|
||||||
type CreateViewProps = {
|
type CreateViewProps = {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||||
|
/// <reference path="../../../apps/electron/layers/preload/preload.d.ts" />
|
||||||
|
|
||||||
export * from './components/list-skeleton';
|
export * from './components/list-skeleton';
|
||||||
export * from './styles';
|
export * from './styles';
|
||||||
export * from './ui/breadcrumbs';
|
export * from './ui/breadcrumbs';
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": [
|
"exclude": [
|
||||||
"./src/**/*.ts",
|
"lib",
|
||||||
"./src/**/*.tsx",
|
"./src/components/page-list/filter/shared-types.tsx",
|
||||||
"./src/**/*.json",
|
"./src/components/page-list/filter/logic/custom-type.ts",
|
||||||
"../workspace/src",
|
"./src/components/page-list/filter/logic/matcher.ts",
|
||||||
"../../apps/electron/layers/**/src"
|
"./src/components/page-list/filter/logic/typesystem.ts"
|
||||||
],
|
],
|
||||||
|
"include": ["./src/**/*", "./src/**/*.json"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"noEmit": false,
|
"noEmit": false,
|
||||||
"outDir": "lib"
|
"outDir": "lib"
|
||||||
},
|
},
|
||||||
"exclude": ["lib"],
|
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../debug"
|
"path": "../debug"
|
||||||
@@ -26,9 +26,14 @@
|
|||||||
{
|
{
|
||||||
"path": "../hooks"
|
"path": "../hooks"
|
||||||
},
|
},
|
||||||
|
{ "path": "../workspace" },
|
||||||
|
{
|
||||||
|
"path": "../../apps/electron"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "./tsconfig.node.json"
|
"path": "./tsconfig.node.json"
|
||||||
},
|
},
|
||||||
|
{ "path": "./tsconfig.workspace.json" },
|
||||||
{ "path": "../../tests/fixtures" }
|
{ "path": "../../tests/fixtures" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
18
packages/component/tsconfig.workspace.json
Normal file
18
packages/component/tsconfig.workspace.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// to prevent the `@affine/components` contains circular references with `@affine/workspace`
|
||||||
|
// the include files should be excluded in `./tsconfig.json`
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"composite": true,
|
||||||
|
"noEmit": false,
|
||||||
|
"outDir": "lib"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"./src/components/page-list/filter/shared-types.tsx",
|
||||||
|
"./src/components/page-list/filter/logical/custom-type.ts",
|
||||||
|
"./src/components/page-list/filter/logical/matcher.ts",
|
||||||
|
"./src/components/page-list/filter/logical/typesystem.ts"
|
||||||
|
],
|
||||||
|
"references": [{ "path": "../env" }],
|
||||||
|
"exclude": ["lib"]
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||||
/// <reference path='../../../apps/electron/layers/preload/preload.d.ts' />
|
/// <reference path="../../../apps/electron/layers/preload/preload.d.ts" />
|
||||||
import type { View } from '@affine/component/page-list';
|
|
||||||
|
import type { View } from '@affine/component/page-list/filter/shared-types';
|
||||||
import type { EditorContainer } from '@blocksuite/editor';
|
import type { EditorContainer } from '@blocksuite/editor';
|
||||||
import type { Page } from '@blocksuite/store';
|
import type { Page } from '@blocksuite/store';
|
||||||
import type { Workspace as BlockSuiteWorkspace } from '@blocksuite/store';
|
import type { Workspace as BlockSuiteWorkspace } from '@blocksuite/store';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"noEmit": false,
|
"noEmit": false,
|
||||||
"outDir": "lib"
|
"outDir": "lib"
|
||||||
},
|
},
|
||||||
"include": ["./src", "./src/affine/api", "../../apps/electron/layers"],
|
"include": ["./src", "./src/affine/api"],
|
||||||
"exclude": ["lib"],
|
"exclude": ["lib"],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../../tests/fixtures" },
|
{ "path": "../../tests/fixtures" },
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
{ "path": "../env" },
|
{ "path": "../env" },
|
||||||
{ "path": "../debug" },
|
{ "path": "../debug" },
|
||||||
{ "path": "../hooks" },
|
{ "path": "../hooks" },
|
||||||
{ "path": "../component" }
|
{ "path": "../component/tsconfig.workspace.json" },
|
||||||
|
{ "path": "../../apps/electron" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,10 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@affine/component": ["./packages/component/src/index"],
|
"@affine/component": ["./packages/component/src/index"],
|
||||||
"@affine/component/*": ["./packages/component/src/components/*/index"],
|
"@affine/component/*": [
|
||||||
|
"./packages/component/src/components/*/index",
|
||||||
|
"./packages/component/src/components/*"
|
||||||
|
],
|
||||||
"@affine/templates/*": ["./packages/templates/src/*"],
|
"@affine/templates/*": ["./packages/templates/src/*"],
|
||||||
"@affine/i18n": ["./packages/i18n/src"],
|
"@affine/i18n": ["./packages/i18n/src"],
|
||||||
"@affine/i18n/hooks": ["./packages/i18n/src/i18n-generated"],
|
"@affine/i18n/hooks": ["./packages/i18n/src/i18n-generated"],
|
||||||
@@ -34,6 +37,9 @@
|
|||||||
"@affine/copilot": ["./plugins/copilot/src"],
|
"@affine/copilot": ["./plugins/copilot/src"],
|
||||||
"@affine/copilot/*": ["./plugins/copilot/src/*"],
|
"@affine/copilot/*": ["./plugins/copilot/src/*"],
|
||||||
"@affine/electron/layers/*": ["./apps/electron/layers/*"],
|
"@affine/electron/layers/*": ["./apps/electron/layers/*"],
|
||||||
|
"@affine/electron/preload": [
|
||||||
|
"./apps/electron/layers/preload/preload.d.ts"
|
||||||
|
],
|
||||||
"@affine-test/kit/*": ["./tests/kit/*"],
|
"@affine-test/kit/*": ["./tests/kit/*"],
|
||||||
"@affine-test/fixtures/*": ["./tests/fixtures/*"],
|
"@affine-test/fixtures/*": ["./tests/fixtures/*"],
|
||||||
"@toeverything/y-indexeddb": ["./packages/y-indexeddb/src"],
|
"@toeverything/y-indexeddb": ["./packages/y-indexeddb/src"],
|
||||||
|
|||||||
Reference in New Issue
Block a user