Skip to content

Commit

Permalink
fix: improve API reference URLs take 2 (#726)
Browse files Browse the repository at this point in the history
See #720 for original context.

Compared to the original PR, this adds the following fixes:
- reduces the size of the output of the transliterator handler by taking the created/deleted `S3Object` arrays and only returning the keys instead. This is needed to prevent failures caused by the output being too large.
- fixes logic for the linkFormatter and updates it to give incorrect error messages

TODO: update jsii-docgen version once cdklabs/jsii-docgen#571 is merged

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Chriscbr authored Jan 27, 2022
1 parent 499f745 commit 387cdaa
Show file tree
Hide file tree
Showing 35 changed files with 5,156 additions and 3,285 deletions.
3 changes: 3 additions & 0 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ function newLambdaHandler(entrypoint, trigger) {
const propsName = `${className}Props`;

const ts = new SourceCode(project, infra);
ts.line(`// ${FileBase.PROJEN_MARKER}`);
ts.line(`// ${ts.marker}`);
ts.line('import * as path from \'path\';');
ts.line('import * as lambda from \'@aws-cdk/aws-lambda\';');
ts.line('import { Construct } from \'@aws-cdk/core\';');
Expand Down Expand Up @@ -500,7 +500,7 @@ function newEcsTask(entrypoint) {
const propsName = `${className}Props`;

const ts = new SourceCode(project, infra);
ts.line(`// ${FileBase.PROJEN_MARKER}`);
ts.line(`// ${ts.marker}`);
ts.line('import * as path from \'path\';');
ts.line('import * as ecs from \'@aws-cdk/aws-ecs\';');
ts.line('import * as iam from \'@aws-cdk/aws-iam\';');
Expand Down Expand Up @@ -534,7 +534,7 @@ function newEcsTask(entrypoint) {
// appropriate down-leveling (e.g: for use of the `??` operator).
const main = new SourceCode(project, ecsMain);
main.line('#!/usr/bin/env node');
main.line(`// ${FileBase.PROJEN_MARKER}`);
main.line(`// ${main.marker}`);
main.line();
main.line('import * as os from \'os\';');
main.line('import { argv, env, exit } from \'process\';');
Expand Down Expand Up @@ -599,7 +599,7 @@ function newEcsTask(entrypoint) {
main.close('});');

const df = new SourceCode(project, dockerfile);
df.line(`# ${FileBase.PROJEN_MARKER}`);
df.line(`# ${df.marker}`);
// Based off amazonlinux:2 for... reasons. (Do not change!)
df.line('FROM public.ecr.aws/amazonlinux/amazonlinux:2');
df.line();
Expand Down Expand Up @@ -639,7 +639,7 @@ function newEcsTask(entrypoint) {
description: `Continuously update an AWS Fargate bundle from ${entry}`,
exec: [...bundleCmd, '--watch'].join(' '),
});
bundle.env(BUNDLE_DIR_ENV, outdir);
bundleWatch.env(BUNDLE_DIR_ENV, outdir);

project.compileTask.spawn(bundle);
bundleTask.spawn(bundle);
Expand Down Expand Up @@ -722,7 +722,7 @@ function discoverEcsTasks() {
function generateSpdxLicenseEnum() {
const ts = new SourceCode(project, 'src/spdx-license.ts');

ts.line(`// ${FileBase.PROJEN_MARKER}`);
ts.line(`// ${ts.marker}`);
// We *need* the private field to be declared before any public field is...
ts.line('/* eslint-disable @typescript-eslint/member-ordering */');
ts.line();
Expand Down
6,660 changes: 4,228 additions & 2,432 deletions API.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,024 changes: 512 additions & 512 deletions src/__tests__/__snapshots__/construct-hub.test.ts.snap

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 387cdaa

Please sign in to comment.