pinokiod 8.0.53 → 8.0.55
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/index.js +30 -0
- package/kernel/vault/automatic_scans.js +1384 -0
- package/kernel/vault/constants.js +5 -1
- package/kernel/vault/folder_finder.js +425 -0
- package/kernel/vault/hash_worker.js +4 -3
- package/kernel/vault/index.js +913 -223
- package/kernel/vault/operation_errors.js +41 -0
- package/kernel/vault/registry.js +37 -2
- package/kernel/vault/registry_core.js +2103 -83
- package/kernel/vault/scanner.js +158 -0
- package/kernel/vault/sweeper.js +176 -190
- package/package.json +1 -1
- package/server/index.js +87 -0
- package/server/public/layout.js +331 -2
- package/server/public/vault.css +878 -80
- package/server/public/vault.js +1538 -105
- package/server/views/app.ejs +23 -31
- package/server/views/layout.ejs +269 -1
- package/server/views/partials/main_sidebar.ejs +1 -1
- package/server/views/partials/vault_workspace.ejs +55 -9
- package/server/views/vault_app.ejs +1 -1
- package/test/vault-automatic-scan-ui.test.js +270 -0
- package/test/vault-automatic-scans.test.js +1833 -0
- package/test/vault-engine.test.js +1125 -43
- package/test/vault-sweep.test.js +245 -3
- package/test/vault-ui.test.js +1276 -36
package/kernel/index.js
CHANGED
|
@@ -148,6 +148,32 @@ class Kernel {
|
|
|
148
148
|
this.launchRequirements.hasRuntimeForLaunchPath(launchPath)
|
|
149
149
|
)
|
|
150
150
|
}
|
|
151
|
+
notifyVaultAppLifecycle(method, launchPath) {
|
|
152
|
+
const automaticScans = this.vault && this.vault.automaticScans
|
|
153
|
+
if (!automaticScans || typeof automaticScans[method] !== "function") {
|
|
154
|
+
return
|
|
155
|
+
}
|
|
156
|
+
try {
|
|
157
|
+
const pending = automaticScans[method](launchPath)
|
|
158
|
+
if (pending && typeof pending.catch === "function") {
|
|
159
|
+
pending.catch((error) => {
|
|
160
|
+
console.warn("[Vault Automatic Scan] " + JSON.stringify({
|
|
161
|
+
time: new Date().toISOString(),
|
|
162
|
+
event: "lifecycle-error",
|
|
163
|
+
method,
|
|
164
|
+
message: error && error.message ? error.message : String(error)
|
|
165
|
+
}))
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
} catch (error) {
|
|
169
|
+
console.warn("[Vault Automatic Scan] " + JSON.stringify({
|
|
170
|
+
time: new Date().toISOString(),
|
|
171
|
+
event: "lifecycle-error",
|
|
172
|
+
method,
|
|
173
|
+
message: error && error.message ? error.message : String(error)
|
|
174
|
+
}))
|
|
175
|
+
}
|
|
176
|
+
}
|
|
151
177
|
markAppLaunchStarted(launchPath) {
|
|
152
178
|
const status = this.readyState.markStarted(launchPath)
|
|
153
179
|
const appId = this.readyState.getAppIdForLaunchPath(launchPath)
|
|
@@ -157,6 +183,8 @@ class Kernel {
|
|
|
157
183
|
}
|
|
158
184
|
this.launchRequirements.markStarted(launchPath)
|
|
159
185
|
}
|
|
186
|
+
Kernel.prototype.notifyVaultAppLifecycle.call(
|
|
187
|
+
this, "handleStarted", launchPath)
|
|
160
188
|
return status
|
|
161
189
|
}
|
|
162
190
|
markAppLaunchProgress(launchPath, current, total) {
|
|
@@ -182,6 +210,8 @@ class Kernel {
|
|
|
182
210
|
}
|
|
183
211
|
markAppLaunchStopped(launchPath, options = {}) {
|
|
184
212
|
const status = this.readyState.markStopped(launchPath)
|
|
213
|
+
Kernel.prototype.notifyVaultAppLifecycle.call(
|
|
214
|
+
this, "handleStopped", launchPath)
|
|
185
215
|
if (options && options.internal_completion) {
|
|
186
216
|
return status
|
|
187
217
|
}
|