kaelum 1.4.2 → 1.4.4

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/.versionrc.js ADDED
@@ -0,0 +1,20 @@
1
+ module.exports = {
2
+ infile: 'docs/misc/changelog.md',
3
+ types: [
4
+ { type: 'feat', section: 'Features' },
5
+ { type: 'fix', section: 'Bug Fixes' },
6
+ { type: 'perf', section: 'Performance Improvements' },
7
+ { type: 'revert', section: 'Reverts' },
8
+ { type: 'docs', section: 'Documentation', hidden: false },
9
+ { type: 'style', section: 'Styles', hidden: true },
10
+ { type: 'chore', section: 'Miscellaneous', hidden: false },
11
+ { type: 'refactor', section: 'Code Refactoring', hidden: false },
12
+ { type: 'test', section: 'Tests', hidden: true },
13
+ { type: 'build', section: 'Build System', hidden: true },
14
+ { type: 'ci', section: 'CI/CD', hidden: true },
15
+ ],
16
+ commitUrlFormat: '{{host}}/{{owner}}/{{repository}}/commit/{{hash}}',
17
+ compareUrlFormat: '{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}',
18
+ issueUrlFormat: '{{host}}/{{owner}}/{{repository}}/issues/{{id}}',
19
+ userUrlFormat: '{{host}}/{{user}}'
20
+ };
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <h1>Kaelum</h1>
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/kaelum)](https://www.npmjs.com/package/kaelum)
6
- [![Build Status](https://github.com/MatheusCampagnolo/kaelum/actions/workflows/deploy-docs.yml/badge.svg)](https://github.com/MatheusCampagnolo/kaelum/actions)
6
+ [![Build Status](https://github.com/kaelumjs/kaelum/actions/workflows/deploy-docs.yml/badge.svg)](https://github.com/kaelumjs/kaelum/actions)
7
7
  [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
8
8
  [![Docs](https://img.shields.io/badge/docs-online-blue)](https://matheuscampagnolo.github.io/kaelum/)
9
9
 
@@ -99,12 +99,17 @@ my-api-app/
99
99
 
100
100
  ## 🧩 Core API
101
101
 
102
- > Kaelum exposes a factory — use `require('kaelum')` and call it to get an app instance:
103
-
104
- ```js
105
- const kaelum = require("kaelum");
106
- const app = kaelum();
107
- ```
102
+ > Kaelum exposes a factory — use `require` (CommonJS) or `import` (ESM) to get an app instance:
103
+
104
+ ```js
105
+ // CommonJS
106
+ const kaelum = require("kaelum");
107
+ const app = kaelum();
108
+
109
+ // ESM
110
+ import kaelum from "kaelum";
111
+ const app = kaelum();
112
+ ```
108
113
 
109
114
  ### `app.setConfig(options)`
110
115
 
@@ -226,7 +231,7 @@ This checks core functionality including `setConfig`, routes, and error handlers
226
231
  ## 🔧 Local development & contributing
227
232
 
228
233
  ```bash
229
- git clone https://github.com/MatheusCampagnolo/kaelum.git
234
+ git clone https://github.com/kaelumjs/kaelum.git
230
235
  cd kaelum
231
236
  npm install
232
237
  npm link
@@ -258,7 +263,7 @@ npx kaelum create my-test --template web
258
263
 
259
264
  ## 📚 Links
260
265
 
261
- - [GitHub](https://github.com/MatheusCampagnolo/kaelum)
266
+ - [GitHub](https://github.com/kaelumjs/kaelum)
262
267
  - [npm](https://www.npmjs.com/package/kaelum)
263
268
  - [Documentation](https://matheuscampagnolo.github.io/kaelum/)
264
269
 
package/cli/index.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  const { createProject } = require("./create");
3
3
  const argv = process.argv.slice(2);
4
4
 
@@ -22,4 +22,4 @@ app.useErrorHandler({ exposeStack: false });
22
22
 
23
23
  // start server
24
24
  const PORT = process.env.PORT || 4000;
25
- app.start(PORT);
25
+ app.start(PORT);
@@ -19,4 +19,4 @@
19
19
  "morgan": "^1.10.0"
20
20
  },
21
21
  "devDependencies": {}
22
- }
22
+ }
@@ -23,4 +23,4 @@ app.useErrorHandler({ exposeStack: false });
23
23
 
24
24
  // Start server (explicit port for template demo)
25
25
  const PORT = process.env.PORT || 3000;
26
- app.start(PORT);
26
+ app.start(PORT);
@@ -18,4 +18,4 @@
18
18
  "helmet": "^6.0.0"
19
19
  },
20
20
  "devDependencies": {}
21
- }
21
+ }
@@ -42,4 +42,4 @@
42
42
  </section>
43
43
  </main>
44
44
  </body>
45
- </html>
45
+ </html>
package/cli/utils.js CHANGED
@@ -55,4 +55,4 @@ async function copyTemplate(sourceDir, targetDir, projectName) {
55
55
  }
56
56
  }
57
57
 
58
- module.exports = { copyTemplate };
58
+ module.exports = { copyTemplate };
package/core/addRoute.js CHANGED
@@ -142,4 +142,4 @@ function addRoute(app, basePath, handlers = {}) {
142
142
  }
143
143
  }
144
144
 
145
- module.exports = addRoute;
145
+ module.exports = addRoute;
package/core/apiRoute.js CHANGED
@@ -132,4 +132,4 @@ function apiRoute(app, resource, handlers = {}) {
132
132
  );
133
133
  }
134
134
 
135
- module.exports = apiRoute;
135
+ module.exports = apiRoute;
@@ -136,4 +136,4 @@ function errorHandlerFactory(options = {}) {
136
136
 
137
137
  // Export both default and named to keep compatibility with different import styles
138
138
  module.exports = errorHandlerFactory;
139
- module.exports.errorHandler = errorHandlerFactory;
139
+ module.exports.errorHandler = errorHandlerFactory;
@@ -201,4 +201,4 @@ function registerHealth(app, opts = {}) {
201
201
  return handler;
202
202
  }
203
203
 
204
- module.exports = registerHealth;
204
+ module.exports = registerHealth;
package/core/redirect.js CHANGED
@@ -174,4 +174,4 @@ function redirect(app, fromOrMap, toOrStatus, maybeStatus) {
174
174
  return registered.length ? registered : null;
175
175
  }
176
176
 
177
- module.exports = redirect;
177
+ module.exports = redirect;
package/core/setConfig.js CHANGED
@@ -268,4 +268,4 @@ function setConfig(app, options = {}) {
268
268
  return app.locals.kaelumConfig;
269
269
  }
270
270
 
271
- module.exports = setConfig;
271
+ module.exports = setConfig;
@@ -187,4 +187,4 @@ setMiddleware.remove = function (app, path) {
187
187
  : [];
188
188
  };
189
189
 
190
- module.exports = setMiddleware;
190
+ module.exports = setMiddleware;
package/core/start.js CHANGED
@@ -112,4 +112,4 @@ function start(app, port, cb) {
112
112
  return server;
113
113
  }
114
114
 
115
- module.exports = start;
115
+ module.exports = start;
package/createApp.js CHANGED
@@ -182,4 +182,4 @@ function createApp() {
182
182
  return app;
183
183
  }
184
184
 
185
- module.exports = createApp;
185
+ module.exports = createApp;
package/index.js CHANGED
@@ -1,3 +1,2 @@
1
1
  const createApp = require("./createApp");
2
-
3
2
  module.exports = createApp;
package/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import createApp from './index.js';
2
+ export default createApp;
package/package.json CHANGED
@@ -1,16 +1,21 @@
1
1
  {
2
2
  "name": "kaelum",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "A minimalist Node.js framework for building web pages and APIs with simplicity and speed.",
5
5
  "main": "index.js",
6
6
  "exports": {
7
- ".": "./index.js"
7
+ ".": {
8
+ "import": "./index.mjs",
9
+ "require": "./index.js"
10
+ }
8
11
  },
9
12
  "bin": {
10
13
  "kaelum": "cli/index.js"
11
14
  },
12
15
  "scripts": {
13
- "test": "jest --verbose"
16
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --verbose",
17
+ "release": "standard-version",
18
+ "changelog": "standard-version --skip.bump --skip.tag --skip.commit"
14
19
  },
15
20
  "keywords": [
16
21
  "framework",
@@ -25,6 +30,14 @@
25
30
  ],
26
31
  "author": "Matheus Campagnolo",
27
32
  "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/kaelumjs/kaelum.git"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/kaelumjs/kaelum/issues"
39
+ },
40
+ "homepage": "https://github.com/kaelumjs/kaelum#readme",
28
41
  "dependencies": {
29
42
  "cors": "^2.8.5",
30
43
  "dotenv": "^17.2.3",
@@ -37,6 +50,7 @@
37
50
  },
38
51
  "devDependencies": {
39
52
  "jest": "^30.2.0",
53
+ "standard-version": "^9.5.0",
40
54
  "supertest": "^7.2.2"
41
55
  }
42
56
  }