@ohos-ports/rspack-binding 2.2.1-beta.0 → 2.2.9-beta.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 +11 -0
- package/binding.d.ts +2 -2
- package/binding.js +8 -1
- package/napi-binding.d.ts +105 -53
- package/package.json +15 -7
- package/rspack.openharmony-arm64-ohos.node +0 -4
package/README.md
CHANGED
|
@@ -19,3 +19,14 @@ The generation of `rspack.wasi-browser.js` and `rspack.wasi.js` is disabled by d
|
|
|
19
19
|
## License
|
|
20
20
|
|
|
21
21
|
Rspack is [MIT licensed](https://github.com/web-infra-dev/rspack/blob/main/LICENSE).
|
|
22
|
+
|
|
23
|
+
## OpenHarmony port
|
|
24
|
+
|
|
25
|
+
This is the `@ohos-ports` distribution of `@rspack/binding@2.2.9`.
|
|
26
|
+
|
|
27
|
+
- On `process.platform === 'openharmony'` and `process.arch === 'arm64'`,
|
|
28
|
+
the loader additionally probes `@ohos-ports/rspack-binding-openharmony-arm64`
|
|
29
|
+
(installed automatically via `optionalDependencies`), which ships the
|
|
30
|
+
native binary compiled from rspack v2.2.9 source for
|
|
31
|
+
`aarch64-unknown-linux-ohos` and signed with `binary-sign-tool`.
|
|
32
|
+
- All upstream probe paths are preserved.
|
package/binding.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* We manually create binding.d.ts and re-export everything of the dts generated by napi to fix the cjs-esm interop
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as binding from "./napi-binding";
|
|
5
|
+
import * as binding from "./napi-binding.js";
|
|
6
6
|
|
|
7
|
-
export * from "./napi-binding"
|
|
7
|
+
export * from "./napi-binding.js"
|
|
8
8
|
export default binding;
|
package/binding.js
CHANGED
|
@@ -320,7 +320,7 @@ function requireNative() {
|
|
|
320
320
|
} else if (process.platform === 'openharmony') {
|
|
321
321
|
if (process.arch === 'arm64') {
|
|
322
322
|
try {
|
|
323
|
-
return require('./rspack.
|
|
323
|
+
return require('./rspack.linux-arm64-ohos.node')
|
|
324
324
|
} catch (e) {
|
|
325
325
|
loadErrors.push(e)
|
|
326
326
|
}
|
|
@@ -329,6 +329,13 @@ function requireNative() {
|
|
|
329
329
|
} catch (e) {
|
|
330
330
|
loadErrors.push(e)
|
|
331
331
|
}
|
|
332
|
+
// OpenHarmony port: probe the @ohos-ports platform binary slot
|
|
333
|
+
// (compiled from rspack v2.2.9 source for aarch64-unknown-linux-ohos)
|
|
334
|
+
try {
|
|
335
|
+
return require('@ohos-ports/rspack-binding-openharmony-arm64')
|
|
336
|
+
} catch (e) {
|
|
337
|
+
loadErrors.push(e)
|
|
338
|
+
}
|
|
332
339
|
} else if (process.arch === 'x64') {
|
|
333
340
|
try {
|
|
334
341
|
return require('./rspack.linux-x64-ohos.node')
|
package/napi-binding.d.ts
CHANGED
|
@@ -191,7 +191,7 @@ export declare class ConcatenatedModule {
|
|
|
191
191
|
get rootModule(): Module
|
|
192
192
|
get modules(): Module[]
|
|
193
193
|
readableIdentifier(): string
|
|
194
|
-
_originalSource():
|
|
194
|
+
_originalSource(): JsSourceWithLazyMap | undefined
|
|
195
195
|
nameForCondition(): string | undefined
|
|
196
196
|
get blocks(): AsyncDependenciesBlock[]
|
|
197
197
|
get dependencies(): Dependency[]
|
|
@@ -202,7 +202,7 @@ export declare class ConcatenatedModule {
|
|
|
202
202
|
|
|
203
203
|
export declare class ContextModule {
|
|
204
204
|
readableIdentifier(): string
|
|
205
|
-
_originalSource():
|
|
205
|
+
_originalSource(): JsSourceWithLazyMap | undefined
|
|
206
206
|
nameForCondition(): string | undefined
|
|
207
207
|
get blocks(): AsyncDependenciesBlock[]
|
|
208
208
|
get dependencies(): Dependency[]
|
|
@@ -267,7 +267,7 @@ export type EntryOptionsDTO = EntryOptionsDto
|
|
|
267
267
|
|
|
268
268
|
export declare class ExternalModule {
|
|
269
269
|
readableIdentifier(): string
|
|
270
|
-
_originalSource():
|
|
270
|
+
_originalSource(): JsSourceWithLazyMap | undefined
|
|
271
271
|
nameForCondition(): string | undefined
|
|
272
272
|
get blocks(): AsyncDependenciesBlock[]
|
|
273
273
|
get dependencies(): Dependency[]
|
|
@@ -276,12 +276,33 @@ export declare class ExternalModule {
|
|
|
276
276
|
_emitFile(filename: string, source: JsSource, assetInfo?: AssetInfo | undefined | null): void
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
/** Native operations on the owning compiler's current dependency collection. */
|
|
280
|
+
export declare class FileSystemDependencies {
|
|
281
|
+
get added(): Array<string>
|
|
282
|
+
get removed(): Array<string>
|
|
283
|
+
size(): number
|
|
284
|
+
has(value: string): boolean
|
|
285
|
+
clear(): void
|
|
286
|
+
update(added: Array<string>, deleted: Array<string>): void
|
|
287
|
+
values(this: this): ReadonlyArray<string>
|
|
288
|
+
add(value: string): void
|
|
289
|
+
addAll(values: Array<string>): void
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** One shared cache, initialized from the first compiler that uses it. */
|
|
293
|
+
export declare class JsCache {
|
|
294
|
+
constructor()
|
|
295
|
+
beginIdle(): void
|
|
296
|
+
endIdle(): void
|
|
297
|
+
shutdown(): Promise<void>
|
|
298
|
+
}
|
|
299
|
+
|
|
279
300
|
export declare class JsCompilation {
|
|
280
301
|
updateAsset(filename: string, newSourceOrFunction: JsSource | ((source: JsSource) => JsSource), assetInfoUpdateOrFunction?: AssetInfo | ((assetInfo: AssetInfo) => AssetInfo | undefined)): void
|
|
281
302
|
getAssets(): Readonly<JsAsset>[]
|
|
282
303
|
getAsset(name: string): JsAsset | null
|
|
283
304
|
getAssetSource(name: string): JsSource | null
|
|
284
|
-
get modules():
|
|
305
|
+
get modules(): Modules
|
|
285
306
|
get builtModules(): Array<Module>
|
|
286
307
|
getOptimizationBailout(): Array<JsStatsOptimizationBailout>
|
|
287
308
|
get chunks(): Chunks
|
|
@@ -299,7 +320,10 @@ export declare class JsCompilation {
|
|
|
299
320
|
get entrypoints(): ChunkGroup[]
|
|
300
321
|
get chunkGroups(): ChunkGroup[]
|
|
301
322
|
get hash(): string | null
|
|
302
|
-
|
|
323
|
+
get fileDependencies(): FileSystemDependencies
|
|
324
|
+
get contextDependencies(): FileSystemDependencies
|
|
325
|
+
get missingDependencies(): FileSystemDependencies
|
|
326
|
+
get buildDependencies(): FileSystemDependencies
|
|
303
327
|
pushDiagnostic(diagnostic: JsRspackDiagnostic): void
|
|
304
328
|
pushNativeDiagnostic(diagnostic: ExternalObject<'Diagnostic'>): void
|
|
305
329
|
pushNativeDiagnostics(diagnostics: ExternalObject<'Diagnostic[]'>): void
|
|
@@ -309,7 +333,7 @@ export declare class JsCompilation {
|
|
|
309
333
|
getWarnings(): Array<RspackError>
|
|
310
334
|
getStats(): JsStats
|
|
311
335
|
getAssetPath(filename: string, data: JsPathData): string
|
|
312
|
-
getAssetPathWithInfo(filename: string, data: JsPathData): PathWithInfo
|
|
336
|
+
getAssetPathWithInfo(filename: string, data: JsPathData, assetInfo?: AssetInfo | undefined | null): PathWithInfo
|
|
313
337
|
getPath(filename: string, data: JsPathData): string
|
|
314
338
|
getPathWithInfo(filename: string, data: JsPathData): PathWithInfo
|
|
315
339
|
addFileDependencies(deps: Array<string>): void
|
|
@@ -334,7 +358,7 @@ export declare class JsCompilation {
|
|
|
334
358
|
}
|
|
335
359
|
|
|
336
360
|
export declare class JsCompiler {
|
|
337
|
-
constructor(compilerPath: string, options: RawOptions, builtinPlugins: BuiltinPlugin[], registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory, unsafeFastDrop: boolean, platform: RawCompilerPlatform)
|
|
361
|
+
constructor(compilerPath: string, options: RawOptions, builtinPlugins: BuiltinPlugin[], registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory, unsafeFastDrop: boolean, platform: RawCompilerPlatform, infrastructureLogCallback: (logs: JsLog[]) => void, cache: JsCache, jsHelpers: JsHelpers)
|
|
338
362
|
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
339
363
|
/** Build with the given option passed to the constructor */
|
|
340
364
|
build(callback: (err: null | Error) => void): void
|
|
@@ -374,21 +398,6 @@ export declare class JsCoordinator {
|
|
|
374
398
|
constructor()
|
|
375
399
|
}
|
|
376
400
|
|
|
377
|
-
export declare class JsDependencies {
|
|
378
|
-
get fileDependencies(): Array<string>
|
|
379
|
-
get addedFileDependencies(): Array<string>
|
|
380
|
-
get removedFileDependencies(): Array<string>
|
|
381
|
-
get contextDependencies(): Array<string>
|
|
382
|
-
get addedContextDependencies(): Array<string>
|
|
383
|
-
get removedContextDependencies(): Array<string>
|
|
384
|
-
get missingDependencies(): Array<string>
|
|
385
|
-
get addedMissingDependencies(): Array<string>
|
|
386
|
-
get removedMissingDependencies(): Array<string>
|
|
387
|
-
get buildDependencies(): Array<string>
|
|
388
|
-
get addedBuildDependencies(): Array<string>
|
|
389
|
-
get removedBuildDependencies(): Array<string>
|
|
390
|
-
}
|
|
391
|
-
|
|
392
401
|
export declare class JsEntries {
|
|
393
402
|
clear(): void
|
|
394
403
|
get size(): number
|
|
@@ -408,23 +417,23 @@ export declare class JsExportsInfo {
|
|
|
408
417
|
}
|
|
409
418
|
|
|
410
419
|
export declare class JsLoaderCache {
|
|
411
|
-
get(loaderIndex: number, content: string | Uint8Array, existing: JsLoaderDependencies): JsLoaderCacheEntry | null
|
|
412
|
-
store(loaderIndex: number, output: JsLoaderCacheEntry): void
|
|
420
|
+
get(loaderIndex: number, content: string | Uint8Array, existing: JsLoaderDependencies): Promise<JsLoaderCacheEntry | null>
|
|
421
|
+
store(loaderIndex: number, output: JsLoaderCacheEntry): Promise<void>
|
|
413
422
|
}
|
|
414
423
|
|
|
415
424
|
export declare class JsModuleGraph {
|
|
416
|
-
getModule(dependency: Dependency): Module | null
|
|
417
|
-
getResolvedModule(dependency: Dependency): Module | null
|
|
425
|
+
getModule(dependency: Dependency | EntryDependency): Module | null
|
|
426
|
+
getResolvedModule(dependency: Dependency | EntryDependency): Module | null
|
|
418
427
|
getUsedExports(module: Module, runtime: string | string[]): boolean | Array<string> | null
|
|
419
428
|
getProvidedExports(module: Module): true | string[] | null
|
|
420
429
|
getIssuer(module: Module): Module | null
|
|
421
430
|
getExportsInfo(module: Module): JsExportsInfo
|
|
422
|
-
getConnection(dependency: Dependency): ModuleGraphConnection | null
|
|
431
|
+
getConnection(dependency: Dependency | EntryDependency): ModuleGraphConnection | null
|
|
423
432
|
getOutgoingConnections(module: Module): ModuleGraphConnection[]
|
|
424
433
|
getOutgoingConnectionsInOrder(module: Module): ModuleGraphConnection[]
|
|
425
434
|
getIncomingConnections(module: Module): ModuleGraphConnection[]
|
|
426
|
-
getParentModule(dependency: Dependency): Module | null
|
|
427
|
-
getParentBlockIndex(dependency: Dependency): number
|
|
435
|
+
getParentModule(dependency: Dependency | EntryDependency): Module | null
|
|
436
|
+
getParentBlockIndex(dependency: Dependency | EntryDependency): number
|
|
428
437
|
isAsync(module: Module): boolean
|
|
429
438
|
}
|
|
430
439
|
|
|
@@ -440,7 +449,7 @@ export declare class JsResolverFactory {
|
|
|
440
449
|
|
|
441
450
|
export declare class JsStats {
|
|
442
451
|
toJson(jsOptions: JsStatsOptions): JsStatsCompilation
|
|
443
|
-
getLogging(acceptedTypes: number): Array<
|
|
452
|
+
getLogging(acceptedTypes: number): Array<JsLog>
|
|
444
453
|
}
|
|
445
454
|
|
|
446
455
|
export declare class KnownBuildInfo {
|
|
@@ -449,7 +458,7 @@ export declare class KnownBuildInfo {
|
|
|
449
458
|
|
|
450
459
|
export declare class Module {
|
|
451
460
|
readableIdentifier(): string
|
|
452
|
-
_originalSource():
|
|
461
|
+
_originalSource(): JsSourceWithLazyMap | undefined
|
|
453
462
|
nameForCondition(): string | undefined
|
|
454
463
|
get blocks(): AsyncDependenciesBlock[]
|
|
455
464
|
get dependencies(): Dependency[]
|
|
@@ -466,6 +475,13 @@ export declare class ModuleGraphConnection {
|
|
|
466
475
|
getActiveState(runtime: string | string[] | undefined): ConnectionState
|
|
467
476
|
}
|
|
468
477
|
|
|
478
|
+
/** Read-only operations on a compilation's module collection. */
|
|
479
|
+
export declare class Modules {
|
|
480
|
+
size(): number
|
|
481
|
+
has(value: Module): boolean
|
|
482
|
+
values(): ReadonlyArray<Module>
|
|
483
|
+
}
|
|
484
|
+
|
|
469
485
|
export declare class NativeWatcher {
|
|
470
486
|
constructor(options: NativeWatcherOptions)
|
|
471
487
|
watch(files: [Array<string>, Array<string>], directories: [Array<string>, Array<string>], missing: [Array<string>, Array<string>], startTime: bigint, callback: (err: Error | null, result: NativeWatchResult) => void, callbackUndelayed: (event: NativeWatchUndelayedEvent) => void): void
|
|
@@ -877,13 +893,18 @@ export interface JsExecuteModuleResult {
|
|
|
877
893
|
missingDependencies: Array<string>
|
|
878
894
|
cacheable: boolean
|
|
879
895
|
id: number
|
|
880
|
-
|
|
896
|
+
errors: Array<RspackError>
|
|
881
897
|
}
|
|
882
898
|
|
|
883
899
|
export interface JsFactoryMeta {
|
|
884
900
|
sideEffectFree?: boolean
|
|
885
901
|
}
|
|
886
902
|
|
|
903
|
+
export interface JsHelpers {
|
|
904
|
+
applyIndexedArrayUpdates: <T>(source: ReadonlyArray<T>, target: T[], commands: Uint32Array) => void
|
|
905
|
+
swapRemoveArrayElements: <T>(array: T[], removedIndices: Uint32Array) => void
|
|
906
|
+
}
|
|
907
|
+
|
|
887
908
|
export interface JsHtmlPluginAssets {
|
|
888
909
|
publicPath: string
|
|
889
910
|
js: Array<string>
|
|
@@ -961,6 +982,7 @@ export interface JsLoaderCacheEntry {
|
|
|
961
982
|
sourceMap?: Uint8Array
|
|
962
983
|
addedDependencies: JsLoaderDependencies
|
|
963
984
|
removedDependencies: JsLoaderDependencies
|
|
985
|
+
parseMeta: Record<string, string>
|
|
964
986
|
}
|
|
965
987
|
|
|
966
988
|
export interface JsLoaderContext {
|
|
@@ -968,7 +990,7 @@ export interface JsLoaderContext {
|
|
|
968
990
|
_module: Module
|
|
969
991
|
hot: Readonly<boolean>
|
|
970
992
|
/** Content maybe empty in pitching stage */
|
|
971
|
-
content:
|
|
993
|
+
content: string | Buffer | null
|
|
972
994
|
additionalData?: any
|
|
973
995
|
__internal__parseMeta: Record<string, string>
|
|
974
996
|
sourceMap?: Buffer
|
|
@@ -979,11 +1001,6 @@ export interface JsLoaderContext {
|
|
|
979
1001
|
loaderState: Readonly<JsLoaderState>
|
|
980
1002
|
__internal__error?: RspackError
|
|
981
1003
|
__internal__loaderCache?: JsLoaderCache | undefined
|
|
982
|
-
/**
|
|
983
|
-
* UTF-8 hint for `content`
|
|
984
|
-
* - Some(true): `content` is a `UTF-8` encoded sequence
|
|
985
|
-
*/
|
|
986
|
-
__internal__utf8Hint?: boolean
|
|
987
1004
|
}
|
|
988
1005
|
|
|
989
1006
|
export interface JsLoaderDependencies {
|
|
@@ -1008,6 +1025,13 @@ export declare enum JsLoaderState {
|
|
|
1008
1025
|
Normal = 'Normal'
|
|
1009
1026
|
}
|
|
1010
1027
|
|
|
1028
|
+
export interface JsLog {
|
|
1029
|
+
name: string
|
|
1030
|
+
type: string
|
|
1031
|
+
args: Array<string | number>
|
|
1032
|
+
trace?: Array<string>
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1011
1035
|
export interface JsModuleDescriptor {
|
|
1012
1036
|
identifier: string
|
|
1013
1037
|
name: string
|
|
@@ -1057,9 +1081,8 @@ export interface JsResolveData {
|
|
|
1057
1081
|
request: string
|
|
1058
1082
|
context: string
|
|
1059
1083
|
contextInfo: ContextInfo
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
missingDependencies: Array<string>
|
|
1084
|
+
/** The import attributes of the dependency that triggered this resolution, read-only. */
|
|
1085
|
+
attributes?: Record<string, string>
|
|
1063
1086
|
createData?: JsCreateData
|
|
1064
1087
|
}
|
|
1065
1088
|
|
|
@@ -1350,6 +1373,11 @@ export interface JsSourceToJs {
|
|
|
1350
1373
|
map?: string
|
|
1351
1374
|
}
|
|
1352
1375
|
|
|
1376
|
+
export interface JsSourceWithLazyMap {
|
|
1377
|
+
source: string | Buffer
|
|
1378
|
+
map?: string | (() => string)
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1353
1381
|
export interface JsStatsAsset {
|
|
1354
1382
|
type: string
|
|
1355
1383
|
name: string
|
|
@@ -1472,13 +1500,6 @@ export interface JsStatsGetAssets {
|
|
|
1472
1500
|
assetsByChunkName: Array<JsStatsAssetsByChunkName>
|
|
1473
1501
|
}
|
|
1474
1502
|
|
|
1475
|
-
export interface JsStatsLogging {
|
|
1476
|
-
name: string
|
|
1477
|
-
type: string
|
|
1478
|
-
args?: Array<string>
|
|
1479
|
-
trace?: Array<string>
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
1503
|
export interface JsStatsModule {
|
|
1483
1504
|
commonAttributes: JsStatsModuleCommonAttributes
|
|
1484
1505
|
dependent?: boolean
|
|
@@ -1816,9 +1837,10 @@ export interface NativeWatcherOptions {
|
|
|
1816
1837
|
aggregateTimeout?: number
|
|
1817
1838
|
/**
|
|
1818
1839
|
* The ignored paths for the watcher.
|
|
1819
|
-
* It can be a single path, an array of paths,
|
|
1840
|
+
* It can be a single path, an array of paths, a regular expression, or a
|
|
1841
|
+
* predicate returning `true` for entries to ignore.
|
|
1820
1842
|
*/
|
|
1821
|
-
ignored?: string | string[] | RegExp
|
|
1843
|
+
ignored?: string | string[] | RegExp | ((entry: string) => boolean)
|
|
1822
1844
|
}
|
|
1823
1845
|
|
|
1824
1846
|
/**
|
|
@@ -1952,7 +1974,7 @@ export interface RawCacheOptionsPersistent {
|
|
|
1952
1974
|
buildDependencies?: Array<string>
|
|
1953
1975
|
version?: string
|
|
1954
1976
|
maxAge: number
|
|
1955
|
-
|
|
1977
|
+
maxMemoryGenerations?: number
|
|
1956
1978
|
storage?: RawStorageOptions
|
|
1957
1979
|
portable?: boolean
|
|
1958
1980
|
readonly?: boolean
|
|
@@ -2379,6 +2401,18 @@ export interface RawFallbackCacheGroupOptions {
|
|
|
2379
2401
|
automaticNameDelimiter?: string
|
|
2380
2402
|
}
|
|
2381
2403
|
|
|
2404
|
+
export interface RawFileSystemCacheOptions {
|
|
2405
|
+
buildDependencies: Array<string>
|
|
2406
|
+
cacheDirectory: string
|
|
2407
|
+
cacheLocation: string
|
|
2408
|
+
version: string
|
|
2409
|
+
readonly: boolean
|
|
2410
|
+
maxMemoryGenerations?: number
|
|
2411
|
+
idleTimeout: number
|
|
2412
|
+
idleTimeoutForInitialStore: number
|
|
2413
|
+
idleTimeoutAfterLargeChanges: number
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2382
2416
|
export interface RawFlagAllModulesAsUsedPluginOptions {
|
|
2383
2417
|
explanation: string
|
|
2384
2418
|
}
|
|
@@ -2452,6 +2486,7 @@ export interface RawHttpUriPluginOptions {
|
|
|
2452
2486
|
lockfileLocation?: string
|
|
2453
2487
|
cacheLocation?: string
|
|
2454
2488
|
upgrade: boolean
|
|
2489
|
+
frozen: boolean
|
|
2455
2490
|
httpClient: (url: string, headers: Record<string, string>) => Promise<JsHttpResponseRaw>
|
|
2456
2491
|
}
|
|
2457
2492
|
|
|
@@ -2596,7 +2631,7 @@ export interface RawJsonParserOptions {
|
|
|
2596
2631
|
}
|
|
2597
2632
|
|
|
2598
2633
|
export interface RawLazyCompilationOption {
|
|
2599
|
-
|
|
2634
|
+
takeNewlyActiveModules: ((err: Error | null, ) => Set<string>)
|
|
2600
2635
|
test?: RawLazyCompilationTest
|
|
2601
2636
|
entries: boolean
|
|
2602
2637
|
imports: boolean
|
|
@@ -2778,9 +2813,11 @@ export interface RawModuleRuleUse {
|
|
|
2778
2813
|
|
|
2779
2814
|
export interface RawNewCache {
|
|
2780
2815
|
codeGeneration: boolean
|
|
2816
|
+
module: boolean
|
|
2781
2817
|
devtool: boolean
|
|
2782
2818
|
loader: boolean
|
|
2783
2819
|
minimize: boolean
|
|
2820
|
+
resolver: boolean
|
|
2784
2821
|
}
|
|
2785
2822
|
|
|
2786
2823
|
export interface RawNodeOption {
|
|
@@ -2830,7 +2867,8 @@ export interface RawOptions {
|
|
|
2830
2867
|
module: RawModuleOptions
|
|
2831
2868
|
optimization: RawOptimizationOptions
|
|
2832
2869
|
stats: RawStatsOptions
|
|
2833
|
-
cache: boolean | { type: "memory" } | ({ type: "persistent" } & RawCacheOptionsPersistent)
|
|
2870
|
+
cache: boolean | { type: "memory" } | ({ type: "persistent" } & RawCacheOptionsPersistent) | ({ type: "filesystem" } & RawFileSystemCacheOptions)
|
|
2871
|
+
snapshot: RawSnapshotOptions
|
|
2834
2872
|
experiments: RawExperiments
|
|
2835
2873
|
incremental?: false | { [key: string]: boolean }
|
|
2836
2874
|
node?: RawNodeOption
|
|
@@ -3048,6 +3086,8 @@ export interface RawRstestPluginOptions {
|
|
|
3048
3086
|
*/
|
|
3049
3087
|
injectImportMetaRstestOrigin?: boolean
|
|
3050
3088
|
injectDynamicImportOrigin?: boolean | { functionName?: string }
|
|
3089
|
+
updateImportMockAPI?: boolean
|
|
3090
|
+
updateRequireMockAPI?: boolean
|
|
3051
3091
|
injectRequireResolveOrigin?: boolean | { functionName?: string }
|
|
3052
3092
|
}
|
|
3053
3093
|
|
|
@@ -3112,6 +3152,16 @@ export interface RawSnapshotOptions {
|
|
|
3112
3152
|
immutablePaths: Array<string|RegExp>
|
|
3113
3153
|
unmanagedPaths: Array<string|RegExp>
|
|
3114
3154
|
managedPaths: Array<string|RegExp>
|
|
3155
|
+
buildDependencies: RawSnapshotStrategyOptions
|
|
3156
|
+
resolveBuildDependencies: RawSnapshotStrategyOptions
|
|
3157
|
+
module: RawSnapshotStrategyOptions
|
|
3158
|
+
contextModule: RawSnapshotStrategyOptions
|
|
3159
|
+
resolve: RawSnapshotStrategyOptions
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3162
|
+
export interface RawSnapshotStrategyOptions {
|
|
3163
|
+
hash: boolean
|
|
3164
|
+
timestamp: boolean
|
|
3115
3165
|
}
|
|
3116
3166
|
|
|
3117
3167
|
export interface RawSplitChunkSizes {
|
|
@@ -3119,6 +3169,7 @@ export interface RawSplitChunkSizes {
|
|
|
3119
3169
|
}
|
|
3120
3170
|
|
|
3121
3171
|
export interface RawSplitChunksOptions {
|
|
3172
|
+
dedupDepth?: number
|
|
3122
3173
|
fallbackCacheGroup?: RawFallbackCacheGroupOptions
|
|
3123
3174
|
name?: string | false | ((ctx: JsChunkOptionNameCtx) => string | undefined)
|
|
3124
3175
|
nameBatch?: ((batch: JsChunkOptionNameBatch) => (string | undefined)[])
|
|
@@ -3408,6 +3459,7 @@ export interface ThreadsafeNodeFS {
|
|
|
3408
3459
|
readFile: (name: string) => Promise<Buffer | string | void>
|
|
3409
3460
|
stat: (name: string) => Promise<NodeFsStats | void>
|
|
3410
3461
|
lstat: (name: string) => Promise<NodeFsStats | void>
|
|
3462
|
+
readlink: (name: string) => Promise<string | void>
|
|
3411
3463
|
realpath: (name: string) => Promise<string | void>
|
|
3412
3464
|
open: (name: string, flags: string) => Promise<number | void>
|
|
3413
3465
|
rename: (from: string, to: string) => Promise<void>
|
package/package.json
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohos-ports/rspack-binding",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "Node binding for rspack",
|
|
5
|
+
"description": "Node binding loader for rspack (OpenHarmony port: probes @ohos-ports/rspack-binding-openharmony-arm64 on openharmony/arm64)",
|
|
6
6
|
"main": "binding.js",
|
|
7
7
|
"types": "binding.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"binding.js",
|
|
10
10
|
"binding.d.ts",
|
|
11
11
|
"napi-binding.d.ts",
|
|
12
|
-
"webcontainer-fallback.cjs"
|
|
13
|
-
"rspack.openharmony-arm64-ohos.node"
|
|
12
|
+
"webcontainer-fallback.cjs"
|
|
14
13
|
],
|
|
14
|
+
"optionalDependencies": {
|
|
15
|
+
"@ohos-ports/rspack-binding-openharmony-arm64": "2.2.9-beta.0"
|
|
16
|
+
},
|
|
15
17
|
"homepage": "https://rspack.rs",
|
|
16
|
-
"bugs":
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/ohos-ports/ohos-ports/issues"
|
|
20
|
+
},
|
|
17
21
|
"repository": {
|
|
18
22
|
"type": "git",
|
|
19
|
-
"url": "
|
|
23
|
+
"url": "https://github.com/ohos-ports/ohos-ports.git",
|
|
24
|
+
"directory": "ports/@rspack/binding/2.2.9"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
20
28
|
}
|
|
21
|
-
}
|
|
29
|
+
}
|