{"id":21590977,"url":"https://github.com/toolsplus/pkl-forge","last_synced_at":"2025-03-18T10:15:30.440Z","repository":{"id":223433955,"uuid":"760250097","full_name":"toolsplus/pkl-forge","owner":"toolsplus","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-22T03:46:35.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T16:28:33.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toolsplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-20T04:07:24.000Z","updated_at":"2024-02-20T06:20:09.000Z","dependencies_parsed_at":"2024-02-20T08:29:33.795Z","dependency_job_id":"79fcdaf4-769c-4cbe-b690-a8e85aef0553","html_url":"https://github.com/toolsplus/pkl-forge","commit_stats":null,"previous_names":["toolsplus/pkl-forge"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolsplus%2Fpkl-forge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolsplus%2Fpkl-forge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolsplus%2Fpkl-forge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolsplus%2Fpkl-forge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toolsplus","download_url":"https://codeload.github.com/toolsplus/pkl-forge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198406,"owners_count":20414443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T16:21:27.532Z","updated_at":"2025-03-18T10:15:30.421Z","avatar_url":"https://github.com/toolsplus.png","language":"JavaScript","readme":"# pkl-forge\n\nTooling to generate a pkl template from the Forge manifest JSON schema. This allows to verify and configure a dynamic Atlassian Forge manifest.pkl file.\n\nUse the following command to generate the `ManifestSchema.pkl` template\n\n```shell\nnpm run generate\n```\n\n\u003e [!NOTE]\n\u003e The published Forge manifest JSON schema has some discrepancies with the actual manifest definition. These are the currently known issues:\n\u003e * Connect modules are defined under `definitions.ModuleSchema.properties` and are prefixed with `connect-` instead of being defined under `definitions.ConnectModuleSchema.properties`\n\u003e * some Connect module definitions are missing, in particular Jira Service Desk modules\n\u003e \n\u003e This script attempts to fix some these issues by moving Connect module definitions under the correct definition scope and back-fill missing module Connect definitions.  \n\n## Reference \n\n### Converting any JSON Schema to pkl template:\n\n```shell\npkl eval package://pkg.pkl-lang.org/pkl-pantry/org.json_schema.contrib@1.0.1#/generate.pkl -m . -p source=\"https://json.schemastore.org/github-action.json\"\n```\n\nRefer to the instructions here: https://github.com/apple/pkl/issues/92#issuecomment-1936593897\n\n### Converting a manifest.yml to manifest.pkl\n\nCreate a file called `manifest-converter.pkl` in the same folder as your `manifest.yml` file with the following content:\n\n```pkl\nimport \"pkl:yaml\"\n\nfile = read(\"file:manifest.yml\")\nparsed = new yaml.Parser {}.parse(file)\n\noutput {\n  value = parsed\n}\n```\n\nAfter that run the following command to convert the YAML file to a pkl file:\n\n```shell\npkl eval manifest-converter.pkl \u003e manifest.pkl\n```\n\nRefer to [this issue comment](https://github.com/apple/pkl/issues/6#issuecomment-1925283577) for details.\n\n\u003e [!IMPORTANT]\n\u003e We noticed that the conversion output may not always be compatible with the generated `ManifestSchema.pkl` (we believe because the pkl conversion is missing some type information).\n\u003e \n\u003e For example, the pkl manifest template generated by this code generates display condition `params` of pkl type `Mapping\u003cString, Any\u003e`. However, the `manifest-converter.pkl` shown above creates `params` as [properties](https://pkl-lang.org/main/current/language-tutorial/01_basic_config.html#properties), when the type `Mapping\u003cString, Any\u003e` requires them to be [entries](https://pkl-lang.org/main/current/language-tutorial/01_basic_config.html#entries). As a result, you have to update the output generated by `manifest-converter.pkl` and convert `params` to entries by wrapping the key into square brackets and quotes (`key1` becomes `[\"key1\"]`).\n\u003e \n\u003e We may be able to solve this with [ideas explained in this comment](https://github.com/apple/pkl/issues/6#issuecomment-1935794768).\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoolsplus%2Fpkl-forge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoolsplus%2Fpkl-forge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoolsplus%2Fpkl-forge/lists"}