@yadsh/dsh-plugin-log-ui 0.1.0 → 0.2.0
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/lib/client.js +1 -1
- package/lib/client.js.map +1 -1
- package/lib/index.js +13 -1
- package/lib/index.js.map +1 -1
- package/lib/typert.host.js +1 -1
- package/lib/typert.remote-client.js +1 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +42 -43
package/lib/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
|
|
|
35
35
|
import { Context } from "@deepseek-ai/cordis";
|
|
36
36
|
import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
|
|
37
37
|
import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
38
|
-
import { getRegisteredPluginLoggers, setPluginLogFormat, setPluginLogLevel, subscribePluginLoggerRegistry, } from "@yadsh/dsh-plugin-log";
|
|
38
|
+
import { createHostLoggerSink, getPluginLogger, getRegisteredPluginLoggers, setPluginLogFormat, setPluginLogLevel, subscribePluginLoggerRegistry, } from "@yadsh/dsh-plugin-log";
|
|
39
39
|
import { ConfigSchema, resolveConfig } from "./config.js";
|
|
40
40
|
export const name = "plugin-log-ui";
|
|
41
41
|
export const inject = [];
|
|
@@ -56,8 +56,14 @@ let PluginLogUi = (() => {
|
|
|
56
56
|
static Config = ConfigSchema;
|
|
57
57
|
configSource = __runInitializers(this, _instanceExtraInitializers);
|
|
58
58
|
applying = false;
|
|
59
|
+
logger;
|
|
59
60
|
constructor(ctx, input = {}) {
|
|
60
61
|
super(ctx, "pluginLogUi", { namespace: "pluginLogUi" });
|
|
62
|
+
this.logger = getPluginLogger({
|
|
63
|
+
pluginId: "dsh-plugin-log-ui",
|
|
64
|
+
consoleSink: createHostLoggerSink(ctx.logger),
|
|
65
|
+
});
|
|
66
|
+
ctx.effect(() => async () => this.logger.close(), "dsh-plugin-log-ui.logger");
|
|
61
67
|
const entry = resolveConfig(input);
|
|
62
68
|
this.configSource = () => entry;
|
|
63
69
|
installSettingsSection(ctx, PLUGIN_LOG_SETTINGS_NAMESPACE, ConfigSchema, entry, {
|
|
@@ -68,6 +74,7 @@ let PluginLogUi = (() => {
|
|
|
68
74
|
});
|
|
69
75
|
ctx.effect(() => subscribePluginLoggerRegistry(() => this.applyPolicy()), "dsh-plugin-log-ui.registry");
|
|
70
76
|
this.applyPolicy();
|
|
77
|
+
this.logger.info("plugin.ready");
|
|
71
78
|
}
|
|
72
79
|
getConfig() {
|
|
73
80
|
return resolveConfig(this.configSource());
|
|
@@ -102,6 +109,11 @@ let PluginLogUi = (() => {
|
|
|
102
109
|
seen.add(logger.pluginId);
|
|
103
110
|
setPluginLogLevel(logger.pluginId, config.levels[logger.pluginId] ?? config.defaultLevel);
|
|
104
111
|
}
|
|
112
|
+
this.logger.debug("logging.policy.applied", {
|
|
113
|
+
consumers: seen.size,
|
|
114
|
+
defaultLevel: config.defaultLevel,
|
|
115
|
+
format: config.format,
|
|
116
|
+
});
|
|
105
117
|
}
|
|
106
118
|
finally {
|
|
107
119
|
this.applying = false;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;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,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE1D,eAAe,WAAW,CAAC"}
|
package/lib/typert.host.js
CHANGED
|
@@ -29,7 +29,7 @@ export const TYPERT = {
|
|
|
29
29
|
typeSymbol: '@yadsh/dsh-plugin-log-ui/types#PluginLogUiSnapshot',
|
|
30
30
|
schema: _yadsh_dsh_plugin_log_ui_pluginLogUi_inspect_result$schema,
|
|
31
31
|
},
|
|
32
|
-
sourceLocation: {"file":"packages/dsh-plugin-log-ui/src/index.ts","line":
|
|
32
|
+
sourceLocation: {"file":"packages/dsh-plugin-log-ui/src/index.ts","line":75,"column":3},
|
|
33
33
|
},
|
|
34
34
|
],
|
|
35
35
|
model: {
|
|
@@ -26,7 +26,7 @@ export const TYPERT_REMOTE = {
|
|
|
26
26
|
typeSymbol: '@yadsh/dsh-plugin-log-ui/types#PluginLogUiSnapshot',
|
|
27
27
|
schema: _yadsh_dsh_plugin_log_ui_pluginLogUi_inspect_result$schema,
|
|
28
28
|
},
|
|
29
|
-
sourceLocation: {"file":"packages/dsh-plugin-log-ui/src/index.ts","line":
|
|
29
|
+
sourceLocation: {"file":"packages/dsh-plugin-log-ui/src/index.ts","line":75,"column":3},
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
32
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class PluginLogUi extends TypertRemoteService implements PluginLo
|
|
|
16
16
|
static Config: import("@deepseek-ai/schemastery").default<PluginLogUiConfig>;
|
|
17
17
|
private configSource;
|
|
18
18
|
private applying;
|
|
19
|
+
private readonly logger;
|
|
19
20
|
constructor(ctx: Context, input?: PluginLogUiConfig);
|
|
20
21
|
getConfig(): ResolvedPluginLogUiConfig;
|
|
21
22
|
inspect(): PluginLogUiSnapshot;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yadsh/dsh-plugin-log-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "DSH settings UI for shared plugin logging levels and file format",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -63,53 +63,43 @@
|
|
|
63
63
|
"platform": "web"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
"scripts": {
|
|
67
|
-
"clean": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\"",
|
|
68
|
-
"build": "pnpm run clean && node scripts/generate-typert.mjs && tsc -p tsconfig.build.json && tsdown",
|
|
69
|
-
"lint": "eslint src tests scripts tsdown.config.ts",
|
|
70
|
-
"test": "vitest run",
|
|
71
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
72
|
-
"verify": "node scripts/verify-package.mjs",
|
|
73
|
-
"check": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build && pnpm run verify",
|
|
74
|
-
"prepack": "pnpm run build && pnpm run verify"
|
|
75
|
-
},
|
|
76
66
|
"dependencies": {
|
|
77
|
-
"
|
|
78
|
-
"
|
|
67
|
+
"zod": "^4.4.3",
|
|
68
|
+
"@yadsh/dsh-plugin-log": "^0.2.0"
|
|
79
69
|
},
|
|
80
70
|
"peerDependencies": {
|
|
81
|
-
"@deepseek-ai/cordis": "
|
|
82
|
-
"@deepseek-ai/schemastery": "
|
|
83
|
-
"@deepseek-ai/dsh-api-gateway": "
|
|
84
|
-
"@deepseek-ai/dsh-client-connection": "
|
|
85
|
-
"@deepseek-ai/dsh-client-runtime": "
|
|
86
|
-
"@deepseek-ai/dsh-client-ui-settings": "
|
|
87
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": "
|
|
88
|
-
"@deepseek-ai/dsh-client-ui-slots": "
|
|
89
|
-
"@deepseek-ai/dsh-settings": "
|
|
90
|
-
"@deepseek-ai/dsh-typert-protocol": "
|
|
71
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
72
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
73
|
+
"@deepseek-ai/dsh-api-gateway": ">=0.1.1-rc.2 <0.2.0",
|
|
74
|
+
"@deepseek-ai/dsh-client-connection": ">=0.1.1-rc.2 <0.2.0",
|
|
75
|
+
"@deepseek-ai/dsh-client-runtime": ">=0.1.1-rc.2 <0.2.0",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.1-rc.2 <0.2.0",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.1-rc.2 <0.2.0",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.1-rc.2 <0.2.0",
|
|
79
|
+
"@deepseek-ai/dsh-settings": ">=0.1.1-rc.2 <0.2.0",
|
|
80
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.1.1-rc.2 <0.2.0",
|
|
91
81
|
"react": ">=18.2.0 <20"
|
|
92
82
|
},
|
|
93
83
|
"devDependencies": {
|
|
94
|
-
"@deepseek-ai/cordis": "
|
|
95
|
-
"@deepseek-ai/schemastery": "
|
|
96
|
-
"@
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/dsh-client-
|
|
99
|
-
"@deepseek-ai/dsh-client-
|
|
100
|
-
"@deepseek-ai/dsh-client-ui-settings": "
|
|
101
|
-
"@deepseek-ai/dsh-client-ui-
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/dsh-
|
|
104
|
-
"@deepseek-ai/dsh-typert-
|
|
105
|
-
"@
|
|
106
|
-
"@types/
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
84
|
+
"@deepseek-ai/cordis": "4.0.1",
|
|
85
|
+
"@deepseek-ai/schemastery": "3.18.1",
|
|
86
|
+
"@deepseek-ai/dsh-api-gateway": "0.1.1-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.1-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-settings": "0.1.1-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-typert-generator": "0.1.1-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.1-rc.2",
|
|
95
|
+
"@types/node": "^26.4.0",
|
|
96
|
+
"@types/react": "18.3.28",
|
|
97
|
+
"eslint": "10.9.1",
|
|
98
|
+
"react": "18.3.1",
|
|
99
|
+
"tsdown": "^0.22.14",
|
|
100
|
+
"typescript": "^7.0.2",
|
|
101
|
+
"vitest": "^4.1.11",
|
|
102
|
+
"@yadsh/dsh-config": "^0.0.0"
|
|
113
103
|
},
|
|
114
104
|
"publishConfig": {
|
|
115
105
|
"access": "public",
|
|
@@ -117,5 +107,14 @@
|
|
|
117
107
|
},
|
|
118
108
|
"engines": {
|
|
119
109
|
"node": ">=22"
|
|
110
|
+
},
|
|
111
|
+
"scripts": {
|
|
112
|
+
"clean": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\"",
|
|
113
|
+
"build": "pnpm run clean && node scripts/generate-typert.mjs && tsc -p tsconfig.build.json && tsdown",
|
|
114
|
+
"lint": "eslint src tests scripts tsdown.config.ts",
|
|
115
|
+
"test": "vitest run",
|
|
116
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
117
|
+
"verify": "node scripts/verify-package.mjs",
|
|
118
|
+
"check": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build && pnpm run verify"
|
|
120
119
|
}
|
|
121
|
-
}
|
|
120
|
+
}
|