@flightdev/bundler-turboflight 0.1.1 → 0.2.1
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 +417 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +64 -68
- package/LICENSE +0 -21
package/README.md
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
# @flightdev/bundler-turboflight
|
|
2
|
+
|
|
3
|
+
High-performance native bundler adapter for Flight Framework. Provides Rust-powered bundling via NAPI bindings with support for React Server Components, Fast Refresh, Lazy Compilation, and Module Federation.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Quick Start](#quick-start)
|
|
9
|
+
- [Features](#features)
|
|
10
|
+
- [API Reference](#api-reference)
|
|
11
|
+
- [Configuration](#configuration)
|
|
12
|
+
- [Advanced Usage](#advanced-usage)
|
|
13
|
+
- [Troubleshooting](#troubleshooting)
|
|
14
|
+
- [License](#license)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @flightdev/bundler-turboflight
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or with pnpm/yarn:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pnpm add @flightdev/bundler-turboflight
|
|
28
|
+
# or
|
|
29
|
+
yarn add @flightdev/bundler-turboflight
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Platform Requirements
|
|
33
|
+
|
|
34
|
+
Native bindings are available for:
|
|
35
|
+
|
|
36
|
+
| Platform | Architecture | Package |
|
|
37
|
+
|----------|--------------|---------|
|
|
38
|
+
| Windows | x64 | `@turboflight/native-win32-x64-msvc` |
|
|
39
|
+
| macOS | ARM64 | `@turboflight/native-darwin-arm64` |
|
|
40
|
+
| macOS | x64 | `@turboflight/native-darwin-x64` |
|
|
41
|
+
| Linux | x64 | `@turboflight/native-linux-x64-gnu` |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
### Basic Usage
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { turboflight } from '@flightdev/bundler-turboflight';
|
|
51
|
+
|
|
52
|
+
// Create bundler adapter
|
|
53
|
+
const bundler = turboflight({
|
|
54
|
+
debug: false,
|
|
55
|
+
format: 'esm',
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Use with Flight Framework
|
|
59
|
+
export default defineConfig({
|
|
60
|
+
bundler: bundler,
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Standalone Build
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { turboflight } from '@flightdev/bundler-turboflight';
|
|
68
|
+
|
|
69
|
+
const bundler = turboflight();
|
|
70
|
+
|
|
71
|
+
const result = await bundler.build({
|
|
72
|
+
entry: ['src/index.ts'],
|
|
73
|
+
outDir: 'dist',
|
|
74
|
+
minify: true,
|
|
75
|
+
sourcemap: true,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
console.log(`Built ${result.moduleCount} modules in ${result.duration}ms`);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Features
|
|
84
|
+
|
|
85
|
+
### Core Bundling
|
|
86
|
+
|
|
87
|
+
- Tree-shaking with ES module analysis
|
|
88
|
+
- Code splitting (automatic and manual)
|
|
89
|
+
- Source map generation
|
|
90
|
+
- Minification via SWC
|
|
91
|
+
- Path alias resolution
|
|
92
|
+
- External module handling
|
|
93
|
+
|
|
94
|
+
### React Server Components (RSC)
|
|
95
|
+
|
|
96
|
+
Full support for the React Server Components architecture:
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { rscDetectDirective, rscAnalyzeBoundary } from '@flightdev/bundler-turboflight';
|
|
100
|
+
|
|
101
|
+
// Detect 'use client' or 'use server' directives
|
|
102
|
+
const directive = rscDetectDirective(sourceCode);
|
|
103
|
+
// { directive: 'client', isValid: true, line: 1 }
|
|
104
|
+
|
|
105
|
+
// Analyze component boundaries
|
|
106
|
+
const boundary = rscAnalyzeBoundary(filePath, sourceCode);
|
|
107
|
+
// { boundaryType: 'client', clientRefs: [...], serverOnlyImports: [...] }
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### React Fast Refresh
|
|
111
|
+
|
|
112
|
+
Hot module replacement with state preservation:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import {
|
|
116
|
+
refreshExtractSignatures,
|
|
117
|
+
refreshGeneratePreamble,
|
|
118
|
+
refreshGenerateRegistration
|
|
119
|
+
} from '@flightdev/bundler-turboflight';
|
|
120
|
+
|
|
121
|
+
// Extract component signatures
|
|
122
|
+
const signatures = refreshExtractSignatures('Button.tsx', code);
|
|
123
|
+
|
|
124
|
+
// Generate refresh runtime
|
|
125
|
+
const preamble = refreshGeneratePreamble();
|
|
126
|
+
const registration = refreshGenerateRegistration(signatures, moduleId);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Lazy Compilation
|
|
130
|
+
|
|
131
|
+
On-demand module compilation for faster development:
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { LazyRegistry, lazyGeneratePlaceholder } from '@flightdev/bundler-turboflight';
|
|
135
|
+
|
|
136
|
+
// Create registry
|
|
137
|
+
const registry = new LazyRegistry();
|
|
138
|
+
registry.register('./src/heavy-component.tsx');
|
|
139
|
+
|
|
140
|
+
// Generate placeholder for lazy loading
|
|
141
|
+
const placeholder = lazyGeneratePlaceholder(
|
|
142
|
+
'./src/heavy-component.tsx',
|
|
143
|
+
'http://localhost:5173'
|
|
144
|
+
);
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Module Federation 2.0
|
|
148
|
+
|
|
149
|
+
Share code between independent applications:
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
import { federationInit, federationGenerateRuntime } from '@flightdev/bundler-turboflight';
|
|
153
|
+
|
|
154
|
+
const manifest = federationInit({
|
|
155
|
+
name: 'host',
|
|
156
|
+
remotes: {
|
|
157
|
+
remote1: 'http://localhost:3001/remoteEntry.js',
|
|
158
|
+
},
|
|
159
|
+
exposes: {
|
|
160
|
+
'./Button': './src/components/Button.tsx',
|
|
161
|
+
},
|
|
162
|
+
shared: [
|
|
163
|
+
{ name: 'react', singleton: true },
|
|
164
|
+
{ name: 'react-dom', singleton: true },
|
|
165
|
+
],
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
const runtime = federationGenerateRuntime(manifest);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Incremental Builds
|
|
172
|
+
|
|
173
|
+
Cache compiled modules for faster rebuilds:
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
import { BuildCache, incrementalHash } from '@flightdev/bundler-turboflight';
|
|
177
|
+
|
|
178
|
+
const cache = new BuildCache();
|
|
179
|
+
|
|
180
|
+
// Check cache
|
|
181
|
+
const hash = incrementalHash(sourceCode);
|
|
182
|
+
const cached = cache.get(filePath, hash);
|
|
183
|
+
|
|
184
|
+
if (!cached) {
|
|
185
|
+
// Compile and cache
|
|
186
|
+
const compiled = await compile(sourceCode);
|
|
187
|
+
cache.set({
|
|
188
|
+
path: filePath,
|
|
189
|
+
hash,
|
|
190
|
+
code: compiled,
|
|
191
|
+
timestamp: Date.now(),
|
|
192
|
+
dependencies: deps,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// View statistics
|
|
197
|
+
const stats = cache.stats();
|
|
198
|
+
console.log(`Cache hit ratio: ${(stats.hitRatio * 100).toFixed(1)}%`);
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## API Reference
|
|
204
|
+
|
|
205
|
+
### Bundler Adapter
|
|
206
|
+
|
|
207
|
+
```typescript
|
|
208
|
+
function turboflight(options?: TurboflightOptions): BundlerAdapter;
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
| Option | Type | Default | Description |
|
|
212
|
+
|--------|------|---------|-------------|
|
|
213
|
+
| `debug` | `boolean` | `false` | Enable debug logging |
|
|
214
|
+
| `external` | `string[]` | `[]` | Modules to exclude from bundle |
|
|
215
|
+
| `alias` | `Record<string, string>` | `{}` | Path aliases |
|
|
216
|
+
| `format` | `'esm' \| 'cjs' \| 'iife'` | `'esm'` | Output format |
|
|
217
|
+
| `entry` | `string[]` | - | Entry points |
|
|
218
|
+
|
|
219
|
+
### Transform
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
function transform(
|
|
223
|
+
filename: string,
|
|
224
|
+
code: string,
|
|
225
|
+
options?: { target?: string; sourcemap?: boolean }
|
|
226
|
+
): TransformResult;
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Transform a single file using SWC.
|
|
230
|
+
|
|
231
|
+
### Resolve
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
function resolve(
|
|
235
|
+
specifier: string,
|
|
236
|
+
from: string,
|
|
237
|
+
options?: { root?: string; external?: string[] }
|
|
238
|
+
): ResolveResult;
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Resolve module specifiers with Node.js resolution algorithm.
|
|
242
|
+
|
|
243
|
+
### Analyze
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
function analyze(filename: string, code: string): ModuleAnalysis;
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Parse and analyze a module's imports, exports, and characteristics.
|
|
250
|
+
|
|
251
|
+
### Version
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
function version(): string;
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Returns the Turboflight version.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Configuration
|
|
262
|
+
|
|
263
|
+
### With Flight Config
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
// flight.config.ts
|
|
267
|
+
import { defineConfig } from '@flightdev/core';
|
|
268
|
+
import { turboflight } from '@flightdev/bundler-turboflight';
|
|
269
|
+
|
|
270
|
+
export default defineConfig({
|
|
271
|
+
bundler: turboflight({
|
|
272
|
+
debug: process.env.DEBUG === 'true',
|
|
273
|
+
external: ['fsevents'],
|
|
274
|
+
alias: {
|
|
275
|
+
'@': './src',
|
|
276
|
+
'@components': './src/components',
|
|
277
|
+
},
|
|
278
|
+
}),
|
|
279
|
+
|
|
280
|
+
build: {
|
|
281
|
+
minify: true,
|
|
282
|
+
sourcemap: true,
|
|
283
|
+
},
|
|
284
|
+
});
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Environment Variables
|
|
288
|
+
|
|
289
|
+
| Variable | Description |
|
|
290
|
+
|----------|-------------|
|
|
291
|
+
| `TURBOFLIGHT_LOG` | Log level: trace, debug, info, warn, error |
|
|
292
|
+
| `TURBOFLIGHT_CACHE_DIR` | Custom cache directory |
|
|
293
|
+
| `TURBOFLIGHT_WORKERS` | Number of worker threads |
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Advanced Usage
|
|
298
|
+
|
|
299
|
+
### Custom RSC Processing
|
|
300
|
+
|
|
301
|
+
```typescript
|
|
302
|
+
import {
|
|
303
|
+
rscDetectDirective,
|
|
304
|
+
rscAnalyzeBoundary,
|
|
305
|
+
rscFlightChunk,
|
|
306
|
+
rscCreateActionManifest
|
|
307
|
+
} from '@flightdev/bundler-turboflight';
|
|
308
|
+
|
|
309
|
+
// Process server components
|
|
310
|
+
async function processRSC(files: string[]) {
|
|
311
|
+
const serverActions = [];
|
|
312
|
+
|
|
313
|
+
for (const file of files) {
|
|
314
|
+
const code = await fs.readFile(file, 'utf-8');
|
|
315
|
+
const directive = rscDetectDirective(code);
|
|
316
|
+
|
|
317
|
+
if (directive.directive === 'server') {
|
|
318
|
+
const boundary = rscAnalyzeBoundary(file, code);
|
|
319
|
+
// Process server-only imports
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Generate action manifest
|
|
324
|
+
const manifest = rscCreateActionManifest(serverActions);
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Custom Error Overlay
|
|
329
|
+
|
|
330
|
+
```typescript
|
|
331
|
+
import { refreshGenerateOverlay } from '@flightdev/bundler-turboflight';
|
|
332
|
+
|
|
333
|
+
// Generate overlay with custom position
|
|
334
|
+
const overlay = refreshGenerateOverlay('bottom-left');
|
|
335
|
+
// Positions: 'bottom-right', 'bottom-left', 'top-right', 'top-left', 'center'
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Change Detection
|
|
339
|
+
|
|
340
|
+
```typescript
|
|
341
|
+
import { incrementalDetectChanges } from '@flightdev/bundler-turboflight';
|
|
342
|
+
|
|
343
|
+
const changes = incrementalDetectChanges(
|
|
344
|
+
previousHashes, // { 'file.ts': 'abc123' }
|
|
345
|
+
currentHashes // { 'file.ts': 'def456' }
|
|
346
|
+
);
|
|
347
|
+
|
|
348
|
+
console.log('Changed files:', changes.direct);
|
|
349
|
+
console.log('Affected dependents:', changes.transitive);
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## Troubleshooting
|
|
355
|
+
|
|
356
|
+
### Native Binding Not Found
|
|
357
|
+
|
|
358
|
+
Ensure the correct platform package is installed:
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
npm install @turboflight/native-win32-x64-msvc # Windows
|
|
362
|
+
npm install @turboflight/native-darwin-arm64 # macOS ARM
|
|
363
|
+
npm install @turboflight/native-darwin-x64 # macOS Intel
|
|
364
|
+
npm install @turboflight/native-linux-x64-gnu # Linux
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Build Performance
|
|
368
|
+
|
|
369
|
+
For large projects, enable incremental builds:
|
|
370
|
+
|
|
371
|
+
```typescript
|
|
372
|
+
const bundler = turboflight({
|
|
373
|
+
incremental: true,
|
|
374
|
+
cacheDir: '.turboflight-cache',
|
|
375
|
+
});
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Memory Issues
|
|
379
|
+
|
|
380
|
+
Increase Node.js memory limit:
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
NODE_OPTIONS="--max-old-space-size=8192" flight build
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Debug Mode
|
|
387
|
+
|
|
388
|
+
Enable verbose logging:
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
TURBOFLIGHT_LOG=debug flight dev
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Or in code:
|
|
395
|
+
|
|
396
|
+
```typescript
|
|
397
|
+
const bundler = turboflight({ debug: true });
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Comparison
|
|
403
|
+
|
|
404
|
+
| Feature | Turboflight | esbuild | Vite | Webpack |
|
|
405
|
+
|---------|-------------|---------|------|---------|
|
|
406
|
+
| Language | Rust | Go | JS | JS |
|
|
407
|
+
| RSC Support | Yes | No | No | Plugin |
|
|
408
|
+
| Fast Refresh | Yes | No | Yes | Plugin |
|
|
409
|
+
| Module Federation | Yes | No | No | Yes |
|
|
410
|
+
| Lazy Compilation | Yes | No | Yes | Yes |
|
|
411
|
+
| Incremental | Yes | Limited | Yes | Yes |
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## License
|
|
416
|
+
|
|
417
|
+
MIT
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EACR,cAAc,EAIjB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts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AAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,qBAAqB,CAGvB;AAED;;GAEG;AACH,wBAAgB,OAAO,CACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAC9C,mBAAmB,CAGrB;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAG5E;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAGhC;AAED,eAAe,WAAW,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AASzC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AASzC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,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
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"build:native": "cd ../turboflight && npm run build",
|
|
66
|
-
"dev": "tsc --watch",
|
|
67
|
-
"clean": "rimraf dist"
|
|
68
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@flightdev/bundler-turboflight",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Turboflight bundler adapter for Flight Framework",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"native"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"build:native": "cd ../turboflight && npm run build",
|
|
21
|
+
"dev": "tsc --watch",
|
|
22
|
+
"clean": "rimraf dist",
|
|
23
|
+
"prepublishOnly": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@flightdev/bundler": "^3.0.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^22.0.0",
|
|
30
|
+
"rimraf": "^6.0.0",
|
|
31
|
+
"typescript": "^5.7.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@flightdev/core": "workspace:*"
|
|
35
|
+
},
|
|
36
|
+
"napi": {
|
|
37
|
+
"name": "turboflight",
|
|
38
|
+
"triples": {
|
|
39
|
+
"defaults": false,
|
|
40
|
+
"additional": [
|
|
41
|
+
"x86_64-pc-windows-msvc",
|
|
42
|
+
"x86_64-apple-darwin",
|
|
43
|
+
"aarch64-apple-darwin",
|
|
44
|
+
"x86_64-unknown-linux-gnu"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=20.0.0"
|
|
50
|
+
},
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "https://github.com/EliosLT/FlightDev",
|
|
55
|
+
"directory": "packages/bundler-turboflight"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"flight",
|
|
59
|
+
"bundler",
|
|
60
|
+
"turboflight",
|
|
61
|
+
"turbopack",
|
|
62
|
+
"rust",
|
|
63
|
+
"napi"
|
|
64
|
+
]
|
|
69
65
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024-2026 Flight Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|