-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ (transport): Extracted MockServer + mockserver-client
Also exported the factories to make it easier to pass to addTransport
- Loading branch information
1 parent
ddb41ca
commit 158aebb
Showing
57 changed files
with
272 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/transport-mock/package.json → packages/mockserver-client/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
lib/* | ||
coverage/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
...require("@ledgerhq/prettier-config-dsdk"), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import config from "@ledgerhq/eslint-config-dsdk"; | ||
|
||
export default [ | ||
...config, | ||
{ | ||
ignores: ["eslint.config.mjs", "lib/*"], | ||
languageOptions: { | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* eslint no-restricted-syntax: 0 */ | ||
import { type JestConfigWithTsJest, pathsToModuleNameMapper } from "ts-jest"; | ||
|
||
import { compilerOptions } from "./tsconfig.json"; | ||
|
||
const paths = pathsToModuleNameMapper(compilerOptions.paths, { | ||
prefix: "<rootDir>/", | ||
}); | ||
|
||
const config: JestConfigWithTsJest = { | ||
preset: "@ledgerhq/jest-config-dsdk", | ||
// setupFiles: ["<rootDir>/jest.setup.ts"], | ||
testPathIgnorePatterns: ["<rootDir>/lib/esm/", "<rootDir>/lib/cjs/"], | ||
collectCoverageFrom: [ | ||
"src/**/*.ts", | ||
"!src/**/*.stub.ts", | ||
"!src/index.ts", | ||
"!src/api/index.ts", | ||
], | ||
moduleNameMapper: { | ||
...paths, | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"name": "@ledgerhq/device-transport-kit-mockserver", | ||
"version": "0.0.1", | ||
"license": "Apache-2.0", | ||
"private": true, | ||
"exports": { | ||
".": { | ||
"types": "./lib/types/index.d.ts", | ||
"import": "./lib/esm/index.js", | ||
"require": "./lib/cjs/index.js" | ||
}, | ||
"./*": { | ||
"types": "./lib/types/*", | ||
"import": "./lib/esm/*", | ||
"require": "./lib/cjs/*" | ||
} | ||
}, | ||
"files": [ | ||
"./lib" | ||
], | ||
"scripts": { | ||
"prebuild": "rimraf lib", | ||
"build": "pnpm lmdk-build --entryPoints src/index.ts,src/**/*.ts --tsconfig tsconfig.prod.json --platform web", | ||
"dev": "concurrently \"pnpm watch:builds\" \"pnpm watch:types\"", | ||
"watch:builds": "pnpm lmdk-watch --entryPoints src/index.ts,src/**/*.ts --tsconfig tsconfig.prod.json --platform web", | ||
"watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\"", | ||
"lint": "eslint", | ||
"lint:fix": "pnpm lint --fix", | ||
"postpack": "find . -name '*.tgz' -exec cp {} ../../../dist/ \\; ", | ||
"prettier": "prettier . --check", | ||
"prettier:fix": "prettier . --write", | ||
"typecheck": "tsc --noEmit", | ||
"test": "jest --passWithNoTests", | ||
"test:watch": "pnpm test -- --watch", | ||
"test:coverage": "pnpm test -- --coverage" | ||
}, | ||
"dependencies": { | ||
"@sentry/minimal": "^6.19.7", | ||
"purify-ts": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"@ledgerhq/device-management-kit": "workspace:*", | ||
"@ledgerhq/device-mockserver-client": "workspace:*", | ||
"@ledgerhq/esbuild-tools": "workspace:*", | ||
"@ledgerhq/eslint-config-dsdk": "workspace:*", | ||
"@ledgerhq/jest-config-dsdk": "workspace:*", | ||
"@ledgerhq/prettier-config-dsdk": "workspace:*", | ||
"@ledgerhq/tsconfig-dsdk": "workspace:*", | ||
"rxjs": "^7.8.1", | ||
"ts-node": "^10.9.2" | ||
}, | ||
"peerDependencies": { | ||
"@ledgerhq/device-management-kit": "workspace:*", | ||
"rxjs": "^7.8.1" | ||
} | ||
} |
Oops, something went wrong.