-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ (flipper) [NO-ISSUE]: Implement basic Flipper plugin for logs (#375)
- Loading branch information
Showing
21 changed files
with
582 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@ledgerhq/device-management-kit-flipper-plugin-client": patch | ||
"@ledgerhq/device-management-kit": patch | ||
"@ledgerhq/device-sdk-sample": patch | ||
--- | ||
|
||
Implement basic Flipper client for the Ledger Device Management Kit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/* |
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,19 @@ | ||
import config from "@ledgerhq/eslint-config-dsdk"; | ||
|
||
export default [ | ||
...config, | ||
{ | ||
ignores: ["eslint.config.mjs", "scripts/*.mjs"], | ||
languageOptions: { | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ["**/*.ts"], | ||
rules: { | ||
"no-restricted-imports": ["off"], | ||
}, | ||
}, | ||
]; |
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 @@ | ||
export * from "./src"; |
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,15 @@ | ||
/* eslint no-restricted-syntax: 0 */ | ||
import type { JestConfigWithTsJest } from "ts-jest"; | ||
|
||
const config: JestConfigWithTsJest = { | ||
preset: "@ledgerhq/jest-config-dsdk", | ||
testPathIgnorePatterns: ["<rootDir>/lib/esm", "<rootDir>/lib/cjs"], | ||
collectCoverageFrom: [ | ||
"src/**/*.ts", | ||
"!src/**/*.stub.ts", | ||
"!src/index.ts", | ||
"!src/api/index.ts", | ||
], | ||
}; | ||
|
||
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,51 @@ | ||
{ | ||
"name": "@ledgerhq/device-management-kit-flipper-plugin-client", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"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 index.ts,src/**/*.ts --tsconfig tsconfig.prod.json", | ||
"dev": "concurrently \"pnpm watch:builds\" \"pnpm watch:types\"", | ||
"watch:builds": "pnpm lmdk-watch --entryPoints index.ts,src/**/*.ts --tsconfig tsconfig.prod.json", | ||
"watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\"", | ||
"lint": "eslint", | ||
"lint:fix": "pnpm lint --fix", | ||
"prettier": "prettier . --check", | ||
"prettier:fix": "prettier . --write", | ||
"typecheck": "tsc --noEmit", | ||
"test": "jest --passWithNoTests", | ||
"test:coverage": "pnpm test -- --coverage" | ||
}, | ||
"dependencies": { | ||
"js-flipper": "^0.270.0", | ||
"rxjs": "^7.8.1" | ||
}, | ||
"devDependencies": { | ||
"@ledgerhq/esbuild-tools": "workspace:*", | ||
"@ledgerhq/tsconfig-dsdk": "workspace:*", | ||
"@ledgerhq/eslint-config-dsdk": "workspace:*", | ||
"@ledgerhq/jest-config-dsdk": "workspace:*", | ||
"@ledgerhq/prettier-config-dsdk": "workspace:*", | ||
"@ledgerhq/device-management-kit": "workspace:*" | ||
}, | ||
"peerDependencies": { | ||
"@ledgerhq/device-management-kit": "workspace:*" | ||
} | ||
} |
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,21 @@ | ||
#!/usr/bin/env zx | ||
import path from "node:path"; | ||
|
||
const root = path.join(__dirname, ".."); | ||
const tsconfigEsm = path.join(root, "tsconfig.esm.json"); | ||
const tsconfigCjs = path.join(root, "tsconfig.cjs.json"); | ||
|
||
const buildEsm = async () => { | ||
await $`tsc --project ${tsconfigEsm} --incremental`; | ||
}; | ||
|
||
const builCjs = async () => { | ||
await $`tsc --project ${tsconfigCjs} --incremental`; | ||
}; | ||
|
||
const run = async () => await Promise.all([buildEsm(), builCjs()]); | ||
|
||
run().catch((e) => { | ||
console.error(e); | ||
process.exit(e.errorCode); | ||
}); |
Oops, something went wrong.