Skip to content

Commit

Permalink
chore: release
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSnow committed Oct 3, 2024
0 parents commit 9569584
Show file tree
Hide file tree
Showing 56 changed files with 14,652 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
WEBHOOK_ENDPOINT=
WEBHOOK_SECRET=
MONITOR_USER=
MONITOR_PASSWORD=
48 changes: 48 additions & 0 deletions .github/workflows/docker-images.yaml
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
29 changes: 29 additions & 0 deletions .github/workflows/unit-test.yaml
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
21 changes: 21 additions & 0 deletions .gitignore
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.*
3 changes: 3 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
semi: false
singleQuote: true
printWidth: 120
14 changes: 14 additions & 0 deletions .yarnrc.yml
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"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @storipress/collaboration-server
Empty file added data/.gitkeep
Empty file.
17 changes: 17 additions & 0 deletions docker-compose.yml
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
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packageManager": "[email protected]"
}
10 changes: 10 additions & 0 deletions src/.dockerignore
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
6 changes: 6 additions & 0 deletions src/.env.example
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=
16 changes: 16 additions & 0 deletions src/.eslintrc.cjs
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',
},
}
15 changes: 15 additions & 0 deletions src/.gitignore
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
41 changes: 41 additions & 0 deletions src/.moon/toolchain.yml
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'
29 changes: 29 additions & 0 deletions src/.moon/workspace.yml
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'
4 changes: 4 additions & 0 deletions src/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": true
}
Loading

0 comments on commit 9569584

Please sign in to comment.