-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
262 changed files
with
7,431 additions
and
1,499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
target-branch: 'dev' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: E2E Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [dev, main] | ||
|
||
jobs: | ||
e2e-test: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
mysql: | ||
image: mysql:8.0.19 | ||
env: | ||
MYSQL_ROOT_PASSWORD: userfeedback | ||
MYSQL_DATABASE: e2e | ||
MYSQL_USER: userfeedback | ||
MYSQL_PASSWORD: userfeedback | ||
TZ: UTC | ||
ports: | ||
- 13307:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
||
smtp: | ||
image: rnwood/smtp4dev:v3 | ||
ports: | ||
- 5080:80 | ||
- 25:25 | ||
- 143:143 | ||
|
||
# opensearch: | ||
# image: opensearchproject/opensearch:2.4.1 | ||
# ports: | ||
# - 9200:9200 | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@main | ||
|
||
- name: Build and run | ||
run: | | ||
docker-compose -f "./docker/docker-compose.e2e.yml" up -d | ||
- name: Setup e2e test | ||
run: | | ||
cd apps/e2e | ||
yarn | ||
yarn playwright install | ||
- name: Run e2e tests | ||
run: | | ||
npm run test:e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,9 @@ volumes | |
|
||
dist | ||
|
||
tsconfig.tsbuildinfo | ||
tsconfig.tsbuildinfo | ||
|
||
# playwright | ||
playwright-report | ||
test-results | ||
user.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn install | ||
yarn typecheck | ||
yarn format | ||
yarn lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
.../api/src/configs/modules/typeorm-config/migrations/1705398750913-project-timezone-json.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Copyright 2023 LINE Corporation | ||
* | ||
* LINE Corporation licenses this file to you under the Apache License, | ||
* version 2.0 (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import type { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class ProjectTimezoneJson1705398750913 implements MigrationInterface { | ||
name = 'ProjectTimezoneJson1705398750913'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE \`projects\` CHANGE \`timezone_offset\` \`timezone\` varchar(255) NULL DEFAULT '+00:00'`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE \`projects\` DROP COLUMN \`timezone\``, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE \`projects\` ADD \`timezone\` varchar(255) NOT NULL DEFAULT '{"countryCode":"KR","name":"Asia/Seoul","offset":"+09:00"}'`, | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE \`projects\` DROP COLUMN \`timezone\``, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE \`projects\` ADD \`timezone\` varchar(255) NULL DEFAULT '+00:00'`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE \`projects\` CHANGE \`timezone\` \`timezone_offset\` varchar(255) NULL DEFAULT '+00:00'`, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* Copyright 2023 LINE Corporation | ||
* | ||
* LINE Corporation licenses this file to you under the Apache License, | ||
* version 2.0 (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import { Controller, Get, Logger, Req, Res } from '@nestjs/common'; | ||
import { ApiExcludeController } from '@nestjs/swagger'; | ||
import { FastifyReply, FastifyRequest } from 'fastify'; | ||
|
||
@Controller('/external') | ||
@ApiExcludeController() | ||
export class ExternalController { | ||
constructor() {} | ||
private logger = new Logger(ExternalController.name); | ||
|
||
@Get('docs') | ||
getExternalDocs( | ||
@Req() request: FastifyRequest, | ||
@Res() reply: FastifyReply, | ||
): void { | ||
const { protocol, hostname } = request; | ||
this.logger.log(`protocol: ${protocol}, hostname: ${hostname}`); | ||
const html = `<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Redoc</title> | ||
<!-- needed for adaptive design --> | ||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> | ||
<!-- | ||
Redoc doesn't change outer page styles | ||
--> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<redoc spec-url='${protocol}://${hostname}/external-docs-json'></redoc> | ||
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script> | ||
</body> | ||
</html>`; | ||
reply.type('text/html').send(html); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/** | ||
* Copyright 2023 LINE Corporation | ||
* | ||
* LINE Corporation licenses this file to you under the Apache License, | ||
* version 2.0 (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import { Module } from '@nestjs/common'; | ||
import { TypeOrmModule } from '@nestjs/typeorm'; | ||
|
||
import { OpensearchRepository } from '@/common/repositories'; | ||
import { AuthModule } from '../auth/auth.module'; | ||
import { ChannelModule } from '../channel/channel/channel.module'; | ||
import { FieldModule } from '../channel/field/field.module'; | ||
import { OptionEntity } from '../channel/option/option.entity'; | ||
import { OptionModule } from '../channel/option/option.module'; | ||
import { FeedbackEntity } from '../feedback/feedback.entity'; | ||
import { FeedbackModule } from '../feedback/feedback.module'; | ||
import { FeedbackMySQLService } from '../feedback/feedback.mysql.service'; | ||
import { FeedbackOSService } from '../feedback/feedback.os.service'; | ||
import { FeedbackService } from '../feedback/feedback.service'; | ||
import { IssueEntity } from '../project/issue/issue.entity'; | ||
import { IssueModule } from '../project/issue/issue.module'; | ||
import { FeedbackIssueStatisticsModule } from '../statistics/feedback-issue/feedback-issue-statistics.module'; | ||
import { FeedbackStatisticsModule } from '../statistics/feedback/feedback-statistics.module'; | ||
import { ExternalController } from './external.controller'; | ||
import { FeedbackController } from './feedback.controller'; | ||
import { IssueController } from './issue.controller'; | ||
|
||
@Module({ | ||
imports: [ | ||
TypeOrmModule.forFeature([FeedbackEntity, IssueEntity, OptionEntity]), | ||
FeedbackModule, | ||
IssueModule, | ||
FieldModule, | ||
OptionModule, | ||
ChannelModule, | ||
FeedbackStatisticsModule, | ||
FeedbackIssueStatisticsModule, | ||
AuthModule, | ||
], | ||
providers: [ | ||
FeedbackService, | ||
FeedbackMySQLService, | ||
FeedbackOSService, | ||
OpensearchRepository, | ||
], | ||
controllers: [FeedbackController, IssueController, ExternalController], | ||
}) | ||
export class ExternalModule {} |
Oops, something went wrong.