dsh-sidebar-browser-agent 0.2.6 → 0.2.7
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 +8 -0
- package/icon.svg +16 -7
- package/lib/client.js +1 -1
- package/lib/{entry-0.2.6.js → entry-0.2.7.js} +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -2
- package/test/host-harness.mjs +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.7
|
|
4
|
+
|
|
5
|
+
- Redrew the plugin icon in the official plugin style: a transparent 36x36
|
|
6
|
+
gradient glyph (browser window, sidebar list, agent cursor) using the same
|
|
7
|
+
palette and stroke language as the built-in plugin icons.
|
|
8
|
+
- Declared `icon` in `package.json`, the field the Plugin Manager reads for a
|
|
9
|
+
plugin row, and added a GitHub-hosted 180px raster for storefront tiles.
|
|
10
|
+
|
|
3
11
|
## 0.2.6
|
|
4
12
|
|
|
5
13
|
- Publishing is now token-free: the publish workflow authenticates to npm with
|
package/icon.svg
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="sidebar-browser-page" x1="8" y1="9" x2="29" y2="27" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#67C7FE" />
|
|
5
|
+
<stop offset="1" stop-color="#3F77D8" />
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="sidebar-browser-side" x1="10" y1="11" x2="15" y2="25" gradientUnits="userSpaceOnUse">
|
|
8
|
+
<stop stop-color="#6AECB6" />
|
|
9
|
+
<stop offset="1" stop-color="#37A6B1" />
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<rect x="7.7" y="8.7" width="20.6" height="18.6" rx="3.4" stroke="url(#sidebar-browser-page)" stroke-width="2.4" />
|
|
13
|
+
<rect x="10.4" y="12.2" width="3.6" height="1.8" rx="0.9" fill="url(#sidebar-browser-side)" />
|
|
14
|
+
<rect x="10.4" y="15.7" width="2.8" height="1.8" rx="0.9" fill="url(#sidebar-browser-side)" fill-opacity="0.65" />
|
|
15
|
+
<rect x="10.4" y="19.2" width="3.2" height="1.8" rx="0.9" fill="url(#sidebar-browser-side)" fill-opacity="0.45" />
|
|
16
|
+
<path d="M17.4 15.4L17.4 24.9L19.9 22.5L21.8 26.1L24.1 25.1L22.2 21.5L25.4 21.4Z" fill="url(#sidebar-browser-page)" stroke="#FFFFFF" stroke-width="0.7" stroke-linejoin="round" />
|
|
8
17
|
</svg>
|
package/lib/client.js
CHANGED
|
@@ -28,7 +28,7 @@ window.__ModuleLoader__.load({
|
|
|
28
28
|
const BASE_BACKOFF_MS = 400
|
|
29
29
|
const MAX_EVAL_CHARS = 100_000
|
|
30
30
|
/** Plugin version reported by diagnostics; keep in sync with package.json. */
|
|
31
|
-
const PLUGIN_VERSION = '0.2.
|
|
31
|
+
const PLUGIN_VERSION = '0.2.7'
|
|
32
32
|
const MAX_SCREENSHOT_WIDTH = 1_400
|
|
33
33
|
const MAX_SCREENSHOT_BASE64 = 12_000_000
|
|
34
34
|
/**
|
|
@@ -20,7 +20,7 @@ import z from '../vendor/schemastery/index.mjs'
|
|
|
20
20
|
export const name = 'dsh-sidebar-browser-agent'
|
|
21
21
|
|
|
22
22
|
/** Plugin version reported by diagnostics; keep in sync with package.json. */
|
|
23
|
-
export const PLUGIN_VERSION = '0.2.
|
|
23
|
+
export const PLUGIN_VERSION = '0.2.7'
|
|
24
24
|
|
|
25
25
|
/** Services that must exist before this plugin mounts. */
|
|
26
26
|
export const inject = ['webServer', 'connection', 'tools']
|
package/lib/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import z from '../vendor/schemastery/index.mjs'
|
|
|
20
20
|
export const name = 'dsh-sidebar-browser-agent'
|
|
21
21
|
|
|
22
22
|
/** Plugin version reported by diagnostics; keep in sync with package.json. */
|
|
23
|
-
export const PLUGIN_VERSION = '0.2.
|
|
23
|
+
export const PLUGIN_VERSION = '0.2.7'
|
|
24
24
|
|
|
25
25
|
/** Services that must exist before this plugin mounts. */
|
|
26
26
|
export const inject = ['webServer', 'connection', 'tools']
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-sidebar-browser-agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"icon": "./icon.svg",
|
|
5
6
|
"description": "Native agent control for the DSH right-sidebar browser: manage tabs, and read, click, type, scroll, run JavaScript in and screenshot the real page through its Electron guest.",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"repository": {
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
"electron-webview"
|
|
20
21
|
],
|
|
21
22
|
"exports": {
|
|
22
|
-
".": "./lib/entry-0.2.
|
|
23
|
+
".": "./lib/entry-0.2.7.js",
|
|
23
24
|
"./client": "./lib/client.js",
|
|
24
25
|
"./locale/*.json": "./locale/*.json",
|
|
25
26
|
"./icon": "./icon.svg"
|
package/test/host-harness.mjs
CHANGED
|
@@ -370,6 +370,14 @@ async function main() {
|
|
|
370
370
|
// --- version consistency and the versioned Host entry ---
|
|
371
371
|
check('package version matches host constant', packageJson.version === PLUGIN_VERSION, `${packageJson.version} vs ${PLUGIN_VERSION}`)
|
|
372
372
|
check('client version matches package', clientSource.includes(`PLUGIN_VERSION = '${packageJson.version}'`), packageJson.version)
|
|
373
|
+
const iconReference = packageJson.icon
|
|
374
|
+
check('package declares a relative icon', typeof iconReference === 'string' && iconReference.startsWith('./') && !iconReference.includes('..'), iconReference)
|
|
375
|
+
const iconFile = typeof iconReference === 'string' ? path.resolve(here, '..', iconReference) : ''
|
|
376
|
+
check('declared icon exists', iconFile !== '' && fs.existsSync(iconFile), iconFile)
|
|
377
|
+
const iconSource = iconFile !== '' && fs.existsSync(iconFile) ? fs.readFileSync(iconFile, 'utf8') : ''
|
|
378
|
+
check('declared icon is a 36x36 svg', iconSource.startsWith('<svg') && iconSource.includes('viewBox="0 0 36 36"'), iconSource.slice(0, 60))
|
|
379
|
+
check('declared icon ships with the package', Array.isArray(packageJson.files) && packageJson.files.includes('icon.svg'), JSON.stringify(packageJson.files))
|
|
380
|
+
|
|
373
381
|
const expectedEntry = `./lib/entry-${packageJson.version}.js`
|
|
374
382
|
check('package entry is versioned', packageJson.exports?.['.'] === expectedEntry, packageJson.exports?.['.'])
|
|
375
383
|
const entryFile = path.join(here, '..', 'lib', `entry-${packageJson.version}.js`)
|