Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
corymhall committed Oct 29, 2023
1 parent e582c7f commit 3762896
Show file tree
Hide file tree
Showing 24 changed files with 2,467 additions and 75 deletions.
1 change: 1 addition & 0 deletions .gitattributes

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

4 changes: 4 additions & 0 deletions .github/workflows/build.yml

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

6 changes: 5 additions & 1 deletion .github/workflows/release.yml

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

4 changes: 4 additions & 0 deletions .github/workflows/upgrade-main.yml

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

1 change: 1 addition & 0 deletions .gitignore

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

1 change: 1 addition & 0 deletions .npmignore

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

76 changes: 75 additions & 1 deletion .projen/deps.json

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

1 change: 1 addition & 0 deletions .projen/files.json

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

6 changes: 3 additions & 3 deletions .projen/tasks.json

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

71 changes: 68 additions & 3 deletions .projenrc.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,77 @@
import { GitHubActionTypeScriptProject } from 'projen-github-action-typescript';
import { typescript } from 'projen';
import { Transform } from 'projen/lib/javascript';
import { JsonPatch } from 'projen/lib/json-patch';
import { GitHubActionTypeScriptProject, RunsUsing } from 'projen-github-action-typescript';
const project = new GitHubActionTypeScriptProject({
defaultReleaseBranch: 'main',
devDeps: ['projen-github-action-typescript'],
authorEmail: '[email protected]',
authorName: 'Cory Hall',
name: 'cdk-diff-action',
projenrcTs: true,
actionMetadata: {
author: 'Cory Hall',
description:
'The CDK Diff GitHub Action allows you to run CDK diff as part of your CI/CD workflow.',
inputs: {
githubToken: {
description: 'github token',
required: true,
},
allowedDestroyTypes: {
description: 'Resource types that are allowed to be destroyed',
required: false,
default: '',
},
failOnDestructiveChanges: {
description: 'Whether or not destructive changes should fail the job',
required: false,
default: 'true',
},
},
runs: {
using: RunsUsing.NODE_16, // overwrite to node18
main: 'dist/index.js',
},
},
deps: [
'@aws-cdk/cloudformation-diff',
'@aws-cdk/cloud-assembly-schema',
'@actions/exec@^1.1.1',
'@actions/io@^1.1.3',
'@actions/tool-cache@^2.0.0',
'fs-extra',
'@aws-sdk/client-cloudformation',
'@smithy/types',
'chalk@^4',
'@aws-sdk/credential-providers',
],
devDeps: [
'mock-fs@^5',
'aws-sdk-client-mock',
'@types/mock-fs@^4',
'projen-github-action-typescript',
'@types/fs-extra',
'action-docs',
'@swc/core',
'@swc/jest',
],
jestOptions: {
configFilePath: 'jest.config.json',
},
minNodeVersion: '18.12.0',

// deps: [], /* Runtime dependencies of this module. */
// description: undefined, /* The description is just a string that helps people understand the purpose of the package. */
// packageName: undefined, /* The "name" in package.json. */
});
project.synth();

const projenProject = project as unknown as typescript.TypeScriptProject;
const jestConfig = projenProject.tryFindObjectFile('jest.config.json');
jestConfig?.patch(JsonPatch.remove('/preset'));
jestConfig?.patch(JsonPatch.remove('/globals'));
jestConfig?.patch(JsonPatch.add('/transform', {
'^.+\\.(t|j)sx?$': new Transform('@swc/jest'),
}));
const actionYml = project.tryFindObjectFile('action.yml');
actionYml?.addOverride('runs.using', 'node18');
project.synth();
17 changes: 15 additions & 2 deletions action.yml

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

38 changes: 38 additions & 0 deletions jest.config.json

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

Loading

0 comments on commit 3762896

Please sign in to comment.