merge master into feat/layout

This commit is contained in:
QiShaoXuan 2022-10-20 16:29:39 +08:00
commit 1c3fb798de
20 changed files with 411 additions and 44 deletions

120
.github/workflows/build-community.yml vendored Normal file
View File

@ -0,0 +1,120 @@
name: Build Community Version
on:
push:
branches: [master]
pull_request:
branches: [master]
# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build:
name: Lint nad Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 'latest'
- name: Use Node.js
uses: actions/setup-node@v2
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
with:
node-version: 18.x
cache: 'pnpm'
- name: Restore cache
uses: actions/cache@v3
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- name: Install dependencies
run: pnpm install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
- name: Lint
run: |
pnpm lint --max-warnings=0
# - name: Test
# run: pnpm test
- name: Build
run: pnpm build
- name: Export
run: pnpm export
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: ./packages/app/out
push_to_registry:
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
name: Push Docker image to Docker Hub
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-community
IMAGE_TAG: canary-${{ github.sha }}
IMAGE_TAG_LATEST: nightly-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: artifact
path: packages/app/out/
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
${{ env.IMAGE_TAG }}
${{ env.IMAGE_TAG_LATEST }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
file: ./.github/deployment/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -27,9 +27,13 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
with:
node-version: 18.x
cache: 'pnpm'
- run: node scripts/module-resolve/ci.js
- name: Restore cache
uses: actions/cache@v3
@ -43,7 +47,9 @@ jobs:
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- name: Install dependencies
run: pnpm install
run: pnpm install --no-frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
- name: Lint
run: |

2
.gitignore vendored
View File

@ -46,3 +46,5 @@ Thumbs.db
.next
out/
module-resolve.js

3
.npmrc Normal file
View File

@ -0,0 +1,3 @@
@toeverything:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
always-auth=true

28
.pnpmfile.cjs Normal file
View File

@ -0,0 +1,28 @@
const fs = require('fs');
function getCustomize() {
const customed = fs.existsSync('./module-resolve.js');
if (!customed) {
return null;
}
const script = require('./module-resolve.js');
return script && script.resolve;
}
const customize = getCustomize();
function readPackage(pkg) {
if (!customize) {
return pkg;
}
const customizedPkg = customize(pkg);
return customizedPkg;
}
module.exports = {
hooks: {
readPackage,
},
};

View File

@ -1 +1,46 @@
# Pathfinder
## Prerequisites
- Git
- Node: any 12.x version starting with v12.0.0 or greater
- Pnpm: See [how to installation](https://pnpm.io/installation)
## Development
```
pnpm dev
```
Open https://localhost:3000 in browser.
## Build
```
pnpm build
```
### Replace Modules
You can create `module-resolve.js` in project root dir to replace some package to better implements.
There is a template file in `scripts/module-resolve/module-resolve.tmpl.js`.
Example:
```
function resolve(pkg) {
if (pkg.dependencies && pkg.dependencies['@toeverything/pathfinder-logger']) {
pkg.dependencies['@toeverything/pathfinder-logger'] = '^0.0.1';
}
return pkg;
}
module.exports = {
resolve,
};
```
***After modify/create this file, please delete the `node_modules`, then run `pnpm install` again***

View File

@ -3,8 +3,8 @@
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "pnpm --filter @pathfinder/app dev",
"build": "pnpm --filter @pathfinder/app build",
"dev": "pnpm --filter=!@pathfinder/app build && pnpm --filter @pathfinder/app dev",
"build": "pnpm -r build",
"export": "pnpm --filter @pathfinder/app export",
"start": "pnpm --filter @pathfinder/app start",
"lint": "pnpm --filter @pathfinder/app lint"

View File

@ -1,8 +1,10 @@
const withTM = require('next-transpile-modules')(['@toeverything/pathfinder-logger']);
/** @type {import('next').NextConfig} */
const nextConfig = {
const nextConfig = withTM({
productionBrowserSourceMaps: true,
reactStrictMode: false,
swcMinify: false,
};
});
module.exports = nextConfig;

View File

@ -10,9 +10,9 @@
"lint": "next lint"
},
"dependencies": {
"@blocksuite/blocks": "^0.2.10",
"@blocksuite/editor": "^0.2.10",
"@blocksuite/store": "^0.2.10",
"@blocksuite/blocks": "^0.2.12",
"@blocksuite/editor": "^0.2.12",
"@blocksuite/store": "^0.2.12",
"@emotion/css": "^11.10.0",
"@emotion/react": "^11.10.4",
"@emotion/server": "^11.10.0",
@ -20,9 +20,11 @@
"@mui/base": "^5.0.0-alpha.87",
"@mui/material": "^5.8.6",
"@mui/icons-material": "^5.10.9",
"@toeverything/pathfinder-logger": "workspace:@pathfinder/logger@*",
"css-spring": "^4.1.0",
"lit": "^2.3.1",
"next": "12.3.1",
"next-transpile-modules": "^9.1.0",
"prettier": "^2.7.1",
"quill": "^1.3.7",
"quill-cursors": "^4.0.0",

View File

@ -21,7 +21,7 @@ export const Editor = () => {
});
const groupId = store.addBlock({ flavour: 'group' }, pageId);
const text = new Text('Legend from here...');
const text = new Text(store, 'Legend from here...');
store.addBlock({ flavour: 'paragraph', text }, groupId);
// store.resetHistory();

View File

@ -5,6 +5,7 @@ import '../../public/variable.css';
import './temporary.css';
import { EditorProvider } from '@/components/editor-provider';
import { ModalProvider } from '@/components/global-modal-provider';
import { Logger } from '@toeverything/pathfinder-logger';
const ThemeProvider = dynamic(() => import('@/styles/themeProvider'), {
ssr: false,
@ -12,13 +13,16 @@ const ThemeProvider = dynamic(() => import('@/styles/themeProvider'), {
function MyApp({ Component, pageProps }: AppProps) {
return (
<ThemeProvider>
<ModalProvider>
<EditorProvider>
<Component {...pageProps} />
</EditorProvider>
</ModalProvider>
</ThemeProvider>
<>
<Logger />
<ThemeProvider>
<ModalProvider>
<EditorProvider>
<Component {...pageProps} />
</EditorProvider>
</ModalProvider>
</ThemeProvider>
</>
);
}

5
packages/logger/next-env.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@ -0,0 +1,32 @@
{
"name": "@pathfinder/logger",
"version": "0.0.1",
"description": "",
"type": "module",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"exports": {
"./src/*": "./dist/src/*.js",
".": "./dist/src/index.js"
},
"scripts": {
"dev": "next dev",
"build": "tsc --project ./tsconfig.json"
},
"keywords": [],
"author": "",
"license": "ISC",
"repository": {
"type": "git",
"url": "git+https://github.com/toeverything/AFFINE-pathfinder.git"
},
"dependencies": {
"next": "^12.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.0.21",
"typescript": "^4.8.4"
}
}

View File

@ -0,0 +1,10 @@
import { Logger } from '../src';
const Page = () => {
return (
<div>
<h1>Track Example</h1>
<Logger />
</div>
);
};

View File

@ -0,0 +1,9 @@
import { useEffect } from 'react';
export const Logger = () => {
useEffect(() => {
console.log('@pathfinder/logger: Render Track');
}, []);
return null;
};

View File

@ -0,0 +1 @@
export { Logger } from './Logger';

View File

@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": false,
"esModuleInterop": true,
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"experimentalDecorators": true,
"declaration": true,
"baseUrl": ".",
"rootDir": ".",
"outDir": "./dist"
},
"include": ["next-env.d.ts", "src/**/*.ts", "pages/**/*.tsx"],
"exclude": ["node_modules", "dist"]
}

View File

@ -18,9 +18,9 @@ importers:
packages/app:
specifiers:
'@blocksuite/blocks': ^0.2.10
'@blocksuite/editor': ^0.2.10
'@blocksuite/store': ^0.2.10
'@blocksuite/blocks': ^0.2.12
'@blocksuite/editor': ^0.2.12
'@blocksuite/store': ^0.2.12
'@emotion/css': ^11.10.0
'@emotion/react': ^11.10.4
'@emotion/server': ^11.10.0
@ -28,6 +28,7 @@ importers:
'@mui/base': ^5.0.0-alpha.87
'@mui/icons-material': ^5.10.9
'@mui/material': ^5.8.6
'@toeverything/pathfinder-logger': workspace:@pathfinder/logger@*
'@types/node': 18.7.18
'@types/react': 18.0.20
'@types/react-dom': 18.0.6
@ -38,6 +39,7 @@ importers:
eslint-plugin-prettier: ^4.2.1
lit: ^2.3.1
next: 12.3.1
next-transpile-modules: ^9.1.0
prettier: ^2.7.1
quill: ^1.3.7
quill-cursors: ^4.0.0
@ -45,9 +47,9 @@ importers:
react-dom: 18.2.0
typescript: 4.8.3
dependencies:
'@blocksuite/blocks': 0.2.10
'@blocksuite/editor': 0.2.10
'@blocksuite/store': 0.2.10
'@blocksuite/blocks': 0.2.12
'@blocksuite/editor': 0.2.12
'@blocksuite/store': 0.2.12
'@emotion/css': 11.10.0
'@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34
'@emotion/server': 11.10.0_@emotion+css@11.10.0
@ -55,9 +57,11 @@ importers:
'@mui/base': 5.0.0-alpha.101_7ey2zzynotv32rpkwno45fsx4e
'@mui/icons-material': 5.10.9_5fncb4nagb4cvvcnwamw2rozfa
'@mui/material': 5.10.9_af5ln35zuaotaffazii6n6bke4
'@toeverything/pathfinder-logger': link:../logger
css-spring: 4.1.0
lit: 2.4.0
next: 12.3.1_biqbaboplfbrettd7655fr4n2y
next-transpile-modules: 9.1.0
prettier: 2.7.1
quill: 1.3.7
quill-cursors: 4.0.0
@ -73,6 +77,21 @@ importers:
eslint-plugin-prettier: 4.2.1_i2cojdczqdiurzgttlwdgf764e
typescript: 4.8.3
packages/logger:
specifiers:
'@types/react': ^18.0.21
next: ^12.3.1
react: ^18.2.0
react-dom: ^18.2.0
typescript: ^4.8.4
dependencies:
next: 12.3.1_biqbaboplfbrettd7655fr4n2y
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
devDependencies:
'@types/react': 18.0.21
typescript: 4.8.4
packages:
/@babel/code-frame/7.18.6:
@ -145,10 +164,10 @@ packages:
to-fast-properties: 2.0.0
dev: false
/@blocksuite/blocks/0.2.10:
resolution: {integrity: sha512-CitedKH0jzfiIeHxz8lJfjUyO+8hsA+KBmMymMiAvyj0l3ZSX5v22Pb5ERAu22dJCBEQpIFKwIapgxt49GfIoA==}
/@blocksuite/blocks/0.2.12:
resolution: {integrity: sha512-hKW0ofkcY2pNbI/EfYKuOGw23R/GUSx2zedo59NZzCHm6iitKK9omEigFK25CxMbmlY5dPrswo31QQPgu6u+7w==}
dependencies:
'@blocksuite/store': 0.2.10
'@blocksuite/store': 0.2.12
hotkeys-js: 3.10.0
lit: 2.4.0
quill: 1.3.7
@ -159,11 +178,11 @@ packages:
- utf-8-validate
dev: false
/@blocksuite/editor/0.2.10:
resolution: {integrity: sha512-Ec5+ZDc3cfozJyAnjGef7j2slMZVctCWiSnZ9vQRRn5hfLZmYyGe1BjtxP+VzNLiDoV3KinNFkj7NkDRylsXCw==}
/@blocksuite/editor/0.2.12:
resolution: {integrity: sha512-exGUJ9zBdWpPwCrFPv+u7F+xMlCksif3hRCT5dPWYt8LDVi5CcHuS5uZ0nUEgi0uSDgXyohSgOVaPl8GGYnXzA==}
dependencies:
'@blocksuite/blocks': 0.2.10
'@blocksuite/store': 0.2.10
'@blocksuite/blocks': 0.2.12
'@blocksuite/store': 0.2.12
lit: 2.4.0
marked: 4.1.1
turndown: 7.1.1
@ -173,8 +192,8 @@ packages:
- utf-8-validate
dev: false
/@blocksuite/store/0.2.10:
resolution: {integrity: sha512-8JPCMrx+PiK+fS4EqLmlVdCqF3k/UY3ABXNtfJwGiHGUGsSO64M9JOgCiC+uvwj4M9TdsClZORipod+o6EqRbQ==}
/@blocksuite/store/0.2.12:
resolution: {integrity: sha512-dtiC95NP/dZq23nuP4/KhMQvVTSt8BvpiL86pzZ54YxvLhOga2dFmXzChEZlo3aYbJcBm4Nv+UbZRV8jylTq3w==}
dependencies:
lib0: 0.2.52
y-protocols: 1.0.5
@ -758,6 +777,14 @@ packages:
'@types/scheduler': 0.16.2
csstype: 3.1.1
/@types/react/18.0.21:
resolution: {integrity: sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA==}
dependencies:
'@types/prop-types': 15.7.5
'@types/scheduler': 0.16.2
csstype: 3.1.1
dev: true
/@types/scheduler/0.16.2:
resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==}
@ -877,7 +904,6 @@ packages:
/acorn/8.8.0:
resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
/ajv/6.12.6:
@ -1220,6 +1246,14 @@ packages:
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
dev: true
/enhanced-resolve/5.10.0:
resolution: {integrity: sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==}
engines: {node: '>=10.13.0'}
dependencies:
graceful-fs: 4.2.10
tapable: 2.2.1
dev: false
/err-code/3.0.1:
resolution: {integrity: sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==}
dev: false
@ -1274,6 +1308,11 @@ packages:
is-symbol: 1.0.4
dev: true
/escalade/3.1.1:
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
engines: {node: '>=6'}
dev: false
/escape-string-regexp/1.0.5:
resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
engines: {node: '>=0.8.0'}
@ -1531,7 +1570,6 @@ packages:
/eslint/8.22.0:
resolution: {integrity: sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
'@eslint/eslintrc': 1.3.2
'@humanwhocodes/config-array': 0.10.4
@ -1790,6 +1828,10 @@ packages:
slash: 3.0.0
dev: true
/graceful-fs/4.2.10:
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
dev: false
/grapheme-splitter/1.0.4:
resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
dev: true
@ -1841,7 +1883,6 @@ packages:
/html-tokenize/2.0.1:
resolution: {integrity: sha512-QY6S+hZ0f5m1WT8WffYN+Hg+xm/w5I8XeUcAq/ZYP5wVC8xbKi4Whhru3FtrAebD5EhBW8rmFzkDI6eCAuFe2w==}
hasBin: true
dependencies:
buffer-from: 0.1.2
inherits: 2.0.4
@ -2015,7 +2056,6 @@ packages:
/js-yaml/4.1.0:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
dependencies:
argparse: 2.0.1
dev: true
@ -2034,7 +2074,6 @@ packages:
/json5/1.0.1:
resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==}
hasBin: true
dependencies:
minimist: 1.2.6
dev: true
@ -2114,7 +2153,6 @@ packages:
/loose-envify/1.4.0:
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
hasBin: true
dependencies:
js-tokens: 4.0.0
@ -2181,6 +2219,13 @@ packages:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
dev: true
/next-transpile-modules/9.1.0:
resolution: {integrity: sha512-yzJji65xDqcIqjvx5vPJcs1M+MYQTzLM1pXH/qf8Q88ohx+bwVGDc1AeV+HKr1NwvMCNTpwVPSFI7cA5WdyeWA==}
dependencies:
enhanced-resolve: 5.10.0
escalade: 3.1.1
dev: false
/next/12.3.1_biqbaboplfbrettd7655fr4n2y:
resolution: {integrity: sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==}
engines: {node: '>=12.22.0'}
@ -2401,7 +2446,6 @@ packages:
/prettier/2.7.1:
resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==}
engines: {node: '>=10.13.0'}
hasBin: true
/process-nextick-args/2.0.1:
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
@ -2542,7 +2586,6 @@ packages:
/resolve/1.22.1:
resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==}
hasBin: true
dependencies:
is-core-module: 2.10.0
path-parse: 1.0.7
@ -2550,7 +2593,6 @@ packages:
/resolve/2.0.0-next.4:
resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==}
hasBin: true
dependencies:
is-core-module: 2.10.0
path-parse: 1.0.7
@ -2564,7 +2606,6 @@ packages:
/rimraf/3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
hasBin: true
dependencies:
glob: 7.2.3
dev: true
@ -2591,13 +2632,11 @@ packages:
/semver/6.3.0:
resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==}
hasBin: true
dev: true
/semver/7.3.7:
resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==}
engines: {node: '>=10'}
hasBin: true
dependencies:
lru-cache: 6.0.0
dev: true
@ -2751,6 +2790,11 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
/tapable/2.2.1:
resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==}
engines: {node: '>=6'}
dev: false
/text-table/0.2.0:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
dev: true
@ -2838,6 +2882,12 @@ packages:
hasBin: true
dev: true
/typescript/4.8.4:
resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/unbox-primitive/1.0.2:
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
dependencies:
@ -2882,7 +2932,6 @@ packages:
/which/2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
hasBin: true
dependencies:
isexe: 2.0.0
dev: true

View File

@ -0,0 +1,13 @@
const fs = require('fs');
const path = require('path');
const templatePath = path.resolve(__dirname, 'module-resolve.tmpl.js');
const destinationPath = path.resolve(__dirname, '../../module-resolve.js');
console.log('template path', templatePath);
console.log('destination path', destinationPath);
fs.copyFileSync(
templatePath,
destinationPath
);

View File

@ -0,0 +1,11 @@
function resolve(pkg) {
if (pkg.dependencies && pkg.dependencies['@toeverything/pathfinder-logger']) {
pkg.dependencies['@toeverything/pathfinder-logger'] = 'latest';
}
return pkg;
}
module.exports = {
resolve,
};