From 5e977abb322438663222201dbbc1289b950df417 Mon Sep 17 00:00:00 2001 From: Alex Lipovka Date: Sat, 20 Jun 2026 13:01:00 +0400 Subject: [PATCH 1/2] update sdc-qrf and fhir-react --- shared/package.json | 2 +- shared/src/setupTests.ts | 7 - web/package.json | 8 +- .../components/date.tsx | 3 +- .../components/reference/hooks.ts | 7 +- .../BaseQuestionnaireResponseForm/index.tsx | 2 + web/src/components/CachedRemoteData/index.tsx | 2 +- .../CodeEditor/ContextMenu/index.tsx | 3 +- .../components/LaunchContextEditor/index.tsx | 3 +- web/src/components/ModalExpression/hooks.ts | 7 +- web/src/components/ModalExpression/index.tsx | 3 +- web/src/components/ModalExpression/types.ts | 3 +- web/src/components/QRFormWrapper/index.tsx | 6 +- web/src/components/RenderRemoteData.tsx | 7 +- .../components/ResourceCodeDisplay/index.tsx | 3 +- .../components/ResourceCodeEditor/index.tsx | 3 +- web/src/components/ResourceSelect/index.tsx | 9 +- .../__test__/sourceQueryDebugModal.test.ts | 9 +- .../components/SourceQueryDebugModal/hooks.ts | 9 +- .../SourceQueryDebugModal/index.tsx | 3 +- web/src/components/TerminologyField/index.tsx | 6 +- web/src/containers/App/index.tsx | 7 +- .../MappingEditorEditor/index.tsx | 5 +- .../MappingEditorError/index.tsx | 13 +- .../MappingEditorSelect/index.tsx | 6 +- .../containers/Main/MappingEditor/index.tsx | 2 +- .../Main/MappingEditor/interfaces.ts | 6 +- .../Main/MappingEditor/useMappingEditor.ts | 20 +- web/src/containers/Main/PromptForm/index.tsx | 3 +- .../Main/QuestionnaireEditor/index.tsx | 4 +- .../Main/__test__/main-callback.test.ts | 11 +- web/src/containers/Main/__test__/main.test.ts | 7 +- web/src/containers/Main/index.tsx | 7 +- .../containers/Main/useFHIRMappingLanguage.ts | 48 +- web/src/containers/Main/useMain.ts | 51 +- web/src/services/auth.ts | 23 +- web/src/services/builder.ts | 2 +- web/src/services/extract.ts | 4 +- web/src/services/fhirmapping.ts | 29 +- web/src/services/initialize.ts | 37 +- web/src/services/questionnaire.ts | 11 +- web/src/utils/errors.ts | 3 +- yarn.lock | 457 ++++++++++++++++-- 43 files changed, 608 insertions(+), 253 deletions(-) diff --git a/shared/package.json b/shared/package.json index 5ef90012..235c63ea 100644 --- a/shared/package.json +++ b/shared/package.json @@ -19,7 +19,7 @@ "ajv": "^6.12.6", "ajv-errors": "^1.0.1", "ajv-keywords": "^3.5.2", - "aidbox-react": "^1.4.0", + "aidbox-react": "^1.12.0", "js-base64": "^3.6.0", "moment": "^2.29.1", "react-native-device-info": "^8.4.5" diff --git a/shared/src/setupTests.ts b/shared/src/setupTests.ts index ab83b5ec..0919b8ed 100644 --- a/shared/src/setupTests.ts +++ b/shared/src/setupTests.ts @@ -5,14 +5,8 @@ import { } from 'aidbox-react/lib/services/instance'; import { withRootAccess } from 'aidbox-react/lib/utils/tests'; -import { - resetInstanceToken as resetFHIRInstanceToken, - setInstanceBaseURL as setFHIRInstanceBaseURL, -} from 'fhir-react/lib/services/instance'; - beforeAll(async () => { setAidboxInstanceBaseURL('http://localhost:8181'); - setFHIRInstanceBaseURL('http://localhost:8181/fhir'); }); let txId: string; @@ -32,7 +26,6 @@ beforeEach(async () => { afterEach(async () => { resetAidboxInstanceToken(); - resetFHIRInstanceToken(); await withRootAccess(async () => { await axiosInstance({ method: 'POST', diff --git a/web/package.json b/web/package.json index 9162cb7c..d096c7bd 100644 --- a/web/package.json +++ b/web/package.json @@ -4,6 +4,8 @@ "version": "0.3.16", "private": true, "dependencies": { + "@beda.software/aidbox-types": "link:../shared/src/contrib/aidbox-types", + "@beda.software/fhir-react": "^1.11.1", "@codemirror/commands": "^6.8.0", "@codemirror/lang-javascript": "^6.2.2", "@codemirror/lang-yaml": "^6.1.2", @@ -33,13 +35,11 @@ "@types/react-select": "^3.1.2", "@types/react-toastify": "^4.1.0", "@types/yaml": "^1.9.7", - "aidbox-react": "^1.4.0", - "@beda.software/aidbox-types": "link:../shared/src/contrib/aidbox-types", + "aidbox-react": "^1.12.0", "allotment": "^1.20.2", "babel-loader": "8.1.0", "babel-plugin-import": "^1.13.3", "classnames": "^2.3.1", - "fhir-react": "https://github.com/beda-software/fhir-react.git", "fhirpath": "^3.5.0", "final-form": "^4.20.4", "final-form-arrays": "^3.0.2", @@ -58,7 +58,7 @@ "react-select": "^5.4.0", "react-toastify": "^9.0.5", "sass": "^1.50.0", - "sdc-qrf": "^1.0.0-beta.21", + "sdc-qrf": "^1.1.0-alpha.11", "shared": "0.0.2", "ts-jest": "^27.1.4", "vitest": "^0.33.0", diff --git a/web/src/components/BaseQuestionnaireResponseForm/components/date.tsx b/web/src/components/BaseQuestionnaireResponseForm/components/date.tsx index 82b7d1ec..2065bea2 100644 --- a/web/src/components/BaseQuestionnaireResponseForm/components/date.tsx +++ b/web/src/components/BaseQuestionnaireResponseForm/components/date.tsx @@ -1,8 +1,7 @@ +import { FHIRDateTimeFormat } from '@beda.software/fhir-react'; import moment from 'moment'; import { QuestionItemProps, useQuestionnaireResponseFormContext } from 'sdc-qrf'; -import { FHIRDateTimeFormat } from 'fhir-react/lib/utils/date'; - import { QuestionField } from './field'; import { QuestionLabel } from './label'; diff --git a/web/src/components/BaseQuestionnaireResponseForm/components/reference/hooks.ts b/web/src/components/BaseQuestionnaireResponseForm/components/reference/hooks.ts index 1805dc4e..8823a7e3 100644 --- a/web/src/components/BaseQuestionnaireResponseForm/components/reference/hooks.ts +++ b/web/src/components/BaseQuestionnaireResponseForm/components/reference/hooks.ts @@ -1,13 +1,12 @@ +import { ResourcesMap } from '@beda.software/fhir-react'; +import { isSuccess } from '@beda.software/remote-data'; +import { buildQueryParams } from 'aidbox-react'; import { Resource } from 'fhir/r4b'; import fhirpath from 'fhirpath'; import { ActionMeta, MultiValue, SingleValue } from 'react-select'; import { AnswerValue, FormAnswerItems, parseFhirQueryExpression, QuestionItemProps } from 'sdc-qrf'; import { loadResourceOptions } from 'web/src/services/questionnaire'; -import { isSuccess } from 'fhir-react/lib/libs/remoteData'; -import { ResourcesMap } from 'fhir-react/lib/services/fhir'; -import { buildQueryParams } from 'fhir-react/lib/services/instance'; - export type AnswerReferenceProps = QuestionItemProps & { overrideGetDisplay?: (resource: R, includedResources: ResourcesMap) => string; overrideGetLabel?: (o: AnswerValue) => React.ReactElement | string; diff --git a/web/src/components/BaseQuestionnaireResponseForm/index.tsx b/web/src/components/BaseQuestionnaireResponseForm/index.tsx index a281fe32..0dc26c78 100644 --- a/web/src/components/BaseQuestionnaireResponseForm/index.tsx +++ b/web/src/components/BaseQuestionnaireResponseForm/index.tsx @@ -10,6 +10,7 @@ import { QuestionnaireResponseFormProvider, removeItemKey, } from 'sdc-qrf'; +import { fhirService } from 'web/src/services/initialize'; import { Col, @@ -88,6 +89,7 @@ export function BaseQuestionnaireResponseForm({ formData, onSubmit, readOnly, on form.change('', newValues)} + fhirService={fhirService} groupItemComponent={Group} itemControlGroupItemComponents={{ col: Col, row: Row, gtable: GTable }} questionItemComponents={{ diff --git a/web/src/components/CachedRemoteData/index.tsx b/web/src/components/CachedRemoteData/index.tsx index b7af4acd..a1197a00 100644 --- a/web/src/components/CachedRemoteData/index.tsx +++ b/web/src/components/CachedRemoteData/index.tsx @@ -1,4 +1,4 @@ -import { isLoading, RemoteData } from 'fhir-react'; +import { isLoading, RemoteData } from '@beda.software/remote-data'; import { ReactElement, useEffect, useState } from 'react'; export function CachedRemoteData(props: { diff --git a/web/src/components/CodeEditor/ContextMenu/index.tsx b/web/src/components/CodeEditor/ContextMenu/index.tsx index d667f902..686f06e6 100644 --- a/web/src/components/CodeEditor/ContextMenu/index.tsx +++ b/web/src/components/CodeEditor/ContextMenu/index.tsx @@ -1,10 +1,9 @@ +import { RemoteData } from '@beda.software/remote-data'; import { QuestionnaireResponse, Parameters, Questionnaire } from 'fhir/r4b'; import { useRef } from 'react'; import { ModalExpression } from 'web/src/components/ModalExpression'; import { SourceQueryDebugModal } from 'web/src/components/SourceQueryDebugModal'; -import { RemoteData } from 'fhir-react/lib/libs/remoteData'; - import s from './ContextMenu.module.scss'; import { useContextMenu } from './useContextMenu'; import { useMenuActions } from './useMenuActions'; diff --git a/web/src/components/LaunchContextEditor/index.tsx b/web/src/components/LaunchContextEditor/index.tsx index a61f11d7..c8857f53 100644 --- a/web/src/components/LaunchContextEditor/index.tsx +++ b/web/src/components/LaunchContextEditor/index.tsx @@ -1,10 +1,9 @@ +import { success } from '@beda.software/remote-data'; import classNames from 'classnames'; import { FhirResource, Parameters, ParametersParameter, Questionnaire } from 'fhir/r4b'; import { useMemo, useState } from 'react'; import { SingleValue } from 'react-select'; -import { success } from 'fhir-react/lib/libs/remoteData'; - import { groupLaunchContextParams } from './groupLaunchContextParams'; import s from './LaunchContextEditor.module.scss'; import { LaunchContext } from './types'; diff --git a/web/src/components/ModalExpression/hooks.ts b/web/src/components/ModalExpression/hooks.ts index 59b4dffb..040ebd36 100644 --- a/web/src/components/ModalExpression/hooks.ts +++ b/web/src/components/ModalExpression/hooks.ts @@ -1,15 +1,14 @@ +import { useService } from '@beda.software/fhir-react'; +import { isSuccess } from '@beda.software/remote-data'; import { QuestionnaireResponse } from 'fhir/r4b'; import fhirpath from 'fhirpath'; import yaml from 'js-yaml'; import { useCallback, useContext, useEffect, useState } from 'react'; import { extractParameterName } from 'web/src/components/ModalExpression/utils'; import { ExpressionResultOutput } from 'web/src/containers/Main/types'; +import { service } from 'web/src/services/initialize'; import YAML, { visitor } from 'yaml'; -import { useService } from 'fhir-react/lib/hooks/service'; -import { isSuccess } from 'fhir-react/lib/libs/remoteData'; -import { service } from 'fhir-react/lib/services/service'; - import { ModalExpressionProps } from './types'; import { CodeEditorContext } from '../CodeEditor/context'; diff --git a/web/src/components/ModalExpression/index.tsx b/web/src/components/ModalExpression/index.tsx index 550cab02..240a5053 100644 --- a/web/src/components/ModalExpression/index.tsx +++ b/web/src/components/ModalExpression/index.tsx @@ -1,3 +1,4 @@ +import { isSuccess, RemoteData } from '@beda.software/remote-data'; import { QuestionnaireResponse } from 'fhir/r4b'; import { Button } from 'web/src/components/Button'; import { CodeEditor } from 'web/src/components/CodeEditor'; @@ -5,8 +6,6 @@ import { InputField } from 'web/src/components/InputField'; import { useExpressionModal } from 'web/src/components/ModalExpression/hooks'; import { ResourceCodeDisplay } from 'web/src/components/ResourceCodeDisplay'; -import { isSuccess, RemoteData } from 'fhir-react/lib/libs/remoteData'; - import s from './ModalExpression.module.scss'; import { ModalExpressionProps } from './types'; import { ExpressionType } from '../CodeEditor/ContextMenu/types'; diff --git a/web/src/components/ModalExpression/types.ts b/web/src/components/ModalExpression/types.ts index 8a3741f8..611fad31 100644 --- a/web/src/components/ModalExpression/types.ts +++ b/web/src/components/ModalExpression/types.ts @@ -1,7 +1,6 @@ +import { RemoteData } from '@beda.software/remote-data'; import { QuestionnaireResponse, Parameters } from 'fhir/r4b'; -import { RemoteData } from 'fhir-react/lib/libs/remoteData'; - import { CursorPosition, ExpressionType } from '../CodeEditor/ContextMenu/types'; export interface ModalExpressionProps { diff --git a/web/src/components/QRFormWrapper/index.tsx b/web/src/components/QRFormWrapper/index.tsx index cf6c1d8e..2adcc67f 100644 --- a/web/src/components/QRFormWrapper/index.tsx +++ b/web/src/components/QRFormWrapper/index.tsx @@ -1,3 +1,5 @@ +import { formatError } from '@beda.software/fhir-react'; +import { RemoteData, sequenceMap } from '@beda.software/remote-data'; import { Questionnaire as FHIRQuestionnaire, QuestionnaireResponse as FHIRQuestionnaireResponse, @@ -16,10 +18,6 @@ import { } from 'sdc-qrf'; import { RenderRemoteData } from 'web/src/components/RenderRemoteData'; -import { RemoteData } from 'fhir-react/lib/libs/remoteData'; -import { sequenceMap } from 'fhir-react/lib/services/service'; -import { formatError } from 'fhir-react/lib/utils/error'; - import { BaseQuestionnaireResponseForm } from '../BaseQuestionnaireResponseForm'; interface QRData { diff --git a/web/src/components/RenderRemoteData.tsx b/web/src/components/RenderRemoteData.tsx index 39f8a92b..e9106ffa 100644 --- a/web/src/components/RenderRemoteData.tsx +++ b/web/src/components/RenderRemoteData.tsx @@ -1,13 +1,12 @@ -import { ReactElement } from 'react'; - +import { formatError } from '@beda.software/fhir-react'; import { isFailure, isLoading, isNotAsked, isSuccess, RemoteData, -} from 'fhir-react/lib/libs/remoteData'; -import { formatError } from 'fhir-react/lib/utils/error'; +} from '@beda.software/remote-data'; +import { ReactElement } from 'react'; interface RenderRemoteDataProps { remoteData: RemoteData; diff --git a/web/src/components/ResourceCodeDisplay/index.tsx b/web/src/components/ResourceCodeDisplay/index.tsx index 0a1eb2cf..d30cf5bb 100644 --- a/web/src/components/ResourceCodeDisplay/index.tsx +++ b/web/src/components/ResourceCodeDisplay/index.tsx @@ -1,10 +1,9 @@ +import { RemoteData } from '@beda.software/remote-data'; import { FhirResource } from 'fhir/r4b'; import { memo } from 'react'; import { CodeEditor } from 'web/src/components/CodeEditor'; import { RenderRemoteData } from 'web/src/components/RenderRemoteData'; -import { RemoteData } from 'fhir-react/lib/libs/remoteData'; - interface ResourceDisplayBoxProps { resourceResponse: RemoteData; } diff --git a/web/src/components/ResourceCodeEditor/index.tsx b/web/src/components/ResourceCodeEditor/index.tsx index d9aecc5d..ae9f6cd1 100644 --- a/web/src/components/ResourceCodeEditor/index.tsx +++ b/web/src/components/ResourceCodeEditor/index.tsx @@ -1,10 +1,9 @@ +import { RemoteData } from '@beda.software/remote-data'; import { Parameters, Resource, QuestionnaireResponse } from 'fhir/r4b'; import { YAMLException } from 'js-yaml'; import _ from 'lodash'; import { useEffect, useState } from 'react'; -import { RemoteData } from 'fhir-react/lib/libs/remoteData'; - import { usePreviousValue } from 'shared/src/hooks/previous-value'; import s from './ResourceCodeEditor.module.scss'; diff --git a/web/src/components/ResourceSelect/index.tsx b/web/src/components/ResourceSelect/index.tsx index 9aac2012..09edcb60 100644 --- a/web/src/components/ResourceSelect/index.tsx +++ b/web/src/components/ResourceSelect/index.tsx @@ -1,14 +1,11 @@ +import { RenderRemoteData, WithId, SearchParams } from '@beda.software/fhir-react'; +import { isSuccess, RemoteData, mapSuccess } from '@beda.software/remote-data'; import classNames from 'classnames'; import { Bundle, Resource } from 'fhir/r4b'; import _ from 'lodash'; import { useCallback } from 'react'; import { MultiValue, SingleValue } from 'react-select'; - -import { RenderRemoteData } from 'fhir-react/lib/components/RenderRemoteData'; -import { isSuccess, RemoteData } from 'fhir-react/lib/libs/remoteData'; -import { getFHIRResources, WithId } from 'fhir-react/lib/services/fhir'; -import { SearchParams } from 'fhir-react/lib/services/search'; -import { mapSuccess } from 'fhir-react/lib/services/service'; +import { getFHIRResources } from 'web/src/services/initialize'; import s from './ResourceSelect.module.scss'; import { AsyncSelect } from '../Select'; diff --git a/web/src/components/SourceQueryDebugModal/__test__/sourceQueryDebugModal.test.ts b/web/src/components/SourceQueryDebugModal/__test__/sourceQueryDebugModal.test.ts index 0bfcc9e2..d3eeaac4 100644 --- a/web/src/components/SourceQueryDebugModal/__test__/sourceQueryDebugModal.test.ts +++ b/web/src/components/SourceQueryDebugModal/__test__/sourceQueryDebugModal.test.ts @@ -1,11 +1,10 @@ +import { ensure } from '@beda.software/fhir-react'; +import { isSuccess } from '@beda.software/remote-data'; import { act, renderHook } from '@testing-library/react-hooks'; +import { axiosInstance } from 'aidbox-react'; import { NutritionOrder, Patient } from 'fhir/r4b'; import { useSourceQueryDebugModal } from 'web/src/components/SourceQueryDebugModal/hooks'; - -import { isSuccess } from 'fhir-react/lib/libs/remoteData'; -import { saveFHIRResource } from 'fhir-react/lib/services/fhir'; -import { axiosInstance } from 'fhir-react/lib/services/instance'; -import { ensure } from 'fhir-react/lib/utils/tests'; +import { saveFHIRResource } from 'web/src/services/initialize'; import { nutritionOrderData, diff --git a/web/src/components/SourceQueryDebugModal/hooks.ts b/web/src/components/SourceQueryDebugModal/hooks.ts index 40743129..d4810ca7 100644 --- a/web/src/components/SourceQueryDebugModal/hooks.ts +++ b/web/src/components/SourceQueryDebugModal/hooks.ts @@ -1,13 +1,10 @@ +import { useService, formatError } from '@beda.software/fhir-react'; +import { isFailure, success, isSuccess, mapSuccess } from '@beda.software/remote-data'; import { Questionnaire, Bundle, Resource } from 'fhir/r4b'; import * as _ from 'lodash'; import { useCallback, useState } from 'react'; import { toast } from 'react-toastify'; - -import { useService } from 'fhir-react/lib/hooks/service'; -import { isFailure, success, isSuccess } from 'fhir-react/lib/libs/remoteData'; -import { saveFHIRResource } from 'fhir-react/lib/services/fhir'; -import { mapSuccess, service } from 'fhir-react/lib/services/service'; -import { formatError } from 'fhir-react/lib/utils/error'; +import { saveFHIRResource, service } from 'web/src/services/initialize'; import { Props } from './types'; diff --git a/web/src/components/SourceQueryDebugModal/index.tsx b/web/src/components/SourceQueryDebugModal/index.tsx index 043f0ee2..d369b24e 100644 --- a/web/src/components/SourceQueryDebugModal/index.tsx +++ b/web/src/components/SourceQueryDebugModal/index.tsx @@ -1,8 +1,7 @@ +import { RenderRemoteData } from '@beda.software/fhir-react'; import { Button } from 'web/src/components/Button'; import { CodeEditor } from 'web/src/components/CodeEditor'; -import { RenderRemoteData } from 'fhir-react/lib/components/RenderRemoteData'; - import { useSourceQueryDebugModal } from './hooks'; import s from './SourceQueryDebugModal.module.scss'; import { Props } from './types'; diff --git a/web/src/components/TerminologyField/index.tsx b/web/src/components/TerminologyField/index.tsx index 00e05ffd..11442d67 100644 --- a/web/src/components/TerminologyField/index.tsx +++ b/web/src/components/TerminologyField/index.tsx @@ -1,12 +1,10 @@ import { Coding, ValueSet } from '@beda.software/aidbox-types'; +import { isSuccess, mapSuccess } from '@beda.software/remote-data'; import _ from 'lodash'; import { useCallback } from 'react'; import { Field } from 'react-final-form'; import AsyncSelect from 'react-select/async'; - -import { isSuccess } from 'fhir-react/lib/libs/remoteData'; -import { mapSuccess, service } from 'fhir-react/lib/services/service'; - +import { service } from 'web/src/services/initialize'; import s from './TerminologyField.module.scss'; diff --git a/web/src/containers/App/index.tsx b/web/src/containers/App/index.tsx index bf46b0a7..1a006392 100644 --- a/web/src/containers/App/index.tsx +++ b/web/src/containers/App/index.tsx @@ -1,14 +1,11 @@ import { User } from '@beda.software/aidbox-types'; +import { RenderRemoteData, useService } from '@beda.software/fhir-react'; +import { success } from '@beda.software/remote-data'; import queryString from 'query-string'; import { useEffect, useRef } from 'react'; import { Route, Routes, useLocation, Navigate } from 'react-router-dom'; import { setData } from 'web/src/services/localStorage'; -import { RenderRemoteData } from 'fhir-react/lib/components/RenderRemoteData'; -import { useService } from 'fhir-react/lib/hooks/service'; -import { success } from 'fhir-react/lib/libs/remoteData'; - - import { authorize, getToken, diff --git a/web/src/containers/Main/MappingEditor/MappingEditorEditor/index.tsx b/web/src/containers/Main/MappingEditor/MappingEditorEditor/index.tsx index 2ac1a9a9..7961a1f9 100644 --- a/web/src/containers/Main/MappingEditor/MappingEditorEditor/index.tsx +++ b/web/src/containers/Main/MappingEditor/MappingEditorEditor/index.tsx @@ -1,14 +1,13 @@ import { Mapping } from '@beda.software/aidbox-types'; +import { WithId } from '@beda.software/fhir-react'; +import { isSuccess } from '@beda.software/remote-data'; import classNames from 'classnames'; -import { WithId } from 'fhir-react'; import _ from 'lodash'; import { useBeforeUnload } from 'react-router-dom'; import { toast } from 'react-toastify'; import { Button } from 'web/src/components/Button'; import { ResourceCodeEditor } from 'web/src/components/ResourceCodeEditor'; -import { isSuccess } from 'fhir-react/lib/libs/remoteData'; - import { MappingEditorEditorProps } from '../interfaces'; import s from '../MappingEditor.module.scss'; diff --git a/web/src/containers/Main/MappingEditor/MappingEditorError/index.tsx b/web/src/containers/Main/MappingEditor/MappingEditorError/index.tsx index 6491eb31..7439ecab 100644 --- a/web/src/containers/Main/MappingEditor/MappingEditorError/index.tsx +++ b/web/src/containers/Main/MappingEditor/MappingEditorError/index.tsx @@ -1,12 +1,11 @@ -import { Button } from "web/src/components/Button"; +import { formatError } from '@beda.software/fhir-react'; +import { Button } from 'web/src/components/Button'; -import { formatError } from "fhir-react/lib/utils/error"; - -import { MappingEditorErrorProps } from "../interfaces"; +import { MappingEditorErrorProps } from '../interfaces'; import s from '../MappingEditor.module.scss'; export function MappingEditorError(props: MappingEditorErrorProps) { - const {error, setEditorSelect, editorState} = props; + const { error, setEditorSelect, editorState } = props; return editorState !== 'ready' ? (
@@ -27,5 +26,5 @@ export function MappingEditorError(props: MappingEditorErrorProps) {
) : (
- ) -} \ No newline at end of file + ); +} diff --git a/web/src/containers/Main/MappingEditor/MappingEditorSelect/index.tsx b/web/src/containers/Main/MappingEditor/MappingEditorSelect/index.tsx index 32c16e41..c3511567 100644 --- a/web/src/containers/Main/MappingEditor/MappingEditorSelect/index.tsx +++ b/web/src/containers/Main/MappingEditor/MappingEditorSelect/index.tsx @@ -1,13 +1,11 @@ +import { RenderRemoteData, formatError } from '@beda.software/fhir-react'; +import { isFailure, isSuccess } from '@beda.software/remote-data'; import { SingleValue } from 'react-select'; import { toast } from 'react-toastify'; import { Button } from 'web/src/components/Button'; import { ModalCreateMapper } from 'web/src/components/ModalCreateMapper'; import { Select } from 'web/src/components/Select'; -import { RenderRemoteData } from 'fhir-react/lib/components/RenderRemoteData'; -import { isFailure, isSuccess } from 'fhir-react/lib/libs/remoteData'; -import { formatError } from 'fhir-react/lib/utils/error'; - import formStyles from '../../../../components/BaseQuestionnaireResponseForm/QuestionnaireResponseForm.module.scss'; import { PromptForm } from '../../PromptForm'; import { MappingEditorSelectProps } from '../interfaces'; diff --git a/web/src/containers/Main/MappingEditor/index.tsx b/web/src/containers/Main/MappingEditor/index.tsx index f1bc928a..c3e696f3 100644 --- a/web/src/containers/Main/MappingEditor/index.tsx +++ b/web/src/containers/Main/MappingEditor/index.tsx @@ -1,4 +1,4 @@ -import { RenderRemoteData } from 'fhir-react/lib/components/RenderRemoteData'; +import { RenderRemoteData } from '@beda.software/fhir-react'; import { MappingEditorProps } from './interfaces'; import s from './MappingEditor.module.scss'; diff --git a/web/src/containers/Main/MappingEditor/interfaces.ts b/web/src/containers/Main/MappingEditor/interfaces.ts index bbfa1dba..34b396ab 100644 --- a/web/src/containers/Main/MappingEditor/interfaces.ts +++ b/web/src/containers/Main/MappingEditor/interfaces.ts @@ -1,11 +1,9 @@ import { Mapping } from '@beda.software/aidbox-types'; +import { WithId } from '@beda.software/fhir-react'; +import { RemoteData, RemoteDataResult } from '@beda.software/remote-data'; import { Questionnaire, Parameters, QuestionnaireResponse } from 'fhir/r4b'; import { YAMLException } from 'js-yaml'; -import { RemoteData, RemoteDataResult } from 'fhir-react/lib/libs/remoteData'; -import { WithId } from 'fhir-react/lib/services/fhir'; - - export type EditorState = 'initial' | 'loading' | 'select' | 'ready'; interface CommonMappingEditorProps { diff --git a/web/src/containers/Main/MappingEditor/useMappingEditor.ts b/web/src/containers/Main/MappingEditor/useMappingEditor.ts index bb1d877e..b8593346 100644 --- a/web/src/containers/Main/MappingEditor/useMappingEditor.ts +++ b/web/src/containers/Main/MappingEditor/useMappingEditor.ts @@ -1,11 +1,5 @@ import { Mapping } from '@beda.software/aidbox-types'; -import { Bundle, Questionnaire } from 'fhir/r4b'; -import { YAMLException } from 'js-yaml'; -import { useEffect, useState } from 'react'; - -import { getFHIRResources as getAidboxFHIRResources } from 'aidbox-react/lib/services/fhir'; - -import { useService } from 'fhir-react/lib/hooks/service'; +import { useService, WithId, extractBundleResources } from '@beda.software/fhir-react'; import { RemoteData, RemoteDataResult, @@ -14,11 +8,13 @@ import { isLoading, isNotAsked, isSuccess, + mapSuccess, success, -} from 'fhir-react/lib/libs/remoteData'; -import { WithId, extractBundleResources } from 'fhir-react/lib/services/fhir'; -import { mapSuccess } from 'fhir-react/lib/services/service'; - +} from '@beda.software/remote-data'; +import { Bundle, Questionnaire } from 'fhir/r4b'; +import { YAMLException } from 'js-yaml'; +import { useEffect, useState } from 'react'; +import { getFHIRResources } from 'web/src/services/initialize'; import { EditorState } from './interfaces'; import { getMappings } from '../utils'; @@ -76,7 +72,7 @@ export function useMappingEditor( ) || []; if (ids.length) { - response = await getAidboxFHIRResources('Mapping', { + response = await getFHIRResources('Mapping', { _sort: 'id', _id: [ids.join(',')], }); diff --git a/web/src/containers/Main/PromptForm/index.tsx b/web/src/containers/Main/PromptForm/index.tsx index e0c9394b..c7030b92 100644 --- a/web/src/containers/Main/PromptForm/index.tsx +++ b/web/src/containers/Main/PromptForm/index.tsx @@ -1,9 +1,8 @@ +import { RemoteDataResult, isFailure, isSuccess } from '@beda.software/remote-data'; import { useState } from 'react'; import { Field, Form } from 'react-final-form'; import { Button } from 'web/src/components/Button'; -import { RemoteDataResult, isFailure, isSuccess } from 'fhir-react/lib/libs/remoteData'; - import s from '../../../components/BaseQuestionnaireResponseForm/QuestionnaireResponseForm.module.scss'; interface PromptFormInterface { diff --git a/web/src/containers/Main/QuestionnaireEditor/index.tsx b/web/src/containers/Main/QuestionnaireEditor/index.tsx index 1bc6b377..b4f96096 100644 --- a/web/src/containers/Main/QuestionnaireEditor/index.tsx +++ b/web/src/containers/Main/QuestionnaireEditor/index.tsx @@ -7,14 +7,14 @@ import { Button } from 'web/src/components/Button'; import { ResourceCodeEditor } from 'web/src/components/ResourceCodeEditor'; import { ModalCreateQuestionnaire } from 'web/src/components/ModalCreateQuestionnaire'; -import { RenderRemoteData } from 'fhir-react/lib/components/RenderRemoteData'; +import { RenderRemoteData } from '@beda.software/fhir-react'; import { RemoteData, RemoteDataResult, isFailure, isLoading, isSuccess, -} from 'fhir-react/lib/libs/remoteData'; +} from '@beda.software/remote-data'; import s from './QuestionnaireEditor.module.scss'; import formStyles from '../../../components/BaseQuestionnaireResponseForm/QuestionnaireResponseForm.module.scss'; import { PromptForm } from '../PromptForm'; diff --git a/web/src/containers/Main/__test__/main-callback.test.ts b/web/src/containers/Main/__test__/main-callback.test.ts index b45e7590..f599743a 100644 --- a/web/src/containers/Main/__test__/main-callback.test.ts +++ b/web/src/containers/Main/__test__/main-callback.test.ts @@ -1,16 +1,13 @@ import { Mapping } from '@beda.software/aidbox-types'; +import { ensure } from '@beda.software/fhir-react'; +import { isFailure, isSuccess } from '@beda.software/remote-data'; import { renderHook, act } from '@testing-library/react-hooks'; +import { axiosInstance } from 'aidbox-react'; import { Questionnaire, QuestionnaireResponse } from 'fhir/r4b'; import { useMain } from 'web/src/containers/Main/useMain'; +import { getFHIRResource , service } from 'web/src/services/initialize'; import { setData } from 'web/src/services/localStorage'; -import { isFailure, isSuccess } from 'fhir-react/lib/libs/remoteData'; -import { getFHIRResource } from 'fhir-react/lib/services/fhir'; -import { axiosInstance } from 'fhir-react/lib/services/instance'; -import { service } from 'fhir-react/lib/services/service'; -import { ensure } from 'fhir-react/lib/utils/tests'; - - import { EXPECTED_RESOURCES } from './resources'; import mappingDemo1 from './resources/Mapping/demo-1.json'; import mappingTest1New from './resources/Mapping/test-1-new.json'; diff --git a/web/src/containers/Main/__test__/main.test.ts b/web/src/containers/Main/__test__/main.test.ts index 1ef74611..ac49da34 100644 --- a/web/src/containers/Main/__test__/main.test.ts +++ b/web/src/containers/Main/__test__/main.test.ts @@ -1,15 +1,14 @@ import { Extension, Questionnaire } from '@beda.software/aidbox-types'; +import { ensure } from '@beda.software/fhir-react'; +import { isSuccess } from '@beda.software/remote-data'; import { renderHook } from '@testing-library/react-hooks'; import _ from 'lodash'; import { act } from 'react-dom/test-utils'; import { EXPECTED_RESOURCES } from 'web/src/containers/Main/__test__/resources'; import { useMain } from 'web/src/containers/Main/useMain'; +import { service } from 'web/src/services/initialize'; import { setData } from 'web/src/services/localStorage'; -import { isSuccess } from 'fhir-react/lib/libs/remoteData'; -import { service } from 'fhir-react/lib/services/service'; -import { ensure } from 'fhir-react/lib/utils/tests'; - const questionnaireIdInitial = 'demo-1'; diff --git a/web/src/containers/Main/index.tsx b/web/src/containers/Main/index.tsx index e2a8dd53..c6e81574 100644 --- a/web/src/containers/Main/index.tsx +++ b/web/src/containers/Main/index.tsx @@ -1,3 +1,5 @@ +import { RenderRemoteData } from '@beda.software/fhir-react'; +import { isSuccess, mapSuccess } from '@beda.software/remote-data'; import Editor from '@monaco-editor/react'; import { Allotment } from 'allotment'; import { FhirResource } from 'fhir/r4b'; @@ -15,9 +17,6 @@ import { QRFormWrapper } from 'web/src/components/QRFormWrapper'; import { ResourceCodeDisplay } from 'web/src/components/ResourceCodeDisplay'; import { version } from 'web/src/version'; -import { RenderRemoteData } from 'fhir-react/lib/components/RenderRemoteData'; -import { isSuccess } from 'fhir-react/lib/libs/remoteData'; - import s from './Main.module.scss'; import { MappingEditor } from './MappingEditor'; import { QuestionnaireEditor } from './QuestionnaireEditor'; @@ -26,8 +25,6 @@ import { useIDELayout } from './useIDELayout'; import { useMain } from './useMain'; import 'allotment/dist/style.css'; -// eslint-disable-next-line import/order -import { mapSuccess } from 'aidbox-react/lib/services/service'; export function Main() { const { questionnaireId } = useParams<{ questionnaireId: string }>(); diff --git a/web/src/containers/Main/useFHIRMappingLanguage.ts b/web/src/containers/Main/useFHIRMappingLanguage.ts index 3cfa28d1..2f1890e1 100644 --- a/web/src/containers/Main/useFHIRMappingLanguage.ts +++ b/web/src/containers/Main/useFHIRMappingLanguage.ts @@ -1,27 +1,24 @@ -import { Bundle, QuestionnaireResponse, StructureMap } from "fhir/r4b"; -import { useCallback, useEffect, useState } from "react"; -import { convert, createStructureMap, transform } from "web/src/services/fhirmapping"; - -import { isSuccess } from "fhir-react/lib/libs/remoteData"; - - +import { isSuccess } from '@beda.software/remote-data'; +import { Bundle, QuestionnaireResponse, StructureMap } from 'fhir/r4b'; +import { useCallback, useEffect, useState } from 'react'; +import { convert, createStructureMap, transform } from 'web/src/services/fhirmapping'; export function useFHIRMappingLanguage(questionnaireResponse: QuestionnaireResponse | undefined) { - const [fhirMappingLangMode, setFhirMappingLangMode] = useState(false) - const [mapString, setMapString] = useState('') - const [prevMapString, setPrevMapString] = useState('') - const [structureMapData, setStructureMapData] = useState(undefined) - const [structureMap, setStructureMap] = useState(undefined) - const [structureMapUrl, setStructureMapUrl] = useState(undefined) - const [mappingResult, setMappingResult] = useState(undefined) + const [fhirMappingLangMode, setFhirMappingLangMode] = useState(false); + const [mapString, setMapString] = useState(''); + const [prevMapString, setPrevMapString] = useState(''); + const [structureMapData, setStructureMapData] = useState(undefined); + const [structureMap, setStructureMap] = useState(undefined); + const [structureMapUrl, setStructureMapUrl] = useState(undefined); + const [mappingResult, setMappingResult] = useState(undefined); const fetchConvertData = useCallback(async (mapString: string, prevMapString: string) => { - if (mapString !== prevMapString){ + if (mapString !== prevMapString) { const response = await convert({ mapString }); if (isSuccess(response)) { setStructureMapData(response.data); } else { - setMappingResult(response.error) + setMappingResult(response.error); } } }, []); @@ -35,11 +32,14 @@ export function useFHIRMappingLanguage(questionnaireResponse: QuestionnaireRespo } }, []); - const fetchMappingResult = useCallback(async (structureMapUrl: string, questionnaireResponse: QuestionnaireResponse) => { - const response = await transform({ structureMapUrl, questionnaireResponse }); - const dataToSet = isSuccess(response) ? response.data : response.error - setMappingResult(dataToSet) - }, []); + const fetchMappingResult = useCallback( + async (structureMapUrl: string, questionnaireResponse: QuestionnaireResponse) => { + const response = await transform({ structureMapUrl, questionnaireResponse }); + const dataToSet = isSuccess(response) ? response.data : response.error; + setMappingResult(dataToSet); + }, + [], + ); useEffect(() => { if (mapString !== prevMapString) { @@ -62,9 +62,9 @@ export function useFHIRMappingLanguage(questionnaireResponse: QuestionnaireRespo const changeMapString = (value: string) => { setPrevMapString(mapString); setMapString(value); - } + }; - const toggleMappingMode = () => setFhirMappingLangMode(!fhirMappingLangMode) + const toggleMappingMode = () => setFhirMappingLangMode(!fhirMappingLangMode); return { fhirMappingLangMode, @@ -73,4 +73,4 @@ export function useFHIRMappingLanguage(questionnaireResponse: QuestionnaireRespo setMapString: changeMapString, mappingResult, }; -} \ No newline at end of file +} diff --git a/web/src/containers/Main/useMain.ts b/web/src/containers/Main/useMain.ts index 0b6cbc07..434260d9 100644 --- a/web/src/containers/Main/useMain.ts +++ b/web/src/containers/Main/useMain.ts @@ -1,4 +1,15 @@ import { Mapping } from '@beda.software/aidbox-types'; +import { useService, WithId, formatError } from '@beda.software/fhir-react'; +import { + RemoteData, + RemoteDataResult, + failure, + isFailure, + isSuccess, + mapSuccess, + notAsked, + success, +} from '@beda.software/remote-data'; import { Questionnaire, QuestionnaireResponse, @@ -13,27 +24,13 @@ import { toast } from 'react-toastify'; import { LaunchContext } from 'web/src/components/LaunchContextEditor/types'; import { generateMappingService, generateQuestionnaireService } from 'web/src/services/builder'; import { applyMapping as applyMappingService, extract } from 'web/src/services/extract'; -import { formatFHIRError } from 'web/src/utils/errors'; - import { - createFHIRResource as createAidboxFHIRResource, - getFHIRResource as getAidboxFHIRResource, - saveFHIRResource as saveAidboxFHIRResource, -} from 'aidbox-react/lib/services/fhir'; - -import { useService } from 'fhir-react/lib/hooks/service'; -import { - RemoteData, - RemoteDataResult, - failure, - isFailure, - isSuccess, - notAsked, - success, -} from 'fhir-react/lib/libs/remoteData'; -import { WithId, saveFHIRResource } from 'fhir-react/lib/services/fhir'; -import { mapSuccess, service } from 'fhir-react/lib/services/service'; -import { formatError } from 'fhir-react/lib/utils/error'; + saveFHIRResource, + service, + createFHIRResource, + getFHIRResource, +} from 'web/src/services/initialize'; +import { formatFHIRError } from 'web/src/utils/errors'; import { questionnaireProfileUrl } from 'shared/src/constants'; @@ -74,18 +71,16 @@ export function useMain(questionnaireId: string) { const mappings = getMappings(q)?.map((ext) => ext.valueReference!.reference!.split('/')[1]!) || []; - const response = await getAidboxFHIRResource({ - resourceType: 'Mapping', - id: mappings[0]!, + const response = await getFHIRResource({ + reference: `Mapping/${mappings[0]!}`, }); setMappingRD(response); }, []); const reloadMapping = useCallback(async () => { if (isSuccess(mappingRD)) { - const response = await getAidboxFHIRResource({ - resourceType: 'Mapping', - id: mappingRD.data.id, + const response = await getFHIRResource({ + reference: `Mapping/${mappingRD.data.id}`, }); setMappingRD(response); @@ -216,7 +211,7 @@ export function useMain(questionnaireId: string) { const createMapping = useCallback( async (mapping: Mapping) => { - const mappingResponse = await createAidboxFHIRResource(mapping); + const mappingResponse = await createFHIRResource(mapping); if (isSuccess(mappingResponse) && isSuccess(originalQuestionnaireRD)) { const questionnaire = originalQuestionnaireRD.data; @@ -281,7 +276,7 @@ export function useMain(questionnaireId: string) { const saveMapping = useCallback( async (mapping: Mapping) => { - const response = await saveAidboxFHIRResource(mapping); + const response = await saveFHIRResource(mapping); if (isSuccess(response)) { setMappingRD(response); diff --git a/web/src/services/auth.ts b/web/src/services/auth.ts index 80c8ed69..aa5d8da8 100644 --- a/web/src/services/auth.ts +++ b/web/src/services/auth.ts @@ -1,18 +1,11 @@ import { User } from '@beda.software/aidbox-types'; - -import { - resetInstanceToken as resetAidboxInstanceToken, - setInstanceToken as setAidboxInstanceToken, -} from 'aidbox-react/lib/services/instance'; -import { service } from 'aidbox-react/lib/services/service'; - -import { isFailure, success } from 'fhir-react/lib/libs/remoteData'; +import { extractErrorCode } from '@beda.software/fhir-react'; +import { isFailure, success } from '@beda.software/remote-data'; import { - resetInstanceToken as resetFHIRInstanceToken, - setInstanceToken as setFHIRInstanceToken, -} from 'fhir-react/lib/services/instance'; -import { extractErrorCode } from 'fhir-react/lib/utils/error'; - + resetAidboxInstanceToken, + setAidboxInstanceToken, + aidboxService, +} from 'web/src/services/initialize'; import { getData } from './localStorage'; @@ -21,7 +14,7 @@ export function getUserInfo() { connection: { baseUrl }, } = getData(); - return service({ + return aidboxService({ baseURL: baseUrl, method: 'GET', url: '/auth/userinfo', @@ -34,13 +27,11 @@ export function getToken() { export async function restoreUserSession(token: string) { setAidboxInstanceToken({ access_token: token, token_type: 'Bearer' }); - setFHIRInstanceToken({ access_token: token, token_type: 'Bearer' }); const userResponse = await getUserInfo(); if (isFailure(userResponse) && extractErrorCode(userResponse.error) !== 'network_error') { resetAidboxInstanceToken(); - resetFHIRInstanceToken(); return success(null); } diff --git a/web/src/services/builder.ts b/web/src/services/builder.ts index 90ab4774..da5467e3 100644 --- a/web/src/services/builder.ts +++ b/web/src/services/builder.ts @@ -1,4 +1,4 @@ -import { service } from 'fhir-react'; +import { service } from 'web/src/services/initialize'; import { aiQuestionnaireBuilderUrl } from 'shared/src/constants'; diff --git a/web/src/services/extract.ts b/web/src/services/extract.ts index 2f6209e8..d3152d10 100644 --- a/web/src/services/extract.ts +++ b/web/src/services/extract.ts @@ -1,9 +1,7 @@ import { Mapping } from '@beda.software/aidbox-types'; import { Bundle, Questionnaire, QuestionnaireResponse, Parameters, FhirResource } from 'fhir/r4b'; import _ from 'lodash'; - -import { service } from 'fhir-react/lib/services/service'; - +import { service } from 'web/src/services/initialize'; import { juteURL, fhirpathMappingUrl } from './initialize'; diff --git a/web/src/services/fhirmapping.ts b/web/src/services/fhirmapping.ts index 9c3a926d..78115792 100644 --- a/web/src/services/fhirmapping.ts +++ b/web/src/services/fhirmapping.ts @@ -1,26 +1,25 @@ -import { Bundle, QuestionnaireResponse, StructureMap } from "fhir/r4b"; +import { Bundle, QuestionnaireResponse, StructureMap } from 'fhir/r4b'; +import { service } from 'web/src/services/initialize'; -import { service } from "fhir-react/lib/services/service"; - -import { fhirMappingLanguageUrl } from "shared/src/constants"; +import { fhirMappingLanguageUrl } from 'shared/src/constants'; const CONTENT_TYPE_FHIR_MAPPING = 'text/fhir-mapping'; const CONTENT_TYPE_FHIR_JSON = 'application/fhir+json'; const ACCEPT_FHIR_JSON = 'application/fhir+json'; -export async function convert({mapString}: {mapString: string}) { +export async function convert({ mapString }: { mapString: string }) { return await service({ baseURL: fhirMappingLanguageUrl, url: `/StructureMap/$convert`, method: 'POST', data: mapString, headers: { - 'Content-Type': CONTENT_TYPE_FHIR_MAPPING - } + 'Content-Type': CONTENT_TYPE_FHIR_MAPPING, + }, }); } -export async function createStructureMap({structureMap}: {structureMap: StructureMap}){ +export async function createStructureMap({ structureMap }: { structureMap: StructureMap }) { return await service({ baseURL: fhirMappingLanguageUrl, url: `/StructureMap`, @@ -29,7 +28,13 @@ export async function createStructureMap({structureMap}: {structureMap: Structur }); } -export async function transform({structureMapUrl, questionnaireResponse}: {structureMapUrl: string, questionnaireResponse: QuestionnaireResponse}){ +export async function transform({ + structureMapUrl, + questionnaireResponse, +}: { + structureMapUrl: string; + questionnaireResponse: QuestionnaireResponse; +}) { return await service({ baseURL: fhirMappingLanguageUrl, url: `/StructureMap/$transform`, @@ -40,7 +45,7 @@ export async function transform({structureMapUrl, questionnaireResponse}: {struc }, headers: { 'Content-Type': CONTENT_TYPE_FHIR_JSON, - 'Accept': ACCEPT_FHIR_JSON - } + Accept: ACCEPT_FHIR_JSON, + }, }); -} \ No newline at end of file +} diff --git a/web/src/services/initialize.ts b/web/src/services/initialize.ts index dcc348c1..e5bf305c 100644 --- a/web/src/services/initialize.ts +++ b/web/src/services/initialize.ts @@ -1,10 +1,37 @@ -import { setInstanceBaseURL as setAidboxInstanceBaseURL } from 'aidbox-react/lib/services/instance'; - -import { setInstanceBaseURL as setFHIRInstanceBaseURL } from 'fhir-react/lib/services/instance'; +import { initServicesFromService } from '@beda.software/fhir-react'; +import { RemoteDataResult } from '@beda.software/remote-data'; +import { + service as aidboxService, + resetInstanceToken as resetAidboxInstanceToken, + setInstanceToken as setAidboxInstanceToken, +} from 'aidbox-react'; +import type { AxiosRequestConfig } from 'axios'; import { baseURL, juteURL, fhirpathMappingUrl } from 'shared/src/constants'; -setAidboxInstanceBaseURL(baseURL); -setFHIRInstanceBaseURL(`${baseURL}/fhir`); +export const fhirService = async ( + config: AxiosRequestConfig, +): Promise> => { + return aidboxService({ baseURL: `${baseURL}/fhir`, ...config }); +}; + +export const { + createFHIRResource, + updateFHIRResource, + getFHIRResource, + getFHIRResources, + getAllFHIRResources, + findFHIRResource, + saveFHIRResource, + saveFHIRResources, + patchFHIRResource, + deleteFHIRResource, + forceDeleteFHIRResource, + getConcepts, + applyFHIRService, + applyFHIRServices, + service, +} = initServicesFromService(fhirService); export { baseURL, juteURL, fhirpathMappingUrl }; +export { resetAidboxInstanceToken, setAidboxInstanceToken, aidboxService }; diff --git a/web/src/services/questionnaire.ts b/web/src/services/questionnaire.ts index 08976043..62da8c21 100644 --- a/web/src/services/questionnaire.ts +++ b/web/src/services/questionnaire.ts @@ -1,12 +1,7 @@ +import { extractBundleResources, ResourcesMap, SearchParams } from '@beda.software/fhir-react'; +import { mapSuccess } from '@beda.software/remote-data'; import { Resource } from 'fhir/r4b'; - -import { - extractBundleResources, - getFHIRResources, - ResourcesMap, -} from 'fhir-react/lib/services/fhir'; -import { SearchParams } from 'fhir-react/lib/services/search'; -import { mapSuccess } from 'fhir-react/lib/services/service'; +import { getFHIRResources } from 'web/src/services/initialize'; export async function loadResourceOptions( resourceType: R['resourceType'], diff --git a/web/src/utils/errors.ts b/web/src/utils/errors.ts index 5f3d4815..bc29a7cd 100644 --- a/web/src/utils/errors.ts +++ b/web/src/utils/errors.ts @@ -1,7 +1,6 @@ +import { formatError } from '@beda.software/fhir-react'; import { OperationOutcome } from 'fhir/r4b'; -import { formatError } from 'fhir-react/lib/utils/error'; - export function formatFHIRError(error: any) { if (error) { if (error instanceof Object && error['resourceType'] === 'OperationOutcome') { diff --git a/yarn.lock b/yarn.lock index aaac1430..6a78c2bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1170,6 +1170,24 @@ version "0.0.0" uid "" +"@beda.software/fhir-react@^1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@beda.software/fhir-react/-/fhir-react-1.11.1.tgz#db9c9ef3d55d48511761d91e2c78c1c859ec5e8e" + integrity sha512-5Tf5e0Y5CvLFoh1D0yLrNU7FFLOyQZ37wuEqy3Rpp9cw4jaD6QTxtSCslgSx7nNv7+gm9RQgbrByU1LLfV3xog== + dependencies: + "@beda.software/remote-data" "^1.1.4" + lodash "^4.17.21" + moment "^2.29.1" + optionalDependencies: + lint-staged "^15.2.0" + +"@beda.software/remote-data@^1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@beda.software/remote-data/-/remote-data-1.1.4.tgz#eeafbc4f380868e86a5194f3ef1c16779112195e" + integrity sha512-EICOc7TeQOL0wlkEvCePjzLVFTG1IDkIyc+qCTWN3rHr/mplFLaTpjWW/2ND+oJ3AW4qw1+GiYgC/MOlCyL6Cg== + dependencies: + axios "^1.8.4" + "@codemirror/autocomplete@^6.0.0": version "6.18.4" resolved "https://registry.yarnpkg.com/@codemirror/autocomplete/-/autocomplete-6.18.4.tgz#4394f55d6771727179f2e28a871ef46bbbeb11b1" @@ -3797,12 +3815,13 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -aidbox-react@^1.4.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aidbox-react/-/aidbox-react-1.8.0.tgz#766b656da4fece1ae7f293945891a0b5f879713d" - integrity sha512-1diG/JJiFR0llwIhf00i+6ZKW+TqJgCzEePT/9jxC/U9WX2bOP97ftMn5LHdsnLynEPmXtFVgf1QDv38e5iHeQ== +aidbox-react@^1.11.2: + version "1.12.0" + resolved "https://registry.yarnpkg.com/aidbox-react/-/aidbox-react-1.12.0.tgz#629bdba97321945791132cc64362d4d2b2c48585" + integrity sha512-prR3J0cN/4nLf7DNp5AROTcBgj11UBtjBpnm4tQ3yoEiqdTfYKRpCYNzSwdNsQ9P/HH6hZbHCTyiKM4UInsBaA== dependencies: - axios "^0.21.2" + "@beda.software/remote-data" "^1.1.4" + axios "^1.8.4" moment "^2.29.1" ajv-errors@^1.0.1: @@ -3880,6 +3899,13 @@ ansi-escapes@^5.0.0: dependencies: type-fest "^1.0.2" +ansi-escapes@^7.0.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-7.3.0.tgz#5395bb74b2150a4a1d6e3c2565f4aeca78d28627" + integrity sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg== + dependencies: + environment "^1.0.0" + ansi-html-community@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" @@ -3895,6 +3921,11 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== +ansi-regex@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1" + integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -3919,6 +3950,11 @@ ansi-styles@^6.0.0, ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== +ansi-styles@^6.2.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041" + integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== + antlr4@~4.9.3: version "4.9.3" resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.9.3.tgz#268b844ff8ce97d022399a05d4b37aa6ab4047b2" @@ -4159,13 +4195,6 @@ axe-core@^4.6.2: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.2.tgz#040a7342b20765cb18bb50b628394c21bccc17a0" integrity sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g== -axios@^0.21.2: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - axios@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" @@ -4175,6 +4204,16 @@ axios@^1.0.0: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.8.4: + version "1.18.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.18.0.tgz#8a7f8854af280fcaae063272df2ed9f3837d2398" + integrity sha512-E32NzpYKp++W7XRe52rHiXV2ehxmh3wbdgO7MHeFM+vqxLBYHzt0ElkiImtOBxtOmyp0yoC8C6uESVV84Y2/hw== + dependencies: + follow-redirects "^1.16.0" + form-data "^4.0.5" + https-proxy-agent "^5.0.1" + proxy-from-env "^2.1.0" + axobject-query@^3.1.1: version "3.2.1" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" @@ -4445,6 +4484,13 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + browser-process-hrtime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" @@ -4542,6 +4588,14 @@ cacache@^17.0.0: tar "^6.1.11" unique-filename "^3.0.0" +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -4658,6 +4712,11 @@ chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.4.1: + version "5.6.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.6.2.tgz#b1238b6e23ea337af71c7f8a295db5af0c158aea" + integrity sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA== + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -4754,6 +4813,13 @@ cli-cursor@^4.0.0: dependencies: restore-cursor "^4.0.0" +cli-cursor@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-5.0.0.tgz#24a4831ecf5a6b01ddeb32fb71a4b2088b0dce38" + integrity sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw== + dependencies: + restore-cursor "^5.0.0" + cli-spinners@2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" @@ -4772,6 +4838,14 @@ cli-truncate@^3.1.0: slice-ansi "^5.0.0" string-width "^5.0.0" +cli-truncate@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-4.0.0.tgz#6cc28a2924fee9e25ce91e973db56c7066e6172a" + integrity sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA== + dependencies: + slice-ansi "^5.0.0" + string-width "^7.0.0" + cli-width@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" @@ -4902,6 +4976,11 @@ commander@11.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ== +commander@^13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-13.1.0.tgz#776167db68c78f38dcce1f9b8d7b8b9a488abf46" + integrity sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw== + commander@^2.18.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -5425,6 +5504,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.4.0: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + decamelize-keys@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" @@ -5745,6 +5831,15 @@ dotenv@~16.3.1: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + duplexer@^0.1.1, duplexer@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" @@ -5787,6 +5882,11 @@ emittery@^0.8.1: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== +emoji-regex@^10.3.0: + version "10.6.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.6.0.tgz#bf3d6e8f7f8fd22a65d9703475bc0147357a6b0d" + integrity sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -5851,6 +5951,11 @@ envinfo@7.8.1: resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== +environment@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/environment/-/environment-1.1.0.tgz#8e86c66b180f363c7ab311787e0259665f45a9f1" + integrity sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q== + err-code@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" @@ -5920,6 +6025,16 @@ es-array-method-boxes-properly@^1.0.0: resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-get-iterator@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -5960,6 +6075,13 @@ es-module-lexer@^1.2.1: resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f" integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA== +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.2.tgz#a2d0b373205724dfa525d23b0c3e1b1ca582c99b" + integrity sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" @@ -5969,6 +6091,16 @@ es-set-tostringtag@^2.0.1: has "^1.0.3" has-tostringtag "^1.0.0" +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" @@ -6573,6 +6705,21 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +execa@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -6719,13 +6866,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -"fhir-react@https://github.com/beda-software/fhir-react.git": - version "1.7.0" - resolved "https://github.com/beda-software/fhir-react.git#076d66d1f804b310abe894cc6913d4f3d4a882c3" - dependencies: - axios "^0.21.2" - moment "^2.29.1" - fhirpath@^3.18.0: version "3.18.0" resolved "https://registry.yarnpkg.com/fhirpath/-/fhirpath-3.18.0.tgz#990d4d02ffe8fc5a74f3d6fbf4fe008904a55009" @@ -6789,6 +6929,13 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + filter-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" @@ -6890,11 +7037,16 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.15.0: +follow-redirects@^1.0.0, follow-redirects@^1.15.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.16.0.tgz#28474a159d3b9d11ef62050a14ed60e4df6d61bc" + integrity sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -6947,6 +7099,17 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.5: + version "4.0.6" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.6.tgz#28e864e1b786dbebb68db1f452f9635278665827" + integrity sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + hasown "^2.0.4" + mime-types "^2.1.35" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -7029,6 +7192,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" @@ -7068,6 +7236,11 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0, get-east-asian-width@^1.3.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz#216900f91df11a8b2c198c3e1d93d6c035a776b9" + integrity sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA== + get-func-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" @@ -7083,6 +7256,22 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-proto "^1.0.1" has-symbols "^1.0.3" +get-intrinsic@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -7108,6 +7297,14 @@ get-port@5.1.1: resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== +get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stream@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" @@ -7118,6 +7315,11 @@ get-stream@^6.0.0, get-stream@^6.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -7322,6 +7524,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + graceful-fs@4.2.11, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -7398,6 +7605,11 @@ has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" @@ -7405,6 +7617,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has-unicode@2.0.1, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -7417,6 +7636,13 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hasown@^2.0.2, hasown@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.4.tgz#8c62d8cb90beb2aad5d0a5b67581ad9854c3f003" + integrity sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A== + dependencies: + function-bind "^1.1.2" + he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -7595,7 +7821,7 @@ http-proxy@^1.18.1: follow-redirects "^1.0.0" requires-port "^1.0.0" -https-proxy-agent@^5.0.0: +https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== @@ -7613,6 +7839,11 @@ human-signals@^4.3.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -7913,6 +8144,13 @@ is-fullwidth-code-point@^4.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== +is-fullwidth-code-point@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz#046b2a6d4f6b156b2233d3207d4b5a9783999b98" + integrity sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ== + dependencies: + get-east-asian-width "^1.3.1" + is-generator-fn@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" @@ -9083,6 +9321,11 @@ lilconfig@2.1.0, lilconfig@^2.0.3, lilconfig@^2.0.5, lilconfig@^2.1.0: resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== +lilconfig@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4" + integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -9109,6 +9352,22 @@ lint-staged@^13.2.3: string-argv "0.3.2" yaml "2.3.1" +lint-staged@^15.2.0: + version "15.5.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.5.2.tgz#beff028fd0681f7db26ffbb67050a21ed4d059a3" + integrity sha512-YUSOLq9VeRNAo/CTaVmhGDKG+LBtA8KF1X4K5+ykMSwWST1vDxJRB2kv2COgLb1fvpCo+A/y9A0G0znNVmdx4w== + dependencies: + chalk "^5.4.1" + commander "^13.1.0" + debug "^4.4.0" + execa "^8.0.1" + lilconfig "^3.1.3" + listr2 "^8.2.5" + micromatch "^4.0.8" + pidtree "^0.6.0" + string-argv "^0.3.2" + yaml "^2.7.0" + listr2@6.6.1: version "6.6.1" resolved "https://registry.yarnpkg.com/listr2/-/listr2-6.6.1.tgz#08b2329e7e8ba6298481464937099f4a2cd7f95d" @@ -9121,6 +9380,18 @@ listr2@6.6.1: rfdc "^1.3.0" wrap-ansi "^8.1.0" +listr2@^8.2.5: + version "8.3.3" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.3.3.tgz#815fc8f738260ff220981bf9e866b3e11e8121bf" + integrity sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ== + dependencies: + cli-truncate "^4.0.0" + colorette "^2.0.20" + eventemitter3 "^5.0.1" + log-update "^6.1.0" + rfdc "^1.4.1" + wrap-ansi "^9.0.0" + load-json-file@6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-6.2.0.tgz#5c7770b42cafa97074ca2848707c61662f4251a1" @@ -9273,6 +9544,17 @@ log-update@^5.0.1: strip-ansi "^7.0.1" wrap-ansi "^8.0.1" +log-update@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-6.1.0.tgz#1a04ff38166f94647ae1af562f4bd6a15b1b7cd4" + integrity sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w== + dependencies: + ansi-escapes "^7.0.0" + cli-cursor "^5.0.0" + slice-ansi "^7.1.0" + strip-ansi "^7.1.0" + wrap-ansi "^9.0.0" + loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -9402,6 +9684,11 @@ map-obj@^4.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + mdn-data@2.0.14: version "2.0.14" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" @@ -9474,12 +9761,20 @@ micromatch@4.0.5, micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@^2.1.35, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -9501,6 +9796,11 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== +mimic-function@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.1.tgz#acbe2b3349f99b9deaca7fb70e48b83e94e67076" + integrity sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -9693,7 +9993,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -10199,6 +10499,13 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +onetime@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-7.0.0.tgz#9f16c92d8c9ef5120e3acd9dd9957cceecc1ab60" + integrity sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ== + dependencies: + mimic-function "^5.0.0" + open@^8.0.9, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -10542,6 +10849,11 @@ pidtree@0.6.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== +pidtree@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.1.tgz#3d03fae6183cc07091947dcc1087ce567cd3bcd3" + integrity sha512-e0F9AOF1JMrCfBsyJOwU9lNvQ0WtXTq0j/4jk0BQ5JSI9VAybPXmDpPRw/2FQ3e5d3ZFN1mLh7jW99m/jjaptw== + pify@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" @@ -11284,6 +11596,11 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +proxy-from-env@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-2.1.0.tgz#a7487568adad577cfaaa7e88c49cab3ab3081aba" + integrity sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA== + psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -11878,6 +12195,14 @@ restore-cursor@^4.0.0: onetime "^5.1.0" signal-exit "^3.0.2" +restore-cursor@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-5.1.0.tgz#0766d95699efacb14150993f55baf0953ea1ebe7" + integrity sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA== + dependencies: + onetime "^7.0.0" + signal-exit "^4.1.0" + retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" @@ -11898,6 +12223,11 @@ rfdc@^1.3.0: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== +rfdc@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" + integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== + rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -12079,10 +12409,10 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.1.0" -sdc-qrf@^1.0.0-beta.21: - version "1.0.0-beta.21" - resolved "https://registry.yarnpkg.com/sdc-qrf/-/sdc-qrf-1.0.0-beta.21.tgz#ffff7e2afb4c84f42b81b7296c1559436b4453ac" - integrity sha512-doTimGZa2/yZtJ/8JdarO9xLN/yHUHQdNWjyfkYsOYFEM/Syy3ZNkNyuYQzcTT2XlOYuldLHLvKxxELXamCU5A== +sdc-qrf@^1.1.0-alpha.11: + version "1.1.0-alpha.11" + resolved "https://registry.yarnpkg.com/sdc-qrf/-/sdc-qrf-1.1.0-alpha.11.tgz#9f15959d909aaa2889c5fd791f14ff9e83064dca" + integrity sha512-WHFx1S2s652Lox8WlUD3+c4WohZExP/K1pFkHL9sLhwrxZXN7u1/I4YaRIgCGouV4HHTP/XE4Ai+b81lsVbWhA== dependencies: classnames "^2.5.1" fhirpath "^3.18.0" @@ -12240,7 +12570,7 @@ signal-exit@3.0.7, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.0.1: +signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== @@ -12279,6 +12609,14 @@ slice-ansi@^5.0.0: ansi-styles "^6.0.0" is-fullwidth-code-point "^4.0.0" +slice-ansi@^7.1.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-7.1.2.tgz#adf7be70aa6d72162d907cd0e6d5c11f507b5403" + integrity sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w== + dependencies: + ansi-styles "^6.2.1" + is-fullwidth-code-point "^5.0.0" + smart-buffer@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" @@ -12524,7 +12862,7 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -string-argv@0.3.2: +string-argv@0.3.2, string-argv@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== @@ -12558,7 +12896,16 @@ string-to-stream@^1.1.0: inherits "^2.0.1" readable-stream "^2.1.0" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -12576,6 +12923,15 @@ string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string-width@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.2.0.tgz#b5bb8e2165ce275d4d43476dd2700ad9091db6dc" + integrity sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + string.prototype.matchall@^4.0.6, string.prototype.matchall@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" @@ -12640,7 +12996,14 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12654,6 +13017,13 @@ strip-ansi@^7.0.1: dependencies: ansi-regex "^6.0.1" +strip-ansi@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.2.0.tgz#d22a269522836a627af8d04b5c3fd2c7fa3e32e3" + integrity sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w== + dependencies: + ansi-regex "^6.2.2" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -14031,7 +14401,7 @@ workbox-window@6.6.1: "@types/trusted-types" "^2.0.2" workbox-core "6.6.1" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -14049,6 +14419,15 @@ wrap-ansi@^6.0.1: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -14058,6 +14437,15 @@ wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: string-width "^5.0.1" strip-ansi "^7.0.1" +wrap-ansi@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-9.0.2.tgz#956832dea9494306e6d209eb871643bb873d7c98" + integrity sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww== + dependencies: + ansi-styles "^6.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -14168,6 +14556,11 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yaml@^2.7.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.9.0.tgz#78274afd93598a1dfdd6130df6a566defcbf9aa4" + integrity sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA== + yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" From 2fef78b8b978b6b572029fb9c9216aa5a7e70560 Mon Sep 17 00:00:00 2001 From: Alex Lipovka Date: Sat, 20 Jun 2026 13:55:50 +0400 Subject: [PATCH 2/2] fix signature to call getFHIRResource in tests --- web/src/containers/Main/__test__/main-callback.test.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/web/src/containers/Main/__test__/main-callback.test.ts b/web/src/containers/Main/__test__/main-callback.test.ts index f599743a..bfced848 100644 --- a/web/src/containers/Main/__test__/main-callback.test.ts +++ b/web/src/containers/Main/__test__/main-callback.test.ts @@ -2,10 +2,9 @@ import { Mapping } from '@beda.software/aidbox-types'; import { ensure } from '@beda.software/fhir-react'; import { isFailure, isSuccess } from '@beda.software/remote-data'; import { renderHook, act } from '@testing-library/react-hooks'; -import { axiosInstance } from 'aidbox-react'; import { Questionnaire, QuestionnaireResponse } from 'fhir/r4b'; import { useMain } from 'web/src/containers/Main/useMain'; -import { getFHIRResource , service } from 'web/src/services/initialize'; +import { getFHIRResource, service } from 'web/src/services/initialize'; import { setData } from 'web/src/services/localStorage'; import { EXPECTED_RESOURCES } from './resources'; @@ -125,8 +124,7 @@ test.skip( ).toBeUndefined(); const responseBefore = await getFHIRResource({ - resourceType: 'Mapping', - id: notFoundMappingId, + reference: `Mapping/${notFoundMappingId}`, }); if (isFailure(responseBefore)) { @@ -141,8 +139,7 @@ test.skip( }); const responseAfter = await getFHIRResource({ - resourceType: 'Mapping', - id: existingMappingId, + reference: `Mapping/${existingMappingId}`, }); if (isSuccess(responseAfter)) {