@deveco-test/deveco-code 0.0.0-test-harness.1 → 0.0.0-test-harness.2

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/postinstall.mjs +5 -14
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "scripts": {
7
7
  "postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
8
8
  },
9
- "version": "0.0.0-test-harness.1",
9
+ "version": "0.0.0-test-harness.2",
10
10
  "license": "MIT",
11
11
  "files": [
12
12
  "bin/**/*",
@@ -16,10 +16,10 @@
16
16
  "CHANGELOG.md"
17
17
  ],
18
18
  "optionalDependencies": {
19
- "@deveco-test/deveco-code-windows-x64": "0.0.0-test-harness.1"
19
+ "@deveco-test/deveco-code-windows-x64": "0.0.0-test-harness.2"
20
20
  },
21
21
  "dependencies": {
22
- "@deveco-test/deveco-harness": "0.2.0-test.0",
22
+ "@deveco-test/deveco-harness": "0.2.0-test.1",
23
23
  "homegraph": "latest"
24
24
  }
25
25
  }
package/postinstall.mjs CHANGED
@@ -49,21 +49,12 @@ function resolveVendoredCliEntryInsideHarness(harnessRoot) {
49
49
  }
50
50
 
51
51
  function resolveLocalDevecoCliEntry() {
52
- let harnessRoot
53
- try {
54
- const harnessPackageJsonPath = require.resolve(`${devecoHarnessPackageName}/package.json`)
55
- harnessRoot = path.dirname(harnessPackageJsonPath)
56
- const entry = resolveVendoredCliEntryInsideHarness(harnessRoot)
57
- if (entry) return entry
58
- } catch {
59
- // The harness dependency is not resolvable from here; try the vendor copy.
60
- }
61
- // Platform packages copy vendor/deveco-harness next to the binary before
62
- // the harness dependency is resolvable; fall back to that layout.
63
- const bundled = resolveVendoredCliEntryInsideHarness(path.join(__dirname, "vendor", "deveco-harness"))
64
- if (bundled) return bundled
52
+ const harnessPackageJsonPath = require.resolve(`${devecoHarnessPackageName}/package.json`)
53
+ const harnessRoot = path.dirname(harnessPackageJsonPath)
54
+ const entry = resolveVendoredCliEntryInsideHarness(harnessRoot)
55
+ if (entry) return entry
65
56
  throw new Error(
66
- `Dependency "${devecoHarnessPackageName}" is not installed and no vendored deveco-cli entry was found.`,
57
+ `Failed to resolve the vendored deveco-cli entry inside "${devecoHarnessPackageName}".`,
67
58
  )
68
59
  }
69
60