fix: Fix product page syntax errors

1. Remove duplicate/broken code in product tables section
2. Fix PostCSS config for Tailwind 4
3. Add @tailwindcss/postcss dependency
4. Remove --production flag from Dockerfile (sharp required)

All fixes enable successful Docker build with favicon working.
This commit is contained in:
Kunthawat Greethong
2026-03-03 14:57:46 +07:00
parent a26dad6159
commit 6562a1748f
10139 changed files with 1502525 additions and 19 deletions

View File

@@ -0,0 +1,17 @@
import type { Logger } from '../../../core/logger/core.js';
import type { KeyGenerator } from '../definitions.js';
interface Options {
logger: Logger;
keyGenerator: KeyGenerator;
}
export declare const createKeyCommand: {
help: {
commandName: string;
tables: {
Flags: [string, string][];
};
description: string;
};
run({ logger, keyGenerator }: Options): Promise<void>;
};
export {};

View File

@@ -0,0 +1,22 @@
import { defineCommand } from "../../domain/command.js";
const createKeyCommand = defineCommand({
help: {
commandName: "astro create-key",
tables: {
Flags: [["--help (-h)", "See all available flags."]]
},
description: "Generates a key to encrypt props passed to server islands."
},
async run({ logger, keyGenerator }) {
const key = await keyGenerator.generate();
logger.info(
"crypto",
`Generated a key to encrypt props passed to server islands. To reuse the same key across builds, set this value as ASTRO_KEY in an environment variable on your build server.
ASTRO_KEY=${key}`
);
}
});
export {
createKeyCommand
};

View File

@@ -0,0 +1,3 @@
export interface KeyGenerator {
generate: () => Promise<string>;
}

View File

View File

@@ -0,0 +1,4 @@
import type { KeyGenerator } from '../definitions.js';
export declare class CryptoKeyGenerator implements KeyGenerator {
generate(): Promise<string>;
}

View File

@@ -0,0 +1,11 @@
import { createKey, encodeKey } from "../../../core/encryption.js";
class CryptoKeyGenerator {
async generate() {
const key = await createKey();
const encoded = await encodeKey(key);
return encoded;
}
}
export {
CryptoKeyGenerator
};