kempo-server 1.10.3 → 1.10.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.
@@ -1,4 +1,4 @@
1
- # Code Contribution Guidelines
1
+ # AGENTS
2
2
 
3
3
  ## Coding Style Guidelines
4
4
 
@@ -79,18 +79,4 @@ Create utility functions for shared logic.
79
79
  Do not prefix identifiers with underscores.
80
80
  - Never use leading underscores (`_`) for variable, property, method, or function names.
81
81
  - Use clear, descriptive names without prefixes.
82
- - When true privacy is needed inside classes, prefer native JavaScript private fields (e.g., `#myField`) instead of simulated privacy via underscores.
83
-
84
- ## Lit Components
85
-
86
- ### Component Architecture and Communication
87
-
88
- - Use methods to cause actions; do not emit events to trigger logic. Events are for notifying that something already happened.
89
- - Prefer `el.closest('ktf-test-framework')?.enqueueSuite({...})` over firing an `enqueue` event.
90
-
91
- - Wrap dependent GUI components inside a parent `ktf-test-framework` element. Children find it via `closest('ktf-test-framework')` and call its methods. The framework can query its subtree to orchestrate children.
92
-
93
- - Avoid `window` globals and global custom events for coordination. If broadcast is needed, scope events to the framework element; reserve window events for global, non-visual concerns (e.g., settings changes).
94
-
95
- - Queued status must show the `scheduled` icon. Running may apply `animation="spin"`.
96
-
82
+ - When true privacy is needed inside classes, prefer native JavaScript private fields (e.g., `#myField`) instead of simulated privacy via underscores.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kempo-server",
3
3
  "type": "module",
4
- "version": "1.10.3",
4
+ "version": "1.10.4",
5
5
  "description": "A lightweight, zero-dependency, file based routing server.",
6
6
  "main": "dist/index.js",
7
7
  "exports": {
@@ -15,15 +15,15 @@
15
15
  "scripts": {
16
16
  "build": "node scripts/build.js",
17
17
  "docs": "node dist/index.js -r ./docs",
18
- "tests": "npx kempo-test",
19
- "tests:gui": "npx kempo-test --gui",
20
- "tests:browser": "npx kempo-test -b",
21
- "tests:node": "npx kempo-test -n"
18
+ "test": "npx kempo-test",
19
+ "test:gui": "npx kempo-test --gui",
20
+ "test:browser": "npx kempo-test -b",
21
+ "test:node": "npx kempo-test -n"
22
22
  },
23
23
  "author": "",
24
24
  "license": "ISC",
25
25
  "devDependencies": {
26
- "kempo-testing-framework": "^1.2.3",
26
+ "kempo-testing-framework": "^1.4.4",
27
27
  "terser": "^5.43.1"
28
28
  },
29
29
  "repository": {
package/CONTRIBUTING.md DELETED
@@ -1,136 +0,0 @@
1
- # Code Contribution Guidelines
2
-
3
- ## Coding Style Guidelines
4
-
5
- ### Code Organization
6
- Use multi-line comments to separate code into logical sections. Group related functionality together.
7
- - Example: In Lit components, group lifecycle callbacks, event handlers, public methods, utility functions, and rendering logic separately.
8
-
9
- ```javascript
10
- /*
11
- Lifecycle Callbacks
12
- */
13
- ```
14
-
15
- ### Avoid single-use variables/functions
16
- Avoid defining a variable or function to only use it once; inline the logic where needed. Some exceptions include:
17
- - recursion
18
- - scope encapsulation (IIFE)
19
- - context changes
20
-
21
- ### Minimal Comments, Empty Lines, and Spacing
22
-
23
- Use minimal comments. Assume readers understand the language. Some exceptions include:
24
- - complex logic
25
- - anti-patterns
26
- - code organization
27
-
28
- Do not put random empty lines within code; put them where they make sense for readability, for example:
29
- - above and below definitions for functions and classes.
30
- - to help break up large sections of logic to be more readable. If there are 100 lines of code with no breaks, it gets hard to read.
31
- - above multi-line comments to indicate the comment belongs to the code below
32
-
33
- No empty lines in css.
34
-
35
- End each file with an empty line.
36
-
37
- End each line with a `;` when possible, even if it is optional.
38
-
39
- Avoid unnecessary spacing, for example:
40
- - after the word `if`
41
- - within parentheses for conditional statements
42
-
43
- ```javascript
44
- let count = 1;
45
-
46
- const incrementOdd = (n) => {
47
- if(n % 2 !== 0){
48
- return n++;
49
- }
50
- return n;
51
- };
52
-
53
- count = incrementOdd(count);
54
- ```
55
-
56
- ### Prefer Arrow Functions
57
- Prefer the use of arrow functions when possible, especially for class methods to avoid binding. Use normal functions if needed for preserving the proper context.
58
- - For very basic logic, use implicit returns
59
- - If there is a single parameter, omit the parentheses.
60
- ```javascript
61
- const addOne = n => n + 1;
62
- ```
63
-
64
- ### Module Exports
65
- - If a module has only one export, use the "default" export, not a named export.
66
- - Do not declare the default export as a const or give it a name; just export the value.
67
-
68
- ```javascript
69
- export default (n) => n + 1;
70
- ```
71
- - If a module has multiple exports, use named exports and do not use a "default" export.
72
-
73
- ### Code Reuse
74
- Create utility functions for shared logic.
75
- - If the shared logic is used in a single file, define a utility function in that file.
76
- - If the shared logic is used in multiple files, create a utility function module file in `src/utils/`.
77
-
78
- ### Naming
79
- Do not prefix identifiers with underscores.
80
- - Never use leading underscores (`_`) for variable, property, method, or function names.
81
- - Use clear, descriptive names without prefixes.
82
- - When true privacy is needed inside classes, prefer native JavaScript private fields (e.g., `#myField`) instead of simulated privacy via underscores.
83
-
84
- ## Lit Components
85
-
86
- ### Component Architecture and Communication
87
-
88
- - Use methods to cause actions; do not emit events to trigger logic. Events are for notifying that something already happened.
89
- - Prefer `el.closest('ktf-test-framework')?.enqueueSuite({...})` over firing an `enqueue` event.
90
-
91
- - Wrap dependent GUI components inside a parent `ktf-test-framework` element. Children find it via `closest('ktf-test-framework')` and call its methods. The framework can query its subtree to orchestrate children.
92
-
93
- - Avoid `window` globals and global custom events for coordination. If broadcast is needed, scope events to the framework element; reserve window events for global, non-visual concerns (e.g., settings changes).
94
-
95
- - Queued status must show the `scheduled` icon. Running may apply `animation="spin"`.
96
-
97
- ## Version Management and Publishing
98
-
99
- This project uses automated workflows for version management and publishing to npm. There are three different workflows available:
100
-
101
- ### Automatic Patch Publishing
102
- - **Workflow**: `publish-npm.yml`
103
- - **Trigger**: Automatically runs on every push to `main` branch
104
- - **Action**: Increments patch version (e.g., 1.5.1 → 1.5.2) and publishes to npm
105
- - **Use for**: Bug fixes, small changes, documentation updates
106
-
107
- ### Manual Minor Version Publishing
108
- - **Workflow**: `publish-minor.yml`
109
- - **Trigger**: Manual workflow dispatch from GitHub Actions tab
110
- - **Action**: Increments minor version (e.g., 1.5.2 → 1.6.0) and publishes to npm
111
- - **Use for**: New features, backwards-compatible API additions
112
-
113
- ### Manual Major Version Publishing
114
- - **Workflow**: `publish-major.yml`
115
- - **Trigger**: Manual workflow dispatch from GitHub Actions tab
116
- - **Action**: Increments major version (e.g., 1.6.0 → 2.0.0) and publishes to npm
117
- - **Use for**: Breaking changes, major API overhauls
118
-
119
- ### How to Publish Minor or Major Versions
120
-
121
- 1. **Push your changes to main**: The automatic patch workflow will run and increment the patch version
122
- 2. **Go to GitHub Actions tab** in the repository
123
- 3. **Select the appropriate workflow**:
124
- - "Publish Minor Version to npmjs" for minor bumps
125
- - "Publish Major Version to npmjs" for major bumps
126
- 4. **Click "Run workflow"** button
127
- 5. **Confirm the run**: The workflow will increment the version and publish automatically
128
-
129
- **Example workflow for a minor version**:
130
- - Current version: 1.5.1
131
- - Push changes → Auto patch: 1.5.1 → 1.5.2
132
- - Manually run minor workflow: 1.5.2 → 1.6.0
133
- - Final published version: 1.6.0
134
-
135
- **Note**: You will "use up" one patch version number when doing manual minor/major bumps, but this ensures the automated system continues to work smoothly.
136
-