From 2ccfb74a51cb2464a88db878bc570dd1f7478ae9 Mon Sep 17 00:00:00 2001 From: Tan Nhu Date: Mon, 29 Aug 2022 14:28:46 -0700 Subject: [PATCH] Rename SCM to Gitness --- web/config/moduleFederation.config.js | 4 ++-- web/src/RouteUtils.ts | 2 +- web/src/bootstrap.tsx | 2 +- web/src/global.d.ts | 2 +- web/src/services/config.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/config/moduleFederation.config.js b/web/config/moduleFederation.config.js index 8b73582c8..de6e837c9 100644 --- a/web/config/moduleFederation.config.js +++ b/web/config/moduleFederation.config.js @@ -25,11 +25,11 @@ const ExactSharedPackages = [ * @type {import('webpack').ModuleFederationPluginOptions} */ module.exports = { - name: 'scm', + name: 'gitness', filename: 'remoteEntry.js', library: { type: 'var', - name: 'HarnessSCM' + name: 'HarnessGitness' }, exposes: { './App': './src/App.tsx' diff --git a/web/src/RouteUtils.ts b/web/src/RouteUtils.ts index dba12eaa0..4a50b6452 100644 --- a/web/src/RouteUtils.ts +++ b/web/src/RouteUtils.ts @@ -4,4 +4,4 @@ * @returns an array of proper route paths that works in both standalone and embedded modes across all levels of governance. */ export const routePath = (standalone: boolean, path: string): string | string[] => - standalone ? path : [`/account/:accountId/scm${path}`] + standalone ? path : [`/account/:accountId/git${path}`] diff --git a/web/src/bootstrap.tsx b/web/src/bootstrap.tsx index fe0d83f82..010e280d8 100644 --- a/web/src/bootstrap.tsx +++ b/web/src/bootstrap.tsx @@ -6,7 +6,7 @@ import './App.scss' // This flag is used in services/config.ts to customize API path when app is run // in multiple modes (standalone vs. embedded). // Also being used in when generating proper URLs inside the app. -window.STRIP_SCM_PREFIX = true +window.STRIP_GITNESS_PREFIX = true ReactDOM.render( , diff --git a/web/src/global.d.ts b/web/src/global.d.ts index 1c19ff6ad..6e2eb61da 100644 --- a/web/src/global.d.ts +++ b/web/src/global.d.ts @@ -45,7 +45,7 @@ declare module '*.gql' { declare interface Window { apiUrl: string bugsnagClient?: any - STRIP_SCM_PREFIX?: boolean + STRIP_GITNESS_PREFIX?: boolean } declare const monaco: any diff --git a/web/src/services/config.ts b/web/src/services/config.ts index bb8dd89c7..2e6ce1eb6 100644 --- a/web/src/services/config.ts +++ b/web/src/services/config.ts @@ -5,7 +5,7 @@ export const getConfig = (str: string): string => { // NOTE: Replace /^pm\// with your service prefixes when running in standalone mode // I.e: 'pm/api/v1' -> 'api/v1' (standalone) // -> 'pm/api/v1' (embedded inside Harness platform) - if (window.STRIP_SCM_PREFIX) { + if (window.STRIP_GITNESS_PREFIX) { str = str.replace(/^pm\//, '') }