@shapeshift-labs/frontier-lang-compiler 0.2.8 → 0.2.9
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 +67 -0
- package/bench/smoke.mjs +29 -1
- package/dist/index.d.ts +242 -0
- package/dist/index.js +1049 -32
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,6 +50,73 @@ console.log(summary.categories);
|
|
|
50
50
|
console.log(readiness.readiness);
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
Ask the compiler what is actually covered before sending native imports into a merge queue:
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
import {
|
|
57
|
+
createNativeImportCoverageMatrix,
|
|
58
|
+
importNativeSource
|
|
59
|
+
} from '@shapeshift-labs/frontier-lang-compiler';
|
|
60
|
+
|
|
61
|
+
const imported = importNativeSource({
|
|
62
|
+
language: 'python',
|
|
63
|
+
sourcePath: 'todo.py',
|
|
64
|
+
sourceText: 'def add_todo(title):\n return title\n'
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const matrix = createNativeImportCoverageMatrix({ imports: [imported] });
|
|
68
|
+
const python = matrix.languages.find((entry) => entry.language === 'python');
|
|
69
|
+
|
|
70
|
+
console.log(python.imports.readiness); // scanner imports are intentionally review-required
|
|
71
|
+
console.log(python.parserAdapters); // host-owned exact parsers such as LibCST can be injected
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Create a compact semantic sidecar for swarm merge admission. This is the artifact a coordinator can index instead of reading a worker directory by hand:
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
import {
|
|
78
|
+
createSemanticImportSidecar,
|
|
79
|
+
importNativeSource
|
|
80
|
+
} from '@shapeshift-labs/frontier-lang-compiler';
|
|
81
|
+
|
|
82
|
+
const imported = importNativeSource({
|
|
83
|
+
language: 'typescript',
|
|
84
|
+
sourcePath: 'src/runtime.ts',
|
|
85
|
+
sourceText: `
|
|
86
|
+
export class Runtime {
|
|
87
|
+
step(frame: number) { return frame + 1; }
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const sidecar = createSemanticImportSidecar(imported);
|
|
93
|
+
|
|
94
|
+
console.log(sidecar.summary.emptySemanticIndex); // false when symbols were found
|
|
95
|
+
console.log(sidecar.ownershipRegions[0].key); // source#src/runtime.ts#class#Runtime
|
|
96
|
+
console.log(sidecar.patchHints[0].supportedOperations); // source-region patch operations
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Project a native import back to source. Exact source is preserved only when the supplied text matches the import hash; otherwise the compiler emits declaration stubs with review-required loss evidence:
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
import {
|
|
103
|
+
importNativeSource,
|
|
104
|
+
projectNativeImportToSource
|
|
105
|
+
} from '@shapeshift-labs/frontier-lang-compiler';
|
|
106
|
+
|
|
107
|
+
const sourceText = 'export function step(frame) { return frame + 1; }\n';
|
|
108
|
+
const imported = importNativeSource({
|
|
109
|
+
language: 'javascript',
|
|
110
|
+
sourcePath: 'src/runtime.js',
|
|
111
|
+
sourceText
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const projection = projectNativeImportToSource(imported, { sourceText });
|
|
115
|
+
|
|
116
|
+
console.log(projection.mode); // "preserved-source"
|
|
117
|
+
console.log(projection.readiness.readiness); // "ready"
|
|
118
|
+
```
|
|
119
|
+
|
|
53
120
|
Use injected parser adapters when a real language parser is available but should not become a compiler runtime dependency:
|
|
54
121
|
|
|
55
122
|
```js
|
package/bench/smoke.mjs
CHANGED
|
@@ -2,7 +2,10 @@ import { performance } from 'node:perf_hooks';
|
|
|
2
2
|
import {
|
|
3
3
|
compileFrontierSource,
|
|
4
4
|
createEstreeNativeImporterAdapter,
|
|
5
|
+
createNativeImportCoverageMatrix,
|
|
6
|
+
createSemanticImportSidecar,
|
|
5
7
|
importNativeSource,
|
|
8
|
+
projectNativeImportToSource,
|
|
6
9
|
runNativeImporterAdapter
|
|
7
10
|
} from '../dist/index.js';
|
|
8
11
|
|
|
@@ -32,6 +35,7 @@ const compileDurationMs = performance.now() - start;
|
|
|
32
35
|
const importStart = performance.now();
|
|
33
36
|
const estreeAdapter = createEstreeNativeImporterAdapter();
|
|
34
37
|
let nativeSymbols = 0;
|
|
38
|
+
const nativeImportResults = [];
|
|
35
39
|
for (let index = 0; index < 150; index += 1) {
|
|
36
40
|
const imported = index % 2 === 0
|
|
37
41
|
? importNativeSource({
|
|
@@ -55,14 +59,38 @@ for (let index = 0; index < 150; index += 1) {
|
|
|
55
59
|
}
|
|
56
60
|
});
|
|
57
61
|
nativeSymbols += imported.semanticIndex?.symbols?.length ?? 0;
|
|
62
|
+
nativeImportResults.push(imported);
|
|
58
63
|
}
|
|
59
64
|
const importDurationMs = performance.now() - importStart;
|
|
60
65
|
|
|
66
|
+
const matrixStart = performance.now();
|
|
67
|
+
const coverageMatrix = createNativeImportCoverageMatrix({ imports: nativeImportResults });
|
|
68
|
+
const matrixDurationMs = performance.now() - matrixStart;
|
|
69
|
+
|
|
70
|
+
const sidecarStart = performance.now();
|
|
71
|
+
const semanticSidecars = nativeImportResults.map((imported) => createSemanticImportSidecar(imported));
|
|
72
|
+
const sidecarDurationMs = performance.now() - sidecarStart;
|
|
73
|
+
const sidecarOwnershipRegions = semanticSidecars.reduce((sum, sidecar) => sum + sidecar.ownershipRegions.length, 0);
|
|
74
|
+
|
|
75
|
+
const projectionStart = performance.now();
|
|
76
|
+
const nativeProjections = nativeImportResults.map((imported) => projectNativeImportToSource(imported));
|
|
77
|
+
const projectionDurationMs = performance.now() - projectionStart;
|
|
78
|
+
const projectionBytes = nativeProjections.reduce((sum, projection) => sum + projection.sourceText.length, 0);
|
|
79
|
+
|
|
61
80
|
console.log(JSON.stringify({
|
|
62
81
|
compiles: 250,
|
|
63
82
|
bytes,
|
|
64
83
|
compileDurationMs: Number(compileDurationMs.toFixed(2)),
|
|
65
84
|
nativeImports: 150,
|
|
66
85
|
nativeSymbols,
|
|
67
|
-
nativeImportDurationMs: Number(importDurationMs.toFixed(2))
|
|
86
|
+
nativeImportDurationMs: Number(importDurationMs.toFixed(2)),
|
|
87
|
+
coverageMatrixLanguages: coverageMatrix.summary.languages,
|
|
88
|
+
coverageMatrixImports: coverageMatrix.summary.imports,
|
|
89
|
+
coverageMatrixDurationMs: Number(matrixDurationMs.toFixed(2)),
|
|
90
|
+
semanticSidecars: semanticSidecars.length,
|
|
91
|
+
sidecarOwnershipRegions,
|
|
92
|
+
sidecarDurationMs: Number(sidecarDurationMs.toFixed(2)),
|
|
93
|
+
nativeProjections: nativeProjections.length,
|
|
94
|
+
projectionBytes,
|
|
95
|
+
projectionDurationMs: Number(projectionDurationMs.toFixed(2))
|
|
68
96
|
}));
|
package/dist/index.d.ts
CHANGED
|
@@ -135,6 +135,193 @@ export interface NativeImportReadinessClassification {
|
|
|
135
135
|
readonly summary: NativeImportLossSummary;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
export interface NativeImportLanguageProfile {
|
|
139
|
+
readonly language: FrontierSourceLanguage;
|
|
140
|
+
readonly aliases: readonly string[];
|
|
141
|
+
readonly extensions: readonly string[];
|
|
142
|
+
readonly supportsLightweightScan: boolean;
|
|
143
|
+
readonly parserAdapters: readonly string[];
|
|
144
|
+
readonly projectionTargets: readonly FrontierCompileTarget[];
|
|
145
|
+
readonly knownLossKinds: readonly NativeImportKnownLossKind[];
|
|
146
|
+
readonly defaultReadiness: SemanticMergeReadiness;
|
|
147
|
+
readonly notes: readonly string[];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface NativeImportCoverageLanguage {
|
|
151
|
+
readonly language: FrontierSourceLanguage;
|
|
152
|
+
readonly aliases: readonly string[];
|
|
153
|
+
readonly extensions: readonly string[];
|
|
154
|
+
readonly supportsLightweightScan: boolean;
|
|
155
|
+
readonly parserAdapters: readonly string[];
|
|
156
|
+
readonly projectionTargets: readonly FrontierCompileTarget[];
|
|
157
|
+
readonly knownLossKinds: readonly NativeImportKnownLossKind[];
|
|
158
|
+
readonly defaultReadiness: SemanticMergeReadiness;
|
|
159
|
+
readonly notes: readonly string[];
|
|
160
|
+
readonly imports: {
|
|
161
|
+
readonly total: number;
|
|
162
|
+
readonly parsers: readonly string[];
|
|
163
|
+
readonly readiness: SemanticMergeReadiness;
|
|
164
|
+
readonly readinessReasons: readonly string[];
|
|
165
|
+
readonly symbols: number;
|
|
166
|
+
readonly sourceMaps: number;
|
|
167
|
+
readonly sourceMapMappings: number;
|
|
168
|
+
readonly losses: number;
|
|
169
|
+
readonly lossKinds: Readonly<Record<string, number>>;
|
|
170
|
+
readonly lossCategories: readonly NativeImportTaxonomyKind[];
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface NativeImportCoverageMatrix {
|
|
175
|
+
readonly kind: 'frontier.lang.nativeImportCoverageMatrix';
|
|
176
|
+
readonly version: 1;
|
|
177
|
+
readonly generatedAt: number;
|
|
178
|
+
readonly languages: readonly NativeImportCoverageLanguage[];
|
|
179
|
+
readonly summary: {
|
|
180
|
+
readonly languages: number;
|
|
181
|
+
readonly lightweightScanners: number;
|
|
182
|
+
readonly parserAdapterSlots: number;
|
|
183
|
+
readonly imports: number;
|
|
184
|
+
readonly symbols: number;
|
|
185
|
+
readonly sourceMaps: number;
|
|
186
|
+
readonly sourceMapMappings: number;
|
|
187
|
+
readonly losses: number;
|
|
188
|
+
readonly byReadiness: Readonly<Record<string, number>>;
|
|
189
|
+
readonly lossKinds: Readonly<Record<string, number>>;
|
|
190
|
+
};
|
|
191
|
+
readonly metadata: {
|
|
192
|
+
readonly compileTargets: readonly FrontierCompileTarget[];
|
|
193
|
+
readonly note: string;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface NativeImportCoverageMatrixOptions {
|
|
198
|
+
readonly languages?: readonly NativeImportLanguageProfile[];
|
|
199
|
+
readonly imports?: readonly NativeSourceImportResult[];
|
|
200
|
+
readonly adapters?: readonly NativeImporterAdapter[];
|
|
201
|
+
readonly generatedAt?: number;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface SemanticImportOwnershipRegion {
|
|
205
|
+
readonly id: string;
|
|
206
|
+
readonly key: string;
|
|
207
|
+
readonly granularity: 'symbol' | string;
|
|
208
|
+
readonly language?: FrontierSourceLanguage | string;
|
|
209
|
+
readonly sourcePath?: string;
|
|
210
|
+
readonly sourceHash?: string;
|
|
211
|
+
readonly symbolId?: string;
|
|
212
|
+
readonly symbolName?: string;
|
|
213
|
+
readonly symbolKind?: string;
|
|
214
|
+
readonly nativeAstNodeId?: string;
|
|
215
|
+
readonly sourceSpan?: SourceSpan;
|
|
216
|
+
readonly precision?: 'exact' | 'declaration' | 'line' | 'estimated' | 'unknown' | string;
|
|
217
|
+
readonly mergePolicy?: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface SemanticImportSidecarSymbol {
|
|
221
|
+
readonly id: string;
|
|
222
|
+
readonly name?: string;
|
|
223
|
+
readonly kind?: string;
|
|
224
|
+
readonly language?: FrontierSourceLanguage | string;
|
|
225
|
+
readonly nativeAstNodeId?: string;
|
|
226
|
+
readonly semanticOccurrenceId?: string;
|
|
227
|
+
readonly sourceMapMappingId?: string;
|
|
228
|
+
readonly sourceSpan?: SourceSpan;
|
|
229
|
+
readonly signatureHash?: string;
|
|
230
|
+
readonly ownershipRegionId: string;
|
|
231
|
+
readonly ownershipKey: string;
|
|
232
|
+
readonly readiness: SemanticMergeReadiness;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface SemanticImportPatchHint {
|
|
236
|
+
readonly id: string;
|
|
237
|
+
readonly kind: 'source-region-patch' | string;
|
|
238
|
+
readonly ownershipRegionId: string;
|
|
239
|
+
readonly ownershipKey: string;
|
|
240
|
+
readonly sourcePath?: string;
|
|
241
|
+
readonly sourceHash?: string;
|
|
242
|
+
readonly sourceSpan?: SourceSpan;
|
|
243
|
+
readonly readiness: SemanticMergeReadiness;
|
|
244
|
+
readonly precision?: string;
|
|
245
|
+
readonly supportedOperations: readonly string[];
|
|
246
|
+
readonly projection: {
|
|
247
|
+
readonly sourceLanguage?: FrontierSourceLanguage | string;
|
|
248
|
+
readonly targetPath?: string;
|
|
249
|
+
readonly requiresSourceMap: boolean;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface SemanticImportSidecarImportEntry {
|
|
254
|
+
readonly id: string;
|
|
255
|
+
readonly language?: FrontierSourceLanguage | string;
|
|
256
|
+
readonly sourcePath?: string;
|
|
257
|
+
readonly sourceHash?: string;
|
|
258
|
+
readonly parser?: string;
|
|
259
|
+
readonly nativeSourceId?: string;
|
|
260
|
+
readonly nativeAstId?: string;
|
|
261
|
+
readonly semanticIndexId?: string;
|
|
262
|
+
readonly universalAstId?: string;
|
|
263
|
+
readonly symbolCount: number;
|
|
264
|
+
readonly sourceMapCount: number;
|
|
265
|
+
readonly sourceMapMappingCount: number;
|
|
266
|
+
readonly readiness: SemanticMergeReadiness;
|
|
267
|
+
readonly emptySemanticIndex: boolean;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface SemanticImportSidecar {
|
|
271
|
+
readonly kind: 'frontier.lang.semanticImportSidecar';
|
|
272
|
+
readonly version: 1;
|
|
273
|
+
readonly id: string;
|
|
274
|
+
readonly generatedAt: number;
|
|
275
|
+
readonly language?: FrontierSourceLanguage | 'mixed' | string;
|
|
276
|
+
readonly projectRoot?: string;
|
|
277
|
+
readonly imports: readonly SemanticImportSidecarImportEntry[];
|
|
278
|
+
readonly symbols: readonly SemanticImportSidecarSymbol[];
|
|
279
|
+
readonly ownershipRegions: readonly SemanticImportOwnershipRegion[];
|
|
280
|
+
readonly sourceMaps: {
|
|
281
|
+
readonly total: number;
|
|
282
|
+
readonly mappings: number;
|
|
283
|
+
readonly ids: readonly string[];
|
|
284
|
+
};
|
|
285
|
+
readonly patchHints: readonly SemanticImportPatchHint[];
|
|
286
|
+
readonly mergeCandidates: readonly {
|
|
287
|
+
readonly id?: string;
|
|
288
|
+
readonly readiness?: SemanticMergeReadiness;
|
|
289
|
+
readonly reasons: readonly string[];
|
|
290
|
+
readonly risk?: string;
|
|
291
|
+
readonly operationCount: number;
|
|
292
|
+
}[];
|
|
293
|
+
readonly losses: {
|
|
294
|
+
readonly total: number;
|
|
295
|
+
readonly byKind: Readonly<Record<string, number>>;
|
|
296
|
+
readonly bySeverity: Readonly<Record<string, number>>;
|
|
297
|
+
readonly categories: readonly NativeImportTaxonomyKind[];
|
|
298
|
+
readonly blockingLossIds: readonly string[];
|
|
299
|
+
readonly reviewLossIds: readonly string[];
|
|
300
|
+
};
|
|
301
|
+
readonly evidence: {
|
|
302
|
+
readonly total: number;
|
|
303
|
+
readonly failed: readonly string[];
|
|
304
|
+
readonly ids: readonly string[];
|
|
305
|
+
};
|
|
306
|
+
readonly summary: {
|
|
307
|
+
readonly imports: number;
|
|
308
|
+
readonly symbols: number;
|
|
309
|
+
readonly ownershipRegions: number;
|
|
310
|
+
readonly sourceMapMappings: number;
|
|
311
|
+
readonly readiness: SemanticMergeReadiness;
|
|
312
|
+
readonly emptySemanticIndex: boolean;
|
|
313
|
+
};
|
|
314
|
+
readonly metadata?: Record<string, unknown>;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface SemanticImportSidecarOptions {
|
|
318
|
+
readonly id?: string;
|
|
319
|
+
readonly generatedAt?: number;
|
|
320
|
+
readonly regionPrefix?: string;
|
|
321
|
+
readonly targetPath?: string;
|
|
322
|
+
readonly metadata?: Record<string, unknown>;
|
|
323
|
+
}
|
|
324
|
+
|
|
138
325
|
export interface NativeImporterAdapterDiagnostic {
|
|
139
326
|
readonly id?: string;
|
|
140
327
|
readonly severity?: 'info' | 'warning' | 'error';
|
|
@@ -343,10 +530,62 @@ export interface NativeProjectImportResult {
|
|
|
343
530
|
readonly metadata?: Record<string, unknown>;
|
|
344
531
|
}
|
|
345
532
|
|
|
533
|
+
export type NativeSourceProjectionMode = 'preserved-source' | 'native-source-stubs';
|
|
534
|
+
|
|
535
|
+
export interface ProjectNativeImportToSourceOptions {
|
|
536
|
+
readonly id?: string;
|
|
537
|
+
readonly language?: FrontierSourceLanguage | string;
|
|
538
|
+
readonly sourcePath?: string;
|
|
539
|
+
readonly expectedSourceHash?: string;
|
|
540
|
+
readonly sourceText?: string;
|
|
541
|
+
readonly preservedSourceText?: string;
|
|
542
|
+
readonly exactSourceText?: string;
|
|
543
|
+
readonly sourceHash?: string;
|
|
544
|
+
readonly verifySourceHash?: boolean;
|
|
545
|
+
readonly preferPreservedSource?: boolean;
|
|
546
|
+
readonly stubBanner?: string | false;
|
|
547
|
+
readonly evidenceId?: string;
|
|
548
|
+
readonly parser?: string;
|
|
549
|
+
readonly semanticStatus?: string;
|
|
550
|
+
readonly nativeSource?: NativeSourceNode;
|
|
551
|
+
readonly nativeAst?: NativeAstRecord;
|
|
552
|
+
readonly semanticIndex?: SemanticIndexRecord;
|
|
553
|
+
readonly metadata?: Record<string, unknown>;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
export interface NativeSourceProjectionDeclaration {
|
|
557
|
+
readonly name: string;
|
|
558
|
+
readonly kind: string;
|
|
559
|
+
readonly symbolId?: string;
|
|
560
|
+
readonly nativeAstNodeId?: string;
|
|
561
|
+
readonly sourceSpan?: SourceSpan;
|
|
562
|
+
readonly ownershipRegionId?: string;
|
|
563
|
+
readonly metadata?: Record<string, unknown>;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export interface NativeSourceProjectionResult {
|
|
567
|
+
readonly kind: 'frontier.lang.nativeSourceProjection';
|
|
568
|
+
readonly version: 1;
|
|
569
|
+
readonly id: string;
|
|
570
|
+
readonly language: FrontierSourceLanguage | string;
|
|
571
|
+
readonly sourcePath?: string;
|
|
572
|
+
readonly sourceHash?: string;
|
|
573
|
+
readonly mode: NativeSourceProjectionMode;
|
|
574
|
+
readonly sourceText: string;
|
|
575
|
+
readonly outputHash: string;
|
|
576
|
+
readonly declarations: readonly NativeSourceProjectionDeclaration[];
|
|
577
|
+
readonly losses: readonly NativeAstLossRecord[];
|
|
578
|
+
readonly lossSummary: NativeImportLossSummary;
|
|
579
|
+
readonly readiness: NativeImportReadinessClassification;
|
|
580
|
+
readonly evidence: readonly EvidenceRecord[];
|
|
581
|
+
readonly metadata: Record<string, unknown>;
|
|
582
|
+
}
|
|
583
|
+
|
|
346
584
|
export declare const FrontierCompileTargets: readonly FrontierCompileTarget[];
|
|
347
585
|
export declare const NativeImportTaxonomyKinds: readonly NativeImportTaxonomyKind[];
|
|
348
586
|
export declare const NativeImportLossKinds: readonly NativeImportKnownLossKind[];
|
|
349
587
|
export declare const NativeImportReadinessBySeverity: Readonly<Record<NativeImportLossSummary['highestSeverity'], SemanticMergeReadiness>>;
|
|
588
|
+
export declare const NativeImportLanguageProfiles: readonly NativeImportLanguageProfile[];
|
|
350
589
|
export declare function normalizeCompileTarget(target?: string): FrontierCompileTarget;
|
|
351
590
|
export declare function compileFrontierSource(source: string, options?: FrontierCompileOptions): FrontierCompileResult;
|
|
352
591
|
export declare function compileFrontierDocument(document: FrontierLangDocument, options?: FrontierCompileOptions): FrontierCompileResult;
|
|
@@ -355,11 +594,14 @@ export declare function renderTargetAst(ast: FrontierTargetAst, target?: Frontie
|
|
|
355
594
|
export declare function resolveCapabilityAdapters(document: FrontierLangDocument, target?: FrontierCompileOptions['target'], options?: { readonly platform?: string }): readonly CapabilityResolution[];
|
|
356
595
|
export declare function summarizeNativeImportLosses(losses?: readonly NativeAstLossRecord[], options?: NativeImportLossSummaryOptions): NativeImportLossSummary;
|
|
357
596
|
export declare function classifyNativeImportReadiness(losses?: readonly NativeAstLossRecord[], options?: NativeImportLossSummaryOptions): NativeImportReadinessClassification;
|
|
597
|
+
export declare function createNativeImportCoverageMatrix(options?: NativeImportCoverageMatrixOptions): NativeImportCoverageMatrix;
|
|
598
|
+
export declare function createSemanticImportSidecar(importResult: NativeSourceImportResult | NativeProjectImportResult, options?: SemanticImportSidecarOptions): SemanticImportSidecar;
|
|
358
599
|
export declare function createEstreeNativeImporterAdapter(options?: JavaScriptNativeImporterAdapterOptions): NativeImporterAdapter;
|
|
359
600
|
export declare function createBabelNativeImporterAdapter(options?: JavaScriptNativeImporterAdapterOptions): NativeImporterAdapter;
|
|
360
601
|
export declare function createTypeScriptCompilerNativeImporterAdapter(options?: TypeScriptCompilerNativeImporterAdapterOptions): NativeImporterAdapter;
|
|
361
602
|
export declare function createTreeSitterNativeImporterAdapter(options?: TreeSitterNativeImporterAdapterOptions): NativeImporterAdapter;
|
|
362
603
|
export declare function runNativeImporterAdapter(adapter: NativeImporterAdapter, input: RunNativeImporterAdapterOptions): Promise<NativeImporterAdapterImportResult>;
|
|
604
|
+
export declare function projectNativeImportToSource(importResult: NativeSourceImportResult | NativeProjectImportResult, options?: ProjectNativeImportToSourceOptions): NativeSourceProjectionResult;
|
|
363
605
|
export declare function importNativeSource(input: ImportNativeSourceOptions): NativeSourceImportResult;
|
|
364
606
|
export declare function importNativeProject(input: ImportNativeProjectOptions): Promise<NativeProjectImportResult>;
|
|
365
607
|
export declare function createUniversalAstFromDocument(document: FrontierLangDocument, input?: {
|