{"id":22428389,"url":"https://github.com/momsfriendlydevco/macgyver","last_synced_at":"2025-09-03T09:35:27.027Z","repository":{"id":65769226,"uuid":"100013236","full_name":"MomsFriendlyDevCo/macgyver","owner":"MomsFriendlyDevCo","description":"Dynamic form widgets for Angular","archived":false,"fork":false,"pushed_at":"2021-06-05T00:07:40.000Z","size":1793,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-29T12:01:30.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://momsfriendlydevco.github.io/macgyver","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/MomsFriendlyDevCo.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}},"created_at":"2017-08-11T09:01:27.000Z","updated_at":"2021-06-05T00:07:43.000Z","dependencies_parsed_at":"2023-02-09T01:15:17.259Z","dependency_job_id":null,"html_url":"https://github.com/MomsFriendlyDevCo/macgyver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MomsFriendlyDevCo/macgyver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmacgyver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmacgyver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmacgyver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmacgyver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MomsFriendlyDevCo","download_url":"https://codeload.github.com/MomsFriendlyDevCo/macgyver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyDevCo%2Fmacgyver/sbom","scorecard":{"id":95754,"data":{"date":"2025-08-11","repo":{"name":"github.com/MomsFriendlyDevCo/macgyver","commit":"6f5ee3e986f873de769e2af76ae200f9577e4edd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":0,"reason":"Found 0/30 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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":-1,"reason":"no dependencies found","details":null,"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 'master'"],"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":"Vulnerabilities","score":0,"reason":"41 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-2qqx-w9hr-q5gx","Warn: Project is vulnerable to: GHSA-2vrf-hf26-jrp5","Warn: Project is vulnerable to: GHSA-4w4v-5hc9-xrr2","Warn: Project is vulnerable to: GHSA-j58c-ww9w-pwp5","Warn: Project is vulnerable to: GHSA-m2h2-264f-f486","Warn: Project is vulnerable to: GHSA-m9gf-397r-hwpg","Warn: Project is vulnerable to: GHSA-mqm9-c95h-x2p6","Warn: Project is vulnerable to: GHSA-prc3-vjfx-vhm9","Warn: Project is vulnerable to: GHSA-qwqh-hm9m-p5hr","Warn: Project is vulnerable to: GHSA-4p4w-6hg8-63wx","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-9mvj-f7w8-pvh2","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-8mmm-9v2q-x3f9","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p"],"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-15T08:59:31.194Z","repository_id":65769226,"created_at":"2025-08-15T08:59:31.195Z","updated_at":"2025-08-15T08:59:31.195Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273423307,"owners_count":25103140,"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-09-03T02:00:09.631Z","response_time":76,"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":[],"created_at":"2024-12-05T20:14:40.097Z","updated_at":"2025-09-03T09:35:26.981Z","avatar_url":"https://github.com/MomsFriendlyDevCo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"MacGyver\n========\nDynamic form widgets for Angular.\n\nMacGyver is a form designer for Angular that works by being given a form definition and a data set.\n\n[LIVE DEMO](https://momsfriendlydevco.github.io/macgyver)\n\n\nExample\n-------\n```javascript\nangular\n\t.module('macgyver')\n\t.component('myComponent', {\n\t\tcontroller: function() {\n\t\t\tvar $ctrl = this;\n\n\t\t\t$ctrl.data = {}; // This will be populated by MacGyver\n\n\t\t\t$ctrl.form = { // Our form specification\n\t\t\t\ttype: \"mgContainer\",\n\t\t\t\titems: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"textInput\",\n\t\t\t\t\t\ttype: \"mgText\",\n\t\t\t\t\t\ttitle: \"Example Text\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"toggleControl\",\n\t\t\t\t\t\ttype: \"mgToggle\",\n\t\t\t\t\t\tdefault: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\t\t},\n\t\ttemplate: `\n\t\t\t\u003cmg-form config=\"$ctrl.form\" data=\"$ctrl.data\"\u003e\u003c/mg-form\u003e\n\t\t`,\n\t});\n```\n\nEditing a form\n--------------\nMacGyver also ships with a form editor. To use simply make a HTML page with the `mgFormEditor` component for an interactive UI.\n\n```html\n\u003cmg-form-editor config=\"$ctrl.form\" data=\"$ctrl.data\"\u003e\u003c/mg-form-editor\u003e\n```\n\n\n\nAPI Methods\n===========\nMagGyver works by using Angular's template system to nest widgets with two-way data binding.\n\n\nCreating MacGyver widgets\n-------------------------\nEach MagGyver widget begins with `mg` and should be registered via `$macgyver.register()`.\n\n```javascript\nangular\n\t.module('macgyver')\n\t.config($macgyverProvider =\u003e $macgyverProvider.register('mgText', {\n\t\ttitle: 'Textbox',\n\t\ticon: 'fa fa-pencil-square-o',\n\t\tconfig: {\n\t\t\tplaceholder: {type: 'mgText', help: 'Ghost text to display when the textbox has no value'},\n\t\t},\n\t}))\n\t.component('mgText', {\n\t\tbindings: {\n\t\t\tconfig: '\u003c', // Config for this widget\n\t\t\tdata: '=', // Data state for this widget\n\t\t},\n\t\tcontroller: function($macgyver, $scope) {\n\t\t\tvar $ctrl = this;\n\t\t\t$macgyver.inject($scope, $ctrl);\n\n\t\t\t// Adopt default if no data value is given\n\t\t\t$scope.$watch('$ctrl.data', ()=\u003e { if (_.isUndefined($ctrl.data) \u0026\u0026 _.has($ctrl, 'config.default')) $ctrl.data = $ctrl.config.default });\n\n\t\t\t// Optionally respond to validation requests\n\t\t\t$ctrl.validate = ()=\u003e {\n\t\t\t\tif ($ctrl.config.required \u0026\u0026 !$ctrl.data) return `${$ctrl.config.title} is required`;\n\t\t\t};\n\t\t},\n\t\ttemplate: `\n\t\t\t\u003cinput ng-model=\"$ctrl.data\" type=\"text\" class=\"form-control\" placeholder=\"{{$ctrl.config.placeholder}}\"/\u003e\n\t\t`,\n\t})\n```\n\n\n$macgyver\n---------\nThe main service / provider within Angular.\n\n**NOTE:** `$macgyverProvider` and `$macgyver` are the same. The provider is available as an alias to allow registration of components during the Angular Config phase.\n\n\n$macgyver.register(id, [properties])\n------------------------------------\nRegister a widget for use by name. Each id should begin with `id` and be in camelCase form.\n\nWidgets can contain the following meta properties:\n\n| Property           | Type      | Default                    | Description                                                                                      |\n|--------------------|-----------|----------------------------|--------------------------------------------------------------------------------------------------|\n| `config`           | `Object`  | *none*                     | Object detailing each optional property the widget can take as a `mgContainer` specification     |\n| `icon`             | `string`  | *none*                     | The icon CSS class to use in the `mgFormEditor` UI                                               |\n| `isContainer`      | `boolean` | `false`                    | Indicates that the widget can contain other widgets (under the `items` array)                    |\n| `isContainerArray` | `boolean` | `false`                    | Addition to `isContainer` that indicates the widget will contain an array of rows (like a table) |\n| `template`         | `string`  | `\u003cCOMPONENT_NAME/\u003e`        | Rendering template to be used to draw the element                                                |\n| `title`            | `string`  | The ID via `_.startCase()` | The human friendly title of the widget                                                           |\n| `userPlaceable`    | `boolean` | `false`                    | Whether to hide the object from the user in the `mgFormEditor` UI                                |\n\n\n$macgyver.getForm($scope)\n-------------------------\nFinds and returns the component scope of the first available form under the given scope.\n\n\n$macgyver.inject($scope, $ctrl)\n-------------------------------\nFunction used by MacGyver components to register themselves against the standard event hooks during initialization.\n\n\n$macgyver.getDataTree(root, [useDefaults=false])\n------------------------------------------------\nGenerate an empty data entity from a given widget container. This function can be used to return the 'blank' form contents. If `useDefaults == true` the defaults for each widget will be set as the value.\n\n\n$macgyver.neatenSpec(spec)\n--------------------------\nAttempt to neaten up a 'rough' MacGyver spec into a pristine one.\nThis function performs various sanity checks on nested elements e.g. checking each item has a valid ID and if not adding one.\n\n\n$macgyver.specDataPrototype(spec)\n---------------------------------\nCreate an empty data structure based on the specification. This is really just used to make sure that the deeply nested objects-within-objects (or arrays) are present when Angular tries to bind to them.\n\n\n$macgyver.widgets\n-----------------\nAn object containing data on each valid MacGyver widget registered. If running on the front-end this is updated as new widgets register themselves. On the backend this uses the computed version located in `./dist/widgets.json`.\n\n\nAPI Events\n==========\nMacGyver components are also expected to optionally respond to the following events:\n\nmg.get(event, register)\n-----------------------\nUsed by MacGyver to 'ping' controls. Each control is expected to populate the register object with its ID and `$ctrl` instance.\nThis event is automatically responded to if the component calls `$macgyver.inject()` during its init cycle. If the component does not respond higher-level events such as validation will not be able to reach the component.\n\n\nmg.getForm(event, form)\n-----------------------\nUsed by MacGyver during `$macgyver.getForm()` calls to retrieve the forms under the scope.\nThe responding form is expected to populate the `form.form` object with its controller instance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmomsfriendlydevco%2Fmacgyver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmomsfriendlydevco%2Fmacgyver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmomsfriendlydevco%2Fmacgyver/lists"}