pinokiod 8.0.11 → 8.0.12

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.
@@ -17,15 +17,15 @@ const initialize = () => {
17
17
  const koffi = require("koffi")
18
18
  const library = koffi.load("rstrtmgr.dll")
19
19
  const kernel32 = koffi.load("kernel32.dll")
20
- const fileTime = koffi.struct("PINOKIO_RM_FILETIME", {
20
+ const fileTime = koffi.struct({
21
21
  dwLowDateTime: "uint32_t",
22
22
  dwHighDateTime: "uint32_t",
23
23
  })
24
- const uniqueProcess = koffi.struct("PINOKIO_RM_UNIQUE_PROCESS", {
24
+ const uniqueProcess = koffi.struct({
25
25
  dwProcessId: "uint32_t",
26
26
  ProcessStartTime: fileTime,
27
27
  })
28
- const processInfo = koffi.struct("PINOKIO_RM_PROCESS_INFO", {
28
+ const processInfo = koffi.struct({
29
29
  Process: uniqueProcess,
30
30
  strAppName: koffi.array("char16_t", 256, "String"),
31
31
  strServiceShortName: koffi.array("char16_t", 64, "String"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "8.0.11",
3
+ "version": "8.0.12",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -110,7 +110,12 @@ const PinokioPathRemoval = (() => {
110
110
 
111
111
  const update = () => {
112
112
  const container = Swal.getHtmlContainer()
113
- if (container) container.innerHTML = render(current)
113
+ if (container) {
114
+ const filesOpen = !!container.querySelector(".pinokio-path-blocker-files")?.open
115
+ container.innerHTML = render(current)
116
+ const files = container.querySelector(".pinokio-path-blocker-files")
117
+ if (files) files.open = filesOpen
118
+ }
114
119
  }
115
120
 
116
121
  const attempt = async (manual = false) => {
@@ -221,6 +221,7 @@ test("path-removal request retries automatically without overlapping and resolve
221
221
  await waitFor(() => state.fireOptions, "path-removal modal")
222
222
  const intervalId = state.getRetryIntervalId()
223
223
  assert.equal(state.intervals.get(intervalId).delay, 2000)
224
+ state.htmlContainer.querySelector(".pinokio-path-blocker-files").open = true
224
225
 
225
226
  const firstAttempt = state.runInterval()
226
227
  assert.equal(state.buttonsDisabled, true)
@@ -241,6 +242,7 @@ test("path-removal request retries automatically without overlapping and resolve
241
242
  }))
242
243
  await firstAttempt
243
244
  assert.equal(state.buttonsDisabled, false)
245
+ assert.equal(state.htmlContainer.querySelector(".pinokio-path-blocker-files").open, true)
244
246
  assert.match(state.htmlContainer.textContent, /Second blocker/)
245
247
  assert.doesNotMatch(state.htmlContainer.textContent, /First blocker/)
246
248
 
@@ -68,6 +68,12 @@ test("Windows integration: loaded DLL is diagnosed and removable after release",
68
68
  )
69
69
  assert.equal(await fs.promises.access(ordinaryFile).then(() => true).catch(() => false), false)
70
70
 
71
+ const restartManagerPath = require.resolve("../kernel/windows_restart_manager")
72
+ delete require.cache[restartManagerPath]
73
+ const reloadedRestartManager = require(restartManagerPath)
74
+ const reloadedInspection = await reloadedRestartManager.inspectWindowsFileLocks([dllPath])
75
+ assert.equal(reloadedInspection.blockers.some((blocker) => blocker.pid === child.pid), true)
76
+
71
77
  const exited = new Promise((resolve) => child.once("exit", resolve))
72
78
  child.stdin.write("release\n")
73
79
  await exited