diff --git a/.github/workflows/build-community.yml b/.github/workflows/build-community.yml
index 2886aa828a..46c4ca9b23 100644
--- a/.github/workflows/build-community.yml
+++ b/.github/workflows/build-community.yml
@@ -2,9 +2,9 @@ name: Build Pathfinder Community Version
on:
push:
- branches: [pathfinder]
+ branches: [master]
pull_request:
- branches: [pathfinder]
+ 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
@@ -70,7 +70,7 @@ jobs:
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/pathfinder'
+ if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
diff --git a/.github/workflows/build-livedemo.yml b/.github/workflows/build-livedemo.yml
index 3f83567e74..9748bfaf13 100644
--- a/.github/workflows/build-livedemo.yml
+++ b/.github/workflows/build-livedemo.yml
@@ -2,9 +2,9 @@ name: Build Pathfinder LiveDemo Version
on:
push:
- branches: [pathfinder]
+ branches: [master]
pull_request:
- branches: [pathfinder]
+ 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
@@ -72,7 +72,7 @@ jobs:
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/pathfinder'
+ if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000000..145437e95f
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,69 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: 'CodeQL'
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [master]
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: ['javascript']
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+ # queries: security-extended,security-and-quality
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ # ℹ️ Command-line programs to run using the OS shell.
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
+
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
+
+ # - run: |
+ # echo "Run, Build Application using script"
+ # ./location_of_script_within_repo/buildscript.sh
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index fc09469786..c53ae130d9 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -1,9 +1,9 @@
name: E2E & Unit Tests
on:
push:
- branches: [pathfinder, feat/filesystem_and_search]
+ branches: [master]
pull_request:
- branches: [pathfinder, feat/filesystem_and_search]
+ branches: [master]
jobs:
test:
timeout-minutes: 60
diff --git a/README.md b/README.md
index 6ac80d8263..2762978a03 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,7 @@ See https://github.com/all-?/all-contributors/issues/361#issuecomment-637166066
[](https://www.typescriptlang.org/)
[](https://reactjs.org/)
[](https://www.rust-lang.org/)
+
@@ -66,9 +67,11 @@ Before we tell you how to get started with AFFiNE, we'd like to shamelessly plug
**Seamless transitions** — However you want your data displayed, whichever viewing mode you use, AFFiNE supports easy transitions to allow you to quickly and effortlessly view your data in the way you want.
**Markdown support** — When you write in AFFiNE you can use Markdown syntax which helps create an easier editing experience, that can be experienced with just a keyboard. And this allows you to export your data cleanly into Markdown.
+
+
**Choice of multiple languages** — Thanks to community contributions AFFiNE offers support for multiple languages. If you don't find your language or would like to suggest some changes we welcome your contributions.
## Getting started
@@ -89,29 +92,31 @@ For **bug reports**, **feature requests** and other **suggestions** you can also
For **translation** and **language support** you can visit our docs for the [internationalization guide].(https://docs.affine.pro/affine/internationalization/welcome)
-Looking for **others ways to contribute** and wondering where to start? Check out the [AFFiNE Ambassador program](https://docs.affine.pro/affine/affine-ambassadors/welcome), we work closely with passionate members of our community and provide them with a wide-range of support and resources.
+Looking for **others ways to contribute** and wondering where to start? Check out the [AFFiNE Ambassador program](https://docs.affine.pro/affine/affine-ambassadors/welcome), we work closely with passionate members of our community and provide them with a wide-range of support and resources.
If you have questions, join us across various [**social platforms**](https://docs.affine.pro/affine/community-links/official-communities) where our friendly community can help provide the answers.
+We have done a major refactoring recently, if you want to see our previous version of the code, please go to the [Pre-Alpha](https://github.com/toeverything/AFFiNE/tree/Pre-Alpha) branch to view
+
## Thanks
We would also like to give thanks to open-source projects that make AFFiNE possible:
-- [BlockSuite](https://github.com/toeverything/BlockSuite) - AFFiNE is built with and powered by BlockSuite.
-- [Yjs](https://github.com/yjs/yjs) & [Yrs](https://github.com/y-crdt/y-crdt) -- Fundamental support of CRDTs for our implementation on state management and data sync.
-- [React](https://github.com/facebook/react) -- View layer support and web GUI framework.
-- [Rust](https://github.com/rust-lang/rust) -- High performance language that extends the ability and availability of our real-time backend, JWST.
-- [Fossil](https://www2.fossil-scm.org/home/doc/trunk/www/index.wiki) -- Source code management tool made with CRDTs which inspired our design on block data structure.
-- [slatejs](https://github.com/ianstormtaylor/slate) -- Customizable rich-text editor.
-- [Jotai](https://github.com/pmndrs/jotai) -- Minimal state management tool for frontend.
-- [Tldraw](https://github.com/tldraw/tldraw) -- Excellent drawing board.
-- [MUI](https://github.com/mui/material-ui) -- Our most used graphic UI component library.
-- Other [dependencies](https://github.com/toeverything/AFFiNE/network/dependencies)
+- [BlockSuite](https://github.com/toeverything/BlockSuite) - AFFiNE is built with and powered by BlockSuite.
+- [Yjs](https://github.com/yjs/yjs) & [Yrs](https://github.com/y-crdt/y-crdt) -- Fundamental support of CRDTs for our implementation on state management and data sync.
+- [React](https://github.com/facebook/react) -- View layer support and web GUI framework.
+- [Rust](https://github.com/rust-lang/rust) -- High performance language that extends the ability and availability of our real-time backend, JWST.
+- [Fossil](https://www2.fossil-scm.org/home/doc/trunk/www/index.wiki) -- Source code management tool made with CRDTs which inspired our design on block data structure.
+- [slatejs](https://github.com/ianstormtaylor/slate) -- Customizable rich-text editor.
+- [Jotai](https://github.com/pmndrs/jotai) -- Minimal state management tool for frontend.
+- [Tldraw](https://github.com/tldraw/tldraw) -- Excellent drawing board.
+- [MUI](https://github.com/mui/material-ui) -- Our most used graphic UI component library.
+- Other [dependencies](https://github.com/toeverything/AFFiNE/network/dependencies)
We use the following open source projects to help us build a better development experience:
-- [nx](https://github.com/nrwl/nx) -- Awesome monorepo manager & build system
-- [tolgee](https://github.com/tolgee/tolgee-platform) -- Elegant i18n collaborative editing platform
+- [nx](https://github.com/nrwl/nx) -- Awesome monorepo manager & build system
+- [tolgee](https://github.com/tolgee/tolgee-platform) -- Elegant i18n collaborative editing platform
Thanks a lot to the community for providing such powerful and simple libraries, so that we can focus more on the implementation of the product logic, and we hope that in the future our projects will also provide a more easy-to-use knowledge base for everyone.
diff --git a/docs/jobs/affine.pro-intern.md b/docs/jobs/affine.pro-intern.md
new file mode 100644
index 0000000000..efae7efa36
--- /dev/null
+++ b/docs/jobs/affine.pro-intern.md
@@ -0,0 +1,31 @@
+## What we do
+
+We **AFFiNE** hold a vision of shaping a world semantically connected through block components in modern applications.
+We're open for Fullstack Engineer positions across the BlockSuite sub-team. The **BlockSuite** team works on creating the best **block-editor** and **open-block** protocol for use in AFFiNE. Paving the way for a new generation of SaaS software and developers.
+
+## Fullstack Engineer Intern
+
+### This position is for:
+
+- Developing AFFiNE **the open source way**, including coding and community engagement.
+- Improving our **block editor** and **graphics editor**.
+- Researching on better activation of potential subscribers.
+
+### What we are looking for:
+
+- Software engineering experience with **editor** or **graphics** and professional real-world use cases.
+- Experience and proficiency in **TypeScript** and a **second programming language** preferably **Rust**.
+- Strong communication and writing skills in English.
+- Ability to work in a diverse and cross-functional team with skill and ease.
+- A love for open source, sharing our visions and working under those values.
+
+### It would be great if you are:
+
+- Heavy user of knowledge/project management tools.
+- Enthusiastic about AFFiNE products as a user or contributor.
+
+### Contact us:
+
+Interested? Send us your CV to [contact@toeverything.info](mailto:contact@toeverything.info).
+
+Feel free to include any extra information (GitHub link, previous projects, personal blog etc.).
diff --git a/docs/jobs/summary.md b/docs/jobs/summary.md
index d3770a0a4f..37d0e9598d 100644
--- a/docs/jobs/summary.md
+++ b/docs/jobs/summary.md
@@ -1,13 +1,17 @@
# Jobs
-- [Fullstack Engineer - Global](./affine.pro-remote.md) @[affine.pro](http://affine.pro/)
+- [Fullstack Engineer - Global](./affine.pro-remote.md) @[affine.pro](http://affine.pro/)
- Rust ·TS · Virgo · JWST · Remote , Global
+ Rust ·TS · BlockSuite · OctoBase(JWST) · Remote , Global
-- [Fullstack Engineer - China](./affine.pro.md) @[affine.pro](http://affine.pro/)
+- [Fullstack Engineer - China](./affine.pro.md) @[affine.pro](http://affine.pro/)
- Rust ·TS · Virgo · JWST · Remote , China
+ Rust ·TS · BlockSuite · OctoBase(JWST) · Remote , China
-- [Full Stack Platform Engineer](./mysc.app.md) @[mysc.app](https://mysc.app/)
+- [Fullstack Engineer Intern](./affine.pro-intern.md) @[affine.pro](http://affine.pro/)
- Rust · JWST · Remote · Shanghai, China
+ Rust ·TS · BlockSuite · OctoBase(JWST) · Hangzhou , China
+
+- [Full Stack Platform Engineer](./mysc.app.md) @[mysc.app](https://mysc.app/)
+
+ Rust · JWST · Remote · Shanghai, China
diff --git a/package.json b/package.json
index a9f6c62a8e..614d000f56 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,8 @@
"test:e2e": "playwright test",
"test:e2e:codegen": "npx playwright codegen http://localhost:8080",
"test:unit": "jest",
- "postinstall": "husky install"
+ "postinstall": "husky install",
+ "notify": "node --experimental-modules scripts/notify.mjs"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown",
@@ -31,6 +32,7 @@
"eslint-config-next": "12.3.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
+ "got": "^12.5.3",
"jest": "^29.3.1",
"prettier": "^2.7.1",
"ts-jest": "^29.0.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 39437254ea..68db9aafd9 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -14,6 +14,7 @@ importers:
eslint-config-next: 12.3.1
eslint-config-prettier: ^8.5.0
eslint-plugin-prettier: ^4.2.1
+ got: ^12.5.3
husky: ^8.0.2
jest: ^29.3.1
lint-staged: ^13.1.0
@@ -31,6 +32,7 @@ importers:
eslint-config-next: 12.3.1_f5jcydormhcqaoeadqwgqigppy
eslint-config-prettier: 8.5.0_eslint@8.30.0
eslint-plugin-prettier: 4.2.1_bat6r7ilbbslsp5dhd45s4onze
+ got: 12.5.3
husky: 8.0.2
jest: 29.3.1_@types+node@18.11.17
lint-staged: 13.1.0
@@ -1252,7 +1254,7 @@ packages:
engines: {node: ^8.13.0 || >=10.10.0}
dependencies:
'@grpc/proto-loader': 0.7.3
- '@types/node': 18.7.18
+ '@types/node': 18.11.17
dev: false
/@grpc/proto-loader/0.6.13:
@@ -2282,6 +2284,11 @@ packages:
resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==}
dev: true
+ /@sindresorhus/is/5.3.0:
+ resolution: {integrity: sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==}
+ engines: {node: '>=14.16'}
+ dev: true
+
/@sinonjs/commons/1.8.6:
resolution: {integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==}
dependencies:
@@ -2306,6 +2313,13 @@ packages:
tslib: 2.4.0
dev: false
+ /@szmarczak/http-timer/5.0.1:
+ resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ defer-to-connect: 2.0.1
+ dev: true
+
/@tldraw/intersect/1.8.0:
resolution: {integrity: sha512-0UarshNpyq2+O4o0xHMJIBgF0E630mes5CkMoO+D5xgYppSBIkeqYDcv0ujsmAhMKX1O6Y0ShuuHeflBEULUoQ==}
dependencies:
@@ -2396,10 +2410,10 @@ packages:
/@types/node/18.11.17:
resolution: {integrity: sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==}
- dev: true
/@types/node/18.7.18:
resolution: {integrity: sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==}
+ dev: true
/@types/parse-json/4.0.0:
resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==}
@@ -2963,6 +2977,23 @@ packages:
ieee754: 1.2.1
dev: false
+ /cacheable-lookup/7.0.0:
+ resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==}
+ engines: {node: '>=14.16'}
+ dev: true
+
+ /cacheable-request/10.2.4:
+ resolution: {integrity: sha512-IWIea8ei1Ht4dBqvlvh7Gs7EYlMyBhlJybLDUB9sadEqHqftmdNieMLIR5ia3vs8gbjj9t8hXLBpUVg3vcQNbg==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ get-stream: 6.0.1
+ http-cache-semantics: 4.1.0
+ keyv: 4.5.2
+ mimic-response: 4.0.0
+ normalize-url: 8.0.0
+ responselike: 3.0.0
+ dev: true
+
/call-bind/1.0.2:
resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
dependencies:
@@ -3224,6 +3255,13 @@ packages:
dependencies:
ms: 2.1.2
+ /decompress-response/6.0.0:
+ resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==}
+ engines: {node: '>=10'}
+ dependencies:
+ mimic-response: 3.1.0
+ dev: true
+
/dedent/0.7.0:
resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==}
dev: true
@@ -3248,6 +3286,11 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /defer-to-connect/2.0.1:
+ resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==}
+ engines: {node: '>=10'}
+ dev: true
+
/define-properties/1.1.4:
resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==}
engines: {node: '>= 0.4'}
@@ -4169,6 +4212,11 @@ packages:
optional: true
dev: false
+ /form-data-encoder/2.1.4:
+ resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==}
+ engines: {node: '>= 14.17'}
+ dev: true
+
/form-data/4.0.0:
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
engines: {node: '>= 6'}
@@ -4318,6 +4366,23 @@ packages:
slash: 3.0.0
dev: true
+ /got/12.5.3:
+ resolution: {integrity: sha512-8wKnb9MGU8IPGRIo+/ukTy9XLJBwDiCpIf5TVzQ9Cpol50eMTpBq2GAuDsuDIz7hTYmZgMgC1e9ydr6kSDWs3w==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ '@sindresorhus/is': 5.3.0
+ '@szmarczak/http-timer': 5.0.1
+ cacheable-lookup: 7.0.0
+ cacheable-request: 10.2.4
+ decompress-response: 6.0.0
+ form-data-encoder: 2.1.4
+ get-stream: 6.0.1
+ http2-wrapper: 2.2.0
+ lowercase-keys: 3.0.0
+ p-cancelable: 3.0.0
+ responselike: 3.0.0
+ dev: true
+
/graceful-fs/4.2.10:
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
dev: true
@@ -4395,10 +4460,22 @@ packages:
through2: 0.4.2
dev: false
+ /http-cache-semantics/4.1.0:
+ resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==}
+ dev: true
+
/http-parser-js/0.5.8:
resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==}
dev: false
+ /http2-wrapper/2.2.0:
+ resolution: {integrity: sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==}
+ engines: {node: '>=10.19.0'}
+ dependencies:
+ quick-lru: 5.1.1
+ resolve-alpn: 1.2.1
+ dev: true
+
/human-signals/2.1.0:
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
@@ -5131,6 +5208,10 @@ packages:
hasBin: true
dev: true
+ /json-buffer/3.0.1:
+ resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
+ dev: true
+
/json-parse-even-better-errors/2.3.1:
resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==}
@@ -5172,6 +5253,12 @@ packages:
setimmediate: 1.0.5
dev: false
+ /keyv/4.5.2:
+ resolution: {integrity: sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==}
+ dependencies:
+ json-buffer: 3.0.1
+ dev: true
+
/kleur/3.0.3:
resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}
engines: {node: '>=6'}
@@ -5271,8 +5358,8 @@ packages:
/lit-element/3.2.2:
resolution: {integrity: sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ==}
dependencies:
- '@lit/reactive-element': 1.5.0
- lit-html: 2.5.0
+ '@lit/reactive-element': 1.4.1
+ lit-html: 2.4.0
dev: false
/lit-html/2.4.0:
@@ -5356,6 +5443,11 @@ packages:
dependencies:
js-tokens: 4.0.0
+ /lowercase-keys/3.0.0:
+ resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ dev: true
+
/lru-cache/6.0.0:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
engines: {node: '>=10'}
@@ -5425,6 +5517,16 @@ packages:
engines: {node: '>=12'}
dev: true
+ /mimic-response/3.1.0:
+ resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
+ engines: {node: '>=10'}
+ dev: true
+
+ /mimic-response/4.0.0:
+ resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ dev: true
+
/minimatch/3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
dependencies:
@@ -5584,6 +5686,11 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /normalize-url/8.0.0:
+ resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==}
+ engines: {node: '>=14.16'}
+ dev: true
+
/npm-run-path/4.0.1:
resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
engines: {node: '>=8'}
@@ -5697,6 +5804,11 @@ packages:
word-wrap: 1.2.3
dev: true
+ /p-cancelable/3.0.0:
+ resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==}
+ engines: {node: '>=12.20'}
+ dev: true
+
/p-limit/2.3.0:
resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
engines: {node: '>=6'}
@@ -5891,7 +6003,7 @@ packages:
'@protobufjs/pool': 1.1.0
'@protobufjs/utf8': 1.1.0
'@types/long': 4.0.2
- '@types/node': 18.7.18
+ '@types/node': 18.11.17
long: 4.0.0
dev: false
@@ -5910,7 +6022,7 @@ packages:
'@protobufjs/path': 1.1.2
'@protobufjs/pool': 1.1.0
'@protobufjs/utf8': 1.1.0
- '@types/node': 18.7.18
+ '@types/node': 18.11.17
long: 5.2.0
dev: false
@@ -5926,6 +6038,11 @@ packages:
/queue-microtask/1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
+ /quick-lru/5.1.1:
+ resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==}
+ engines: {node: '>=10'}
+ dev: true
+
/quill-cursors/4.0.0:
resolution: {integrity: sha512-nCwCZtQPl4EnxJSheHtb067Jo48A6mc8/t7waGSLqXvbE68a5vHBFfMOQPZI7jxjksbDhpfzQta3a3/MoPvKzQ==}
dev: false
@@ -6115,6 +6232,10 @@ packages:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
+ /resolve-alpn/1.2.1:
+ resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==}
+ dev: true
+
/resolve-cwd/3.0.0:
resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==}
engines: {node: '>=8'}
@@ -6151,6 +6272,13 @@ packages:
supports-preserve-symlinks-flag: 1.0.0
dev: true
+ /responselike/3.0.0:
+ resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ lowercase-keys: 3.0.0
+ dev: true
+
/restore-cursor/3.1.0:
resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==}
engines: {node: '>=8'}
diff --git a/scripts/notify.mjs b/scripts/notify.mjs
new file mode 100644
index 0000000000..117b0d5d4d
--- /dev/null
+++ b/scripts/notify.mjs
@@ -0,0 +1,18 @@
+import got from 'got';
+
+const STAGE_HOST = 'https://nightly.affine.pro/';
+if (['master', 'develop'].includes(process.env.CF_PAGES_BRANCH)) {
+ const message = `Daily builds: New deployment of PathFinder version ${process.env.CF_PAGES_COMMIT_SHA} was deploy: [nightly](${STAGE_HOST}) / [internal](${process.env.CF_PAGES_URL})`;
+ const url = `https://api.telegram.org/bot${process.env.BOT_TOKEN}/sendMessage`;
+
+ got
+ .post(url, {
+ json: {
+ chat_id: process.env.CHAT_ID,
+ text: message,
+ parse_mode: 'Markdown',
+ disable_notification: true,
+ },
+ })
+ .then(r => console.log(r.body));
+}