@soffits/dsh-plugin-sdk 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/CHANGELOG.md +4 -0
- package/host/src/build-client.js +7 -3
- package/package.json +10 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
- `buildClient` takes an `id`, for a part of a package that has no `package.json` of its own; the header then names that id.
|
|
6
|
+
|
|
3
7
|
## 0.1.0
|
|
4
8
|
|
|
5
9
|
- First release: @soffits/dsh-host-kit, @soffits/dsh-channel-core, @soffits/dsh-ui-kit and @soffits/dsh-ui-actions in one package. Host helpers at `@soffits/dsh-plugin-sdk/host` (`/host/build`), chat bridge helpers at `/channel` (`/channel/testing`), the item format at `/actions/item`; one row `plugin-sdk` whose browser half provides `ctx.uiKit` and `ctx.uiActions` as before.
|
package/host/src/build-client.js
CHANGED
|
@@ -24,6 +24,7 @@ export function localeFiles(root) {
|
|
|
24
24
|
/**
|
|
25
25
|
* @param {object} options
|
|
26
26
|
* @param {string} options.root - the plugin's folder (its package.json names the module)
|
|
27
|
+
* @param {string} [options.id] - the module id, for a part of a package that has no package.json of its own
|
|
27
28
|
* @param {string} [options.entry] - relative to `root`
|
|
28
29
|
* @param {string[]} [options.external] - modules the page's shared module table provides
|
|
29
30
|
* @param {Record<string, () => unknown>} [options.data] - `import x from 'virtual:<name>'` gives the
|
|
@@ -35,6 +36,7 @@ export function localeFiles(root) {
|
|
|
35
36
|
*/
|
|
36
37
|
export async function buildClient({
|
|
37
38
|
root,
|
|
39
|
+
id,
|
|
38
40
|
entry = 'src/client/index.js',
|
|
39
41
|
external = ['react', '@deepseek-ai/dsh-client-ui-primitives'],
|
|
40
42
|
data = {},
|
|
@@ -43,7 +45,9 @@ export async function buildClient({
|
|
|
43
45
|
check = process.argv.includes('--check'),
|
|
44
46
|
}) {
|
|
45
47
|
const { build } = await import('esbuild')
|
|
46
|
-
const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'))
|
|
48
|
+
const pkg = id === undefined ? JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')) : undefined
|
|
49
|
+
const name = id ?? pkg.name
|
|
50
|
+
const label = pkg === undefined ? name : `${pkg.name} ${pkg.version}`
|
|
47
51
|
const virtual = {
|
|
48
52
|
name: 'virtual',
|
|
49
53
|
setup(b) {
|
|
@@ -68,9 +72,9 @@ export async function buildClient({
|
|
|
68
72
|
logLevel: 'warning',
|
|
69
73
|
})
|
|
70
74
|
const outputs = {
|
|
71
|
-
'client.js': `/* ${
|
|
75
|
+
'client.js': `/* ${label}: built from ${from}. Do not edit. */
|
|
72
76
|
window.__ModuleLoader__.load({
|
|
73
|
-
id: ${JSON.stringify(
|
|
77
|
+
id: ${JSON.stringify(name)},
|
|
74
78
|
factory: (require) => {
|
|
75
79
|
var module = { exports: {} }
|
|
76
80
|
var exports = module.exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soffits/dsh-plugin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Shared parts for DeepSeek Harness plugins: Host helpers (people, locales, change notices, event streams, the client build), chat bridge helpers, and Web page pieces (ctx.uiKit) and ask-the-assistant buttons (ctx.uiActions) as one browser service.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -63,14 +63,21 @@
|
|
|
63
63
|
"esbuild": ">=0.25"
|
|
64
64
|
},
|
|
65
65
|
"peerDependenciesMeta": {
|
|
66
|
-
"esbuild": {
|
|
66
|
+
"esbuild": {
|
|
67
|
+
"optional": true
|
|
68
|
+
}
|
|
67
69
|
},
|
|
68
70
|
"devDependencies": {
|
|
69
71
|
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.1",
|
|
70
72
|
"esbuild": "^0.28.2",
|
|
71
73
|
"lucide-static": "1.74.0"
|
|
72
74
|
},
|
|
73
|
-
"keywords": [
|
|
75
|
+
"keywords": [
|
|
76
|
+
"dsh",
|
|
77
|
+
"deepseek-harness",
|
|
78
|
+
"dsh-plugin",
|
|
79
|
+
"sdk"
|
|
80
|
+
],
|
|
74
81
|
"license": "MIT",
|
|
75
82
|
"author": "Sakina",
|
|
76
83
|
"homepage": "https://github.com/soffits/dsh-plugin-sdk#readme",
|