File tree Expand file tree Collapse file tree 1 file changed +21
-19
lines changed Expand file tree Collapse file tree 1 file changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -2,31 +2,31 @@ import axios from 'axios';
22import { v4 as uuidv4 } from 'uuid' ;
33
44import {
5- type StixBundle ,
6- type AttackObject ,
75 extensibleStixBundleSchema ,
6+ type AttackObject ,
87 type AttackObjects ,
8+ type StixBundle ,
99} from './schemas/sdo/stix-bundle.schema.js' ;
1010
1111import {
12- techniqueSchema ,
13- tacticSchema ,
14- matrixSchema ,
15- mitigationSchema ,
16- relationshipSchema ,
17- dataSourceSchema ,
12+ analyticSchema ,
13+ assetSchema ,
14+ campaignSchema ,
15+ collectionSchema ,
1816 dataComponentSchema ,
17+ dataSourceSchema ,
18+ detectionStrategySchema ,
1919 groupSchema ,
20- malwareSchema ,
21- toolSchema ,
22- markingDefinitionSchema ,
2320 identitySchema ,
24- collectionSchema ,
25- campaignSchema ,
26- assetSchema ,
2721 logSourceSchema ,
28- detectionStrategySchema ,
29- analyticSchema ,
22+ malwareSchema ,
23+ markingDefinitionSchema ,
24+ matrixSchema ,
25+ mitigationSchema ,
26+ relationshipSchema ,
27+ tacticSchema ,
28+ techniqueSchema ,
29+ toolSchema ,
3030} from './schemas/index.js' ;
3131
3232import {
@@ -53,9 +53,11 @@ const readFile = async (path: string): Promise<string> => {
5353 }
5454} ;
5555
56- const GITHUB_BASE_URL =
57- process . env . GITHUB_BASE_URL ||
58- 'https://raw.githubusercontent.com/mitre-attack/attack-stix-data/master' ;
56+ let GITHUB_BASE_URL = ""
57+ if ( typeof window !== 'undefined' ) {
58+ GITHUB_BASE_URL =
59+ process . env . GITHUB_BASE_URL || 'https://raw.githubusercontent.com/mitre-attack/attack-stix-data/master' ;
60+ }
5961
6062interface DataSourceMap {
6163 [ key : string ] : {
You can’t perform that action at this time.
0 commit comments