@rspack/core 0.6.5 → 0.7.0-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/dist/Chunk.d.ts +1 -1
- package/dist/Chunk.js +1 -1
- package/dist/ChunkGroup.d.ts +2 -0
- package/dist/ChunkGroup.js +4 -0
- package/dist/Compilation.d.ts +46 -65
- package/dist/Compilation.js +128 -222
- package/dist/Compiler.d.ts +75 -44
- package/dist/Compiler.js +325 -278
- package/dist/ContextModuleFactory.d.ts +7 -3
- package/dist/ContextModuleFactory.js +2 -2
- package/dist/Entrypoint.d.ts +1 -1
- package/dist/Entrypoint.js +1 -1
- package/dist/ExecuteModulePlugin.js +1 -1
- package/dist/Module.d.ts +11 -0
- package/dist/Module.js +2 -2
- package/dist/MultiCompiler.d.ts +10 -25
- package/dist/MultiCompiler.js +3 -3
- package/dist/MultiStats.d.ts +1 -1
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/Stats.d.ts +2 -2
- package/dist/Watching.d.ts +0 -9
- package/dist/Watching.js +12 -2
- package/dist/builtin-loader/swc/index.d.ts +6 -6
- package/dist/builtin-loader/swc/index.js +3 -3
- package/dist/builtin-loader/swc/types.d.ts +2 -2
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +2 -2
- package/dist/builtin-plugin/BannerPlugin.js +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.js +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.js +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/HtmlRspackPlugin.js +2 -2
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.js +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +15 -0
- package/dist/builtin-plugin/SizeLimitsPlugin.js +9 -0
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SplitChunksPlugin.js +4 -4
- package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +2 -2
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +5 -4
- package/dist/builtin-plugin/css-extract/loader.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/loader.js +2 -2
- package/dist/builtin-plugin/index.d.ts +44 -43
- package/dist/builtin-plugin/index.js +44 -43
- package/dist/config/adapter.d.ts +2 -2
- package/dist/config/adapter.js +6 -5
- package/dist/config/adapterRuleUse.d.ts +2 -1
- package/dist/config/adapterRuleUse.js +2 -2
- package/dist/config/defaults.js +21 -4
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +2 -2
- package/dist/config/normalization.d.ts +2 -2
- package/dist/config/normalization.js +1 -0
- package/dist/config/zod.d.ts +317 -189
- package/dist/config/zod.js +23 -29
- package/dist/container/ContainerPlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.js +1 -1
- package/dist/container/ModuleFederationPlugin.js +1 -1
- package/dist/container/ModuleFederationPluginV1.d.ts +1 -1
- package/dist/container/ModuleFederationPluginV1.js +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +36 -30
- package/dist/exports.js +36 -28
- package/dist/fileSystem.d.ts +12 -8
- package/dist/fileSystem.js +25 -48
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite-tapable/index.d.ts +6 -0
- package/dist/lite-tapable/index.js +107 -1
- package/dist/loader-runner/index.js +13 -13
- package/dist/logging/Logger.d.ts +1 -1
- package/dist/logging/createConsoleLogger.js +0 -14
- package/dist/node/NodeEnvironmentPlugin.d.ts +1 -1
- package/dist/node/NodeEnvironmentPlugin.js +1 -1
- package/dist/node/nodeConsole.js +0 -4
- package/dist/rspack.d.ts +4 -13
- package/dist/rspack.js +8 -8
- package/dist/rspackOptionsApply.d.ts +1 -10
- package/dist/rspackOptionsApply.js +17 -5
- package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/sharing/ConsumeSharedPlugin.js +1 -1
- package/dist/stats/DefaultStatsFactoryPlugin.js +2 -2
- package/dist/stats/StatsFactory.d.ts +2 -2
- package/dist/stats/StatsFactory.js +0 -9
- package/dist/stats/StatsPrinter.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +1 -1
- package/dist/util/comparators.d.ts +1 -1
- package/dist/util/fs.d.ts +64 -0
- package/dist/util/fs.js +122 -0
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.js +16 -11
- package/dist/util/source.d.ts +18 -0
- package/dist/util/source.js +66 -0
- package/package.json +6 -5
- package/dist/util/createSource.d.ts +0 -5
- package/dist/util/createSource.js +0 -65
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QueriedHookMap = exports.HookMap = exports.AsyncSeriesBailHook = exports.AsyncSeriesHook = exports.AsyncParallelHook = exports.SyncBailHook = exports.SyncHook = exports.QueriedHook = exports.safeStage = exports.maxStage = exports.minStage = exports.Hook = void 0;
|
|
3
|
+
exports.QueriedHookMap = exports.HookMap = exports.AsyncSeriesWaterfallHook = exports.AsyncSeriesBailHook = exports.AsyncSeriesHook = exports.AsyncParallelHook = exports.SyncBailHook = exports.SyncHook = exports.QueriedHook = exports.safeStage = exports.maxStage = exports.minStage = exports.Hook = void 0;
|
|
4
4
|
class Hook {
|
|
5
5
|
constructor(args, name) {
|
|
6
6
|
this.args = args;
|
|
@@ -578,6 +578,112 @@ class AsyncSeriesBailHook extends Hook {
|
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
exports.AsyncSeriesBailHook = AsyncSeriesBailHook;
|
|
581
|
+
class AsyncSeriesWaterfallHook extends Hook {
|
|
582
|
+
constructor(args, name) {
|
|
583
|
+
if (!(args === null || args === void 0 ? void 0 : args.length))
|
|
584
|
+
throw new Error("Waterfall hooks must have at least one argument");
|
|
585
|
+
super(args, name);
|
|
586
|
+
}
|
|
587
|
+
callAsyncStageRange(queried, ...args) {
|
|
588
|
+
const { stageRange: [from, to], tapsInRange } = queried;
|
|
589
|
+
let data = args[0];
|
|
590
|
+
const cb = args[1];
|
|
591
|
+
if (from === exports.minStage) {
|
|
592
|
+
this._runCallInterceptors(data);
|
|
593
|
+
}
|
|
594
|
+
const done = () => {
|
|
595
|
+
this._runDoneInterceptors();
|
|
596
|
+
cb(null, data);
|
|
597
|
+
};
|
|
598
|
+
const error = (e) => {
|
|
599
|
+
this._runErrorInterceptors(e);
|
|
600
|
+
cb(e);
|
|
601
|
+
};
|
|
602
|
+
if (tapsInRange.length === 0)
|
|
603
|
+
return done();
|
|
604
|
+
let index = 0;
|
|
605
|
+
const next = () => {
|
|
606
|
+
const tap = tapsInRange[index];
|
|
607
|
+
this._runTapInterceptors(tap);
|
|
608
|
+
if (tap.type === "promise") {
|
|
609
|
+
const promise = tap.fn(data);
|
|
610
|
+
if (!promise || !promise.then) {
|
|
611
|
+
throw new Error("Tap function (tapPromise) did not return promise (returned " +
|
|
612
|
+
promise +
|
|
613
|
+
")");
|
|
614
|
+
}
|
|
615
|
+
promise.then((r) => {
|
|
616
|
+
index += 1;
|
|
617
|
+
if (r !== undefined) {
|
|
618
|
+
data = r;
|
|
619
|
+
}
|
|
620
|
+
if (index === tapsInRange.length) {
|
|
621
|
+
done();
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
next();
|
|
625
|
+
}
|
|
626
|
+
}, (e) => {
|
|
627
|
+
index = tapsInRange.length;
|
|
628
|
+
error(e);
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
else if (tap.type === "async") {
|
|
632
|
+
tap.fn(data, (e, r) => {
|
|
633
|
+
if (e) {
|
|
634
|
+
index = tapsInRange.length;
|
|
635
|
+
error(e);
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
index += 1;
|
|
639
|
+
if (r !== undefined) {
|
|
640
|
+
data = r;
|
|
641
|
+
}
|
|
642
|
+
if (index === tapsInRange.length) {
|
|
643
|
+
done();
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
next();
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
else {
|
|
652
|
+
let hasError = false;
|
|
653
|
+
try {
|
|
654
|
+
const r = tap.fn(data);
|
|
655
|
+
if (r !== undefined) {
|
|
656
|
+
data = r;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
catch (e) {
|
|
660
|
+
hasError = true;
|
|
661
|
+
index = tapsInRange.length;
|
|
662
|
+
error(e);
|
|
663
|
+
}
|
|
664
|
+
if (!hasError) {
|
|
665
|
+
index += 1;
|
|
666
|
+
if (index === tapsInRange.length) {
|
|
667
|
+
done();
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
next();
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
if (index === tapsInRange.length)
|
|
675
|
+
return;
|
|
676
|
+
};
|
|
677
|
+
next();
|
|
678
|
+
}
|
|
679
|
+
tapAsync(options, fn) {
|
|
680
|
+
this._tap("async", options, fn);
|
|
681
|
+
}
|
|
682
|
+
tapPromise(options, fn) {
|
|
683
|
+
this._tap("promise", options, fn);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
exports.AsyncSeriesWaterfallHook = AsyncSeriesWaterfallHook;
|
|
581
687
|
const defaultFactory = (key, hook) => hook;
|
|
582
688
|
class HookMap {
|
|
583
689
|
constructor(factory, name) {
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.runLoaders = exports.parsePathQueryFragment = void 0;
|
|
13
13
|
const webpack_sources_1 = require("webpack-sources");
|
|
14
|
-
const NormalModule_1 = require("../NormalModule");
|
|
15
14
|
const adapterRuleUse_1 = require("../config/adapterRuleUse");
|
|
15
|
+
const NormalModule_1 = require("../NormalModule");
|
|
16
16
|
const util_1 = require("../util");
|
|
17
|
+
const createHash_1 = require("../util/createHash");
|
|
17
18
|
const identifier_1 = require("../util/identifier");
|
|
18
19
|
const memoize_1 = require("../util/memoize");
|
|
19
|
-
const createHash_1 = require("../util/createHash");
|
|
20
20
|
const loadLoader = require("./loadLoader");
|
|
21
21
|
const querystring = require("node:querystring");
|
|
22
22
|
const PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/;
|
|
@@ -151,7 +151,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
151
151
|
"When using a function for Rule.use in config you need to " +
|
|
152
152
|
"provide an 'ident' property for referenced loader options.");
|
|
153
153
|
}
|
|
154
|
-
obj.options = compiler.
|
|
154
|
+
obj.options = compiler.__internal__ruleSet.references.get(ident);
|
|
155
155
|
if (obj.options === undefined) {
|
|
156
156
|
throw new Error(`Invalid ident("${ident}") is provided by referenced loader`);
|
|
157
157
|
}
|
|
@@ -201,7 +201,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
201
201
|
if (!callback) {
|
|
202
202
|
return new Promise((resolve, reject) => {
|
|
203
203
|
compiler
|
|
204
|
-
.
|
|
204
|
+
._lastCompilation.__internal_getInner()
|
|
205
205
|
.importModule(request, options.publicPath, options.baseUri, rawContext._moduleIdentifier, loaderContext.context, (err, res) => {
|
|
206
206
|
if (err)
|
|
207
207
|
reject(err);
|
|
@@ -225,7 +225,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
return compiler
|
|
228
|
-
.
|
|
228
|
+
._lastCompilation.__internal_getInner()
|
|
229
229
|
.importModule(request, options.publicPath, options.baseUri, rawContext._moduleIdentifier, loaderContext.context, (err, res) => {
|
|
230
230
|
if (err) {
|
|
231
231
|
callback(err, undefined);
|
|
@@ -386,22 +386,22 @@ async function runLoaders(compiler, rawContext) {
|
|
|
386
386
|
};
|
|
387
387
|
};
|
|
388
388
|
loaderContext.getLogger = function getLogger(name) {
|
|
389
|
-
return compiler.
|
|
389
|
+
return compiler._lastCompilation.getLogger([name, resource].filter(Boolean).join("|"));
|
|
390
390
|
};
|
|
391
391
|
loaderContext.rootContext = compiler.context;
|
|
392
392
|
loaderContext.emitError = function emitError(error) {
|
|
393
393
|
const title = "Module Error";
|
|
394
394
|
const message = error instanceof Error ? (0, util_1.concatErrorMsgAndStack)(error) : error;
|
|
395
|
-
compiler.
|
|
395
|
+
compiler._lastCompilation.__internal__pushDiagnostic("error", title, `${message}\n(from: ${(0, util_1.stringifyLoaderObject)(loaderContext.loaders[loaderContext.loaderIndex])})`);
|
|
396
396
|
};
|
|
397
397
|
loaderContext.emitWarning = function emitWarning(warning) {
|
|
398
398
|
const title = "Module Warning";
|
|
399
399
|
const message = warning instanceof Error ? (0, util_1.concatErrorMsgAndStack)(warning) : warning;
|
|
400
|
-
compiler.
|
|
400
|
+
compiler._lastCompilation.__internal__pushDiagnostic("warning", title, `${message}\n(from: ${(0, util_1.stringifyLoaderObject)(loaderContext.loaders[loaderContext.loaderIndex])})`);
|
|
401
401
|
};
|
|
402
402
|
loaderContext.__internal__pushNativeDiagnostics =
|
|
403
403
|
function __internal__pushNativeDiagnostics(diagnostics) {
|
|
404
|
-
compiler.
|
|
404
|
+
compiler._lastCompilation.__internal__pushNativeDiagnostics(diagnostics);
|
|
405
405
|
};
|
|
406
406
|
loaderContext.emitFile = function emitFile(name, content, sourceMap, assetInfo) {
|
|
407
407
|
let source;
|
|
@@ -425,7 +425,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
425
425
|
}
|
|
426
426
|
assetFilenames.push(name),
|
|
427
427
|
// @ts-expect-error
|
|
428
|
-
compiler.
|
|
428
|
+
compiler._lastCompilation.emitAsset(name, source, assetInfo);
|
|
429
429
|
};
|
|
430
430
|
loaderContext.fs = compiler.inputFileSystem;
|
|
431
431
|
const getAbsolutify = (0, memoize_1.memoize)(() => identifier_1.absolutify.bindCache(compiler.root));
|
|
@@ -444,7 +444,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
444
444
|
: getContextify()(context, request);
|
|
445
445
|
},
|
|
446
446
|
createHash: type => {
|
|
447
|
-
return (0, createHash_1.createHash)(type || compiler.
|
|
447
|
+
return (0, createHash_1.createHash)(type || compiler._lastCompilation.outputOptions.hashFunction);
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
450
|
loaderContext.addBuildDependency = function addBuildDependency(file) {
|
|
@@ -477,7 +477,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
477
477
|
return missingDependencies.slice();
|
|
478
478
|
};
|
|
479
479
|
loaderContext._compiler = compiler;
|
|
480
|
-
loaderContext._compilation = compiler.
|
|
480
|
+
loaderContext._compilation = compiler._lastCompilation;
|
|
481
481
|
loaderContext.getOptions = function () {
|
|
482
482
|
const loader = getCurrentLoader(loaderContext);
|
|
483
483
|
let options = loader === null || loader === void 0 ? void 0 : loader.options;
|
|
@@ -500,7 +500,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
500
500
|
}
|
|
501
501
|
return options;
|
|
502
502
|
};
|
|
503
|
-
let compilation = compiler.
|
|
503
|
+
let compilation = compiler._lastCompilation;
|
|
504
504
|
let step = 0;
|
|
505
505
|
while (compilation) {
|
|
506
506
|
NormalModule_1.NormalModule.getCompilationHooks(compilation).loader.call(loaderContext);
|
package/dist/logging/Logger.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type LogTypeEnum = (typeof LogType)[keyof typeof LogType];
|
|
|
30
30
|
declare const LOG_SYMBOL: unique symbol;
|
|
31
31
|
declare const TIMERS_SYMBOL: unique symbol;
|
|
32
32
|
declare const TIMERS_AGGREGATES_SYMBOL: unique symbol;
|
|
33
|
-
export type LogFunction = (type: LogTypeEnum, args
|
|
33
|
+
export type LogFunction = (type: LogTypeEnum, args: any[]) => void;
|
|
34
34
|
export type GetChildLogger = (name: string | (() => string)) => Logger;
|
|
35
35
|
export declare class Logger {
|
|
36
36
|
getChildLogger: GetChildLogger;
|
|
@@ -100,9 +100,7 @@ module.exports = ({ level = "info", debug = false, console }) => {
|
|
|
100
100
|
case LogType.debug:
|
|
101
101
|
if (!debug)
|
|
102
102
|
return;
|
|
103
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
104
103
|
if (typeof console.debug === "function") {
|
|
105
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
106
104
|
console.debug(...labeledArgs());
|
|
107
105
|
}
|
|
108
106
|
else {
|
|
@@ -138,9 +136,7 @@ module.exports = ({ level = "info", debug = false, console }) => {
|
|
|
138
136
|
if (!debug && loglevel > LogLevel.log)
|
|
139
137
|
return;
|
|
140
138
|
if (!debug && loglevel > LogLevel.verbose) {
|
|
141
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
142
139
|
if (typeof console.groupCollapsed === "function") {
|
|
143
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
144
140
|
console.groupCollapsed(...labeledArgs());
|
|
145
141
|
}
|
|
146
142
|
else {
|
|
@@ -152,9 +148,7 @@ module.exports = ({ level = "info", debug = false, console }) => {
|
|
|
152
148
|
case LogType.group:
|
|
153
149
|
if (!debug && loglevel > LogLevel.log)
|
|
154
150
|
return;
|
|
155
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
156
151
|
if (typeof console.group === "function") {
|
|
157
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
158
152
|
console.group(...labeledArgs());
|
|
159
153
|
}
|
|
160
154
|
else {
|
|
@@ -164,9 +158,7 @@ module.exports = ({ level = "info", debug = false, console }) => {
|
|
|
164
158
|
case LogType.groupEnd:
|
|
165
159
|
if (!debug && loglevel > LogLevel.log)
|
|
166
160
|
return;
|
|
167
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
168
161
|
if (typeof console.groupEnd === "function") {
|
|
169
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
170
162
|
console.groupEnd();
|
|
171
163
|
}
|
|
172
164
|
break;
|
|
@@ -184,25 +176,19 @@ module.exports = ({ level = "info", debug = false, console }) => {
|
|
|
184
176
|
break;
|
|
185
177
|
}
|
|
186
178
|
case LogType.profile:
|
|
187
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
188
179
|
if (typeof console.profile === "function") {
|
|
189
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
190
180
|
console.profile(...labeledArgs());
|
|
191
181
|
}
|
|
192
182
|
break;
|
|
193
183
|
case LogType.profileEnd:
|
|
194
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
195
184
|
if (typeof console.profileEnd === "function") {
|
|
196
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
197
185
|
console.profileEnd(...labeledArgs());
|
|
198
186
|
}
|
|
199
187
|
break;
|
|
200
188
|
case LogType.clear:
|
|
201
189
|
if (!debug && loglevel > LogLevel.log)
|
|
202
190
|
return;
|
|
203
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
204
191
|
if (typeof console.clear === "function") {
|
|
205
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
206
192
|
console.clear();
|
|
207
193
|
}
|
|
208
194
|
break;
|
|
@@ -16,8 +16,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
const CachedInputFileSystem_1 = __importDefault(require("enhanced-resolve/lib/CachedInputFileSystem"));
|
|
17
17
|
const graceful_fs_1 = __importDefault(require("../../compiled/graceful-fs"));
|
|
18
18
|
const createConsoleLogger_1 = __importDefault(require("../logging/createConsoleLogger"));
|
|
19
|
-
const NodeWatchFileSystem_1 = __importDefault(require("./NodeWatchFileSystem"));
|
|
20
19
|
const nodeConsole_1 = __importDefault(require("./nodeConsole"));
|
|
20
|
+
const NodeWatchFileSystem_1 = __importDefault(require("./NodeWatchFileSystem"));
|
|
21
21
|
class NodeEnvironmentPlugin {
|
|
22
22
|
constructor(options) {
|
|
23
23
|
this.options = options;
|
package/dist/node/nodeConsole.js
CHANGED
|
@@ -93,18 +93,14 @@ module.exports = ({ colors, appendOnly, stream }) => {
|
|
|
93
93
|
else if (currentIndent.length >= 2)
|
|
94
94
|
currentIndent = currentIndent.slice(0, currentIndent.length - 2);
|
|
95
95
|
},
|
|
96
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
97
96
|
// @ts-expect-error
|
|
98
97
|
profile: console.profile && (name => console.profile(name)),
|
|
99
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
100
98
|
// @ts-expect-error
|
|
101
99
|
profileEnd: console.profileEnd && (name => console.profileEnd(name)),
|
|
102
100
|
clear: !appendOnly &&
|
|
103
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
104
101
|
console.clear &&
|
|
105
102
|
(() => {
|
|
106
103
|
clearStatusMessage();
|
|
107
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
108
104
|
console.clear();
|
|
109
105
|
writeStatusMessage();
|
|
110
106
|
}),
|
package/dist/rspack.d.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib
|
|
4
|
-
*
|
|
5
|
-
* MIT Licensed
|
|
6
|
-
* Author Tobias Koppers @sokra
|
|
7
|
-
* Copyright (c) JS Foundation and other contributors
|
|
8
|
-
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
-
*/
|
|
10
|
-
import { RspackOptions } from "./config";
|
|
1
|
+
import { Callback } from "tapable";
|
|
11
2
|
import { Compiler } from "./Compiler";
|
|
12
|
-
import {
|
|
3
|
+
import { RspackOptions } from "./config";
|
|
13
4
|
import { MultiCompiler, MultiRspackOptions } from "./MultiCompiler";
|
|
14
|
-
import { Callback } from "tapable";
|
|
15
5
|
import MultiStats from "./MultiStats";
|
|
6
|
+
import { Stats } from "./Stats";
|
|
16
7
|
declare function createMultiCompiler(options: MultiRspackOptions): MultiCompiler;
|
|
17
8
|
declare function createCompiler(userOptions: RspackOptions): Compiler;
|
|
18
9
|
declare function rspack(options: MultiRspackOptions): MultiCompiler;
|
|
@@ -21,5 +12,5 @@ declare function rspack(options: MultiRspackOptions | RspackOptions): MultiCompi
|
|
|
21
12
|
declare function rspack(options: MultiRspackOptions, callback?: Callback<Error, MultiStats>): null | MultiCompiler;
|
|
22
13
|
declare function rspack(options: RspackOptions, callback?: Callback<Error, Stats>): null | Compiler;
|
|
23
14
|
declare function rspack(options: MultiRspackOptions | RspackOptions, callback?: Callback<Error, MultiStats | Stats>): null | MultiCompiler | Compiler;
|
|
24
|
-
export {
|
|
15
|
+
export { createCompiler, createMultiCompiler, MultiStats, rspack, Stats };
|
|
25
16
|
export default rspack;
|
package/dist/rspack.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.Stats = exports.rspack = exports.MultiStats = exports.createMultiCompiler = exports.createCompiler = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* The following code is modified based on
|
|
9
9
|
* https://github.com/webpack/webpack/blob/4b4ca3b/lib
|
|
@@ -13,17 +13,17 @@ exports.MultiStats = exports.Stats = exports.createMultiCompiler = exports.creat
|
|
|
13
13
|
* Copyright (c) JS Foundation and other contributors
|
|
14
14
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
17
|
-
const Compiler_1 = require("./Compiler");
|
|
18
|
-
const Stats_1 = require("./Stats");
|
|
19
|
-
Object.defineProperty(exports, "Stats", { enumerable: true, get: function () { return Stats_1.Stats; } });
|
|
16
|
+
const assert_1 = __importDefault(require("assert"));
|
|
20
17
|
const util_1 = __importDefault(require("util"));
|
|
21
|
-
const
|
|
22
|
-
const
|
|
18
|
+
const Compiler_1 = require("./Compiler");
|
|
19
|
+
const config_1 = require("./config");
|
|
23
20
|
const MultiCompiler_1 = require("./MultiCompiler");
|
|
24
21
|
const MultiStats_1 = __importDefault(require("./MultiStats"));
|
|
25
22
|
exports.MultiStats = MultiStats_1.default;
|
|
26
|
-
const
|
|
23
|
+
const NodeEnvironmentPlugin_1 = __importDefault(require("./node/NodeEnvironmentPlugin"));
|
|
24
|
+
const rspackOptionsApply_1 = require("./rspackOptionsApply");
|
|
25
|
+
const Stats_1 = require("./Stats");
|
|
26
|
+
Object.defineProperty(exports, "Stats", { enumerable: true, get: function () { return Stats_1.Stats; } });
|
|
27
27
|
const util_2 = require("./util");
|
|
28
28
|
const validate_1 = require("./util/validate");
|
|
29
29
|
function createMultiCompiler(options) {
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/OptionsApply.js
|
|
4
|
-
*
|
|
5
|
-
* MIT Licensed
|
|
6
|
-
* Author Tobias Koppers @sokra
|
|
7
|
-
* Copyright (c) JS Foundation and other contributors
|
|
8
|
-
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
-
*/
|
|
10
|
-
import { RspackOptionsNormalized, Compiler } from ".";
|
|
1
|
+
import { Compiler, RspackOptionsNormalized } from ".";
|
|
11
2
|
export declare class RspackOptionsApply {
|
|
12
3
|
constructor();
|
|
13
4
|
process(options: RspackOptionsNormalized, compiler: Compiler): void;
|
|
@@ -4,15 +4,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.RspackOptionsApply = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* The following code is modified based on
|
|
9
|
+
* https://github.com/webpack/webpack/blob/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/OptionsApply.js
|
|
10
|
+
*
|
|
11
|
+
* MIT Licensed
|
|
12
|
+
* Author Tobias Koppers @sokra
|
|
13
|
+
* Copyright (c) JS Foundation and other contributors
|
|
14
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
15
|
+
*/
|
|
16
|
+
const assert_1 = __importDefault(require("assert"));
|
|
7
17
|
const graceful_fs_1 = __importDefault(require("../compiled/graceful-fs"));
|
|
18
|
+
const builtin_plugin_1 = require("./builtin-plugin");
|
|
19
|
+
const EntryOptionPlugin_1 = __importDefault(require("./lib/EntryOptionPlugin"));
|
|
20
|
+
const ignoreWarningsPlugin_1 = __importDefault(require("./lib/ignoreWarningsPlugin"));
|
|
8
21
|
const DefaultStatsFactoryPlugin_1 = require("./stats/DefaultStatsFactoryPlugin");
|
|
9
22
|
const DefaultStatsPrinterPlugin_1 = require("./stats/DefaultStatsPrinterPlugin");
|
|
10
|
-
const cleverMerge_1 = require("./util/cleverMerge");
|
|
11
|
-
const assert_1 = __importDefault(require("assert"));
|
|
12
|
-
const ignoreWarningsPlugin_1 = __importDefault(require("./lib/ignoreWarningsPlugin"));
|
|
13
|
-
const EntryOptionPlugin_1 = __importDefault(require("./lib/EntryOptionPlugin"));
|
|
14
|
-
const builtin_plugin_1 = require("./builtin-plugin");
|
|
15
23
|
const assertNotNil_1 = require("./util/assertNotNil");
|
|
24
|
+
const cleverMerge_1 = require("./util/cleverMerge");
|
|
16
25
|
class RspackOptionsApply {
|
|
17
26
|
constructor() { }
|
|
18
27
|
process(options, compiler) {
|
|
@@ -216,6 +225,9 @@ class RspackOptionsApply {
|
|
|
216
225
|
}
|
|
217
226
|
}
|
|
218
227
|
}
|
|
228
|
+
if (options.performance) {
|
|
229
|
+
new builtin_plugin_1.SizeLimitsPlugin(options.performance).apply(compiler);
|
|
230
|
+
}
|
|
219
231
|
new builtin_plugin_1.WarnCaseSensitiveModulesPlugin().apply(compiler);
|
|
220
232
|
new builtin_plugin_1.WorkerPlugin(options.output.workerChunkLoading, options.output.workerWasmLoading, options.output.module, options.output.workerPublicPath).apply(compiler);
|
|
221
233
|
new DefaultStatsFactoryPlugin_1.DefaultStatsFactoryPlugin().apply(compiler);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
-
import { Compiler } from "../Compiler";
|
|
3
2
|
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
|
+
import { Compiler } from "../Compiler";
|
|
4
4
|
export type ConsumeSharedPluginOptions = {
|
|
5
5
|
consumes: Consumes;
|
|
6
6
|
shareScope?: string;
|
|
@@ -4,8 +4,8 @@ exports.ConsumeSharedPlugin = void 0;
|
|
|
4
4
|
const binding_1 = require("@rspack/binding");
|
|
5
5
|
const base_1 = require("../builtin-plugin/base");
|
|
6
6
|
const options_1 = require("../container/options");
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
7
|
const ShareRuntimePlugin_1 = require("./ShareRuntimePlugin");
|
|
8
|
+
const utils_1 = require("./utils");
|
|
9
9
|
class ConsumeSharedPlugin extends base_1.RspackBuiltinPlugin {
|
|
10
10
|
constructor(options) {
|
|
11
11
|
var _a;
|
|
@@ -33,11 +33,11 @@ exports.DefaultStatsFactoryPlugin = void 0;
|
|
|
33
33
|
* Copyright (c) JS Foundation and other contributors
|
|
34
34
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
35
35
|
*/
|
|
36
|
+
const util = __importStar(require("node:util"));
|
|
37
|
+
const Logger_1 = require("../logging/Logger");
|
|
36
38
|
const comparators_1 = require("../util/comparators");
|
|
37
39
|
const identifier_1 = require("../util/identifier");
|
|
38
|
-
const util = __importStar(require("node:util"));
|
|
39
40
|
const statsFactoryUtils_1 = require("./statsFactoryUtils");
|
|
40
|
-
const Logger_1 = require("../logging/Logger");
|
|
41
41
|
const compareIds = comparators_1.compareIds;
|
|
42
42
|
const GROUP_EXTENSION_REGEXP = /(\.[^.]+?)(?:\?|(?: \+ \d+ modules?)?$)/;
|
|
43
43
|
const GROUP_PATH_REGEXP = /(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/;
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
|
+
import { JsStats, JsStatsError, JsStatsWarning } from "@rspack/binding";
|
|
10
11
|
import { HookMap, SyncBailHook, SyncWaterfallHook } from "tapable";
|
|
11
|
-
import { GroupConfig } from "../util/smartGrouping";
|
|
12
12
|
import type { Compilation } from "../Compilation";
|
|
13
|
-
import {
|
|
13
|
+
import { GroupConfig } from "../util/smartGrouping";
|
|
14
14
|
export type KnownStatsFactoryContext = {
|
|
15
15
|
type: string;
|
|
16
16
|
makePathsRelative?: ((arg0: string) => string) | undefined;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StatsFactory = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* The following code is modified based on
|
|
6
|
-
* https://github.com/webpack/webpack/tree/4b4ca3bb53f36a5b8fc6bc1bd976ed7af161bd80/lib/stats
|
|
7
|
-
*
|
|
8
|
-
* MIT Licensed
|
|
9
|
-
* Author Tobias Koppers @sokra
|
|
10
|
-
* Copyright (c) JS Foundation and other contributors
|
|
11
|
-
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
12
|
-
*/
|
|
13
4
|
const tapable_1 = require("tapable");
|
|
14
5
|
const comparators_1 = require("../util/comparators");
|
|
15
6
|
const smartGrouping_1 = require("../util/smartGrouping");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HookMap, SyncBailHook, SyncWaterfallHook } from "tapable";
|
|
2
|
-
import type { StatsAsset, StatsChunk, StatsChunkGroup, StatsModule, StatsModuleReason
|
|
2
|
+
import type { StatsAsset, StatsChunk, StatsChunkGroup, StatsCompilation, StatsModule, StatsModuleReason } from "./statsFactoryUtils";
|
|
3
3
|
type PrintedElement = {
|
|
4
4
|
element: string;
|
|
5
5
|
content: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as binding from "@rspack/binding";
|
|
2
|
-
import { type Comparator } from "../util/comparators";
|
|
3
2
|
import type { Compilation } from "../Compilation";
|
|
4
3
|
import type { StatsOptions } from "../config";
|
|
4
|
+
import { type Comparator } from "../util/comparators";
|
|
5
5
|
import type { StatsFactory, StatsFactoryContext } from "./StatsFactory";
|
|
6
6
|
export type KnownStatsChunkGroup = binding.JsStatsChunkGroup;
|
|
7
7
|
export type KnownStatsChunk = binding.JsStatsChunk;
|
|
@@ -16,5 +16,5 @@ export declare const compareIds: (a: string | number, b: string | number) => -1
|
|
|
16
16
|
export declare const compareChunksById: (a: Chunk, b: Chunk) => -1 | 0 | 1;
|
|
17
17
|
export declare const compareChunkGroupsByIndex: (a: ChunkGroup, b: ChunkGroup) => -1 | 0 | 1;
|
|
18
18
|
export declare const compareSelect: <T, R>(getter: Selector<T, R>, comparator: Comparator) => Comparator;
|
|
19
|
-
export declare const compareNumbers: (a: number, b: number) =>
|
|
19
|
+
export declare const compareNumbers: (a: number, b: number) => 0 | 1 | -1;
|
|
20
20
|
export {};
|
package/dist/util/fs.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/util/fs.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
/// <reference types="node" />
|
|
11
|
+
/// <reference types="node" />
|
|
1
12
|
import { WatchOptions } from "../config";
|
|
2
13
|
export interface Watcher {
|
|
3
14
|
close(): void;
|
|
@@ -14,6 +25,58 @@ export interface WatcherInfo {
|
|
|
14
25
|
fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
|
|
15
26
|
contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
|
|
16
27
|
}
|
|
28
|
+
interface IDirent {
|
|
29
|
+
isFile: () => boolean;
|
|
30
|
+
isDirectory: () => boolean;
|
|
31
|
+
isBlockDevice: () => boolean;
|
|
32
|
+
isCharacterDevice: () => boolean;
|
|
33
|
+
isSymbolicLink: () => boolean;
|
|
34
|
+
isFIFO: () => boolean;
|
|
35
|
+
isSocket: () => boolean;
|
|
36
|
+
name: string | Buffer;
|
|
37
|
+
}
|
|
38
|
+
interface IStats {
|
|
39
|
+
isFile: () => boolean;
|
|
40
|
+
isDirectory: () => boolean;
|
|
41
|
+
isBlockDevice: () => boolean;
|
|
42
|
+
isCharacterDevice: () => boolean;
|
|
43
|
+
isSymbolicLink: () => boolean;
|
|
44
|
+
isFIFO: () => boolean;
|
|
45
|
+
isSocket: () => boolean;
|
|
46
|
+
dev: number | bigint;
|
|
47
|
+
ino: number | bigint;
|
|
48
|
+
mode: number | bigint;
|
|
49
|
+
nlink: number | bigint;
|
|
50
|
+
uid: number | bigint;
|
|
51
|
+
gid: number | bigint;
|
|
52
|
+
rdev: number | bigint;
|
|
53
|
+
size: number | bigint;
|
|
54
|
+
blksize: number | bigint;
|
|
55
|
+
blocks: number | bigint;
|
|
56
|
+
atimeMs: number | bigint;
|
|
57
|
+
mtimeMs: number | bigint;
|
|
58
|
+
ctimeMs: number | bigint;
|
|
59
|
+
birthtimeMs: number | bigint;
|
|
60
|
+
atime: Date;
|
|
61
|
+
mtime: Date;
|
|
62
|
+
ctime: Date;
|
|
63
|
+
birthtime: Date;
|
|
64
|
+
}
|
|
65
|
+
export interface OutputFileSystem {
|
|
66
|
+
writeFile: (arg0: string, arg1: string | Buffer, arg2: (arg0?: null | NodeJS.ErrnoException) => void) => void;
|
|
67
|
+
mkdir: (arg0: string, arg1: (arg0?: null | NodeJS.ErrnoException) => void) => void;
|
|
68
|
+
readdir: (arg0: string, arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: (string | Buffer)[] | IDirent[]) => void) => void;
|
|
69
|
+
rmdir: (arg0: string, arg1: (arg0?: null | NodeJS.ErrnoException) => void) => void;
|
|
70
|
+
unlink: (arg0: string, arg1: (arg0?: null | NodeJS.ErrnoException) => void) => void;
|
|
71
|
+
stat: (arg0: string, arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void) => void;
|
|
72
|
+
lstat?: (arg0: string, arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void) => void;
|
|
73
|
+
readFile: (arg0: string, arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void) => void;
|
|
74
|
+
join?: (arg0: string, arg1: string) => string;
|
|
75
|
+
relative?: (arg0: string, arg1: string) => string;
|
|
76
|
+
dirname?: (arg0: string) => string;
|
|
77
|
+
}
|
|
78
|
+
export declare function rmrf(fs: OutputFileSystem, p: string, callback: (err?: Error | null) => void): void;
|
|
79
|
+
export declare const mkdirp: (fs: OutputFileSystem, p: string, callback: (error?: Error) => void) => void;
|
|
17
80
|
export interface FileSystemInfoEntry {
|
|
18
81
|
safeTime: number;
|
|
19
82
|
timestamp?: number;
|
|
@@ -21,3 +84,4 @@ export interface FileSystemInfoEntry {
|
|
|
21
84
|
export interface WatchFileSystem {
|
|
22
85
|
watch(files: Iterable<string>, directories: Iterable<string>, missing: Iterable<string>, startTime: number, options: WatchOptions, callback: (error: Error | null, fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">, contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">, changedFiles: Set<string>, removedFiles: Set<string>) => void, callbackUndelayed: (fileName: string, changeTime: number) => void): Watcher;
|
|
23
86
|
}
|
|
87
|
+
export {};
|