diff --git a/.github/workflows/build-with-module-resolve.yml b/.github/workflows/build-with-module-resolve.yml
new file mode 100644
index 0000000000..89f770d312
--- /dev/null
+++ b/.github/workflows/build-with-module-resolve.yml
@@ -0,0 +1,122 @@
+name: Build With Module Resolve
+
+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'
+
+ - run: node scripts/module-resolve/ci.js
+
+ - 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 --no-frozen-lockfile
+ 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 }}
+ IMAGE_TAG: canary-pro-${{ github.sha }}
+ IMAGE_TAG_LATEST: nightly-pro-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 }}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index af528d430b..5240bd52ce 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,6 +27,8 @@ 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'
@@ -44,6 +46,8 @@ jobs:
- name: Install dependencies
run: pnpm install
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
- name: Lint
run: |
diff --git a/.gitignore b/.gitignore
index 5fa933f85e..924094754b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,3 +46,5 @@ Thumbs.db
.next
out/
+
+module-resolve.js
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000000..22f155c102
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1,3 @@
+@toeverything:registry=https://npm.pkg.github.com
+//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
+always-auth=true
\ No newline at end of file
diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs
new file mode 100644
index 0000000000..4873d9492c
--- /dev/null
+++ b/.pnpmfile.cjs
@@ -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,
+ },
+};
diff --git a/README.md b/README.md
index 03842fac0b..e591caacd7 100644
--- a/README.md
+++ b/README.md
@@ -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***
\ No newline at end of file
diff --git a/package.json b/package.json
index 8416d80fad..fcb59f2287 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "pnpm --filter @pathfinder/app dev",
- "build": "pnpm --filter @pathfinder/app build",
+ "build": "pnpm -r build",
"export": "pnpm --filter @pathfinder/app export",
"start": "pnpm --filter @pathfinder/app start",
"lint": "pnpm --filter @pathfinder/app lint"
diff --git a/packages/app/next.config.js b/packages/app/next.config.js
index 85bb0ff287..c0fcfd65d9 100644
--- a/packages/app/next.config.js
+++ b/packages/app/next.config.js
@@ -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;
diff --git a/packages/app/package.json b/packages/app/package.json
index cd200c5982..94167bc213 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -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",
diff --git a/packages/app/src/pages/_app.tsx b/packages/app/src/pages/_app.tsx
index b56c143a59..3aaf96efb7 100644
--- a/packages/app/src/pages/_app.tsx
+++ b/packages/app/src/pages/_app.tsx
@@ -4,6 +4,7 @@ import '../../public/globals.css';
import '../../public/variable.css';
import './temporary.css';
import { EditorProvider } from '@/components/editor-provider';
+import { Logger } from '@toeverything/pathfinder-logger';
const ThemeProvider = dynamic(() => import('@/styles/themeProvider'), {
ssr: false,
@@ -11,11 +12,14 @@ const ThemeProvider = dynamic(() => import('@/styles/themeProvider'), {
function MyApp({ Component, pageProps }: AppProps) {
return (
-
-
-
-
-
+ <>
+
+
+
+
+
+
+ >
);
}
diff --git a/packages/logger/next-env.d.ts b/packages/logger/next-env.d.ts
new file mode 100644
index 0000000000..4f11a03dc6
--- /dev/null
+++ b/packages/logger/next-env.d.ts
@@ -0,0 +1,5 @@
+///
+///
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/packages/logger/package.json b/packages/logger/package.json
new file mode 100644
index 0000000000..2e1cb19a60
--- /dev/null
+++ b/packages/logger/package.json
@@ -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"
+ }
+}
diff --git a/packages/logger/pages/index.tsx b/packages/logger/pages/index.tsx
new file mode 100644
index 0000000000..da378dfab3
--- /dev/null
+++ b/packages/logger/pages/index.tsx
@@ -0,0 +1,10 @@
+import { Logger } from '../src';
+
+const Page = () => {
+ return (
+
+
Track Example
+
+
+ );
+};
diff --git a/packages/logger/src/Logger.tsx b/packages/logger/src/Logger.tsx
new file mode 100644
index 0000000000..21db5d263c
--- /dev/null
+++ b/packages/logger/src/Logger.tsx
@@ -0,0 +1,9 @@
+import { useEffect } from 'react';
+
+export const Logger = () => {
+ useEffect(() => {
+ console.log('@pathfinder/logger: Render Track');
+ }, []);
+
+ return null;
+};
diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts
new file mode 100644
index 0000000000..3e96d48eeb
--- /dev/null
+++ b/packages/logger/src/index.ts
@@ -0,0 +1 @@
+export { Logger } from './Logger';
diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json
new file mode 100644
index 0000000000..063354ba92
--- /dev/null
+++ b/packages/logger/tsconfig.json
@@ -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"]
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b40fe92f85..71f47852d4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -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
@@ -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:
@@ -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
@@ -2128,7 +2166,6 @@ packages:
/marked/4.1.1:
resolution: {integrity: sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==}
engines: {node: '>= 12'}
- hasBin: true
dev: false
/merge2/1.4.1:
@@ -2181,6 +2218,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 +2445,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 +2585,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 +2592,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 +2605,6 @@ packages:
/rimraf/3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
- hasBin: true
dependencies:
glob: 7.2.3
dev: true
@@ -2591,13 +2631,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 +2789,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 +2881,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 +2931,6 @@ packages:
/which/2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
- hasBin: true
dependencies:
isexe: 2.0.0
dev: true
@@ -2927,7 +2975,6 @@ packages:
/y-webrtc/10.2.3:
resolution: {integrity: sha512-X7a6c56/jWhEI8LHLmT3LgzwbPA4r8h46pdVvV+55EQJhi+K6RfmisWgj7h6/2gkB0yveq7iDxlmyrYGnAKW/Q==}
engines: {node: '>=12'}
- hasBin: true
dependencies:
lib0: 0.2.52
simple-peer: 9.11.1
diff --git a/scripts/module-resolve/ci.js b/scripts/module-resolve/ci.js
new file mode 100644
index 0000000000..44c57a08d8
--- /dev/null
+++ b/scripts/module-resolve/ci.js
@@ -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
+);
diff --git a/scripts/module-resolve/module-resolve.tmpl.js b/scripts/module-resolve/module-resolve.tmpl.js
new file mode 100644
index 0000000000..bc0ecaa6dc
--- /dev/null
+++ b/scripts/module-resolve/module-resolve.tmpl.js
@@ -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,
+};