@goodandready/dsh-dsml-artifact-guard 0.2.12 → 0.2.13
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.
- package/CHANGELOG.md +6 -0
- package/lib/updater.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.2.13] - 2026-10-21
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Desktop Profile Auto-Detection**: in `lib/updater.js`, updated `runtime()` to detect profile from `process.cwd()` when `cordis.yml` or `cordis.patch.yml` exists, properly resolving the `desktop` profile in DSH Desktop without requiring `DSH_PROFILE_DIR` (#66).
|
|
14
|
+
- **DSH Desktop Origin Trust**: in `lib/updater.js`, updated `isTrustedUpdateRequest()` to accept loopback requests from Electron UI origin `dsh-app://app` (#66).
|
|
15
|
+
|
|
10
16
|
## [0.2.12] - 2026-10-15
|
|
11
17
|
|
|
12
18
|
### Fixed
|
package/lib/updater.js
CHANGED
|
@@ -32,6 +32,9 @@ export function isTrustedUpdateRequest(request) {
|
|
|
32
32
|
if (origin === undefined || host === undefined) return false;
|
|
33
33
|
try {
|
|
34
34
|
const url = new URL(origin);
|
|
35
|
+
if (url.protocol === 'dsh-app:' && url.hostname === 'app') {
|
|
36
|
+
return isLoopback(request.socket?.remoteAddress);
|
|
37
|
+
}
|
|
35
38
|
if (url.protocol !== 'http:' && url.protocol !== 'https:') return false;
|
|
36
39
|
if (url.host.toLowerCase() !== host.toLowerCase()) return false;
|
|
37
40
|
if (isLoopback(url.hostname)) {
|
|
@@ -83,8 +86,10 @@ function findDshCliEntry() {
|
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
export function runtime() {
|
|
89
|
+
const isCwdProfile = existsSync(resolve(process.cwd(), 'cordis.yml'))
|
|
90
|
+
|| existsSync(resolve(process.cwd(), 'cordis.patch.yml'));
|
|
86
91
|
const profileDir = resolve(process.env.DSH_PROFILE_DIR
|
|
87
|
-
?? resolve(homedir(), '.dsh', 'profiles', 'web'));
|
|
92
|
+
?? (isCwdProfile ? process.cwd() : resolve(homedir(), '.dsh', 'profiles', 'web')));
|
|
88
93
|
const selected = profileNameFromArgv(process.argv);
|
|
89
94
|
const profileName = validProfileName(selected)
|
|
90
95
|
? selected
|