ci: move Git LFS to provider-neutral gateway
Replace the broken R2-backed LFS URL with lfs.openpencil.dev and keep storage credentials behind the gateway. Fixes #457.
This commit is contained in:
parent
9f80c35838
commit
5f13dc2e9a
|
|
@ -1,2 +1,2 @@
|
||||||
[lfs]
|
[lfs]
|
||||||
url = https://c163e722363f1cc881b9e0d1b8834b85:0c5c80a008ef8a9e5f215e438698ac52dcc9473760667eb3c539932c7a745281@git-lfs-s3-proxy.pages.dev/ca633c52af8f8351ed72fb5d12b423f0.r2.cloudflarestorage.com/open-pencil-lfs
|
url = https://lfs.openpencil.dev
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,10 @@ async function renderSvgNode(
|
||||||
const props = tree.props
|
const props = tree.props
|
||||||
const explicitW = typeof props.w === 'number' ? props.w : 0
|
const explicitW = typeof props.w === 'number' ? props.w : 0
|
||||||
const explicitH = typeof props.h === 'number' ? props.h : 0
|
const explicitH = typeof props.h === 'number' ? props.h : 0
|
||||||
const size = explicitW > 0 || explicitH > 0 ? Math.max(explicitW, explicitH) : ((props.size as number | undefined) ?? 24)
|
const size =
|
||||||
|
explicitW > 0 || explicitH > 0
|
||||||
|
? Math.max(explicitW, explicitH)
|
||||||
|
: ((props.size as number | undefined) ?? 24)
|
||||||
const colorHex = (props.color as string | undefined) ?? '#000000'
|
const colorHex = (props.color as string | undefined) ?? '#000000'
|
||||||
const parsedColor = parseColor(colorHex)
|
const parsedColor = parseColor(colorHex)
|
||||||
|
|
||||||
|
|
@ -278,13 +281,18 @@ async function renderSvgNode(
|
||||||
strokeWidth: Number(child.props['stroke-width'] ?? child.props.strokeWidth ?? 1),
|
strokeWidth: Number(child.props['stroke-width'] ?? child.props.strokeWidth ?? 1),
|
||||||
strokeCap: (child.props['stroke-linecap'] as string | undefined) ?? 'butt',
|
strokeCap: (child.props['stroke-linecap'] as string | undefined) ?? 'butt',
|
||||||
strokeJoin: (child.props['stroke-linejoin'] as string | undefined) ?? 'miter',
|
strokeJoin: (child.props['stroke-linejoin'] as string | undefined) ?? 'miter',
|
||||||
fillRule: (child.props['fill-rule'] as string | undefined) === 'evenodd' ? 'EVENODD' as const : 'NONZERO' as const
|
fillRule:
|
||||||
|
(child.props['fill-rule'] as string | undefined) === 'evenodd'
|
||||||
|
? ('EVENODD' as const)
|
||||||
|
: ('NONZERO' as const)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.filter((p): p is NonNullable<typeof p> => p !== null)
|
.filter((p): p is NonNullable<typeof p> => p !== null)
|
||||||
}
|
}
|
||||||
if (pathInfos.length === 0) {
|
if (pathInfos.length === 0) {
|
||||||
throw new Error('<svg> requires SVG markup as children, a body prop, or <path d="..."> children')
|
throw new Error(
|
||||||
|
'<svg> requires SVG markup as children, a body prop, or <path d="..."> children'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const vb = parseViewBox(props.viewBox as string | undefined)
|
const vb = parseViewBox(props.viewBox as string | undefined)
|
||||||
|
|
@ -303,7 +311,10 @@ async function renderSvgNode(
|
||||||
|
|
||||||
function parseViewBox(viewBox: string | undefined): { w: number; h: number } {
|
function parseViewBox(viewBox: string | undefined): { w: number; h: number } {
|
||||||
if (!viewBox) return { w: 0, h: 0 }
|
if (!viewBox) return { w: 0, h: 0 }
|
||||||
const parts = viewBox.trim().split(/[\s,]+/).map(Number)
|
const parts = viewBox
|
||||||
|
.trim()
|
||||||
|
.split(/[\s,]+/)
|
||||||
|
.map(Number)
|
||||||
const w = parts[2] ?? 0
|
const w = parts[2] ?? 0
|
||||||
const h = parts[3] ?? 0
|
const h = parts[3] ?? 0
|
||||||
return { w, h }
|
return { w, h }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue