config | component

This commit is contained in:
babayaga 2025-12-29 20:09:32 +01:00
parent e87304508f
commit 24a20b571b
6 changed files with 31 additions and 33 deletions

View File

@ -8,10 +8,10 @@ export const invalid_urls = ["https://example.com/non-existent-image.jpg"];
export const real_urls = [ export const real_urls = [
"https://picsum.photos/200/300", "https://picsum.photos/200/300",
"https://fastly.picsum.photos/id/343/200/300.jpg?hmac=_7ttvLezG-XONDvp0ILwQCv50ivQa_oewm7m6xV2uZA", "https://fastly.picsum.photos/id/343/200/300.jpg?hmac=_7ttvLezG-XONDvp0ILwQCv50ivQa_oewm7m6xV2uZA",
"https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/gallery/latest_controller.jpg", "https://assets.files.polymech.info//products/sheetpress/cassandra-edczmax-rc2/media/gallery/latest_controller.jpg",
"https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=800&h=400&fit=crop", "https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=800&h=400&fit=crop",
"https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/samples/30mm.jpg", "https://assets.files.polymech.info//products/sheetpress/cassandra-edczmax-rc2/media/samples/30mm.jpg",
"https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/samples/DSC05051.JPG", "https://assets.files.polymech.info//products/sheetpress/cassandra-edczmax-rc2/media/samples/DSC05051.JPG",
]; ];
export const default_options = { export const default_options = {

View File

@ -41,7 +41,7 @@ describe("getResolvedSrc", () => {
it("should download another image and verify its height", async () => { it("should download another image and verify its height", async () => {
const src = const src =
"https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/gallery/latest_controller.jpg"; "https://assets.files.polymech.info//products/sheetpress/cassandra-edczmax-rc2/media/gallery/latest_controller.jpg";
const result = await getResolvedSrc(src); const result = await getResolvedSrc(src);
const imagePath = path.join(process.cwd(), result.src); const imagePath = path.join(process.cwd(), result.src);

View File

@ -109,7 +109,7 @@
}, },
"pages": { "pages": {
"home": { "home": {
"hero": "https://assets.osr-plastic.org/machines//assets/newsletter/common/products/extruders/overview-3.jpg", "hero": "https://assets.files.polymech.info/machines//assets/newsletter/common/products/extruders/overview-3.jpg",
"_blog": { "_blog": {
"store": "resources" "store": "resources"
} }

View File

@ -15,7 +15,7 @@
"default": "/images/default-image.png", "default": "/images/default-image.png",
"error": "/images/error-image.png", "error": "/images/error-image.png",
"alt": "Astrofront", "alt": "Astrofront",
"src": "https://assets.osr-plastic.org/machines//assets/newsletter/common/products/extruders/overview-3.jpg" "src": "https://assets.files.polymech.info/machines//assets/newsletter/common/products/extruders/overview-3.jpg"
} }
}, },
"footer_left": [ "footer_left": [
@ -32,9 +32,7 @@
"text": "Newsletter" "text": "Newsletter"
} }
], ],
"footer_right": [ "footer_right": [],
],
"settings": { "settings": {
"search": true, "search": true,
"account": true, "account": true,
@ -76,7 +74,7 @@
}, },
"pages": { "pages": {
"home": { "home": {
"hero": "https://assets.osr-plastic.org/machines//assets/newsletter/common/products/extruders/overview-3.jpg", "hero": "https://assets.files.polymech.info/machines//assets/newsletter/common/products/extruders/overview-3.jpg",
"blog": { "blog": {
"store": "resources" "store": "resources"
} }

View File

@ -1,9 +1,4 @@
--- ---
// import "../styles/flowbite.css"
// import "../styles/global.css"
// import "../styles/custom.scss"
import { sync as read } from '@polymech/fs/read' import { sync as read } from '@polymech/fs/read'
import { default as AstroSeo } from "../seo/AstroSeo.astro" import { default as AstroSeo } from "../seo/AstroSeo.astro"

View File

@ -1,4 +1,19 @@
import { AppConfig } from './app/config.schema.js' import { AppConfig } from './app/config.schema.js'
export type { PolymechConfig };
import * as fs from 'node:fs';
import * as path from 'node:path';
// LLM Registry for aggregating content
export interface LLMItem {
title: string;
url: string;
description: string;
}
interface PolymechConfig { interface PolymechConfig {
// Config groups matching app-config.json // Config groups matching app-config.json
site?: any; site?: any;
@ -150,18 +165,6 @@ class PolymechRegistry {
} }
export const PolymechInstance = PolymechRegistry.getInstance();
export type { PolymechConfig };
import * as fs from 'node:fs';
import * as path from 'node:path';
// LLM Registry for aggregating content
export interface LLMItem {
title: string;
url: string;
description: string;
}
const getCachePath = () => { const getCachePath = () => {
const cacheDir = path.join(process.cwd(), 'node_modules', '.cache'); const cacheDir = path.join(process.cwd(), 'node_modules', '.cache');
@ -211,3 +214,5 @@ export class LLMRegistry {
} }
} }
export const PolymechInstance = PolymechRegistry.getInstance();