ci: jsr registry test

This commit is contained in:
Jozef Steinhübl 2024-12-08 19:11:17 +01:00
parent 95fe79d023
commit e8a5565c78
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F
3 changed files with 42 additions and 7 deletions

View file

@ -5,7 +5,7 @@ import { info } from "@actions/core";
export type Registry = {
url: string;
scope: string;
token: string;
token?: string;
};
enum FieldType {
@ -40,7 +40,9 @@ export function createField(registry: Registry): Field {
if (url && owner) {
return {
type: FieldType.INSTALL_WITH_SCOPE,
value: `'${owner}' = { token = "${token}", url = "${url}" }`,
value: `'${owner}' = { url = "${url}"${
token ? `, token = "${token}"` : ""
} }`,
};
}