{"id":20789790,"url":"https://github.com/samualtnorman/hackmud-script-manager","last_synced_at":"2025-10-28T05:07:04.290Z","repository":{"id":42684299,"uuid":"290326531","full_name":"samualtnorman/hackmud-script-manager","owner":"samualtnorman","description":"Script manager for game hackmud, with minification, TypeScript support, and player script type definition generation.","archived":false,"fork":false,"pushed_at":"2025-05-12T13:19:42.000Z","size":1376,"stargazers_count":14,"open_issues_count":38,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-09T03:12:53.803Z","etag":null,"topics":["api","command-line","hackmd","hackmud","javascipt","manager","minification","minifier","script","typescipt","typescript-support"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/hackmud-script-manager","language":"TypeScript","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/samualtnorman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["samualtnorman"],"patreon":null,"open_collective":null,"ko_fi":"samualn","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2020-08-25T21:23:05.000Z","updated_at":"2025-05-12T13:19:46.000Z","dependencies_parsed_at":"2024-04-21T21:14:33.988Z","dependency_job_id":"2d2b1c6a-3108-4c24-b35f-d442e85a26b2","html_url":"https://github.com/samualtnorman/hackmud-script-manager","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/samualtnorman/hackmud-script-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samualtnorman%2Fhackmud-script-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samualtnorman%2Fhackmud-script-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samualtnorman%2Fhackmud-script-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samualtnorman%2Fhackmud-script-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samualtnorman","download_url":"https://codeload.github.com/samualtnorman/hackmud-script-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samualtnorman%2Fhackmud-script-manager/sbom","scorecard":{"id":798260,"data":{"date":"2025-08-11","repo":{"name":"github.com/samualtnorman/hackmud-script-manager","commit":"761acfc3b90bc855c09906dd06dd50aa4bcacef1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":2,"reason":"Found 4/16 approved changesets -- score normalized to 2","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":"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":"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":"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":"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":"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/test.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":"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:10: update your workflow using https://app.stepsecurity.io/secureworkflow/samualtnorman/hackmud-script-manager/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/samualtnorman/hackmud-script-manager/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/samualtnorman/hackmud-script-manager/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/samualtnorman/hackmud-script-manager/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/samualtnorman/hackmud-script-manager/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/samualtnorman/hackmud-script-manager/test.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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 18 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":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3"],"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-23T09:38:43.089Z","repository_id":42684299,"created_at":"2025-08-23T09:38:43.089Z","updated_at":"2025-08-23T09:38:43.089Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281386589,"owners_count":26492014,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","command-line","hackmd","hackmud","javascipt","manager","minification","minifier","script","typescipt","typescript-support"],"created_at":"2024-11-17T15:29:11.770Z","updated_at":"2025-10-28T05:07:04.282Z","avatar_url":"https://github.com/samualtnorman.png","language":"TypeScript","readme":"# Hackmud Script Manager\n\nCommand made for [Hackmud Scripting Environment](https://github.com/samualtnorman/hackmud-environment), which is a scripting environment for hackmud with minification, autocompletes / intellisense, and TypeScript support.\n\nJoin [our Discord server](https://discord.gg/RSa4Sc6pNA)!\n\nYou can read about how HSM works [in my blog post](https://samual.uk/blog/js-code-transformation-niche-environment/).\n\n## Install\n\n1. [Install Node.js](https://nodejs.org/en/download)\n2. Run `npm install -g hackmud-script-manager`\n\n## Usage\n\n1. Run `#dir` in game, then `cd` to that folder\n2. Name your source script file to `\u003cname\u003e.src.js`\n3. Run `hsm minify \u003cname\u003e.src.js` and it will create a minified script file called `\u003cname\u003e.js`\n\n\u003e **NOTE:** If you get an error message that looks like this:\n\u003e\n\u003e ```\n\u003e [...]\\AppData\\Local\\pnpm\\hsm.ps1 cannot be loaded because running scripts is disabled on this system. [...]\n\u003e ```\n\u003e\n\u003e You will need to run `Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser` in PowerShell as an administrator. For more information, see [Microsoft's page about Execution Policies](https://learn.microsoft.com/en-gb/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4).\n\n![image](https://github.com/user-attachments/assets/cc97f8a6-82a4-4a66-9785-accc8d774285)\n![image](https://github.com/user-attachments/assets/d0ec9450-4e16-4f8d-82b2-734deaf5abe3)\n![image](https://github.com/user-attachments/assets/a59a6ec4-d268-40f7-8ce2-5fbdbcd40c19)\n\n## Features\n\n- Minification\n  - This includes auto quine cheating.\n    - Supported types are null, numbers, strings, and JSON compatible objects and arrays.\n    - Non JSON compatible object keys are quine cheated.\n    - Member expressions are converted to index notation so the index string can be quine cheated.\n    - And template literals are converted to string concatenation so the strings can be quine cheated.\n  - Global variable aliasing.\n  - Convert function declarations to arrow function assigned to variable hoisted to the top of the block (`function foo() { ... }` -\u003e `let foo = () =\u003e ...`).\n  - Convert `_START` and `_TIMEOUT` to `_ST` and `_TO`.\n  - Remove unused parameters from the main function expression.\n- Modern Javascript Syntax and Features\n  - [Exponentiation Operator](https://babeljs.io/docs/en/babel-plugin-transform-exponentiation-operator), [Object Rest Spread](https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spread), [Optional Catch Binding](https://babeljs.io/docs/en/babel-plugin-proposal-optional-catch-binding), [JSON strings](https://babeljs.io/docs/en/babel-plugin-proposal-json-strings), [Nullish Coalescing Operator](https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator), [Optional Chaining](https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining), [Logical Assignment Operators](https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators), [Numeric Seperators](https://babeljs.io/docs/en/babel-plugin-proposal-numeric-separator), [Class Properties](https://babeljs.io/docs/en/babel-plugin-proposal-class-properties), [Class Static Block](https://babeljs.io/docs/en/babel-plugin-proposal-class-static-block), [Private Property `in` Object](https://babeljs.io/docs/en/babel-plugin-proposal-private-property-in-object).\n  - Bigint literals are converted to `BigInt()` calls.\n  - Hackmud already supports all modern regular expression features.\n- Future JavaScript Syntax and Features\n  - Warning: TypeScript doesn't support any of these features and these features may change or not actually make it into JavaScript.\n  - [Decorators](https://babeljs.io/docs/en/babel-plugin-proposal-decorators), [Do Expressions](https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions), [Function Bind](https://babeljs.io/docs/en/babel-plugin-proposal-function-bind), [Function Sent](https://babeljs.io/docs/en/babel-plugin-proposal-function-sent), [Partial Application](https://babeljs.io/docs/en/babel-plugin-proposal-partial-application), [Pipeline Operator](https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator) (using the hack proposal and `%` as the topic token), [Throw Expression](https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions), [Record and Tuple](https://babeljs.io/docs/en/babel-plugin-proposal-record-and-tuple) (hash `#` syntax type).\n- TypeScript Support\n  - This command/module does **not** do type checking, it simply removes type annotations so you'll need to rely on your IDE or run `tsc` seperatly with `noEmit`.\n- And “Cool” Unnecessary Features.\n  - Variables declared outside the main function expression automatically become `#G` global variables.\n  - Any code outside the function expression will only run once per top level script execution (`#FMCL`).\n  - Basic seclevel verification.\n    - Declaring `// @seclevel HIGHSEC` or any other seclevel before all of your code stops you from accidentally using `#ls.` or `#ns.`.\n  - Import `node_modules` modules into your script using `import { foo } from \"bar\"` syntax.\n  - `_SOURCE` is replaced with a string of the source code of the script it's in.\n  - `_BUILD_DATE` is replaced with a unix timestamp (`Date.now()`) of the build date of the script.\n  - `_SCRIPT_USER` is replaced with a string of the user the script was pushed to.\n    - This saves characters compared to `context.this_script.split(\".\")[0]`.\n  - `_SCRIPT_SUBNAME` is like `_SCRIPT_USER` but for the name of the script.\n    - Saves characters compared to `context.this_script.split(\".\")[1]`.\n  - `_FULL_SCRIPT_NAME` is replaced with what would be in `context.this_script`.\n  - Subscript and `#db` methods names are verified.\n  - All references to preprocessor syntax functions not being called are turned into arrow function wrappers e.g. `let debug = #D;` -\u003e `let debug = v =\u003e #D(v);`.\n  - `_SECLEVEL` is replaced with a number (`0` to `4`) representing the seclevel of the script.\n- And Neat Weird Fixes\n  - Like `.__proto__` and `.prototype` being converted to `[\"__proto__\"]` and `[\"prototype\"]`.\n  - Illegal and unsafe strings.\n    - Appearences of `_SC` and friends are either renamed or have an escape inserted so that script is legal.\n    - Preprocessor syntax in strings are escaped so hackmud doesn't recognise them as preprocessor syntax.\n    - And appearences of `//` in strings and regexes have a backslash inserted between to stop hackmud's overagressive comment remover from removing half the line of code.\n  - Classes are actually usable now, this module replaces instances of `this` with a variable referencing what would be `this`.\n  - `Function.prototype` can be referenced (but only the `.prototype` property, nothing else).\n  - `Object.getPrototypeOf` and `Object.setPrototypeOf` are replaced with equivalent functions.\n","funding_links":["https://github.com/sponsors/samualtnorman","https://ko-fi.com/samualn"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamualtnorman%2Fhackmud-script-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamualtnorman%2Fhackmud-script-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamualtnorman%2Fhackmud-script-manager/lists"}