Skip to content

Commit

Permalink
fix(types): fix issue where dev-tools types are unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
FranklinWaller authored and Thomasvdam committed Jul 16, 2024
1 parent cf2fde8 commit 70a970c
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 5 deletions.
Binary file modified bun.lockb
Binary file not shown.
12 changes: 12 additions & 0 deletions libs/dev-tools/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import dts from 'bun-plugin-dts';

await Bun.build({
entrypoints: ['./src/index.ts'],
target: 'node',
outdir: 'build',
plugins: [
dts(),
],
});

export { };
2 changes: 1 addition & 1 deletion libs/dev-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "0.0.1",
"scripts": {
"build:cli": "bun build src/cli/index.ts --target node --outdir bin",
"build:lib": "bun build src/index.ts --target node --outdir build",
"build": "bun run build:cli && bun run build:lib",
"build:lib": "bun run build.ts",
"prepublish": "bun run build"
},
"bin": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type AwaitOptions = Parameters<typeof awaitDataResult>['2'];
export async function postAndAwaitDataRequest(
signer: ISigner,
dataRequestInput: PostDataRequestInput,
gasOptions: GasOptions,
awaitOptions: AwaitOptions
gasOptions?: GasOptions,
awaitOptions?: AwaitOptions
) {
const postDrResponse = await postDataRequest(
signer,
Expand Down
2 changes: 1 addition & 1 deletion libs/dev-tools/src/lib/services/dr/post-data-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
export async function postDataRequest(
signer: ISigner,
dataRequestInput: PostDataRequestInput,
gasOptions: GasOptions
gasOptions?: GasOptions
): Promise<{ tx: string; drId: string }> {
const sigingClientResult = await createSigningClient(signer);
if (sigingClientResult.isErr) {
Expand Down
2 changes: 1 addition & 1 deletion libs/dev-tools/src/lib/services/sign-and-send-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function signAndSendTx(
signingClient: SigningCosmWasmClient,
address: string,
messages: EncodeObject[],
gasOptions: GasOptions,
gasOptions: GasOptions = {},
memo = 'Sent from SEDA SDK'
): Promise<Result<DeliverTxResponse, unknown>> {
const gasInput = gasOptions.gas ?? DEFAULT_GAS;
Expand Down
3 changes: 3 additions & 0 deletions libs/glob-types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Disclaimer

This file overrides the corrupted types of `@types/glob` / `@types/minimatch`. We override in the root package.json the `@types/glob` in order to by pass checking of the corrupted version.
1 change: 1 addition & 0 deletions libs/glob-types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {}
4 changes: 4 additions & 0 deletions libs/glob-types/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@types/glob",
"types": "index.d.ts"
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
},
"private": true,
"type": "module",
"overrides": {
"@types/glob": "file:./libs/glob-types/"
},
"devDependencies": {
"@as-pect/cli": "^8.1.0",
"@assemblyscript/wasi-shim": "^0.1.0",
Expand All @@ -28,6 +31,7 @@
"@types/node": "18.19.9",
"@typescript-eslint/eslint-plugin": "7.9.0",
"assemblyscript": "^0.27.11",
"bun-plugin-dts": "^0.2.3",
"esbuild": "0.19.9",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
Expand Down

0 comments on commit 70a970c

Please sign in to comment.