From 6fcbd14d6fafcd2287ae44ea60d896da8a639a22 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Fri, 1 Apr 2022 12:57:22 +0700 Subject: [PATCH] Separate tracker deployment (#1245) Signed-off-by: Andrey Sobolev --- .github/workflows/main.yml | 10 +- .gitignore | 3 +- common/config/rush/pnpm-lock.yaml | 266 +++++++++++------- common/scripts/build_docker.sh | 2 +- dev/client-resources/src/index.ts | 1 - dev/docker-compose.yaml | 20 ++ dev/prod/package.json | 5 +- dev/prod/src/platform.ts | 13 +- models/all/src/creation.ts | 2 + models/all/src/index.ts | 93 +++--- models/core/src/core.ts | 7 + models/core/src/index.ts | 4 +- models/tracker/src/creation.ts | 7 +- packages/core/src/classes.ts | 9 + packages/core/src/client.ts | 84 +++++- packages/core/src/component.ts | 5 +- packages/core/src/query.ts | 1 - packages/model/src/dsl.ts | 9 +- packages/platform/src/resource.ts | 8 + packages/presentation/src/index.ts | 28 +- .../src/components/StyledTextBox.svelte | 6 + packages/text-editor/src/index.ts | 10 +- packages/ui/src/index.ts | 4 +- plugins/client-resources/src/index.ts | 11 +- plugins/client/src/index.ts | 3 +- .../src/components/review/EditReview.svelte | 1 - .../src/components/EditIssue.svelte | 2 +- .../src/components/issues/EditIssue.svelte | 2 +- .../src/components/StringPresenter.svelte | 5 + .../src/components/Workbench.svelte | 6 +- .../src/components/WorkbenchApp.svelte | 5 +- plugins/workbench/src/index.ts | 6 +- products/tracker/.browserslistrc | 1 + products/tracker/.env | 10 + products/tracker/.env-prod | 3 + products/tracker/.gitignore | 3 + products/tracker/Dockerfile | 9 + products/tracker/config.json | 5 + products/tracker/package.json | 125 ++++++++ products/tracker/postcss.config.js | 5 + products/tracker/public/config.json | 5 + products/tracker/public/favicon.ico | Bin 0 -> 1150 bytes products/tracker/public/favicon.png | Bin 0 -> 4067 bytes products/tracker/public/favicon.svg | 5 + products/tracker/public/favicon_16.png | Bin 0 -> 434 bytes products/tracker/public/favicon_192.png | Bin 0 -> 6575 bytes products/tracker/public/favicon_32.png | Bin 0 -> 961 bytes products/tracker/src/index.ejs | 20 ++ products/tracker/src/main-dev.ts | 31 ++ products/tracker/src/main.ts | 22 ++ products/tracker/src/platform-dev.ts | 68 +++++ products/tracker/src/platform.ts | 101 +++++++ products/tracker/tsconfig.json | 16 ++ products/tracker/webpack.config.js | 36 +++ rush.json | 9 +- tests/install-elastic-plugin.sh | 7 + 56 files changed, 904 insertions(+), 215 deletions(-) create mode 100644 products/tracker/.browserslistrc create mode 100644 products/tracker/.env create mode 100644 products/tracker/.env-prod create mode 100644 products/tracker/.gitignore create mode 100644 products/tracker/Dockerfile create mode 100644 products/tracker/config.json create mode 100644 products/tracker/package.json create mode 100644 products/tracker/postcss.config.js create mode 100644 products/tracker/public/config.json create mode 100644 products/tracker/public/favicon.ico create mode 100644 products/tracker/public/favicon.png create mode 100644 products/tracker/public/favicon.svg create mode 100644 products/tracker/public/favicon_16.png create mode 100644 products/tracker/public/favicon_192.png create mode 100644 products/tracker/public/favicon_32.png create mode 100644 products/tracker/src/index.ejs create mode 100644 products/tracker/src/main-dev.ts create mode 100644 products/tracker/src/main.ts create mode 100644 products/tracker/src/platform-dev.ts create mode 100644 products/tracker/src/platform.ts create mode 100644 products/tracker/tsconfig.json create mode 100644 products/tracker/webpack.config.js create mode 100755 tests/install-elastic-plugin.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2fd50c2f8e..de5faa5230 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,6 +69,7 @@ jobs: packages plugins pods + products server server-plugins templates @@ -99,6 +100,7 @@ jobs: packages plugins pods + products server server-plugins templates @@ -132,6 +134,7 @@ jobs: packages plugins pods + products server server-plugins templates @@ -165,6 +168,7 @@ jobs: packages plugins pods + products server server-plugins templates @@ -210,6 +214,7 @@ jobs: packages plugins pods + products server server-plugins templates @@ -222,9 +227,9 @@ jobs: - name: Installing... run: node common/scripts/install-run-rush.js install - name: Bundle - run: node common/scripts/install-run-rush.js bundle + run: node common/scripts/install-run-rush.js bundle --verbose - name: Docker build - run: node common/scripts/install-run-rush.js docker:build + run: node common/scripts/install-run-rush.js docker:build --verbose - name: Prepare server run: | cd ./tests @@ -266,6 +271,7 @@ jobs: packages plugins pods + products server server-plugins templates diff --git a/.gitignore b/.gitignore index 48fa07649d..fb78ca92f0 100644 --- a/.gitignore +++ b/.gitignore @@ -70,4 +70,5 @@ common/autoinstallers/*/.npmrc **/.rush/temp/ bundle.js dist -tsconfig.tsbuildinfo \ No newline at end of file +tsconfig.tsbuildinfo +ingest-attachment-*.zip \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 03cceea8b1..f8cdf10a1d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -80,12 +80,12 @@ specifiers: '@rush-temp/model-server-task': file:./projects/model-server-task.tgz '@rush-temp/model-server-telegram': file:./projects/model-server-telegram.tgz '@rush-temp/model-setting': file:./projects/model-setting.tgz - '@rush-temp/model-tracker': file:./projects/model-tracker.tgz '@rush-temp/model-tags': file:./projects/model-tags.tgz '@rush-temp/model-task': file:./projects/model-task.tgz '@rush-temp/model-telegram': file:./projects/model-telegram.tgz '@rush-temp/model-templates': file:./projects/model-templates.tgz '@rush-temp/model-text-editor': file:./projects/model-text-editor.tgz + '@rush-temp/model-tracker': file:./projects/model-tracker.tgz '@rush-temp/model-view': file:./projects/model-view.tgz '@rush-temp/model-workbench': file:./projects/model-workbench.tgz '@rush-temp/mongo': file:./projects/mongo.tgz @@ -98,6 +98,7 @@ specifiers: '@rush-temp/pod-account': file:./projects/pod-account.tgz '@rush-temp/presentation': file:./projects/presentation.tgz '@rush-temp/prod': file:./projects/prod.tgz + '@rush-temp/prod-tracker': file:./projects/prod-tracker.tgz '@rush-temp/query': file:./projects/query.tgz '@rush-temp/recruit': file:./projects/recruit.tgz '@rush-temp/recruit-assets': file:./projects/recruit-assets.tgz @@ -137,9 +138,6 @@ specifiers: '@rush-temp/setting': file:./projects/setting.tgz '@rush-temp/setting-assets': file:./projects/setting-assets.tgz '@rush-temp/setting-resources': file:./projects/setting-resources.tgz - '@rush-temp/tracker': file:./projects/tracker.tgz - '@rush-temp/tracker-assets': file:./projects/tracker-assets.tgz - '@rush-temp/tracker-resources': file:./projects/tracker-resources.tgz '@rush-temp/tags': file:./projects/tags.tgz '@rush-temp/tags-assets': file:./projects/tags-assets.tgz '@rush-temp/tags-resources': file:./projects/tags-resources.tgz @@ -156,6 +154,9 @@ specifiers: '@rush-temp/text-editor': file:./projects/text-editor.tgz '@rush-temp/theme': file:./projects/theme.tgz '@rush-temp/tool': file:./projects/tool.tgz + '@rush-temp/tracker': file:./projects/tracker.tgz + '@rush-temp/tracker-assets': file:./projects/tracker-assets.tgz + '@rush-temp/tracker-resources': file:./projects/tracker-resources.tgz '@rush-temp/ui': file:./projects/ui.tgz '@rush-temp/view': file:./projects/view.tgz '@rush-temp/view-assets': file:./projects/view-assets.tgz @@ -343,12 +344,12 @@ dependencies: '@rush-temp/model-server-task': file:projects/model-server-task.tgz_typescript@4.5.4 '@rush-temp/model-server-telegram': file:projects/model-server-telegram.tgz_typescript@4.5.4 '@rush-temp/model-setting': file:projects/model-setting.tgz_typescript@4.5.4 - '@rush-temp/model-tracker': file:projects/model-tracker.tgz_typescript@4.5.4 '@rush-temp/model-tags': file:projects/model-tags.tgz_typescript@4.5.4 '@rush-temp/model-task': file:projects/model-task.tgz_typescript@4.5.4 '@rush-temp/model-telegram': file:projects/model-telegram.tgz_typescript@4.5.4 '@rush-temp/model-templates': file:projects/model-templates.tgz_typescript@4.5.4 '@rush-temp/model-text-editor': file:projects/model-text-editor.tgz_typescript@4.5.4 + '@rush-temp/model-tracker': file:projects/model-tracker.tgz_typescript@4.5.4 '@rush-temp/model-view': file:projects/model-view.tgz_typescript@4.5.4 '@rush-temp/model-workbench': file:projects/model-workbench.tgz_typescript@4.5.4 '@rush-temp/mongo': file:projects/mongo.tgz @@ -361,6 +362,7 @@ dependencies: '@rush-temp/pod-account': file:projects/pod-account.tgz '@rush-temp/presentation': file:projects/presentation.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/prod': file:projects/prod.tgz_a07ec81d4d975778878ca12202ea119e + '@rush-temp/prod-tracker': file:projects/prod-tracker.tgz_a07ec81d4d975778878ca12202ea119e '@rush-temp/query': file:projects/query.tgz '@rush-temp/recruit': file:projects/recruit.tgz '@rush-temp/recruit-assets': file:projects/recruit-assets.tgz_typescript@4.5.4 @@ -400,9 +402,6 @@ dependencies: '@rush-temp/setting': file:projects/setting.tgz '@rush-temp/setting-assets': file:projects/setting-assets.tgz_typescript@4.5.4 '@rush-temp/setting-resources': file:projects/setting-resources.tgz_096c09b0b673a57c275d9767a12070b1 - '@rush-temp/tracker': file:projects/tracker.tgz - '@rush-temp/tracker-assets': file:projects/tracker-assets.tgz_typescript@4.5.4 - '@rush-temp/tracker-resources': file:projects/tracker-resources.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/tags': file:projects/tags.tgz '@rush-temp/tags-assets': file:projects/tags-assets.tgz '@rush-temp/tags-resources': file:projects/tags-resources.tgz_096c09b0b673a57c275d9767a12070b1 @@ -419,6 +418,9 @@ dependencies: '@rush-temp/text-editor': file:projects/text-editor.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/theme': file:projects/theme.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/tool': file:projects/tool.tgz + '@rush-temp/tracker': file:projects/tracker.tgz + '@rush-temp/tracker-assets': file:projects/tracker-assets.tgz_typescript@4.5.4 + '@rush-temp/tracker-resources': file:projects/tracker-resources.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/ui': file:projects/ui.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/view': file:projects/view.tgz '@rush-temp/view-assets': file:projects/view-assets.tgz_typescript@4.5.4 @@ -12448,7 +12450,7 @@ packages: dev: false file:projects/model-all.tgz_typescript@4.5.4: - resolution: {integrity: sha512-LFMD9UgTqaXrqIVbVyZudBvzL8xL6KphHnShut9no15Y5ZozOYv9hksYqBU959YFHClTkUI22XzwaFUPTSideA==, tarball: file:projects/model-all.tgz} + resolution: {integrity: sha512-lWOQv1FZnBGezRQTGOgS5vsZet1ex1Rlq1zid1v6aWHhmU8dZ6bt/msHNig4h1ugHZRGm5MOzhvLvtem5pvYUA==, tarball: file:projects/model-all.tgz} id: file:projects/model-all.tgz name: '@rush-temp/model-all' version: 0.0.0 @@ -13059,27 +13061,6 @@ packages: - typescript dev: false - file:projects/model-tracker.tgz_typescript@4.5.4: - resolution: {integrity: sha512-PWxsEQ61Fe/moBL+dROHGw2bQRaaJBL/N7HozRZPxXoRfXkH/DwNMvH/UofBL4mIFVs8FfQU03FaFnNdahgNZw==, tarball: file:projects/model-tracker.tgz} - id: file:projects/model-tracker.tgz - name: '@rush-temp/model-tracker' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - transitivePeerDependencies: - - supports-color - - typescript - dev: false - file:projects/model-tags.tgz_typescript@4.5.4: resolution: {integrity: sha512-tRhFRRosgUsAll6FSrGLSKycNeDNbH8M2JTvhOrMOQjsVafRvCz+oM+/sHg+tln4CSFTxU/+9cjPfHfQNx5fVA==, tarball: file:projects/model-tags.tgz} id: file:projects/model-tags.tgz @@ -13186,6 +13167,27 @@ packages: - typescript dev: false + file:projects/model-tracker.tgz_typescript@4.5.4: + resolution: {integrity: sha512-Cvk6XIrF0NOsFKh1T81iJVUELDVRZGmGgZk0PSNRf0h8YQ5NUSDwtVhlfcFYgMkjgwGLG3B/SgTR+0AM8moL6g==, tarball: file:projects/model-tracker.tgz} + id: file:projects/model-tracker.tgz + name: '@rush-temp/model-tracker' + version: 0.0.0 + dependencies: + '@rushstack/heft': 0.41.8 + '@types/heft-jest': 1.0.2 + '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 + '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 + eslint: 7.32.0 + eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a + eslint-plugin-import: 2.25.3_eslint@7.32.0 + eslint-plugin-node: 11.1.0_eslint@7.32.0 + eslint-plugin-promise: 5.2.0_eslint@7.32.0 + prettier: 2.5.1 + transitivePeerDependencies: + - supports-color + - typescript + dev: false + file:projects/model-view.tgz_typescript@4.5.4: resolution: {integrity: sha512-xytdeNDVvutTczeeuGL1Lq0znNNLf6rjQjVG8ZoEjsTwMXVrho30xfPqKcBnyQC9sO0QRhPltSVdqV8GBCwnag==, tarball: file:projects/model-view.tgz} id: file:projects/model-view.tgz @@ -13503,8 +13505,54 @@ packages: - supports-color dev: false + file:projects/prod-tracker.tgz_a07ec81d4d975778878ca12202ea119e: + resolution: {integrity: sha512-ml5yu/H4Tqliw+NJQ3SJtajDjqJe+bMRtmG/yU0C7Yktuiz1KefgUnIzftkpLoVx1tFQhs9hLkIG2dYLp0GgPg==, tarball: file:projects/prod-tracker.tgz} + id: file:projects/prod-tracker.tgz + name: '@rush-temp/prod-tracker' + version: 0.0.0 + dependencies: + '@types/node': 16.11.14 + autoprefixer: 10.4.0_postcss@8.4.5 + compression-webpack-plugin: 9.0.1_webpack@5.65.0 + cross-env: 7.0.3 + css-loader: 5.2.7_webpack@5.65.0 + dotenv-webpack: 7.0.3_webpack@5.65.0 + file-loader: 6.2.0_webpack@5.65.0 + html-webpack-plugin: 5.5.0_webpack@5.65.0 + mini-css-extract-plugin: 2.4.5_webpack@5.65.0 + postcss: 8.4.5 + postcss-load-config: 3.1.0_ts-node@10.5.0 + postcss-loader: 6.2.1_postcss@8.4.5+webpack@5.65.0 + sass-loader: 12.4.0_sass@1.45.0+webpack@5.65.0 + style-loader: 3.3.1_webpack@5.65.0 + svelte: 3.44.3 + svelte-loader: 3.1.2_svelte@3.44.3 + svgo-loader: 3.0.0 + ts-loader: 9.2.6_typescript@4.5.4+webpack@5.65.0 + webpack: 5.65.0_9def3870c80213359789f9191dbd286a + webpack-bundle-analyzer: 4.5.0 + webpack-cli: 4.9.1_4f2dbb6d08811eb2952e58098bb53992 + webpack-dev-server: 4.7.4_webpack-cli@4.9.1+webpack@5.65.0 + transitivePeerDependencies: + - '@swc/core' + - '@webpack-cli/generators' + - '@webpack-cli/migrate' + - acorn + - bufferutil + - debug + - esbuild + - fibers + - node-sass + - sass + - supports-color + - ts-node + - typescript + - uglify-js + - utf-8-validate + dev: false + file:projects/prod.tgz_a07ec81d4d975778878ca12202ea119e: - resolution: {integrity: sha512-lAhrU2LvSbV+Hg0ug0LHYTe3RMC8MgyyuFOFXQNMwXftXqQfXkgciBMjWh+g9PB/aXcJwSLm3scgACCtGG0wWw==, tarball: file:projects/prod.tgz} + resolution: {integrity: sha512-nDyFjQ3sOea0YCtOVvhhquRWOZi521nMCYd2ClE8AEtL5d7gIAkCgqVROEpOVVuNppMm0f+m77pmeg409J+Cgw==, tarball: file:projects/prod.tgz} id: file:projects/prod.tgz name: '@rush-temp/prod' version: 0.0.0 @@ -14424,84 +14472,6 @@ packages: - supports-color dev: false - file:projects/tracker-assets.tgz_typescript@4.5.4: - resolution: {integrity: sha512-sTaCJb1JkS7lN4xuyIFPuQwlafQHtMB7yZ3lrWTX/MgMwxr4UWHnZODK631lGxhio4MlMgXX0KYqiDwfxnQJqg==, tarball: file:projects/tracker-assets.tgz} - id: file:projects/tracker-assets.tgz - name: '@rush-temp/tracker-assets' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@types/node': 16.11.14 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - transitivePeerDependencies: - - supports-color - - typescript - dev: false - - file:projects/tracker-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-IwrLGQsCGO7NtMvEY2i7mA81An6fhYDq8Y4aKYZKSX/ptG85/xCJ+YayjxbX70iUoogHJfgYGPTklPJjBAXIKg==, tarball: file:projects/tracker-resources.tgz} - id: file:projects/tracker-resources.tgz - name: '@rush-temp/tracker-resources' - version: 0.0.0 - dependencies: - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - eslint-plugin-svelte3: 3.2.1_eslint@7.32.0+svelte@3.44.3 - lexorank: 1.0.4 - prettier: 2.5.1 - prettier-plugin-svelte: 2.5.1_prettier@2.5.1+svelte@3.44.3 - sass: 1.45.0 - svelte: 3.44.3 - svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce - svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f - typescript: 4.5.4 - transitivePeerDependencies: - - '@babel/core' - - coffeescript - - less - - node-sass - - postcss - - postcss-load-config - - pug - - stylus - - sugarss - - supports-color - dev: false - - file:projects/tracker.tgz: - resolution: {integrity: sha512-4BE4OCd7TawHUfz5pI8hYADlDGMLsNrczRPbsuEy1hrA+4BSTkjn5rDDSZ3iu9TLtB3TV3anvbjiZhZOrbiDyw==, tarball: file:projects/tracker.tgz} - name: '@rush-temp/tracker' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - typescript: 4.5.4 - transitivePeerDependencies: - - supports-color - dev: false - file:projects/tags-assets.tgz: resolution: {integrity: sha512-c3kDt2CRIqT3lDJNJPawZ+M3j979cOkF1mYeRKUOsNQ1Zs9wnqXjxDxe1ZECpOAUbWXNhKj/Mru0XfEyaCxHQA==, tarball: file:projects/tags-assets.tgz} name: '@rush-temp/tags-assets' @@ -14957,6 +14927,84 @@ packages: - utf-8-validate dev: false + file:projects/tracker-assets.tgz_typescript@4.5.4: + resolution: {integrity: sha512-xhITadwF6UhanMThCsimB4+Cy5yh34Ig86wYOtV/8EZUJqrrfOSsIUQdXyvhx5E+JLWvE0K8E7CV8SdBCN3mUA==, tarball: file:projects/tracker-assets.tgz} + id: file:projects/tracker-assets.tgz + name: '@rush-temp/tracker-assets' + version: 0.0.0 + dependencies: + '@rushstack/heft': 0.41.8 + '@types/heft-jest': 1.0.2 + '@types/node': 16.11.14 + '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 + '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 + eslint: 7.32.0 + eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a + eslint-plugin-import: 2.25.3_eslint@7.32.0 + eslint-plugin-node: 11.1.0_eslint@7.32.0 + eslint-plugin-promise: 5.2.0_eslint@7.32.0 + prettier: 2.5.1 + transitivePeerDependencies: + - supports-color + - typescript + dev: false + + file:projects/tracker-resources.tgz_096c09b0b673a57c275d9767a12070b1: + resolution: {integrity: sha512-tMI7AyIGVwPUgsQTjkViq/8wuEVgtl8748Vl34qS0BOuKGvJJzRFwYzpEG+l8OUiqW71PuotxgSQWDQi2xWgpw==, tarball: file:projects/tracker-resources.tgz} + id: file:projects/tracker-resources.tgz + name: '@rush-temp/tracker-resources' + version: 0.0.0 + dependencies: + '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 + '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 + eslint: 7.32.0 + eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a + eslint-plugin-import: 2.25.3_eslint@7.32.0 + eslint-plugin-node: 11.1.0_eslint@7.32.0 + eslint-plugin-promise: 5.2.0_eslint@7.32.0 + eslint-plugin-svelte3: 3.2.1_eslint@7.32.0+svelte@3.44.3 + lexorank: 1.0.4 + prettier: 2.5.1 + prettier-plugin-svelte: 2.5.1_prettier@2.5.1+svelte@3.44.3 + sass: 1.45.0 + svelte: 3.44.3 + svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce + svelte-loader: 3.1.2_svelte@3.44.3 + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f + typescript: 4.5.4 + transitivePeerDependencies: + - '@babel/core' + - coffeescript + - less + - node-sass + - postcss + - postcss-load-config + - pug + - stylus + - sugarss + - supports-color + dev: false + + file:projects/tracker.tgz: + resolution: {integrity: sha512-UcgyfcNVHNOiPO9WiY3Runp1GMqtJJqdHIff7nT7tJqAvl3Vns5nASmjrED129zW6bvVQJmgcMSJbyN0E3EAeQ==, tarball: file:projects/tracker.tgz} + name: '@rush-temp/tracker' + version: 0.0.0 + dependencies: + '@rushstack/heft': 0.41.8 + '@types/heft-jest': 1.0.2 + '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 + '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 + eslint: 7.32.0 + eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a + eslint-plugin-import: 2.25.3_eslint@7.32.0 + eslint-plugin-node: 11.1.0_eslint@7.32.0 + eslint-plugin-promise: 5.2.0_eslint@7.32.0 + prettier: 2.5.1 + typescript: 4.5.4 + transitivePeerDependencies: + - supports-color + dev: false + file:projects/ui.tgz_096c09b0b673a57c275d9767a12070b1: resolution: {integrity: sha512-+VUS/8pCD2vXIMkRLWtVtXBIRBkYboAdHBsDdyusTWJPx6LKVwuUw77IJAosqQEhwREbpVYq7GdP5q5ZgmwGEg==, tarball: file:projects/ui.tgz} id: file:projects/ui.tgz diff --git a/common/scripts/build_docker.sh b/common/scripts/build_docker.sh index f01dbf5c30..bf10c161f5 100755 --- a/common/scripts/build_docker.sh +++ b/common/scripts/build_docker.sh @@ -1,6 +1,6 @@ #!/bin/bash -roots='./server/server ./server/front ./pods/account' +roots='./server/server ./server/front ./pods/account ./products/tracker' for r in $roots do diff --git a/dev/client-resources/src/index.ts b/dev/client-resources/src/index.ts index 8a97ca2854..2fabff121e 100644 --- a/dev/client-resources/src/index.ts +++ b/dev/client-resources/src/index.ts @@ -35,7 +35,6 @@ export default async () => { await createDeps(client) } // Check if we had dev hook for client. - // Check if we had dev hook for client. const hook = getMetadata(clientPlugin.metadata.ClientHook) if (hook !== undefined) { const hookProc = await getResource(hook) diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index ecd74188d6..659ff9b402 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -76,6 +76,26 @@ services: - MINIO_ENDPOINT=minio - MINIO_ACCESS_KEY=minioadmin - MINIO_SECRET_KEY=minioadmin + tracker-front: + image: hardcoreeng/tracker-front + links: + - mongodb + - minio + - elastic + - transactor + ports: + - 8084:8080 + environment: + - SERVER_PORT=8080 + - SERVER_SECRET=secret + - ACCOUNTS_URL=http://localhost:3000 + - FRONT_URL=http://localhost:8084 + - UPLOAD_URL=/files + - TRANSACTOR_URL=ws://localhost:3333 + - ELASTIC_URL=http://elastic:9200 + - MINIO_ENDPOINT=minio + - MINIO_ACCESS_KEY=minioadmin + - MINIO_SECRET_KEY=minioadmin transactor: image: hardcoreeng/transactor links: diff --git a/dev/prod/package.json b/dev/prod/package.json index 142fe756e6..9869d5b4ab 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -1,5 +1,5 @@ { - "name": "prod", + "name": "@anticrm/prod", "version": "1.0.1", "license": "EPL-2.0", "scripts": { @@ -134,6 +134,7 @@ "@anticrm/presentation": "~0.6.2", "@anticrm/tracker": "~0.6.0", "@anticrm/tracker-assets": "~0.6.0", - "@anticrm/tracker-resources": "~0.6.0" + "@anticrm/tracker-resources": "~0.6.0", + "@anticrm/text-editor": "~0.6.0" } } diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index d9074b23a5..3854a2f992 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -58,15 +58,18 @@ import '@anticrm/notification-assets' import '@anticrm/tags-assets' import '@anticrm/calendar-assets' import '@anticrm/tracker-assets' -import presentation from '@anticrm/presentation' +import presentation, { presentationId } from '@anticrm/presentation' +import { coreId } from '@anticrm/core' +import { textEditorId } from '@anticrm/text-editor' import { setMetadata } from '@anticrm/platform' + + export async function configurePlatform() { const config = await (await fetch('/config.json')).json() console.log('loading configuration', config) setMetadata(login.metadata.AccountsUrl, config.ACCOUNTS_URL) setMetadata(login.metadata.UploadUrl, config.UPLOAD_URL) - if( config.MODEL_VERSION != null) { console.log('Minimal Model version requirement', config.MODEL_VERSION) @@ -81,6 +84,10 @@ export async function configurePlatform() { setMetadata(uiPlugin.metadata.DefaultApplication, workbench.component.WorkbenchApp ) + addLocation(coreId, async () => ({ default: async () => ({}) })) + addLocation(presentationId, async () => ({ default: async () => ({}) })) + addLocation(textEditorId, async () => ({ default: async () => ({}) })) + addLocation(clientId, () => import(/* webpackChunkName: "client" */ '@anticrm/client-resources')) addLocation(loginId, () => import(/* webpackChunkName: "login" */ '@anticrm/login-resources')) addLocation(workbenchId, () => import(/* webpackChunkName: "workbench" */ '@anticrm/workbench-resources')) @@ -103,4 +110,6 @@ export async function configurePlatform() { addLocation(calendarId, () => import(/* webpackChunkName: "calendar" */ '@anticrm/calendar-resources')) addLocation(trackerId, () => import(/* webpackChunkName: "tracker" */ '@anticrm/tracker-resources')) + + setMetadata(workbench.metadata.PlatformTitle, 'Platform') } diff --git a/models/all/src/creation.ts b/models/all/src/creation.ts index 15df4b84b4..eee070331d 100644 --- a/models/all/src/creation.ts +++ b/models/all/src/creation.ts @@ -18,10 +18,12 @@ import { createDeps as createTaskDeps } from '@anticrm/model-task' import { createDeps as createLeadDeps } from '@anticrm/model-lead' import { createDeps as createRecruitDeps } from '@anticrm/model-recruit' import { createDeps as createDemoDeps } from '@anticrm/model-demo' +import { createDeps as createTrackerDeps } from '@anticrm/model-tracker' export async function createDeps (client: Client): Promise { await createTaskDeps(client) await createLeadDeps(client) await createRecruitDeps(client) await createDemoDeps(client) + await createTrackerDeps(client) } diff --git a/models/all/src/index.ts b/models/all/src/index.ts index 4507983c93..491cb54a75 100644 --- a/models/all/src/index.ts +++ b/models/all/src/index.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import core, { Data, Version } from '@anticrm/core' +import core, { coreId, Data, PluginConfiguration, Ref, Tx, Version } from '@anticrm/core' import jsonVersion from './version.json' import { Builder } from '@anticrm/model' @@ -58,47 +58,62 @@ export const version: Data = jsonVersion as Data const builder = new Builder() -const builders = [ - coreModel, - activityModel, - attachmentModel, - viewModel, - workbenchModel, - contactModel, - chunterModel, - taskModel, - recruitModel, - settingModel, - telegramModel, - leadModel, - gmailModel, - inventoryModel, - presentationModel, - templatesModel, - textEditorModel, - notificationModel, - serverCoreModel, - serverAttachmentModel, - serverContactModel, - serverNotificationModel, - serveSettingModel, - tagsModel, - calendarModel, - serverChunterModel, - serverInventoryModel, - serverLeadModel, - serverTagsModel, - serverTaskModel, - serverRecruitModel, - serverCalendarModel, - serverGmailModel, - serverTelegramModel, - trackerModel, - createDemo +const builders: [(b: Builder) => void, string][] = [ + [coreModel, coreId], + [activityModel, 'activity'], + [attachmentModel, 'attachment'], + [viewModel, 'view'], + [workbenchModel, 'workbench'], + [contactModel, 'contact'], + [chunterModel, 'chunter'], + [taskModel, 'task'], + [recruitModel, 'recruit'], + [settingModel, 'setting'], + [telegramModel, 'telegram'], + [leadModel, 'lead'], + [gmailModel, 'gmail'], + [inventoryModel, 'inventory'], + [presentationModel, 'presentation'], + [templatesModel, 'templates'], + [textEditorModel, 'text-editor'], + [notificationModel, 'notification'], + + [serverCoreModel, 'server-core'], + [serverAttachmentModel, 'server-attachment'], + [serverContactModel, 'server-contact'], + [serverNotificationModel, 'server-notification'], + [serveSettingModel, 'server-setting'], + [tagsModel, 'tags'], + [calendarModel, 'calendar'], + [serverChunterModel, 'server-chunter'], + [serverInventoryModel, 'server-inventory'], + [serverLeadModel, 'server-lead'], + [serverTagsModel, 'server-tags'], + [serverTaskModel, 'server-task'], + [serverRecruitModel, 'server-recruit'], + [serverCalendarModel, 'server-calendar'], + [serverGmailModel, 'server-gmail'], + [serverTelegramModel, 'server-telegram'], + [trackerModel, 'tracker'], + [createDemo, 'demo'] ] -for (const b of builders) { +for (const [b, id] of builders) { + const txes: Tx[] = [] + builder.onTx = (tx) => { + txes.push(tx) + } b(builder) + builder.createDoc( + core.class.PluginConfiguration, + core.space.Model, + { + pluginId: id, + transactions: txes.map((it) => it._id) + }, + ('plugin-configuration-' + id) as Ref + ) + builder.onTx = undefined } builder.createDoc(core.class.Version, core.space.Model, version, core.version.Model) diff --git a/models/core/src/core.ts b/models/core/src/core.ts index f601d9da55..df5230317f 100644 --- a/models/core/src/core.ts +++ b/models/core/src/core.ts @@ -20,6 +20,7 @@ import { ClassifierKind, Collection, Doc, Domain, DOMAIN_MODEL, IndexKind, Interface, Mixin, Obj, + PluginConfiguration, Ref, RefTo, Space, Timestamp, Type, Version @@ -143,3 +144,9 @@ export class TVersion extends TDoc implements Version { minor!: number patch!: number } + +@Model(core.class.PluginConfiguration, core.class.Doc, DOMAIN_MODEL) +export class TPluginConfiguration extends TDoc implements PluginConfiguration { + pluginId!: string; + transactions!: Ref[] +} diff --git a/models/core/src/index.ts b/models/core/src/index.ts index d38ce30264..eb8237c338 100644 --- a/models/core/src/index.ts +++ b/models/core/src/index.ts @@ -25,6 +25,7 @@ import { TInterface, TMixin, TObj, + TPluginConfiguration, TRefTo, TType, TTypeBoolean, @@ -81,6 +82,7 @@ export function createModel (builder: Builder): void { TArrOf, TVersion, TTypeNumber, - TTypeIntlString + TTypeIntlString, + TPluginConfiguration ) } diff --git a/models/tracker/src/creation.ts b/models/tracker/src/creation.ts index 4e585463d9..8e9b49d6b4 100644 --- a/models/tracker/src/creation.ts +++ b/models/tracker/src/creation.ts @@ -24,7 +24,12 @@ export async function createDeps (client: Client): Promise { _id: tracker.team.DefaultTeam }) - if (current === undefined) { + const currentDeleted = await tx.findOne(core.class.TxRemoveDoc, { + objectId: tracker.team.DefaultTeam + }) + + // Create new if not deleted by customers. + if (current === undefined && currentDeleted === undefined) { await tx.createDoc( tracker.class.Team, core.space.Space, diff --git a/packages/core/src/classes.ts b/packages/core/src/classes.ts index 0c6603e0fe..4812c8c03a 100644 --- a/packages/core/src/classes.ts +++ b/packages/core/src/classes.ts @@ -146,6 +146,15 @@ export interface Class extends Classifier { sortingKey?: string } +/** + * @public + * Define a set of plugin to model document bindings. + */ +export interface PluginConfiguration extends Doc { + pluginId: string + transactions: Ref[] +} + /** * @public */ diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index 59c89fd356..6fc776429d 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -13,14 +13,15 @@ // limitations under the License. // -import type { Class, Doc, Ref } from './classes' +import { Plugin } from '@anticrm/platform' +import type { Class, Doc, PluginConfiguration, Ref } from './classes' import { DOMAIN_MODEL } from './classes' import core from './component' import { Hierarchy } from './hierarchy' import { ModelDb } from './memdb' import type { DocumentQuery, FindOptions, FindResult, Storage, TxResult, WithLookup } from './storage' import { SortingOrder } from './storage' -import type { Tx } from './tx' +import { Tx, TxCreateDoc, TxProcessor, TxUpdateDoc } from './tx' /** * @public @@ -52,12 +53,19 @@ export interface ClientConnection extends Storage { class ClientImpl implements Client { notify?: (tx: Tx) => void - constructor (private readonly hierarchy: Hierarchy, private readonly model: ModelDb, private readonly conn: ClientConnection) { + constructor ( + private readonly hierarchy: Hierarchy, + private readonly model: ModelDb, + private readonly conn: ClientConnection + ) {} + + getHierarchy (): Hierarchy { + return this.hierarchy } - getHierarchy (): Hierarchy { return this.hierarchy } - - getModel (): ModelDb { return this.model } + getModel (): ModelDb { + return this.model + } async findAll( _class: Ref>, @@ -65,14 +73,15 @@ class ClientImpl implements Client { options?: FindOptions ): Promise> { const domain = this.hierarchy.getDomain(_class) - let result = (domain === DOMAIN_MODEL) - ? await this.model.findAll(_class, query, options) - : await this.conn.findAll(_class, query, options) + let result = + domain === DOMAIN_MODEL + ? await this.model.findAll(_class, query, options) + : await this.conn.findAll(_class, query, options) // In case of mixin we need to create mixin proxies. // Update mixins & lookups - result = result.map(v => { + result = result.map((v) => { return this.hierarchy.updateLookupMixin(_class, v, options) }) return result @@ -115,7 +124,9 @@ class ClientImpl implements Client { * @public */ export async function createClient ( - connect: (txHandler: TxHander) => Promise + connect: (txHandler: TxHander) => Promise, + // If set will build model with only allowed plugins. + allowedPlugins?: Plugin[] ): Promise { let client: ClientImpl | null = null let txBuffer: Tx[] | undefined = [] @@ -133,14 +144,57 @@ export async function createClient ( } const conn = await connect(txHander) - const atxes = await conn.findAll(core.class.Tx, { objectSpace: core.space.Model }, { sort: { _id: SortingOrder.Ascending } }) + const atxes = await conn.findAll( + core.class.Tx, + { objectSpace: core.space.Model }, + { sort: { _id: SortingOrder.Ascending } } + ) - const systemTr: Tx[] = [] + let systemTx: Tx[] = [] const userTx: Tx[] = [] - atxes.forEach(tx => ((tx.modifiedBy === core.account.System) ? systemTr : userTx).push(tx)) + atxes.forEach((tx) => (tx.modifiedBy === core.account.System ? systemTx : userTx).push(tx)) - const txes = systemTr.concat(userTx) + if (allowedPlugins !== undefined) { + // Filter system transactions + const configs = new Map, PluginConfiguration>() + for (const t of systemTx) { + if (t._class === core.class.TxCreateDoc) { + const ct = t as TxCreateDoc + if (ct.objectClass === core.class.PluginConfiguration) { + configs.set(ct.objectId as Ref, + TxProcessor.createDoc2Doc(ct) as PluginConfiguration + ) + } + } else if (t._class === core.class.TxUpdateDoc) { + const ut = t as TxUpdateDoc + if (ut.objectClass === core.class.PluginConfiguration) { + const c = configs.get(ut.objectId as Ref) + if (c !== undefined) { + TxProcessor.updateDoc2Doc(c, ut) + } + } + } + } + + const excludedPlugins = Array.from(configs.values()).filter(it => !allowedPlugins.includes(it.pluginId as Plugin)) + + for (const a of excludedPlugins) { + for (const c of configs.values()) { + if (a.pluginId === c.pluginId) { + const excluded = new Set>() + for (const id of c.transactions) { + excluded.add(id as Ref) + } + const exclude = systemTx.filter(t => excluded.has(t._id)) + console.log('exclude plugin', c.pluginId, exclude.length) + systemTx = systemTx.filter(t => !excluded.has(t._id)) + } + } + } + } + + const txes = systemTx.concat(userTx) const txMap = new Map, Ref>() for (const tx of txes) txMap.set(tx._id, tx._id) diff --git a/packages/core/src/component.ts b/packages/core/src/component.ts index e1877f194a..65460267ec 100644 --- a/packages/core/src/component.ts +++ b/packages/core/src/component.ts @@ -15,7 +15,7 @@ import type { IntlString, Plugin, StatusCode } from '@anticrm/platform' import { plugin } from '@anticrm/platform' import { Mixin, Version } from '.' -import type { Account, ArrOf, AnyAttribute, AttachedDoc, Class, Doc, Interface, Obj, PropertyType, Ref, Space, Timestamp, Type, Collection, RefTo } from './classes' +import type { Account, AnyAttribute, ArrOf, AttachedDoc, Class, Collection, Doc, Interface, Obj, PluginConfiguration, PropertyType, Ref, RefTo, Space, Timestamp, Type } from './classes' import type { Tx, TxBulkWrite, TxCollectionCUD, TxCreateDoc, TxCUD, TxMixin, TxPutBag, TxRemoveDoc, TxUpdateDoc } from './tx' /** @@ -54,7 +54,8 @@ export default plugin(coreId, { ArrOf: '' as Ref>>, Collection: '' as Ref>>, Bag: '' as Ref>>>, - Version: '' as Ref> + Version: '' as Ref>, + PluginConfiguration: '' as Ref> }, space: { Tx: '' as Ref, diff --git a/packages/core/src/query.ts b/packages/core/src/query.ts index 6c2b1df292..0a1ea7b21c 100644 --- a/packages/core/src/query.ts +++ b/packages/core/src/query.ts @@ -75,7 +75,6 @@ function getValue (key: string, obj: any): any { export function matchQuery (docs: Doc[], query: DocumentQuery, clazz: Ref>, hierarchy: Hierarchy): Doc[] { let result = [...docs] for (const key in query) { - if (key === '_id' && ((query._id as any)?.$like === undefined || query._id === undefined)) continue const value = (query as any)[key] const tkey = checkMixinKey(key, clazz, hierarchy) result = findProperty(result, tkey, value) diff --git a/packages/model/src/dsl.ts b/packages/model/src/dsl.ts index f7ee2be182..c7db4eddd8 100644 --- a/packages/model/src/dsl.ts +++ b/packages/model/src/dsl.ts @@ -249,7 +249,8 @@ function _generateTx (tx: ClassTxes): Tx[] { */ export class Builder { private readonly txes: Tx[] = [] - // private readonly hierarchy = new Hierarchy() + + onTx?: (tx: Tx) => void createModel (...classes: Array Obj>): void { const txes = classes.map((ctor) => getTxes(ctor.prototype)) @@ -263,6 +264,7 @@ export class Builder { for (const tx of generated) { this.txes.push(tx) + this.onTx?.(tx) // this.hierarchy.tx(tx) } } @@ -302,6 +304,7 @@ export class Builder { tx.modifiedBy = modifiedBy } this.txes.push(tx) + this.onTx?.(tx) return TxProcessor.createDoc2Doc(tx) } @@ -311,7 +314,9 @@ export class Builder { mixin: Ref>, attributes: MixinUpdate ): void { - this.txes.push(txFactory.createTxMixin(objectId, objectClass, core.space.Model, mixin, attributes)) + const tx = txFactory.createTxMixin(objectId, objectClass, core.space.Model, mixin, attributes) + this.txes.push(tx) + this.onTx?.(tx) } getTxes (): Tx[] { diff --git a/packages/platform/src/resource.ts b/packages/platform/src/resource.ts index 235c754629..d748c00be6 100644 --- a/packages/platform/src/resource.ts +++ b/packages/platform/src/resource.ts @@ -52,6 +52,14 @@ export function addLocation ( locations.set(plugin, module) } +/** + * @public + * return list of registred plugins. + */ +export function getPlugins (): Plugin[] { + return Array.from(locations.keys()) +} + function getLocation (plugin: Plugin): PluginLoader { const location = locations.get(plugin) if (location === undefined) { diff --git a/packages/presentation/src/index.ts b/packages/presentation/src/index.ts index 3aa17d27ca..e1573e720c 100644 --- a/packages/presentation/src/index.ts +++ b/packages/presentation/src/index.ts @@ -16,29 +16,27 @@ import { addStringsLoader } from '@anticrm/platform' import { presentationId } from './plugin' -export { presentationId } -export * from './utils' export * from './attributes' -export * from './types' - -export { default as UserBox } from './components/UserBox.svelte' -export { default as UserInfo } from './components/UserInfo.svelte' -export { default as UserBoxList } from './components/UserBoxList.svelte' -export { default as Avatar } from './components/Avatar.svelte' -export { default as EditableAvatar } from './components/EditableAvatar.svelte' -export { default as MessageViewer } from './components/MessageViewer.svelte' -export { default as AttributesBar } from './components/AttributesBar.svelte' export { default as AttributeBarEditor } from './components/AttributeBarEditor.svelte' export { default as AttributeEditor } from './components/AttributeEditor.svelte' +export { default as AttributesBar } from './components/AttributesBar.svelte' +export { default as Avatar } from './components/Avatar.svelte' export { default as Card } from './components/Card.svelte' -export { default as PDFViewer } from './components/PDFViewer.svelte' +export { default as EditableAvatar } from './components/EditableAvatar.svelte' export { default as MessageBox } from './components/MessageBox.svelte' +export { default as MessageViewer } from './components/MessageViewer.svelte' +export { default as PDFViewer } from './components/PDFViewer.svelte' export { default as SpaceCreateCard } from './components/SpaceCreateCard.svelte' export { default as SpaceSelect } from './components/SpaceSelect.svelte' +export { default as UserBox } from './components/UserBox.svelte' +export { default as UserBoxList } from './components/UserBoxList.svelte' +export { default as UserInfo } from './components/UserInfo.svelte' +export { connect, versionError } from './connect' +export { default } from './plugin' +export * from './types' +export * from './utils' +export { presentationId } addStringsLoader(presentationId, async (lang: string) => { return await import(`../lang/${lang}.json`) }) - -export { default } from './plugin' -export { connect, versionError } from './connect' diff --git a/packages/text-editor/src/components/StyledTextBox.svelte b/packages/text-editor/src/components/StyledTextBox.svelte index c7ed068ed9..89c1fbb60f 100644 --- a/packages/text-editor/src/components/StyledTextBox.svelte +++ b/packages/text-editor/src/components/StyledTextBox.svelte @@ -15,6 +15,12 @@ export let showButtons = true let rawValue: string + let oldContent = '' + + $: if (oldContent !== content) { + oldContent = content + rawValue = content + } const Mode = { View: 1, diff --git a/packages/text-editor/src/index.ts b/packages/text-editor/src/index.ts index f6f77de881..b1d4d39a78 100644 --- a/packages/text-editor/src/index.ts +++ b/packages/text-editor/src/index.ts @@ -18,15 +18,15 @@ import { addStringsLoader } from '@anticrm/platform' import { textEditorId } from './plugin' export * from '@anticrm/presentation/src/types' -export * from './types' - export { default as ReferenceInput } from './components/ReferenceInput.svelte' -export { default as TextEditor } from './components/TextEditor.svelte' -export { default as StyledTextEditor } from './components/StyledTextEditor.svelte' export { default as StyledTextBox } from './components/StyledTextBox.svelte' +export { default as StyledTextEditor } from './components/StyledTextEditor.svelte' +export { default as TextEditor } from './components/TextEditor.svelte' +export { default } from './plugin' +export * from './types' addStringsLoader(textEditorId, async (lang: string) => { return await import(`../lang/${lang}.json`) }) -export { default } from './plugin' +export { textEditorId } diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index 69838c93c3..3094d7fcb5 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -14,7 +14,7 @@ // import { SvelteComponent } from 'svelte' -import { addStringsLoader } from '@anticrm/platform' +import { addLocation, addStringsLoader } from '@anticrm/platform' import { uiId } from './plugin' import { readable } from 'svelte/store' @@ -116,6 +116,8 @@ addStringsLoader(uiId, async (lang: string) => { return await import(`../lang/${lang}.json`) }) +addLocation(uiId, async () => ({ default: async () => ({}) })) + export { default } from './plugin' export * from './colors' diff --git a/plugins/client-resources/src/index.ts b/plugins/client-resources/src/index.ts index 744f8383ae..fd6911149b 100644 --- a/plugins/client-resources/src/index.ts +++ b/plugins/client-resources/src/index.ts @@ -13,11 +13,11 @@ // limitations under the License. // -import { createClient, Client, TxHander } from '@anticrm/core' - -import { connect } from './connection' import clientPlugin from '@anticrm/client' -import { getMetadata, getResource } from '@anticrm/platform' +import { Client, createClient, TxHander } from '@anticrm/core' +import { getMetadata, getPlugins, getResource } from '@anticrm/platform' +import { connect } from './connection' + export { connect } /*! @@ -38,11 +38,12 @@ export default async () => { client = undefined } if (client === undefined) { + const filterModel = getMetadata(clientPlugin.metadata.FilterModel) ?? false client = await createClient((handler: TxHander) => { const url = new URL(`/${token}`, endpoint) console.log('connecting to', url.href) return connect(url.href, handler) - }) + }, filterModel ? getPlugins() : undefined) _token = token // Check if we had dev hook for client. diff --git a/plugins/client/src/index.ts b/plugins/client/src/index.ts index 6b5c1449cb..f082132fe3 100644 --- a/plugins/client/src/index.ts +++ b/plugins/client/src/index.ts @@ -58,7 +58,8 @@ export default plugin(clientId, { metadata: { ClientHook: '' as Metadata>, - ClientSocketFactory: '' as Metadata + ClientSocketFactory: '' as Metadata, + FilterModel: '' as Metadata }, function: { GetClient: '' as Resource diff --git a/plugins/recruit-resources/src/components/review/EditReview.svelte b/plugins/recruit-resources/src/components/review/EditReview.svelte index 85840f03be..aa0651c74e 100644 --- a/plugins/recruit-resources/src/components/review/EditReview.svelte +++ b/plugins/recruit-resources/src/components/review/EditReview.svelte @@ -76,7 +76,6 @@ emphasized content={object.description} on:value={(evt) => { - console.log(evt.detail) client.update(object, { description: evt.detail }) }} /> diff --git a/plugins/task-resources/src/components/EditIssue.svelte b/plugins/task-resources/src/components/EditIssue.svelte index 9f2515b862..042da384e4 100644 --- a/plugins/task-resources/src/components/EditIssue.svelte +++ b/plugins/task-resources/src/components/EditIssue.svelte @@ -60,7 +60,7 @@ change('description', object.description)} + on:value={(evt) => change('description', evt.detail)} /> diff --git a/plugins/tracker-resources/src/components/issues/EditIssue.svelte b/plugins/tracker-resources/src/components/issues/EditIssue.svelte index 94d1b778bd..6f84aec9fb 100644 --- a/plugins/tracker-resources/src/components/issues/EditIssue.svelte +++ b/plugins/tracker-resources/src/components/issues/EditIssue.svelte @@ -56,7 +56,7 @@ on:change={() => change('title', object.title) } /> change('description', object.description) }/> + on:value={(evt) => change('description', evt.detail) }/> {value} diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 6a072540e1..a9a0ea286b 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -18,7 +18,7 @@ import core, { Client, getCurrentAccount, Ref, Space } from '@anticrm/core' import notification, { NotificationStatus } from '@anticrm/notification' import { NotificationClientImpl } from '@anticrm/notification-resources' - import { IntlString } from '@anticrm/platform' + import { getMetadata, IntlString } from '@anticrm/platform' import { Avatar, createQuery, setClient } from '@anticrm/presentation' import { AnyComponent, closePopup, @@ -178,8 +178,10 @@ let apps: Application[] = [] + const excludedApps = getMetadata(workbench.metadata.ExcludedApplications) ?? [] + const query = createQuery() - $: query.query(workbench.class.Application, { hidden: false }, (result) => { + $: query.query(workbench.class.Application, { hidden: false, _id: { $nin: excludedApps } }, (result) => { apps = result }) diff --git a/plugins/workbench-resources/src/components/WorkbenchApp.svelte b/plugins/workbench-resources/src/components/WorkbenchApp.svelte index d8462a0101..6f60fd8f2c 100644 --- a/plugins/workbench-resources/src/components/WorkbenchApp.svelte +++ b/plugins/workbench-resources/src/components/WorkbenchApp.svelte @@ -14,13 +14,16 @@ --> -{#await connect('Platform')} +{#await connect(getMetadata(workbench.metadata.PlatformTitle) ?? 'Platform')} {:then client} {#if !client && versionError} diff --git a/plugins/workbench/src/index.ts b/plugins/workbench/src/index.ts index 618852a102..351cf9b1df 100644 --- a/plugins/workbench/src/index.ts +++ b/plugins/workbench/src/index.ts @@ -14,7 +14,7 @@ // import type { Class, Doc, Mixin, Obj, Ref, Space } from '@anticrm/core' -import type { Asset, IntlString, Plugin, Resource } from '@anticrm/platform' +import type { Asset, IntlString, Metadata, Plugin, Resource } from '@anticrm/platform' import { plugin } from '@anticrm/platform' import { AnyComponent } from '@anticrm/ui' @@ -100,5 +100,9 @@ export default plugin(workbenchId, { }, component: { WorkbenchApp: '' as AnyComponent + }, + metadata: { + PlatformTitle: '' as Metadata, + ExcludedApplications: '' as Metadata[]> } }) diff --git a/products/tracker/.browserslistrc b/products/tracker/.browserslistrc new file mode 100644 index 0000000000..e94f8140cc --- /dev/null +++ b/products/tracker/.browserslistrc @@ -0,0 +1 @@ +defaults diff --git a/products/tracker/.env b/products/tracker/.env new file mode 100644 index 0000000000..b47965b311 --- /dev/null +++ b/products/tracker/.env @@ -0,0 +1,10 @@ + +LOGIN_ENDPOINT=ws://localhost:3333 + +LOGIN_TOKEN_DEV=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJvc2FtdW5kQGhjLmVuZ2luZWVyaW5nIiwid29ya3NwYWNlIjoidHJ4NDAifQ.dYsCF2VRbuc-zmRt0yLAww1_--xtX4P1EqPFREEzCjQ +LOGIN_ENDPOINT_DEV=wss://transactor.hc.engineering/ + +TELEGRAM_URL=http://localhost:8086 +FRONT_URL=http://localhost:8080 + +REKONI_URL=http://localhost:4004 diff --git a/products/tracker/.env-prod b/products/tracker/.env-prod new file mode 100644 index 0000000000..dbbc14e78c --- /dev/null +++ b/products/tracker/.env-prod @@ -0,0 +1,3 @@ + +TELEGRAM_URL = https://telegram.hc.engineering +REKONI_URL = https://rekoni.hc.engineering \ No newline at end of file diff --git a/products/tracker/.gitignore b/products/tracker/.gitignore new file mode 100644 index 0000000000..d1948308bb --- /dev/null +++ b/products/tracker/.gitignore @@ -0,0 +1,3 @@ +stats.json +dist/ + diff --git a/products/tracker/Dockerfile b/products/tracker/Dockerfile new file mode 100644 index 0000000000..8200f83b83 --- /dev/null +++ b/products/tracker/Dockerfile @@ -0,0 +1,9 @@ +FROM node:16 + +WORKDIR /usr/src/app + +COPY bundle.js ./ +COPY dist/ ./dist/ + +EXPOSE 8080 +CMD [ "node", "bundle.js" ] diff --git a/products/tracker/config.json b/products/tracker/config.json new file mode 100644 index 0000000000..9a68daead4 --- /dev/null +++ b/products/tracker/config.json @@ -0,0 +1,5 @@ +{ + "ACCOUNTS_URL":"http://localhost:3000", + "UPLOAD_URL":"/files", + "REKONI_URL": "http://localhost:4004" +} \ No newline at end of file diff --git a/products/tracker/package.json b/products/tracker/package.json new file mode 100644 index 0000000000..04839c5860 --- /dev/null +++ b/products/tracker/package.json @@ -0,0 +1,125 @@ +{ + "name": "@anticrm/prod-tracker", + "version": "1.0.0", + "license": "EPL-2.0", + "scripts": { + "build": "rm -rf ./dist && cross-env NODE_ENV=production webpack --stats-error-details && echo 'done'", + "bundle": "cp -r ../../server/front/bundle.js .", + "docker:build": "docker build -t hardcoreeng/tracker-front .", + "docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/tracker-front staging", + "docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/tracker-front", + "analyze": "cross-env NODE_ENV=production webpack --json > stats.json", + "show": "webpack-bundle-analyzer stats.json dist", + "dev": "cross-env CLIENT_TYPE=dev webpack serve", + "dev-server": "cross-env CLIENT_TYPE=dev-server webpack serve", + "start": "cross-env NODE_ENV=production webpack serve", + "preformat-svelte": "prettier -w src/**/*.svelte", + "lint": "", + "lint:fix": "yarn preformat-svelte && eslint --fix src", + "deploy": "cp -p public/* dist && aws s3 sync dist s3://anticrm-platform --delete --acl public-read" + }, + "devDependencies": { + "cross-env": "~7.0.3", + "webpack-cli": "^4.6.0", + "webpack": "^5.32.0", + "mini-css-extract-plugin": "^2.2.0", + "dotenv-webpack": "^7.0.2", + "ts-loader": "^9.2.5", + "svelte-loader": "^3.1.2", + "css-loader": "^5.2.1", + "webpack-dev-server": "^4.7.4", + "style-loader": "^3.2.1", + "file-loader": "^6.2.0", + "sass-loader": "^12.1.0", + "@types/node": "~16.11.12", + "webpack-bundle-analyzer": "^4.4.1", + "svgo-loader": "^3.0.0", + "autoprefixer": "^10.2.6", + "postcss": "^8.3.4", + "postcss-loader": "^6.1.0", + "postcss-load-config": "^3.1.0", + "compression-webpack-plugin": "~9.0.0", + "html-webpack-plugin": "~5.5.0" + }, + "dependencies": { + "@anticrm/platform": "~0.6.5", + "@anticrm/ui": "~0.6.0", + "@anticrm/theme": "~0.6.0", + "svelte": "^3.37.0", + "@anticrm/login": "~0.6.1", + "@anticrm/login-assets": "~0.6.0", + "@anticrm/login-resources": "~0.6.2", + "@anticrm/client": "~0.6.1", + "@anticrm/dev-client-resources": "~0.6.1", + "@anticrm/workbench": "~0.6.1", + "@anticrm/workbench-resources": "~0.6.1", + "@anticrm/view": "~0.6.0", + "@anticrm/view-assets": "~0.6.0", + "@anticrm/view-resources": "~0.6.0", + "@anticrm/contact": "~0.6.5", + "@anticrm/contact-resources": "~0.6.0", + "@anticrm/task": "~0.6.0", + "@anticrm/task-assets": "~0.6.0", + "@anticrm/task-resources": "~0.6.0", + "@anticrm/chunter": "~0.6.1", + "@anticrm/chunter-assets": "~0.6.0", + "@anticrm/chunter-resources": "~0.6.0", + "@anticrm/setting": "~0.6.0", + "@anticrm/setting-assets": "~0.6.0", + "@anticrm/setting-resources": "~0.6.0", + "@anticrm/client-resources": "~0.6.4", + "@anticrm/contact-assets": "~0.6.0", + "@anticrm/activity": "~0.6.0", + "@anticrm/activity-assets": "~0.6.0", + "@anticrm/activity-resources": "~0.6.0", + "@anticrm/telegram": "~0.6.2", + "@anticrm/telegram-assets": "~0.6.0", + "@anticrm/telegram-resources": "~0.6.0", + "@anticrm/workbench-assets": "~0.6.0", + "@anticrm/attachment": "~0.6.1", + "@anticrm/attachment-assets": "~0.6.0", + "@anticrm/attachment-resources": "~0.6.0", + "@anticrm/gmail": "~0.6.0", + "@anticrm/gmail-assets": "~0.6.0", + "@anticrm/gmail-resources": "~0.6.0", + "@anticrm/image-cropper": "~0.6.0", + "@anticrm/image-cropper-resources": "~0.6.0", + "@anticrm/server-attachment": "~0.6.1", + "@anticrm/server-attachment-resources": "~0.6.0", + "@anticrm/server-contact": "~0.6.1", + "@anticrm/server-contact-resources": "~0.6.0", + "@anticrm/server-notification": "~0.6.0", + "@anticrm/server-notification-resources": "~0.6.0", + "@anticrm/server-setting": "~0.6.0", + "@anticrm/server-setting-resources": "~0.6.0", + "@anticrm/templates": "~0.6.0", + "@anticrm/templates-assets": "~0.6.0", + "@anticrm/templates-resources": "~0.6.0", + "@anticrm/notification": "~0.6.0", + "@anticrm/notification-assets": "~0.6.0", + "@anticrm/notification-resources": "~0.6.0", + "@anticrm/calendar": "~0.6.0", + "@anticrm/calendar-assets": "~0.6.0", + "@anticrm/calendar-resources": "~0.6.0", + "@anticrm/core": "~0.6.16", + "@anticrm/server-chunter": "~0.6.0", + "@anticrm/server-chunter-resources": "~0.6.0", + "@anticrm/server-task": "~0.6.0", + "@anticrm/server-task-resources": "~0.6.0", + "@anticrm/server-calendar": "~0.6.0", + "@anticrm/server-calendar-resources": "~0.6.0", + "@anticrm/server-gmail": "~0.6.0", + "@anticrm/server-gmail-resources": "~0.6.0", + "@anticrm/server-telegram": "~0.6.0", + "@anticrm/server-telegram-resources": "~0.6.0", + "@anticrm/presentation": "~0.6.2", + "@anticrm/tracker": "~0.6.0", + "@anticrm/tracker-assets": "~0.6.0", + "@anticrm/tracker-resources": "~0.6.0", + "@anticrm/prod": "~1.0.1", + "@anticrm/text-editor": "~0.6.0", + "@anticrm/devmodel": "~0.6.0", + "@anticrm/devmodel-resources": "~0.6.0", + "@anticrm/front": "~0.6.0" + } +} diff --git a/products/tracker/postcss.config.js b/products/tracker/postcss.config.js new file mode 100644 index 0000000000..88752c6cb0 --- /dev/null +++ b/products/tracker/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + require('autoprefixer') + ] +} diff --git a/products/tracker/public/config.json b/products/tracker/public/config.json new file mode 100644 index 0000000000..fe8def8763 --- /dev/null +++ b/products/tracker/public/config.json @@ -0,0 +1,5 @@ +{ + "ACCOUNTS_URL":"/account", + "UPLOAD_URL":"/files", + "MODEL_VERSION": null +} \ No newline at end of file diff --git a/products/tracker/public/favicon.ico b/products/tracker/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..ec62fb52d4f2d4c13a612ddd6146fd304e4d2d94 GIT binary patch literal 1150 zcma)5J8pzP4D~AMQe>4PEh*D+fgC8eAUEIwkvIxD0YV^ALBj=DnusQH{6KHz8L=cr zW*EgUNyY`X64rK*7r!|>U*?bI}lc3rnB zzG1^zjOTtF$G5t!zx%$|Wm(J|3T!w723R}2-iv)zRX_7QucWdp6}l(D0PB6gC%NDt ztu3`Z530a|11NGrTwea-0}Bpo73cdOJ~*tizZ>7=XIZAyJkNESrU1$w1xClGAFgSd z22l1lFgiZ_P!z>ACf^tE5koAz&)btES$!ZM3g_xp{f_Qu{f_#_IJo-!**}X#;`w3C z{p#!Q=Lh_Fewp9ix;MY{fjAIXTo3qx4QIgk*$3AvXOgqQ9^LwXFOMQ$cOoCBO|4dk JLL4~Y{sJ5zK4Sm? literal 0 HcmV?d00001 diff --git a/products/tracker/public/favicon.png b/products/tracker/public/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..6631310e17e2d26f4a672e93204c01acabc0f017 GIT binary patch literal 4067 zcmZ{mX*3jI+s9{17};ZD(pW=cM3%CQZR`fwcQGMZN7=$yL$;BvEXi8RE_)0nMs_M> zm$F9Iv3qsSd*1iMbDsO0|NXm`|2g;d?Y?64_0%uXa?k<*fJ>Shs)pyp{}VOU`Q4#l z-*XNi&QM($P}UD$K2K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mbsob5ndz>eniKO-TALG)8|B$H9Cmho#6+a@YWsbY8|M z!%pyd^NFOjw}Ovx4h}y*eemKr2`~YW82z?PGS$BiQHy@IinLhFK&EMvD@u~E<+OO) zT?=NBMOM$=>yR03-pyGoQ}XD(F(HQ)P|312>K!;*&QB;UEoI;ii((~;nLOF*D!;QG zq>}vj7W&O0sHrK;I^2v+Sa#I0wysVQ&8^E8wms@wb`mg^Xhw6Od*AG#+~4mj63(+i zv;p=!8byZW5T)K|Ywtv6zub&f9*_;}Nx&UJrO)Grd{R}5iu@18^H^)r;WS|*z}SVz zH=R>TO7C^EO;R(c5Bf$Q3?#NAMj>;NbIJ3#uqFLM^XpV&6CIYH(8~h{n&h4-CBNtO zF}R%HEFA@N&~N=eDn~Ce_#?tT4%_@GRx{3FiC}oXKW26`rSv1ko8r`mIB9_IEo%9` zE)RvFV3(8tj8HSmrm#7$@kiJP!bjRo)(}~)jS_A~8ptmOK-}z2o-~YIi$JO>x<4fK zqh@@YrTq7t5Vi|&gWw=XxH?!*n5HOwu6jT=sv(bPVb>-p`kk6nZ0*LB6(NR>YU{{; zZs(SsWcGml7k@tJC*$A!9QrKRJ-y4F+&;hR&NnTy;lq<+irT)3r)3@4fHVA`f;9`N z{eK%ctRtBREMmn&?-jPg!^rHIb^LKFL=|*E&918=8+>ED!SFX}GQ%N5%sYgxX=?Y~ zM87fXpg{zZ4$RJx;wNE8t%hNDAv{Y^e9COGft}r28byLcn}6P_kIelm*k(KE zUU78~@OsgXviVZXZhceYL#GtXLDJ6cr^XSaOJx3|hO~^}*No#uw&Qn3j546i2>FQ3 z;`P^|&7K4C*2AWU6=Du?$fBtx_Slu3?r53AeF%L4{e7_(^iL;uaCgv-=C$zv7$^$Q hZAblIa6x@G + + + + diff --git a/products/tracker/public/favicon_16.png b/products/tracker/public/favicon_16.png new file mode 100644 index 0000000000000000000000000000000000000000..d6cc4d5e3cd3235ac77930af3a99aea4d600b010 GIT binary patch literal 434 zcmV;j0ZsmiP)TQ%!2ZU=W>1Knx-wxKt#1fLy?ZD=*Lsxad9NK?G0G z3v`ndx)y)Hm7f~TI&FeP1=~;FKti-eDeZ$HVdlNbWWM()QcB8Vxm*t7IDV2+>Z+=8 z<#alcq9~u5roA+q&F3sXZLr;L+d&Y#mdoW*tyZIAv3Sw=cs!Et`?TBb_J(0}>-G9O z7tmm{*|bNa(N`FT@)5uR7aC}Jg2`kOo2FT+R4UxG-|y2kbX})jugA|QifFZ3?JdjF zNC+`lEEX5v#bCF>vaFN?4YV|y%{~r?!_5Yc<8Taz!;2gM4YV|!PJjG$Le8SmXmHN9 z?KBImnjFqFT>%vD9fC~+%d<5{e5aO-XY8Bu{$8mD!feVEY-_>fh`!AR2 cZ`YZK&bRB~kby#J0RR9107*qoM6N<$f{rD{(f|Me literal 0 HcmV?d00001 diff --git a/products/tracker/public/favicon_192.png b/products/tracker/public/favicon_192.png new file mode 100644 index 0000000000000000000000000000000000000000..6df544a12d8eeeb648a887793c44f68c34c54420 GIT binary patch literal 6575 zcmZXZ2{e@7|HsD|W9-H@jBO0cR%CB%gRx|bOt!?>#+IcLvW_jru82t@S+j5186iSZ z$dSA3~HJeL# z&EZrNByue9u(0x{M)$yR-d)VA=4Ni^-M%kB_!TH4YsSSNOM$|YSjg;i>(=%Fzn`yf z2xFX%dy`h*Mu2bo{0>*w?)G-FTHgDz-etqUz`(98f7Jzketxxqj)XEKhc?T|`}fa2 z&(8k4^5)GOmVW0;>Ft>GAX&B*TxF`mumFsnH zm@!aRR^Az0y~DY+wWYCQ-S`YRqK8+X1hvmc`eX8BAN8~AqQ^v#DG}$hhv(b7x*}Bb zN86{}ZJ4r$uO9@fBih^BBRN^)^RIEaO>TBuYKXwMmvVD+LzVMK^KEY2V9GKoX8p#e zT-e~0ixiB|2bn&{yTC%hRYHl$TmRi$JZiI;Q>l2GbGqq4IzI*oa- zZ)}}F3#P&dDF4^?(AeW8e8z&NL}dcql3K=^HEQawkLfj{E5WF zw_l&h(47NyFKT`N6|&pxg7Q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=eZ)@vX7z#PlcL{>q(~9%{7wC40?Uo0 z)iQzUzuNSMhIZ}NuaHqTR#r{#NxXX%fT^X(`Y#sW{x8LD+Iq|L=g*%c0Jk9k%vv6p z^XnIYx$z_{k{w{Q78N&Q&m++R(b4NG5%&2ybA{;KGU*;~ou8z;qi5`@+HkaXOubPNSgT?~`)5OzQPI35Ua< z&8COdD*ytaP>2#32QUcL7HqRD+tDjBPy%b<iRy))WEJCaSD+L&avGv4aF_KE9NVC~A*gze}aZJ5l|2k9wCCcS;YI}QIkt9j6 z0-BEU2!f#Gayf%F_<*lsvA71a)HHr}cXu0mdwYfsT8v5pPcoS_*Z~d>4wQU8FRLUR zqA1=+EI=Hvi$o$pHa9nip7r&0TCT;`))v{=*f3a)L?Wcy?Ya%| zB9YJM$@22Dpgp=p6;@M0 zE>Bk#tlRCDTCLVpI2<-Kv;t(-uZdBCTmuOYx;Z$G%b%W}j!6gmK-T4QxyqCT&+{KJ z9bk4_fUnCu^gShka~-l&tJPa0QLEL6$K&a#89Ch@JkP%YyW3C$K9K79e7-Mg86|;j z0yRpd($K0MH((pV48F9v<{(ZWEx)+9K(cXTBoI}Rd51!w$J+8i#KgUTVVKv|YV{q6 z=+nG(Iz9MCnl>t66VnihL_TTrOLA9Iegg?|7cM_4{`)mh3#ig;HeZ0us2Ad3Ft}zl j`jJSexUs(m2qAv}7JJy0tfvAP00000NkvXXu0mjfS$@7R literal 0 HcmV?d00001 diff --git a/products/tracker/src/index.ejs b/products/tracker/src/index.ejs new file mode 100644 index 0000000000..2d4d4719f2 --- /dev/null +++ b/products/tracker/src/index.ejs @@ -0,0 +1,20 @@ + + + + + + + + Tracker + + + + + + + + + + + + \ No newline at end of file diff --git a/products/tracker/src/main-dev.ts b/products/tracker/src/main-dev.ts new file mode 100644 index 0000000000..1f1406733e --- /dev/null +++ b/products/tracker/src/main-dev.ts @@ -0,0 +1,31 @@ +// +// Copyright © 2020, 2021 Anticrm Platform Contributors. +// Copyright © 2021 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 { createApp } from '@anticrm/ui' +import { configurePlatform } from './platform' +import { configurePlatformDev, configurePlatformDevServer } from './platform-dev' + +configurePlatform().then(() => { + if (process.env.CLIENT_TYPE === 'dev') { + configurePlatformDev() + } + if (process.env.CLIENT_TYPE === 'dev-server') { + configurePlatformDevServer() + } + + createApp(document.body) +}) + diff --git a/products/tracker/src/main.ts b/products/tracker/src/main.ts new file mode 100644 index 0000000000..4b586d4443 --- /dev/null +++ b/products/tracker/src/main.ts @@ -0,0 +1,22 @@ +// +// Copyright © 2020, 2021 Anticrm Platform Contributors. +// Copyright © 2021 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 { createApp } from '@anticrm/ui' +import { configurePlatform } from './platform' + +configurePlatform().then(() => { + createApp(document.body) +}) diff --git a/products/tracker/src/platform-dev.ts b/products/tracker/src/platform-dev.ts new file mode 100644 index 0000000000..c29182ed01 --- /dev/null +++ b/products/tracker/src/platform-dev.ts @@ -0,0 +1,68 @@ +// +// Copyright © 2020 Anticrm Platform Contributors. +// +// 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 { addLocation } from '@anticrm/platform' + +import login from '@anticrm/login' +import { clientId } from '@anticrm/client' +import { serverAttachmentId } from '@anticrm/server-attachment' +import { serverContactId } from '@anticrm/server-contact' +import { serverNotificationId } from '@anticrm/server-notification' +import { serverSettingId } from '@anticrm/server-setting' +import { serverChunterId } from '@anticrm/server-chunter' +import { serverTaskId } from '@anticrm/server-task' +import { serverCalendarId } from '@anticrm/server-calendar' +import { serverGmailId } from '@anticrm/server-gmail' +import { serverTelegramId } from '@anticrm/server-telegram' + + +import { setMetadata } from '@anticrm/platform' + +import devmodel, { devModelId } from '@anticrm/devmodel' +import client from '@anticrm/client' + +export function configurePlatformDev() { + setMetadata(login.metadata.OverrideLoginToken, process.env.LOGIN_TOKEN_DEV) + setMetadata(login.metadata.OverrideEndpoint, process.env.LOGIN_ENDPOINT_DEV) + console.log('Use DEV server') + addLocation(clientId, () => import(/* webpackChunkName: "client-dev" */ '@anticrm/dev-client-resources')) + + addLocation(serverAttachmentId, () => import(/* webpackChunkName: "server-attachment" */ '@anticrm/server-attachment-resources')) + addLocation(serverContactId, () => import(/* webpackChunkName: "server-contact" */ '@anticrm/server-contact-resources')) + addLocation(serverNotificationId, () => import(/* webpackChunkName: "server-notification" */ '@anticrm/server-notification-resources')) + addLocation(serverSettingId, () => import(/* webpackChunkName: "server-setting" */ '@anticrm/server-setting-resources')) + addLocation(serverChunterId, () => import(/* webpackChunkName: "server-chunter" */ '@anticrm/server-chunter-resources')) + addLocation(serverTaskId, () => import/* webpackChunkName: "server-task" */ ('@anticrm/server-task-resources')) + addLocation(serverCalendarId, () => import/* webpackChunkName: "server-calendar" */ ('@anticrm/server-calendar-resources')) + addLocation(serverGmailId, () => import/* webpackChunkName: "server-gmail" */ ('@anticrm/server-gmail-resources')) + addLocation(serverTelegramId, () => import/* webpackChunkName: "server-telegram" */ ('@anticrm/server-telegram-resources')) + + // Set devmodel to hook client to be able to present all activity + enableDevModel() +} + + +export function configurePlatformDevServer() { + console.log('Use Endpoint override:', process.env.LOGIN_ENDPOINT) + setMetadata(login.metadata.OverrideEndpoint, process.env.LOGIN_ENDPOINT) + + // Set devmodel to hook client to be able to present all activity + enableDevModel() +} + +function enableDevModel() { + setMetadata(client.metadata.ClientHook, devmodel.hook.Hook) + addLocation(devModelId, () => import(/* webpackChunkName: "devmodel" */ '@anticrm/devmodel-resources')) +} diff --git a/products/tracker/src/platform.ts b/products/tracker/src/platform.ts new file mode 100644 index 0000000000..2515322f1e --- /dev/null +++ b/products/tracker/src/platform.ts @@ -0,0 +1,101 @@ +// +// Copyright © 2020 Anticrm Platform Contributors. +// +// 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 { addLocation } from '@anticrm/platform' + +import login, { loginId } from '@anticrm/login' +import workbench, { workbenchId } from '@anticrm/workbench' +import uiPlugin from '@anticrm/ui' +import { viewId } from '@anticrm/view' +import { taskId } from '@anticrm/task' +import contact, { contactId } from '@anticrm/contact' +import { chunterId } from '@anticrm/chunter' +import { activityId } from '@anticrm/activity' +import { settingId } from '@anticrm/setting' +import { telegramId } from '@anticrm/telegram' +import { attachmentId } from '@anticrm/attachment' +import client, { clientId } from '@anticrm/client' +import { gmailId } from '@anticrm/gmail' +import { imageCropperId } from '@anticrm/image-cropper' +import { templatesId } from '@anticrm/templates' +import { notificationId } from '@anticrm/notification' +import { calendarId } from '@anticrm/calendar' +import { trackerId } from '@anticrm/tracker' + +import '@anticrm/login-assets' +import '@anticrm/task-assets' +import '@anticrm/view-assets' +import '@anticrm/chunter-assets' +import '@anticrm/attachment-assets' +import '@anticrm/contact-assets' +import '@anticrm/activity-assets' +import '@anticrm/setting-assets' +import '@anticrm/telegram-assets' +import '@anticrm/gmail-assets' +import '@anticrm/workbench-assets' +import '@anticrm/templates-assets' +import '@anticrm/notification-assets' +import '@anticrm/tracker-assets' +import presentation, { presentationId } from '@anticrm/presentation' +import { coreId } from '@anticrm/core' +import { textEditorId } from '@anticrm/text-editor' + +import { setMetadata } from '@anticrm/platform' + +export async function configurePlatform() { + const config = await (await fetch('/config.json')).json() + console.log('loading configuration', config) + setMetadata(login.metadata.AccountsUrl, config.ACCOUNTS_URL) + setMetadata(login.metadata.UploadUrl, config.UPLOAD_URL) + + + if( config.MODEL_VERSION != null) { + console.log('Minimal Model version requirement', config.MODEL_VERSION) + setMetadata(presentation.metadata.RequiredVersion, config.MODEL_VERSION) + } + setMetadata(login.metadata.TelegramUrl, process.env.TELEGRAM_URL ?? 'http://localhost:8086') + setMetadata(login.metadata.GmailUrl, process.env.GMAIL_URL ?? 'http://localhost:8087') + setMetadata(login.metadata.OverrideEndpoint, process.env.LOGIN_ENDPOINT) + setMetadata(login.metadata.FrontUrl, process.env.FRONT_URL) + + setMetadata(uiPlugin.metadata.DefaultApplication, workbench.component.WorkbenchApp ) + setMetadata(workbench.metadata.ExcludedApplications, [contact.app.Contacts] ) + + addLocation(coreId, async () => ({ default: async () => ({}) })) + addLocation(presentationId, async () => ({ default: async () => ({}) })) + addLocation(textEditorId, async () => ({ default: async () => ({}) })) + + addLocation(clientId, () => import(/* webpackChunkName: "client" */ '@anticrm/client-resources')) + addLocation(loginId, () => import(/* webpackChunkName: "login" */ '@anticrm/login-resources')) + addLocation(workbenchId, () => import(/* webpackChunkName: "workbench" */ '@anticrm/workbench-resources')) + addLocation(viewId, () => import(/* webpackChunkName: "view" */ '@anticrm/view-resources')) + addLocation(taskId, () => import(/* webpackChunkName: "task" */ '@anticrm/task-resources')) + addLocation(contactId, () => import(/* webpackChunkName: "contact" */ '@anticrm/contact-resources')) + addLocation(chunterId, () => import(/* webpackChunkName: "chunter" */ '@anticrm/chunter-resources')) + addLocation(activityId, () => import(/*webpackChunkName: "activity" */ '@anticrm/activity-resources')) + addLocation(settingId, () => import(/* webpackChunkName: "setting" */ '@anticrm/setting-resources')) + addLocation(telegramId, () => import(/* webpackChunkName: "telegram" */ '@anticrm/telegram-resources')) + addLocation(attachmentId, () => import(/* webpackChunkName: "attachment" */ '@anticrm/attachment-resources')) + addLocation(gmailId, () => import(/* webpackChunkName: "gmail" */ '@anticrm/gmail-resources')) + addLocation(imageCropperId, () => import(/* webpackChunkName: "image-cropper" */ '@anticrm/image-cropper-resources')) + addLocation(templatesId, () => import(/* webpackChunkName: "templates" */ '@anticrm/templates-resources')) + addLocation(notificationId, () => import(/* webpackChunkName: "notification" */ '@anticrm/notification-resources')) + addLocation(calendarId, () => import(/* webpackChunkName: "calendar" */ '@anticrm/calendar-resources')) + + addLocation(trackerId, () => import(/* webpackChunkName: "tracker" */ '@anticrm/tracker-resources')) + setMetadata(workbench.metadata.PlatformTitle, 'Tracker') + + setMetadata(client.metadata.FilterModel, true) +} diff --git a/products/tracker/tsconfig.json b/products/tracker/tsconfig.json new file mode 100644 index 0000000000..3b6034a984 --- /dev/null +++ b/products/tracker/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "outDir": "./dist/", + "noImplicitAny": true, + "module": "esnext", + "target": "es2016", + "allowJs": true, + "sourceMap": true, + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "lib": [ + "es2016", + "dom" + ] + } +} \ No newline at end of file diff --git a/products/tracker/webpack.config.js b/products/tracker/webpack.config.js new file mode 100644 index 0000000000..9257715e48 --- /dev/null +++ b/products/tracker/webpack.config.js @@ -0,0 +1,36 @@ +// +// Copyright © 2020 Anticrm Platform Contributors. +// +// 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 CONDITIONSe OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +const path = require('path') +const prodModule = require('@anticrm/prod/webpack.config') + +module.exports = { + ...prodModule, + output: { + path: __dirname + '/dist', + filename: '[name].[contenthash].js', + chunkFilename: '[name].[contenthash].js', + publicPath: '/' + }, + devServer: { + ...prodModule.devServer, + static: { + directory: path.resolve(__dirname, "public"), + publicPath: "/", + serveIndex: true, + watch: true, + } + } +} diff --git a/rush.json b/rush.json index 9c96d8f454..939b8bb844 100644 --- a/rush.json +++ b/rush.json @@ -487,9 +487,14 @@ "shouldPublish": true }, { - "packageName": "prod", + "packageName": "@anticrm/prod", "projectFolder": "dev/prod", - "shouldPublish": true + "shouldPublish": false + }, + { + "packageName": "@anticrm/prod-tracker", + "projectFolder": "products/tracker", + "shouldPublish": false }, { "packageName": "@anticrm/server-core", diff --git a/tests/install-elastic-plugin.sh b/tests/install-elastic-plugin.sh new file mode 100755 index 0000000000..9686e2fca8 --- /dev/null +++ b/tests/install-elastic-plugin.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Direct donwload, or use VPN. +#wget https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-7.14.2.zip +docker cp ./ingest-attachment-7.14.2.zip sanity-elastic-1:/ingest-attachment-7.14.2.zip +docker exec -ti sanity-elastic-1 ./bin/elasticsearch-plugin install file:///ingest-attachment-7.14.2.zip +docker restart sanity-elastic-1 \ No newline at end of file