-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.js
More file actions
84 lines (70 loc) · 2.57 KB
/
Copy pathdemo.js
File metadata and controls
84 lines (70 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const { typescript, javascript, github } = require('projen');
const project = new typescript.TypeScriptProject({
defaultReleaseBranch: 'main',
name: 'leapp-shellcreds',
description: 'Plugin to copy AWS credentials in a shell compatible format',
keywords: ['leapp-plugin'],
deps: [
'@noovolari/leapp-core',
'clipboardy',
],
devDeps: [
// 'esbuild',
'ts-loader',
'webpack',
'webpack-cli',
],
authorName: 'Taimos GmbH',
authorEmail: 'info@taimos.de',
authorOrganization: true,
authorUrl: 'https://taimos.de',
copyrightOwner: 'Taimos GmbH',
copyrightPeriod: '2022',
license: 'Apache-2.0',
licensed: true,
stability: 'experimental',
releaseToNpm: true,
npmAccess: javascript.NpmAccess.PUBLIC,
gitpod: true,
autoApproveUpgrades: true,
autoApproveOptions: { allowedUsernames: ['hoegertn', 'taimos-projen[bot]'], secret: 'GITHUB_TOKEN' },
githubOptions: {
projenCredentials: github.GithubCredentials.fromApp(),
},
pullRequestTemplateContents: [`* **Please check if the PR fulfills these requirements**
- [ ] The commit message describes your change
- [ ] Tests for the changes have been added if possible (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] Changes are mentioned in the changelog (for bug fixes / features)
* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
* **What is the current behavior?** (You can also link to an open issue here)
* **What is the new behavior (if this is a feature change)?**
* **Does this PR introduce a breaking change?** (What changes might users need to make in their setup due to this PR?)
* **Other information**:`],
});
project.gitignore.exclude('plugin.js');
project.package.addField('files', ['plugin.js']);
project.package.addField('leappPlugin', {
supportedOS: [
'mac',
'windows',
'linux',
],
supportedSessions: [
'awsIamRoleFederated',
'awsIamRoleChained',
'awsSsoRole',
'awsIamUser',
'aws',
],
});
project.projectBuild.compileTask.reset('webpack --config webpack.config.js');
// project.projectBuild.compileTask.reset('esbuild --bundle src/index.ts --outfile=plugin.js --format=cjs --platform=node'); //--minify --sourcemap');
const installTask = project.addTask('deploy');
installTask.spawn(project.buildTask);
installTask.exec('mkdir -p ~/.Leapp/plugins/leapp-shellcreds && cp plugin.js package.json ~/.Leapp/plugins/leapp-shellcreds/');
project.gitpod.addCustomTask({
init: 'yarn install --check-files --frozen-lockfile',
command: 'npx projen build',
});
project.synth();