Skip to content

Commit 262a607

Browse files
authored
Merge pull request #230 from mapswipe/project/private-api
Project/private api
2 parents cdef0d5 + 028664e commit 262a607

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1986
-1380
lines changed

.eslintrc.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
"extends": [
33
"next/core-web-vitals",
44
"airbnb",
5-
"airbnb-typescript",
6-
"plugin:postcss-modules/recommended"
5+
"airbnb-typescript"
76
],
87
"parser": "@typescript-eslint/parser",
98
"parserOptions": {
109
"project": "./tsconfig.json"
1110
},
12-
"plugins": [
13-
"postcss-modules"
11+
"ignorePatterns": [
12+
"./server/",
13+
"src/generated/**",
14+
"**/*.generated.ts",
15+
"**/*.gen.ts"
1416
],
15-
"ignorePatterns": ["./server/"],
1617
"rules": {
1718
"strict": 1,
1819

@@ -22,9 +23,6 @@
2223
"react/jsx-indent-props": [2, 4],
2324
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".ts", ".jsx", ".tsx"] }],
2425
"react/react-in-jsx-scope": "off",
25-
"react/require-default-props": "off",
26-
27-
"postcss-modules/no-unused-class": "warn",
28-
"postcss-modules/no-undef-class": "warn"
26+
"react/require-default-props": "off"
2927
}
3028
}

.github/workflows/cd.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ jobs:
1414
test_build:
1515
name: Run Tests + Build
1616
runs-on: ubuntu-latest
17+
environment: 'prod'
18+
env:
19+
PIPELINE_TYPE: cd
1720

1821
steps:
1922
# NOTE: This uses default branch which is `main`
2023
- uses: actions/checkout@v4
24+
with:
25+
submodules: true
2126

2227
- uses: actions/setup-node@v4
2328
with:
@@ -34,11 +39,16 @@ jobs:
3439
- name: Run yarn install
3540
run: yarn install
3641

42+
- name: Generate typings
43+
run: yarn generate:type
44+
3745
- name: Download data
3846
# NOTE: This will add env.MAPSWIPE_API_LAST_MODIFIED_EPOCH
39-
run: ./scripts/download-data.sh
47+
run: yarn fetch-data
4048
env:
4149
MAPSWIPE_API_ENDPOINT: ${{ vars.MAPSWIPE_API_ENDPOINT }}
50+
MAPSWIPE_REFERER_ENDPOINT: ${{ vars.MAPSWIPE_REFERER_ENDPOINT }}
51+
APP_ENVIRONMENT: ${{ vars.APP_ENVIRONMENT }}
4252

4353
- name: Build + Test
4454
run: yarn build
@@ -47,12 +57,12 @@ jobs:
4757
# Common
4858
NODE_OPTIONS: --max_old_space_size=4096
4959
# App ENV
50-
MAPSWIPE_COMMUNITY_API_ENDPOINT: ${{ vars.MAPSWIPE_COMMUNITY_API_ENDPOINT }}
5160
MAPSWIPE_API_ENDPOINT: ${{ vars.MAPSWIPE_API_ENDPOINT }}
5261
NEXT_PUBLIC_POSTHOG_KEY: ${{ vars.NEXT_PUBLIC_POSTHOG_KEY }}
5362
NEXT_PUBLIC_POSTHOG_HOST_API: ${{ vars.NEXT_PUBLIC_POSTHOG_HOST_API }}
5463
# Build Date
5564
MAPSWIPE_BUILD_DATE: ${{ env.MAPSWIPE_API_LAST_MODIFIED_EPOCH }}
65+
NEXT_PUBLIC_BASE_PREFIX: ${{ vars.NEXT_PUBLIC_BASE_PREFIX }}
5666

5767
- name: Upload GH artifacts
5868
uses: actions/upload-pages-artifact@v3

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
ci:
1414
name: Lint + Type Checks
1515
runs-on: ubuntu-latest
16+
env:
17+
PIPELINE_TYPE: ci
18+
1619
steps:
1720
- uses: actions/checkout@v5
1821
with:
@@ -30,6 +33,12 @@ jobs:
3033
- name: Install dependencies
3134
run: yarn install --prefer-online
3235

36+
- name: Generate typings
37+
run: yarn generate:type
38+
39+
- name: Prefetch dummy data
40+
run: yarn fetch-data
41+
3342
- name: Check
3443
run: pre-commit run -vvv --all-files
3544

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@ pnpm-debug.log*
3333
.vscode/
3434

3535
# generated types
36-
src/generated/
36+
generated
37+
fullData/
38+
3739
cache/
40+
server/

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "server"]
2-
path = server
3-
url = git@github.com:mapswipe/python-mapswipe-workers.git
1+
[submodule "backend"]
2+
path = backend
3+
url = https://github.com/mapswipe/mapswipe-backend

.unimportedrc.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
"ignoreUnresolved": [],
66
"ignoreUnimported": ["**/*.d.ts"],
77
"ignoreUnused": [],
8-
"rootDir": "./src",
8+
"rootDir": ".",
9+
"typescript": true,
910
"aliases": {
10-
"components/*": ["./components/*"],
11-
"utils/*": ["./utils/*"],
12-
"hooks/*": ["./hooks/*"],
13-
"styles/*": ["./styles/*"],
14-
"generated/*": ["./generated/*"]
11+
"components/*": ["src/components/*"],
12+
"fullData/*": ["fullData/*"],
13+
"utils/*": ["src/utils/*"],
14+
"hooks/*": ["src/hooks/*"],
15+
"styles/*": ["src/styles/*"],
16+
"generated/*": ["src/generated/*"]
1517
}
1618
}

.yarn/install-state.gz

1.11 MB
Binary file not shown.

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

backend

Submodule backend added at f4a00c5

codegen.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
overwrite: true
22
schema:
3-
- "./server/django/schema.graphql"
3+
- "./backend/schema.graphql"
44
documents:
5-
- "pages/**/*.tsx"
6-
- "pages/**/*.ts"
5+
- "src/**/*.ts"
6+
- "scripts/**/*.ts"
7+
- "src/**/*.graphql"
78
generates:
8-
./src/generated/types.ts:
9+
./generated/types.ts:
910
plugins:
1011
- "typescript"
1112
- "typescript-operations"
12-
./src/generated/schema.json:
13+
./generated/schema.json:
1314
plugins:
1415
- "introspection"

0 commit comments

Comments
 (0)