pinokiod 8.0.9 → 8.0.11
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/kernel/bin/conda.js
CHANGED
package/kernel/path_removal.js
CHANGED
|
@@ -89,24 +89,41 @@ const createPathRemover = (dependencies = {}) => {
|
|
|
89
89
|
operation = "Removing files",
|
|
90
90
|
...rmOptions
|
|
91
91
|
} = options
|
|
92
|
+
const trace = (stage, details = "") => {
|
|
93
|
+
if (platform === "win32") {
|
|
94
|
+
console.log(`[path removal] ${stage} target=${resolvedTarget}${details ? ` ${details}` : ""}`)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
92
97
|
|
|
98
|
+
const removeStartedAt = Date.now()
|
|
99
|
+
trace("rm:start")
|
|
93
100
|
try {
|
|
94
101
|
await fsPromises.rm(resolvedTarget, rmOptions)
|
|
102
|
+
trace("rm:done", `elapsedMs=${Date.now() - removeStartedAt}`)
|
|
95
103
|
return { removed: true, target: resolvedTarget }
|
|
96
104
|
} catch (error) {
|
|
97
105
|
if (platform !== "win32") {
|
|
98
106
|
throw error
|
|
99
107
|
}
|
|
108
|
+
trace("rm:failed", `elapsedMs=${Date.now() - removeStartedAt} code=${error && error.code ? error.code : "unknown"}`)
|
|
100
109
|
|
|
110
|
+
const scanStartedAt = Date.now()
|
|
111
|
+
trace("scan:start")
|
|
101
112
|
const remaining = await collectRemaining(resolvedTarget, fsPromises)
|
|
113
|
+
trace("scan:done", `elapsedMs=${Date.now() - scanStartedAt} paths=${remaining.paths.length} files=${remaining.files.length}`)
|
|
102
114
|
if (remaining.paths.length === 0) {
|
|
103
115
|
throw error
|
|
104
116
|
}
|
|
105
117
|
|
|
106
118
|
let inspection = { blockers: [] }
|
|
119
|
+
const inspectionStartedAt = Date.now()
|
|
120
|
+
trace("restart-manager:start", `files=${remaining.files.length}`)
|
|
107
121
|
try {
|
|
108
122
|
inspection = await inspectLocks(remaining.files)
|
|
123
|
+
const blockerCount = Array.isArray(inspection && inspection.blockers) ? inspection.blockers.length : 0
|
|
124
|
+
trace("restart-manager:done", `elapsedMs=${Date.now() - inspectionStartedAt} blockers=${blockerCount}`)
|
|
109
125
|
} catch (inspectionError) {
|
|
126
|
+
trace("restart-manager:failed", `elapsedMs=${Date.now() - inspectionStartedAt} message=${inspectionError && inspectionError.message ? inspectionError.message : String(inspectionError)}`)
|
|
110
127
|
console.warn("[path removal] Restart Manager inspection failed", inspectionError)
|
|
111
128
|
}
|
|
112
129
|
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -16270,8 +16270,6 @@ class Server {
|
|
|
16270
16270
|
await removePath(runtimePath, {
|
|
16271
16271
|
recursive: true,
|
|
16272
16272
|
force: true,
|
|
16273
|
-
maxRetries: 5,
|
|
16274
|
-
retryDelay: 250,
|
|
16275
16273
|
operation: "Updating Miniforge",
|
|
16276
16274
|
})
|
|
16277
16275
|
}
|
|
@@ -16281,8 +16279,6 @@ class Server {
|
|
|
16281
16279
|
await removePath(folderPath, {
|
|
16282
16280
|
recursive: true,
|
|
16283
16281
|
force: true,
|
|
16284
|
-
maxRetries: 5,
|
|
16285
|
-
retryDelay: 250,
|
|
16286
16282
|
operation: "Resetting managed tools",
|
|
16287
16283
|
})
|
|
16288
16284
|
await fs.promises.mkdir(folderPath, { recursive: true }).catch((e) => { })
|
|
@@ -16292,8 +16288,6 @@ class Server {
|
|
|
16292
16288
|
await removePath(folderPath, {
|
|
16293
16289
|
recursive: true,
|
|
16294
16290
|
force: true,
|
|
16295
|
-
maxRetries: 5,
|
|
16296
|
-
retryDelay: 250,
|
|
16297
16291
|
operation: "Clearing the Pinokio cache",
|
|
16298
16292
|
})
|
|
16299
16293
|
await fs.promises.mkdir(folderPath, { recursive: true }).catch((e) => { })
|
|
@@ -16316,8 +16310,6 @@ class Server {
|
|
|
16316
16310
|
await removePath(folderPath, {
|
|
16317
16311
|
recursive: true,
|
|
16318
16312
|
force: true,
|
|
16319
|
-
maxRetries: 5,
|
|
16320
|
-
retryDelay: 250,
|
|
16321
16313
|
operation: `Deleting ${req.body.name}`,
|
|
16322
16314
|
})
|
|
16323
16315
|
// await fs.promises.mkdir(folderPath, { recursive: true }).catch((e) => { })
|