cdk-booster 1.0.1

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.
Files changed (53) hide show
  1. package/LICENSE +353 -0
  2. package/LICENSE.md +350 -0
  3. package/README.md +114 -0
  4. package/dist/cdk-booster.d.ts +29 -0
  5. package/dist/cdk-booster.mjs +733 -0
  6. package/dist/cdkFrameworkWorker.mjs +50 -0
  7. package/dist/configuration.d.ts +16 -0
  8. package/dist/configuration.mjs +29 -0
  9. package/dist/constants.d.ts +1 -0
  10. package/dist/constants.mjs +3 -0
  11. package/dist/getConfigFromCliArgs.d.ts +7 -0
  12. package/dist/getConfigFromCliArgs.mjs +23 -0
  13. package/dist/getDirname.d.ts +10 -0
  14. package/dist/getDirname.mjs +19 -0
  15. package/dist/logger.d.ts +51 -0
  16. package/dist/logger.mjs +83 -0
  17. package/dist/types/bundleSettings.d.ts +6 -0
  18. package/dist/types/bundleSettings.mjs +1 -0
  19. package/dist/types/cbConfig.d.ts +8 -0
  20. package/dist/types/cbConfig.mjs +1 -0
  21. package/dist/types/lambdaBundle.d.ts +11 -0
  22. package/dist/types/lambdaBundle.mjs +1 -0
  23. package/dist/utils/findPackageJson.d.ts +6 -0
  24. package/dist/utils/findPackageJson.mjs +33 -0
  25. package/dist/version.d.ts +5 -0
  26. package/dist/version.mjs +25 -0
  27. package/node_modules/chalk/license +9 -0
  28. package/node_modules/chalk/package.json +83 -0
  29. package/node_modules/chalk/readme.md +297 -0
  30. package/node_modules/chalk/source/index.d.ts +325 -0
  31. package/node_modules/chalk/source/index.js +225 -0
  32. package/node_modules/chalk/source/utilities.js +33 -0
  33. package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  34. package/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  35. package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  36. package/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
  37. package/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  38. package/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
  39. package/node_modules/commander/LICENSE +22 -0
  40. package/node_modules/commander/Readme.md +1159 -0
  41. package/node_modules/commander/esm.mjs +16 -0
  42. package/node_modules/commander/index.js +24 -0
  43. package/node_modules/commander/lib/argument.js +149 -0
  44. package/node_modules/commander/lib/command.js +2778 -0
  45. package/node_modules/commander/lib/error.js +39 -0
  46. package/node_modules/commander/lib/help.js +747 -0
  47. package/node_modules/commander/lib/option.js +379 -0
  48. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  49. package/node_modules/commander/package-support.json +16 -0
  50. package/node_modules/commander/package.json +82 -0
  51. package/node_modules/commander/typings/esm.d.mts +3 -0
  52. package/node_modules/commander/typings/index.d.ts +1113 -0
  53. package/package.json +100 -0
package/LICENSE.md ADDED
@@ -0,0 +1,350 @@
1
+ # Mozilla Public License, version 2.0
2
+
3
+ 1. Definitions
4
+
5
+ 1.1. “Contributor”
6
+
7
+ means each individual or legal entity that creates, contributes to the
8
+ creation of, or owns Covered Software.
9
+
10
+ 1.2. “Contributor Version”
11
+
12
+ means the combination of the Contributions of others (if any) used by a
13
+ Contributor and that particular Contributor’s Contribution.
14
+
15
+ 1.3. “Contribution”
16
+
17
+ means Covered Software of a particular Contributor.
18
+
19
+ 1.4. “Covered Software”
20
+
21
+ means Source Code Form to which the initial Contributor has attached the
22
+ notice in Exhibit A, the Executable Form of such Source Code Form, and
23
+ Modifications of such Source Code Form, in each case including portions
24
+ thereof.
25
+
26
+ 1.5. “Incompatible With Secondary Licenses”
27
+ means
28
+
29
+ a. that the initial Contributor has attached the notice described in
30
+ Exhibit B to the Covered Software; or
31
+
32
+ b. that the Covered Software was made available under the terms of version
33
+ 1.1 or earlier of the License, but not also under the terms of a
34
+ Secondary License.
35
+
36
+ 1.6. “Executable Form”
37
+
38
+ means any form of the work other than Source Code Form.
39
+
40
+ 1.7. “Larger Work”
41
+
42
+ means a work that combines Covered Software with other material, in a separate
43
+ file or files, that is not Covered Software.
44
+
45
+ 1.8. “License”
46
+
47
+ means this document.
48
+
49
+ 1.9. “Licensable”
50
+
51
+ means having the right to grant, to the maximum extent possible, whether at the
52
+ time of the initial grant or subsequently, any and all of the rights conveyed by
53
+ this License.
54
+
55
+ 1.10. “Modifications”
56
+
57
+ means any of the following:
58
+
59
+ a. any file in Source Code Form that results from an addition to, deletion
60
+ from, or modification of the contents of Covered Software; or
61
+
62
+ b. any new file in Source Code Form that contains any Covered Software.
63
+
64
+ 1.11. “Patent Claims” of a Contributor
65
+
66
+ means any patent claim(s), including without limitation, method, process,
67
+ and apparatus claims, in any patent Licensable by such Contributor that
68
+ would be infringed, but for the grant of the License, by the making,
69
+ using, selling, offering for sale, having made, import, or transfer of
70
+ either its Contributions or its Contributor Version.
71
+
72
+ 1.12. “Secondary License”
73
+
74
+ means either the GNU General Public License, Version 2.0, the GNU Lesser
75
+ General Public License, Version 2.1, the GNU Affero General Public
76
+ License, Version 3.0, or any later versions of those licenses.
77
+
78
+ 1.13. “Source Code Form”
79
+
80
+ means the form of the work preferred for making modifications.
81
+
82
+ 1.14. “You” (or “Your”)
83
+
84
+ means an individual or a legal entity exercising rights under this
85
+ License. For legal entities, “You” includes any entity that controls, is
86
+ controlled by, or is under common control with You. For purposes of this
87
+ definition, “control” means (a) the power, direct or indirect, to cause
88
+ the direction or management of such entity, whether by contract or
89
+ otherwise, or (b) ownership of more than fifty percent (50%) of the
90
+ outstanding shares or beneficial ownership of such entity.
91
+
92
+ 2. License Grants and Conditions
93
+
94
+ 2.1. Grants
95
+
96
+ Each Contributor hereby grants You a world-wide, royalty-free,
97
+ non-exclusive license:
98
+
99
+ a. under intellectual property rights (other than patent or trademark)
100
+ Licensable by such Contributor to use, reproduce, make available,
101
+ modify, display, perform, distribute, and otherwise exploit its
102
+ Contributions, either on an unmodified basis, with Modifications, or as
103
+ part of a Larger Work; and
104
+
105
+ b. under Patent Claims of such Contributor to make, use, sell, offer for
106
+ sale, have made, import, and otherwise transfer either its Contributions
107
+ or its Contributor Version.
108
+
109
+ 2.2. Effective Date
110
+
111
+ The licenses granted in Section 2.1 with respect to any Contribution become
112
+ effective for each Contribution on the date the Contributor first distributes
113
+ such Contribution.
114
+
115
+ 2.3. Limitations on Grant Scope
116
+
117
+ The licenses granted in this Section 2 are the only rights granted under this
118
+ License. No additional rights or licenses will be implied from the distribution
119
+ or licensing of Covered Software under this License. Notwithstanding Section
120
+ 2.1(b) above, no patent license is granted by a Contributor:
121
+
122
+ a. for any code that a Contributor has removed from Covered Software; or
123
+
124
+ b. for infringements caused by: (i) Your and any other third party’s
125
+ modifications of Covered Software, or (ii) the combination of its
126
+ Contributions with other software (except as part of its Contributor
127
+ Version); or
128
+
129
+ c. under Patent Claims infringed by Covered Software in the absence of its
130
+ Contributions.
131
+
132
+ This License does not grant any rights in the trademarks, service marks, or
133
+ logos of any Contributor (except as may be necessary to comply with the
134
+ notice requirements in Section 3.4).
135
+
136
+ 2.4. Subsequent Licenses
137
+
138
+ No Contributor makes additional grants as a result of Your choice to
139
+ distribute the Covered Software under a subsequent version of this License
140
+ (see Section 10.2) or under the terms of a Secondary License (if permitted
141
+ under the terms of Section 3.3).
142
+
143
+ 2.5. Representation
144
+
145
+ Each Contributor represents that the Contributor believes its Contributions
146
+ are its original creation(s) or it has sufficient rights to grant the
147
+ rights to its Contributions conveyed by this License.
148
+
149
+ 2.6. Fair Use
150
+
151
+ This License is not intended to limit any rights You have under applicable
152
+ copyright doctrines of fair use, fair dealing, or other equivalents.
153
+
154
+ 2.7. Conditions
155
+
156
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
157
+ Section 2.1.
158
+
159
+ 3. Responsibilities
160
+
161
+ 3.1. Distribution of Source Form
162
+
163
+ All distribution of Covered Software in Source Code Form, including any
164
+ Modifications that You create or to which You contribute, must be under the
165
+ terms of this License. You must inform recipients that the Source Code Form
166
+ of the Covered Software is governed by the terms of this License, and how
167
+ they can obtain a copy of this License. You may not attempt to alter or
168
+ restrict the recipients’ rights in the Source Code Form.
169
+
170
+ 3.2. Distribution of Executable Form
171
+
172
+ If You distribute Covered Software in Executable Form then:
173
+
174
+ a. such Covered Software must also be made available in Source Code Form,
175
+ as described in Section 3.1, and You must inform recipients of the
176
+ Executable Form how they can obtain a copy of such Source Code Form by
177
+ reasonable means in a timely manner, at a charge no more than the cost
178
+ of distribution to the recipient; and
179
+
180
+ b. You may distribute such Executable Form under the terms of this License,
181
+ or sublicense it under different terms, provided that the license for
182
+ the Executable Form does not attempt to limit or alter the recipients’
183
+ rights in the Source Code Form under this License.
184
+
185
+ 3.3. Distribution of a Larger Work
186
+
187
+ You may create and distribute a Larger Work under terms of Your choice,
188
+ provided that You also comply with the requirements of this License for the
189
+ Covered Software. If the Larger Work is a combination of Covered Software
190
+ with a work governed by one or more Secondary Licenses, and the Covered
191
+ Software is not Incompatible With Secondary Licenses, this License permits
192
+ You to additionally distribute such Covered Software under the terms of
193
+ such Secondary License(s), so that the recipient of the Larger Work may, at
194
+ their option, further distribute the Covered Software under the terms of
195
+ either this License or such Secondary License(s).
196
+
197
+ 3.4. Notices
198
+
199
+ You may not remove or alter the substance of any license notices (including
200
+ copyright notices, patent notices, disclaimers of warranty, or limitations
201
+ of liability) contained within the Source Code Form of the Covered
202
+ Software, except that You may alter any license notices to the extent
203
+ required to remedy known factual inaccuracies.
204
+
205
+ 3.5. Application of Additional Terms
206
+
207
+ You may choose to offer, and to charge a fee for, warranty, support,
208
+ indemnity or liability obligations to one or more recipients of Covered
209
+ Software. However, You may do so only on Your own behalf, and not on behalf
210
+ of any Contributor. You must make it absolutely clear that any such
211
+ warranty, support, indemnity, or liability obligation is offered by You
212
+ alone, and You hereby agree to indemnify every Contributor for any
213
+ liability incurred by such Contributor as a result of warranty, support,
214
+ indemnity or liability terms You offer. You may include additional
215
+ disclaimers of warranty and limitations of liability specific to any
216
+ jurisdiction.
217
+
218
+ 4. Inability to Comply Due to Statute or Regulation
219
+
220
+ If it is impossible for You to comply with any of the terms of this License
221
+ with respect to some or all of the Covered Software due to statute, judicial
222
+ order, or regulation then You must: (a) comply with the terms of this License
223
+ to the maximum extent possible; and (b) describe the limitations and the code
224
+ they affect. Such description must be placed in a text file included with all
225
+ distributions of the Covered Software under this License. Except to the
226
+ extent prohibited by statute or regulation, such description must be
227
+ sufficiently detailed for a recipient of ordinary skill to be able to
228
+ understand it.
229
+
230
+ 5. Termination
231
+
232
+ 5.1. The rights granted under this License will terminate automatically if You
233
+ fail to comply with any of its terms. However, if You become compliant,
234
+ then the rights granted under this License from a particular Contributor
235
+ are reinstated (a) provisionally, unless and until such Contributor
236
+ explicitly and finally terminates Your grants, and (b) on an ongoing basis,
237
+ if such Contributor fails to notify You of the non-compliance by some
238
+ reasonable means prior to 60 days after You have come back into compliance.
239
+ Moreover, Your grants from a particular Contributor are reinstated on an
240
+ ongoing basis if such Contributor notifies You of the non-compliance by
241
+ some reasonable means, this is the first time You have received notice of
242
+ non-compliance with this License from such Contributor, and You become
243
+ compliant prior to 30 days after Your receipt of the notice.
244
+
245
+ 5.2. If You initiate litigation against any entity by asserting a patent
246
+ infringement claim (excluding declaratory judgment actions, counter-claims,
247
+ and cross-claims) alleging that a Contributor Version directly or
248
+ indirectly infringes any patent, then the rights granted to You by any and
249
+ all Contributors for the Covered Software under Section 2.1 of this License
250
+ shall terminate.
251
+
252
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
253
+ license agreements (excluding distributors and resellers) which have been
254
+ validly granted by You or Your distributors under this License prior to
255
+ termination shall survive termination.
256
+
257
+ 6. Disclaimer of Warranty
258
+
259
+ Covered Software is provided under this License on an “as is” basis, without
260
+ warranty of any kind, either expressed, implied, or statutory, including,
261
+ without limitation, warranties that the Covered Software is free of defects,
262
+ merchantable, fit for a particular purpose or non-infringing. The entire
263
+ risk as to the quality and performance of the Covered Software is with You.
264
+ Should any Covered Software prove defective in any respect, You (not any
265
+ Contributor) assume the cost of any necessary servicing, repair, or
266
+ correction. This disclaimer of warranty constitutes an essential part of this
267
+ License. No use of any Covered Software is authorized under this License
268
+ except under this disclaimer.
269
+
270
+ 7. Limitation of Liability
271
+
272
+ Under no circumstances and under no legal theory, whether tort (including
273
+ negligence), contract, or otherwise, shall any Contributor, or anyone who
274
+ distributes Covered Software as permitted above, be liable to You for any
275
+ direct, indirect, special, incidental, or consequential damages of any
276
+ character including, without limitation, damages for lost profits, loss of
277
+ goodwill, work stoppage, computer failure or malfunction, or any and all
278
+ other commercial damages or losses, even if such party shall have been
279
+ informed of the possibility of such damages. This limitation of liability
280
+ shall not apply to liability for death or personal injury resulting from such
281
+ party’s negligence to the extent applicable law prohibits such limitation.
282
+ Some jurisdictions do not allow the exclusion or limitation of incidental or
283
+ consequential damages, so this exclusion and limitation may not apply to You.
284
+
285
+ 8. Litigation
286
+
287
+ Any litigation relating to this License may be brought only in the courts of
288
+ a jurisdiction where the defendant maintains its principal place of business
289
+ and such litigation shall be governed by laws of that jurisdiction, without
290
+ reference to its conflict-of-law provisions. Nothing in this Section shall
291
+ prevent a party’s ability to bring cross-claims or counter-claims.
292
+
293
+ 9. Miscellaneous
294
+
295
+ This License represents the complete agreement concerning the subject matter
296
+ hereof. If any provision of this License is held to be unenforceable, such
297
+ provision shall be reformed only to the extent necessary to make it
298
+ enforceable. Any law or regulation which provides that the language of a
299
+ contract shall be construed against the drafter shall not be used to construe
300
+ this License against a Contributor.
301
+
302
+ 10. Versions of the License
303
+
304
+ 10.1. New Versions
305
+
306
+ Mozilla Foundation is the license steward. Except as provided in Section
307
+ 10.3, no one other than the license steward has the right to modify or
308
+ publish new versions of this License. Each version will be given a
309
+ distinguishing version number.
310
+
311
+ 10.2. Effect of New Versions
312
+
313
+ You may distribute the Covered Software under the terms of the version of
314
+ the License under which You originally received the Covered Software, or
315
+ under the terms of any subsequent version published by the license
316
+ steward.
317
+
318
+ 10.3. Modified Versions
319
+
320
+ If you create software not governed by this License, and you want to
321
+ create a new license for such software, you may create and use a modified
322
+ version of this License if you rename the license and remove any
323
+ references to the name of the license steward (except to note that such
324
+ modified license differs from this License).
325
+
326
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
327
+ If You choose to distribute Source Code Form that is Incompatible With
328
+ Secondary Licenses under the terms of this version of the License, the
329
+ notice described in Exhibit B of this License must be attached.
330
+
331
+ Exhibit A - Source Code Form License Notice
332
+
333
+ This Source Code Form is subject to the
334
+ terms of the Mozilla Public License, v.
335
+ 2.0. If a copy of the MPL was not
336
+ distributed with this file, You can
337
+ obtain one at
338
+ http://mozilla.org/MPL/2.0/.
339
+
340
+ If it is not possible or desirable to put the notice in a particular file, then
341
+ You may include the notice in a location (such as a LICENSE file in a relevant
342
+ directory) where a recipient would be likely to look for such a notice.
343
+
344
+ You may add additional accurate notices of copyright ownership.
345
+
346
+ Exhibit B - “Incompatible With Secondary Licenses” Notice
347
+
348
+ This Source Code Form is “Incompatible
349
+ With Secondary Licenses”, as defined by
350
+ the Mozilla Public License, v. 2.0.
package/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # ![CDK Booster](public/logo_landscape_light.svg)
2
+
3
+ **Speed up AWS CDK's bundling of TypeScript/JavaScript Lambda handlers**
4
+
5
+ One of the major downsides of CDK is that all operations are performed sequentially, including bundling code for Lambda handlers. This makes bundling extremely slow for large projects with many Lambda functions.
6
+
7
+ CDK Booster bundles all Lambda functions created with `NodejsFunction` construct at once and produces separate assets for Lambda handlers exactly the same as the CDK framework. It's extremely useful for large projects with numerous Lambda functions, though it doesn't provide significant benefits for small projects. Note that bundling is usually not the slowest part of deployment - most time is typically spent on CloudFormation deployment. CDK Booster only speeds up the bundling phase.
8
+
9
+ CDK Booster also detects when synthesis runs twice. This happens when some resources are unresolved and a lookup is needed, causing synthesis to run twice, including bundling. CDK Booster detects this scenario and avoids bundling Lambda handlers twice.
10
+
11
+ CDK Booster is a drop-in replacement requiring no code changes - only installation and a simple `cdk.json` modification.
12
+
13
+ ### Key Benefits
14
+
15
+ - **Faster builds** for TypeScript/JavaScript Lambda projects
16
+ - **Drop-in replacement** for your current CDK setup
17
+ - **Avoids double bundling** when synthesis runs multiple times
18
+
19
+ ## Setup
20
+
21
+ ```bash
22
+ npm install cdk-booster
23
+ ```
24
+
25
+ Modify your `cdk.json` file:
26
+
27
+ **Replace this:**
28
+
29
+ ```json
30
+ {
31
+ "app": "npx ts-node --prefer-ts-exts bin/your_app.ts",
32
+ ...
33
+ }
34
+ ```
35
+
36
+ **With this:**
37
+
38
+ ```json
39
+ {
40
+ "app": "npx cdk-booster bin/your_app.ts",
41
+ ...
42
+ }
43
+ ```
44
+
45
+ `bin/your_app.ts` is location to your CDK app.
46
+
47
+ All functions created with the `NodejsFunction` construct are automatically bundled using CDK Booster:
48
+
49
+ ```typescript
50
+ import * as lambda_nodejs from 'aws-cdk-lib/aws-lambda-nodejs';
51
+
52
+ const functionTestJsEsModule = new lambda_nodejs.NodejsFunction(
53
+ this,
54
+ 'TestJsEsModule',
55
+ {
56
+ entry: 'lambda.ts',
57
+ },
58
+ );
59
+ ```
60
+
61
+ ### Verbose Logging
62
+
63
+ To enable verbose logging for debugging purposes, add the `-v` parameter:
64
+
65
+ ```json
66
+ {
67
+ "app": "npx cdk-booster bin/your_app.ts -v".
68
+ ...
69
+ }
70
+ ```
71
+
72
+ ## How It Works
73
+
74
+ CDK Booster operates through a multi-phase process:
75
+
76
+ 1. **CDK code transpilation**
77
+
78
+ CDK Booster uses ESBuild to transpile/compile your CDK code and injects additional code to discover all Lambda functions in your project, along with their prebuild and postbuild commands.
79
+
80
+ 2. **Running CDK code in Node Worker threads**
81
+
82
+ The transpiled code runs in Node.js worker threads. The injected code enables the discovery of Lambda functions.
83
+
84
+ 3. **Lambda handlers bundling**
85
+
86
+ All Lambda TypeScript/JavaScript code is bundled simultaneously using ESBuild's multiple entry points feature. This approach is what provides the significant speed improvement. Bundled assets are placed in the `cdk.out/bundling-temp-*` folders for CDK to consume.
87
+
88
+ 4. **Standard CDK Execution**
89
+
90
+ The regular CDK synthesis process runs normally. When CDK attempts to bundle Lambda code, it discovers that assets have already been prepared and skips the bundling step.
91
+
92
+ 5. **Smart Asset Reuse**
93
+
94
+ If CDK needs to run synthesis again due to unresolved resources requiring lookups, CDK Booster detects this scenario and reuses the already-prepared bundled assets, avoiding duplicate work. Note that resolved lookups are stored in `cdk.context.json`. If that is available, the synthesis will not run again.
95
+
96
+ ## Requirements
97
+
98
+ - AWS CDK v2.x with TypeScript
99
+ - TypeScript or JavaScript Lambda handlers using `NodejsFunction` construct
100
+
101
+ ## Authors
102
+
103
+ - [Marko (ServerlessLife)](https://www.serverlesslife.com/)
104
+ - ⭐ Your name here for significant code contributions
105
+
106
+ ## Contributors
107
+
108
+ (alphabetical)
109
+
110
+ - ⭐ Your name here for notable code or documentation contributions, or sample projects submitted with a bug report that resulted in tool improvement.
111
+
112
+ ## Disclaimer
113
+
114
+ CDK Booster is provided "as is," without warranty of any kind, expressed or implied. Use it at your own risk, and be mindful of potential impacts on performance, security, and costs when using it in your AWS environment.
@@ -0,0 +1,29 @@
1
+ import { spawn } from 'node:child_process';
2
+ /**
3
+ * Convert esbuildArgs with CLI-style keys into esbuild options object.
4
+ * This normalizes command-line style arguments into the format expected by esbuild.
5
+ * @param esbuildArgs - CLI-style esbuild arguments
6
+ * @returns Normalized esbuild options object
7
+ */
8
+ export declare function normalizeEsbuildArgs(esbuildArgs?: {
9
+ [key: string]: string | boolean;
10
+ }): {
11
+ alias?: Record<string, string>;
12
+ drop?: string[];
13
+ pure?: string[];
14
+ logOverride?: Record<string, "verbose" | "debug" | "info" | "warning" | "error" | "silent">;
15
+ outExtension?: Record<string, string>;
16
+ };
17
+ /**
18
+ * Async wrapper for spawning child processes
19
+ * @param command - The command to run
20
+ * @param args - The arguments to pass to the command
21
+ * @param options - Options to configure the child process
22
+ * @returns A promise that resolves with the command output or rejects with an error
23
+ */
24
+ export declare function spawnAsync(command: string, args?: string[], options?: Parameters<typeof spawn>[2]): Promise<{
25
+ stdout: string;
26
+ stderr: string;
27
+ }>;
28
+ export declare function getModuleRoot(moduleName: string): string;
29
+ export declare function getProjectRoot(): string;