Skip to content

Commit

Permalink
wip: fix(release): tsconfig storm
Browse files Browse the repository at this point in the history
  • Loading branch information
egasimus committed Nov 27, 2023
1 parent 0ce4866 commit 3b8c344
Show file tree
Hide file tree
Showing 14 changed files with 112 additions and 75 deletions.
5 changes: 2 additions & 3 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
"@hackbg/into": "^1.0.1",
"@hackbg/logs": "workspace:^2.1",
"@hackbg/oops": "workspace:^1.1"
},
"ubik": true
}
}
}
2 changes: 1 addition & 1 deletion agent/stub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class StubConnection extends Connection {
this.backend ??= new StubBackend()
}
batch (): Batch<this> {
return new StubBatch({ connection: this }) as Batch<this>
return new StubBatch({ connection: this }) as unknown as Batch<this>
}
doGetHeight () {
return this.doGetBlockInfo().then(({height})=>height)
Expand Down
22 changes: 18 additions & 4 deletions agent/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
{
"extends": "../tsconfig.base.json",
"include": [ "*.ts" ],
"files": [
"agent.ts",
"base.ts",
"connect.ts",
"deploy.ts",
"stub.ts",
"token.ts"
],
"include": [],
"exclude": [ ".ubik", "*.dist.*", "node_modules" ],
"compilerOptions": {
"rootDir": ".",
"composite": true
"composite": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noEmitOnError": true,
"skipLibCheck": true
}
}
19 changes: 15 additions & 4 deletions create/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{
"extends": "../tsconfig.base.json",
"exclude": [ "dist", "coverage" ],
"files": [
"create.ts",
"package.ts",
"tools.ts"
],
"include": [],
"exclude": [ ".ubik", "*.dist.*", "node_modules" ],
"compilerOptions": {
"rootDir": ".",
"composite": true
"composite": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noEmitOnError": true,
"skipLibCheck": true
}
}
2 changes: 1 addition & 1 deletion cw/cosmjs-esm
25 changes: 20 additions & 5 deletions cw/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
{
"extends": "../tsconfig.base.json",
"exclude": [ "cosmjs-esm/**", "../fadroma*.ts" ],
"include": [ "*.ts", "**/*.ts" ],
"files": [
"cw.ts",
"cw-base.ts",
"cw-identity.ts",
"cw-connection.ts",
"okp4/okp4.ts",
"okp4/okp4-cognitarium.ts",
"okp4/okp4-law-stone.ts",
"okp4/okp4-objectarium.ts"
],
"include": [],
"exclude": [ ".ubik", "*.dist.*", "node_modules" ],
"compilerOptions": {
"rootDir": ".",
"composite": true
"composite": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noEmitOnError": true,
"skipLibCheck": true
}
}
16 changes: 13 additions & 3 deletions devnet/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"extends": "../tsconfig.base.json",
"files": [
"devnet.ts"
],
"include": [],
"exclude": [ ".ubik", "*.dist.*", "node_modules" ],
"compilerOptions": {
"rootDir": ".",
"composite": true
"composite": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noEmitOnError": true,
"skipLibCheck": true
}
}
4 changes: 2 additions & 2 deletions scrt/scrt-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ class ScrtConnection extends Connection {
}

async getNonce (): Promise<{ accountNumber: number, sequence: number }> {
const result = await this.api.query.auth.account({ address: this.address }) ?? (() => {
const result: any = await this.api.query.auth.account({ address: this.address }) ?? (() => {
throw new Error(`Cannot find account "${this.address}", make sure it has a balance.`)
})
const { account_number, sequence } = result.account as any
const { account_number, sequence } = result.account
return { accountNumber: Number(account_number), sequence: Number(sequence) }
}

Expand Down
2 changes: 1 addition & 1 deletion scrt/secretjs-esm
8 changes: 7 additions & 1 deletion scrt/snip-20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ export class Snip20 extends Contract implements Token.Fungible {
admin = admin.address
}
return {
name, symbol, decimals, admin, config, initial_balances: balances, prng_seed: prngSeed,
name,
symbol,
decimals,
admin: admin as Address,
config,
initial_balances: balances,
prng_seed: prngSeed,
}
}

Expand Down
18 changes: 15 additions & 3 deletions scrt/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"extends": "../tsconfig.base.json",
"include": [ "*.ts", "**/*.ts" ],
"exclude": [ "secretjs-esm/**/*" ],
"compilerOptions": { "rootDir": ".", "composite": true, "skipLibCheck": true }
"files": [
"scrt.ts",
"scrt-base.ts",
"scrt-connection.ts",
"scrt-identity.ts",
"scrt-mocknet.ts",
"snip-20.ts",
"snip-21.ts",
"snip-22.ts",
"snip-23.ts",
"snip-24.ts",
"snip-25.ts",
"snip-721.ts",
"snip-722.ts"
]
}
2 changes: 1 addition & 1 deletion toolbox
Submodule toolbox updated 3 files
+1 −1 ensuite
+1 −0 tsconfig.json
+1 −1 ubik
18 changes: 0 additions & 18 deletions tsconfig.base.json

This file was deleted.

44 changes: 16 additions & 28 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
{
"extends": "./tsconfig.base.json",
"include": ["./*.ts", "compile/*.ts", "create/*.ts", "devnet/*.ts"],
"exclude": [
"**/*.dist.*",
"**/*.mjs",
"**/*.spec.ts",
"**/dist/**/*",
"spec/*",
"agent/*",
"cw/*",
"scrt/*",
"evm/*",
"coverage",
"ensuite",
"examples",
"fadroma.cli.cjs",
"fixtures",
"homepage",
"ops",
"packages/schema",
"platforms",
"shim",
"target",
"toolbox",
"toolbox/*",
"typedoc-theme.tsx",
"types"
]
"files": [
"fadroma.ts",
"fadroma.browser.ts"
],
"include": [],
"exclude": [ ".ubik", "*.dist.*", "node_modules" ],
"compilerOptions": {
"composite": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noEmitOnError": true,
"skipLibCheck": true
}
}

0 comments on commit 3b8c344

Please sign in to comment.