@voiden/runner 2.1.0 → 2.1.1
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 +20 -0
- package/bundled-runners/package.json +3 -0
- package/bundled-runners/simple-assertions-runner.js +1 -0
- package/bundled-runners/versions.json +9 -0
- package/bundled-runners/voiden-advanced-auth-runner.js +1 -0
- package/bundled-runners/voiden-faker-runner.js +16 -0
- package/bundled-runners/voiden-graphql-runner.js +1 -0
- package/bundled-runners/voiden-rest-api-runner.js +1 -0
- package/bundled-runners/voiden-scripting-runner.js +397 -0
- package/bundled-runners/voiden-sockets-grpcs-runner.js +1 -0
- package/dist/index.js +130 -10
- package/dist/index.js.map +1 -1
- package/dist/plugins/community.d.ts.map +1 -1
- package/dist/plugins/community.js +9 -2
- package/dist/plugins/community.js.map +1 -1
- package/dist/plugins/loader.d.ts +1 -0
- package/dist/plugins/loader.d.ts.map +1 -1
- package/dist/plugins/loader.js +32 -18
- package/dist/plugins/loader.js.map +1 -1
- package/dist/plugins/registry.d.ts +4 -0
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +52 -10
- package/dist/plugins/registry.js.map +1 -1
- package/dist/plugins/registryCache.d.ts +2 -0
- package/dist/plugins/registryCache.d.ts.map +1 -1
- package/dist/plugins/registryCache.js.map +1 -1
- package/dist/plugins/updateCheck.d.ts +9 -4
- package/dist/plugins/updateCheck.d.ts.map +1 -1
- package/dist/plugins/updateCheck.js +29 -15
- package/dist/plugins/updateCheck.js.map +1 -1
- package/package.json +4 -2
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Plugin update detection — compares each
|
|
3
|
-
* version
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Plugin update detection — compares each plugin's currently-active runner
|
|
3
|
+
* version against the latest version published in the shared plugin-registry
|
|
4
|
+
* (registryCache.ts). Used by `plugin update` and the post-command update
|
|
5
|
+
* notice in index.ts.
|
|
6
|
+
*
|
|
7
|
+
* Core plugins are checked even if never explicitly `plugin install`ed —
|
|
8
|
+
* they're enabled by default and may only exist as the version bundled
|
|
9
|
+
* inside the @voiden/runner package (see registry.ts:getCoreRunnerVersion),
|
|
10
|
+
* so users still get notified when a newer release is available.
|
|
6
11
|
*/
|
|
7
12
|
import { getAllInstalledPlugins } from './store.js';
|
|
8
13
|
import { getRegistry } from './registryCache.js';
|
|
14
|
+
import { getCorePlugins, getCoreRunnerVersion } from './registry.js';
|
|
15
|
+
import { isCorePluginEnabled } from './loader.js';
|
|
9
16
|
/** Compares dotted version strings numerically, segment by segment. */
|
|
10
17
|
function isNewer(latest, installed) {
|
|
11
18
|
const a = latest.split('.').map((n) => parseInt(n, 10) || 0);
|
|
@@ -20,25 +27,32 @@ function isNewer(latest, installed) {
|
|
|
20
27
|
return false;
|
|
21
28
|
}
|
|
22
29
|
export async function checkForPluginUpdates() {
|
|
23
|
-
const installed = getAllInstalledPlugins();
|
|
24
|
-
if (installed.length === 0)
|
|
25
|
-
return [];
|
|
26
30
|
const registry = await getRegistry();
|
|
27
31
|
const byId = new Map(registry.map((e) => [e.id, e]));
|
|
28
32
|
const updates = [];
|
|
29
|
-
|
|
33
|
+
// Core plugins: compare whatever version is actually present locally
|
|
34
|
+
// (bundled copy, or a cached download from a previous `plugin install`/
|
|
35
|
+
// `update`) against the registry's latest — regardless of explicit install.
|
|
36
|
+
const corePlugins = await getCorePlugins();
|
|
37
|
+
for (const def of corePlugins) {
|
|
38
|
+
if (!isCorePluginEnabled(def.name))
|
|
39
|
+
continue;
|
|
40
|
+
const current = getCoreRunnerVersion(def.name);
|
|
41
|
+
if (!current)
|
|
42
|
+
continue;
|
|
43
|
+
if (isNewer(def.version, current)) {
|
|
44
|
+
updates.push({ id: def.name, type: 'core', installedVersion: current, latestVersion: def.version });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Community plugins: only ones explicitly installed have a version to compare.
|
|
48
|
+
for (const plugin of getAllInstalledPlugins()) {
|
|
30
49
|
if (!plugin.version)
|
|
31
50
|
continue;
|
|
32
51
|
const entry = byId.get(plugin.name);
|
|
33
|
-
if (!entry)
|
|
52
|
+
if (!entry || entry.type !== 'community')
|
|
34
53
|
continue;
|
|
35
54
|
if (isNewer(entry.version, plugin.version)) {
|
|
36
|
-
updates.push({
|
|
37
|
-
id: plugin.name,
|
|
38
|
-
type: entry.type,
|
|
39
|
-
installedVersion: plugin.version,
|
|
40
|
-
latestVersion: entry.version,
|
|
41
|
-
});
|
|
55
|
+
updates.push({ id: plugin.name, type: 'community', installedVersion: plugin.version, latestVersion: entry.version });
|
|
42
56
|
}
|
|
43
57
|
}
|
|
44
58
|
return updates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateCheck.js","sourceRoot":"","sources":["../../src/plugins/updateCheck.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"updateCheck.js","sourceRoot":"","sources":["../../src/plugins/updateCheck.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AASjD,uEAAuE;AACvE,SAAS,OAAO,CAAC,MAAc,EAAE,SAAiB;IAChD,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IAC5D,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,E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AI,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;QACrG,CAAC;IACH,CAAC;IAED,+EAA+E;IAC/E,KAAK,MAAM,MAAM,IAAI,sBAAsB,EAAE,EAAE,CAAC;QAC9C,IAAI,CAAC,MAAM,CAAC,OAAO;YAAE,SAAQ;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACnC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW;YAAE,SAAQ;QAClD,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3C,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;QACtH,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiden/runner",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "CLI runner for .void files — execute REST, WebSocket, and gRPC requests headlessly",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"voiden-runner": "./dist/index.js"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
|
-
"dist/**"
|
|
22
|
+
"dist/**",
|
|
23
|
+
"bundled-runners/**",
|
|
24
|
+
"CHANGELOG.md"
|
|
23
25
|
],
|
|
24
26
|
"scripts": {
|
|
25
27
|
"prebuild": "cd ../../packages/executors && tsc",
|