diff --git a/packages/server/.env-example b/packages/server/.env-example index 3da907d02..cca658e87 100644 --- a/packages/server/.env-example +++ b/packages/server/.env-example @@ -13,12 +13,12 @@ SESSION_SECRET="-> FILL IN <-" ############################################################ # Postgres Database -# the connection uri is build up from these variables +# the connection uri is built up from these variables ############################################################ -# only include the address, the protocoll `postgres://` is provided. -# for local development a sensible default is "localhost" -# if the app is ran via `docker-compose up`, it has to be the name of the service. -# this defaults to "database" +# If you specify a user and password, do not specify the protocol in the +# POSTGRES_URL variable. +# If the app is ran via `docker-compose up`, it has to be the name of the +# service (defaults to "database"). POSTGRES_URL="-> FILL IN <-" # this overrides the default root user in the postgres instance POSTGRES_USER="-> FILL IN <-" @@ -29,7 +29,7 @@ POSTGRES_DB="-> FILL IN <-" ############################################################ # Emails -# Optional. +# Optional (for now!) ############################################################ # SMTP_HOST="-> FILL IN <-" # SMTP_PORT=587 @@ -53,13 +53,16 @@ STRATEGY_LOCAL=true ############################################################ # Tracing & co. +# Note: all data is anonymous, and it helps us deliver +# better software. Disabling this makes Speckle sad! ############################################################ # SENTRY_DSN="-> FILL IN <-" -TELEMETRY=true +# DISABLE_TRACING="" +# DISABLE_TRACKING="" ############################################################ # Local dev environments # If your frontend is served in dev from somewhere else, # this is going to help out :) ############################################################ -# FRONTEND_PORT=8081 \ No newline at end of file +# FRONTEND_PORT=8081 diff --git a/packages/server/CHANGELOG.md b/packages/server/CHANGELOG.md new file mode 100644 index 000000000..5c2a44721 --- /dev/null +++ b/packages/server/CHANGELOG.md @@ -0,0 +1,350 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## 2.2.0 (2021-02-25) + + +### Features + +* **all:** minor readme updates in frontend and server ([98c14a5](https://github.com/specklesystems/Server/commit/98c14a5c8639749c064cf2b8ce125391180f9de6)) +* **api:** ⚠️ WIP. Partially cleans up api, modules and services around streams ([7a2312f](https://github.com/specklesystems/Server/commit/7a2312fba214a2471100b571bd35a15f7415d7b7)) +* **api:** api & services pruning ([35fd2cf](https://github.com/specklesystems/Server/commit/35fd2cfc493c04a4d46954ca41b0881fa6c0f384)) +* **api:** cleaning up in progress ([4d6e899](https://github.com/specklesystems/Server/commit/4d6e899750250287708fcbf99f3da0be8076be7f)) +* **api:** implemented branch & commit services + tests ([d2ddf03](https://github.com/specklesystems/Server/commit/d2ddf03746047a9e305e29e74929078ac77bf112)) +* **api:** splits auth and apps gql schemas into separate files ([348a81a](https://github.com/specklesystems/Server/commit/348a81aab2030bb19d8d2cd958df8db30f021943)) +* **app init:** async'ed app init & awaiting knex.migrate.latest() on first run ([e3dd8b1](https://github.com/specklesystems/Server/commit/e3dd8b1d81dff69603f6015030c98d1c2e1b8343)) +* **apps:** added graphql explorer app that works with actual server data ([ce6024c](https://github.com/specklesystems/Server/commit/ce6024c0849325ca320203e057e532ab947392cd)) +* **apps:** corrects redirect url for the desktop manager ([33d7af7](https://github.com/specklesystems/Server/commit/33d7af71e61b1f766acfcaf96d6c02d696f00b6b)) +* **apps:** graphql explorer proper challenges & logout ([d9414b5](https://github.com/specklesystems/Server/commit/d9414b5f91c970e448b8c2e21f9544d66c6ae784)) +* **apps:** listing, revoking, & tests ([c843d68](https://github.com/specklesystems/Server/commit/c843d68abeb487dbc4413c5a651873a06cfd11df)) +* **apps:** more service implementations, cleanup, and tests ([6cdeccb](https://github.com/specklesystems/Server/commit/6cdeccb74b67e968fce73f3a0cd6825396718c76)) +* **apps:** resolver for secret field & author return on app ([e0b60d5](https://github.com/specklesystems/Server/commit/e0b60d5b99b2fd44cabda5e326ef69ca672b3dcd)) +* **apps:** scaffolded more app services & more (cleanup, tests, etc.) ([03bd49e](https://github.com/specklesystems/Server/commit/03bd49ef6d00036b08fe4c4c6c63ed89bbe6e926)) +* **apps:** scaffolding & cleaning up models & api ([ffcca11](https://github.com/specklesystems/Server/commit/ffcca1126d364da99ece29ef1b4251ddaee7f9d5)) +* **apps:** scaffolding first/third party server apps for authorization purposes ([8ba6419](https://github.com/specklesystems/Server/commit/8ba64198aac4c326c29a9f9c7bf2ae028e1d5b7b)) +* **apps:** services & gql resolvers + tests ([a9f5ada](https://github.com/specklesystems/Server/commit/a9f5adad2f386d06436fb5db25378b99a42aa32d)) +* **apps & auth:** wIP: scaffolding "everything is a client app" backbone ([58bb827](https://github.com/specklesystems/Server/commit/58bb827dc350fcb7b1c349ee3a2e053383ade954)) +* **arch:** moved core module subparts in their independent folders ([913100d](https://github.com/specklesystems/Server/commit/913100d7d0ee90f58f82bb081a7daa5d8f66e1b9)) +* **auth:** added google strategy; improved auth screen; added strategies to servreInfo endpoint ([242dec4](https://github.com/specklesystems/Server/commit/242dec400916c1043b825dc41505209216012db8)) +* **auth:** frontend app flow ✅ ([647f1c3](https://github.com/specklesystems/Server/commit/647f1c3a539c589051af6fabcbb77fc04b14a172)) +* **auth:** implemented github strategy & backend flow ([c27ad2f](https://github.com/specklesystems/Server/commit/c27ad2f4770ef7a95a342f96910375b0e7917734)) +* **auth:** implemented third party redirects ([29bb2fb](https://github.com/specklesystems/Server/commit/29bb2fb314998af1ac2f999568244b80085c92c6)) +* **auth:** local flow (login & register) done (in rel with local frontend app) ([6d70578](https://github.com/specklesystems/Server/commit/6d70578841923619f4bb898678fe5aa78c928562)) +* **auth:** login screen scaffolding ([7c499f1](https://github.com/specklesystems/Server/commit/7c499f18e3cb1ab98560cdf6c0357dfcc620268e)) +* **auth:** returns the userid on registration if no app id is present ([1b57a2b](https://github.com/specklesystems/Server/commit/1b57a2ba4b534508092d49d70c1df7c1667bc848)) +* **auth:** scaffolding app authz & authn flows ([165f1cd](https://github.com/specklesystems/Server/commit/165f1cdf64e7804c632bb3de8ec471cef0d7c4c9)) +* **auth:** scaffolding local strategy to pair with 3rd party ones ([7a660cf](https://github.com/specklesystems/Server/commit/7a660cffa976bccc3b0d6d67cc0f155d96519d49)) +* **auth:** user login scaffold ([71bb84d](https://github.com/specklesystems/Server/commit/71bb84dccc8da8cecf41772d140ba37e69cf3760)) +* **auth & streams & tests:** authentication middleware implemented, api tests for stream create ([414edee](https://github.com/specklesystems/Server/commit/414edeee11c4feb281a7970e3c1254575eca4554)) +* **auth-dir:** add auth directives to schema ([6b8bb65](https://github.com/specklesystems/Server/commit/6b8bb65dc530a604fc1f893fdf5a425b32cc5a31)) +* **auth-dir:** break auth into three directives ([405964b](https://github.com/specklesystems/Server/commit/405964b653c19b8796d57424406fd75fea59b6b2)) +* **auth-dirs:** allow hasScope and hasRole on obj ([9bb7b6f](https://github.com/specklesystems/Server/commit/9bb7b6fe05bd860732f5b8c4e6dc9e53362b472a)) +* **auth-dirs:** do a check for `context.auth` ([7c13ab0](https://github.com/specklesystems/Server/commit/7c13ab02f2c1dceb078d0659be28246a0170f993)) +* **auth-dirs:** only allow on field definitons ([0674083](https://github.com/specklesystems/Server/commit/0674083f6cae2d333836940872514ccbf16fff14)) +* **auth-dirs:** remove [@is](https://github.com/is)Authorized directives ([eabfa99](https://github.com/specklesystems/Server/commit/eabfa996519c06a4a2748a8e1005079c6064a223)) +* **auth-dirs:** revert [@has](https://github.com/has)Scope and [@has](https://github.com/has)Role ([222f932](https://github.com/specklesystems/Server/commit/222f932547f466cbd4df73669fd321c6cbbe6806)) +* **commit:** adds createdAt prop to user commit ([557f24f](https://github.com/specklesystems/Server/commit/557f24fe20763a8df43ce96dbea5979c7719a63c)) +* **commits:** fixed object insertion bugs, and added create commit service ([47a7fc9](https://github.com/specklesystems/Server/commit/47a7fc97fc0e3003323e47c63477a04e8ebfb6d6)) +* **compression:** obj ingestion now accepts gzipped buffers ([eb3a028](https://github.com/specklesystems/Server/commit/eb3a028dbb16d8bc67cfda6e2b4303d57d9a52d6)) +* **deps:** updated dependencies ([177b98b](https://github.com/specklesystems/Server/commit/177b98b28818fb0aa9298b900521d1b0b7bc3315)) +* **dev:** adds frontend port env var for non-standard local environments ([b363b97](https://github.com/specklesystems/Server/commit/b363b97024f305e19df1b367099035045b2434dc)) +* **directives:** add [@has](https://github.com/has)Role directive ([ec09927](https://github.com/specklesystems/Server/commit/ec09927f945d8a0dfa355ae5326ca68948889e45)) +* **directives:** add [@has](https://github.com/has)Scope to schema ([ee06bdf](https://github.com/specklesystems/Server/commit/ee06bdf63d963492f043792bd2a9d46acbc232c9)) +* **directives:** create HasScopeDirective ([199e576](https://github.com/specklesystems/Server/commit/199e576b9f5c3deabed036be732d1358afd6b20b)) +* **docker:** add docker configuration for frontend and server ([f45c6d5](https://github.com/specklesystems/Server/commit/f45c6d5028c5115f662cc446b6b9481ab0f6b4fa)) +* **docker:** refactor of Dockerfile and avoid loading dev dependency in prod ([a5a233d](https://github.com/specklesystems/Server/commit/a5a233d9136c3cd17bf0b0de73a9d9e1c45eb6f8)) +* **docker-compose and database:** automated database initialization scripts ([500331d](https://github.com/specklesystems/Server/commit/500331d6a3ef21dab4dd9f4326695d58cb49fea7)), closes [#73](https://github.com/specklesystems/Server/issues/73) +* **docker-compose.yaml:** added sample compose file with database and redis ([a64b6ee](https://github.com/specklesystems/Server/commit/a64b6ee8a1d2cd21dce763acc7c34357de1cdb87)) +* **dockerfile docker-compose app.js:** production environment compatible build ([299ceee](https://github.com/specklesystems/Server/commit/299ceee3a14d29747e400c55a5d1744ff01259fa)) +* **dockerfile docker-compose app.js:** production environment compatible build ([44965b7](https://github.com/specklesystems/Server/commit/44965b7c2fd8499268e37d486dc5281c0e20b25f)) +* **docs:** windoze node 12 to avoid knex error ([a05b339](https://github.com/specklesystems/Server/commit/a05b33975cdec971ccaea613ce283506075bc1b2)) +* **error tracing:** adds sentry error tracing to apollo server & express routes ([3c4a5ac](https://github.com/specklesystems/Server/commit/3c4a5ac31c2d1e53cbdb72b96906678186a8df52)) +* **frontend:** ... more stuff. got bored to make actual atomic commits ([147f215](https://github.com/specklesystems/Server/commit/147f215ff92a10c2fbf136abe144a1ca61818c52)) +* **frontend:** added button and dialog for displaying app secrets ([79b6dd6](https://github.com/specklesystems/Server/commit/79b6dd654975573b080b70ce47e679f2177d2632)) +* **frontend:** added links to commits in activity feed ([b5f0014](https://github.com/specklesystems/Server/commit/b5f0014b264e56427e5d4f4290ce9825d0a9042b)) +* **frontend:** added vue app ([7011dd3](https://github.com/specklesystems/Server/commit/7011dd3759dea7b2e341c458b4a40d89936571eb)) +* **frontend:** adds commit data explorer (structured) ([91e77a7](https://github.com/specklesystems/Server/commit/91e77a7a16b89c78bc2f1dc78642f1a9aa536505)) +* **frontend:** adds error page ([bfd8088](https://github.com/specklesystems/Server/commit/bfd80884853df5f652e3cba97ebf16ab545a5749)) +* **frontend:** adds revokation dialog confirm for apps; minor fixes re rest ([d087572](https://github.com/specklesystems/Server/commit/d0875720f1487dc385ba9e70a694186f765675ff)) +* **frontend:** adds source app and branch to commit list item ([56f3b3f](https://github.com/specklesystems/Server/commit/56f3b3fb79916aed56a2f988dadb56e912106224)) +* **frontend:** adds source application "avatar" ([f3b1edb](https://github.com/specklesystems/Server/commit/f3b1edb4573cf1b31351607704a0892d339b6285)) +* **frontend:** app creation and deletion ([e658905](https://github.com/specklesystems/Server/commit/e658905dc5aa04ea79b90145427384ecf9ca7b54)) +* **frontend:** buttons in sidebars (user/stream) ([d5bfc86](https://github.com/specklesystems/Server/commit/d5bfc8613ff53448d663fb5e1f38d08401bb1d15)) +* **frontend:** correctly handles revoked tokens stuck in local storage ([e19c43d](https://github.com/specklesystems/Server/commit/e19c43d6fd64b44e06a6a9022677f385a0d0e0ad)) +* **frontend:** gql queries improvs (+adds branches and commits sep) ([ce53bd9](https://github.com/specklesystems/Server/commit/ce53bd94862523e8a138a647e85a491bf0269dc0)) +* **frontend:** login/register mobile readiness ([41dd6c2](https://github.com/specklesystems/Server/commit/41dd6c2dd9e972fb0f30419f3ebdc7ca2ffa6637)) +* **frontend:** made all stream based routes child routes; fixed issues re multiple fetching ([9c8c964](https://github.com/specklesystems/Server/commit/9c8c964059c610a41b2114201e68427aff5eb2b3)) +* **frontend:** minor changes to stream collab layout & sidebar ([d339561](https://github.com/specklesystems/Server/commit/d33956173b56dc5d486b922bfba300742d3ec28c)) +* **frontend:** minor fiddles w/h sidebars and commit list item (avatars) ([4010151](https://github.com/specklesystems/Server/commit/4010151f77ea4d4265b19487b49318a13bb7d03a)) +* **frontend:** mobile menu ([b538061](https://github.com/specklesystems/Server/commit/b538061205a9fadd2b58690fe57eb6870bdb2d7e)) +* **frontend:** more mobile devices layout improvements (it looks good now) ([f3e1a6d](https://github.com/specklesystems/Server/commit/f3e1a6dc6462a406e5d8b30ed9187c4bb6e05541)) +* **frontend:** moves user top menu and search bar into separate components ([fed36fb](https://github.com/specklesystems/Server/commit/fed36fb896e5f1a27a5b1d084199d712d5e15197)) +* **frontend:** new routes (branch, profile) and stream page improvs ([2a41633](https://github.com/specklesystems/Server/commit/2a416335c0966d398d9cd849275a4320ea3c965a)) +* **frontend:** object data viewer + scaffolded profile and user profile ([2051da8](https://github.com/specklesystems/Server/commit/2051da8730018e292fd3fba63175a083cdee6f71)) +* **frontend:** prevents white flash if system theme is dark ([174b914](https://github.com/specklesystems/Server/commit/174b914b41b65cbb52ccc196263cbc06c99ab1c8)) +* **frontend:** profile PAT section shaping up ([b70ef7e](https://github.com/specklesystems/Server/commit/b70ef7e8d8dff736488249d1236af3f9230ed975)) +* **frontend:** profile updates ([aa73007](https://github.com/specklesystems/Server/commit/aa73007adca98aa7efa5027f9faf2c89c1fe4286)) +* **frontend:** replacers all avatars with user avatar component ([7cd5a79](https://github.com/specklesystems/Server/commit/7cd5a790ae4792e482a060558adca88135a89efa)) +* **frontend:** scaffolded frontend apps & flows ([c2eb776](https://github.com/specklesystems/Server/commit/c2eb7760f9b32e999c5b621bdf19538bf04359ca)) +* **frontend:** split up sidebars in sub-components, +more work on profile page ([6ea1da3](https://github.com/specklesystems/Server/commit/6ea1da3716e7a525217cd0d4812be7a40236b574)) +* **frontend:** splits dialogs edit/new stream ([30b098f](https://github.com/specklesystems/Server/commit/30b098f09cc128399c9f8e8ffeb5b5dab133302f)) +* **frontend:** stores user id in localstorage on login ([dad4257](https://github.com/specklesystems/Server/commit/dad4257f7fe11247e1d7de0196d04b5e88112e3e)) +* **frontend:** stream description editing and proper md rendering and sanitisation ([2201f6e](https://github.com/specklesystems/Server/commit/2201f6e1775dc5c61ada3fb49de32463a3c7bfec)) +* **frontend:** stream list beautification and direct links ([0bbe3cf](https://github.com/specklesystems/Server/commit/0bbe3cf2e7cf0385358f1f7d265c0c8fa24d87f5)) +* **frontend:** token revokation and creation ✅ ([6cfec10](https://github.com/specklesystems/Server/commit/6cfec100f4a6509dca36e2ab547b6024ab3ed9c4)) +* **frontend:** various display improvements ([5ee98e8](https://github.com/specklesystems/Server/commit/5ee98e8db68f5553a45b7d2dfa5e593eaeffc1dc)) +* **frontend:** various fixes and improvements ([25798b0](https://github.com/specklesystems/Server/commit/25798b0e1c26a8eb5185dedfaef6598ff9dedb61)) +* **frontend:** various improvements ([074a712](https://github.com/specklesystems/Server/commit/074a712fac8c63a6fddb21da2ab754458796b6fa)) +* **frontend:** various layout improvements ([745df44](https://github.com/specklesystems/Server/commit/745df446fea34b99ec8897cf85f93a2be3188110)) +* **frontend:** various little hacks ([a4aa7af](https://github.com/specklesystems/Server/commit/a4aa7afa853c0c75e5400b19a97db282cfa5cf27)) +* **get children:** added gzipped streamed response for object children ([3667e99](https://github.com/specklesystems/Server/commit/3667e9932cfb6424eac1998a9713dab13f85a4af)) +* **gql:** (re-)implemented some commits & re-organized gql tests ([9715129](https://github.com/specklesystems/Server/commit/9715129284c5cdeb535f15c4578c56cdd4fdb1c3)) +* **gql:** adds company and avatar to StreamCollaborator ([b0ea8e6](https://github.com/specklesystems/Server/commit/b0ea8e649947205b23a2acc3dd43452f99952991)) +* **gql:** adds missing fields to getCommitById ([93ee475](https://github.com/specklesystems/Server/commit/93ee4758f32774176253903c0d14043fe74c821c)) +* **gql:** adds streamSearch, adds pagination to userSearch ([e51345c](https://github.com/specklesystems/Server/commit/e51345cb9e2e3491c18e598eaebce30114edcfd6)) +* **gql:** adds tests for stream search and user search ([80b293c](https://github.com/specklesystems/Server/commit/80b293c592dfd70c423859943ee2b4aeef72c26d)) +* **gql:** adds UserSearchResults and improves user search ([c6e08b2](https://github.com/specklesystems/Server/commit/c6e08b2c5dd4f2d20e76b4c78fe6d8ad056324b4)) +* **gql:** implemented branch query resolvers & tests ([0fe6a0f](https://github.com/specklesystems/Server/commit/0fe6a0f4af11e4debe48520d4905cab1212c8224)) +* **gql:** implemented resolvers & tests for stream commits & branch commits ([b14dae6](https://github.com/specklesystems/Server/commit/b14dae68291b6e05c855149b4a1ada19ccb16653)) +* **gql:** implemented stream commit resolver ([f6b1a54](https://github.com/specklesystems/Server/commit/f6b1a545e6f99b495f56d9a135f4a06cc3b1d5aa)) +* **gql:** limits set to max=100 and default=25 for streams, users, branches & commits. Additional changes as per PR [#14](https://github.com/specklesystems/Server/issues/14). ([64279a8](https://github.com/specklesystems/Server/commit/64279a867d8c91a1ebbb6760bdf3e0b836df8f02)) +* **gql:** nukes realObject field from commits ([7d0115c](https://github.com/specklesystems/Server/commit/7d0115c74d95f51b6508e8add3c35ab5ac8d5b41)) +* **gql:** returns error if limit > 100 ([5f17642](https://github.com/specklesystems/Server/commit/5f176421caf989446c7d8bbed5f4aa670da96984)) +* **gql:** search users wip ([9733cc6](https://github.com/specklesystems/Server/commit/9733cc602d96ed1214f19f3e49993e6fa7e369be)) +* **gql:** stream users now returns a custom type - no longer polluting the original ([a9a7787](https://github.com/specklesystems/Server/commit/a9a77872d2ad0fe19caaba717d229e15f7903579)) +* **graphql:** added first working test ([d35af3b](https://github.com/specklesystems/Server/commit/d35af3bb94cc14fbfc475633104b8fb03639c503)) +* **graphql:** added ws handling (server) & apollo client (frontend) ([3e1f0cd](https://github.com/specklesystems/Server/commit/3e1f0cd1ed733290199640951e22c555a11067e3)) +* **graphql:** consolidated some responses, and improved some resolver behaviour ([ba874be](https://github.com/specklesystems/Server/commit/ba874be0e4b24ae324152d0eb33d45bee31abdb0)) +* **graphql:** get object children query in place ([f0e5560](https://github.com/specklesystems/Server/commit/f0e556042f4f556ee2ce4163f061134332498d14)) +* **graphql:** implemented more mutations and queries ([c512113](https://github.com/specklesystems/Server/commit/c51211385f9b820c20388041f34e4d79ece1ac15)) +* **graphql:** implemented object & reference mutations ([f23583d](https://github.com/specklesystems/Server/commit/f23583d6e4a229f653a9b4a8ade33a3f4838a1f3)) +* **graphql:** implemented object mutations ([3f1c963](https://github.com/specklesystems/Server/commit/3f1c963bfe1418f9b34879143f7e01999790058c)) +* **graphql:** initial explorations in providing a graphql api ([b758f56](https://github.com/specklesystems/Server/commit/b758f56485a7ae0a9ad1a3a63f1e271835f5d1ea)) +* **graphql:** initial scaffolding ([1995d8d](https://github.com/specklesystems/Server/commit/1995d8d64a258992e20e1b3551ad8c3506cfe2bb)) +* **graphql:** more implementations ([74ca015](https://github.com/specklesystems/Server/commit/74ca015767fdfdb163a48bcd391db988b05afe9a)) +* **graphql:** more scaffolding ([200331a](https://github.com/specklesystems/Server/commit/200331aacb4f035439f2a89512a02e9285dac418)) +* **graphql:** scaffolding ([13a8ab2](https://github.com/specklesystems/Server/commit/13a8ab2e3d3ac91cab54ea2b13eeb890cd2ee387)) +* **graphql:** scaffoled permission mutations on streams ([0225fce](https://github.com/specklesystems/Server/commit/0225fcedc0018be79183afee12cdc84f52fb9a51)) +* **local auth:** in dev/test mode, returns a token on the authorization finalisation middleware ([107266b](https://github.com/specklesystems/Server/commit/107266b901e6665ac766e036bc3d4637a8bd2060)) +* **logging:** preliminary implementation ([3aaa63b](https://github.com/specklesystems/Server/commit/3aaa63bfa3b3a8c9df6a75c0e60a6b258187636c)) +* **models:** removed username field form user ([c096ba8](https://github.com/specklesystems/Server/commit/c096ba89cc53df4d40e87748a4d143aa4e85bbc5)) +* **object creation:** proper batching in object creation, using transactions ([da16647](https://github.com/specklesystems/Server/commit/da1664779566f231156b1e2b328ac89638df7c2a)) +* **objects:** added controllers and tests for object & commit routes ([1527ad2](https://github.com/specklesystems/Server/commit/1527ad2e41c7b497834b344a86a8c582cb3daa9c)) +* **permissions:** allows getting public streams with anon requests + tests. test cov back >90% FTW ([6d9dd03](https://github.com/specklesystems/Server/commit/6d9dd0351cc073061b23b96806aef854c1b858d5)) +* **queries:** added query filters & verbs to getObjectChildrenQuery ([090370d](https://github.com/specklesystems/Server/commit/090370da0d597dc20616fbec0661c6023e8e8fe0)) +* **queries:** figuring out the perfect querie for getting objects ([85cc525](https://github.com/specklesystems/Server/commit/85cc52566382a2b6e5c67a88809f5dffa969cd85)) +* **queries:** finished implementation of getObjectChildrenQuery ([dfc8920](https://github.com/specklesystems/Server/commit/dfc8920d3a6ba9362f4507db3f42011e6d449ff8)) +* **queries:** fixed keyset non-sequential scan pagination ([755f9e6](https://github.com/specklesystems/Server/commit/755f9e63db7b416d93ff5c00bdcef7dba074a29e)) +* **queries:** implemented 90% of the getObjectChildrenQuery ([b39d729](https://github.com/specklesystems/Server/commit/b39d7297293fb7b4f8e8cdf27ae6c0c2efad62e8)) +* **queries:** implemented fast query route for children ([1a4442b](https://github.com/specklesystems/Server/commit/1a4442b5a7876250a6e2b1599ab2db78db90a661)) +* **queries:** keyset cursor works on non-unique field values ([34490a5](https://github.com/specklesystems/Server/commit/34490a5a1b3cda93ef833636dffe2579fb017d92)) +* **references:** added api routes and tests for references ([a513a7a](https://github.com/specklesystems/Server/commit/a513a7ac8dcdf61820102bc3a0faac1229947d7f)) +* **references:** added services, tests, etc ([02d3286](https://github.com/specklesystems/Server/commit/02d3286d8fa3c6b25deee3d9686f8df884b89375)) +* **resolvers:** added serverInfo route, bumped test coverage ([59e03f8](https://github.com/specklesystems/Server/commit/59e03f80eee4843d30c18dcbcb6feccd72a52e00)) +* **rest:** removed the rest api ([a68bd62](https://github.com/specklesystems/Server/commit/a68bd628c6861eee54959a0212722850188dc8d3)) +* **roles:** storing & enforcing roles ([bd5d743](https://github.com/specklesystems/Server/commit/bd5d7436f6bce2c425edfbed3da47cb6b9184c71)) +* **roles & api:** added server-bound user roles, validation, tests, and adde missing api routes ([6eafa2d](https://github.com/specklesystems/Server/commit/6eafa2da7171e179ebc0b1c02c5dd34f94a21cb9)) +* **scopes:** adds server:setup to spklwebapp ([fe938b1](https://github.com/specklesystems/Server/commit/fe938b1976fb76a297972dc687a52ec88e384d1d)) +* **scopes and roles:** separated user and token services ([a355757](https://github.com/specklesystems/Server/commit/a3557570ef7cd141be75b9010860c9346a29d570)) +* **server:** added limitations to various fields (related to [#39](https://github.com/specklesystems/Server/issues/39)) ([d70147a](https://github.com/specklesystems/Server/commit/d70147a60a5ca61d152bcdd6718573032b8c83e9)) +* **server:** added migrations for totalChildrenCount and sourceApplication for commit table ([6f61a36](https://github.com/specklesystems/Server/commit/6f61a36cd5d3bce57a9f53f297599abb196509eb)) +* **server:** adds redirect url return field to apps ([0a4d6ef](https://github.com/specklesystems/Server/commit/0a4d6ef8190f127bacf9d5dd9bd4512a0bd8bb1b)) +* **server:** adds stream role in relevant queries ([7845e75](https://github.com/specklesystems/Server/commit/7845e75c1fc849f55954567cf589c156ff9a94a2)) +* **server:** commits: implements all fields in services & updates parents ([2973ce8](https://github.com/specklesystems/Server/commit/2973ce86943a19b9542de1d10b7f9a22f9215c8f)) +* **server:** defaults branch query to "main" branch ([35653cd](https://github.com/specklesystems/Server/commit/35653cd88a6f001336123a5544674050a37fc052)) +* **server:** deprecates `previousCommitIds` field in favour of `parents` across all commit schemas ([3697559](https://github.com/specklesystems/Server/commit/3697559d629ec3a1caf1ca526fe890c9da9ba7c6)) +* **server:** fixes link sharing for stream update ([d8be80d](https://github.com/specklesystems/Server/commit/d8be80dc7ef3f26e6f4625b12ae235a155bcb881)) +* **server:** grabs profile pic from elgoog account ([6f08f08](https://github.com/specklesystems/Server/commit/6f08f0840c10b6f522f759a05174c289c0d4fab1)) +* **server:** implements branchName and total kids count in get commit by id + test ([1758858](https://github.com/specklesystems/Server/commit/1758858250e2341c77d37225075f83e1e8d9abd3)) +* **server:** implements branchName and totalChildren count across all commit get services ([349d91e](https://github.com/specklesystems/Server/commit/349d91ec069b7cb53b7f5fcc75595103951a2cf6)) +* **server:** minor formatting ([7471ee5](https://github.com/specklesystems/Server/commit/7471ee5b6ba452aa50cda300d914b066a68b88a8)) +* **server:** moves scope, role & app registration to service (init) logic ([afb5078](https://github.com/specklesystems/Server/commit/afb5078d3ca7b605d940c7081bd44ac03d5b5dcb)) +* **server:** personal api token query & specs ([622d61c](https://github.com/specklesystems/Server/commit/622d61c49172496e929b273e8e1f7b4062b11cb5)) +* **server:** retrieves latest commit on commit query if no id is specified ([3606ac9](https://github.com/specklesystems/Server/commit/3606ac919d184dc1daea1b3c5e804a539b571c3a)) +* **server:** returns author avatar url for commits ([8399a80](https://github.com/specklesystems/Server/commit/8399a80d0950ef443551d5925880a38e5245be28)) +* **server:** simplifies parent commits relationship ([33d3ae6](https://github.com/specklesystems/Server/commit/33d3ae6ca9f678baa877dd9f226b42048b4c1252)) +* **server:** wip: adds tests for new commit fields & implementation start ([dd78e80](https://github.com/specklesystems/Server/commit/dd78e8064b8d8ec3758c838223789118402810bc)) +* **server/commits:** create commit service now accepts source app & children count ([b2366f7](https://github.com/specklesystems/Server/commit/b2366f78446623cb9db1adfa5c730d7fb16bee4d)) +* **server/frontend:** 🤯 much improvements, so fixes, many code ([857dc51](https://github.com/specklesystems/Server/commit/857dc5198e9ed5cb11049e7c62108afc9ad277bb)) +* **server/frontend:** auth revamp WIP ([5947bd2](https://github.com/specklesystems/Server/commit/5947bd2c93a5c94cbbe864afe22a52fcb60c002a)) +* **server/frontend:** various ([225f363](https://github.com/specklesystems/Server/commit/225f3631daad99aacefbc685566342af1168caa3)) +* **server/frontend:** various, see details ([700d70b](https://github.com/specklesystems/Server/commit/700d70bd0fae72aab2c5e6c1683ac298a812f917)) +* **server/frontend:** wIP: auth flows are being revamped. HIC SVNT DRACONES ([a5542cf](https://github.com/specklesystems/Server/commit/a5542cf8cd79ebec8a4ab35b430dcf6e77bb510d)) +* **services:** added public streams only filter for getting user's commits ([6becdcb](https://github.com/specklesystems/Server/commit/6becdcbb98b55615e79efd0c4776c00e2afab2c7)) +* **setup:** finalised(-ish) setup flow & added auth sub app scaffold ([3d5e9d3](https://github.com/specklesystems/Server/commit/3d5e9d3075f0ae2489142e8840f978bf8e115e7a)) +* **setup:** removes setup check so we stop confusing people if it's not working yet :) ([6d90e26](https://github.com/specklesystems/Server/commit/6d90e26aaef158b551bcc5f29e606611693cd4bf)) +* **setup flow:** added registration form ([8381c62](https://github.com/specklesystems/Server/commit/8381c62fd88e495d82cf2fe98f18f0077ec00a71)) +* **setup flow:** added token scope, scaffolding setup app ([34d9780](https://github.com/specklesystems/Server/commit/34d9780b8ae2ae3a94cec891b6784f8367f7d598)) +* **streaming:** refactored streaming endpoint ([63e2171](https://github.com/specklesystems/Server/commit/63e21713cafa1d14d8914f0215d7d3bdbf942fd5)) +* **streaming&fixes:** fixes index on closure table & finalizes streaming response for obj children ([a8d0960](https://github.com/specklesystems/Server/commit/a8d096088f417b48003ed3a527af76631deb10a8)) +* **streams:** added service logic for stream creation and sharing ([4f8a274](https://github.com/specklesystems/Server/commit/4f8a27434aac07befa69ab809fed82e8242a6f3c)) +* **streams:** added stream deletion ([d398527](https://github.com/specklesystems/Server/commit/d398527b24a48914dd96eb60b177dafd68988efb)) +* **streams:** finalised routes and tests (integration & service) for streams ([4ecc313](https://github.com/specklesystems/Server/commit/4ecc313ecae6d19cf250de26d458dce75805af2e)) +* **streams api:** scaffolded routes and tests for basic stream routes ([94b5976](https://github.com/specklesystems/Server/commit/94b5976bd2f1123d4c5bd620e9c3b91c90f3c8f3)) +* **structure:** frontend + backend <3 ([ceba890](https://github.com/specklesystems/Server/commit/ceba8905d33b169a68b37c9f1b988eb04d545eec)) +* **structure:** structured frontend into an MPA and various other fixes ([23b63c7](https://github.com/specklesystems/Server/commit/23b63c749cce232cbbcc2b3741b8075d876e8bbe)) +* **sub:** filter stream created sub by owner id ([fee7ffb](https://github.com/specklesystems/Server/commit/fee7ffb257b8e98704697d5b70bcc277687d0faf)) +* **subs:** add [@has](https://github.com/has)Scope dir to streamCreated ([fa20915](https://github.com/specklesystems/Server/commit/fa209157bc23d8ef1af37304baea3ec70ed8a9bd)) +* **subs:** add scope auth to branch & commit subs ([397fb04](https://github.com/specklesystems/Server/commit/397fb04689fe804383c481c9523c135d2e212715)) +* **subs:** add stream updated and deleted subs ([e3f2d73](https://github.com/specklesystems/Server/commit/e3f2d7344473e6a9d93d41cc31347c5c66690bd6)) +* **subs:** added redis pubsubber (shared resource), imported it into stream resolvers ([7b32d39](https://github.com/specklesystems/Server/commit/7b32d39cac110494a40fba1c2f7576cf3c217c68)) +* **subs:** adds 'grantor' userid on stream permissions granted event ([0e98b6f](https://github.com/specklesystems/Server/commit/0e98b6f5ceccc736dc65f36c9ed94675d115c299)) +* **subs:** auth within subscripition resolvers ([be8e8be](https://github.com/specklesystems/Server/commit/be8e8be854f05e13cf465ec4ad7b9e5400a487e6)) +* **subs:** copy over regular auth logic for subs ([4698612](https://github.com/specklesystems/Server/commit/46986125754a652de916d3a92307f03232f00e69)) +* **subs:** finish up streams subscriptions ([78657bb](https://github.com/specklesystems/Server/commit/78657bbe7d2e5ff0309af0c0e4829d9f66676491)) +* **subs:** pass header token to connection ([cf6c0e4](https://github.com/specklesystems/Server/commit/cf6c0e4236c97158005d3e3c65a07a02e632fc61)) +* **subs:** permission subs resolvers ([f712871](https://github.com/specklesystems/Server/commit/f71287105aac4445cf3e38208c74bfa576822357)) +* **subs:** rename stream subs & apply directives ([6c3e8b1](https://github.com/specklesystems/Server/commit/6c3e8b138d3dfae26f14cc0d837b74327230b277)) +* **subs:** return stream input from streamCreated ([9d34ac0](https://github.com/specklesystems/Server/commit/9d34ac0e95318b45059231245a63d9516ac24b65)) +* **subs:** simplify stream create/delete subs ([6db1bdc](https://github.com/specklesystems/Server/commit/6db1bdcf421c1126915cc97c5eb110d38edae05e)) +* **subs:** subs for branch & commit mutations 🥳 ([c406abe](https://github.com/specklesystems/Server/commit/c406abe5ecc6f988fed3e66714361426a758c07c)) +* **subs:** throw ForbiddenError if no token ([8838cfd](https://github.com/specklesystems/Server/commit/8838cfd0e42b46ad25c9e71eaacffe11364a70a7)) +* **subscriptions:** trying to figure out subs ([d7b75f9](https://github.com/specklesystems/Server/commit/d7b75f9bfb42e36f21b72a70fc8a361d985d10c9)) +* **telemetry:** track actions & remove page track ([fd94f44](https://github.com/specklesystems/Server/commit/fd94f44433cf73ed5c5a837957367debe3114efe)) +* **tokens:** added db-bound token scopes ([eb240fd](https://github.com/specklesystems/Server/commit/eb240fdd43367c96fc810ba812ad118364b47338)) +* **tokens:** expiring tokens ✅ + test; lifespan default is 100yrs ([dad5ca9](https://github.com/specklesystems/Server/commit/dad5ca924a54302cea38c05548b7982e9bd80ed5)) +* **tracing:** better performance tracing ([0afc412](https://github.com/specklesystems/Server/commit/0afc41221e86ae6000fb60af537a05d49678a594)) +* **tracing:** cleanup & .env-example addtions ([76b3987](https://github.com/specklesystems/Server/commit/76b3987a27a06d627e64106eec0368567382fe93)) +* **tracing:** improved GQL ops tracing logs ([3e3d99b](https://github.com/specklesystems/Server/commit/3e3d99b78220beba17c24837bb078f15e40f5248)) +* **tree:** figuring out the best queries for object children ([7be78e0](https://github.com/specklesystems/Server/commit/7be78e05355f3bebf7e473773de683f04dcceed2)) +* **trees:** migrated reference tracking to closure table for faster scans on getChildren ([666e69c](https://github.com/specklesystems/Server/commit/666e69c428b81ea5159c96d148036f6bd0bec7a6)) +* **ui:** adds 300ms delay to tooltips ([48003d3](https://github.com/specklesystems/Server/commit/48003d392b53d1fcc20595c9f65e3e308bb0ef99)) +* **ui:** adds basic input field validation to stream and branch name ([29f1cea](https://github.com/specklesystems/Server/commit/29f1ceae00d0c44aa909a265b2c93b4c031c3cd4)) +* **ui:** adds collaborator search ([13a3b6e](https://github.com/specklesystems/Server/commit/13a3b6e444e956a3ea6e999c1a6eee5c03cbcdd6)) +* **ui:** adds dark mode 🌛 ([8dc1577](https://github.com/specklesystems/Server/commit/8dc157772deb17552c3f65ebcc2f805d84e7c8e3)) +* **ui:** adds debounce to stream and user search ⛹️‍♀️ ([85c92a3](https://github.com/specklesystems/Server/commit/85c92a38f4a6f139104b8d5ccd9d845e8fd45579)) +* **ui:** adds edit user and edit server, list item commit ([aafe47c](https://github.com/specklesystems/Server/commit/aafe47cb7a65120450693aae1e300be1ffbe2e20)) +* **ui:** adds empty stream page and stream query ([00cd096](https://github.com/specklesystems/Server/commit/00cd0965f87f06bed522f630dc29dcaf2c61916a)) +* **ui:** adds infinite scroll to streams page and a click-copy btn for stream ids ([2407268](https://github.com/specklesystems/Server/commit/24072685a0a876aa5a65db483d8e54841323e4b5)) +* **ui:** adds new stream dialog ([46acb27](https://github.com/specklesystems/Server/commit/46acb27dca58dee73769d1eaa04c1503ea44ae45)) +* **ui:** adds server info and user commits ([77734b3](https://github.com/specklesystems/Server/commit/77734b3dbf81b200c7b1a9eda31eb6ae3f907a3d)) +* **ui:** adds stream delete, branch edit and delete ([0c91944](https://github.com/specklesystems/Server/commit/0c91944ef720e845fb6abf9a26d1c7488e0818d3)) +* **ui:** adds stream search ([9557550](https://github.com/specklesystems/Server/commit/9557550a79e0c87d790f9c92bc9733ae6cc9964a)) +* **ui:** adds tooltips ([aedc611](https://github.com/specklesystems/Server/commit/aedc611b63b85f2bbb29007ccf7fcc47752a99ad)) +* **ui:** adds update user profile ([8219c25](https://github.com/specklesystems/Server/commit/8219c25d7224b3878bfd514ceb0933a9a8acecce)) +* **ui:** creates stream and commit components ([1cb0380](https://github.com/specklesystems/Server/commit/1cb0380af1da17152e50ba6eddcf82f21a90b970)) +* **ui:** edit commit message ([77887dc](https://github.com/specklesystems/Server/commit/77887dc2ecc351121f69e7ce2fc0a7d013e58780)) +* **ui:** edit stream and other ui tweaks ([98f548f](https://github.com/specklesystems/Server/commit/98f548f3139594390e97d864c6ad22642ba6ab69)) +* **ui:** grant and revoke stream permissions ([30bd4ed](https://github.com/specklesystems/Server/commit/30bd4edf2ec73fc86ca3ee4209a9c00779e8d0bd)) +* **ui:** layout now is set in each view for more flexibility, moves sidebar to its own component ([1f88ddd](https://github.com/specklesystems/Server/commit/1f88ddd1666c1ae7d0af962cbf8af99b8b5e4fd3)) +* **ui:** minor color fix for dark mode 💅 ([8883265](https://github.com/specklesystems/Server/commit/88832650c6e42618d93a983bc656e36de69e005d)) +* **ui:** minor tweaks and additions ([e03969c](https://github.com/specklesystems/Server/commit/e03969c93cda2ffef260840c397beaf51fc6239e)) +* **ui:** remember dark mode fix ([cd93416](https://github.com/specklesystems/Server/commit/cd93416cb8c5e0525cc187dffbe8e77d6c0b11fa)) +* **ui:** removes active class from HOME button 🏠 ([3bc04e2](https://github.com/specklesystems/Server/commit/3bc04e22e26495c5c381d3bd054c84eeb3996e90)) +* **ui:** scaffolding feed ([4edf26e](https://github.com/specklesystems/Server/commit/4edf26e9e3a06cb57e6bb07da2b0e89c9d79d57e)) +* **ui:** scaffolds frontend wip ([b299e18](https://github.com/specklesystems/Server/commit/b299e18c2294ac51608a71f65e9ca295b42c36d5)) +* **ui:** updates date-times to match new server format ([bb09b91](https://github.com/specklesystems/Server/commit/bb09b9108e3d718b1ab7a501cb5c2b8832c8bacf)) +* **ui:** updates link incon, and other minor tweaks ([ff420de](https://github.com/specklesystems/Server/commit/ff420de841dcb2a27ffc101b724df3038946bfbc)) +* **ui:** updates stream page, add new branch flow ([0958847](https://github.com/specklesystems/Server/commit/0958847356d1631602a5f94c2932ae796ace8ea4)) +* **upload:** allows for both gzipped multiparts as well as application/text/json ([3673fde](https://github.com/specklesystems/Server/commit/3673fde9f7c9941923bf0f87876ff35ba00fcd01)) +* **uploads:** added test streaming endpoint for uploads ([6847791](https://github.com/specklesystems/Server/commit/6847791ef13c1f40dd925c6e72699bdbbd2197cb)) +* **users:** scaffolded user services ([789f594](https://github.com/specklesystems/Server/commit/789f5945fe6550d2cbe2833e4321cde811376d5e)) +* **users:** users & api tokens logic + tests for services ([89932ab](https://github.com/specklesystems/Server/commit/89932ab6511d2407320eaf2bdee8e9535140fcc6)) +* **various:** gql api (tests & resolvers), added eslint & editorconfig ([2b33ab5](https://github.com/specklesystems/Server/commit/2b33ab5aa2eb48555659715657ed3a9340b5af2e)) +* **various:** tests ([96596d2](https://github.com/specklesystems/Server/commit/96596d2cef798bdff1d1c59f0ef59f6b22ccf166)) +* **viewer:** Added polycurve conversion. ([74c68fb](https://github.com/specklesystems/Server/commit/74c68fbf4c83aed0aed0ffdf24490cd46ec2941c)) +* **viewer:** adds fullscreen toggle ([f899cf3](https://github.com/specklesystems/Server/commit/f899cf3273f4d182ba01a9fe388932d0fc9f63e0)) +* **viewer:** adds loading convience method and improves selection behaviour ([5428bab](https://github.com/specklesystems/Server/commit/5428bab9f456264131c0d3a71dbe7afcbdd560d4)) +* **viewer:** adds optional inclusion box test for selection helper ([fd03ed7](https://github.com/specklesystems/Server/commit/fd03ed789b38dc333d34f7b9d4f33aba4a2e8a00)) +* **viewer:** adds progress bar in renderer component ([01fa4b5](https://github.com/specklesystems/Server/commit/01fa4b55b636195b20188977684a8ba54d11fbeb)) +* **viewer:** adds renderer to object page and cleans up commit view ([15eb208](https://github.com/specklesystems/Server/commit/15eb208495724f5439178c4eae858bff610bea6d)) +* **viewer:** adds small help menu to renderer component ([9ec099e](https://github.com/specklesystems/Server/commit/9ec099ef0df46218c6bbcf90ddaf1381d38d315a)) +* **viewer:** adds viewer to commit page, and sorts out unique renderer lifecycle ([29d4772](https://github.com/specklesystems/Server/commit/29d47720abfee362d962fe99259e0fa029d26c61)) +* **viewer:** adds viewer to stream main page & other improvements ([ae0f197](https://github.com/specklesystems/Server/commit/ae0f197416557076b1a7bd185024f3cc50086eaf)) +* **viewer:** adds zoom on section box toggle ([0cd249d](https://github.com/specklesystems/Server/commit/0cd249dc5124abef3553e9ed9a7d649ef171615b)) +* **viewer:** caches last loaded url in renderer & prevents reload unless changed ([b7f0517](https://github.com/specklesystems/Server/commit/b7f05179f07f217b2f90ea5132e502ee04d466e2)) +* **viewer:** changes camera controls; makes zooming smoother; fixes selection handling timeouts ([6f365fa](https://github.com/specklesystems/Server/commit/6f365fad730688d7fee99770480a99875854ecf3)) +* **viewer:** Dealt with chunking in curve conversions ([626546c](https://github.com/specklesystems/Server/commit/626546cc70db5139a9cff0233296a61fcd17366a)) +* **viewer:** double tapping ✅ ([39f0e82](https://github.com/specklesystems/Server/commit/39f0e827a03ffc4e1decdeb736650d58746d9e3d)) +* **viewer:** first (rather large) commit ([87290b9](https://github.com/specklesystems/Server/commit/87290b90089185ad197ffa9150332e8e295014b4)) +* **viewer:** Initial curve conversions ([80610cc](https://github.com/specklesystems/Server/commit/80610cc3b7788fd3c95227e9e2ee50bec0effae0)) +* **viewer:** interaction methods for section boxes ([6abf2d7](https://github.com/specklesystems/Server/commit/6abf2d7e14d61bf0d24b6969f572af3457869b53)) +* **viewer:** intermeidate step ([db2a3f0](https://github.com/specklesystems/Server/commit/db2a3f01f685435b11ab1ca930fda5444ecf1f2a)) +* **viewer:** multiple improvements ([258f029](https://github.com/specklesystems/Server/commit/258f029573f3891dbf6414d648f8cf9c7b0c50b6)) +* **viewer:** reflections and shiny things + section plane refactor ([3b9e198](https://github.com/specklesystems/Server/commit/3b9e198d6cc1e1e368252fb8b8afdc045f7d1c6a)) +* **viewer:** scaffolds frontend renderer integration ([5d4cf9c](https://github.com/specklesystems/Server/commit/5d4cf9c6164121a9e48af58d68fd460d21295213)) +* **viewer:** section box now 💯 ([6fe5608](https://github.com/specklesystems/Server/commit/6fe560840e1a7e18efa1a98bfd64dc3f31190af9)) +* **viewer:** section cuts & various improvements ([60ef859](https://github.com/specklesystems/Server/commit/60ef85955c358a722cfd005928d937718b4c39cb)) +* **viewer:** selection utils: esc clears selection ([a26cf1c](https://github.com/specklesystems/Server/commit/a26cf1ce3b1b4ddccd5280fa0875296d2e5101dc)) +* **viewer:** throttles progress updates ([084c688](https://github.com/specklesystems/Server/commit/084c688d1efa221e4c8a8f546a138fde19a92f72)) + + +### Bug Fixes + +* **.gitignore:** merged all node_modules ignore into a single glob pattern ([a3d3e43](https://github.com/specklesystems/Server/commit/a3d3e439088291b8d8fadc2189e051849233fe1f)) +* **apollo:** replaces non existing AuthorizationError with ForbiddenError ([73c5de8](https://github.com/specklesystems/Server/commit/73c5de826b4120c26aa693db21ba2654e78d7d59)) +* **auth:** correctly checks whether authN strategies are enabled before loading them ([436bdf8](https://github.com/specklesystems/Server/commit/436bdf8df412bc94c40958a46be76298505cdf41)) +* **auth:** enforces one token per app per user & tests ([ef1d48c](https://github.com/specklesystems/Server/commit/ef1d48c994becab84196c84d75c68d2a9b0c4cfd)) +* **auth-dir:** fix silly typo ([3463b99](https://github.com/specklesystems/Server/commit/3463b998e5a9b3db6c2b5aafd3ac5381a5979754)) +* **cursor:** fixing date-only cursors casting (`.toISOString()`) in getUserStreams ([a1b1663](https://github.com/specklesystems/Server/commit/a1b1663309f814f5aa9126f14dac55403e31a563)) +* **dates:** consolidates date formatting to ISO strings ([2bf77a8](https://github.com/specklesystems/Server/commit/2bf77a8df2675c55afd16dddc2420c1ebbaf20d2)) +* **dependencies:** added commitizen deps ([fd7b018](https://github.com/specklesystems/Server/commit/fd7b018348139bbeb321cfb4a8fdae0a7fe571d9)) +* **directives:** find correct resolver ([11c357a](https://github.com/specklesystems/Server/commit/11c357a79f5122cf7d049059ea70fe9813289d9a)) +* **directives:** typo in hasScope ([0f1dc60](https://github.com/specklesystems/Server/commit/0f1dc6078ef6b187f484f0d381c323397ddf310b)) +* **dockerfile:** add viewer to the docker build process ([404bd39](https://github.com/specklesystems/Server/commit/404bd39a8adf93340ee1a23edf0a4b07651afb86)), closes [#83](https://github.com/specklesystems/Server/issues/83) +* **dockerfile, docker-compose.yaml:** add wait for db and redis to server container ([356467b](https://github.com/specklesystems/Server/commit/356467b61898f746c17a391e9b4be455a763a486)) +* **docs:** Removed unnecessary `npm i` step. ([d223bbf](https://github.com/specklesystems/Server/commit/d223bbf41fae37eac220782cc897c6d75c2f3b0c)) +* **errors:** fixed misnamed err var name in startup causing no reports of EADDRINUSE being logged ([18bb402](https://github.com/specklesystems/Server/commit/18bb402b8c6b23ce71ac2baac3aa89beddd537ba)) +* **frontend:** closes [#74](https://github.com/specklesystems/Server/issues/74) ([a4e2a75](https://github.com/specklesystems/Server/commit/a4e2a75c57c2f33a574414a7b9a5776b522f3689)) +* **frontend:** displays app author only if present ([39f3a43](https://github.com/specklesystems/Server/commit/39f3a433dba3e4be8cbaedbbfb2cbdfa621203c3)) +* **frontend:** fixes interaction calls for renderer ([d508da0](https://github.com/specklesystems/Server/commit/d508da0027301da3704fd673bc9ac3cf1f52c82c)) +* **frontend:** fixes issue of routes and history mode ([34fe403](https://github.com/specklesystems/Server/commit/34fe40378eaf1cf4e900da2579d5067dada5ba03)) +* **frontend:** fixes issue of routes and history mode ([3619353](https://github.com/specklesystems/Server/commit/3619353b38b6616b61ac8aed7961cc847488c0f1)) +* **frontend:** minor fixes in stream page layout ([125fb60](https://github.com/specklesystems/Server/commit/125fb603382e120d70c71deabc247d0d1c98e634)) +* **git and docker ignore files:** merged node_modules ignore commands into a single glob pattern ([f14c600](https://github.com/specklesystems/Server/commit/f14c600470a3a31db53806720c0014783345cbae)) +* **gql:** commitUpdate return type ([f4d236c](https://github.com/specklesystems/Server/commit/f4d236cd635280d784961b1ef01c5c618593e605)) +* **gql:** query users, improves validations ([8df402e](https://github.com/specklesystems/Server/commit/8df402e4cb0e0e0de8c08c447f4666ab2a1facaf)) +* **gql:** removes unnecessary join from getCommitById query ([4d00d8a](https://github.com/specklesystems/Server/commit/4d00d8aff9fe7e73cfe0d1cc2b835a9a69b54d96)) +* **graphql:** AuthorizationError is not a constructor ([eb4f7a9](https://github.com/specklesystems/Server/commit/eb4f7a9a4631a3d4ab8dfca548788a65578d8274)) +* **graphql:** fixed commit data field retrieval ([310be6d](https://github.com/specklesystems/Server/commit/310be6d903d077c0a53ab8666a84e1c5e11d39a9)) +* **local authn:** fixes some uncaught errs & adds tests for local authN api ([6be9375](https://github.com/specklesystems/Server/commit/6be937541ef7a4846134eb8a3ca8c66ddf6e5f43)) +* **logging:** minor fixes ([c6a5c5c](https://github.com/specklesystems/Server/commit/c6a5c5cbced819619cafda3b7365e1e8a720b1c5)) +* **objecs:** makes createObjectsBatched await its promises (forEach -> for ... of) ([e3aacb7](https://github.com/specklesystems/Server/commit/e3aacb7d08a5826a9829d9e7cac76d8ad3fc3dff)) +* **objecst:** added route to get many (on 413 - request headers too large) ([ee8591e](https://github.com/specklesystems/Server/commit/ee8591ede17f007f47180a9c37e07cb1f4adfbbe)) +* **references:** fixed dupe branch commit errors ([215b2d9](https://github.com/specklesystems/Server/commit/215b2d924d92cac234a849ac51b10f6576eaa05c)) +* **server:** adds cors on object download route ([4e44040](https://github.com/specklesystems/Server/commit/4e440401c81d79493bd32ef05f7d96f937e77d00)) +* **server:** correctly sets path for app proxy ([2f3ba1b](https://github.com/specklesystems/Server/commit/2f3ba1be220861579d4e8c396edd53c0fd451d4e)) +* **server:** corrects path for serving app ([5915886](https://github.com/specklesystems/Server/commit/5915886081d88446ca38f5f63ee34a47abf921ba)) +* **server:** downgraded pg lib to ^7.18.2 ([753f1de](https://github.com/specklesystems/Server/commit/753f1de35e1f228914ac6ac5e1ad1a9b92ecf626)) +* **server:** ensures first object is returned in correct format, theoretically kills [#78](https://github.com/specklesystems/Server/issues/78) ([aca61b8](https://github.com/specklesystems/Server/commit/aca61b8c765175b51cbb62cb5ce65033d9eae9a6)) +* **server:** fixes [#96](https://github.com/specklesystems/Server/issues/96) ([5f7dae3](https://github.com/specklesystems/Server/commit/5f7dae33ccab0c5aaae98cb71634396f2100a1cf)) +* **server:** fixes destructuring fail on no stream acl present ([ad9b917](https://github.com/specklesystems/Server/commit/ad9b917a64468c0152b0f4e5d65f00e59e7e3ebe)) +* **server:** fixes stream get service when no role is present ([26f0841](https://github.com/specklesystems/Server/commit/26f08417b459eb48249deea63ebbb5acb2a805e5)) +* **server:** prevents main branch deletion ([07a27bd](https://github.com/specklesystems/Server/commit/07a27bd31d8856a2668fbb7dcb0167af35c17efe)), closes [#61](https://github.com/specklesystems/Server/issues/61) +* **server:** prevents users from revoking their own permissions ([dfc70d3](https://github.com/specklesystems/Server/commit/dfc70d314f6eba1d587911f4dc16e1225969df7f)) +* **server:** remote hotfix: correctly serving frontend in production from server ([4f0ab3e](https://github.com/specklesystems/Server/commit/4f0ab3e41d3a759028ceea99751ee7feb82ff74d)) +* **server:** removes console log statements ([65c44ca](https://github.com/specklesystems/Server/commit/65c44caed8401e2af596bcdcd05330460033db8b)) +* **server:** retuns personal user tokens correctly ([df0cba1](https://github.com/specklesystems/Server/commit/df0cba1466837553a0ac22d144a44ff62d8b6b1b)) +* **server:** returns secrets for owned apps ([7f38ab2](https://github.com/specklesystems/Server/commit/7f38ab2395ab16edb818a196aaf63c49b326c05e)) +* **server:** token revokation checks for format (bearer xxx) ([3510aa4](https://github.com/specklesystems/Server/commit/3510aa443b700c98f1187eeea76e281dbf166dcd)) +* **server:** updates stream `updatedAt` on common ops relating to a stream ([bd96248](https://github.com/specklesystems/Server/commit/bd96248552e01c1e34d55b562604a9179830fe95)), closes [#47](https://github.com/specklesystems/Server/issues/47) +* **services:** unified update function signature (expects id in object) ([660e41d](https://github.com/specklesystems/Server/commit/660e41d0c5d465e5d3fdc27f91497ac5edabddd5)) +* **setup:** fully removes the setup check app ([8a023d2](https://github.com/specklesystems/Server/commit/8a023d25d549183844c899649db9d97123a6b8ab)) +* **streams:** oops forgot some ❗ ([0723a69](https://github.com/specklesystems/Server/commit/0723a69895dd0535246115ebbd6b535998c6d662)) +* **subs:** remove redundant stream sub defs ([99f4738](https://github.com/specklesystems/Server/commit/99f473873a680eb8fa67a67fa0b0c267f57d54a5)) +* **subs:** replaces permission subs with created/deleted + sharedBy/revokedBy props ([690d95b](https://github.com/specklesystems/Server/commit/690d95bfde44abfcd5c1851aafdb1a3f504cb504)) +* **subs:** subscriptions now properly initialising ([8f25a6f](https://github.com/specklesystems/Server/commit/8f25a6f2fb6159675922e511748b6746c2991743)) +* **subs:** wrapps onConnection in a try catch and checks for auth headers ([16f3e1b](https://github.com/specklesystems/Server/commit/16f3e1bb0351ca583454e6a6a2e816723190d4c5)) +* **subscriptions:** added stream deleted subscription ([11571a1](https://github.com/specklesystems/Server/commit/11571a1d76d379474fc680cc7cb9d63ea42e4d9a)) +* **tests:** fixed failing tests ([9a269d0](https://github.com/specklesystems/Server/commit/9a269d0c16de242adad7b170dd1a9dc40a186cee)) +* **tests:** fixes issue introduced when updateing getCommitById method ([485c650](https://github.com/specklesystems/Server/commit/485c650e1b3203e8f9ab947072a5317df51d6f88)) +* **tests:** removed console.log statement ([ec1467a](https://github.com/specklesystems/Server/commit/ec1467a09397ed2b2d4b7ce101f8f8ee7856f8ce)) +* **tests:** someone fumbled up ([9ce41e1](https://github.com/specklesystems/Server/commit/9ce41e18ffb706505055de1c9994f0e694f9bbc7)) +* **tests & frontend:** fixes the frontend client subscription connection & scaffolds tests ([1868641](https://github.com/specklesystems/Server/commit/1868641367a5d6e3d54b61876bba57bd3e88cecd)) +* **tests & queries:** added graphql handlers for object children, tests, and refactoring ([05afd4f](https://github.com/specklesystems/Server/commit/05afd4f839ab54d25d399ab70661a4358b0ce755)) +* **tests/subscriptions:** fixes port conflict in subscription tests when ran from all tests command ([7a03c88](https://github.com/specklesystems/Server/commit/7a03c884ea95f56c01c6fb9d63297188bfb36c1b)) +* **typo:** spelling mistake in error message ([56f27e4](https://github.com/specklesystems/Server/commit/56f27e471530dbbf4e6fcc0ac7b06cde7b4c286e)) +* **ui:** changes stream name length to max 150 chars, fixes feed text ([25f2321](https://github.com/specklesystems/Server/commit/25f2321428b04509f90b7d553e56af324b9bc5bf)) +* **ui:** makes delete button smaller ([0f3a8c0](https://github.com/specklesystems/Server/commit/0f3a8c0c9dd1dccc48afe67751b0b84c9fff6feb)) +* **ui:** typo in query ([c735885](https://github.com/specklesystems/Server/commit/c735885eb24dc9301996aacea4fbdecd14cec45a)) +* **uploads:** awaits db insertion before returning from upload route ([d8a632a](https://github.com/specklesystems/Server/commit/d8a632a1c26a6f8e0bad19853963653046081f9b)) +* **viewer:** cleans selection on scene disposal ([0269fec](https://github.com/specklesystems/Server/commit/0269fec07124f797d0ec95163197ae6bd3f1c5ec)) +* **viewer:** double tap zoom to object made nicer; other minor improvements ([113b027](https://github.com/specklesystems/Server/commit/113b027f99eba7955d6baba3f67396af359fbd0d)) +* **viewer:** near/far correctly set on zoom zoom ([70bbc43](https://github.com/specklesystems/Server/commit/70bbc43acbc88634ac04bf3e2653902d52dd2c42)) +* http-proxy-middleware dev dependency ([a2bc60a](https://github.com/specklesystems/Server/commit/a2bc60a4fb5be74a0338ae3c2b035376bc6bcc96)) +* remove `debug: true` ([392c95d](https://github.com/specklesystems/Server/commit/392c95d3e1bcfb3e4e68466746ff0c5a0eeb8c28)) +* **upload:** upload response status changed from 303 (redirect) to 201 (created) ([e199e88](https://github.com/specklesystems/Server/commit/e199e881f24a7941507c910792275939e4d30350)) +* **user email:** corrects behaviour on protecting user/profile email feild ([55f5095](https://github.com/specklesystems/Server/commit/55f50952f2f926e746937912459504a733f2cf57)) +* **users:** fixes scope checking in user & email resolvers (profile:read/email & user:read/email) ([8b8b449](https://github.com/specklesystems/Server/commit/8b8b449ed2cf778b5dc7cd0c12693ce011496edb)) +* **viewer:** fixes loading of nested elems (e.g., windows in walls) ([8de7162](https://github.com/specklesystems/Server/commit/8de7162c188472f3f69107d6e89c8561f7811bc0)) diff --git a/packages/server/app.js b/packages/server/app.js index 9f97bd2c2..95686e442 100644 --- a/packages/server/app.js +++ b/packages/server/app.js @@ -13,7 +13,8 @@ const debug = require( 'debug' ) const Sentry = require( '@sentry/node' ) const Tracing = require( '@sentry/tracing' ) -const SentryInit = require( `${appRoot}/logging` ) +const Logging = require( `${appRoot}/logging` ) +const { startup: MatStartup } = require( `${appRoot}/logging/matomoHelper` ) const { ApolloServer, ForbiddenError } = require( 'apollo-server-express' ) @@ -31,7 +32,8 @@ let graphqlServer exports.init = async ( ) => { const app = express( ) - SentryInit( app ) + Logging( app ) + MatStartup() // Moves things along automatically on restart. // Should perhaps be done manually? diff --git a/packages/server/knexfile.js b/packages/server/knexfile.js index 816604d2a..f405c3f2c 100644 --- a/packages/server/knexfile.js +++ b/packages/server/knexfile.js @@ -31,8 +31,7 @@ let migrationDirs = walk( './modules' ) let env = process.env let connectionUri if ( env.POSTGRES_USER && env.POSTGRES_PASSWORD ) { - connectionUri = `postgres://${env.POSTGRES_USER}:${env.POSTGRES_PASSWORD}` + -`@${env.POSTGRES_URL}/${env.POSTGRES_DB}` + connectionUri = `postgres://${env.POSTGRES_USER}:${env.POSTGRES_PASSWORD}@${env.POSTGRES_URL}/${env.POSTGRES_DB}` } else { connectionUri = env.POSTGRES_URL } diff --git a/packages/server/logging/apolloPlugin.js b/packages/server/logging/apolloPlugin.js index 94903c8e7..b8a6f5590 100644 --- a/packages/server/logging/apolloPlugin.js +++ b/packages/server/logging/apolloPlugin.js @@ -1,6 +1,7 @@ /* istanbul ignore file */ const Sentry = require( '@sentry/node' ) const { ApolloError } = require( 'apollo-server-express' ) +const { apolloHelper } = require( './matomoHelper' ) module.exports = { requestDidStart( ctx ) { @@ -15,6 +16,12 @@ module.exports = { name: `GQL ${ctx.operation.selectionSet.selections[0].name.value}` } ) + try { + apolloHelper( `${ctx.operation.operation} ${ctx.operation.selectionSet.selections[0].name.value}` ) + } catch ( e ) { + Sentry.captureException( e ) + } + Sentry.configureScope( scope => scope.setSpan( transaction ) ) ctx.request.transaction = transaction }, @@ -33,8 +40,8 @@ module.exports = { if ( err.path ) { // We can also add the path as breadcrumb scope.addBreadcrumb( { - category: "query-path", - message: err.path.join( " > " ), + category: 'query-path', + message: err.path.join( ' > ' ), level: Sentry.Severity.Debug } ) } diff --git a/packages/server/logging/index.js b/packages/server/logging/index.js index 56c083455..37742db13 100644 --- a/packages/server/logging/index.js +++ b/packages/server/logging/index.js @@ -4,17 +4,21 @@ const Tracing = require( '@sentry/tracing' ) const { machineIdSync } = require( 'node-machine-id' ) module.exports = function ( app ) { - Sentry.setUser( { id: machineIdSync( ) } ) + const id = machineIdSync( ) - Sentry.init( { - dsn: process.env.SENTRY_DSN || 'https://84171d4d992f43a5bc867a6694934b01@o436188.ingest.sentry.io/5416515', - integrations: [ - new Sentry.Integrations.Http( { tracing: true } ), - new Tracing.Integrations.Express( { app } ) - ], - tracesSampleRate: 0.5 - } ) + if ( process.env.DISABLE_TRACING !== 'true' ) { + Sentry.setUser( { id: id } ) - app.use( Sentry.Handlers.requestHandler( ) ) - app.use( Sentry.Handlers.tracingHandler( ) ) + Sentry.init( { + dsn: process.env.SENTRY_DSN || 'https://84171d4d992f43a5bc867a6694934b01@o436188.ingest.sentry.io/5416515', + integrations: [ + new Sentry.Integrations.Http( { tracing: true } ), + new Tracing.Integrations.Express( { app } ) + ], + tracesSampleRate: 0.1 + } ) + + app.use( Sentry.Handlers.requestHandler( ) ) + app.use( Sentry.Handlers.tracingHandler( ) ) + } } diff --git a/packages/server/logging/matomoHelper.js b/packages/server/logging/matomoHelper.js new file mode 100644 index 000000000..1fcc1a4da --- /dev/null +++ b/packages/server/logging/matomoHelper.js @@ -0,0 +1,45 @@ +const Matomo = require ( 'matomo-tracker' ) +const { machineIdSync } = require( 'node-machine-id' ) + +const id = machineIdSync( ) +const mat = new Matomo( 7, 'https://speckle.matomo.cloud/matomo.php' ) + +module.exports = { + startup() { + if ( process.env.DISABLE_TRACKING !== 'true' ) { + mat.track( { + url: 'http://speckle.server', + action_name: 'startup', + uid: id, + cip: id, + token_auth: '8402f0bdd767c74cce86f710fe830a2c' + } ) + } + }, + apolloHelper( actionName ) { + if ( process.env.DISABLE_TRACKING !== 'true' ) { + mat.track( { + url: 'http://speckle.server/gql', + action_name: actionName || 'gql api call', + cip: id, + uid: id, + token_auth: '8402f0bdd767c74cce86f710fe830a2c' + } ) + } + }, + matomoMiddleware( req, res, next ) { + if ( process.env.DISABLE_TRACKING !== 'true' ) { + mat.track( { + url: req.url, + action_name: 'api call', + cip: id, + uid: id, + cvar: JSON.stringify( { + '1': [ 'HTTP method', req.method ] + } ), + token_auth: '8402f0bdd767c74cce86f710fe830a2c' + } ) + } + next() + } +} diff --git a/packages/server/modules/auth/rest/index.js b/packages/server/modules/auth/rest/index.js index 904b9c223..904234fea 100644 --- a/packages/server/modules/auth/rest/index.js +++ b/packages/server/modules/auth/rest/index.js @@ -8,6 +8,7 @@ const passport = require( 'passport' ) const debug = require( 'debug' ) const sentry = require( `${appRoot}/logging/sentryHelper` ) +const { matomoMiddleware } = require( `${appRoot}/logging/matomoHelper` ) const { getApp, getAllAppsAuthorizedByUser, createAuthorizationCode, createAppTokenFromAccessCode, refreshAppToken } = require( '../services/apps' ) const { createPersonalAccessToken, validateToken, revokeTokenById } = require( `${appRoot}/modules/core/services/tokens` ) const { revokeRefreshToken } = require( `${appRoot}/modules/auth/services/apps` ) @@ -48,7 +49,7 @@ module.exports = ( app ) => { /* Generates a new api token: (1) either via a valid refresh token or (2) via a valid access token */ - app.post( '/auth/token', async ( req, res, next ) => { + app.post( '/auth/token', matomoMiddleware, async ( req, res, next ) => { try { // Token refresh if ( req.body.refreshToken ) { @@ -74,7 +75,7 @@ module.exports = ( app ) => { /* Ensures a user is logged out by invalidating their token and refresh token. */ - app.post( '/auth/logout', async ( req, res, next ) => { + app.post( '/auth/logout', matomoMiddleware, async ( req, res, next ) => { try { let token = req.body.token let refreshToken = req.body.refreshToken diff --git a/packages/server/modules/core/graph/resolvers/server.js b/packages/server/modules/core/graph/resolvers/server.js index 026788fc6..12f01dcc2 100644 --- a/packages/server/modules/core/graph/resolvers/server.js +++ b/packages/server/modules/core/graph/resolvers/server.js @@ -1,7 +1,7 @@ 'use strict' const appRoot = require( 'app-root-path' ) const { validateServerRole, validateScopes, authorizeResolver } = require( `${appRoot}/modules/shared` ) -const { updateServerInfo, getServerInfo, getAvailableScopes, getAvailableRoles } = require( '../../services/generic' ) +const { updateServerInfo, getServerInfo, getPublicScopes, getPublicRoles } = require( '../../services/generic' ) module.exports = { Query: { @@ -18,13 +18,13 @@ module.exports = { async roles( parent, args, context, info ) { - return await getAvailableRoles( ) + return await getPublicRoles( ) }, async scopes( parent, args, context, info ) { - return await getAvailableScopes( ) + return await getPublicScopes( ) } }, diff --git a/packages/server/modules/core/migrations/20210225130308_add_roles_public_field.js b/packages/server/modules/core/migrations/20210225130308_add_roles_public_field.js new file mode 100644 index 000000000..9fc9e8568 --- /dev/null +++ b/packages/server/modules/core/migrations/20210225130308_add_roles_public_field.js @@ -0,0 +1,15 @@ +/* istanbul ignore file */ +exports.up = async ( knex ) => { + await knex.schema.alterTable( 'user_roles', table => { + table.boolean( 'public' ).defaultTo( true ) + } ) +} + +exports.down = async ( knex ) => { + let hasColumn = await knex.schema.hasColumn( 'user_roles', 'public' ) + if ( hasColumn ) { + await knex.schema.alterTable( 'user_roles', table => { + table.dropColumn( 'public' ) + } ) + } +} diff --git a/packages/server/modules/core/rest/download.js b/packages/server/modules/core/rest/download.js index 8859783b6..96736b26a 100644 --- a/packages/server/modules/core/rest/download.js +++ b/packages/server/modules/core/rest/download.js @@ -3,8 +3,9 @@ const zlib = require( 'zlib' ) const Busboy = require( 'busboy' ) const debug = require( 'debug' ) const appRoot = require( 'app-root-path' ) -const cors = require( 'cors' ) +const cors = require( 'cors' ) +const { matomoMiddleware } = require( `${appRoot}/logging/matomoHelper` ) const { contextMiddleware, validateScopes, authorizeResolver } = require( `${appRoot}/modules/shared` ) const { getObject, getObjectChildrenStream } = require( '../services/objects' ) const { getStream } = require( '../services/streams' ) @@ -13,7 +14,7 @@ module.exports = ( app ) => { app.options( '/objects/:streamId/:objectId', cors() ) - app.get( '/objects/:streamId/:objectId', cors(), contextMiddleware, async ( req, res ) => { + app.get( '/objects/:streamId/:objectId', cors(), contextMiddleware, matomoMiddleware, async ( req, res ) => { const stream = await getStream( { streamId: req.params.streamId, userId: req.context.userId } ) @@ -41,7 +42,7 @@ module.exports = ( app ) => { // Populate first object (the "commit") let obj = await getObject( { objectId: req.params.objectId } ) - + if ( !obj ) { return res.status( 404 ).send( `Failed to find object ${req.params.objectId}.` ) } diff --git a/packages/server/modules/core/rest/upload.js b/packages/server/modules/core/rest/upload.js index 2ab1214c4..971af8741 100644 --- a/packages/server/modules/core/rest/upload.js +++ b/packages/server/modules/core/rest/upload.js @@ -4,12 +4,13 @@ const Busboy = require( 'busboy' ) const debug = require( 'debug' ) const appRoot = require( 'app-root-path' ) +const { matomoMiddleware } = require( `${appRoot}/logging/matomoHelper` ) const { contextMiddleware, validateScopes, authorizeResolver } = require( `${appRoot}/modules/shared` ) const { createObjects, createObjectsBatched } = require( '../services/objects' ) module.exports = ( app ) => { - app.post( '/objects/:streamId', contextMiddleware, async ( req, res ) => { + app.post( '/objects/:streamId', contextMiddleware, matomoMiddleware, async ( req, res ) => { debug( 'speckle:upload-endpoint' )( 'booom upload endpoint' ) diff --git a/packages/server/modules/core/roles.js b/packages/server/modules/core/roles.js index a313c68e0..262ffd6a8 100644 --- a/packages/server/modules/core/roles.js +++ b/packages/server/modules/core/roles.js @@ -9,14 +9,16 @@ module.exports = [ description: 'Holds supreme autocratic authority, not restricted by written laws, legislature, or customs.', resourceTarget: 'server', aclTableName: 'server_acl', - weight: 1000 + weight: 1000, + public: false }, { name: 'server:user', description: 'Has normal access to the server.', resourceTarget: 'server', aclTableName: 'server_acl', - weight: 100 + weight: 100, + public: false }, /** * Roles for streams. @@ -26,18 +28,21 @@ module.exports = [ description: 'Owners have full access, including deletion rights & access control.', resourceTarget: 'streams', aclTableName: 'stream_acl', - weight: 1000 + weight: 1000, + public: true }, { name: 'stream:contributor', description: 'Contributors can create new branches and commits, but they cannot edit stream details or manage collaborators.', resourceTarget: 'streams', aclTableName: 'stream_acl', - weight: 500 + weight: 500, + public: true }, { name: 'stream:reviewer', description: 'Reviewers can only view (read) the data from this stream.', resourceTarget: 'streams', aclTableName: 'stream_acl', - weight: 100 + weight: 100, + public: true } ] diff --git a/packages/server/modules/core/services/generic.js b/packages/server/modules/core/services/generic.js index 05242fdb6..8b8d9b8be 100644 --- a/packages/server/modules/core/services/generic.js +++ b/packages/server/modules/core/services/generic.js @@ -14,18 +14,30 @@ module.exports = { }, - async getAvailableScopes( ) { + async getAllScopes( ) { return await Scopes( ).select( '*' ) }, - async getAvailableRoles( ) { + async getPublicScopes() { + + return await Scopes( ).select( '*' ).where( { public: true } ) + + }, + + async getAllRoles( ) { return await Roles( ).select( '*' ) }, + async getPublicRoles() { + + return await Roles( ).select( '*' ).where( { public: true } ) + + }, + async updateServerInfo( { name, company, description, adminContact, termsOfService } ) { let serverInfo = await Info( ).select( '*' ).first( ) diff --git a/packages/server/package-lock.json b/packages/server/package-lock.json index 7fe1cf8cc..028f9e41f 100644 --- a/packages/server/package-lock.json +++ b/packages/server/package-lock.json @@ -1,6 +1,6 @@ { "name": "@speckle/server", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -8340,6 +8340,11 @@ "object-visit": "^1.0.0" } }, + "matomo-tracker": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/matomo-tracker/-/matomo-tracker-2.2.4.tgz", + "integrity": "sha512-7fDy4wRhDQ1dnSxVqmnVqmmos9ACKag0fCBtBD3/Qeoqks7MFqXcO35nfS6S8xU/IXNf7534q/4Gx8fuWKYW6A==" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", diff --git a/packages/server/package.json b/packages/server/package.json index 22a07f53e..7aa992275 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@speckle/server", - "version": "2.1.0", + "version": "2.2.0", "private": true, "description": "", "homepage": "https://github.com/specklesystems/server", @@ -46,6 +46,7 @@ "lodash.merge": "^4.6.2", "lodash.set": "^4.3.2", "lodash.values": "^4.3.0", + "matomo-tracker": "^2.2.4", "morgan": "^1.10.0", "morgan-debug": "^2.0.0", "node-machine-id": "^1.1.12",