Skip to content

Commit

Permalink
Merge pull request #538 from flocon-trpg/main
Browse files Browse the repository at this point in the history
  • Loading branch information
kizahasi authored Feb 20, 2023
2 parents 5b2850d + 7a1c1a3 commit d5724d7
Show file tree
Hide file tree
Showing 347 changed files with 6,401 additions and 88,780 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,6 @@ jobs:

- run: yarn

- name: Build css file
run: yarn build-less
working-directory: ./apps/web-server

# 必要のない web-server のビルドも行われる。web-server のみを除外するとその除外処理でミスが生じる余地があるため、web-server も含めてまとめてビルドしている。
- name: Generate dist
run: yarn build
Expand Down
807 changes: 0 additions & 807 deletions .yarn/releases/yarn-3.3.0.cjs

This file was deleted.

873 changes: 873 additions & 0 deletions .yarn/releases/yarn-3.4.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-licenses.cjs
spec: "https://raw.githubusercontent.com/flocon-trpg/yarn-plugin-licenses/v0.8.2/bundles/@yarnpkg/plugin-licenses.js"

yarnPath: .yarn/releases/yarn-3.3.0.cjs
yarnPath: .yarn/releases/yarn-3.4.1.cjs
2 changes: 1 addition & 1 deletion apps/api-server/dist/VERSION.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions apps/api-server/dist/buildSchema.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/api-server/dist/buildSchema.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/api-server/dist/graphql/resolvers/utils/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 26 additions & 27 deletions apps/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@
"@types/color": "^3.0.2",
"@types/express": "^4.17.13",
"@types/fs-extra": "^9.0.13",
"@types/inquirer": "^8.2.5",
"@types/inquirer": "^8.0.0",
"@types/lodash": "^4.14.181",
"@types/multer": "^1.4.7",
"@types/node": "^14.18.12",
"@types/safe-compare": "^1.1.0",
"@types/sharp": "^0.31.0",
"@types/uuid": "^8.3.1",
"@types/uuid": "^9.0.0",
"@types/ws": "^8.0.0",
"@types/yargs": "^17.0.3",
"apollo-server-express": "^3.3.0",
"bcdice": "^4.0.0",
"bcrypt": "^5.0.1",
"check-disk-space": "^3.0.1",
"class-validator": "^0.13.1",
"class-validator": "^0.14.0",
"color": "^4.0.1",
"dotenv": "^16.0.0",
"dotenv-expand": "^8.0.0",
Expand All @@ -69,16 +69,16 @@
"graphql-subscriptions": "^1.1.0",
"graphql-ws": "^5.8.1",
"immer": "^9.0.16",
"inquirer": "^8.2.0",
"inquirer": "^8.0.0",
"lodash": "^4.17.21",
"multer": "^1.4.3",
"npm-run-all": "^4.1.5",
"pino": "^8.6.1",
"pino-http": "^8.2.1",
"rate-limiter-flexible": "^2.3.0",
"reflect-metadata": "^0.1.13",
"rimraf": "3.0.2",
"rollup": "3.7.0",
"rimraf": "4.1.2",
"rollup": "3.15.0",
"rollup-plugin-multi-input": "^1.3.1",
"rxjs": "^7.5.6",
"safe-compare": "^1.1.4",
Expand All @@ -88,8 +88,8 @@
"tslib": "^2.4.1",
"type-fest": "^3.0.0",
"type-graphql": "^1.1.1",
"typescript": "4.9.4",
"uuid": "^8.3.2",
"typescript": "4.9.5",
"uuid": "^9.0.0",
"ws": "^8.8.1",
"yargs": "^17.2.1",
"zod": "^3.19.1"
Expand All @@ -98,30 +98,29 @@
"@flocon-trpg/eslint-config": "workspace:^",
"@flocon-trpg/prettier-config": "workspace:^",
"@flocon-trpg/tsconfig": "workspace:^",
"@flocon-trpg/typed-document-node-v0.7.2": "workspace:*",
"@flocon-trpg/typed-document-node-v0.7.8": "workspace:*",
"@flocon-trpg/typed-document-node": "workspace:*",
"@flocon-trpg/web-server-utils": "workspace:*",
"@graphql-codegen/cli": "2.13.12",
"@graphql-codegen/typed-document-node": "2.3.7",
"@graphql-codegen/typescript": "2.8.2",
"@graphql-codegen/typescript-operations": "2.5.7",
"@rollup/plugin-typescript": "10.0.1",
"@types/jest": "29.2.3",
"@graphql-codegen/cli": "2.16.5",
"@graphql-codegen/typed-document-node": "2.3.13",
"@graphql-codegen/typescript": "2.8.8",
"@graphql-codegen/typescript-operations": "2.5.13",
"@rollup/plugin-typescript": "11.0.0",
"@types/jest": "29.4.0",
"@types/url-join": "4.0.1",
"@typescript-eslint/eslint-plugin": "5.44.0",
"@typescript-eslint/parser": "5.44.0",
"@urql/core": "3.0.5",
"eslint": "8.28.0",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-typescript": "3.5.2",
"eslint-plugin-import": "2.26.0",
"@typescript-eslint/eslint-plugin": "5.52.0",
"@typescript-eslint/parser": "5.52.0",
"@urql/core": "3.1.1",
"eslint": "8.34.0",
"eslint-config-prettier": "8.6.0",
"eslint-import-resolver-typescript": "3.5.3",
"eslint-plugin-import": "2.27.5",
"form-data": "4.0.0",
"isomorphic-fetch": "3.0.0",
"isomorphic-ws": "5.0.0",
"jest": "29.3.1",
"node-fetch": "2.6.7",
"prettier": "2.8.0",
"ts-jest": "29.0.3",
"jest": "29.4.3",
"node-fetch": "2.6.9",
"prettier": "2.8.4",
"ts-jest": "29.0.5",
"url-join": "4.0.1"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion apps/api-server/src/VERSION.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { SemVer } from '@flocon-trpg/utils';
export const VERSION = new SemVer({
major: 0,
minor: 7,
patch: 13,
patch: 14,
});
6 changes: 6 additions & 0 deletions apps/api-server/src/buildSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ const emitSchemaFileOptions: EmitSchemaFileOptions = {
path: path.resolve(process.cwd(), './tmp/schema.gql'),
};

// [email protected] で forbidUnknownValues がデフォルトで true になったため、false を設定するようにする処理。
// https://github.com/typestack/class-validator/blob/develop/CHANGELOG.md#0140-2022-12-09
const validate: BuildSchemaOptions['validate'] = { forbidUnknownValues: false };

export const buildSchema =
(serverConfig: ServerConfig | typeof noAuthCheck) =>
async (options: Options): Promise<GraphQLSchema> => {
Expand All @@ -68,6 +72,7 @@ export const buildSchema =
authChecker: authChecker(serverConfig),
emitSchemaFile,
pubSub: options.pubSub,
validate,
});
};

Expand All @@ -84,5 +89,6 @@ export const buildSchemaSync =
authChecker: authChecker(serverConfig),
emitSchemaFile,
pubSub: options.pubSub,
validate,
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
UseMiddleware,
createUnionType,
} from 'type-graphql';
import { GlobalRoom } from '../../../../entities-graphql/room';
import * as Participant$MikroORM from '../../../../entities/participant/entity';
import * as Room$MikroORM from '../../../../entities/room/entity';
import { GlobalRoom } from '../../../../entities-graphql/room';
import { CreateRoomFailureType } from '../../../../enums/CreateRoomFailureType';
import { ParticipantRoleType } from '../../../../enums/ParticipantRoleType';
import { ResolverContext } from '../../../../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ import {
UseMiddleware,
createUnionType,
} from 'type-graphql';
import {
DicePieceLog as DicePieceLog$MikroORM,
StringPieceLog as StringPieceLog$MikroORM,
} from '../../../../entities/roomMessage/entity';
import { GlobalRoom } from '../../../../entities-graphql/room';
import * as RoomAsListItemGlobal from '../../../../entities-graphql/roomAsListItem';
import {
DicePieceLog as DicePieceLogNameSpace,
StringPieceLog as StringPieceLogNameSpace,
} from '../../../../entities-graphql/roomMessage';
import {
DicePieceLog as DicePieceLog$MikroORM,
StringPieceLog as StringPieceLog$MikroORM,
} from '../../../../entities/roomMessage/entity';
import { OperateRoomFailureType } from '../../../../enums/OperateRoomFailureType';
import { ResolverContext } from '../../../../types';
import { ENTRY } from '../../../../utils/roles';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import {
UseMiddleware,
createUnionType,
} from 'type-graphql';
import { GlobalRoom } from '../../../../entities-graphql/room';
import { stateToGraphQL } from '../../../../entities-graphql/roomAsListItem';
import { isBookmarked } from '../../../../entities/room/isBookmarked';
import { role } from '../../../../entities/room/role';
import { GlobalRoom } from '../../../../entities-graphql/room';
import { stateToGraphQL } from '../../../../entities-graphql/roomAsListItem';
import { GetRoomFailureType } from '../../../../enums/GetRoomFailureType';
import {
ParticipantRoleType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
UseMiddleware,
createUnionType,
} from 'type-graphql';
import * as RoomAsListItemGlobal from '../../../../entities-graphql/roomAsListItem';
import * as Room$MikroORM from '../../../../entities/room/entity';
import * as RoomAsListItemGlobal from '../../../../entities-graphql/roomAsListItem';
import { GetRoomFailureType } from '../../../../enums/GetRoomFailureType';
import { ResolverContext } from '../../../../types';
import { ENTRY } from '../../../../utils/roles';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
UseMiddleware,
createUnionType,
} from 'type-graphql';
import * as RoomAsListItemGlobal from '../../../../entities-graphql/roomAsListItem';
import * as Room$MikroORM from '../../../../entities/room/entity';
import * as RoomAsListItemGlobal from '../../../../entities-graphql/roomAsListItem';
import { GetRoomFailureType } from '../../../../enums/GetRoomFailureType';
import { ResolverContext } from '../../../../types';
import { ENTRY } from '../../../../utils/roles';
Expand Down
8 changes: 4 additions & 4 deletions apps/api-server/src/graphql/resolvers/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ import Color from 'color';
import safeCompare from 'safe-compare';
import { PubSubEngine } from 'type-graphql';
import { EntryPasswordConfig, ServerConfig, plain } from '../../../config/types';
import * as Room$MikroORM from '../../../entities/room/entity';
import { RoomPrvMsg, RoomPubMsg } from '../../../entities/roomMessage/entity';
import { User } from '../../../entities/user/entity';
import { getUserIfEntry } from '../../../entities/user/getUserIfEntry';
import { GlobalRoom } from '../../../entities-graphql/room';
import {
DicePieceLog as DicePieceLogNameSpace,
StringPieceLog as StringPieceLogNameSpace,
} from '../../../entities-graphql/roomMessage';
import * as Room$MikroORM from '../../../entities/room/entity';
import { RoomPrvMsg, RoomPubMsg } from '../../../entities/roomMessage/entity';
import { User } from '../../../entities/user/entity';
import { getUserIfEntry } from '../../../entities/user/getUserIfEntry';
import { BaasType } from '../../../enums/BaasType';
import { DecodedIdToken, EM, ResolverContext } from '../../../types';
import { RoomOperation } from '../../objects/room';
Expand Down
14 changes: 6 additions & 8 deletions apps/api-server/test/resolvers/resolvers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,27 @@ import {
CreateFileTagMutation,
CreateRoomMutation,
DeleteMessageMutation,
DeleteRoomAsAdminMutation,
DeleteRoomFailureType,
DeleteRoomMutation,
EditFileTagsMutation,
EditMessageMutation,
GetFilesQuery,
GetMessagesQuery,
GetRoomFailureType,
GetRoomQuery,
GetRoomsListQuery,
JoinRoomAsPlayerMutation,
JoinRoomAsSpectatorMutation,
LeaveRoomMutation,
MakeMessageNotSecretMutation,
OperateMutation,
ParticipantRole,
RoomPublicMessageFragment,
UpdateBookmarkMutation,
WritePrivateMessageMutation,
WritePublicMessageMutation,
} from '@flocon-trpg/typed-document-node-v0.7.1';
import {
DeleteRoomAsAdminMutation,
GetRoomFailureType,
GetRoomQuery,
GetRoomsListQuery,
UpdateBookmarkMutation,
} from '@flocon-trpg/typed-document-node-v0.7.2';
} from '@flocon-trpg/typed-document-node';
import { loggerRef, parseStringToBoolean, recordToArray } from '@flocon-trpg/utils';
import { diff, serializeUpOperation, toUpOperation } from '@kizahasi/ot-string';
import { OperationResult } from '@urql/core';
Expand Down
2 changes: 1 addition & 1 deletion apps/api-server/test/resolvers/utils/subscription.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RoomEventSubscription } from '@flocon-trpg/typed-document-node-v0.7.1';
import { RoomEventSubscription } from '@flocon-trpg/typed-document-node';
import { recordForEach } from '@flocon-trpg/utils';
import { RoomMessagesClient, privateMessage, publicMessage } from '@flocon-trpg/web-server-utils';
import { Option } from '@kizahasi/option';
Expand Down
Loading

0 comments on commit d5724d7

Please sign in to comment.