From 65b79cc022d53a0511b31dd3316ff60fc735ffd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sn=C3=A6r=20Seljan=20=C3=9E=C3=B3roddsson?= Date: Thu, 12 Dec 2024 09:10:58 +0000 Subject: [PATCH 1/6] refactor(services-bff): Update failed login attempt data retrieval (#17213) * refactor(services-bff): improve login attempt data retrieval * fix(auth): simplify error handling in login process Remove unnecessary error code from redirect in the login process. --- .../bff/src/app/modules/auth/auth.service.ts | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/apps/services/bff/src/app/modules/auth/auth.service.ts b/apps/services/bff/src/app/modules/auth/auth.service.ts index 4c8ee5b5b02b..282cbf868f7b 100644 --- a/apps/services/bff/src/app/modules/auth/auth.service.ts +++ b/apps/services/bff/src/app/modules/auth/auth.service.ts @@ -277,14 +277,24 @@ export class AuthService { }) } - let loginAttemptData: LoginAttemptData | undefined + const loginAttemptCacheKey = this.cacheService.createSessionKeyType( + 'attempt', + query.state, + ) + // Get login attempt data from the cache + const loginAttemptData = await this.cacheService.get( + loginAttemptCacheKey, + // Do not throw an error if the key is not found + false, + ) - try { - // Get login attempt from cache - loginAttemptData = await this.cacheService.get( - this.cacheService.createSessionKeyType('attempt', query.state), - ) + if (!loginAttemptData) { + this.logger.warn(this.cacheService.createKeyError(loginAttemptCacheKey)) + return this.redirectWithError(res) + } + + try { // Get tokens and user information from the authorization code const tokenResponse = await this.idsService.getTokens({ code: query.code, From c561cf850cf79a8469ae075e408e8115c678e428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sn=C3=A6r=20Seljan=20=C3=9E=C3=B3roddsson?= Date: Thu, 12 Dec 2024 11:03:01 +0000 Subject: [PATCH 2/6] fix(react-spa-bff): Enhance broadcaster with subpath handling (#17212) * feat: enhance session management with subpath handling Add subpath to NewSessionEvent and LogoutEvent types. Update BffProvider to include applicationBasePath in postMessage dependencies. Modify event handling to only act on events matching the current subpath, ensuring proper session management across multiple tabs/windows/iframes. * feat: update BffProvider to use bffBasePath consistently Add bffBasePath to broadcast messages for logout and new session events. Update event handling to match against bffBasePath instead of applicationBasePath. This ensures consistent behavior across different components and improves clarity in the event broadcasting mechanism. * remove from context * refactor: streamline BFF base path handling Update BffProvider to use a consistent BFF base path variable. This change improves clarity and ensures that broadcast events are filtered correctly by matching the BFF base path, preventing unintended interactions with other applications on the same domain. Adjust dependencies in useEffect hooks to reflect the new variable. * refactor: simplify BffPoller dependency array Update the BffPoller component to use bffBasePath directly in the dependency array of the useEffect hook. This change improves readability and ensures that the effect correctly responds to changes in theffBasePath variable * fix * refactor: rename bffBasePath to bffBaseUrl for clarity Update variable names from `bffBasePath` to `bffBaseUrl` to enhance clarity and consistency across the codebase. This change improves the understanding of the code explicitly indicating that the variable represents a base URL rather than a path. Adjust related comments and event types to reflect this change. * update deps --- libs/react-spa/bff/src/lib/BffPoller.tsx | 4 +- libs/react-spa/bff/src/lib/BffProvider.tsx | 52 ++++++++++++++-------- libs/react-spa/bff/src/lib/bff.hooks.ts | 2 + 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/libs/react-spa/bff/src/lib/BffPoller.tsx b/libs/react-spa/bff/src/lib/BffPoller.tsx index 974098093ea9..86f1330a1a12 100644 --- a/libs/react-spa/bff/src/lib/BffPoller.tsx +++ b/libs/react-spa/bff/src/lib/BffPoller.tsx @@ -46,6 +46,7 @@ export const BffPoller = ({ const { signIn, bffUrlGenerator } = useAuth() const userInfo = useUserInfo() const { postMessage } = useBffBroadcaster() + const bffBaseUrl = bffUrlGenerator() const url = useMemo( () => bffUrlGenerator('/user', { refresh: 'true' }), @@ -86,12 +87,13 @@ export const BffPoller = ({ postMessage({ type: BffBroadcastEvents.NEW_SESSION, userInfo: newUser, + bffBaseUrl, }) newSessionCb() } } - }, [newUser, error, userInfo, signIn, postMessage, newSessionCb]) + }, [newUser, error, userInfo, signIn, postMessage, newSessionCb, bffBaseUrl]) return children } diff --git a/libs/react-spa/bff/src/lib/BffProvider.tsx b/libs/react-spa/bff/src/lib/BffProvider.tsx index f10534fc550e..a8917228a07e 100644 --- a/libs/react-spa/bff/src/lib/BffProvider.tsx +++ b/libs/react-spa/bff/src/lib/BffProvider.tsx @@ -43,25 +43,37 @@ export const BffProvider = ({ authState === 'logging-out' const isLoggedIn = authState === 'logged-in' const oldLoginPath = `${applicationBasePath}/login` + const bffBaseUrl = bffUrlGenerator() const { postMessage } = useBffBroadcaster((event) => { - if ( - isLoggedIn && - event.data.type === BffBroadcastEvents.NEW_SESSION && - isNewUser(state.userInfo, event.data.userInfo) - ) { - setSessionExpiredScreen(true) - } else if (event.data.type === BffBroadcastEvents.LOGOUT) { - // We will wait 1 seconds before we dispatch logout action. - // The reason is that IDS will not log the user out immediately. - // Note! The bff poller may have triggered logout by that time anyways. - setTimeout(() => { - dispatch({ - type: ActionType.LOGGED_OUT, - }) - - signIn() - }, 1000) + /** + * Filter broadcast events by matching BFF base url + * + * Since the Broadcaster sends messages to all tabs/windows/iframes + * sharing the same origin (domain), we need to explicitly check if + * the message belongs to our specific BFF instance by comparing base urls. + * This prevents handling events meant for other applications/contexts + * running on the same domain. + */ + if (event.data.bffBaseUrl === bffBaseUrl) { + if ( + isLoggedIn && + event.data.type === BffBroadcastEvents.NEW_SESSION && + isNewUser(state.userInfo, event.data.userInfo) + ) { + setSessionExpiredScreen(true) + } else if (event.data.type === BffBroadcastEvents.LOGOUT) { + // We will wait 1 seconds before we dispatch logout action. + // The reason is that IDS will not log the user out immediately. + // Note! The bff poller may have triggered logout by that time anyways. + setTimeout(() => { + dispatch({ + type: ActionType.LOGGED_OUT, + }) + + signIn() + }, 1000) + } } }) @@ -71,9 +83,10 @@ export const BffProvider = ({ postMessage({ type: BffBroadcastEvents.NEW_SESSION, userInfo: state.userInfo, + bffBaseUrl, }) } - }, [postMessage, state.userInfo, isLoggedIn]) + }, [postMessage, state.userInfo, isLoggedIn, bffBaseUrl]) /** * Builds authentication query parameters for login redirection: @@ -175,12 +188,13 @@ export const BffProvider = ({ // Broadcast to all tabs/windows/iframes that the user is logging out postMessage({ type: BffBroadcastEvents.LOGOUT, + bffBaseUrl, }) window.location.href = bffUrlGenerator('/logout', { sid: state.userInfo.profile.sid, }) - }, [bffUrlGenerator, postMessage, state.userInfo]) + }, [bffUrlGenerator, postMessage, state.userInfo, bffBaseUrl]) const switchUser = useCallback( (nationalId?: string) => { diff --git a/libs/react-spa/bff/src/lib/bff.hooks.ts b/libs/react-spa/bff/src/lib/bff.hooks.ts index 72d4b52a6805..019258b759b4 100644 --- a/libs/react-spa/bff/src/lib/bff.hooks.ts +++ b/libs/react-spa/bff/src/lib/bff.hooks.ts @@ -64,10 +64,12 @@ export enum BffBroadcastEvents { type NewSessionEvent = { type: BffBroadcastEvents.NEW_SESSION userInfo: BffUser + bffBaseUrl: string } type LogoutEvent = { type: BffBroadcastEvents.LOGOUT + bffBaseUrl: string } export type BffBroadcastEvent = NewSessionEvent | LogoutEvent From b2c44eeb700db141361c444453a8f63b8a6ee44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Eorkell=20M=C3=A1ni=20=C3=9Eorkelsson?= Date: Thu, 12 Dec 2024 11:31:53 +0000 Subject: [PATCH 3/6] feat(web): add support links to grants (#17189) * feat: add support links * chore: conciser --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../web/screens/Grants/Grant/GrantSidebar.tsx | 68 +++++++++++++++---- apps/web/screens/queries/Grants.ts | 6 ++ .../src/lib/generated/contentfulTypes.d.ts | 3 + libs/cms/src/lib/models/grant.model.ts | 7 +- 4 files changed, 71 insertions(+), 13 deletions(-) diff --git a/apps/web/screens/Grants/Grant/GrantSidebar.tsx b/apps/web/screens/Grants/Grant/GrantSidebar.tsx index c785d595a2b1..fa83f4377950 100644 --- a/apps/web/screens/Grants/Grant/GrantSidebar.tsx +++ b/apps/web/screens/Grants/Grant/GrantSidebar.tsx @@ -1,6 +1,14 @@ import { useMemo } from 'react' -import { Box, Button, LinkV2, Stack, Text } from '@island.is/island-ui/core' +import { + Box, + BoxProps, + Button, + LinkV2, + Stack, + Text, +} from '@island.is/island-ui/core' +import { useLocale } from '@island.is/localization' import { Locale } from '@island.is/shared/types' import { isDefined } from '@island.is/shared/utils' import { InstitutionPanel } from '@island.is/web/components' @@ -8,7 +16,6 @@ import { Grant } from '@island.is/web/graphql/schema' import { LinkType, useLinkResolver } from '@island.is/web/hooks' import { m } from '../messages' -import { useLocale } from '@island.is/localization' import { generateStatusTag } from '../utils' interface Props { @@ -30,6 +37,20 @@ const generateLine = (heading: string, content?: React.ReactNode) => { ) } +const generateSidebarPanel = ( + data: Array, + background: BoxProps['background'], +) => { + if (!data) { + return undefined + } + return ( + + {data} + + ) +} + export const GrantSidebar = ({ grant, locale }: Props) => { const { linkResolver } = useLinkResolver() const { formatMessage } = useLocale() @@ -100,6 +121,7 @@ export const GrantSidebar = ({ grant, locale }: Props) => { return ( @@ -113,6 +135,35 @@ export const GrantSidebar = ({ grant, locale }: Props) => { [grant.files], ) + const supportLinksPanelData = useMemo( + () => + grant.supportLinks + ?.map((link) => { + if (!link.url || !link.text || !link.id) { + return null + } + return ( + + + + ) + }) + .filter(isDefined) ?? [], + [grant.supportLinks], + ) + return ( { img={grant.fund?.parentOrganization.logo?.url} locale={locale} /> - {detailPanelData.length ? ( - - {detailPanelData} - - ) : undefined} - {filesPanelData.length ? ( - - {filesPanelData} - - ) : undefined} + {generateSidebarPanel(detailPanelData, 'blue100')} + {generateSidebarPanel(filesPanelData, 'red100')} + {generateSidebarPanel(supportLinksPanelData, 'purple100')} ) } diff --git a/apps/web/screens/queries/Grants.ts b/apps/web/screens/queries/Grants.ts index 22b40ec4d2cf..59160d38847b 100644 --- a/apps/web/screens/queries/Grants.ts +++ b/apps/web/screens/queries/Grants.ts @@ -77,6 +77,12 @@ export const GET_GRANT_QUERY = gql` id title } + supportLinks { + id + text + url + date + } files { ...AssetFields } diff --git a/libs/cms/src/lib/generated/contentfulTypes.d.ts b/libs/cms/src/lib/generated/contentfulTypes.d.ts index a03f5f97171d..ec191a4968b0 100644 --- a/libs/cms/src/lib/generated/contentfulTypes.d.ts +++ b/libs/cms/src/lib/generated/contentfulTypes.d.ts @@ -1853,6 +1853,9 @@ export interface IGrantFields { /** Files */ grantFiles?: Asset[] | undefined + /** Support links */ + grantSupportLinks?: ILink[] | undefined + /** Category tags */ grantCategoryTags?: IGenericTag[] | undefined diff --git a/libs/cms/src/lib/models/grant.model.ts b/libs/cms/src/lib/models/grant.model.ts index 90e0b9a031bd..b1f21752a40a 100644 --- a/libs/cms/src/lib/models/grant.model.ts +++ b/libs/cms/src/lib/models/grant.model.ts @@ -7,6 +7,7 @@ import { mapDocument, SliceUnion } from '../unions/slice.union' import { Asset, mapAsset } from './asset.model' import { ReferenceLink, mapReferenceLink } from './referenceLink.model' import { Fund, mapFund } from './fund.model' +import { Link, mapLink } from './link.model' export enum GrantStatus { CLOSED, @@ -66,6 +67,9 @@ export class Grant { @CacheField(() => [Asset], { nullable: true }) files?: Array + @CacheField(() => [Link], { nullable: true }) + supportLinks?: Array + @CacheField(() => [GenericTag], { nullable: true }) categoryTags?: Array @@ -85,7 +89,6 @@ export const mapGrant = ({ fields, sys }: IGrant): Grant => ({ applicationUrl: fields.granApplicationUrl?.fields ? mapReferenceLink(fields.granApplicationUrl) : undefined, - specialEmphasis: fields.grantSpecialEmphasis ? mapDocument(fields.grantSpecialEmphasis, sys.id + ':special-emphasis') : [], @@ -117,6 +120,8 @@ export const mapGrant = ({ fields, sys }: IGrant): Grant => ({ : undefined, fund: fields.grantFund ? mapFund(fields.grantFund) : undefined, files: (fields.grantFiles ?? []).map((file) => mapAsset(file)) ?? [], + supportLinks: + (fields.grantSupportLinks ?? []).map((link) => mapLink(link)) ?? [], categoryTags: fields.grantCategoryTags ? fields.grantCategoryTags.map((tag) => mapGenericTag(tag)) : undefined, From e0e74cae60915482c81d380898f20fba06b6abbb Mon Sep 17 00:00:00 2001 From: unakb Date: Thu, 12 Dec 2024 12:06:44 +0000 Subject: [PATCH 4/6] chore(j-s): Add more info to new indictment robot emails (#17184) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../src/app/modules/case/internalCase.service.ts | 1 + .../deliverIndictmentInfoToCourt.spec.ts | 6 +++++- .../backend/src/app/modules/court/court.service.ts | 12 +++++++++--- .../app/modules/court/test/createCourtCase.spec.ts | 8 ++++---- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/apps/judicial-system/backend/src/app/modules/case/internalCase.service.ts b/apps/judicial-system/backend/src/app/modules/case/internalCase.service.ts index a969cf40351b..729645bb5f82 100644 --- a/apps/judicial-system/backend/src/app/modules/case/internalCase.service.ts +++ b/apps/judicial-system/backend/src/app/modules/case/internalCase.service.ts @@ -606,6 +606,7 @@ export class InternalCaseService { ? { name: theCase.prosecutor.name, nationalId: theCase.prosecutor.nationalId, + email: theCase.prosecutor.email, } : undefined, ) diff --git a/apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverIndictmentInfoToCourt.spec.ts b/apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverIndictmentInfoToCourt.spec.ts index 3236f05eb4de..c7b01baee552 100644 --- a/apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverIndictmentInfoToCourt.spec.ts +++ b/apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverIndictmentInfoToCourt.spec.ts @@ -54,7 +54,11 @@ describe('InternalCaseController - Deliver indictment info to court', () => { { eventType: EventType.INDICTMENT_CONFIRMED, created: indictmentDate }, ], defendants: [{ name: 'Test Ákærði', nationalId: '1234567890' }], - prosecutor: { name: 'Test Sækjandi', nationalId: '0101010101' }, + prosecutor: { + name: 'Test Sækjandi', + nationalId: '0101010101', + email: 'prosecutor@omnitrix.is', + }, } as Case let mockCourtService: CourtService diff --git a/apps/judicial-system/backend/src/app/modules/court/court.service.ts b/apps/judicial-system/backend/src/app/modules/court/court.service.ts index 7113dd6769b0..df13b35a90be 100644 --- a/apps/judicial-system/backend/src/app/modules/court/court.service.ts +++ b/apps/judicial-system/backend/src/app/modules/court/court.service.ts @@ -336,6 +336,9 @@ export class CourtService { ) const isIndictment = isIndictmentCase(type) + const policeCaseNumber = policeCaseNumbers[0] + ? policeCaseNumbers[0].replace(/-/g, '') + : '' return await this.courtClientService.createCase(courtId, { caseType: isIndictment ? 'S - Ákærumál' : 'R - Rannsóknarmál', @@ -344,7 +347,7 @@ export class CourtService { receivalDate: formatISO(receivalDate, { representation: 'date' }), basedOn: isIndictment ? 'Sakamál' : 'Rannsóknarhagsmunir', // TODO: pass in all policeCaseNumbers when CourtService supports it - sourceNumber: policeCaseNumbers[0] ? policeCaseNumbers[0] : '', + sourceNumber: policeCaseNumber, }) } catch (reason) { if (reason instanceof ServiceUnavailableException) { @@ -569,14 +572,17 @@ export class CourtService { policeCaseNumber?: string, subtypes?: string[], defendants?: { name?: string; nationalId?: string }[], - prosecutor?: { name?: string; nationalId?: string }, + prosecutor?: { name?: string; nationalId?: string; email?: string }, ): Promise { try { const subject = `${courtName} - ${courtCaseNumber} - upplýsingar` + + const sanitizedPoliceCaseNumber = policeCaseNumber?.replace(/-/g, '') + const content = JSON.stringify({ receivedByCourtDate, indictmentDate, - policeCaseNumber, + sanitizedPoliceCaseNumber, subtypes, defendants, prosecutor, diff --git a/apps/judicial-system/backend/src/app/modules/court/test/createCourtCase.spec.ts b/apps/judicial-system/backend/src/app/modules/court/test/createCourtCase.spec.ts index a32798d80b4e..5b98cb354570 100644 --- a/apps/judicial-system/backend/src/app/modules/court/test/createCourtCase.spec.ts +++ b/apps/judicial-system/backend/src/app/modules/court/test/createCourtCase.spec.ts @@ -105,7 +105,7 @@ describe('CourtService - Create court case', () => { status: 'Skráð', receivalDate: formatISO(receivalDate, { representation: 'date' }), basedOn: 'Rannsóknarhagsmunir', - sourceNumber: policeCaseNumbers[0], + sourceNumber: policeCaseNumbers[0].replace(/-/g, ''), }, ) }) @@ -146,7 +146,7 @@ describe('CourtService - Create court case', () => { status: 'Skráð', receivalDate: formatISO(receivalDate, { representation: 'date' }), basedOn: 'Sakamál', - sourceNumber: policeCaseNumbers[0], + sourceNumber: policeCaseNumbers[0].replace(/-/g, ''), }, ) }) @@ -183,7 +183,7 @@ describe('CourtService - Create court case', () => { status: 'Skráð', receivalDate: formatISO(receivalDate, { representation: 'date' }), basedOn: 'Rannsóknarhagsmunir', - sourceNumber: policeCaseNumbers[0], + sourceNumber: policeCaseNumbers[0].replace(/-/g, ''), }) }) }) @@ -218,7 +218,7 @@ describe('CourtService - Create court case', () => { status: 'Skráð', receivalDate: formatISO(receivalDate, { representation: 'date' }), basedOn: 'Rannsóknarhagsmunir', - sourceNumber: policeCaseNumbers[0], + sourceNumber: policeCaseNumbers[0].replace(/-/g, ''), }) }) }) From 32a256e32eedb1de0324c61f8c5bb803d48313e7 Mon Sep 17 00:00:00 2001 From: unakb Date: Thu, 12 Dec 2024 12:32:33 +0000 Subject: [PATCH 5/6] feat(j-s): Tooltip with info about service not being required (#17200) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../Court/Indictments/Completed/Completed.strings.ts | 7 +++++++ .../src/routes/Court/Indictments/Completed/Completed.tsx | 3 +++ 2 files changed, 10 insertions(+) diff --git a/apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.strings.ts b/apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.strings.ts index 884252537f62..d231db70e78f 100644 --- a/apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.strings.ts +++ b/apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.strings.ts @@ -36,6 +36,13 @@ const strings = defineMessages({ description: 'Notaður sem texti í valmöguleika fyrir það þegar ekki skal birta dómdfellda dóminn.', }, + serviceRequirementNotRequiredTooltip: { + id: 'judicial.system.core:court.indictments.completed.service_requirement_not_required_tooltip', + defaultMessage: + 'Ekki þarf að birta dóm þar sem sektarfjárhæð er lægri en sem nemur áfrýjunarfjárhæð í einkamáli kr. 1.355.762. Gildir frá 01.01.2024', + description: + 'Notað sem tooltip í valmöguleika fyrir það þegar ekki skal birta dómdfellda dóminn.', + }, serviceRequirementNotApplicable: { id: 'judicial.system.core:court.indictments.completed.service_requirement_not_applicable', defaultMessage: 'Dómfelldi var viðstaddur dómsuppkvaðningu', diff --git a/apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx b/apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx index d988fde76856..88ac21c155da 100644 --- a/apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx +++ b/apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx @@ -291,6 +291,9 @@ const Completed: FC = () => { large backgroundColor="white" label={formatMessage(strings.serviceRequirementNotRequired)} + tooltip={formatMessage( + strings.serviceRequirementNotRequiredTooltip, + )} /> From 37fe92be86722e95ff07f0ea2d18145c8b81793e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9E=C3=B3rey=20J=C3=B3na?= Date: Thu, 12 Dec 2024 14:09:20 +0000 Subject: [PATCH 6/6] fix(native-app): Android build fixes (#17211) * fix: import for gradle-plugin * fix: update import for react-native-clipboard as well * fix: update build.gradle imports * fix: update reanimated * fix: add folder references to build.gradle * fix: remove react native clipboard from settings.gradle * fix(app): Use dev firebase in for dev android app * fix: remove added newline --------- Co-authored-by: Eirikur Nilsson Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/native/app/android/app/build.gradle | 6 +- apps/native/app/android/build.gradle | 4 +- apps/native/app/android/settings.gradle | 5 +- apps/native/app/package.json | 2 +- codemagic.yaml | 2 +- yarn.lock | 184 ++++++++++++++++++++++- 6 files changed, 186 insertions(+), 17 deletions(-) diff --git a/apps/native/app/android/app/build.gradle b/apps/native/app/android/app/build.gradle index a32464e07a8f..997472187673 100644 --- a/apps/native/app/android/app/build.gradle +++ b/apps/native/app/android/app/build.gradle @@ -16,11 +16,11 @@ react { // The root of your project, i.e. where "package.json" lives. Default is '..' // root = file("../") // The folder where the react-native NPM package is. Default is ../node_modules/react-native - // reactNativeDir = file("../node_modules/react-native") + reactNativeDir = file("../../../../../node_modules/react-native") // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen - // codegenDir = file("../node_modules/@react-native/codegen") + codegenDir = file("../../../../../node_modules/@react-native/codegen") // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js - // cliFile = file("../node_modules/react-native/cli.js") + cliFile = file("../../../../../node_modules/react-native/cli.js") /* Variants */ // The list of variants to that are debuggable. For those we're going to diff --git a/apps/native/app/android/build.gradle b/apps/native/app/android/build.gradle index 46f7b30a85d0..06110e23ae99 100644 --- a/apps/native/app/android/build.gradle +++ b/apps/native/app/android/build.gradle @@ -33,11 +33,11 @@ allprojects { repositories { maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url("$rootDir/../node_modules/react-native/android") + url("$rootDir/../../../../../node_modules/react-native/android") } maven { // Android JSC is installed from npm - url("$rootDir/../node_modules/jsc-android/dist") + url("$rootDir/../../../../../node_modules/jsc-android/dist") } mavenCentral { // We don't want to fetch react-native from Maven Central as there are diff --git a/apps/native/app/android/settings.gradle b/apps/native/app/android/settings.gradle index 12979ce6cda2..d9655025ec45 100644 --- a/apps/native/app/android/settings.gradle +++ b/apps/native/app/android/settings.gradle @@ -6,11 +6,8 @@ applyNativeModulesSettingsGradle(settings) include ':app', ':react-native-code-push' project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../../../../node_modules/react-native-code-push/android/app') -include ':react-native-clipboard' -project(':react-native-clipboard').projectDir = new File(rootProject.projectDir, '../../node_modules/@react-native-clipboard/clipboard/android') - include ':app' -includeBuild('../node_modules/@react-native/gradle-plugin') +includeBuild('../../../../node_modules/@react-native/gradle-plugin') apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle") useExpoModules() diff --git a/apps/native/app/package.json b/apps/native/app/package.json index 3ebb950c5cba..f742ee2bb587 100644 --- a/apps/native/app/package.json +++ b/apps/native/app/package.json @@ -90,7 +90,7 @@ "react-native-pdf": "6.7.5", "react-native-quick-actions": "0.3.13", "react-native-quick-base64": "2.1.2", - "react-native-reanimated": "3.12.1", + "react-native-reanimated": "3.16.5", "react-native-share": "10.2.1", "react-native-spotlight-search": "2.0.0", "react-native-svg": "15.2.0", diff --git a/codemagic.yaml b/codemagic.yaml index a0840a6144b2..e6d07bc39ad9 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -219,7 +219,7 @@ workflows: - island-upload-keystore groups: - google_credentials - - firebase_credentials + - firebase_credentials_dev vars: <<: *shared_envs PACKAGE_NAME: 'is.island.app.dev' diff --git a/yarn.lock b/yarn.lock index e0441eb6d923..26095abdf270 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2754,6 +2754,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-annotate-as-pure@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" + dependencies: + "@babel/types": ^7.25.9 + checksum: 41edda10df1ae106a9b4fe617bf7c6df77db992992afd46192534f5cff29f9e49a303231733782dd65c5f9409714a529f215325569f14282046e9d3b7a1ffb6c + languageName: node + linkType: hard + "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.18.6": version: 7.18.9 resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.18.9" @@ -2954,6 +2963,23 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-class-features-plugin@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-create-class-features-plugin@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": ^7.25.9 + "@babel/helper-member-expression-to-functions": ^7.25.9 + "@babel/helper-optimise-call-expression": ^7.25.9 + "@babel/helper-replace-supers": ^7.25.9 + "@babel/helper-skip-transparent-expression-wrappers": ^7.25.9 + "@babel/traverse": ^7.25.9 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 91dd5f203ed04568c70b052e2f26dfaac7c146447196c00b8ecbb6d3d2f3b517abadb985d3321a19d143adaed6fe17f7f79f8f50e0c20e9d8ad83e1027b42424 + languageName: node + linkType: hard + "@babel/helper-create-regexp-features-plugin@npm:^7.16.7, @babel/helper-create-regexp-features-plugin@npm:^7.17.12": version: 7.17.12 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.17.12" @@ -3017,6 +3043,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-regexp-features-plugin@npm:^7.25.9": + version: 7.26.3 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.26.3" + dependencies: + "@babel/helper-annotate-as-pure": ^7.25.9 + regexpu-core: ^6.2.0 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 50a27d8ce6da5c2fa0c62c132c4d27cfeb36e3233ff1e5220d643de3dafe49423b507382f0b72a696fce7486014b134c1e742f55438590f9405d26765b009af0 + languageName: node + linkType: hard + "@babel/helper-define-polyfill-provider@npm:^0.3.3": version: 0.3.3 resolution: "@babel/helper-define-polyfill-provider@npm:0.3.3" @@ -3258,6 +3297,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-member-expression-to-functions@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-member-expression-to-functions@npm:7.25.9" + dependencies: + "@babel/traverse": ^7.25.9 + "@babel/types": ^7.25.9 + checksum: 8e2f1979b6d596ac2a8cbf17f2cf709180fefc274ac3331408b48203fe19134ed87800774ef18838d0275c3965130bae22980d90caed756b7493631d4b2cf961 + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.0.0, @babel/helper-module-imports@npm:^7.16.0, @babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-module-imports@npm:7.18.6" @@ -3452,6 +3501,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-optimise-call-expression@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-optimise-call-expression@npm:7.25.9" + dependencies: + "@babel/types": ^7.25.9 + checksum: f09d0ad60c0715b9a60c31841b3246b47d67650c512ce85bbe24a3124f1a4d66377df793af393273bc6e1015b0a9c799626c48e53747581c1582b99167cc65dc + languageName: node + linkType: hard + "@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.13.0, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.17.12, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.19.0, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": version: 7.19.0 resolution: "@babel/helper-plugin-utils@npm:7.19.0" @@ -3494,6 +3552,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-plugin-utils@npm:7.25.9" + checksum: e19ec8acf0b696756e6d84531f532c5fe508dce57aa68c75572a77798bd04587a844a9a6c8ea7d62d673e21fdc174d091c9097fb29aea1c1b49f9c6eaa80f022 + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.18.9": version: 7.18.9 resolution: "@babel/helper-remap-async-to-generator@npm:7.18.9" @@ -3627,6 +3692,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-replace-supers@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-replace-supers@npm:7.25.9" + dependencies: + "@babel/helper-member-expression-to-functions": ^7.25.9 + "@babel/helper-optimise-call-expression": ^7.25.9 + "@babel/traverse": ^7.25.9 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 84f40e12520b7023e52d289bf9d569a06284879fe23bbbacad86bec5d978b2669769f11b073fcfeb1567d8c547168323005fda88607a4681ecaeb4a5cdd48bb9 + languageName: node + linkType: hard + "@babel/helper-simple-access@npm:^7.18.2, @babel/helper-simple-access@npm:^7.18.6": version: 7.19.4 resolution: "@babel/helper-simple-access@npm:7.19.4" @@ -3710,6 +3788,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.25.9" + dependencies: + "@babel/traverse": ^7.25.9 + "@babel/types": ^7.25.9 + checksum: fdbb5248932198bc26daa6abf0d2ac42cab9c2dbb75b7e9f40d425c8f28f09620b886d40e7f9e4e08ffc7aaa2cefe6fc2c44be7c20e81f7526634702fb615bdc + languageName: node + linkType: hard + "@babel/helper-split-export-declaration@npm:^7.16.7, @babel/helper-split-export-declaration@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-split-export-declaration@npm:7.18.6" @@ -5153,6 +5241,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-class-properties@npm:^7.0.0-0": + version: 7.25.9 + resolution: "@babel/plugin-transform-class-properties@npm:7.25.9" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.25.9 + "@babel/helper-plugin-utils": ^7.25.9 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a8d69e2c285486b63f49193cbcf7a15e1d3a5f632c1c07d7a97f65306df7f554b30270b7378dde143f8b557d1f8f6336c643377943dec8ec405e4cd11e90b9ea + languageName: node + linkType: hard + "@babel/plugin-transform-class-properties@npm:^7.22.3": version: 7.22.3 resolution: "@babel/plugin-transform-class-properties@npm:7.22.3" @@ -5234,6 +5334,22 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-classes@npm:^7.0.0-0": + version: 7.25.9 + resolution: "@babel/plugin-transform-classes@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": ^7.25.9 + "@babel/helper-compilation-targets": ^7.25.9 + "@babel/helper-plugin-utils": ^7.25.9 + "@babel/helper-replace-supers": ^7.25.9 + "@babel/traverse": ^7.25.9 + globals: ^11.1.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d12584f72125314cc0fa8c77586ece2888d677788ac75f7393f5da574dfe4e45a556f7e3488fab29c8777ab3e5856d7a2d79f6df02834083aaa9d766440e3c68 + languageName: node + linkType: hard + "@babel/plugin-transform-classes@npm:^7.21.0": version: 7.21.0 resolution: "@babel/plugin-transform-classes@npm:7.21.0" @@ -7372,6 +7488,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-unicode-regex@npm:^7.0.0-0": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-regex@npm:7.25.9" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.25.9 + "@babel/helper-plugin-utils": ^7.25.9 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e8baae867526e179467c6ef5280d70390fa7388f8763a19a27c21302dd59b121032568be080749514b097097ceb9af716bf4b90638f1b3cf689aa837ba20150f + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-regex@npm:^7.22.5": version: 7.22.5 resolution: "@babel/plugin-transform-unicode-regex@npm:7.22.5" @@ -13522,7 +13650,7 @@ __metadata: react-native-pdf: 6.7.5 react-native-quick-actions: 0.3.13 react-native-quick-base64: 2.1.2 - react-native-reanimated: 3.12.1 + react-native-reanimated: 3.16.5 react-native-share: 10.2.1 react-native-spotlight-search: 2.0.0 react-native-svg: 15.2.0 @@ -40842,7 +40970,7 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:^3.0.2": +"jsesc@npm:^3.0.2, jsesc@npm:~3.0.2": version: 3.0.2 resolution: "jsesc@npm:3.0.2" bin: @@ -49993,15 +50121,18 @@ __metadata: languageName: node linkType: hard -"react-native-reanimated@npm:3.12.1": - version: 3.12.1 - resolution: "react-native-reanimated@npm:3.12.1" +"react-native-reanimated@npm:3.16.5": + version: 3.16.5 + resolution: "react-native-reanimated@npm:3.16.5" dependencies: "@babel/plugin-transform-arrow-functions": ^7.0.0-0 + "@babel/plugin-transform-class-properties": ^7.0.0-0 + "@babel/plugin-transform-classes": ^7.0.0-0 "@babel/plugin-transform-nullish-coalescing-operator": ^7.0.0-0 "@babel/plugin-transform-optional-chaining": ^7.0.0-0 "@babel/plugin-transform-shorthand-properties": ^7.0.0-0 "@babel/plugin-transform-template-literals": ^7.0.0-0 + "@babel/plugin-transform-unicode-regex": ^7.0.0-0 "@babel/preset-typescript": ^7.16.7 convert-source-map: ^2.0.0 invariant: ^2.2.4 @@ -50009,7 +50140,7 @@ __metadata: "@babel/core": ^7.0.0-0 react: "*" react-native: "*" - checksum: 91575b3a20a5878f42d0302cf304ed46ff35c12ce717018c0bfb6af047bf675f224ab95de778daae483b139e66c5290a661635c06304065879b02a5926243e1c + checksum: 29d28dcf99acb2e3928963106a2860d15c9929712832d8d8437fb563691d0199884a63e925548fe5e4b6fc7a9008eadec3e0294b521d9466c875caf16de9c303 languageName: node linkType: hard @@ -51053,6 +51184,15 @@ __metadata: languageName: node linkType: hard +"regenerate-unicode-properties@npm:^10.2.0": + version: 10.2.0 + resolution: "regenerate-unicode-properties@npm:10.2.0" + dependencies: + regenerate: ^1.4.2 + checksum: d5c5fc13f8b8d7e16e791637a4bfef741f8d70e267d51845ee7d5404a32fa14c75b181c4efba33e4bff8b0000a2f13e9773593713dfe5b66597df4259275ce63 + languageName: node + linkType: hard + "regenerate@npm:^1.4.2": version: 1.4.2 resolution: "regenerate@npm:1.4.2" @@ -51175,6 +51315,20 @@ __metadata: languageName: node linkType: hard +"regexpu-core@npm:^6.2.0": + version: 6.2.0 + resolution: "regexpu-core@npm:6.2.0" + dependencies: + regenerate: ^1.4.2 + regenerate-unicode-properties: ^10.2.0 + regjsgen: ^0.8.0 + regjsparser: ^0.12.0 + unicode-match-property-ecmascript: ^2.0.0 + unicode-match-property-value-ecmascript: ^2.1.0 + checksum: 67d3c4a3f6c99bc80b5d690074a27e6f675be1c1739f8a9acf028fbc36f1a468472574ea65e331e217995198ba4404d7878f3cb3739a73552dd3c70d3fb7f8e6 + languageName: node + linkType: hard + "regjsgen@npm:^0.6.0": version: 0.6.0 resolution: "regjsgen@npm:0.6.0" @@ -51182,6 +51336,24 @@ __metadata: languageName: node linkType: hard +"regjsgen@npm:^0.8.0": + version: 0.8.0 + resolution: "regjsgen@npm:0.8.0" + checksum: a1d925ff14a4b2be774e45775ee6b33b256f89c42d480e6d85152d2133f18bd3d6af662161b226fa57466f7efec367eaf7ccd2a58c0ec2a1306667ba2ad07b0d + languageName: node + linkType: hard + +"regjsparser@npm:^0.12.0": + version: 0.12.0 + resolution: "regjsparser@npm:0.12.0" + dependencies: + jsesc: ~3.0.2 + bin: + regjsparser: bin/parser + checksum: 094b55b0ab3e1fd58f8ce5132a1d44dab08d91f7b0eea4132b0157b303ebb8ded20a9cbd893d25402d2aeddb23fac1f428ab4947b295d6fa51dd1c334a9e76f0 + languageName: node + linkType: hard + "regjsparser@npm:^0.8.2": version: 0.8.4 resolution: "regjsparser@npm:0.8.4"