unity-agentic-tools 0.5.1 → 0.7.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 +59 -97
- package/dist/animator-utils.d.ts +46 -0
- package/dist/animator-utils.d.ts.map +1 -0
- package/dist/animator-utils.js +161 -0
- package/dist/animator-utils.js.map +1 -0
- package/dist/bridge-install.d.ts +16 -0
- package/dist/bridge-install.d.ts.map +1 -0
- package/dist/bridge-install.js +94 -0
- package/dist/bridge-install.js.map +1 -0
- package/dist/build-settings.d.ts +43 -0
- package/dist/build-settings.d.ts.map +1 -0
- package/dist/build-settings.js +196 -0
- package/dist/build-settings.js.map +1 -0
- package/dist/build-version.d.ts +40 -0
- package/dist/build-version.d.ts.map +1 -0
- package/dist/build-version.js +114 -0
- package/dist/build-version.js.map +1 -0
- package/dist/class-ids.d.ts +30 -0
- package/dist/class-ids.d.ts.map +1 -0
- package/dist/class-ids.js +322 -0
- package/dist/class-ids.js.map +1 -0
- package/dist/cleanup.d.ts +21 -0
- package/dist/cleanup.d.ts.map +1 -0
- package/dist/cleanup.js +161 -0
- package/dist/cleanup.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1060 -8137
- package/dist/cli.js.map +1 -0
- package/dist/editor-client.d.ts +25 -0
- package/dist/editor-client.d.ts.map +1 -0
- package/dist/editor-client.js +458 -0
- package/dist/editor-client.js.map +1 -0
- package/dist/editor-discovery.d.ts +17 -0
- package/dist/editor-discovery.d.ts.map +1 -0
- package/dist/editor-discovery.js +248 -0
- package/dist/editor-discovery.js.map +1 -0
- package/dist/editor-transport.d.ts +30 -0
- package/dist/editor-transport.d.ts.map +1 -0
- package/dist/editor-transport.js +175 -0
- package/dist/editor-transport.js.map +1 -0
- package/dist/gitignore.d.ts +3 -0
- package/dist/gitignore.d.ts.map +1 -0
- package/dist/gitignore.js +40 -0
- package/dist/gitignore.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +116 -8346
- package/dist/index.js.map +1 -0
- package/dist/loaded-protection.d.ts +6 -0
- package/dist/loaded-protection.d.ts.map +1 -0
- package/dist/loaded-protection.js +95 -0
- package/dist/loaded-protection.js.map +1 -0
- package/dist/packages.d.ts +55 -0
- package/dist/packages.d.ts.map +1 -0
- package/dist/packages.js +102 -0
- package/dist/packages.js.map +1 -0
- package/dist/params.d.ts +54 -0
- package/dist/params.d.ts.map +1 -0
- package/dist/params.js +106 -0
- package/dist/params.js.map +1 -0
- package/dist/types.d.ts +167 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/util.d.ts +2 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +7 -0
- package/dist/util.js.map +1 -0
- package/dist/utils.d.ts +82 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +291 -0
- package/dist/utils.js.map +1 -0
- package/package.json +10 -14
- package/dist/doc-indexer-cli.js +0 -3218
- package/native/index.d.ts +0 -335
- package/native/index.js +0 -330
- package/native/unity-file-tools.darwin-arm64.node +0 -0
- package/native/unity-file-tools.darwin-x64.node +0 -0
- package/native/unity-file-tools.linux-x64-gnu.node +0 -0
- package/native/unity-file-tools.win32-x64-msvc.node +0 -0
package/native/index.d.ts
DELETED
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
/* auto-generated by NAPI-RS */
|
|
5
|
-
|
|
6
|
-
/** Basic GameObject information */
|
|
7
|
-
export interface GameObject {
|
|
8
|
-
name: string
|
|
9
|
-
fileId: string
|
|
10
|
-
active: boolean
|
|
11
|
-
matchScore?: number | undefined
|
|
12
|
-
}
|
|
13
|
-
/** Component information */
|
|
14
|
-
export interface Component {
|
|
15
|
-
type: string
|
|
16
|
-
classId: number
|
|
17
|
-
fileId: string
|
|
18
|
-
scriptPath?: string | undefined
|
|
19
|
-
scriptGuid?: string | undefined
|
|
20
|
-
scriptName?: string | undefined
|
|
21
|
-
properties?: Record<string, any> | undefined
|
|
22
|
-
}
|
|
23
|
-
/** GameObject with detailed component information */
|
|
24
|
-
export interface GameObjectDetail {
|
|
25
|
-
name: string
|
|
26
|
-
fileId: string
|
|
27
|
-
active: boolean
|
|
28
|
-
tag: string
|
|
29
|
-
layer: number
|
|
30
|
-
depth?: number | undefined
|
|
31
|
-
components: Array<Component>
|
|
32
|
-
children?: string[] | undefined
|
|
33
|
-
parentTransformId?: string | undefined
|
|
34
|
-
}
|
|
35
|
-
/** PrefabInstance information */
|
|
36
|
-
export interface PrefabInstanceInfo {
|
|
37
|
-
name: string
|
|
38
|
-
fileId: string
|
|
39
|
-
sourceGuid: string
|
|
40
|
-
sourcePrefab?: string | undefined
|
|
41
|
-
modificationsCount: number
|
|
42
|
-
}
|
|
43
|
-
/** A single property override in a PrefabInstance */
|
|
44
|
-
export interface PrefabModification {
|
|
45
|
-
targetFileId: string
|
|
46
|
-
targetGuid?: string | undefined
|
|
47
|
-
propertyPath: string
|
|
48
|
-
value: string
|
|
49
|
-
objectReference?: string | undefined
|
|
50
|
-
}
|
|
51
|
-
/** Union result from find_by_name: either a GameObject or PrefabInstance */
|
|
52
|
-
export interface FindResult {
|
|
53
|
-
name: string
|
|
54
|
-
fileId: string
|
|
55
|
-
resultType: string
|
|
56
|
-
active?: boolean | undefined
|
|
57
|
-
matchScore?: number | undefined
|
|
58
|
-
sourceGuid?: string | undefined
|
|
59
|
-
sourcePrefab?: string | undefined
|
|
60
|
-
modificationsCount?: number | undefined
|
|
61
|
-
}
|
|
62
|
-
/** Full scene inspection result */
|
|
63
|
-
export interface SceneInspection {
|
|
64
|
-
file: string
|
|
65
|
-
count: number
|
|
66
|
-
gameobjects: Array<GameObjectDetail>
|
|
67
|
-
prefabInstances?: PrefabInstanceInfo[] | undefined
|
|
68
|
-
}
|
|
69
|
-
/** Options for scanning */
|
|
70
|
-
export interface ScanOptions {
|
|
71
|
-
verbose?: boolean | undefined
|
|
72
|
-
}
|
|
73
|
-
/** Options for inspecting */
|
|
74
|
-
export interface InspectOptions {
|
|
75
|
-
file: string
|
|
76
|
-
identifier?: string | undefined
|
|
77
|
-
includeProperties?: boolean | undefined
|
|
78
|
-
verbose?: boolean | undefined
|
|
79
|
-
}
|
|
80
|
-
/** Pagination options for inspect_all */
|
|
81
|
-
export interface PaginationOptions {
|
|
82
|
-
file: string
|
|
83
|
-
includeProperties?: boolean | undefined
|
|
84
|
-
verbose?: boolean | undefined
|
|
85
|
-
pageSize?: number | undefined
|
|
86
|
-
cursor?: number | undefined
|
|
87
|
-
maxDepth?: number | undefined
|
|
88
|
-
filterComponent?: string | undefined
|
|
89
|
-
}
|
|
90
|
-
/** Paginated inspection result */
|
|
91
|
-
export interface PaginatedInspection {
|
|
92
|
-
file: string
|
|
93
|
-
total: number
|
|
94
|
-
totalInScene: number
|
|
95
|
-
cursor: number
|
|
96
|
-
nextCursor?: number | undefined
|
|
97
|
-
truncated: boolean
|
|
98
|
-
pageSize: number
|
|
99
|
-
gameobjects: Array<GameObjectDetail>
|
|
100
|
-
prefabInstances?: PrefabInstanceInfo[] | undefined
|
|
101
|
-
error?: string | undefined
|
|
102
|
-
}
|
|
103
|
-
/** Chunk types for indexing */
|
|
104
|
-
export const enum ChunkType {
|
|
105
|
-
Prose = 'Prose',
|
|
106
|
-
Code = 'Code',
|
|
107
|
-
Api = 'Api',
|
|
108
|
-
Example = 'Example'
|
|
109
|
-
}
|
|
110
|
-
/** Chunk metadata */
|
|
111
|
-
export interface ChunkMetadata {
|
|
112
|
-
filePath: string
|
|
113
|
-
section?: string | undefined
|
|
114
|
-
language?: string | undefined
|
|
115
|
-
unityClass?: string | undefined
|
|
116
|
-
unityMethod?: string | undefined
|
|
117
|
-
}
|
|
118
|
-
/** A chunk of indexed content */
|
|
119
|
-
export interface Chunk {
|
|
120
|
-
id: string
|
|
121
|
-
content: string
|
|
122
|
-
tokens: number
|
|
123
|
-
type: ChunkType
|
|
124
|
-
metadata: ChunkMetadata
|
|
125
|
-
}
|
|
126
|
-
/** Result of indexing operation */
|
|
127
|
-
export interface IndexResult {
|
|
128
|
-
chunksIndexed: number
|
|
129
|
-
totalTokens: number
|
|
130
|
-
filesProcessed: number
|
|
131
|
-
elapsedMs: number
|
|
132
|
-
}
|
|
133
|
-
/** Search result from index */
|
|
134
|
-
export interface SearchResult {
|
|
135
|
-
id: string
|
|
136
|
-
content: string
|
|
137
|
-
score: number
|
|
138
|
-
metadata: ChunkMetadata
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Extract type names from a single .NET DLL.
|
|
142
|
-
*
|
|
143
|
-
* Returns public types with their name and namespace.
|
|
144
|
-
* GUID is always None for DLL types (they have no .meta files).
|
|
145
|
-
*/
|
|
146
|
-
export declare function extractDllTypes(path: string): Array<CSharpTypeRef>
|
|
147
|
-
/**
|
|
148
|
-
* Extract type info with fields from a single .NET DLL.
|
|
149
|
-
*
|
|
150
|
-
* Returns extended type info including serializable fields, base class,
|
|
151
|
-
* and struct/enum distinction via the Extends column.
|
|
152
|
-
*/
|
|
153
|
-
export declare function extractDllFields(path: string): Array<CSharpTypeInfo>
|
|
154
|
-
/** A serializable field extracted from a C# type. */
|
|
155
|
-
export interface CSharpFieldRef {
|
|
156
|
-
/** Field name (e.g., "health", "moveSpeed") */
|
|
157
|
-
name: string
|
|
158
|
-
/** C# type name (e.g., "int", "Vector3", "List<string>", "GameObject") */
|
|
159
|
-
typeName: string
|
|
160
|
-
/** Whether [SerializeField] attribute is present */
|
|
161
|
-
hasSerializeField: boolean
|
|
162
|
-
/** Whether [SerializeReference] attribute is present */
|
|
163
|
-
hasSerializeReference: boolean
|
|
164
|
-
/** Whether the field is public */
|
|
165
|
-
isPublic: boolean
|
|
166
|
-
/** Which type this field belongs to (e.g., "PlayerController") */
|
|
167
|
-
ownerType: string
|
|
168
|
-
}
|
|
169
|
-
/** Extended type info with fields and base class, extracted on demand. */
|
|
170
|
-
export interface CSharpTypeInfo {
|
|
171
|
-
/** Type name (e.g., "PlayerController") */
|
|
172
|
-
name: string
|
|
173
|
-
/** Kind: "class", "struct", "enum", or "interface" */
|
|
174
|
-
kind: string
|
|
175
|
-
/** Namespace (e.g., "UnityEngine.UI") */
|
|
176
|
-
namespace?: string
|
|
177
|
-
/** Base class (e.g., "MonoBehaviour", "ScriptableObject") */
|
|
178
|
-
baseClass?: string
|
|
179
|
-
/** Serializable fields */
|
|
180
|
-
fields: Array<CSharpFieldRef>
|
|
181
|
-
}
|
|
182
|
-
/** A C# type reference extracted from source or DLL. */
|
|
183
|
-
export interface CSharpTypeRef {
|
|
184
|
-
/** Type name (e.g., "PlayerController") */
|
|
185
|
-
name: string
|
|
186
|
-
/** Kind: "class", "struct", "enum", or "interface" */
|
|
187
|
-
kind: string
|
|
188
|
-
/** Namespace (e.g., "UnityEngine.UI") */
|
|
189
|
-
namespace?: string
|
|
190
|
-
/** Source file or DLL path (relative to project root) */
|
|
191
|
-
filePath: string
|
|
192
|
-
/** GUID from adjacent .meta file (None for DLL types) */
|
|
193
|
-
guid?: string
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Extract C# type declarations from a single .cs file.
|
|
197
|
-
*
|
|
198
|
-
* Returns all public/internal class, struct, enum, and interface declarations
|
|
199
|
-
* with their namespace context and the GUID from the adjacent .meta file.
|
|
200
|
-
*/
|
|
201
|
-
export declare function extractCsharpTypes(path: string): Array<CSharpTypeRef>
|
|
202
|
-
/**
|
|
203
|
-
* Build a type registry by scanning all .cs files in a Unity project.
|
|
204
|
-
*
|
|
205
|
-
* Scans Assets/ and optionally Library/PackageCache/ for .cs files,
|
|
206
|
-
* extracts type declarations, and returns them with GUID + namespace info.
|
|
207
|
-
* When include_packages is true, also scans Library/PackageCache/ and Packages/.
|
|
208
|
-
* When include_dlls is true, also extracts types from DLLs in Library/ScriptAssemblies/.
|
|
209
|
-
*/
|
|
210
|
-
export declare function buildTypeRegistry(projectRoot: string, includePackages?: boolean | undefined | null, includeDlls?: boolean | undefined | null): Array<CSharpTypeRef>
|
|
211
|
-
/**
|
|
212
|
-
* Extract serialized field info from a single C# source file.
|
|
213
|
-
*
|
|
214
|
-
* Returns extended type info with fields, base class, and serialization attributes.
|
|
215
|
-
* This is called on-demand during component creation, not during registry builds.
|
|
216
|
-
*/
|
|
217
|
-
export declare function extractSerializedFields(path: string): Array<CSharpTypeInfo>
|
|
218
|
-
/**
|
|
219
|
-
* Walk a Unity project and collect files matching the given extensions.
|
|
220
|
-
*
|
|
221
|
-
* Walks `Assets/` (and `ProjectSettings/` when `.asset` is among extensions).
|
|
222
|
-
* Skips standard Unity noise directories (Library, Temp, etc.).
|
|
223
|
-
*/
|
|
224
|
-
export declare function walkProjectFiles(projectPath: string, extensions: Array<string>, excludeDirs?: Array<string> | undefined | null): Array<string>
|
|
225
|
-
export interface NapiGrepOptions {
|
|
226
|
-
projectPath: string
|
|
227
|
-
pattern: string
|
|
228
|
-
fileType?: string
|
|
229
|
-
maxResults?: number
|
|
230
|
-
contextLines?: number
|
|
231
|
-
}
|
|
232
|
-
export interface NapiGrepMatch {
|
|
233
|
-
file: string
|
|
234
|
-
lineNumber: number
|
|
235
|
-
line: string
|
|
236
|
-
contextBefore?: Array<string>
|
|
237
|
-
contextAfter?: Array<string>
|
|
238
|
-
}
|
|
239
|
-
export interface NapiGrepResult {
|
|
240
|
-
success: boolean
|
|
241
|
-
projectPath: string
|
|
242
|
-
pattern: string
|
|
243
|
-
totalFilesScanned: number
|
|
244
|
-
totalMatches: number
|
|
245
|
-
truncated: boolean
|
|
246
|
-
matches: Array<NapiGrepMatch>
|
|
247
|
-
error?: string
|
|
248
|
-
}
|
|
249
|
-
/** Grep across Unity project files in parallel using Rayon. */
|
|
250
|
-
export declare function grepProject(options: NapiGrepOptions): NapiGrepResult
|
|
251
|
-
/**
|
|
252
|
-
* Build the GUID cache by scanning all .meta files under Assets/ in parallel.
|
|
253
|
-
*
|
|
254
|
-
* Returns a JSON object mapping `{ guid: relative_asset_path }`.
|
|
255
|
-
*/
|
|
256
|
-
export declare function buildGuidCache(projectRoot: string): any
|
|
257
|
-
/**
|
|
258
|
-
* Build a GUID cache for Library/PackageCache/ contents.
|
|
259
|
-
*
|
|
260
|
-
* Scans `Library/PackageCache/` for `.meta` files and returns
|
|
261
|
-
* `{ guid: relative_path }` just like `build_guid_cache` does for Assets/.
|
|
262
|
-
* Returns a separate cache so project assets and package assets stay distinct.
|
|
263
|
-
*/
|
|
264
|
-
export declare function buildPackageGuidCache(projectRoot: string): any
|
|
265
|
-
/**
|
|
266
|
-
* Build a GUID cache for Packages/ directory (local/embedded packages).
|
|
267
|
-
*
|
|
268
|
-
* Local packages referenced via "file:" in manifest.json live in Packages/
|
|
269
|
-
* and are not indexed by build_guid_cache (Assets/) or
|
|
270
|
-
* build_package_guid_cache (Library/PackageCache/).
|
|
271
|
-
*/
|
|
272
|
-
export declare function buildLocalPackageGuidCache(projectRoot: string): any
|
|
273
|
-
/** Get the version of the native module */
|
|
274
|
-
export declare function getVersion(): string
|
|
275
|
-
/** Check if the native module is available */
|
|
276
|
-
export declare function isNativeAvailable(): boolean
|
|
277
|
-
/** High-performance Unity scene/prefab scanner */
|
|
278
|
-
export declare class Scanner {
|
|
279
|
-
constructor()
|
|
280
|
-
/** Add a hierarchy provider class ID (Transform-like components). */
|
|
281
|
-
addHierarchyProvider(classId: number): void
|
|
282
|
-
/** Add a script container class ID (MonoBehaviour-like components). */
|
|
283
|
-
addScriptContainer(classId: number): void
|
|
284
|
-
/** Set project root for GUID resolution */
|
|
285
|
-
setProjectRoot(path: string): void
|
|
286
|
-
/** Scan scene for basic GameObject information */
|
|
287
|
-
scanSceneMinimal(file: string): Array<GameObject>
|
|
288
|
-
/** Scan scene with component information */
|
|
289
|
-
scanSceneWithComponents(file: string, options?: ScanOptions | undefined | null): Array<any>
|
|
290
|
-
/**
|
|
291
|
-
* Scan scene for GO metadata (name, tag, layer) without component/hierarchy extraction.
|
|
292
|
-
* This is the "medium path" — faster than scan_scene_with_components for tag/layer filtering.
|
|
293
|
-
*/
|
|
294
|
-
scanSceneMetadata(file: string): Array<any>
|
|
295
|
-
/** Find GameObjects and PrefabInstances by name pattern */
|
|
296
|
-
findByName(file: string, pattern: string, fuzzy: boolean): Array<FindResult>
|
|
297
|
-
/** Inspect a specific GameObject */
|
|
298
|
-
inspect(options: InspectOptions): any | null
|
|
299
|
-
/** Inspect entire file */
|
|
300
|
-
inspectAll(file: string, includeProperties: boolean, verbose: boolean): SceneInspection
|
|
301
|
-
/** Inspect entire file with pagination support */
|
|
302
|
-
inspectAllPaginated(options: PaginationOptions): PaginatedInspection
|
|
303
|
-
/**
|
|
304
|
-
* Read a .asset file and return its root objects with properties.
|
|
305
|
-
* When `decode_mesh` is true (default), Mesh assets (class 43) get their
|
|
306
|
-
* hex vertex/index data decoded into structured arrays.
|
|
307
|
-
*/
|
|
308
|
-
readAsset(file: string, decodeMesh?: boolean | undefined | null): any
|
|
309
|
-
}
|
|
310
|
-
/** High-performance documentation indexer */
|
|
311
|
-
export declare class Indexer {
|
|
312
|
-
constructor()
|
|
313
|
-
/** Index a single file */
|
|
314
|
-
indexFile(path: string): IndexResult
|
|
315
|
-
/** Index a directory of files */
|
|
316
|
-
indexDirectory(path: string): IndexResult
|
|
317
|
-
/** Search the index */
|
|
318
|
-
search(query: string): Array<SearchResult>
|
|
319
|
-
/** Clear the index */
|
|
320
|
-
clear(): void
|
|
321
|
-
/** Get index statistics */
|
|
322
|
-
stats(): any
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Local CPU embedding generator using all-MiniLM-L6-v2 (384 dims).
|
|
326
|
-
* Wraps fastembed-rs / ONNX Runtime. Model auto-downloads on first use
|
|
327
|
-
* and is cached at ~/.claude/unity-agentic-tools/models/.
|
|
328
|
-
*/
|
|
329
|
-
export declare class EmbeddingGenerator {
|
|
330
|
-
constructor()
|
|
331
|
-
/** Generate embedding for a single text. Returns a Vec<f64> (384 dims). */
|
|
332
|
-
generate(text: string): Array<number>
|
|
333
|
-
/** Generate embeddings for a batch of texts. Returns Vec<Vec<f64>>. */
|
|
334
|
-
generateBatch(texts: Array<string>): Array<Array<number>>
|
|
335
|
-
}
|
package/native/index.js
DELETED
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/* prettier-ignore */
|
|
4
|
-
|
|
5
|
-
/* auto-generated by NAPI-RS */
|
|
6
|
-
|
|
7
|
-
const { existsSync, readFileSync } = require('fs')
|
|
8
|
-
const { join } = require('path')
|
|
9
|
-
|
|
10
|
-
const { platform, arch } = process
|
|
11
|
-
|
|
12
|
-
let nativeBinding = null
|
|
13
|
-
let localFileExisted = false
|
|
14
|
-
let loadError = null
|
|
15
|
-
|
|
16
|
-
function isMusl() {
|
|
17
|
-
// For Node 10
|
|
18
|
-
if (!process.report || typeof process.report.getReport !== 'function') {
|
|
19
|
-
try {
|
|
20
|
-
const lddPath = require('child_process').execSync('which ldd').toString().trim()
|
|
21
|
-
return readFileSync(lddPath, 'utf8').includes('musl')
|
|
22
|
-
} catch (e) {
|
|
23
|
-
return true
|
|
24
|
-
}
|
|
25
|
-
} else {
|
|
26
|
-
const { glibcVersionRuntime } = process.report.getReport().header
|
|
27
|
-
return !glibcVersionRuntime
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
switch (platform) {
|
|
32
|
-
case 'android':
|
|
33
|
-
switch (arch) {
|
|
34
|
-
case 'arm64':
|
|
35
|
-
localFileExisted = existsSync(join(__dirname, 'unity-file-tools.android-arm64.node'))
|
|
36
|
-
try {
|
|
37
|
-
if (localFileExisted) {
|
|
38
|
-
nativeBinding = require('./unity-file-tools.android-arm64.node')
|
|
39
|
-
} else {
|
|
40
|
-
nativeBinding = require('unity-file-tools-android-arm64')
|
|
41
|
-
}
|
|
42
|
-
} catch (e) {
|
|
43
|
-
loadError = e
|
|
44
|
-
}
|
|
45
|
-
break
|
|
46
|
-
case 'arm':
|
|
47
|
-
localFileExisted = existsSync(join(__dirname, 'unity-file-tools.android-arm-eabi.node'))
|
|
48
|
-
try {
|
|
49
|
-
if (localFileExisted) {
|
|
50
|
-
nativeBinding = require('./unity-file-tools.android-arm-eabi.node')
|
|
51
|
-
} else {
|
|
52
|
-
nativeBinding = require('unity-file-tools-android-arm-eabi')
|
|
53
|
-
}
|
|
54
|
-
} catch (e) {
|
|
55
|
-
loadError = e
|
|
56
|
-
}
|
|
57
|
-
break
|
|
58
|
-
default:
|
|
59
|
-
throw new Error(`Unsupported architecture on Android ${arch}`)
|
|
60
|
-
}
|
|
61
|
-
break
|
|
62
|
-
case 'win32':
|
|
63
|
-
switch (arch) {
|
|
64
|
-
case 'x64':
|
|
65
|
-
localFileExisted = existsSync(
|
|
66
|
-
join(__dirname, 'unity-file-tools.win32-x64-msvc.node')
|
|
67
|
-
)
|
|
68
|
-
try {
|
|
69
|
-
if (localFileExisted) {
|
|
70
|
-
nativeBinding = require('./unity-file-tools.win32-x64-msvc.node')
|
|
71
|
-
} else {
|
|
72
|
-
nativeBinding = require('unity-file-tools-win32-x64-msvc')
|
|
73
|
-
}
|
|
74
|
-
} catch (e) {
|
|
75
|
-
loadError = e
|
|
76
|
-
}
|
|
77
|
-
break
|
|
78
|
-
case 'ia32':
|
|
79
|
-
localFileExisted = existsSync(
|
|
80
|
-
join(__dirname, 'unity-file-tools.win32-ia32-msvc.node')
|
|
81
|
-
)
|
|
82
|
-
try {
|
|
83
|
-
if (localFileExisted) {
|
|
84
|
-
nativeBinding = require('./unity-file-tools.win32-ia32-msvc.node')
|
|
85
|
-
} else {
|
|
86
|
-
nativeBinding = require('unity-file-tools-win32-ia32-msvc')
|
|
87
|
-
}
|
|
88
|
-
} catch (e) {
|
|
89
|
-
loadError = e
|
|
90
|
-
}
|
|
91
|
-
break
|
|
92
|
-
case 'arm64':
|
|
93
|
-
localFileExisted = existsSync(
|
|
94
|
-
join(__dirname, 'unity-file-tools.win32-arm64-msvc.node')
|
|
95
|
-
)
|
|
96
|
-
try {
|
|
97
|
-
if (localFileExisted) {
|
|
98
|
-
nativeBinding = require('./unity-file-tools.win32-arm64-msvc.node')
|
|
99
|
-
} else {
|
|
100
|
-
nativeBinding = require('unity-file-tools-win32-arm64-msvc')
|
|
101
|
-
}
|
|
102
|
-
} catch (e) {
|
|
103
|
-
loadError = e
|
|
104
|
-
}
|
|
105
|
-
break
|
|
106
|
-
default:
|
|
107
|
-
throw new Error(`Unsupported architecture on Windows: ${arch}`)
|
|
108
|
-
}
|
|
109
|
-
break
|
|
110
|
-
case 'darwin':
|
|
111
|
-
localFileExisted = existsSync(join(__dirname, 'unity-file-tools.darwin-universal.node'))
|
|
112
|
-
try {
|
|
113
|
-
if (localFileExisted) {
|
|
114
|
-
nativeBinding = require('./unity-file-tools.darwin-universal.node')
|
|
115
|
-
} else {
|
|
116
|
-
nativeBinding = require('unity-file-tools-darwin-universal')
|
|
117
|
-
}
|
|
118
|
-
break
|
|
119
|
-
} catch {}
|
|
120
|
-
switch (arch) {
|
|
121
|
-
case 'x64':
|
|
122
|
-
localFileExisted = existsSync(join(__dirname, 'unity-file-tools.darwin-x64.node'))
|
|
123
|
-
try {
|
|
124
|
-
if (localFileExisted) {
|
|
125
|
-
nativeBinding = require('./unity-file-tools.darwin-x64.node')
|
|
126
|
-
} else {
|
|
127
|
-
nativeBinding = require('unity-file-tools-darwin-x64')
|
|
128
|
-
}
|
|
129
|
-
} catch (e) {
|
|
130
|
-
loadError = e
|
|
131
|
-
}
|
|
132
|
-
break
|
|
133
|
-
case 'arm64':
|
|
134
|
-
localFileExisted = existsSync(
|
|
135
|
-
join(__dirname, 'unity-file-tools.darwin-arm64.node')
|
|
136
|
-
)
|
|
137
|
-
try {
|
|
138
|
-
if (localFileExisted) {
|
|
139
|
-
nativeBinding = require('./unity-file-tools.darwin-arm64.node')
|
|
140
|
-
} else {
|
|
141
|
-
nativeBinding = require('unity-file-tools-darwin-arm64')
|
|
142
|
-
}
|
|
143
|
-
} catch (e) {
|
|
144
|
-
loadError = e
|
|
145
|
-
}
|
|
146
|
-
break
|
|
147
|
-
default:
|
|
148
|
-
throw new Error(`Unsupported architecture on macOS: ${arch}`)
|
|
149
|
-
}
|
|
150
|
-
break
|
|
151
|
-
case 'freebsd':
|
|
152
|
-
if (arch !== 'x64') {
|
|
153
|
-
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
|
|
154
|
-
}
|
|
155
|
-
localFileExisted = existsSync(join(__dirname, 'unity-file-tools.freebsd-x64.node'))
|
|
156
|
-
try {
|
|
157
|
-
if (localFileExisted) {
|
|
158
|
-
nativeBinding = require('./unity-file-tools.freebsd-x64.node')
|
|
159
|
-
} else {
|
|
160
|
-
nativeBinding = require('unity-file-tools-freebsd-x64')
|
|
161
|
-
}
|
|
162
|
-
} catch (e) {
|
|
163
|
-
loadError = e
|
|
164
|
-
}
|
|
165
|
-
break
|
|
166
|
-
case 'linux':
|
|
167
|
-
switch (arch) {
|
|
168
|
-
case 'x64':
|
|
169
|
-
if (isMusl()) {
|
|
170
|
-
localFileExisted = existsSync(
|
|
171
|
-
join(__dirname, 'unity-file-tools.linux-x64-musl.node')
|
|
172
|
-
)
|
|
173
|
-
try {
|
|
174
|
-
if (localFileExisted) {
|
|
175
|
-
nativeBinding = require('./unity-file-tools.linux-x64-musl.node')
|
|
176
|
-
} else {
|
|
177
|
-
nativeBinding = require('unity-file-tools-linux-x64-musl')
|
|
178
|
-
}
|
|
179
|
-
} catch (e) {
|
|
180
|
-
loadError = e
|
|
181
|
-
}
|
|
182
|
-
} else {
|
|
183
|
-
localFileExisted = existsSync(
|
|
184
|
-
join(__dirname, 'unity-file-tools.linux-x64-gnu.node')
|
|
185
|
-
)
|
|
186
|
-
try {
|
|
187
|
-
if (localFileExisted) {
|
|
188
|
-
nativeBinding = require('./unity-file-tools.linux-x64-gnu.node')
|
|
189
|
-
} else {
|
|
190
|
-
nativeBinding = require('unity-file-tools-linux-x64-gnu')
|
|
191
|
-
}
|
|
192
|
-
} catch (e) {
|
|
193
|
-
loadError = e
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
break
|
|
197
|
-
case 'arm64':
|
|
198
|
-
if (isMusl()) {
|
|
199
|
-
localFileExisted = existsSync(
|
|
200
|
-
join(__dirname, 'unity-file-tools.linux-arm64-musl.node')
|
|
201
|
-
)
|
|
202
|
-
try {
|
|
203
|
-
if (localFileExisted) {
|
|
204
|
-
nativeBinding = require('./unity-file-tools.linux-arm64-musl.node')
|
|
205
|
-
} else {
|
|
206
|
-
nativeBinding = require('unity-file-tools-linux-arm64-musl')
|
|
207
|
-
}
|
|
208
|
-
} catch (e) {
|
|
209
|
-
loadError = e
|
|
210
|
-
}
|
|
211
|
-
} else {
|
|
212
|
-
localFileExisted = existsSync(
|
|
213
|
-
join(__dirname, 'unity-file-tools.linux-arm64-gnu.node')
|
|
214
|
-
)
|
|
215
|
-
try {
|
|
216
|
-
if (localFileExisted) {
|
|
217
|
-
nativeBinding = require('./unity-file-tools.linux-arm64-gnu.node')
|
|
218
|
-
} else {
|
|
219
|
-
nativeBinding = require('unity-file-tools-linux-arm64-gnu')
|
|
220
|
-
}
|
|
221
|
-
} catch (e) {
|
|
222
|
-
loadError = e
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
break
|
|
226
|
-
case 'arm':
|
|
227
|
-
if (isMusl()) {
|
|
228
|
-
localFileExisted = existsSync(
|
|
229
|
-
join(__dirname, 'unity-file-tools.linux-arm-musleabihf.node')
|
|
230
|
-
)
|
|
231
|
-
try {
|
|
232
|
-
if (localFileExisted) {
|
|
233
|
-
nativeBinding = require('./unity-file-tools.linux-arm-musleabihf.node')
|
|
234
|
-
} else {
|
|
235
|
-
nativeBinding = require('unity-file-tools-linux-arm-musleabihf')
|
|
236
|
-
}
|
|
237
|
-
} catch (e) {
|
|
238
|
-
loadError = e
|
|
239
|
-
}
|
|
240
|
-
} else {
|
|
241
|
-
localFileExisted = existsSync(
|
|
242
|
-
join(__dirname, 'unity-file-tools.linux-arm-gnueabihf.node')
|
|
243
|
-
)
|
|
244
|
-
try {
|
|
245
|
-
if (localFileExisted) {
|
|
246
|
-
nativeBinding = require('./unity-file-tools.linux-arm-gnueabihf.node')
|
|
247
|
-
} else {
|
|
248
|
-
nativeBinding = require('unity-file-tools-linux-arm-gnueabihf')
|
|
249
|
-
}
|
|
250
|
-
} catch (e) {
|
|
251
|
-
loadError = e
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
break
|
|
255
|
-
case 'riscv64':
|
|
256
|
-
if (isMusl()) {
|
|
257
|
-
localFileExisted = existsSync(
|
|
258
|
-
join(__dirname, 'unity-file-tools.linux-riscv64-musl.node')
|
|
259
|
-
)
|
|
260
|
-
try {
|
|
261
|
-
if (localFileExisted) {
|
|
262
|
-
nativeBinding = require('./unity-file-tools.linux-riscv64-musl.node')
|
|
263
|
-
} else {
|
|
264
|
-
nativeBinding = require('unity-file-tools-linux-riscv64-musl')
|
|
265
|
-
}
|
|
266
|
-
} catch (e) {
|
|
267
|
-
loadError = e
|
|
268
|
-
}
|
|
269
|
-
} else {
|
|
270
|
-
localFileExisted = existsSync(
|
|
271
|
-
join(__dirname, 'unity-file-tools.linux-riscv64-gnu.node')
|
|
272
|
-
)
|
|
273
|
-
try {
|
|
274
|
-
if (localFileExisted) {
|
|
275
|
-
nativeBinding = require('./unity-file-tools.linux-riscv64-gnu.node')
|
|
276
|
-
} else {
|
|
277
|
-
nativeBinding = require('unity-file-tools-linux-riscv64-gnu')
|
|
278
|
-
}
|
|
279
|
-
} catch (e) {
|
|
280
|
-
loadError = e
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
break
|
|
284
|
-
case 's390x':
|
|
285
|
-
localFileExisted = existsSync(
|
|
286
|
-
join(__dirname, 'unity-file-tools.linux-s390x-gnu.node')
|
|
287
|
-
)
|
|
288
|
-
try {
|
|
289
|
-
if (localFileExisted) {
|
|
290
|
-
nativeBinding = require('./unity-file-tools.linux-s390x-gnu.node')
|
|
291
|
-
} else {
|
|
292
|
-
nativeBinding = require('unity-file-tools-linux-s390x-gnu')
|
|
293
|
-
}
|
|
294
|
-
} catch (e) {
|
|
295
|
-
loadError = e
|
|
296
|
-
}
|
|
297
|
-
break
|
|
298
|
-
default:
|
|
299
|
-
throw new Error(`Unsupported architecture on Linux: ${arch}`)
|
|
300
|
-
}
|
|
301
|
-
break
|
|
302
|
-
default:
|
|
303
|
-
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
if (!nativeBinding) {
|
|
307
|
-
if (loadError) {
|
|
308
|
-
throw loadError
|
|
309
|
-
}
|
|
310
|
-
throw new Error(`Failed to load native binding`)
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
const { ChunkType, extractDllTypes, extractDllFields, extractCsharpTypes, buildTypeRegistry, extractSerializedFields, Scanner, Indexer, EmbeddingGenerator, walkProjectFiles, grepProject, buildGuidCache, buildPackageGuidCache, buildLocalPackageGuidCache, getVersion, isNativeAvailable } = nativeBinding
|
|
314
|
-
|
|
315
|
-
module.exports.ChunkType = ChunkType
|
|
316
|
-
module.exports.extractDllTypes = extractDllTypes
|
|
317
|
-
module.exports.extractDllFields = extractDllFields
|
|
318
|
-
module.exports.extractCsharpTypes = extractCsharpTypes
|
|
319
|
-
module.exports.buildTypeRegistry = buildTypeRegistry
|
|
320
|
-
module.exports.extractSerializedFields = extractSerializedFields
|
|
321
|
-
module.exports.Scanner = Scanner
|
|
322
|
-
module.exports.Indexer = Indexer
|
|
323
|
-
module.exports.EmbeddingGenerator = EmbeddingGenerator
|
|
324
|
-
module.exports.walkProjectFiles = walkProjectFiles
|
|
325
|
-
module.exports.grepProject = grepProject
|
|
326
|
-
module.exports.buildGuidCache = buildGuidCache
|
|
327
|
-
module.exports.buildPackageGuidCache = buildPackageGuidCache
|
|
328
|
-
module.exports.buildLocalPackageGuidCache = buildLocalPackageGuidCache
|
|
329
|
-
module.exports.getVersion = getVersion
|
|
330
|
-
module.exports.isNativeAvailable = isNativeAvailable
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|