weboptimizer 2.0.1244 → 2.0.1245
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 +0 -1
- package/ejsLoader.js +0 -1
- package/helper.d.ts +0 -19
- package/helper.js +0 -19
- package/package.json +1 -1
package/ejsLoader.d.ts
CHANGED
package/ejsLoader.js
CHANGED
|
@@ -42,7 +42,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
42
42
|
var configuration = (0, _configurator["default"])();
|
|
43
43
|
/**
|
|
44
44
|
* Main transformation function.
|
|
45
|
-
* @param this - Loader context.
|
|
46
45
|
* @param source - Input string to transform.
|
|
47
46
|
*
|
|
48
47
|
* @returns Transformed string.
|
package/helper.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export declare class Helper {
|
|
|
8
8
|
/**
|
|
9
9
|
* Determines whether given file path is within given list of file
|
|
10
10
|
* locations.
|
|
11
|
-
* @param this - Indicates an unbound method.
|
|
12
11
|
* @param filePath - Path to file to check.
|
|
13
12
|
* @param locationsToCheck - Locations to take into account.
|
|
14
13
|
*
|
|
@@ -19,7 +18,6 @@ export declare class Helper {
|
|
|
19
18
|
/**
|
|
20
19
|
* Strips loader informations form given module request including loader
|
|
21
20
|
* prefix and query parameter.
|
|
22
|
-
* @param this - Indicates an unbound method.
|
|
23
21
|
* @param moduleID - Module request to strip.
|
|
24
22
|
*
|
|
25
23
|
* @returns Given module id stripped.
|
|
@@ -27,7 +25,6 @@ export declare class Helper {
|
|
|
27
25
|
static stripLoader(this: void, moduleID: string): string;
|
|
28
26
|
/**
|
|
29
27
|
* Converts given list of path to a normalized list with unique values.
|
|
30
|
-
* @param this - Indicates an unbound method.
|
|
31
28
|
* @param paths - File paths.
|
|
32
29
|
*
|
|
33
30
|
* @returns The given file path list with normalized unique values.
|
|
@@ -36,7 +33,6 @@ export declare class Helper {
|
|
|
36
33
|
/**
|
|
37
34
|
* Applies file path/name placeholder replacements with given bundle
|
|
38
35
|
* associated informations.
|
|
39
|
-
* @param this - Indicates an unbound method.
|
|
40
36
|
* @param template - File path to process placeholder in.
|
|
41
37
|
* @param scope - Scope to use for processing.
|
|
42
38
|
*
|
|
@@ -46,7 +42,6 @@ export declare class Helper {
|
|
|
46
42
|
/**
|
|
47
43
|
* Converts given request to a resolved request with given context
|
|
48
44
|
* embedded.
|
|
49
|
-
* @param this - Indicates an unbound method.
|
|
50
45
|
* @param request - Request to determine.
|
|
51
46
|
* @param context - Context of given request to resolve relative to.
|
|
52
47
|
* @param referencePath - Path to resolve local modules relative to.
|
|
@@ -62,7 +57,6 @@ export declare class Helper {
|
|
|
62
57
|
/**
|
|
63
58
|
* Check if given request points to an external dependency not maintained
|
|
64
59
|
* by current package context.
|
|
65
|
-
* @param this - Indicates an unbound method.
|
|
66
60
|
* @param request - Request to determine.
|
|
67
61
|
* @param context - Context of current project.
|
|
68
62
|
* @param requestContext - Context of given request to resolve relative to.
|
|
@@ -102,7 +96,6 @@ export declare class Helper {
|
|
|
102
96
|
static determineExternalRequest(this: void, request: string, context?: string, requestContext?: string, normalizedGivenInjection?: NormalizedGivenInjection, relativeExternalModuleLocations?: Array<string>, aliases?: Mapping, moduleReplacements?: Replacements, extensions?: Extensions, referencePath?: string, pathsToIgnore?: Array<string>, relativeModuleLocations?: Array<string>, packageEntryFileNames?: Array<string>, packageMainPropertyNames?: Array<string>, packageAliasPropertyNames?: Array<string>, includePattern?: Array<string | RegExp>, excludePattern?: Array<string | RegExp>, inPlaceNormalLibrary?: boolean, inPlaceDynamicLibrary?: boolean, encoding?: Encoding): null | string;
|
|
103
97
|
/**
|
|
104
98
|
* Determines asset type of given file.
|
|
105
|
-
* @param this - Indicates an unbound method.
|
|
106
99
|
* @param filePath - Path to file to analyse.
|
|
107
100
|
* @param buildConfiguration - Meta informations for available asset
|
|
108
101
|
* types.
|
|
@@ -118,7 +111,6 @@ export declare class Helper {
|
|
|
118
111
|
* matches each build configuration in given entry path and converts given
|
|
119
112
|
* build configuration into a sorted array were javaScript files takes
|
|
120
113
|
* precedence.
|
|
121
|
-
* @param this - Indicates an unbound method.
|
|
122
114
|
* @param configuration - Given build configurations.
|
|
123
115
|
* @param entryPath - Path to analyse nested structure.
|
|
124
116
|
* @param pathsToIgnore - Paths which marks location to ignore.
|
|
@@ -130,7 +122,6 @@ export declare class Helper {
|
|
|
130
122
|
/**
|
|
131
123
|
* Determines all file and directory paths related to given internal
|
|
132
124
|
* modules as array.
|
|
133
|
-
* @param this - Indicates an unbound method.
|
|
134
125
|
* @param givenInjection - List of module ids or module file paths.
|
|
135
126
|
* @param aliases - Mapping of aliases to take into account.
|
|
136
127
|
* @param moduleReplacements - Mapping of module replacements to take into
|
|
@@ -161,7 +152,6 @@ export declare class Helper {
|
|
|
161
152
|
/**
|
|
162
153
|
* Determines a list of concrete file paths for given module id pointing to
|
|
163
154
|
* a folder which isn't a package.
|
|
164
|
-
* @param this - Indicates an unbound method.
|
|
165
155
|
* @param normalizedGivenInjection - Injection data structure of modules
|
|
166
156
|
* with folder references to resolve.
|
|
167
157
|
* @param aliases - Mapping of aliases to take into account.
|
|
@@ -178,7 +168,6 @@ export declare class Helper {
|
|
|
178
168
|
* Every injection definition type can be represented as plain object
|
|
179
169
|
* (mapping from chunk name to array of module ids). This method converts
|
|
180
170
|
* each representation into the normalized plain object notation.
|
|
181
|
-
* @param this - Indicates an unbound method.
|
|
182
171
|
* @param givenInjection - Given entry injection to normalize.
|
|
183
172
|
*
|
|
184
173
|
* @returns Normalized representation of given entry injection.
|
|
@@ -187,7 +176,6 @@ export declare class Helper {
|
|
|
187
176
|
/**
|
|
188
177
|
* Determines all concrete file paths for given injection which are marked
|
|
189
178
|
* with the "__auto__" indicator.
|
|
190
|
-
* @param this - Indicates an unbound method.
|
|
191
179
|
* @param givenInjection - Given entry and external injection to take
|
|
192
180
|
* into account.
|
|
193
181
|
* @param buildConfigurations - Resolved build configuration.
|
|
@@ -206,7 +194,6 @@ export declare class Helper {
|
|
|
206
194
|
static resolveAutoInjection<T extends GivenInjectionConfiguration>(this: void, givenInjection: T, buildConfigurations: ResolvedBuildConfiguration, aliases?: Mapping, moduleReplacements?: Replacements, extensions?: Extensions, context?: string, referencePath?: string, pathsToIgnore?: Array<string>): T;
|
|
207
195
|
/**
|
|
208
196
|
* Determines all module file paths.
|
|
209
|
-
* @param this - Indicates an unbound method.
|
|
210
197
|
* @param buildConfigurations - Resolved build configuration.
|
|
211
198
|
* @param moduleFilePathsToExclude - A list of modules file paths to
|
|
212
199
|
* exclude (specified by path or id) or a mapping from chunk names to
|
|
@@ -218,7 +205,6 @@ export declare class Helper {
|
|
|
218
205
|
static getAutoInjection(this: void, buildConfigurations: ResolvedBuildConfiguration, moduleFilePathsToExclude: Array<string>, context: string): Mapping;
|
|
219
206
|
/**
|
|
220
207
|
* Determines a resolved module file path in given package path.
|
|
221
|
-
* @param this - Indicates an unbound method.
|
|
222
208
|
* @param packagePath - Path to package to resolve in.
|
|
223
209
|
* @param packageMainPropertyNames - List of package file main property
|
|
224
210
|
* names to search for package representing entry module definitions.
|
|
@@ -234,7 +220,6 @@ export declare class Helper {
|
|
|
234
220
|
};
|
|
235
221
|
/**
|
|
236
222
|
* Determines a concrete file path for given module id.
|
|
237
|
-
* @param this - Indicates an unbound method.
|
|
238
223
|
* @param moduleID - Module id to determine.
|
|
239
224
|
* @param aliases - Mapping of aliases to take into account.
|
|
240
225
|
* @param moduleReplacements - Mapping of replacements to take into
|
|
@@ -261,7 +246,6 @@ export declare class Helper {
|
|
|
261
246
|
static determineModuleFilePath(this: void, moduleID: false | string, aliases?: Mapping, moduleReplacements?: Replacements, extensions?: SpecificExtensions, context?: string, referencePath?: string, pathsToIgnore?: Array<string>, relativeModuleLocations?: Array<string>, packageEntryFileNames?: Array<string>, packageMainPropertyNames?: Array<string>, packageAliasPropertyNames?: Array<string>, encoding?: Encoding): null | string;
|
|
262
247
|
/**
|
|
263
248
|
* Determines a concrete file path for given module id.
|
|
264
|
-
* @param this - Indicates an unbound method.
|
|
265
249
|
* @param moduleID - Module id to determine.
|
|
266
250
|
* @param aliases - Mapping of aliases to take into account.
|
|
267
251
|
*
|
|
@@ -270,7 +254,6 @@ export declare class Helper {
|
|
|
270
254
|
static applyAliases(this: void, moduleID: string, aliases: Mapping): string;
|
|
271
255
|
/**
|
|
272
256
|
* Determines a concrete file path for given module id.
|
|
273
|
-
* @param this - Indicates an unbound method.
|
|
274
257
|
* @param moduleID - Module id to determine.
|
|
275
258
|
* @param replacements - Mapping of regular expressions to their
|
|
276
259
|
* corresponding replacements.
|
|
@@ -280,7 +263,6 @@ export declare class Helper {
|
|
|
280
263
|
static applyModuleReplacements(this: void, moduleID: false | string, replacements: Replacements): false | string;
|
|
281
264
|
/**
|
|
282
265
|
* Determines the nearest package configuration file from given file path.
|
|
283
|
-
* @param this - Indicates an unbound method.
|
|
284
266
|
* @param start - Reference location to search from.
|
|
285
267
|
* @param fileName - Package configuration file name.
|
|
286
268
|
*
|
|
@@ -290,7 +272,6 @@ export declare class Helper {
|
|
|
290
272
|
/**
|
|
291
273
|
* Determines the nearest package configuration from given module file
|
|
292
274
|
* path.
|
|
293
|
-
* @param this - Indicates an unbound method.
|
|
294
275
|
* @param modulePath - Module path to take as reference location (leaf in
|
|
295
276
|
* tree).
|
|
296
277
|
* @param fileName - Package configuration file name.
|
package/helper.js
CHANGED
|
@@ -56,7 +56,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
56
56
|
/**
|
|
57
57
|
* Determines whether given file path is within given list of file
|
|
58
58
|
* locations.
|
|
59
|
-
* @param this - Indicates an unbound method.
|
|
60
59
|
* @param filePath - Path to file to check.
|
|
61
60
|
* @param locationsToCheck - Locations to take into account.
|
|
62
61
|
*
|
|
@@ -83,7 +82,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
83
82
|
/**
|
|
84
83
|
* Strips loader informations form given module request including loader
|
|
85
84
|
* prefix and query parameter.
|
|
86
|
-
* @param this - Indicates an unbound method.
|
|
87
85
|
* @param moduleID - Module request to strip.
|
|
88
86
|
*
|
|
89
87
|
* @returns Given module id stripped.
|
|
@@ -98,7 +96,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
98
96
|
// region array
|
|
99
97
|
/**
|
|
100
98
|
* Converts given list of path to a normalized list with unique values.
|
|
101
|
-
* @param this - Indicates an unbound method.
|
|
102
99
|
* @param paths - File paths.
|
|
103
100
|
*
|
|
104
101
|
* @returns The given file path list with normalized unique values.
|
|
@@ -117,7 +114,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
117
114
|
/**
|
|
118
115
|
* Applies file path/name placeholder replacements with given bundle
|
|
119
116
|
* associated informations.
|
|
120
|
-
* @param this - Indicates an unbound method.
|
|
121
117
|
* @param template - File path to process placeholder in.
|
|
122
118
|
* @param scope - Scope to use for processing.
|
|
123
119
|
*
|
|
@@ -146,7 +142,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
146
142
|
/**
|
|
147
143
|
* Converts given request to a resolved request with given context
|
|
148
144
|
* embedded.
|
|
149
|
-
* @param this - Indicates an unbound method.
|
|
150
145
|
* @param request - Request to determine.
|
|
151
146
|
* @param context - Context of given request to resolve relative to.
|
|
152
147
|
* @param referencePath - Path to resolve local modules relative to.
|
|
@@ -197,7 +192,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
197
192
|
/**
|
|
198
193
|
* Check if given request points to an external dependency not maintained
|
|
199
194
|
* by current package context.
|
|
200
|
-
* @param this - Indicates an unbound method.
|
|
201
195
|
* @param request - Request to determine.
|
|
202
196
|
* @param context - Context of current project.
|
|
203
197
|
* @param requestContext - Context of given request to resolve relative to.
|
|
@@ -324,7 +318,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
324
318
|
}
|
|
325
319
|
/**
|
|
326
320
|
* Determines asset type of given file.
|
|
327
|
-
* @param this - Indicates an unbound method.
|
|
328
321
|
* @param filePath - Path to file to analyse.
|
|
329
322
|
* @param buildConfiguration - Meta informations for available asset
|
|
330
323
|
* types.
|
|
@@ -360,7 +353,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
360
353
|
* matches each build configuration in given entry path and converts given
|
|
361
354
|
* build configuration into a sorted array were javaScript files takes
|
|
362
355
|
* precedence.
|
|
363
|
-
* @param this - Indicates an unbound method.
|
|
364
356
|
* @param configuration - Given build configurations.
|
|
365
357
|
* @param entryPath - Path to analyse nested structure.
|
|
366
358
|
* @param pathsToIgnore - Paths which marks location to ignore.
|
|
@@ -415,7 +407,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
415
407
|
/**
|
|
416
408
|
* Determines all file and directory paths related to given internal
|
|
417
409
|
* modules as array.
|
|
418
|
-
* @param this - Indicates an unbound method.
|
|
419
410
|
* @param givenInjection - List of module ids or module file paths.
|
|
420
411
|
* @param aliases - Mapping of aliases to take into account.
|
|
421
412
|
* @param moduleReplacements - Mapping of module replacements to take into
|
|
@@ -488,7 +479,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
488
479
|
/**
|
|
489
480
|
* Determines a list of concrete file paths for given module id pointing to
|
|
490
481
|
* a folder which isn't a package.
|
|
491
|
-
* @param this - Indicates an unbound method.
|
|
492
482
|
* @param normalizedGivenInjection - Injection data structure of modules
|
|
493
483
|
* with folder references to resolve.
|
|
494
484
|
* @param aliases - Mapping of aliases to take into account.
|
|
@@ -555,7 +545,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
555
545
|
* Every injection definition type can be represented as plain object
|
|
556
546
|
* (mapping from chunk name to array of module ids). This method converts
|
|
557
547
|
* each representation into the normalized plain object notation.
|
|
558
|
-
* @param this - Indicates an unbound method.
|
|
559
548
|
* @param givenInjection - Given entry injection to normalize.
|
|
560
549
|
*
|
|
561
550
|
* @returns Normalized representation of given entry injection.
|
|
@@ -607,7 +596,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
607
596
|
/**
|
|
608
597
|
* Determines all concrete file paths for given injection which are marked
|
|
609
598
|
* with the "__auto__" indicator.
|
|
610
|
-
* @param this - Indicates an unbound method.
|
|
611
599
|
* @param givenInjection - Given entry and external injection to take
|
|
612
600
|
* into account.
|
|
613
601
|
* @param buildConfigurations - Resolved build configuration.
|
|
@@ -681,7 +669,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
681
669
|
}
|
|
682
670
|
/**
|
|
683
671
|
* Determines all module file paths.
|
|
684
|
-
* @param this - Indicates an unbound method.
|
|
685
672
|
* @param buildConfigurations - Resolved build configuration.
|
|
686
673
|
* @param moduleFilePathsToExclude - A list of modules file paths to
|
|
687
674
|
* exclude (specified by path or id) or a mapping from chunk names to
|
|
@@ -747,7 +734,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
747
734
|
// TODO test
|
|
748
735
|
/**
|
|
749
736
|
* Determines a resolved module file path in given package path.
|
|
750
|
-
* @param this - Indicates an unbound method.
|
|
751
737
|
* @param packagePath - Path to package to resolve in.
|
|
752
738
|
* @param packageMainPropertyNames - List of package file main property
|
|
753
739
|
* names to search for package representing entry module definitions.
|
|
@@ -814,7 +800,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
814
800
|
}
|
|
815
801
|
/**
|
|
816
802
|
* Determines a concrete file path for given module id.
|
|
817
|
-
* @param this - Indicates an unbound method.
|
|
818
803
|
* @param moduleID - Module id to determine.
|
|
819
804
|
* @param aliases - Mapping of aliases to take into account.
|
|
820
805
|
* @param moduleReplacements - Mapping of replacements to take into
|
|
@@ -933,7 +918,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
933
918
|
// endregion
|
|
934
919
|
/**
|
|
935
920
|
* Determines a concrete file path for given module id.
|
|
936
|
-
* @param this - Indicates an unbound method.
|
|
937
921
|
* @param moduleID - Module id to determine.
|
|
938
922
|
* @param aliases - Mapping of aliases to take into account.
|
|
939
923
|
*
|
|
@@ -954,7 +938,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
954
938
|
}
|
|
955
939
|
/**
|
|
956
940
|
* Determines a concrete file path for given module id.
|
|
957
|
-
* @param this - Indicates an unbound method.
|
|
958
941
|
* @param moduleID - Module id to determine.
|
|
959
942
|
* @param replacements - Mapping of regular expressions to their
|
|
960
943
|
* corresponding replacements.
|
|
@@ -975,7 +958,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
975
958
|
}
|
|
976
959
|
/**
|
|
977
960
|
* Determines the nearest package configuration file from given file path.
|
|
978
|
-
* @param this - Indicates an unbound method.
|
|
979
961
|
* @param start - Reference location to search from.
|
|
980
962
|
* @param fileName - Package configuration file name.
|
|
981
963
|
*
|
|
@@ -1003,7 +985,6 @@ var Helper = /*#__PURE__*/function () {
|
|
|
1003
985
|
/**
|
|
1004
986
|
* Determines the nearest package configuration from given module file
|
|
1005
987
|
* path.
|
|
1006
|
-
* @param this - Indicates an unbound method.
|
|
1007
988
|
* @param modulePath - Module path to take as reference location (leaf in
|
|
1008
989
|
* tree).
|
|
1009
990
|
* @param fileName - Package configuration file name.
|