Rename SCM to Gitness

This commit is contained in:
Tan Nhu 2022-08-29 14:28:46 -07:00
parent c9792ad58d
commit 2ccfb74a51
5 changed files with 6 additions and 6 deletions

View File

@ -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'

View File

@ -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}`]

View File

@ -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(
<App standalone accountId="default" apiToken="default" hooks={{}} components={{}} />,

2
web/src/global.d.ts vendored
View File

@ -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

View File

@ -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\//, '')
}