{"id":15780097,"url":"https://github.com/luismeyer/node-mtmr","last_synced_at":"2026-04-26T12:32:57.830Z","repository":{"id":51149069,"uuid":"356259686","full_name":"luismeyer/node-mtmr","owner":"luismeyer","description":"Node wrapper for MTMR","archived":false,"fork":false,"pushed_at":"2023-02-03T12:13:08.000Z","size":439,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T11:20:24.483Z","etag":null,"topics":["mtmr","node","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luismeyer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-04-09T12:17:25.000Z","updated_at":"2022-04-04T12:41:57.000Z","dependencies_parsed_at":"2024-10-04T18:40:42.216Z","dependency_job_id":"c4dec4a1-9564-4164-84c7-0198f00387b0","html_url":"https://github.com/luismeyer/node-mtmr","commit_stats":{"total_commits":43,"total_committers":1,"mean_commits":43.0,"dds":0.0,"last_synced_commit":"2e672e69b6157e9a1a70663f5b1c66b7c4afc1f9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/luismeyer/node-mtmr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismeyer%2Fnode-mtmr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismeyer%2Fnode-mtmr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismeyer%2Fnode-mtmr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismeyer%2Fnode-mtmr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luismeyer","download_url":"https://codeload.github.com/luismeyer/node-mtmr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismeyer%2Fnode-mtmr/sbom","scorecard":{"id":603596,"data":{"date":"2025-08-11","repo":{"name":"github.com/luismeyer/node-mtmr","commit":"2e672e69b6157e9a1a70663f5b1c66b7c4afc1f9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/luismeyer/node-mtmr/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/luismeyer/node-mtmr/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/luismeyer/node-mtmr/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull-request.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/luismeyer/node-mtmr/pull-request.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull-request.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/luismeyer/node-mtmr/pull-request.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/pull-request.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T01:04:33.176Z","repository_id":51149069,"created_at":"2025-08-21T01:04:33.176Z","updated_at":"2025-08-21T01:04:33.176Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32297895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["mtmr","node","typescript"],"created_at":"2024-10-04T18:40:31.661Z","updated_at":"2026-04-26T12:32:57.805Z","avatar_url":"https://github.com/luismeyer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node MTMR\n\nThis is a Node library which wraps around [MTMR](https://github.com/Toxblh/MTMR). It is highly recommended to use this library with typescript. The main features are:\n\n1. TS/JS support for button handlers\n2. Typescript typings for the items\n\nFor further documentation have a look at the original [repo](https://github.com/Toxblh/MTMR).\n\n## Installation\n\nHere you find the [NPM Page](https://www.npmjs.com/package/node-mtmr).\n\n```bash\nnpm i node-mtmr\n```\n\nOr\n\n```bash\nyarn add node-mtmr\n```\n\n## Setup\n\nA working example can be found [here](./example).\n\n### Initialize parse\n\nCreate an index file inside your \"src\" directory. In this file call the \"createParse\" function:\n\n```js\nimport { createParse } from \"node-mtmr\";\n\nconst parse = createParse({\n  outDir: \"./my-mtmr-config\",\n  loggingEnabled: true,\n});\n```\n\n1. \"outDir\" is the output path for the script and assets. It's either relative to the cwd or absolute\n2. \"loggingEnabled\" configures the logging output\n\n### Execute parse\n\nPass the items to the parse function. The result is a correct MTMR item array.\n\n```js\nconst result = await parse(items);\n```\n\n### Save result\n\nThere is a utility function for saving the output into the MTMR directory. Pass an options object with the force set to true to overwrite an existing file.\n\n```js\nimport { saveItems } from \"node-mtmr\";\n\nsaveItems(result, { force: true });\n```\n\n### Utilities\n\nIf you want to create a ScriptTitledButton with a jsSource you can use either the `createSourceScriptSync` or the `createSourceScript` function. These will handle your script result and hand them to MTMR.\n\n```ts\ncreateSourceScriptSync(() =\u003e {\n  const buttonLabel = \"Label\";\n  const imageIdentifier = \"inactive\";\n\n  return {\n    label: buttonLabel,\n    imgKey: imageIdentifier,\n  };\n});\n```\n\nor async\n\n```ts\ncreateSourceScript(async () =\u003e {\n  const label = await func();\n  return label;\n});\n```\n\nor pass the result to the `sourceOutput` util function\n\n```ts\nsourceOutput({\n  label: \"Label\",\n  imgKey: \"key\",\n});\n```\n\nIf you your button needs a state make use of the state functions. Internally the data is stored in your computers ''/tmp/'' folder (so it might be deleted at some point):\n\n```ts\nconst stateId = \"counter\";\n\nconst count = stateValue\u003cnumber\u003e(stateId, 0);\nconst setCount = stateFunction\u003cnumber\u003e(stateId);\nconst [count, setCount] = state\u003cnumber\u003e(stateId);\n```\n\n## JavaScriptTitledButton\n\nThis is the new item type which supports JavaScript.\n\n```ts\n{\n  type: \"scriptTitledButton\",\n  sourceType: \"javaScript\",\n  jsSource: {\n    inline: () =\u003e {\n      // Your function logic\n    },\n  },\n  actions: [\n    {\n      action: \"javaScript\",\n      trigger: \"singleTap\",\n      actionJavaScript: {\n        filePath: \"./path/to/js/file.js\",\n      },\n    },\n  ],\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluismeyer%2Fnode-mtmr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluismeyer%2Fnode-mtmr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluismeyer%2Fnode-mtmr/lists"}