{"id":17254223,"url":"https://github.com/waynevanson/script-context","last_synced_at":"2025-10-06T14:21:54.634Z","repository":{"id":118621294,"uuid":"582864389","full_name":"waynevanson/script-context","owner":"waynevanson","description":"Run a script from package.json based on its context (ie. `postinstall:local` or `postinstall:dependency`)","archived":false,"fork":false,"pushed_at":"2023-06-13T09:13:17.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-03T16:54:16.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/waynevanson.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":"2022-12-28T04:36:35.000Z","updated_at":"2022-12-28T04:37:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"10589624-2ffc-46bd-8829-b65268c4e18d","html_url":"https://github.com/waynevanson/script-context","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/waynevanson/script-context","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynevanson%2Fscript-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynevanson%2Fscript-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynevanson%2Fscript-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynevanson%2Fscript-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waynevanson","download_url":"https://codeload.github.com/waynevanson/script-context/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynevanson%2Fscript-context/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278623222,"owners_count":26017558,"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-06T02:00:05.630Z","response_time":65,"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-10-15T07:07:51.635Z","updated_at":"2025-10-06T14:21:54.605Z","avatar_url":"https://github.com/waynevanson.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@waynvanson/script-context`\n\n## Why\n\nWhere are some libraries out in the ecosystem that can do parts of what this tool can do,\nbut they either do an underwhelming job or are too tied to one aspect.\n\n## Use Cases\n\n### `postinstall` Scripts\n\nIt will run either `postinstall:project` or `postinstall:package` based on the context,\nusing your package manager.\n\nThis will work across any lifecycle script.\n\n\u003e TODO - Rename to `project` and `package`.\n\n```json\n// package.json\n\n{\n  \"name\": \"your-package-name\",\n  \"version\": \"1.0.0\",\n  \"scripts\": {\n    \"postinstall\": \"script-context\",\n    \"postinstall:project\": \"echo 'launched project postinstall'\",\n    \"postinstall:package\": \"echo 'launched package postinstall'\"\n  }\n}\n```\n\n### As library\n\nCan be used in a node, neon/rust application directly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaynevanson%2Fscript-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaynevanson%2Fscript-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaynevanson%2Fscript-context/lists"}