There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix: package `affine/env` modules (#2707)
Himself65f4be15baec90
diff --git a/packages/env/package.json b/packages/env/package.jsonindex b95395cf04..3443ecc55f 100644--- a/packages/env/package.json+++ b/packages/env/package.json@@ -4,6 +4,7 @@"main": "./src/index.ts","module": "./src/index.ts","devDependencies": {+ "@affine/templates": "workspace:*","@blocksuite/global": "0.0.0-20230601122821-16196c35-nightly","next": "=13.4.2","react": "18.3.0-canary-16d053d59-20230506",@@ -14,7 +15,7 @@".": "./src/index.ts","./config": "./src/config.ts","./constant": "./src/constant.ts",- "./blocksuite": "./blocksuite/index.ts"+ "./blocksuite": "./src/blocksuite/index.ts"},"peerDependencies": {"@blocksuite/global": "0.0.0-20230409084303-221991d4-nightly"diff --git a/packages/env/blocksuite/index.ts b/packages/env/src/blocksuite/index.tssimilarity index 84%rename from packages/env/blocksuite/index.tsrename to packages/env/src/blocksuite/index.tsindex 4f12dc3587..f34e1cba66 100644--- a/packages/env/blocksuite/index.ts+++ b/packages/env/src/blocksuite/index.ts@@ -1,7 +1,3 @@-// eslint-disable-next-line @typescript-eslint/triple-slash-reference-/// <reference path="../env.d.ts" />--import { DebugLogger } from '@affine/debug';import markdownTemplate from '@affine/templates/AFFiNE-beta-0.5.4.md';import { ContentParser } from '@blocksuite/blocks/content-parser';import type { Page } from '@blocksuite/store';@@ -23,10 +19,8 @@ const demoTitle = markdownconst demoText = markdown.split('\n').slice(1).join('\n');-const logger = new DebugLogger('init-page');-export function initPage(page: Page): void {- logger.debug('initEmptyPage', page.id);+ console.debug('initEmptyPage', page.id);// Add page block and surface block at root levelconst isFirstPage = page.meta.init === true;if (isFirstPage) {@@ -50,7 +44,7 @@ export function _initEmptyPage(page: Page, title?: string): void {}export function _initPageWithDemoMarkdown(page: Page): void {- logger.debug('initPageWithDefaultMarkdown', page.id);+ console.debug('initPageWithDefaultMarkdown', page.id);const pageBlockId = page.addBlock('affine:page', {title: new page.Text(demoTitle),});diff --git a/packages/env/tsconfig.blocksuite.json b/packages/env/tsconfig.blocksuite.jsondeleted file mode 100644index a18b66827e..0000000000--- a/packages/env/tsconfig.blocksuite.json+++ /dev/null@@ -1,11 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "composite": true,- "noEmit": false,- "outDir": "lib/blocksuite",- "target": "ESNext"- },- "include": ["./blocksuite/*.ts", "src/types.d.ts", "env.d.ts"],- "references": [{ "path": "../debug" }]-}diff --git a/packages/env/tsconfig.json b/packages/env/tsconfig.jsonindex 1aba8b2f50..74e63c8de6 100644--- a/packages/env/tsconfig.json+++ b/packages/env/tsconfig.json@@ -6,5 +6,5 @@"outDir": "lib"},"include": ["./src", "env.d.ts", "./src/global.d.ts"],- "exclude": ["blocksuite", "lib"]+ "exclude": ["lib"]}diff --git a/tsconfig.json b/tsconfig.jsonindex 6d3872e2aa..77330656b6 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -76,9 +76,6 @@{"path": "./packages/env"},- {- "path": "./packages/env/tsconfig.blocksuite.json"- },{"path": "./packages/graphql"},diff --git a/yarn.lock b/yarn.lockindex 216ce4e69d..e1f8f0d6d4 100644--- a/yarn.lock+++ b/yarn.lock@@ -208,6 +208,7 @@ __metadata:version: 0.0.0-use.localresolution: "@affine/env@workspace:packages/env"dependencies:+ "@affine/templates": "workspace:*""@blocksuite/global": 0.0.0-20230601122821-16196c35-nightlylit: ^2.7.5next: =13.4.2