jsii-rosetta 5.2.8-dev.1 → 5.3.1-dev.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/README.md +50 -43
- package/lib/commands/coverage.js.map +1 -1
- package/lib/commands/extract.js.map +1 -1
- package/lib/commands/infuse.js.map +1 -1
- package/lib/commands/read.js.map +1 -1
- package/lib/commands/transliterate.js.map +1 -1
- package/lib/find-utils.js.map +1 -1
- package/lib/fixtures.js.map +1 -1
- package/lib/jsii/assemblies.js.map +1 -1
- package/lib/jsii/fingerprinting.js.map +1 -1
- package/lib/jsii/jsii-types.js.map +1 -1
- package/lib/jsii/jsii-utils.js +1 -1
- package/lib/jsii/jsii-utils.js.map +1 -1
- package/lib/jsii/packages.js.map +1 -1
- package/lib/languages/csharp.js +1 -1
- package/lib/languages/csharp.js.map +1 -1
- package/lib/languages/default.js.map +1 -1
- package/lib/languages/go.js +1 -1
- package/lib/languages/go.js.map +1 -1
- package/lib/languages/java.js +1 -1
- package/lib/languages/java.js.map +1 -1
- package/lib/languages/python.js.map +1 -1
- package/lib/languages/record-references.js.map +1 -1
- package/lib/languages/target-language.js.map +1 -1
- package/lib/logging.js.map +1 -1
- package/lib/main.js.map +1 -1
- package/lib/markdown/escapes.js.map +1 -1
- package/lib/markdown/markdown-renderer.js.map +1 -1
- package/lib/markdown/markdown.js.map +1 -1
- package/lib/markdown/replace-typescript-transform.js.map +1 -1
- package/lib/markdown/structure-renderer.js.map +1 -1
- package/lib/markdown/xml-comment-renderer.js.map +1 -1
- package/lib/o-tree.js.map +1 -1
- package/lib/renderer.js.map +1 -1
- package/lib/rosetta-reader.js.map +1 -1
- package/lib/rosetta-translator.js.map +1 -1
- package/lib/snippet-dependencies.js.map +1 -1
- package/lib/snippet-selectors.js.map +1 -1
- package/lib/snippet.js.map +1 -1
- package/lib/submodule-reference.js.map +1 -1
- package/lib/support.js.map +1 -1
- package/lib/tablets/tablets.js.map +1 -1
- package/lib/translate.js.map +1 -1
- package/lib/translate_all.js.map +1 -1
- package/lib/translate_all_worker.js.map +1 -1
- package/lib/typescript/ast-utils.js.map +1 -1
- package/lib/typescript/imports.js +1 -1
- package/lib/typescript/imports.js.map +1 -1
- package/lib/typescript/syntax-kind-counter.js.map +1 -1
- package/lib/typescript/ts-compiler.js +2 -2
- package/lib/typescript/ts-compiler.js.map +1 -1
- package/lib/typescript/types.js.map +1 -1
- package/lib/typescript/visible-spans.js.map +1 -1
- package/lib/util.js.map +1 -1
- package/package.json +8 -6
- package/releases.json +4 -2
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ supports a limited set of TypeScript language features (which can be reliably re
|
|
|
20
20
|
Head over to our [documentation website](https://aws.github.io/jsii)!
|
|
21
21
|
|
|
22
22
|
The jsii toolchain spreads out on multiple repositories:
|
|
23
|
+
|
|
23
24
|
- [aws/jsii-compiler](https://github.com/aws/jsii-compiler) is where the `jsii` compiler is maintained (except releases
|
|
24
25
|
in the `1.x` line)
|
|
25
26
|
- [aws/jsii-rosetta](https://github.com/aws/jsii-rosetta) is where the `jsii-rosetta` sample code transliteration tool
|
|
@@ -32,11 +33,25 @@ The jsii toolchain spreads out on multiple repositories:
|
|
|
32
33
|
- The jsii runtime libraries for the supported jsii target languages
|
|
33
34
|
- `1.x` release lines of `jsii` and `jsii-rosetta`
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
## :gear: Maintenance & Support
|
|
37
|
+
|
|
38
|
+
The applicable *Maintenance & Support policy* can be reviewed in [SUPPORT.md](./SUPPORT.md).
|
|
39
|
+
|
|
40
|
+
The current status of `jsii-rosetta` releases is:
|
|
41
|
+
|
|
42
|
+
| Release | Status | Comment |
|
|
43
|
+
| ------- | ----------- | ------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| `5.3.x` | Current |  |
|
|
45
|
+
| `5.2.x` | Maintenance |  |
|
|
46
|
+
| `5.1.x` | Maintenance |  |
|
|
47
|
+
| `5.0.x` | Maintenance |  |
|
|
48
|
+
| `1.x` | Maintenance |  |
|
|
49
|
+
|
|
50
|
+
## :gear: Contributing
|
|
36
51
|
|
|
37
52
|
See [CONTRIBUTING](./CONTRIBUTING.md).
|
|
38
53
|
|
|
39
|
-
|
|
54
|
+
## :school_satchel: Getting Started
|
|
40
55
|
|
|
41
56
|
## Rosetta for example authors
|
|
42
57
|
|
|
@@ -182,10 +197,10 @@ home directory, and finally store all translations in something called a
|
|
|
182
197
|
|
|
183
198
|
A couple of things to note here:
|
|
184
199
|
|
|
185
|
-
|
|
200
|
+
- Snippets are always read from the jsii assembly. That means if you make
|
|
186
201
|
changes to examples in source files, you must first re-run `jsii` to
|
|
187
202
|
regenerate the assembly, before re-running `jsii-rosetta extract`.
|
|
188
|
-
|
|
203
|
+
- The compilation directory will be used to resolve `import`s. Currently, you
|
|
189
204
|
are responsible for building a directory with the correct `node_modules`
|
|
190
205
|
directories in there so that a TypeScript compilation step will find all
|
|
191
206
|
libraries referenced in the examples. This is especially revelant if your
|
|
@@ -195,7 +210,7 @@ A couple of things to note here:
|
|
|
195
210
|
*cannot* be in the set of dependencies of `A`, you must build a directory with
|
|
196
211
|
both `B` and `A` in it somewhere in your filesystem and run Rosetta in that
|
|
197
212
|
directory.
|
|
198
|
-
|
|
213
|
+
- "Extract" will compile samples in parallel. The more assemblies you give it
|
|
199
214
|
at the same time, the more efficient of a job it will be able to do.
|
|
200
215
|
|
|
201
216
|
The extract command will write a file named `.jsii.tabl.json` next to every
|
|
@@ -285,11 +300,11 @@ tablet file.
|
|
|
285
300
|
When a translation for a code sample cannot be found, `pacmak` can be configured
|
|
286
301
|
to do one of the following:
|
|
287
302
|
|
|
288
|
-
|
|
289
|
-
|
|
303
|
+
- Leave the sample untranslated (default)
|
|
304
|
+
- Translate the sample in-place (this will slow down generation a lot, and you
|
|
290
305
|
will not have the fine control over the compilation environment that you would
|
|
291
306
|
have if you were to use the `extract` command)
|
|
292
|
-
|
|
307
|
+
- Fail
|
|
293
308
|
|
|
294
309
|
Example:
|
|
295
310
|
|
|
@@ -351,9 +366,9 @@ This package supports hiding parts of the original source after translation.
|
|
|
351
366
|
|
|
352
367
|
To mark special locations in the source tree, we can use one of three mechanisms:
|
|
353
368
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
369
|
+
- Use a `void` expression statement to mark statement locations in the AST.
|
|
370
|
+
- Use the `comma` operator combined with a `void` expression to mark expression locations in the AST.
|
|
371
|
+
- Use special directive comments (`/// !hide`, `/// !show`) to mark locations that span AST nodes. This is less reliable
|
|
357
372
|
(because the source location of translated syntax sometimes will have to be estimated) but the only option if you want
|
|
358
373
|
to mark non-contiguous nodes (such as hide part of a class declaration but show statements inside the constructor).
|
|
359
374
|
|
|
@@ -428,13 +443,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
428
443
|
<table>
|
|
429
444
|
<tbody>
|
|
430
445
|
<tr>
|
|
431
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aws/aws-cdk"><img src="https://avatars0.githubusercontent.com/u/43080478?v=4?s=100" width="100px;" alt="AWS CDK Automation"/><br /><sub><b>AWS CDK Automation</b></sub></a><br /><a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Aaws-cdk-automation" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Aaws-cdk-automation" title="Reviewed Pull Requests">👀</a></td>
|
|
432
446
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/costleya"><img src="https://avatars2.githubusercontent.com/u/1572163?v=4?s=100" width="100px;" alt="Aaron Costley"/><br /><sub><b>Aaron Costley</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Acostleya+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=costleya" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Acostleya+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Acostleya" title="Reviewed Pull Requests">👀</a></td>
|
|
433
447
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ahodieb"><img src="https://avatars1.githubusercontent.com/u/835502?v=4?s=100" width="100px;" alt="Abdallah Hodieb"/><br /><sub><b>Abdallah Hodieb</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aahodieb+label%3Abug" title="Bug reports">🐛</a></td>
|
|
434
448
|
<td align="center" valign="top" width="14.28%"><a href="http://endoflineblog.com/"><img src="https://avatars2.githubusercontent.com/u/460937?v=4?s=100" width="100px;" alt="Adam Ruka"/><br /><sub><b>Adam Ruka</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Askinny85+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=skinny85" title="Code">💻</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Askinny85" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Askinny85" title="Reviewed Pull Requests">👀</a></td>
|
|
435
449
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/agdimech"><img src="https://avatars.githubusercontent.com/u/51220968?v=4?s=100" width="100px;" alt="Adrian Dimech"/><br /><sub><b>Adrian Dimech</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=agdimech" title="Code">💻</a></td>
|
|
436
450
|
<td align="center" valign="top" width="14.28%"><a href="http://adrianhesketh.com/"><img src="https://avatars.githubusercontent.com/u/1029947?v=4?s=100" width="100px;" alt="Adrian Hesketh"/><br /><sub><b>Adrian Hesketh</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=a-h" title="Code">💻</a></td>
|
|
437
451
|
<td align="center" valign="top" width="14.28%"><a href="https://softwhat.com/"><img src="https://avatars0.githubusercontent.com/u/4362270?v=4?s=100" width="100px;" alt="Alex Pulver"/><br /><sub><b>Alex Pulver</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aalexpulver+label%3Abug" title="Bug reports">🐛</a></td>
|
|
452
|
+
<td align="center" valign="top" width="14.28%"><a href="https://aws.amazon.com/"><img src="https://avatars.githubusercontent.com/u/54958958?v=4?s=100" width="100px;" alt="Amazon GitHub Automation"/><br /><sub><b>Amazon GitHub Automation</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=amazon-auto" title="Code">💻</a></td>
|
|
438
453
|
</tr>
|
|
439
454
|
<tr>
|
|
440
455
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/andipabst"><img src="https://avatars.githubusercontent.com/u/9639382?v=4?s=100" width="100px;" alt="Andi Pabst"/><br /><sub><b>Andi Pabst</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aandipabst+label%3Abug" title="Bug reports">🐛</a></td>
|
|
@@ -533,104 +548,108 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
533
548
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kaizen3031593"><img src="https://avatars.githubusercontent.com/u/36202692?v=4?s=100" width="100px;" alt="Kaizen Conroy"/><br /><sub><b>Kaizen Conroy</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=kaizen3031593" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Akaizen3031593+label%3Abug" title="Bug reports">🐛</a></td>
|
|
534
549
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kaizencc"><img src="https://avatars.githubusercontent.com/u/36202692?v=4?s=100" width="100px;" alt="Kaizen Conroy"/><br /><sub><b>Kaizen Conroy</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=kaizencc" title="Code">💻</a></td>
|
|
535
550
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/z3r0w0n"><img src="https://avatars.githubusercontent.com/u/6740347?v=4?s=100" width="100px;" alt="Kaushik Borra"/><br /><sub><b>Kaushik Borra</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Az3r0w0n+label%3Abug" title="Bug reports">🐛</a></td>
|
|
536
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/
|
|
551
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aws/aws-cdk"><img src="https://avatars.githubusercontent.com/u/53584728?v=4?s=100" width="100px;" alt="Kendra Neil"/><br /><sub><b>Kendra Neil</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=TheRealAmazonKendra" title="Code">💻</a></td>
|
|
537
552
|
</tr>
|
|
538
553
|
<tr>
|
|
554
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/KhurramJalil"><img src="https://avatars.githubusercontent.com/u/114917595?v=4?s=100" width="100px;" alt="Khurram Jalil"/><br /><sub><b>Khurram Jalil</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=KhurramJalil" title="Documentation">📖</a></td>
|
|
539
555
|
<td align="center" valign="top" width="14.28%"><a href="http://findable.no/"><img src="https://avatars.githubusercontent.com/u/51441?v=4?s=100" width="100px;" alt="Knut O. Hellan"/><br /><sub><b>Knut O. Hellan</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Akhellan+label%3Abug" title="Bug reports">🐛</a></td>
|
|
540
556
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kiiadi"><img src="https://avatars3.githubusercontent.com/u/4661536?v=4?s=100" width="100px;" alt="Kyle Thomson"/><br /><sub><b>Kyle Thomson</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=kiiadi" title="Code">💻</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Akiiadi" title="Reviewed Pull Requests">👀</a></td>
|
|
541
557
|
<td align="center" valign="top" width="14.28%"><a href="https://stackoverflow.com/users/2116873/pedreiro"><img src="https://avatars3.githubusercontent.com/u/10764017?v=4?s=100" width="100px;" alt="Leandro Padua"/><br /><sub><b>Leandro Padua</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aleandropadua+label%3Abug" title="Bug reports">🐛</a></td>
|
|
542
558
|
<td align="center" valign="top" width="14.28%"><a href="https://liangzhou.dev"><img src="https://avatars.githubusercontent.com/u/1444104?v=4?s=100" width="100px;" alt="Liang Zhou"/><br /><sub><b>Liang Zhou</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Alzhoucs+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=lzhoucs" title="Code">💻</a></td>
|
|
543
559
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/madeline-k"><img src="https://avatars.githubusercontent.com/u/80541297?v=4?s=100" width="100px;" alt="Madeline Kusters"/><br /><sub><b>Madeline Kusters</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=madeline-k" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Amadeline-k+label%3Abug" title="Bug reports">🐛</a></td>
|
|
544
560
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/majasb"><img src="https://avatars2.githubusercontent.com/u/142510?v=4?s=100" width="100px;" alt="Maja S Bratseth"/><br /><sub><b>Maja S Bratseth</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Amajasb+label%3Abug" title="Bug reports">🐛</a></td>
|
|
545
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marcosdiez"><img src="https://avatars2.githubusercontent.com/u/297498?v=4?s=100" width="100px;" alt="Marcos Diez"/><br /><sub><b>Marcos Diez</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Amarcosdiez+label%3Abug" title="Bug reports">🐛</a></td>
|
|
546
561
|
</tr>
|
|
547
562
|
<tr>
|
|
563
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marcosdiez"><img src="https://avatars2.githubusercontent.com/u/297498?v=4?s=100" width="100px;" alt="Marcos Diez"/><br /><sub><b>Marcos Diez</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Amarcosdiez+label%3Abug" title="Bug reports">🐛</a></td>
|
|
548
564
|
<td align="center" valign="top" width="14.28%"><a href="https://polothy.github.io"><img src="https://avatars.githubusercontent.com/u/634657?v=4?s=100" width="100px;" alt="Mark Nielsen"/><br /><sub><b>Mark Nielsen</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=polothy" title="Code">💻</a></td>
|
|
549
565
|
<td align="center" valign="top" width="14.28%"><a href="http://www.matthewbonig.com/"><img src="https://avatars2.githubusercontent.com/u/1559437?v=4?s=100" width="100px;" alt="Matthew Bonig"/><br /><sub><b>Matthew Bonig</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Ambonig+label%3Abug" title="Bug reports">🐛</a> <a href="#blog-mbonig" title="Blogposts">📝</a></td>
|
|
550
566
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mpiroc"><img src="https://avatars2.githubusercontent.com/u/1623344?v=4?s=100" width="100px;" alt="Matthew Pirocchi"/><br /><sub><b>Matthew Pirocchi</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=mpiroc" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Ampiroc+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Ampiroc" title="Reviewed Pull Requests">👀</a></td>
|
|
551
567
|
<td align="center" valign="top" width="14.28%"><a href="https://kane.mx"><img src="https://avatars.githubusercontent.com/u/843303?v=4?s=100" width="100px;" alt="Meng Xin Zhu"/><br /><sub><b>Meng Xin Zhu</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Azxkane+label%3Abug" title="Bug reports">🐛</a></td>
|
|
552
568
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mneil"><img src="https://avatars.githubusercontent.com/u/1605808?v=4?s=100" width="100px;" alt="Michael Neil"/><br /><sub><b>Michael Neil</b></sub></a><br /><a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Amneil" title="Maintenance">🚧</a></td>
|
|
553
569
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mikelane"><img src="https://avatars0.githubusercontent.com/u/6543713?v=4?s=100" width="100px;" alt="Mike Lane"/><br /><sub><b>Mike Lane</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Amikelane+label%3Abug" title="Bug reports">🐛</a></td>
|
|
554
|
-
<td align="center" valign="top" width="14.28%"><a href="http://elastician.com/"><img src="https://avatars3.githubusercontent.com/u/2056?v=4?s=100" width="100px;" alt="Mitch Garnaat"/><br /><sub><b>Mitch Garnaat</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Agarnaat+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=garnaat" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Agarnaat+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Agarnaat" title="Reviewed Pull Requests">👀</a></td>
|
|
555
570
|
</tr>
|
|
556
571
|
<tr>
|
|
572
|
+
<td align="center" valign="top" width="14.28%"><a href="http://elastician.com/"><img src="https://avatars3.githubusercontent.com/u/2056?v=4?s=100" width="100px;" alt="Mitch Garnaat"/><br /><sub><b>Mitch Garnaat</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Agarnaat+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=garnaat" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Agarnaat+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Agarnaat" title="Reviewed Pull Requests">👀</a></td>
|
|
557
573
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MrArnoldPalmer"><img src="https://avatars0.githubusercontent.com/u/7221111?v=4?s=100" width="100px;" alt="Mitchell Valine"/><br /><sub><b>Mitchell Valine</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3AMrArnoldPalmer+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=MrArnoldPalmer" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3AMrArnoldPalmer+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3AMrArnoldPalmer" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3AMrArnoldPalmer" title="Reviewed Pull Requests">👀</a></td>
|
|
558
574
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MohamadSoufan"><img src="https://avatars3.githubusercontent.com/u/28849417?v=4?s=100" width="100px;" alt="Mohamad Soufan"/><br /><sub><b>Mohamad Soufan</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=MohamadSoufan" title="Documentation">📖</a></td>
|
|
575
|
+
<td align="center" valign="top" width="14.28%"><a href="https://moritzkornher.de/"><img src="https://avatars.githubusercontent.com/u/379814?v=4?s=100" width="100px;" alt="Momo Kornher"/><br /><sub><b>Momo Kornher</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=mrgrain" title="Code">💻</a></td>
|
|
559
576
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mmogylenko"><img src="https://avatars.githubusercontent.com/u/7536624?v=4?s=100" width="100px;" alt="Mykola Mogylenko"/><br /><sub><b>Mykola Mogylenko</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Ammogylenko+label%3Abug" title="Bug reports">🐛</a></td>
|
|
560
577
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Naumel"><img src="https://avatars.githubusercontent.com/u/104374999?v=4?s=100" width="100px;" alt="Naumel"/><br /><sub><b>Naumel</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3ANaumel" title="Reviewed Pull Requests">👀</a></td>
|
|
561
578
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NetaNir"><img src="https://avatars0.githubusercontent.com/u/8578043?v=4?s=100" width="100px;" alt="Neta Nir"/><br /><sub><b>Neta Nir</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=NetaNir" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3ANetaNir+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3ANetaNir" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3ANetaNir" title="Reviewed Pull Requests">👀</a></td>
|
|
562
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/njlynch"><img src="https://avatars3.githubusercontent.com/u/1376292?v=4?s=100" width="100px;" alt="Nick Lynch"/><br /><sub><b>Nick Lynch</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Anjlynch+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=njlynch" title="Code">💻</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Anjlynch" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Anjlynch" title="Reviewed Pull Requests">👀</a></td>
|
|
563
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nija-at"><img src="https://avatars2.githubusercontent.com/u/16217941?v=4?s=100" width="100px;" alt="Niranjan Jayakar"/><br /><sub><b>Niranjan Jayakar</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Anija-at+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=nija-at" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Anija-at+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Anija-at" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Anija-at" title="Reviewed Pull Requests">👀</a></td>
|
|
564
579
|
</tr>
|
|
565
580
|
<tr>
|
|
581
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/njlynch"><img src="https://avatars3.githubusercontent.com/u/1376292?v=4?s=100" width="100px;" alt="Nick Lynch"/><br /><sub><b>Nick Lynch</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Anjlynch+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=njlynch" title="Code">💻</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Anjlynch" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Anjlynch" title="Reviewed Pull Requests">👀</a></td>
|
|
582
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nija-at"><img src="https://avatars2.githubusercontent.com/u/16217941?v=4?s=100" width="100px;" alt="Niranjan Jayakar"/><br /><sub><b>Niranjan Jayakar</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Anija-at+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=nija-at" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Anija-at+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Anija-at" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Anija-at" title="Reviewed Pull Requests">👀</a></td>
|
|
566
583
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NGL321"><img src="https://avatars0.githubusercontent.com/u/4944099?v=4?s=100" width="100px;" alt="Noah Litov"/><br /><sub><b>Noah Litov</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=NGL321" title="Code">💻</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3ANGL321" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3ANGL321" title="Reviewed Pull Requests">👀</a></td>
|
|
567
584
|
<td align="center" valign="top" width="14.28%"><a href="https://otaviomacedo.github.io/"><img src="https://avatars.githubusercontent.com/u/288203?v=4?s=100" width="100px;" alt="Otavio Macedo"/><br /><sub><b>Otavio Macedo</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=otaviomacedo" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Aotaviomacedo+label%3Abug" title="Bug reports">🐛</a></td>
|
|
568
585
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Pidz-b"><img src="https://avatars3.githubusercontent.com/u/47750432?v=4?s=100" width="100px;" alt="PIDZ - Bart "/><br /><sub><b>PIDZ - Bart </b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3APidz-b+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
569
586
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/peterwoodworth"><img src="https://avatars.githubusercontent.com/u/44349620?v=4?s=100" width="100px;" alt="Peter Woodworth"/><br /><sub><b>Peter Woodworth</b></sub></a><br /><a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Apeterwoodworth" title="Maintenance">🚧</a></td>
|
|
570
587
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/donicek"><img src="https://avatars.githubusercontent.com/u/8548012?v=4?s=100" width="100px;" alt="Petr Kacer"/><br /><sub><b>Petr Kacer</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Adonicek+label%3Abug" title="Bug reports">🐛</a></td>
|
|
571
|
-
<td align="center" valign="top" width="14.28%"><a href="http://petrabarus.net/"><img src="https://avatars3.githubusercontent.com/u/523289?v=4?s=100" width="100px;" alt="Petra Barus"/><br /><sub><b>Petra Barus</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=petrabarus" title="Code">💻</a></td>
|
|
572
|
-
<td align="center" valign="top" width="14.28%"><a href="http://philcali.me/"><img src="https://avatars1.githubusercontent.com/u/105208?v=4?s=100" width="100px;" alt="Philip Cali"/><br /><sub><b>Philip Cali</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aphilcali+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
573
588
|
</tr>
|
|
574
589
|
<tr>
|
|
590
|
+
<td align="center" valign="top" width="14.28%"><a href="http://petrabarus.net/"><img src="https://avatars3.githubusercontent.com/u/523289?v=4?s=100" width="100px;" alt="Petra Barus"/><br /><sub><b>Petra Barus</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=petrabarus" title="Code">💻</a></td>
|
|
591
|
+
<td align="center" valign="top" width="14.28%"><a href="http://philcali.me/"><img src="https://avatars1.githubusercontent.com/u/105208?v=4?s=100" width="100px;" alt="Philip Cali"/><br /><sub><b>Philip Cali</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aphilcali+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
575
592
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Kent1"><img src="https://avatars1.githubusercontent.com/u/83018?v=4?s=100" width="100px;" alt="Quentin Loos"/><br /><sub><b>Quentin Loos</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3AKent1+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
576
593
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Console32"><img src="https://avatars1.githubusercontent.com/u/4870099?v=4?s=100" width="100px;" alt="Raphael"/><br /><sub><b>Raphael</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3AConsole32+label%3Abug" title="Bug reports">🐛</a></td>
|
|
577
594
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/richardhboyd"><img src="https://avatars0.githubusercontent.com/u/58230111?v=4?s=100" width="100px;" alt="Richard H Boyd"/><br /><sub><b>Richard H Boyd</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Arichardhboyd+label%3Abug" title="Bug reports">🐛</a></td>
|
|
578
595
|
<td align="center" valign="top" width="14.28%"><a href="http://rix0r.nl/"><img src="https://avatars2.githubusercontent.com/u/524162?v=4?s=100" width="100px;" alt="Rico Huijbers"/><br /><sub><b>Rico Huijbers</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Arix0rrr+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=rix0rrr" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Arix0rrr+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Arix0rrr" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Arix0rrr" title="Reviewed Pull Requests">👀</a></td>
|
|
579
596
|
<td align="center" valign="top" width="14.28%"><a href="https://keybase.io/romainmuller"><img src="https://avatars2.githubusercontent.com/u/411689?v=4?s=100" width="100px;" alt="Romain Marcadier"/><br /><sub><b>Romain Marcadier</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3ARomainMuller+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=RomainMuller" title="Code">💻</a> <a href="#design-RomainMuller" title="Design">🎨</a> <a href="https://github.com/aws/jsii/issues?q=author%3ARomainMuller+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3ARomainMuller" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3ARomainMuller" title="Reviewed Pull Requests">👀</a> <a href="#blog-RomainMuller" title="Blogposts">📝</a></td>
|
|
580
|
-
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/sadikkuzu/"><img src="https://avatars2.githubusercontent.com/u/23168063?v=4?s=100" width="100px;" alt="SADIK KUZU"/><br /><sub><b>SADIK KUZU</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Asadikkuzu" title="Reviewed Pull Requests">👀</a></td>
|
|
581
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/skarode96"><img src="https://avatars2.githubusercontent.com/u/24491216?v=4?s=100" width="100px;" alt="SK"/><br /><sub><b>SK</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Askarode96+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
582
597
|
</tr>
|
|
583
598
|
<tr>
|
|
599
|
+
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/sadikkuzu/"><img src="https://avatars2.githubusercontent.com/u/23168063?v=4?s=100" width="100px;" alt="SADIK KUZU"/><br /><sub><b>SADIK KUZU</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Asadikkuzu" title="Reviewed Pull Requests">👀</a></td>
|
|
600
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/skarode96"><img src="https://avatars2.githubusercontent.com/u/24491216?v=4?s=100" width="100px;" alt="SK"/><br /><sub><b>SK</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Askarode96+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
584
601
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/spfink"><img src="https://avatars1.githubusercontent.com/u/20525381?v=4?s=100" width="100px;" alt="Sam Fink"/><br /><sub><b>Sam Fink</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=spfink" title="Code">💻</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Aspfink" title="Reviewed Pull Requests">👀</a></td>
|
|
585
602
|
<td align="center" valign="top" width="14.28%"><a href="https://punch.dev/"><img src="https://avatars1.githubusercontent.com/u/38672686?v=4?s=100" width="100px;" alt="Sam Goodwin"/><br /><sub><b>Sam Goodwin</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Asam-goodwin" title="Reviewed Pull Requests">👀</a></td>
|
|
586
603
|
<td align="center" valign="top" width="14.28%"><a href="https://skorfmann.com/"><img src="https://avatars1.githubusercontent.com/u/136789?v=4?s=100" width="100px;" alt="Sebastian Korfmann"/><br /><sub><b>Sebastian Korfmann</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Askorfmann+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=skorfmann" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3Askorfmann+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
587
604
|
<td align="center" valign="top" width="14.28%"><a href="https://sepehrlaal.com/"><img src="https://avatars.githubusercontent.com/u/5657848?v=4?s=100" width="100px;" alt="Sepehr Laal"/><br /><sub><b>Sepehr Laal</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3A3p3r+label%3Abug" title="Bug reports">🐛</a></td>
|
|
588
605
|
<td align="center" valign="top" width="14.28%"><a href="https://digitalsanctum.com/"><img src="https://avatars3.githubusercontent.com/u/30923?v=4?s=100" width="100px;" alt="Shane Witbeck"/><br /><sub><b>Shane Witbeck</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Adigitalsanctum+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
589
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shivlaks"><img src="https://avatars0.githubusercontent.com/u/32604953?v=4?s=100" width="100px;" alt="Shiv Lakshminarayan"/><br /><sub><b>Shiv Lakshminarayan</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=shivlaks" title="Code">💻</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Ashivlaks" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Ashivlaks" title="Reviewed Pull Requests">👀</a></td>
|
|
590
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SomayaB"><img src="https://avatars3.githubusercontent.com/u/23043132?v=4?s=100" width="100px;" alt="Somaya"/><br /><sub><b>Somaya</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=SomayaB" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3ASomayaB+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3ASomayaB" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3ASomayaB" title="Reviewed Pull Requests">👀</a></td>
|
|
591
606
|
</tr>
|
|
592
607
|
<tr>
|
|
608
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shivlaks"><img src="https://avatars0.githubusercontent.com/u/32604953?v=4?s=100" width="100px;" alt="Shiv Lakshminarayan"/><br /><sub><b>Shiv Lakshminarayan</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=shivlaks" title="Code">💻</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Ashivlaks" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3Ashivlaks" title="Reviewed Pull Requests">👀</a></td>
|
|
609
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SomayaB"><img src="https://avatars3.githubusercontent.com/u/23043132?v=4?s=100" width="100px;" alt="Somaya"/><br /><sub><b>Somaya</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=SomayaB" title="Code">💻</a> <a href="https://github.com/aws/jsii/issues?q=author%3ASomayaB+label%3Afeature-request" title="Feature requests">🤔</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3ASomayaB" title="Maintenance">🚧</a> <a href="https://github.com/aws/jsii-rosetta/pulls?q=is%3Apr+reviewed-by%3ASomayaB" title="Reviewed Pull Requests">👀</a></td>
|
|
593
610
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/skuenzli"><img src="https://avatars.githubusercontent.com/u/869201?v=4?s=100" width="100px;" alt="Stephen Kuenzli"/><br /><sub><b>Stephen Kuenzli</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=skuenzli" title="Documentation">📖</a></td>
|
|
594
611
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/touchez-du-bois"><img src="https://avatars.githubusercontent.com/u/434017?v=4?s=100" width="100px;" alt="Takahiro Sugiura"/><br /><sub><b>Takahiro Sugiura</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=touchez-du-bois" title="Documentation">📖</a></td>
|
|
595
612
|
<td align="center" valign="top" width="14.28%"><a href="https://gitter.im/"><img src="https://avatars2.githubusercontent.com/u/8518239?v=4?s=100" width="100px;" alt="The Gitter Badger"/><br /><sub><b>The Gitter Badger</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=gitter-badger" title="Code">💻</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Agitter-badger" title="Maintenance">🚧</a></td>
|
|
596
613
|
<td align="center" valign="top" width="14.28%"><a href="https://medium.com/@thomaspoignant"><img src="https://avatars2.githubusercontent.com/u/17908063?v=4?s=100" width="100px;" alt="Thomas Poignant"/><br /><sub><b>Thomas Poignant</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Athomaspoignant+label%3Abug" title="Bug reports">🐛</a></td>
|
|
597
614
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ThomasSteinbach"><img src="https://avatars0.githubusercontent.com/u/1683246?v=4?s=100" width="100px;" alt="Thomas Steinbach"/><br /><sub><b>Thomas Steinbach</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3AThomasSteinbach+label%3Abug" title="Bug reports">🐛</a></td>
|
|
598
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hoegertn"><img src="https://avatars2.githubusercontent.com/u/1287829?v=4?s=100" width="100px;" alt="Thorsten Hoeger"/><br /><sub><b>Thorsten Hoeger</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=hoegertn" title="Code">💻</a></td>
|
|
599
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/serverlessunicorn"><img src="https://avatars1.githubusercontent.com/u/54867311?v=4?s=100" width="100px;" alt="Tim Wagner"/><br /><sub><b>Tim Wagner</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aserverlessunicorn+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii/issues?q=author%3Aserverlessunicorn+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
600
615
|
</tr>
|
|
601
616
|
<tr>
|
|
617
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hoegertn"><img src="https://avatars2.githubusercontent.com/u/1287829?v=4?s=100" width="100px;" alt="Thorsten Hoeger"/><br /><sub><b>Thorsten Hoeger</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=hoegertn" title="Code">💻</a></td>
|
|
618
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/serverlessunicorn"><img src="https://avatars1.githubusercontent.com/u/54867311?v=4?s=100" width="100px;" alt="Tim Wagner"/><br /><sub><b>Tim Wagner</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aserverlessunicorn+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii/issues?q=author%3Aserverlessunicorn+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
602
619
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tobli"><img src="https://avatars3.githubusercontent.com/u/540266?v=4?s=100" width="100px;" alt="Tobias Lidskog"/><br /><sub><b>Tobias Lidskog</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=tobli" title="Code">💻</a></td>
|
|
603
620
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TomBonnerAtDerivitec"><img src="https://avatars.githubusercontent.com/u/83637254?v=4?s=100" width="100px;" alt="Tom Bonner"/><br /><sub><b>Tom Bonner</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3ATomBonnerAtDerivitec+label%3Abug" title="Bug reports">🐛</a></td>
|
|
604
621
|
<td align="center" valign="top" width="14.28%"><a href="https://ty.coghlan.dev/"><img src="https://avatars2.githubusercontent.com/u/15920577?v=4?s=100" width="100px;" alt="Ty Coghlan"/><br /><sub><b>Ty Coghlan</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3AOphirr33+label%3Abug" title="Bug reports">🐛</a></td>
|
|
605
622
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tvanhens"><img src="https://avatars1.githubusercontent.com/u/5342795?v=4?s=100" width="100px;" alt="Tyler van Hensbergen"/><br /><sub><b>Tyler van Hensbergen</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Atvanhens+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
606
623
|
<td align="center" valign="top" width="14.28%"><a href="http://ultidev.com/Products/"><img src="https://avatars1.githubusercontent.com/u/757185?v=4?s=100" width="100px;" alt="Vlad Hrybok"/><br /><sub><b>Vlad Hrybok</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Avgribok+label%3Abug" title="Bug reports">🐛</a></td>
|
|
607
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Lanayx"><img src="https://avatars2.githubusercontent.com/u/3329606?v=4?s=100" width="100px;" alt="Vladimir Shchur"/><br /><sub><b>Vladimir Shchur</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3ALanayx+label%3Abug" title="Bug reports">🐛</a></td>
|
|
608
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Ragnoroct"><img src="https://avatars.githubusercontent.com/u/19155205?v=4?s=100" width="100px;" alt="Will Bender"/><br /><sub><b>Will Bender</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3ARagnoroct+label%3Abug" title="Bug reports">🐛</a></td>
|
|
609
624
|
</tr>
|
|
610
625
|
<tr>
|
|
626
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Lanayx"><img src="https://avatars2.githubusercontent.com/u/3329606?v=4?s=100" width="100px;" alt="Vladimir Shchur"/><br /><sub><b>Vladimir Shchur</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3ALanayx+label%3Abug" title="Bug reports">🐛</a></td>
|
|
627
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Ragnoroct"><img src="https://avatars.githubusercontent.com/u/19155205?v=4?s=100" width="100px;" alt="Will Bender"/><br /><sub><b>Will Bender</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3ARagnoroct+label%3Abug" title="Bug reports">🐛</a></td>
|
|
611
628
|
<td align="center" valign="top" width="14.28%"><a href="http://yanex.org/"><img src="https://avatars2.githubusercontent.com/u/95996?v=4?s=100" width="100px;" alt="Yan Zhulanow"/><br /><sub><b>Yan Zhulanow</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=yanex" title="Code">💻</a></td>
|
|
612
629
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yglcode"><img src="https://avatars.githubusercontent.com/u/11893614?v=4?s=100" width="100px;" alt="Yigong Liu"/><br /><sub><b>Yigong Liu</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Ayglcode+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii/issues?q=author%3Ayglcode+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
613
630
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ZachBien"><img src="https://avatars.githubusercontent.com/u/1245628?v=4?s=100" width="100px;" alt="Zach Bienenfeld"/><br /><sub><b>Zach Bienenfeld</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3AZachBien+label%3Abug" title="Bug reports">🐛</a></td>
|
|
614
631
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ajnarang"><img src="https://avatars3.githubusercontent.com/u/52025281?v=4?s=100" width="100px;" alt="ajnarang"/><br /><sub><b>ajnarang</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aajnarang+label%3Afeature-request" title="Feature requests">🤔</a></td>
|
|
615
632
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aniljava"><img src="https://avatars.githubusercontent.com/u/412569?v=4?s=100" width="100px;" alt="aniljava"/><br /><sub><b>aniljava</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=aniljava" title="Code">💻</a></td>
|
|
616
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/arnogeurts-sqills"><img src="https://avatars.githubusercontent.com/u/79304871?v=4?s=100" width="100px;" alt="arnogeurts-sqills"/><br /><sub><b>arnogeurts-sqills</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aarnogeurts-sqills+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=arnogeurts-sqills" title="Code">💻</a></td>
|
|
617
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cn-cit"><img src="https://avatars.githubusercontent.com/u/27255477?v=4?s=100" width="100px;" alt="cn-cit"/><br /><sub><b>cn-cit</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Acn-cit+label%3Abug" title="Bug reports">🐛</a></td>
|
|
618
633
|
</tr>
|
|
619
634
|
<tr>
|
|
635
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/arnogeurts-sqills"><img src="https://avatars.githubusercontent.com/u/79304871?v=4?s=100" width="100px;" alt="arnogeurts-sqills"/><br /><sub><b>arnogeurts-sqills</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aarnogeurts-sqills+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=arnogeurts-sqills" title="Code">💻</a></td>
|
|
636
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cn-cit"><img src="https://avatars.githubusercontent.com/u/27255477?v=4?s=100" width="100px;" alt="cn-cit"/><br /><sub><b>cn-cit</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Acn-cit+label%3Abug" title="Bug reports">🐛</a></td>
|
|
620
637
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/deccy-mcc"><img src="https://avatars0.githubusercontent.com/u/45844893?v=4?s=100" width="100px;" alt="deccy-mcc"/><br /><sub><b>deccy-mcc</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Adeccy-mcc+label%3Abug" title="Bug reports">🐛</a></td>
|
|
621
638
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apps/dependabot-preview"><img src="https://avatars3.githubusercontent.com/in/2141?v=4?s=100" width="100px;" alt="dependabot-preview[bot]"/><br /><sub><b>dependabot-preview[bot]</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Adependabot-preview[bot]+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Adependabot-preview[bot]" title="Maintenance">🚧</a></td>
|
|
622
639
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apps/dependabot"><img src="https://avatars0.githubusercontent.com/in/29110?v=4?s=100" width="100px;" alt="dependabot[bot]"/><br /><sub><b>dependabot[bot]</b></sub></a><br /><a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Adependabot[bot]" title="Maintenance">🚧</a></td>
|
|
623
640
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dheffx"><img src="https://avatars0.githubusercontent.com/u/22029918?v=4?s=100" width="100px;" alt="dheffx"/><br /><sub><b>dheffx</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Adheffx+label%3Abug" title="Bug reports">🐛</a></td>
|
|
624
641
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gregswdl"><img src="https://avatars0.githubusercontent.com/u/47365273?v=4?s=100" width="100px;" alt="gregswdl"/><br /><sub><b>gregswdl</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Agregswdl+label%3Abug" title="Bug reports">🐛</a></td>
|
|
625
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/guyroberts21"><img src="https://avatars.githubusercontent.com/u/47118902?v=4?s=100" width="100px;" alt="guyroberts21"/><br /><sub><b>guyroberts21</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=guyroberts21" title="Documentation">📖</a></td>
|
|
626
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mattBrzezinski"><img src="https://avatars.githubusercontent.com/u/4356074?v=4?s=100" width="100px;" alt="mattBrzezinski"/><br /><sub><b>mattBrzezinski</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=mattBrzezinski" title="Documentation">📖</a></td>
|
|
627
642
|
</tr>
|
|
628
643
|
<tr>
|
|
644
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/guyroberts21"><img src="https://avatars.githubusercontent.com/u/47118902?v=4?s=100" width="100px;" alt="guyroberts21"/><br /><sub><b>guyroberts21</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=guyroberts21" title="Documentation">📖</a></td>
|
|
645
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mattBrzezinski"><img src="https://avatars.githubusercontent.com/u/4356074?v=4?s=100" width="100px;" alt="mattBrzezinski"/><br /><sub><b>mattBrzezinski</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=mattBrzezinski" title="Documentation">📖</a></td>
|
|
629
646
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mergify"><img src="https://avatars.githubusercontent.com/u/18240476?v=4?s=100" width="100px;" alt="mergify"/><br /><sub><b>mergify</b></sub></a><br /><a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Amergify" title="Maintenance">🚧</a></td>
|
|
630
647
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apps/mergify"><img src="https://avatars1.githubusercontent.com/in/10562?v=4?s=100" width="100px;" alt="mergify[bot]"/><br /><sub><b>mergify[bot]</b></sub></a><br /><a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Amergify[bot]" title="Maintenance">🚧</a></td>
|
|
631
648
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nathannaveen"><img src="https://avatars.githubusercontent.com/u/42319948?v=4?s=100" width="100px;" alt="nathannaveen"/><br /><sub><b>nathannaveen</b></sub></a><br /><a href="https://github.com/aws/jsii/pulls?q=is%3Apr+author%3Anathannaveen" title="Maintenance">🚧</a></td>
|
|
632
649
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/seiyashima"><img src="https://avatars2.githubusercontent.com/u/4947101?v=4?s=100" width="100px;" alt="seiyashima42"/><br /><sub><b>seiyashima42</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Aseiyashima+label%3Abug" title="Bug reports">🐛</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=seiyashima" title="Code">💻</a> <a href="https://github.com/aws/jsii-rosetta/commits?author=seiyashima" title="Documentation">📖</a></td>
|
|
633
650
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sullis"><img src="https://avatars3.githubusercontent.com/u/30938?v=4?s=100" width="100px;" alt="sullis"/><br /><sub><b>sullis</b></sub></a><br /><a href="https://github.com/aws/jsii-rosetta/commits?author=sullis" title="Code">💻</a></td>
|
|
651
|
+
</tr>
|
|
652
|
+
<tr>
|
|
634
653
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vaneek"><img src="https://avatars1.githubusercontent.com/u/8113305?v=4?s=100" width="100px;" alt="vaneek"/><br /><sub><b>vaneek</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Avaneek+label%3Abug" title="Bug reports">🐛</a></td>
|
|
635
654
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wendysophie"><img src="https://avatars.githubusercontent.com/u/54415551?v=4?s=100" width="100px;" alt="wendysophie"/><br /><sub><b>wendysophie</b></sub></a><br /><a href="https://github.com/aws/jsii/issues?q=author%3Awendysophie+label%3Abug" title="Bug reports">🐛</a></td>
|
|
636
655
|
</tr>
|
|
@@ -645,18 +664,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
645
664
|
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
|
|
646
665
|
Contributions of any kind welcome!
|
|
647
666
|
|
|
648
|
-
## :gear: Maintenance & Support
|
|
649
|
-
|
|
650
|
-
The applicable _Maintenance & Support policy_ can be reviewed in [SUPPORT.md](./SUPPORT.md).
|
|
651
|
-
|
|
652
|
-
The current status of `jsii-rosetta` releases is:
|
|
653
|
-
|
|
654
|
-
Release | Status | Comment
|
|
655
|
-
--------|-------------|-----------------------------
|
|
656
|
-
`1.x` | Current | https://github.com/aws/jsii
|
|
657
|
-
`5.1.x` | Maintenance | 
|
|
658
|
-
`5.0.x` | Maintenance | 
|
|
659
|
-
|
|
660
667
|
## :balance_scale: License
|
|
661
668
|
|
|
662
669
|
**jsii** is distributed under the [Apache License, Version 2.0][apache-2.0].
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../src/commands/coverage.ts"],"names":[],"mappings":";;;AAAA,mDAAkG;AAClG,sCAAsC;AACtC,8DAA0D;AAC1D,wCAA4C;AAErC,KAAK,UAAU,aAAa,CAAC,iBAAoC;IACtE,OAAO,CAAC,IAAI,CAAC,WAAW,iBAAiB,CAAC,MAAM,aAAa,CAAC,CAAC;IAC/D,MAAM,UAAU,GAAG,IAAA,2BAAc,EAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAE5D,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,IAAA,kCAAqB,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IAE3E,MAAM,UAAU,GAAG,IAAI,sCAAiB,CAAC;QACvC,UAAU,EA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IAAI,EAAE,IAAI,CAAC,CAAC;IAC/D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,OAAO,CAAC,UAAU,2BAA2B,CAAC,CAAC;IACvG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,OAAO,CAAC,YAAY,aAAa,CAAC,CAAC;IAChE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,UAAU,mEAAmE,CAAC,CAAC;IACjH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,OAAO,CAAC,gBAAgB,0BAA0B,CAAC,CAAC;IACjF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,OAAO,CAAC,oBAAoB,4BAA4B,CAAC,CAAC;IACvF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,OAAO,CAAC,eAAe,wBAAwB,CAAC,CAAC;IAC9E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,OAAO,CAAC,iBAAiB,kCAAkC,CAAC,CAAC;IAC1F,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,SAAS,CAAC,MAAM,2BAA2B,CAAC,CAAC;IAE/E,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAA,wBAAc,EAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvE,CAAC;AACH,CAAC;AA7BD,sCA6BC","sourcesContent":["import { loadAssemblies, allTypeScriptSnippets, loadAllDefaultTablets } from '../jsii/assemblies';\nimport * as logging from '../logging';\nimport { RosettaTranslator } from '../rosetta-translator';\nimport { formatLocation } from '../snippet';\n\nexport async function checkCoverage(assemblyLocations: readonly string[]): Promise<void> {\n logging.info(`Loading ${assemblyLocations.length} assemblies`);\n const assemblies = loadAssemblies(assemblyLocations, false);\n\n const snippets = Array.from(await allTypeScriptSnippets(assemblies, true));\n\n const translator = new RosettaTranslator({\n assemblies: assemblies.map((a) => a.assembly),\n allowDirtyTranslations: true,\n });\n translator.addTabletsToCache(...Object.values(await loadAllDefaultTablets(assemblies)));\n\n process.stdout.write(`- ${snippets.length} total snippets.\\n`);\n process.stdout.write(`- ${translator.cache.count} translations in cache.\\n`);\n process.stdout.write('\\n');\n\n const results = translator.readFromCache(snippets, true, true);\n process.stdout.write(`- ${results.translations.length - results.dirtyCount} successful cache hits.\\n`);\n process.stdout.write(` ${results.infusedCount} infused.\\n`);\n process.stdout.write(`- ${results.dirtyCount} translations in cache but dirty (ok for pacmak, transliterate)\\n`);\n process.stdout.write(` ${results.dirtySourceCount} sources have changed.\\n`);\n process.stdout.write(` ${results.dirtyTranslatorCount} translator has changed.\\n`);\n process.stdout.write(` ${results.dirtyTypesCount} types have changed.\\n`);\n process.stdout.write(` ${results.dirtyDidntCompile} did not successfully compile.\\n`);\n process.stdout.write(`- ${results.remaining.length} snippets untranslated.\\n`);\n\n for (const remaining of results.remaining) {\n process.stdout.write(` ${formatLocation(remaining.location)}\\n`);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/commands/extract.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAElC,qCAAkC;AAClC,mDAK4B;AAC5B,sCAAsC;AACtC,8DAAoF;AACpF,wCAAkE;AAClE,wCAA4C;AAC5C,gDAAyG;AAEzG,kCAA6C;AAwFtC,KAAK,UAAU,gBAAgB,CAAC,iBAA2B,EAAE,OAAuB;IACzF,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACjE,MAAM,IAAA,eAAM,EAAC,iBAAiB,EAAE;QAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,mBAAmB,EA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CAAC;QAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS;YAC9B,CAAC,CAAC,IAAI,wBAAc,EAAE;YACtB,CAAC,CAAC,MAAM,wBAAc,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC/D,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACrC,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;KACrE;IAED,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC;AACpD,CAAC;AAlGD,0CAkGC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,EAAuB,EAAE,UAAoB;IACnE,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAA,gBAAU,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAqB;IAC7C,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,2BAAiB,CAAC,kBAAkB,CAAC,CAAC;IAClE,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,uDAAuD,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;KACvG;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import * as path from 'node:path';\n\nimport { infuse } from './infuse';\nimport {\n loadAssemblies,\n allTypeScriptSnippets,\n loadAllDefaultTablets,\n compressedTabletExists,\n} from '../jsii/assemblies';\nimport * as logging from '../logging';\nimport { RosettaTranslator, RosettaTranslatorOptions } from '../rosetta-translator';\nimport { TypeScriptSnippet, SnippetParameters } from '../snippet';\nimport { snippetKey } from '../tablets/key';\nimport { LanguageTablet, DEFAULT_TABLET_NAME, DEFAULT_TABLET_NAME_COMPRESSED } from '../tablets/tablets';\nimport { RosettaDiagnostic } from '../translate';\nimport { groupBy, isDefined } from '../util';\n\nexport interface ExtractResult {\n diagnostics: RosettaDiagnostic[];\n tablet: LanguageTablet;\n}\n\nexport interface ExtractOptions {\n readonly includeCompilerDiagnostics?: boolean;\n readonly validateAssemblies?: boolean;\n readonly only?: string[];\n\n /**\n * A tablet file to be loaded and used as a source for caching\n */\n readonly cacheFromFile?: string;\n\n /**\n * A tablet file to append translated snippets to\n */\n readonly cacheToFile?: string;\n\n /**\n * Trim cache to only contain translations found in the current assemblies\n *\n * @default false\n */\n readonly trimCache?: boolean;\n\n /**\n * Write translations to implicit tablets (`.jsii.tabl.json`)\n *\n * @default true\n */\n readonly writeToImplicitTablets?: boolean;\n\n /**\n * What directory to compile the samples in\n *\n * @default - Rosetta manages the compilation directory\n * @deprecated Samples declare their own dependencies instead\n */\n readonly compilationDirectory?: string;\n\n /**\n * Make a translator (just for testing)\n */\n readonly translatorFactory?: (opts: RosettaTranslatorOptions) => RosettaTranslator;\n\n /**\n * Turn on 'loose mode' or not\n *\n * Loose mode ignores failures during fixturizing, and undoes 'strict mode' for\n * diagnostics.\n *\n * @default false\n */\n readonly loose?: boolean;\n\n /**\n * Accept dirty translations from the cache\n *\n * @default false\n */\n readonly allowDirtyTranslations?: boolean;\n\n /**\n * Compress the implicit tablet files.\n *\n * @default - preserves the original compression status of each individual implicit tablet file.\n */\n readonly compressTablet?: boolean;\n\n /**\n * Compress the cacheToFile tablet.\n *\n * @default false\n */\n readonly compressCacheToFile?: boolean;\n\n /**\n * Cleanup temporary directories\n *\n * @default true\n */\n readonly cleanup?: boolean;\n}\n\nexport async function extractAndInfuse(assemblyLocations: string[], options: ExtractOptions): Promise<ExtractResult> {\n const result = await extractSnippets(assemblyLocations, options);\n await infuse(assemblyLocations, {\n cacheFromFile: options.cacheFromFile,\n cacheToFile: options.cacheToFile,\n compressCacheToFile: options.compressCacheToFile,\n });\n return result;\n}\n\n/**\n * Extract all samples from the given assemblies into a tablet\n */\nexport async function extractSnippets(\n assemblyLocations: readonly string[],\n options: ExtractOptions = {},\n): Promise<ExtractResult> {\n const only = options.only ?? [];\n\n logging.info(`Loading ${assemblyLocations.length} assemblies`);\n const assemblies = loadAssemblies(assemblyLocations, options.validateAssemblies ?? false);\n\n let snippets = Array.from(await allTypeScriptSnippets(assemblies, options.loose));\n if (only.length > 0) {\n snippets = filterSnippets(snippets, only);\n }\n\n // Map every assembly to a list of snippets, so that we know what implicit\n // tablet to write the translations to later on.\n const snippetsPerAssembly = groupBy(\n snippets.map((s) => ({ key: snippetKey(s), location: projectDirectory(s) })),\n (x) => x.location,\n );\n\n const translatorOptions: RosettaTranslatorOptions = {\n includeCompilerDiagnostics: options.includeCompilerDiagnostics ?? false,\n assemblies: assemblies.map((a) => a.assembly),\n allowDirtyTranslations: options.allowDirtyTranslations,\n };\n\n const translator = options.translatorFactory\n ? options.translatorFactory(translatorOptions)\n : new RosettaTranslator(translatorOptions);\n\n // Prime the snippet cache with:\n // - Cache source file\n // - Default tablets found next to each assembly\n if (options.cacheFromFile) {\n await translator.addToCache(options.cacheFromFile);\n }\n translator.addTabletsToCache(...Object.values(await loadAllDefaultTablets(assemblies)));\n\n if (translator.hasCache()) {\n const { translations, remaining } = translator.readFromCache(snippets, true, options.includeCompilerDiagnostics);\n logging.info(`Reused ${translations.length} translations from cache`);\n snippets = remaining;\n }\n\n const diagnostics = [];\n if (snippets.length > 0) {\n logging.info('Translating');\n const startTime = Date.now();\n\n const result = await translator.translateAll(snippets, {\n compilationDirectory: options.compilationDirectory,\n cleanup: options.cleanup,\n });\n\n const delta = (Date.now() - startTime) / 1000;\n logging.info(\n `Translated ${snippets.length} snippets in ${delta} seconds (${(delta / snippets.length).toPrecision(\n 3,\n )}s/snippet)`,\n );\n diagnostics.push(...result.diagnostics);\n } else {\n logging.info('Nothing left to translate');\n }\n\n // Save to individual tablet files\n if (options.writeToImplicitTablets ?? true) {\n await Promise.all(\n Object.entries(snippetsPerAssembly).map(async ([location, snips]) => {\n // Compress the implicit tablet if explicitly asked to, otherwise compress only if the original tablet was compressed.\n const compressedTablet = options.compressTablet ?? compressedTabletExists(location);\n\n const asmTabletFile = path.join(\n location,\n compressedTablet ? DEFAULT_TABLET_NAME_COMPRESSED : DEFAULT_TABLET_NAME,\n );\n logging.debug(`Writing ${snips.length} translations to ${asmTabletFile}`);\n const translations = snips.map(({ key }) => translator.tablet.tryGetSnippet(key)).filter(isDefined);\n\n const asmTablet = new LanguageTablet();\n asmTablet.addSnippets(...translations);\n await asmTablet.save(asmTabletFile, compressedTablet);\n }),\n );\n }\n\n // optionally append to the output file\n if (options.cacheToFile) {\n logging.info(`Adding translations to ${options.cacheToFile}`);\n const output = options.trimCache\n ? new LanguageTablet()\n : await LanguageTablet.fromOptionalFile(options.cacheToFile);\n output.addTablets(translator.tablet);\n await output.save(options.cacheToFile, options.compressCacheToFile);\n }\n\n return { diagnostics, tablet: translator.tablet };\n}\n\n/**\n * Only yield the snippets whose id exists in a whitelist\n */\nfunction filterSnippets(ts: TypeScriptSnippet[], includeIds: string[]) {\n return ts.filter((t) => includeIds.includes(snippetKey(t)));\n}\n\nfunction projectDirectory(ts: TypeScriptSnippet) {\n const dir = ts.parameters?.[SnippetParameters.$PROJECT_DIRECTORY];\n if (!dir) {\n throw new Error(`Snippet does not have associated project directory: ${JSON.stringify(ts.location)}`);\n }\n return dir;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/commands/extract.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAElC,qCAAkC;AAClC,mDAK4B;AAC5B,sCAAsC;AACtC,8DAAoF;AACpF,wCAAkE;AAClE,wCAA4C;AAC5C,gDAAyG;AAEzG,kCAA6C;AAwFtC,KAAK,UAAU,gBAAgB,CAAC,iBAA2B,EAAE,OAAuB;IACzF,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAC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allTypeScriptSnippets,\n loadAllDefaultTablets,\n compressedTabletExists,\n} from '../jsii/assemblies';\nimport * as logging from '../logging';\nimport { RosettaTranslator, RosettaTranslatorOptions } from '../rosetta-translator';\nimport { TypeScriptSnippet, SnippetParameters } from '../snippet';\nimport { snippetKey } from '../tablets/key';\nimport { LanguageTablet, DEFAULT_TABLET_NAME, DEFAULT_TABLET_NAME_COMPRESSED } from '../tablets/tablets';\nimport { RosettaDiagnostic } from '../translate';\nimport { groupBy, isDefined } from '../util';\n\nexport interface ExtractResult {\n diagnostics: RosettaDiagnostic[];\n tablet: LanguageTablet;\n}\n\nexport interface ExtractOptions {\n readonly includeCompilerDiagnostics?: boolean;\n readonly validateAssemblies?: boolean;\n readonly only?: string[];\n\n /**\n * A tablet file to be loaded and used as a source for caching\n */\n readonly cacheFromFile?: string;\n\n /**\n * A tablet file to append translated snippets to\n */\n readonly cacheToFile?: string;\n\n /**\n * Trim cache to only contain translations found in the current assemblies\n *\n * @default false\n */\n readonly trimCache?: boolean;\n\n /**\n * Write translations to implicit tablets (`.jsii.tabl.json`)\n *\n * @default true\n */\n readonly writeToImplicitTablets?: boolean;\n\n /**\n * What directory to compile the samples in\n *\n * @default - Rosetta manages the compilation directory\n * @deprecated Samples declare their own dependencies instead\n */\n readonly compilationDirectory?: string;\n\n /**\n * Make a translator (just for testing)\n */\n readonly translatorFactory?: (opts: RosettaTranslatorOptions) => RosettaTranslator;\n\n /**\n * Turn on 'loose mode' or not\n *\n * Loose mode ignores failures during fixturizing, and undoes 'strict mode' for\n * diagnostics.\n *\n * @default false\n */\n readonly loose?: boolean;\n\n /**\n * Accept dirty translations from the cache\n *\n * @default false\n */\n readonly allowDirtyTranslations?: boolean;\n\n /**\n * Compress the implicit tablet files.\n *\n * @default - preserves the original compression status of each individual implicit tablet file.\n */\n readonly compressTablet?: boolean;\n\n /**\n * Compress the cacheToFile tablet.\n *\n * @default false\n */\n readonly compressCacheToFile?: boolean;\n\n /**\n * Cleanup temporary directories\n *\n * @default true\n */\n readonly cleanup?: boolean;\n}\n\nexport async function extractAndInfuse(assemblyLocations: string[], options: ExtractOptions): Promise<ExtractResult> {\n const result = await extractSnippets(assemblyLocations, options);\n await infuse(assemblyLocations, {\n cacheFromFile: options.cacheFromFile,\n cacheToFile: options.cacheToFile,\n compressCacheToFile: options.compressCacheToFile,\n });\n return result;\n}\n\n/**\n * Extract all samples from the given assemblies into a tablet\n */\nexport async function extractSnippets(\n assemblyLocations: readonly string[],\n options: ExtractOptions = {},\n): Promise<ExtractResult> {\n const only = options.only ?? [];\n\n logging.info(`Loading ${assemblyLocations.length} assemblies`);\n const assemblies = loadAssemblies(assemblyLocations, options.validateAssemblies ?? false);\n\n let snippets = Array.from(await allTypeScriptSnippets(assemblies, options.loose));\n if (only.length > 0) {\n snippets = filterSnippets(snippets, only);\n }\n\n // Map every assembly to a list of snippets, so that we know what implicit\n // tablet to write the translations to later on.\n const snippetsPerAssembly = groupBy(\n snippets.map((s) => ({ key: snippetKey(s), location: projectDirectory(s) })),\n (x) => x.location,\n );\n\n const translatorOptions: RosettaTranslatorOptions = {\n includeCompilerDiagnostics: options.includeCompilerDiagnostics ?? false,\n assemblies: assemblies.map((a) => a.assembly),\n allowDirtyTranslations: options.allowDirtyTranslations,\n };\n\n const translator = options.translatorFactory\n ? options.translatorFactory(translatorOptions)\n : new RosettaTranslator(translatorOptions);\n\n // Prime the snippet cache with:\n // - Cache source file\n // - Default tablets found next to each assembly\n if (options.cacheFromFile) {\n await translator.addToCache(options.cacheFromFile);\n }\n translator.addTabletsToCache(...Object.values(await loadAllDefaultTablets(assemblies)));\n\n if (translator.hasCache()) {\n const { translations, remaining } = translator.readFromCache(snippets, true, options.includeCompilerDiagnostics);\n logging.info(`Reused ${translations.length} translations from cache`);\n snippets = remaining;\n }\n\n const diagnostics = [];\n if (snippets.length > 0) {\n logging.info('Translating');\n const startTime = Date.now();\n\n const result = await translator.translateAll(snippets, {\n compilationDirectory: options.compilationDirectory,\n cleanup: options.cleanup,\n });\n\n const delta = (Date.now() - startTime) / 1000;\n logging.info(\n `Translated ${snippets.length} snippets in ${delta} seconds (${(delta / snippets.length).toPrecision(\n 3,\n )}s/snippet)`,\n );\n diagnostics.push(...result.diagnostics);\n } else {\n logging.info('Nothing left to translate');\n }\n\n // Save to individual tablet files\n if (options.writeToImplicitTablets ?? true) {\n await Promise.all(\n Object.entries(snippetsPerAssembly).map(async ([location, snips]) => {\n // Compress the implicit tablet if explicitly asked to, otherwise compress only if the original tablet was compressed.\n const compressedTablet = options.compressTablet ?? compressedTabletExists(location);\n\n const asmTabletFile = path.join(\n location,\n compressedTablet ? DEFAULT_TABLET_NAME_COMPRESSED : DEFAULT_TABLET_NAME,\n );\n logging.debug(`Writing ${snips.length} translations to ${asmTabletFile}`);\n const translations = snips.map(({ key }) => translator.tablet.tryGetSnippet(key)).filter(isDefined);\n\n const asmTablet = new LanguageTablet();\n asmTablet.addSnippets(...translations);\n await asmTablet.save(asmTabletFile, compressedTablet);\n }),\n );\n }\n\n // optionally append to the output file\n if (options.cacheToFile) {\n logging.info(`Adding translations to ${options.cacheToFile}`);\n const output = options.trimCache\n ? new LanguageTablet()\n : await LanguageTablet.fromOptionalFile(options.cacheToFile);\n output.addTablets(translator.tablet);\n await output.save(options.cacheToFile, options.compressCacheToFile);\n }\n\n return { diagnostics, tablet: translator.tablet };\n}\n\n/**\n * Only yield the snippets whose id exists in a whitelist\n */\nfunction filterSnippets(ts: TypeScriptSnippet[], includeIds: string[]) {\n return ts.filter((t) => includeIds.includes(snippetKey(t)));\n}\n\nfunction projectDirectory(ts: TypeScriptSnippet) {\n const dir = ts.parameters?.[SnippetParameters.$PROJECT_DIRECTORY];\n if (!dir) {\n throw new Error(`Snippet does not have associated project directory: ${JSON.stringify(ts.location)}`);\n }\n return dir;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infuse.js","sourceRoot":"","sources":["../../src/commands/infuse.ts"],"names":[],"mappings":";;;AAAA,8BA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EAAE,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACd;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport * as spec from '@jsii/spec';\nimport { replaceAssembly } from '@jsii/spec';\n\nimport { loadAssemblies, loadAllDefaultTablets, LoadedAssembly, allTypeScriptSnippets } from '../jsii/assemblies';\nimport { renderMetadataline, TypeScriptSnippet } from '../snippet';\nimport { SnippetSelector, mean, meanLength, shortest, longest } from '../snippet-selectors';\nimport { snippetKey } from '../tablets/key';\nimport {\n LanguageTablet,\n TranslatedSnippet,\n DEFAULT_TABLET_NAME,\n DEFAULT_TABLET_NAME_COMPRESSED,\n} from '../tablets/tablets';\nimport { isDefined, mkDict, indexBy } from '../util';\n\nexport interface InfuseResult {\n readonly coverageResults: Record<string, InfuseTypes>;\n}\n\nexport interface InfuseTypes {\n readonly types: number;\n readonly typesWithInsertedExamples: number;\n}\n\nexport interface InfuseOptions {\n readonly logFile?: string;\n\n /**\n * Where to read additional translations\n */\n readonly cacheFromFile?: string;\n\n /**\n * In addition to the implicit tablets, also write all added examples to this additional output tablet\n */\n readonly cacheToFile?: string;\n\n /**\n * Compress the cacheToFile\n */\n readonly compressCacheToFile?: boolean;\n}\n\nexport const DEFAULT_INFUSION_RESULTS_NAME = 'infusion-results.html';\n\nconst ADDITIONAL_SELECTORS: Record<string, SnippetSelector> = { meanLength, shortest, longest };\n\nclass DefaultRecord<A> {\n public readonly index: Record<string, A[]> = {};\n\n public add(key: string, value: A) {\n if (!this.index[key]) {\n this.index[key] = [];\n }\n this.index[key].push(value);\n }\n}\n\n/**\n * Infuse will analyze the snippets in a set of tablets, and update the assembly to add\n * examples to types that don't have any yet, based on snippets that use the given type.\n */\nexport async function infuse(assemblyLocations: string[], options?: InfuseOptions): Promise<InfuseResult> {\n let stream: fs.WriteStream | undefined = undefined;\n if (options?.logFile) {\n // Create stream for html file and insert some styling\n stream = fs.createWriteStream(options.logFile, { encoding: 'utf-8' });\n startFile(stream);\n }\n\n // Load tablet file and assemblies\n const assemblies = loadAssemblies(assemblyLocations, false);\n const defaultTablets = await loadAllDefaultTablets(assemblies);\n\n const availableTranslations = new LanguageTablet();\n if (options?.cacheFromFile) {\n availableTranslations.addTablet(await LanguageTablet.fromOptionalFile(options.cacheFromFile));\n }\n availableTranslations.addTablets(...Object.values(defaultTablets));\n\n const { translationsByFqn, originalsByKey } = await availableSnippetsPerFqn(assemblies, availableTranslations);\n\n const additionalOutputTablet = options?.cacheToFile\n ? await LanguageTablet.fromOptionalFile(options?.cacheToFile)\n : new LanguageTablet();\n\n const coverageResults = mkDict(\n await Promise.all(\n assemblies.map(async ({ assembly, directory }) => {\n stream?.write(`<h1>${assembly.name}</h1>\\n`);\n\n const implicitTablet = defaultTablets[directory];\n const implicitTabletFile = path.join(\n directory,\n implicitTablet.compressedSource ? DEFAULT_TABLET_NAME_COMPRESSED : DEFAULT_TABLET_NAME,\n );\n if (!implicitTablet) {\n throw new Error(`No tablet found for ${directory}`);\n }\n\n let insertedExamples = 0;\n const filteredTypes = filterForTypesWithoutExamples(assembly.types ?? {});\n for (const [typeFqn, type] of Object.entries(filteredTypes)) {\n const available = translationsByFqn[typeFqn];\n if (!available) {\n continue;\n }\n\n const example = pickBestExample(typeFqn, available, stream);\n const original = originalsByKey[example.key];\n insertExample(example, original, type, [implicitTablet, additionalOutputTablet]);\n insertedExamples++;\n }\n\n if (insertedExamples > 0) {\n // Save the updated assembly and implicit tablets\n // eslint-disable-next-line no-await-in-loop\n await Promise.all([\n replaceAssembly(assembly, directory),\n implicitTablet.save(implicitTabletFile, implicitTablet.compressedSource),\n ]);\n }\n\n return [\n directory,\n {\n types: Object.keys(filteredTypes).length,\n typesWithInsertedExamples: insertedExamples,\n } as InfuseTypes,\n ] as const;\n }),\n ),\n );\n\n stream?.close();\n\n // If we copied examples onto different types, we'll also have inserted new snippets\n // with different keys into the tablet. We must now write the updated tablet somewhere.\n if (options?.cacheToFile) {\n await additionalOutputTablet.save(options.cacheToFile, options.compressCacheToFile);\n }\n\n return {\n coverageResults: coverageResults,\n };\n}\n\nfunction pickBestExample(typeFqn: string, choices: TranslatedSnippet[], logStream?: fs.WriteStream) {\n const meanResult = mean(choices);\n if (logStream) {\n const selected = Object.entries(ADDITIONAL_SELECTORS).map(([name, fn]) => [name, fn(choices)] as const);\n const selectedFromSelector = {\n ...makeDict(selected),\n mean: meanResult,\n };\n logOutput(logStream, typeFqn, createHtmlEntry(selectedFromSelector));\n }\n return meanResult;\n}\n\nfunction startFile(stream: fs.WriteStream) {\n stream.write('<style>\\n');\n stream.write('h2 { color: blue; clear: both; }\\n');\n stream.write('h1 { color: red; clear: both; }\\n');\n stream.write(\n 'div { float: left; height: 31em; width: 22em; overflow: auto; margin: 1em; background-color: #ddd; }\\n',\n );\n stream.write(\n 'pre { float: left; height: 30em; width: 25em; overflow: auto; padding: 0.5em; background-color: #ddd; }\\n',\n );\n stream.write('</style>\\n');\n}\n\nfunction createHtmlEntry(results: Record<string, TranslatedSnippet>): Record<string, string[]> {\n const entry = new DefaultRecord<string>();\n for (const [key, value] of Object.entries(results)) {\n entry.add(value.originalSource.source, key);\n }\n return entry.index;\n}\n\nfunction logOutput(stream: fs.WriteStream | undefined, typeFqn: string, algorithmMap: Record<string, string[]>) {\n stream?.write(`<h2>${typeFqn}</h2>\\n`);\n for (const [key, value] of Object.entries(algorithmMap)) {\n stream?.write(`<div class=\"snippet\"><h3>${value.toString()}</h3>\\n<pre>${key}</pre>\\n</div>\\n`);\n }\n for (let i = 0; i < 4 - Object.keys(algorithmMap).length; i++) {\n stream?.write('<div class=\"padding\"></div>\\n');\n }\n}\n\nfunction filterForTypesWithoutExamples(types: { [fqn: string]: spec.Type }): Record<string, spec.Type> {\n const filteredTypes: Record<string, spec.Type> = {};\n for (const [typeFqn, type] of Object.entries(types)) {\n // Ignore Interfaces that contain only properties\n if (type.kind === spec.TypeKind.Interface && !type.datatype) {\n continue;\n }\n // Already has example\n if (type.docs?.example !== undefined) {\n continue;\n }\n filteredTypes[typeFqn] = type;\n }\n return filteredTypes;\n}\n\n/**\n * Insert an example into the docs of a type, and insert it back into the tablet under a new key\n */\nfunction insertExample(\n example: TranslatedSnippet,\n original: TypeScriptSnippet | undefined,\n type: spec.Type,\n tablets: LanguageTablet[],\n): void {\n const parameters = {\n ...original?.parameters,\n infused: '',\n };\n // exampleMetadata should always be nonempty since we always have a parameter.\n const exampleMetadata = renderMetadataline(parameters) ?? '';\n\n if (type.docs) {\n type.docs.example = example.originalSource.source;\n type.docs.custom = { ...type.docs.custom, exampleMetadata };\n } else {\n type.docs = {\n example: example.originalSource.source,\n custom: { exampleMetadata },\n };\n }\n\n for (const tablet of tablets) {\n tablet.addSnippet(\n example.withLocation({\n api: { api: 'type', fqn: type.fqn },\n field: { field: 'example' },\n }),\n );\n }\n}\n\n/**\n * Return a map of FQN -> snippet keys that exercise that FQN.\n *\n * For a snippet to qualify, it must both:\n *\n * a) be current (i.e.: exist in the input assemblies)\n * b) have been analyzed (i.e.: exist in one of the translated tablets)\n *\n * Returns a map of fqns to a list of keys that represent snippets that include the fqn.\n */\nasync function availableSnippetsPerFqn(asms: readonly LoadedAssembly[], translationsTablet: LanguageTablet) {\n const ret = new DefaultRecord<TranslatedSnippet>();\n\n const originalsByKey = indexBy(await allTypeScriptSnippets(asms), snippetKey);\n\n const translations = Object.keys(originalsByKey)\n .map((key) => translationsTablet.tryGetSnippet(key))\n .filter(isDefined);\n\n for (const trans of translations) {\n for (const fqn of trans.snippet.fqnsReferenced ?? []) {\n ret.add(fqn, trans);\n }\n }\n\n return { originalsByKey, translationsByFqn: ret.index };\n}\n\nfunction makeDict<A>(xs: Array<readonly [string, A]>): Record<string, A> {\n const ret: Record<string, A> = {};\n for (const [str, a] of xs) {\n ret[str] = a;\n }\n return ret;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"infuse.js","sourceRoot":"","sources":["../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,EAAE,CAAC;YACrD,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC;AAC1D,CAAC;AAED,SAAS,QAAQ,CAAI,EAA+B;IAClD,MAAM,GAAG,GAAsB,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAC1B,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport * as spec from '@jsii/spec';\nimport { replaceAssembly } from '@jsii/spec';\n\nimport { loadAssemblies, loadAllDefaultTablets, LoadedAssembly, allTypeScriptSnippets } from '../jsii/assemblies';\nimport { renderMetadataline, TypeScriptSnippet } from '../snippet';\nimport { SnippetSelector, mean, meanLength, shortest, longest } from '../snippet-selectors';\nimport { snippetKey } from '../tablets/key';\nimport {\n LanguageTablet,\n TranslatedSnippet,\n DEFAULT_TABLET_NAME,\n DEFAULT_TABLET_NAME_COMPRESSED,\n} from '../tablets/tablets';\nimport { isDefined, mkDict, indexBy } from '../util';\n\nexport interface InfuseResult {\n readonly coverageResults: Record<string, InfuseTypes>;\n}\n\nexport interface InfuseTypes {\n readonly types: number;\n readonly typesWithInsertedExamples: number;\n}\n\nexport interface InfuseOptions {\n readonly logFile?: string;\n\n /**\n * Where to read additional translations\n */\n readonly cacheFromFile?: string;\n\n /**\n * In addition to the implicit tablets, also write all added examples to this additional output tablet\n */\n readonly cacheToFile?: string;\n\n /**\n * Compress the cacheToFile\n */\n readonly compressCacheToFile?: boolean;\n}\n\nexport const DEFAULT_INFUSION_RESULTS_NAME = 'infusion-results.html';\n\nconst ADDITIONAL_SELECTORS: Record<string, SnippetSelector> = { meanLength, shortest, longest };\n\nclass DefaultRecord<A> {\n public readonly index: Record<string, A[]> = {};\n\n public add(key: string, value: A) {\n if (!this.index[key]) {\n this.index[key] = [];\n }\n this.index[key].push(value);\n }\n}\n\n/**\n * Infuse will analyze the snippets in a set of tablets, and update the assembly to add\n * examples to types that don't have any yet, based on snippets that use the given type.\n */\nexport async function infuse(assemblyLocations: string[], options?: InfuseOptions): Promise<InfuseResult> {\n let stream: fs.WriteStream | undefined = undefined;\n if (options?.logFile) {\n // Create stream for html file and insert some styling\n stream = fs.createWriteStream(options.logFile, { encoding: 'utf-8' });\n startFile(stream);\n }\n\n // Load tablet file and assemblies\n const assemblies = loadAssemblies(assemblyLocations, false);\n const defaultTablets = await loadAllDefaultTablets(assemblies);\n\n const availableTranslations = new LanguageTablet();\n if (options?.cacheFromFile) {\n availableTranslations.addTablet(await LanguageTablet.fromOptionalFile(options.cacheFromFile));\n }\n availableTranslations.addTablets(...Object.values(defaultTablets));\n\n const { translationsByFqn, originalsByKey } = await availableSnippetsPerFqn(assemblies, availableTranslations);\n\n const additionalOutputTablet = options?.cacheToFile\n ? await LanguageTablet.fromOptionalFile(options?.cacheToFile)\n : new LanguageTablet();\n\n const coverageResults = mkDict(\n await Promise.all(\n assemblies.map(async ({ assembly, directory }) => {\n stream?.write(`<h1>${assembly.name}</h1>\\n`);\n\n const implicitTablet = defaultTablets[directory];\n const implicitTabletFile = path.join(\n directory,\n implicitTablet.compressedSource ? DEFAULT_TABLET_NAME_COMPRESSED : DEFAULT_TABLET_NAME,\n );\n if (!implicitTablet) {\n throw new Error(`No tablet found for ${directory}`);\n }\n\n let insertedExamples = 0;\n const filteredTypes = filterForTypesWithoutExamples(assembly.types ?? {});\n for (const [typeFqn, type] of Object.entries(filteredTypes)) {\n const available = translationsByFqn[typeFqn];\n if (!available) {\n continue;\n }\n\n const example = pickBestExample(typeFqn, available, stream);\n const original = originalsByKey[example.key];\n insertExample(example, original, type, [implicitTablet, additionalOutputTablet]);\n insertedExamples++;\n }\n\n if (insertedExamples > 0) {\n // Save the updated assembly and implicit tablets\n // eslint-disable-next-line no-await-in-loop\n await Promise.all([\n replaceAssembly(assembly, directory),\n implicitTablet.save(implicitTabletFile, implicitTablet.compressedSource),\n ]);\n }\n\n return [\n directory,\n {\n types: Object.keys(filteredTypes).length,\n typesWithInsertedExamples: insertedExamples,\n } as InfuseTypes,\n ] as const;\n }),\n ),\n );\n\n stream?.close();\n\n // If we copied examples onto different types, we'll also have inserted new snippets\n // with different keys into the tablet. We must now write the updated tablet somewhere.\n if (options?.cacheToFile) {\n await additionalOutputTablet.save(options.cacheToFile, options.compressCacheToFile);\n }\n\n return {\n coverageResults: coverageResults,\n };\n}\n\nfunction pickBestExample(typeFqn: string, choices: TranslatedSnippet[], logStream?: fs.WriteStream) {\n const meanResult = mean(choices);\n if (logStream) {\n const selected = Object.entries(ADDITIONAL_SELECTORS).map(([name, fn]) => [name, fn(choices)] as const);\n const selectedFromSelector = {\n ...makeDict(selected),\n mean: meanResult,\n };\n logOutput(logStream, typeFqn, createHtmlEntry(selectedFromSelector));\n }\n return meanResult;\n}\n\nfunction startFile(stream: fs.WriteStream) {\n stream.write('<style>\\n');\n stream.write('h2 { color: blue; clear: both; }\\n');\n stream.write('h1 { color: red; clear: both; }\\n');\n stream.write(\n 'div { float: left; height: 31em; width: 22em; overflow: auto; margin: 1em; background-color: #ddd; }\\n',\n );\n stream.write(\n 'pre { float: left; height: 30em; width: 25em; overflow: auto; padding: 0.5em; background-color: #ddd; }\\n',\n );\n stream.write('</style>\\n');\n}\n\nfunction createHtmlEntry(results: Record<string, TranslatedSnippet>): Record<string, string[]> {\n const entry = new DefaultRecord<string>();\n for (const [key, value] of Object.entries(results)) {\n entry.add(value.originalSource.source, key);\n }\n return entry.index;\n}\n\nfunction logOutput(stream: fs.WriteStream | undefined, typeFqn: string, algorithmMap: Record<string, string[]>) {\n stream?.write(`<h2>${typeFqn}</h2>\\n`);\n for (const [key, value] of Object.entries(algorithmMap)) {\n stream?.write(`<div class=\"snippet\"><h3>${value.toString()}</h3>\\n<pre>${key}</pre>\\n</div>\\n`);\n }\n for (let i = 0; i < 4 - Object.keys(algorithmMap).length; i++) {\n stream?.write('<div class=\"padding\"></div>\\n');\n }\n}\n\nfunction filterForTypesWithoutExamples(types: { [fqn: string]: spec.Type }): Record<string, spec.Type> {\n const filteredTypes: Record<string, spec.Type> = {};\n for (const [typeFqn, type] of Object.entries(types)) {\n // Ignore Interfaces that contain only properties\n if (type.kind === spec.TypeKind.Interface && !type.datatype) {\n continue;\n }\n // Already has example\n if (type.docs?.example !== undefined) {\n continue;\n }\n filteredTypes[typeFqn] = type;\n }\n return filteredTypes;\n}\n\n/**\n * Insert an example into the docs of a type, and insert it back into the tablet under a new key\n */\nfunction insertExample(\n example: TranslatedSnippet,\n original: TypeScriptSnippet | undefined,\n type: spec.Type,\n tablets: LanguageTablet[],\n): void {\n const parameters = {\n ...original?.parameters,\n infused: '',\n };\n // exampleMetadata should always be nonempty since we always have a parameter.\n const exampleMetadata = renderMetadataline(parameters) ?? '';\n\n if (type.docs) {\n type.docs.example = example.originalSource.source;\n type.docs.custom = { ...type.docs.custom, exampleMetadata };\n } else {\n type.docs = {\n example: example.originalSource.source,\n custom: { exampleMetadata },\n };\n }\n\n for (const tablet of tablets) {\n tablet.addSnippet(\n example.withLocation({\n api: { api: 'type', fqn: type.fqn },\n field: { field: 'example' },\n }),\n );\n }\n}\n\n/**\n * Return a map of FQN -> snippet keys that exercise that FQN.\n *\n * For a snippet to qualify, it must both:\n *\n * a) be current (i.e.: exist in the input assemblies)\n * b) have been analyzed (i.e.: exist in one of the translated tablets)\n *\n * Returns a map of fqns to a list of keys that represent snippets that include the fqn.\n */\nasync function availableSnippetsPerFqn(asms: readonly LoadedAssembly[], translationsTablet: LanguageTablet) {\n const ret = new DefaultRecord<TranslatedSnippet>();\n\n const originalsByKey = indexBy(await allTypeScriptSnippets(asms), snippetKey);\n\n const translations = Object.keys(originalsByKey)\n .map((key) => translationsTablet.tryGetSnippet(key))\n .filter(isDefined);\n\n for (const trans of translations) {\n for (const fqn of trans.snippet.fqnsReferenced ?? []) {\n ret.add(fqn, trans);\n }\n }\n\n return { originalsByKey, translationsByFqn: ret.index };\n}\n\nfunction makeDict<A>(xs: Array<readonly [string, A]>): Record<string, A> {\n const ret: Record<string, A> = {};\n for (const [str, a] of xs) {\n ret[str] = a;\n }\n return ret;\n}\n"]}
|
package/lib/commands/read.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/commands/read.ts"],"names":[],"mappings":";;;AACA,gDAAoF;AAE7E,KAAK,UAAU,UAAU,CAAC,UAAkB,EAAE,GAAY,EAAE,IAAa;IAC9E,MAAM,GAAG,GAAG,IAAI,wBAAc,EAAE,CAAC;IACjC,MAAM,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAE3B,IAAI,GAAG,KAAK,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/commands/read.ts"],"names":[],"mappings":";;;AACA,gDAAoF;AAE7E,KAAK,UAAU,UAAU,CAAC,UAAkB,EAAE,GAAY,EAAE,IAAa;IAC9E,MAAM,GAAG,GAAG,IAAI,wBAAc,EAAE,CAAC;IACjC,MAAM,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAE3B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,MAAM,OAAO,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC;QAC7C,CAAC;QACD,cAAc,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC;SAAM,CAAC;QACN,YAAY,EAAE,CAAC;IACjB,CAAC;IAED,SAAS,YAAY;QACnB,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,WAAW,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;QACtC,CAAC;IACH,CAAC;IAED,SAAS,kBAAkB,CAAC,WAAwB;QAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,MAAM,IAAI,CAAC,CAAC;IAClD,CAAC;AACH,CAAC;AArDD,gCAqDC;AAED,SAAS,aAAa,CAAC,GAAW;IAChC,OAAO,MAAM,CAAC,IAAI,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,cAAc,CAAC,GAAW;IACjC,OAAO,MAAM,CAAC,IAAI,GAAG,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,MAAM,CAAC,GAAW,EAAE,CAAS,EAAE,IAAY;IAClD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAE9C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC","sourcesContent":["import { TargetLanguage } from '../languages';\nimport { LanguageTablet, TranslatedSnippet, Translation } from '../tablets/tablets';\n\nexport async function readTablet(tabletFile: string, key?: string, lang?: string) {\n const tab = new LanguageTablet();\n await tab.load(tabletFile);\n\n if (key !== undefined) {\n const snippet = tab.tryGetSnippet(key);\n if (snippet === undefined) {\n throw new Error(`No such snippet: ${key}`);\n }\n displaySnippet(snippet);\n } else {\n listSnippets();\n }\n\n function listSnippets() {\n for (const k of tab.snippetKeys) {\n process.stdout.write(`${snippetHeader(k)}\\n`);\n displaySnippet(tab.tryGetSnippet(k)!);\n process.stdout.write('\\n');\n }\n }\n\n function displaySnippet(snippet: TranslatedSnippet) {\n if (snippet.snippet.didCompile !== undefined) {\n process.stdout.write(`Compiled: ${snippet.snippet.didCompile}\\n`);\n }\n\n if (lang !== undefined) {\n const translation = snippet.get(lang as TargetLanguage);\n if (translation === undefined) {\n throw new Error(`No translation for ${lang} in snippet ${snippet.key}`);\n }\n displayTranslation(translation);\n } else {\n listTranslations(snippet);\n }\n }\n\n function listTranslations(snippet: TranslatedSnippet) {\n const original = snippet.originalSource;\n if (original !== undefined) {\n displayTranslation(original);\n }\n\n for (const l of snippet.languages) {\n process.stdout.write(`${languageHeader(l)}\\n`);\n displayTranslation(snippet.get(l)!);\n }\n }\n\n function displayTranslation(translation: Translation) {\n process.stdout.write(`${translation.source}\\n`);\n }\n}\n\nfunction snippetHeader(key: string) {\n return center(` ${key} `, 100, '=');\n}\n\nfunction languageHeader(key: string) {\n return center(` ${key} `, 30, '-');\n}\n\nfunction center(str: string, n: number, fill: string) {\n const before = Math.floor((n - str.length) / 2);\n const after = Math.ceil((n - str.length) / 2);\n\n return fill.repeat(Math.max(before, 0)) + str + fill.repeat(Math.max(after, 0));\n}\n"]}
|