Skip to content

Commit

Permalink
upgrade to nxp3 2.0.8-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
djnicholson committed Feb 9, 2021
1 parent b1906f3 commit 16a512c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
},
"scripts": {
"bundle-nxp": "npm run bundle-nxp-download && npm run bundle-nxp-extract",
"bundle-nxp-download": "mkdirp deps/nxp && cleandir deps/nxp && nwget \"https://github.com/neo-project/neo-express/releases/download/1.2.85-insiders/Neo.Express3.1.2.85-insiders.nupkg\" -O deps/nxp/nxp.nupkg",
"bundle-nxp-download": "mkdirp deps/nxp && cleandir deps/nxp && nwget \"https://github.com/neo-project/neo-express/releases/download/2.0.9-preview/Neo.Express.2.0.9-preview.nupkg\" -O deps/nxp/nxp.nupkg",
"bundle-nxp-extract": "cd deps/nxp && extract-zip nxp.nupkg",
"compile": "npm run compile-ext && npm run compile-panel",
"compile-ext": "webpack --config src/extension/webpack.config.js --mode development",
Expand Down
12 changes: 6 additions & 6 deletions src/extension/commands/neoExpressCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,11 @@ export default class NeoExpressCommands {
try {
await fs.promises.mkdir(checkpointsFolder);
} catch {}
let filename = posixPath(checkpointsFolder, "checkpoint-1.nxp3-checkpoint");
let filename = posixPath(checkpointsFolder, "checkpoint-1");
let i = 1;
while (fs.existsSync(filename)) {
while (fs.existsSync(`${filename}.neoxp-checkpoint`)) {
i++;
filename = posixPath(
checkpointsFolder,
`checkpoint-${i}.nxp3-checkpoint`
);
filename = posixPath(checkpointsFolder, `checkpoint-${i}`);
}
const output = await neoExpress.run(
"checkpoint",
Expand Down Expand Up @@ -241,6 +238,9 @@ export default class NeoExpressCommands {
"Select a checkpoint to restore",
...checkpointDetector.checkpointFiles
);
if (!filename) {
return;
}
const confirmed = await IoHelpers.yesNo(
`Are you sure that you want to restore "${identifier.configPath}" to the checkpoint "${filename}"?`
);
Expand Down
2 changes: 1 addition & 1 deletion src/extension/fileDetectors/checkpointDetector.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import DetectorBase from "./detectorBase";

const SEARCH_PATTERN = "**/*.nxp3-checkpoint";
const SEARCH_PATTERN = "**/*.neoxp-checkpoint";

export default class CheckpointDetector extends DetectorBase {
get checkpointFiles() {
Expand Down
10 changes: 5 additions & 5 deletions src/extension/neoExpress/neoExpress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export default class NeoExpress {
"deps",
"nxp",
"tools",
"netcoreapp3.1",
"net5.0",
"any",
"nxp3.dll"
"neoxp.dll"
);
this.dotnetPath = which.sync("dotnet", { nothrow: true }) || "dotnet";
this.runLock = false;
Expand Down Expand Up @@ -66,7 +66,7 @@ export default class NeoExpress {
if (duration > 1000) {
Log.log(
LOG_PREFIX,
`\`nxp3 ${command} ${options.join(" ")}\` took ${duration}ms`
`\`neoexp ${command} ${options.join(" ")}\` took ${duration}ms`
);
}
return result;
Expand Down Expand Up @@ -122,14 +122,14 @@ export default class NeoExpress {
ok =
parseInt(
childProcess.execFileSync(this.dotnetPath, ["--version"]).toString()
) >= 3;
) >= 5;
} catch (e) {
Log.error(LOG_PREFIX, "checkForDotNet error:", e.message);
ok = false;
}
if (!ok) {
const response = await vscode.window.showErrorMessage(
".NET Core 3 or higher is required to use this functionality.",
".NET 5 or higher is required to use this functionality.",
"Dismiss",
"More info"
);
Expand Down

0 comments on commit 16a512c

Please sign in to comment.