dsh-design-studio 0.26.0 → 0.28.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/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/browser.js +19 -0
- package/lib/client.js +334 -14
- package/lib/handoff.js +4 -2
- package/lib/htmlpack.js +693 -0
- package/lib/index.js +165 -11
- package/lib/serve.js +1 -1
- package/lib/tunnel.js +598 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
* GET /dsh-design-studio/api/bundle?session=&key=&v=&parent= 远程看:这一屏连同样式、图片打成一份 → { html, deps }(放进沙盒 iframe;deps 改了再取)
|
|
37
37
|
* POST /dsh-design-studio/api/phone 手机上看:{ session, on: true, path } 开局域网入口(给链接和二维码)、
|
|
38
38
|
* { on: false } 关掉、{ follow: path } 电脑上换了一屏手机跟着跳
|
|
39
|
+
* POST /dsh-design-studio/api/pubshare 公网链接(实验):{ session, on: true, …整套演示的参数 } 用 cloudflared 临时通道放出整套 HTML 演示、
|
|
40
|
+
* { on: false } 关掉、{ peek: true } 看状态(带二维码)、{ update: true, … } 换参数、
|
|
41
|
+
* { download: true } 下载 cloudflared(人点了才下)、{ cancel: true } 取消下载
|
|
39
42
|
*
|
|
40
43
|
* 页面本身由 serve.js 开的独立端口提供(见那边的说明)。
|
|
41
44
|
*/
|
|
@@ -48,6 +51,7 @@ import os from 'node:os'
|
|
|
48
51
|
import { execFile } from 'node:child_process'
|
|
49
52
|
import { createHub, webOrigins, trustedOrigins, resolveInRoot, ERR_CATCHER, defang } from './serve.js'
|
|
50
53
|
import { bundle, inlinePicker, strictMeta, MAX_TOTAL as BUNDLE_MAX } from './bundle.js'
|
|
54
|
+
import { buildPack, PACK_SCREENS } from './htmlpack.js'
|
|
51
55
|
import { createLibrary } from './works.js'
|
|
52
56
|
import { createInspiration } from './inspire.js'
|
|
53
57
|
import { pickStyleText } from './styles.js'
|
|
@@ -59,6 +63,7 @@ import { createTracker, parseTarget, findRule, KINDS } from './core.js'
|
|
|
59
63
|
import { createDrafts } from './draft.js'
|
|
60
64
|
import { createHistory } from './history.js'
|
|
61
65
|
import { createPhone } from './phone.js'
|
|
66
|
+
import { createPublicShare } from './tunnel.js'
|
|
62
67
|
import { qrMatrix } from './qr.js'
|
|
63
68
|
import { makePdf, makePptx, jpegInfo } from './doc.js'
|
|
64
69
|
import { createBrowser } from './browser.js'
|
|
@@ -978,6 +983,20 @@ export function apply(ctx) {
|
|
|
978
983
|
}, 'dsh-design-studio: headless browser')
|
|
979
984
|
const phone = createPhone({ upstream: (session) => tracker.snapshot(session).origin || '', log })
|
|
980
985
|
ctx.effect(() => () => phone.stopAll(), 'dsh-design-studio: phone links')
|
|
986
|
+
// 公网链接(#27):只放整套 HTML 演示,每次有人打开按现在的文件打包(文件没改就用上次的)
|
|
987
|
+
const pub = createPublicShare({
|
|
988
|
+
build: (p) => {
|
|
989
|
+
const { pack, files } = packDesign(p.root, 0, p)
|
|
990
|
+
return { html: pack.html, deps: files }
|
|
991
|
+
},
|
|
992
|
+
// 这个会话换了设计(或关了):关掉,别把不在眼前的设计一直开在公网上(插件自己每 5 秒看一眼,不靠右侧栏开着)
|
|
993
|
+
alive: (session, p) => {
|
|
994
|
+
const t = tracker.stateOf(session).target
|
|
995
|
+
return !!(t && t.kind === 'file' && t.root === p.root)
|
|
996
|
+
},
|
|
997
|
+
log,
|
|
998
|
+
})
|
|
999
|
+
ctx.effect(() => () => { pub.stopAll(); pub.cancelTool() }, 'dsh-design-studio: public links')
|
|
981
1000
|
|
|
982
1001
|
// ── 接口 ──────────────────────────────────────────────────────────────────
|
|
983
1002
|
|
|
@@ -1046,7 +1065,7 @@ export function apply(ctx) {
|
|
|
1046
1065
|
let tweaks = null
|
|
1047
1066
|
if (t && t.kind === 'file') { try { tweaks = readTweaks(t.root) } catch (e) { log(e) } }
|
|
1048
1067
|
const snap = tracker.snapshot(session)
|
|
1049
|
-
json(res, 200, { ...snap, impl: implStore.list(implRoot(snap)), strict: strictScreens(snap), phone: { on: ph.on, seen: ph.seen || 0 }, tweaks, ...annotsField(session, new URL(req.url, 'http://x').searchParams.get('an')), ...(c ? { checkReq: c.id } : {}) })
|
|
1068
|
+
json(res, 200, { ...snap, impl: implStore.list(implRoot(snap)), strict: strictScreens(snap), phone: { on: ph.on, seen: ph.seen || 0 }, pub: pub.status(session, { brief: true }), tweaks, ...annotsField(session, new URL(req.url, 'http://x').searchParams.get('an')), ...(c ? { checkReq: c.id } : {}) })
|
|
1050
1069
|
}
|
|
1051
1070
|
|
|
1052
1071
|
/** 正在看的几屏里,哪些是别人做的、没改过的(地址列表):右侧栏给它们的 iframe 加沙盒、不给剪贴板 */
|
|
@@ -1290,7 +1309,8 @@ export function apply(ctx) {
|
|
|
1290
1309
|
// 输入框里写的相对路径按会话目录算(新会话也问 DSH 要)
|
|
1291
1310
|
const target = parseTarget(body.target, await sessionCwd(session))
|
|
1292
1311
|
await tracker.setTarget(session, target, { source: 'user', popup: false })
|
|
1293
|
-
|
|
1312
|
+
// 换了设计,公网链接马上关(右侧栏要马上知道,不等下一次刷新)
|
|
1313
|
+
json(res, 200, { ...tracker.snapshot(session), ...annotsField(session), pub: pub.status(session, { brief: true }) })
|
|
1294
1314
|
} catch (e) {
|
|
1295
1315
|
json(res, 400, { error: e.message })
|
|
1296
1316
|
}
|
|
@@ -1307,7 +1327,7 @@ export function apply(ctx) {
|
|
|
1307
1327
|
for (const k of ['kind', 'size', 'view', 'focus']) if (typeof body[k] === 'string') patch[k] = body[k]
|
|
1308
1328
|
try {
|
|
1309
1329
|
await tracker.setView(session, patch)
|
|
1310
|
-
json(res, 200, { ...tracker.snapshot(session), ...annotsField(session) })
|
|
1330
|
+
json(res, 200, { ...tracker.snapshot(session), ...annotsField(session), pub: pub.status(session, { brief: true }) })
|
|
1311
1331
|
} catch (e) {
|
|
1312
1332
|
json(res, 400, { error: e.message })
|
|
1313
1333
|
}
|
|
@@ -1320,6 +1340,7 @@ export function apply(ctx) {
|
|
|
1320
1340
|
try { body = await readBody(req) } catch (e) { return json(res, 400, { error: e.message }) }
|
|
1321
1341
|
tracker.clear(String(body.session || ''))
|
|
1322
1342
|
phone.stop(String(body.session || ''))
|
|
1343
|
+
pub.stop(String(body.session || ''))
|
|
1323
1344
|
json(res, 200, tracker.snapshot(String(body.session || '')))
|
|
1324
1345
|
}
|
|
1325
1346
|
|
|
@@ -1584,16 +1605,22 @@ export function apply(ctx) {
|
|
|
1584
1605
|
}
|
|
1585
1606
|
|
|
1586
1607
|
/** 存进导出目录:文件名只留字母数字中文和 -,同名不覆盖(加 -2、-3 …) */
|
|
1587
|
-
function
|
|
1608
|
+
function writeExport(session, name, ext, buf) {
|
|
1588
1609
|
const base = String(name || 'design').replace(new RegExp(`\\.${ext}$`, 'i'), '').replace(/[^\w\u4e00-\u9fff-]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 60) || 'design'
|
|
1589
1610
|
const dir = exportDir(session)
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
fs.writeFileSync(file, buf)
|
|
1611
|
+
fs.mkdirSync(dir, { recursive: true })
|
|
1612
|
+
// 独占创建(wx):查名和写入之间别人刚好建了同名文件,也不会盖掉它,换下一个名字
|
|
1613
|
+
for (let i = 1; i < 1000; i++) {
|
|
1614
|
+
const file = path.join(dir, i === 1 ? `${base}.${ext}` : `${base}-${i}.${ext}`)
|
|
1615
|
+
try { fs.writeFileSync(file, buf, { flag: 'wx' }) } catch (e) { if (e.code === 'EEXIST') continue; throw e }
|
|
1595
1616
|
exported.add(file)
|
|
1596
|
-
|
|
1617
|
+
return file
|
|
1618
|
+
}
|
|
1619
|
+
throw new Error('too many files with this name')
|
|
1620
|
+
}
|
|
1621
|
+
function saveExport(res, session, name, ext, buf) {
|
|
1622
|
+
try {
|
|
1623
|
+
json(res, 200, { path: writeExport(session, name, ext, buf) })
|
|
1597
1624
|
} catch (e) {
|
|
1598
1625
|
json(res, 500, { error: e.message })
|
|
1599
1626
|
}
|
|
@@ -1652,6 +1679,86 @@ export function apply(ctx) {
|
|
|
1652
1679
|
saveExport(res, String(body.session || ''), body.name, format, buf)
|
|
1653
1680
|
}
|
|
1654
1681
|
|
|
1682
|
+
/** 整套 HTML 演示的参数(导出和公网链接共用):挑掉不合法、重复的屏;画幅、深浅色、调节值按右侧栏给的。没有屏给 null */
|
|
1683
|
+
function packParams(body) {
|
|
1684
|
+
const okKey = (k) => typeof k === 'string' && /^[^\\]+\.html?$/i.test(k) && !k.split('/').some((p) => !p || p === '.' || p === '..')
|
|
1685
|
+
const seen = new Set()
|
|
1686
|
+
const screens = []
|
|
1687
|
+
for (const s of Array.isArray(body.screens) ? body.screens.slice(0, PACK_SCREENS) : []) {
|
|
1688
|
+
if (!s || !okKey(s.key) || seen.has(s.key)) continue
|
|
1689
|
+
seen.add(s.key)
|
|
1690
|
+
screens.push({ key: s.key, label: String(s.label || s.key).slice(0, 80), top: s.top === true })
|
|
1691
|
+
}
|
|
1692
|
+
if (!screens.length) return null
|
|
1693
|
+
const dim = (x, d) => (Number.isFinite(+x) && +x >= 100 && +x <= 8000 ? Math.round(+x) : d)
|
|
1694
|
+
const tw = body.tweak && typeof body.tweak === 'object' ? body.tweak : null
|
|
1695
|
+
const plain = (o) => Object.fromEntries(Object.entries(o && typeof o === 'object' ? o : {}).filter(([k, x]) => typeof k === 'string' && k.length < 80 && (typeof x === 'string' || typeof x === 'number' || x === null || typeof x === 'boolean')).slice(0, 200))
|
|
1696
|
+
return {
|
|
1697
|
+
screens,
|
|
1698
|
+
kind: typeof body.kind === 'string' ? body.kind : 'web',
|
|
1699
|
+
w: dim(body.w, 1280),
|
|
1700
|
+
h: dim(body.h, 800),
|
|
1701
|
+
os: body.os === 'win' ? 'win' : '',
|
|
1702
|
+
dark: body.dark === true,
|
|
1703
|
+
scheme: body.scheme === 'dark' ? 'dark' : 'light',
|
|
1704
|
+
tweak: tw ? { vars: plain(tw.vars), attrs: plain(tw.attrs) } : null,
|
|
1705
|
+
title: String(body.title || '').slice(0, 120),
|
|
1706
|
+
lang: body.lang === 'en' ? 'en' : 'zh',
|
|
1707
|
+
fit: body.fit === true,
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
/** 打包一个设计目录(v 是历史版本,0 = 现在的文件):deps 是读过的相对路径,files 是对应的文件(公网链接按它们判断要不要重新打包) */
|
|
1712
|
+
function packDesign(root, v, params) {
|
|
1713
|
+
const deps = new Set()
|
|
1714
|
+
const files = new Set()
|
|
1715
|
+
const read = (rel) => {
|
|
1716
|
+
deps.add(rel)
|
|
1717
|
+
const f = bundleFile(root, v, rel)
|
|
1718
|
+
files.add(f || path.join(root, ...rel.split('/')))
|
|
1719
|
+
if (!f) return null
|
|
1720
|
+
const s = fs.statSync(f)
|
|
1721
|
+
return s.isFile() && s.size <= BUNDLE_MAX ? fs.readFileSync(f) : null
|
|
1722
|
+
}
|
|
1723
|
+
const strictOf = (page) => library.strictHtml(page) || market.strictHtml(page) || (v > 0 && library.strictVersions(root))
|
|
1724
|
+
const pack = buildPack({ ...params, read, strictOf })
|
|
1725
|
+
return { pack, deps, files: [...files] }
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
/**
|
|
1729
|
+
* 整套 HTML 演示(#26):本地文件的设计,所有屏打进一个 .html(见 htmlpack.js),存进 exports/。
|
|
1730
|
+
* 屏、版本、画幅、深浅色、外壳、调节滑块还没存的值都按右侧栏眼前的来;不截图,几秒出来
|
|
1731
|
+
*/
|
|
1732
|
+
async function htmlPackRoute(req, res) {
|
|
1733
|
+
if (!admit(req, res)) return
|
|
1734
|
+
if (req.method !== 'POST') return json(res, 405, { error: 'method not allowed' })
|
|
1735
|
+
let body
|
|
1736
|
+
try { body = await readBody(req, 1024 * 1024) } catch (e) { return json(res, 400, { error: e.message }) }
|
|
1737
|
+
const session = String(body.session || '')
|
|
1738
|
+
const st = tracker.stateOf(session)
|
|
1739
|
+
const t = st && st.target
|
|
1740
|
+
if (!t || t.kind !== 'file') return json(res, 400, { error: 'not-file' })
|
|
1741
|
+
if (targetMoved(res, session, body.target)) return
|
|
1742
|
+
const v = Math.max(0, Math.floor(Number(body.v) || 0))
|
|
1743
|
+
const params = packParams(body)
|
|
1744
|
+
if (!params) return json(res, 400, { error: 'noScreens' })
|
|
1745
|
+
let pack, deps
|
|
1746
|
+
try {
|
|
1747
|
+
;({ pack, deps } = packDesign(t.root, v, params))
|
|
1748
|
+
} catch (e) {
|
|
1749
|
+
return json(res, e.code ? 400 : 500, { error: e.code || e.message })
|
|
1750
|
+
}
|
|
1751
|
+
// 打包时会话换了设计:别把 A 的演示存进 B 的 exports/
|
|
1752
|
+
if (targetMoved(res, session, body.target)) return
|
|
1753
|
+
const ai = new Set([...deps].filter((x) => isPhotoAsset(x)).map((x) => path.basename(x)))
|
|
1754
|
+
try {
|
|
1755
|
+
const file = writeExport(session, body.name, 'html', Buffer.from(pack.html, 'utf8'))
|
|
1756
|
+
json(res, 200, { path: file, count: pack.count, missing: pack.missing, ai: ai.size, bytes: pack.html.length })
|
|
1757
|
+
} catch (e) {
|
|
1758
|
+
json(res, 500, { error: e.message })
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1655
1762
|
/** 图片格式看文件头,不信文件名 */
|
|
1656
1763
|
function imageExt(buf) {
|
|
1657
1764
|
if (buf.length < 12) return ''
|
|
@@ -1720,6 +1827,44 @@ export function apply(ctx) {
|
|
|
1720
1827
|
json(res, 200, st.on ? { ...st, qr: qrMatrix(st.url).map((row) => row.map((c) => (c ? 1 : 0)).join('')) } : st)
|
|
1721
1828
|
}
|
|
1722
1829
|
|
|
1830
|
+
/**
|
|
1831
|
+
* 公网链接(#27,实验):{ session, on: true, …整套演示的参数 } 开(开着就换参数),{ on: false } 关,
|
|
1832
|
+
* { peek: true } 只看状态(连上了带二维码)。只能右侧栏里人点开,不给模型工具
|
|
1833
|
+
*/
|
|
1834
|
+
async function pubShareRoute(req, res) {
|
|
1835
|
+
if (!admit(req, res)) return
|
|
1836
|
+
if (req.method !== 'POST') return json(res, 405, { error: 'method not allowed' })
|
|
1837
|
+
let body
|
|
1838
|
+
try { body = await readBody(req, 1024 * 1024) } catch (e) { return json(res, 400, { error: e.message }) }
|
|
1839
|
+
const session = String(body.session || '')
|
|
1840
|
+
if (!session) return json(res, 400, { error: '缺 session' })
|
|
1841
|
+
const withQr = (x) => (x.on && x.url ? { ...x, qr: qrMatrix(x.url).map((row) => row.map((c) => (c ? 1 : 0)).join('')) } : x)
|
|
1842
|
+
if (body.on === false) {
|
|
1843
|
+
pub.stop(session)
|
|
1844
|
+
return json(res, 200, { ...pub.status(session), tool: pub.hasTool() })
|
|
1845
|
+
}
|
|
1846
|
+
// 看状态:顺带说本机有没有 cloudflared(没有的话右侧栏先请人下载)
|
|
1847
|
+
if (body.peek === true) return json(res, 200, { ...withQr(pub.status(session)), tool: pub.hasTool() })
|
|
1848
|
+
// 人点了「下载」:从 Cloudflare 官方 GitHub 下到插件自己的目录,进度在 peek 里;「取消」停下
|
|
1849
|
+
if (body.download === true || body.cancel === true) {
|
|
1850
|
+
if (body.cancel === true) pub.cancelTool()
|
|
1851
|
+
else pub.fetchTool()
|
|
1852
|
+
return json(res, 200, { ...pub.status(session), tool: pub.hasTool() })
|
|
1853
|
+
}
|
|
1854
|
+
const t = tracker.stateOf(session).target
|
|
1855
|
+
if (!t || t.kind !== 'file') return json(res, 400, { error: 'not-file' })
|
|
1856
|
+
if (targetMoved(res, session, body.target)) return
|
|
1857
|
+
const params = packParams(body)
|
|
1858
|
+
if (!params) return json(res, 400, { error: 'noScreens' })
|
|
1859
|
+
const p = { root: t.root, ...params }
|
|
1860
|
+
// 右侧栏换了屏、画幅、深浅色:开着就跟着换,没开不新开(开要人点)
|
|
1861
|
+
if (body.update === true) return json(res, 200, { ok: pub.update(session, p) })
|
|
1862
|
+
const r = await pub.start(session, p, { name: params.title || path.basename(t.root) })
|
|
1863
|
+
// 没开起来的原因(没装 cloudflared、打包不出来)start 直接给;开着的照状态给
|
|
1864
|
+
const now = pub.status(session)
|
|
1865
|
+
json(res, 200, { ...withQr(now.on ? now : { ...now, ...r }), tool: pub.hasTool() })
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1723
1868
|
// 设计库:我的作品、灵感、打 zip、拖 zip 进来用
|
|
1724
1869
|
const inspiration = createInspiration({ log })
|
|
1725
1870
|
/**
|
|
@@ -1764,7 +1909,7 @@ export function apply(ctx) {
|
|
|
1764
1909
|
})
|
|
1765
1910
|
const mk = createMarketRoutes({ admit, readBody, json, tracker, library, market, open, systemsDir: SYSTEMS_DIR, log, sessionCwd })
|
|
1766
1911
|
|
|
1767
|
-
const routes = { works: lib.works, workthumb: lib.workthumb, scrthumb: canvasThumbs.route, pack: lib.pack, usezip: lib.usezip, ghauth: lib.ghauth, submit: lib.submit, inspire: lib.inspire, inspimg: lib.inspimg, ...mk, state, open: openRoute, view: viewRoute, close: closeRoute, history: historyRoute, restore: restoreRoute, edit: editRoute, style: styleRoute, bundle: bundleRoute, ref: refRoute, export: exportRoute, doc: docRoute, reveal: revealRoute, phone: phoneRoute, check: checkRoute, locate: locateRoute, tweak: tweakRoute, systems: systemsRoute, frames: framesRoute, systhumb: systhumbRoute, project: projectRoute, impl: implRoute, implcmp: implCmpRoute, implshot: implShotRoute }
|
|
1912
|
+
const routes = { works: lib.works, workthumb: lib.workthumb, scrthumb: canvasThumbs.route, pack: lib.pack, usezip: lib.usezip, ghauth: lib.ghauth, submit: lib.submit, inspire: lib.inspire, inspimg: lib.inspimg, ...mk, state, open: openRoute, view: viewRoute, close: closeRoute, history: historyRoute, restore: restoreRoute, edit: editRoute, style: styleRoute, bundle: bundleRoute, ref: refRoute, export: exportRoute, doc: docRoute, htmlpack: htmlPackRoute, pubshare: pubShareRoute, reveal: revealRoute, phone: phoneRoute, check: checkRoute, locate: locateRoute, tweak: tweakRoute, systems: systemsRoute, frames: framesRoute, systhumb: systhumbRoute, project: projectRoute, impl: implRoute, implcmp: implCmpRoute, implshot: implShotRoute }
|
|
1768
1913
|
for (const [key, handler] of Object.entries(routes)) {
|
|
1769
1914
|
ctx.effect(() => ctx.webServer.register({
|
|
1770
1915
|
kind: 'exact',
|
|
@@ -1788,6 +1933,15 @@ export function apply(ctx) {
|
|
|
1788
1933
|
log(e)
|
|
1789
1934
|
}
|
|
1790
1935
|
})
|
|
1936
|
+
// 会话归档了:它的公网链接马上关(面板进不去了,别让链接一直开到点)。老版本 DSH 没有这个事件,就只是收不到
|
|
1937
|
+
ctx.on('workspace/session-archived', (req) => {
|
|
1938
|
+
try {
|
|
1939
|
+
const id = req && req.sessionId
|
|
1940
|
+
if (id) pub.stop(String(id))
|
|
1941
|
+
} catch (e) {
|
|
1942
|
+
log(e)
|
|
1943
|
+
}
|
|
1944
|
+
}, { global: true })
|
|
1791
1945
|
// 模型边说边推的流:写大文件时参数要流好几分钟,靠它提前知道在写哪个文件(老版本 DSH 没有这个事件,就只是收不到)
|
|
1792
1946
|
ctx.on('agent/assistant-stream', (e) => {
|
|
1793
1947
|
try {
|
package/lib/serve.js
CHANGED
|
@@ -67,7 +67,7 @@ export const MIME = {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// 改动通知里不算的:版本库、依赖、系统垃圾
|
|
70
|
-
const EXPORTS = /^(exports([\\/][^\\/]+\.(png|pdf|pptx))?|refs([\\/][^\\/]+\.(png|jpe?g|gif|webp))?)$/i // 导出的图片 / PDF / PPT
|
|
70
|
+
const EXPORTS = /^(exports([\\/][^\\/]+\.(png|pdf|pptx|html))?|refs([\\/][^\\/]+\.(png|jpe?g|gif|webp))?)$/i // 导出的图片 / PDF / PPT / HTML 演示、参考图(和第一次建的 exports / refs 目录):不算设计改了
|
|
71
71
|
const IGNORED = /(^|[\\/])(\.git|node_modules|\.DS_Store|\.next|\.cache|\.turbo)([\\/]|$)/
|
|
72
72
|
const ANNOTATIONS = /^annotations\.json(\.[0-9a-z]+\.tmp)?$/i // 业务标注(DSH 写文件时先写 .tmp 再改名):右侧栏靠轮询跟上,页面用不到它,别一改就整屏刷新
|
|
73
73
|
const HANDOFF = /^handoff([\\/]|$)/i // 转成代码的交接包(说明和截图):不算设计改了,也别在截图时把页面刷掉
|