-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve readme & add netrypoint
- Loading branch information
Showing
4 changed files
with
58 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as debugLib from 'debug'; | ||
const debug = debugLib('snyk:import-projects-script'); | ||
|
||
export * from './lib'; | ||
import { ImportProjects } from './scripts/import-projects'; | ||
import { getImportProjectsFile } from './lib/get-import-path'; | ||
|
||
try { | ||
const importFile = getImportProjectsFile(); | ||
ImportProjects(importFile); | ||
} catch (e) { | ||
debug('Failed to kick off import.\n' + e); | ||
} |
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,9 @@ | ||
export function getImportProjectsFile(): string { | ||
const snykImportPath = process.env.SNYK_LOG_PATH; | ||
if (!snykImportPath) { | ||
throw new Error( | ||
`Please set the SNYK_IMPORT_PATH e.g. export SNYK_IMPORT_PATH='~/my/path/to/file'`, | ||
); | ||
} | ||
return snykImportPath; | ||
} |
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 |
---|---|---|
|
@@ -9,5 +9,5 @@ | |
"importHelpers": true, | ||
"strict": true | ||
}, | ||
"include": ["./src/lib/**/*"] | ||
"include": ["./src/**/**/*"] | ||
} |