textrun-workspace 0.0.11 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,9 +13,8 @@ async function existingDirectory(action) {
13
13
  const dirRelName = path.join(action.region[0].attributes["dir"] || ".", dirName);
14
14
  action.name(`directory ${color.cyan(dirRelName)} exists in the workspace`);
15
15
  const fullPath = action.configuration.workspace.joinStr(dirRelName);
16
- let stats;
17
16
  try {
18
- stats = await fs_1.promises.lstat(fullPath);
17
+ var stats = await fs_1.promises.lstat(fullPath);
19
18
  }
20
19
  catch (err) {
21
20
  throw new Error(`directory ${color.cyan(color.bold(dirRelName))} does not exist in the workspace`);
@@ -13,9 +13,8 @@ async function existingFile(action) {
13
13
  const fullPath = action.configuration.workspace.joinStr(fileRelPath);
14
14
  const expectedContent = action.region.textInNodeOfType("fence", "code");
15
15
  action.log(expectedContent);
16
- let actualContent = "";
17
16
  try {
18
- actualContent = await fs_1.promises.readFile(fullPath, "utf-8");
17
+ var actualContent = await fs_1.promises.readFile(fullPath, "utf-8");
19
18
  }
20
19
  catch (e) {
21
20
  if (e.code === "ENOENT") {
@@ -7,17 +7,15 @@ const path = require("path");
7
7
  const tr = require("text-runner-core");
8
8
  async function newFile(action) {
9
9
  var _a;
10
- let fileName;
11
10
  try {
12
- fileName = action.region.textInNodeOfType("em", "strong");
11
+ var fileName = action.region.textInNodeOfType("em", "strong");
13
12
  }
14
13
  catch (e) {
15
14
  const guidance = `Cannot determine the name of the file to create.\n${e.guidance}`;
16
15
  throw new tr.UserError(e.message, guidance);
17
16
  }
18
- let content;
19
17
  try {
20
- content = action.region.textInNodeOfType("fence", "code");
18
+ var content = action.region.textInNodeOfType("fence", "code");
21
19
  }
22
20
  catch (e) {
23
21
  const guidance = `Cannot determine the content of the file to create.\n${e.guidance}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "textrun-workspace",
3
- "version": "0.0.11",
3
+ "version": "0.1.1",
4
4
  "description": "Text-Runner actions for the Text-Runner workspace",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -8,17 +8,17 @@
8
8
  ],
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
- "assert-no-diff": "3.0.4",
12
- "fs-extra": "9.0.1",
13
- "text-runner-core": "5.0.0-pre10"
11
+ "assert-no-diff": "3.0.6",
12
+ "fs-extra": "10.0.0",
13
+ "text-runner-core": "5.0.1"
14
14
  },
15
15
  "devDependencies": {
16
- "colorette": "1.2.1",
16
+ "colorette": "1.2.2",
17
17
  "cucumber": "6.0.5",
18
- "mocha": "8.0.1",
19
- "text-runner": "5.0.0-pre10",
20
- "textrun-action": "0.0.11",
21
- "textrun-extension": "0.0.11"
18
+ "mocha": "9.2.0",
19
+ "text-runner": "5.0.1",
20
+ "textrun-action": "0.1.1",
21
+ "textrun-extension": "0.1.1"
22
22
  },
23
- "gitHead": "0daa6e0620e60b423f4cde725936d61468b61a52"
23
+ "gitHead": "1380706cc871cb3a5adfeba9e996694c6d8bf892"
24
24
  }