mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
refactor: a bit of house keeping
This commit is contained in:
parent
bcc0b4c42f
commit
76c9782845
6 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { htmlColorNames, type NamedColor } from './colornames.js';
|
import { htmlColorNames, type NamedColor } from '../utils/colornames.js';
|
||||||
|
|
||||||
/// <reference types="astro/astro-jsx" />
|
/// <reference types="astro/astro-jsx" />
|
||||||
export type InputFormat =
|
export type InputFormat =
|
||||||
|
|
|
@ -5,8 +5,8 @@ import { error } from '../utils/logger.js';
|
||||||
import { metadata } from '../utils/metadata.js';
|
import { metadata } from '../utils/metadata.js';
|
||||||
import { isRemoteImage } from '../utils/paths.js';
|
import { isRemoteImage } from '../utils/paths.js';
|
||||||
import type { OutputFormat, TransformOptions } from './index.js';
|
import type { OutputFormat, TransformOptions } from './index.js';
|
||||||
import { processBuffer } from '../vendor/squoosh/main.js';
|
import { processBuffer } from '../vendor/squoosh/image-pool.js';
|
||||||
import type { Operation } from '../vendor/squoosh/main.js';
|
import type { Operation } from '../vendor/squoosh/image-pool.js';
|
||||||
|
|
||||||
class SquooshService extends BaseSSRService {
|
class SquooshService extends BaseSSRService {
|
||||||
async processAvif(image: any, transform: TransformOptions) {
|
async processAvif(image: any, transform: TransformOptions) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
import { isMainThread } from 'node:worker_threads';
|
import { isMainThread } from 'node:worker_threads';
|
||||||
import WorkerPool from './worker-pool.js';
|
import WorkerPool from '../../utils/workerPool.js';
|
||||||
import * as impl from './impl.js';
|
import * as impl from './impl.js';
|
||||||
import execOnce from './execOnce.js';
|
import execOnce from '../../utils/execOnce.js';
|
||||||
import type { OutputFormat } from '../../loaders/index.js';
|
import type { OutputFormat } from '../../loaders/index.js';
|
||||||
|
|
||||||
type RotateOperation = {
|
type RotateOperation = {
|
||||||
|
@ -18,7 +18,7 @@ export type Operation = RotateOperation | ResizeOperation
|
||||||
|
|
||||||
// HACK! Find the right import assuming this works
|
// HACK! Find the right import assuming this works
|
||||||
const getWorker = execOnce(
|
const getWorker = execOnce(
|
||||||
() => new WorkerPool(6, './node_modules/@astrojs/image/dist/vendor/squoosh/main.js')
|
() => new WorkerPool(6, './node_modules/@astrojs/image/dist/vendor/squoosh/image-pool.js')
|
||||||
)
|
)
|
||||||
|
|
||||||
type DecodeParams = {
|
type DecodeParams = {
|
Loading…
Add table
Reference in a new issue