-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lumos): export more missing modules (#729)
- Loading branch information
Showing
22 changed files
with
6,734 additions
and
6 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,5 @@ | ||
--- | ||
"@ckb-lumos/lumos": minor | ||
--- | ||
|
||
feat: export some missing modules |
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,5 @@ | ||
--- | ||
"@ckb-lumos/lumos": minor | ||
--- | ||
|
||
feat: added `bi`, `base`, `ckb-indexer`, `hd`, `light-client` as subpackages to make import more fine-grained |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
* | ||
!src | ||
!src/* | ||
!src/**/* | ||
!.gitignore | ||
!.npmignore | ||
!CHANGELOG.md | ||
|
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 @@ | ||
export * from "./types"; | ||
export * as since from "./since"; |
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 @@ | ||
export { | ||
type EpochSinceValue, | ||
type SinceValidationInfo, | ||
type SinceType, | ||
generateSince, | ||
generateAbsoluteEpochSince, | ||
generateHeaderEpoch, | ||
parseAbsoluteEpochSince, | ||
parseSinceCompatible, | ||
parseEpoch, | ||
parseSince, | ||
validateAbsoluteEpochSince, | ||
validateSince, | ||
maximumAbsoluteEpochSince, | ||
} from "@ckb-lumos/base/lib/since"; |
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,26 @@ | ||
export { | ||
type Script, | ||
type Cell, | ||
type RawTransaction, | ||
type Transaction, | ||
type OutPoint, | ||
type CellDep, | ||
type WitnessArgs, | ||
type Header, | ||
type Block, | ||
type HashType, | ||
type DepType, | ||
type Input, | ||
type Output, | ||
} from "@ckb-lumos/base/lib/api"; | ||
|
||
export { | ||
type Address, | ||
type Hash, | ||
type HexNumber, | ||
type HexString, | ||
type Hexadecimal, | ||
type HexadecimalRange, | ||
type PackedDao, | ||
type PackedSince, | ||
} from "@ckb-lumos/base/lib/primitive"; |
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 { BI, parseUnit, formatUnit, isBIish, type BIish } from "@ckb-lumos/bi"; |
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 @@ | ||
export { | ||
Indexer, | ||
TransactionCollector, | ||
CellCollector, | ||
} from "@ckb-lumos/ckb-indexer"; | ||
|
||
export { type QueryOptions } from "@ckb-lumos/base"; |
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 @@ | ||
export * from "@ckb-lumos/hd"; |
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 { LightClientRPC } from "@ckb-lumos/light-client"; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { RPC, CKBRPC, ParamsFormatter, ResultFormatter } from "@ckb-lumos/rpc"; | ||
export type { Base } from "@ckb-lumos/rpc/lib/Base"; | ||
export { Method } from "@ckb-lumos/rpc/lib/method"; | ||
export { Base } from "@ckb-lumos/rpc/lib/Base"; | ||
export type { RPC as RPCTypes } from "@ckb-lumos/rpc/lib/types/rpc"; | ||
export type { CKBComponents } from "@ckb-lumos/rpc/lib/types/api"; |
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 @@ | ||
stats.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,26 @@ | ||
{ | ||
"name": "@ckb-lumos/bundler", | ||
"homepage": "https://github.com/ckb-js/lumos#readme", | ||
"bugs": { | ||
"url": "https://github.com/ckb-js/lumos/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ckb-js/lumos.git" | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"bundle-stats": "webpack --profile --json > stats.json", | ||
"bundle-analyze": "npm run bundle-stats && webpack-bundle-analyzer stats.json" | ||
}, | ||
"devDependencies": { | ||
"@ckb-lumos/lumos": "workspace:*", | ||
"@types/webpack-bundle-analyzer": "^4.7.0", | ||
"fork-ts-checker-webpack-plugin": "^9.0.2", | ||
"ts-loader": "^9.5.1", | ||
"unminified-webpack-plugin": "^3.0.0", | ||
"webpack": "^5.92.1", | ||
"webpack-bundle-analyzer": "^4.10.2", | ||
"webpack-cli": "^5.1.4" | ||
} | ||
} |
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 @@ | ||
import * as codec from "@ckb-lumos/lumos/codec"; | ||
|
||
console.log(codec); |
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,8 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "lib", | ||
"rootDir": "src" | ||
}, | ||
"include": ["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,24 @@ | ||
const path = require("path"); | ||
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); | ||
|
||
/** @type {import('webpack').Configuration} */ | ||
module.exports = { | ||
mode: "production", | ||
devtool: "source-map", | ||
entry: { output: "./src/index.ts" }, | ||
output: { | ||
path: path.join(__dirname, "lib"), | ||
filename: "lumos.min.js", | ||
library: "lumos", | ||
libraryTarget: "umd", | ||
globalObject: "this", | ||
}, | ||
module: { | ||
rules: [{ test: /\.tsx?$/, loader: "ts-loader", options: {} }], | ||
}, | ||
resolve: { | ||
extensions: [".ts", ".js", ".json"], | ||
}, | ||
infrastructureLogging: { level: "verbose" }, | ||
plugins: [new ForkTsCheckerWebpackPlugin({ async: false })], | ||
}; |
Oops, something went wrong.
8b10ade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 New canary release:
0.0.0-canary-8b10ade-20240712023406