Skip to content

Commit

Permalink
add type duplication to build command
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickAtlassian committed Dec 20, 2024
1 parent f7177db commit e68b84a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Set up the Custom UI Frontend
# in a new tab
yarn ui:install

# build the frontend
# build the frontend. This will also duplicate several types files that are needed in the forge backend and ui, overwriting the versions in the ui
yarn ui:build

# watch the frontend
Expand Down
2 changes: 1 addition & 1 deletion manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ modules:
function: import-projects
method: import
app:
id: ari:cloud:ecosystem::app/60787eba-aec5-49b4-979d-db8e77de32db
id: ari:cloud:ecosystem::app/e04e572c-d275-4782-95a5-b2084dda4e5f
runtime:
name: nodejs18.x
features:
Expand Down
6 changes: 6 additions & 0 deletions src/features.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
TO EDIT THIS FILE, you must edit the file in the repo's src directory and running yarn ui:build or yarn ui:prebuild will generate the types in the ui/src directory.
This file contains types that are used in both of the directories and need to stay in sync. So, the ui/src types are gitignored
*/

export enum GitlabFeaturesEnum {
SEND_STAGING_EVENTS = 'isSendStagingEventsEnabled',
DATA_COMPONENT_TYPES = 'isDataComponentTypesEnabled',
Expand Down
6 changes: 6 additions & 0 deletions src/resolverTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import {
} from './types';
import { FeaturesList } from './features';

/*
TO EDIT THIS FILE, you must edit the file in the repo's src directory and running yarn ui:build or yarn ui:prebuild will generate the types in the ui/src directory.
This file contains types that are used in both of the directories and need to stay in sync. So, the ui/src types are gitignored
*/

export enum DefaultErrorTypes {
UNEXPECTED_ERROR = 'UNEXPECTED_ERROR',
NO_APP_ID_VARIABLE_DEFINED = 'NO_APP_ID_VARIABLE_DEFINED',
Expand Down
6 changes: 6 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import {
DataProviderDeploymentEvent,
} from '@atlassian/forge-graphql';

/*
TO EDIT THIS FILE, you must edit the file in the repo's src directory and running yarn ui:build or yarn ui:prebuild will generate the types in the ui/src directory.
This file contains types that are used in both of the directories and need to stay in sync. So, the ui/src types are gitignored
*/

type WebtriggerRequest = {
body: string;
queryParameters: {
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"scripts": {
"start": "SKIP_PREFLIGHT_CHECK=true BROWSER=none PORT=3001 react-scripts start",
"build": "SKIP_PREFLIGHT_CHECK=true react-scripts build",
"build": "yarn prebuild && SKIP_PREFLIGHT_CHECK=true react-scripts build",
"test": "SKIP_PREFLIGHT_CHECK=true react-scripts test",
"pretest": "node -p \"JSON.stringify({...require('@forge/bridge/package.json'), main: 'out/index.js'}, null, 2)\" > tmp.json && mv tmp.json node_modules/@forge/bridge/package.json",
"eject": "react-scripts eject",
Expand Down

0 comments on commit e68b84a

Please sign in to comment.