Skip to content

Commit

Permalink
nxp3 is just a temp name, so don't use it in meaningful places in cod…
Browse files Browse the repository at this point in the history
…e or command IDs
  • Loading branch information
djnicholson committed Oct 8, 2020
1 parent f54103a commit 96ab451
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ dist
out
node_modules
*.vsix
nxp3
nxp
*.nupkg
.DS_Store
62 changes: 31 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"url": "https://github.com/ngdseattle/neo3-visual-tracker.git"
},
"activationEvents": [
"onCommand:neo3-visual-devtracker.nxp3.contractDeploy",
"onCommand:neo3-visual-devtracker.nxp3.create",
"onCommand:neo3-visual-devtracker.nxp3.reset",
"onCommand:neo3-visual-devtracker.nxp3.run",
"onCommand:neo3-visual-devtracker.nxp3.transfer",
"onCommand:neo3-visual-devtracker.nxp3.walletCreate",
"onCommand:neo3-visual-devtracker.express.contractDeploy",
"onCommand:neo3-visual-devtracker.express.create",
"onCommand:neo3-visual-devtracker.express.reset",
"onCommand:neo3-visual-devtracker.express.run",
"onCommand:neo3-visual-devtracker.express.transfer",
"onCommand:neo3-visual-devtracker.express.walletCreate",
"onCommand:neo3-visual-devtracker.tracker.openTracker",
"onCustomEditor:neo3-visual-devtracker.nxp3.neo-invoke-json",
"onCustomEditor:neo3-visual-devtracker.express.neo-invoke-json",
"onView:neo3-visual-devtracker.blockchainsExplorer"
],
"keywords": [
Expand All @@ -42,7 +42,7 @@
"contributes": {
"customEditors": [
{
"viewType": "neo3-visual-devtracker.nxp3.neo-invoke-json",
"viewType": "neo3-visual-devtracker.express.neo-invoke-json",
"displayName": "Neo Express Contract Invoke File Editor",
"selector": [
{
Expand All @@ -54,22 +54,22 @@
],
"commands": [
{
"command": "neo3-visual-devtracker.nxp3.contractDeploy",
"command": "neo3-visual-devtracker.express.contractDeploy",
"title": "Deploy contract",
"category": "Neo Express 3"
},
{
"command": "neo3-visual-devtracker.nxp3.create",
"command": "neo3-visual-devtracker.express.create",
"title": "Create instance",
"category": "Neo Express 3"
},
{
"command": "neo3-visual-devtracker.nxp3.reset",
"command": "neo3-visual-devtracker.express.reset",
"title": "Reset instance",
"category": "Neo Express 3"
},
{
"command": "neo3-visual-devtracker.nxp3.run",
"command": "neo3-visual-devtracker.express.run",
"title": "Run instance",
"category": "Neo Express 3",
"icon": {
Expand All @@ -78,12 +78,12 @@
}
},
{
"command": "neo3-visual-devtracker.nxp3.transfer",
"command": "neo3-visual-devtracker.express.transfer",
"title": "Transfer assets",
"category": "Neo Express 3"
},
{
"command": "neo3-visual-devtracker.nxp3.walletCreate",
"command": "neo3-visual-devtracker.express.walletCreate",
"title": "Create wallet",
"category": "Neo Express 3"
},
Expand All @@ -100,29 +100,29 @@
"menus": {
"view/item/context": [
{
"command": "neo3-visual-devtracker.nxp3.contractDeploy",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == nxp3"
"command": "neo3-visual-devtracker.express.contractDeploy",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == express"
},
{
"command": "neo3-visual-devtracker.nxp3.reset",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == nxp3"
"command": "neo3-visual-devtracker.express.reset",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == express"
},
{
"command": "neo3-visual-devtracker.nxp3.run",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == nxp3",
"command": "neo3-visual-devtracker.express.run",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == express",
"group": "inline"
},
{
"command": "neo3-visual-devtracker.nxp3.run",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == nxp3"
"command": "neo3-visual-devtracker.express.run",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == express"
},
{
"command": "neo3-visual-devtracker.nxp3.transfer",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == nxp3"
"command": "neo3-visual-devtracker.express.transfer",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == express"
},
{
"command": "neo3-visual-devtracker.nxp3.walletCreate",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == nxp3"
"command": "neo3-visual-devtracker.express.walletCreate",
"when": "view == neo3-visual-devtracker.blockchainsExplorer && viewItem == express"
},
{
"command": "neo3-visual-devtracker.tracker.openTracker",
Expand All @@ -136,7 +136,7 @@
],
"view/title": [
{
"command": "neo3-visual-devtracker.nxp3.create",
"command": "neo3-visual-devtracker.express.create",
"when": "view == neo3-visual-devtracker.blockchainsExplorer"
}
]
Expand All @@ -160,16 +160,16 @@
}
},
"scripts": {
"bundle-nxp3": "npm run bundle-nxp3-download && npm run bundle-nxp3-extract",
"bundle-nxp3-download": "mkdir -p nxp3 && nwget https://github.com/neo-project/neo-express/releases/download/1.2.20-insiders/Neo.Express3.1.2.20-insiders.nupkg -O nxp3/nxp3.nupkg",
"bundle-nxp3-extract": "cd nxp3 && extract-zip nxp3.nupkg && mv tools/netcoreapp* tools/netcoreapp",
"bundle-nxp": "npm run bundle-nxp-download && npm run bundle-nxp-extract",
"bundle-nxp-download": "mkdir -p nxp && nwget https://github.com/neo-project/neo-express/releases/download/1.2.20-insiders/Neo.Express3.1.2.20-insiders.nupkg -O nxp/nxp.nupkg",
"bundle-nxp-extract": "cd nxp && extract-zip nxp.nupkg && mv tools/netcoreapp* tools/netcoreapp",
"compile": "npm run compile-ext && npm run compile-panel",
"compile-ext": "webpack --config src/extension/webpack.config.js --mode development",
"compile-panel": "webpack --config src/panel/webpack.config.js --mode development",
"compile-prod": "npm run compile-prod-ext && npm run compile-prod-panel",
"compile-prod-ext": "webpack --config src/extension/webpack.config.js --mode production",
"compile-prod-panel": "webpack --config src/panel/webpack.config.js --mode production",
"package": "npm run compile-prod && npm run bundle-nxp3 && vsce package",
"package": "npm run compile-prod && npm run bundle-nxp && vsce package",
"setversion": "gulp setversion",
"watch": "concurrently -r npm:watch-*",
"watch-ext": "webpack --config src/extension/webpack.config.js --mode development --watch --info-verbosity verbose",
Expand Down
File renamed without changes
24 changes: 12 additions & 12 deletions src/extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export async function activate(context: vscode.ExtensionContext) {

context.subscriptions.push(
vscode.commands.registerCommand(
"neo3-visual-devtracker.nxp3.create",
"neo3-visual-devtracker.express.create",
async () => {
await NeoExpressCommands.create(context, neoExpress);
}
Expand All @@ -80,16 +80,16 @@ export async function activate(context: vscode.ExtensionContext) {

context.subscriptions.push(
vscode.window.registerCustomEditorProvider(
"neo3-visual-devtracker.nxp3.neo-invoke-json",
"neo3-visual-devtracker.express.neo-invoke-json",
neoInvokeFileEditor
)
);

registerBlockchainInstanceCommand(
context,
"nxp3",
"express",
blockchainsExplorer,
"neo3-visual-devtracker.nxp3.contractDeploy",
"neo3-visual-devtracker.express.contractDeploy",
(identifier) =>
NeoExpressCommands.contractDeploy(
neoExpress,
Expand All @@ -100,33 +100,33 @@ export async function activate(context: vscode.ExtensionContext) {

registerBlockchainInstanceCommand(
context,
"nxp3",
"express",
blockchainsExplorer,
"neo3-visual-devtracker.nxp3.reset",
"neo3-visual-devtracker.express.reset",
(identifier) => NeoExpressCommands.reset(neoExpress, identifier)
);

registerBlockchainInstanceCommand(
context,
"nxp3",
"express",
blockchainsExplorer,
"neo3-visual-devtracker.nxp3.run",
"neo3-visual-devtracker.express.run",
(identifier) => NeoExpressCommands.run(context, neoExpress, identifier)
);

registerBlockchainInstanceCommand(
context,
"nxp3",
"express",
blockchainsExplorer,
"neo3-visual-devtracker.nxp3.transfer",
"neo3-visual-devtracker.express.transfer",
(identifier) => NeoExpressCommands.transfer(neoExpress, identifier)
);

registerBlockchainInstanceCommand(
context,
"nxp3",
"express",
blockchainsExplorer,
"neo3-visual-devtracker.nxp3.walletCreate",
"neo3-visual-devtracker.express.walletCreate",
(identifier) => NeoExpressCommands.walletCreate(neoExpress, identifier)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/extension/neoExpress/neoExpress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class NeoExpress {
constructor(private readonly context: vscode.ExtensionContext) {
this.binaryPath = path.join(
this.context.extensionPath,
"nxp3",
"nxp",
"tools",
"netcoreapp",
"any",
Expand Down
10 changes: 5 additions & 5 deletions src/extension/neoExpress/neoExpressCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class NeoExpressCommands {
identifer: BlockchainIdentifier,
contractDetector: ContractDetector
) {
if (identifer.blockchainType !== "nxp3") {
if (identifer.blockchainType !== "express") {
return;
}
if (!contractDetector.contracts.length) {
Expand Down Expand Up @@ -80,7 +80,7 @@ export default class NeoExpressCommands {
}

static async reset(neoExpress: NeoExpress, identifer: BlockchainIdentifier) {
if (identifer.blockchainType !== "nxp3") {
if (identifer.blockchainType !== "express") {
return;
}
const confirmed = await IoHelpers.yesNo(
Expand All @@ -103,7 +103,7 @@ export default class NeoExpressCommands {
neoExpress: NeoExpress,
identifer: BlockchainIdentifier
) {
if (identifer.blockchainType !== "nxp3") {
if (identifer.blockchainType !== "express") {
return;
}
const children = identifer.getChildren();
Expand Down Expand Up @@ -136,7 +136,7 @@ export default class NeoExpressCommands {
neoExpress: NeoExpress,
identifer: BlockchainIdentifier
) {
if (identifer.blockchainType !== "nxp3") {
if (identifer.blockchainType !== "express") {
return;
}
const asset = await IoHelpers.multipleChoice(
Expand Down Expand Up @@ -182,7 +182,7 @@ export default class NeoExpressCommands {
neoExpress: NeoExpress,
identifer: BlockchainIdentifier
) {
if (identifer.blockchainType !== "nxp3") {
if (identifer.blockchainType !== "express") {
return;
}
const walletName = await IoHelpers.enterString("Wallet name");
Expand Down
4 changes: 2 additions & 2 deletions src/extension/neoExpress/neoExpressIo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class NeoExpressIo {
identifer: BlockchainIdentifier,
hashOrNefPath: string
): Promise<ContractManifestJson | null> {
if (identifer.blockchainType !== "nxp3") {
if (identifer.blockchainType !== "express") {
return null;
}
const output = neoExpress.runSync(
Expand All @@ -35,7 +35,7 @@ export default class NeoExpressIo {
neoExpress: NeoExpress,
identifer: BlockchainIdentifier
): Promise<ContractManifestJson[]> {
if (identifer.blockchainType !== "nxp3") {
if (identifer.blockchainType !== "express") {
return [];
}
const output = neoExpress.runSync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default class InvokeFilePanelController extends PanelControllerBase<
const nefHints: { [hash: string]: { [nefPath: string]: boolean } } = {};
let addressSuggestions: string[] = [];
let connectionState: "none" | "ok" | "connecting" = "none";
if (this.blockchainIdentifier?.blockchainType === "nxp3") {
if (this.blockchainIdentifier?.blockchainType === "express") {
try {
addressSuggestions = this.blockchainIdentifier.walletAddresses;
const deployedContracts = await NeoExpressIo.contractList(
Expand Down
2 changes: 1 addition & 1 deletion src/extension/views/blockchainIdentifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class BlockchainIdentifier {
}
return new BlockchainIdentifier(
extensionPath,
"nxp3",
"express",
"parent",
path.basename(configPath),
nodePorts.map((_: number) => `http://127.0.0.1:${_}`),
Expand Down
2 changes: 1 addition & 1 deletion src/extension/views/blockchainType.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
type BlockchainType = "nxp3" | "private" | "public";
type BlockchainType = "express" | "private" | "public";

export default BlockchainType;

0 comments on commit 96ab451

Please sign in to comment.