fix(android): patch android config identifier and avoid Java reserved words

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-28 08:36:30 +08:00
parent 3edfe7030f
commit e4a0955a8e
5 changed files with 116 additions and 15 deletions

View File

@@ -16,7 +16,12 @@ import {
triggerBuildWorkflow,
uploadSiteZip,
} from "../services/github.js";
import { slugifyIdentifier, validateZipBuffer, ZipValidationError } from "../services/zip.js";
import {
normalizeAppIdentifier,
slugifyIdentifier,
validateZipBuffer,
ZipValidationError,
} from "../services/zip.js";
const upload = multer({
storage: multer.memoryStorage(),
@@ -69,9 +74,10 @@ buildsRouter.post("/", upload.single("file"), async (req, res) => {
const { normalizedBuffer } = validateZipBuffer(req.file.buffer, maxUploadBytes);
const jobId = nanoid(10);
const appIdentifier =
identifierInput ||
`com.web2app.${slugifyIdentifier(appName) || jobId.toLowerCase()}`;
const slug = slugifyIdentifier(appName) || jobId.toLowerCase();
const appIdentifier = normalizeAppIdentifier(
identifierInput || `com.web2app.${slug}`,
);
insertBuild({ id: jobId, appName, appIdentifier });