Skip to content

Commit e391730

Browse files
Copilotcameri
andauthored
Merge remote-tracking branch 'origin/main' into dependabot/npm_and_yarn/multi-8794fb37d7
# Conflicts: # package-lock.json Co-authored-by: cameri <378886+cameri@users.noreply.github.com>
2 parents 4687e0d + c1df122 commit e391730

34 files changed

Lines changed: 1428 additions & 339 deletions

.eslintrc.js

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,33 @@ module.exports = {
33
parserOptions: {
44
sourceType: 'module',
55
},
6-
plugins: ['@typescript-eslint/eslint-plugin'],
6+
plugins: ['@typescript-eslint'],
77
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
88
root: true,
99
env: {
1010
node: true,
1111
},
1212
ignorePatterns: ['dist', 'tslint.json', 'node_modules'],
1313
rules: {
14-
'@typescript-eslint/interface-name-prefix': 'off',
1514
'@typescript-eslint/no-explicit-any': 'off',
16-
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
15+
'@typescript-eslint/no-unused-vars': [
16+
'error',
17+
{
18+
argsIgnorePattern: '^_',
19+
caughtErrors: 'none',
20+
},
21+
],
22+
'@typescript-eslint/no-require-imports': 'off',
23+
1724
semi: ['error', 'never'],
1825
quotes: ['error', 'single', { avoidEscape: true }],
19-
'sort-imports': ['error', {
20-
ignoreCase: true,
21-
allowSeparatedGroups: true,
22-
}],
26+
'sort-imports': [
27+
'error',
28+
{
29+
ignoreCase: true,
30+
allowSeparatedGroups: true,
31+
},
32+
],
2333
curly: [2, 'multi-line'],
2434
'max-len': [
2535
'error',
@@ -32,4 +42,12 @@ module.exports = {
3242
],
3343
'comma-dangle': ['error', 'always-multiline'],
3444
},
35-
}
45+
overrides: [
46+
{
47+
files: ['test/**/*.ts', '**/*.spec.ts'],
48+
rules: {
49+
'@typescript-eslint/no-unused-expressions': 'off',
50+
},
51+
},
52+
],
53+
}

CONFIGURATION.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ Running `nostream` for the first time creates the settings file in `<project_roo
109109
| limits.event.rateLimits[].rate | Maximum number of events during period. |
110110
| limits.event.whitelists.pubkeys | List of public keys to ignore rate limits. |
111111
| limits.event.whitelists.ipAddresses | List of IPs (IPv4 or IPv6) to ignore rate limits. |
112+
| limits.event.retention.maxDays | Maximum number of days to retain events. Purge deletes events that are expired (`expires_at`), soft-deleted (`deleted_at`), or older than this window (`created_at`). Any non-positive value disables retention purge. |
113+
| limits.event.retention.kind.whitelist | Event kinds excluded from retention purge. NIP-62 `REQUEST_TO_VANISH` is always excluded from retention purge, even if not listed here. |
114+
| limits.event.retention.pubkey.whitelist | Public keys excluded from retention purge. |
112115
| limits.client.subscription.maxSubscriptions | Maximum number of subscriptions per connected client. Defaults to 10. Disabled when set to zero. |
113116
| limits.client.subscription.maxFilters | Maximum number of filters per subscription. Defaults to 10. Disabled when set to zero. |
114117
| limits.message.rateLimits[].period | Rate limit period in milliseconds. |

Dockerfile.railwayapp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ ADD migrations /build/migrations
2323

2424
RUN npm install -g knex@2.4.0 && npm install --quiet
2525

26-
RUN npm run db:migrate
27-
2826
COPY . .
2927

3028
RUN npm run build
3129

3230
FROM node:24-alpine
3331

32+
# Install dumb-init for proper signal handling
33+
RUN apk add --no-cache dumb-init
34+
3435
ARG PORT
3536
ARG PGHOST
3637
ARG PGPORT
@@ -71,12 +72,19 @@ LABEL org.opencontainers.image.licenses=MIT
7172

7273
WORKDIR /app
7374

75+
# Copy runtime artifacts and configuration
7476
COPY --from=build /build/dist .
77+
COPY --from=build /build/package.json /build/package-lock.json ./
78+
COPY --from=build /build/knexfile.js ./
79+
COPY --from=build /build/migrations ./migrations
80+
COPY --from=build /build/seeds ./seeds
7581

76-
RUN npm install --omit=dev --quiet
82+
RUN npm install --omit=dev --quiet && npm install -g knex@2.4.0
7783

7884
USER 1000:1000
7985

8086
RUN mkdir -p $NOSTR_CONFIG_DIR
8187

82-
CMD ["node", "src/index.js"]
88+
ENTRYPOINT ["dumb-init", "--"]
89+
90+
CMD ["sh", "-c", "npm run db:migrate && node src/index.js"]

cucumber.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const config = [
1111
'--format @cucumber/pretty-formatter',
1212
'--format html:.test-reports/integration/report.html',
1313
'--format json:.test-reports/integration/report.json',
14-
'--publish',
1514
].join(' ')
1615

1716
module.exports = {

0 commit comments

Comments
 (0)