Skip to content

Commit 9e8f209

Browse files
Merge upstream develop
2 parents b4ea8c6 + fb0fbf7 commit 9e8f209

73 files changed

Lines changed: 4770 additions & 349 deletions

Some content is hidden

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

.gitlab/ci/build_services.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,63 @@ push-notifications-image:
200200
rules:
201201
- !reference [.push-notifications-workflow, rules]
202202
- !reference [.release-workflow, rules]
203+
204+
########################################################################
205+
# scraper (Node/TypeScript)
206+
########################################################################
207+
208+
.scraper-workflow:
209+
image: gitlab.futo.org:5050/devops/manifest-repo/library/docker:latest
210+
rules:
211+
- if: $CI_COMMIT_TAG =~ /^scraper-/
212+
when: always
213+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
214+
changes:
215+
- pnpm-lock.yaml
216+
- pnpm-workspace.yaml
217+
- package.json
218+
- tools/**/*
219+
- patches/**/*
220+
- services/scraper/**/*
221+
- .gitlab/ci/build_services.yml
222+
- .gitlab/ci/deploy_services.yml
223+
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
224+
when: never
225+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
226+
changes:
227+
- pnpm-lock.yaml
228+
- pnpm-workspace.yaml
229+
- package.json
230+
- tools/**/*
231+
- patches/**/*
232+
- services/scraper/**/*
233+
- .gitlab/ci/build_services.yml
234+
- .gitlab/ci/deploy_services.yml
235+
variables:
236+
SERVICE_NAME: scraper
237+
SERVICE_DIR: scraper
238+
239+
# Fast-feedback typecheck. The scraper's `build` script is `tsc -p .`; the image
240+
# build also compiles, so this just surfaces type errors before the heavier
241+
# image job. PUPPETEER_SKIP_DOWNLOAD stops `pnpm install` from fetching Chromium
242+
# (the runtime image provides a system one).
243+
scraper-typecheck:
244+
extends: .scraper-workflow
245+
image: node:24-slim
246+
stage: check
247+
variables:
248+
PUPPETEER_SKIP_DOWNLOAD: '1'
249+
before_script:
250+
- npm install -g pnpm@10
251+
- pnpm config set @polycentric:registry https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/
252+
- pnpm install
253+
script:
254+
- pnpm --filter @polycentric/scraper build
255+
256+
scraper-image:
257+
extends:
258+
- .scraper-workflow
259+
- .service-image
260+
rules:
261+
- !reference [.scraper-workflow, rules]
262+
- !reference [.release-workflow, rules]

.gitlab/ci/deploy_services.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,55 @@ push-notifications-deploy-manifest-production:
162162
variables:
163163
MANIFEST_QUICK_TARGETS: inventory/polycentric-east/notifications.yml:polycentriceast
164164
needs:
165-
- push-notifications-deploy-image-production
165+
- push-notifications-deploy-image-production
166+
167+
########################################################################
168+
# scraper
169+
#
170+
# Runtime needs (NET_ADMIN, --init, internal-only networking) must be set in
171+
# the production manifest (inventory/.../scraper.yml in devops/manifest), not
172+
# here — compose.yml only covers local dev.
173+
########################################################################
174+
175+
.scraper-deploy-workflow:
176+
rules:
177+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
178+
changes:
179+
- pnpm-lock.yaml
180+
- pnpm-workspace.yaml
181+
- package.json
182+
- tools/**/*
183+
- patches/**/*
184+
- services/scraper/**/*
185+
- .gitlab/ci/build_services.yml
186+
- .gitlab/ci/deploy_services.yml
187+
variables:
188+
SERVICE_NAME: scraper
189+
190+
########################################
191+
# Tag the image with environment label #
192+
########################################
193+
194+
scraper-deploy-image-production:
195+
extends:
196+
- .scraper-deploy-workflow
197+
- .service-deploy-image
198+
when: manual
199+
environment:
200+
name: production/scraper
201+
needs:
202+
- job: scraper-image
203+
artifacts: false
204+
205+
###############################
206+
# Rolling restart on Manifest #
207+
###############################
208+
209+
scraper-deploy-manifest-production:
210+
extends:
211+
- .scraper-deploy-workflow
212+
- .service-deploy-manifest
213+
variables:
214+
MANIFEST_QUICK_TARGETS: inventory/polycentric-east/scraper.yml:polycentriceast
215+
needs:
216+
- scraper-deploy-image-production

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@/src/features/verifications/VerificationsScreen';

apps/polycentric/app/(tabs)/verify.tsx

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/polycentric/app/_layout.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { LinkPreviewsProvider } from '@/src/common/link-previews';
12
import { PolycentricProvider } from '@/src/common/lib/polycentric-hooks';
23
import { Atoms, ThemeProvider, useTheme } from '@/src/common/theme';
34
import { isWeb } from '@/src/common/util/platform';
@@ -90,12 +91,14 @@ export default function RootLayout() {
9091
<GestureHandlerRootView style={Atoms.flex_1}>
9192
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
9293
<ThemeProvider>
93-
<PolycentricProvider onInitialized={onInitialized}>
94-
<TrueSheetProvider>
95-
<RootStack />
96-
<PortalHost />
97-
</TrueSheetProvider>
98-
</PolycentricProvider>
94+
<LinkPreviewsProvider>
95+
<PolycentricProvider onInitialized={onInitialized}>
96+
<TrueSheetProvider>
97+
<RootStack />
98+
<PortalHost />
99+
</TrueSheetProvider>
100+
</PolycentricProvider>
101+
</LinkPreviewsProvider>
99102
</ThemeProvider>
100103
</SafeAreaProvider>
101104
</GestureHandlerRootView>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@/src/features/verifications/VerificationsCreateClaimScreen';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@/src/features/verifications/VerificationsScreen';

apps/polycentric/jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ module.exports = {
44
moduleNameMapper: {
55
'^@/(.*)$': '<rootDir>/$1',
66
},
7+
// Appends to (does not replace) the preset's setupFiles, which jest-expo uses
8+
// for native setup. setupFilesAfterEnv is undefined in the preset.
9+
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
710
};

apps/polycentric/jest.setup.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Global test setup. jest-expo's preset owns `setupFiles` (React Native + Expo
2+
// native setup), so project-wide additions live here via `setupFilesAfterEnv`
3+
// to avoid clobbering that array.
4+
5+
// AsyncStorage has no native module under Jest; use the package's official mock
6+
// so anything that persists settings (theme, link-preview toggle, …) works in
7+
// tests instead of throwing "NativeModule: AsyncStorage is null".
8+
jest.mock('@react-native-async-storage/async-storage', () =>
9+
require('@react-native-async-storage/async-storage/jest/async-storage-mock'),
10+
);

0 commit comments

Comments
 (0)