feat: module resolve

feat: module resolve

fix: logger repository

fix: module resolve

chore: add workflow for module resolve

chore: update workflow env

chore: update workflow install

chore: update workflow env for npm token

chore: test docker

chore: update workflow env
This commit is contained in:
alt0 2022-10-18 01:31:40 +08:00
parent 0712391c7f
commit 88c8a408b5
19 changed files with 426 additions and 71 deletions

View File

@ -0,0 +1,122 @@
name: Build With Module Resolve
on:
push:
branches: [feat/track]
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 }}

View File

@ -2,7 +2,7 @@ name: Build
on:
push:
branches: [master]
branches: [feat/track]
pull_request:
branches: [master]
@ -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: |

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,22 @@
# Pathfinder
## Build
### Replace Modules
You can create `module-resolve.js` in project root dir to replace some package to better implements. Example:
```
function resolve(pkg) {
if (pkg.dependencies && pkg.dependencies['@toeverything/track']) {
pkg.dependencies['@toeverything/track'] = '^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

@ -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"

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

@ -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

@ -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 (
<ThemeProvider>
<EditorProvider>
<Component {...pageProps} />
</EditorProvider>
</ThemeProvider>
<>
<Logger />
<ThemeProvider>
<EditorProvider>
<Component {...pageProps} />
</EditorProvider>
</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

@ -4,17 +4,22 @@ importers:
.:
specifiers:
'@toeverything/track': ^0.0.1
eslint: 8.22.0
eslint-config-next: 12.3.1
eslint-config-prettier: ^8.5.0
eslint-plugin-prettier: ^4.2.1
prettier: ^2.7.1
typescript: 4.2.4
dependencies:
'@toeverything/track': 0.0.1
devDependencies:
eslint: 8.22.0
eslint-config-next: 12.3.1_eslint@8.22.0
eslint-config-next: 12.3.1_5qnjiidcar3zhltuqkapawl5tq
eslint-config-prettier: 8.5.0_eslint@8.22.0
eslint-plugin-prettier: 4.2.1_i2cojdczqdiurzgttlwdgf764e
prettier: 2.7.1
typescript: 4.2.4
packages/app:
specifiers:
@ -28,6 +33,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 +44,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 +62,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 +82,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 +782,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==}
@ -765,6 +797,26 @@ packages:
resolution: {integrity: sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==}
dev: false
/@typescript-eslint/parser/5.38.0_5qnjiidcar3zhltuqkapawl5tq:
resolution: {integrity: sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.38.0
'@typescript-eslint/types': 5.38.0
'@typescript-eslint/typescript-estree': 5.38.0_typescript@4.2.4
debug: 4.3.4
eslint: 8.22.0
typescript: 4.2.4
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/parser/5.38.0_76twfck5d7crjqrmw4yltga7zm:
resolution: {integrity: sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -785,25 +837,6 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.38.0_eslint@8.22.0:
resolution: {integrity: sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.38.0
'@typescript-eslint/types': 5.38.0
'@typescript-eslint/typescript-estree': 5.38.0
debug: 4.3.4
eslint: 8.22.0
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/scope-manager/5.38.0:
resolution: {integrity: sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -817,7 +850,7 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/typescript-estree/5.38.0:
/@typescript-eslint/typescript-estree/5.38.0_typescript@4.2.4:
resolution: {integrity: sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -832,7 +865,8 @@ packages:
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.7
tsutils: 3.21.0
tsutils: 3.21.0_typescript@4.2.4
typescript: 4.2.4
transitivePeerDependencies:
- supports-color
dev: true
@ -877,7 +911,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 +1253,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 +1315,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'}
@ -1283,6 +1329,31 @@ packages:
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
engines: {node: '>=10'}
/eslint-config-next/12.3.1_5qnjiidcar3zhltuqkapawl5tq:
resolution: {integrity: sha512-EN/xwKPU6jz1G0Qi6Bd/BqMnHLyRAL0VsaQaWA7F3KkjAgZHi4f1uL1JKGWNxdQpHTW/sdGONBd0bzxUka/DJg==}
peerDependencies:
eslint: ^7.23.0 || ^8.0.0
typescript: '>=3.3.1'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@next/eslint-plugin-next': 12.3.1
'@rushstack/eslint-patch': 1.2.0
'@typescript-eslint/parser': 5.38.0_5qnjiidcar3zhltuqkapawl5tq
eslint: 8.22.0
eslint-import-resolver-node: 0.3.6
eslint-import-resolver-typescript: 2.7.1_2iahngt3u2tkbdlu6s4gkur3pu
eslint-plugin-import: 2.26.0_dz6mtv6jua3j7xbldvgsafodwi
eslint-plugin-jsx-a11y: 6.6.1_eslint@8.22.0
eslint-plugin-react: 7.31.8_eslint@8.22.0
eslint-plugin-react-hooks: 4.6.0_eslint@8.22.0
typescript: 4.2.4
transitivePeerDependencies:
- eslint-import-resolver-webpack
- supports-color
dev: true
/eslint-config-next/12.3.1_76twfck5d7crjqrmw4yltga7zm:
resolution: {integrity: sha512-EN/xwKPU6jz1G0Qi6Bd/BqMnHLyRAL0VsaQaWA7F3KkjAgZHi4f1uL1JKGWNxdQpHTW/sdGONBd0bzxUka/DJg==}
peerDependencies:
@ -1308,30 +1379,6 @@ packages:
- supports-color
dev: true
/eslint-config-next/12.3.1_eslint@8.22.0:
resolution: {integrity: sha512-EN/xwKPU6jz1G0Qi6Bd/BqMnHLyRAL0VsaQaWA7F3KkjAgZHi4f1uL1JKGWNxdQpHTW/sdGONBd0bzxUka/DJg==}
peerDependencies:
eslint: ^7.23.0 || ^8.0.0
typescript: '>=3.3.1'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@next/eslint-plugin-next': 12.3.1
'@rushstack/eslint-patch': 1.2.0
'@typescript-eslint/parser': 5.38.0_eslint@8.22.0
eslint: 8.22.0
eslint-import-resolver-node: 0.3.6
eslint-import-resolver-typescript: 2.7.1_2iahngt3u2tkbdlu6s4gkur3pu
eslint-plugin-import: 2.26.0_dz6mtv6jua3j7xbldvgsafodwi
eslint-plugin-jsx-a11y: 6.6.1_eslint@8.22.0
eslint-plugin-react: 7.31.8_eslint@8.22.0
eslint-plugin-react-hooks: 4.6.0_eslint@8.22.0
transitivePeerDependencies:
- eslint-import-resolver-webpack
- supports-color
dev: true
/eslint-config-prettier/8.5.0_eslint@8.22.0:
resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==}
hasBin: true
@ -1531,7 +1578,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 +1836,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 +1891,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 +2064,6 @@ packages:
/js-yaml/4.1.0:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
dependencies:
argparse: 2.0.1
dev: true
@ -2034,7 +2082,6 @@ packages:
/json5/1.0.1:
resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==}
hasBin: true
dependencies:
minimist: 1.2.6
dev: true
@ -2114,7 +2161,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 +2174,6 @@ packages:
/marked/4.1.1:
resolution: {integrity: sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==}
engines: {node: '>= 12'}
hasBin: true
dev: false
/merge2/1.4.1:
@ -2181,6 +2226,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 +2453,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 +2593,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 +2600,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 +2613,6 @@ packages:
/rimraf/3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
hasBin: true
dependencies:
glob: 7.2.3
dev: true
@ -2591,13 +2639,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 +2797,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
@ -2795,13 +2846,14 @@ packages:
resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==}
dev: false
/tsutils/3.21.0:
/tsutils/3.21.0_typescript@4.2.4:
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
engines: {node: '>= 6'}
peerDependencies:
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
dependencies:
tslib: 1.14.1
typescript: 4.2.4
dev: true
/tsutils/3.21.0_typescript@4.8.3:
@ -2832,12 +2884,23 @@ packages:
engines: {node: '>=10'}
dev: true
/typescript/4.2.4:
resolution: {integrity: sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==}
engines: {node: '>=4.2.0'}
dev: true
/typescript/4.8.3:
resolution: {integrity: sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==}
engines: {node: '>=4.2.0'}
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 +2945,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 +2989,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

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,
};