Skip to content

Commit 37436b1

Browse files
committed
fixup! refactor!: hoist bufferChainSyncEvent to projection package
1 parent 22e6824 commit 37436b1

File tree

8 files changed

+64
-52
lines changed

8 files changed

+64
-52
lines changed

packages/cardano-services/src/Projection/createTypeormProjection.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
/* eslint-disable prefer-spread */
3-
import { Bootstrap, ProjectionEvent, logProjectionProgress, requestNext } from '@cardano-sdk/projection';
4-
import { Cardano, ObservableCardanoNode } from '@cardano-sdk/core';
3+
import {
4+
Bootstrap,
5+
ObservableCardanoNode,
6+
ProjectionEvent,
7+
logProjectionProgress,
8+
requestNext
9+
} from '@cardano-sdk/projection';
10+
import { Cardano } from '@cardano-sdk/core';
511
import { Logger } from 'ts-log';
612
import { Observable, concat, defer, groupBy, mergeMap, take, takeWhile } from 'rxjs';
713
import {

packages/cardano-services/src/TxSubmit/NodeTxSubmitProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
HandleOwnerChangeError,
66
HandleProvider,
77
HealthCheckResponse,
8-
ObservableCardanoNode,
98
ProviderError,
109
ProviderFailure,
1110
SubmitTxArgs,
@@ -14,6 +13,7 @@ import {
1413
} from '@cardano-sdk/core';
1514
import { InMemoryCache } from '../InMemoryCache';
1615
import { Logger } from 'ts-log';
16+
import { ObservableCardanoNode } from '@cardano-sdk/projection';
1717
import { WithLogger } from '@cardano-sdk/util';
1818

1919
type ObservableTxSubmitter = Pick<ObservableCardanoNode, 'healthCheck$' | 'submitTx'>;

packages/ogmios/src/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
{
1111
"path": "../../util-rxjs/src"
1212
},
13+
{
14+
"path": "../../projection/src"
15+
},
1316
{
1417
"path": "../../crypto/src"
1518
}

packages/projection/package.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
"name": "@cardano-sdk/projection",
33
"version": "0.11.36",
44
"description": "Chain Sync event projection",
5-
"engines": {
6-
"node": ">=16.20.2"
7-
},
8-
"main": "dist/cjs/index.js",
9-
"module": "dist/esm/index.js",
5+
"repository": "https://github.com/input-output-hk/cardano-js-sdk",
6+
"license": "Apache-2.0",
7+
"sideEffects": false,
108
"exports": {
119
".": {
1210
"development": "./src/index.ts",
1311
"import": "./dist/esm/index.js",
1412
"require": "./dist/cjs/index.js"
1513
}
1614
},
17-
"repository": "https://github.com/input-output-hk/cardano-js-sdk",
18-
"publishConfig": {
19-
"access": "public"
20-
},
21-
"sideEffects": false,
22-
"license": "Apache-2.0",
15+
"main": "dist/cjs/index.js",
16+
"module": "dist/esm/index.js",
17+
"files": [
18+
"dist/*",
19+
"!dist/tsconfig.tsbuildinfo",
20+
"LICENSE",
21+
"NOTICE"
22+
],
2323
"scripts": {
2424
"build": "yarn build:cjs && tsc -p src/tsconfig.json --outDir ./dist/esm --module es2020 && tsc-alias -p src/tsconfig.json --outDir ./dist/esm && cp ../../build/esm-package.json ./dist/esm/package.json",
2525
"build:cjs": "tsc --build src && cp ../../build/cjs-package.json ./dist/cjs/package.json",
@@ -49,7 +49,6 @@
4949
"tsc-alias": "^1.8.10"
5050
},
5151
"devDependencies": {
52-
"@cardano-sdk/ogmios": "workspace:~",
5352
"@cardano-sdk/util-dev": "workspace:~",
5453
"eslint": "^7.32.0",
5554
"jest": "^28.1.3",
@@ -58,10 +57,10 @@
5857
"ts-jest": "^28.0.7",
5958
"typescript": "^4.7.4"
6059
},
61-
"files": [
62-
"dist/*",
63-
"!dist/tsconfig.tsbuildinfo",
64-
"LICENSE",
65-
"NOTICE"
66-
]
60+
"engines": {
61+
"node": ">=16.20.2"
62+
},
63+
"publishConfig": {
64+
"access": "public"
65+
}
6766
}

packages/util-dev/package.json

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
"name": "@cardano-sdk/util-dev",
33
"version": "0.22.10",
44
"description": "Utilities for tests in other packages",
5-
"engines": {
6-
"node": ">=16.20.2"
7-
},
8-
"main": "dist/cjs/index.js",
9-
"module": "dist/esm/index.js",
5+
"repository": "https://github.com/input-output-hk/cardano-js-sdk",
6+
"license": "Apache-2.0",
7+
"sideEffects": false,
108
"exports": {
119
".": {
1210
"import": "./dist/esm/index.js",
1311
"require": "./dist/cjs/index.js"
1412
}
1513
},
14+
"main": "dist/cjs/index.js",
15+
"module": "dist/esm/index.js",
1616
"browser": {
1717
"./dist/cjs/docker.js": false,
1818
"./dist/esm/docker.js": false
1919
},
20-
"repository": "https://github.com/input-output-hk/cardano-js-sdk",
21-
"publishConfig": {
22-
"access": "public"
23-
},
24-
"sideEffects": false,
25-
"license": "Apache-2.0",
20+
"files": [
21+
"dist/*",
22+
"!dist/tsconfig.tsbuildinfo",
23+
"LICENSE",
24+
"NOTICE"
25+
],
2626
"scripts": {
2727
"build": "yarn build:cjs && tsc -p src/tsconfig.json --outDir ./dist/esm --module es2020 && tsc-alias -p src/tsconfig.json --outDir ./dist/esm && cp ./esm-package.json ./dist/esm/package.json && cp -rf src/chainSync/data dist/esm/chainSync/",
2828
"build:cjs": "tsc --build src && cp ../../build/cjs-package.json ./dist/cjs/package.json && cp -rf src/chainSync/data dist/cjs/chainSync/",
@@ -40,18 +40,6 @@
4040
"test:debug": "DEBUG=true yarn test",
4141
"test:e2e": "echo 'test:e2e' command not implemented yet"
4242
},
43-
"devDependencies": {
44-
"@types/dockerode": "^3.3.8",
45-
"@types/jest": "^26.0.24",
46-
"@types/k6": "^0.53.1",
47-
"eslint": "^7.32.0",
48-
"jest": "^28.1.3",
49-
"madge": "^5.0.1",
50-
"npm-run-all": "^4.1.5",
51-
"ts-jest": "^28.0.7",
52-
"tsc-alias": "^1.8.10",
53-
"typescript": "^4.7.4"
54-
},
5543
"dependencies": {
5644
"@cardano-sdk/core": "workspace:~",
5745
"@cardano-sdk/crypto": "workspace:~",
@@ -70,10 +58,23 @@
7058
"rxjs": "^7.4.0",
7159
"ts-log": "^2.2.4"
7260
},
73-
"files": [
74-
"dist/*",
75-
"!dist/tsconfig.tsbuildinfo",
76-
"LICENSE",
77-
"NOTICE"
78-
]
61+
"devDependencies": {
62+
"@cardano-sdk/projection": "workspace:~",
63+
"@types/dockerode": "^3.3.8",
64+
"@types/jest": "^26.0.24",
65+
"@types/k6": "^0.53.1",
66+
"eslint": "^7.32.0",
67+
"jest": "^28.1.3",
68+
"madge": "^5.0.1",
69+
"npm-run-all": "^4.1.5",
70+
"ts-jest": "^28.0.7",
71+
"tsc-alias": "^1.8.10",
72+
"typescript": "^4.7.4"
73+
},
74+
"engines": {
75+
"node": ">=16.20.2"
76+
},
77+
"publishConfig": {
78+
"access": "public"
79+
}
7980
}

packages/util-dev/src/chainSync/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import {
99
GeneralCardanoNodeError,
1010
GeneralCardanoNodeErrorCode,
1111
Intersection,
12-
ObservableCardanoNode,
1312
Point,
1413
PointOrOrigin
1514
} from '@cardano-sdk/core';
1615
import { Observable, of, throwError } from 'rxjs';
1716
import { fromSerializableObject } from '@cardano-sdk/util';
1817
import { genesisToEraSummary } from './genesisToEraSummary';
1918
import memoize from 'lodash/memoize.js';
19+
import type { ObservableCardanoNode } from '@cardano-sdk/projection';
2020

2121
export type SerializedChainSyncEvent =
2222
| Omit<ChainSyncRollForward, 'requestNext'>

packages/util-dev/src/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"references": [
77
{
88
"path": "../../core/src"
9+
},
10+
{
11+
"path": "../../projection/src"
912
}
1013
]
1114
}

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3923,7 +3923,6 @@ __metadata:
39233923
dependencies:
39243924
"@cardano-sdk/core": "workspace:~"
39253925
"@cardano-sdk/crypto": "workspace:~"
3926-
"@cardano-sdk/ogmios": "workspace:~"
39273926
"@cardano-sdk/util": "workspace:~"
39283927
"@cardano-sdk/util-dev": "workspace:~"
39293928
"@cardano-sdk/util-rxjs": "workspace:~"
@@ -3976,6 +3975,7 @@ __metadata:
39763975
"@cardano-sdk/core": "workspace:~"
39773976
"@cardano-sdk/crypto": "workspace:~"
39783977
"@cardano-sdk/key-management": "workspace:~"
3978+
"@cardano-sdk/projection": "workspace:~"
39793979
"@cardano-sdk/util": "workspace:~"
39803980
"@types/dockerode": ^3.3.8
39813981
"@types/jest": ^26.0.24

0 commit comments

Comments
 (0)