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 0000000000..ec62fb52d4 Binary files /dev/null and b/products/tracker/public/favicon.ico differ diff --git a/products/tracker/public/favicon.png b/products/tracker/public/favicon.png new file mode 100644 index 0000000000..6631310e17 Binary files /dev/null and b/products/tracker/public/favicon.png differ diff --git a/products/tracker/public/favicon.svg b/products/tracker/public/favicon.svg new file mode 100644 index 0000000000..ef13b59405 --- /dev/null +++ b/products/tracker/public/favicon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/products/tracker/public/favicon_16.png b/products/tracker/public/favicon_16.png new file mode 100644 index 0000000000..d6cc4d5e3c Binary files /dev/null and b/products/tracker/public/favicon_16.png differ diff --git a/products/tracker/public/favicon_192.png b/products/tracker/public/favicon_192.png new file mode 100644 index 0000000000..6df544a12d Binary files /dev/null and b/products/tracker/public/favicon_192.png differ diff --git a/products/tracker/public/favicon_32.png b/products/tracker/public/favicon_32.png new file mode 100644 index 0000000000..aa783f18df Binary files /dev/null and b/products/tracker/public/favicon_32.png differ 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