-
Notifications
You must be signed in to change notification settings - Fork 339
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
91 changed files
with
4,350 additions
and
308 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
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,17 @@ | ||
# https://docs.codecov.io/docs/commit-status | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
# basic | ||
target: 0 | ||
threshold: 0% | ||
base: 0% | ||
# advanced | ||
branches: [] | ||
if_no_uploads: error | ||
if_not_found: success | ||
if_ci_failed: error | ||
only_pulls: false | ||
flags: [] | ||
paths: [] |
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,9 @@ | ||
root: true | ||
extends: | ||
- custom | ||
ignorePatterns: | ||
- '**/node_modules/*' | ||
- '**/out/*' | ||
- '**/.next/*' | ||
- '**/dist/*' | ||
- '**/src/graphql/*' |
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 @@ | ||
# Unreleased |
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,13 @@ | ||
overwrite: true | ||
generates: | ||
./src/graphql/types/general_types.ts: | ||
documents: | ||
- 'src/graphql/general/*' | ||
schema: http://154.91.1.75:8080/v1/graphql | ||
config: | ||
# omitOperationSuffix: true | ||
skipTypeNameForRoot: true | ||
plugins: | ||
- "typescript" | ||
- "typescript-operations" | ||
- "typescript-react-apollo" # To generate custom hooks per query |
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,32 @@ | ||
import configFromPreset from 'jest-presets/jest/node/jest-preset'; | ||
import nextJest from 'next/jest'; | ||
import { pathsToModuleNameMapper } from 'ts-jest'; | ||
import tsconfig from './tsconfig.json'; | ||
|
||
/* Creating a jest configuration for nextjs. */ | ||
const createJestConfig = nextJest({ | ||
dir: './', | ||
})(configFromPreset); | ||
|
||
const exportFunc = async () => { | ||
// Create Next.js jest configuration | ||
const configFromNext = await createJestConfig(); | ||
Object.keys(configFromNext.moduleNameMapper).forEach((regExp) => { | ||
if (new RegExp(regExp).test('_.svg')) { | ||
configFromNext.moduleNameMapper[regExp] = 'shared-utils/__mocks__/svg.js'; | ||
} | ||
}); | ||
// moduleNameMapper overrided by nextjs, so we need to add it here. | ||
const finalConfig = { | ||
...configFromNext, | ||
moduleNameMapper: { | ||
...configFromNext.moduleNameMapper, | ||
...pathsToModuleNameMapper(tsconfig.compilerOptions.paths, { | ||
prefix: '<rootDir>/src/', | ||
}), | ||
}, | ||
}; | ||
return finalConfig; | ||
}; | ||
|
||
export default exportFunc; |
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,16 @@ | ||
import mockApollo from '@/tests/mocks/mockApollo'; | ||
import mockChainConfig from '@/tests/mocks/mockChainConfig'; | ||
import mockDayJs from '@/tests/mocks/mockDayJs'; | ||
import mockDynamicComponent from '@/tests/mocks/mockDynamicComponent'; | ||
import mockI18Next from '@/tests/mocks/mockI18Next'; | ||
import mockProfiles from '@/tests/mocks/mockProfiles'; | ||
import '@testing-library/jest-dom/extend-expect'; | ||
import 'jest-localstorage-mock'; | ||
|
||
jest.setTimeout(30000); | ||
mockI18Next(); | ||
mockApollo(); | ||
mockChainConfig(); | ||
mockDayJs(); | ||
mockDynamicComponent(); | ||
mockProfiles(); |
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,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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,11 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const { resolve } = require('path'); | ||
|
||
module.exports = { | ||
i18n: { | ||
defaultLocale: 'en', | ||
locales: ['en', 'zht', 'zhs', 'it', 'pl'], | ||
}, | ||
localeDetection: false, | ||
localePath: resolve('../../packages/ui/public/locales'), | ||
}; |
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,5 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const { readFileSync } = require('fs'); | ||
const getSitemap = require('shared-utils/configs/sitemap'); | ||
|
||
module.exports = getSitemap(JSON.parse(readFileSync('./package.json', 'utf8')).name); |
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,16 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const { readFileSync } = require('fs'); | ||
const { i18n } = require('./next-i18next.config'); | ||
const getNextConfig = require('../../packages/shared-utils/configs/next'); | ||
|
||
const nextConfig = getNextConfig(JSON.parse(readFileSync('./package.json', 'utf8')).name); | ||
nextConfig.i18n = i18n; | ||
|
||
nextConfig.rewrites = async () => [ | ||
{ | ||
source: '/gql', | ||
destination: 'http://154.91.1.75:8080/v1/graphql', | ||
}, | ||
]; | ||
|
||
module.exports = nextConfig; |
Oops, something went wrong.