@dsh-workbench/adapter-probe 1.0.1 → 1.1.0
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/dist/probe-units.js +3 -1
- package/dist/self-update.js +1 -18
- package/package.json +5 -5
package/dist/probe-units.js
CHANGED
|
@@ -93,7 +93,9 @@ export async function probeUnits(options) {
|
|
|
93
93
|
}
|
|
94
94
|
async function loadCapabilities(options) {
|
|
95
95
|
const { shell, runtimeCommands, units, force } = options;
|
|
96
|
-
const index = buildSupplyIndex(units.map((unit) => ({ id: unit.unit, needs: unit.needs }))
|
|
96
|
+
const index = buildSupplyIndex(units.map((unit) => ({ id: unit.unit, needs: unit.needs })), {
|
|
97
|
+
env: process.env,
|
|
98
|
+
});
|
|
97
99
|
const binNames = [
|
|
98
100
|
...new Set(units.flatMap((unit) => unit.needs.filter((need) => need.kind === 'bin').map((need) => need.name.trim()).filter((name) => name !== ''))),
|
|
99
101
|
];
|
package/dist/self-update.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import writeFileAtomic from 'write-file-atomic';
|
|
2
2
|
import { quoteShellArg } from '@dsh-workbench/shared/host';
|
|
3
3
|
import { hostSurface } from './platform.js';
|
|
4
|
-
import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync,
|
|
4
|
+
import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, statSync, } from 'node:fs';
|
|
5
5
|
import { dirname, join } from 'node:path';
|
|
6
6
|
import { runDetached } from './runtime-seed.js';
|
|
7
7
|
import { SELF_UPDATE_STATES, } from '@dsh-workbench/shared/contract/protocol/bundle-install';
|
|
@@ -241,19 +241,6 @@ function readTail(file) {
|
|
|
241
241
|
return undefined;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
function hasEntries(dir) {
|
|
245
|
-
try {
|
|
246
|
-
return readdirSync(dir).some((name) => name !== '.DS_Store');
|
|
247
|
-
}
|
|
248
|
-
catch {
|
|
249
|
-
return false;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
function legacyDataIn(dir) {
|
|
253
|
-
return (existsSync(join(dir, 'storages', 'workspace.json')) ||
|
|
254
|
-
hasEntries(join(dir, 'sessions')) ||
|
|
255
|
-
hasEntries(join(dir, 'attachments')));
|
|
256
|
-
}
|
|
257
244
|
export function readSelfUpdateView(home, profile) {
|
|
258
245
|
const paths = selfUpdatePaths(home);
|
|
259
246
|
let raw;
|
|
@@ -277,9 +264,6 @@ export function readSelfUpdateView(home, profile) {
|
|
|
277
264
|
const version = asText(record.version);
|
|
278
265
|
const at = asText(record.at);
|
|
279
266
|
const tail = readTail(paths.log);
|
|
280
|
-
const migration = state === 'ok' && legacyDataIn(paths.dir) && !existsSync(join(paths.dir, '.data-root-shared'))
|
|
281
|
-
? 'needed'
|
|
282
|
-
: undefined;
|
|
283
267
|
return {
|
|
284
268
|
state: state,
|
|
285
269
|
...(owner === undefined ? {} : { profile: owner }),
|
|
@@ -288,7 +272,6 @@ export function readSelfUpdateView(home, profile) {
|
|
|
288
272
|
...(version === undefined ? {} : { version }),
|
|
289
273
|
...(at === undefined ? {} : { at }),
|
|
290
274
|
...(tail === undefined ? {} : { tail }),
|
|
291
|
-
...(migration === undefined ? {} : { migration }),
|
|
292
275
|
};
|
|
293
276
|
}
|
|
294
277
|
export { runningVersionOf } from '@dsh-workbench/shared/host';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-workbench/adapter-probe",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Workbench adapter-probe adapter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"execa": "^10.2.0",
|
|
17
17
|
"proper-lockfile": "^4.1.2",
|
|
18
18
|
"write-file-atomic": "^8.0.0",
|
|
19
|
-
"@dsh-workbench/adapter-profile": "1.0
|
|
20
|
-
"@dsh-workbench/adapter-runtime": "1.0
|
|
21
|
-
"@dsh-workbench/
|
|
22
|
-
"@dsh-workbench/
|
|
19
|
+
"@dsh-workbench/adapter-profile": "1.1.0",
|
|
20
|
+
"@dsh-workbench/adapter-runtime": "1.1.0",
|
|
21
|
+
"@dsh-workbench/adapter-supply": "1.1.0",
|
|
22
|
+
"@dsh-workbench/shared": "1.1.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^24.19.0",
|