Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract memory and file sinks to separate modules #429

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, macOS-latest]
node-version: [18.x, 20.x]
runs-on: ${{ matrix.os }}

Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-lock=false
save-exact=true
21 changes: 18 additions & 3 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import FS from '@eik/sink-file-system';
import MEM from '@eik/sink-memory';

import VersionsGet from './handlers/versions.get.js';
import AliasPost from './handlers/alias.post.js';
import AliasPut from './handlers/alias.put.js';
Expand All @@ -11,8 +14,6 @@ import MapGet from './handlers/map.get.js';
import MapPut from './handlers/map.put.js';

import TEST from './sinks/test.js';
import MEM from './sinks/mem.js';
import FS from './sinks/fs.js';

import HealthCheck from './utils/healthcheck.js';
import globals from './utils/globals.js';
Expand All @@ -31,9 +32,23 @@ const http = {
MapPut,
};

/**
* @deprecated The built-in sinks will be removed in a future version of core.
* Install the sink you want as a dependency and pass it as an option when constructing the Service.
* Ex: sink.MEM is replaced by eik/sink-memory. sink.FS is replaced by eik/sink-file-system.
*/
const sink = {
/**
* @deprecated Import eik/sink-memory or implement your own and pass it to the Service instead.
*/
TEST,
/**
* @deprecated Import eik/sink-memory and pass it to the Service instead
*/
MEM,
/**
* @deprecated Import eik/sink-file-system and pass it to the Service instead
*/
FS,
};

Expand All @@ -49,4 +64,4 @@ export default {
http,
sink,
prop,
}
};
263 changes: 0 additions & 263 deletions lib/sinks/fs.js

This file was deleted.

Loading