Skip to content

Commit

Permalink
fix: deps, ts-ignore and configs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FairyFromAlfeya committed Apr 29, 2023
1 parent d6d1579 commit 9e4a9dd
Show file tree
Hide file tree
Showing 10 changed files with 2,066 additions and 56 deletions.
31 changes: 14 additions & 17 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ sample-project-typescript/build
*.map
*.js
tsconfig.tsbuildinfo
**/.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ The module provides access to high-level control of transaction flow.
This method allows you to wait until all transactions in the chain are finalized.

```typescript
const transaction = await locklift.transactions.waitFinalized(tokenRoot.methods.deployWallet({...))
const transaction = await locklift.transactions.waitFinalized(tokenRoot.methods.deployWallet({...}))
```

## Full contract state (`locklift.provider.getFullContractState`)
Expand Down
18 changes: 0 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
},
"homepage": "https://github.com/broxus/locklift#readme",
"dependencies": {
"@types/commander": "^2.12.2",
"@types/yargs": "^17.0.13",
"axios": "^0.27.2",
"bignumber.js": "^9.0.1",
Expand All @@ -103,7 +102,7 @@
"ejs": "^3.1.6",
"env-paths": "^2.2.1",
"everscale-crypto": "^0.1.1",
"everscale-inpage-provider": "^0.3.52",
"everscale-inpage-provider": "^0.3.58",
"everscale-standalone-client": "^2.1.16",
"find-node-modules": "^2.1.3",
"fs-extra": "^10.1.0",
Expand Down
19 changes: 6 additions & 13 deletions src/internal/cli/builder/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ type Option = {
build: string;
disableIncludePath: boolean;
contracts: string;
mode?: string;
docs?: string;
include?: string;
};
export class Builder {
private options: Option;
Expand Down Expand Up @@ -166,7 +169,6 @@ export class Builder {
logger.printInfo(`Building ${path}`);

const output = execSyncWrapper(
//@ts-ignore
`cd ${this.options.build} && ${this.config.compilerPath} ./../${path} --${this.options.mode}`,
);

Expand Down Expand Up @@ -198,12 +200,7 @@ export class Builder {
rmWhitespace: true,
},
);
//@ts-ignore
fs.writeFileSync(
//@ts-ignore
resolve(process.cwd(), this.options.docs, "index.md"),
render,
);
fs.writeFileSync(resolve(process.cwd(), this.options.docs || "", "index.md"), render);

logger.printInfo("Docs generated successfully!");
} catch (e) {
Expand All @@ -223,18 +220,14 @@ export class Builder {
// Make them all absolute
.map(c => resolve(process.cwd(), this.options.build, c));
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const docs = [...output.matchAll(this.docRegex)].map(m =>
//@ts-ignore
JSON.parse(m.groups?.doc),
);
const docs = [...output.matchAll(this.docRegex)].map(m => JSON.parse(m.groups?.doc || ""));

return _.zip(contracts, docs).reduce((acc: ParsedDoc[], [contract, doc]: string[]) => {
const [path, name] = contract.split(":");

// Check name matches the "include" pattern and contract is located in the "contracts" dir
if (
//@ts-ignore
name.match(new RegExp(this.options.include)) !== null &&
name.match(new RegExp(this.options.include || "")) !== null &&
path.startsWith(`${process.cwd()}/${this.options.contracts}`)
) {
return [
Expand Down
2 changes: 1 addition & 1 deletion src/internal/compilerComponentsStore/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getLinkerUrl = ({ version }: { version: string }) =>
const getCompilerUrl = ({ version }: { version: string }) =>
`https://binaries.tonlabs.io/${getGzFileName(getCompilerFileName({ version }))}`;
const getLibUrl = ({ version }: { version: string }) =>
`http://sdkbinaries.tonlabs.io/${getGzFileName(getLibFileName({ version }))}`;
`https://sdkbinaries.tonlabs.io/${getGzFileName(getLibFileName({ version }))}`;

export const replaceDots = (arg: string): string => arg.replace(/\./g, "_");

Expand Down
3 changes: 1 addition & 2 deletions src/internal/tracing/viewTraceTree/viewTracingTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ export class ViewTracingTree {
contract,
name,
}: { contract: C } & { name: N }) => {
//@ts-ignore
if (name in contract._functions) {
if (name in contract.methodsAbi) {
return this.findByType<N, MethodParams<C, N>>({ name, type: TraceType.FUNCTION_CALL, contract });
}
return this.findByType<N, E>({ name, type: TraceType.EVENT, contract });
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export const initializeExtenders = (params: {
mergeMap(extender =>
from(extender.initializer(params)).pipe(
tap(extenderObject => {
//@ts-ignore
params.locklift[extender.pluginName] = extenderObject;
(params.locklift as any)[extender.pluginName] = extenderObject;
}),
),
),
Expand Down
Loading

0 comments on commit 9e4a9dd

Please sign in to comment.