-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9569584
Showing
56 changed files
with
14,652 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
WEBHOOK_ENDPOINT= | ||
WEBHOOK_SECRET= | ||
MONITOR_USER= | ||
MONITOR_PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: docker-images | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
paths: | ||
- '.github/workflows/**' | ||
- 'src/**' | ||
|
||
jobs: | ||
main: | ||
name: hocuspocus | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- | ||
name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- | ||
name: Build and push hocuspocus | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./src | ||
file: ./src/Dockerfile | ||
platforms: linux/arm64 | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
push: true | ||
build-args: | | ||
github_token=${{ secrets.PACKAGES_READ_PERMISSION }} | ||
tags: | | ||
ghcr.io/storipress/ec-hocuspocus:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Unit Test | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
unit-test: | ||
runs-on: ubuntu-22.04 | ||
name: Unit Test | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
env: | ||
NODE_OPTIONS: --max-old-space-size=6144 | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: sudo corepack enable | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- run: cd src && yarn | ||
- run: cd src && yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/.idea | ||
.env | ||
/node_modules | ||
.DS_Store | ||
|
||
### yarn ### | ||
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored | ||
|
||
.yarn/* | ||
!.yarn/releases | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# if you are NOT using Zero-installs, then: | ||
# comment the following lines | ||
# !.yarn/cache | ||
|
||
# and uncomment the following lines | ||
.pnp.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
semi: false | ||
singleQuote: true | ||
printWidth: 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
compressionLevel: mixed | ||
|
||
enableGlobalCache: true | ||
|
||
nodeLinker: node-modules | ||
|
||
npmRegistries: | ||
//npm.pkg.github.com: | ||
npmAuthToken: "${GITHUB_TOKEN}" | ||
|
||
npmScopes: | ||
storipress: | ||
npmPublishRegistry: "https://npm.pkg.github.com" | ||
npmRegistryServer: "https://npm.pkg.github.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# @storipress/collaboration-server |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: "3.7" | ||
|
||
services: | ||
hocuspocus: | ||
image: ghcr.io/storipress/ec-hocuspocus:latest | ||
container_name: hocuspocus | ||
restart: unless-stopped | ||
volumes: | ||
- ./databases:/opt/collaboration-server/databases | ||
ports: | ||
- "8001:8001" | ||
environment: | ||
- WEBHOOK_ENDPOINT | ||
- WEBHOOK_SECRET | ||
- MONITOR_USER | ||
- MONITOR_PASSWORD | ||
- AXIOM_TOKEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
node_modules | ||
.env | ||
.env.example | ||
.eslintrc.cjs | ||
.gitignore | ||
.prettierrc | ||
|
||
|
||
# moon | ||
.moon/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
WEBHOOK_ENDPOINT= | ||
WEBHOOK_SECRET= | ||
MONITOR_USER= | ||
MONITOR_PASSWORD= | ||
AXIOM_TOKEN= | ||
SENTRY_DSN= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
es2022: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:import/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 14, | ||
sourceType: 'module', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.yarn/* | ||
!.yarn/cache | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
/node_modules | ||
/databases | ||
.env | ||
*.sqlite | ||
|
||
# moon | ||
.moon/cache | ||
.moon/docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# https://moonrepo.dev/docs/config/toolchain | ||
$schema: 'https://moonrepo.dev/schemas/toolchain.json' | ||
|
||
# Extend and inherit an external configuration file. Must be a valid HTTPS URL or file system path. | ||
# extends: './shared/toolchain.yml' | ||
|
||
# Configures Node.js within the toolchain. | ||
node: | ||
# The version to use. Must be a semantic version that includes major, minor, and patch. | ||
# We suggest using the latest active LTS version: https://nodejs.org/en/about/releases | ||
# version: '20.0.0' | ||
|
||
# The package manager to use when managing dependencies. | ||
# Accepts "npm" (default), "pnpm", "yarn", or "bun". | ||
packageManager: 'yarn' | ||
|
||
# The version of the package manager (above) to use. | ||
yarn: {} | ||
|
||
# Add `node.version` as a constraint in the root `package.json` `engines`. | ||
addEnginesConstraint: true | ||
|
||
# Dedupe dependencies after the lockfile has changed. | ||
dedupeOnLockfileChange: true | ||
|
||
# Version format to use when syncing dependencies within the project's `package.json`. | ||
# dependencyVersionFormat: 'workspace' | ||
|
||
# Infer and automatically create moon tasks from `package.json` scripts, per project. | ||
# BEWARE: Tasks and scripts are not 1:1 in functionality, so please refer to the documentation. | ||
inferTasksFromScripts: false | ||
|
||
# Support the "one version policy" by only declaring dependencies in the root `package.json`. | ||
# rootPackageOnly: true | ||
|
||
# Sync a project's relationships as `dependencies` within the project's `package.json`. | ||
syncProjectWorkspaceDependencies: true | ||
|
||
# Sync `node.version` to a 3rd-party version manager's config file. | ||
# Accepts "nodenv" (.node-version), "nvm" (.nvmrc), or none. | ||
# syncVersionManagerConfig: 'nvm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# https://moonrepo.dev/docs/config/workspace | ||
$schema: 'https://moonrepo.dev/schemas/workspace.json' | ||
|
||
# Require a specific version of moon while running commands, otherwise fail. | ||
# versionConstraint: '>=1.0.0' | ||
|
||
# Extend and inherit an external configuration file. Must be a valid HTTPS URL or file system path. | ||
# extends: './shared/workspace.yml' | ||
|
||
# REQUIRED: A map of all projects found within the workspace, or a list or file system globs. | ||
# When using a map, each entry requires a unique project ID as the map key, and a file system | ||
# path to the project folder as the map value. File paths are relative from the workspace root, | ||
# and cannot reference projects located outside the workspace boundary. | ||
projects: | ||
editor-server: . | ||
extension-api: packages/extension-api | ||
|
||
# Configures the version control system to utilize within the workspace. A VCS | ||
# is required for determining touched (added, modified, etc) files, calculating file hashes, | ||
# computing affected files, and much more. | ||
vcs: | ||
# The client to use when managing the repository. | ||
# Accepts "git". Defaults to "git". | ||
manager: 'git' | ||
|
||
# The default branch (master/main/trunk) in the repository for comparing the | ||
# local branch against. For git, this is is typically "master" or "main", | ||
# and must include the remote prefix (before /). | ||
defaultBranch: 'main' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true | ||
} |
Oops, something went wrong.