weboptimizer 2.0.1250 → 2.0.1251
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/ejsLoader.d.ts +5 -5
- package/package.json +3 -8
- package/type.d.ts +22 -22
package/ejsLoader.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { Encoding, Mapping } from 'clientnode/type';
|
|
|
2
2
|
import { Options, TemplateFunction as EJSTemplateFunction } from 'ejs';
|
|
3
3
|
import { LoaderContext } from 'webpack';
|
|
4
4
|
import { Extensions, Replacements } from './type';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export type PreCompiledTemplateFunction = ((...parameters: Array<unknown>) => string);
|
|
6
|
+
export type TemplateFunction = EJSTemplateFunction | PreCompiledTemplateFunction;
|
|
7
|
+
export type CompilerOptions = Options & {
|
|
8
8
|
encoding: Encoding;
|
|
9
9
|
isString?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type CompileFunction = (template: string, options?: Partial<CompilerOptions>, compileSteps?: number) => TemplateFunction;
|
|
12
|
+
export type LoaderConfiguration = Mapping<unknown> & {
|
|
13
13
|
compiler: Partial<CompilerOptions>;
|
|
14
14
|
compileSteps: number;
|
|
15
15
|
compress: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1251",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -114,7 +114,6 @@
|
|
|
114
114
|
"@babel/cli": "*",
|
|
115
115
|
"@babel/eslint-parser": "*",
|
|
116
116
|
"@types/ejs": "*",
|
|
117
|
-
"@types/favicons": "*",
|
|
118
117
|
"@types/html-minifier": "*",
|
|
119
118
|
"@types/html-minifier-terser": "*",
|
|
120
119
|
"@types/imagemin": "*",
|
|
@@ -159,7 +158,6 @@
|
|
|
159
158
|
"@babel/eslint-parser": "*",
|
|
160
159
|
"@babel/preset-react": "*",
|
|
161
160
|
"@types/ejs": "*",
|
|
162
|
-
"@types/favicons": "*",
|
|
163
161
|
"@types/html-minifier": "*",
|
|
164
162
|
"@types/imagemin": "*",
|
|
165
163
|
"@types/node": "*",
|
|
@@ -205,9 +203,6 @@
|
|
|
205
203
|
"@types/ejs": {
|
|
206
204
|
"optional": true
|
|
207
205
|
},
|
|
208
|
-
"@types/favicons": {
|
|
209
|
-
"optional": true
|
|
210
|
-
},
|
|
211
206
|
"@types/html-minifier": {
|
|
212
207
|
"optional": true
|
|
213
208
|
},
|
|
@@ -303,8 +298,8 @@
|
|
|
303
298
|
}
|
|
304
299
|
},
|
|
305
300
|
"engines": {
|
|
306
|
-
"node": ">=
|
|
307
|
-
"npm": ">=
|
|
301
|
+
"node": ">=19",
|
|
302
|
+
"npm": ">=8"
|
|
308
303
|
},
|
|
309
304
|
"resolutions": {
|
|
310
305
|
"@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz",
|
package/type.d.ts
CHANGED
|
@@ -34,23 +34,23 @@ export interface PackageDescriptor {
|
|
|
34
34
|
configuration: PackageConfiguration;
|
|
35
35
|
filePath: string;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
38
|
-
export
|
|
37
|
+
export type Replacements = Mapping<SecondParameter<string['replace']>>;
|
|
38
|
+
export type Resolvable = {
|
|
39
39
|
[_K in '__evaluate__' | '__execute__' | string]: Resolvable | string | unknown;
|
|
40
40
|
};
|
|
41
41
|
export interface RedundantRequest {
|
|
42
42
|
path: string;
|
|
43
43
|
version: string;
|
|
44
44
|
}
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
45
|
+
export type ExternalAliases = Mapping<Mapping | string | ((_request: string, _key: string) => string)>;
|
|
46
|
+
export type GivenInjection = AnyFunction | string | Array<string> | Mapping<string | Array<string>>;
|
|
47
|
+
export type NormalizedGivenInjection = Mapping<Array<string>>;
|
|
48
48
|
export interface GivenInjectionConfiguration {
|
|
49
49
|
autoExclude: Array<string>;
|
|
50
50
|
entry: GivenInjection;
|
|
51
51
|
external: GivenInjection;
|
|
52
52
|
}
|
|
53
|
-
export
|
|
53
|
+
export type IgnorePattern = WebpackIgnorePlugin['options'] | {
|
|
54
54
|
contextRegExp?: string;
|
|
55
55
|
resourceRegExp?: string;
|
|
56
56
|
};
|
|
@@ -120,17 +120,17 @@ export interface PathConfiguration extends BasePathConfiguration {
|
|
|
120
120
|
pattern: Array<string>;
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
export
|
|
123
|
+
export type DefaultPathConfiguration = BasePathConfiguration & Resolvable;
|
|
124
124
|
export interface BuildConfigurationItem {
|
|
125
125
|
extension: string;
|
|
126
126
|
ignoredExtension: string;
|
|
127
127
|
filePathPattern: string;
|
|
128
128
|
outputExtension: string;
|
|
129
129
|
}
|
|
130
|
-
export
|
|
130
|
+
export type BuildConfiguration = Mapping<BuildConfigurationItem>;
|
|
131
131
|
export declare const SubConfigurationTypes: readonly ["debug", "document", "test", "test:browser"];
|
|
132
132
|
export declare const TaskTypes: readonly ["build", "serve", "debug", "document", "test", "test:browser"];
|
|
133
|
-
export
|
|
133
|
+
export type BooleanExpression = boolean | null | string;
|
|
134
134
|
export interface AdditionalLoaderConfiguration {
|
|
135
135
|
exclude?: BooleanExpression;
|
|
136
136
|
include?: BooleanExpression;
|
|
@@ -149,7 +149,7 @@ export interface WebpackLoader {
|
|
|
149
149
|
loader: string;
|
|
150
150
|
options?: Mapping<unknown>;
|
|
151
151
|
}
|
|
152
|
-
export
|
|
152
|
+
export type ResourceLoaderConfiguration = WebpackLoader & {
|
|
153
153
|
exclude: BooleanExpression;
|
|
154
154
|
include: BooleanExpression;
|
|
155
155
|
loader: Array<string>;
|
|
@@ -164,7 +164,7 @@ export interface WebpackLoaderConfiguration {
|
|
|
164
164
|
test: RegExp;
|
|
165
165
|
use: Array<WebpackLoader> | WebpackLoader;
|
|
166
166
|
}
|
|
167
|
-
export
|
|
167
|
+
export type WebpackLoaderIndicator = WebpackRuleSetRule['include'];
|
|
168
168
|
export interface Command {
|
|
169
169
|
arguments: Array<string>;
|
|
170
170
|
command: string;
|
|
@@ -179,7 +179,7 @@ export interface CommandLineArguments {
|
|
|
179
179
|
'test:browser': Array<Command> | Command;
|
|
180
180
|
'check:types': Array<Command> | Command;
|
|
181
181
|
}
|
|
182
|
-
export
|
|
182
|
+
export type NodeEnvironment = BaseWebpackConfiguration['node'] & {
|
|
183
183
|
'#': string;
|
|
184
184
|
};
|
|
185
185
|
export interface PluginConfiguration {
|
|
@@ -202,7 +202,7 @@ export interface DefaultConfiguration {
|
|
|
202
202
|
test: PlainObject;
|
|
203
203
|
'test:browser': PlainObject;
|
|
204
204
|
}
|
|
205
|
-
export
|
|
205
|
+
export type ExportFormat = 'amd' | 'amd-require' | 'assign' | 'global' | 'jsonp' | 'var' | 'this' | 'commonjs' | 'commonjs2' | 'umd';
|
|
206
206
|
export interface HTMLConfiguration {
|
|
207
207
|
filename: string;
|
|
208
208
|
template: {
|
|
@@ -391,16 +391,16 @@ export interface ResolvedConfiguration {
|
|
|
391
391
|
'test:browser': PlainObject;
|
|
392
392
|
webpack: WebpackConfiguration;
|
|
393
393
|
}
|
|
394
|
-
export
|
|
395
|
-
export
|
|
394
|
+
export type ResolvedBuildConfiguration = Array<ResolvedBuildConfigurationItem>;
|
|
395
|
+
export type RuntimeInformation = PlainObject & {
|
|
396
396
|
givenCommandLineArguments: Array<string>;
|
|
397
397
|
};
|
|
398
398
|
export interface WebpackConfiguration extends BaseWebpackConfiguration {
|
|
399
399
|
devServer: Mapping<unknown>;
|
|
400
400
|
replaceWebOptimizer: WebpackConfiguration;
|
|
401
401
|
}
|
|
402
|
-
export
|
|
403
|
-
export
|
|
402
|
+
export type RuleSet = Array<WebpackRuleSetUseItem>;
|
|
403
|
+
export type RuleSetRule = WebpackRuleSetRule & {
|
|
404
404
|
use: RuleSet;
|
|
405
405
|
};
|
|
406
406
|
export interface GenericLoader {
|
|
@@ -424,7 +424,7 @@ export interface GenericLoader {
|
|
|
424
424
|
image: RuleSetRule;
|
|
425
425
|
data: RuleSetRule;
|
|
426
426
|
}
|
|
427
|
-
export
|
|
427
|
+
export type Loader = GenericLoader & Mapping<WebpackRuleSetRule>;
|
|
428
428
|
export interface EvaluationScope {
|
|
429
429
|
configuration: ResolvedConfiguration;
|
|
430
430
|
isFilePathInDependencies: (_filePath: string) => boolean;
|
|
@@ -442,8 +442,8 @@ export interface WebpackAssets extends WebpackBaseAssets {
|
|
|
442
442
|
publicPath: string;
|
|
443
443
|
plugin: HtmlWebpackPlugin;
|
|
444
444
|
}
|
|
445
|
-
export
|
|
446
|
-
export
|
|
445
|
+
export type WebpackPlugin = webpackLibrary.AbstractLibraryPlugin<unknown> & Mapping<unknown>;
|
|
446
|
+
export type WebpackPlugins = Mapping<WebpackPlugin> & {
|
|
447
447
|
Favicon?: typeof FaviconWebpackPlugin;
|
|
448
448
|
GenerateServiceWorker?: typeof OfflinePlugin.GenerateSW;
|
|
449
449
|
HTML?: typeof HtmlWebpackPlugin;
|
|
@@ -456,8 +456,8 @@ export declare type WebpackPlugins = Mapping<WebpackPlugin> & {
|
|
|
456
456
|
MiniCSSExtract?: typeof MiniCSSExtractPlugin;
|
|
457
457
|
Terser?: typeof TerserWebpackPlugin;
|
|
458
458
|
};
|
|
459
|
-
export
|
|
460
|
-
export
|
|
459
|
+
export type WebpackResolveData = Parameters<WebpackIgnorePlugin['checkIgnore']>[0];
|
|
460
|
+
export type WebpackExtendedResolveData = WebpackResolveData & {
|
|
461
461
|
createData: {
|
|
462
462
|
rawRequest: string;
|
|
463
463
|
request: string;
|