shiplint 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +101 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +21 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/scanner.d.ts +27 -0
- package/dist/core/scanner.d.ts.map +1 -0
- package/dist/core/scanner.js +104 -0
- package/dist/core/scanner.js.map +1 -0
- package/dist/formatters/index.d.ts +13 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +29 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/formatters/json.d.ts +13 -0
- package/dist/formatters/json.d.ts.map +1 -0
- package/dist/formatters/json.js +17 -0
- package/dist/formatters/json.js.map +1 -0
- package/dist/formatters/sarif.d.ts +14 -0
- package/dist/formatters/sarif.d.ts.map +1 -0
- package/dist/formatters/sarif.js +108 -0
- package/dist/formatters/sarif.js.map +1 -0
- package/dist/formatters/text.d.ts +9 -0
- package/dist/formatters/text.d.ts.map +1 -0
- package/dist/formatters/text.js +128 -0
- package/dist/formatters/text.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/entitlements-parser.d.ts +26 -0
- package/dist/parsers/entitlements-parser.d.ts.map +1 -0
- package/dist/parsers/entitlements-parser.js +105 -0
- package/dist/parsers/entitlements-parser.js.map +1 -0
- package/dist/parsers/framework-detector.d.ts +76 -0
- package/dist/parsers/framework-detector.d.ts.map +1 -0
- package/dist/parsers/framework-detector.js +501 -0
- package/dist/parsers/framework-detector.js.map +1 -0
- package/dist/parsers/index.d.ts +10 -0
- package/dist/parsers/index.d.ts.map +1 -0
- package/dist/parsers/index.js +26 -0
- package/dist/parsers/index.js.map +1 -0
- package/dist/parsers/pbxproj-parser.d.ts +166 -0
- package/dist/parsers/pbxproj-parser.d.ts.map +1 -0
- package/dist/parsers/pbxproj-parser.js +423 -0
- package/dist/parsers/pbxproj-parser.js.map +1 -0
- package/dist/parsers/plist-parser.d.ts +26 -0
- package/dist/parsers/plist-parser.d.ts.map +1 -0
- package/dist/parsers/plist-parser.js +166 -0
- package/dist/parsers/plist-parser.js.map +1 -0
- package/dist/parsers/project-parser.d.ts +57 -0
- package/dist/parsers/project-parser.d.ts.map +1 -0
- package/dist/parsers/project-parser.js +618 -0
- package/dist/parsers/project-parser.js.map +1 -0
- package/dist/parsers/workspace-parser.d.ts +82 -0
- package/dist/parsers/workspace-parser.d.ts.map +1 -0
- package/dist/parsers/workspace-parser.js +287 -0
- package/dist/parsers/workspace-parser.js.map +1 -0
- package/dist/rules/auth/index.d.ts +5 -0
- package/dist/rules/auth/index.d.ts.map +1 -0
- package/dist/rules/auth/index.js +9 -0
- package/dist/rules/auth/index.js.map +1 -0
- package/dist/rules/auth/third-party-login-no-siwa.d.ts +11 -0
- package/dist/rules/auth/third-party-login-no-siwa.d.ts.map +1 -0
- package/dist/rules/auth/third-party-login-no-siwa.js +119 -0
- package/dist/rules/auth/third-party-login-no-siwa.js.map +1 -0
- package/dist/rules/base.d.ts +25 -0
- package/dist/rules/base.d.ts.map +1 -0
- package/dist/rules/base.js +37 -0
- package/dist/rules/base.js.map +1 -0
- package/dist/rules/config/ats-exception-without-justification.d.ts +12 -0
- package/dist/rules/config/ats-exception-without-justification.d.ts.map +1 -0
- package/dist/rules/config/ats-exception-without-justification.js +152 -0
- package/dist/rules/config/ats-exception-without-justification.js.map +1 -0
- package/dist/rules/config/index.d.ts +5 -0
- package/dist/rules/config/index.d.ts.map +1 -0
- package/dist/rules/config/index.js +9 -0
- package/dist/rules/config/index.js.map +1 -0
- package/dist/rules/index.d.ts +43 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +103 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/metadata/index.d.ts +5 -0
- package/dist/rules/metadata/index.d.ts.map +1 -0
- package/dist/rules/metadata/index.js +9 -0
- package/dist/rules/metadata/index.js.map +1 -0
- package/dist/rules/metadata/missing-privacy-manifest.d.ts +12 -0
- package/dist/rules/metadata/missing-privacy-manifest.d.ts.map +1 -0
- package/dist/rules/metadata/missing-privacy-manifest.js +186 -0
- package/dist/rules/metadata/missing-privacy-manifest.js.map +1 -0
- package/dist/rules/privacy/att-tracking-mismatch.d.ts +12 -0
- package/dist/rules/privacy/att-tracking-mismatch.d.ts.map +1 -0
- package/dist/rules/privacy/att-tracking-mismatch.js +113 -0
- package/dist/rules/privacy/att-tracking-mismatch.js.map +1 -0
- package/dist/rules/privacy/index.d.ts +11 -0
- package/dist/rules/privacy/index.d.ts.map +1 -0
- package/dist/rules/privacy/index.js +21 -0
- package/dist/rules/privacy/index.js.map +1 -0
- package/dist/rules/privacy/location-always-unjustified.d.ts +11 -0
- package/dist/rules/privacy/location-always-unjustified.d.ts.map +1 -0
- package/dist/rules/privacy/location-always-unjustified.js +102 -0
- package/dist/rules/privacy/location-always-unjustified.js.map +1 -0
- package/dist/rules/privacy/missing-camera-purpose.d.ts +11 -0
- package/dist/rules/privacy/missing-camera-purpose.d.ts.map +1 -0
- package/dist/rules/privacy/missing-camera-purpose.js +83 -0
- package/dist/rules/privacy/missing-camera-purpose.js.map +1 -0
- package/dist/rules/privacy/missing-contacts-purpose.d.ts +11 -0
- package/dist/rules/privacy/missing-contacts-purpose.d.ts.map +1 -0
- package/dist/rules/privacy/missing-contacts-purpose.js +85 -0
- package/dist/rules/privacy/missing-contacts-purpose.js.map +1 -0
- package/dist/rules/privacy/missing-location-purpose.d.ts +12 -0
- package/dist/rules/privacy/missing-location-purpose.d.ts.map +1 -0
- package/dist/rules/privacy/missing-location-purpose.js +137 -0
- package/dist/rules/privacy/missing-location-purpose.js.map +1 -0
- package/dist/rules/privacy/missing-microphone-purpose.d.ts +11 -0
- package/dist/rules/privacy/missing-microphone-purpose.d.ts.map +1 -0
- package/dist/rules/privacy/missing-microphone-purpose.js +132 -0
- package/dist/rules/privacy/missing-microphone-purpose.js.map +1 -0
- package/dist/rules/privacy/missing-photo-library-purpose.d.ts +11 -0
- package/dist/rules/privacy/missing-photo-library-purpose.d.ts.map +1 -0
- package/dist/rules/privacy/missing-photo-library-purpose.js +102 -0
- package/dist/rules/privacy/missing-photo-library-purpose.js.map +1 -0
- package/dist/types/index.d.ts +140 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +59 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.knownUsageDescriptionKeys = void 0;
|
|
40
|
+
exports.parsePlist = parsePlist;
|
|
41
|
+
exports.parsePlistString = parsePlistString;
|
|
42
|
+
exports.parseStructuredPlist = parseStructuredPlist;
|
|
43
|
+
exports.structurePlistData = structurePlistData;
|
|
44
|
+
exports.isPlaceholder = isPlaceholder;
|
|
45
|
+
/**
|
|
46
|
+
* Parser for Info.plist files
|
|
47
|
+
*/
|
|
48
|
+
const fs = __importStar(require("fs"));
|
|
49
|
+
const plist_1 = __importDefault(require("plist"));
|
|
50
|
+
/**
|
|
51
|
+
* Parses an Info.plist file at the given path
|
|
52
|
+
*/
|
|
53
|
+
function parsePlist(filePath) {
|
|
54
|
+
if (!fs.existsSync(filePath)) {
|
|
55
|
+
throw new Error(`Info.plist not found at: ${filePath}`);
|
|
56
|
+
}
|
|
57
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
58
|
+
try {
|
|
59
|
+
const parsed = plist_1.default.parse(content);
|
|
60
|
+
if (typeof parsed !== 'object' || parsed === null) {
|
|
61
|
+
throw new Error('Root is not a dictionary');
|
|
62
|
+
}
|
|
63
|
+
return parsed;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
throw new Error(`Invalid Info.plist format at ${filePath}: ${error}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Parses Info.plist from a string
|
|
71
|
+
*/
|
|
72
|
+
function parsePlistString(content) {
|
|
73
|
+
try {
|
|
74
|
+
const parsed = plist_1.default.parse(content);
|
|
75
|
+
if (typeof parsed !== 'object' || parsed === null) {
|
|
76
|
+
throw new Error('Root is not a dictionary');
|
|
77
|
+
}
|
|
78
|
+
return parsed;
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
throw new Error(`Invalid plist format: ${error}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Parses Info.plist and returns structured data
|
|
86
|
+
*/
|
|
87
|
+
function parseStructuredPlist(filePath) {
|
|
88
|
+
const raw = parsePlist(filePath);
|
|
89
|
+
return structurePlistData(raw);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Converts raw plist dict to structured format
|
|
93
|
+
*/
|
|
94
|
+
function structurePlistData(raw) {
|
|
95
|
+
const usageDescriptions = {};
|
|
96
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
97
|
+
if (key.startsWith('NS') && key.endsWith('UsageDescription')) {
|
|
98
|
+
if (typeof value === 'string') {
|
|
99
|
+
usageDescriptions[key] = value;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
bundleIdentifier: raw['CFBundleIdentifier'],
|
|
105
|
+
displayName: raw['CFBundleDisplayName'] || raw['CFBundleName'],
|
|
106
|
+
bundleName: raw['CFBundleName'],
|
|
107
|
+
minimumOSVersion: raw['MinimumOSVersion'],
|
|
108
|
+
requiredDeviceCapabilities: raw['UIRequiredDeviceCapabilities'] || [],
|
|
109
|
+
backgroundModes: raw['UIBackgroundModes'] || [],
|
|
110
|
+
usageDescriptions,
|
|
111
|
+
raw,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Known usage description keys and their associated frameworks
|
|
116
|
+
*/
|
|
117
|
+
exports.knownUsageDescriptionKeys = {
|
|
118
|
+
'NSCameraUsageDescription': ['AVFoundation', 'UIImagePickerController'],
|
|
119
|
+
'NSMicrophoneUsageDescription': ['AVFoundation', 'AVAudioSession'],
|
|
120
|
+
'NSPhotoLibraryUsageDescription': ['PhotosUI', 'Photos', 'UIImagePickerController'],
|
|
121
|
+
'NSPhotoLibraryAddUsageDescription': ['PhotosUI', 'Photos'],
|
|
122
|
+
'NSLocationWhenInUseUsageDescription': ['CoreLocation'],
|
|
123
|
+
'NSLocationAlwaysUsageDescription': ['CoreLocation'],
|
|
124
|
+
'NSLocationAlwaysAndWhenInUseUsageDescription': ['CoreLocation'],
|
|
125
|
+
'NSContactsUsageDescription': ['Contacts', 'ContactsUI'],
|
|
126
|
+
'NSCalendarsUsageDescription': ['EventKit', 'EventKitUI'],
|
|
127
|
+
'NSRemindersUsageDescription': ['EventKit'],
|
|
128
|
+
'NSBluetoothAlwaysUsageDescription': ['CoreBluetooth'],
|
|
129
|
+
'NSBluetoothPeripheralUsageDescription': ['CoreBluetooth'],
|
|
130
|
+
'NSHealthShareUsageDescription': ['HealthKit'],
|
|
131
|
+
'NSHealthUpdateUsageDescription': ['HealthKit'],
|
|
132
|
+
'NSMotionUsageDescription': ['CoreMotion'],
|
|
133
|
+
'NSSpeechRecognitionUsageDescription': ['Speech'],
|
|
134
|
+
'NSFaceIDUsageDescription': ['LocalAuthentication'],
|
|
135
|
+
'NSHomeKitUsageDescription': ['HomeKit'],
|
|
136
|
+
'NSSiriUsageDescription': ['Intents'],
|
|
137
|
+
'NSAppleMusicUsageDescription': ['MediaPlayer', 'StoreKit'],
|
|
138
|
+
'NSUserTrackingUsageDescription': ['AppTrackingTransparency'],
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Checks if a usage description appears to be a placeholder
|
|
142
|
+
*/
|
|
143
|
+
function isPlaceholder(value) {
|
|
144
|
+
const lowercased = value.toLowerCase().trim();
|
|
145
|
+
// Empty or very short
|
|
146
|
+
if (lowercased.length < 10) {
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
// Common placeholder patterns
|
|
150
|
+
const placeholders = [
|
|
151
|
+
'lorem ipsum',
|
|
152
|
+
'todo',
|
|
153
|
+
'fixme',
|
|
154
|
+
'placeholder',
|
|
155
|
+
'description here',
|
|
156
|
+
'add description',
|
|
157
|
+
'your app',
|
|
158
|
+
'this app',
|
|
159
|
+
'test',
|
|
160
|
+
'testing',
|
|
161
|
+
'xxx',
|
|
162
|
+
'...',
|
|
163
|
+
];
|
|
164
|
+
return placeholders.some(p => lowercased.includes(p));
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=plist-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plist-parser.js","sourceRoot":"","sources":["../../src/parsers/plist-parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,gCAgBC;AAKD,4CAUC;AAKD,oDAGC;AAKD,gDAqBC;AAgCD,sCAyBC;AApID;;GAEG;AACH,uCAAyB;AACzB,kDAA0B;AAG1B;;GAEG;AACH,SAAgB,UAAU,CAAC,QAAgB;IACzC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAEnD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,eAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;QACD,O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a,EAAE,UAAU,CAAC;IAC3D,gCAAgC,EAAE,CAAC,yBAAyB,CAAC;CAC9D,CAAC;AAEF;;GAEG;AACH,SAAgB,aAAa,CAAC,KAAa;IACzC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IAE9C,sBAAsB;IACtB,IAAI,UAAU,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8BAA8B;IAC9B,MAAM,YAAY,GAAG;QACnB,aAAa;QACb,MAAM;QACN,OAAO;QACP,aAAa;QACb,kBAAkB;QAClB,iBAAiB;QACjB,UAAU;QACV,UAAU;QACV,MAAM;QACN,SAAS;QACT,KAAK;QACL,KAAK;KACN,CAAC;IAEF,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Dependency, ScanContext } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Result of project discovery
|
|
4
|
+
*/
|
|
5
|
+
export interface ProjectDiscovery {
|
|
6
|
+
projectPath: string;
|
|
7
|
+
/** P2 FIX: Scoped directory for artifacts (parent of .xcodeproj) to prevent monorepo mixing */
|
|
8
|
+
projectScopeDir?: string;
|
|
9
|
+
/** P2-A FIX: Scoped directory for dependency lockfile discovery (the .xcodeproj path itself) */
|
|
10
|
+
dependencyScopeDir?: string;
|
|
11
|
+
infoPlistPath?: string;
|
|
12
|
+
entitlementsPath?: string;
|
|
13
|
+
pbxprojPath?: string;
|
|
14
|
+
isWorkspace: boolean;
|
|
15
|
+
/** P1/P2: All projects found in workspace (when applicable) */
|
|
16
|
+
workspaceProjects?: string[];
|
|
17
|
+
/** P2 FIX: Target name from pbxproj parsing (for scoped fallback discovery) */
|
|
18
|
+
targetName?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Artifact paths extracted from project.pbxproj
|
|
22
|
+
*/
|
|
23
|
+
export interface PbxprojArtifacts {
|
|
24
|
+
infoPlistPath?: string;
|
|
25
|
+
entitlementsPath?: string;
|
|
26
|
+
/** The target name these artifacts came from */
|
|
27
|
+
targetName?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* P1/P2 FIX: Parse project.pbxproj to extract explicit artifact paths
|
|
31
|
+
*
|
|
32
|
+
* Now uses proper target graph parsing to:
|
|
33
|
+
* 1. Find all PBXNativeTarget entries
|
|
34
|
+
* 2. Select main app target by productType (not name heuristics)
|
|
35
|
+
* 3. Get build settings from the correct target's configuration
|
|
36
|
+
* 4. Handle Xcode path variables properly
|
|
37
|
+
*
|
|
38
|
+
* @param pbxprojPath Path to project.pbxproj file
|
|
39
|
+
* @param projectDir Directory containing the .xcodeproj
|
|
40
|
+
* @returns Resolved artifact paths
|
|
41
|
+
*/
|
|
42
|
+
export declare function parsePbxprojForArtifacts(pbxprojPath: string, projectDir: string): PbxprojArtifacts;
|
|
43
|
+
/**
|
|
44
|
+
* Discovers project files in a directory
|
|
45
|
+
*
|
|
46
|
+
* P1/P2 Fix: Now uses workspace parsing and explicit artifact paths
|
|
47
|
+
*/
|
|
48
|
+
export declare function discoverProject(inputPath: string): ProjectDiscovery;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a scan context from discovered project
|
|
51
|
+
*/
|
|
52
|
+
export declare function createScanContext(discovery: ProjectDiscovery): ScanContext;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a ScanContext object with helper methods
|
|
55
|
+
*/
|
|
56
|
+
export declare function createContextObject(projectPath: string, infoPlist: Record<string, unknown>, entitlements: Record<string, unknown>, linkedFrameworks: Set<string>, dependencies: Dependency[]): ScanContext;
|
|
57
|
+
//# sourceMappingURL=project-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-parser.d.ts","sourceRoot":"","sources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