Skip to content

Commit 05fd3c4

Browse files
Merge pull request #12 from HarperFast/general-repo-updates
General Repo Updates
2 parents 5069c86 + 7b2fc76 commit 05fd3c4

72 files changed

Lines changed: 1357 additions & 1240 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Format
2+
9077b5b81d266818af4a25b90c78e0e7d03620a3

.github/workflows/format-check.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Format Check
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
format-check:
11+
name: Format Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v5
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
node-version: 24
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Run format check
28+
run: npm run format:check

.github/workflows/integration-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929

3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333

3434
- name: Setup Node.js ${{ matrix.node-version }}
35-
uses: actions/setup-node@v4
35+
uses: actions/setup-node@v6
3636
with:
3737
node-version: ${{ matrix.node-version }}
3838
cache: 'npm'

.github/workflows/unit-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929

3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333

3434
- name: Setup Node.js ${{ matrix.node-version }}
35-
uses: actions/setup-node@v4
35+
uses: actions/setup-node@v6
3636
with:
3737
node-version: ${{ matrix.node-version }}
3838
cache: 'npm'
@@ -53,4 +53,4 @@ jobs:
5353
run: node --enable-source-maps ./dist/bin/harperdb.js install
5454

5555
- name: Run tests
56-
run: npm run test:unit
56+
run: npm run test:unit:all

CODE_OF_CONDUCT.md

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Contributor Covenant 3.0 Code of Conduct
32

43
## Our Pledge
@@ -21,7 +20,6 @@ With these considerations in mind, we agree to behave mindfully toward each othe
2120
6. Committing to **repairing harm** when it occurs.
2221
7. Behaving in other ways that promote and sustain the **well-being of our community**.
2322

24-
2523
## Restricted Behaviors
2624

2725
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
@@ -41,7 +39,6 @@ We agree to restrict the following behaviors in our community. Instances, threat
4139
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
4240
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
4341

44-
4542
## Reporting an Issue
4643

4744
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
@@ -50,41 +47,37 @@ When an incident does occur, it is important to report it promptly. To report a
5047

5148
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
5249

53-
5450
## Addressing and Repairing Harm
5551

5652
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
5753

58-
1) Warning
59-
1) Event: A violation involving a single incident or series of incidents.
60-
2) Consequence: A private, written warning from the Community Moderators.
61-
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
62-
2) Temporarily Limited Activities
63-
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
64-
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
65-
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
66-
3) Temporary Suspension
67-
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
68-
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
69-
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
70-
4) Permanent Ban
71-
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
72-
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
73-
3) Repair: There is no possible repair in cases of this severity.
54+
1. Warning
55+
1. Event: A violation involving a single incident or series of incidents.
56+
2. Consequence: A private, written warning from the Community Moderators.
57+
3. Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
58+
2. Temporarily Limited Activities
59+
1. Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
60+
2. Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
61+
3. Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
62+
3. Temporary Suspension
63+
1. Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
64+
2. Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
65+
3. Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
66+
4. Permanent Ban
67+
1. Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
68+
2. Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
69+
3. Repair: There is no possible repair in cases of this severity.
7470

7571
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
7672

77-
7873
## Scope
7974

8075
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
8176

82-
8377
## Attribution
8478

8579
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
8680

8781
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
8882

8983
For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
90-

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ Install dependencies using `npm install`
1515

1616
Build the project using `npm run build` or `npm run build:watch` to automatically rebuild on file changes.
1717

18-
Run tests using `npm run test:integration`. Make sure to read the [integration test instructions](./integrationTests/apiTests/README.md) for setup.
18+
Run integration tests using `npm run test:integration`. Make sure to read the [integration test instructions](./integrationTests/apiTests/README.md) for setup.
19+
20+
Run unit tests using `npm run test:unit <unit-test-file>` or `npm run test:unit:all`, but make sure to build the project first since unit tests depend on the built source files.
21+
22+
> Unit tests currently use [Mocha](https://mochajs.org/) as the test runner, but since they are implemented in TypeScript and are sometimes executing TypeScript source code, it also uses [TSX](https://tsx.is/) for compilation and execution. The npm script `test:unit` sets the appropriate env vars and mocha configuration file. Make sure that the `TSX_TSCONFIG_PATH` environment variable points to the correct `tsconfig.json` file for the unit tests (i.e. `./unitTests/tsconfig.json`) and not the root-level `tsconfig.json`.
1923
2024
## Repository Structure
2125

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Harper
22

3-
Harper is an open-source Node.js unified development platform that fuses database, cache, application, and messaging layers into one in-memory process. With Harper you can build ultra-high-performance services without boilerplate code and scale them horizontally.
3+
Harper is an open-source Node.js unified development platform that fuses database, cache, application, and messaging layers into one in-memory process. With Harper you can build ultra-high-performance services without boilerplate code and scale them horizontally.
44

55
**Key Features:**
66

components/DEFAULT_CONFIG.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
export const DEFAULT_CONFIG = {
22
rest: true,
33
graphqlSchema: {
4-
files: '*.graphql'
4+
files: '*.graphql',
55
},
66
roles: {
7-
files: 'roles.yaml'
7+
files: 'roles.yaml',
88
},
99
jsResource: {
10-
files: 'resources.js'
10+
files: 'resources.js',
1111
},
1212
fastifyRoutes: {
13-
files: 'routes/*.js'
13+
files: 'routes/*.js',
1414
},
1515
static: {
16-
files: 'web/**'
17-
}
18-
};
16+
files: 'web/**',
17+
},
18+
};

components/EntryHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export class EntryHandler extends EventEmitter<EntryHandlerEventMap> {
165165
persistent: false,
166166
ignored: (path) => {
167167
const normalizedPath = path.replace(/\\/g, '/');
168-
const normalizedBases = allowedBases.map(base => base.replace(/\\/g, '/'));
168+
const normalizedBases = allowedBases.map((base) => base.replace(/\\/g, '/'));
169169
return (
170170
normalizedPath !== this.#component.directory.replace(/\\/g, '/') &&
171171
normalizedBases.every((base) => !normalizedPath.startsWith(base))

components/PluginModule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Scope } from "./Scope";
1+
import { Scope } from './Scope';
22

33
export interface PluginModule {
44
handleApplication: (scope: Scope) => void | Promise<void>;
55
defaultTimeout?: number;
66
suppressHandleApplicationWarning?: boolean;
7-
}
7+
}

0 commit comments

Comments
 (0)