Skip to content

Commit 5eb73fb

Browse files
authored
Merge pull request #211 from code-collabo/cleanup-prs-v2
Cleanup 1 - PRs in prep for version v2.0.0 release
2 parents cdce45d + cb0eaf0 commit 5eb73fb

3 files changed

Lines changed: 36 additions & 5 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: API user error report
3+
about: Encountered error while installing or using the node-mongo API? Report it here. The Collabo team will take a look.
4+
labels: bug
5+
title:
6+
assignee:
7+
8+
---
9+
10+
#### API bug or error description
11+
Add a clear and concise description of what the bug is or what the error contains.
12+
13+
#### Screenshots
14+
Add screenshots to help explain your problem if needed.
15+
16+
#### Additional context
17+
Add any other context about the problem here.
18+
19+
#### Desktop Hardware Details (please complete the following information):
20+
Operating System: [e.g. Mac, windows, linux etc, and any other useful info about the OS e.g. is it windows 10? Mac Ventura 13.2.1? etc ]
21+
22+
Node version: [The node version you are using e.g. Node version 14.2.0]

.github/ISSUE_TEMPLATE/cli-user-error-report.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ Add screenshots to help explain your problem if needed.
1717
Add any other context about the problem here.
1818

1919
#### Desktop Hardware Details (please complete the following information):
20-
Operating System: [e.g. Mac, windows, linux etc, and any other useful info about the OS e.g. is it windows 10? Mac Ventura 13.2.1? etc ]
20+
Operating System: [e.g. Mac, windows, linux etc, and any other useful info about the OS e.g. is it windows 10? Mac Ventura 13.2.1? etc ]
21+
22+
Node version: [The node version you are using e.g. Node version 14.2.0]

src/main.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ let createGitIgnoreFile = async (options) => {
1717
}
1818

1919
let createEnvFiles = async (options) => {
20-
const content = 'MONGODB_URI=\nMONGODB_ATLAS_URI=';
21-
fs.writeFileSync(path.join(options.targetDirectory, '.env'), content);
20+
const content = '\nPORT=8080\nMONGODB_LOCAL_URI=\nMONGODB_ATLAS_URI=\n\nCLIENT_APP_PORT=\nCLIENT_APP_URL=';
2221
fs.writeFileSync(path.join(options.targetDirectory, '.env.example'), content);
2322
return;
2423
}
2524

25+
let createLisenceFiles = async (options) => {
26+
const content = 'ISC License (ISC)\n\nCopyright 2022-2023 Mary Obiagba\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.';
27+
fs.writeFileSync(path.join(options.targetDirectory, 'LICENSE'), content);
28+
return;
29+
}
30+
2631
let copyTemplateFolderContent = async (options) => {
2732
return copy(options.templateDirectory, options.targetDirectory, {
2833
clobber: false
@@ -76,7 +81,7 @@ export let downloadTemplateKit = async (options) => {
7681
);
7782

7883
const templateDir = path.resolve(newUrl, '../../templates', options.template.toLowerCase());
79-
84+
8085
options.templateDirectory = templateDir;
8186

8287
try {
@@ -86,7 +91,7 @@ export let downloadTemplateKit = async (options) => {
8691
cwd: options.targetDirectory
8792
}).stdout.pipe(process.stdout);
8893
})
89-
94+
9095
}catch (err) {
9196
console.error(`\n%s Template name or directory path is (probably) incorrect`, chalk.red.bold('ERROR'));
9297
process.exit(1);
@@ -96,6 +101,8 @@ export let downloadTemplateKit = async (options) => {
96101

97102
await createEnvFiles(options);
98103

104+
await createLisenceFiles(options);
105+
99106
const listrTasks = new Listr([
100107
{
101108
title: `${chalk.green(`${options.template} template`)} copied into the generated folder ${chalk.green(`=> ${options.folderName}`)}`,

0 commit comments

Comments
 (0)