@hachej/boring-ui-plugin-cli 0.1.39 → 0.1.41
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/bin.js +2 -2
- package/dist/{chunk-PYNOFBR6.js → chunk-4ZXW5O2M.js} +8 -2
- package/dist/{chunk-3WN35EV3.js → chunk-KTILPA2U.js} +9 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -3
- package/dist/plugin-sources.d.ts +20 -1
- package/dist/plugin-sources.js +5 -3
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
listPluginSources,
|
|
6
6
|
removePluginSource,
|
|
7
7
|
validateBoringPluginManifest
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KTILPA2U.js";
|
|
9
9
|
|
|
10
10
|
// src/server/index.ts
|
|
11
11
|
import { join as join4, resolve as resolve4 } from "path";
|
|
@@ -679,6 +679,11 @@ function collectRuntimeDiagnostics(pluginId, body) {
|
|
|
679
679
|
if (!plugin) return { events };
|
|
680
680
|
if (typeof plugin.serverLoadedRevision === "number") revision = plugin.serverLoadedRevision;
|
|
681
681
|
if (typeof plugin.serverError === "string") events.push(event("PLUGIN_SERVER_ERROR", plugin.serverError));
|
|
682
|
+
if (isObject2(plugin.frontError)) {
|
|
683
|
+
if (typeof plugin.frontError.revision === "number") revision = plugin.frontError.revision;
|
|
684
|
+
const message = typeof plugin.frontError.message === "string" ? plugin.frontError.message : "front module failed to load";
|
|
685
|
+
events.push(event("PLUGIN_FRONT_ERROR", message));
|
|
686
|
+
}
|
|
682
687
|
if (isObject2(plugin.host)) {
|
|
683
688
|
if (typeof plugin.host.revision === "number") revision = plugin.host.revision;
|
|
684
689
|
const code = typeof plugin.host.lastErrorCode === "string" ? plugin.host.lastErrorCode : "PLUGIN_RUNTIME_HOST_ERROR";
|
|
@@ -896,7 +901,8 @@ function handleScaffold(positionals) {
|
|
|
896
901
|
console.log(" 3. bash `boring-ui-plugin verify` \u2014 confirms manifests + files are valid");
|
|
897
902
|
console.log(" 4. if the UI is open, bash `boring-ui-plugin test <name>` \u2014 catches panel render failures");
|
|
898
903
|
console.log(" 5. ask the user: /reload");
|
|
899
|
-
console.log(" 6. after /reload, call the plugin_diagnostics tool
|
|
904
|
+
console.log(" 6. after /reload, ALWAYS call the plugin_diagnostics tool AND re-run `boring-ui-plugin test <name>` \u2014 front import failures only show up there (source plugin-front / PLUGIN_FRONT_ERROR), not in the /reload banner");
|
|
905
|
+
console.log(" 7. iterate (fix -> /reload -> plugin_diagnostics + test) until both are clean before reporting success");
|
|
900
906
|
}
|
|
901
907
|
function handleVerify(positionals) {
|
|
902
908
|
const result = verifyPlugin(parseVerifyArgs(positionals));
|
|
@@ -503,6 +503,14 @@ function readPluginSourceRecordsForRoots(opts) {
|
|
|
503
503
|
const global = resolvePluginSourceScopePaths("global", opts);
|
|
504
504
|
return [...readPluginSourceRecords(global), ...readPluginSourceRecords(local)];
|
|
505
505
|
}
|
|
506
|
+
function resolveRegisteredPluginSourceDirs(paths) {
|
|
507
|
+
return packageEntries(readPiSettings(paths.settingsPath)).flatMap((entry) => {
|
|
508
|
+
const source = packageEntrySource(entry);
|
|
509
|
+
if (!source) return [];
|
|
510
|
+
const rootDir = resolvePackageSourcePath(paths.baseDir, source);
|
|
511
|
+
return rootDir ? [{ source, rootDir }] : [];
|
|
512
|
+
});
|
|
513
|
+
}
|
|
506
514
|
function upsertPackageSource(paths, record) {
|
|
507
515
|
const settings = readPiSettings(paths.settingsPath);
|
|
508
516
|
const entries = packageEntries(settings);
|
|
@@ -621,6 +629,7 @@ export {
|
|
|
621
629
|
resolvePluginSourceScopePaths,
|
|
622
630
|
readPluginSourceRecords,
|
|
623
631
|
readPluginSourceRecordsForRoots,
|
|
632
|
+
resolveRegisteredPluginSourceDirs,
|
|
624
633
|
installPluginSource,
|
|
625
634
|
listPluginSources,
|
|
626
635
|
removePluginSource,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { InstallPluginSourceOptions, ListPluginSourcesOptions, PluginInstallResult, PluginInstallScope, PluginListResult, PluginRemoveResult, PluginSourceKind, PluginSourceRecord, PluginSourceScopePaths, RemovePluginSourceOptions, formatPluginSourceList, installPluginSource, listPluginSources, readPluginSourceRecords, readPluginSourceRecordsForRoots, removePluginSource, resolvePluginSourceScopePaths } from './plugin-sources.js';
|
|
1
|
+
export { InstallPluginSourceOptions, ListPluginSourcesOptions, PluginInstallResult, PluginInstallScope, PluginListResult, PluginRemoveResult, PluginSourceKind, PluginSourceRecord, PluginSourceScopePaths, RegisteredPluginSourceDir, RemovePluginSourceOptions, formatPluginSourceList, installPluginSource, listPluginSources, readPluginSourceRecords, readPluginSourceRecordsForRoots, removePluginSource, resolvePluginSourceScopePaths, resolveRegisteredPluginSourceDirs } from './plugin-sources.js';
|
|
2
2
|
|
|
3
3
|
interface CreatePluginOptions {
|
|
4
4
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
runPluginSelfTest,
|
|
9
9
|
scaffoldPlugin,
|
|
10
10
|
verifyPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4ZXW5O2M.js";
|
|
12
12
|
import {
|
|
13
13
|
formatPluginSourceList,
|
|
14
14
|
installPluginSource,
|
|
@@ -16,8 +16,9 @@ import {
|
|
|
16
16
|
readPluginSourceRecords,
|
|
17
17
|
readPluginSourceRecordsForRoots,
|
|
18
18
|
removePluginSource,
|
|
19
|
-
resolvePluginSourceScopePaths
|
|
20
|
-
|
|
19
|
+
resolvePluginSourceScopePaths,
|
|
20
|
+
resolveRegisteredPluginSourceDirs
|
|
21
|
+
} from "./chunk-KTILPA2U.js";
|
|
21
22
|
export {
|
|
22
23
|
createPlugin,
|
|
23
24
|
findHintForError,
|
|
@@ -31,6 +32,7 @@ export {
|
|
|
31
32
|
readPluginSourceRecordsForRoots,
|
|
32
33
|
removePluginSource,
|
|
33
34
|
resolvePluginSourceScopePaths,
|
|
35
|
+
resolveRegisteredPluginSourceDirs,
|
|
34
36
|
runBoringUiPluginCli,
|
|
35
37
|
runPluginSelfTest,
|
|
36
38
|
scaffoldPlugin,
|
package/dist/plugin-sources.d.ts
CHANGED
|
@@ -63,9 +63,28 @@ declare function readPluginSourceRecordsForRoots(opts: {
|
|
|
63
63
|
workspaceRoot: string;
|
|
64
64
|
globalRoot?: string;
|
|
65
65
|
}): PluginSourceRecord[];
|
|
66
|
+
interface RegisteredPluginSourceDir {
|
|
67
|
+
/** Raw package source string as written in settings.json. */
|
|
68
|
+
source: string;
|
|
69
|
+
/** Absolute directory the source resolves to (may not exist). */
|
|
70
|
+
rootDir: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Resolve every local-path `packages` entry in the scope's settings.json
|
|
74
|
+
* to its directory WITHOUT validating the plugin root. Remote specs
|
|
75
|
+
* (npm:, git:, URLs) are skipped — their installed copies live under the
|
|
76
|
+
* scope's npm/git dirs, which hosts already scan directly.
|
|
77
|
+
*
|
|
78
|
+
* Unlike `readPluginSourceRecords`, broken entries are returned rather
|
|
79
|
+
* than dropped: hosts pass these dirs to the Boring plugin scanner with
|
|
80
|
+
* `registered: true`, so a deleted dir or stripped package.json surfaces
|
|
81
|
+
* as a preflight error in the plugin UI instead of the plugin silently
|
|
82
|
+
* vanishing.
|
|
83
|
+
*/
|
|
84
|
+
declare function resolveRegisteredPluginSourceDirs(paths: PluginSourceScopePaths): RegisteredPluginSourceDir[];
|
|
66
85
|
declare function installPluginSource(opts: InstallPluginSourceOptions): PluginInstallResult;
|
|
67
86
|
declare function listPluginSources(opts?: ListPluginSourcesOptions): PluginListResult;
|
|
68
87
|
declare function removePluginSource(opts: RemovePluginSourceOptions): PluginRemoveResult;
|
|
69
88
|
declare function formatPluginSourceList(result: PluginListResult): string;
|
|
70
89
|
|
|
71
|
-
export { type InstallPluginSourceOptions, type ListPluginSourcesOptions, type PluginInstallResult, type PluginInstallScope, type PluginListResult, type PluginRemoveResult, type PluginSourceKind, type PluginSourceRecord, type PluginSourceScopePaths, type RemovePluginSourceOptions, formatPluginSourceList, installPluginSource, listPluginSources, readPluginSourceRecords, readPluginSourceRecordsForRoots, removePluginSource, resolvePluginSourceScopePaths };
|
|
90
|
+
export { type InstallPluginSourceOptions, type ListPluginSourcesOptions, type PluginInstallResult, type PluginInstallScope, type PluginListResult, type PluginRemoveResult, type PluginSourceKind, type PluginSourceRecord, type PluginSourceScopePaths, type RegisteredPluginSourceDir, type RemovePluginSourceOptions, formatPluginSourceList, installPluginSource, listPluginSources, readPluginSourceRecords, readPluginSourceRecordsForRoots, removePluginSource, resolvePluginSourceScopePaths, resolveRegisteredPluginSourceDirs };
|
package/dist/plugin-sources.js
CHANGED
|
@@ -5,8 +5,9 @@ import {
|
|
|
5
5
|
readPluginSourceRecords,
|
|
6
6
|
readPluginSourceRecordsForRoots,
|
|
7
7
|
removePluginSource,
|
|
8
|
-
resolvePluginSourceScopePaths
|
|
9
|
-
|
|
8
|
+
resolvePluginSourceScopePaths,
|
|
9
|
+
resolveRegisteredPluginSourceDirs
|
|
10
|
+
} from "./chunk-KTILPA2U.js";
|
|
10
11
|
export {
|
|
11
12
|
formatPluginSourceList,
|
|
12
13
|
installPluginSource,
|
|
@@ -14,5 +15,6 @@ export {
|
|
|
14
15
|
readPluginSourceRecords,
|
|
15
16
|
readPluginSourceRecordsForRoots,
|
|
16
17
|
removePluginSource,
|
|
17
|
-
resolvePluginSourceScopePaths
|
|
18
|
+
resolvePluginSourceScopePaths,
|
|
19
|
+
resolveRegisteredPluginSourceDirs
|
|
18
20
|
};
|