本仓只服务桌面宿主 image-workbench-desktop,与网页端无限画布工具无关。 14 个测试/工具脚本里共 15 处仍把 image-workbench-web 当 playwright/esbuild 的依赖后备目录(含 path.resolve、报错文案、album viewer-e2e 的多余候选), 全部改为 image-workbench-desktop;album 里重复的 web 仓候选直接删掉。 这些常量只用于找 node_modules,不参与任何插件逻辑,行为零变化。 桌面仓已确认有 playwright 1.64.1 / esbuild 0.28.2,改后依赖解析有效。 本轮不动 6 处 test.image-workbench-web.pages.dev 网址(属于网页端 e2e 脚本的废弃处理,另案);插件源码与版本未动,不需要发市场。
This commit is contained in:
1 parent
c1001ed61e
commit
e614fca7a3
14 files changed
+15
-16
No files matched your search
@@ -21,8 +21,7 @@ const css = readFileSync(path.join(ROOT, 'styles.css'), 'utf8')
|
||||
|
||||
let chromium = null
|
||||
for (const base of [process.env.IWB_PLAYWRIGHT_ROOT,
|
||||
'/Users/qiqi/open/github/image-workbench-desktop',
|
||||
'/Users/qiqi/open/github/image-workbench-web', ROOT]) {
|
||||
'/Users/qiqi/open/github/image-workbench-desktop', ROOT]) {
|
||||
if (!base) continue
|
||||
try { chromium = createRequire(path.join(base, 'package.json'))('playwright').chromium; break } catch (e) { /* 试下一个 */ }
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url)) // <repo>/batch-export/tools
|
||||
const REPO = path.resolve(HERE, '../..') // <repo>
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
|
||||
let chromium = null
|
||||
for (const base of [process.env.IWB_PLAYWRIGHT_ROOT, REPO, HOST_REPO, process.cwd()].filter(Boolean)) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url)) // <repo>/batch-export/tools
|
||||
const REPO = path.resolve(HERE, '../..')
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
const PLUGIN_ENTRY = path.resolve(HERE, '../src/index.js')
|
||||
|
||||
let chromium = null
|
||||
|
||||
@@ -15,7 +15,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url)) // <repo>/image-annotate/tools
|
||||
const REPO = path.resolve(HERE, '../..') // <repo>
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
|
||||
let chromium = null
|
||||
for (const base of [process.env.IWB_PLAYWRIGHT_ROOT, REPO, HOST_REPO, process.cwd()].filter(Boolean)) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
||||
const REPO = path.resolve(HERE, '../..')
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
const PLUGIN_ENTRY = path.resolve(HERE, '../src/index.js')
|
||||
// 版本真源是 package.json(构建时注入 manifest),探针不再硬编码,免得每次发版都要改测试
|
||||
const PKG_VERSION = JSON.parse(readFileSync(path.resolve(HERE, '../package.json'), 'utf8')).version
|
||||
|
||||
@@ -7,7 +7,7 @@ import { createRequire } from 'node:module'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
||||
const PLUGIN = path.resolve(HERE, '../plugin')
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
const REPO = path.resolve(HERE, '../..')
|
||||
|
||||
export function esbuildModule() {
|
||||
|
||||
@@ -15,7 +15,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
||||
const REPO = path.resolve(HERE, '../..')
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
|
||||
let chromium = null
|
||||
for (const base of [process.env.IWB_PLAYWRIGHT_ROOT, REPO, HOST_REPO, process.cwd()].filter(Boolean)) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
||||
const REPO = path.resolve(HERE, '../..')
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
const PLUGIN_ENTRY = path.resolve(HERE, '../src/index.js')
|
||||
const WANT_VERSION = JSON.parse(readFileSync(path.join(HERE, '../package.json'), 'utf8')).version
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { bundleEngine } from './bundle-engine.mjs'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
||||
const REPO = path.resolve(HERE, '../..')
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
|
||||
let chromium = null
|
||||
for (const base of [HOST_REPO, REPO, process.cwd()]) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
||||
const REPO = path.resolve(HERE, '../..')
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
const PLUGIN_ENTRY = path.resolve(HERE, '../src/index.js')
|
||||
|
||||
let chromium = null
|
||||
|
||||
@@ -19,13 +19,13 @@ import fs from 'node:fs'
|
||||
|
||||
const HERE = path.dirname(new URL(import.meta.url).pathname)
|
||||
let chromium = null
|
||||
for (const base of [path.resolve(HERE, '../..'), path.resolve(HERE, '../../../image-workbench-web'), process.cwd()]) {
|
||||
for (const base of [path.resolve(HERE, '../..'), path.resolve(HERE, '../../../image-workbench-desktop'), process.cwd()]) {
|
||||
const pkg = path.join(base, 'package.json')
|
||||
if (!fs.existsSync(pkg)) continue
|
||||
try { chromium = createRequire(pkg)('playwright').chromium; break } catch { /* 换下一个 */ }
|
||||
}
|
||||
if (!chromium) {
|
||||
console.error('找不到 playwright:请在插件仓根目录或宿主仓(image-workbench-web)里跑')
|
||||
console.error('找不到 playwright:请在插件仓根目录或宿主仓(image-workbench-desktop)里跑')
|
||||
process.exit(2)
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url)) // <repo>/style-source/tools
|
||||
const REPO = path.resolve(HERE, '../..')
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
const PLUGIN_ENTRY = path.resolve(HERE, '../src/index.js')
|
||||
const STYLES_JSON = '/Users/qiqi/open/github/style-source/data/styles.json'
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url)) // <repo>/white-bg-800/tools
|
||||
const REPO = path.resolve(HERE, '../..') // <repo>
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
|
||||
let chromium = null
|
||||
for (const base of [process.env.IWB_PLAYWRIGHT_ROOT, REPO, HOST_REPO, process.cwd()].filter(Boolean)) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url)) // <repo>/white-bg-800/tools
|
||||
const REPO = path.resolve(HERE, '../..') // <repo>
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-web'
|
||||
const HOST_REPO = '/Users/qiqi/open/github/image-workbench-desktop'
|
||||
const PLUGIN_ENTRY = path.resolve(HERE, '../src/index.js')
|
||||
|
||||
let chromium = null
|
||||
|
||||
Reference in new issue
Block a user