-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(webui): update remaining references to
entry
-> bundle
- Loading branch information
Showing
8 changed files
with
37 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { PartialAtlasBundle } from '~core/data/types'; | ||
|
||
/** | ||
* Translate an absolute path to a relative path, based on the entry's project root. | ||
* Translate an absolute path to a relative path, based on the bundle's project root. | ||
* This is a simple replace operation. | ||
*/ | ||
export function relativeBundlePath( | ||
entry: Pick<PartialAtlasBundle, 'projectRoot' | 'sharedRoot'>, | ||
bundle: Pick<PartialAtlasBundle, 'projectRoot' | 'sharedRoot'>, | ||
path: string | ||
) { | ||
return path.replace(rootBundlePath(entry) + '/', ''); | ||
return path.replace(rootBundlePath(bundle) + '/', ''); | ||
} | ||
|
||
/** | ||
* Get the "shared root" of all paths within the entry. | ||
* Get the "shared root" of all paths within the bundle. | ||
* This is calculated by comparing `projectRoot` and `watchFolders`. | ||
*/ | ||
export function rootBundlePath(entry: Pick<PartialAtlasBundle, 'projectRoot' | 'sharedRoot'>) { | ||
return entry.sharedRoot || entry.projectRoot; | ||
export function rootBundlePath(bundle: Pick<PartialAtlasBundle, 'projectRoot' | 'sharedRoot'>) { | ||
return bundle.sharedRoot || bundle.projectRoot; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters