@robgietema/generator-nick 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/generators/app/index.js +6 -7
- package/generators/app/templates/.gitignorefile +1 -1
- package/generators/app/templates/{config.js.tpl → config.ts.tpl} +45 -0
- package/generators/app/templates/{knexfile.js → knexfile.ts} +2 -2
- package/generators/app/templates/package.json.tpl +25 -25
- package/package.json +2 -2
- /package/generators/app/templates/src/events/{index.js → index.ts} +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022-
|
|
3
|
+
Copyright (c) 2022-2026 Rob Gietema
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/generators/app/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const { exec } = require('child_process');
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import Generator from 'yeoman-generator';
|
|
4
3
|
|
|
5
4
|
const currentDir = path.basename(process.cwd());
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
export default class extends Generator {
|
|
8
7
|
constructor(args, opts) {
|
|
9
8
|
super(args, opts);
|
|
10
9
|
this.argument('projectName', {
|
|
@@ -21,8 +20,8 @@ module.exports = class extends Generator {
|
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
async prompting() {
|
|
24
|
-
const updateNotifier =
|
|
25
|
-
const pkg =
|
|
23
|
+
const updateNotifier = import('update-notifier');
|
|
24
|
+
const pkg = import('../../package.json');
|
|
26
25
|
const notifier = updateNotifier({
|
|
27
26
|
pkg,
|
|
28
27
|
shouldNotifyInNpmScript: true,
|
|
@@ -126,4 +125,4 @@ pnpm start
|
|
|
126
125
|
`,
|
|
127
126
|
);
|
|
128
127
|
}
|
|
129
|
-
}
|
|
128
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import events from './src/events';
|
|
4
|
+
import userschema from './src/develop/nick/src/constants/userschema';
|
|
4
5
|
|
|
5
6
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
7
|
|
|
@@ -12,6 +13,7 @@ export const config = {
|
|
|
12
13
|
user: '<%= projectName %>',
|
|
13
14
|
password: '<%= projectName %>',
|
|
14
15
|
},
|
|
16
|
+
blobs: 'file',
|
|
15
17
|
blobsDir: `${__dirname}/var/blobstorage`,
|
|
16
18
|
localesDir: `${__dirname}/src/develop/nick/locales`,
|
|
17
19
|
port: 8080,
|
|
@@ -40,6 +42,7 @@ export const config = {
|
|
|
40
42
|
userRegistration: true,
|
|
41
43
|
profiles: [
|
|
42
44
|
`${__dirname}/src/develop/nick/src/profiles/core`,
|
|
45
|
+
/* `${__dirname}/src/develop/nick/src/profiles/ai`, */
|
|
43
46
|
`${__dirname}/src/profiles/default`,
|
|
44
47
|
],
|
|
45
48
|
requestLimit: {
|
|
@@ -54,6 +57,47 @@ export const config = {
|
|
|
54
57
|
events,
|
|
55
58
|
routes: false,
|
|
56
59
|
tasks: false,
|
|
60
|
+
cache: {
|
|
61
|
+
enabled: false,
|
|
62
|
+
anonymousOnly: true,
|
|
63
|
+
etag: false,
|
|
64
|
+
xkeys: false,
|
|
65
|
+
purge: {
|
|
66
|
+
enabled: false,
|
|
67
|
+
urls: [],
|
|
68
|
+
},
|
|
69
|
+
policies: {
|
|
70
|
+
alter: {
|
|
71
|
+
method: 'no-cache',
|
|
72
|
+
},
|
|
73
|
+
manage: {
|
|
74
|
+
method: 'no-cache',
|
|
75
|
+
},
|
|
76
|
+
content: {
|
|
77
|
+
method: 'no-cache',
|
|
78
|
+
},
|
|
79
|
+
dynamic: {
|
|
80
|
+
method: 'public',
|
|
81
|
+
maxAge: 10,
|
|
82
|
+
sMaxAge: 0,
|
|
83
|
+
},
|
|
84
|
+
resource: {
|
|
85
|
+
method: 'public',
|
|
86
|
+
maxAge: 86400,
|
|
87
|
+
sMaxAge: 0,
|
|
88
|
+
},
|
|
89
|
+
stable: {
|
|
90
|
+
method: 'public',
|
|
91
|
+
maxAge: 31536000,
|
|
92
|
+
sMaxAge: 0,
|
|
93
|
+
},
|
|
94
|
+
static: {
|
|
95
|
+
method: 'public',
|
|
96
|
+
maxAge: 31536000,
|
|
97
|
+
sMaxAge: 0,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
57
101
|
ai: {
|
|
58
102
|
models: {
|
|
59
103
|
embed: {
|
|
@@ -76,4 +120,5 @@ export const config = {
|
|
|
76
120
|
},
|
|
77
121
|
},
|
|
78
122
|
},
|
|
123
|
+
userschema,
|
|
79
124
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
|
-
import
|
|
3
|
+
import config from '@robgietema/nick/src/helpers/config/config';
|
|
4
4
|
|
|
5
5
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
6
|
|
|
7
7
|
const knexSettings = {
|
|
8
8
|
client: 'pg',
|
|
9
|
-
connection: config.connection,
|
|
9
|
+
connection: config.settings.connection,
|
|
10
10
|
pool: {
|
|
11
11
|
min: 2,
|
|
12
12
|
max: 10,
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"develop": "missdev --config=jsconfig.json --fetch-https",
|
|
16
16
|
"develop:npx": "npx -p mrs-developer missdev --config=jsconfig.json --fetch-https",
|
|
17
17
|
"bootstrap": "pnpm preinstall && pnpm install && pnpm migrate && pnpm seed",
|
|
18
|
-
"convert": "tsx scripts/convert.
|
|
19
|
-
"i18n": "tsx src/develop/nick/scripts/i18n.
|
|
18
|
+
"convert": "tsx scripts/convert.ts",
|
|
19
|
+
"i18n": "tsx src/develop/nick/scripts/i18n.ts",
|
|
20
20
|
"i18n:ci": "pnpm i18n && git diff -G'^[^\"POT]' --exit-code",
|
|
21
21
|
"knex": "tsx ./node_modules/knex/bin/cli.js",
|
|
22
22
|
"lint": "./node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx,json}'",
|
|
23
23
|
"migrate": "pnpm knex migrate:latest",
|
|
24
24
|
"prettier": "./node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,ts,tsx,json}'",
|
|
25
|
-
"seed": "tsx src/develop/nick/scripts/seed.
|
|
26
|
-
"seed:status": "tsx src/develop/nick/scripts/seed.
|
|
27
|
-
"seed:upgrade": "tsx src/develop/nick/scripts/seed.
|
|
25
|
+
"seed": "tsx src/develop/nick/scripts/seed.ts run",
|
|
26
|
+
"seed:status": "tsx src/develop/nick/scripts/seed.ts status",
|
|
27
|
+
"seed:upgrade": "tsx src/develop/nick/scripts/seed.ts upgrade",
|
|
28
28
|
"start": "nodemon --exec 'tsx src/develop/nick/src/server.ts'",
|
|
29
29
|
"rollback": "pnpm knex migrate:rollback --all",
|
|
30
30
|
"reset": "pnpm rollback && pnpm migrate && pnpm seed",
|
|
@@ -35,37 +35,37 @@
|
|
|
35
35
|
"trailingComma": "all",
|
|
36
36
|
"singleQuote": true
|
|
37
37
|
},
|
|
38
|
-
"jest": {
|
|
39
|
-
"testPathIgnorePatterns": [
|
|
40
|
-
"/node_modules/",
|
|
41
|
-
"/src/develop"
|
|
42
|
-
],
|
|
43
|
-
"setupFilesAfterEnv": [
|
|
44
|
-
"./src/develop/nick/jest.setup.js"
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
38
|
"engines": {
|
|
48
39
|
"node": "^20 || ^22 || ^23 || ^24"
|
|
49
40
|
},
|
|
50
41
|
"devDependencies": {
|
|
51
|
-
"@babel/core": "7.
|
|
52
|
-
"@babel/plugin-transform-
|
|
53
|
-
"@babel/plugin-proposal-export-default-from": "7.27.1",
|
|
54
|
-
"@babel/preset-env": "7.28.5",
|
|
42
|
+
"@babel/core": "7.29.0",
|
|
43
|
+
"@babel/plugin-transform-typescript": "7.28.6",
|
|
55
44
|
"@eslint/eslintrc": "3.3.3",
|
|
56
|
-
"@eslint/js": "
|
|
57
|
-
"
|
|
58
|
-
"
|
|
45
|
+
"@eslint/js": "10.0.1",
|
|
46
|
+
"@types/express": "5.0.6",
|
|
47
|
+
"@types/jsonwebtoken": "9.0.10",
|
|
48
|
+
"@types/mime-types": "3.0.1",
|
|
49
|
+
"@types/node": "25.3.0",
|
|
50
|
+
"@types/nodemailer": "7.0.11",
|
|
51
|
+
"@types/pdf-parse": "1.1.5",
|
|
52
|
+
"@types/supertest": "6.0.3",
|
|
53
|
+
"@vitest/ui": "4.0.18",
|
|
54
|
+
"eslint": "10.0.1",
|
|
59
55
|
"eslint-config-prettier": "10.1.8",
|
|
60
56
|
"eslint-plugin-json": "4.0.1",
|
|
61
|
-
"eslint-plugin-prettier": "5.5.
|
|
62
|
-
"
|
|
63
|
-
"
|
|
57
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
58
|
+
"glob": "13.0.6",
|
|
59
|
+
"pofile": "1.1.4",
|
|
60
|
+
"prettier": "3.8.1",
|
|
61
|
+
"supertest": "7.2.2",
|
|
62
|
+
"typescript": "5.9.3",
|
|
63
|
+
"vitest": "4.0.18"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@robgietema/nick": "workspace:^",
|
|
67
67
|
"knex": "3.1.0",
|
|
68
|
-
"nodemon": "3.1.
|
|
68
|
+
"nodemon": "3.1.14",
|
|
69
69
|
"tsx": "4.21.0"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "0.0.
|
|
12
|
+
"version": "0.0.16",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:robgietema/nick.git"
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"update-notifier": "7.3.1",
|
|
37
|
-
"yeoman-generator": "
|
|
37
|
+
"yeoman-generator": "8.1.2"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
File without changes
|