infiniloom-node 0.3.0 → 0.3.2
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 +76 -21
- package/index.d.ts +90 -43
- package/index.js +20 -19
- package/infiniloom.darwin-arm64.node +0 -0
- package/infiniloom.darwin-x64.node +0 -0
- package/infiniloom.linux-arm64-gnu.node +0 -0
- package/infiniloom.linux-x64-gnu.node +0 -0
- package/infiniloom.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,19 +47,25 @@ const context = pack('./my-repo', {
|
|
|
47
47
|
format: 'xml', // Output format: 'xml', 'markdown', 'json', 'yaml', 'toon', or 'plain'
|
|
48
48
|
model: 'claude', // Target model: 'gpt-5.2', 'gpt-5.1', 'gpt-5', 'o3', 'gpt-4o', 'claude', 'gemini', 'llama', etc.
|
|
49
49
|
compression: 'balanced', // Compression: 'none', 'minimal', 'balanced', 'aggressive', 'extreme', 'focused', 'semantic'
|
|
50
|
-
mapBudget: 2000,
|
|
51
|
-
maxSymbols: 50,
|
|
52
|
-
skipSecurity: false,
|
|
53
|
-
redactSecrets: true,
|
|
54
|
-
skipSymbols: false // Skip symbol extraction for faster scans
|
|
50
|
+
mapBudget: 2000, // Token budget for repository map
|
|
51
|
+
maxSymbols: 50, // Maximum symbols to include in map
|
|
52
|
+
skipSecurity: false, // Skip security scanning
|
|
53
|
+
redactSecrets: true, // Redact detected secrets in output (default true)
|
|
54
|
+
skipSymbols: false, // Skip symbol extraction for faster scans
|
|
55
|
+
include: ['src/**/*.ts'], // Glob patterns to include
|
|
56
|
+
exclude: ['**/*.test.ts'], // Glob patterns to exclude
|
|
57
|
+
includeTests: false, // Include test files (default: false)
|
|
58
|
+
securityThreshold: 'critical', // Minimum severity to block: 'critical', 'high', 'medium', 'low'
|
|
59
|
+
tokenBudget: 50000 // Limit total output tokens (0 = no limit)
|
|
55
60
|
});
|
|
56
61
|
```
|
|
57
62
|
|
|
58
63
|
### Repository Scanning
|
|
59
64
|
|
|
60
65
|
```javascript
|
|
61
|
-
const { scan } = require('infiniloom-node');
|
|
66
|
+
const { scan, scanWithOptions } = require('infiniloom-node');
|
|
62
67
|
|
|
68
|
+
// Simple scan with model
|
|
63
69
|
const stats = scan('./my-repo', 'claude');
|
|
64
70
|
console.log(`Repository: ${stats.name}`);
|
|
65
71
|
console.log(`Total files: ${stats.totalFiles}`);
|
|
@@ -67,6 +73,15 @@ console.log(`Total lines: ${stats.totalLines}`);
|
|
|
67
73
|
console.log(`Total tokens: ${stats.totalTokens}`);
|
|
68
74
|
console.log(`Primary language: ${stats.primaryLanguage}`);
|
|
69
75
|
console.log(`Languages:`, stats.languages);
|
|
76
|
+
|
|
77
|
+
// Advanced scan with options
|
|
78
|
+
const detailedStats = scanWithOptions('./my-repo', {
|
|
79
|
+
model: 'gpt-4o',
|
|
80
|
+
include: ['src/**/*.ts'], // Include only TypeScript source files
|
|
81
|
+
exclude: ['**/*.test.ts'], // Exclude test files
|
|
82
|
+
includeTests: false, // Exclude test directories
|
|
83
|
+
applyDefaultIgnores: true // Apply default ignores (node_modules, dist, etc.)
|
|
84
|
+
});
|
|
70
85
|
```
|
|
71
86
|
|
|
72
87
|
### Token Counting
|
|
@@ -109,19 +124,28 @@ console.log(stats);
|
|
|
109
124
|
const map = loom.generateMap(2000, 50);
|
|
110
125
|
console.log(map);
|
|
111
126
|
|
|
112
|
-
// Pack with options
|
|
127
|
+
// Pack with options (including new features)
|
|
113
128
|
const context = loom.pack({
|
|
114
129
|
format: 'xml',
|
|
115
|
-
compression: 'balanced'
|
|
130
|
+
compression: 'balanced',
|
|
131
|
+
tokenBudget: 50000, // Limit output size
|
|
132
|
+
include: ['src/**/*.ts'], // Filter files
|
|
133
|
+
exclude: ['**/*.test.ts']
|
|
116
134
|
});
|
|
117
135
|
console.log(context);
|
|
118
136
|
|
|
119
|
-
// Security scan
|
|
137
|
+
// Security scan - returns structured findings
|
|
120
138
|
const findings = loom.securityScan();
|
|
121
139
|
if (findings.length > 0) {
|
|
122
140
|
console.warn('Security issues found:');
|
|
123
|
-
|
|
141
|
+
for (const finding of findings) {
|
|
142
|
+
console.warn(`${finding.severity}: ${finding.kind} in ${finding.file}:${finding.line}`);
|
|
143
|
+
}
|
|
124
144
|
}
|
|
145
|
+
|
|
146
|
+
// Legacy formatted output (if needed)
|
|
147
|
+
const formattedFindings = loom.securityScanFormatted();
|
|
148
|
+
formattedFindings.forEach(f => console.log(f));
|
|
125
149
|
```
|
|
126
150
|
|
|
127
151
|
## API Reference
|
|
@@ -140,7 +164,7 @@ Pack a repository into optimized LLM context.
|
|
|
140
164
|
|
|
141
165
|
#### `scan(path: string, model?: string): ScanStats`
|
|
142
166
|
|
|
143
|
-
Scan a repository and return statistics.
|
|
167
|
+
Scan a repository and return statistics. Applies default ignores automatically.
|
|
144
168
|
|
|
145
169
|
**Parameters:**
|
|
146
170
|
- `path` - Path to repository root
|
|
@@ -148,6 +172,16 @@ Scan a repository and return statistics.
|
|
|
148
172
|
|
|
149
173
|
**Returns:** Repository statistics
|
|
150
174
|
|
|
175
|
+
#### `scanWithOptions(path: string, options?: ScanOptions): ScanStats`
|
|
176
|
+
|
|
177
|
+
Scan a repository with full configuration options.
|
|
178
|
+
|
|
179
|
+
**Parameters:**
|
|
180
|
+
- `path` - Path to repository root
|
|
181
|
+
- `options` - Optional scan options
|
|
182
|
+
|
|
183
|
+
**Returns:** Repository statistics
|
|
184
|
+
|
|
151
185
|
#### `countTokens(text: string, model?: string): number`
|
|
152
186
|
|
|
153
187
|
Count tokens in text for a specific model.
|
|
@@ -210,14 +244,31 @@ if (isGitRepo('./my-project')) {
|
|
|
210
244
|
|
|
211
245
|
```typescript
|
|
212
246
|
interface PackOptions {
|
|
213
|
-
format?: string;
|
|
214
|
-
model?: string;
|
|
215
|
-
compression?: string;
|
|
216
|
-
mapBudget?: number;
|
|
217
|
-
maxSymbols?: number;
|
|
218
|
-
skipSecurity?: boolean;
|
|
219
|
-
redactSecrets?: boolean
|
|
220
|
-
skipSymbols?: boolean;
|
|
247
|
+
format?: string; // "xml", "markdown", "json", "yaml", "toon", or "plain"
|
|
248
|
+
model?: string; // "gpt-5.2", "gpt-5.1", "gpt-5", "o3", "gpt-4o", "claude", "gemini", "llama", etc.
|
|
249
|
+
compression?: string; // "none", "minimal", "balanced", "aggressive", "extreme", "focused", "semantic"
|
|
250
|
+
mapBudget?: number; // Token budget for repository map
|
|
251
|
+
maxSymbols?: number; // Maximum number of symbols in map
|
|
252
|
+
skipSecurity?: boolean; // Skip security scanning
|
|
253
|
+
redactSecrets?: boolean; // Redact detected secrets (default: true)
|
|
254
|
+
skipSymbols?: boolean; // Skip symbol extraction for faster scanning
|
|
255
|
+
include?: string[]; // Glob patterns to include (e.g., ["src/**/*.ts"])
|
|
256
|
+
exclude?: string[]; // Glob patterns to exclude (e.g., ["**/*.test.ts"])
|
|
257
|
+
includeTests?: boolean; // Include test files (default: false)
|
|
258
|
+
securityThreshold?: string;// Minimum severity to block: "critical", "high", "medium", "low"
|
|
259
|
+
tokenBudget?: number; // Limit total output tokens (0 = no limit)
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
#### `ScanOptions`
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
interface ScanOptions {
|
|
267
|
+
model?: string; // Target model for token counting (default: "claude")
|
|
268
|
+
include?: string[]; // Glob patterns to include
|
|
269
|
+
exclude?: string[]; // Glob patterns to exclude
|
|
270
|
+
includeTests?: boolean; // Include test files (default: false)
|
|
271
|
+
applyDefaultIgnores?: boolean; // Apply default ignores for dist/, node_modules/, etc. (default: true)
|
|
221
272
|
}
|
|
222
273
|
```
|
|
223
274
|
|
|
@@ -322,9 +373,13 @@ Generate a repository map.
|
|
|
322
373
|
|
|
323
374
|
Pack repository with specific options.
|
|
324
375
|
|
|
325
|
-
#### `securityScan():
|
|
376
|
+
#### `securityScan(): SecurityFinding[]`
|
|
377
|
+
|
|
378
|
+
Check for security issues and return structured findings.
|
|
379
|
+
|
|
380
|
+
#### `securityScanFormatted(): string[]`
|
|
326
381
|
|
|
327
|
-
Check for security issues and return
|
|
382
|
+
Check for security issues and return formatted strings (legacy format).
|
|
328
383
|
|
|
329
384
|
### GitRepo Class
|
|
330
385
|
|
package/index.d.ts
CHANGED
|
@@ -3,39 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
-
/** Security finding information */
|
|
7
|
-
export interface SecurityFinding {
|
|
8
|
-
/** File where the finding was detected */
|
|
9
|
-
file: string
|
|
10
|
-
/** Line number (1-indexed) */
|
|
11
|
-
line: number
|
|
12
|
-
/** Severity level: "Critical", "High", "Medium", "Low", "Info" */
|
|
13
|
-
severity: string
|
|
14
|
-
/** Type of finding */
|
|
15
|
-
kind: string
|
|
16
|
-
/** Matched pattern */
|
|
17
|
-
pattern: string
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Scan a repository for security issues
|
|
21
|
-
*
|
|
22
|
-
* # Arguments
|
|
23
|
-
* * `path` - Path to repository root
|
|
24
|
-
*
|
|
25
|
-
* # Returns
|
|
26
|
-
* Array of security findings
|
|
27
|
-
*
|
|
28
|
-
* # Example
|
|
29
|
-
* ```javascript
|
|
30
|
-
* const { scanSecurity } = require('infiniloom-node');
|
|
31
|
-
*
|
|
32
|
-
* const findings = scanSecurity('./my-repo');
|
|
33
|
-
* for (const finding of findings) {
|
|
34
|
-
* console.log(`${finding.severity}: ${finding.kind} in ${finding.file}:${finding.line}`);
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
export declare function scanSecurity(path: string): Array<SecurityFinding>
|
|
39
6
|
/** Options for packing a repository */
|
|
40
7
|
export interface PackOptions {
|
|
41
8
|
/** Output format: "xml", "markdown", "json", "yaml", "toon", or "plain" */
|
|
@@ -54,6 +21,16 @@ export interface PackOptions {
|
|
|
54
21
|
redactSecrets?: boolean
|
|
55
22
|
/** Skip symbol extraction for faster scanning */
|
|
56
23
|
skipSymbols?: boolean
|
|
24
|
+
/** Glob patterns to include (e.g., ["src/**/*.ts", "lib/**/*.js"]) */
|
|
25
|
+
include?: Array<string>
|
|
26
|
+
/** Glob patterns to exclude (e.g., ["**/*.test.ts", "dist/**"]) */
|
|
27
|
+
exclude?: Array<string>
|
|
28
|
+
/** Include test files (default: false) */
|
|
29
|
+
includeTests?: boolean
|
|
30
|
+
/** Minimum security severity to block on: "critical", "high", "medium", "low" (default: "critical") */
|
|
31
|
+
securityThreshold?: string
|
|
32
|
+
/** Token budget for total output (0 = no limit). Files are included by importance until budget is reached. */
|
|
33
|
+
tokenBudget?: number
|
|
57
34
|
}
|
|
58
35
|
/** Statistics from scanning a repository */
|
|
59
36
|
export interface ScanStats {
|
|
@@ -83,6 +60,19 @@ export interface LanguageStat {
|
|
|
83
60
|
/** Percentage of codebase */
|
|
84
61
|
percentage: number
|
|
85
62
|
}
|
|
63
|
+
/** Options for scanning a repository */
|
|
64
|
+
export interface ScanOptions {
|
|
65
|
+
/** Target model for token counting (default: "claude") */
|
|
66
|
+
model?: string
|
|
67
|
+
/** Glob patterns to include (e.g., ["src/**/*.ts", "lib/**/*.js"]) */
|
|
68
|
+
include?: Array<string>
|
|
69
|
+
/** Glob patterns to exclude (e.g., ["**/*.test.ts", "dist/**"]) */
|
|
70
|
+
exclude?: Array<string>
|
|
71
|
+
/** Include test files (default: false) */
|
|
72
|
+
includeTests?: boolean
|
|
73
|
+
/** Apply default ignores for dist/, node_modules/, etc. (default: true) */
|
|
74
|
+
applyDefaultIgnores?: boolean
|
|
75
|
+
}
|
|
86
76
|
/**
|
|
87
77
|
* Pack a repository into optimized LLM context
|
|
88
78
|
*
|
|
@@ -95,7 +85,7 @@ export interface LanguageStat {
|
|
|
95
85
|
*
|
|
96
86
|
* # Example
|
|
97
87
|
* ```javascript
|
|
98
|
-
* const { pack } = require('
|
|
88
|
+
* const { pack } = require('infiniloom-node');
|
|
99
89
|
*
|
|
100
90
|
* const context = pack('./my-repo', {
|
|
101
91
|
* format: 'xml',
|
|
@@ -111,14 +101,14 @@ export declare function pack(path: string, options?: PackOptions | undefined | n
|
|
|
111
101
|
*
|
|
112
102
|
* # Arguments
|
|
113
103
|
* * `path` - Path to repository root
|
|
114
|
-
* * `model` - Optional target model (default: "claude")
|
|
104
|
+
* * `model` - Optional target model (default: "claude") - for backwards compatibility
|
|
115
105
|
*
|
|
116
106
|
* # Returns
|
|
117
107
|
* Repository statistics
|
|
118
108
|
*
|
|
119
109
|
* # Example
|
|
120
110
|
* ```javascript
|
|
121
|
-
* const { scan } = require('
|
|
111
|
+
* const { scan } = require('infiniloom-node');
|
|
122
112
|
*
|
|
123
113
|
* const stats = scan('./my-repo', 'claude');
|
|
124
114
|
* console.log(`Total files: ${stats.totalFiles}`);
|
|
@@ -126,6 +116,28 @@ export declare function pack(path: string, options?: PackOptions | undefined | n
|
|
|
126
116
|
* ```
|
|
127
117
|
*/
|
|
128
118
|
export declare function scan(path: string, model?: string | undefined | null): ScanStats
|
|
119
|
+
/**
|
|
120
|
+
* Scan a repository with full options
|
|
121
|
+
*
|
|
122
|
+
* # Arguments
|
|
123
|
+
* * `path` - Path to repository root
|
|
124
|
+
* * `options` - Scan options
|
|
125
|
+
*
|
|
126
|
+
* # Returns
|
|
127
|
+
* Repository statistics
|
|
128
|
+
*
|
|
129
|
+
* # Example
|
|
130
|
+
* ```javascript
|
|
131
|
+
* const { scanWithOptions } = require('infiniloom-node');
|
|
132
|
+
*
|
|
133
|
+
* const stats = scanWithOptions('./my-repo', {
|
|
134
|
+
* model: 'claude',
|
|
135
|
+
* exclude: ['dist/**', '**/*.test.ts'],
|
|
136
|
+
* applyDefaultIgnores: true
|
|
137
|
+
* });
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export declare function scanWithOptions(path: string, options?: ScanOptions | undefined | null): ScanStats
|
|
129
141
|
/**
|
|
130
142
|
* Count tokens in text for a specific model
|
|
131
143
|
*
|
|
@@ -138,7 +150,7 @@ export declare function scan(path: string, model?: string | undefined | null): S
|
|
|
138
150
|
*
|
|
139
151
|
* # Example
|
|
140
152
|
* ```javascript
|
|
141
|
-
* const { countTokens } = require('
|
|
153
|
+
* const { countTokens } = require('infiniloom-node');
|
|
142
154
|
*
|
|
143
155
|
* const count = countTokens('Hello, world!', 'claude');
|
|
144
156
|
* console.log(`Tokens: ${count}`);
|
|
@@ -161,7 +173,7 @@ export declare function countTokens(text: string, model?: string | undefined | n
|
|
|
161
173
|
*
|
|
162
174
|
* # Example
|
|
163
175
|
* ```javascript
|
|
164
|
-
* const { semanticCompress } = require('
|
|
176
|
+
* const { semanticCompress } = require('infiniloom-node');
|
|
165
177
|
*
|
|
166
178
|
* const compressed = semanticCompress(longText, 0.7, 0.3);
|
|
167
179
|
* ```
|
|
@@ -178,7 +190,7 @@ export declare function semanticCompress(text: string, similarityThreshold?: num
|
|
|
178
190
|
*
|
|
179
191
|
* # Example
|
|
180
192
|
* ```javascript
|
|
181
|
-
* const { isGitRepo } = require('
|
|
193
|
+
* const { isGitRepo } = require('infiniloom-node');
|
|
182
194
|
*
|
|
183
195
|
* if (isGitRepo('./my-project')) {
|
|
184
196
|
* console.log('This is a git repository');
|
|
@@ -234,6 +246,39 @@ export interface GitBlameLine {
|
|
|
234
246
|
/** Line number (1-indexed) */
|
|
235
247
|
lineNumber: number
|
|
236
248
|
}
|
|
249
|
+
/** Security finding information */
|
|
250
|
+
export interface SecurityFinding {
|
|
251
|
+
/** File where the finding was detected */
|
|
252
|
+
file: string
|
|
253
|
+
/** Line number (1-indexed) */
|
|
254
|
+
line: number
|
|
255
|
+
/** Severity level: "Critical", "High", "Medium", "Low", "Info" */
|
|
256
|
+
severity: string
|
|
257
|
+
/** Type of finding */
|
|
258
|
+
kind: string
|
|
259
|
+
/** Matched pattern */
|
|
260
|
+
pattern: string
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Scan a repository for security issues
|
|
264
|
+
*
|
|
265
|
+
* # Arguments
|
|
266
|
+
* * `path` - Path to repository root
|
|
267
|
+
*
|
|
268
|
+
* # Returns
|
|
269
|
+
* Array of security findings
|
|
270
|
+
*
|
|
271
|
+
* # Example
|
|
272
|
+
* ```javascript
|
|
273
|
+
* const { scanSecurity } = require('infiniloom-node');
|
|
274
|
+
*
|
|
275
|
+
* const findings = scanSecurity('./my-repo');
|
|
276
|
+
* for (const finding of findings) {
|
|
277
|
+
* console.log(`${finding.severity}: ${finding.kind} in ${finding.file}:${finding.line}`);
|
|
278
|
+
* }
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
export declare function scanSecurity(path: string): Array<SecurityFinding>
|
|
237
282
|
/** Infiniloom class for advanced usage */
|
|
238
283
|
export declare class Infiniloom {
|
|
239
284
|
/**
|
|
@@ -244,7 +289,7 @@ export declare class Infiniloom {
|
|
|
244
289
|
* * `model` - Optional model name (default: "claude")
|
|
245
290
|
*/
|
|
246
291
|
constructor(path: string, model?: string | undefined | null)
|
|
247
|
-
/** Get repository statistics */
|
|
292
|
+
/** Get repository statistics (Bug #4 fix - consistent with scan() function) */
|
|
248
293
|
getStats(): ScanStats
|
|
249
294
|
/**
|
|
250
295
|
* Generate a repository map
|
|
@@ -256,8 +301,10 @@ export declare class Infiniloom {
|
|
|
256
301
|
generateMap(budget?: number | undefined | null, maxSymbols?: number | undefined | null): string
|
|
257
302
|
/** Pack repository with specific options */
|
|
258
303
|
pack(options?: PackOptions | undefined | null): string
|
|
259
|
-
/** Check for security issues */
|
|
260
|
-
securityScan(): Array<
|
|
304
|
+
/** Check for security issues (Bug #8 fix - now returns structured findings) */
|
|
305
|
+
securityScan(): Array<SecurityFinding>
|
|
306
|
+
/** Check for security issues (legacy format, returns formatted strings) */
|
|
307
|
+
securityScanFormatted(): Array<string>
|
|
261
308
|
}
|
|
262
309
|
/**
|
|
263
310
|
* Git repository wrapper for Node.js
|
|
@@ -266,7 +313,7 @@ export declare class Infiniloom {
|
|
|
266
313
|
*
|
|
267
314
|
* # Example
|
|
268
315
|
* ```javascript
|
|
269
|
-
* const { GitRepo } = require('
|
|
316
|
+
* const { GitRepo } = require('infiniloom-node');
|
|
270
317
|
*
|
|
271
318
|
* const repo = new GitRepo('./my-project');
|
|
272
319
|
* console.log(`Branch: ${repo.currentBranch()}`);
|
package/index.js
CHANGED
|
@@ -37,7 +37,7 @@ switch (platform) {
|
|
|
37
37
|
if (localFileExisted) {
|
|
38
38
|
nativeBinding = require('./infiniloom.android-arm64.node')
|
|
39
39
|
} else {
|
|
40
|
-
nativeBinding = require('
|
|
40
|
+
nativeBinding = require('infiniloom-node-android-arm64')
|
|
41
41
|
}
|
|
42
42
|
} catch (e) {
|
|
43
43
|
loadError = e
|
|
@@ -49,7 +49,7 @@ switch (platform) {
|
|
|
49
49
|
if (localFileExisted) {
|
|
50
50
|
nativeBinding = require('./infiniloom.android-arm-eabi.node')
|
|
51
51
|
} else {
|
|
52
|
-
nativeBinding = require('
|
|
52
|
+
nativeBinding = require('infiniloom-node-android-arm-eabi')
|
|
53
53
|
}
|
|
54
54
|
} catch (e) {
|
|
55
55
|
loadError = e
|
|
@@ -69,7 +69,7 @@ switch (platform) {
|
|
|
69
69
|
if (localFileExisted) {
|
|
70
70
|
nativeBinding = require('./infiniloom.win32-x64-msvc.node')
|
|
71
71
|
} else {
|
|
72
|
-
nativeBinding = require('
|
|
72
|
+
nativeBinding = require('infiniloom-node-win32-x64-msvc')
|
|
73
73
|
}
|
|
74
74
|
} catch (e) {
|
|
75
75
|
loadError = e
|
|
@@ -83,7 +83,7 @@ switch (platform) {
|
|
|
83
83
|
if (localFileExisted) {
|
|
84
84
|
nativeBinding = require('./infiniloom.win32-ia32-msvc.node')
|
|
85
85
|
} else {
|
|
86
|
-
nativeBinding = require('
|
|
86
|
+
nativeBinding = require('infiniloom-node-win32-ia32-msvc')
|
|
87
87
|
}
|
|
88
88
|
} catch (e) {
|
|
89
89
|
loadError = e
|
|
@@ -97,7 +97,7 @@ switch (platform) {
|
|
|
97
97
|
if (localFileExisted) {
|
|
98
98
|
nativeBinding = require('./infiniloom.win32-arm64-msvc.node')
|
|
99
99
|
} else {
|
|
100
|
-
nativeBinding = require('
|
|
100
|
+
nativeBinding = require('infiniloom-node-win32-arm64-msvc')
|
|
101
101
|
}
|
|
102
102
|
} catch (e) {
|
|
103
103
|
loadError = e
|
|
@@ -113,7 +113,7 @@ switch (platform) {
|
|
|
113
113
|
if (localFileExisted) {
|
|
114
114
|
nativeBinding = require('./infiniloom.darwin-universal.node')
|
|
115
115
|
} else {
|
|
116
|
-
nativeBinding = require('
|
|
116
|
+
nativeBinding = require('infiniloom-node-darwin-universal')
|
|
117
117
|
}
|
|
118
118
|
break
|
|
119
119
|
} catch {}
|
|
@@ -124,7 +124,7 @@ switch (platform) {
|
|
|
124
124
|
if (localFileExisted) {
|
|
125
125
|
nativeBinding = require('./infiniloom.darwin-x64.node')
|
|
126
126
|
} else {
|
|
127
|
-
nativeBinding = require('
|
|
127
|
+
nativeBinding = require('infiniloom-node-darwin-x64')
|
|
128
128
|
}
|
|
129
129
|
} catch (e) {
|
|
130
130
|
loadError = e
|
|
@@ -138,7 +138,7 @@ switch (platform) {
|
|
|
138
138
|
if (localFileExisted) {
|
|
139
139
|
nativeBinding = require('./infiniloom.darwin-arm64.node')
|
|
140
140
|
} else {
|
|
141
|
-
nativeBinding = require('
|
|
141
|
+
nativeBinding = require('infiniloom-node-darwin-arm64')
|
|
142
142
|
}
|
|
143
143
|
} catch (e) {
|
|
144
144
|
loadError = e
|
|
@@ -157,7 +157,7 @@ switch (platform) {
|
|
|
157
157
|
if (localFileExisted) {
|
|
158
158
|
nativeBinding = require('./infiniloom.freebsd-x64.node')
|
|
159
159
|
} else {
|
|
160
|
-
nativeBinding = require('
|
|
160
|
+
nativeBinding = require('infiniloom-node-freebsd-x64')
|
|
161
161
|
}
|
|
162
162
|
} catch (e) {
|
|
163
163
|
loadError = e
|
|
@@ -174,7 +174,7 @@ switch (platform) {
|
|
|
174
174
|
if (localFileExisted) {
|
|
175
175
|
nativeBinding = require('./infiniloom.linux-x64-musl.node')
|
|
176
176
|
} else {
|
|
177
|
-
nativeBinding = require('
|
|
177
|
+
nativeBinding = require('infiniloom-node-linux-x64-musl')
|
|
178
178
|
}
|
|
179
179
|
} catch (e) {
|
|
180
180
|
loadError = e
|
|
@@ -187,7 +187,7 @@ switch (platform) {
|
|
|
187
187
|
if (localFileExisted) {
|
|
188
188
|
nativeBinding = require('./infiniloom.linux-x64-gnu.node')
|
|
189
189
|
} else {
|
|
190
|
-
nativeBinding = require('
|
|
190
|
+
nativeBinding = require('infiniloom-node-linux-x64-gnu')
|
|
191
191
|
}
|
|
192
192
|
} catch (e) {
|
|
193
193
|
loadError = e
|
|
@@ -203,7 +203,7 @@ switch (platform) {
|
|
|
203
203
|
if (localFileExisted) {
|
|
204
204
|
nativeBinding = require('./infiniloom.linux-arm64-musl.node')
|
|
205
205
|
} else {
|
|
206
|
-
nativeBinding = require('
|
|
206
|
+
nativeBinding = require('infiniloom-node-linux-arm64-musl')
|
|
207
207
|
}
|
|
208
208
|
} catch (e) {
|
|
209
209
|
loadError = e
|
|
@@ -216,7 +216,7 @@ switch (platform) {
|
|
|
216
216
|
if (localFileExisted) {
|
|
217
217
|
nativeBinding = require('./infiniloom.linux-arm64-gnu.node')
|
|
218
218
|
} else {
|
|
219
|
-
nativeBinding = require('
|
|
219
|
+
nativeBinding = require('infiniloom-node-linux-arm64-gnu')
|
|
220
220
|
}
|
|
221
221
|
} catch (e) {
|
|
222
222
|
loadError = e
|
|
@@ -232,7 +232,7 @@ switch (platform) {
|
|
|
232
232
|
if (localFileExisted) {
|
|
233
233
|
nativeBinding = require('./infiniloom.linux-arm-musleabihf.node')
|
|
234
234
|
} else {
|
|
235
|
-
nativeBinding = require('
|
|
235
|
+
nativeBinding = require('infiniloom-node-linux-arm-musleabihf')
|
|
236
236
|
}
|
|
237
237
|
} catch (e) {
|
|
238
238
|
loadError = e
|
|
@@ -245,7 +245,7 @@ switch (platform) {
|
|
|
245
245
|
if (localFileExisted) {
|
|
246
246
|
nativeBinding = require('./infiniloom.linux-arm-gnueabihf.node')
|
|
247
247
|
} else {
|
|
248
|
-
nativeBinding = require('
|
|
248
|
+
nativeBinding = require('infiniloom-node-linux-arm-gnueabihf')
|
|
249
249
|
}
|
|
250
250
|
} catch (e) {
|
|
251
251
|
loadError = e
|
|
@@ -261,7 +261,7 @@ switch (platform) {
|
|
|
261
261
|
if (localFileExisted) {
|
|
262
262
|
nativeBinding = require('./infiniloom.linux-riscv64-musl.node')
|
|
263
263
|
} else {
|
|
264
|
-
nativeBinding = require('
|
|
264
|
+
nativeBinding = require('infiniloom-node-linux-riscv64-musl')
|
|
265
265
|
}
|
|
266
266
|
} catch (e) {
|
|
267
267
|
loadError = e
|
|
@@ -274,7 +274,7 @@ switch (platform) {
|
|
|
274
274
|
if (localFileExisted) {
|
|
275
275
|
nativeBinding = require('./infiniloom.linux-riscv64-gnu.node')
|
|
276
276
|
} else {
|
|
277
|
-
nativeBinding = require('
|
|
277
|
+
nativeBinding = require('infiniloom-node-linux-riscv64-gnu')
|
|
278
278
|
}
|
|
279
279
|
} catch (e) {
|
|
280
280
|
loadError = e
|
|
@@ -289,7 +289,7 @@ switch (platform) {
|
|
|
289
289
|
if (localFileExisted) {
|
|
290
290
|
nativeBinding = require('./infiniloom.linux-s390x-gnu.node')
|
|
291
291
|
} else {
|
|
292
|
-
nativeBinding = require('
|
|
292
|
+
nativeBinding = require('infiniloom-node-linux-s390x-gnu')
|
|
293
293
|
}
|
|
294
294
|
} catch (e) {
|
|
295
295
|
loadError = e
|
|
@@ -310,10 +310,11 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { pack, scan, countTokens, Infiniloom, semanticCompress, isGitRepo, GitRepo, scanSecurity } = nativeBinding
|
|
313
|
+
const { pack, scan, scanWithOptions, countTokens, Infiniloom, semanticCompress, isGitRepo, GitRepo, scanSecurity } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.pack = pack
|
|
316
316
|
module.exports.scan = scan
|
|
317
|
+
module.exports.scanWithOptions = scanWithOptions
|
|
317
318
|
module.exports.countTokens = countTokens
|
|
318
319
|
module.exports.Infiniloom = Infiniloom
|
|
319
320
|
module.exports.semanticCompress = semanticCompress
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|