forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(init-templates): remove v1 init templates (aws#21019)
A v1 app or library cannot be created from the v2 cli. This cleans up the v1 init template code. This is stupidly long because of the amount of files deleted and moved so here's a rundown of the changes: - v1 templates deleted (github is showing some of these as renamed because they were duplicates of the v2 files that did get moved) - v2 templates removed from `v2` folder and moved directly under `init-templates` - hook files imports updated (another place where it shows the change to v1 instead of v2 because the contents were the same) for templates and sample apps - `init.ts`: updated file paths to flattened directory - `init.test.ts`: - updated tests to only run for v2 templates - added test for `fsharp` since it was missing - updated .NET tests to look in the contents of the `.sln` file for the project information. I noticed that this test sometimes still passed when the `init` actually failed. Note: This is the first of two PRs to fix the bug for creating .NET projects with spaces in the file path (issue aws#18803). This PR was done separately so the bug fix didn't get lost in the 300 file changes due to the cleanup. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
1 parent
174b77b
commit 2b4d28e
Showing
289 changed files
with
85 additions
and
3,899 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...mplates/v1/app/csharp/add-project.hook.ts → ...-templates/app/csharp/add-project.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...mplates/v2/app/fsharp/add-project.hook.ts → ...-templates/app/fsharp/add-project.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../sample-app/java/sub-placeholders.hook.ts → ...mplates/app/java/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...1/app/typescript/sub-placeholders.hook.ts → ...s/app/javascript/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ample-app/python/sub-placeholders.hook.ts → ...lates/app/python/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...e-app/javascript/sub-placeholders.hook.ts → ...s/app/typescript/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...1/lib/typescript/sub-placeholders.hook.ts → ...s/lib/typescript/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../v1/sample-app/csharp/add-project.hook.ts → ...tes/sample-app/csharp/add-project.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../v2/sample-app/fsharp/add-project.hook.ts → ...tes/sample-app/fsharp/add-project.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ates/v1/app/java/sub-placeholders.hook.ts → .../sample-app/java/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...1/app/javascript/sub-placeholders.hook.ts → ...e-app/javascript/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...es/v2/app/python/sub-placeholders.hook.ts → ...ample-app/python/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
packages/aws-cdk/lib/init-templates/sample-app/typescript/sub-placeholders.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { InvokeHook } from '../../../init'; | ||
|
||
export const invoke: InvokeHook = async (_, context) => { | ||
// File cannot be named like regular template because it needs to be | ||
// processed by dependency updaters. | ||
await context.substitutePlaceholdersIn('package.json'); | ||
}; |
File renamed without changes.
File renamed without changes.
19 changes: 0 additions & 19 deletions
19
...ib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...b/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/Program.template.cs
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
packages/aws-cdk/lib/init-templates/v1/app/fsharp/add-project.hook.ts
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
...ib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj
This file was deleted.
Oops, something went wrong.
68 changes: 0 additions & 68 deletions
68
packages/aws-cdk/lib/init-templates/v1/app/go/%name%.template.go
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
packages/aws-cdk/lib/init-templates/v1/app/go/%name%_test.template.go
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
packages/aws-cdk/lib/init-templates/v1/app/go/go.template.mod
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.