Merge remote-tracking branch 'origin/staging-new'

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2025-11-14 23:31:45 +07:00
2154 changed files with 88456 additions and 99729 deletions
+42
View File
@@ -0,0 +1,42 @@
# Huly Platform - Copilot Instructions
TypeScript/Svelte 4 monorepo using Rush.js (pnpm 10.15.1), Node >=20 <25, Webpack 5, Electron, Jest.
## Code Style
**TypeScript**: Strict types, interfaces over types, avoid `any`, export types separately
**Svelte**: Script/style/markup order, reactive `$:`, stores for state, small focused components
**Naming**: Files `kebab-case`, Components `PascalCase`, functions `camelCase`, constants `UPPER_SNAKE_CASE`
## Structure
- `models/*` - Shared types/models
- `server-*` - Server packages
- `plugins/*` - Client plugins
- `packages/*` - Reusable utilities
- Projects 2-3 levels deep, each with `package.json`
## Rush Commands
```bash
rush install # Install deps
rush build # Build all
rush build --to PKG # Build specific
rush add -p PKG # Add dependency
```
## Patterns
- Always handle errors (proper Error subclasses, catch promises)
- Use async/await, Promise.all() for parallel ops
- Svelte stores for shared state, separate business logic
- JSDoc public APIs, tests alongside code
- Run `rushx test` before commit
## Avoid
`any` without reason ❌ console.log() ❌ Mixed concerns ❌ Circular deps ❌ Ignoring TS errors
## When Coding
Infer location from context (models/server/plugins/packages), match existing patterns, include proper imports/types, add error handling, use existing utils first.
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
fetch-depth: 1
filter: tree:0
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- uses: pnpm/action-setup@v4
+27 -49
View File
@@ -59,7 +59,7 @@ jobs:
fetch-depth: 0
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Cache node modules
@@ -79,9 +79,8 @@ jobs:
- name: Checking for mis-matching dependencies...
run: node common/scripts/install-run-rush.js check
- name: Prepare .npmrc for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
- name: Checking for mis-matching transitive dependencies...
run: node common/scripts/check-versions.js
- name: Installing...
run: node common/scripts/install-run-rush.js install
@@ -117,7 +116,7 @@ jobs:
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
@@ -141,7 +140,7 @@ jobs:
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Cache build results
@@ -153,17 +152,6 @@ jobs:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Apply templates...
run: node common/scripts/install-run-rush.js apply-templates
- name: Check templates
run: |
echo '================================================================'
echo 'Checking for diff files'
echo '================================================================'
git diff '*.js' '*.ts' '*.svelte' '*.json' '*.yaml' | cat
[ -z "$(git diff --name-only '*.js' '*.ts' '*.svelte' '*.json' '*.yaml' | cat)" ]
echo '================================================================'
- name: Formatting...
run: node common/scripts/install-run-rush.js fast-format --branch ${{ github.base_ref || 'develop' }}
- name: Check files formatting
@@ -184,7 +172,7 @@ jobs:
fetch-depth: 0
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Cache build results
@@ -197,6 +185,7 @@ jobs:
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Login to Docker Hub
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
continue-on-error: true
uses: docker/login-action@v3
with:
username: hardcoreeng
@@ -221,7 +210,7 @@ jobs:
fetch-depth: 0
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Cache node modules
@@ -238,15 +227,15 @@ jobs:
- name: Checking for mis-matching dependencies...
run: node common/scripts/install-run-rush.js check
- name: Prepare .npmrc for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
- name: Checking for mis-matching transitive dependencies...
run: node common/scripts/check-versions.js
- name: Installing...
run: node common/scripts/install-run-rush.js install
- name: Login to Docker Hub
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
continue-on-error: true
uses: docker/login-action@v3
with:
username: hardcoreeng
@@ -351,7 +340,7 @@ jobs:
fetch-depth: 0
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Cache node modules
@@ -368,15 +357,15 @@ jobs:
- name: Checking for mis-matching dependencies...
run: node common/scripts/install-run-rush.js check
- name: Prepare .npmrc for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
- name: Checking for mis-matching transitive dependencies...
run: node common/scripts/check-versions.js
- name: Installing...
run: node common/scripts/install-run-rush.js install
- name: Login to Docker Hub
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
continue-on-error: true
uses: docker/login-action@v3
with:
username: hardcoreeng
@@ -446,7 +435,7 @@ jobs:
fetch-depth: 0
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Cache node modules
@@ -463,15 +452,15 @@ jobs:
- name: Checking for mis-matching dependencies...
run: node common/scripts/install-run-rush.js check
- name: Prepare .npmrc for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
- name: Checking for mis-matching transitive dependencies...
run: node common/scripts/check-versions.js
- name: Installing...
run: node common/scripts/install-run-rush.js install
- name: Login to Docker Hub
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
continue-on-error: true
uses: docker/login-action@v3
with:
username: hardcoreeng
@@ -524,7 +513,7 @@ jobs:
fetch-depth: 0
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Cache node modules
@@ -541,9 +530,8 @@ jobs:
- name: Checking for mis-matching dependencies...
run: node common/scripts/install-run-rush.js check
- name: Prepare .npmrc for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
- name: Checking for mis-matching transitive dependencies...
run: node common/scripts/check-versions.js
- name: Installing...
run: node common/scripts/install-run-rush.js install
@@ -553,6 +541,7 @@ jobs:
- name: Login to Docker Hub
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
continue-on-error: true
uses: docker/login-action@v3
with:
username: hardcoreeng
@@ -647,7 +636,7 @@ jobs:
mv pods/workspace/init-${{env.INIT_SCRIPTS_BRANCH}} pods/workspace/init
rm -rf ${{env.INIT_SCRIPTS_BRANCH}}.zip
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- uses: pnpm/action-setup@v4
@@ -664,10 +653,6 @@ jobs:
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Prepare .npmrc for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
- name: Installing...
run: node common/scripts/install-run-rush.js install
@@ -676,6 +661,7 @@ jobs:
- name: Login to Docker Hub
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
continue-on-error: true
uses: docker/login-action@v3
with:
username: hardcoreeng
@@ -730,7 +716,7 @@ jobs:
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
@@ -745,10 +731,6 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Prepare .npmrc for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
- name: Installing...
run: node common/scripts/install-run-rush.js install --purge
- name: Model version from git tags
@@ -836,7 +818,7 @@ jobs:
filter: tree:0
submodules: recursive
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
@@ -851,10 +833,6 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Prepare .npmrc for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
- name: Installing...
run: node common/scripts/install-run-rush.js install --purge
- name: Model version from git tags
+1 -1
View File
@@ -112,4 +112,4 @@ dev/tool/history.json
.aider*
/combined_dependencies
.tmp
ws-tests/docker-compose.override.yml
ws-tests/docker-compose.override.yml
-3
View File
@@ -1,3 +0,0 @@
[submodule "communication"]
path = communication
url = https://github.com/hcengineering/communication.git
-1
View File
@@ -1 +0,0 @@
@hcengineering/platform:registry=https://npm.pkg.github.com/
+68 -21
View File
@@ -54,7 +54,7 @@
// "SERVER_PROVIDER":"uweb"
"SERVER_PROVIDER": "ws",
"MODEL_VERSION": "0.7.48",
// "VERSION": "0.6.289",
// "version": "0.7.0",
"ELASTIC_INDEX_NAME": "local_storage_index",
"UPLOAD_URL": "/files",
"AI_BOT_URL": "http://localhost:4010",
@@ -97,8 +97,8 @@
"MODEL_JSON": "${workspaceRoot}/models/all/bundle/model.json",
// "SERVER_PROVIDER":"uweb"
"SERVER_PROVIDER": "ws",
"MODEL_VERSION": "0.7.230",
// "VERSION": "0.6.289",
"MODEL_VERSION": "0.7.301",
// "version": "0.7.0",
"COMMUNICATION_API_ENABLED": "true",
"ELASTIC_INDEX_NAME": "local_storage_index",
"UPLOAD_URL": "/files",
@@ -201,6 +201,7 @@
"FRONT_URL": "http://huly.local:8087",
"STATS_URL": "http://huly.local:4900",
"MAIL_URL": "",
"MAX_FAILED_LOGIN_ATTEMPTS": "5",
// "DB_NS": "account-2",
// "WS_LIVENESS_DAYS": "1",
// "WORKSPACE_LIMIT_PER_USER": "1",
@@ -314,10 +315,11 @@
"SERVER_SECRET": "secret",
"TRANSACTOR_URL": "ws://localhost:3332",
"ACCOUNTS_URL": "http://localhost:3000",
"ACCOUNTS_DB_URL": "postgresql://root@huly.local:26257/defaultdb?sslmode=disable",
"FRONT_URL": "http://localhost:8080",
"MAIL_URL": "",
"STORAGE_CONFIG": "datalake|http://localhost:4030",
"MODEL_VERSION": "0.7.153",
"MODEL_VERSION": "0.7.301",
"WS_OPERATION": "all+backup",
"BACKUP_STORAGE": "minio|minio?accessKey=minioadmin&secretKey=minioadmin",
"BACKUP_BUCKET": "dev-backups",
@@ -408,27 +410,23 @@
"protocol": "inspector"
},
{
"name": "Debug backup tool",
"name": "Debug tool",
"type": "node",
"request": "launch",
"args": [
"src/__start.ts",
"backup-restore",
"/Users/haiodo/Develop/private/platform/tests/sanity-ws",
"sanity-ws",
"--upgrade"
],
"args": ["src/__start.ts", "calculate-ratings", "2d790fe8-faba-4c2e-afb1-5610445966bb"],
"env": {
"MODEL_VERSION": "0.7.153",
"STORAGE_CONFIG": "datalake|http://huly.local:4030",
"ACCOUNTS_URL": "http://localhost:3003",
"TRANSACTOR_URL": "ws://localhost:3334",
"ACCOUNT_DB_URL": "postgresql://root@localhost:26258/defaultdb?sslmode=disable",
"MONGO_URL": "mongodb://localhost:27018",
"ELASTIC_URL": "http://localhost:9201",
"ACCOUNTS_URL": "http://huly.local:3000",
"TRANSACTOR_URL": "ws://localhost:3332",
"ACCOUNT_DB_URL": "postgresql://root@localhost:26257/defaultdb?sslmode=disable",
"MONGO_URL": "mongodb://localhost:27017",
"ELASTIC_URL": "http://localhost:9200",
"SERVER_SECRET": "secret",
"DB_URL": "postgresql://root@localhost:26258/defaultdb?sslmode=disable",
"QUEUE_CONFIG": "localhost:19093;-staging"
"DB_URL": "postgresql://root@localhost:26257/defaultdb?sslmode=disable",
"QUEUE_CONFIG": "huly.local:19092",
"REGION": "cockroach",
"QUEUE_REGION": "cockroach"
},
"smartStep": false,
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
@@ -625,6 +623,33 @@
"protocol": "inspector",
"outputCapture": "std"
},
{
"name": "Debug Rating service",
"type": "node",
"request": "launch",
"args": ["src/__start__.ts"],
"env": {
"SERVER_SECRET": "secret",
"MODEL_VERSION": "0.7.278",
"STORAGE_CONFIG": "datalake|http://huly.local:4030",
"ACCOUNTS_URL": "http://localhost:3000",
"COLLABORATOR_URL": "ws://huly.local:3078",
"PLATFORM_OPERATION_LOGGING": "true",
"STATS_URL": "http://huly.local:4900",
"OTEL_EXPORTER_OTLP_ENDPOINT": "http://huly.local:4318/v1/traces",
"QUEUE_CONFIG": "huly.local:19092",
"MODEL_JSON": "${workspaceRoot}/models/all/bundle/model.json",
"REGION": "cockroach",
"QUEUE_REGION": "cockroach",
"DB_URL": "postgresql://root@localhost:26257/defaultdb?sslmode=disable"
},
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"sourceMaps": true,
"nodeVersionHint": 22,
"cwd": "${workspaceRoot}/services/rating",
"protocol": "inspector",
"outputCapture": "std"
},
{
"name": "Debug qms workers",
"type": "node",
@@ -671,7 +696,8 @@
"ACCOUNTS_URL": "http://localhost:3000",
"QUEUE_CONFIG": "localhost:19092",
"QUEUE_REGION": "cockroach",
"TEMPORAL_ADDRESS": "localhost:7233"
"TEMPORAL_ADDRESS": "localhost:7233",
"COLLABORATOR_URL": "ws://localhost:3078"
},
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"runtimeVersion": "20",
@@ -716,6 +742,27 @@
"sourceMaps": true,
"cwd": "${workspaceRoot}/services/sign/pod-sign"
},
{
"name": "Debug payment",
"type": "node",
"request": "launch",
"args": ["src/index.ts"],
"env": {
"PORT": "3040",
"SECRET": "secret",
"SERVICE_ID": "payment-service",
"ACCOUNTS_URL": "http://huly.local:3000",
"FRONT_URL": "http://huly.local:8087",
"USE_SANDBOX": "true",
// "POLAR_ACCESS_TOKEN": "polar_xxx",
// "POLAR_WEBHOOK_SECRET": "whsec_xxx",
// "POLAR_SUBSCRIPTION_PLANS": "common@tier:prod_1a,prod_1b;rare@tier:prod_2;epic@tier:prod_3;legendary@tier:prod_4"
},
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"runtimeVersion": "20",
"sourceMaps": true,
"cwd": "${workspaceRoot}/services/payment/pod-payment"
},
{
"name": "Debug rekoni",
"type": "node",
@@ -833,7 +880,7 @@
"SECRET": "secret",
"DB_URL": "postgresql://root@localhost:26257/defaultdb?sslmode=disable",
"BUCKETS": "blobs,eu|http://localhost:9000?accessKey=minioadmin&secretKey=minioadmin",
"ACCOUNTS_URL": "http://localhost:3000",
"ACCOUNTS_URL": "http://huly.local:3000",
"STATS_URL": "http://huly.local:4900",
"QUEUE_CONFIG": "localhost:19092"
},
+6 -1
View File
@@ -24,10 +24,14 @@ This project offers a convenient method to host Huly using `docker`, designed fo
## API Client
If you want to interact with Huly programmatically, check out our [API Client](./packages/api-client/README.md) documentation. The API client provides a typed interface for all Huly operations and can be used to build integrations and custom applications.
If you want to interact with Huly programmatically, check out our [API Client](https://github.com/hcengineering/huly.core/tree/main/packages/api-client) documentation. The API client provides a typed interface for all Huly operations and can be used to build integrations and custom applications.
You can find API usage examples in the [Huly examples](https://github.com/hcengineering/huly-examples) repository.
## Changelog
For detailed information about changes, improvements, and bug fixes in each version, see our [Changelog](./changelog.md).
## Table of Contents
- [Huly Platform](#huly-platform)
@@ -35,6 +39,7 @@ You can find API usage examples in the [Huly examples](https://github.com/hcengi
- [Self-Hosting](#self-hosting)
- [Activity](#activity)
- [API Client](#api-client)
- [Changelog](#changelog)
- [Table of Contents](#table-of-contents)
- [Pre-requisites](#pre-requisites)
- [Verification](#verification)
+1496 -1
View File
File diff suppressed because it is too large Load Diff
+24
View File
@@ -247,6 +247,14 @@
"safeForSimultaneousRushProcesses": true,
"shellCommand": "./common/scripts/docker.sh"
},
{
"commandKind": "global",
"name": "docker-server",
"summary": "Build docker with platform",
"description": "use to build all docker containers required for platform",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "./common/scripts/docker-server.sh && rush docker:up:server"
},
{
"commandKind": "global",
"name": "docker:up",
@@ -255,6 +263,14 @@
"safeForSimultaneousRushProcesses": true,
"shellCommand": "cd ./dev && docker compose up -d --force-recreate"
},
{
"commandKind": "global",
"name": "docker:up:server",
"summary": "Up development build",
"description": "Up development build",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "cd ./dev && docker compose up -d --force-recreate transactor_cockroach"
},
{
"commandKind": "global",
"name": "docker:local",
@@ -347,6 +363,14 @@
"description": "use to build all docker containers required for platform",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "rush package -p 20 --to desktop && cd ./desktop-package && rushx dist"
},
{
"commandKind": "global",
"name": "update-deps",
"summary": "Update published dependencies",
"description": "use to update published dependencies to latest versions",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "./common/scripts/node_modules/.bin/update-deps"
}
],
+59 -3
View File
@@ -22,7 +22,7 @@
*
* This option is strongly recommended. The default value is false.
*/
"useWorkspaces": false,
"useWorkspaces": true,
/**
* This setting determines how PNPM chooses version numbers during `rush update`.
@@ -199,8 +199,64 @@
* PNPM documentation: https://pnpm.io/package_json#pnpmoverrides
*/
"globalOverrides": {
// "example1": "^1.0.0",
// "example2": "npm:@company/example2@^1.0.0"
// DEV: Uncomment the lines below to use local huly.core, huly.server, and huly.utils packages
// Then "rush update --full" to update the dependencies.
// NOTE: It's configured to work if huly.core, huly.server, and huly.utils are placed adjacent to the platform. If you have them in a different location, you need to change the paths below.
// huly.core packages:
// "@hcengineering/account-client": "file:../../../huly.core/packages/account-client",
// "@hcengineering/analytics": "file:../../../huly.core/packages/analytics",
// "@hcengineering/analytics-service": "file:../../../huly.core/packages/analytics-service",
// "@hcengineering/api-client": "file:../../../huly.core/packages/api-client",
// "@hcengineering/client": "file:../../../huly.core/packages/client",
// "@hcengineering/client-resources": "file:../../../huly.core/packages/client-resources",
// "@hcengineering/collaborator-client": "file:../../../huly.core/packages/collaborator-client",
// "@hcengineering/core": "file:../../../huly.core/packages/core",
// "@hcengineering/hulylake-client": "file:../../../huly.core/packages/hulylake-client",
// "@hcengineering/model": "file:../../../huly.core/packages/model",
// "@hcengineering/platform": "file:../../../huly.core/packages/platform",
// "@hcengineering/query": "file:../../../huly.core/packages/query",
// "@hcengineering/rank": "file:../../../huly.core/packages/rank",
// "@hcengineering/retry": "file:../../../huly.core/packages/retry",
// "@hcengineering/rpc": "file:../../../huly.core/packages/rpc",
// "@hcengineering/storage": "file:../../../huly.core/packages/storage",
// "@hcengineering/text": "file:../../../huly.core/packages/text",
// "@hcengineering/text-core": "file:../../../huly.core/packages/text-core",
// "@hcengineering/text-html": "file:../../../huly.core/packages/text-html",
// "@hcengineering/text-markdown": "file:../../../huly.core/packages/text-markdown",
// "@hcengineering/text-ydoc": "file:../../../huly.core/packages/text-ydoc",
// "@hcengineering/token": "file:../../../huly.core/packages/token",
// "@hcengineering/measurements": "file:../../../huly.core/packages/measurements",
// "@hcengineering/measurements-otlp": "file:../../../huly.core/packages/measurements-otlp",
// "@hcengineering/postgres-base": "file:../../../huly.core/packages/postgres-base",
// huly.server packages:
// "@hcengineering/collaboration": "file:../../../huly.server/packages/collaboration",
// "@hcengineering/datalake": "file:../../../huly.server/packages/datalake",
// "@hcengineering/elastic": "file:../../../huly.server/packages/elastic",
// "@hcengineering/hulylake": "file:../../../huly.server/packages/hulylake",
// "@hcengineering/kafka": "file:../../../huly.server/packages/kafka",
// "@hcengineering/middleware": "file:../../../huly.server/packages/middleware",
// "@hcengineering/minio": "file:../../../huly.server/packages/minio",
// "@hcengineering/mongo": "file:../../../huly.server/packages/mongo",
// "@hcengineering/postgres": "file:../../../huly.server/packages/postgres",
// "@hcengineering/s3": "file:../../../huly.server/packages/s3",
// "@hcengineering/server": "file:../../../huly.server/packages/server",
// "@hcengineering/server-client": "file:../../../huly.server/packages/client",
// "@hcengineering/server-core": "file:../../../huly.server/packages/core",
// "@hcengineering/server-storage": "file:../../../huly.server/packages/server-storage"
// huly.utils packages:
// "@hcengineering/platform-rig": "file:../../../huly.utils/packages/platform-rig",
// "@hcengineering/ui-test": "file:../../../huly.utils/packages/ui-test"
// huly.communication packages
// "@hcengineering/communication-types": "file:../../../communication/packages/types",
// "@hcengineering/communication-sdk-types": "file:../../../communication/packages/sdk-types",
// "@hcengineering/communication-shared": "file:../../../communication/packages/shared",
// "@hcengineering/communication-rest-client": "file:../../../communication/packages/rest-client",
// "@hcengineering/communication-cockroach": "file:../../../communication/packages/cockroach",
// "@hcengineering/communication-server": "file:../../../communication/packages/server",
// "@hcengineering/communication-query": "file:../../../communication/packages/query",
// "@hcengineering/communication-client-query": "file:../../../communication/packages/client-query"
},
/**
+44666 -23839
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -1,2 +1,4 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{}
{
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
}
+35 -35
View File
@@ -64,39 +64,39 @@
// // "includeEmailInChangeFile": true
// },
//
// {
// /**
// * (Required) Indicates the kind of version policy being defined ("lockStepVersion" or "individualVersion").
// *
// * The "individualVersion" mode specifies that the projects will use "individual versioning".
// * This is the typical NPM model where each package has an independent version number
// * and CHANGELOG.md file. Although a single CI definition is responsible for publishing the
// * packages, they otherwise don't have any special relationship. The version bumping will
// * depend on how developers answer the "rush change" questions for each package that
// * is changed.
// */
// "definitionName": "individualVersion",
//
// "policyName": "MyRandomLibraries",
//
// /**
// * (Optional) This can be used to enforce that all packages in the set must share a common
// * major version number, e.g. because they are from the same major release branch.
// * It can also be used to discourage people from accidentally making "MAJOR" SemVer changes
// * inappropriately. The minor/patch version parts will be bumped independently according
// * to the types of changes made to each project, according to the "rush change" command.
// */
// "lockedMajor": 3,
//
// /**
// * (Optional) When publishing is managed by Rush, by default the "rush change" command will
// * request changes for any projects that are modified by a pull request. These change entries
// * will produce a CHANGELOG.md file. If you author your CHANGELOG.md manually or announce updates
// * in some other way, set "exemptFromRushChange" to true to tell "rush change" to ignore the projects
// * belonging to this version policy.
// */
// "exemptFromRushChange": false,
//
// // "includeEmailInChangeFile": true
// }
{
/**
* (Required) Indicates the kind of version policy being defined ("lockStepVersion" or "individualVersion").
*
* The "individualVersion" mode specifies that the projects will use "individual versioning".
* This is the typical NPM model where each package has an independent version number
* and CHANGELOG.md file. Although a single CI definition is responsible for publishing the
* packages, they otherwise don't have any special relationship. The version bumping will
* depend on how developers answer the "rush change" questions for each package that
* is changed.
*/
"definitionName": "individualVersion",
"policyName": "MyRandomLibraries",
/**
* (Optional) This can be used to enforce that all packages in the set must share a common
* major version number, e.g. because they are from the same major release branch.
* It can also be used to discourage people from accidentally making "MAJOR" SemVer changes
* inappropriately. The minor/patch version parts will be bumped independently according
* to the types of changes made to each project, according to the "rush change" command.
*/
"lockedMajor": 3,
/**
* (Optional) When publishing is managed by Rush, by default the "rush change" command will
* request changes for any projects that are modified by a pull request. These change entries
* will produce a CHANGELOG.md file. If you author your CHANGELOG.md manually or announce updates
* in some other way, set "exemptFromRushChange" to true to tell "rush change" to ignore the projects
* belonging to this version policy.
*/
"exemptFromRushChange": false
// "includeEmailInChangeFile": true
}
]
+464
View File
@@ -0,0 +1,464 @@
#!/usr/bin/env node
/**
* This script validates that all @hcengineering packages use the same versions
* across all dependencies (including devDependencies).
*
* This is similar to `rush check` but also checks for transitive dependencies
* and only validates @hcengineering packages.
*
* The script will fail with exit code 1 if any version mismatches are found.
*/
const fs = require('fs')
const path = require('path')
const execSync = require('child_process').execSync
const SCOPE = '@hcengineering'
/**
* Find the repository root by looking for rush.json
* @returns {string} Path to repository root
*/
function findRepoRoot() {
let currentDir = __dirname
while (currentDir !== '/') {
const rushJsonPath = path.join(currentDir, 'rush.json')
if (fs.existsSync(rushJsonPath)) {
return currentDir
}
currentDir = path.dirname(currentDir)
}
throw new Error('Could not find repository root (rush.json not found)')
}
/**
* Parse pnpm-lock.yaml to extract resolved @hcengineering package versions
* and track which packages depend on which versions
* @returns {Object} Map of package names to version -> dependents mapping
*/
function parseLockfile() {
const repoRoot = findRepoRoot()
const lockfilePath = path.join(repoRoot, 'common/config/rush/pnpm-lock.yaml')
if (!fs.existsSync(lockfilePath)) {
console.warn('⚠️ pnpm-lock.yaml not found, skipping lockfile validation')
return {}
}
const lockfileContent = fs.readFileSync(lockfilePath, 'utf-8')
const lines = lockfileContent.split('\n')
const lockfileVersions = {}
// Track current package in the packages section
let currentPackage = null
let currentPackageName = null
let currentPackageVersion = null
let inPackagesSection = false
let inDependenciesSection = false
for (let i = 0; i < lines.length; i++) {
const line = lines[i]
// Check if we're in the packages section
if (line.match(/^packages:/)) {
inPackagesSection = true
continue
}
// Parse @hcengineering package entries like ' @hcengineering/platform@0.7.3:' or '@hcengineering/analytics@0.7.4:'
if (inPackagesSection && line.match(new RegExp(`^ '?(${SCOPE}/[^@']+)@([^':()]+)(?:\\([^)]*\\))*'?:`))) {
const packageMatch = line.match(new RegExp(`^ '?(${SCOPE}/[^@']+)@([^':()]+)(?:\\([^)]*\\))*'?:`))
if (packageMatch) {
currentPackageName = packageMatch[1]
currentPackageVersion = packageMatch[2]
currentPackage = `${currentPackageName}@${currentPackageVersion}`
inDependenciesSection = false
// Track this version exists
if (!lockfileVersions[currentPackageName]) {
lockfileVersions[currentPackageName] = {}
}
if (!lockfileVersions[currentPackageName][currentPackageVersion]) {
lockfileVersions[currentPackageName][currentPackageVersion] = new Set()
}
}
continue
}
// Check if we're entering dependencies section
if (currentPackage && line.trim() === 'dependencies:') {
inDependenciesSection = true
continue
}
// Exit dependencies section
if (inDependenciesSection && line.match(/^ [a-zA-Z]/)) {
const nextSectionMatch = line.match(/^ ([a-zA-Z]+):/)
if (nextSectionMatch && nextSectionMatch[1] !== 'dependencies' && nextSectionMatch[1] !== 'devDependencies') {
inDependenciesSection = false
}
}
// Exit current package when we hit another package definition at the same level
if (currentPackage && line.match(/^ ['"]?[@a-zA-Z]/)) {
currentPackage = null
currentPackageName = null
currentPackageVersion = null
inDependenciesSection = false
}
// Parse dependency lines like " '@hcengineering/platform': 0.7.3"
// This tells us that currentPackageName@currentPackageVersion depends on @hcengineering/platform@0.7.3
if (inDependenciesSection && currentPackageName && currentPackageVersion) {
const depMatch = line.match(/^\s{6}'?(@hcengineering\/[^']+)'?:\s+([0-9.]+)/)
if (depMatch) {
const depPackageName = depMatch[1]
const depVersion = depMatch[2]
// Record that depPackageName@depVersion is required by currentPackageName@currentPackageVersion
if (!lockfileVersions[depPackageName]) {
lockfileVersions[depPackageName] = {}
}
if (!lockfileVersions[depPackageName][depVersion]) {
lockfileVersions[depPackageName][depVersion] = new Set()
}
lockfileVersions[depPackageName][depVersion].add(currentPackage)
}
}
}
return lockfileVersions
}
/**
* Get all projects from rush
* @returns {Array} List of projects with name, version, and path
*/
function getProjects() {
console.log('📦 Loading Rush projects...')
try {
const repoRoot = findRepoRoot()
const output = execSync('node common/scripts/install-run-rush.js list -p --json', {
encoding: 'utf-8',
stdio: ['pipe', 'pipe', 'pipe'],
cwd: repoRoot
})
// Parse the JSON output (skip any warnings/logs before the JSON)
const lines = output.split('\n')
let jsonStart = -1
for (let i = 0; i < lines.length; i++) {
if (lines[i].trim().startsWith('{')) {
jsonStart = i
break
}
}
if (jsonStart === -1) {
throw new Error('Could not find JSON output from rush list')
}
const jsonOutput = lines.slice(jsonStart).join('\n')
const config = JSON.parse(jsonOutput)
return config.projects
} catch (error) {
console.error('❌ Error loading Rush projects:', error.message)
process.exit(1)
}
}
/**
* Read package.json for a project
* @param {string} projectPath - Path to the project
* @returns {Object} Parsed package.json
*/
function readPackageJson(projectPath) {
const repoRoot = findRepoRoot()
const fullPath = path.join(repoRoot, projectPath)
const packageJsonPath = path.join(fullPath, 'package.json')
try {
const content = fs.readFileSync(packageJsonPath, 'utf-8')
return JSON.parse(content)
} catch (error) {
console.warn(`⚠️ Could not read ${packageJsonPath}: ${error.message}`)
return null
}
}
/**
* Extract @hcengineering dependencies from package.json
* @param {Object} packageJson - Parsed package.json
* @param {string} packageName - Name of the package
* @returns {Object} Map of dependency name to version
*/
function extractHceDependencies(packageJson, packageName) {
const dependencies = {}
// Check both dependencies and devDependencies
const depTypes = ['dependencies', 'devDependencies']
for (const depType of depTypes) {
const deps = packageJson[depType]
if (!deps) continue
for (const [depName, version] of Object.entries(deps)) {
if (depName.startsWith(SCOPE)) {
dependencies[depName] = {
version: version,
type: depType,
usedBy: packageName
}
}
}
}
return dependencies
}
/**
* Build a map of all dependency versions across all packages
* @param {Array} projects - List of projects
* @returns {Object} Map of dependency name to list of versions and users
*/
function buildDependencyMap(projects) {
console.log('🔍 Scanning all packages for @hcengineering dependencies...\n')
const dependencyMap = {}
let totalPackages = 0
let totalDependencies = 0
for (const project of projects) {
const packageJson = readPackageJson(project.path)
if (!packageJson) continue
totalPackages++
const dependencies = extractHceDependencies(packageJson, project.name)
for (const [depName, info] of Object.entries(dependencies)) {
if (!dependencyMap[depName]) {
dependencyMap[depName] = {}
}
if (!dependencyMap[depName][info.version]) {
dependencyMap[depName][info.version] = []
}
dependencyMap[depName][info.version].push({
package: project.name,
type: info.type
})
totalDependencies++
}
}
console.log(`✅ Scanned ${totalPackages} packages`)
console.log(`✅ Found ${totalDependencies} @hcengineering dependencies\n`)
return dependencyMap
}
/**
* Find version mismatches in the dependency map
* @param {Object} dependencyMap - Map of dependencies to versions
* @returns {Object} Object with mismatches array and error flag
*/
function findMismatches(dependencyMap) {
const mismatches = []
for (const [depName, versions] of Object.entries(dependencyMap)) {
const versionList = Object.keys(versions)
if (versionList.length > 1) {
mismatches.push({
dependency: depName,
versions: versions
})
}
}
return mismatches
}
/**
* Format and display mismatches
* @param {Array} mismatches - List of mismatched dependencies
*/
function displayMismatches(mismatches) {
console.log('━'.repeat(80))
console.log('❌ VERSION MISMATCHES FOUND')
console.log('━'.repeat(80))
console.log()
for (const mismatch of mismatches) {
console.log(`📦 ${mismatch.dependency}`)
console.log()
const versionList = Object.keys(mismatch.versions).sort()
for (const version of versionList) {
const users = mismatch.versions[version]
console.log(` Version: ${version}`)
console.log(` Used by ${users.length} package(s):`)
// Sort users for consistent output
users.sort((a, b) => a.package.localeCompare(b.package))
// Show first 10 users, then summarize if more
const displayUsers = users.slice(0, 10)
for (const user of displayUsers) {
console.log(` - ${user.package} (${user.type})`)
}
if (users.length > 10) {
console.log(` ... and ${users.length - 10} more`)
}
console.log()
}
console.log('─'.repeat(80))
console.log()
}
}
/**
* Find mismatches in the lockfile
* @param {Object} lockfileVersions - Map of package names to version -> dependents mapping
* @returns {Array} Array of packages with multiple versions in lockfile
*/
function findLockfileMismatches(lockfileVersions) {
const mismatches = []
for (const [packageName, versionMap] of Object.entries(lockfileVersions)) {
const versions = Object.keys(versionMap)
if (versions.length > 1) {
mismatches.push({
package: packageName,
versionMap: versionMap
})
}
}
return mismatches
}
/**
* Display lockfile mismatches
* @param {Array} mismatches - Array of lockfile mismatches
*/
function displayLockfileMismatches(mismatches) {
console.log('━'.repeat(80))
console.log('❌ LOCKFILE VERSION MISMATCHES FOUND')
console.log('━'.repeat(80))
console.log()
console.log('The following @hcengineering packages have multiple resolved versions')
console.log('in pnpm-lock.yaml (transitive dependencies):')
console.log()
for (const mismatch of mismatches) {
console.log(`📦 ${mismatch.package}`)
console.log()
const versions = Object.keys(mismatch.versionMap).sort()
for (const version of versions) {
const dependents = Array.from(mismatch.versionMap[version])
console.log(` Version ${version}:`)
console.log(` Required by ${dependents.length} package(s):`)
// Sort dependents for consistent output
dependents.sort()
// Show first 10 dependents, then summarize if more
const displayDependents = dependents.slice(0, 10)
for (const dependent of displayDependents) {
// Clean up the path for better readability
const cleanPath = dependent.replace(/^\.\.\/\.\.\//, '')
console.log(` - ${cleanPath}`)
}
if (dependents.length > 10) {
console.log(` ... and ${dependents.length - 10} more`)
}
console.log()
}
console.log('─'.repeat(80))
console.log()
}
}
/**
* Main function
*/
function main() {
console.log('🚀 Checking @hcengineering dependency versions...\n')
// Get all projects from rush
const projects = getProjects()
// Build dependency map from package.json files
const dependencyMap = buildDependencyMap(projects)
// Find mismatches in package.json files
const packageJsonMismatches = findMismatches(dependencyMap)
// Parse lockfile and find mismatches there
console.log('🔒 Checking pnpm-lock.yaml for resolved version mismatches...\n')
const lockfileVersions = parseLockfile()
const lockfileMismatches = findLockfileMismatches(lockfileVersions)
console.log(`✅ Found ${Object.keys(lockfileVersions).length} unique @hcengineering packages in lockfile`)
console.log(`${lockfileMismatches.length > 0 ? '❌' : '✅'} Found ${lockfileMismatches.length} packages with multiple resolved versions\n`)
const hasErrors = packageJsonMismatches.length > 0 || lockfileMismatches.length > 0
if (!hasErrors) {
console.log('━'.repeat(80))
console.log('✅ SUCCESS - All @hcengineering dependencies use consistent versions!')
console.log('━'.repeat(80))
console.log()
console.log('✓ All package.json dependencies are consistent')
console.log('✓ All resolved versions in pnpm-lock.yaml are consistent')
console.log()
process.exit(0)
} else {
if (packageJsonMismatches.length > 0) {
displayMismatches(packageJsonMismatches)
console.log(`❌ PACKAGE.JSON ISSUES: Found ${packageJsonMismatches.length} dependencies with mismatched versions`)
console.log()
}
if (lockfileMismatches.length > 0) {
displayLockfileMismatches(lockfileMismatches)
console.log(`❌ LOCKFILE ISSUES: Found ${lockfileMismatches.length} packages with multiple resolved versions`)
console.log()
}
console.log('To fix these issues:')
console.log(' 1. Update package.json files to use consistent versions')
console.log(' 2. Run: rush update')
console.log(' 3. Run: rush rebuild')
console.log(' 4. Run this script again to verify')
console.log()
process.exit(1)
}
}
// Run the script
if (require.main === module) {
main()
}
module.exports = {
getProjects,
buildDependencyMap,
findMismatches,
parseLockfile,
findLockfileMismatches
}
+3
View File
@@ -0,0 +1,3 @@
rush docker:build -p 20 \
--to @hcengineering/pod-server \
--to @hcengineering/tool || true
+3 -1
View File
@@ -25,4 +25,6 @@ rush docker:build -p 20 \
--to @hcengineering/pod-backup \
--to @hcengineering/backup-api-pod \
--to @hcengineering/pod-billing \
--to @hcengineering/pod-process
--to @hcengineering/pod-process \
--to @hcengineering/pod-rating \
--to @hcengineering/pod-payment
+13 -3
View File
@@ -1,12 +1,22 @@
{
"name": "@hcengineering/scripts",
"version": "0.1.0",
"version": "0.7.0",
"scripts": {
"format": "echo \"No format specified\""
"format": "echo \"No format specified\"",
"safe-publish": "node safe-publish.js"
},
"template": "none",
"devDependencies": {
"@hcengineering/platform-rig": "^0.7.19",
"esbuild": "^0.25.9",
"sharp": "~0.34.3"
"sharp": "~0.34.3",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0"
},
"private": true
}
+158
View File
@@ -0,0 +1,158 @@
#!/usr/bin/env node
/**
* Safe publish script that skips packages that are already published
* Usage: node safe-publish.js [--include <package-name>]
*/
const { execSync, spawnSync } = require('child_process')
const https = require('https')
const http = require('http')
/**
* Check if a package version exists on npm registry
*/
function checkPackageExists(packageName, version) {
return new Promise((resolve) => {
const registryUrl = process.env.NPM_REGISTRY || 'https://registry.npmjs.org'
const url = `${registryUrl}/${encodeURIComponent(packageName)}/${version}`
const client = url.startsWith('https:') ? https : http
const req = client.get(url, (res) => {
if (res.statusCode === 200) {
resolve(true) // Package version exists
} else {
resolve(false) // Package version doesn't exist
}
})
req.on('error', () => {
resolve(false) // Assume doesn't exist on error
})
req.setTimeout(5000, () => {
req.destroy()
resolve(false)
})
})
}
/**
* Get list of packages that should be published from rush
*/
function getPublishablePackages(includePattern) {
try {
const output = execSync('rush list -p --json', { encoding: 'utf-8' })
const config = JSON.parse(output)
return config.projects.filter((project) => {
// Check if package should be published according to rush.json
const shouldPublish = project.shouldPublish === true
// Skip if no package name
if (!project.name) {
return false
}
// If includePattern is specified, filter by it
if (includePattern && !project.name.includes(includePattern)) {
return false
}
return shouldPublish && project.name.startsWith('@hcengineering')
})
} catch (err) {
console.error('Error getting package list:', err.message)
return []
}
}
/**
* Publish a single package
*/
function publishPackage(packagePath, packageName) {
try {
console.log(`Publishing ${packageName}...`)
execSync('npm publish', {
cwd: packagePath,
stdio: 'inherit',
encoding: 'utf-8'
})
console.log(`✓ Successfully published ${packageName}`)
return true
} catch (err) {
console.error(`✗ Failed to publish ${packageName}:`, err.message)
return false
}
}
/**
* Main function
*/
async function main() {
const args = process.argv.slice(2)
let includePattern = null
// Parse arguments
for (let i = 0; i < args.length; i++) {
if (args[i] === '--include' && i + 1 < args.length) {
includePattern = args[i + 1]
i++
}
}
console.log('Fetching publishable packages...')
const packages = getPublishablePackages(includePattern)
if (packages.length === 0) {
console.log('No packages found to publish')
return
}
console.log(`Found ${packages.length} package(s) to check`)
console.log('='.repeat(80))
let published = 0
let skipped = 0
let failed = 0
for (const pkg of packages) {
const packageName = pkg.name
const version = pkg.version
const packagePath = pkg.fullPath
console.log(`\nChecking ${packageName}@${version}...`)
const exists = await checkPackageExists(packageName, version)
if (exists) {
console.log(`⊘ Skipping ${packageName}@${version} (already published)`)
skipped++
} else {
console.log(`${packageName}@${version} not published, publishing now...`)
const success = publishPackage(packagePath, packageName)
if (success) {
published++
} else {
failed++
}
}
}
console.log('\n' + '='.repeat(80))
console.log('Summary:')
console.log(` Published: ${published}`)
console.log(` Skipped: ${skipped}`)
console.log(` Failed: ${failed}`)
console.log('='.repeat(80))
if (failed > 0) {
process.exit(1)
}
}
main().catch((err) => {
console.error('Error:', err)
process.exit(1)
})
+31
View File
@@ -0,0 +1,31 @@
// Wrapper around sass to suppress legacy-js-api deprecation warnings
// Should be removed when sass-preprocessor is upgraded to the version that works with modern sass api
// Install the stderr filter globally as early as possible
if (!process.stderr._originalWrite) {
process.stderr._originalWrite = process.stderr.write;
process.stderr.write = function (chunk, encoding, callback) {
const chunkStr = typeof chunk === 'string' ? chunk : (chunk?.toString?.() || '');
// Filter out sass legacy API deprecation warnings
if (chunkStr.includes('Deprecation Warning [legacy-js-api]') ||
chunkStr.includes('DEPRECATION WARNING [legacy-js-api]') ||
chunkStr.includes('The legacy JS API is deprecated') ||
chunkStr.includes('More info: https://sass-lang.com/d/legacy-js-api')) {
// Suppress the warning - just call the callback
if (typeof encoding === 'function') {
encoding();
} else if (typeof callback === 'function') {
callback();
}
return true;
}
return process.stderr._originalWrite.call(this, chunk, encoding, callback);
};
}
const sass = require('sass');
module.exports = sass;
+234
View File
@@ -0,0 +1,234 @@
#!/usr/bin/env node
/**
* Script to update specific @hcengineering packages to a specified version
* across all package.json files in the workspace.
*
* Usage: node update-package-versions.js <version>
* Example: node update-package-versions.js 0.7.2
*/
const fs = require('fs')
const path = require('path')
const { execSync } = require('child_process')
// Packages to update
const PACKAGES_TO_UPDATE = [
'account-client',
'analytics',
'analytics-service',
'api-client',
'client',
'client-resources',
'collaborator-client',
'core',
'hulylake-client',
'model',
'platform',
'query',
'rank',
'retry',
'rpc',
'storage',
'text',
'text-core',
'text-html',
'text-markdown',
'text-ydoc',
'token'
]
// Convert to full package names
const FULL_PACKAGE_NAMES = PACKAGES_TO_UPDATE.map((pkg) => `@hcengineering/${pkg}`)
/**
* Get the target version from command line arguments
*/
function getTargetVersion() {
const version = process.argv[2]
if (!version) {
console.error('Error: Please provide a version number')
console.error('Usage: node update-package-versions.js <version>')
console.error('Example: node update-package-versions.js 0.7.2')
process.exit(1)
}
// Add ^ prefix if not present
return version.startsWith('^') ? version : `^${version}`
}
/**
* Recursively find all package.json files in a directory
*/
function findPackageJsonFiles(dir, fileList = []) {
const files = fs.readdirSync(dir)
for (const file of files) {
const filePath = path.join(dir, file)
const stat = fs.statSync(filePath)
if (stat.isDirectory()) {
// Skip node_modules, .git, and other common directories
if (!['node_modules', '.git', 'dist', 'lib', 'build', '.rush', 'temp'].includes(file)) {
findPackageJsonFiles(filePath, fileList)
}
} else if (file === 'package.json') {
fileList.push(filePath)
}
}
return fileList
}
/**
* Update package.json file with new versions
*/
function updatePackageJson(filePath, targetVersion) {
try {
const content = fs.readFileSync(filePath, 'utf8')
const packageJson = JSON.parse(content)
let updated = false
// Update in dependencies
if (packageJson.dependencies) {
for (const pkgName of FULL_PACKAGE_NAMES) {
if (packageJson.dependencies[pkgName]) {
const oldVersion = packageJson.dependencies[pkgName]
packageJson.dependencies[pkgName] = targetVersion
if (oldVersion !== targetVersion) {
console.log(` Updated ${pkgName}: ${oldVersion} -> ${targetVersion}`)
updated = true
}
}
}
}
// Update in devDependencies
if (packageJson.devDependencies) {
for (const pkgName of FULL_PACKAGE_NAMES) {
if (packageJson.devDependencies[pkgName]) {
const oldVersion = packageJson.devDependencies[pkgName]
packageJson.devDependencies[pkgName] = targetVersion
if (oldVersion !== targetVersion) {
console.log(` Updated ${pkgName} (dev): ${oldVersion} -> ${targetVersion}`)
updated = true
}
}
}
}
// Update in peerDependencies
if (packageJson.peerDependencies) {
for (const pkgName of FULL_PACKAGE_NAMES) {
if (packageJson.peerDependencies[pkgName]) {
const oldVersion = packageJson.peerDependencies[pkgName]
packageJson.peerDependencies[pkgName] = targetVersion
if (oldVersion !== targetVersion) {
console.log(` Updated ${pkgName} (peer): ${oldVersion} -> ${targetVersion}`)
updated = true
}
}
}
}
// Update in optionalDependencies
if (packageJson.optionalDependencies) {
for (const pkgName of FULL_PACKAGE_NAMES) {
if (packageJson.optionalDependencies[pkgName]) {
const oldVersion = packageJson.optionalDependencies[pkgName]
packageJson.optionalDependencies[pkgName] = targetVersion
if (oldVersion !== targetVersion) {
console.log(` Updated ${pkgName} (optional): ${oldVersion} -> ${targetVersion}`)
updated = true
}
}
}
}
// Write back to file if updated
if (updated) {
fs.writeFileSync(filePath, JSON.stringify(packageJson, null, 2) + '\n', 'utf8')
return true
}
return false
} catch (error) {
console.error(`Error updating ${filePath}:`, error.message)
return false
}
}
/**
* Main function
*/
function main() {
const targetVersion = getTargetVersion()
const workspaceRoot = path.resolve(__dirname, '../..')
console.log('='.repeat(80))
console.log('Package Version Update Script')
console.log('='.repeat(80))
console.log(`Target version: ${targetVersion}`)
console.log(`Workspace root: ${workspaceRoot}`)
console.log(`Packages to update: ${PACKAGES_TO_UPDATE.length}`)
console.log('='.repeat(80))
console.log()
// Find all package.json files
console.log('Scanning for package.json files...')
const packageJsonFiles = findPackageJsonFiles(workspaceRoot)
console.log(`Found ${packageJsonFiles.length} package.json files`)
console.log()
// Update each file
let updatedFiles = 0
let totalUpdates = 0
for (const filePath of packageJsonFiles) {
const relativePath = path.relative(workspaceRoot, filePath)
const wasUpdated = updatePackageJson(filePath, targetVersion)
if (wasUpdated) {
updatedFiles++
console.log(`${relativePath}`)
}
}
console.log()
console.log('='.repeat(80))
console.log('Summary')
console.log('='.repeat(80))
console.log(`Total package.json files scanned: ${packageJsonFiles.length}`)
console.log(`Files updated: ${updatedFiles}`)
console.log('='.repeat(80))
if (updatedFiles > 0) {
console.log()
console.log('✓ Version update completed successfully!')
console.log()
console.log('Next steps:')
console.log('1. Review the changes: git diff')
console.log('2. Run: rush update')
console.log('3. Run: rush rebuild')
} else {
console.log()
console.log('No packages were updated.')
}
// Execute rush update if there were updates
if (updatedFiles > 0) {
console.log()
console.log('Running rush update...')
console.log('='.repeat(80))
try {
execSync('rush update', { stdio: 'inherit', cwd: workspaceRoot })
console.log('='.repeat(80))
console.log('✓ rush update completed successfully!')
} catch (error) {
console.error('Failed to run rush update:', error.message)
process.exit(1)
}
}
}
// Run the script
main()
+1 -1
View File
@@ -1 +1 @@
"0.7.235"
"0.7.301"
Submodule communication deleted from 961934e8dd
+14 -7
View File
@@ -1,6 +1,6 @@
{
"name": "desktop",
"version": "0.6.435",
"version": "0.7.0",
"main": "dist/main/electron.js",
"author": "Hardcore Engineering <hey@huly.io>",
"template": "@hcengineering/default-package",
@@ -15,20 +15,27 @@
"bump": "bump-package-version"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@hcengineering/desktop": "^0.6.0",
"@hcengineering/platform-rig": "^0.7.19",
"@hcengineering/desktop": "workspace:^0.7.0",
"@vercel/webpack-asset-relocator-loader": "^1.7.3",
"node-loader": "~2.0.0",
"cross-env": "~7.0.3",
"typescript": "^5.8.3",
"electron": "^38.1.1",
"typescript": "^5.9.3",
"electron": "^38.2.2",
"@types/node": "^22.15.29",
"electron-builder": "^25.1.8",
"@electron/notarize": "^2.3.2"
"@electron/notarize": "^2.3.2",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0"
},
"dependencies": {
"electron-squirrel-startup": "~1.0.0",
"dotenv": "~16.0.0"
"dotenv": "^16.4.5"
},
"homepage": "https://huly.io/",
"productName": "Huly Desktop",
+214 -203
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/desktop",
"version": "0.6.465",
"version": "0.7.208",
"main": "dist/main/electron.js",
"template": "@hcengineering/webpack-package",
"scripts": {
@@ -21,7 +21,7 @@
"bump": "bump-package-version"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@hcengineering/platform-rig": "^0.7.19",
"@vercel/webpack-asset-relocator-loader": "^1.7.3",
"node-loader": "~2.0.0",
"cross-env": "~7.0.3",
@@ -31,11 +31,13 @@
"dotenv-webpack": "^8.0.1",
"ts-loader": "^9.2.5",
"svelte-loader": "^3.2.0",
"svelte-preprocess": "^5.1.4",
"css-loader": "^5.2.1",
"webpack-dev-server": "^4.11.1",
"style-loader": "^3.3.1",
"file-loader": "^6.2.0",
"sass-loader": "^13.2.0",
"sass": "^1.80.0",
"sass-loader": "^14.0.0",
"webpack-bundle-analyzer": "^4.10.2",
"svgo-loader": "^3.0.0",
"autoprefixer": "^10.4.14",
@@ -47,222 +49,231 @@
"fork-ts-checker-webpack-plugin": "^9.0.2",
"update-browserslist-db": "^1.1.3",
"browserslist": "^4.25.0",
"typescript": "^5.8.3",
"typescript": "^5.9.3",
"ts-node": "^10.8.0",
"ts-node-dev": "^2.0.0",
"electron": "^38.1.1",
"electron": "^38.2.2",
"@types/node": "^22.15.29",
"copy-webpack-plugin": "^11.0.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-promise": "^6.1.1",
"eslint": "^8.54.0",
"prettier": "^3.1.0",
"prettier": "^3.6.2",
"esbuild": "^0.25.9",
"esbuild-loader": "^4.3.0",
"svelte-preprocess": "^5.1.3",
"@types/ws": "^8.5.11",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"@types/jest": "^29.5.5",
"@testing-library/jest-dom": "^6.6.3"
"@testing-library/jest-dom": "^6.6.3",
"jest-environment-jsdom": "^30.2.0"
},
"dependencies": {
"@hcengineering/platform": "^0.6.11",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/theme": "^0.6.5",
"@hcengineering/login": "^0.6.12",
"@hcengineering/login-assets": "^0.6.0",
"@hcengineering/login-resources": "^0.6.2",
"@hcengineering/onboard": "^0.6.0",
"@hcengineering/onboard-assets": "^0.6.0",
"@hcengineering/onboard-resources": "^0.6.0",
"@hcengineering/client": "^0.6.18",
"@hcengineering/workbench": "^0.6.16",
"@hcengineering/workbench-resources": "^0.6.1",
"@hcengineering/view": "^0.6.13",
"@hcengineering/view-assets": "^0.6.11",
"@hcengineering/view-resources": "^0.6.0",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/contact-resources": "^0.6.0",
"@hcengineering/task": "^0.6.20",
"@hcengineering/task-assets": "^0.6.19",
"@hcengineering/task-resources": "^0.6.0",
"@hcengineering/chunter": "^0.6.20",
"@hcengineering/chunter-assets": "^0.6.18",
"@hcengineering/chunter-resources": "^0.6.0",
"@hcengineering/recruit": "^0.6.29",
"@hcengineering/recruit-assets": "^0.6.23",
"@hcengineering/recruit-resources": "^0.6.0",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/setting-assets": "^0.6.15",
"@hcengineering/setting-resources": "^0.6.0",
"@hcengineering/client-resources": "^0.6.27",
"@hcengineering/contact-assets": "^0.6.13",
"@hcengineering/activity": "^0.6.0",
"@hcengineering/activity-assets": "^0.6.3",
"@hcengineering/activity-resources": "^0.6.1",
"@hcengineering/telegram": "^0.6.21",
"@hcengineering/telegram-assets": "^0.6.0",
"@hcengineering/telegram-resources": "^0.6.0",
"@hcengineering/workbench-assets": "^0.6.14",
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/attachment-assets": "^0.6.11",
"@hcengineering/attachment-resources": "^0.6.0",
"@hcengineering/lead": "^0.6.0",
"@hcengineering/lead-assets": "^0.6.0",
"@hcengineering/lead-resources": "^0.6.0",
"@hcengineering/gmail": "^0.6.22",
"@hcengineering/gmail-assets": "^0.6.0",
"@hcengineering/gmail-resources": "^0.6.0",
"@hcengineering/image-cropper": "^0.6.0",
"@hcengineering/image-cropper-resources": "^0.6.0",
"@hcengineering/inventory": "^0.6.11",
"@hcengineering/inventory-assets": "^0.6.11",
"@hcengineering/inventory-resources": "^0.6.0",
"@hcengineering/templates": "^0.6.11",
"@hcengineering/templates-assets": "^0.6.11",
"@hcengineering/templates-resources": "^0.6.0",
"@hcengineering/notification": "^0.6.23",
"@hcengineering/notification-assets": "^0.6.17",
"@hcengineering/notification-resources": "^0.6.0",
"@hcengineering/preference": "^0.6.13",
"@hcengineering/preference-assets": "^0.6.0",
"@hcengineering/core": "^0.6.32",
"@hcengineering/rekoni": "^0.6.0",
"@hcengineering/tags-assets": "^0.6.0",
"@hcengineering/tags": "^0.6.16",
"@hcengineering/tags-resources": "^0.6.0",
"@hcengineering/calendar": "^0.6.24",
"@hcengineering/calendar-assets": "^0.6.22",
"@hcengineering/calendar-resources": "^0.6.0",
"@hcengineering/presentation": "^0.6.3",
"@hcengineering/tracker": "^0.6.24",
"@hcengineering/tracker-assets": "^0.6.0",
"@hcengineering/tracker-resources": "^0.6.0",
"@hcengineering/text-editor": "^0.6.0",
"@hcengineering/text-editor-assets": "^0.6.0",
"@hcengineering/text-editor-resources": "^0.6.0",
"@hcengineering/board": "^0.6.19",
"@hcengineering/board-assets": "^0.6.19",
"@hcengineering/board-resources": "^0.6.0",
"@hcengineering/hr": "^0.6.19",
"@hcengineering/hr-assets": "^0.6.19",
"@hcengineering/hr-resources": "^0.6.0",
"@hcengineering/bitrix": "^0.6.52",
"@hcengineering/bitrix-assets": "^0.6.0",
"@hcengineering/bitrix-resources": "^0.6.0",
"@hcengineering/request": "^0.6.14",
"@hcengineering/request-assets": "^0.6.0",
"@hcengineering/request-resources": "^0.6.0",
"@hcengineering/drive": "^0.6.0",
"@hcengineering/drive-assets": "^0.6.0",
"@hcengineering/drive-resources": "^0.6.0",
"@hcengineering/support": "^0.6.5",
"@hcengineering/support-assets": "^0.6.5",
"@hcengineering/support-resources": "^0.6.0",
"@hcengineering/diffview": "^0.6.0",
"@hcengineering/diffview-assets": "^0.6.0",
"@hcengineering/diffview-resources": "^0.6.0",
"@hcengineering/time": "^0.6.0",
"@hcengineering/time-assets": "^0.6.0",
"@hcengineering/time-resources": "^0.6.0",
"@hcengineering/github": "^0.6.0",
"@hcengineering/github-assets": "^0.6.0",
"@hcengineering/github-resources": "^0.6.0",
"@hcengineering/desktop-preferences": "^0.6.0",
"@hcengineering/desktop-preferences-assets": "^0.6.0",
"@hcengineering/desktop-preferences-resources": "^0.6.0",
"@hcengineering/desktop-downloads": "^0.6.0",
"@hcengineering/desktop-downloads-assets": "^0.6.0",
"@hcengineering/desktop-downloads-resources": "^0.6.0",
"@hcengineering/document": "^0.6.0",
"@hcengineering/document-assets": "^0.6.0",
"@hcengineering/document-resources": "^0.6.0",
"@hcengineering/love": "^0.6.0",
"@hcengineering/love-assets": "^0.6.0",
"@hcengineering/love-resources": "^0.6.0",
"@hcengineering/sign": "^0.6.0",
"@hcengineering/print": "^0.6.0",
"@hcengineering/print-assets": "^0.6.0",
"@hcengineering/print-resources": "^0.6.0",
"@hcengineering/guest": "^0.6.4",
"@hcengineering/guest-assets": "^0.6.0",
"@hcengineering/guest-resources": "^0.6.0",
"@hcengineering/presence": "^0.6.0",
"@hcengineering/presence-resources": "^0.6.0",
"@hcengineering/media": "^0.6.0",
"@hcengineering/media-assets": "^0.6.0",
"@hcengineering/media-resources": "^0.6.0",
"@hcengineering/recorder": "^0.6.0",
"@hcengineering/recorder-assets": "^0.6.0",
"@hcengineering/recorder-resources": "^0.6.0",
"@hcengineering/uploader": "^0.6.0",
"@hcengineering/uploader-assets": "^0.6.0",
"@hcengineering/uploader-resources": "^0.6.0",
"@hcengineering/controlled-documents": "^0.1.0",
"@hcengineering/controlled-documents-assets": "^0.1.0",
"@hcengineering/controlled-documents-resources": "^0.1.0",
"@hcengineering/questions": "^0.1.0",
"@hcengineering/questions-assets": "^0.1.0",
"@hcengineering/questions-resources": "^0.1.0",
"@hcengineering/training": "^0.1.0",
"@hcengineering/training-assets": "^0.1.0",
"@hcengineering/training-resources": "^0.1.0",
"@hcengineering/server-training": "^0.1.0",
"@hcengineering/server-training-resources": "^0.1.0",
"@hcengineering/products": "^0.1.0",
"@hcengineering/products-assets": "^0.1.0",
"@hcengineering/products-resources": "^0.1.0",
"@hcengineering/process": "^0.6.0",
"@hcengineering/process-assets": "^0.6.0",
"@hcengineering/process-resources": "^0.6.0",
"@hcengineering/analytics-providers": "^0.6.0",
"@hcengineering/analytics-collector": "^0.6.0",
"@hcengineering/analytics-collector-assets": "^0.6.0",
"@hcengineering/analytics-collector-resources": "^0.6.0",
"@hcengineering/ai-bot": "^0.6.0",
"@hcengineering/ai-bot-resources": "^0.6.0",
"@hcengineering/test-management": "^0.6.0",
"@hcengineering/test-management-assets": "^0.6.0",
"@hcengineering/test-management-resources": "^0.6.0",
"@hcengineering/survey": "^0.6.0",
"@hcengineering/survey-assets": "^0.6.0",
"@hcengineering/survey-resources": "^0.6.0",
"@hcengineering/card": "^0.6.0",
"@hcengineering/card-assets": "^0.6.0",
"@hcengineering/card-resources": "^0.6.0",
"@hcengineering/export": "^0.6.0",
"@hcengineering/export-assets": "^0.6.0",
"@hcengineering/export-resources": "^0.6.0",
"@hcengineering/mail": "^0.6.0",
"@hcengineering/mail-assets": "^0.6.0",
"@hcengineering/chat": "^0.6.0",
"@hcengineering/chat-assets": "^0.6.0",
"@hcengineering/chat-resources": "^0.6.0",
"@hcengineering/achievement": "^0.6.0",
"@hcengineering/achievement-assets": "^0.6.0",
"@hcengineering/achievement-resources": "^0.6.0",
"@hcengineering/communication": "^0.6.0",
"@hcengineering/communication-assets": "^0.6.0",
"@hcengineering/communication-resources": "^0.6.0",
"@hcengineering/emoji": "^0.6.0",
"@hcengineering/emoji-assets": "^0.6.0",
"@hcengineering/emoji-resources": "^0.6.0",
"@hcengineering/billing": "^0.6.0",
"@hcengineering/billing-assets": "^0.6.0",
"@hcengineering/billing-resources": "^0.6.0",
"@hcengineering/huly-mail": "^0.6.0",
"@hcengineering/huly-mail-assets": "^0.6.0",
"@hcengineering/huly-mail-resources": "^0.6.0",
"@hcengineering/ai-assistant": "^0.6.0",
"@hcengineering/ai-assistant-assets": "^0.6.0",
"@hcengineering/ai-assistant-resources": "^0.6.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/theme": "workspace:^0.7.0",
"@hcengineering/login": "workspace:^0.7.0",
"@hcengineering/login-assets": "workspace:^0.7.0",
"@hcengineering/login-resources": "workspace:^0.7.0",
"@hcengineering/onboard": "workspace:^0.7.0",
"@hcengineering/onboard-assets": "workspace:^0.7.0",
"@hcengineering/onboard-resources": "workspace:^0.7.0",
"@hcengineering/client": "^0.7.17",
"@hcengineering/workbench": "workspace:^0.7.0",
"@hcengineering/workbench-resources": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/view-assets": "workspace:^0.7.0",
"@hcengineering/view-resources": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/contact-resources": "workspace:^0.7.0",
"@hcengineering/task": "workspace:^0.7.0",
"@hcengineering/task-assets": "workspace:^0.7.0",
"@hcengineering/task-resources": "workspace:^0.7.0",
"@hcengineering/chunter": "workspace:^0.7.0",
"@hcengineering/chunter-assets": "workspace:^0.7.0",
"@hcengineering/chunter-resources": "workspace:^0.7.0",
"@hcengineering/recruit": "workspace:^0.7.0",
"@hcengineering/recruit-assets": "workspace:^0.7.0",
"@hcengineering/recruit-resources": "workspace:^0.7.0",
"@hcengineering/setting": "workspace:^0.7.0",
"@hcengineering/setting-assets": "workspace:^0.7.0",
"@hcengineering/setting-resources": "workspace:^0.7.0",
"@hcengineering/client-resources": "^0.7.17",
"@hcengineering/contact-assets": "workspace:^0.7.0",
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/activity-assets": "workspace:^0.7.0",
"@hcengineering/activity-resources": "workspace:^0.7.0",
"@hcengineering/telegram": "workspace:^0.7.0",
"@hcengineering/telegram-assets": "workspace:^0.7.0",
"@hcengineering/telegram-resources": "workspace:^0.7.0",
"@hcengineering/workbench-assets": "workspace:^0.7.0",
"@hcengineering/attachment": "workspace:^0.7.0",
"@hcengineering/attachment-assets": "workspace:^0.7.0",
"@hcengineering/attachment-resources": "workspace:^0.7.0",
"@hcengineering/lead": "workspace:^0.7.0",
"@hcengineering/lead-assets": "workspace:^0.7.0",
"@hcengineering/lead-resources": "workspace:^0.7.0",
"@hcengineering/gmail": "workspace:^0.7.0",
"@hcengineering/gmail-assets": "workspace:^0.7.0",
"@hcengineering/gmail-resources": "workspace:^0.7.0",
"@hcengineering/image-cropper": "workspace:^0.7.0",
"@hcengineering/image-cropper-resources": "workspace:^0.7.0",
"@hcengineering/inventory": "workspace:^0.7.0",
"@hcengineering/inventory-assets": "workspace:^0.7.0",
"@hcengineering/inventory-resources": "workspace:^0.7.0",
"@hcengineering/templates": "workspace:^0.7.0",
"@hcengineering/templates-assets": "workspace:^0.7.0",
"@hcengineering/templates-resources": "workspace:^0.7.0",
"@hcengineering/notification": "workspace:^0.7.0",
"@hcengineering/notification-assets": "workspace:^0.7.0",
"@hcengineering/notification-resources": "workspace:^0.7.0",
"@hcengineering/preference": "workspace:^0.7.0",
"@hcengineering/preference-assets": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/rekoni": "workspace:^0.7.0",
"@hcengineering/tags-assets": "workspace:^0.7.0",
"@hcengineering/tags": "workspace:^0.7.0",
"@hcengineering/tags-resources": "workspace:^0.7.0",
"@hcengineering/calendar": "workspace:^0.7.0",
"@hcengineering/calendar-assets": "workspace:^0.7.0",
"@hcengineering/calendar-resources": "workspace:^0.7.0",
"@hcengineering/presentation": "workspace:^0.7.0",
"@hcengineering/tracker": "workspace:^0.7.0",
"@hcengineering/tracker-assets": "workspace:^0.7.0",
"@hcengineering/tracker-resources": "workspace:^0.7.0",
"@hcengineering/text-editor": "workspace:^0.7.0",
"@hcengineering/text-editor-assets": "workspace:^0.7.0",
"@hcengineering/text-editor-resources": "workspace:^0.7.0",
"@hcengineering/board": "workspace:^0.7.0",
"@hcengineering/board-assets": "workspace:^0.7.0",
"@hcengineering/board-resources": "workspace:^0.7.0",
"@hcengineering/hr": "workspace:^0.7.0",
"@hcengineering/hr-assets": "workspace:^0.7.0",
"@hcengineering/hr-resources": "workspace:^0.7.0",
"@hcengineering/bitrix": "workspace:^0.7.0",
"@hcengineering/bitrix-assets": "workspace:^0.7.0",
"@hcengineering/bitrix-resources": "workspace:^0.7.0",
"@hcengineering/request": "workspace:^0.7.0",
"@hcengineering/request-assets": "workspace:^0.7.0",
"@hcengineering/request-resources": "workspace:^0.7.0",
"@hcengineering/drive": "workspace:^0.7.0",
"@hcengineering/drive-assets": "workspace:^0.7.0",
"@hcengineering/drive-resources": "workspace:^0.7.0",
"@hcengineering/support": "workspace:^0.7.0",
"@hcengineering/support-assets": "workspace:^0.7.0",
"@hcengineering/support-resources": "workspace:^0.7.0",
"@hcengineering/diffview": "workspace:^0.7.0",
"@hcengineering/diffview-assets": "workspace:^0.7.0",
"@hcengineering/diffview-resources": "workspace:^0.7.0",
"@hcengineering/time": "workspace:^0.7.0",
"@hcengineering/time-assets": "workspace:^0.7.0",
"@hcengineering/time-resources": "workspace:^0.7.0",
"@hcengineering/github": "workspace:^0.7.0",
"@hcengineering/github-assets": "workspace:^0.7.0",
"@hcengineering/github-resources": "workspace:^0.7.0",
"@hcengineering/desktop-preferences": "workspace:^0.7.0",
"@hcengineering/desktop-preferences-assets": "workspace:^0.7.0",
"@hcengineering/desktop-preferences-resources": "workspace:^0.7.0",
"@hcengineering/desktop-downloads": "workspace:^0.7.0",
"@hcengineering/desktop-downloads-assets": "workspace:^0.7.0",
"@hcengineering/desktop-downloads-resources": "workspace:^0.7.0",
"@hcengineering/document": "workspace:^0.7.0",
"@hcengineering/document-assets": "workspace:^0.7.0",
"@hcengineering/document-resources": "workspace:^0.7.0",
"@hcengineering/love": "workspace:^0.7.0",
"@hcengineering/love-assets": "workspace:^0.7.0",
"@hcengineering/love-resources": "workspace:^0.7.0",
"@hcengineering/sign": "workspace:^0.7.0",
"@hcengineering/print": "workspace:^0.7.0",
"@hcengineering/print-assets": "workspace:^0.7.0",
"@hcengineering/print-resources": "workspace:^0.7.0",
"@hcengineering/guest": "workspace:^0.7.0",
"@hcengineering/guest-assets": "workspace:^0.7.0",
"@hcengineering/guest-resources": "workspace:^0.7.0",
"@hcengineering/global-profile": "workspace:^0.7.0",
"@hcengineering/global-profile-assets": "workspace:^0.7.0",
"@hcengineering/global-profile-resources": "workspace:^0.7.0",
"@hcengineering/presence": "workspace:^0.7.0",
"@hcengineering/presence-resources": "workspace:^0.7.0",
"@hcengineering/media": "workspace:^0.7.0",
"@hcengineering/media-assets": "workspace:^0.7.0",
"@hcengineering/media-resources": "workspace:^0.7.0",
"@hcengineering/recorder": "workspace:^0.7.0",
"@hcengineering/recorder-assets": "workspace:^0.7.0",
"@hcengineering/recorder-resources": "workspace:^0.7.0",
"@hcengineering/uploader": "workspace:^0.7.0",
"@hcengineering/uploader-assets": "workspace:^0.7.0",
"@hcengineering/uploader-resources": "workspace:^0.7.0",
"@hcengineering/controlled-documents": "workspace:^0.7.0",
"@hcengineering/controlled-documents-assets": "workspace:^0.7.0",
"@hcengineering/controlled-documents-resources": "workspace:^0.7.0",
"@hcengineering/questions": "workspace:^0.7.0",
"@hcengineering/questions-assets": "workspace:^0.7.0",
"@hcengineering/questions-resources": "workspace:^0.7.0",
"@hcengineering/training": "workspace:^0.7.0",
"@hcengineering/training-assets": "workspace:^0.7.0",
"@hcengineering/training-resources": "workspace:^0.7.0",
"@hcengineering/server-training": "workspace:^0.7.0",
"@hcengineering/server-training-resources": "workspace:^0.7.0",
"@hcengineering/products": "workspace:^0.7.0",
"@hcengineering/products-assets": "workspace:^0.7.0",
"@hcengineering/products-resources": "workspace:^0.7.0",
"@hcengineering/process": "workspace:^0.7.0",
"@hcengineering/process-assets": "workspace:^0.7.0",
"@hcengineering/process-resources": "workspace:^0.7.0",
"@hcengineering/analytics-providers": "workspace:^0.7.0",
"@hcengineering/analytics-collector": "workspace:^0.7.0",
"@hcengineering/analytics-collector-assets": "workspace:^0.7.0",
"@hcengineering/analytics-collector-resources": "workspace:^0.7.0",
"@hcengineering/ai-bot": "workspace:^0.7.0",
"@hcengineering/ai-bot-resources": "workspace:^0.7.0",
"@hcengineering/test-management": "workspace:^0.7.0",
"@hcengineering/test-management-assets": "workspace:^0.7.0",
"@hcengineering/test-management-resources": "workspace:^0.7.0",
"@hcengineering/survey": "workspace:^0.7.0",
"@hcengineering/survey-assets": "workspace:^0.7.0",
"@hcengineering/survey-resources": "workspace:^0.7.0",
"@hcengineering/card": "workspace:^0.7.0",
"@hcengineering/card-assets": "workspace:^0.7.0",
"@hcengineering/card-resources": "workspace:^0.7.0",
"@hcengineering/export": "workspace:^0.7.0",
"@hcengineering/export-assets": "workspace:^0.7.0",
"@hcengineering/export-resources": "workspace:^0.7.0",
"@hcengineering/mail": "workspace:^0.7.0",
"@hcengineering/mail-assets": "workspace:^0.7.0",
"@hcengineering/chat": "workspace:^0.7.0",
"@hcengineering/chat-assets": "workspace:^0.7.0",
"@hcengineering/chat-resources": "workspace:^0.7.0",
"@hcengineering/achievement": "workspace:^0.7.0",
"@hcengineering/achievement-assets": "workspace:^0.7.0",
"@hcengineering/achievement-resources": "workspace:^0.7.0",
"@hcengineering/communication": "workspace:^0.7.0",
"@hcengineering/communication-assets": "workspace:^0.7.0",
"@hcengineering/communication-resources": "workspace:^0.7.0",
"@hcengineering/emoji": "workspace:^0.7.0",
"@hcengineering/emoji-assets": "workspace:^0.7.0",
"@hcengineering/emoji-resources": "workspace:^0.7.0",
"@hcengineering/billing": "workspace:^0.7.0",
"@hcengineering/billing-assets": "workspace:^0.7.0",
"@hcengineering/billing-resources": "workspace:^0.7.0",
"@hcengineering/huly-mail": "workspace:^0.7.0",
"@hcengineering/huly-mail-assets": "workspace:^0.7.0",
"@hcengineering/huly-mail-resources": "workspace:^0.7.0",
"@hcengineering/ai-assistant": "workspace:^0.7.0",
"@hcengineering/ai-assistant-assets": "workspace:^0.7.0",
"@hcengineering/ai-assistant-resources": "workspace:^0.7.0",
"@hcengineering/inbox": "workspace:^0.7.0",
"@hcengineering/inbox-assets": "workspace:^0.7.0",
"@hcengineering/inbox-resources": "workspace:^0.7.0",
"@hcengineering/rating": "workspace:^0.7.0",
"@hcengineering/rating-assets": "workspace:^0.7.0",
"@hcengineering/rating-resources": "workspace:^0.7.0",
"electron-squirrel-startup": "~1.0.0",
"dotenv": "~16.0.0",
"dotenv": "^16.4.5",
"electron-context-menu": "^4.0.4",
"electron-windows-badge": "^1.1.0",
"svelte": "^4.2.20",
@@ -271,8 +282,8 @@
"electron-log": "^5.1.7",
"electron-updater": "^6.3.4",
"livekit-client": "^2.15.6",
"@hcengineering/server-backup": "^0.6.0",
"@hcengineering/communication-types": "^0.1.0",
"@hcengineering/server-backup": "workspace:^0.7.0",
"@hcengineering/communication-types": "^0.7.12",
"ws": "^8.18.2"
},
"productName": "Huly Desktop",
+20 -4
View File
@@ -155,14 +155,30 @@ describe('Settings', () => {
systemUnderTest.setMinimizeToTrayEnabled(value)
expect(systemUnderTest.isMinimizeToTrayEnabled()).toBe(value)
expect(systemUnderTest.isAutoLaunchEnabled()).toBe(false)
})
})
describe('setAutoLaunchEnabled', () => {
test.each([
{ value: true, description: 'stored value is true' },
{ value: false, description: 'stored value is false' }
])('$description', ({ value }) => {
systemUnderTest.setAutoLaunchEnabled(value)
expect(systemUnderTest.isAutoLaunchEnabled()).toBe(value)
expect(systemUnderTest.isMinimizeToTrayEnabled()).toBe(false)
})
})
describe('setServerUrl', () => {
test('write than read', () => {
const expectedUrl = 'https://new.server.com'
systemUnderTest.setServerUrl(expectedUrl)
const expectedUrl = 'https://new.server.com'
test.each([
{ serverUrl: 'https://new.server.com' },
{ serverUrl: 'https://new.server.com/' },
{ serverUrl: 'https://new.server.com//' }
])('write $serverUrl than read', ({ serverUrl }) => {
systemUnderTest.setServerUrl(serverUrl)
expect(systemUnderTest.readServerUrl()).toBe(expectedUrl)
})
+13 -5
View File
@@ -15,9 +15,10 @@
import { BrowserWindow } from 'electron'
import { MenuBarAction, CommandLogout, CommandSelectWorkspace, CommandOpenSettings } from '../ui/types'
import { TrayController } from './tray'
import { OsIntegration } from './osIntegration'
import { IpcMessage } from '../ui/ipcMessages'
export function dispatchMenuBarAction (mainWindow: BrowserWindow | undefined, action: MenuBarAction, tray: TrayController | undefined): void {
export function dispatchMenuBarAction (mainWindow: BrowserWindow | undefined, action: MenuBarAction, os: OsIntegration | undefined): void {
if (mainWindow == null) {
return
}
@@ -88,9 +89,16 @@ export function dispatchMenuBarAction (mainWindow: BrowserWindow | undefined, ac
mainWindow.setFullScreen(!mainWindow.isFullScreen())
break
case 'toggle-minimize-to-tray': {
if (tray != null) {
const newSetting = tray.toggleMinimizeToTray()
mainWindow.webContents.send('minimize-to-tray-setting-changed', newSetting)
if (os != null) {
const newSetting = os.getTray().toggleMinimizeToTray()
mainWindow.webContents.send(IpcMessage.MinimizeToTraySettingChanged, newSetting)
}
break
}
case 'toggle-auto-launch': {
if (os != null) {
const newSetting = os.toggleAutoLaunch()
mainWindow.webContents.send(IpcMessage.AutoLaunchSettingChanged, newSetting)
}
break
}
+39
View File
@@ -0,0 +1,39 @@
//
// Copyright © 2025 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { app } from 'electron'
import { TrayController } from './tray'
import { Settings } from './settings'
export class OsIntegration {
constructor (
private readonly settings: Settings,
private readonly tray: TrayController) {
}
getTray (): TrayController {
return this.tray
}
toggleAutoLaunch (): boolean {
const settings = app.getLoginItemSettings()
const previousValue = settings.openAtLogin
const newValue = !previousValue
settings.openAtLogin = newValue
app.setLoginItemSettings(settings)
this.settings.setAutoLaunchEnabled(newValue)
return newValue
}
}
+42 -18
View File
@@ -19,6 +19,7 @@ import { PackedConfig } from './config'
export class Settings {
private static readonly SETTINGS_KEY_SERVER = 'server'
private static readonly SETTINGS_KEY_MINIMIZE_TO_TRAY = 'minimize-to-tray'
private static readonly SETTINGS_KEY_AUTO_LAUNCH = 'auto-launch'
private static readonly SETTINGS_KEY_WINDOW_BOUNDS = 'windowBounds'
private readonly store: Store
@@ -32,6 +33,41 @@ export class Settings {
}
readServerUrl (): string {
const url = this.extractUrl()
// Motivation: fix existing Huly installations (saved on disk URLs).
return Settings.sanitizeUrl(url)
}
isMinimizeToTrayEnabled (): boolean {
return (this.store as any).get(Settings.SETTINGS_KEY_MINIMIZE_TO_TRAY) as boolean ?? false
}
isAutoLaunchEnabled (): boolean {
return (this.store as any).get(Settings.SETTINGS_KEY_AUTO_LAUNCH) as boolean ?? false
}
setMinimizeToTrayEnabled (enabled: boolean): void {
(this.store as any).set(Settings.SETTINGS_KEY_MINIMIZE_TO_TRAY, enabled)
}
setAutoLaunchEnabled (enabled: boolean): void {
(this.store as any).set(Settings.SETTINGS_KEY_AUTO_LAUNCH, enabled)
}
setServerUrl (serverUrl: string): void {
const sanitizedUrl: string = Settings.sanitizeUrl(serverUrl)
;(this.store as any).set(Settings.SETTINGS_KEY_SERVER, sanitizedUrl)
}
getWindowBounds (): any {
return (this.store as any).get(Settings.SETTINGS_KEY_WINDOW_BOUNDS)
}
setWindowBounds (bounds: any): void {
(this.store as any).set(Settings.SETTINGS_KEY_WINDOW_BOUNDS, bounds)
}
private extractUrl (): string {
if (this.isDev) {
return process.env.FRONT_URL ?? 'http://huly.local:8087'
}
@@ -43,23 +79,11 @@ export class Settings {
)
}
isMinimizeToTrayEnabled (): boolean {
return (this.store as any).get(Settings.SETTINGS_KEY_MINIMIZE_TO_TRAY) as boolean ?? false
}
setMinimizeToTrayEnabled (enabled: boolean): void {
(this.store as any).set(Settings.SETTINGS_KEY_MINIMIZE_TO_TRAY, enabled)
}
setServerUrl (serverUrl: string): void {
(this.store as any).set(Settings.SETTINGS_KEY_SERVER, serverUrl)
}
getWindowBounds (): any {
return (this.store as any).get(Settings.SETTINGS_KEY_WINDOW_BOUNDS)
}
setWindowBounds (bounds: any): void {
(this.store as any).set(Settings.SETTINGS_KEY_WINDOW_BOUNDS, bounds)
private static sanitizeUrl (serverUrl: string): string {
let cleanUrl: string = serverUrl
while (cleanUrl.endsWith('/')) {
cleanUrl = cleanUrl.slice(0, -1)
}
return cleanUrl
}
}
+34 -27
View File
@@ -35,6 +35,8 @@ import { readPackedConfig } from './config'
import { Settings } from './settings'
import { TrayController } from './tray'
import { getFileInPublicBundledFolder } from './path'
import { OsIntegration } from './osIntegration'
import { IpcMessage } from '../ui/ipcMessages'
let isQuiting = false
@@ -211,7 +213,7 @@ function runTheApp (): void {
void (async (): Promise<void> => {
await window.loadFile(containerPagePath)
window.webContents.send('handle-auth', urlObj.searchParams.get('token'))
window.webContents.send(IpcMessage.HandleAuth, urlObj.searchParams.get('token'))
})()
}
})
@@ -231,7 +233,7 @@ function runTheApp (): void {
url: item.getURL(),
savePath: item.getSavePath()
}
window.webContents.send('handle-download-item', download)
window.webContents.send(IpcMessage.HandleDownloadItem, download)
}
notifyDownloadUpdated()
@@ -275,7 +277,7 @@ function runTheApp (): void {
hookOpenWindow(mainWindow)
function minimizeToTrayIsOn (): boolean {
return settings.isMinimizeToTrayEnabled() && trayController != null
return settings.isMinimizeToTrayEnabled() && osIntegration != null
}
mainWindow.on('close', (event: Event) => {
@@ -299,7 +301,7 @@ function runTheApp (): void {
})
function sendWindowMaximizedMessage (maximized: boolean): void {
mainWindow?.webContents.send('window-state-changed', maximized ? 'maximized' : 'unmaximized')
mainWindow?.webContents.send(IpcMessage.WindowStateChanged, maximized ? 'maximized' : 'unmaximized')
}
mainWindow.on('focus', () => {
@@ -313,7 +315,7 @@ function runTheApp (): void {
mainWindow.on('blur', () => {
globalShortcut.unregister(CloseTabHotKey)
mainWindow?.webContents.send('window-focus-loss')
mainWindow?.webContents.send(IpcMessage.WindowFocusLoss)
})
mainWindow.on('maximize', () => {
@@ -361,10 +363,11 @@ function runTheApp (): void {
}
}
let trayController: TrayController | undefined
let osIntegration: OsIntegration | undefined
void app.whenReady().then(() => {
trayController = new TrayController(settings, activateWindow, quitApplication)
const trayController = new TrayController(settings, activateWindow, quitApplication)
osIntegration = new OsIntegration(settings, trayController)
})
if (isWindows) {
@@ -379,40 +382,40 @@ function runTheApp (): void {
showSelectAll: false
})
ipcMain.on('set-badge', (_event: any, badge: number) => {
ipcMain.on(IpcMessage.SetBadge, (_event: any, badge: number) => {
app.dock?.setBadge(badge > 0 ? `${badge}` : '')
app.badgeCount = badge
if (isWindows && winBadge !== undefined) {
winBadge.update(badge)
}
trayController?.updateTrayBadge(badge)
osIntegration?.getTray().updateTrayBadge(badge)
})
ipcMain.on('dock-bounce', (_event: any) => {
ipcMain.on(IpcMessage.DockBounce, (_event: any) => {
app.dock?.bounce('informational')
})
ipcMain.on('send-notification', (_event: any, notificationParams: NotificationParams) => {
ipcMain.on(IpcMessage.SendNotification, (_event: any, notificationParams: NotificationParams) => {
if (Notification.isSupported()) {
const notification = new Notification(notificationParams)
notification.on('click', () => {
mainWindow?.show()
mainWindow?.webContents.send('handle-notification-navigation', notificationParams)
mainWindow?.webContents.send(IpcMessage.HandleNotificationNavigation, notificationParams)
})
notification.show()
}
})
ipcMain.on('set-title', (event: any, title: string) => {
ipcMain.on(IpcMessage.SetTitle, (event: any, title: string) => {
const webContents = event.sender
const window = BrowserWindow.fromWebContents(webContents)
window?.setTitle(title)
})
ipcMain.on('set-combined-config', (_event: any, config: Config) => {
ipcMain.on(IpcMessage.SetCombinedConfig, (_event: any, config: Config) => {
log.info('Config set: ', config)
setupCookieHandler(config)
@@ -444,7 +447,7 @@ function runTheApp (): void {
void autoUpdater.checkForUpdatesAndNotify()
})
ipcMain.handle('get-main-config', (_event: any, _path: any) => {
ipcMain.handle(IpcMessage.GetMainConfig, (_event: any, _path: any) => {
const cfg = {
CONFIG_URL: process.env.CONFIG_URL ?? '',
FRONT_URL,
@@ -454,11 +457,11 @@ function runTheApp (): void {
}
return cfg
})
ipcMain.handle('get-host', (_event: any, _path: any) => {
ipcMain.handle(IpcMessage.GetHost, (_event: any, _path: any) => {
return new URL(FRONT_URL).host
})
ipcMain.on('set-front-cookie', function (event: any, host: string, name: string, value: string) {
ipcMain.on(IpcMessage.SetFrontCookie, function (event: any, host: string, name: string, value: string) {
const webContents = event.sender
const win = BrowserWindow.fromWebContents(webContents)
const cv: CookiesSetDetails = {
@@ -474,11 +477,11 @@ function runTheApp (): void {
void win?.webContents?.session.cookies.set(cv)
})
ipcMain.handle('window-minimize', () => {
ipcMain.handle(IpcMessage.WindowMinimize, () => {
mainWindow?.minimize()
})
ipcMain.handle('window-maximize', () => {
ipcMain.handle(IpcMessage.WindowMaximize, () => {
if (mainWindow != null) {
if (mainWindow.isMaximized()) {
mainWindow.unmaximize()
@@ -488,26 +491,26 @@ function runTheApp (): void {
}
})
ipcMain.handle('window-close', () => {
ipcMain.handle(IpcMessage.WindowClose, () => {
mainWindow?.close()
})
ipcMain.handle('get-is-os-using-dark-theme', () => {
ipcMain.handle(IpcMessage.GetIsOsUsingDarkTheme, () => {
return nativeTheme.shouldUseDarkColors
})
ipcMain.handle('menu-action', async (_event: any, action: MenuBarAction) => {
dispatchMenuBarAction(mainWindow, action, trayController)
ipcMain.handle(IpcMessage.MenuAction, async (_event: any, action: MenuBarAction) => {
dispatchMenuBarAction(mainWindow, action, osIntegration)
})
if (isWindows) {
ipcMain.on('rebuild-user-jump-list', (_event: any, spares: JumpListSpares) => {
ipcMain.on(IpcMessage.RebuildUserJumpList, (_event: any, spares: JumpListSpares) => {
rebuildJumpList(spares)
})
}
ipcMain.handle('get-screen-access', () => systemPreferences.getMediaAccessStatus('screen') === 'granted')
ipcMain.handle('get-screen-sources', () => {
ipcMain.handle(IpcMessage.GetScreenAccess, () => systemPreferences.getMediaAccessStatus('screen') === 'granted')
ipcMain.handle(IpcMessage.GetScreenSources, () => {
return desktopCapturer.getSources({ types: ['window', 'screen'], fetchWindowIcons: true, thumbnailSize: { width: 225, height: 135 } }).then(async sources => {
return sources.map((source: any) => {
return {
@@ -523,6 +526,10 @@ function runTheApp (): void {
return settings.isMinimizeToTrayEnabled()
})
ipcMain.handle(IpcMessage.GetAutoLaunchEnabled, () => {
return settings.isAutoLaunchEnabled()
})
async function onReady (): Promise<void> {
await createWindow()
@@ -605,7 +612,7 @@ function runTheApp (): void {
return
}
mainWindow.setProgressBar(percent / 100)
mainWindow.webContents.send('handle-update-download-progress', percent)
mainWindow.webContents.send(IpcMessage.HandleUpdateDownloadProgress, percent)
}
autoUpdater.on('update-downloaded', (_info: any) => {
+34 -1
View File
@@ -24,7 +24,12 @@
box-sizing: border-box;
}
body {
background-color: var(--bg-body, #ffffff);
}
:root {
--bg-body: #ffffff;
--bg-secondary: #f3f3f3;
--bg-tertiary: #ffffff;
--bg-hover: #e8e8e8;
@@ -38,7 +43,12 @@
--huly-history-box-left-indent: 0;
}
.history-box {
display: none !important;
}
[data-theme="theme-dark"] {
--bg-body: #1a1928;
--bg-secondary: #323233;
--bg-tertiary: #252526;
--bg-hover: #2a2d2e;
@@ -201,6 +211,15 @@
user-select: none;
}
.desktop-app-control-button.desktop-app-back,
.desktop-app-control-button.desktop-app-forward {
font-size: 16px;
font-weight: 700;
line-height: 1;
padding-bottom: 2px;
-webkit-text-stroke: 0.5px currentColor;
}
.desktop-app-control-button:hover {
background-color: var(--bg-hover);
}
@@ -223,6 +242,11 @@
<div class="desktop-app-menu-container">
</div>
<div class="desktop-app-window-controls">
<button class="desktop-app-control-button desktop-app-back" id="back-button" title="Back">←</button>
<button class="desktop-app-control-button desktop-app-forward" id="forward-button" title="Forward">→</button>
</div>
<div class="desktop-app-window-title" id="application-title-bar-caption">Huly</div>
<div class="desktop-app-window-controls">
@@ -236,4 +260,13 @@
</body>
</html>
</html>
<% if (typeof isWindows !== 'undefined' && isWindows) { %>
<script>
const lastUsedTheme = localStorage.getItem('last-used-theme')
if (lastUsedTheme != null) {
document.body.setAttribute('data-theme', lastUsedTheme)
}
</script>
<% } %>
+45 -19
View File
@@ -1,3 +1,18 @@
//
// Copyright © 2025 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { loginId } from '@hcengineering/login'
import { loveId } from '@hcengineering/love'
import { timeId } from '@hcengineering/time'
@@ -10,6 +25,7 @@ import {
closePopup,
createApp,
getCurrentResolvedLocation,
Menu,
navigate,
parseLocation,
pushRootBarProgressComponent,
@@ -18,10 +34,15 @@ import {
} from '@hcengineering/ui'
import { handleDownloadItem } from '@hcengineering/desktop-downloads'
import notification, { notificationId } from '@hcengineering/notification'
import { chatId } from '@hcengineering/chat'
import { inboxId } from '@hcengineering/inbox'
import workbench, { workbenchId, logOut } from '@hcengineering/workbench'
import view, { Action, encodeObjectURI } from '@hcengineering/view'
import { resolveLocation } from '@hcengineering/notification-resources'
import { themeStore, ThemeVariant } from '@hcengineering/theme'
import type { Application } from '@hcengineering/workbench'
import { isAllowedToRole } from '@hcengineering/workbench-resources'
import card from '@hcengineering/card'
import communication from '@hcengineering/communication'
import { isOwnerOrMaintainer, getCurrentAccount, Ref } from '@hcengineering/core'
import { configurePlatform } from './platform'
@@ -29,9 +50,7 @@ import { setupTitleBarMenu } from './titleBarMenu'
import { defineScreenShare, defineGetDisplayMedia } from './screenShare'
import { CommandLogout, CommandSelectWorkspace, CommandOpenSettings, CommandOpenInbox, CommandOpenPlanner, CommandOpenOffice, CommandOpenApplication, LaunchApplication, NotificationParams, CommandCloseTab } from './types'
import { ipcMainExposed } from './typesUtils'
import { themeStore, ThemeVariant } from '@hcengineering/theme'
import type { Application } from '@hcengineering/workbench'
import { isAllowedToRole } from '@hcengineering/workbench-resources'
import { IpcMessage } from './ipcMessages'
function currentOsIsWindows (): boolean {
return (window as any).windowsPlatform === true
@@ -66,11 +85,13 @@ window.addEventListener('DOMContentLoaded', () => {
}
})
void ipcMain.isOsUsingDarkTheme().then((isDarkTheme) => {
menuBar.setTheme(isDarkTheme ? ThemeVariant.Dark : ThemeVariant.Light)
}).catch(() => {
menuBar.setTheme(ThemeVariant.Light) // fallback
})
if (menuBar.lastUsedThemeIsUnknown()) {
void ipcMain.isOsUsingDarkTheme().then((isDarkTheme) => {
menuBar.setTheme(isDarkTheme ? ThemeVariant.Dark : ThemeVariant.Light)
}).catch(() => {
menuBar.setTheme(ThemeVariant.Light) // fallback
})
}
})
}
}
@@ -178,39 +199,44 @@ window.addEventListener('DOMContentLoaded', () => {
navigate(parseLocation(urlObject))
}
function getBasicNotificationPath (notificationParams: NotificationParams): string {
return `${workbenchId}/${notificationParams.application ?? notificationId}/${notificationId}`
function getBasicNotificationPath (worksapce: string, app: string): string {
return `${workbenchId}/${worksapce}/${app}`
}
ipcMain.handleNotificationNavigation((notificationParams: NotificationParams) => {
const currentLocation = getCurrentResolvedLocation()
const workspace = currentLocation.path[1]
// Support for new inbox with cardId (card-based)
if (notificationParams.cardId != null) {
const currentLocation = getCurrentResolvedLocation()
navigateToUrl(`${workbenchId}/${currentLocation.path[1]}/${chatId}/${notificationParams.cardId}`)
const objectUri = encodeObjectURI(notificationParams.cardId, card.class.Card)
navigateToUrl(`${workbenchId}/${workspace}/${inboxId}/${objectUri}`)
return
}
const isCommunicationEnabled = getMetadata(communication.metadata.Enabled) ?? false
const app = isCommunicationEnabled ? inboxId : notificationParams.application
// Support for old inbox with objectId + objectClass (legacy)
if (notificationParams.objectId != null && notificationParams.objectClass != null) {
const encodedObjectURI = encodeObjectURI(notificationParams.objectId, notificationParams.objectClass)
const notificationLocation = {
path: [workbenchId, notificationParams.application, notificationId, encodedObjectURI],
path: [workbenchId, workspace, app, encodedObjectURI],
fragment: undefined,
query: {}
query: undefined
}
void resolveLocation(notificationLocation).then((resolvedLocation) => {
if (resolvedLocation?.loc != null) {
navigate(resolvedLocation.loc)
} else {
navigateToUrl(`${workbenchId}/${notificationParams.application}/${notificationId}/${encodedObjectURI}`)
navigateToUrl(`${workbenchId}/${workspace}/${app}/${encodedObjectURI}`)
}
}).catch(() => {
navigateToUrl(getBasicNotificationPath(notificationParams))
navigateToUrl(getBasicNotificationPath(workspace, app))
})
} else {
// Fallback to basic notification navigation
navigateToUrl(getBasicNotificationPath(notificationParams))
navigateToUrl(getBasicNotificationPath(workspace, app))
}
})
@@ -231,7 +257,7 @@ window.addEventListener('DOMContentLoaded', () => {
void handleDownloadItem(item)
})
ipcMain.on('start-backup', () => {
ipcMain.on(IpcMessage.StartBackup, () => {
// We need to obtain current token and endpoint and trigger backup
const token = getMetadata(presentation.metadata.Token)
const endpoint = getMetadata(presentation.metadata.Endpoint)
+47
View File
@@ -0,0 +1,47 @@
//
// Copyright © 2025 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
export const IpcMessage = {
AutoLaunchSettingChanged: 'auto-launch-setting-changed',
GetAutoLaunchEnabled: 'get-auto-launch-enabled',
MinimizeToTraySettingChanged: 'minimize-to-tray-setting-changed',
GetMinimizeToTrayEnabled: 'get-minimize-to-tray-enabled',
RebuildUserJumpList: 'rebuild-user-jump-list',
StartBackup: 'start-backup',
CancelBackup: 'cancel-backup',
GetScreenSources: 'get-screen-sources',
GetScreenAccess: 'get-screen-access',
SetFrontCookie: 'set-front-cookie',
HandleDownloadItem: 'handle-download-item',
SetBadge: 'set-badge',
SetTitle: 'set-title',
DockBounce: 'dock-bounce',
SendNotification: 'send-notification',
WindowMinimize: 'window-minimize',
WindowMaximize: 'window-maximize',
WindowClose: 'window-close',
WindowStateChanged: 'window-state-changed',
WindowFocusLoss: 'window-focus-loss',
GetIsOsUsingDarkTheme: 'get-is-os-using-dark-theme',
MenuAction: 'menu-action',
GetMainConfig: 'get-main-config',
SetCombinedConfig: 'set-combined-config',
GetHost: 'get-host',
HandleDeepLink: 'handle-deep-link',
OnDeepLinkHandler: 'on-deep-link-handler',
HandleNotificationNavigation: 'handle-notification-navigation',
HandleUpdateDownloadProgress: 'handle-update-download-progress',
HandleAuth: 'handle-auth'
} as const
+17 -2
View File
@@ -1,3 +1,18 @@
//
// Copyright © 2025 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { formatName, getPersonByPersonId } from '@hcengineering/contact'
import { Ref, SortingOrder, TxOperations } from '@hcengineering/core'
import notification, {
@@ -14,7 +29,7 @@ import workbench, { workbenchId } from '@hcengineering/workbench'
import desktopPreferences, { defaultNotificationPreference } from '@hcengineering/desktop-preferences'
import { activePreferences } from '@hcengineering/desktop-preferences-resources'
import { getDisplayInboxData, InboxNotificationsClientImpl } from '@hcengineering/notification-resources'
import { chatId } from '@hcengineering/chat'
import { inboxId } from '@hcengineering/inbox'
import communication from '@hcengineering/communication'
import { ipcMainExposed } from './typesUtils'
@@ -164,7 +179,7 @@ export function configureNotifications (): void {
notificationHistory.set(notification.id, notification.created.getTime())
electronAPI.sendNotification({
silent: !preferences.playSound,
application: chatId,
application: inboxId,
title: notification.content.title,
body: `${notification.content.senderName}: ${notification.content.shortText}`,
cardId: notification.cardId,
+31 -5
View File
@@ -1,6 +1,17 @@
//
// Copyright © 2023 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import {
Plugin,
@@ -30,6 +41,7 @@ import { documentId } from '@hcengineering/document'
import { driveId } from '@hcengineering/drive'
import exportPlugin, { exportId } from '@hcengineering/export'
import gmail, { gmailId } from '@hcengineering/gmail'
import globalProfile, { globalProfileId, globalProfileRoute } from '@hcengineering/global-profile'
import guest, { guestId } from '@hcengineering/guest'
import { hrId } from '@hcengineering/hr'
import { imageCropperId } from '@hcengineering/image-cropper'
@@ -64,11 +76,13 @@ import { viewId } from '@hcengineering/view'
import workbench, { workbenchId } from '@hcengineering/workbench'
import { mailId } from '@hcengineering/mail'
import { chatId } from '@hcengineering/chat'
import { inboxId } from '@hcengineering/inbox'
import { achievementId } from '@hcengineering/achievement'
import communication, { communicationId } from '@hcengineering/communication'
import { emojiId } from '@hcengineering/emoji'
import { hulyMailId } from '@hcengineering/huly-mail'
import { aiAssistantId } from '@hcengineering/ai-assistant'
import { ratingId } from '@hcengineering/rating'
import billingPlugin, { billingId } from '@hcengineering/billing'
import '@hcengineering/activity-assets'
@@ -89,6 +103,7 @@ import '@hcengineering/drive-assets'
import '@hcengineering/export-assets'
import '@hcengineering/gmail-assets'
import '@hcengineering/guest-assets'
import '@hcengineering/global-profile-assets'
import '@hcengineering/hr-assets'
import '@hcengineering/inventory-assets'
import '@hcengineering/lead-assets'
@@ -120,6 +135,7 @@ import '@hcengineering/view-assets'
import '@hcengineering/workbench-assets'
import '@hcengineering/mail-assets'
import '@hcengineering/chat-assets'
import '@hcengineering/inbox-assets'
import '@hcengineering/achievement-assets'
import '@hcengineering/emoji-assets'
import '@hcengineering/media-assets'
@@ -127,11 +143,12 @@ import '@hcengineering/communication-assets'
import '@hcengineering/billing-assets'
import '@hcengineering/huly-mail-assets'
import '@hcengineering/ai-assistant-assets'
import '@hcengineering/rating-assets'
import analyticsCollector, { analyticsCollectorId } from '@hcengineering/analytics-collector'
import { coreId } from '@hcengineering/core'
import love, { loveId } from '@hcengineering/love'
import presentation, { parsePreviewConfig, parseUploadConfig, presentationId } from '@hcengineering/presentation'
import presentation, { createFileStorage, presentationId } from '@hcengineering/presentation'
import print, { printId } from '@hcengineering/print'
import sign from '@hcengineering/sign'
import textEditor, { textEditorId } from '@hcengineering/text-editor'
@@ -233,6 +250,7 @@ function configureI18n (): void {
addStringsLoader(questionsId, async (lang: string) => await import(`@hcengineering/questions-assets/lang/${lang}.json`))
addStringsLoader(trainingId, async (lang: string) => await import(`@hcengineering/training-assets/lang/${lang}.json`))
addStringsLoader(guestId, async (lang: string) => await import(`@hcengineering/guest-assets/lang/${lang}.json`))
addStringsLoader(globalProfileId, async (lang: string) => await import(`@hcengineering/global-profile-assets/lang/${lang}.json`))
addStringsLoader(loveId, async (lang: string) => await import(`@hcengineering/love-assets/lang/${lang}.json`))
addStringsLoader(printId, async (lang: string) => await import(`@hcengineering/print-assets/lang/${lang}.json`))
addStringsLoader(exportId, async (lang: string) => await import(`@hcengineering/export-assets/lang/${lang}.json`))
@@ -242,6 +260,7 @@ function configureI18n (): void {
addStringsLoader(cardId, async (lang: string) => await import(`@hcengineering/card-assets/lang/${lang}.json`))
addStringsLoader(mailId, async (lang: string) => await import(`@hcengineering/mail-assets/lang/${lang}.json`))
addStringsLoader(chatId, async (lang: string) => await import(`@hcengineering/chat-assets/lang/${lang}.json`))
addStringsLoader(inboxId, async (lang: string) => await import(`@hcengineering/inbox-assets/lang/${lang}.json`))
addStringsLoader(processId, async (lang: string) => await import(`@hcengineering/process-assets/lang/${lang}.json`))
addStringsLoader(achievementId, async (lang: string) => await import(`@hcengineering/achievement-assets/lang/${lang}.json`))
addStringsLoader(communicationId, async (lang: string) => await import(`@hcengineering/communication-assets/lang/${lang}.json`))
@@ -249,6 +268,7 @@ function configureI18n (): void {
addStringsLoader(billingId, async (lang: string) => await import(`@hcengineering/billing-assets/lang/${lang}.json`))
addStringsLoader(hulyMailId, async (lang: string) => await import(`@hcengineering/huly-mail-assets/lang/${lang}.json`))
addStringsLoader(aiAssistantId, async (lang: string) => await import(`@hcengineering/ai-assistant-assets/lang/${lang}.json`))
addStringsLoader(ratingId, async (lang: string) => await import(`@hcengineering/rating-assets/lang/${lang}.json`))
}
export class PlatformBranding {
@@ -288,11 +308,11 @@ export async function configurePlatform (onWorkbenchConnect?: () => Promise<void
setMetadata(login.metadata.DisableSignUp, config.DISABLE_SIGNUP === 'true')
setMetadata(login.metadata.HideLocalLogin, config.HIDE_LOCAL_LOGIN === 'true')
setMetadata(presentation.metadata.UploadURL, config.UPLOAD_URL)
setMetadata(presentation.metadata.FilesURL, config.FILES_URL)
setMetadata(presentation.metadata.UploadURL, config.FILES_URL)
setMetadata(presentation.metadata.DatalakeUrl, config.DATALAKE_URL ?? '')
setMetadata(presentation.metadata.FileStorage, createFileStorage(config.UPLOAD_URL, config.DATALAKE_URL, config.HULYLAKE_URL))
setMetadata(presentation.metadata.CollaboratorUrl, config.COLLABORATOR_URL)
setMetadata(presentation.metadata.PreviewUrl, config.PREVIEW_URL)
setMetadata(presentation.metadata.PreviewConfig, parsePreviewConfig(config.PREVIEW_CONFIG))
setMetadata(presentation.metadata.UploadConfig, parseUploadConfig(config.UPLOAD_CONFIG, config.UPLOAD_URL))
setMetadata(presentation.metadata.FrontUrl, config.FRONT_URL)
setMetadata(presentation.metadata.LinkPreviewUrl, config.LINK_PREVIEW_URL ?? '')
setMetadata(presentation.metadata.MailUrl, config.MAIL_URL)
@@ -338,6 +358,7 @@ export async function configurePlatform (onWorkbenchConnect?: () => Promise<void
setMetadata(exportPlugin.metadata.ExportUrl, config.EXPORT_URL ?? '')
setMetadata(billingPlugin.metadata.BillingURL, config.BILLING_URL ?? '')
setMetadata(presentation.metadata.PaymentUrl, config.PAYMENT_URL ?? '')
const languages = myBranding.languages !== undefined && myBranding.languages !== '' ? myBranding.languages.split(',').map((l) => l.trim()) : ['en', 'ru', 'es', 'pt', 'zh', 'fr', 'cs', 'it', 'de', 'ja', 'tr']
@@ -350,7 +371,8 @@ export async function configurePlatform (onWorkbenchConnect?: () => Promise<void
[loginId, login.component.LoginApp],
[onboardId, onboard.component.OnboardApp],
[calendarId, calendar.component.ConnectApp],
[guestId, guest.component.GuestApp]
[guestId, guest.component.GuestApp],
[globalProfileRoute, globalProfile.component.GlobalProfileApp]
])
)
@@ -409,6 +431,7 @@ export async function configurePlatform (onWorkbenchConnect?: () => Promise<void
async () => await import(/* webpackChunkName: "desktop-downloads" */ '@hcengineering/desktop-downloads-resources')
)
addLocation(guestId, () => import(/* webpackChunkName: "guest" */ '@hcengineering/guest-resources'))
addLocation(globalProfileId, () => import(/* webpackChunkName: "global-profile" */ '@hcengineering/global-profile-resources'))
addLocation(loveId, () => import(/* webpackChunkName: "love" */ '@hcengineering/love-resources'))
addLocation(printId, () => import(/* webpackChunkName: "print" */ '@hcengineering/print-resources'))
addLocation(exportId, () => import(/* webpackChunkName: "export" */ '@hcengineering/export-resources'))
@@ -417,12 +440,15 @@ export async function configurePlatform (onWorkbenchConnect?: () => Promise<void
addLocation(surveyId, () => import(/* webpackChunkName: "survey" */ '@hcengineering/survey-resources'))
addLocation(cardId, () => import(/* webpackChunkName: "card" */ '@hcengineering/card-resources'))
addLocation(chatId, () => import(/* webpackChunkName: "chat" */ '@hcengineering/chat-resources'))
addLocation(inboxId, () => import(/* webpackChunkName: "inbox" */ '@hcengineering/inbox-resources'))
addLocation(processId, () => import(/* webpackChunkName: "process" */ '@hcengineering/process-resources'))
addLocation(achievementId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/achievement-resources'))
addLocation(communicationId, () => import(/* webpackChunkName: "communication" */ '@hcengineering/communication-resources'))
addLocation(emojiId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/emoji-resources'))
addLocation(billingId, () => import(/* webpackChunkName: "billing" */ '@hcengineering/billing-resources'))
addLocation(hulyMailId, () => import(/* webpackChunkName: "huly-mail" */ '@hcengineering/huly-mail-resources'))
addLocation(aiAssistantId, () => import(/* webpackChunkName: "ai-assistant" */ '@hcengineering/ai-assistant-resources'))
addLocation(ratingId, async () => await import(/* webpackChunkName: "rating" */ '@hcengineering/rating-resources'))
setMetadata(client.metadata.FilterModel, 'ui')
setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin])
+50 -33
View File
@@ -1,11 +1,22 @@
// preload.js
//
// Copyright © 2025 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { contextBridge, ipcRenderer } from 'electron'
import { BrandingMap, Config, IPCMainExposed, JumpListSpares, MenuBarAction, NotificationParams } from './types'
import { IpcMessage } from './ipcMessages'
/**
* @public
*/
export function concatLink (host: string, path: string): string {
if (!host.endsWith('/') && !path.startsWith('/')) {
return `${host}/${path}`
@@ -46,50 +57,50 @@ let configPromise: Promise<Config> | undefined
const expose: IPCMainExposed = {
setBadge: (badge: number) => {
ipcRenderer.send('set-badge', badge)
ipcRenderer.send(IpcMessage.SetBadge, badge)
},
setTitle: (title: string) => {
ipcRenderer.send('set-title', title)
ipcRenderer.send(IpcMessage.SetTitle, title)
},
dockBounce: () => {
ipcRenderer.send('dock-bounce')
ipcRenderer.send(IpcMessage.DockBounce)
},
sendNotification: (notificationParams: NotificationParams) => {
ipcRenderer.send('send-notification', notificationParams)
ipcRenderer.send(IpcMessage.SendNotification, notificationParams)
},
minimizeWindow: () => {
ipcRenderer.invoke('window-minimize')
void ipcRenderer.invoke(IpcMessage.WindowMinimize)
},
maximizeWindow: () => {
ipcRenderer.invoke('window-maximize')
void ipcRenderer.invoke(IpcMessage.WindowMaximize)
},
closeWindow: () => {
ipcRenderer.invoke('window-close')
void ipcRenderer.invoke(IpcMessage.WindowClose)
},
onWindowStateChange: (callback) => {
ipcRenderer.on('window-state-changed', callback)
ipcRenderer.on(IpcMessage.WindowStateChanged, callback)
},
onWindowFocusLoss: (callback) => {
ipcRenderer.on('window-focus-loss', callback)
ipcRenderer.on(IpcMessage.WindowFocusLoss, callback)
},
isOsUsingDarkTheme: async () => {
return await ipcRenderer.invoke('get-is-os-using-dark-theme')
return await ipcRenderer.invoke(IpcMessage.GetIsOsUsingDarkTheme)
},
executeMenuBarAction: (action: MenuBarAction) => {
ipcRenderer.invoke('menu-action', action)
void ipcRenderer.invoke(IpcMessage.MenuAction, action)
},
config: async () => {
if (configPromise === undefined) {
configPromise = new Promise((resolve, reject) => {
ipcRenderer.invoke('get-main-config').then(
ipcRenderer.invoke(IpcMessage.GetMainConfig).then(
async (mainConfig) => {
const serverConfig = await loadServerConfig(concatLink(mainConfig.FRONT_URL, mainConfig.CONFIG_URL))
const combinedConfig = {
@@ -103,7 +114,7 @@ const expose: IPCMainExposed = {
VERSION: mainConfig.VERSION
}
ipcRenderer.send('set-combined-config', combinedConfig)
ipcRenderer.send(IpcMessage.SetCombinedConfig, combinedConfig)
resolve(combinedConfig)
},
@@ -121,7 +132,7 @@ const expose: IPCMainExposed = {
const branding: BrandingMap = await (
await fetch(cfg.BRANDING_URL ?? concatLink(cfg.FRONT_URL, 'branding.json'), { keepalive: true })
).json()
const host = await ipcRenderer.invoke('get-host')
const host = await ipcRenderer.invoke(IpcMessage.GetHost)
return branding[host] ?? {}
},
on: (event: string, op: (...args: any[]) => void) => {
@@ -132,58 +143,64 @@ const expose: IPCMainExposed = {
},
handleDeepLink: (callback) => {
ipcRenderer.on('handle-deep-link', (event, value) => {
ipcRenderer.on(IpcMessage.HandleDeepLink, (event, value) => {
try {
if (typeof value === 'string' && value !== '') {
callback(value)
}
} catch (e) {
// Just do nothing. Nothing is ok if there is something with URL
// Just do nothing. Nothing is ok if there is something with URL.
}
})
ipcRenderer.send('on-deep-link-handler')
ipcRenderer.send(IpcMessage.OnDeepLinkHandler)
},
handleNotificationNavigation: (callback) => {
ipcRenderer.on('handle-notification-navigation', (event, notificationParams) => {
ipcRenderer.on(IpcMessage.HandleNotificationNavigation, (event, notificationParams) => {
callback(notificationParams)
})
},
handleUpdateDownloadProgress: (callback) => {
ipcRenderer.on('handle-update-download-progress', (event, value) => {
ipcRenderer.on(IpcMessage.HandleUpdateDownloadProgress, (event, value) => {
callback(value)
})
},
handleAuth: (callback) => {
ipcRenderer.on('handle-auth', (event, value) => {
ipcRenderer.on(IpcMessage.HandleAuth, (event, value) => {
callback(value)
})
},
handleDownloadItem: (callback) => {
ipcRenderer.on('handle-download-item', (event, value) => {
ipcRenderer.on(IpcMessage.HandleDownloadItem, (event, value) => {
callback(value)
})
},
async setFrontCookie (host: string, name: string, value: string): Promise<void> {
ipcRenderer.send('set-front-cookie', host, name, value)
ipcRenderer.send(IpcMessage.SetFrontCookie, host, name, value)
},
getScreenAccess: () => ipcRenderer.invoke('get-screen-access'),
getScreenSources: () => ipcRenderer.invoke('get-screen-sources'),
cancelBackup: () => { ipcRenderer.send('cancel-backup') },
startBackup: (token, endpoint, wsIds) => { ipcRenderer.send('start-backup', token, endpoint, wsIds) },
getScreenAccess: () => ipcRenderer.invoke(IpcMessage.GetScreenAccess),
getScreenSources: () => ipcRenderer.invoke(IpcMessage.GetScreenSources),
cancelBackup: () => { ipcRenderer.send(IpcMessage.CancelBackup) },
startBackup: (token, endpoint, wsIds) => { ipcRenderer.send(IpcMessage.StartBackup, token, endpoint, wsIds) },
rebuildJumpList: (spares: JumpListSpares) => { ipcRenderer.send('rebuild-user-jump-list', spares) },
rebuildJumpList: (spares: JumpListSpares) => { ipcRenderer.send(IpcMessage.RebuildUserJumpList, spares) },
isMinimizeToTrayEnabled: async () => {
return await ipcRenderer.invoke('get-minimize-to-tray-enabled')
return await ipcRenderer.invoke(IpcMessage.GetMinimizeToTrayEnabled)
},
onMinimizeToTraySettingChanged: (callback: (enabled: boolean) => void) => {
ipcRenderer.on('minimize-to-tray-setting-changed', (_event, enabled: boolean) => { callback(enabled) })
ipcRenderer.on(IpcMessage.MinimizeToTraySettingChanged, (_event, enabled: boolean) => { callback(enabled) })
},
isAutoLaunchEnabled: async () => {
return await ipcRenderer.invoke(IpcMessage.GetAutoLaunchEnabled)
},
onAutoLaunchSettingChanged: (callback: (enabled: boolean) => void) => {
ipcRenderer.on(IpcMessage.AutoLaunchSettingChanged, (_event, enabled: boolean) => { callback(enabled) })
}
}
contextBridge.exposeInMainWorld('electron', expose)
+15
View File
@@ -1,3 +1,18 @@
//
// Copyright © 2025 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import log from 'electron-log'
import love from '@hcengineering/love'
import { setCustomCreateScreenTracks } from '@hcengineering/love-resources'
+48 -13
View File
@@ -16,16 +16,22 @@
import { IPCMainExposed, MenuBarAction } from './types'
import { isMenuBarAction } from './typesUtils'
import { TitleBarMenuState } from './titleBarMenuState'
import { ThemeVariant, type ThemeVariantType } from '@hcengineering/theme'
import { type ThemeVariantType } from '@hcengineering/theme'
const ToggleMinimizeToTrayAction: MenuBarAction = 'toggle-minimize-to-tray'
const ToggleAutoLaunchAction: MenuBarAction = 'toggle-auto-launch'
const LabelMinimizeToTrayEnabled = '☑ Minimize to tray'
const LabelMinimizeToTrayDisabled = '☐ Minimize to tray'
const LabelAutoLaunchEnabled = '☑ Launch at Login'
const LabelAutoLaunchDisabled = '☐ Launch at Login'
export async function setupTitleBarMenu (ipcMain: IPCMainExposed, root: HTMLElement): Promise<MenuBar> {
const themeManager = new ThemeManager(ThemeVariant.Light)
const menuManager = new MenuBarManager(root, await ipcMain.isMinimizeToTrayEnabled())
const themeManager = new ThemeManager()
const minimizeToTrayEnabled = await ipcMain.isMinimizeToTrayEnabled()
const isAutoLaunchEnabled = await ipcMain.isAutoLaunchEnabled()
const menuManager = new MenuBarManager(root, minimizeToTrayEnabled, isAutoLaunchEnabled)
const menuBar = menuManager.getView()
@@ -47,6 +53,13 @@ export async function setupTitleBarMenu (ipcMain: IPCMainExposed, root: HTMLElem
}
})
ipcMain.onAutoLaunchSettingChanged((enabled) => {
const toggle = root.querySelector(`[data-action="${ToggleAutoLaunchAction}"]`)
if (toggle != null) {
toggle.textContent = enabled ? LabelAutoLaunchEnabled : LabelAutoLaunchDisabled
}
})
ipcMain.onWindowStateChange((_event, state) => {
const maximizeButton = root.querySelector('#maximize-button')
if (maximizeButton != null) {
@@ -62,15 +75,22 @@ export async function setupTitleBarMenu (ipcMain: IPCMainExposed, root: HTMLElem
}
export class MenuBar {
private static readonly lastUsedThemeKey = 'last-used-theme'
constructor (private readonly theme: ThemeManager) {
}
public setTheme (theme: ThemeVariantType): void {
localStorage.setItem(MenuBar.lastUsedThemeKey, theme)
this.theme.setTheme(theme)
}
public lastUsedThemeIsUnknown (): boolean {
return localStorage.getItem(MenuBar.lastUsedThemeKey) == null
}
}
export function buildHulyApplicationMenu (minimizeToTrayEnabled: boolean): HTMLElement {
export function buildHulyApplicationMenu (minimizeToTrayEnabled: boolean, autoLaunchEnabled: boolean): HTMLElement {
const menuBuilder = new MenuBuilder()
const MenuFileIndex = 0
@@ -106,22 +126,25 @@ export function buildHulyApplicationMenu (minimizeToTrayEnabled: boolean): HTMLE
.addMenuItem(MenuViewIndex, 'Toggle Fullscreen', 'toggle-fullscreen', 'F11', 'l')
const MenuWindowIndex = 3
const ToggleMinimizeToTrayLabel = minimizeToTrayEnabled ? LabelMinimizeToTrayEnabled : LabelMinimizeToTrayDisabled
menuBuilder.addTopLevelMenu('Window', 'w')
const ToggleAutoLaunchLabel = autoLaunchEnabled ? LabelAutoLaunchEnabled : LabelAutoLaunchDisabled
menuBuilder.addTopLevelMenu('System', 's')
.addMenuItem(MenuWindowIndex, ToggleMinimizeToTrayLabel, 'toggle-minimize-to-tray', undefined, 'm')
.addMenuItem(MenuWindowIndex, ToggleAutoLaunchLabel, 'toggle-auto-launch', undefined, 'a')
return menuBuilder.build()
}
class ThemeManager {
private readonly domThemeKey = 'data-theme'
constructor (theme: ThemeVariantType) {
this.setTheme(theme)
}
private static readonly domThemeKey = 'data-theme'
public setTheme (theme: ThemeVariantType): void {
document.body.setAttribute(this.domThemeKey, theme)
ThemeManager.setTheme(theme)
}
public static setTheme (theme: ThemeVariantType): void {
document.body.setAttribute(ThemeManager.domThemeKey, theme)
}
}
@@ -298,7 +321,11 @@ class MenuBarManager {
private readonly StateStyleKeyboardSelected = 'desktop-app-keyboard-selected'
private readonly StateStyleAltModeActive = 'desktop-app-alt-active'
constructor (private readonly root: HTMLElement, minimizeToTrayEnabled: boolean) {
constructor (
private readonly root: HTMLElement,
minimizeToTrayEnabled: boolean,
autoLaunchEnabled: boolean
) {
this.state = new TitleBarMenuState(
() => this.topLevelMenus().length,
(topLevelMenuIndex: number) => {
@@ -307,7 +334,7 @@ class MenuBarManager {
}
)
this.view = buildHulyApplicationMenu(minimizeToTrayEnabled)
this.view = buildHulyApplicationMenu(minimizeToTrayEnabled, autoLaunchEnabled)
}
public getView (): HTMLElement {
@@ -338,6 +365,14 @@ class MenuBarManager {
ipcMain.closeWindow()
})
this.onButtonClick('back-button', () => {
history.back()
})
this.onButtonClick('forward-button', () => {
history.forward()
})
document.addEventListener('keydown', (e) => { this.handleKeyDown(ipcMain, e) })
document.addEventListener('keyup', (e) => { this.handleKeyUp(e) })
+22 -7
View File
@@ -1,3 +1,18 @@
//
// Copyright © 2025 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { DownloadItem } from '@hcengineering/desktop-downloads'
import { ScreenSource } from '@hcengineering/love'
import { Plugin } from '@hcengineering/platform'
@@ -8,9 +23,6 @@ export interface Config {
ACCOUNTS_URL: string
AI_URL?: string
ANALYTICS_COLLECTOR_URL?: string
POSTHOG_API_KEY?: string
POSTHOG_HOST?: string
SENTRY_DSN?: string
BRANDING_URL?: string
CALENDAR_URL: string
COLLABORATOR?: string
@@ -22,6 +34,8 @@ export interface Config {
DISABLE_SIGNUP?: string
HIDE_LOCAL_LOGIN?: string
FILES_URL: string
UPLOAD_URL: string
DATALAKE_URL?: string
FRONT_URL: string
GITHUB_APP: string
GITHUB_CLIENTID: string
@@ -34,7 +48,6 @@ export interface Config {
MODEL_VERSION: string
PRESENCE_URL?: string
PREVIEW_URL?: string
PREVIEW_CONFIG?: string
PRINT_URL?: string
PUSH_PUBLIC_KEY: string
REKONI_URL: string
@@ -42,8 +55,6 @@ export interface Config {
STATS_URL?: string
TELEGRAM_BOT_URL?: string
TELEGRAM_URL: string
UPLOAD_CONFIG: string
UPLOAD_URL: string
VERSION: string
STREAM_URL?: string
BACKUP_URL?: string
@@ -53,6 +64,7 @@ export interface Config {
MAIL_URL?: string
COMMUNICATION_API_ENABLED?: string
BILLING_URL?: string
PAYMENT_URL?: string
PULSE_URL?: string
PASSWORD_STRICTNESS?: 'very_strict' | 'strict' | 'normal' | 'none'
EXCLUDED_APPLICATIONS_FOR_ANONYMOUS?: string
@@ -126,7 +138,8 @@ export const MenuBarActions = [
'zoom-out',
'restore-size',
'toggle-fullscreen',
'toggle-minimize-to-tray'] as const
'toggle-minimize-to-tray',
'toggle-auto-launch'] as const
export type MenuBarAction = typeof MenuBarActions[number]
@@ -175,6 +188,8 @@ export interface IPCMainExposed {
isMinimizeToTrayEnabled: () => Promise<boolean>
onMinimizeToTraySettingChanged: (callback: (enabled: boolean) => void) => void
isAutoLaunchEnabled: () => Promise<boolean>
onAutoLaunchSettingChanged: (callback: (enabled: boolean) => void) => void
}
export type SendCommandDelegate = (cmd: Command, ...args: any[]) => void
+20 -14
View File
@@ -2,6 +2,9 @@
// Copyright © 2023 Hardcore Engineering Inc.
//
// Load sass-quiet FIRST to install stderr filter
const sass = require('../common/scripts/sass-quiet.js')
const Dotenv = require('dotenv-webpack')
const path = require('path')
const CompressionPlugin = require('compression-webpack-plugin')
@@ -16,7 +19,7 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
console.log('mode', mode)
const { EsbuildPlugin } = require('esbuild-loader')
const doValidate = !prod || (process.env.DO_VALIDATE === 'true')
const doValidate = !prod || process.env.DO_VALIDATE === 'true'
/**
* @type {Configuration}
@@ -144,6 +147,7 @@ module.exports = [
fs: false
},
extensions: ['.mjs', '.js', '.svelte', '.ts'],
mainFields: ['svelte', 'browser', 'module', 'main'],
conditionNames: ['svelte', 'browser', 'import']
},
output: {
@@ -156,10 +160,7 @@ module.exports = [
},
optimization: prod
? {
minimize: true,
minimizer: [
new EsbuildPlugin({ target: 'es2021' })
]
minimize: true
}
: {
minimize: false,
@@ -191,7 +192,10 @@ module.exports = [
hotReload: !prod,
preprocess: require('svelte-preprocess')({
postcss: true,
sourceMap: true
sourceMap: true,
scss: {
implementation: sass
}
}),
hotOptions: {
// Prevent preserving local component state
@@ -224,8 +228,8 @@ module.exports = [
},
{
// required to prevent errors from Svelte on Webpack 5+, omit on Webpack 4
test: /node_modules\/svelte\/.*\.mjs$/,
// Fix for packages with "type": "module" that use extensionless imports
test: /\.m?js$/,
resolve: {
fullySpecified: false
}
@@ -248,7 +252,13 @@ module.exports = [
'style-loader',
'css-loader',
'postcss-loader',
'sass-loader'
{
loader: "sass-loader",
options: {
api: "modern",
implementation: sass
}
}
]
},
@@ -338,11 +348,7 @@ module.exports = [
new DefinePlugin({
'process.env.CLIENT_TYPE': JSON.stringify(process.env.CLIENT_TYPE)
}),
...(doValidate
? [
new ForkTsCheckerWebpackPlugin()
]
: [])
...(doValidate ? [new ForkTsCheckerWebpackPlugin()] : [])
],
watchOptions: {
// for some systems, watching many files can result in a lot of CPU or memory usage
+7 -2
View File
@@ -9,11 +9,16 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# Set executable path for puppeteer
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Currently the latest version available for both amd64 and arm64 on Debian 12
# Corresponds to puppeteer v24.17.1
# see https://pptr.dev/supported-browsers
ARG CHROMIUM_VERSION="139.0.7258.154-1~deb12u1"
# Install Chromium and fonts
# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md?plain=1#L397
RUN apt-get update --fix-missing
RUN apt-get install -y gnupg wget libxss1
RUN apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf
RUN apt-get install -y chromium-common --no-install-recommends
RUN apt-get install -y chromium --no-install-recommends
RUN apt-get install -y chromium-common=${CHROMIUM_VERSION} --no-install-recommends
RUN apt-get install -y chromium=${CHROMIUM_VERSION} --no-install-recommends
RUN apt-get clean
+18 -18
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/qms-doc-import-tool",
"version": "0.1.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -22,8 +22,8 @@
},
"devDependencies": {
"cross-env": "~7.0.3",
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
@@ -32,10 +32,10 @@
"esbuild": "^0.25.9",
"@types/minio": "~7.0.11",
"@types/node": "^22.15.29",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"@types/jest": "^29.5.5",
@@ -43,18 +43,18 @@
"@types/domhandler": "^2.4.5"
},
"dependencies": {
"@hcengineering/controlled-documents": "^0.1.0",
"@hcengineering/account": "^0.6.0",
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/core": "^0.6.32",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/server-core": "^0.6.1",
"@hcengineering/server-storage": "^0.6.0",
"@hcengineering/server-token": "^0.6.11",
"@hcengineering/server-tool": "^0.6.0",
"@hcengineering/server-client": "^0.6.0",
"@hcengineering/collaborator-client": "^0.6.4",
"@hcengineering/controlled-documents": "workspace:^0.7.0",
"@hcengineering/account": "workspace:^0.7.0",
"@hcengineering/attachment": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/server-core": "^0.7.16",
"@hcengineering/server-storage": "^0.7.15",
"@hcengineering/server-token": "^0.7.17",
"@hcengineering/server-tool": "workspace:^0.7.0",
"@hcengineering/server-client": "^0.7.15",
"@hcengineering/collaborator-client": "^0.7.17",
"commander": "^8.1.0",
"domhandler": "^5.0.3",
"domutils": "^3.1.0",
+2
View File
@@ -92,6 +92,7 @@ async function createDocument (
requests: 0,
reviewers: [],
approvers: [],
externalApprovers: [],
coAuthors: [],
changeControl: ccRecordId,
author: owner,
@@ -175,6 +176,7 @@ async function createTemplateIfNotExist (
requests: 0,
reviewers: [],
approvers: [],
externalApprovers: [],
coAuthors: [],
changeControl: ccRecordId,
content: null,
+17
View File
@@ -123,6 +123,22 @@ services:
- PORT=4900
- SERVER_SECRET=secret
restart: unless-stopped
payment:
image: hardcoreeng/payment
extra_hosts:
- 'huly.local:host-gateway'
ports:
- 3040:3040
environment:
- SECRET=secret
- PORT=3040
- ACCOUNTS_URL=http://huly.local:3000
- FRONT_URL=http://huly.local:8087
- USE_SANDBOX=true
- POLAR_ACCESS_TOKEN=${POLAR_ACCESS_TOKEN}
- POLAR_WEBHOOK_SECRET=${POLAR_WEBHOOK_SECRET}
- POLAR_SUBSCRIPTION_PLANS=${POLAR_SUBSCRIPTION_PLANS}
restart: unless-stopped
workspace_cockroach:
image: hardcoreeng/workspace
extra_hosts:
@@ -203,6 +219,7 @@ services:
- DESKTOP_UPDATES_CHANNELS=dev;tracex:dev-tracex
- BRANDING_URL=http://huly.local:8087/branding.json
- STREAM_URL=http://huly.local:1080/recording
- PAYMENT_URL=http://huly.local:3040
# - DISABLE_SIGNUP=true
restart: unless-stopped
transactor_cockroach:
+80 -18
View File
@@ -199,6 +199,23 @@ services:
- SERVER_SECRET=secret
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
restart: unless-stopped
payment:
image: hardcoreeng/payment
extra_hosts:
- 'huly.local:host-gateway'
ports:
- 3040:3040
environment:
- SECRET=secret
- PORT=3040
- ACCOUNTS_URL=http://huly.local:3000
- FRONT_URL=http://huly.local:8087
- USE_SANDBOX=true
- POLAR_ACCESS_TOKEN=${POLAR_ACCESS_TOKEN}
- POLAR_WEBHOOK_SECRET=${POLAR_WEBHOOK_SECRET}
- POLAR_SUBSCRIPTION_PLANS=${POLAR_SUBSCRIPTION_PLANS}
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
restart: unless-stopped
workspace_cockroach:
image: hardcoreeng/workspace
extra_hosts:
@@ -262,9 +279,8 @@ services:
- ACCOUNTS_URL=http://huly.local:3000
- STATS_URL=http://huly.local:4900
- FILES_URL=http://huly.local:4030/blob/:workspace/:blobId/:filename
- UPLOAD_URL=http://huly.local:4030/upload/form-data/:workspace
- UPLOAD_URL=/files
- PREVIEW_URL=http://huly.local:4040
- PREVIEW_CONFIG=image|http://huly.local:4030/image/fit=cover,width=:width,height=:height,dpr=:dpr/:workspace/:blobId;video|http://huly.local:4030/meta/:workspace/:blobId
- GMAIL_URL=http://huly.local:8093
- CALENDAR_URL=http://huly.local:8095
- TELEGRAM_URL=http://huly.local:8086
@@ -280,12 +296,14 @@ services:
- DESKTOP_UPDATES_CHANNELS=dev;tracex:dev-tracex
- BRANDING_URL=http://huly.local:8087/branding.json
- STREAM_URL=http://huly.local:1080/recording
- PAYMENT_URL=http://huly.local:3040
- COMMUNICATION_API_ENABLED=true
- BACKUP_URL=http://huly.local:4039/api/backup,
- EXCLUDED_APPLICATIONS_FOR_ANONYMOUS=["chunter", "notification"]
# - DISABLE_SIGNUP=true
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
- PULSE_URL=ws://huly.local:8099/ws
- DATALAKE_URL=http://huly.local:4030
- HULYLAKE_URL=http://huly.local:8096
restart: unless-stopped
transactor_cockroach:
@@ -426,22 +444,23 @@ services:
# - STATS_URL=http://huly.local:4900
# # - LOVE_ENDPOINT=http://huly.local:8096
# # - OPENAI_API_KEY=token
# analytics:
# image: hardcoreeng/analytics-collector
# extra_hosts:
# - 'huly.local:host-gateway'
# restart: unless-stopped
# ports:
# - 4017:4017
# environment:
# - SECRET=secret
# - PORT=4017
# - SERVICE_ID=analytics-collector-service
# - ACCOUNTS_URL=http://huly.local:3000
# - STATS_URL=http://huly.local:4900
# - POSTHOG_HOST=${POSTHOG_HOST}
# - POSTHOG_API_KEY=${POSTHOG_API_KEY}
# - MAX_PAYLOAD_SIZE=10mb
analytics:
image: hardcoreeng/analytics-collector
extra_hosts:
- 'huly.local:host-gateway'
restart: unless-stopped
ports:
- 4017:4017
environment:
- SECRET=secret
- PORT=4017
- SERVICE_ID=analytics-collector-service
- ACCOUNTS_URL=http://huly.local:3000
- STATS_URL=http://huly.local:4900
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
# - POSTHOG_HOST=${POSTHOG_HOST}
# - POSTHOG_API_KEY=${POSTHOG_API_KEY}
# - MAX_PAYLOAD_SIZE=10mb
export:
image: hardcoreeng/export
extra_hosts:
@@ -561,6 +580,23 @@ services:
- QUEUE_CONFIG=${QUEUE_CONFIG}
- QUEUE_REGION=cockroach
restart: unless-stopped
# translate:
# image: hardcoreeng/translate
# extra_hosts:
# - 'huly.local:host-gateway'
# depends_on:
# redpanda:
# condition: service_started
# account:
# condition: service_started
# environment:
# - SECRET=secret
# - ACCOUNTS_URL=http://huly.local:3000
# - HULYLAKE_URL=http://huly.local:8096
# - QUEUE_CONFIG=${QUEUE_CONFIG}
# - QUEUE_REGION=cockroach
# - OPENAI_API_KEY=
# restart: unless-stopped
backup-cockroach:
image: hardcoreeng/backup
extra_hosts:
@@ -611,6 +647,32 @@ services:
- STORAGE=minio|minio?accessKey=minioadmin&secretKey=minioadmin
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
restart: unless-stopped
rating_cockroach:
image: hardcoreeng/rating
extra_hosts:
- 'huly.local:host-gateway'
links:
- cockroach
- minio
- account
- stats
depends_on:
redpanda:
condition: service_started
environment:
- QUEUE_CONFIG=${QUEUE_CONFIG}
- REGION=cockroach
- SERVER_SECRET=secret
- STATS_URL=http://huly.local:4900
- DB_URL=${DB_CR_URL}
- STORAGE_CONFIG=${STORAGE_CONFIG}
- ACCOUNTS_URL=http://huly.local:3000
- COMMUNICATION_TIME_LOGGING_ENABLED=true
- COMMUNICATION_API_ENABLED=true
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
- HYLYLAKE_URL=http://huly.local:8096
restart: unless-stopped
jaeger:
image: jaegertracing/all-in-one:latest
extra_hosts:
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/import-tool",
"version": "0.1.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -32,14 +32,14 @@
},
"devDependencies": {
"cross-env": "~7.0.3",
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint": "^8.54.0",
"ts-node": "^10.8.0",
"esbuild": "^0.25.9",
"@types/node": "^22.15.29",
"@typescript-eslint/parser": "^6.11.0",
"typescript": "^5.8.3",
"@typescript-eslint/parser": "^6.21.0",
"typescript": "^5.9.3",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"@types/jest": "^29.5.5",
@@ -47,14 +47,14 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^3.1.0",
"prettier": "^3.6.2",
"@types/js-yaml": "^4.0.9"
},
"dependencies": {
"@hcengineering/core": "^0.6.32",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/server-client": "^0.6.0",
"@hcengineering/importer": "^0.6.1",
"@hcengineering/core": "^0.7.21",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/server-client": "^0.7.15",
"@hcengineering/importer": "workspace:^0.7.0",
"commander": "^8.1.0",
"js-yaml": "^4.1.0",
"mammoth": "^1.9.0"
@@ -1,5 +1,5 @@
module.exports = {
extends: ['./node_modules/@hcengineering/platform-rig/profiles/node/eslint.config.json'],
extends: ['./node_modules/@hcengineering/platform-rig/profiles/ui/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
+244 -236
View File
@@ -5,7 +5,7 @@
"license": "EPL-2.0",
"scripts": {
"_phase:package": "rushx package",
"_phase:validate": "compile validate",
"_phase:validate": "rm -rf ./types && compile validate",
"package": "rm -rf ./dist && cross-env NODE_ENV=production webpack --stats-error-details && echo 'done'",
"analyze": "rm -rf ./dist && cross-env NODE_ENV=production webpack --profile --json > stats.json",
"show": "webpack-bundle-analyzer stats.json dist",
@@ -20,10 +20,10 @@
"dev-bold": "cross-env CLIENT_TYPE=dev-bold webpack serve",
"start": "cross-env NODE_ENV=production webpack serve",
"deploy": "cp -p public/* dist && aws s3 sync dist s3://anticrm-platform --delete --acl public-read",
"format": "format src"
"format": "echo 'no format yet'"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@hcengineering/platform-rig": "^0.7.19",
"@types/node": "^22.15.29",
"autoprefixer": "^10.4.14",
"browserslist": "^4.25.0",
@@ -40,13 +40,14 @@
"postcss": "^8.4.20",
"postcss-load-config": "^4.0.1",
"postcss-loader": "^7.0.2",
"sass-loader": "^13.2.0",
"sass": "^1.80.0",
"sass-loader": "^14.0.0",
"style-loader": "^3.3.1",
"svelte-loader": "^3.2.0",
"svelte-preprocess": "^5.1.3",
"svelte-preprocess": "^5.1.4",
"svgo-loader": "^3.0.0",
"ts-loader": "^9.2.5",
"typescript": "^5.8.3",
"typescript": "^5.9.3",
"update-browserslist-db": "^1.1.3",
"webpack": "^5.97.1",
"webpack-bundle-analyzer": "^4.10.2",
@@ -54,236 +55,243 @@
"webpack-dev-server": "^4.11.1"
},
"dependencies": {
"@hcengineering/achievement": "^0.6.0",
"@hcengineering/achievement-assets": "^0.6.0",
"@hcengineering/achievement-resources": "^0.6.0",
"@hcengineering/activity": "^0.6.0",
"@hcengineering/activity-assets": "^0.6.3",
"@hcengineering/activity-resources": "^0.6.1",
"@hcengineering/ai-bot": "^0.6.0",
"@hcengineering/ai-bot-resources": "^0.6.0",
"@hcengineering/analytics": "^0.6.0",
"@hcengineering/analytics-providers": "^0.6.0",
"@hcengineering/analytics-collector": "^0.6.0",
"@hcengineering/analytics-collector-assets": "^0.6.0",
"@hcengineering/analytics-collector-resources": "^0.6.0",
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/attachment-assets": "^0.6.11",
"@hcengineering/attachment-resources": "^0.6.0",
"@hcengineering/bitrix": "^0.6.52",
"@hcengineering/bitrix-assets": "^0.6.0",
"@hcengineering/bitrix-resources": "^0.6.0",
"@hcengineering/board": "^0.6.19",
"@hcengineering/board-assets": "^0.6.19",
"@hcengineering/board-resources": "^0.6.0",
"@hcengineering/calendar": "^0.6.24",
"@hcengineering/calendar-assets": "^0.6.22",
"@hcengineering/calendar-resources": "^0.6.0",
"@hcengineering/card": "^0.6.0",
"@hcengineering/card-assets": "^0.6.0",
"@hcengineering/card-resources": "^0.6.0",
"@hcengineering/chat": "^0.6.0",
"@hcengineering/chat-assets": "^0.6.0",
"@hcengineering/chat-resources": "^0.6.0",
"@hcengineering/chunter": "^0.6.20",
"@hcengineering/chunter-assets": "^0.6.18",
"@hcengineering/chunter-resources": "^0.6.0",
"@hcengineering/client": "^0.6.18",
"@hcengineering/client-resources": "^0.6.27",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/contact-assets": "^0.6.13",
"@hcengineering/contact-resources": "^0.6.0",
"@hcengineering/controlled-documents": "^0.1.0",
"@hcengineering/controlled-documents-assets": "^0.1.0",
"@hcengineering/controlled-documents-resources": "^0.1.0",
"@hcengineering/core": "^0.6.32",
"@hcengineering/desktop-preferences": "^0.6.0",
"@hcengineering/desktop-preferences-assets": "^0.6.0",
"@hcengineering/desktop-preferences-resources": "^0.6.0",
"@hcengineering/devmodel": "^0.6.0",
"@hcengineering/devmodel-resources": "^0.6.0",
"@hcengineering/diffview": "^0.6.0",
"@hcengineering/diffview-assets": "^0.6.0",
"@hcengineering/diffview-resources": "^0.6.0",
"@hcengineering/document": "^0.6.0",
"@hcengineering/document-assets": "^0.6.0",
"@hcengineering/document-resources": "^0.6.0",
"@hcengineering/drive": "^0.6.0",
"@hcengineering/drive-assets": "^0.6.0",
"@hcengineering/drive-resources": "^0.6.0",
"@hcengineering/export": "^0.6.0",
"@hcengineering/export-assets": "^0.6.0",
"@hcengineering/export-resources": "^0.6.0",
"@hcengineering/github": "^0.6.0",
"@hcengineering/github-assets": "^0.6.0",
"@hcengineering/github-resources": "^0.6.0",
"@hcengineering/gmail": "^0.6.22",
"@hcengineering/gmail-assets": "^0.6.0",
"@hcengineering/gmail-resources": "^0.6.0",
"@hcengineering/guest": "^0.6.4",
"@hcengineering/guest-assets": "^0.6.0",
"@hcengineering/guest-resources": "^0.6.0",
"@hcengineering/hr": "^0.6.19",
"@hcengineering/hr-assets": "^0.6.19",
"@hcengineering/hr-resources": "^0.6.0",
"@hcengineering/image-cropper": "^0.6.0",
"@hcengineering/image-cropper-resources": "^0.6.0",
"@hcengineering/inventory": "^0.6.11",
"@hcengineering/inventory-assets": "^0.6.11",
"@hcengineering/inventory-resources": "^0.6.0",
"@hcengineering/lead": "^0.6.0",
"@hcengineering/lead-assets": "^0.6.0",
"@hcengineering/lead-resources": "^0.6.0",
"@hcengineering/login": "^0.6.12",
"@hcengineering/login-assets": "^0.6.0",
"@hcengineering/login-resources": "^0.6.2",
"@hcengineering/love": "^0.6.0",
"@hcengineering/love-assets": "^0.6.0",
"@hcengineering/love-resources": "^0.6.0",
"@hcengineering/mail": "^0.6.0",
"@hcengineering/mail-assets": "^0.6.0",
"@hcengineering/notification": "^0.6.23",
"@hcengineering/notification-assets": "^0.6.17",
"@hcengineering/notification-resources": "^0.6.0",
"@hcengineering/onboard": "^0.6.0",
"@hcengineering/onboard-assets": "^0.6.0",
"@hcengineering/onboard-resources": "^0.6.0",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/preference": "^0.6.13",
"@hcengineering/preference-assets": "^0.6.0",
"@hcengineering/presence": "^0.6.0",
"@hcengineering/presence-resources": "^0.6.0",
"@hcengineering/presentation": "^0.6.3",
"@hcengineering/print": "^0.6.0",
"@hcengineering/print-assets": "^0.6.0",
"@hcengineering/print-resources": "^0.6.0",
"@hcengineering/products": "^0.1.0",
"@hcengineering/products-assets": "^0.1.0",
"@hcengineering/products-resources": "^0.1.0",
"@hcengineering/questions": "^0.1.0",
"@hcengineering/questions-assets": "^0.1.0",
"@hcengineering/questions-resources": "^0.1.0",
"@hcengineering/recorder": "^0.6.0",
"@hcengineering/recorder-assets": "^0.6.0",
"@hcengineering/recorder-resources": "^0.6.0",
"@hcengineering/recruit": "^0.6.29",
"@hcengineering/recruit-assets": "^0.6.23",
"@hcengineering/recruit-resources": "^0.6.0",
"@hcengineering/rekoni": "^0.6.0",
"@hcengineering/request": "^0.6.14",
"@hcengineering/request-assets": "^0.6.0",
"@hcengineering/request-resources": "^0.6.0",
"@hcengineering/server-activity": "^0.6.0",
"@hcengineering/server-activity-resources": "^0.6.0",
"@hcengineering/server-attachment": "^0.6.1",
"@hcengineering/server-attachment-resources": "^0.6.0",
"@hcengineering/server-calendar": "^0.6.0",
"@hcengineering/server-calendar-resources": "^0.6.0",
"@hcengineering/server-chunter": "^0.6.0",
"@hcengineering/server-chunter-resources": "^0.6.0",
"@hcengineering/server-collaboration": "^0.6.0",
"@hcengineering/server-collaboration-resources": "^0.6.0",
"@hcengineering/server-contact": "^0.6.1",
"@hcengineering/server-contact-resources": "^0.6.0",
"@hcengineering/server-gmail": "^0.6.0",
"@hcengineering/server-gmail-resources": "^0.6.0",
"@hcengineering/server-hr": "^0.6.0",
"@hcengineering/server-hr-resources": "^0.6.0",
"@hcengineering/server-inventory": "^0.6.1",
"@hcengineering/server-inventory-resources": "^0.6.0",
"@hcengineering/server-lead": "^0.6.0",
"@hcengineering/server-lead-resources": "^0.6.0",
"@hcengineering/server-notification": "^0.6.1",
"@hcengineering/server-notification-resources": "^0.6.0",
"@hcengineering/server-recruit": "^0.6.0",
"@hcengineering/server-recruit-resources": "^0.6.0",
"@hcengineering/server-request": "^0.6.0",
"@hcengineering/server-request-resources": "^0.6.0",
"@hcengineering/server-setting": "^0.6.0",
"@hcengineering/server-setting-resources": "^0.6.0",
"@hcengineering/server-tags": "^0.6.0",
"@hcengineering/server-tags-resources": "^0.6.0",
"@hcengineering/server-task": "^0.6.0",
"@hcengineering/server-task-resources": "^0.6.0",
"@hcengineering/server-telegram": "^0.6.0",
"@hcengineering/server-telegram-resources": "^0.6.0",
"@hcengineering/server-tracker": "^0.6.0",
"@hcengineering/server-tracker-resources": "^0.6.0",
"@hcengineering/server-training": "^0.1.0",
"@hcengineering/server-training-resources": "^0.1.0",
"@hcengineering/server-view": "^0.6.0",
"@hcengineering/server-view-resources": "^0.6.0",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/setting-assets": "^0.6.15",
"@hcengineering/setting-resources": "^0.6.0",
"@hcengineering/sign": "^0.6.0",
"@hcengineering/support": "^0.6.5",
"@hcengineering/support-assets": "^0.6.5",
"@hcengineering/support-resources": "^0.6.0",
"@hcengineering/survey": "^0.6.0",
"@hcengineering/survey-assets": "^0.6.0",
"@hcengineering/survey-resources": "^0.6.0",
"@hcengineering/tags": "^0.6.16",
"@hcengineering/tags-assets": "^0.6.0",
"@hcengineering/tags-resources": "^0.6.0",
"@hcengineering/task": "^0.6.20",
"@hcengineering/task-assets": "^0.6.19",
"@hcengineering/task-resources": "^0.6.0",
"@hcengineering/telegram": "^0.6.21",
"@hcengineering/telegram-assets": "^0.6.0",
"@hcengineering/telegram-resources": "^0.6.0",
"@hcengineering/templates": "^0.6.11",
"@hcengineering/templates-assets": "^0.6.11",
"@hcengineering/templates-resources": "^0.6.0",
"@hcengineering/test-management": "^0.6.0",
"@hcengineering/test-management-assets": "^0.6.0",
"@hcengineering/test-management-resources": "^0.6.0",
"@hcengineering/text-editor": "^0.6.0",
"@hcengineering/text-editor-assets": "^0.6.0",
"@hcengineering/text-editor-resources": "^0.6.0",
"@hcengineering/theme": "^0.6.5",
"@hcengineering/time": "^0.6.0",
"@hcengineering/time-assets": "^0.6.0",
"@hcengineering/time-resources": "^0.6.0",
"@hcengineering/tracker": "^0.6.24",
"@hcengineering/tracker-assets": "^0.6.0",
"@hcengineering/tracker-resources": "^0.6.0",
"@hcengineering/training": "^0.1.0",
"@hcengineering/training-assets": "^0.1.0",
"@hcengineering/training-resources": "^0.1.0",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/media": "^0.6.0",
"@hcengineering/media-assets": "^0.6.0",
"@hcengineering/media-resources": "^0.6.0",
"@hcengineering/uploader": "^0.6.0",
"@hcengineering/uploader-assets": "^0.6.0",
"@hcengineering/uploader-resources": "^0.6.0",
"@hcengineering/view": "^0.6.13",
"@hcengineering/view-assets": "^0.6.11",
"@hcengineering/view-resources": "^0.6.0",
"@hcengineering/workbench": "^0.6.16",
"@hcengineering/workbench-assets": "^0.6.14",
"@hcengineering/workbench-resources": "^0.6.1",
"@hcengineering/process": "^0.6.0",
"@hcengineering/process-assets": "^0.6.0",
"@hcengineering/process-resources": "^0.6.0",
"@hcengineering/communication": "^0.6.0",
"@hcengineering/communication-assets": "^0.6.0",
"@hcengineering/communication-resources": "^0.6.0",
"@hcengineering/emoji": "^0.6.0",
"@hcengineering/emoji-assets": "^0.6.0",
"@hcengineering/emoji-resources": "^0.6.0",
"@hcengineering/billing": "^0.6.0",
"@hcengineering/billing-assets": "^0.6.0",
"@hcengineering/billing-resources": "^0.6.0",
"@hcengineering/huly-mail": "^0.6.0",
"@hcengineering/huly-mail-assets": "^0.6.0",
"@hcengineering/huly-mail-resources": "^0.6.0",
"@hcengineering/ai-assistant": "^0.6.0",
"@hcengineering/ai-assistant-assets": "^0.6.0",
"@hcengineering/ai-assistant-resources": "^0.6.0",
"@sentry/svelte": "^9.22.0",
"posthog-js": "^1.246.0",
"@hcengineering/achievement": "workspace:^0.7.0",
"@hcengineering/achievement-assets": "workspace:^0.7.0",
"@hcengineering/achievement-resources": "workspace:^0.7.0",
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/activity-assets": "workspace:^0.7.0",
"@hcengineering/activity-resources": "workspace:^0.7.0",
"@hcengineering/ai-bot": "workspace:^0.7.0",
"@hcengineering/ai-bot-resources": "workspace:^0.7.0",
"@hcengineering/analytics": "^0.7.17",
"@hcengineering/analytics-providers": "workspace:^0.7.0",
"@hcengineering/analytics-collector": "workspace:^0.7.0",
"@hcengineering/analytics-collector-assets": "workspace:^0.7.0",
"@hcengineering/analytics-collector-resources": "workspace:^0.7.0",
"@hcengineering/attachment": "workspace:^0.7.0",
"@hcengineering/attachment-assets": "workspace:^0.7.0",
"@hcengineering/attachment-resources": "workspace:^0.7.0",
"@hcengineering/bitrix": "workspace:^0.7.0",
"@hcengineering/bitrix-assets": "workspace:^0.7.0",
"@hcengineering/bitrix-resources": "workspace:^0.7.0",
"@hcengineering/board": "workspace:^0.7.0",
"@hcengineering/board-assets": "workspace:^0.7.0",
"@hcengineering/board-resources": "workspace:^0.7.0",
"@hcengineering/calendar": "workspace:^0.7.0",
"@hcengineering/calendar-assets": "workspace:^0.7.0",
"@hcengineering/calendar-resources": "workspace:^0.7.0",
"@hcengineering/card": "workspace:^0.7.0",
"@hcengineering/card-assets": "workspace:^0.7.0",
"@hcengineering/card-resources": "workspace:^0.7.0",
"@hcengineering/chat": "workspace:^0.7.0",
"@hcengineering/chat-assets": "workspace:^0.7.0",
"@hcengineering/chat-resources": "workspace:^0.7.0",
"@hcengineering/chunter": "workspace:^0.7.0",
"@hcengineering/chunter-assets": "workspace:^0.7.0",
"@hcengineering/chunter-resources": "workspace:^0.7.0",
"@hcengineering/client": "^0.7.17",
"@hcengineering/client-resources": "^0.7.17",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/contact-assets": "workspace:^0.7.0",
"@hcengineering/contact-resources": "workspace:^0.7.0",
"@hcengineering/controlled-documents": "workspace:^0.7.0",
"@hcengineering/controlled-documents-assets": "workspace:^0.7.0",
"@hcengineering/controlled-documents-resources": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/desktop-preferences": "workspace:^0.7.0",
"@hcengineering/desktop-preferences-assets": "workspace:^0.7.0",
"@hcengineering/desktop-preferences-resources": "workspace:^0.7.0",
"@hcengineering/devmodel": "workspace:^0.7.0",
"@hcengineering/devmodel-resources": "workspace:^0.7.0",
"@hcengineering/diffview": "workspace:^0.7.0",
"@hcengineering/diffview-assets": "workspace:^0.7.0",
"@hcengineering/diffview-resources": "workspace:^0.7.0",
"@hcengineering/document": "workspace:^0.7.0",
"@hcengineering/document-assets": "workspace:^0.7.0",
"@hcengineering/document-resources": "workspace:^0.7.0",
"@hcengineering/drive": "workspace:^0.7.0",
"@hcengineering/drive-assets": "workspace:^0.7.0",
"@hcengineering/drive-resources": "workspace:^0.7.0",
"@hcengineering/export": "workspace:^0.7.0",
"@hcengineering/export-assets": "workspace:^0.7.0",
"@hcengineering/export-resources": "workspace:^0.7.0",
"@hcengineering/github": "workspace:^0.7.0",
"@hcengineering/github-assets": "workspace:^0.7.0",
"@hcengineering/github-resources": "workspace:^0.7.0",
"@hcengineering/gmail": "workspace:^0.7.0",
"@hcengineering/gmail-assets": "workspace:^0.7.0",
"@hcengineering/gmail-resources": "workspace:^0.7.0",
"@hcengineering/guest": "workspace:^0.7.0",
"@hcengineering/guest-assets": "workspace:^0.7.0",
"@hcengineering/guest-resources": "workspace:^0.7.0",
"@hcengineering/global-profile": "workspace:^0.7.0",
"@hcengineering/global-profile-assets": "workspace:^0.7.0",
"@hcengineering/global-profile-resources": "workspace:^0.7.0",
"@hcengineering/hr": "workspace:^0.7.0",
"@hcengineering/hr-assets": "workspace:^0.7.0",
"@hcengineering/hr-resources": "workspace:^0.7.0",
"@hcengineering/image-cropper": "workspace:^0.7.0",
"@hcengineering/image-cropper-resources": "workspace:^0.7.0",
"@hcengineering/inventory": "workspace:^0.7.0",
"@hcengineering/inventory-assets": "workspace:^0.7.0",
"@hcengineering/inventory-resources": "workspace:^0.7.0",
"@hcengineering/lead": "workspace:^0.7.0",
"@hcengineering/lead-assets": "workspace:^0.7.0",
"@hcengineering/lead-resources": "workspace:^0.7.0",
"@hcengineering/login": "workspace:^0.7.0",
"@hcengineering/login-assets": "workspace:^0.7.0",
"@hcengineering/login-resources": "workspace:^0.7.0",
"@hcengineering/love": "workspace:^0.7.0",
"@hcengineering/love-assets": "workspace:^0.7.0",
"@hcengineering/love-resources": "workspace:^0.7.0",
"@hcengineering/mail": "workspace:^0.7.0",
"@hcengineering/mail-assets": "workspace:^0.7.0",
"@hcengineering/notification": "workspace:^0.7.0",
"@hcengineering/notification-assets": "workspace:^0.7.0",
"@hcengineering/notification-resources": "workspace:^0.7.0",
"@hcengineering/onboard": "workspace:^0.7.0",
"@hcengineering/onboard-assets": "workspace:^0.7.0",
"@hcengineering/onboard-resources": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/preference": "workspace:^0.7.0",
"@hcengineering/preference-assets": "workspace:^0.7.0",
"@hcengineering/presence": "workspace:^0.7.0",
"@hcengineering/presence-resources": "workspace:^0.7.0",
"@hcengineering/presentation": "workspace:^0.7.0",
"@hcengineering/print": "workspace:^0.7.0",
"@hcengineering/print-assets": "workspace:^0.7.0",
"@hcengineering/print-resources": "workspace:^0.7.0",
"@hcengineering/products": "workspace:^0.7.0",
"@hcengineering/products-assets": "workspace:^0.7.0",
"@hcengineering/products-resources": "workspace:^0.7.0",
"@hcengineering/questions": "workspace:^0.7.0",
"@hcengineering/questions-assets": "workspace:^0.7.0",
"@hcengineering/questions-resources": "workspace:^0.7.0",
"@hcengineering/recorder": "workspace:^0.7.0",
"@hcengineering/recorder-assets": "workspace:^0.7.0",
"@hcengineering/recorder-resources": "workspace:^0.7.0",
"@hcengineering/recruit": "workspace:^0.7.0",
"@hcengineering/recruit-assets": "workspace:^0.7.0",
"@hcengineering/recruit-resources": "workspace:^0.7.0",
"@hcengineering/rekoni": "workspace:^0.7.0",
"@hcengineering/request": "workspace:^0.7.0",
"@hcengineering/request-assets": "workspace:^0.7.0",
"@hcengineering/request-resources": "workspace:^0.7.0",
"@hcengineering/server-activity": "workspace:^0.7.0",
"@hcengineering/server-activity-resources": "workspace:^0.7.0",
"@hcengineering/server-attachment": "workspace:^0.7.0",
"@hcengineering/server-attachment-resources": "workspace:^0.7.0",
"@hcengineering/server-calendar": "workspace:^0.7.0",
"@hcengineering/server-calendar-resources": "workspace:^0.7.0",
"@hcengineering/server-chunter": "workspace:^0.7.0",
"@hcengineering/server-chunter-resources": "workspace:^0.7.0",
"@hcengineering/server-collaboration": "workspace:^0.7.0",
"@hcengineering/server-collaboration-resources": "workspace:^0.7.0",
"@hcengineering/server-contact": "workspace:^0.7.0",
"@hcengineering/server-contact-resources": "workspace:^0.7.0",
"@hcengineering/server-gmail": "workspace:^0.7.0",
"@hcengineering/server-gmail-resources": "workspace:^0.7.0",
"@hcengineering/server-hr": "workspace:^0.7.0",
"@hcengineering/server-hr-resources": "workspace:^0.7.0",
"@hcengineering/server-inventory": "workspace:^0.7.0",
"@hcengineering/server-inventory-resources": "workspace:^0.7.0",
"@hcengineering/server-lead": "workspace:^0.7.0",
"@hcengineering/server-lead-resources": "workspace:^0.7.0",
"@hcengineering/server-notification": "workspace:^0.7.0",
"@hcengineering/server-notification-resources": "workspace:^0.7.0",
"@hcengineering/server-recruit": "workspace:^0.7.0",
"@hcengineering/server-recruit-resources": "workspace:^0.7.0",
"@hcengineering/server-request": "workspace:^0.7.0",
"@hcengineering/server-request-resources": "workspace:^0.7.0",
"@hcengineering/server-setting": "workspace:^0.7.0",
"@hcengineering/server-setting-resources": "workspace:^0.7.0",
"@hcengineering/server-tags": "workspace:^0.7.0",
"@hcengineering/server-tags-resources": "workspace:^0.7.0",
"@hcengineering/server-task": "workspace:^0.7.0",
"@hcengineering/server-task-resources": "workspace:^0.7.0",
"@hcengineering/server-telegram": "workspace:^0.7.0",
"@hcengineering/server-telegram-resources": "workspace:^0.7.0",
"@hcengineering/server-tracker": "workspace:^0.7.0",
"@hcengineering/server-tracker-resources": "workspace:^0.7.0",
"@hcengineering/server-training": "workspace:^0.7.0",
"@hcengineering/server-training-resources": "workspace:^0.7.0",
"@hcengineering/server-view": "workspace:^0.7.0",
"@hcengineering/server-view-resources": "workspace:^0.7.0",
"@hcengineering/setting": "workspace:^0.7.0",
"@hcengineering/setting-assets": "workspace:^0.7.0",
"@hcengineering/setting-resources": "workspace:^0.7.0",
"@hcengineering/sign": "workspace:^0.7.0",
"@hcengineering/support": "workspace:^0.7.0",
"@hcengineering/support-assets": "workspace:^0.7.0",
"@hcengineering/support-resources": "workspace:^0.7.0",
"@hcengineering/survey": "workspace:^0.7.0",
"@hcengineering/survey-assets": "workspace:^0.7.0",
"@hcengineering/survey-resources": "workspace:^0.7.0",
"@hcengineering/tags": "workspace:^0.7.0",
"@hcengineering/tags-assets": "workspace:^0.7.0",
"@hcengineering/tags-resources": "workspace:^0.7.0",
"@hcengineering/task": "workspace:^0.7.0",
"@hcengineering/task-assets": "workspace:^0.7.0",
"@hcengineering/task-resources": "workspace:^0.7.0",
"@hcengineering/telegram": "workspace:^0.7.0",
"@hcengineering/telegram-assets": "workspace:^0.7.0",
"@hcengineering/telegram-resources": "workspace:^0.7.0",
"@hcengineering/templates": "workspace:^0.7.0",
"@hcengineering/templates-assets": "workspace:^0.7.0",
"@hcengineering/templates-resources": "workspace:^0.7.0",
"@hcengineering/test-management": "workspace:^0.7.0",
"@hcengineering/test-management-assets": "workspace:^0.7.0",
"@hcengineering/test-management-resources": "workspace:^0.7.0",
"@hcengineering/text-editor": "workspace:^0.7.0",
"@hcengineering/text-editor-assets": "workspace:^0.7.0",
"@hcengineering/text-editor-resources": "workspace:^0.7.0",
"@hcengineering/theme": "workspace:^0.7.0",
"@hcengineering/time": "workspace:^0.7.0",
"@hcengineering/time-assets": "workspace:^0.7.0",
"@hcengineering/time-resources": "workspace:^0.7.0",
"@hcengineering/tracker": "workspace:^0.7.0",
"@hcengineering/tracker-assets": "workspace:^0.7.0",
"@hcengineering/tracker-resources": "workspace:^0.7.0",
"@hcengineering/training": "workspace:^0.7.0",
"@hcengineering/training-assets": "workspace:^0.7.0",
"@hcengineering/training-resources": "workspace:^0.7.0",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/media": "workspace:^0.7.0",
"@hcengineering/media-assets": "workspace:^0.7.0",
"@hcengineering/media-resources": "workspace:^0.7.0",
"@hcengineering/uploader": "workspace:^0.7.0",
"@hcengineering/uploader-assets": "workspace:^0.7.0",
"@hcengineering/uploader-resources": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/view-assets": "workspace:^0.7.0",
"@hcengineering/view-resources": "workspace:^0.7.0",
"@hcengineering/workbench": "workspace:^0.7.0",
"@hcengineering/workbench-assets": "workspace:^0.7.0",
"@hcengineering/workbench-resources": "workspace:^0.7.0",
"@hcengineering/process": "workspace:^0.7.0",
"@hcengineering/process-assets": "workspace:^0.7.0",
"@hcengineering/process-resources": "workspace:^0.7.0",
"@hcengineering/communication": "workspace:^0.7.0",
"@hcengineering/communication-assets": "workspace:^0.7.0",
"@hcengineering/communication-resources": "workspace:^0.7.0",
"@hcengineering/emoji": "workspace:^0.7.0",
"@hcengineering/emoji-assets": "workspace:^0.7.0",
"@hcengineering/emoji-resources": "workspace:^0.7.0",
"@hcengineering/billing": "workspace:^0.7.0",
"@hcengineering/billing-assets": "workspace:^0.7.0",
"@hcengineering/billing-resources": "workspace:^0.7.0",
"@hcengineering/huly-mail": "workspace:^0.7.0",
"@hcengineering/huly-mail-assets": "workspace:^0.7.0",
"@hcengineering/huly-mail-resources": "workspace:^0.7.0",
"@hcengineering/ai-assistant": "workspace:^0.7.0",
"@hcengineering/ai-assistant-assets": "workspace:^0.7.0",
"@hcengineering/ai-assistant-resources": "workspace:^0.7.0",
"@hcengineering/inbox": "workspace:^0.7.0",
"@hcengineering/inbox-assets": "workspace:^0.7.0",
"@hcengineering/inbox-resources": "workspace:^0.7.0",
"@hcengineering/rating": "workspace:^0.7.0",
"@hcengineering/rating-assets": "workspace:^0.7.0",
"@hcengineering/rating-resources": "workspace:^0.7.0",
"readable-stream": "^4.7.0",
"svelte": "^4.2.20"
}
+2
View File
@@ -12,6 +12,8 @@
"PUBLIC_SCHEDULE_URL": "https://schedule.hc.engineering",
"CALDAV_SERVER_URL": "https://caldav.hc.engineering",
"BACKUP_URL": "https://front.hc.engineering/api/backup",
"DATALAKE_URL": "https://datalake.hc.engineering",
"HULYLAKE_URL": "https://lake.hc.engineering",
"PULSE_URL": "wss://pulse.hc.engineering/ws",
"COMMUNICATION_API_ENABLED": "true",
"FILES_URL": "https://datalake.hc.engineering/blob/:workspace/:blobId/:filename"
-1
View File
@@ -8,7 +8,6 @@
"CALENDAR_URL": "https://calendar.huly.app/",
"COLLABORATOR_URL": "wss://collaborator.huly.app",
"BRANDING_URL": "https://huly.app/huly-branding_v2.json",
"PREVIEW_CONFIG": "https://huly.app/files/:workspace?file=:blobId&size=:size",
"GITHUB_APP": "huly-for-github",
"GITHUB_CLIENTID": "Iv1.e263a087de0910e0",
"INTERCOM_APP_ID": "",
-5
View File
@@ -6,7 +6,6 @@
"CALENDAR_URL": "https://calendar.hc.engineering/",
"COLLABORATOR_URL": "wss://collaborator.hc.engineering",
"DESKTOP_UPDATES_CHANNEL": "front",
"FILES_URL": "https://dl.hc.engineering/blob/:workspace/:blobId/:filename",
"GITHUB_APP": "huly-github-staging",
"GITHUB_CLIENTID": "Iv1.cd9d3f7987474b5e",
"GITHUB_URL": "https://github.hc.engineering",
@@ -15,16 +14,12 @@
"INTERCOM_APP_ID": "",
"LOVE_ENDPOINT": "https://love.hc.engineering/",
"MODEL_VERSION": "",
"PREVIEW_CONFIG": "image|https://dl.hc.engineering/image/fit=scale-down,width=:width,height=:height,dpr=:dpr/:workspace/:blobId;video|https://dl.hc.engineering/video/:workspace/:blobId/meta",
"PRINT_URL": "https://print.hc.engineering",
"REKONI_URL": "https://rekoni.hc.engineering",
"SIGN_URL": "https://sign.hc.engineering",
"STATS_URL": "https://stats.hc.engineering",
"TELEGRAM_BOT_URL": "https://telegram-bot.hc.engineering",
"TELEGRAM_URL": "https://telegram.hc.engineering",
"UPLOAD_CONFIG": "",
"UPLOAD_URL": "https://dl.hc.engineering/upload/form-data/:workspace",
"TRANSACTOR_OVERRIDE": "ws://localhost:3335"
}
+6 -4
View File
@@ -1,10 +1,10 @@
{
"ACCOUNTS_URL": "/account",
"COLLABORATOR_URL": "ws://huly.local:3078",
"FILES_URL": "http://huly.local:4030/blob/:workspace/:blobId/:filename",
"UPLOAD_URL": "http://huly.local:4030/upload/form-data/:workspace",
"PREVIEW_URL": "http://huly.local:4040",
"PREVIEW_CONFIG": "image|http://huly.local:4030/image/fit=cover,width=:width,height=:height,dpr=:dpr/:workspace/:blobId;video|http://huly.local:4030/meta/:workspace/:blobId",
"FILES_URL": "http://huly.local:4030/blob/:workspace/:blobId/:filename",
"UPLOAD_URL": "/files",
"DATALAKE_URL": "http://huly.local:4030",
"TELEGRAM_URL": "http://huly.local:8086",
"GMAIL_URL": "http://huly.local:8093",
"CALENDAR_URL": "http://localhost:8095",
@@ -22,6 +22,7 @@
"STATS_URL": "http://huly.local:4900",
"PASSWORD_STRICTNESS": "none",
"STREAM_URL": "http://huly.local:1080/recording",
"PAYMENT_URL": "http://huly.local:3040",
"PUBLIC_SCHEDULE_URL": "http://huly.local:8060",
"CALDAV_SERVER_URL": "http://huly.local:9070",
"EXPORT_URL": "http://huly.local:4009",
@@ -29,5 +30,6 @@
"BACKUP_URL": "http://huly.local:4039/api/backup",
"PULSE_URL": "ws://huly.local:8099/ws",
"HULYLAKE_URL": "http://huly.local:8096",
"EXCLUDED_APPLICATIONS_FOR_ANONYMOUS": "[\"chunter\", \"notification\"]"
"EXCLUDED_APPLICATIONS_FOR_ANONYMOUS": "[\"chunter\", \"notification\"]",
"ANALYTICS_COLLECTOR_URL": "http://huly.local:4017"
}
+3 -3
View File
@@ -2,9 +2,9 @@
// Copyright © 2024 Hardcore Engineering Inc
//
import { configureAnalyticsProviders } from "@hcengineering/analytics-providers"
import { type Config } from "./platform"
import { configureAnalyticsProviders } from '@hcengineering/analytics-providers'
import { type Config } from './platform'
export function configureAnalytics (config: Config) {
configureAnalyticsProviders(config)
}
}
+13 -11
View File
@@ -2,14 +2,17 @@ const FLAG_OPEN_IN_DESKTOP = 'flagOpenInDesktopApp'
const TIMESTAMP_OPEN_IN_DESKTOP = 'timeOpenInDesktopApp'
const TIMEOUT_OPEN_IN_DESKTOP = 24 * 60 * 60 * 1000
export function tryOpenInDesktopApp(protocol: string) {
export function tryOpenInDesktopApp (protocol: string) {
if (!window.location.origin) {
return
}
// Once for a new TAB
if (window.sessionStorage && (window.sessionStorage.getItem(FLAG_OPEN_IN_DESKTOP) === 'true'
|| window.localStorage.getItem(FLAG_OPEN_IN_DESKTOP) === 'true')) {
if (
window.sessionStorage &&
(window.sessionStorage.getItem(FLAG_OPEN_IN_DESKTOP) === 'true' ||
window.localStorage.getItem(FLAG_OPEN_IN_DESKTOP) === 'true')
) {
return
}
window.sessionStorage.setItem(FLAG_OPEN_IN_DESKTOP, 'true')
@@ -19,7 +22,7 @@ export function tryOpenInDesktopApp(protocol: string) {
const timeStr = window.localStorage.getItem(TIMESTAMP_OPEN_IN_DESKTOP)
const time = Number(timeStr)
const now = Date.now()
if ((now - time) < TIMEOUT_OPEN_IN_DESKTOP) {
if (now - time < TIMEOUT_OPEN_IN_DESKTOP) {
return
}
}
@@ -28,16 +31,15 @@ export function tryOpenInDesktopApp(protocol: string) {
// Filter only URLs inside a workbench
const link = window.location.toString()
if (link.indexOf('/workbench/') === -1) {
if (!link.includes('/workbench/')) {
return
}
const deepLink = link.replace('http://', protocol)
.replace('https://', protocol)
const deepLink = link.replace('http://', protocol).replace('https://', protocol)
const iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = deepLink;
const iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = deepLink
document.body.appendChild(iframe);
document.body.appendChild(iframe)
}
+5 -6
View File
@@ -19,16 +19,15 @@ import { configurePlatform } from './platform'
import { configurePlatformDevServer } from './platform-dev'
configurePlatform().then(() => {
if (process.env.CLIENT_TYPE === 'dev-server' ||
process.env.CLIENT_TYPE === 'dev-production' ||
process.env.CLIENT_TYPE === 'dev-huly' ||
if (
process.env.CLIENT_TYPE === 'dev-server' ||
process.env.CLIENT_TYPE === 'dev-production' ||
process.env.CLIENT_TYPE === 'dev-huly' ||
process.env.CLIENT_TYPE === 'dev-bold' ||
process.env.CLIENT_TYPE === 'dev-server-test'
) {
configurePlatformDevServer()
}
createApp(document.body)
})
+6 -3
View File
@@ -19,12 +19,15 @@ import login from '@hcengineering/login'
import { addLocation, setMetadata } from '@hcengineering/platform'
import presentation from '@hcengineering/presentation'
export function configurePlatformDevServer() {
export function configurePlatformDevServer () {
// Set devmodel to hook client to be able to present all activity
enableDevModel()
}
function enableDevModel() {
function enableDevModel () {
setMetadata(presentation.metadata.ClientHook, new PresentationClientHook())
addLocation(devModelId, () => import(/* webpackChunkName: "devmodel" */ '@hcengineering/devmodel-resources'))
addLocation(
devModelId,
async () => await import(/* webpackChunkName: "devmodel" */ '@hcengineering/devmodel-resources')
)
}
+194 -97
View File
@@ -32,6 +32,7 @@ import { documentId } from '@hcengineering/document'
import { driveId } from '@hcengineering/drive'
import exportPlugin, { exportId } from '@hcengineering/export'
import gmail, { gmailId } from '@hcengineering/gmail'
import globalProfile, { globalProfileId, globalProfileRoute } from '@hcengineering/global-profile'
import guest, { guestId } from '@hcengineering/guest'
import { hrId } from '@hcengineering/hr'
import { imageCropperId } from '@hcengineering/image-cropper'
@@ -72,12 +73,14 @@ import { mailId } from '@hcengineering/mail'
import { chatId } from '@hcengineering/chat'
import github, { githubId } from '@hcengineering/github'
import { bitrixId } from '@hcengineering/bitrix'
import {inboxId} from '@hcengineering/inbox'
import {achievementId} from '@hcengineering/achievement'
import communication, { communicationId } from '@hcengineering/communication'
import {emojiId} from '@hcengineering/emoji'
import billingPlugin, {billingId} from '@hcengineering/billing'
import { emojiId } from '@hcengineering/emoji'
import billingPlugin, { billingId } from '@hcengineering/billing'
import { hulyMailId } from '@hcengineering/huly-mail'
import { aiAssistantId } from '@hcengineering/ai-assistant'
import { ratingId } from '@hcengineering/rating'
import '@hcengineering/activity-assets'
import '@hcengineering/analytics-collector-assets'
@@ -96,6 +99,7 @@ import '@hcengineering/drive-assets'
import '@hcengineering/export-assets'
import '@hcengineering/gmail-assets'
import '@hcengineering/guest-assets'
import '@hcengineering/global-profile-assets'
import '@hcengineering/hr-assets'
import '@hcengineering/inventory-assets'
import '@hcengineering/lead-assets'
@@ -127,6 +131,7 @@ import '@hcengineering/media-assets'
import '@hcengineering/view-assets'
import '@hcengineering/workbench-assets'
import '@hcengineering/chat-assets'
import '@hcengineering/inbox-assets'
import '@hcengineering/mail-assets'
import '@hcengineering/github-assets'
import '@hcengineering/achievement-assets'
@@ -135,12 +140,12 @@ import '@hcengineering/emoji-assets'
import '@hcengineering/billing-assets'
import '@hcengineering/huly-mail-assets'
import '@hcengineering/ai-assistant-assets'
import '@hcengineering/rating-assets'
import { coreId } from '@hcengineering/core'
import presentation, {
loadServerConfig,
parsePreviewConfig,
parseUploadConfig,
createFileStorage,
presentationId
} from '@hcengineering/presentation'
@@ -155,6 +160,7 @@ export interface Config {
ACCOUNTS_URL: string
UPLOAD_URL: string
FILES_URL: string
DATALAKE_URL?: string
MODEL_VERSION: string
VERSION: string
COLLABORATOR_URL: string
@@ -168,13 +174,10 @@ export interface Config {
GITHUB_APP?: string
GITHUB_CLIENTID?: string
GITHUB_URL: string
SENTRY_DSN?: string
LOVE_ENDPOINT?: string
LIVEKIT_WS?: string
SIGN_URL?: string
PRINT_URL?: string
POSTHOG_API_KEY?: string
POSTHOG_HOST?: string
ANALYTICS_COLLECTOR_URL?: string
BRANDING_URL?: string
TELEGRAM_BOT_URL?: string
@@ -186,8 +189,6 @@ export interface Config {
// Could be defined for dev environment
FRONT_URL?: string
PREVIEW_URL?: string
PREVIEW_CONFIG?: string
UPLOAD_CONFIG?: string
STATS_URL?: string
PRESENCE_URL?: string
USE_BINARY_PROTOCOL?: boolean
@@ -197,22 +198,23 @@ export interface Config {
PUBLIC_SCHEDULE_URL?: string
CALDAV_SERVER_URL?: string
EXPORT_URL?: string
MAIL_URL?: string,
MAIL_URL?: string
COMMUNICATION_API_ENABLED?: string
BILLING_URL?: string,
EXCLUDED_APPLICATIONS_FOR_ANONYMOUS?: string,
PULSE_URL?: string,
BILLING_URL?: string
PAYMENT_URL?: string
EXCLUDED_APPLICATIONS_FOR_ANONYMOUS?: string
PULSE_URL?: string
HULYLAKE_URL?: string
}
export interface Branding {
title?: string
links?: {
links?: Array<{
rel: string
href: string
type?: string
sizes?: string
}[]
}>
languages?: string
lastNameFirst?: string
defaultLanguage?: string
@@ -266,20 +268,28 @@ const PASSWORD_REQUIREMENTS: Record<NonNullable<Config['PASSWORD_STRICTNESS']>,
}
}
function configureI18n(): void {
//Add localization
addStringsLoader(platformId, async (lang: string) => await import(
/* webpackInclude: /\.json$/ */
/* webpackMode: "lazy" */
/* webpackChunkName: "lang-[request]" */
`@hcengineering/platform/lang/${lang}.json`
))
addStringsLoader(coreId, async (lang: string) => await import(
/* webpackInclude: /\.json$/ */
/* webpackMode: "lazy" */
/* webpackChunkName: "lang-[request]" */
`@hcengineering/core/lang/${lang}.json`
))
function configureI18n (): void {
// Add localization
addStringsLoader(
platformId,
async (lang: string) =>
await import(
/* webpackInclude: /\.json$/ */
/* webpackMode: "lazy" */
/* webpackChunkName: "lang-[request]" */
`@hcengineering/platform/lang/${lang}.json`
)
)
addStringsLoader(
coreId,
async (lang: string) =>
await import(
/* webpackInclude: /\.json$/ */
/* webpackMode: "lazy" */
/* webpackChunkName: "lang-[request]" */
`@hcengineering/core/lang/${lang}.json`
)
)
addStringsLoader(
presentationId,
async (lang: string) => await import(`@hcengineering/presentation/lang/${lang}.json`)
@@ -357,6 +367,7 @@ function configureI18n(): void {
)
addStringsLoader(trainingId, async (lang: string) => await import(`@hcengineering/training-assets/lang/${lang}.json`))
addStringsLoader(guestId, async (lang: string) => await import(`@hcengineering/guest-assets/lang/${lang}.json`))
addStringsLoader(globalProfileId, async (lang: string) => await import(`@hcengineering/global-profile-assets/lang/${lang}.json`))
addStringsLoader(loveId, async (lang: string) => await import(`@hcengineering/love-assets/lang/${lang}.json`))
addStringsLoader(printId, async (lang: string) => await import(`@hcengineering/print-assets/lang/${lang}.json`))
addStringsLoader(exportId, async (lang: string) => await import(`@hcengineering/export-assets/lang/${lang}.json`))
@@ -373,23 +384,38 @@ function configureI18n(): void {
addStringsLoader(mailId, async (lang: string) => await import(`@hcengineering/mail-assets/lang/${lang}.json`))
addStringsLoader(chatId, async (lang: string) => await import(`@hcengineering/chat-assets/lang/${lang}.json`))
addStringsLoader(processId, async (lang: string) => await import(`@hcengineering/process-assets/lang/${lang}.json`))
addStringsLoader(achievementId, async (lang: string) => await import(`@hcengineering/achievement-assets/lang/${lang}.json`))
addStringsLoader(communicationId, async (lang: string) => await import(`@hcengineering/communication-assets/lang/${lang}.json`))
addStringsLoader(
achievementId,
async (lang: string) => await import(`@hcengineering/achievement-assets/lang/${lang}.json`)
)
addStringsLoader(
communicationId,
async (lang: string) => await import(`@hcengineering/communication-assets/lang/${lang}.json`)
)
addStringsLoader(inboxId, async (lang: string) => await import(`@hcengineering/inbox-assets/lang/${lang}.json`))
addStringsLoader(emojiId, async (lang: string) => await import(`@hcengineering/emoji-assets/lang/${lang}.json`))
addStringsLoader(billingId, async (lang: string) => await import(`@hcengineering/billing-assets/lang/${lang}.json`))
addStringsLoader(hulyMailId, async (lang: string) => await import(`@hcengineering/huly-mail-assets/lang/${lang}.json`))
addStringsLoader(aiAssistantId, async (lang: string) => await import(`@hcengineering/ai-assistant-assets/lang/${lang}.json`))
addStringsLoader(
hulyMailId,
async (lang: string) => await import(`@hcengineering/huly-mail-assets/lang/${lang}.json`)
)
addStringsLoader(
aiAssistantId,
async (lang: string) => await import(`@hcengineering/ai-assistant-assets/lang/${lang}.json`)
)
addStringsLoader(ratingId, async (lang: string) => await import(`@hcengineering/rating-assets/lang/${lang}.json`))
}
export async function configurePlatform() {
export async function configurePlatform () {
setMetadata(platform.metadata.LoadHelper, async (loader) => {
for (let i = 0; i < 5; i++) {
try {
return loader()
return await loader()
} catch (err: any) {
if (err.message.includes('Loading chunk') && i != 4) {
continue
}
console.log('reload due to loading error')
location.reload()
}
}
@@ -441,14 +467,13 @@ export async function configurePlatform() {
setMetadata(login.metadata.PasswordValidations, PASSWORD_REQUIREMENTS[config.PASSWORD_STRICTNESS ?? 'none'])
setMetadata(presentation.metadata.FilesURL, config.FILES_URL)
setMetadata(presentation.metadata.UploadURL, config.UPLOAD_URL)
setMetadata(presentation.metadata.DatalakeUrl, config.DATALAKE_URL)
setMetadata(presentation.metadata.FileStorage, createFileStorage(config.UPLOAD_URL, config.DATALAKE_URL, config.HULYLAKE_URL))
setMetadata(presentation.metadata.CollaboratorUrl, config.COLLABORATOR_URL)
setMetadata(presentation.metadata.FrontUrl, config.FRONT_URL)
setMetadata(presentation.metadata.PreviewUrl, config.PREVIEW_URL)
setMetadata(presentation.metadata.PreviewConfig, parsePreviewConfig(config.PREVIEW_CONFIG))
setMetadata(presentation.metadata.UploadConfig, parseUploadConfig(config.UPLOAD_CONFIG ?? '', config.UPLOAD_URL))
setMetadata(presentation.metadata.StatsUrl, config.STATS_URL)
setMetadata(presentation.metadata.LinkPreviewUrl, config.LINK_PREVIEW_URL)
setMetadata(presentation.metadata.MailUrl, config.MAIL_URL)
@@ -490,12 +515,13 @@ export async function configurePlatform() {
setMetadata(exportPlugin.metadata.ExportUrl, config.EXPORT_URL ?? '')
setMetadata(billingPlugin.metadata.BillingURL, config.BILLING_URL ?? '')
setMetadata(presentation.metadata.PaymentUrl, config.PAYMENT_URL ?? '')
setMetadata(presentation.metadata.PulseUrl, config.PULSE_URL)
setMetadata(presentation.metadata.HulylakeUrl, config.HULYLAKE_URL ?? '')
const languages = myBranding.languages
? (myBranding.languages as string).split(',').map((l) => l.trim())
? myBranding.languages.split(',').map((l) => l.trim())
: ['en', 'ru', 'es', 'pt', 'zh', 'fr', 'cs', 'it', 'de', 'ja', 'tr']
setMetadata(uiPlugin.metadata.Languages, languages)
@@ -508,90 +534,161 @@ export async function configurePlatform() {
[onboardId, onboard.component.OnboardApp],
[githubId, github.component.ConnectApp],
[calendarId, calendar.component.ConnectApp],
[guestId, guest.component.GuestApp]
[guestId, guest.component.GuestApp],
[globalProfileRoute, globalProfile.component.GlobalProfileApp]
])
)
addLocation(coreId, async () => ({ default: async () => ({}) }))
addLocation(presentationId, async () => ({ default: async () => ({}) }))
addLocation(clientId, () => import(/* webpackChunkName: "client" */ '@hcengineering/client-resources'))
addLocation(loginId, () => import(/* webpackChunkName: "login" */ '@hcengineering/login-resources'))
addLocation(onboardId, () => import(/* webpackChunkName: "onboard" */ '@hcengineering/onboard-resources'))
addLocation(workbenchId, () => import(/* webpackChunkName: "workbench" */ '@hcengineering/workbench-resources'))
addLocation(viewId, () => import(/* webpackChunkName: "view" */ '@hcengineering/view-resources'))
addLocation(taskId, () => import(/* webpackChunkName: "task" */ '@hcengineering/task-resources'))
addLocation(contactId, () => import(/* webpackChunkName: "contact" */ '@hcengineering/contact-resources'))
addLocation(chunterId, () => import(/* webpackChunkName: "chunter" */ '@hcengineering/chunter-resources'))
addLocation(recruitId, () => import(/* webpackChunkName: "recruit" */ '@hcengineering/recruit-resources'))
addLocation(activityId, () => import(/*webpackChunkName: "activity" */ '@hcengineering/activity-resources'))
addLocation(settingId, () => import(/* webpackChunkName: "setting" */ '@hcengineering/setting-resources'))
addLocation(leadId, () => import(/* webpackChunkName: "lead" */ '@hcengineering/lead-resources'))
addLocation(telegramId, () => import(/* webpackChunkName: "telegram" */ '@hcengineering/telegram-resources'))
addLocation(attachmentId, () => import(/* webpackChunkName: "attachment" */ '@hcengineering/attachment-resources'))
addLocation(gmailId, () => import(/* webpackChunkName: "gmail" */ '@hcengineering/gmail-resources'))
addLocation(clientId, async () => await import(/* webpackChunkName: "client" */ '@hcengineering/client-resources'))
addLocation(loginId, async () => await import(/* webpackChunkName: "login" */ '@hcengineering/login-resources'))
addLocation(onboardId, async () => await import(/* webpackChunkName: "onboard" */ '@hcengineering/onboard-resources'))
addLocation(
workbenchId,
async () => await import(/* webpackChunkName: "workbench" */ '@hcengineering/workbench-resources')
)
addLocation(viewId, async () => await import(/* webpackChunkName: "view" */ '@hcengineering/view-resources'))
addLocation(taskId, async () => await import(/* webpackChunkName: "task" */ '@hcengineering/task-resources'))
addLocation(contactId, async () => await import(/* webpackChunkName: "contact" */ '@hcengineering/contact-resources'))
addLocation(chunterId, async () => await import(/* webpackChunkName: "chunter" */ '@hcengineering/chunter-resources'))
addLocation(recruitId, async () => await import(/* webpackChunkName: "recruit" */ '@hcengineering/recruit-resources'))
addLocation(
activityId,
async () => await import(/* webpackChunkName: "activity" */ '@hcengineering/activity-resources')
)
addLocation(settingId, async () => await import(/* webpackChunkName: "setting" */ '@hcengineering/setting-resources'))
addLocation(leadId, async () => await import(/* webpackChunkName: "lead" */ '@hcengineering/lead-resources'))
addLocation(
telegramId,
async () => await import(/* webpackChunkName: "telegram" */ '@hcengineering/telegram-resources')
)
addLocation(
attachmentId,
async () => await import(/* webpackChunkName: "attachment" */ '@hcengineering/attachment-resources')
)
addLocation(gmailId, async () => await import(/* webpackChunkName: "gmail" */ '@hcengineering/gmail-resources'))
addLocation(
imageCropperId,
() => import(/* webpackChunkName: "image-cropper" */ '@hcengineering/image-cropper-resources')
async () => await import(/* webpackChunkName: "image-cropper" */ '@hcengineering/image-cropper-resources')
)
addLocation(
inventoryId,
async () => await import(/* webpackChunkName: "inventory" */ '@hcengineering/inventory-resources')
)
addLocation(
templatesId,
async () => await import(/* webpackChunkName: "templates" */ '@hcengineering/templates-resources')
)
addLocation(inventoryId, () => import(/* webpackChunkName: "inventory" */ '@hcengineering/inventory-resources'))
addLocation(templatesId, () => import(/* webpackChunkName: "templates" */ '@hcengineering/templates-resources'))
addLocation(
notificationId,
() => import(/* webpackChunkName: "notification" */ '@hcengineering/notification-resources')
async () => await import(/* webpackChunkName: "notification" */ '@hcengineering/notification-resources')
)
addLocation(tagsId, () => import(/* webpackChunkName: "tags" */ '@hcengineering/tags-resources'))
addLocation(calendarId, () => import(/* webpackChunkName: "calendar" */ '@hcengineering/calendar-resources'))
addLocation(diffviewId, () => import(/* webpackChunkName: "diffview" */ '@hcengineering/diffview-resources'))
addLocation(timeId, () => import(/* webpackChunkName: "time" */ '@hcengineering/time-resources'))
addLocation(tagsId, async () => await import(/* webpackChunkName: "tags" */ '@hcengineering/tags-resources'))
addLocation(
calendarId,
async () => await import(/* webpackChunkName: "calendar" */ '@hcengineering/calendar-resources')
)
addLocation(
diffviewId,
async () => await import(/* webpackChunkName: "diffview" */ '@hcengineering/diffview-resources')
)
addLocation(timeId, async () => await import(/* webpackChunkName: "time" */ '@hcengineering/time-resources'))
addLocation(
desktopPreferencesId,
() => import(/* webpackChunkName: "desktop-preferences" */ '@hcengineering/desktop-preferences-resources')
async () =>
await import(/* webpackChunkName: "desktop-preferences" */ '@hcengineering/desktop-preferences-resources')
)
addLocation(analyticsCollectorId, async () => await import('@hcengineering/analytics-collector-resources'))
addLocation(aiBotId, async () => await import('@hcengineering/ai-bot-resources'))
addLocation(trackerId, () => import(/* webpackChunkName: "tracker" */ '@hcengineering/tracker-resources'))
addLocation(boardId, () => import(/* webpackChunkName: "board" */ '@hcengineering/board-resources'))
addLocation(hrId, () => import(/* webpackChunkName: "hr" */ '@hcengineering/hr-resources'))
addLocation(bitrixId, () => import(/* webpackChunkName: "bitrix" */ '@hcengineering/bitrix-resources'))
addLocation(requestId, () => import(/* webpackChunkName: "request" */ '@hcengineering/request-resources'))
addLocation(driveId, () => import(/* webpackChunkName: "drive" */ '@hcengineering/drive-resources'))
addLocation(supportId, () => import(/* webpackChunkName: "support" */ '@hcengineering/support-resources'))
addLocation(trackerId, async () => await import(/* webpackChunkName: "tracker" */ '@hcengineering/tracker-resources'))
addLocation(boardId, async () => await import(/* webpackChunkName: "board" */ '@hcengineering/board-resources'))
addLocation(hrId, async () => await import(/* webpackChunkName: "hr" */ '@hcengineering/hr-resources'))
addLocation(bitrixId, async () => await import(/* webpackChunkName: "bitrix" */ '@hcengineering/bitrix-resources'))
addLocation(requestId, async () => await import(/* webpackChunkName: "request" */ '@hcengineering/request-resources'))
addLocation(driveId, async () => await import(/* webpackChunkName: "drive" */ '@hcengineering/drive-resources'))
addLocation(supportId, async () => await import(/* webpackChunkName: "support" */ '@hcengineering/support-resources'))
addLocation(documentId, () => import(/* webpackChunkName: "document" */ '@hcengineering/document-resources'))
addLocation(githubId, () => import(/* webpackChunkName: "github" */ '@hcengineering/github-resources'))
addLocation(questionsId, () => import(/* webpackChunkName: "training" */ '@hcengineering/questions-resources'))
addLocation(trainingId, () => import(/* webpackChunkName: "training" */ '@hcengineering/training-resources'))
addLocation(productsId, () => import(/* webpackChunkName: "products" */ '@hcengineering/products-resources'))
addLocation(
documentId,
async () => await import(/* webpackChunkName: "document" */ '@hcengineering/document-resources')
)
addLocation(githubId, async () => await import(/* webpackChunkName: "github" */ '@hcengineering/github-resources'))
addLocation(
questionsId,
async () => await import(/* webpackChunkName: "training" */ '@hcengineering/questions-resources')
)
addLocation(
trainingId,
async () => await import(/* webpackChunkName: "training" */ '@hcengineering/training-resources')
)
addLocation(
productsId,
async () => await import(/* webpackChunkName: "products" */ '@hcengineering/products-resources')
)
addLocation(
documentsId,
() => import(/* webpackChunkName: "documents" */ '@hcengineering/controlled-documents-resources')
async () => await import(/* webpackChunkName: "documents" */ '@hcengineering/controlled-documents-resources')
)
addLocation(guestId, () => import(/* webpackChunkName: "guest" */ '@hcengineering/guest-resources'))
addLocation(loveId, () => import(/* webpackChunkName: "love" */ '@hcengineering/love-resources'))
addLocation(printId, () => import(/* webpackChunkName: "print" */ '@hcengineering/print-resources'))
addLocation(exportId, () => import(/* webpackChunkName: "export" */ '@hcengineering/export-resources'))
addLocation(textEditorId, () => import(/* webpackChunkName: "text-editor" */ '@hcengineering/text-editor-resources'))
addLocation(uploaderId, () => import(/* webpackChunkName: "uploader" */ '@hcengineering/uploader-resources'))
addLocation(recorderId, () => import(/* webpackChunkName: "recorder" */ '@hcengineering/recorder-resources'))
addLocation(mediaId, () => import(/* webpackChunkName: "media" */ '@hcengineering/media-resources'))
addLocation(guestId, async () => await import(/* webpackChunkName: "guest" */ '@hcengineering/guest-resources'))
addLocation(globalProfileId, async () => await import(/* webpackChunkName: "global-profile" */ '@hcengineering/global-profile-resources'))
addLocation(loveId, async () => await import(/* webpackChunkName: "love" */ '@hcengineering/love-resources'))
addLocation(printId, async () => await import(/* webpackChunkName: "print" */ '@hcengineering/print-resources'))
addLocation(exportId, async () => await import(/* webpackChunkName: "export" */ '@hcengineering/export-resources'))
addLocation(
textEditorId,
async () => await import(/* webpackChunkName: "text-editor" */ '@hcengineering/text-editor-resources')
)
addLocation(
uploaderId,
async () => await import(/* webpackChunkName: "uploader" */ '@hcengineering/uploader-resources')
)
addLocation(
recorderId,
async () => await import(/* webpackChunkName: "recorder" */ '@hcengineering/recorder-resources')
)
addLocation(mediaId, async () => await import(/* webpackChunkName: "media" */ '@hcengineering/media-resources'))
addLocation(
testManagementId,
() => import(/* webpackChunkName: "test-management" */ '@hcengineering/test-management-resources')
async () => await import(/* webpackChunkName: "test-management" */ '@hcengineering/test-management-resources')
)
addLocation(surveyId, async () => await import(/* webpackChunkName: "survey" */ '@hcengineering/survey-resources'))
addLocation(
presenceId,
async () => await import(/* webpackChunkName: "presence" */ '@hcengineering/presence-resources')
)
addLocation(cardId, async () => await import(/* webpackChunkName: "card" */ '@hcengineering/card-resources'))
addLocation(chatId, async () => await import(/* webpackChunkName: "chat" */ '@hcengineering/chat-resources'))
addLocation(processId, async () => await import(/* webpackChunkName: "process" */ '@hcengineering/process-resources'))
addLocation(
achievementId,
async () => await import(/* webpackChunkName: "achievement" */ '@hcengineering/achievement-resources')
)
addLocation(
communicationId,
async () => await import(/* webpackChunkName: "communication" */ '@hcengineering/communication-resources')
)
addLocation(emojiId, async () => await import(/* webpackChunkName: "emoji" */ '@hcengineering/emoji-resources'))
addLocation(billingId, async () => await import(/* webpackChunkName: "billing" */ '@hcengineering/billing-resources'))
addLocation(
hulyMailId,
async () => await import(/* webpackChunkName: "hulyMail" */ '@hcengineering/huly-mail-resources')
)
addLocation(
aiAssistantId,
async () => await import(/* webpackChunkName: "ai-assistant" */ '@hcengineering/ai-assistant-resources')
)
addLocation(
inboxId,
async () => await import(/* webpackChunkName: "inbox" */ '@hcengineering/inbox-resources')
)
addLocation(
ratingId,
async () => await import(/* webpackChunkName: "rating" */ '@hcengineering/rating-resources')
)
addLocation(surveyId, () => import(/* webpackChunkName: "survey" */ '@hcengineering/survey-resources'))
addLocation(presenceId, () => import(/* webpackChunkName: "presence" */ '@hcengineering/presence-resources'))
addLocation(cardId, () => import(/* webpackChunkName: "card" */ '@hcengineering/card-resources'))
addLocation(chatId, () => import(/* webpackChunkName: "chat" */ '@hcengineering/chat-resources'))
addLocation(processId, () => import(/* webpackChunkName: "process" */ '@hcengineering/process-resources'))
addLocation(achievementId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/achievement-resources'))
addLocation(communicationId, () => import(/* webpackChunkName: "communication" */ '@hcengineering/communication-resources'))
addLocation(emojiId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/emoji-resources'))
addLocation(billingId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/billing-resources'))
addLocation(hulyMailId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/huly-mail-resources'))
addLocation(aiAssistantId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/ai-assistant-resources'))
setMetadata(client.metadata.FilterModel, 'ui')
setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin])
+32 -10
View File
@@ -13,6 +13,9 @@
// limitations under the License.
//
// Load sass-quiet FIRST to install stderr filter
const sass = require('../../common/scripts/sass-quiet.js')
const Dotenv = require('dotenv-webpack')
const path = require('path')
const CompressionPlugin = require('compression-webpack-plugin')
@@ -31,11 +34,16 @@ const devProduction = clientType === 'dev-production'
const devProductionHuly = clientType === 'dev-huly'
const devProductionBold = clientType === 'dev-bold'
const dev =
(process.env.CLIENT_TYPE ?? '') === 'dev' || devServer || devProduction || devProductionHuly || devProductionBold || devServerWorker || devServerWorkerLocal || devServerTest
(process.env.CLIENT_TYPE ?? '') === 'dev' ||
devServer ||
devProduction ||
devProductionHuly ||
devProductionBold ||
devServerWorker ||
devServerWorkerLocal ||
devServerTest
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
const { EsbuildPlugin } = require('esbuild-loader')
const doValidate = !prod || process.env.DO_VALIDATE === 'true'
const useCache = process.env.USE_CACHE === 'true'
@@ -264,7 +272,6 @@ module.exports = [
optimization: prod
? {
minimize: true,
minimizer: [new EsbuildPlugin({ target: 'es2021' })],
splitChunks: {
chunks: 'all'
}
@@ -279,6 +286,12 @@ module.exports = [
},
module: {
rules: [
{
test: /\.m?js$/,
resolve: {
fullySpecified: false
}
},
{
test: /\.ts?$/,
loader: 'esbuild-loader',
@@ -303,7 +316,10 @@ module.exports = [
hotReload: !prod,
preprocess: require('svelte-preprocess')({
postcss: true,
sourceMap: true
sourceMap: true,
scss: {
implementation: sass
}
}),
hotOptions: {
// Prevent preserving local component state
@@ -352,7 +368,13 @@ module.exports = [
'style-loader',
'css-loader',
'postcss-loader',
'sass-loader'
{
loader: "sass-loader",
options: {
api: "modern",
implementation: sass
}
}
]
},
@@ -482,11 +504,11 @@ module.exports = [
errors: true,
warnings: false,
runtimeErrors: (error) => {
if (error.message.includes("ResizeObserver")) {
return false;
if (error.message.includes('ResizeObserver')) {
return false
}
return true;
},
return true
}
},
progress: false
},
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/storybook",
"version": "0.1.0",
"version": "0.7.0",
"main": ".storybook/main.js",
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
@@ -11,9 +11,9 @@
"test": "echo \"No test specified\""
},
"devDependencies": {
"@hcengineering/platform": "^0.6.11",
"@hcengineering/theme": "^0.6.5",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/theme": "^0.7.0",
"@hcengineering/ui": "^0.7.0",
"@storybook/addon-essentials": "^7.0.6",
"@storybook/addon-interactions": "^7.0.6",
"@storybook/addon-links": "^7.0.6",
@@ -25,10 +25,10 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"resolve-url-loader": "^5.0.0",
"sass": "^1.53.0",
"sass-loader": "^13.2.0",
"sass": "^1.80.0",
"sass-loader": "^14.0.0",
"storybook": "^7.0.6",
"storybook-addon-themes": "^6.1.0",
"svelte-preprocess": "^5.1.3"
"svelte-preprocess": "^5.1.4"
}
}
+124 -118
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/tool",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -21,9 +21,9 @@
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/tool staging",
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/tool",
"run-local-mongo": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret FULLTEXT_URL=http://localhost:4700 ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) QUEUE_CONFIG='localhost:19092' node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js",
"run-local": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret FULLTEXT_URL=http://localhost:4702 ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3332 STORAGE_CONFIG='datalake|http://huly.local:4030' HULYLAKE_URL=http://huly.local:8096 ACCOUNT_DB_URL=postgresql://root@huly.local:26257/defaultdb?sslmode=disable DB_URL=postgresql://root@huly.local:26257/defaultdb?sslmode=disable TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 REGION_INFO='cockroach|CockroachDB' MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) QUEUE_CONFIG='localhost:19092' node --expose-gc --max-old-space-size=18000 $TOOL_OPT ./bundle/bundle.js",
"run-local": "(rush bundle --to @hcengineering/tool >/dev/null || true) && cross-env SERVER_SECRET=secret FULLTEXT_URL=http://localhost:4702 ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3332 STORAGE_CONFIG='datalake|http://huly.local:4030' HULYLAKE_URL=http://huly.local:8096 ACCOUNT_DB_URL=postgresql://root@huly.local:26257/defaultdb?sslmode=disable DB_URL=postgresql://root@huly.local:26257/defaultdb?sslmode=disable TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 REGION_INFO='cockroach|CockroachDB' MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) QUEUE_CONFIG='localhost:19092' node --expose-gc --max-old-space-size=18000 $TOOL_OPT ./bundle/bundle.js",
"run-local-brk": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --inspect-brk --enable-source-maps --max-old-space-size=18000 ./bundle/bundle.js",
"run": "rush bundle --to @hcengineering/tool >/dev/null && cross-env node --max-old-space-size=8000 ./bundle/bundle.js",
"run": "(rush bundle --to @hcengineering/tool >/dev/null || true ) && cross-env node --max-old-space-size=8000 ./bundle/bundle.js",
"upgrade-mongo": "rushx run-local-mongo upgrade-workspace -- $1",
"upgrade": "rushx run-local upgrade-workspace -- $1",
"upgrade-brk": "rushx run-local-brk upgrade-workspace -- $1",
@@ -36,8 +36,8 @@
},
"devDependencies": {
"cross-env": "~7.0.3",
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
@@ -46,10 +46,10 @@
"esbuild": "^0.25.9",
"@types/minio": "~7.0.11",
"@types/node": "^22.15.29",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/ws": "^8.5.11",
"@types/mime-types": "~2.1.1",
"@types/request": "~2.48.8",
@@ -60,112 +60,117 @@
},
"dependencies": {
"@elastic/elasticsearch": "^7.17.14",
"@hcengineering/account": "^0.6.0",
"@hcengineering/account-service": "^0.6.0",
"@hcengineering/workspace-service": "^0.6.0",
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/calendar": "^0.6.24",
"@hcengineering/chunter": "^0.6.20",
"@hcengineering/client": "^0.6.18",
"@hcengineering/activity": "^0.6.0",
"@hcengineering/client-resources": "^0.6.27",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/core": "^0.6.32",
"@hcengineering/controlled-documents": "^0.1.0",
"@hcengineering/document": "^0.6.0",
"@hcengineering/elastic": "^0.6.0",
"@hcengineering/lead": "^0.6.0",
"@hcengineering/minio": "^0.6.0",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-all": "^0.6.0",
"@hcengineering/model-attachment": "^0.6.0",
"@hcengineering/model-contact": "^0.6.1",
"@hcengineering/model-controlled-documents": "^0.1.0",
"@hcengineering/model-document": "^0.6.0",
"@hcengineering/model-recruit": "^0.6.0",
"@hcengineering/model-telegram": "^0.6.0",
"@hcengineering/model-tracker": "^0.6.0",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-task": "^0.6.0",
"@hcengineering/model-activity": "^0.6.0",
"@hcengineering/model-lead": "^0.6.0",
"@hcengineering/postgres": "^0.6.0",
"@hcengineering/account-client": "^0.6.0",
"@hcengineering/mongo": "^0.6.1",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/recruit": "^0.6.29",
"@hcengineering/rekoni": "^0.6.0",
"@hcengineering/server-pipeline": "^0.6.0",
"@hcengineering/server-attachment": "^0.6.1",
"@hcengineering/server-attachment-resources": "^0.6.0",
"@hcengineering/server-collaboration": "^0.6.0",
"@hcengineering/server-collaboration-resources": "^0.6.0",
"@hcengineering/server-backup": "^0.6.0",
"@hcengineering/backup-service": "^0.6.0",
"@hcengineering/server-storage": "^0.6.0",
"@hcengineering/server-calendar": "^0.6.0",
"@hcengineering/server-calendar-resources": "^0.6.0",
"@hcengineering/server-card": "^0.6.0",
"@hcengineering/server-card-resources": "^0.6.0",
"@hcengineering/server-chunter": "^0.6.0",
"@hcengineering/server-chunter-resources": "^0.6.0",
"@hcengineering/server-contact": "^0.6.1",
"@hcengineering/server-contact-resources": "^0.6.0",
"@hcengineering/server-core": "^0.6.1",
"@hcengineering/server-document": "^0.6.0",
"@hcengineering/server-document-resources": "^0.6.0",
"@hcengineering/server-drive": "^0.6.0",
"@hcengineering/server-drive-resources": "^0.6.0",
"@hcengineering/server-gmail": "^0.6.0",
"@hcengineering/server-gmail-resources": "^0.6.0",
"@hcengineering/server-hr": "^0.6.0",
"@hcengineering/server-hr-resources": "^0.6.0",
"@hcengineering/server-inventory": "^0.6.1",
"@hcengineering/server-inventory-resources": "^0.6.0",
"@hcengineering/server-lead": "^0.6.0",
"@hcengineering/server-lead-resources": "^0.6.0",
"@hcengineering/server-notification": "^0.6.1",
"@hcengineering/server-notification-resources": "^0.6.0",
"@hcengineering/server-recruit": "^0.6.0",
"@hcengineering/server-recruit-resources": "^0.6.0",
"@hcengineering/server-request": "^0.6.0",
"@hcengineering/server-request-resources": "^0.6.0",
"@hcengineering/server-setting": "^0.6.0",
"@hcengineering/server-setting-resources": "^0.6.0",
"@hcengineering/server-tags": "^0.6.0",
"@hcengineering/server-tags-resources": "^0.6.0",
"@hcengineering/server-task": "^0.6.0",
"@hcengineering/server-task-resources": "^0.6.0",
"@hcengineering/server-telegram": "^0.6.0",
"@hcengineering/server-telegram-resources": "^0.6.0",
"@hcengineering/server-token": "^0.6.11",
"@hcengineering/server-tool": "^0.6.0",
"@hcengineering/server-client": "^0.6.0",
"@hcengineering/server-tracker": "^0.6.0",
"@hcengineering/server-tracker-resources": "^0.6.0",
"@hcengineering/server-view": "^0.6.0",
"@hcengineering/server-view-resources": "^0.6.0",
"@hcengineering/server-activity": "^0.6.0",
"@hcengineering/server-activity-resources": "^0.6.0",
"@hcengineering/server-guest": "^0.6.0",
"@hcengineering/server-guest-resources": "^0.6.0",
"@hcengineering/server-time": "^0.6.0",
"@hcengineering/server-time-resources": "^0.6.0",
"@hcengineering/server-ai-bot": "^0.6.0",
"@hcengineering/server-ai-bot-resources": "^0.6.0",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/tags": "^0.6.16",
"@hcengineering/task": "^0.6.20",
"@hcengineering/text": "^0.6.5",
"@hcengineering/text-core": "^0.6.0",
"@hcengineering/text-ydoc": "^0.6.0",
"@hcengineering/telegram": "^0.6.21",
"@hcengineering/tracker": "^0.6.24",
"@hcengineering/collaboration": "^0.6.0",
"@hcengineering/datalake": "^0.6.0",
"@hcengineering/retry": "^0.6.0",
"@hcengineering/s3": "^0.6.0",
"@hcengineering/kvs-client": "^0.6.0",
"@hcengineering/account": "workspace:^0.7.0",
"@hcengineering/communication": "workspace:^0.7.0",
"@hcengineering/chat": "workspace:^0.7.0",
"@hcengineering/card": "workspace:^0.7.0",
"@hcengineering/rank": "^0.7.17",
"@hcengineering/text-markdown": "^0.7.18",
"@hcengineering/account-service": "workspace:^0.7.0",
"@hcengineering/workspace-service": "workspace:^0.7.0",
"@hcengineering/attachment": "workspace:^0.7.0",
"@hcengineering/calendar": "workspace:^0.7.0",
"@hcengineering/chunter": "workspace:^0.7.0",
"@hcengineering/client": "^0.7.17",
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/client-resources": "^0.7.17",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/controlled-documents": "workspace:^0.7.0",
"@hcengineering/document": "workspace:^0.7.0",
"@hcengineering/elastic": "^0.7.15",
"@hcengineering/lead": "workspace:^0.7.0",
"@hcengineering/minio": "^0.7.15",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-all": "workspace:^0.7.0",
"@hcengineering/model-attachment": "workspace:^0.7.0",
"@hcengineering/model-contact": "workspace:^0.7.0",
"@hcengineering/model-controlled-documents": "workspace:^0.7.0",
"@hcengineering/model-document": "workspace:^0.7.0",
"@hcengineering/model-recruit": "workspace:^0.7.0",
"@hcengineering/model-telegram": "workspace:^0.7.0",
"@hcengineering/model-tracker": "workspace:^0.7.0",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-task": "workspace:^0.7.0",
"@hcengineering/model-activity": "workspace:^0.7.0",
"@hcengineering/model-lead": "workspace:^0.7.0",
"@hcengineering/postgres": "^0.7.17",
"@hcengineering/account-client": "^0.7.19",
"@hcengineering/mongo": "^0.7.15",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/recruit": "workspace:^0.7.0",
"@hcengineering/rekoni": "workspace:^0.7.0",
"@hcengineering/server-pipeline": "workspace:^0.7.0",
"@hcengineering/server-attachment": "workspace:^0.7.0",
"@hcengineering/server-attachment-resources": "workspace:^0.7.0",
"@hcengineering/server-collaboration": "workspace:^0.7.0",
"@hcengineering/server-collaboration-resources": "workspace:^0.7.0",
"@hcengineering/server-backup": "workspace:^0.7.0",
"@hcengineering/backup-service": "workspace:^0.7.0",
"@hcengineering/server-storage": "^0.7.15",
"@hcengineering/server-calendar": "workspace:^0.7.0",
"@hcengineering/server-calendar-resources": "workspace:^0.7.0",
"@hcengineering/server-card": "workspace:^0.7.0",
"@hcengineering/server-card-resources": "workspace:^0.7.0",
"@hcengineering/server-chunter": "workspace:^0.7.0",
"@hcengineering/server-chunter-resources": "workspace:^0.7.0",
"@hcengineering/server-contact": "workspace:^0.7.0",
"@hcengineering/server-contact-resources": "workspace:^0.7.0",
"@hcengineering/server-core": "^0.7.16",
"@hcengineering/server-document": "workspace:^0.7.0",
"@hcengineering/server-document-resources": "workspace:^0.7.0",
"@hcengineering/server-drive": "workspace:^0.7.0",
"@hcengineering/server-drive-resources": "workspace:^0.7.0",
"@hcengineering/server-gmail": "workspace:^0.7.0",
"@hcengineering/server-gmail-resources": "workspace:^0.7.0",
"@hcengineering/server-hr": "workspace:^0.7.0",
"@hcengineering/server-hr-resources": "workspace:^0.7.0",
"@hcengineering/server-inventory": "workspace:^0.7.0",
"@hcengineering/server-inventory-resources": "workspace:^0.7.0",
"@hcengineering/server-lead": "workspace:^0.7.0",
"@hcengineering/server-lead-resources": "workspace:^0.7.0",
"@hcengineering/server-notification": "workspace:^0.7.0",
"@hcengineering/server-notification-resources": "workspace:^0.7.0",
"@hcengineering/server-recruit": "workspace:^0.7.0",
"@hcengineering/server-recruit-resources": "workspace:^0.7.0",
"@hcengineering/server-request": "workspace:^0.7.0",
"@hcengineering/server-request-resources": "workspace:^0.7.0",
"@hcengineering/server-setting": "workspace:^0.7.0",
"@hcengineering/server-setting-resources": "workspace:^0.7.0",
"@hcengineering/server-tags": "workspace:^0.7.0",
"@hcengineering/server-tags-resources": "workspace:^0.7.0",
"@hcengineering/server-task": "workspace:^0.7.0",
"@hcengineering/server-task-resources": "workspace:^0.7.0",
"@hcengineering/server-telegram": "workspace:^0.7.0",
"@hcengineering/server-telegram-resources": "workspace:^0.7.0",
"@hcengineering/server-token": "^0.7.17",
"@hcengineering/server-tool": "workspace:^0.7.0",
"@hcengineering/server-client": "^0.7.15",
"@hcengineering/server-tracker": "workspace:^0.7.0",
"@hcengineering/server-tracker-resources": "workspace:^0.7.0",
"@hcengineering/server-view": "workspace:^0.7.0",
"@hcengineering/server-view-resources": "workspace:^0.7.0",
"@hcengineering/server-activity": "workspace:^0.7.0",
"@hcengineering/server-activity-resources": "workspace:^0.7.0",
"@hcengineering/server-guest": "workspace:^0.7.0",
"@hcengineering/server-guest-resources": "workspace:^0.7.0",
"@hcengineering/server-time": "workspace:^0.7.0",
"@hcengineering/server-time-resources": "workspace:^0.7.0",
"@hcengineering/server-ai-bot": "workspace:^0.7.0",
"@hcengineering/server-ai-bot-resources": "workspace:^0.7.0",
"@hcengineering/setting": "workspace:^0.7.0",
"@hcengineering/tags": "workspace:^0.7.0",
"@hcengineering/task": "workspace:^0.7.0",
"@hcengineering/text": "^0.7.18",
"@hcengineering/text-core": "^0.7.18",
"@hcengineering/text-ydoc": "^0.7.18",
"@hcengineering/telegram": "workspace:^0.7.0",
"@hcengineering/tracker": "workspace:^0.7.0",
"@hcengineering/collaboration": "^0.7.15",
"@hcengineering/datalake": "^0.7.15",
"@hcengineering/retry": "^0.7.17",
"@hcengineering/s3": "^0.7.15",
"@hcengineering/kvs-client": "workspace:^0.7.0",
"commander": "^8.1.0",
"csv-parse": "~5.1.0",
"email-addresses": "^5.0.0",
@@ -179,10 +184,11 @@
"utf-8-validate": "^6.0.4",
"msgpackr": "^1.11.2",
"msgpackr-extract": "^3.0.3",
"@hcengineering/kafka": "^0.6.0",
"@hcengineering/api-client": "^0.6.0",
"@hcengineering/kafka": "^0.7.15",
"@hcengineering/api-client": "^0.7.18",
"@faker-js/faker": "^8.4.1",
"@hcengineering/hulylake-client": "^0.6.0",
"@hcengineering/communication-types": "^0.1.0"
"@hcengineering/hulylake-client": "^0.7.17",
"@hcengineering/communication-types": "^0.7.12",
"@hcengineering/pod-rating": "workspace:^0.7.0"
}
}
-2
View File
@@ -604,7 +604,6 @@ export async function generateEmployee (client: TxOperations): Promise<AccountUu
const personUuid = generateId() as unknown as AccountUuid // TODO: will it work or need to actually be a UUID?
const personId = await client.createDoc(contact.class.Person, contact.space.Contacts, {
name: generateId().toString(),
city: '',
avatarType: AvatarType.COLOR,
personUuid
})
@@ -656,7 +655,6 @@ async function generateVacancy (client: TxOperations, members: AccountUuid[]): P
const personUuid = generateId() as unknown as PersonUuid // TODO: will it work or need to actually be a UUID?
const personId = await client.createDoc(contact.class.Person, contact.space.Contacts, {
name: generateId().toString(),
city: '',
avatarType: AvatarType.COLOR,
personUuid
})
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -34,9 +34,7 @@ export async function changeConfiguration (
const config = await connection.findAll(core.class.PluginConfiguration, {})
if (cmd.list === true) {
for (const c of config) {
if (c.label !== undefined) {
console.log(toLen(c.pluginId, '-', 20), c.enabled)
}
console.log(toLen(c.pluginId, '-', 20), c.enabled, c.hidden === true ? '(hidden)' : '')
}
}
const enable = (cmd.enable ?? '').trim().split(',')
+1 -1
View File
@@ -54,7 +54,7 @@ export async function performGithubAccountMigrations (
txes: Tx[],
region: string | null
): Promise<void> {
const token = generateToken(systemAccountUuid, undefined, { service: 'admin', admin: 'true' })
const token = generateToken(systemAccountUuid, undefined, { service: 'tool', admin: 'true' })
const githubToken = generateToken(systemAccountUuid, undefined, { service: 'github' })
const accountClient = getAccountClient(token)
+1 -1
View File
@@ -79,7 +79,7 @@ export async function performGmailAccountMigrations (
txes: Tx[]
): Promise<void> {
console.log('Start Gmail migrations')
const token = generateToken(systemAccountUuid, undefined, { service: 'admin', admin: 'true' })
const token = generateToken(systemAccountUuid, undefined, { service: 'tool', admin: 'true' })
const accountClient = getAccountClient(token)
const allWorkpaces = await accountClient.listWorkspaces(region)
+125 -46
View File
@@ -27,16 +27,29 @@ import accountPlugin, {
type AccountDB,
type Workspace
} from '@hcengineering/account'
import {
getMongoAccountDB,
type Account as OldAccount,
type Workspace as OldWorkspace
} from '@hcengineering/account-service'
import { getWorkspaceClient as getHulylakeClient } from '@hcengineering/hulylake-client'
import { setMetadata } from '@hcengineering/platform'
import {
createPostgreeDestroyAdapter,
createPostgresAdapter,
createPostgresTxAdapter,
getDBClient,
shutdownPostgres
} from '@hcengineering/postgres'
import {
backup,
backupDownload,
backupFind,
checkBackupIntegrity,
compactBackup,
createFileBackupStorage,
createStorageBackupStorage,
restore,
backupDownload
restore
} from '@hcengineering/server-backup'
import serverClientPlugin, { getAccountClient, getTransactorEndpoint } from '@hcengineering/server-client'
import {
@@ -51,19 +64,6 @@ import {
} from '@hcengineering/server-pipeline'
import serverToken, { decodeToken, generateToken } from '@hcengineering/server-token'
import { createWorkspace, upgradeWorkspace } from '@hcengineering/workspace-service'
import {
getMongoAccountDB,
type Account as OldAccount,
type Workspace as OldWorkspace
} from '@hcengineering/account-service'
import { getClient as getHulylakeClient } from '@hcengineering/hulylake-client'
import {
getDBClient,
createPostgreeDestroyAdapter,
createPostgresAdapter,
createPostgresTxAdapter,
shutdownPostgres
} from '@hcengineering/postgres'
import { faker } from '@faker-js/faker'
import { getPlatformQueue } from '@hcengineering/kafka'
@@ -71,13 +71,14 @@ import { buildStorageFromConfig, createStorageFromConfig, storageConfigFromEnv }
import { program, type Command } from 'commander'
import { updateField } from './workspace'
import { RatingCalculator, ratingEvents, type QueueRatingMessage } from '@hcengineering/pod-rating'
import {
AccountRole,
isArchivingMode,
isDeletingMode,
MeasureMetricsContext,
metricsToString,
SocialId,
SocialIdType,
systemAccountEmail,
systemAccountUuid,
@@ -85,12 +86,12 @@ import {
type Data,
type Doc,
type PersonId,
type PersonUuid,
type Ref,
type Tx,
type Version,
type WorkspaceDataId,
type WorkspaceUuid,
type PersonUuid
type WorkspaceUuid
} from '@hcengineering/core'
import { consoleModelLogger, type MigrateOperation } from '@hcengineering/model'
import {
@@ -129,14 +130,14 @@ import { performGmailAccountMigrations } from './gmail'
import { getToolToken, getWorkspace, getWorkspaceTransactorEndpoint } from './utils'
import { createRestClient } from '@hcengineering/api-client'
import { type CardID } from '@hcengineering/communication-types'
import { sendTransactorEvent } from '@hcengineering/server-tool'
import { existsSync } from 'fs'
import { mkdir, writeFile } from 'fs/promises'
import { dirname } from 'path'
import { restoreMarkupRefs } from './markup'
import { restoreGithubIntegrations } from './restoreGithub'
import { migrateWorkspaceMessages } from './communication'
import { type CardID } from '@hcengineering/communication-types'
import { migrateWorkspaceChat } from './communication'
const colorConstants = {
colorRed: '\u001b[31m',
@@ -2852,15 +2853,16 @@ export function devTool (
})
program
.command('migrate-communication-to-hulylake <workspace>')
.description('Migrate communication messages to hulylake')
.option('-c, --card <card>', 'Card to migrate')
.action(async (workspace: WorkspaceUuid, cmd: { card?: CardID }) => {
const { dbUrl } = prepareTools()
.command('migrate-chat-to-communication')
.description('Migrate old chat to new communication')
.option('-w, --workspace <workspace>', 'Workspace to migrate')
.action(async (cmd: { workspace?: WorkspaceUuid }) => {
const { dbUrl, txes } = prepareTools()
const hulylakeUrl = process.env.HULYLAKE_URL ?? ''
const workspace = cmd.workspace
console.log('Workspace', workspace)
console.log('Card', cmd.card)
if (hulylakeUrl === '') {
throw new Error('HULYLAKE_URL should be specified')
}
@@ -2872,31 +2874,108 @@ export function devTool (
const dbClient = await db.getClient()
const accountClient = getAccountClient(token)
const personUuidBySocialId = new Map<PersonId, PersonUuid>()
const storageConfig = storageConfigFromEnv()
const storage: StorageAdapter = buildStorageFromConfig(storageConfig)
await withAccountDatabase(async (accountDb) => {
const ws = (await accountDb.workspace.find({ uuid: workspace }))[0]
if (ws === undefined) {
throw new Error(`Workspace ${workspace} not found`)
}
try {
const hulylake = getHulylakeClient(hulylakeUrl, ws.uuid, token)
console.log('start workspace migration', ws.name)
await migrateWorkspaceMessages(
toolCtx.newChild(ws.name, {}),
ws,
cmd.card,
dbClient,
hulylake,
accountClient,
personUuidBySocialId
)
console.log('done workspace migration', ws.name)
} catch (err: any) {
console.error('failed to migrate workspace', ws.name)
console.error(err)
const workspaces =
workspace != null
? await accountDb.workspaceStatus.find({ workspaceUuid: workspace })
: await accountDb.workspaceStatus.find({}, { lastVisit: 'descending' })
for (const wss of workspaces) {
try {
const ws = await accountDb.workspace.findOne({ uuid: wss.workspaceUuid })
if (ws == null) continue
const hulylake = getHulylakeClient(hulylakeUrl, ws.uuid, token)
let pipeline: Pipeline | undefined
try {
pipeline = await createBackupPipeline(toolCtx, dbUrl, txes, {
externalStorage: storage,
usePassedCtx: true
})(
toolCtx,
{
uuid: ws.uuid,
url: ws.url ?? '',
dataId: ws.dataId
},
createEmptyBroadcastOps(),
null
)
} catch (e) {
pipeline = undefined
}
if (pipeline === undefined) {
toolCtx.error('failed to migrate, pipeline is undefined', { ws })
return
}
const client = pipeline.context.lowLevelStorage
if (client == null) {
toolCtx.error('failed to migrate, lowLevelStorage is undefined', { ws })
return
}
console.log('------------start workspace migration', ws.name)
const s = Date.now()
await migrateWorkspaceChat(
toolCtx.newChild(ws.name, {}),
ws,
dbClient,
client,
pipeline.context.hierarchy,
hulylake,
accountClient,
personUuidBySocialId
)
const e = Date.now()
console.log('---------------done workspace migration', ws.name, ((e - s) / 1000 / 60).toFixed(2), 'minutes')
await pipeline.close()
} catch (err: any) {
console.error('failed to migrate workspace', wss.workspaceUuid)
console.error(err)
}
}
db.close()
}, dbUrl)
console.log('done')
})
program
.command('calculate-ratings <workspace>')
.description('Perform a rating re-calculation')
.option('-q <queue>', 'Send to queue', false)
.option('-r, --region <region>', 'Region')
.action(async (workspace: string, cmd: { queue: boolean | undefined, region: string | undefined }) => {
await withAccountDatabase(async (db) => {
const { txes, dbUrl } = prepareTools()
const ws = await getWorkspace(db, workspace)
if (ws === null) {
throw new Error(`workspace ${workspace} not found`)
}
if (cmd.queue === true) {
const queue = getPlatformQueue('tool', cmd.region ?? '')
const ratingQueue = queue.getProducer<QueueRatingMessage>(toolCtx, 'rating')
await ratingQueue.send(toolCtx, ws.uuid, [ratingEvents.reindex()])
await queue.shutdown()
} else {
const wsIds = {
uuid: ws.uuid,
dataId: ws.dataId,
url: ws.url
}
const calculator = await RatingCalculator.create(toolCtx, txes, wsIds, dbUrl, async () => '')
await calculator.recalculateAll(toolCtx)
await calculator.close()
}
})
})
extendProgram?.(program)
+1 -1
View File
@@ -378,7 +378,7 @@ export async function restoreMarkupRefs (
storageAdapter: StorageAdapter,
region: string | null
): Promise<void> {
const token = generateToken(systemAccountUuid, undefined, { service: 'admin', admin: 'true' })
const token = generateToken(systemAccountUuid, undefined, { service: 'tool', admin: 'true' })
const ctx = new MeasureMetricsContext('restore-markup-ref', {})
const accountClient = getAccountClient(token)
+1 -1
View File
@@ -16,7 +16,7 @@ export async function restoreGithubIntegrations (dbUrl: string, dryrun: boolean)
try {
const pg = getDBClient(dbUrl)
const pgClient = await pg.getClient()
const token = generateToken(systemAccountUuid, undefined, { service: 'admin', admin: 'true' })
const token = generateToken(systemAccountUuid, undefined, { service: 'tool', admin: 'true' })
const accountClient = getAccountClient(token)
const integrationSettings = await pgClient<
+17 -17
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-achievement",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,32 +18,32 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/achievement": "^0.6.0",
"@hcengineering/achievement-resources": "^0.6.0",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-presentation": "^0.6.0",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/presentation": "^0.6.3",
"@hcengineering/ui": "^0.6.15"
"@hcengineering/achievement": "workspace:^0.7.0",
"@hcengineering/achievement-resources": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-presentation": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/presentation": "workspace:^0.7.0",
"@hcengineering/ui": "workspace:^0.7.0"
}
}
+20 -20
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-activity",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,35 +18,35 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.54.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/activity": "^0.6.0",
"@hcengineering/activity-resources": "^0.6.1",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-preference": "^0.6.0",
"@hcengineering/model-presentation": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/notification": "^0.6.23",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/text": "^0.6.5",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/view": "^0.6.13"
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/activity-resources": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-preference": "workspace:^0.7.0",
"@hcengineering/model-presentation": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/notification": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/text": "^0.7.18",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0"
}
}
+1 -2
View File
@@ -23,7 +23,7 @@ import {
type ViewAction,
type ViewActionAvailabilityFunction
} from '@hcengineering/view'
import { type NotificationGroup, type NotificationType } from '@hcengineering/notification'
import { type NotificationGroup } from '@hcengineering/notification'
export default mergeIds(activityId, activity, {
string: {
@@ -44,7 +44,6 @@ export default mergeIds(activityId, activity, {
ids: {
ReactionAddedActivityViewlet: '' as Ref<DocUpdateMessageViewlet>,
ActivityNotificationGroup: '' as Ref<NotificationGroup>,
AddReactionNotification: '' as Ref<NotificationType>,
AddReactionAction: '' as Ref<Action>,
SaveForLaterAction: '' as Ref<Action>,
RemoveFromLaterAction: '' as Ref<Action>,
+14 -14
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-ai-assistant",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,29 +18,29 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/model": "^0.6.11",
"@hcengineering/core": "^0.6.32",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/ai-assistant": "^0.6.0",
"@hcengineering/ai-assistant-resources": "^0.6.0",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/ui": "^0.6.15"
"@hcengineering/model": "^0.7.17",
"@hcengineering/core": "^0.7.21",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/ai-assistant": "workspace:^0.7.0",
"@hcengineering/ai-assistant-resources": "workspace:^0.7.0",
"@hcengineering/setting": "workspace:^0.7.0",
"@hcengineering/ui": "workspace:^0.7.0"
}
}
+12 -12
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-ai-bot",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,27 +18,27 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.54.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/ai-bot": "^0.6.0",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/ui": "^0.6.15"
"@hcengineering/ai-bot": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0"
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "@hcengineering/model-all",
"entries": [
{
"version": "0.6.0",
"version": "0.7.0",
"tag": "@hcengineering/model-all_v0.6.0",
"date": "Sun, 08 Aug 2021 21:05:26 GMT",
"comments": {
+103 -101
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-all",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -21,118 +21,120 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@types/node": "^22.15.29",
"ts-node": "^10.8.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"esbuild": "^0.25.9",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/model-workbench": "^0.6.1",
"@hcengineering/model-contact": "^0.6.1",
"@hcengineering/model-task": "^0.6.0",
"@hcengineering/model-chunter": "^0.6.0",
"@hcengineering/model-recruit": "^0.6.0",
"@hcengineering/model-lead": "^0.6.0",
"@hcengineering/model-setting": "^0.6.0",
"@hcengineering/model-telegram": "^0.6.0",
"@hcengineering/model-server-core": "^0.6.0",
"@hcengineering/model-server-attachment": "^0.6.0",
"@hcengineering/model-server-collaboration": "^0.6.0",
"@hcengineering/model-server-contact": "^0.6.0",
"@hcengineering/model-server-drive": "^0.6.0",
"@hcengineering/model-server-notification": "^0.6.0",
"@hcengineering/model-server-setting": "^0.6.0",
"@hcengineering/model-server-chunter": "^0.6.0",
"@hcengineering/model-server-task": "^0.6.0",
"@hcengineering/model-server-tracker": "^0.6.0",
"@hcengineering/model-server-templates": "^0.6.0",
"@hcengineering/model-server-tags": "^0.6.0",
"@hcengineering/model-server-recruit": "^0.6.0",
"@hcengineering/model-server-lead": "^0.6.0",
"@hcengineering/model-server-inventory": "^0.6.0",
"@hcengineering/model-activity": "^0.6.0",
"@hcengineering/model-attachment": "^0.6.0",
"@hcengineering/model-gmail": "^0.6.0",
"@hcengineering/model-inventory": "^0.6.0",
"@hcengineering/model-presentation": "^0.6.0",
"@hcengineering/model-templates": "^0.6.0",
"@hcengineering/model-notification": "^0.6.0",
"@hcengineering/model-text-editor": "^0.6.0",
"@hcengineering/model-uploader": "^0.6.0",
"@hcengineering/core": "^0.6.32",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/model-tags": "^0.6.0",
"@hcengineering/model-calendar": "^0.6.0",
"@hcengineering/model-server-calendar": "^0.6.0",
"@hcengineering/model-server-gmail": "^0.6.0",
"@hcengineering/model-server-telegram": "^0.6.0",
"@hcengineering/model-tracker": "^0.6.0",
"@hcengineering/model-board": "^0.6.0",
"@hcengineering/model-time": "^0.6.0",
"@hcengineering/model-server-time": "^0.6.0",
"@hcengineering/model-desktop-preferences": "^0.6.0",
"@hcengineering/model-desktop-downloads": "^0.6.0",
"@hcengineering/model-preference": "^0.6.0",
"@hcengineering/model-hr": "^0.6.0",
"@hcengineering/model-server-hr": "^0.6.0",
"@hcengineering/model-bitrix": "^0.6.0",
"@hcengineering/model-request": "^0.6.0",
"@hcengineering/model-support": "^0.6.0",
"@hcengineering/model-server-card": "^0.6.0",
"@hcengineering/model-server-request": "^0.6.0",
"@hcengineering/model-server-view": "^0.6.0",
"@hcengineering/model-server-activity": "^0.6.0",
"@hcengineering/model-drive": "^0.6.0",
"@hcengineering/model-guest": "^0.6.0",
"@hcengineering/model-server-guest": "^0.6.0",
"@hcengineering/model-document": "^0.6.0",
"@hcengineering/model-server-document": "^0.6.0",
"@hcengineering/model-github": "^0.6.0",
"@hcengineering/server-github-model": "^0.6.0",
"@hcengineering/model-love": "^0.6.0",
"@hcengineering/model-server-love": "^0.6.0",
"@hcengineering/model-print": "^0.6.0",
"@hcengineering/model-export": "^0.6.0",
"@hcengineering/model-questions": "^0.1.0",
"@hcengineering/model-training": "^0.1.0",
"@hcengineering/model-controlled-documents": "^0.1.0",
"@hcengineering/model-products": "^0.1.0",
"@hcengineering/model-server-products": "^0.1.0",
"@hcengineering/model-server-training": "^0.1.0",
"@hcengineering/model-server-controlled-documents": "^0.1.0",
"@hcengineering/model-analytics-collector": "^0.6.0",
"@hcengineering/model-server-ai-bot": "^0.6.0",
"@hcengineering/model-ai-bot": "^0.6.0",
"@hcengineering/model-media": "^0.6.0",
"@hcengineering/model-recorder": "^0.6.0",
"@hcengineering/model-test-management": "^0.6.0",
"@hcengineering/model-survey": "^0.6.0",
"@hcengineering/model-presence": "^0.6.0",
"@hcengineering/model-card": "^0.6.0",
"@hcengineering/model-mail": "^0.6.0",
"@hcengineering/model-chat": "^0.6.0",
"@hcengineering/model-process": "^0.6.0",
"@hcengineering/model-server-process": "^0.6.0",
"@hcengineering/model-achievement": "^0.6.0",
"@hcengineering/model-communication": "^0.6.0",
"@hcengineering/model-emoji": "^0.6.0",
"@hcengineering/model-billing": "^0.6.0",
"@hcengineering/model-huly-mail": "^0.6.0",
"@hcengineering/model-ai-assistant": "^0.6.0"
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/model-workbench": "workspace:^0.7.0",
"@hcengineering/model-contact": "workspace:^0.7.0",
"@hcengineering/model-task": "workspace:^0.7.0",
"@hcengineering/model-chunter": "workspace:^0.7.0",
"@hcengineering/model-recruit": "workspace:^0.7.0",
"@hcengineering/model-lead": "workspace:^0.7.0",
"@hcengineering/model-setting": "workspace:^0.7.0",
"@hcengineering/model-telegram": "workspace:^0.7.0",
"@hcengineering/model-server-core": "workspace:^0.7.0",
"@hcengineering/model-server-attachment": "workspace:^0.7.0",
"@hcengineering/model-server-collaboration": "workspace:^0.7.0",
"@hcengineering/model-server-contact": "workspace:^0.7.0",
"@hcengineering/model-server-drive": "workspace:^0.7.0",
"@hcengineering/model-server-notification": "workspace:^0.7.0",
"@hcengineering/model-server-setting": "workspace:^0.7.0",
"@hcengineering/model-server-chunter": "workspace:^0.7.0",
"@hcengineering/model-server-task": "workspace:^0.7.0",
"@hcengineering/model-server-tracker": "workspace:^0.7.0",
"@hcengineering/model-server-templates": "workspace:^0.7.0",
"@hcengineering/model-server-tags": "workspace:^0.7.0",
"@hcengineering/model-server-recruit": "workspace:^0.7.0",
"@hcengineering/model-server-lead": "workspace:^0.7.0",
"@hcengineering/model-server-inventory": "workspace:^0.7.0",
"@hcengineering/model-activity": "workspace:^0.7.0",
"@hcengineering/model-attachment": "workspace:^0.7.0",
"@hcengineering/model-gmail": "workspace:^0.7.0",
"@hcengineering/model-inventory": "workspace:^0.7.0",
"@hcengineering/model-presentation": "workspace:^0.7.0",
"@hcengineering/model-templates": "workspace:^0.7.0",
"@hcengineering/model-notification": "workspace:^0.7.0",
"@hcengineering/model-text-editor": "workspace:^0.7.0",
"@hcengineering/model-uploader": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/model-tags": "workspace:^0.7.0",
"@hcengineering/model-calendar": "workspace:^0.7.0",
"@hcengineering/model-server-calendar": "workspace:^0.7.0",
"@hcengineering/model-server-gmail": "workspace:^0.7.0",
"@hcengineering/model-server-telegram": "workspace:^0.7.0",
"@hcengineering/model-tracker": "workspace:^0.7.0",
"@hcengineering/model-board": "workspace:^0.7.0",
"@hcengineering/model-time": "workspace:^0.7.0",
"@hcengineering/model-server-time": "workspace:^0.7.0",
"@hcengineering/model-desktop-preferences": "workspace:^0.7.0",
"@hcengineering/model-desktop-downloads": "workspace:^0.7.0",
"@hcengineering/model-preference": "workspace:^0.7.0",
"@hcengineering/model-hr": "workspace:^0.7.0",
"@hcengineering/model-server-hr": "workspace:^0.7.0",
"@hcengineering/model-bitrix": "workspace:^0.7.0",
"@hcengineering/model-request": "workspace:^0.7.0",
"@hcengineering/model-support": "workspace:^0.7.0",
"@hcengineering/model-server-card": "workspace:^0.7.0",
"@hcengineering/model-server-request": "workspace:^0.7.0",
"@hcengineering/model-server-view": "workspace:^0.7.0",
"@hcengineering/model-server-activity": "workspace:^0.7.0",
"@hcengineering/model-drive": "workspace:^0.7.0",
"@hcengineering/model-guest": "workspace:^0.7.0",
"@hcengineering/model-server-guest": "workspace:^0.7.0",
"@hcengineering/model-document": "workspace:^0.7.0",
"@hcengineering/model-server-document": "workspace:^0.7.0",
"@hcengineering/model-github": "workspace:^0.7.0",
"@hcengineering/server-github-model": "workspace:^0.7.0",
"@hcengineering/model-love": "workspace:^0.7.0",
"@hcengineering/model-server-love": "workspace:^0.7.0",
"@hcengineering/model-print": "workspace:^0.7.0",
"@hcengineering/model-export": "workspace:^0.7.0",
"@hcengineering/model-questions": "workspace:^0.7.0",
"@hcengineering/model-training": "workspace:^0.7.0",
"@hcengineering/model-controlled-documents": "workspace:^0.7.0",
"@hcengineering/model-products": "workspace:^0.7.0",
"@hcengineering/model-server-products": "workspace:^0.7.0",
"@hcengineering/model-server-training": "workspace:^0.7.0",
"@hcengineering/model-server-controlled-documents": "workspace:^0.7.0",
"@hcengineering/model-analytics-collector": "workspace:^0.7.0",
"@hcengineering/model-server-ai-bot": "workspace:^0.7.0",
"@hcengineering/model-ai-bot": "workspace:^0.7.0",
"@hcengineering/model-media": "workspace:^0.7.0",
"@hcengineering/model-recorder": "workspace:^0.7.0",
"@hcengineering/model-test-management": "workspace:^0.7.0",
"@hcengineering/model-survey": "workspace:^0.7.0",
"@hcengineering/model-presence": "workspace:^0.7.0",
"@hcengineering/model-card": "workspace:^0.7.0",
"@hcengineering/model-mail": "workspace:^0.7.0",
"@hcengineering/model-chat": "workspace:^0.7.0",
"@hcengineering/model-process": "workspace:^0.7.0",
"@hcengineering/model-server-process": "workspace:^0.7.0",
"@hcengineering/model-achievement": "workspace:^0.7.0",
"@hcengineering/model-communication": "workspace:^0.7.0",
"@hcengineering/model-emoji": "workspace:^0.7.0",
"@hcengineering/model-billing": "workspace:^0.7.0",
"@hcengineering/model-huly-mail": "workspace:^0.7.0",
"@hcengineering/model-ai-assistant": "workspace:^0.7.0",
"@hcengineering/model-inbox": "workspace:^0.7.0",
"@hcengineering/model-rating": "workspace:^0.7.0"
}
}
+65 -29
View File
@@ -17,28 +17,36 @@ import core, { coreId, type Data, type PluginConfiguration, type Ref, type Tx, t
import { Builder } from '@hcengineering/model'
import { activityId, createModel as activityModel } from '@hcengineering/model-activity'
import { aiBotId, createModel as aiBotModel } from '@hcengineering/model-ai-bot'
import { attachmentId, createModel as attachmentModel } from '@hcengineering/model-attachment'
import bitrix, { bitrixId, createModel as bitrixModel } from '@hcengineering/model-bitrix'
import board, { boardId, createModel as boardModel } from '@hcengineering/model-board'
import calendar, { calendarId, createModel as calendarModel } from '@hcengineering/model-calendar'
import card, { cardId, createModel as cardModel } from '@hcengineering/model-card'
import chunter, { chunterId, createModel as chunterModel } from '@hcengineering/model-chunter'
import contact, { contactId, createModel as contactModel } from '@hcengineering/model-contact'
import { createModel as coreModel } from '@hcengineering/model-core'
import { desktopDownloadsId, createModel as desktopDownloadsModel } from '@hcengineering/model-desktop-downloads'
import { desktopPreferencesId, createModel as desktopPreferencesModel } from '@hcengineering/model-desktop-preferences'
import { driveId, createModel as driveModel } from '@hcengineering/model-drive'
import gmail, { gmailId, createModel as gmailModel } from '@hcengineering/model-gmail'
import { guestId, createModel as guestModel } from '@hcengineering/model-guest'
import hr, { hrId, createModel as hrModel } from '@hcengineering/model-hr'
import inventory, { inventoryId, createModel as inventoryModel } from '@hcengineering/model-inventory'
import lead, { leadId, createModel as leadModel } from '@hcengineering/model-lead'
import { mediaId, createModel as mediaModel } from '@hcengineering/model-media'
import notification, { notificationId, createModel as notificationModel } from '@hcengineering/model-notification'
import { preferenceId, createModel as preferenceModel } from '@hcengineering/model-preference'
import presentation, { presentationId, createModel as presentationModel } from '@hcengineering/model-presentation'
import rating, { ratingId, createModel as ratingModel } from '@hcengineering/model-rating'
import { recorderId, createModel as recorderModel } from '@hcengineering/model-recorder'
import recruit, { recruitId, createModel as recruitModel } from '@hcengineering/model-recruit'
import { requestId, createModel as requestModel } from '@hcengineering/model-request'
import { aiBotId, createModel as aiBotModel } from '@hcengineering/model-ai-bot'
import { serverActivityId, createModel as serverActivityModel } from '@hcengineering/model-server-activity'
import { serverAiBotId, createModel as serverAiBotModel } from '@hcengineering/model-server-ai-bot'
import { serverAttachmentId, createModel as serverAttachmentModel } from '@hcengineering/model-server-attachment'
import { serverCardId, createModel as serverCardModel } from '@hcengineering/model-server-card'
import { serverCalendarId, createModel as serverCalendarModel } from '@hcengineering/model-server-calendar'
import { serverCardId, createModel as serverCardModel } from '@hcengineering/model-server-card'
import { serverChunterId, createModel as serverChunterModel } from '@hcengineering/model-server-chunter'
import {
serverCollaborationId,
@@ -62,9 +70,7 @@ import { serverTelegramId, createModel as serverTelegramModel } from '@hcenginee
import { serverTemplatesId, createModel as serverTemplatesModel } from '@hcengineering/model-server-templates'
import { serverTrackerId, createModel as serverTrackerModel } from '@hcengineering/model-server-tracker'
import { serverViewId, createModel as serverViewModel } from '@hcengineering/model-server-view'
import { serverAiBotId, createModel as serverAiBotModel } from '@hcengineering/model-server-ai-bot'
import setting, { settingId, createModel as settingModel } from '@hcengineering/model-setting'
import { driveId, createModel as driveModel } from '@hcengineering/model-drive'
import { supportId, createModel as supportModel } from '@hcengineering/model-support'
import { tagsId, createModel as tagsModel } from '@hcengineering/model-tags'
import { taskId, createModel as taskModel } from '@hcengineering/model-task'
@@ -74,13 +80,8 @@ import { textEditorId, createModel as textEditorModel } from '@hcengineering/mod
import { timeId, createModel as timeModel } from '@hcengineering/model-time'
import tracker, { trackerId, createModel as trackerModel } from '@hcengineering/model-tracker'
import { uploaderId, createModel as uploaderModel } from '@hcengineering/model-uploader'
import { recorderId, createModel as recorderModel } from '@hcengineering/model-recorder'
import { mediaId, createModel as mediaModel } from '@hcengineering/model-media'
import view, { viewId, createModel as viewModel } from '@hcengineering/model-view'
import workbench, { workbenchId, createModel as workbenchModel } from '@hcengineering/model-workbench'
import card, { cardId, createModel as cardModel } from '@hcengineering/model-card'
import { desktopPreferencesId, createModel as desktopPreferencesModel } from '@hcengineering/model-desktop-preferences'
import { desktopDownloadsId, createModel as desktopDownloadsModel } from '@hcengineering/model-desktop-downloads'
import document, { documentId, createModel as documentModel } from '@hcengineering/model-document'
import { serverDocumentId, createModel as serverDocumentModel } from '@hcengineering/model-server-document'
@@ -88,40 +89,41 @@ import { serverDocumentId, createModel as serverDocumentModel } from '@hcenginee
import github, { githubId, createModel as githubModel } from '@hcengineering/model-github'
import { serverGithubId, createModel as serverGithubModel } from '@hcengineering/server-github-model'
import { serverTimeId, createModel as serverTimeModel } from '@hcengineering/model-server-time'
import { analyticsCollectorId, createModel as analyticsCollectorModel } from '@hcengineering/model-analytics-collector'
import { exportId, createModel as exportModel } from '@hcengineering/model-export'
import love, { loveId, createModel as loveModel } from '@hcengineering/model-love'
import { printId, createModel as printModel } from '@hcengineering/model-print'
import { exportId, createModel as exportModel } from '@hcengineering/model-export'
import { analyticsCollectorId, createModel as analyticsCollectorModel } from '@hcengineering/model-analytics-collector'
import { serverLoveId, createModel as serverLoveModel } from '@hcengineering/model-server-love'
import { serverProcessId, createModel as serverProcessModel } from '@hcengineering/model-server-process'
import { serverTimeId, createModel as serverTimeModel } from '@hcengineering/model-server-time'
import { questionsId, createModel as questionsModel } from '@hcengineering/model-questions'
import trainings, { trainingId, createModel as trainingModel } from '@hcengineering/model-training'
import aiAssistant, { aiAssistantId, createModel as aiAssistantModel } from '@hcengineering/model-ai-assistant'
import documents, { documentsId, createModel as documentsModel } from '@hcengineering/model-controlled-documents'
import { hulyMailId, createModel as hulyMailModel } from '@hcengineering/model-huly-mail'
import { mailId, createModel as mailModel } from '@hcengineering/model-mail'
import products, { productsId, createModel as productsModel } from '@hcengineering/model-products'
import { questionsId, createModel as questionsModel } from '@hcengineering/model-questions'
import { serverProductsId, createModel as serverProductsModel } from '@hcengineering/model-server-products'
import { serverTrainingId, createModel as serverTrainingModel } from '@hcengineering/model-server-training'
import testManagement, {
testManagementId,
createModel as testManagementModel
} from '@hcengineering/model-test-management'
import { mailId, createModel as mailModel } from '@hcengineering/model-mail'
import { hulyMailId, createModel as hulyMailModel } from '@hcengineering/model-huly-mail'
import aiAssistant, { aiAssistantId, createModel as aiAssistantModel } from '@hcengineering/model-ai-assistant'
import trainings, { trainingId, createModel as trainingModel } from '@hcengineering/model-training'
import { achievementId, createModel as achievementModel } from '@hcengineering/model-achievement'
import { billingId, createModel as billingModel } from '@hcengineering/model-billing'
import chat, { chatId, createModel as chatModel } from '@hcengineering/model-chat'
import { communicationId, createModel as communicationModel } from '@hcengineering/model-communication'
import { emojiId, createModel as emojiModel } from '@hcengineering/model-emoji'
import inbox, { inboxId, createModel as inboxModel } from '@hcengineering/model-inbox'
import { presenceId, createModel as presenceModel } from '@hcengineering/model-presence'
import processes, { processId, createModel as processModel } from '@hcengineering/model-process'
import {
serverDocumentsId,
createModel as serverDocumentsModel
} from '@hcengineering/model-server-controlled-documents'
import survey, { surveyId, createModel as surveyModel } from '@hcengineering/model-survey'
import { presenceId, createModel as presenceModel } from '@hcengineering/model-presence'
import chat, { chatId, createModel as chatModel } from '@hcengineering/model-chat'
import processes, { processId, createModel as processModel } from '@hcengineering/model-process'
import { achievementId, createModel as achievementModel } from '@hcengineering/model-achievement'
import { emojiId, createModel as emojiModel } from '@hcengineering/model-emoji'
import { billingId, createModel as billingModel } from '@hcengineering/model-billing'
import { communicationId, createModel as communicationModel } from '@hcengineering/model-communication'
import { type Plugin } from '@hcengineering/platform'
interface ConfigurablePlugin extends Omit<Data<PluginConfiguration>, 'pluginId' | 'transactions'> {}
@@ -160,7 +162,8 @@ export default function buildModel (): Builder {
contact.class.ChannelProvider,
setting.class.IntegrationType,
setting.class.WorkspaceSettingCategory,
setting.class.SettingsCategory
setting.class.SettingsCategory,
workbench.class.Widget
]
const builders: BuilderConfig[] = [
@@ -190,6 +193,7 @@ export default function buildModel (): Builder {
label: contact.string.ConfigLabel,
description: contact.string.ConfigDescription,
enabled: true,
system: true,
beta: false,
icon: contact.icon.ContactApplication,
classFilter: defaultFilter
@@ -354,10 +358,11 @@ export default function buildModel (): Builder {
requestModel,
requestId,
{
// label: request.string.ConfigLabel,
label: setting.string.Configure,
// description: request.string.ConfigDescription,
enabled: false,
beta: false,
hidden: true,
classFilter: defaultFilter
}
],
@@ -421,8 +426,10 @@ export default function buildModel (): Builder {
questionsModel,
questionsId,
{
label: setting.string.Configure,
enabled: false,
beta: false,
hidden: true,
classFilter: defaultFilter
}
],
@@ -474,13 +481,27 @@ export default function buildModel (): Builder {
[
chatModel,
chatId,
{ label: chat.string.Chat, hidden: false, enabled: true, beta: true, classFilter: defaultFilter }
{ label: chat.string.Chat, hidden: true, enabled: false, beta: true, classFilter: defaultFilter }
],
[
inboxModel,
inboxId,
{ label: inbox.string.Inbox, hidden: true, enabled: false, beta: true, classFilter: defaultFilter }
],
[achievementModel, achievementId],
[emojiModel, emojiId],
[communicationModel, communicationId],
[mailModel, mailId],
[billingModel, billingId, { beta: false, hidden: true, enabled: true }],
[
billingModel,
billingId,
{
label: setting.string.Configure,
beta: false,
system: true,
enabled: true
}
],
[hulyMailModel, hulyMailId],
[
aiAssistantModel,
@@ -494,6 +515,19 @@ export default function buildModel (): Builder {
classFilter: defaultFilter
}
],
[
ratingModel,
ratingId,
{
label: rating.string.Rating,
description: rating.string.Rating,
icon: rating.icon.Rating,
hidden: false,
enabled: false,
beta: true,
classFilter: defaultFilter
}
],
[serverCoreModel, serverCoreId],
[serverAttachmentModel, serverAttachmentId],
@@ -543,7 +577,9 @@ export default function buildModel (): Builder {
pluginId: id,
transactions: txes.map((it) => it._id),
...config,
enabled: config?.label === undefined || ((config?.enabled ?? true) && !(config.hidden ?? false)),
label: config?.label ?? setting.string.Configure,
hidden: config !== undefined ? config.hidden : true,
enabled: (config?.enabled ?? true) && !(config?.hidden ?? false),
beta: config?.beta ?? false
},
('plugin-configuration-' + id) as Ref<PluginConfiguration>
+21 -17
View File
@@ -16,53 +16,56 @@
// Import migrate operations.
import { type MigrateOperation } from '@hcengineering/model'
import { activityOperation } from '@hcengineering/model-activity'
import { aiBotId, aiBotOperation } from '@hcengineering/model-ai-bot'
import { analyticsCollectorOperation } from '@hcengineering/model-analytics-collector'
import { attachmentOperation } from '@hcengineering/model-attachment'
import { bitrixOperation } from '@hcengineering/model-bitrix'
import { boardOperation } from '@hcengineering/model-board'
import { calendarOperation } from '@hcengineering/model-calendar'
import { cardOperation } from '@hcengineering/model-card'
import { chatId, chatOperation } from '@hcengineering/model-chat'
import { chunterOperation } from '@hcengineering/model-chunter'
import { communicationId, communicationOperation } from '@hcengineering/model-communication'
import { contactOperation } from '@hcengineering/model-contact'
import { documentsOperation } from '@hcengineering/model-controlled-documents'
import { coreOperation } from '@hcengineering/model-core'
import { documentOperation } from '@hcengineering/model-document'
import { driveOperation } from '@hcengineering/model-drive'
import { githubOperation, githubOperationPreTime } from '@hcengineering/model-github'
import { gmailOperation } from '@hcengineering/model-gmail'
import { guestOperation } from '@hcengineering/model-guest'
import { hrOperation } from '@hcengineering/model-hr'
import { inboxId, inboxOperation } from '@hcengineering/model-inbox'
import { inventoryOperation } from '@hcengineering/model-inventory'
import { leadOperation } from '@hcengineering/model-lead'
import { loveId, loveOperation } from '@hcengineering/model-love'
import { notificationOperation } from '@hcengineering/model-notification'
import { preferenceOperation } from '@hcengineering/model-preference'
import { processId, processOperation } from '@hcengineering/model-process'
import { productsOperation } from '@hcengineering/model-products'
import { questionsOperation } from '@hcengineering/model-questions'
import { ratingOperation } from '@hcengineering/model-rating'
import { recorderId, recorderOperation } from '@hcengineering/model-recorder'
import { recruitOperation } from '@hcengineering/model-recruit'
import { requestOperation } from '@hcengineering/model-request'
import { activityServerOperation } from '@hcengineering/model-server-activity'
import { settingOperation } from '@hcengineering/model-setting'
import { surveyOperation } from '@hcengineering/model-survey'
import { tagsOperation } from '@hcengineering/model-tags'
import { taskOperation } from '@hcengineering/model-task'
import { telegramOperation } from '@hcengineering/model-telegram'
import { templatesOperation } from '@hcengineering/model-templates'
import { testManagementOperation } from '@hcengineering/model-test-management'
import { textEditorOperation } from '@hcengineering/model-text-editor'
import { timeOperation } from '@hcengineering/model-time'
import { trackerOperation } from '@hcengineering/model-tracker'
import { viewOperation } from '@hcengineering/model-view'
import { textEditorOperation } from '@hcengineering/model-text-editor'
import { githubOperation, githubOperationPreTime } from '@hcengineering/model-github'
import { loveId, loveOperation } from '@hcengineering/model-love'
import { questionsOperation } from '@hcengineering/model-questions'
import { trainingOperation } from '@hcengineering/model-training'
import { documentsOperation } from '@hcengineering/model-controlled-documents'
import { productsOperation } from '@hcengineering/model-products'
import { requestOperation } from '@hcengineering/model-request'
import { analyticsCollectorOperation } from '@hcengineering/model-analytics-collector'
import { viewOperation } from '@hcengineering/model-view'
import { workbenchOperation } from '@hcengineering/model-workbench'
import { testManagementOperation } from '@hcengineering/model-test-management'
import { surveyOperation } from '@hcengineering/model-survey'
import { cardOperation } from '@hcengineering/model-card'
import { aiBotId, aiBotOperation } from '@hcengineering/model-ai-bot'
import { chatId, chatOperation } from '@hcengineering/model-chat'
import { processId, processOperation } from '@hcengineering/model-process'
import { communicationId, communicationOperation } from '@hcengineering/model-communication'
import { recorderId, recorderOperation } from '@hcengineering/model-recorder'
export const migrateOperations: [string, MigrateOperation][] = [
['core', coreOperation],
['rating', ratingOperation],
['activity', activityOperation],
['card', cardOperation],
['chunter', chunterOperation],
@@ -106,6 +109,7 @@ export const migrateOperations: [string, MigrateOperation][] = [
['survey', surveyOperation],
[aiBotId, aiBotOperation],
[chatId, chatOperation],
[inboxId, inboxOperation],
[processId, processOperation],
[communicationId, communicationOperation],
[recorderId, recorderOperation]
+20 -20
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-analytics-collector",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,35 +18,35 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.54.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/activity": "^0.6.0",
"@hcengineering/analytics-collector": "^0.6.0",
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/chunter": "^0.6.20",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-activity": "^0.6.0",
"@hcengineering/model-chunter": "^0.6.0",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-notification": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/view": "^0.6.13"
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/analytics-collector": "workspace:^0.7.0",
"@hcengineering/attachment": "workspace:^0.7.0",
"@hcengineering/chunter": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-activity": "workspace:^0.7.0",
"@hcengineering/model-chunter": "workspace:^0.7.0",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-notification": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0"
}
}
+20 -20
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-attachment",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,35 +18,35 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.54.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/activity": "^0.6.0",
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/attachment-resources": "^0.6.0",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-preference": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/view": "^0.6.13",
"@hcengineering/model-presentation": "^0.6.0",
"@hcengineering/model-uploader": "^0.6.0",
"@hcengineering/workbench": "^0.6.16"
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/attachment": "workspace:^0.7.0",
"@hcengineering/attachment-resources": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-preference": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/model-presentation": "workspace:^0.7.0",
"@hcengineering/model-uploader": "workspace:^0.7.0",
"@hcengineering/workbench": "workspace:^0.7.0"
}
}
+14 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-billing",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,26 +18,29 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/billing": "^0.6.0"
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-presentation": "workspace:^0.7.0",
"@hcengineering/setting": "workspace:^0.7.0",
"@hcengineering/billing": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/workbench": "workspace:^0.7.0"
}
}
+90 -8
View File
@@ -13,23 +13,105 @@
// limitations under the License.
//
import { type Builder } from '@hcengineering/model'
import core from '@hcengineering/model-core'
import { Model, UX, type Builder } from '@hcengineering/model'
import core, { TDoc } from '@hcengineering/model-core'
import { type IntlString } from '@hcengineering/platform'
import setting from '@hcengineering/setting'
import billingPlugin from '@hcengineering/billing'
import { AccountRole } from '@hcengineering/core'
import billing, { type Tier } from '@hcengineering/billing'
import { AccountRole, DOMAIN_MODEL } from '@hcengineering/core'
import presentation from '@hcengineering/model-presentation'
import workbench from '@hcengineering/workbench'
export { billingId } from '@hcengineering/billing'
export { billingPlugin as default }
export { billing as default }
@Model(billing.class.Tier, core.class.Doc, DOMAIN_MODEL)
@UX(billing.string.Tier)
export class TTier extends TDoc implements Tier {
label!: IntlString
description!: IntlString
storageLimitGB!: number
trafficLimitGB!: number
priceMonthly!: number
index!: number
color?: string
}
export function createModel (builder: Builder): void {
builder.createModel(TTier)
builder.createDoc(setting.class.WorkspaceSettingCategory, core.space.Model, {
name: 'billing',
label: billingPlugin.string.Billing,
icon: billingPlugin.icon.Billing,
component: billingPlugin.component.Settings,
label: billing.string.Billing,
icon: billing.icon.Billing,
component: billing.component.Settings,
group: 'settings-editor',
role: AccountRole.Owner,
order: 920
})
builder.createDoc(
billing.class.Tier,
core.space.Model,
{
label: billing.string.Common,
description: billing.string.CommonDescription,
storageLimitGB: 10,
trafficLimitGB: 10,
priceMonthly: 0,
index: 0
},
billing.tier.Common
)
builder.createDoc(
billing.class.Tier,
core.space.Model,
{
label: billing.string.Rare,
description: billing.string.RareDescription,
storageLimitGB: 100,
trafficLimitGB: 100,
priceMonthly: 19.99,
index: 1,
color: 'Sky'
},
billing.tier.Rare
)
builder.createDoc(
billing.class.Tier,
core.space.Model,
{
label: billing.string.Epic,
description: billing.string.EpicDescription,
storageLimitGB: 1000,
trafficLimitGB: 500,
priceMonthly: 99.99,
index: 2,
color: 'Orchid'
},
billing.tier.Epic
)
builder.createDoc(
billing.class.Tier,
core.space.Model,
{
label: billing.string.Legendary,
description: billing.string.LegendaryDescription,
storageLimitGB: 10000,
trafficLimitGB: 2000,
priceMonthly: 399.99,
index: 3,
color: 'Orange'
},
billing.tier.Legendary
)
builder.createDoc(presentation.class.ComponentPointExtension, core.space.Model, {
extension: workbench.extensions.WorkbenchExtensions,
component: billing.component.WorkbenchExtension
})
}
+22 -22
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-bitrix",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,37 +18,37 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/activity": "^0.6.0",
"@hcengineering/model": "^0.6.11",
"@hcengineering/core": "^0.6.32",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-attachment": "^0.6.0",
"@hcengineering/model-contact": "^0.6.1",
"@hcengineering/view": "^0.6.13",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/bitrix": "^0.6.52",
"@hcengineering/bitrix-resources": "^0.6.0",
"@hcengineering/preference": "^0.6.13",
"@hcengineering/model-preference": "^0.6.0",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/ui": "^0.6.15"
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/model": "^0.7.17",
"@hcengineering/core": "^0.7.21",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-attachment": "workspace:^0.7.0",
"@hcengineering/model-contact": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/bitrix": "workspace:^0.7.0",
"@hcengineering/bitrix-resources": "workspace:^0.7.0",
"@hcengineering/preference": "workspace:^0.7.0",
"@hcengineering/model-preference": "workspace:^0.7.0",
"@hcengineering/setting": "workspace:^0.7.0",
"@hcengineering/ui": "workspace:^0.7.0"
}
}
+26 -26
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-board",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,41 +18,41 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/model-workbench": "^0.6.1",
"@hcengineering/model-contact": "^0.6.1",
"@hcengineering/model-chunter": "^0.6.0",
"@hcengineering/model-attachment": "^0.6.0",
"@hcengineering/board": "^0.6.19",
"@hcengineering/board-resources": "^0.6.0",
"@hcengineering/view": "^0.6.13",
"@hcengineering/task": "^0.6.20",
"@hcengineering/model-task": "^0.6.0",
"@hcengineering/workbench": "^0.6.16",
"@hcengineering/model-preference": "^0.6.0",
"@hcengineering/tags": "^0.6.16",
"@hcengineering/model-tags": "^0.6.0"
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/model-workbench": "workspace:^0.7.0",
"@hcengineering/model-contact": "workspace:^0.7.0",
"@hcengineering/model-chunter": "workspace:^0.7.0",
"@hcengineering/model-attachment": "workspace:^0.7.0",
"@hcengineering/board": "workspace:^0.7.0",
"@hcengineering/board-resources": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/task": "workspace:^0.7.0",
"@hcengineering/model-task": "workspace:^0.7.0",
"@hcengineering/workbench": "workspace:^0.7.0",
"@hcengineering/model-preference": "workspace:^0.7.0",
"@hcengineering/tags": "workspace:^0.7.0",
"@hcengineering/model-tags": "workspace:^0.7.0"
}
}
+27 -26
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-calendar",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,41 +18,42 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/view": "^0.6.13",
"@hcengineering/model-attachment": "^0.6.0",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/calendar": "^0.6.24",
"@hcengineering/calendar-resources": "^0.6.0",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/notification": "^0.6.23",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/model-setting": "^0.6.0",
"@hcengineering/model-workbench": "^0.6.1",
"@hcengineering/activity": "^0.6.0",
"@hcengineering/workbench": "^0.6.16",
"@hcengineering/model-preference": "^0.6.0",
"@hcengineering/model-chunter": "^0.6.0",
"@hcengineering/model-contact": "^0.6.1",
"@hcengineering/contact": "^0.6.24"
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/model-attachment": "workspace:^0.7.0",
"@hcengineering/setting": "workspace:^0.7.0",
"@hcengineering/calendar": "workspace:^0.7.0",
"@hcengineering/calendar-resources": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/notification": "workspace:^0.7.0",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/model-setting": "workspace:^0.7.0",
"@hcengineering/model-workbench": "workspace:^0.7.0",
"@hcengineering/account-client": "^0.7.19",
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/workbench": "workspace:^0.7.0",
"@hcengineering/model-preference": "workspace:^0.7.0",
"@hcengineering/model-chunter": "workspace:^0.7.0",
"@hcengineering/model-contact": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0"
}
}
+124 -1
View File
@@ -13,6 +13,7 @@
// limitations under the License.
//
import { type IntegrationSecret } from '@hcengineering/account-client'
import {
AccessLevel,
type Calendar,
@@ -21,10 +22,13 @@ import {
type ExternalCalendar,
type ReccuringEvent
} from '@hcengineering/calendar'
import contact, { type SocialIdentity, type SocialIdentityRef } from '@hcengineering/contact'
import core, {
type AccountUuid,
buildSocialIdString,
type Doc,
DOMAIN_TX,
type IntegrationKind,
type PersonId,
pickPrimarySocialId,
type Ref,
@@ -50,7 +54,6 @@ import {
getSocialKeyByOldAccount
} from '@hcengineering/model-core'
import setting, { DOMAIN_SETTING, type Integration } from '@hcengineering/setting'
import contact, { type SocialIdentityRef, type SocialIdentity } from '@hcengineering/contact'
import { DOMAIN_CALENDAR, DOMAIN_EVENT } from '.'
import calendar from './plugin'
@@ -455,6 +458,116 @@ async function migrateTimezone (client: MigrationClient): Promise<void> {
)
}
async function moveMigration (client: MigrationClient, secret: IntegrationSecret, socialId: PersonId): Promise<void> {
await client.accountClient.deleteIntegrationSecret(secret)
const exists = await client.accountClient.listIntegrations({
kind: secret.kind,
socialId,
workspaceUuid: secret.workspaceUuid
})
if (exists.length === 0) {
await client.accountClient.createIntegration({
kind: secret.kind,
workspaceUuid: secret.workspaceUuid,
socialId,
data: {
email: secret.key
}
})
}
await client.accountClient.addIntegrationSecret({
...secret,
socialId
})
}
async function migrateIntegrations (client: MigrationClient): Promise<void> {
const secrets = await client.accountClient.listIntegrationsSecrets({
kind: 'google-calendar' as IntegrationKind
})
const map = new Map<PersonId, PersonId | null>()
for (const secret of secrets) {
try {
const exists = map.get(secret.socialId)
if (exists == null) continue
if (exists !== undefined) {
await moveMigration(client, secret, exists)
} else {
const socials = await client.accountClient.findFullSocialIds([secret.socialId])
if (socials.length === 0) continue
if (socials[0].type === SocialIdType.GOOGLE && socials[0].value === secret.key) continue
const person = socials[0].personUuid
const target = await client.accountClient.findFullSocialIdBySocialKey(
buildSocialIdString({
type: SocialIdType.GOOGLE,
value: secret.key
})
)
if (target?.personUuid === person) {
// Ok, it is the same person, just recreate integration
map.set(secret.socialId, target._id)
await moveMigration(client, secret, target._id)
} else if (target == null) {
const newOne = await client.accountClient.addSocialIdToPerson(
person,
SocialIdType.GOOGLE,
secret.key,
true,
secret.key
)
map.set(secret.socialId, newOne)
await moveMigration(client, secret, newOne)
} else {
// oh, shit, it's a different person, let's remove it
await client.accountClient.deleteIntegrationSecret(secret)
}
}
} catch (err) {
client.logger.error('Error while migrating integration', { secret, error: err })
}
}
}
async function updateCalendarUser (client: MigrationClient): Promise<void> {
const calendars = await client.find<ExternalCalendar>(DOMAIN_CALENDAR, {
_class: calendar.class.ExternalCalendar
})
const accs = new Map<string, PersonId>()
for (const calendar of calendars) {
try {
const exists = accs.get(calendar.user)
if (exists !== undefined) {
await client.update(DOMAIN_CALENDAR, { _id: calendar._id }, { user: exists })
continue
}
const accId = await client.accountClient.findPersonBySocialId(calendar.user)
if (accId === undefined) continue
const socialId = await client.accountClient.findFullSocialIdBySocialKey(
buildSocialIdString({
type: SocialIdType.GOOGLE,
value: calendar.externalUser
})
)
if (socialId === undefined) {
const newOne = await client.accountClient.addSocialIdToPerson(
accId,
SocialIdType.GOOGLE,
calendar.externalUser,
true,
calendar.externalUser
)
accs.set(calendar.user, newOne)
} else if (socialId.personUuid === accId) {
accs.set(calendar.user, socialId._id)
await client.update(DOMAIN_CALENDAR, { _id: calendar._id }, { user: accId })
}
} catch (e) {
client.logger.error('Error while updating calendar user', { calendar: calendar._id, error: e })
}
}
}
export const calendarOperation: MigrateOperation = {
async migrate (client: MigrationClient, mode): Promise<void> {
await tryMigrate(mode, client, calendarId, [
@@ -528,6 +641,16 @@ export const calendarOperation: MigrateOperation = {
state: 'migrate-ev-user-for-deleted',
mode: 'upgrade',
func: migrateEventUserForDeleted
},
{
state: 'migrate-integrations',
mode: 'upgrade',
func: migrateIntegrations
},
{
state: 'update-calendar-user',
mode: 'upgrade',
func: updateCalendarUser
}
])
},
+27 -27
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-card",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,42 +18,42 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/activity": "^0.6.0",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/chunter": "^0.6.20",
"@hcengineering/model-setting": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/time": "^0.6.0",
"@hcengineering/card": "^0.6.0",
"@hcengineering/model-attachment": "^0.6.0",
"@hcengineering/model-guest": "^0.6.0",
"@hcengineering/model-presentation": "^0.6.0",
"@hcengineering/model-preference": "^0.6.0",
"@hcengineering/workbench": "^0.6.16",
"@hcengineering/model-workbench": "^0.6.1",
"@hcengineering/card-resources": "^0.6.0",
"@hcengineering/view": "^0.6.13",
"@hcengineering/tags": "^0.6.16"
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/chunter": "workspace:^0.7.0",
"@hcengineering/model-setting": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/time": "workspace:^0.7.0",
"@hcengineering/card": "workspace:^0.7.0",
"@hcengineering/model-attachment": "workspace:^0.7.0",
"@hcengineering/model-guest": "workspace:^0.7.0",
"@hcengineering/model-presentation": "workspace:^0.7.0",
"@hcengineering/model-preference": "workspace:^0.7.0",
"@hcengineering/workbench": "workspace:^0.7.0",
"@hcengineering/model-workbench": "workspace:^0.7.0",
"@hcengineering/card-resources": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/tags": "workspace:^0.7.0"
}
}
+29 -1
View File
@@ -14,7 +14,7 @@
import { type Builder } from '@hcengineering/model'
import presentation from '@hcengineering/model-presentation'
import setting from '@hcengineering/model-setting'
import view, { createAction } from '@hcengineering/model-view'
import view, { actionTemplates, createAction } from '@hcengineering/model-view'
import workbench from '@hcengineering/model-workbench'
import card from './plugin'
@@ -101,6 +101,24 @@ export function createActions (builder: Builder): void {
card.action.UnsetParent
)
createAction(builder, {
action: view.actionImpl.CopyDocumentMarkdown,
actionProps: {
contentClass: card.class.Card,
contentField: 'content'
},
label: view.string.CopyDocumentMarkdown,
icon: view.icon.Print,
input: 'any',
category: card.category.Card,
target: card.class.Card,
query: {},
context: {
mode: ['context', 'browser'],
group: 'tools'
}
})
createAction(builder, {
action: view.actionImpl.ShowPopup,
actionProps: {
@@ -215,4 +233,14 @@ export function createActions (builder: Builder): void {
group: 'edit'
}
})
createAction(builder, {
...actionTemplates.move,
input: 'any',
target: card.class.Card,
context: {
mode: ['context', 'browser'],
group: 'edit'
}
})
}
+82 -24
View File
@@ -23,8 +23,10 @@ import {
type CreateCardExtension,
DOMAIN_CARD,
type FavoriteCard,
type FavoriteType,
type MasterTag,
type ParentInfo,
type PermissionObjectClass,
type Role,
type Tag
} from '@hcengineering/card'
@@ -32,8 +34,10 @@ import chunter from '@hcengineering/chunter'
import core, {
AccountRole,
type Blobs,
type Class,
ClassifierKind,
type CollectionSize,
type Doc,
DOMAIN_MODEL,
DOMAIN_SPACE,
IndexKind,
@@ -44,6 +48,7 @@ import core, {
SortingOrder
} from '@hcengineering/core'
import {
ArrOf,
type Builder,
Collection,
Hidden,
@@ -51,6 +56,7 @@ import {
Mixin,
Model,
Prop,
ReadOnly,
TypeCollaborativeDoc,
TypeNumber,
TypeRef,
@@ -58,7 +64,7 @@ import {
UX
} from '@hcengineering/model'
import attachment from '@hcengineering/model-attachment'
import { TAttachedDoc, TClass, TDoc, TMixin, TSpace } from '@hcengineering/model-core'
import { TRole as TBaseRole, TClass, TDoc, TMixin, TTypedSpace } from '@hcengineering/model-core'
import { createPublicLinkAction } from '@hcengineering/model-guest'
import preference, { TPreference } from '@hcengineering/model-preference'
import presentation from '@hcengineering/model-presentation'
@@ -70,8 +76,9 @@ import time, { type ToDo } from '@hcengineering/time'
import { PaletteColorIndexes } from '@hcengineering/ui/src/colors'
import { type AnyComponent } from '@hcengineering/ui/src/types'
import { type BuildModelKey } from '@hcengineering/view'
import card from './plugin'
import { createActions } from './actions'
import card from './plugin'
import { definePermissions } from './permissions'
export { cardId } from '@hcengineering/card'
@@ -91,6 +98,11 @@ export class TTag extends TMixin implements Tag {
@Model(card.class.Card, core.class.Doc, DOMAIN_CARD)
@UX(card.string.Card, card.icon.Card)
export class TCard extends TDoc implements Card {
@Prop(TypeRef(card.class.CardSpace), core.string.Space)
@Index(IndexKind.Indexed)
@ReadOnly()
declare space: Ref<CardSpace>
@Prop(TypeRef(card.class.MasterTag), card.string.MasterTag)
declare _class: Ref<MasterTag>
@@ -128,12 +140,17 @@ export class TCard extends TDoc implements Card {
children?: number
parentInfo!: ParentInfo[]
@Hidden()
@ReadOnly()
peerId?: string
}
@Model(card.class.CardSpace, core.class.Space, DOMAIN_SPACE)
@Model(card.class.CardSpace, core.class.TypedSpace, DOMAIN_SPACE)
@UX(core.string.Space)
export class TCardSpace extends TSpace implements CardSpace {
types!: Ref<MasterTag>[]
export class TCardSpace extends TTypedSpace implements CardSpace {
@Prop(ArrOf(TypeRef(card.class.MasterTag)), card.string.MasterTags)
types!: Ref<MasterTag>[]
}
@Model(card.class.MasterTagEditorSection, core.class.Doc, DOMAIN_MODEL)
@@ -158,11 +175,9 @@ export class TCardViewDefaults extends TMasterTag implements CardViewDefaults {
defaultNavigation?: string
}
@Model(card.class.Role, core.class.AttachedDoc, DOMAIN_MODEL)
export class TRole extends TAttachedDoc implements Role {
name!: string
declare attachedTo: Ref<MasterTag | Tag>
declare collection: 'roles'
@Model(card.class.Role, core.class.Role, DOMAIN_MODEL)
export class TRole extends TBaseRole implements Role {
type!: Ref<MasterTag | Tag>
}
@Model(card.class.FavoriteCard, preference.class.Preference)
@@ -171,6 +186,16 @@ export class TFavoriteCard extends TPreference implements FavoriteCard {
application!: string
}
@Model(card.class.FavoriteType, preference.class.Preference)
export class TFavoriteType extends TPreference implements FavoriteType {
declare attachedTo: Ref<MasterTag>
}
@Model(card.class.PermissionObjectClass, core.class.Doc, DOMAIN_MODEL)
export class TPermissionObjectClass extends TDoc implements PermissionObjectClass {
objectClass!: Ref<Class<Doc>>
}
@Mixin(card.mixin.CreateCardExtension, card.class.MasterTag)
export class TCreateCardExtension extends TMasterTag implements CreateCardExtension {
component?: AnyComponent
@@ -291,7 +316,8 @@ export function createSystemType (
attachTo: type,
descriptor: view.viewlet.Table,
configOptions: {
hiddenKeys: ['content', 'title']
hiddenKeys: ['content', 'title'],
sortable: true
},
config: [
{ key: '', props: { shrink: true } },
@@ -338,6 +364,7 @@ export function createSystemType (
export function createModel (builder: Builder): void {
builder.createModel(
TPermissionObjectClass,
TMasterTag,
TTag,
TCard,
@@ -347,10 +374,24 @@ export function createModel (builder: Builder): void {
TCardSection,
TCardViewDefaults,
TFavoriteCard,
TFavoriteType,
TCreateCardExtension
)
builder.createDoc(
core.class.SpaceType,
core.space.Model,
{
name: '',
descriptor: core.descriptor.SpacesType,
roles: 0,
targetClass: core.mixin.SpacesTypeData
},
card.spaceType.SpaceType
)
defineTabs(builder)
definePermissions(builder)
builder.mixin(card.class.Card, core.class.Class, view.mixin.ObjectIcon, {
component: card.component.CardIcon
@@ -381,7 +422,8 @@ export function createModel (builder: Builder): void {
attachTo: card.class.CardSpace,
descriptor: view.viewlet.Table,
configOptions: {
hiddenKeys: ['name', 'description']
hiddenKeys: ['name', 'description'],
sortable: true
},
config: ['', 'members', 'private', 'archived'],
viewOptions: {
@@ -442,24 +484,35 @@ export function createModel (builder: Builder): void {
componentProps: {
_class: card.class.CardSpace,
icon: view.icon.List,
label: core.string.Spaces
label: core.string.Spaces,
createLabel: card.string.CreateSpace,
createComponent: card.component.CreateSpace
},
position: 'top'
}
],
spaces: [
spaces: [],
groups: [
{
id: 'spaces',
label: core.string.Spaces,
spaceClass: card.class.CardSpace,
addSpaceLabel: core.string.Space,
icon: card.icon.Space,
// intentionally left empty in order to make space presenter working
specials: []
id: 'types',
label: card.string.MasterTags,
groupByClass: card.class.MasterTag,
icon: card.icon.MasterTags,
component: card.component.TypesNavigator,
specials: [
{
id: 'type',
label: card.string.Cards,
component: card.component.Main,
componentProps: {
defaultViewletDescriptor: card.viewlet.CardFeedDescriptor
}
}
]
}
]
},
navHeaderComponent: card.component.NewCardHeader
navHeaderActions: card.component.CardHeaderButton
},
card.app.Card
)
@@ -483,7 +536,8 @@ export function createModel (builder: Builder): void {
attachTo: card.class.Card,
descriptor: view.viewlet.Table,
configOptions: {
hiddenKeys: ['content', 'title']
hiddenKeys: ['content', 'title'],
sortable: true
},
config: [
'',
@@ -574,6 +628,10 @@ export function createModel (builder: Builder): void {
presenter: card.component.CardPresenter
})
builder.mixin(card.class.Card, core.class.Class, view.mixin.CollectionPresenter, {
presenter: card.component.CardsPresenter
})
builder.mixin(card.class.FavoriteCard, core.class.Class, view.mixin.ObjectPresenter, {
presenter: card.component.FavoriteCardPresenter
})
@@ -658,7 +716,7 @@ export function createModel (builder: Builder): void {
)
builder.mixin(card.class.Card, core.class.Class, view.mixin.ClassFilters, {
filters: [],
filters: ['space'],
ignoreKeys: ['parent']
})
+57 -2
View File
@@ -13,8 +13,16 @@
// limitations under the License.
//
import { type Card, cardId, DOMAIN_CARD } from '@hcengineering/card'
import core, { DOMAIN_MODEL, type Ref, TxOperations, type Client, type Data, type Doc } from '@hcengineering/core'
import cardPlugin, { type Card, cardId, DOMAIN_CARD, type Role } from '@hcengineering/card'
import core, {
DOMAIN_MODEL,
type Ref,
TxOperations,
type Client,
type Data,
type Doc,
type DocumentUpdate
} from '@hcengineering/core'
import {
tryMigrate,
tryUpgrade,
@@ -77,11 +85,47 @@ export const cardOperation: MigrateOperation = {
state: 'fill-parent-info',
mode: 'upgrade',
func: fillParentInfo
},
{
state: 'make-config-sortable',
mode: 'upgrade',
func: makeConfigSortable
},
{
state: 'migrate-roles-v2',
mode: 'upgrade',
func: migrateRolesToBaseRole
},
{
state: 'add-space-type',
mode: 'upgrade',
func: addSpaceType
}
])
}
}
async function addSpaceType (client: MigrationUpgradeClient): Promise<void> {
const txOp = new TxOperations(client, core.account.System)
const spaces = await client.findAll(card.class.CardSpace, { type: { $exists: false } })
for (const space of spaces) {
await txOp.diffUpdate(space, { type: cardPlugin.spaceType.SpaceType })
}
}
async function migrateRolesToBaseRole (client: MigrationUpgradeClient): Promise<void> {
const txOp = new TxOperations(client, core.account.System)
const roles = await client.findAll(card.class.Role, { attachedTo: { $ne: cardPlugin.spaceType.SpaceType } })
for (const role of roles) {
const baseRoleData: DocumentUpdate<Role> = {
type: role.attachedTo as any,
attachedTo: cardPlugin.spaceType.SpaceType,
attachedToClass: core.class.SpaceType
}
await txOp.update(role, baseRoleData)
}
}
async function fillParentInfo (client: Client): Promise<void> {
const txOp = new TxOperations(client, core.account.System)
const cards = await client.findAll(card.class.Card, { parentInfo: { $exists: false }, parent: { $ne: null } })
@@ -244,6 +288,7 @@ async function createDefaultProject (tx: TxOperations): Promise<void> {
members: [],
archived: false,
autoJoin: true,
type: card.spaceType.SpaceType,
types: topLevelTypes.map((it) => it._id)
},
card.space.Default
@@ -328,3 +373,13 @@ async function updateCustomFieldsDisplayProps (client: MigrationClient): Promise
}
}
}
async function makeConfigSortable (client: Client): Promise<void> {
const txOp = new TxOperations(client, core.account.System)
const masterTags = await client.findAll(card.class.MasterTag, {})
const currentViewlets = await client.findAll(view.class.Viewlet, { attachTo: { $in: masterTags.map((p) => p._id) } })
for (const currentViewlet of currentViewlets) {
const configOptions = { ...currentViewlet.configOptions, sortable: true }
await txOp.update(currentViewlet, { configOptions })
}
}
+153
View File
@@ -0,0 +1,153 @@
// Copyright © 2025 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
import core from '@hcengineering/core'
import { type Builder } from '@hcengineering/model'
import card from '.'
export function definePermissions (builder: Builder): void {
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.AddTagPermission,
txClass: core.class.TxMixin,
objectClass: card.class.Card,
scope: 'space'
},
card.permission.AddTag
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.RemoveTag,
txClass: core.class.TxUpdateDoc,
txMatch: {
'operations.$unset': {
$exists: true
}
},
objectClass: card.class.Card,
scope: 'space'
},
card.permission.RemoveTag
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.CreateCardPermission,
txClass: core.class.TxCreateDoc,
objectClass: card.class.Card,
scope: 'space'
},
card.permission.CreateCard
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.UpdateCard,
txClass: core.class.TxUpdateDoc,
objectClass: card.class.Card,
scope: 'space'
},
card.permission.UpdateCard
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.RemoveCard,
txClass: core.class.TxRemoveDoc,
objectClass: card.class.Card,
scope: 'space'
},
card.permission.RemoveCard
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.ForbidAddTagPermission,
txClass: core.class.TxMixin,
objectClass: card.class.Card,
scope: 'space',
forbid: true
},
card.permission.ForbidAddTag
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.ForbidRemoveTag,
txClass: core.class.TxUpdateDoc,
txMatch: {
'operations.$unset': {
$exists: true
}
},
objectClass: card.class.Card,
scope: 'space',
forbid: true
},
card.permission.ForbidRemoveTag
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.ForbidCreateCardPermission,
txClass: core.class.TxCreateDoc,
objectClass: card.class.Card,
scope: 'space',
forbid: true
},
card.permission.ForbidCreateCard
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.ForbidUpdateCard,
txClass: core.class.TxUpdateDoc,
objectClass: card.class.Card,
scope: 'space',
forbid: true
},
card.permission.ForbidUpdateCard
)
builder.createDoc(
core.class.Permission,
core.space.Model,
{
label: card.string.ForbidRemoveCard,
txClass: core.class.TxRemoveDoc,
objectClass: card.class.Card,
scope: 'space',
forbid: true
},
card.permission.ForbidRemoveCard
)
}
+26 -4
View File
@@ -17,11 +17,11 @@ import { type Card, cardId } from '@hcengineering/card'
import card from '@hcengineering/card-resources/src/plugin'
import type { Client, Doc, Ref } from '@hcengineering/core'
import {} from '@hcengineering/core'
import { mergeIds, type Resource } from '@hcengineering/platform'
import { type Location, type ResolvedLocation } from '@hcengineering/ui/src/types'
import { type LocationData } from '@hcengineering/workbench'
import { type ActionCategory, type Action, type ViewAction } from '@hcengineering/view'
import { type IntlString, mergeIds, type Resource } from '@hcengineering/platform'
import { type TagCategory } from '@hcengineering/tags'
import { type Location, type ResolvedLocation } from '@hcengineering/ui/src/types'
import { type Action, type ActionCategory, type ViewAction } from '@hcengineering/view'
import { type LocationData } from '@hcengineering/workbench'
export default mergeIds(cardId, card, {
app: {
@@ -37,6 +37,28 @@ export default mergeIds(cardId, card, {
UnsetParent: '' as Ref<Action<Doc, any>>,
PublicLink: '' as Ref<Action<Doc, any>>
},
string: {
CreateCardPersmissionDescription: '' as IntlString,
UpdateCardPersmissionDescription: '' as IntlString,
RemoveCardPersmissionDescription: '' as IntlString,
AddTagPersmissionDescription: '' as IntlString,
RemoveTagPersmissionDescription: '' as IntlString,
RemoveCard: '' as IntlString,
UpdateCard: '' as IntlString,
CreateCardPermission: '' as IntlString,
AddTagPermission: '' as IntlString,
RemoveTag: '' as IntlString,
ForbidCreateCardPersmissionDescription: '' as IntlString,
ForbidUpdateCardPersmissionDescription: '' as IntlString,
ForbidRemoveCardPersmissionDescription: '' as IntlString,
ForbidAddTagPersmissionDescription: '' as IntlString,
ForbidRemoveTagPersmissionDescription: '' as IntlString,
ForbidRemoveCard: '' as IntlString,
ForbidUpdateCard: '' as IntlString,
ForbidCreateCardPermission: '' as IntlString,
ForbidAddTagPermission: '' as IntlString,
ForbidRemoveTag: '' as IntlString
},
category: {
Card: '' as Ref<ActionCategory>,
Labels: '' as Ref<TagCategory>
+21 -21
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-chat",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,36 +18,36 @@
"_phase:test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/card": "^0.6.0",
"@hcengineering/communication": "^0.6.0",
"@hcengineering/chat": "^0.6.0",
"@hcengineering/chat-resources": "^0.6.0",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-card": "^0.6.0",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/model-workbench": "^0.6.1",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/view": "^0.6.13",
"@hcengineering/workbench": "^0.6.16"
"@hcengineering/card": "workspace:^0.7.0",
"@hcengineering/communication": "workspace:^0.7.0",
"@hcengineering/chat": "workspace:^0.7.0",
"@hcengineering/chat-resources": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-card": "workspace:^0.7.0",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/model-workbench": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/setting": "workspace:^0.7.0",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/workbench": "workspace:^0.7.0"
}
}
+2 -3
View File
@@ -18,7 +18,7 @@ import core from '@hcengineering/model-core'
import workbench from '@hcengineering/model-workbench'
import { chatId } from '@hcengineering/chat'
import { createSystemType } from '@hcengineering/model-card'
import communication, { MessagesNavigationAnchors } from '@hcengineering/communication'
import communication from '@hcengineering/communication'
import { PaletteColorIndexes } from '@hcengineering/ui/src/colors'
import chat from './plugin'
@@ -55,8 +55,7 @@ export function createModel (builder: Builder): void {
chat.string.Thread,
chat.string.Threads,
{
defaultSection: communication.ids.CardMessagesSection,
defaultNavigation: MessagesNavigationAnchors.LatestMessages
defaultSection: communication.ids.CardMessagesSection
},
PaletteColorIndexes.Houseplant
)
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "@hcengineering/model-chunter",
"entries": [
{
"version": "0.6.0",
"version": "0.7.0",
"tag": "@hcengineering/model-chunter_v0.6.0",
"date": "Sun, 08 Aug 2021 10:14:57 GMT",
"comments": {
+25 -25
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-chunter",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,40 +18,40 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.54.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/activity": "^0.6.0",
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/chunter": "^0.6.20",
"@hcengineering/chunter-resources": "^0.6.0",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-attachment": "^0.6.0",
"@hcengineering/model-activity": "^0.6.0",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-notification": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/model-workbench": "^0.6.1",
"@hcengineering/model-presentation": "^0.6.0",
"@hcengineering/notification": "^0.6.23",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/view": "^0.6.13",
"@hcengineering/workbench": "^0.6.16"
"@hcengineering/activity": "workspace:^0.7.0",
"@hcengineering/attachment": "workspace:^0.7.0",
"@hcengineering/chunter": "workspace:^0.7.0",
"@hcengineering/chunter-resources": "workspace:^0.7.0",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-attachment": "workspace:^0.7.0",
"@hcengineering/model-activity": "workspace:^0.7.0",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-notification": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/model-workbench": "workspace:^0.7.0",
"@hcengineering/model-presentation": "workspace:^0.7.0",
"@hcengineering/notification": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/view": "workspace:^0.7.0",
"@hcengineering/workbench": "workspace:^0.7.0"
}
}
+16 -2
View File
@@ -175,10 +175,24 @@ export function createModel (builder: Builder): void {
attachTo: chunter.class.Channel,
descriptor: view.viewlet.Table,
configOptions: {
strict: true
hiddenKeys: ['name', 'description']
},
config: ['', 'topic', 'private', 'archived', 'members'],
props: { enableChecking: false }
props: { enableChecking: false },
viewOptions: {
groupBy: [],
orderBy: [],
other: [
{
key: 'hideArchived',
type: 'toggle',
defaultValue: true,
actionTarget: 'options',
action: view.function.HideArchived,
label: view.string.HideArchived
}
]
}
},
chunter.viewlet.Channels
)
+12 -1
View File
@@ -22,7 +22,8 @@ import {
TypeMarkup,
TypeRef,
TypeString,
UX
UX,
Hidden
} from '@hcengineering/model'
import core, { TClass, TDoc, TSpace } from '@hcengineering/model-core'
import type {
@@ -42,6 +43,7 @@ import {
DOMAIN_MODEL,
IndexKind,
type Ref,
type Space,
type Timestamp
} from '@hcengineering/core'
import contact, { type ChannelProvider as SocialChannelProvider, type Person } from '@hcengineering/contact'
@@ -59,6 +61,15 @@ export const DOMAIN_CHUNTER = 'chunter' as Domain
export class TChunterSpace extends TSpace implements ChunterSpace {
@Prop(PropCollection(activity.class.ActivityMessage), chunter.string.Messages)
messages?: number
@Hidden()
__migratedToCard?: {
card: Ref<Doc>
space: Ref<Space>
}
@Hidden()
__migratedUntil?: Timestamp
}
@Model(chunter.class.Channel, chunter.class.ChunterSpace)
+20 -20
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/model-communication",
"version": "0.6.0",
"version": "0.7.0",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -18,35 +18,35 @@
"test": "jest --passWithNoTests --silent --forceExit"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@hcengineering/platform-rig": "^0.7.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.54.0",
"@typescript-eslint/parser": "^6.11.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"prettier": "^3.1.0",
"typescript": "^5.8.3",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"@types/node": "^22.15.29",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1"
},
"dependencies": {
"@hcengineering/card": "^0.6.0",
"@hcengineering/communication": "^0.6.0",
"@hcengineering/communication-resources": "^0.6.0",
"@hcengineering/communication-types": "^0.1.0",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/core": "^0.6.32",
"@hcengineering/model": "^0.6.11",
"@hcengineering/model-card": "^0.6.0",
"@hcengineering/model-core": "^0.6.0",
"@hcengineering/model-emoji": "^0.6.0",
"@hcengineering/model-view": "^0.6.0",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/setting": "^0.6.17"
"@hcengineering/card": "workspace:^0.7.0",
"@hcengineering/communication": "workspace:^0.7.0",
"@hcengineering/communication-resources": "workspace:^0.7.0",
"@hcengineering/communication-types": "^0.7.12",
"@hcengineering/contact": "workspace:^0.7.0",
"@hcengineering/core": "^0.7.21",
"@hcengineering/model": "^0.7.17",
"@hcengineering/model-card": "workspace:^0.7.0",
"@hcengineering/model-core": "workspace:^0.7.0",
"@hcengineering/model-emoji": "workspace:^0.7.0",
"@hcengineering/model-view": "workspace:^0.7.0",
"@hcengineering/platform": "^0.7.17",
"@hcengineering/ui": "workspace:^0.7.0",
"@hcengineering/setting": "workspace:^0.7.0"
}
}
-24
View File
@@ -12,9 +12,6 @@
// limitations under the License.
import { type Builder } from '@hcengineering/model'
import core from '@hcengineering/core'
import card from '@hcengineering/model-card'
import { MessagesNavigationAnchors } from '@hcengineering/communication'
import communication from './plugin'
import { buildTypes } from './types'
@@ -29,27 +26,6 @@ export function createModel (builder: Builder): void {
buildMessageActions(builder)
buildCardActions(builder)
buildApplets(builder)
builder.createDoc(
card.class.CardSection,
core.space.Model,
{
label: communication.string.Messages,
component: communication.component.CardMessagesSection,
order: 9999,
navigation: [
{
id: MessagesNavigationAnchors.ConversationStart,
label: communication.string.FirstMessages
},
{
id: MessagesNavigationAnchors.LatestMessages,
label: communication.string.LatestMessages
}
]
},
communication.ids.CardMessagesSection
)
}
export default communication
+2 -4
View File
@@ -25,8 +25,7 @@ import {
type Poll,
type CustomActivityPresenter,
type GuestCommunicationSettings,
type AppletGetTitleFnResource,
MessagesNavigationAnchors
type AppletGetTitleFnResource
} from '@hcengineering/communication'
import { PaletteColorIndexes } from '@hcengineering/ui/src/colors'
import { type AppletType } from '@hcengineering/communication-types'
@@ -100,8 +99,7 @@ function defineDirect (builder: Builder): void {
communication.string.Direct,
communication.string.Directs,
{
defaultSection: communication.ids.CardMessagesSection,
defaultNavigation: MessagesNavigationAnchors.LatestMessages
defaultSection: communication.ids.CardMessagesSection
},
PaletteColorIndexes.Lavander
)

Some files were not shown because too many files have changed in this diff Show More