weboptimizer 2.0.1491 → 2.0.1492

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/helper.d.ts CHANGED
@@ -2,265 +2,246 @@ import { Encoding, Mapping } from 'clientnode';
2
2
  import { BuildConfiguration, Extensions, GivenInjection, GivenInjectionConfiguration, NormalizedGivenInjection, PathConfiguration, PackageDescriptor, Replacements, ResolvedBuildConfiguration, SpecificExtensions } from './type';
3
3
  export declare const KNOWN_FILE_EXTENSIONS: Array<string>;
4
4
  /**
5
- * Provides a class of static methods with generic use cases.
5
+ * Determines whether given file path is within given list of file locations.
6
+ * @param filePath - Path to file to check.
7
+ * @param locationsToCheck - Locations to take into account.
8
+ * @returns Value "true" if given file path is within one of given locations or
9
+ * "false" otherwise.
6
10
  */
7
- export declare class Helper {
8
- /**
9
- * Determines whether given file path is within given list of file
10
- * locations.
11
- * @param filePath - Path to file to check.
12
- * @param locationsToCheck - Locations to take into account.
13
- * @returns Value "true" if given file path is within one of given
14
- * locations or "false" otherwise.
15
- */
16
- static isFilePathInLocation(this: void, filePath: string, locationsToCheck: Array<string>): boolean;
17
- /**
18
- * Strips loader informations form given module request including loader
19
- * prefix and query parameter.
20
- * @param moduleID - Module request to strip.
21
- * @returns Given module id stripped.
22
- */
23
- static stripLoader(this: void, moduleID: string): string;
24
- /**
25
- * Converts given list of path to a normalized list with unique values.
26
- * @param paths - File paths.
27
- * @returns The given file path list with normalized unique values.
28
- */
29
- static normalizePaths(this: void, paths: Array<string>): Array<string>;
30
- /**
31
- * Applies file path/name placeholder replacements with given bundle
32
- * associated informations.
33
- * @param template - File path to process placeholder in.
34
- * @param scope - Scope to use for processing.
35
- * @returns Processed file path.
36
- */
37
- static renderFilePathTemplate(this: void, template: string, scope?: Mapping<number | string>): string;
38
- /**
39
- * Converts given request to a resolved request with given context
40
- * embedded.
41
- * @param request - Request to determine.
42
- * @param context - Context of given request to resolve relative to.
43
- * @param referencePath - Path to resolve local modules relative to.
44
- * @param aliases - Mapping of aliases to take into account.
45
- * @param moduleReplacements - Mapping of replacements to take into
46
- * account.
47
- * @param relativeModuleLocations - List of relative directory paths to
48
- * search for modules in.
49
- * @returns A new resolved request.
50
- */
51
- static applyContext(this: void, request: string, context?: string, referencePath?: string, aliases?: Mapping, moduleReplacements?: Replacements, relativeModuleLocations?: Array<string>): false | string;
52
- /**
53
- * Check if given request points to an external dependency not maintained
54
- * by current package context.
55
- * @param request - Request to determine.
56
- * @param context - Context of current project.
57
- * @param requestContext - Context of given request to resolve relative to.
58
- * @param normalizedGivenInjection - Mapping of chunk names to modules
59
- * which should be injected.
60
- * @param relativeExternalModuleLocations - Array of paths where external
61
- * modules take place.
62
- * @param aliases - Mapping of aliases to take into account.
63
- * @param moduleReplacements - Mapping of replacements to take into
64
- * account.
65
- * @param extensions - List of file and module extensions to take into
66
- * account.
67
- * @param referencePath - Path to resolve local modules relative to.
68
- * @param pathsToIgnore - Paths which marks location to ignore.
69
- * @param relativeModuleLocations - List of relative file path to search
70
- * for modules in.
71
- * @param packageEntryFileNames - List of package entry file names to
72
- * search for. The magic name "__package__" will search for an appreciate
73
- * entry in a "package.json" file.
74
- * @param packageMainPropertyNames - List of package file main property
75
- * names to search for package representing entry module definitions.
76
- * @param packageAliasPropertyNames - List of package file alias property
77
- * names to search for package specific module aliases.
78
- * @param includePattern - Array of regular expressions to explicitly mark
79
- * as external dependency.
80
- * @param excludePattern - Array of regular expressions to explicitly mark
81
- * as internal dependency.
82
- * @param inPlaceNormalLibrary - Indicates whether normal libraries should
83
- * be external or not.
84
- * @param inPlaceDynamicLibrary - Indicates whether requests with
85
- * integrated loader configurations should be marked as external or not.
86
- * @param encoding - Encoding for file names to use during file traversing.
87
- * @returns A new resolved request indicating whether given request is an
88
- * external one.
89
- */
90
- 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;
91
- /**
92
- * Determines asset type of given file.
93
- * @param filePath - Path to file to analyse.
94
- * @param buildConfiguration - Meta informations for available asset
95
- * types.
96
- * @param paths - List of paths to search if given path doesn't reference
97
- * a file directly.
98
- * @returns Determined file type or "null" of given file couldn't be
99
- * determined.
100
- */
101
- static determineAssetType(this: void, filePath: string, buildConfiguration: BuildConfiguration, paths: PathConfiguration): null | string;
102
- /**
103
- * Adds a property with a stored array of all matching file paths, which
104
- * matches each build configuration in given entry path and converts given
105
- * build configuration into a sorted array were javaScript files takes
106
- * precedence.
107
- * @param configuration - Given build configurations.
108
- * @param entryPath - Path to analyse nested structure.
109
- * @param pathsToIgnore - Paths which marks location to ignore.
110
- * @param mainFileBasenames - File basenames to sort into the front.
111
- * @returns Converted build configuration.
112
- */
113
- static resolveBuildConfigurationFilePaths(this: void, configuration: BuildConfiguration, entryPath?: string, pathsToIgnore?: Array<string>, mainFileBasenames?: Array<string>): ResolvedBuildConfiguration;
114
- /**
115
- * Determines all file and directory paths related to given internal
116
- * modules as array.
117
- * @param givenInjection - List of module ids or module file paths.
118
- * @param aliases - Mapping of aliases to take into account.
119
- * @param moduleReplacements - Mapping of module replacements to take into
120
- * account.
121
- * @param extensions - List of file and module extensions to take into
122
- * account.
123
- * @param context - File path to resolve relative to.
124
- * @param referencePath - Path to search for local modules.
125
- * @param pathsToIgnore - Paths which marks location to ignore.
126
- * @param relativeModuleLocations - List of relative file path to search
127
- * for modules in.
128
- * @param packageEntryFileNames - List of package entry file names to
129
- * search for. The magic name "__package__" will search for an appreciate
130
- * entry in a "package.json" file.
131
- * @param packageMainPropertyNames - List of package file main property
132
- * names to search for package representing entry module definitions.
133
- * @param packageAliasPropertyNames - List of package file alias property
134
- * names to search for package specific module aliases.
135
- * @param encoding - File name encoding to use during file traversing.
136
- * @returns Object with a file path and directory path key mapping to
137
- * corresponding list of paths.
138
- */
139
- static determineModuleLocations(this: void, givenInjection: GivenInjection, 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): {
140
- directoryPaths: Array<string>;
141
- filePaths: Array<string>;
142
- };
143
- /**
144
- * Determines a list of concrete file paths for given module id pointing to
145
- * a folder which isn't a package.
146
- * @param normalizedGivenInjection - Injection data structure of modules
147
- * with folder references to resolve.
148
- * @param aliases - Mapping of aliases to take into account.
149
- * @param moduleReplacements - Mapping of replacements to take into
150
- * account.
151
- * @param context - File path to determine relative to.
152
- * @param referencePath - Path to resolve local modules relative to.
153
- * @param pathsToIgnore - Paths which marks location to ignore.
154
- * @returns Given injections with resolved folder pointing modules.
155
- */
156
- static resolveModulesInFolders(this: void, normalizedGivenInjection: NormalizedGivenInjection, aliases?: Mapping, moduleReplacements?: Replacements, context?: string, referencePath?: string, pathsToIgnore?: Array<string>): NormalizedGivenInjection;
157
- /**
158
- * Every injection definition type can be represented as plain object
159
- * (mapping from chunk name to array of module ids). This method converts
160
- * each representation into the normalized plain object notation.
161
- * @param givenInjection - Given entry injection to normalize.
162
- * @returns Normalized representation of given entry injection.
163
- */
164
- static normalizeGivenInjection(this: void, givenInjection: GivenInjection): NormalizedGivenInjection;
165
- /**
166
- * Determines all concrete file paths for given injection which are marked
167
- * with the "__auto__" indicator.
168
- * @param givenInjection - Given entry and external injection to take
169
- * into account.
170
- * @param buildConfigurations - Resolved build configuration.
171
- * @param aliases - Mapping of aliases to take into account.
172
- * @param moduleReplacements - Mapping of replacements to take into
173
- * account.
174
- * @param extensions - List of file and module extensions to take into
175
- * account.
176
- * @param context - File path to use as starting point.
177
- * @param referencePath - Reference path from where local files should be
178
- * resolved.
179
- * @param pathsToIgnore - Paths which marks location to ignore.
180
- * @returns Given injection with resolved marked indicators.
181
- */
182
- 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;
183
- /**
184
- * Determines all module file paths.
185
- * @param buildConfigurations - Resolved build configuration.
186
- * @param moduleFilePathsToExclude - A list of modules file paths to
187
- * exclude (specified by path or id).
188
- * @param moduleFilePathPatternToExclude - A list of modules file paths
189
- * pattern to exclude (specified by path or id).
190
- * @param context - File path to use as starting point.
191
- * @returns All determined module file paths.
192
- */
193
- static getAutoInjection(this: void, buildConfigurations: ResolvedBuildConfiguration, moduleFilePathsToExclude: Array<string>, moduleFilePathPatternToExclude: Array<RegExp | string>, context: string): Mapping;
194
- /**
195
- * Determines a resolved module file path in given package path.
196
- * @param packagePath - Path to package to resolve in.
197
- * @param packageMainPropertyNames - List of package file main property
198
- * names to search for package representing entry module definitions.
199
- * @param packageAliasPropertyNames - List of package file alias property
200
- * names to search for package specific module aliases.
201
- * @param encoding - Encoding to use for file names during file traversing.
202
- * @returns Path if found and / or additional package aliases to consider.
203
- */
204
- static determineModuleFilePathInPackage(this: void, packagePath: string, packageMainPropertyNames?: Array<string>, packageAliasPropertyNames?: Array<string>, encoding?: Encoding): {
205
- fileName: null | string;
206
- packageAliases: Mapping | null;
207
- };
208
- /**
209
- * Determines a concrete file path for given module id.
210
- * @param moduleID - Module id to determine.
211
- * @param aliases - Mapping of aliases to take into account.
212
- * @param moduleReplacements - Mapping of replacements to take into
213
- * account.
214
- * @param extensions - List of file and module extensions to take into
215
- * account.
216
- * @param context - File path to determine relative to.
217
- * @param referencePath - Path to resolve local modules relative to.
218
- * @param pathsToIgnore - Paths which marks location to ignore.
219
- * @param relativeModuleLocations - List of relative file path to search
220
- * for modules in.
221
- * @param packageEntryFileNames - List of package entry file names to
222
- * search for. The magic name "__package__" will search for an appreciate
223
- * entry in a "package.json" file.
224
- * @param packageMainPropertyNames - List of package file main property
225
- * names to search for package representing entry module definitions.
226
- * @param packageAliasPropertyNames - List of package file alias property
227
- * names to search for package specific module aliases.
228
- * @param encoding - Encoding to use for file names during file traversing.
229
- * @returns File path or given module id if determinations has failed or
230
- * wasn't necessary.
231
- */
232
- 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;
233
- /**
234
- * Determines a concrete file path for given module id.
235
- * @param moduleID - Module id to determine.
236
- * @param aliases - Mapping of aliases to take into account.
237
- * @returns The alias applied given module id.
238
- */
239
- static applyAliases(this: void, moduleID: string, aliases: Mapping): string;
240
- /**
241
- * Determines a concrete file path for given module id.
242
- * @param moduleID - Module id to determine.
243
- * @param replacements - Mapping of regular expressions to their
244
- * corresponding replacements.
245
- * @returns The replacement applied given module id.
246
- */
247
- static applyModuleReplacements(this: void, moduleID: false | string, replacements: Replacements): false | string;
248
- /**
249
- * Determines the nearest package configuration file from given file path.
250
- * @param start - Reference location to search from.
251
- * @param fileName - Package configuration file name.
252
- * @returns Determined file path.
253
- */
254
- static findPackageDescriptorFilePath(this: void, start: Array<string> | string, fileName?: string): null | string;
255
- /**
256
- * Determines the nearest package configuration from given module file
257
- * path.
258
- * @param modulePath - Module path to take as reference location (leaf in
259
- * tree).
260
- * @param fileName - Package configuration file name.
261
- * @returns A object containing found parsed configuration an their
262
- * corresponding file path.
263
- */
264
- static getClosestPackageDescriptor(this: void, modulePath: string, fileName?: string): null | PackageDescriptor;
265
- }
266
- export default Helper;
11
+ export declare const isFilePathInLocation: (filePath: string, locationsToCheck: Array<string>) => boolean;
12
+ /**
13
+ * Strips loader informations form given module request including loader prefix
14
+ * and query parameter.
15
+ * @param moduleID - Module request to strip.
16
+ * @returns Given module id stripped.
17
+ */
18
+ export declare const stripLoader: (moduleID: string) => string;
19
+ /**
20
+ * Converts given list of path to a normalized list with unique values.
21
+ * @param paths - File paths.
22
+ * @returns The given file path list with normalized unique values.
23
+ */
24
+ export declare const normalizePaths: (paths: Array<string>) => Array<string>;
25
+ /**
26
+ * Applies file path/name placeholder replacements with given bundle associated
27
+ * informations.
28
+ * @param template - File path to process placeholder in.
29
+ * @param scope - Scope to use for processing.
30
+ * @returns Processed file path.
31
+ */
32
+ export declare const renderFilePathTemplate: (template: string, scope?: Mapping<number | string>) => string;
33
+ /**
34
+ * Converts given request to a resolved request with given context embedded.
35
+ * @param request - Request to determine.
36
+ * @param context - Context of given request to resolve relative to.
37
+ * @param referencePath - Path to resolve local modules relative to.
38
+ * @param aliases - Mapping of aliases to take into account.
39
+ * @param moduleReplacements - Mapping of replacements to take into account.
40
+ * @param relativeModuleLocations - List of relative directory paths to search
41
+ * for modules in.
42
+ * @returns A new resolved request.
43
+ */
44
+ export declare const applyContext: (request: string, context?: string, referencePath?: string, aliases?: Mapping, moduleReplacements?: Replacements, relativeModuleLocations?: Array<string>) => false | string;
45
+ /**
46
+ * Check if given request points to an external dependency not maintained by
47
+ * current package context.
48
+ * @param request - Request to determine.
49
+ * @param context - Context of current project.
50
+ * @param requestContext - Context of given request to resolve relative to.
51
+ * @param normalizedGivenInjection - Mapping of chunk names to modules which
52
+ * should be injected.
53
+ * @param relativeExternalModuleLocations - Array of paths where external
54
+ * modules take place.
55
+ * @param aliases - Mapping of aliases to take into account.
56
+ * @param moduleReplacements - Mapping of replacements to take into account.
57
+ * @param extensions - List of file and module extensions to take into account.
58
+ * @param referencePath - Path to resolve local modules relative to.
59
+ * @param pathsToIgnore - Paths which marks location to ignore.
60
+ * @param relativeModuleLocations - List of relative file path to search for
61
+ * modules in.
62
+ * @param packageEntryFileNames - List of package entry file names to search
63
+ * for. The magic name "__package__" will search for an appreciate entry in a
64
+ * "package.json" file.
65
+ * @param packageMainPropertyNames - List of package file main property names
66
+ * to search for package representing entry module definitions.
67
+ * @param packageAliasPropertyNames - List of package file alias property names
68
+ * to search for package specific module aliases.
69
+ * @param includePattern - Array of regular expressions to explicitly mark as
70
+ * external dependency.
71
+ * @param excludePattern - Array of regular expressions to explicitly mark as
72
+ * internal dependency.
73
+ * @param inPlaceNormalLibrary - Indicates whether normal libraries should be
74
+ * external or not.
75
+ * @param inPlaceDynamicLibrary - Indicates whether requests with integrated
76
+ * loader configurations should be marked as external or not.
77
+ * @param encoding - Encoding for file names to use during file traversing.
78
+ * @returns A new resolved request indicating whether given request is an
79
+ * external one.
80
+ */
81
+ export declare const determineExternalRequest: (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;
82
+ /**
83
+ * Determines asset type of given file.
84
+ * @param filePath - Path to file to analyse.
85
+ * @param buildConfiguration - Meta informations for available asset types.
86
+ * @param paths - List of paths to search if given path doesn't reference a
87
+ * file directly.
88
+ * @returns Determined file type or "null" of given file couldn't be
89
+ * determined.
90
+ */
91
+ export declare const determineAssetType: (filePath: string, buildConfiguration: BuildConfiguration, paths: PathConfiguration) => null | string;
92
+ /**
93
+ * Adds a property with a stored array of all matching file paths, which
94
+ * matches each build configuration in given entry path and converts given
95
+ * build configuration into a sorted array were javaScript files takes
96
+ * precedence.
97
+ * @param configuration - Given build configurations.
98
+ * @param entryPath - Path to analyse nested structure.
99
+ * @param pathsToIgnore - Paths which marks location to ignore.
100
+ * @param mainFileBasenames - File basenames to sort into the front.
101
+ * @returns Converted build configuration.
102
+ */
103
+ export declare const resolveBuildConfigurationFilePaths: (configuration: BuildConfiguration, entryPath?: string, pathsToIgnore?: Array<string>, mainFileBasenames?: Array<string>) => ResolvedBuildConfiguration;
104
+ /**
105
+ * Determines all file and directory paths related to given internal modules as
106
+ * array.
107
+ * @param givenInjection - List of module ids or module file paths.
108
+ * @param aliases - Mapping of aliases to take into account.
109
+ * @param moduleReplacements - Mapping of module replacements to take into
110
+ * account.
111
+ * @param extensions - List of file and module extensions to take into account.
112
+ * @param context - File path to resolve relative to.
113
+ * @param referencePath - Path to search for local modules.
114
+ * @param pathsToIgnore - Paths which marks location to ignore.
115
+ * @param relativeModuleLocations - List of relative file path to search for
116
+ * modules in.
117
+ * @param packageEntryFileNames - List of package entry file names to search
118
+ * for. The magic name "__package__" will search for an appreciate entry in a
119
+ * "package.json" file.
120
+ * @param packageMainPropertyNames - List of package file main property names
121
+ * to search for package representing entry module definitions.
122
+ * @param packageAliasPropertyNames - List of package file alias property names
123
+ * to search for package specific module aliases.
124
+ * @param encoding - File name encoding to use during file traversing.
125
+ * @returns Object with a file path and directory path key mapping to
126
+ * corresponding list of paths.
127
+ */
128
+ export declare const determineModuleLocations: (givenInjection: GivenInjection, 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) => {
129
+ directoryPaths: Array<string>;
130
+ filePaths: Array<string>;
131
+ };
132
+ /**
133
+ * Determines a list of concrete file paths for given module id pointing to a
134
+ * folder which isn't a package.
135
+ * @param normalizedGivenInjection - Injection data structure of modules with
136
+ * folder references to resolve.
137
+ * @param aliases - Mapping of aliases to take into account.
138
+ * @param moduleReplacements - Mapping of replacements to take into account.
139
+ * @param context - File path to determine relative to.
140
+ * @param referencePath - Path to resolve local modules relative to.
141
+ * @param pathsToIgnore - Paths which marks location to ignore.
142
+ * @returns Given injections with resolved folder pointing modules.
143
+ */
144
+ export declare const resolveModulesInFolders: (normalizedGivenInjection: NormalizedGivenInjection, aliases?: Mapping, moduleReplacements?: Replacements, context?: string, referencePath?: string, pathsToIgnore?: Array<string>) => NormalizedGivenInjection;
145
+ /**
146
+ * Every injection definition type can be represented as plain object (mapping
147
+ * from chunk name to array of module ids). This method converts each
148
+ * representation into the normalized plain object notation.
149
+ * @param givenInjection - Given entry injection to normalize.
150
+ * @returns Normalized representation of given entry injection.
151
+ */
152
+ export declare const normalizeGivenInjection: (givenInjection: GivenInjection) => NormalizedGivenInjection;
153
+ /**
154
+ * Determines all concrete file paths for given injection which are marked with
155
+ * the "__auto__" indicator.
156
+ * @param givenInjection - Given entry and external injection to take into
157
+ * account.
158
+ * @param buildConfigurations - Resolved build configuration.
159
+ * @param aliases - Mapping of aliases to take into account.
160
+ * @param moduleReplacements - Mapping of replacements to take into account.
161
+ * @param extensions - List of file and module extensions to take into account.
162
+ * @param context - File path to use as starting point.
163
+ * @param referencePath - Reference path from where local files should be
164
+ * resolved.
165
+ * @param pathsToIgnore - Paths which marks location to ignore.
166
+ * @returns Given injection with resolved marked indicators.
167
+ */
168
+ export declare const resolveAutoInjection: <T extends GivenInjectionConfiguration>(givenInjection: T, buildConfigurations: ResolvedBuildConfiguration, aliases?: Mapping, moduleReplacements?: Replacements, extensions?: Extensions, context?: string, referencePath?: string, pathsToIgnore?: Array<string>) => T;
169
+ /**
170
+ * Determines all module file paths.
171
+ * @param buildConfigurations - Resolved build configuration.
172
+ * @param moduleFilePathsToExclude - A list of modules file paths to exclude
173
+ * (specified by path or id).
174
+ * @param moduleFilePathPatternToExclude - A list of modules file paths pattern
175
+ * to exclude (specified by path or id).
176
+ * @param context - File path to use as starting point.
177
+ * @returns All determined module file paths.
178
+ */
179
+ export declare const getAutoInjection: (buildConfigurations: ResolvedBuildConfiguration, moduleFilePathsToExclude: Array<string>, moduleFilePathPatternToExclude: Array<RegExp | string>, context: string) => Mapping;
180
+ /**
181
+ * Determines a resolved module file path in given package path.
182
+ * @param packagePath - Path to package to resolve in.
183
+ * @param packageMainPropertyNames - List of package file main property names
184
+ * to search for package representing entry module definitions.
185
+ * @param packageAliasPropertyNames - List of package file alias property names
186
+ * to search for package specific module aliases.
187
+ * @param encoding - Encoding to use for file names during file traversing.
188
+ * @returns Path if found and / or additional package aliases to consider.
189
+ */
190
+ export declare const determineModuleFilePathInPackage: (packagePath: string, packageMainPropertyNames?: Array<string>, packageAliasPropertyNames?: Array<string>, encoding?: Encoding) => {
191
+ fileName: null | string;
192
+ packageAliases: Mapping | null;
193
+ };
194
+ /**
195
+ * Determines a concrete file path for given module id.
196
+ * @param moduleID - Module id to determine.
197
+ * @param aliases - Mapping of aliases to take into account.
198
+ * @param moduleReplacements - Mapping of replacements to take into account.
199
+ * @param extensions - List of file and module extensions to take into account.
200
+ * @param context - File path to determine relative to.
201
+ * @param referencePath - Path to resolve local modules relative to.
202
+ * @param pathsToIgnore - Paths which marks location to ignore.
203
+ * @param relativeModuleLocations - List of relative file path to search for
204
+ * modules in.
205
+ * @param packageEntryFileNames - List of package entry file names to search
206
+ * for. The magic name "__package__" will search for an appreciate entry in a
207
+ * "package.json" file.
208
+ * @param packageMainPropertyNames - List of package file main property names
209
+ * to search for package representing entry module definitions.
210
+ * @param packageAliasPropertyNames - List of package file alias property names
211
+ * to search for package specific module aliases.
212
+ * @param encoding - Encoding to use for file names during file traversing.
213
+ * @returns File path or given module id if determinations has failed or wasn't
214
+ * necessary.
215
+ */
216
+ export declare const determineModuleFilePath: (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;
217
+ /**
218
+ * Determines a concrete file path for given module id.
219
+ * @param moduleID - Module id to determine.
220
+ * @param aliases - Mapping of aliases to take into account.
221
+ * @returns The alias applied given module id.
222
+ */
223
+ export declare const applyAliases: (moduleID: string, aliases: Mapping) => string;
224
+ /**
225
+ * Determines a concrete file path for given module id.
226
+ * @param moduleID - Module id to determine.
227
+ * @param replacements - Mapping of regular expressions to their corresponding
228
+ * replacements.
229
+ * @returns The replacement applied given module id.
230
+ */
231
+ export declare const applyModuleReplacements: (moduleID: false | string, replacements: Replacements) => false | string;
232
+ /**
233
+ * Determines the nearest package configuration file from given file path.
234
+ * @param start - Reference location to search from.
235
+ * @param fileName - Package configuration file name.
236
+ * @returns Determined file path.
237
+ */
238
+ export declare const findPackageDescriptorFilePath: (start: Array<string> | string, fileName?: string) => null | string;
239
+ /**
240
+ * Determines the nearest package configuration from given module file path.
241
+ * @param modulePath - Module path to take as reference location (leaf in
242
+ * tree).
243
+ * @param fileName - Package configuration file name.
244
+ * @returns A object containing found parsed configuration an their
245
+ * corresponding file path.
246
+ */
247
+ export declare const getClosestPackageDescriptor: (modulePath: string, fileName?: string) => null | PackageDescriptor;