Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-5828 - feathers update #4568

Merged
merged 34 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dbb8b96
BC-5639 - update feathersjs to v5
SevenWaysDP Oct 27, 2023
4ffca6f
BC-5639 - WIP problems
SevenWaysDP Oct 27, 2023
3801f10
BC-5639 - fix configs
SevenWaysDP Oct 27, 2023
ea9daef
fixup! BC-5639 - fix configs
SevenWaysDP Oct 27, 2023
3cf4a9f
BC-5639 - fix binding of service
SevenWaysDP Oct 30, 2023
eeac174
BC-5639 - fix error
SevenWaysDP Oct 30, 2023
e354ba0
BC-5639 - update feathers-hooks-common
SevenWaysDP Oct 30, 2023
47c8a94
BC-5639 - temp fix compilations bug
SevenWaysDP Oct 30, 2023
a03c213
BC-5639 - fix error
SevenWaysDP Nov 1, 2023
1fabfc0
BC-5639 - fix test promise error
SevenWaysDP Nov 1, 2023
edb7e9f
BC-5639 - update express deps
SevenWaysDP Nov 1, 2023
5f313b2
BC-5639 - fix tests
SevenWaysDP Nov 3, 2023
22a1ba8
uncomment sync account functions
virgilchiriac Nov 3, 2023
8e1569c
some cleanup
virgilchiriac Nov 14, 2023
11f85a1
Merge branch 'main' into bc-5639-poc-feathers-update
virgilchiriac Nov 14, 2023
7a9c7db
BC-5639 - try to fix calendar
virgilchiriac Nov 14, 2023
9d92307
BC-5639 - fix some tests
virgilchiriac Nov 16, 2023
a904613
BC-5639 - fix errors
virgilchiriac Nov 20, 2023
3d0a5f0
BC-5639 - skip oauth tests (service is fully migrated to nest)
virgilchiriac Nov 20, 2023
442d3ce
Merge branch 'main' into BC-5828-feathers-update
virgilchiriac Nov 22, 2023
d52b031
fix permission tests
virgilchiriac Nov 22, 2023
fe97c02
Merge branch 'main' into BC-5828-feathers-update
virgilchiriac Nov 22, 2023
53fa31b
Merge branch 'main' into BC-5828-feathers-update
SevenWaysDP Nov 24, 2023
22cdc5f
undo hydra url config
virgilchiriac Nov 28, 2023
28a3186
update feathers and remove skipLibCheck
virgilchiriac Nov 29, 2023
4f46ca6
Merge branch 'main' into BC-5828-feathers-update
virgilchiriac Nov 29, 2023
b5c18df
exclude feathers error declaration and explicitly add ws package
virgilchiriac Nov 29, 2023
b7cc15c
Merge branch 'main' into BC-5828-feathers-update
virgilchiriac Nov 30, 2023
89ed51b
Merge branch 'main' into BC-5828-feathers-update
virgilchiriac Dec 5, 2023
dd5ce7e
revert
virgilchiriac Dec 5, 2023
2baede8
ignore broken feathers reference definition
virgilchiriac Dec 4, 2023
439397d
Revert "revert"
virgilchiriac Dec 5, 2023
6e8a225
fix mess
virgilchiriac Dec 5, 2023
5aae5d0
Merge branch 'main' into BC-5828-feathers-update
virgilchiriac Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/server/src/apps/server.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
/* eslint-disable no-console */
import { MikroORM } from '@mikro-orm/core';
import { AccountService } from '@modules/account';
import { AccountValidationService } from '@modules/account/services/account.validation.service';

Check warning on line 7 in apps/server/src/apps/server.app.ts

View workflow job for this annotation

GitHub Actions / nest_lint

'@modules/account/services/account.validation.service' import is restricted from being used by a pattern. Do not deep import from a module
import { AccountUc } from '@modules/account/uc/account.uc';

Check warning on line 8 in apps/server/src/apps/server.app.ts

View workflow job for this annotation

GitHub Actions / nest_lint

'@modules/account/uc/account.uc' import is restricted from being used by a pattern. Do not deep import from a module
import { SystemRule } from '@modules/authorization/domain/rules';

Check warning on line 9 in apps/server/src/apps/server.app.ts

View workflow job for this annotation

GitHub Actions / nest_lint

'@modules/authorization/domain/rules' import is restricted from being used by a pattern. Do not deep import from a module
import { CollaborativeStorageUc } from '@modules/collaborative-storage/uc/collaborative-storage.uc';

Check warning on line 10 in apps/server/src/apps/server.app.ts

View workflow job for this annotation

GitHub Actions / nest_lint

'@modules/collaborative-storage/uc/collaborative-storage.uc' import is restricted from being used by a pattern. Do not deep import from a module
import { GroupService } from '@modules/group';
import { FeathersRosterService } from '@modules/pseudonym';
import { RocketChatService } from '@modules/rocketchat';
import { ServerModule } from '@modules/server';
import { TeamService } from '@modules/teams/service/team.service';

Check warning on line 15 in apps/server/src/apps/server.app.ts

View workflow job for this annotation

GitHub Actions / nest_lint

'@modules/teams/service/team.service' import is restricted from being used by a pattern. Do not deep import from a module
import { NestFactory } from '@nestjs/core';
import { ExpressAdapter } from '@nestjs/platform-express';
import { enableOpenApiDocs } from '@shared/controller/swagger';
Expand Down Expand Up @@ -49,7 +49,7 @@
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const feathersExpress = await legacyAppPromise(orm);
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
feathersExpress.setup();
await feathersExpress.setup();

// set reference to legacy app as an express setting so we can
// access it over the current request within FeathersServiceProvider
Expand Down
7 changes: 2 additions & 5 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"$schema": "./default.schema.json",
"host": "localhost",
"port": 3030,
"public": "../public/",
"public": "./public/",
"services": {
"calendar": "http://localhost:3000",
"content": "https://content.schul-cloud.org",
"hydra": "http://localhost:9001",
"web": "http://localhost:3100"
"hydra": "http://localhost:9001"
},
"I18N": {
"AVAILABLE_LANGUAGES": "de,en,es,uk",
Expand Down
7 changes: 2 additions & 5 deletions config/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
"host": "localhost",
"port": "PORT",
"mongodb": "MONGO_URI",
"public": "../public/",
"public": "./public/",
"services": {
"calendar": "CALENDAR_URI",
"content": "CONTENT_URI",
"hydra": "HYDRA_URI",
"web": "HOST"
"hydra": "HYDRA_URI"
}
}
6 changes: 1 addition & 5 deletions config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"SC_DOMAIN": "localhost",
"PUBLIC_BACKEND_URL": "http://localhost:3030/api",
"DB_URL": "mongodb://127.0.0.1:27017/schulcloud-test",
"public": "../public/",
"services": {
"calendar": "https://schul.tech:3000",
"content": "https://content.schul-cloud.org"
},
"public": "./public/",
"FORCE_SEND_EMAIL": true,
"LDAP_PASSWORD_ENCRYPTION_KEY": "1234567890123456",
"AES_KEY": "6543210987654321",
Expand Down
21 changes: 16 additions & 5 deletions esbuild/esmodules-bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ const options = [
{
pathToResolutionModeError: 'node_modules/strtok3/lib/types.d.ts',
},
{
noExportedMember: 'node_modules/@feathersjs/express/lib/declarations.d.ts',
},
];

const globalOptions = {
Expand All @@ -41,11 +44,16 @@ const globalOptions = {
loader: { '.js': 'jsx' },
};

function replace(pathToResolutionModeError) {
const file = resolve(__dirname, '..', pathToResolutionModeError);
function replace(type, filePath) {
const file = resolve(__dirname, '..', filePath);
fs.readFile(file, 'utf8', (err, data) => {
if (err) throw err;
const result = data.replace(/resolution-mode="require"/g, '');
let result = data;
if (type === 'pathToResolutionModeError') {
result = data.replace(/resolution-mode="require"/g, '');
} else if (type === 'noExportedMember') {
result = `// @ts-nocheck\n\n${data}`;
}

fs.writeFile(file, result, 'utf8', (err) => {
if (err) throw err;
Expand All @@ -54,7 +62,7 @@ function replace(pathToResolutionModeError) {
}

for (const option of options) {
const { entryPoint, outdir, pathToResolutionModeError } = option;
const { entryPoint, outdir, pathToResolutionModeError, noExportedMember } = option;
try {
if (entryPoint && outdir) {
build({
Expand All @@ -71,7 +79,10 @@ for (const option of options) {

// remove resolution-mode="require" from file because it provokes an error in the commonjs build
if (pathToResolutionModeError) {
replace(pathToResolutionModeError);
replace('pathToResolutionModeError', pathToResolutionModeError);
}
if (noExportedMember) {
replace('noExportedMember', noExportedMember);
}
} catch (e) {
process.exit(1);
Expand Down
Loading
Loading