import { DownloadProject } from './actions/DownloadProject.js'; import { SelectBoilerplate } from './questions/SelectBoilerplate.js'; import { SelectTenant } from './questions/SelectTenant.js'; import { ContextProvider, useJourney } from './context/provider.js'; import { Tips } from '../../components/Tips.js'; import { ExecuteRecipes } from './actions/ExecuteRecipes.js'; import { SetupCredentials } from '../../components/SetupCredentials.js'; import { Boilerplate, PimAuthenticatedUser, PimCredentials } from '../../../types.js'; import { fetchAvailableTenantIdentifier } from '../../utils/crystallize.js'; import { Messages } from '../../components/Messages.js'; import { colors } from '../../../config/colors.js'; import React from 'react'; import { Success } from './actions/Success.js'; import { Text } from 'ink'; export const InstallBoilerplateJourney: React.FC<{ folder: string; tenantIdentifier?: string; bootstrapTenant?: boolean; boilerplate?: Boilerplate; isVerbose?: boolean; }> = ({ folder, tenantIdentifier, bootstrapTenant = false, isVerbose = false, boilerplate }) => { return ( ); }; const Journey: React.FC<{ isVerbose: boolean }> = ({ isVerbose }) => { const { state, dispatch } = useJourney(); return ( <> Install will happen in directory: {state.folder} {state.boilerplate && } {state.boilerplate && state.tenant?.identifier && state.bootstrapTenant && !state.credentials && ( { fetchAvailableTenantIdentifier(credentials, state.tenant!.identifier).then( (newIdentifier: string) => { dispatch.changeTenant({ identifier: newIdentifier, }); dispatch.setCredentials(credentials); }, ); }} /> )} {state.isWizardFullfilled && } {state.isDownloaded && } {!state.isFullfilled && } {state.isFullfilled && } ); };