@design-edito/cli 0.0.78 → 0.0.80

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.
Files changed (55) hide show
  1. package/cli/assets/list.txt +1 -2
  2. package/cli/assets/version.txt +1 -1
  3. package/make-template/assets/express/esbuild.config.js +19 -0
  4. package/make-template/assets/express/package.json +16 -12
  5. package/make-template/assets/express/src/index.ts +13 -49
  6. package/make-template/assets/express/src/public/index.css +7 -0
  7. package/make-template/assets/express/src/public/index.html +15 -0
  8. package/make-template/assets/express/src/public/index.js +31 -0
  9. package/make-template/assets/express/src/tsconfig.json +7 -3
  10. package/make-template/assets/express/src/www/index.ts +42 -0
  11. package/make-template/assets/express-api/Dockerfile +18 -0
  12. package/make-template/assets/express-api/Dockerfile.dev +8 -0
  13. package/make-template/assets/express-api/env +36 -0
  14. package/make-template/assets/express-api/esbuild.config.js +26 -0
  15. package/make-template/assets/express-api/gitignore +214 -0
  16. package/make-template/assets/express-api/package.json +60 -0
  17. package/make-template/assets/express-api/src/api/auth/_utils/index.ts +47 -0
  18. package/make-template/assets/express-api/src/api/auth/index.ts +25 -0
  19. package/make-template/assets/express-api/src/api/auth/login/index.ts +101 -0
  20. package/make-template/assets/express-api/src/api/auth/logout/index.ts +45 -0
  21. package/make-template/assets/express-api/src/api/auth/refresh-token/index.ts +54 -0
  22. package/make-template/assets/express-api/src/api/auth/request-email-verification-token/index.ts +45 -0
  23. package/make-template/assets/express-api/src/api/auth/request-new-password/index.ts +62 -0
  24. package/make-template/assets/express-api/src/api/auth/signup/index.ts +99 -0
  25. package/make-template/assets/express-api/src/api/auth/submit-new-password/index.ts +61 -0
  26. package/make-template/assets/express-api/src/api/auth/verify-email/index.ts +79 -0
  27. package/make-template/assets/express-api/src/api/auth/whoami/index.ts +68 -0
  28. package/make-template/assets/express-api/src/api/index.ts +18 -0
  29. package/make-template/assets/express-api/src/api/types.ts +76 -0
  30. package/make-template/assets/express-api/src/api/utils.ts +146 -0
  31. package/make-template/assets/express-api/src/database/index.ts +173 -0
  32. package/make-template/assets/express-api/src/email/index.ts +47 -0
  33. package/make-template/assets/express-api/src/env/index.ts +77 -0
  34. package/make-template/assets/express-api/src/errors/index.ts +128 -0
  35. package/make-template/assets/express-api/src/index.ts +42 -0
  36. package/make-template/assets/express-api/src/init/index.ts +156 -0
  37. package/make-template/assets/express-api/src/jwt/index.ts +105 -0
  38. package/make-template/assets/express-api/src/public/index.css +7 -0
  39. package/make-template/assets/express-api/src/public/index.html +15 -0
  40. package/make-template/assets/express-api/src/public/index.js +31 -0
  41. package/make-template/assets/express-api/src/schema/_history/index.ts +124 -0
  42. package/make-template/assets/express-api/src/schema/_meta/index.ts +113 -0
  43. package/make-template/assets/express-api/src/schema/index.ts +17 -0
  44. package/make-template/assets/express-api/src/schema/user/index.ts +117 -0
  45. package/make-template/assets/express-api/src/schema/user-email-validation-token/index.ts +20 -0
  46. package/make-template/assets/express-api/src/schema/user-password-renewal-token/index.ts +20 -0
  47. package/make-template/assets/express-api/src/schema/user-revoked-auth-token/index.ts +26 -0
  48. package/make-template/assets/express-api/src/tsconfig.json +16 -0
  49. package/make-template/assets/express-api/src/www/index.ts +43 -0
  50. package/make-template/index.js +2 -3
  51. package/make-template/index.js.map +3 -3
  52. package/package.json +7 -8
  53. package/make-template/assets/express/src/routes/index.ts +0 -7
  54. package/upgrade/index.js +0 -12
  55. package/upgrade/index.js.map +0 -7
@@ -1,4 +1,3 @@
1
1
  cli
2
2
  make-template
3
- tree
4
- upgrade
3
+ tree
@@ -1 +1 @@
1
- 0.0.78
1
+ 0.0.80
@@ -0,0 +1,19 @@
1
+ import esbuild from 'esbuild'
2
+
3
+ esbuild.build({
4
+ entryPoints: ['src/index.ts'],
5
+ outdir: 'dist',
6
+ bundle: true,
7
+ sourcemap: true,
8
+ platform: 'node',
9
+ target: 'node16',
10
+ format: 'esm',
11
+ logLevel: 'info',
12
+ external: [
13
+ 'express',
14
+ 'cookie-parser',
15
+ 'morgan',
16
+ 'debug',
17
+ 'util'
18
+ ]
19
+ }).catch(() => process.exit(1))
@@ -1,30 +1,34 @@
1
1
  {
2
- "name": "-",
2
+ "name": "<<@mxfb/cli----replace-with-name>>",
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "build:src": "npx esbuild --bundle src/index.ts --outdir=dist --sourcemap --platform=node --format=esm --external:debug --external:express --external:cookie-parser --external:morgan",
7
+ "build:src:public": "npx cpx 'src/public/**/*' dist/public",
8
+ "check:src": "npx tsc -p src/tsconfig.json --noEmit",
9
+ "build:src": "node esbuild.config.js && npm run build:src:public",
8
10
  "watch:src": "npm run build:src && npx chokidar 'src/**/*' -c 'npm run build:src'",
9
11
  "serve": "npx nodemon ./dist/index.js",
10
12
  "start:nowatch": "npm run build:src && npm run serve",
11
13
  "start": "npx concurrently -n 'watch:src ,serve ' 'npm run watch:src' 'npm run serve'"
12
14
  },
13
15
  "dependencies": {
14
- "cookie-parser": "~1.4.4",
15
- "debug": "~2.6.9",
16
- "express": "^4.19.2",
17
- "morgan": "~1.9.1"
16
+ "cookie-parser": "^1.4.7",
17
+ "cors": "^2.8.5",
18
+ "debug": "^4.4.0",
19
+ "esbuild": "^0.25.0",
20
+ "express": "^4.21.2",
21
+ "morgan": "^1.10.0",
22
+ "typescript": "^5.7.3"
18
23
  },
19
24
  "devDependencies": {
20
- "@types/cookie-parser": "^1.4.7",
25
+ "@types/cookie-parser": "^1.4.8",
26
+ "@types/cors": "^2.8.17",
21
27
  "@types/debug": "^4.1.12",
22
- "@types/express": "^4.17.21",
28
+ "@types/express": "^5.0.0",
23
29
  "@types/morgan": "^1.9.9",
24
- "@types/node": "^22.2.0",
30
+ "@types/node": "^22.13.4",
25
31
  "chokidar-cli": "^3.0.0",
26
- "concurrently": "^8.2.2",
27
- "esbuild": "^0.23.0",
28
- "typescript": "^5.5.4"
32
+ "concurrently": "^9.1.2"
29
33
  }
30
34
  }
@@ -1,62 +1,26 @@
1
- import http from 'node:http'
2
1
  import path from 'node:path'
3
2
  import { fileURLToPath } from 'node:url'
4
- import express from 'express'
5
3
  import cookieParser from 'cookie-parser'
4
+ import cors from 'cors'
5
+ import express from 'express'
6
6
  import logger from 'morgan'
7
- import debugModule from 'debug'
8
- import indexRouter from './routes/index.js'
7
+ import { serve } from './www'
9
8
 
10
- const debug = debugModule('<<@mxfb/cli----replace-with-name>>:server')
11
- const port = normalizePort(process.env.PORT ?? '3000')
9
+ // App setup
12
10
  const app = express()
13
- const __dirname = path.dirname(fileURLToPath(import.meta.url))
14
-
11
+ app.use(cors())
15
12
  app.use(logger('dev'))
16
13
  app.use(express.json())
17
14
  app.use(express.urlencoded({ extended: false }))
18
15
  app.use(cookieParser())
19
- app.use(express.static(path.join(__dirname, 'public')))
20
- app.use('/', indexRouter)
21
- app.set('port', port)
22
-
23
- const server = http.createServer(app)
24
-
25
- server.listen(port)
26
- server.on('error', onError)
27
- server.on('listening', onListening)
28
-
29
- function normalizePort (val: string) {
30
- var port = parseInt(val, 10)
31
- if (isNaN(port)) return val
32
- if (port >= 0) return port
33
- return false
34
- }
35
16
 
36
- interface NodeError extends Error {
37
- syscall?: string
38
- code?: string
39
- }
17
+ // Static files
18
+ const ROOT = path.dirname(fileURLToPath(import.meta.url))
19
+ const PUBLIC = path.join(ROOT, 'public')
20
+ app.use(express.static(PUBLIC))
40
21
 
41
- function onError (error: NodeError) {
42
- if (error.syscall !== 'listen') throw error
43
- var bind = typeof port === 'string' ? 'Pipe ' + port : 'Port ' + port
44
- switch (error.code) {
45
- case 'EACCES':
46
- console.error(bind + ' requires elevated privileges')
47
- process.exit(1)
48
- break
49
- case 'EADDRINUSE':
50
- console.error(bind + ' is already in use')
51
- process.exit(1)
52
- break
53
- default:
54
- throw error
55
- }
56
- }
22
+ // Routes
23
+ app.get('/', (req, res) => { res.json({ data: true }) })
57
24
 
58
- function onListening () {
59
- var addr = server.address()
60
- var bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + (addr?.port ?? '')
61
- debug('Listening on ' + bind)
62
- }
25
+ // Start server
26
+ serve(app)
@@ -0,0 +1,7 @@
1
+ html {
2
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
3
+ }
4
+
5
+ button {
6
+ cursor: pointer;
7
+ }
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <script type="module" src="./index.js"></script>
7
+ <link rel="stylesheet" href="./index.css">
8
+ </head>
9
+ <body>
10
+ <h1>LM-Publisher</h1>
11
+
12
+ <button class="create-random-project">Create random project</button>
13
+
14
+ </body>
15
+ </html>
@@ -0,0 +1,31 @@
1
+ const $responses = document.querySelector('.requests')
2
+ const $createRandomProject = document.querySelector('.create-random-project')
3
+
4
+ async function fetchAndLog (url, method, body) {
5
+ const id = Math.random().toString(36).slice(2)
6
+ console.log('%cSending request...', 'font-weight: 600')
7
+ console.log('id:', id)
8
+ console.log(`${method}:`, url)
9
+ const response = await window.fetch(url, {
10
+ method,
11
+ body: JSON.stringify(body),
12
+ headers: { 'Content-Type': 'application/json' }
13
+ })
14
+ const json = await response.json()
15
+ console.log('%cReceived response', 'font-weight: 600')
16
+ console.log('id:', id)
17
+ console.log(`${method}:`, url)
18
+ console.log('body:', body)
19
+ console.log('response:', response)
20
+ console.log('json:', json)
21
+ }
22
+
23
+ $createRandomProject.addEventListener('click', () => {
24
+ fetchAndLog('http://localhost:3000/projects/create', 'POST', {
25
+ name: 'Mon premier projet :\')',
26
+ publicationTargetDate: Date.now(),
27
+ sourcesIds: [],
28
+ articlesIds: [],
29
+ assetsIds: [],
30
+ })
31
+ })
@@ -2,11 +2,15 @@
2
2
  "compilerOptions": {
3
3
  "target": "ESNext",
4
4
  "module": "ESNext",
5
- "moduleResolution": "NodeNext",
5
+ "moduleResolution": "Node",
6
6
  "esModuleInterop": true,
7
+ "declaration": true,
7
8
  "forceConsistentCasingInFileNames": true,
8
9
  "strict": true,
9
10
  "skipLibCheck": true,
10
- "noUncheckedIndexedAccess": true
11
- }
11
+ "noUncheckedIndexedAccess": true,
12
+ "strictNullChecks": true,
13
+ "noEmit": true
14
+ },
15
+ "include": ["./**/*"]
12
16
  }
@@ -0,0 +1,42 @@
1
+ import http from 'node:http'
2
+ import debugModule from 'debug'
3
+ import { Express } from 'express'
4
+
5
+ interface NodeError extends Error {
6
+ syscall?: string
7
+ code?: string
8
+ }
9
+
10
+ export function serve (app: Express) {
11
+ const port = normalizePort(process.env.PORT ?? '3000')
12
+ const debug = debugModule('<<@mxfb/cli----replace-with-name>>:server')
13
+ const server = http.createServer(app)
14
+ app.set('port', port)
15
+ server.listen(port)
16
+ server.on('error', (error: NodeError) => {
17
+ if (error.syscall !== 'listen') throw error
18
+ var bind = typeof port === 'string' ? 'Pipe ' + port : 'Port ' + port
19
+ switch (error.code) {
20
+ case 'EACCES':
21
+ console.error(bind + ' requires elevated privileges')
22
+ return process.exit(1)
23
+ case 'EADDRINUSE':
24
+ console.error(bind + ' is already in use')
25
+ return process.exit(1)
26
+ default:
27
+ throw error
28
+ }
29
+ })
30
+ server.on('listening', () => {
31
+ var addr = server.address()
32
+ var bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + (addr?.port ?? '')
33
+ debug('Listening on ' + bind)
34
+ })
35
+
36
+ function normalizePort (val: string) {
37
+ var port = parseInt(val, 10)
38
+ if (isNaN(port)) return val
39
+ if (port >= 0) return port
40
+ return false
41
+ }
42
+ }
@@ -0,0 +1,18 @@
1
+ FROM node:20-alpine AS builder
2
+
3
+ WORKDIR /app
4
+ COPY package*.json ./
5
+ COPY esbuild.config.js ./esbuild.config.js
6
+ COPY src ./src
7
+ RUN npm install --omit=dev
8
+ RUN npm run build:src
9
+
10
+ FROM node:20-alpine AS runner
11
+
12
+ WORKDIR /app
13
+ COPY --from=builder /app/dist ./dist
14
+ COPY --from=builder /app/node_modules ./node_modules
15
+ COPY package.json ./
16
+ EXPOSE 3000
17
+
18
+ CMD ["node", "dist/index.js"]
@@ -0,0 +1,8 @@
1
+ FROM node:20-alpine
2
+
3
+ WORKDIR /app
4
+ COPY package*.json ./
5
+ COPY esbuild.config.js ./esbuild.config.js
6
+ RUN npm install
7
+
8
+ CMD ["npm", "start"]
@@ -0,0 +1,36 @@
1
+ # Mode (development, production)
2
+ MODE=development
3
+
4
+ # Location
5
+ HOST=localhost:3000
6
+
7
+ # Database
8
+ DB_USR=db-user
9
+ DB_PWD=db-pwd
10
+ DB_URL=db-url
11
+ DB_OPT=db_opt1=true&db_opt2=false
12
+
13
+ # Agenda
14
+ DB_RESERVED_AGENDA_JOBS_COLLECTION_NAME=__AgendaJobs
15
+
16
+ # ROOT User
17
+ ROOT_USER_ID=000000000000000000000000
18
+ ROOT_USER_NAME=ROOT
19
+ ROOT_USER_EMAIL=root@root.com
20
+ ROOT_USER_PWD=rootpwd
21
+
22
+ # User email validation token
23
+ USER_EMAIL_VALIDATION_TOKEN_LIFETIME_MINUTES=60
24
+
25
+ # JWT
26
+ JWT_SECRET=jwt-secret
27
+ ACCESS_TOKEN_EXPIRATION_SECONDS=900 # 15 minutes
28
+ ACCESS_TOKEN_RENEWAL_THRESHOLD=300 # 5 minutes
29
+ REFRESH_TOKEN_EXPIRATION_SECONDS=86400 # 1 day
30
+ ACCESS_TOKEN_MAX_REFRESH_COUNT=5
31
+ REFRESH_TOKEN_MAX_REFRESH_COUNT=5
32
+
33
+ # Emailing
34
+ MAILERSEND_API_KEY=mailersend-api-key
35
+ EMAILER_EMAIL=noreply@noreply.com
36
+ EMAILER_NAME=Noreply
@@ -0,0 +1,26 @@
1
+ import esbuild from 'esbuild'
2
+
3
+ esbuild.build({
4
+ entryPoints: ['src/index.ts'],
5
+ outdir: 'dist',
6
+ bundle: true,
7
+ sourcemap: true,
8
+ platform: 'node',
9
+ target: 'node16',
10
+ format: 'esm',
11
+ logLevel: 'info',
12
+ external: [
13
+ 'mailersend',
14
+ 'express',
15
+ 'cookie-parser',
16
+ 'morgan',
17
+ 'mongoose',
18
+ 'dotenv',
19
+ 'debug',
20
+ '@mapbox',
21
+ 'jsonwebtoken',
22
+ 'bcrypt',
23
+ 'util',
24
+ 'agenda'
25
+ ]
26
+ }).catch(() => process.exit(1))
@@ -0,0 +1,214 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/node,osx,linux,windows
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=node,osx,linux,windows
3
+
4
+ ### Linux ###
5
+ *~
6
+
7
+ # temporary files which can be created if a process still has a handle open of a deleted file
8
+ .fuse_hidden*
9
+
10
+ # KDE directory preferences
11
+ .directory
12
+
13
+ # Linux trash folder which might appear on any partition or disk
14
+ .Trash-*
15
+
16
+ # .nfs files are created when an open file is removed but is still being accessed
17
+ .nfs*
18
+
19
+ ### Node ###
20
+ # Logs
21
+ logs
22
+ *.log
23
+ npm-debug.log*
24
+ yarn-debug.log*
25
+ yarn-error.log*
26
+ lerna-debug.log*
27
+ .pnpm-debug.log*
28
+
29
+ # Diagnostic reports (https://nodejs.org/api/report.html)
30
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
31
+
32
+ # Runtime data
33
+ pids
34
+ *.pid
35
+ *.seed
36
+ *.pid.lock
37
+
38
+ # Directory for instrumented libs generated by jscoverage/JSCover
39
+ lib-cov
40
+
41
+ # Coverage directory used by tools like istanbul
42
+ coverage
43
+ *.lcov
44
+
45
+ # nyc test coverage
46
+ .nyc_output
47
+
48
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
49
+ .grunt
50
+
51
+ # Bower dependency directory (https://bower.io/)
52
+ bower_components
53
+
54
+ # node-waf configuration
55
+ .lock-wscript
56
+
57
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
58
+ build/Release
59
+
60
+ # Dependency directories
61
+ node_modules/
62
+ jspm_packages/
63
+
64
+ # Snowpack dependency directory (https://snowpack.dev/)
65
+ web_modules/
66
+
67
+ # TypeScript cache
68
+ *.tsbuildinfo
69
+
70
+ # Optional npm cache directory
71
+ .npm
72
+
73
+ # Optional eslint cache
74
+ .eslintcache
75
+
76
+ # Optional stylelint cache
77
+ .stylelintcache
78
+
79
+ # Microbundle cache
80
+ .rpt2_cache/
81
+ .rts2_cache_cjs/
82
+ .rts2_cache_es/
83
+ .rts2_cache_umd/
84
+
85
+ # Optional REPL history
86
+ .node_repl_history
87
+
88
+ # Output of 'npm pack'
89
+ *.tgz
90
+
91
+ # Yarn Integrity file
92
+ .yarn-integrity
93
+
94
+ # dotenv environment variable files
95
+ .env
96
+ .env.development.local
97
+ .env.test.local
98
+ .env.production.local
99
+ .env.local
100
+
101
+ # parcel-bundler cache (https://parceljs.org/)
102
+ .cache
103
+ .parcel-cache
104
+
105
+ # Next.js build output
106
+ .next
107
+ out
108
+
109
+ # Nuxt.js build / generate output
110
+ .nuxt
111
+ dist
112
+
113
+ # Gatsby files
114
+ .cache/
115
+ # Comment in the public line in if your project uses Gatsby and not Next.js
116
+ # https://nextjs.org/blog/next-9-1#public-directory-support
117
+ # public
118
+
119
+ # vuepress build output
120
+ .vuepress/dist
121
+
122
+ # vuepress v2.x temp and cache directory
123
+ .temp
124
+
125
+ # Docusaurus cache and generated files
126
+ .docusaurus
127
+
128
+ # Serverless directories
129
+ .serverless/
130
+
131
+ # FuseBox cache
132
+ .fusebox/
133
+
134
+ # DynamoDB Local files
135
+ .dynamodb/
136
+
137
+ # TernJS port file
138
+ .tern-port
139
+
140
+ # Stores VSCode versions used for testing VSCode extensions
141
+ .vscode-test
142
+
143
+ # yarn v2
144
+ .yarn/cache
145
+ .yarn/unplugged
146
+ .yarn/build-state.yml
147
+ .yarn/install-state.gz
148
+ .pnp.*
149
+
150
+ ### Node Patch ###
151
+ # Serverless Webpack directories
152
+ .webpack/
153
+
154
+ # Optional stylelint cache
155
+
156
+ # SvelteKit build / generate output
157
+ .svelte-kit
158
+
159
+ ### OSX ###
160
+ # General
161
+ .DS_Store
162
+ .AppleDouble
163
+ .LSOverride
164
+
165
+ # Icon must end with two \r
166
+ Icon
167
+
168
+
169
+ # Thumbnails
170
+ ._*
171
+
172
+ # Files that might appear in the root of a volume
173
+ .DocumentRevisions-V100
174
+ .fseventsd
175
+ .Spotlight-V100
176
+ .TemporaryItems
177
+ .Trashes
178
+ .VolumeIcon.icns
179
+ .com.apple.timemachine.donotpresent
180
+
181
+ # Directories potentially created on remote AFP share
182
+ .AppleDB
183
+ .AppleDesktop
184
+ Network Trash Folder
185
+ Temporary Items
186
+ .apdisk
187
+
188
+ ### Windows ###
189
+ # Windows thumbnail cache files
190
+ Thumbs.db
191
+ Thumbs.db:encryptable
192
+ ehthumbs.db
193
+ ehthumbs_vista.db
194
+
195
+ # Dump file
196
+ *.stackdump
197
+
198
+ # Folder config file
199
+ [Dd]esktop.ini
200
+
201
+ # Recycle Bin used on file shares
202
+ $RECYCLE.BIN/
203
+
204
+ # Windows Installer files
205
+ *.cab
206
+ *.msi
207
+ *.msix
208
+ *.msm
209
+ *.msp
210
+
211
+ # Windows shortcuts
212
+ *.lnk
213
+
214
+ # End of https://www.toptal.com/developers/gitignore/api/node,osx,linux,windows
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "<<@mxfb/cli----replace-with-name>>",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build:src:public": "npx cpx 'src/public/**/*' dist/public",
8
+ "check:src": "npx tsc -p src/tsconfig.json --noEmit",
9
+ "build:src": "node esbuild.config.js && npm run build:src:public",
10
+ "watch:src": "npm run build:src && npx chokidar 'src/**/*' -c 'npm run build:src'",
11
+ "serve": "npx nodemon ./dist/index.js",
12
+ "start:nowatch": "npm run build:src && npm run serve",
13
+ "start": "npx concurrently -n 'watch:src ,serve ' 'npm run watch:src' 'npm run serve'",
14
+ "docker:build": "docker build -t <<@mxfb/cli----replace-with-name>> .",
15
+ "docker:run": "docker run -d --env-file .env -p 3000:3000 --name <<@mxfb/cli----replace-with-name>> <<@mxfb/cli----replace-with-name>>:latest",
16
+ "docker:start": "npm run docker:build && npm run docker:run",
17
+ "docker:log": "docker logs <<@mxfb/cli----replace-with-name>>",
18
+ "docker:stop": "docker stop <<@mxfb/cli----replace-with-name>>",
19
+ "docker:clean": "docker rm <<@mxfb/cli----replace-with-name>> && docker rmi <<@mxfb/cli----replace-with-name>>",
20
+ "docker:build:dev": "docker build -f Dockerfile.dev -t <<@mxfb/cli----replace-with-name>>-dev .",
21
+ "docker:run:dev": "docker run --rm -v $(pwd)/src:/app/src -w /app -p 3000:3000 --env SHELL=/bin/sh --env-file .env --name <<@mxfb/cli----replace-with-name>>-dev <<@mxfb/cli----replace-with-name>>-dev",
22
+ "docker:start:dev": "npm run docker:build:dev && npm run docker:run:dev",
23
+ "docker:log:dev": "docker logs <<@mxfb/cli----replace-with-name>>-dev",
24
+ "docker:stop:dev": "docker stop <<@mxfb/cli----replace-with-name>>-dev",
25
+ "docker:clean:dev": "docker rm <<@mxfb/cli----replace-with-name>>-dev && docker rmi <<@mxfb/cli----replace-with-name>>-dev"
26
+ },
27
+ "dependencies": {
28
+ "@design-edito/tools": "^0.1.48",
29
+ "agenda": "^5.0.0",
30
+ "bcrypt": "^5.1.1",
31
+ "cookie-parser": "^1.4.7",
32
+ "cors": "^2.8.5",
33
+ "debug": "^4.4.0",
34
+ "dotenv": "^16.4.7",
35
+ "esbuild": "^0.25.0",
36
+ "express": "^4.21.2",
37
+ "jsonwebtoken": "^9.0.2",
38
+ "mailersend": "^2.3.0",
39
+ "mongoose": "^8.10.1",
40
+ "morgan": "^1.10.0",
41
+ "typescript": "^5.7.3",
42
+ "validator": "^13.12.0",
43
+ "zod": "^3.24.2"
44
+ },
45
+ "devDependencies": {
46
+ "@types/bcrypt": "^5.0.2",
47
+ "@types/cookie-parser": "^1.4.8",
48
+ "@types/cors": "^2.8.17",
49
+ "@types/debug": "^4.1.12",
50
+ "@types/express": "^5.0.0",
51
+ "@types/jsonwebtoken": "^9.0.8",
52
+ "@types/mongoose": "^5.11.96",
53
+ "@types/morgan": "^1.9.9",
54
+ "@types/node": "^22.13.4",
55
+ "@types/validator": "^13.12.2",
56
+ "chokidar-cli": "^3.0.0",
57
+ "concurrently": "^9.1.2",
58
+ "nodemon": "^3.1.9"
59
+ }
60
+ }