-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from getappmap/feat/live-urls
feat: Live urls
- Loading branch information
Showing
15 changed files
with
183 additions
and
81 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,14 +1,20 @@ | ||
import ReportOptions from './ReportOptions'; | ||
import {executeCommand} from './executeCommand'; | ||
import verbose from './verbose'; | ||
|
||
export default class MarkdownReport { | ||
public appmapCommand = '/tmp/appmap'; | ||
public appmapCommand = 'appmap'; | ||
|
||
constructor(public reportDir: string) {} | ||
constructor(public reportDir: string, public options: ReportOptions) { | ||
if (options.appmapCommand) this.appmapCommand = options.appmapCommand; | ||
} | ||
|
||
async generateReport() { | ||
let cmd = `${this.appmapCommand} compare-report ${this.reportDir}`; | ||
let cmd = `${this.appmapCommand} compare-report`; | ||
if (verbose()) cmd += ' --verbose'; | ||
if (this.options.sourceURL) cmd += ` --source-url '${this.options.sourceURL}'`; | ||
if (this.options.appmapURL) cmd += ` --appmap-url '${this.options.appmapURL}'`; | ||
cmd += ` ${this.reportDir}`; | ||
await executeCommand(cmd); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default interface ReportOptions { | ||
sourceURL?: URL; | ||
appmapURL?: URL; | ||
appmapCommand?: string; | ||
} |
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
Oops, something went wrong.