Skip to content

Commit 86e7d98

Browse files
authored
Add TextSearchProvider (#27)
* Change null to undefined * Stop looping on self-referencing contracts * Make textSearchProvider work * Fix .vscodeignore
1 parent ab1340c commit 86e7d98

15 files changed

+304
-98
lines changed

packages/ethereum-viewer/.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
**/*.map
55
**/*.ts
66
dist/test/**
7+
dist/**/*.test.ts
78
node_modules/**
89
out/**
910
src/**

packages/ethereum-viewer/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"watch": "webpack --watch",
1111
"pretest": "yarn run build",
1212
"lint": "eslint src --ext ts",
13-
"serve": "serve --cors -l 5000 --ssl-cert ../../certs/localhost.pem --ssl-key ../../certs/localhost-key.pem",
14-
"run-in-browser": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. ."
13+
"serve": "serve --cors -l 5000 --ssl-cert ../../certs/localhost.pem --ssl-key ../../certs/localhost-key.pem"
1514
},
1615
"dependencies": {
1716
"fast-json-stable-stringify": "^2.1.0",

packages/ethereum-viewer/src/contributedCommands.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { commands, ExtensionContext, QuickPickItem,window } from "vscode";
1+
import { commands, ExtensionContext, QuickPickItem, window } from "vscode";
22

3-
import { ApiName,explorerApiUrls, networkNames } from "./explorer";
4-
import { FileSystem } from "./filesystem";
3+
import { ApiName, explorerApiUrls, networkNames } from "./explorer";
4+
import { FileSystem } from "./fs";
55
import { openContractSource } from "./openContractSource";
66
import { unsafeEntries } from "./util/unsafeEntries";
77

packages/ethereum-viewer/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { registerContributedCommands } from "./contributedCommands";
55
import { executeHostCommand } from "./executeHostCommand";
66
import * as explorer from "./explorer";
77
import { explorerApiUrls, networkNames } from "./explorer";
8-
import { FileSystem } from "./filesystem";
8+
import { FileSystem } from "./fs";
99
import { openContractSource } from "./openContractSource";
1010

1111
let initialized = false;

packages/ethereum-viewer/src/fileSearchProvider.ts renamed to packages/ethereum-viewer/src/fs/fileSearchProvider.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
export class StaticFileSearchProvider
1313
implements FileSearchProvider, Disposable
1414
{
15-
static scheme = "github1s";
1615
private readonly disposable?: Disposable;
1716

1817
// HACK: We don't support searching for added files.

packages/ethereum-viewer/src/test/filesystem.test.ts renamed to packages/ethereum-viewer/src/fs/fileSystem.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { strictEqual } from "assert";
22

3-
import { FileSystem } from "../filesystem";
3+
import { FileSystem } from "./fileSystem";
44

55
describe(FileSystem.name, () => {
66
it("creates file", () => {
File renamed without changes.

packages/ethereum-viewer/src/fs/fileSystemProvider.test.ts

Whitespace-only changes.
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { StaticFileSearchProvider } from "./fileSearchProvider";
2+
export { FileSystem } from "./fileSystem";
3+
export { MemFSTextSearchProvider } from "./textSearchProvider";

0 commit comments

Comments
 (0)