{"id":16006077,"url":"https://github.com/pfrazee/published-working-tree","last_synced_at":"2025-07-11T15:41:07.910Z","repository":{"id":65371439,"uuid":"41116401","full_name":"pfrazee/published-working-tree","owner":"pfrazee","description":"Read file-trees from disk and compare against a published tree","archived":false,"fork":false,"pushed_at":"2015-08-23T03:47:10.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-08T22:04:38.535Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pfrazee.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}},"created_at":"2015-08-20T20:04:45.000Z","updated_at":"2015-08-23T05:05:22.000Z","dependencies_parsed_at":"2023-01-19T22:35:13.186Z","dependency_job_id":null,"html_url":"https://github.com/pfrazee/published-working-tree","commit_stats":null,"previous_names":["pfraze/published-working-tree"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pfrazee/published-working-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfrazee%2Fpublished-working-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfrazee%2Fpublished-working-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfrazee%2Fpublished-working-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfrazee%2Fpublished-working-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pfrazee","download_url":"https://codeload.github.com/pfrazee/published-working-tree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfrazee%2Fpublished-working-tree/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264842228,"owners_count":23671957,"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-10-08T11:23:15.081Z","updated_at":"2025-07-11T15:41:07.806Z","avatar_url":"https://github.com/pfrazee.png","language":"JavaScript","readme":"# Published Working Tree\n\nRead file-trees from disk and compare against a published tree.\nUsed in [Patchwork](https://github.com/ssbc/patchwork) to drive publishing interfaces.\n\n## Usage\n\n```js\nvar pwt = require('published-working-tree')\n\n// symbols used in tree to refer to non-file attributes\npwt.TYPE // 'directory' or 'file'\npwt.STAT // fs.Stat\npwt.NAME // String\npwt.PATH // Path\npwt.PUBLISHED // Boolean\npwt.MODIFIED // Boolean\npwt.DELETED // Boolean\npwt.ACTIVE // Boolean\npwt.DIRREAD // Boolean\n\n// load working tree from disk, compared against a published tree\npwt.loadworking(rootpath, publishedTree, function (err, workingTree) {\n  // ...\n})\n\n// read all of the directory tree, without a published tree to compare against\nvar working = {}\npwt.readall (filepath, working, function () {\n  // ...\n})\n\n// read just one directory\nvar working = {}\npwt.read (filepath, working, true, function () {\n  // ...\n})\n\n// enumerate modifications to be published\npwt.changes (working)\n// =\u003e { adds: [..], dels: [..], mods: [..] }\n\n// get change-state of item\npwt.change (item)\n// =\u003e 'mod', 'add', or 'del'\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfrazee%2Fpublished-working-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpfrazee%2Fpublished-working-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfrazee%2Fpublished-working-tree/lists"}