refactor: a bit of house keeping

This commit is contained in:
Tony Sullivan 2022-09-15 09:15:24 -05:00
parent bcc0b4c42f
commit 76c9782845
6 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,4 @@
import { htmlColorNames, type NamedColor } from './colornames.js';
import { htmlColorNames, type NamedColor } from '../utils/colornames.js';
/// <reference types="astro/astro-jsx" />
export type InputFormat =

View file

@ -5,8 +5,8 @@ import { error } from '../utils/logger.js';
import { metadata } from '../utils/metadata.js';
import { isRemoteImage } from '../utils/paths.js';
import type { OutputFormat, TransformOptions } from './index.js';
import { processBuffer } from '../vendor/squoosh/main.js';
import type { Operation } from '../vendor/squoosh/main.js';
import { processBuffer } from '../vendor/squoosh/image-pool.js';
import type { Operation } from '../vendor/squoosh/image-pool.js';
class SquooshService extends BaseSSRService {
async processAvif(image: any, transform: TransformOptions) {

View file

@ -1,8 +1,8 @@
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 execOnce from './execOnce.js';
import execOnce from '../../utils/execOnce.js';
import type { OutputFormat } from '../../loaders/index.js';
type RotateOperation = {
@ -18,7 +18,7 @@ export type Operation = RotateOperation | ResizeOperation
// HACK! Find the right import assuming this works
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 = {