@gtkx/config 2.0.0-beta.12 → 2.0.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/builtin-elements.d.ts +13 -1
- package/dist/builtin-elements.d.ts.map +1 -1
- package/dist/builtin-elements.js +47 -10
- package/dist/builtin-elements.js.map +1 -1
- package/dist/config-source.d.ts +2 -2
- package/dist/config-source.d.ts.map +1 -1
- package/dist/config-source.js +10 -7
- package/dist/config-source.js.map +1 -1
- package/dist/config.d.ts +256 -57
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +27 -72
- package/dist/config.js.map +1 -1
- package/dist/deploy.d.ts +930 -55
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +6 -161
- package/dist/deploy.js.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/loader.d.ts +20 -4
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +51 -18
- package/dist/loader.js.map +1 -1
- package/dist/virtual.d.ts.map +1 -1
- package/dist/virtual.js +1 -0
- package/dist/virtual.js.map +1 -1
- package/dist/vite-plugin.d.ts +5 -0
- package/dist/vite-plugin.d.ts.map +1 -1
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +5 -5
- package/src/builtin-elements.ts +49 -10
- package/src/config-source.ts +11 -7
- package/src/config.ts +289 -91
- package/src/deploy.ts +991 -199
- package/src/index.ts +39 -2
- package/src/internal.ts +1 -0
- package/src/loader.ts +96 -22
- package/src/virtual.ts +1 -0
- package/src/vite-plugin.ts +5 -0
package/dist/deploy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"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AAiB,CAAC,QAAQ,EAAE;IAClC,wDAAwD;IACxD,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC7B,0CAA0C;IAC1C,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;IACjC,kCAAkC;IAClC,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,uDAAuD;IACvD,GAAG,EAAE,SAAS,CAAC,QAAQ,EAAE;IACzB,iEAAiE;IACjE,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;IACjC,oDAAoD;IACpD,GAAG,EAAE,SAAS,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAEH,OAAO,EACH,YAAY,GAOf,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { fileExtension, flag, girLibrary, relativePathRecord, text, textList, textRecord, url } from \"./schema-text.ts\";\n\nconst DEB_COMPRESSIONS = [\"gzip\", \"none\", \"xz\", \"zstd\"] as const;\nconst DEB_SIGN_METHODS = [\"debsign\", \"dpkg-sig\"] as const;\nconst DEB_SIGN_TYPES = [\"archive\", \"maint\", \"origin\"] as const;\nconst DEPLOY_ARCH_NAMES = [\"arm64\", \"x64\"] as const;\nconst DEPLOY_TARGET_NAMES = [\"appimage\", \"deb\", \"flatpak\", \"rpm\"] as const;\nconst FLATPAK_MODES = [\"prebuilt\", \"source\"] as const;\nconst NODE_SOURCES = [\"download\", \"host\", \"path\"] as const;\nconst OARS_INTENSITIES = [\"intense\", \"mild\", \"moderate\", \"none\"] as const;\nconst PACKAGE_MANAGERS = [\"npm\", \"pnpm\", \"yarn\"] as const;\nconst RELEASE_TYPES = [\"development\", \"snapshot\", \"stable\"] as const;\nconst RELEASE_URGENCIES = [\"critical\", \"high\", \"low\", \"medium\"] as const;\nconst RPM_COMPRESSIONS = [\"gzip\", \"lzma\", \"xz\", \"zstd\"] as const;\n\nconst URL_KINDS = [\n \"bugtracker\",\n \"contact\",\n \"contribute\",\n \"donation\",\n \"faq\",\n \"help\",\n \"translate\",\n \"vcs-browser\",\n] as const;\n\nconst BOOLEAN_ERROR = \"must be a boolean\";\nconst EPOCH_ERROR = \"must be a non-negative integer\";\nconst EXTRA_FILE_ERROR = \"must be a source path or a { source, mode } entry\";\nconst FILE_MODE_ERROR = \"must be an octal file mode without setuid or setgid bits, such as 755\";\nconst FILE_MODE_PATTERN = /^[0-7]{3,4}$/;\nconst FILE_MODE_RADIX = 8;\nconst PRIVILEGED_FILE_MODE_MASK = 0o6000;\nconst HEX_COLOR_ERROR = \"must be a #rrggbb color\";\nconst HEX_COLOR_PATTERN = /^#[\\dA-Fa-f]{6}$/;\nconst KEY_FILE_ERROR = \"must be a path to a PGP key file\";\nconst KEY_ID_ERROR = \"must be a PGP key id\";\nconst LAUNCHER_ENV_ERROR = \"must be a record of POSIX environment names to values without null bytes\";\nconst LAUNCHER_ENV_NAME_ERROR = \"must be a POSIX environment name\";\nconst LAUNCHER_ENV_NAME_PATTERN = /^[A-Za-z_]\\w*$/;\nconst MINIMUM_LIBRARY_VERSION_ERROR = \"must be a version such as 4.18\";\nconst MINIMUM_LIBRARY_VERSION_PATTERN = /^\\d+(?:\\.\\d+)*$/;\nconst MINIMUM_LIBRARY_VERSIONS_ERROR = \"must be a record of GIR library ids to a minimum version\";\nconst NODE_FLAG_ERROR = \"must be a Node.js flag beginning with a hyphen and containing no null bytes\";\nconst LIBRARY_ID_ERROR = 'must be a GIR library identifier of the form \"Name-Version\", such as \"Adw-1\"';\nconst SCRIPT_ERROR = \"must be a path to a shell script\";\nconst SOURCE_PATH_ERROR = \"must be a source path\";\nconst SPDX_ERROR = \"must be an SPDX license expression\";\nconst URL_ERROR = \"must be an absolute URL\";\nconst VERSION_ERROR = \"must be a version string\";\nconst hexColorSchema = z.string({ error: HEX_COLOR_ERROR }).regex(HEX_COLOR_PATTERN, { error: HEX_COLOR_ERROR });\n\nconst minimumLibraryVersionSchema = z\n .string({ error: MINIMUM_LIBRARY_VERSION_ERROR })\n .regex(MINIMUM_LIBRARY_VERSION_PATTERN, { error: MINIMUM_LIBRARY_VERSION_ERROR });\n\nconst minimumLibraryVersionsSchema = z.record(girLibrary(LIBRARY_ID_ERROR), minimumLibraryVersionSchema, {\n error: MINIMUM_LIBRARY_VERSIONS_ERROR,\n});\n\nconst relationsSchema = z.strictObject({\n /** Package relations expressed in Debian dependency syntax. */\n deb: textList(\"Debian package relation\", \"must be an array of Debian package relations\").optional(),\n /** Package relations expressed in RPM dependency syntax. */\n rpm: textList(\"RPM package relation\", \"must be an array of RPM package relations\").optional(),\n});\n\nconst developerSchema = z.strictObject({\n /** Reverse-DNS developer identifier, derived from the application ID when omitted. */\n id: text(\"must be a reverse-DNS developer id\").optional(),\n /** Developer or organization name. Defaults to the author in package.json. */\n name: text(\"must be a developer or organization name\").optional(),\n /** Maintainer email address. Defaults to the author's email in package.json. */\n email: text(\"must be an email address\").optional(),\n});\n\n/** One software-center screenshot in `deploy.screenshots`. Either `url` or `file` must be set. */\ntype DeployScreenshotOptions = z.infer<typeof screenshotSchema>;\n\n/** Screenshot entry schema and the source of {@link DeployScreenshotOptions}. */\nconst screenshotSchema = z\n .strictObject({\n /** Absolute URL of a PNG or JPEG screenshot. Takes precedence over `file`. */\n url: url(\"must be an absolute URL to a PNG or JPEG\").optional(),\n /** Screenshot path relative to the project root, resolved against `screenshotBaseUrl`. */\n file: text(\"must be an image path relative to the project root\").optional(),\n /** Caption displayed with the screenshot in software centers. */\n caption: text(\"must be a screenshot caption\").optional(),\n /** Marks the primary screenshot. Only the first entry set to `true` is used. */\n isDefault: flag(BOOLEAN_ERROR).optional(),\n })\n .refine((entry) => entry.url !== undefined || entry.file !== undefined, {\n error: \"must have either a `url` or a `file`\",\n });\n\n/** One AppStream release-history entry in `deploy.releases`. */\ntype DeployReleaseOptions = z.infer<typeof releaseSchema>;\n\n/** Release-history entry schema and the source of {@link DeployReleaseOptions}. */\nconst releaseSchema = z.strictObject({\n /** Application version described by this release. */\n version: text(VERSION_ERROR),\n /** Release date in `YYYY-MM-DD` format. */\n date: z.iso.date({ error: \"must be an ISO date (YYYY-MM-DD)\" }),\n /** AppStream release classification. */\n type: z.enum(RELEASE_TYPES, { error: \"must be one of development, snapshot, stable\" }).optional(),\n /** AppStream update urgency. */\n urgency: z.enum(RELEASE_URGENCIES, { error: \"must be one of critical, high, low, medium\" }).optional(),\n /** Release notes, with each entry rendered as a paragraph. */\n notes: textList(\"release note paragraph\", \"must be an array of release note paragraphs\").optional(),\n /** Absolute URL containing further details about the release. */\n url: url(URL_ERROR).optional(),\n});\n\n/** One file extension and MIME type registered through `deploy.fileAssociations`. */\ntype DeployFileAssociationOptions = z.infer<typeof fileAssociationSchema>;\n\n/** File association schema and the source of {@link DeployFileAssociationOptions}. */\nconst fileAssociationSchema = z.strictObject({\n /** File extension to associate with the application, without a leading dot. */\n extension: fileExtension(\"must be a file extension without a leading dot\"),\n /** MIME type registered for the file extension. */\n mimeType: text(\"must be a MIME type such as text/plain\"),\n /** Human-readable description of the file type. */\n description: text(\"must be a description of the file type\").optional(),\n});\n\n/** One desktop launcher action in `deploy.desktopActions`, keyed by its action ID. */\ntype DeployDesktopActionOptions = z.infer<typeof desktopActionSchema>;\n\n/** Desktop launcher action schema and the source of {@link DeployDesktopActionOptions}. */\nconst desktopActionSchema = z.strictObject({\n /** Action label shown in the desktop launcher menu. */\n name: text(\"must be an action name\"),\n /** Arguments passed to the application when the action is activated. */\n args: textList(\"argument\", \"must be an array of arguments appended to Exec\").optional(),\n /** Icon theme name used for the action. */\n icon: text(\"must be an icon name\").optional(),\n});\n\nconst brandingSchema = z.strictObject({\n /** Primary AppStream branding color for light mode, in `#rrggbb` format. */\n light: hexColorSchema,\n /** Primary AppStream branding color for dark mode, in `#rrggbb` format. */\n dark: hexColorSchema,\n});\n\n/**\n * A `deploy.extraFiles` entry in object form: the source file, resolved against the project root, that is\n * installed at the entry's prefix-relative destination, and the octal mode it is installed with.\n */\ntype DeployExtraFileOptions = {\n /** Source file path, resolved relative to the project root. */\n source: string;\n /** Octal file mode. Setuid and setgid bits are rejected. */\n mode?: string | undefined;\n};\nconst extraFileSchema: z.ZodType<DeployExtraFileOptions> = z.strictObject({\n /** Source file path, resolved relative to the project root. */\n source: text(SOURCE_PATH_ERROR),\n /** Octal file mode. Setuid and setgid bits are rejected. */\n mode: z\n .string({ error: FILE_MODE_ERROR })\n .regex(FILE_MODE_PATTERN, { error: FILE_MODE_ERROR })\n .refine((mode) => (Number.parseInt(mode, FILE_MODE_RADIX) & PRIVILEGED_FILE_MODE_MASK) === 0, {\n error: FILE_MODE_ERROR,\n })\n .optional(),\n});\n\nconst extraFileEntrySchema = z.union([text(SOURCE_PATH_ERROR), extraFileSchema], { error: EXTRA_FILE_ERROR });\n\nconst launcherEnvSchema = z.record(\n z.string({ error: LAUNCHER_ENV_NAME_ERROR }).regex(LAUNCHER_ENV_NAME_PATTERN, { error: LAUNCHER_ENV_NAME_ERROR }),\n z.string({ error: LAUNCHER_ENV_ERROR }).refine((value) => !value.includes(\"\\0\"), { error: LAUNCHER_ENV_ERROR }),\n { error: (issue) => (issue.code === \"invalid_key\" ? LAUNCHER_ENV_NAME_ERROR : LAUNCHER_ENV_ERROR) },\n);\n\nconst nodeFlagsSchema = z.array(\n z\n .string({ error: NODE_FLAG_ERROR })\n .refine((value) => value.startsWith(\"-\") && !value.includes(\"\\0\"), { error: NODE_FLAG_ERROR }),\n { error: \"must be an array of Node.js flags\" },\n);\n\n/**\n * The `deploy.node` options: where the Node.js runtime bundled with the application comes from, the version it\n * is expected to be, whether its binary is stripped, and whether the launcher enables the compile cache.\n */\ntype DeployNodeOptions = {\n /** Runtime source: an official download, the running Node.js executable, or `path`. Defaults to `download`. */\n source?: \"download\" | \"host\" | \"path\" | undefined;\n /** Expected Node.js version. Downloaded runtimes default to exactly 26.8.2 when omitted. */\n version?: string | undefined;\n /** Node.js executable path relative to the project root, required when `source` is `path`. */\n path?: string | undefined;\n /** Strip the runtime when its architecture matches the host and `strip` is available. Defaults to `true`. */\n shouldStrip?: boolean | undefined;\n /** Enable Node.js compile caching in the generated launcher. Defaults to `true`. */\n shouldUseCompileCache?: boolean | undefined;\n};\nconst nodeRuntimeSchema: z.ZodType<DeployNodeOptions> = z.strictObject({\n /** Runtime source: an official download, the running Node.js executable, or `path`. Defaults to `download`. */\n source: z.enum(NODE_SOURCES, { error: \"must be one of download, host, path\" }).optional(),\n /** Expected Node.js version. Downloaded runtimes default to exactly 26.8.2 when omitted. */\n version: text(\"must be a Node.js version such as 26.7.0\").optional(),\n /** Node.js executable path relative to the project root, required when `source` is `path`. */\n path: text(\"must be a path to a node binary\").optional(),\n /** Strip the runtime when its architecture matches the host and `strip` is available. Defaults to `true`. */\n shouldStrip: flag(BOOLEAN_ERROR).optional(),\n /** Enable Node.js compile caching in the generated launcher. Defaults to `true`. */\n shouldUseCompileCache: flag(BOOLEAN_ERROR).optional(),\n});\n\nconst scriptsSchema = z.strictObject({\n /** Shell script run before installing a Debian or RPM package. */\n preInstall: text(SCRIPT_ERROR).optional(),\n /** Shell script run after installing a Debian or RPM package. */\n postInstall: text(SCRIPT_ERROR).optional(),\n /** Shell script run before removing a Debian or RPM package. */\n preRemove: text(SCRIPT_ERROR).optional(),\n /** Shell script run after removing a Debian or RPM package. */\n postRemove: text(SCRIPT_ERROR).optional(),\n});\n\nconst toolsSchema = z.strictObject({\n /** nFPM executable name or path relative to the project root. Defaults to a verified pinned download. */\n nfpm: text(\"must be an nFPM executable name or path\").optional(),\n});\n\nconst debSchema = z.strictObject({\n /** Debian package name. Defaults to `deploy.binaryName`. */\n packageName: text(\"must be a Debian package name\").optional(),\n /** Debian archive section, derived from the application categories when omitted. */\n section: text(\"must be a Debian archive section\").optional(),\n /** Debian package priority. Defaults to `optional`. */\n priority: text(\"must be a Debian priority\").optional(),\n /** Compression used for the Debian package payload. */\n compression: z.enum(DEB_COMPRESSIONS, { error: \"must be one of gzip, none, xz, zstd\" }).optional(),\n /** Additional Debian control fields, keyed by field name. */\n fields: textRecord(\"must be a control field value\", \"must be a record of control field names to values\").optional(),\n});\n\nconst rpmSchema = z.strictObject({\n /** RPM package name. Defaults to `deploy.binaryName`. */\n packageName: text(\"must be an RPM package name\").optional(),\n /** RPM package group, derived from the application categories when omitted. */\n group: text(\"must be an RPM group\").optional(),\n /** Compression used for the RPM package payload. */\n compression: z.enum(RPM_COMPRESSIONS, { error: \"must be one of gzip, lzma, xz, zstd\" }).optional(),\n /** Installation prefixes that the RPM package allows users to relocate. */\n prefixes: textList(\"prefix\", \"must be an array of relocation prefixes\").optional(),\n});\n\nconst appimageSchema = z.strictObject({\n /** Output file name, derived from the application name, version, and architecture when omitted. */\n fileName: text(\"must be an output file name\").optional(),\n /** Compression explicitly requested from appimagetool. */\n compression: z.literal(\"zstd\", { error: \"must be zstd\" }).optional(),\n /** AppImage update information string embedded in the executable. */\n updateInformation: text(\"must be an AppImage update information string\").optional(),\n /** Custom AppImage runtime file path, resolved relative to the project root. */\n runtimeFile: text(\"must be a path to an AppImage runtime file\").optional(),\n});\n\nconst flatpakSourceSchema = z.strictObject({\n /** Public HTTP or HTTPS Git repository URL. Defaults to the project's Git remote. */\n url: url(\"must be an absolute git URL\").optional(),\n /** Git tag to build, pinned to its commit when `commit` is omitted. */\n tag: text(\"must be a git tag\").optional(),\n /** Git commit to build. Defaults to the configured tag's commit or the current HEAD. */\n commit: text(\"must be a git commit sha\").optional(),\n});\n\nconst flatpakSchema = z.strictObject({\n /** Package local build output or build from a pinned Git source inside the SDK. Defaults to `prebuilt`. */\n mode: z.enum(FLATPAK_MODES, { error: 'must be \"prebuilt\" or \"source\"' }).optional(),\n /** Flatpak runtime ID. Defaults to `org.gnome.Platform`. */\n runtime: text(\"must be a runtime id\").optional(),\n /** Flatpak runtime branch. Defaults to `50`. */\n runtimeVersion: text('must be a runtime branch such as \"50\"').optional(),\n /** Build SDK ID. Defaults to `org.gnome.Sdk`. */\n sdk: text(\"must be an SDK id\").optional(),\n /** Node.js SDK extension used in source mode. Defaults to `org.freedesktop.Sdk.Extension.node26`. */\n nodeExtension: text(\"must be a Node SDK extension id\").optional(),\n /** Additional SDK extension IDs included in the build environment. */\n sdkExtensions: textList(\"SDK extension id\", \"must be an array of SDK extension ids\").optional(),\n /** Optional Flatpak base application ID. */\n base: text(\"must be a base app id\").optional(),\n /** Branch of the base application. */\n baseVersion: text(\"must be a base app version\").optional(),\n /** Exported application branch. Defaults to `stable`. */\n branch: text(\"must be a branch name\").optional(),\n /** Sandbox permissions added to display, IPC, and GPU defaults. Negations remove matching defaults. */\n finishArgs: textList(\"finish argument\", \"must be an array of flatpak finish arguments\").optional(),\n /** Patterns added to header, pkg-config, and static-library cleanup defaults. An empty array disables cleanup. */\n cleanup: textList(\"cleanup pattern\", \"must be an array of cleanup patterns\").optional(),\n /** Additional shell commands appended to the application's Flatpak build commands. */\n buildCommands: textList(\"shell command\", \"must be an array of shell commands\").optional(),\n /** Additional Flatpak manifest modules built before the application module. */\n modules: z.array(z.unknown(), { error: \"must be an array of flatpak module objects\" }).optional(),\n /** Git repository and revision used for source builds. */\n source: flatpakSourceSchema.optional(),\n /** Package manager used for offline source builds, detected from the project's lockfiles when omitted. */\n packageManager: z.enum(PACKAGE_MANAGERS, { error: \"must be one of npm, pnpm, yarn\" }).optional(),\n /** Lockfile path relative to the project root. Defaults to the selected package manager's standard lockfile. */\n lockfile: text(\"must be a path to a lockfile\").optional(),\n /** Runtime repository URL embedded in the bundle. Defaults to Flathub's `.flatpakrepo` URL. */\n runtimeRepo: url(\"must be an absolute .flatpakrepo URL\").optional(),\n /** Emit a `.flatpak` bundle in addition to the local repository. Defaults to `true`. */\n shouldEmitBundle: flag(BOOLEAN_ERROR).optional(),\n /** Install the built application into the current user's Flatpak installation. Defaults to `false`. */\n shouldInstall: flag(BOOLEAN_ERROR).optional(),\n /** Allow flatpak-builder to use rofiles-fuse. Set to `false` where FUSE is unavailable. */\n shouldUseRofilesFuse: flag(BOOLEAN_ERROR).optional(),\n});\n\nconst debSigningSchema = z.strictObject({\n /** PGP private key file used to sign the Debian package. */\n keyFile: text(KEY_FILE_ERROR),\n /** PGP signing key ID. */\n keyId: text(KEY_ID_ERROR).optional(),\n /** Debian package signing method. */\n method: z.enum(DEB_SIGN_METHODS, { error: 'must be \"debsign\" or \"dpkg-sig\"' }).optional(),\n /** Debian signature role. */\n type: z.enum(DEB_SIGN_TYPES, { error: \"must be one of archive, maint, origin\" }).optional(),\n /** Name and email address recorded as the signer. */\n signer: text(\"must be a signer name and email\").optional(),\n});\n\nconst rpmSigningSchema = z.strictObject({\n /** PGP private key file used to sign the RPM package. */\n keyFile: text(KEY_FILE_ERROR),\n /** PGP signing key ID. */\n keyId: text(KEY_ID_ERROR).optional(),\n});\n\nconst flatpakSigningSchema = z.strictObject({\n /** GPG key ID used to sign the Flatpak bundle. */\n gpgKeyId: text(\"must be a GPG key id\"),\n /** GPG home directory containing the signing key. */\n gpgHomeDir: text(\"must be a path to a GPG home directory\").optional(),\n});\n\nconst appimageSigningSchema = z.strictObject({\n /** GPG key ID used by appimagetool to sign the AppImage. */\n gpgKeyId: text(\"must be a GPG key id\"),\n});\n\nconst signingSchema = z.strictObject({\n /** AppImage signing options. */\n appimage: appimageSigningSchema.optional(),\n /** Debian package signing options. */\n deb: debSigningSchema.optional(),\n /** Flatpak bundle signing options. */\n flatpak: flatpakSigningSchema.optional(),\n /** RPM package signing options. */\n rpm: rpmSigningSchema.optional(),\n});\n\nconst extraRelationsSchema = z.strictObject({\n /** Recommended packages that extend the application's functionality. */\n recommends: relationsSchema.optional(),\n /** Suggested companion packages. */\n suggests: relationsSchema.optional(),\n /** Package names or capabilities supplied by this package. */\n provides: relationsSchema.optional(),\n /** Packages that cannot be installed alongside this package. */\n conflicts: relationsSchema.optional(),\n /** Packages whose files this package may replace. */\n replaces: relationsSchema.optional(),\n /** Debian packages made incompatible by installing this package. Uses the `deb` entries. */\n breaks: relationsSchema.optional(),\n /** Debian dependencies required before unpacking this package. Uses the `deb` entries. */\n preDepends: relationsSchema.optional(),\n});\n\nconst deploySchema = z.strictObject({\n /** Package formats to build. Defaults to `[\"flatpak\"]`; overridden by `gtkx deploy --target`. */\n targets: z\n .array(z.enum(DEPLOY_TARGET_NAMES, { error: \"must be one of appimage, deb, flatpak, rpm\" }), {\n error: \"must be an array of deploy targets\",\n })\n .optional(),\n /** Target CPU architectures. Defaults to the host architecture; overridden by `gtkx deploy --arch`. */\n architectures: z\n .array(z.enum(DEPLOY_ARCH_NAMES, { error: \"must be one of arm64, x64\" }), {\n error: \"must be an array of deploy architectures\",\n })\n .optional(),\n /** Deployment directory relative to the project root. Defaults to `build`, with packages in its `out` directory. */\n outDir: text(\"must be a directory path relative to the project root\").optional(),\n /** Display name, derived from package.json's name or the application ID when omitted. */\n name: text(\"must be the display name shown in the launcher\").optional(),\n /** Generic application description shown by desktop launchers, such as `Text Editor`. */\n genericName: text(\"must be a generic application name\").optional(),\n /** Launcher command name, derived from package.json's name or the application ID when omitted. */\n binaryName: text(\"must be a kebab-case command name\").optional(),\n /** Application version. Defaults to the version in package.json. */\n version: text(VERSION_ERROR).optional(),\n /** Debian packaging revision and RPM release. Defaults to `1`. */\n release: text(\"must be a packaging revision\").optional(),\n /** Non-negative Debian and RPM version epoch, omitted from package metadata unless configured. */\n epoch: z.int({ error: EPOCH_ERROR }).min(0, { error: EPOCH_ERROR }).optional(),\n /** Single-line summary without a trailing period. Defaults to the first line of package.json's description. */\n summary: text(\"must be a single-line summary without a trailing period\").optional(),\n /** Long description as paragraphs. Defaults to the summary when omitted or empty. */\n description: textList(\"description paragraph\", \"must be an array of description paragraphs\").optional(),\n /** Search keywords included in the desktop entry and AppStream metadata. */\n keywords: textList(\"search keyword\", \"must be an array of search keywords\").optional(),\n /** Freedesktop application categories used by launchers, software centers, and package metadata. */\n categories: textList(\"freedesktop category\", \"must be an array of freedesktop categories\").optional(),\n /** Supported MIME types, combined with types from file associations and URL protocols. */\n mimeTypes: textList(\"MIME type\", \"must be an array of MIME types\").optional(),\n /** Developer identity and package maintainer details. */\n developer: developerSchema.optional(),\n /** Application license as an SPDX expression. Defaults to the license in package.json. */\n license: text(SPDX_ERROR).optional(),\n /** License file path relative to the project root, detected from common LICENSE or COPYING names when omitted. */\n licenseFile: text(\"must be a path to a license file\").optional(),\n /** SPDX license expression for the AppStream metadata. Defaults to `CC0-1.0`. */\n metadataLicense: text(SPDX_ERROR).optional(),\n /** Copyright notice. Defaults to the build year and developer name. */\n copyright: text(\"must be a copyright line\").optional(),\n /** Application homepage URL. Defaults to the homepage in package.json. */\n homepage: url(URL_ERROR).optional(),\n /** Additional AppStream links keyed by their purpose, such as `bugtracker` or `help`. */\n urls: z\n .partialRecord(z.enum(URL_KINDS), url(URL_ERROR), {\n error: \"must be a record of AppStream url kinds to URLs\",\n })\n .optional(),\n /**\n * Screenshots for software centers. Each entry requires a `url` or `file`.\n * @see {@link DeployScreenshotOptions} for the fields accepted by each entry.\n */\n screenshots: z.array(screenshotSchema, { error: \"must be an array of screenshots\" }).optional(),\n /** Base URL for screenshot files, inferred from a GitHub or GitLab remote when omitted. */\n screenshotBaseUrl: url(\"must be an absolute base URL\").optional(),\n /** Primary branding colors included in AppStream metadata. */\n branding: brandingSchema.optional(),\n /** OARS 1.1 content-rating attributes mapped to their intensities. */\n contentRating: z\n .record(z.string(), z.enum(OARS_INTENSITIES, { error: \"must be one of intense, mild, moderate, none\" }), {\n error: \"must be a record of OARS 1.1 attribute ids to intensities\",\n })\n .optional(),\n /**\n * AppStream release history, sorted newest first. Defaults to the application version and build date.\n * @see {@link DeployReleaseOptions} for the fields accepted by each entry.\n */\n releases: z.array(releaseSchema, { error: \"must be an array of releases\" }).optional(),\n /** Application arguments included in the desktop entry's launch command. */\n execArgs: textList(\"argument\", \"must be an array of arguments appended to Exec\").optional(),\n /** Environment variables exported by the generated launcher. Keys must be POSIX environment names. */\n launcherEnv: launcherEnvSchema.optional(),\n /** Node.js flags placed before the application bundle in the generated launcher. */\n nodeFlags: nodeFlagsSchema.optional(),\n /**\n * File extensions and MIME types registered for the application.\n * @see {@link DeployFileAssociationOptions} for the fields accepted by each entry.\n */\n fileAssociations: z.array(fileAssociationSchema, { error: \"must be an array of file associations\" }).optional(),\n /** URL schemes handled by the application, registered as `x-scheme-handler` MIME types. */\n protocols: textList(\"URL scheme\", \"must be an array of URL schemes\").optional(),\n /**\n * Desktop launcher actions keyed by action ID.\n * @see {@link DeployDesktopActionOptions} for the fields accepted by each entry.\n */\n desktopActions: z\n .record(z.string(), desktopActionSchema, { error: \"must be a record of action ids to actions\" })\n .optional(),\n /**\n * Additional desktop entry keys, overriding non-reserved generated values.\n * `DBusActivatable` and `Version` are rejected; use `deploy.isDbusActivatable` for D-Bus activation.\n */\n desktopEntry: textRecord(\n \"must be a desktop entry value\",\n \"must be a record of desktop entry keys to values\",\n ).optional(),\n /** Additional XML fragments appended to the AppStream component. */\n metainfoExtra: textList(\"AppStream XML fragment\", \"must be an array of AppStream XML fragments\").optional(),\n /** Enable D-Bus activation in the desktop entry and generate a session bus service file. Defaults to `false`. */\n isDbusActivatable: flag(BOOLEAN_ERROR).optional(),\n /** Extra files keyed by destination inside the install prefix, with source paths relative to the project root. */\n extraFiles: relativePathRecord(\n \"must be a destination path inside the install prefix, without a leading slash or a .. segment\",\n extraFileEntrySchema,\n \"must be a record of prefix-relative destinations to source paths or { source, mode } entries\",\n ).optional(),\n /** Minimum runtime library versions keyed by GIR library ID, used when deriving package dependencies. */\n minimumLibraryVersions: minimumLibraryVersionsSchema.optional(),\n /** Additional Debian and RPM dependencies merged with automatically detected dependencies. */\n depends: relationsSchema.optional(),\n /** Additional package relationships for Debian and RPM. */\n relations: extraRelationsSchema.optional(),\n /** Installation and removal scripts for Debian and RPM packages. */\n scripts: scriptsSchema.optional(),\n /** Node.js runtime bundled with prebuilt packages and launcher compile-cache settings. */\n node: nodeRuntimeSchema.optional(),\n /** Overrides for executables used to build packages. */\n tools: toolsSchema.optional(),\n /** Per-format package signing options. */\n signing: signingSchema.optional(),\n /** AppImage packaging options. */\n appimage: appimageSchema.optional(),\n /** Debian package metadata and compression options. */\n deb: debSchema.optional(),\n /** Flatpak runtime, sandbox, build, and distribution options. */\n flatpak: flatpakSchema.optional(),\n /** RPM package metadata and compression options. */\n rpm: rpmSchema.optional(),\n});\n\nexport {\n deploySchema,\n type DeployDesktopActionOptions,\n type DeployExtraFileOptions,\n type DeployFileAssociationOptions,\n type DeployNodeOptions,\n type DeployReleaseOptions,\n type DeployScreenshotOptions,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAExH,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAU,CAAC;AACjE,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,UAAU,CAAU,CAAC;AAC1D,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAC/D,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,KAAK,CAAU,CAAC;AACpD,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAC3E,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAU,CAAC;AACtD,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAC3D,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAC1E,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAC1D,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,UA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AAS,CAAC,QAAQ,EAAE;CAC5B,CAAoC,CAAC;AAEtC,OAAO,EACH,YAAY,GAyBf,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { fileExtension, flag, girLibrary, relativePathRecord, text, textList, textRecord, url } from \"./schema-text.ts\";\n\nconst DEB_COMPRESSIONS = [\"gzip\", \"none\", \"xz\", \"zstd\"] as const;\nconst DEB_SIGN_METHODS = [\"debsign\", \"dpkg-sig\"] as const;\nconst DEB_SIGN_TYPES = [\"archive\", \"maint\", \"origin\"] as const;\nconst DEPLOY_ARCH_NAMES = [\"arm64\", \"x64\"] as const;\nconst DEPLOY_TARGET_NAMES = [\"appimage\", \"deb\", \"flatpak\", \"rpm\"] as const;\nconst FLATPAK_MODES = [\"prebuilt\", \"source\"] as const;\nconst NODE_SOURCES = [\"download\", \"host\", \"path\"] as const;\nconst OARS_INTENSITIES = [\"intense\", \"mild\", \"moderate\", \"none\"] as const;\nconst PACKAGE_MANAGERS = [\"npm\", \"pnpm\", \"yarn\"] as const;\nconst RELEASE_TYPES = [\"development\", \"snapshot\", \"stable\"] as const;\nconst RELEASE_URGENCIES = [\"critical\", \"high\", \"low\", \"medium\"] as const;\nconst RPM_COMPRESSIONS = [\"gzip\", \"lzma\", \"xz\", \"zstd\"] as const;\n\nconst URL_KINDS = [\n \"bugtracker\",\n \"contact\",\n \"contribute\",\n \"donation\",\n \"faq\",\n \"help\",\n \"translate\",\n \"vcs-browser\",\n] as const;\n\nconst BOOLEAN_ERROR = \"must be a boolean\";\nconst EPOCH_ERROR = \"must be a non-negative integer\";\nconst EXTRA_FILE_ERROR = \"must be a source path or a { source, mode } entry\";\nconst FILE_MODE_ERROR = \"must be an octal file mode without setuid or setgid bits, such as 755\";\nconst FILE_MODE_PATTERN = /^[0-7]{3,4}$/;\nconst FILE_MODE_RADIX = 8;\nconst PRIVILEGED_FILE_MODE_MASK = 0o6000;\nconst HEX_COLOR_ERROR = \"must be a #rrggbb color\";\nconst HEX_COLOR_PATTERN = /^#[\\dA-Fa-f]{6}$/;\nconst KEY_FILE_ERROR = \"must be a path to a PGP key file\";\nconst KEY_ID_ERROR = \"must be a PGP key id\";\nconst LAUNCHER_ENV_ERROR = \"must be a record of POSIX environment names to values without null bytes\";\nconst LAUNCHER_ENV_NAME_ERROR = \"must be a POSIX environment name\";\nconst LAUNCHER_ENV_NAME_PATTERN = /^[A-Za-z_]\\w*$/;\nconst MINIMUM_LIBRARY_VERSION_ERROR = \"must be a version such as 4.18\";\nconst MINIMUM_LIBRARY_VERSION_PATTERN = /^\\d+(?:\\.\\d+)*$/;\nconst MINIMUM_LIBRARY_VERSIONS_ERROR = \"must be a record of GIR library ids to a minimum version\";\nconst NODE_FLAG_ERROR = \"must be a Node.js flag beginning with a hyphen and containing no null bytes\";\nconst LIBRARY_ID_ERROR = 'must be a GIR library identifier of the form \"Name-Version\", such as \"Adw-1\"';\nconst SCRIPT_ERROR = \"must be a path to a shell script\";\nconst SOURCE_PATH_ERROR = \"must be a source path\";\nconst SPDX_ERROR = \"must be an SPDX license expression\";\nconst URL_ERROR = \"must be an absolute URL\";\nconst VERSION_ERROR = \"must be a version string\";\nconst hexColorSchema = z.string({ error: HEX_COLOR_ERROR }).regex(HEX_COLOR_PATTERN, { error: HEX_COLOR_ERROR });\n\nconst minimumLibraryVersionSchema = z\n .string({ error: MINIMUM_LIBRARY_VERSION_ERROR })\n .regex(MINIMUM_LIBRARY_VERSION_PATTERN, { error: MINIMUM_LIBRARY_VERSION_ERROR });\n\nconst minimumLibraryVersionsSchema = z.record(girLibrary(LIBRARY_ID_ERROR), minimumLibraryVersionSchema, {\n error: MINIMUM_LIBRARY_VERSIONS_ERROR,\n});\n\n/** Package relations of one kind, such as dependencies, in Debian and RPM dependency syntax. */\ntype DeployPackageRelationOptions = {\n /**\n * Package relations expressed in Debian dependency syntax.\n *\n * @defaultValue `[]`\n */\n deb?: string[] | undefined;\n /**\n * Package relations expressed in RPM dependency syntax.\n *\n * @defaultValue `[]`\n */\n rpm?: string[] | undefined;\n};\n\nconst relationsSchema = z.strictObject({\n deb: textList(\"Debian package relation\", \"must be an array of Debian package relations\").optional(),\n rpm: textList(\"RPM package relation\", \"must be an array of RPM package relations\").optional(),\n}) satisfies z.ZodType<DeployPackageRelationOptions>;\n\n/** Package relations of a kind only Debian packages have, in Debian dependency syntax. */\ntype DeployDebPackageRelationOptions = {\n /**\n * Package relations expressed in Debian dependency syntax. RPM has no equivalent relation.\n *\n * @defaultValue `[]`\n */\n deb?: string[] | undefined;\n};\n\nconst debRelationsSchema = z.strictObject({\n deb: textList(\"Debian package relation\", \"must be an array of Debian package relations\").optional(),\n}) satisfies z.ZodType<DeployDebPackageRelationOptions>;\n\n/** The `deploy.developer` options: who develops and maintains the application. */\ntype DeployDeveloperOptions = {\n /**\n * Reverse-DNS developer identifier.\n *\n * @defaultValue The application ID without its last segment, such as `com.example` for `com.example.Tasks`;\n * none when the application ID has only two segments\n */\n id?: string | undefined;\n /**\n * Developer or organization name. Deployment fails when neither this nor the `package.json` author is set.\n *\n * @defaultValue The `author` name in `package.json`\n */\n name?: string | undefined;\n /**\n * Maintainer email address.\n *\n * @defaultValue The `author` email in `package.json`, if it has one\n */\n email?: string | undefined;\n};\n\nconst developerSchema = z.strictObject({\n id: text(\"must be a reverse-DNS developer id\").optional(),\n name: text(\"must be a developer or organization name\").optional(),\n email: text(\"must be an email address\").optional(),\n}) satisfies z.ZodType<DeployDeveloperOptions>;\n\n/** One software-center screenshot in `deploy.screenshots`. Either `url` or `file` must be set. */\ntype DeployScreenshotOptions = {\n /**\n * Absolute URL of a PNG or JPEG screenshot. Takes precedence over `file`.\n *\n * @defaultValue None; each entry sets `url` or `file`\n */\n url?: string | undefined;\n /**\n * Screenshot path relative to the project root, resolved against `screenshotBaseUrl`.\n *\n * @defaultValue None; each entry sets `url` or `file`\n */\n file?: string | undefined;\n /**\n * Caption displayed with the screenshot in software centers.\n *\n * @defaultValue None: the screenshot has no `caption`\n */\n caption?: string | undefined;\n /**\n * Marks the primary screenshot. Only the first entry set to `true` is used.\n *\n * @defaultValue `false`; when no entry sets it, no screenshot is marked primary\n */\n isDefault?: boolean | undefined;\n};\n\nconst screenshotSchema = z\n .strictObject({\n url: url(\"must be an absolute URL to a PNG or JPEG\").optional(),\n file: text(\"must be an image path relative to the project root\").optional(),\n caption: text(\"must be a screenshot caption\").optional(),\n isDefault: flag(BOOLEAN_ERROR).optional(),\n })\n .refine((entry) => entry.url !== undefined || entry.file !== undefined, {\n error: \"must have either a `url` or a `file`\",\n }) satisfies z.ZodType<DeployScreenshotOptions>;\n\n/** One AppStream release-history entry in `deploy.releases`. */\ntype DeployReleaseOptions = {\n /** Application version described by this release. */\n version: string;\n /** Release date in `YYYY-MM-DD` format. */\n date: string;\n /**\n * AppStream release classification.\n *\n * @defaultValue None: the release has no `type` attribute, which AppStream reads as `stable`\n */\n type?: \"development\" | \"snapshot\" | \"stable\" | undefined;\n /**\n * AppStream update urgency.\n *\n * @defaultValue None: the release has no `urgency` attribute\n */\n urgency?: \"critical\" | \"high\" | \"low\" | \"medium\" | undefined;\n /**\n * Release notes, with each entry rendered as a paragraph.\n *\n * @defaultValue `[]`\n */\n notes?: string[] | undefined;\n /**\n * Absolute URL containing further details about the release.\n *\n * @defaultValue None: the release has no `url` element\n */\n url?: string | undefined;\n};\n\nconst releaseSchema = z.strictObject({\n version: text(VERSION_ERROR),\n date: z.iso.date({ error: \"must be an ISO date (YYYY-MM-DD)\" }),\n type: z.enum(RELEASE_TYPES, { error: \"must be one of development, snapshot, stable\" }).optional(),\n urgency: z.enum(RELEASE_URGENCIES, { error: \"must be one of critical, high, low, medium\" }).optional(),\n notes: textList(\"release note paragraph\", \"must be an array of release note paragraphs\").optional(),\n url: url(URL_ERROR).optional(),\n}) satisfies z.ZodType<DeployReleaseOptions>;\n\n/** One file extension and MIME type registered through `deploy.fileAssociations`. */\ntype DeployFileAssociationOptions = {\n /** File extension to associate with the application, without a leading dot. */\n extension: string;\n /** MIME type registered for the file extension. */\n mimeType: string;\n /**\n * Human-readable description of the file type.\n *\n * @defaultValue None: the MIME type has no `comment`\n */\n description?: string | undefined;\n};\n\nconst fileAssociationSchema = z.strictObject({\n extension: fileExtension(\"must be a file extension without a leading dot\"),\n mimeType: text(\"must be a MIME type such as text/plain\"),\n description: text(\"must be a description of the file type\").optional(),\n}) satisfies z.ZodType<DeployFileAssociationOptions>;\n\n/** One desktop launcher action in `deploy.desktopActions`, keyed by its action ID. */\ntype DeployDesktopActionOptions = {\n /** Action label shown in the desktop launcher menu. */\n name: string;\n /**\n * Arguments appended to the launch command when the action is chosen. Launchers activate the `app.<id>`\n * application action of a D-Bus-activatable application instead of running this command.\n *\n * @defaultValue `[]`\n */\n args?: string[] | undefined;\n /**\n * Icon theme name used for the action.\n *\n * @defaultValue None: the action has no `Icon` key\n */\n icon?: string | undefined;\n};\n\nconst desktopActionSchema = z.strictObject({\n name: text(\"must be an action name\"),\n args: textList(\"argument\", \"must be an array of arguments appended to Exec\").optional(),\n icon: text(\"must be an icon name\").optional(),\n}) satisfies z.ZodType<DeployDesktopActionOptions>;\n\n/** The `deploy.branding` colors software centers use around the application's listing. */\ntype DeployBrandingOptions = {\n /** Primary AppStream branding color for light mode, in `#rrggbb` format. */\n light: string;\n /** Primary AppStream branding color for dark mode, in `#rrggbb` format. */\n dark: string;\n};\n\nconst brandingSchema = z.strictObject({\n light: hexColorSchema,\n dark: hexColorSchema,\n}) satisfies z.ZodType<DeployBrandingOptions>;\n\n/**\n * A `deploy.extraFiles` entry in object form: the source file or directory, resolved against the project root,\n * that is installed at the entry's prefix-relative destination, and the octal mode it is installed with.\n */\ntype DeployExtraFileOptions = {\n /** Source file or directory path, resolved relative to the project root. */\n source: string;\n /**\n * Octal file mode, applied to every file of a directory source. Setuid and setgid bits are rejected.\n *\n * @defaultValue `\"0755\"` for a file whose source is executable, `\"0644\"` otherwise\n */\n mode?: string | undefined;\n};\n\nconst extraFileSchema = z.strictObject({\n source: text(SOURCE_PATH_ERROR),\n mode: z\n .string({ error: FILE_MODE_ERROR })\n .regex(FILE_MODE_PATTERN, { error: FILE_MODE_ERROR })\n .refine((mode) => (Number.parseInt(mode, FILE_MODE_RADIX) & PRIVILEGED_FILE_MODE_MASK) === 0, {\n error: FILE_MODE_ERROR,\n })\n .optional(),\n}) satisfies z.ZodType<DeployExtraFileOptions>;\n\nconst extraFileEntrySchema = z.union([text(SOURCE_PATH_ERROR), extraFileSchema], { error: EXTRA_FILE_ERROR });\n\nconst launcherEnvSchema = z.record(\n z.string({ error: LAUNCHER_ENV_NAME_ERROR }).regex(LAUNCHER_ENV_NAME_PATTERN, { error: LAUNCHER_ENV_NAME_ERROR }),\n z.string({ error: LAUNCHER_ENV_ERROR }).refine((value) => !value.includes(\"\\0\"), { error: LAUNCHER_ENV_ERROR }),\n { error: (issue) => (issue.code === \"invalid_key\" ? LAUNCHER_ENV_NAME_ERROR : LAUNCHER_ENV_ERROR) },\n);\n\nconst nodeFlagsSchema = z.array(\n z\n .string({ error: NODE_FLAG_ERROR })\n .refine((value) => value.startsWith(\"-\") && !value.includes(\"\\0\"), { error: NODE_FLAG_ERROR }),\n { error: \"must be an array of Node.js flags\" },\n);\n\n/**\n * The `deploy.node` options: where the Node.js runtime bundled with the application comes from, the version it\n * is expected to be, whether its binary is stripped, and whether the launcher enables the compile cache.\n */\ntype DeployNodeOptions = {\n /**\n * Runtime source: an official download, the running Node.js executable, or `path`.\n *\n * @defaultValue `\"download\"`\n */\n source?: \"download\" | \"host\" | \"path\" | undefined;\n /**\n * Expected Node.js version. Only a downloaded runtime uses it.\n *\n * @defaultValue `\"26.8.2\"` for a downloaded runtime\n */\n version?: string | undefined;\n /**\n * Node.js executable path relative to the project root, required when `source` is `path`.\n *\n * @defaultValue None; required when `source` is `\"path\"`\n */\n path?: string | undefined;\n /**\n * Strip the runtime when its architecture matches the host and `strip` is available.\n *\n * @defaultValue `true`\n */\n shouldStrip?: boolean | undefined;\n /**\n * Enable Node.js compile caching in the generated launcher.\n *\n * @defaultValue `true`\n */\n shouldUseCompileCache?: boolean | undefined;\n};\n\nconst nodeRuntimeSchema = z.strictObject({\n source: z.enum(NODE_SOURCES, { error: \"must be one of download, host, path\" }).optional(),\n version: text(\"must be a Node.js version such as 26.7.0\").optional(),\n path: text(\"must be a path to a node binary\").optional(),\n shouldStrip: flag(BOOLEAN_ERROR).optional(),\n shouldUseCompileCache: flag(BOOLEAN_ERROR).optional(),\n}) satisfies z.ZodType<DeployNodeOptions>;\n\n/**\n * The `deploy.scripts` options: maintainer scripts for Debian and RPM packages. Each value is a path to a\n * shell script file, not inline shell; the package carries the file's content.\n */\ntype DeployScriptsOptions = {\n /**\n * Path to a shell script, relative to the project root, run before installing a Debian or RPM package.\n *\n * @defaultValue None: `gtkx deploy` adds no script for this step\n */\n preInstall?: string | undefined;\n /**\n * Path to a shell script, relative to the project root, run after installing a Debian or RPM package.\n *\n * @defaultValue None: `gtkx deploy` adds no script for this step\n */\n postInstall?: string | undefined;\n /**\n * Path to a shell script, relative to the project root, run before removing a Debian or RPM package.\n *\n * @defaultValue None: `gtkx deploy` adds no script for this step\n */\n preRemove?: string | undefined;\n /**\n * Path to a shell script, relative to the project root, run after removing a Debian or RPM package.\n *\n * @defaultValue None: `gtkx deploy` adds no script for this step\n */\n postRemove?: string | undefined;\n};\n\nconst scriptsSchema = z.strictObject({\n preInstall: text(SCRIPT_ERROR).optional(),\n postInstall: text(SCRIPT_ERROR).optional(),\n preRemove: text(SCRIPT_ERROR).optional(),\n postRemove: text(SCRIPT_ERROR).optional(),\n}) satisfies z.ZodType<DeployScriptsOptions>;\n\n/** The `deploy.tools` options: executables `gtkx deploy` runs instead of the ones it downloads. */\ntype DeployToolsOptions = {\n /**\n * nFPM executable name or path relative to the project root.\n *\n * @defaultValue A pinned nFPM release that `gtkx deploy` downloads and verifies against its `sha256`\n */\n nfpm?: string | undefined;\n};\n\nconst toolsSchema = z.strictObject({\n nfpm: text(\"must be an nFPM executable name or path\").optional(),\n}) satisfies z.ZodType<DeployToolsOptions>;\n\n/** The `deploy.deb` options: Debian package metadata and compression. */\ntype DeployDebOptions = {\n /**\n * Debian package name.\n *\n * @defaultValue `deploy.binaryName`\n */\n packageName?: string | undefined;\n /**\n * Debian archive section.\n *\n * @defaultValue Derived from `deploy.categories`, such as `devel` for `Development`, or `misc` when no\n * category matches\n */\n section?: string | undefined;\n /**\n * Debian package priority.\n *\n * @defaultValue `\"optional\"`\n */\n priority?: string | undefined;\n /**\n * Compression used for the Debian package payload.\n *\n * @defaultValue nFPM's default, `gzip`\n */\n compression?: \"gzip\" | \"none\" | \"xz\" | \"zstd\" | undefined;\n /**\n * Additional Debian control fields, keyed by field name.\n *\n * @defaultValue `{}`\n */\n fields?: Record<string, string> | undefined;\n};\n\nconst debSchema = z.strictObject({\n packageName: text(\"must be a Debian package name\").optional(),\n section: text(\"must be a Debian archive section\").optional(),\n priority: text(\"must be a Debian priority\").optional(),\n compression: z.enum(DEB_COMPRESSIONS, { error: \"must be one of gzip, none, xz, zstd\" }).optional(),\n fields: textRecord(\"must be a control field value\", \"must be a record of control field names to values\").optional(),\n}) satisfies z.ZodType<DeployDebOptions>;\n\n/** The `deploy.rpm` options: RPM package metadata and compression. */\ntype DeployRpmOptions = {\n /**\n * RPM package name.\n *\n * @defaultValue `deploy.binaryName`\n */\n packageName?: string | undefined;\n /**\n * RPM package group.\n *\n * @defaultValue Derived from `deploy.categories`, or `Applications/System` when no category matches\n */\n group?: string | undefined;\n /**\n * Compression used for the RPM package payload.\n *\n * @defaultValue nFPM's default, `gzip`\n */\n compression?: \"gzip\" | \"lzma\" | \"xz\" | \"zstd\" | undefined;\n /**\n * Installation prefixes that the RPM package allows users to relocate.\n *\n * @defaultValue `[]`: the package is not relocatable\n */\n prefixes?: string[] | undefined;\n};\n\nconst rpmSchema = z.strictObject({\n packageName: text(\"must be an RPM package name\").optional(),\n group: text(\"must be an RPM group\").optional(),\n compression: z.enum(RPM_COMPRESSIONS, { error: \"must be one of gzip, lzma, xz, zstd\" }).optional(),\n prefixes: textList(\"prefix\", \"must be an array of relocation prefixes\").optional(),\n}) satisfies z.ZodType<DeployRpmOptions>;\n\n/** The `deploy.appimage` options: AppImage file name, compression, update information and runtime. */\ntype DeployAppImageOptions = {\n /**\n * Output file name.\n *\n * @defaultValue `<name>-<version>-<arch>.AppImage`, with spaces in the display name replaced by underscores,\n * such as `My_App-1.2.0-x86_64.AppImage`\n */\n fileName?: string | undefined;\n /**\n * Compression explicitly requested from appimagetool.\n *\n * @defaultValue None: appimagetool's own default, as GTKX passes no `--comp`\n */\n compression?: \"zstd\" | undefined;\n /**\n * AppImage update information string embedded in the executable.\n *\n * @defaultValue None: the AppImage embeds no update information, as GTKX passes no `-u`\n */\n updateInformation?: string | undefined;\n /**\n * Custom AppImage runtime file path, resolved relative to the project root.\n *\n * @defaultValue A pinned `type2-runtime` release that `gtkx deploy` downloads and verifies against its\n * `sha256`\n */\n runtimeFile?: string | undefined;\n};\n\nconst appimageSchema = z.strictObject({\n fileName: text(\"must be an output file name\").optional(),\n compression: z.literal(\"zstd\", { error: \"must be zstd\" }).optional(),\n updateInformation: text(\"must be an AppImage update information string\").optional(),\n runtimeFile: text(\"must be a path to an AppImage runtime file\").optional(),\n}) satisfies z.ZodType<DeployAppImageOptions>;\n\n/** The `deploy.flatpak.source` options: the Git revision a source-mode Flatpak builds. */\ntype DeployFlatpakSourceOptions = {\n /**\n * Public HTTP or HTTPS Git repository URL.\n *\n * @defaultValue The URL of the project's `origin` Git remote\n */\n url?: string | undefined;\n /**\n * Git tag to build, pinned to its commit when `commit` is omitted.\n *\n * @defaultValue The tag that points at `HEAD`, if any, when `commit` is also omitted\n */\n tag?: string | undefined;\n /**\n * Git commit to build.\n *\n * @defaultValue The commit of `tag`, or the current `HEAD` without one\n */\n commit?: string | undefined;\n};\n\nconst flatpakSourceSchema = z.strictObject({\n url: url(\"must be an absolute git URL\").optional(),\n tag: text(\"must be a git tag\").optional(),\n commit: text(\"must be a git commit sha\").optional(),\n}) satisfies z.ZodType<DeployFlatpakSourceOptions>;\n\n/** The `deploy.flatpak` options: runtime, sandbox permissions, build and distribution of the Flatpak. */\ntype DeployFlatpakOptions = {\n /**\n * Package local build output or build from a pinned Git source inside the SDK.\n *\n * @defaultValue `\"prebuilt\"`\n */\n mode?: \"prebuilt\" | \"source\" | undefined;\n /**\n * Flatpak runtime ID.\n *\n * @defaultValue `\"org.gnome.Platform\"`\n */\n runtime?: string | undefined;\n /**\n * Flatpak runtime branch.\n *\n * @defaultValue `\"51\"`\n */\n runtimeVersion?: string | undefined;\n /**\n * Build SDK ID.\n *\n * @defaultValue `\"org.gnome.Sdk\"`\n */\n sdk?: string | undefined;\n /**\n * Node.js SDK extension used in source mode.\n *\n * @defaultValue `\"org.freedesktop.Sdk.Extension.node26\"`\n */\n nodeExtension?: string | undefined;\n /**\n * Additional SDK extension IDs included in the build environment.\n *\n * @defaultValue `[]`\n */\n sdkExtensions?: string[] | undefined;\n /**\n * Optional Flatpak base application ID.\n *\n * @defaultValue None: the manifest has no `base`\n */\n base?: string | undefined;\n /**\n * Branch of the base application.\n *\n * @defaultValue None: the manifest has no `base-version`\n */\n baseVersion?: string | undefined;\n /**\n * Exported application branch.\n *\n * @defaultValue `\"stable\"`\n */\n branch?: string | undefined;\n /**\n * Sandbox permissions added to the defaults. A negation such as `--nosocket=fallback-x11` removes the\n * matching default.\n *\n * @defaultValue `[]`, on top of `--share=ipc`, `--socket=wayland`, `--socket=fallback-x11` and\n * `--device=dri`\n * @example\n * ```ts\n * finishArgs: [\"--share=network\", \"--filesystem=xdg-documents\"],\n * ```\n */\n finishArgs?: string[] | undefined;\n /**\n * Patterns added to the cleanup defaults. An empty array disables cleanup.\n *\n * @defaultValue `[]`, on top of `/include`, `/share/pkgconfig`, `*.la` and `*.a`\n */\n cleanup?: string[] | undefined;\n /**\n * Additional shell commands appended to the application's Flatpak build commands.\n *\n * @defaultValue `[]`\n */\n buildCommands?: string[] | undefined;\n /**\n * Additional Flatpak manifest modules built before the application module.\n *\n * @defaultValue `[]`\n */\n modules?: unknown[] | undefined;\n /**\n * Git repository and revision used for source builds.\n *\n * @defaultValue `{}`: the `origin` remote at the tagged or current commit\n */\n source?: DeployFlatpakSourceOptions | undefined;\n /**\n * Package manager used for offline source builds.\n *\n * @defaultValue Detected from the first lockfile found: `pnpm-lock.yaml`, `yarn.lock`, then\n * `package-lock.json`\n */\n packageManager?: \"npm\" | \"pnpm\" | \"yarn\" | undefined;\n /**\n * Lockfile path relative to the project root.\n *\n * @defaultValue The package manager's standard lockfile, such as `pnpm-lock.yaml`\n */\n lockfile?: string | undefined;\n /**\n * Runtime repository URL embedded in the bundle.\n *\n * @defaultValue `\"https://dl.flathub.org/repo/flathub.flatpakrepo\"`\n */\n runtimeRepo?: string | undefined;\n /**\n * Emit a `.flatpak` bundle in addition to the local repository.\n *\n * @defaultValue `true`\n */\n shouldEmitBundle?: boolean | undefined;\n /**\n * Install the built application into the current user's Flatpak installation.\n *\n * @defaultValue `false`\n */\n shouldInstall?: boolean | undefined;\n /**\n * Allow flatpak-builder to use rofiles-fuse. Set to `false` where FUSE is unavailable.\n *\n * @defaultValue `true`\n */\n shouldUseRofilesFuse?: boolean | undefined;\n};\n\nconst flatpakSchema = z.strictObject({\n mode: z.enum(FLATPAK_MODES, { error: 'must be \"prebuilt\" or \"source\"' }).optional(),\n runtime: text(\"must be a runtime id\").optional(),\n runtimeVersion: text('must be a runtime branch such as \"51\"').optional(),\n sdk: text(\"must be an SDK id\").optional(),\n nodeExtension: text(\"must be a Node SDK extension id\").optional(),\n sdkExtensions: textList(\"SDK extension id\", \"must be an array of SDK extension ids\").optional(),\n base: text(\"must be a base app id\").optional(),\n baseVersion: text(\"must be a base app version\").optional(),\n branch: text(\"must be a branch name\").optional(),\n finishArgs: textList(\"finish argument\", \"must be an array of flatpak finish arguments\").optional(),\n cleanup: textList(\"cleanup pattern\", \"must be an array of cleanup patterns\").optional(),\n buildCommands: textList(\"shell command\", \"must be an array of shell commands\").optional(),\n modules: z.array(z.unknown(), { error: \"must be an array of flatpak module objects\" }).optional(),\n source: flatpakSourceSchema.optional(),\n packageManager: z.enum(PACKAGE_MANAGERS, { error: \"must be one of npm, pnpm, yarn\" }).optional(),\n lockfile: text(\"must be a path to a lockfile\").optional(),\n runtimeRepo: url(\"must be an absolute .flatpakrepo URL\").optional(),\n shouldEmitBundle: flag(BOOLEAN_ERROR).optional(),\n shouldInstall: flag(BOOLEAN_ERROR).optional(),\n shouldUseRofilesFuse: flag(BOOLEAN_ERROR).optional(),\n}) satisfies z.ZodType<DeployFlatpakOptions>;\n\n/** The `deploy.signing.deb` options: the key and method that sign the Debian package. */\ntype DeployDebSigningOptions = {\n /** PGP private key file used to sign the Debian package. */\n keyFile: string;\n /**\n * PGP signing key ID.\n *\n * @defaultValue nFPM's choice: the first subkey of `keyFile` that can sign\n */\n keyId?: string | undefined;\n /**\n * Debian package signing method.\n *\n * @defaultValue nFPM's default, `\"debsign\"`\n */\n method?: \"debsign\" | \"dpkg-sig\" | undefined;\n /**\n * Debian signature role.\n *\n * @defaultValue nFPM's default, `\"origin\"`\n */\n type?: \"archive\" | \"maint\" | \"origin\" | undefined;\n /**\n * Name and email address recorded as the signer.\n *\n * @defaultValue None: GTKX passes no `signer` to nFPM\n */\n signer?: string | undefined;\n};\n\nconst debSigningSchema = z.strictObject({\n keyFile: text(KEY_FILE_ERROR),\n keyId: text(KEY_ID_ERROR).optional(),\n method: z.enum(DEB_SIGN_METHODS, { error: 'must be \"debsign\" or \"dpkg-sig\"' }).optional(),\n type: z.enum(DEB_SIGN_TYPES, { error: \"must be one of archive, maint, origin\" }).optional(),\n signer: text(\"must be a signer name and email\").optional(),\n}) satisfies z.ZodType<DeployDebSigningOptions>;\n\n/** The `deploy.signing.rpm` options: the key that signs the RPM package. */\ntype DeployRpmSigningOptions = {\n /** PGP private key file used to sign the RPM package. */\n keyFile: string;\n /**\n * PGP signing key ID.\n *\n * @defaultValue nFPM's choice: the first subkey of `keyFile` that can sign\n */\n keyId?: string | undefined;\n};\n\nconst rpmSigningSchema = z.strictObject({\n keyFile: text(KEY_FILE_ERROR),\n keyId: text(KEY_ID_ERROR).optional(),\n}) satisfies z.ZodType<DeployRpmSigningOptions>;\n\n/** The `deploy.signing.flatpak` options: the GPG key that signs the Flatpak repository commit. */\ntype DeployFlatpakSigningOptions = {\n /**\n * GPG key ID that signs the Flatpak repository commit. The bundle embeds its public key, so\n * `flatpak install --bundle` verifies the signature.\n */\n gpgKeyId: string;\n /**\n * GPG home directory containing the signing key, passed to GPG as given.\n *\n * @defaultValue GPG's default, `$GNUPGHOME` or `~/.gnupg`\n */\n gpgHomeDir?: string | undefined;\n};\n\nconst flatpakSigningSchema = z.strictObject({\n gpgKeyId: text(\"must be a GPG key id\"),\n gpgHomeDir: text(\"must be a path to a GPG home directory\").optional(),\n}) satisfies z.ZodType<DeployFlatpakSigningOptions>;\n\n/** The `deploy.signing.appimage` options: the GPG key that signs the AppImage. */\ntype DeployAppImageSigningOptions = {\n /** GPG key ID used by appimagetool to sign the AppImage. */\n gpgKeyId: string;\n};\n\nconst appimageSigningSchema = z.strictObject({\n gpgKeyId: text(\"must be a GPG key id\"),\n}) satisfies z.ZodType<DeployAppImageSigningOptions>;\n\n/** The `deploy.signing` options: how each package format is signed. Formats without an entry stay unsigned. */\ntype DeploySigningOptions = {\n /**\n * AppImage signing options.\n *\n * @defaultValue None: `gtkx deploy` leaves this format unsigned\n */\n appimage?: DeployAppImageSigningOptions | undefined;\n /**\n * Debian package signing options.\n *\n * @defaultValue None: `gtkx deploy` leaves this format unsigned\n */\n deb?: DeployDebSigningOptions | undefined;\n /**\n * Flatpak bundle signing options.\n *\n * @defaultValue None: `gtkx deploy` leaves this format unsigned\n */\n flatpak?: DeployFlatpakSigningOptions | undefined;\n /**\n * RPM package signing options.\n *\n * @defaultValue None: `gtkx deploy` leaves this format unsigned\n */\n rpm?: DeployRpmSigningOptions | undefined;\n};\n\nconst signingSchema = z.strictObject({\n appimage: appimageSigningSchema.optional(),\n deb: debSigningSchema.optional(),\n flatpak: flatpakSigningSchema.optional(),\n rpm: rpmSigningSchema.optional(),\n}) satisfies z.ZodType<DeploySigningOptions>;\n\n/** The `deploy.relations` options: package relationships besides dependencies, for Debian and RPM. */\ntype DeployRelationsOptions = {\n /**\n * Recommended packages that extend the application's functionality.\n *\n * @defaultValue `{}`\n */\n recommends?: DeployPackageRelationOptions | undefined;\n /**\n * Suggested companion packages.\n *\n * @defaultValue `{}`\n */\n suggests?: DeployPackageRelationOptions | undefined;\n /**\n * Package names or capabilities supplied by this package.\n *\n * @defaultValue `{}`\n */\n provides?: DeployPackageRelationOptions | undefined;\n /**\n * Packages that cannot be installed alongside this package.\n *\n * @defaultValue `{}`\n */\n conflicts?: DeployPackageRelationOptions | undefined;\n /**\n * Packages whose files this package may replace.\n *\n * @defaultValue `{}`\n */\n replaces?: DeployPackageRelationOptions | undefined;\n /**\n * Debian packages made incompatible by installing this package. Debian packages only.\n *\n * @defaultValue `{}`\n */\n breaks?: DeployDebPackageRelationOptions | undefined;\n /**\n * Debian dependencies required before unpacking this package. Debian packages only.\n *\n * @defaultValue `{}`\n */\n preDepends?: DeployDebPackageRelationOptions | undefined;\n};\n\nconst extraRelationsSchema = z.strictObject({\n recommends: relationsSchema.optional(),\n suggests: relationsSchema.optional(),\n provides: relationsSchema.optional(),\n conflicts: relationsSchema.optional(),\n replaces: relationsSchema.optional(),\n breaks: debRelationsSchema.optional(),\n preDepends: debRelationsSchema.optional(),\n}) satisfies z.ZodType<DeployRelationsOptions>;\n\n/** The `deploy` options: application metadata, bundled runtime settings, and packaging options for `gtkx deploy`. */\ntype DeployOptions = {\n /**\n * Package formats to build. `gtkx deploy --target` overrides it.\n *\n * @defaultValue `[\"flatpak\"]`\n */\n targets?: (\"appimage\" | \"deb\" | \"flatpak\" | \"rpm\")[] | undefined;\n /**\n * Target CPU architectures. `gtkx deploy --arch` overrides it.\n *\n * @defaultValue The host architecture, `arm64` or `x64`\n */\n architectures?: (\"arm64\" | \"x64\")[] | undefined;\n /**\n * Deployment directory relative to the project root, with packages in its `out` directory. `gtkx deploy\n * --out` overrides it.\n *\n * @defaultValue `\"build\"`\n */\n outDir?: string | undefined;\n /**\n * Display name.\n *\n * @defaultValue The `package.json` name without its scope, title-cased with spaces for hyphens and\n * underscores, such as `Tasks App` for `@example/tasks-app`; or the last segment of the application ID\n */\n name?: string | undefined;\n /**\n * Generic application description shown by desktop launchers, such as `Text Editor`.\n *\n * @defaultValue None: the desktop entry has no `GenericName` key\n */\n genericName?: string | undefined;\n /**\n * Launcher command name, also used as the package name. A configured value is normalized the same way as the\n * default.\n *\n * @defaultValue The `package.json` name without its scope, lowercased with hyphens for other characters; or\n * the last segment of the application ID\n */\n binaryName?: string | undefined;\n /**\n * Application version. Deployment fails when neither this nor the `package.json` version is set.\n *\n * @defaultValue The `version` in `package.json`\n */\n version?: string | undefined;\n /**\n * Debian packaging revision and RPM release.\n *\n * @defaultValue `\"1\"`\n */\n release?: string | undefined;\n /**\n * Non-negative Debian and RPM version epoch.\n *\n * @defaultValue None: package metadata has no `epoch`\n */\n epoch?: number | undefined;\n /**\n * Single-line summary without a trailing period. Deployment fails when neither this nor the `package.json`\n * description is set.\n *\n * @defaultValue The first line of the `description` in `package.json`\n */\n summary?: string | undefined;\n /**\n * Long description as paragraphs.\n *\n * @defaultValue `deploy.summary` as the only paragraph, also when the array is empty\n */\n description?: string[] | undefined;\n /**\n * Search keywords included in the desktop entry and AppStream metadata.\n *\n * @defaultValue `[]`\n */\n keywords?: string[] | undefined;\n /**\n * Freedesktop application categories used by launchers, software centers, and package metadata.\n *\n * @defaultValue `[]`\n * @example\n * ```ts\n * categories: [\"Office\", \"ProjectManagement\"],\n * ```\n */\n categories?: string[] | undefined;\n /**\n * Supported MIME types, combined with types from file associations and URL protocols.\n *\n * @defaultValue `[]`\n */\n mimeTypes?: string[] | undefined;\n /**\n * Developer identity and package maintainer details.\n *\n * @defaultValue `{}`: the details come from the `author` in `package.json`\n */\n developer?: DeployDeveloperOptions | undefined;\n /**\n * Application license as an SPDX expression. Deployment fails when neither this nor the `package.json`\n * license is set.\n *\n * @defaultValue The `license` in `package.json`\n */\n license?: string | undefined;\n /**\n * License file path relative to the project root, installed with the application.\n *\n * @defaultValue The first of `LICENSE`, `LICENSE.md`, `LICENSE.txt`, `COPYING` and `COPYING.md` in the\n * project root; none when no such file exists\n */\n licenseFile?: string | undefined;\n /**\n * SPDX license expression for the AppStream metadata.\n *\n * @defaultValue `\"CC0-1.0\"`\n */\n metadataLicense?: string | undefined;\n /**\n * Copyright notice.\n *\n * @defaultValue `Copyright © <year> <developer name>`, with the year of the build date\n */\n copyright?: string | undefined;\n /**\n * Application homepage URL.\n *\n * @defaultValue The `homepage` in `package.json`, if set\n */\n homepage?: string | undefined;\n /**\n * Additional AppStream links keyed by their purpose, such as `bugtracker` or `help`.\n *\n * @defaultValue `{}`\n * @example\n * ```ts\n * urls: { bugtracker: \"https://github.com/example/tasks/issues\" },\n * ```\n */\n urls?:\n | Partial<\n Record<\n \"bugtracker\" | \"contact\" | \"contribute\" | \"donation\" | \"faq\" | \"help\" | \"translate\" | \"vcs-browser\",\n string\n >\n >\n | undefined;\n /**\n * Screenshots for software centers. Each entry requires a `url` or `file`.\n *\n * @defaultValue `[]`\n */\n screenshots?: DeployScreenshotOptions[] | undefined;\n /**\n * Base URL for screenshot files.\n *\n * @defaultValue The raw file URL of the project's GitHub or GitLab `origin` remote on its default branch;\n * deployment fails without one when a screenshot sets `file`\n */\n screenshotBaseUrl?: string | undefined;\n /**\n * Primary branding colors included in AppStream metadata.\n *\n * @defaultValue None: the metadata has no `branding` element\n */\n branding?: DeployBrandingOptions | undefined;\n /**\n * OARS 1.1 content-rating attributes mapped to their intensities.\n *\n * @defaultValue `{}`: an empty OARS 1.1 rating, which declares no objectionable content\n * @example\n * ```ts\n * contentRating: { \"social-chat\": \"intense\" },\n * ```\n */\n contentRating?: Record<string, \"intense\" | \"mild\" | \"moderate\" | \"none\"> | undefined;\n /**\n * AppStream release history, sorted newest first.\n *\n * @defaultValue One release for the application version, dated on the build day or by `SOURCE_DATE_EPOCH`\n */\n releases?: DeployReleaseOptions[] | undefined;\n /**\n * Application arguments included in the desktop entry's launch command.\n *\n * @defaultValue `[]`\n */\n execArgs?: string[] | undefined;\n /**\n * Environment variables exported by the generated launcher. Keys must be POSIX environment names.\n *\n * @defaultValue `{}`\n * @example\n * ```ts\n * launcherEnv: { GSK_RENDERER: \"ngl\" },\n * ```\n */\n launcherEnv?: Record<string, string> | undefined;\n /**\n * Node.js flags placed before the application bundle in the generated launcher.\n *\n * @defaultValue `[]`\n * @example\n * ```ts\n * nodeFlags: [\"--max-old-space-size=4096\"],\n * ```\n */\n nodeFlags?: string[] | undefined;\n /**\n * File extensions and MIME types registered for the application.\n *\n * @defaultValue `[]`\n */\n fileAssociations?: DeployFileAssociationOptions[] | undefined;\n /**\n * URL schemes handled by the application, registered as `x-scheme-handler` MIME types.\n *\n * @defaultValue `[]`\n */\n protocols?: string[] | undefined;\n /**\n * Desktop launcher actions keyed by action ID. With `isDbusActivatable`, the application must register an\n * `app.<id>` action for each one.\n *\n * @defaultValue `{}`\n * @example\n * ```ts\n * desktopActions: { today: { name: \"Today\", args: [\"tasks://today\"] } },\n * ```\n */\n desktopActions?: Record<string, DeployDesktopActionOptions> | undefined;\n /**\n * Additional desktop entry keys, overriding non-reserved generated values. `DBusActivatable` and `Version`\n * are rejected; use `deploy.isDbusActivatable` for D-Bus activation.\n *\n * @defaultValue `{}`\n */\n desktopEntry?: Record<string, string> | undefined;\n /**\n * Additional XML fragments appended to the AppStream component.\n *\n * @defaultValue `[]`\n */\n metainfoExtra?: string[] | undefined;\n /**\n * Enable D-Bus activation in the desktop entry and generate a session bus service file.\n *\n * @defaultValue `false`\n */\n isDbusActivatable?: boolean | undefined;\n /**\n * Extra files keyed by destination inside the install prefix, without a leading slash or a `..` segment.\n * Each value is a source path relative to the project root, or a {@link DeployExtraFileOptions} entry that\n * also sets the file mode. A directory source installs every file below it at the same path below the\n * destination; without a mode, each file is executable when its source is. Scripts installed this way, such\n * as a helper command's launcher, can run the bundled Node.js runtime at `lib/<binaryName>/node` in every\n * prebuilt target and in source Flatpaks.\n *\n * @defaultValue `{}`\n * @example\n * ```ts\n * extraFiles: { \"share/tasks/templates\": \"data/templates\" },\n * ```\n */\n extraFiles?: Record<string, string | DeployExtraFileOptions> | undefined;\n /**\n * Minimum runtime library versions keyed by GIR library ID, used when deriving package dependencies.\n *\n * @defaultValue `{}`: library dependencies carry no version constraint\n * @example\n * ```ts\n * minimumLibraryVersions: { \"Adw-1\": \"1.8\", \"Gtk-4.0\": \"4.20\" },\n * ```\n */\n minimumLibraryVersions?: Record<string, string> | undefined;\n /**\n * Additional Debian and RPM dependencies merged with automatically detected dependencies.\n *\n * @defaultValue None: only the detected dependencies, such as `libgtk-4-1` on Debian\n */\n depends?: DeployPackageRelationOptions | undefined;\n /**\n * Additional package relationships for Debian and RPM.\n *\n * @defaultValue `{}`: no relations besides `depends`\n */\n relations?: DeployRelationsOptions | undefined;\n /**\n * Installation and removal scripts for Debian and RPM packages.\n *\n * @defaultValue `{}`: no maintainer scripts\n */\n scripts?: DeployScriptsOptions | undefined;\n /**\n * Node.js runtime bundled with prebuilt packages and launcher compile-cache settings.\n *\n * @defaultValue `{}`: a downloaded Node.js `26.8.2`, stripped, with the compile cache on\n */\n node?: DeployNodeOptions | undefined;\n /**\n * Overrides for executables used to build packages.\n *\n * @defaultValue `{}`: `gtkx deploy` downloads the pinned tools it needs\n */\n tools?: DeployToolsOptions | undefined;\n /**\n * Per-format package signing options.\n *\n * @defaultValue `{}`: every package is unsigned\n */\n signing?: DeploySigningOptions | undefined;\n /**\n * AppImage packaging options.\n *\n * @defaultValue `{}`\n */\n appimage?: DeployAppImageOptions | undefined;\n /**\n * Debian package metadata and compression options.\n *\n * @defaultValue `{}`\n */\n deb?: DeployDebOptions | undefined;\n /**\n * Flatpak runtime, sandbox, build, and distribution options.\n *\n * @defaultValue `{}`\n */\n flatpak?: DeployFlatpakOptions | undefined;\n /**\n * RPM package metadata and compression options.\n *\n * @defaultValue `{}`\n */\n rpm?: DeployRpmOptions | undefined;\n};\n\nconst deploySchema = z.strictObject({\n targets: z\n .array(z.enum(DEPLOY_TARGET_NAMES, { error: \"must be one of appimage, deb, flatpak, rpm\" }), {\n error: \"must be an array of deploy targets\",\n })\n .optional(),\n architectures: z\n .array(z.enum(DEPLOY_ARCH_NAMES, { error: \"must be one of arm64, x64\" }), {\n error: \"must be an array of deploy architectures\",\n })\n .optional(),\n outDir: text(\"must be a directory path relative to the project root\").optional(),\n name: text(\"must be the display name shown in the launcher\").optional(),\n genericName: text(\"must be a generic application name\").optional(),\n binaryName: text(\"must be a kebab-case command name\").optional(),\n version: text(VERSION_ERROR).optional(),\n release: text(\"must be a packaging revision\").optional(),\n epoch: z.int({ error: EPOCH_ERROR }).min(0, { error: EPOCH_ERROR }).optional(),\n summary: text(\"must be a single-line summary without a trailing period\").optional(),\n description: textList(\"description paragraph\", \"must be an array of description paragraphs\").optional(),\n keywords: textList(\"search keyword\", \"must be an array of search keywords\").optional(),\n categories: textList(\"freedesktop category\", \"must be an array of freedesktop categories\").optional(),\n mimeTypes: textList(\"MIME type\", \"must be an array of MIME types\").optional(),\n developer: developerSchema.optional(),\n license: text(SPDX_ERROR).optional(),\n licenseFile: text(\"must be a path to a license file\").optional(),\n metadataLicense: text(SPDX_ERROR).optional(),\n copyright: text(\"must be a copyright line\").optional(),\n homepage: url(URL_ERROR).optional(),\n urls: z\n .partialRecord(z.enum(URL_KINDS), url(URL_ERROR), {\n error: \"must be a record of AppStream url kinds to URLs\",\n })\n .optional(),\n screenshots: z.array(screenshotSchema, { error: \"must be an array of screenshots\" }).optional(),\n screenshotBaseUrl: url(\"must be an absolute base URL\").optional(),\n branding: brandingSchema.optional(),\n contentRating: z\n .record(z.string(), z.enum(OARS_INTENSITIES, { error: \"must be one of intense, mild, moderate, none\" }), {\n error: \"must be a record of OARS 1.1 attribute ids to intensities\",\n })\n .optional(),\n releases: z.array(releaseSchema, { error: \"must be an array of releases\" }).optional(),\n execArgs: textList(\"argument\", \"must be an array of arguments appended to Exec\").optional(),\n launcherEnv: launcherEnvSchema.optional(),\n nodeFlags: nodeFlagsSchema.optional(),\n fileAssociations: z.array(fileAssociationSchema, { error: \"must be an array of file associations\" }).optional(),\n protocols: textList(\"URL scheme\", \"must be an array of URL schemes\").optional(),\n desktopActions: z\n .record(z.string(), desktopActionSchema, { error: \"must be a record of action ids to actions\" })\n .optional(),\n desktopEntry: textRecord(\n \"must be a desktop entry value\",\n \"must be a record of desktop entry keys to values\",\n ).optional(),\n metainfoExtra: textList(\"AppStream XML fragment\", \"must be an array of AppStream XML fragments\").optional(),\n isDbusActivatable: flag(BOOLEAN_ERROR).optional(),\n extraFiles: relativePathRecord(\n \"must be a destination path inside the install prefix, without a leading slash or a .. segment\",\n extraFileEntrySchema,\n \"must be a record of prefix-relative destinations to source paths or { source, mode } entries\",\n ).optional(),\n minimumLibraryVersions: minimumLibraryVersionsSchema.optional(),\n depends: relationsSchema.optional(),\n relations: extraRelationsSchema.optional(),\n scripts: scriptsSchema.optional(),\n node: nodeRuntimeSchema.optional(),\n tools: toolsSchema.optional(),\n signing: signingSchema.optional(),\n appimage: appimageSchema.optional(),\n deb: debSchema.optional(),\n flatpak: flatpakSchema.optional(),\n rpm: rpmSchema.optional(),\n}) satisfies z.ZodType<DeployOptions>;\n\nexport {\n deploySchema,\n type DeployAppImageOptions,\n type DeployAppImageSigningOptions,\n type DeployBrandingOptions,\n type DeployDebOptions,\n type DeployDebPackageRelationOptions,\n type DeployDebSigningOptions,\n type DeployDesktopActionOptions,\n type DeployDeveloperOptions,\n type DeployExtraFileOptions,\n type DeployFileAssociationOptions,\n type DeployFlatpakOptions,\n type DeployFlatpakSigningOptions,\n type DeployFlatpakSourceOptions,\n type DeployNodeOptions,\n type DeployOptions,\n type DeployPackageRelationOptions,\n type DeployRelationsOptions,\n type DeployReleaseOptions,\n type DeployRpmOptions,\n type DeployRpmSigningOptions,\n type DeployScreenshotOptions,\n type DeployScriptsOptions,\n type DeploySigningOptions,\n type DeployToolsOptions,\n};\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Defines and merges a project's `gtkx.config.ts`.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export { type AgentsOptions, type ApplicationConfig, type Config, defineConfig, type DeprecationsOptions, type ElementConfigOptions, type ElementPropsExport, type ElementsOptions, type McpOptions, mergeConfig, type ModuleExport, type ReactCompilerOptions, type ResolvedConfig, } from "./config.ts";
|
|
7
|
+
export { type DeployAppImageOptions, type DeployAppImageSigningOptions, type DeployBrandingOptions, type DeployDebOptions, type DeployDebPackageRelationOptions, type DeployDebSigningOptions, type DeployDesktopActionOptions, type DeployDeveloperOptions, type DeployExtraFileOptions, type DeployFileAssociationOptions, type DeployFlatpakOptions, type DeployFlatpakSigningOptions, type DeployFlatpakSourceOptions, type DeployNodeOptions, type DeployOptions, type DeployPackageRelationOptions, type DeployRelationsOptions, type DeployReleaseOptions, type DeployRpmOptions, type DeployRpmSigningOptions, type DeployScreenshotOptions, type DeployScriptsOptions, type DeploySigningOptions, type DeployToolsOptions, } from "./deploy.ts";
|
|
8
|
+
export { type ConfigLoader, type LoadConfigOptions, type LoadedConfig, loadConfig } from "./loader.ts";
|
|
4
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,MAAM,EACX,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,+BAA+B,EACpC,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Defines and merges a project's `gtkx.config.ts`.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export { defineConfig, mergeConfig, } from "./config.js";
|
|
2
7
|
export {} from "./deploy.js";
|
|
3
8
|
export { loadConfig } from "./loader.js";
|
|
4
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAIH,YAAY,EAMZ,WAAW,GAId,MAAM,aAAa,CAAC;AACrB,OAAO,EAyBN,MAAM,aAAa,CAAC;AACrB,OAAO,EAAgE,UAAU,EAAE,MAAM,aAAa,CAAC","sourcesContent":["/**\n * Defines and merges a project's `gtkx.config.ts`.\n *\n * @packageDocumentation\n */\nexport {\n type AgentsOptions,\n type ApplicationConfig,\n type Config,\n defineConfig,\n type DeprecationsOptions,\n type ElementConfigOptions,\n type ElementPropsExport,\n type ElementsOptions,\n type McpOptions,\n mergeConfig,\n type ModuleExport,\n type ReactCompilerOptions,\n type ResolvedConfig,\n} from \"./config.ts\";\nexport {\n type DeployAppImageOptions,\n type DeployAppImageSigningOptions,\n type DeployBrandingOptions,\n type DeployDebOptions,\n type DeployDebPackageRelationOptions,\n type DeployDebSigningOptions,\n type DeployDesktopActionOptions,\n type DeployDeveloperOptions,\n type DeployExtraFileOptions,\n type DeployFileAssociationOptions,\n type DeployFlatpakOptions,\n type DeployFlatpakSigningOptions,\n type DeployFlatpakSourceOptions,\n type DeployNodeOptions,\n type DeployOptions,\n type DeployPackageRelationOptions,\n type DeployRelationsOptions,\n type DeployReleaseOptions,\n type DeployRpmOptions,\n type DeployRpmSigningOptions,\n type DeployScreenshotOptions,\n type DeployScriptsOptions,\n type DeploySigningOptions,\n type DeployToolsOptions,\n} from \"./deploy.ts\";\nexport { type ConfigLoader, type LoadConfigOptions, type LoadedConfig, loadConfig } from \"./loader.ts\";\n"]}
|
package/dist/internal.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { configDependenciesFor, loadConfigModule } from "./config-dependencies.t
|
|
|
2
2
|
export { createConfigReloader } from "./config-reloader.ts";
|
|
3
3
|
export { configCandidatePaths } from "./config-source.ts";
|
|
4
4
|
export type { McpSettings, ResolvedReactCompilerOptions } from "./config.ts";
|
|
5
|
-
export { APPLICATION_ID_MAX_LENGTH, isAgentReferenceEnabled, isAgentRulesEnabled, isValidApplicationId, resolveAcceptedChildTypes, resolveElementComponents, resolveElementProps, resolveLazyElements, resolveMcpSettings, resolveOmittedProps, } from "./config.ts";
|
|
5
|
+
export { APPLICATION_ID_MAX_LENGTH, isAgentReferenceEnabled, isAgentRulesEnabled, isValidApplicationId, LIBRARY_APPLICATION_ID, resolveAcceptedChildTypes, resolveElementComponents, resolveElementProps, resolveLazyElements, resolveMcpSettings, resolveOmittedProps, } from "./config.ts";
|
|
6
6
|
export { createConfigLoader } from "./loader.ts";
|
|
7
7
|
export { assertSupportedNodeVersion, DEFAULT_NODE_VERSION, MINIMUM_NODE_VERSION } from "./node-version.ts";
|
|
8
8
|
export { resourceBasePath } from "./resource-base-path.ts";
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EACH,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EACH,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/internal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { configDependenciesFor, loadConfigModule } from "./config-dependencies.js";
|
|
2
2
|
export { createConfigReloader } from "./config-reloader.js";
|
|
3
3
|
export { configCandidatePaths } from "./config-source.js";
|
|
4
|
-
export { APPLICATION_ID_MAX_LENGTH, isAgentReferenceEnabled, isAgentRulesEnabled, isValidApplicationId, resolveAcceptedChildTypes, resolveElementComponents, resolveElementProps, resolveLazyElements, resolveMcpSettings, resolveOmittedProps, } from "./config.js";
|
|
4
|
+
export { APPLICATION_ID_MAX_LENGTH, isAgentReferenceEnabled, isAgentRulesEnabled, isValidApplicationId, LIBRARY_APPLICATION_ID, resolveAcceptedChildTypes, resolveElementComponents, resolveElementProps, resolveLazyElements, resolveMcpSettings, resolveOmittedProps, } from "./config.js";
|
|
5
5
|
export { createConfigLoader } from "./loader.js";
|
|
6
6
|
export { assertSupportedNodeVersion, DEFAULT_NODE_VERSION, MINIMUM_NODE_VERSION } from "./node-version.js";
|
|
7
7
|
export { resourceBasePath } from "./resource-base-path.js";
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EACH,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { configDependenciesFor, loadConfigModule } from \"./config-dependencies.ts\";\nexport { createConfigReloader } from \"./config-reloader.ts\";\nexport { configCandidatePaths } from \"./config-source.ts\";\nexport type { McpSettings, ResolvedReactCompilerOptions } from \"./config.ts\";\nexport {\n APPLICATION_ID_MAX_LENGTH,\n isAgentReferenceEnabled,\n isAgentRulesEnabled,\n isValidApplicationId,\n resolveAcceptedChildTypes,\n resolveElementComponents,\n resolveElementProps,\n resolveLazyElements,\n resolveMcpSettings,\n resolveOmittedProps,\n} from \"./config.ts\";\nexport { createConfigLoader } from \"./loader.ts\";\nexport { assertSupportedNodeVersion, DEFAULT_NODE_VERSION, MINIMUM_NODE_VERSION } from \"./node-version.ts\";\nexport { resourceBasePath } from \"./resource-base-path.ts\";\nexport { viteProjectRoot } from \"./vite-root.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EACH,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { configDependenciesFor, loadConfigModule } from \"./config-dependencies.ts\";\nexport { createConfigReloader } from \"./config-reloader.ts\";\nexport { configCandidatePaths } from \"./config-source.ts\";\nexport type { McpSettings, ResolvedReactCompilerOptions } from \"./config.ts\";\nexport {\n APPLICATION_ID_MAX_LENGTH,\n isAgentReferenceEnabled,\n isAgentRulesEnabled,\n isValidApplicationId,\n LIBRARY_APPLICATION_ID,\n resolveAcceptedChildTypes,\n resolveElementComponents,\n resolveElementProps,\n resolveLazyElements,\n resolveMcpSettings,\n resolveOmittedProps,\n} from \"./config.ts\";\nexport { createConfigLoader } from \"./loader.ts\";\nexport { assertSupportedNodeVersion, DEFAULT_NODE_VERSION, MINIMUM_NODE_VERSION } from \"./node-version.ts\";\nexport { resourceBasePath } from \"./resource-base-path.ts\";\nexport { viteProjectRoot } from \"./vite-root.ts\";\n"]}
|
package/dist/loader.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ApplicationConfig, type ResolvedConfig } from "./config.ts";
|
|
2
2
|
/** Result of loading a project's `gtkx.config.ts` file. */
|
|
3
3
|
type LoadedConfig = {
|
|
4
|
-
/** The parsed and validated configuration. */
|
|
5
|
-
config:
|
|
6
|
-
/**
|
|
4
|
+
/** The parsed and validated configuration, with the default application ID filled in when one stood in. */
|
|
5
|
+
config: ApplicationConfig;
|
|
6
|
+
/** Whether the configuration names its own `applicationId`, rather than a default standing in for it. */
|
|
7
|
+
isApplication: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Absolute path of the configuration file that was loaded, or of `gtkx.config.ts` in the project root
|
|
10
|
+
* when a default application ID stood in for a missing file.
|
|
11
|
+
*/
|
|
7
12
|
configFile: string;
|
|
8
13
|
/** Absolute path of the project root the configuration was resolved against. */
|
|
9
14
|
root: string;
|
|
15
|
+
/**
|
|
16
|
+
* The gettext domain: the `applicationId` production builds use, so a `$development` application ID
|
|
17
|
+
* shares the production catalogs.
|
|
18
|
+
*/
|
|
19
|
+
translationDomain: string;
|
|
10
20
|
};
|
|
11
21
|
/** How a configuration file is read, shared by {@link loadConfig} and `createConfigLoader`. */
|
|
12
22
|
type LoadConfigOptions = {
|
|
@@ -17,6 +27,12 @@ type LoadConfigOptions = {
|
|
|
17
27
|
mode?: string | undefined;
|
|
18
28
|
/** Whether to report graduated future flags; supervising processes can own these warnings. Defaults to true. */
|
|
19
29
|
shouldWarnGraduatedFuture?: boolean | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Application ID for a project that is not an application, such as a component library running its
|
|
32
|
+
* tests: it stands in for a missing `applicationId`, and for a missing configuration file unless
|
|
33
|
+
* `configFile` names a file other than `gtkx.config.ts` in the project root.
|
|
34
|
+
*/
|
|
35
|
+
defaultApplicationId?: string | undefined;
|
|
20
36
|
} & Partial<Record<"configFile", string | undefined>>;
|
|
21
37
|
/** Reads a project's configuration once per directory, caching what it loads and what it resolves. */
|
|
22
38
|
type ConfigLoader = {
|
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAaA,OAAO,EACH,KAAK,iBAAiB,EAItB,KAAK,cAAc,EAEtB,MAAM,aAAa,CAAC;AAGrB,2DAA2D;AAC3D,KAAK,YAAY,GAAG;IAChB,2GAA2G;IAC3G,MAAM,EAAE,iBAAiB,CAAC;IAC1B,yGAAyG;IACzG,aAAa,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,+FAA+F;AAC/F,KAAK,iBAAiB,GAAG;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,gHAAgH;IAChH,yBAAyB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AAEtD,sGAAsG;AACtG,KAAK,YAAY,GAAG;IAChB,gGAAgG;IAChG,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7C,yGAAyG;IACzG,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;CACrD,CAAC;AAgGF;;;;;GAKG;AACH,QAAA,MAAM,UAAU,QAAe,MAAM,YAAW,iBAAiB,KAAQ,OAAO,CAAC,YAAY,CA2D5F,CAAC;AAEF,QAAA,MAAM,kBAAkB,aAAa,iBAAiB,KAAQ,YAkB7D,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,CAAC"}
|
package/dist/loader.js
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
import { isPathInside, warn } from "@gtkx/utils";
|
|
2
2
|
import { loadConfig as loadConfigFile } from "c12";
|
|
3
|
+
import { defu } from "defu";
|
|
3
4
|
import { existsSync } from "node:fs";
|
|
4
5
|
import { relative, resolve } from "node:path";
|
|
5
6
|
import { addConfigSource, captureConfigDependencies, createConfigImporter, setConfigDependencies, } from "./config-dependencies.js";
|
|
6
|
-
import { missingConfigFileError } from "./config-error.js";
|
|
7
|
-
import {
|
|
8
|
-
import { graduatedFutureKeys, resolveConfig, validateConfig } from "./config.js";
|
|
7
|
+
import { isRecord, missingConfigFileError } from "./config-error.js";
|
|
8
|
+
import { configCandidatePaths, localConfigSourcePaths } from "./config-source.js";
|
|
9
|
+
import { graduatedFutureKeys, resolveConfig, validateConfig, } from "./config.js";
|
|
9
10
|
import { assertSupportedNodeVersion } from "./node-version.js";
|
|
10
11
|
const graduatedFutureWarnings = new Map();
|
|
12
|
+
const PRODUCTION_MODE = "production";
|
|
13
|
+
const EXTEND_KEY = "extends";
|
|
14
|
+
const DEFAULT_CONFIG_FILE_NAME = "gtkx.config.ts";
|
|
15
|
+
const recordOrEmpty = (value) => (isRecord(value) ? value : {});
|
|
16
|
+
const modeOverrides = (layer, mode) => ({
|
|
17
|
+
...recordOrEmpty(layer[`$${mode}`]),
|
|
18
|
+
...recordOrEmpty(recordOrEmpty(layer.$env)[mode]),
|
|
19
|
+
});
|
|
20
|
+
const configForMode = (layers, mode) => {
|
|
21
|
+
const merged = defu({}, ...layers.map((layer) => (mode ? defu(modeOverrides(layer, mode), layer) : layer)));
|
|
22
|
+
for (const key of Object.keys(merged)) {
|
|
23
|
+
if (key === EXTEND_KEY || key.startsWith("$")) {
|
|
24
|
+
Reflect.deleteProperty(merged, key);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return merged;
|
|
28
|
+
};
|
|
29
|
+
const productionApplicationId = (layers, config) => {
|
|
30
|
+
const { applicationId } = configForMode(layers, PRODUCTION_MODE);
|
|
31
|
+
return typeof applicationId === "string" ? applicationId : config.applicationId;
|
|
32
|
+
};
|
|
33
|
+
const withDefaultApplicationId = (config, applicationId) => applicationId === undefined || config.applicationId !== undefined ? config : { ...config, applicationId };
|
|
11
34
|
const rejectMissingLocalConfig = (source, options) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
35
|
+
const paths = localConfigSourcePaths(source, options);
|
|
36
|
+
for (const path of paths) {
|
|
37
|
+
addConfigSource(path);
|
|
15
38
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
throw new Error(`Extended configuration does not exist at ${path}`);
|
|
39
|
+
if (paths.length > 0 && !paths.some((path) => existsSync(path))) {
|
|
40
|
+
throw new Error(`Extended configuration ${source} does not exist in ${options.cwd ?? process.cwd()}`);
|
|
19
41
|
}
|
|
20
42
|
};
|
|
21
43
|
const withConfigDependencies = (dependencies, operation) => {
|
|
@@ -39,6 +61,9 @@ const selectedConfigFile = (root, configured) => {
|
|
|
39
61
|
}
|
|
40
62
|
return relative(root, path);
|
|
41
63
|
};
|
|
64
|
+
const explicitConfigFile = (root, selected) => selected !== undefined && configCandidatePaths(root).find((path) => existsSync(path)) === resolve(root, selected)
|
|
65
|
+
? undefined
|
|
66
|
+
: selected;
|
|
42
67
|
const warnGraduatedFuture = (config, root) => {
|
|
43
68
|
const keys = graduatedFutureKeys(config);
|
|
44
69
|
const signature = keys.join(",");
|
|
@@ -58,37 +83,45 @@ const loadConfig = async (cwd, options = {}) => {
|
|
|
58
83
|
assertSupportedNodeVersion();
|
|
59
84
|
const searched = resolve(cwd);
|
|
60
85
|
const requestedConfigFile = selectedConfigFile(searched, options.configFile);
|
|
86
|
+
const c12ConfigFile = explicitConfigFile(searched, requestedConfigFile);
|
|
61
87
|
const captured = await captureConfigDependencies(() => loadConfigFile({
|
|
62
88
|
name: "gtkx",
|
|
63
89
|
cwd: searched,
|
|
64
90
|
rcFile: false,
|
|
65
91
|
globalRc: false,
|
|
66
92
|
packageJson: false,
|
|
67
|
-
|
|
93
|
+
envName: false,
|
|
68
94
|
context: { mode: options.mode },
|
|
69
95
|
jiti: createConfigImporter(),
|
|
70
96
|
resolve: rejectMissingLocalConfig,
|
|
71
|
-
...(
|
|
72
|
-
...(options.mode !== undefined && { envName: options.mode }),
|
|
97
|
+
...(c12ConfigFile !== undefined && { configFile: c12ConfigFile }),
|
|
73
98
|
}));
|
|
74
99
|
const result = captured.value;
|
|
75
100
|
const configFile = result.configFile;
|
|
76
101
|
const root = result.cwd ?? searched;
|
|
77
102
|
const layerFiles = (result.layers ?? []).flatMap((layer) => layer.configFile === undefined ? [] : [resolve(layer.cwd ?? root, layer.configFile)]);
|
|
78
103
|
const dependencies = [...(configFile === undefined ? [] : [configFile]), ...layerFiles, ...captured.dependencies];
|
|
104
|
+
const foundConfigFile = configFile !== undefined && existsSync(resolve(searched, configFile)) ? configFile : undefined;
|
|
105
|
+
const isConfigFileOptional = options.defaultApplicationId !== undefined &&
|
|
106
|
+
(requestedConfigFile === undefined || requestedConfigFile === DEFAULT_CONFIG_FILE_NAME);
|
|
79
107
|
return withConfigDependencies(dependencies, () => {
|
|
80
|
-
if (
|
|
108
|
+
if (foundConfigFile === undefined && !isConfigFileOptional) {
|
|
81
109
|
throw missingConfigFileError(searched, requestedConfigFile);
|
|
82
110
|
}
|
|
83
|
-
const
|
|
84
|
-
|
|
111
|
+
const layers = (result.layers ?? []).flatMap((layer) => (isRecord(layer.config) ? [layer.config] : []));
|
|
112
|
+
const authored = configForMode(layers, options.mode ?? process.env.NODE_ENV);
|
|
113
|
+
const config = withDefaultApplicationId(authored, options.defaultApplicationId);
|
|
114
|
+
const loadedConfigFile = foundConfigFile ?? resolve(searched, DEFAULT_CONFIG_FILE_NAME);
|
|
115
|
+
validateConfig(config, loadedConfigFile);
|
|
85
116
|
if (options.shouldWarnGraduatedFuture !== false) {
|
|
86
117
|
warnGraduatedFuture(config, root);
|
|
87
118
|
}
|
|
88
119
|
const loaded = {
|
|
89
120
|
config,
|
|
90
|
-
|
|
121
|
+
isApplication: authored.applicationId !== undefined,
|
|
122
|
+
configFile: loadedConfigFile,
|
|
91
123
|
root,
|
|
124
|
+
translationDomain: productionApplicationId(layers, config),
|
|
92
125
|
};
|
|
93
126
|
setConfigDependencies(loaded, dependencies);
|
|
94
127
|
return loaded;
|
|
@@ -100,8 +133,8 @@ const createConfigLoader = (options = {}) => {
|
|
|
100
133
|
const resolved = new Map();
|
|
101
134
|
const load = (cwd) => loaded.getOrInsertComputed(resolve(cwd), (root) => loadConfig(root, options));
|
|
102
135
|
const resolveAt = async (root) => {
|
|
103
|
-
const { config, root: configRoot } = await load(root);
|
|
104
|
-
return resolveConfig(config, configRoot);
|
|
136
|
+
const { config, root: configRoot, translationDomain } = await load(root);
|
|
137
|
+
return resolveConfig(config, translationDomain, configRoot);
|
|
105
138
|
};
|
|
106
139
|
return {
|
|
107
140
|
load,
|