{"id":16208733,"url":"https://github.com/starikcetin/unity-ccd-locker","last_synced_at":"2026-01-04T21:47:21.858Z","repository":{"id":176449599,"uuid":"657093744","full_name":"starikcetin/unity-ccd-locker","owner":"starikcetin","description":"A git-based locking mechanism for Unity CCD bucket operations. Can be used to prevent simultaneous operations.","archived":false,"fork":false,"pushed_at":"2024-07-17T19:49:05.000Z","size":532,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T13:37:32.515Z","etag":null,"topics":["addressables","asset-bundles","ccd","lock","locking","ucd","unity","unity3d"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/unity-ccd-locker","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/starikcetin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-06-22T09:56:32.000Z","updated_at":"2023-11-28T19:22:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b20dc66-9940-447b-b922-1ec02515eaa2","html_url":"https://github.com/starikcetin/unity-ccd-locker","commit_stats":null,"previous_names":["starikcetin/unity-ccd-locker"],"tags_count":4,"template":false,"template_full_name":"themetalfleece/nodejs-typescript-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starikcetin%2Funity-ccd-locker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starikcetin%2Funity-ccd-locker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starikcetin%2Funity-ccd-locker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starikcetin%2Funity-ccd-locker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/starikcetin","download_url":"https://codeload.github.com/starikcetin/unity-ccd-locker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918582,"owners_count":20531686,"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":["addressables","asset-bundles","ccd","lock","locking","ucd","unity","unity3d"],"created_at":"2024-10-10T10:25:25.958Z","updated_at":"2026-01-04T21:47:21.828Z","avatar_url":"https://github.com/starikcetin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity CCD Locker\n\nA git-based locking mechanism for Unity CCD bucket operations. Can be used to prevent simultaneous operations.\n\n## Requirements\n\n- Node.js version `8.0.0` or higher _(not needed for executable binaries)_.\n- You have Git installed and it is in your PATH.\n\n## Installation\n\n### Install via npm\n\n```sh\nnpm i -g unity-ccd-locker\n```\n\nYou can use `yarn` etc. as well.\n\n### Download an executable binary\n\nExecutable binaries are available for Windows, Mac, and Linux. You don't anything except git installed on your system to use them.\n\nYou can download them from the assets section of a [Github release](https://github.com/starikcetin/unity-ccd-locker/releases).\n\n## Usage\n\n```\nunity-ccd-locker \u003ccommand\u003e \u003carguments\u003e\n```\n\nYou can also call `ucl` instead of `unity-ccd-locker`.\n\n### Setup a locks repository\n\n`unity-ccd-locker` requires a git reposiory to store the locks. :\n\n1. Create an empty repository.\n2. Run `unity-ccd-locker init --repoUrl \u003cREPO URL\u003e`.\n3. (Optional) Set up a config file to prevent providing all arguments in the command line every time.\n\nNotes:\n\n- You only need to perform the setup once per locks repository.\n- You can use the same locks repository for everything. You can also have multiple locks repositories for different purposes.\n- Do not use the locks repositories for any purpose other than `unity-ccd-locker` usage.\n- It is highly recommended to use brand new empty repositories for setup. However, you can use existing repositories as well. If you are using an existing repository, run `unity-ccd-locker clean-init` instead of `unity-ccd-locker init`.\n\n### Working with locks\n\nAfter you have a repo set up, then you can work with locks. This is the recommended workflow:\n\n1. Acquire the lock on a bucket.\n2. Perform any CCD operations you wish.\n3. Release the lock on the bucket.\n\n### Cleaning a locks repository\n\nIf your locks repository got corrupted, or if for some reason you want to start over, you can clean it by running `unity-ccd-locker clean --repoUrl \u003cREPO URL\u003e`. This will delete everything in the repository except the main branch and the initial commit. \n\nNotes:\n- After cleaning, a locks repository needs to be setup again before usage.\n- If you want to clean and re-setup the repository in one go, you can use `unity-ccd-locker clean-init` instead of running `unity-ccd-locker clean` followed by `unity-ccd-locker init`.\n\n### Commands\n\n| Name         | Aliases | Description                                      |\n| ---          | ---     | ---                                              |\n| `init`       | `i`     | Initialize the repository as a locks repository. |\n| `clean`      | `x`     | Delete everything in a locks repository.         |\n| `clean-init` | `xi`    | Perform a clean, followed by an init.            |\n| `acquire`    | `a`     | Acquire the lock for a bucket.                   |\n| `release`    | `r`     | Release the lock on a bucket.                    |\n| `show`       | `s`     | Print the lock status of a bucket.               |\n\n### Arguments\n\n| Name          | Aliases    | Type   | Required          | Description                                  |\n| ---           | ---        | ---    | ---               | ---                                          |\n| `--help`      | `-h`, `-?` | flag   | No                | Print help.                                  |\n| `--version`   | `-v`       | flag   | No                | Print version info.                          |\n| `--config`    | `-c`       | string | No                | Path to a JSON config file.                  |\n| `--repoUrl`   | `-u`       | string | Yes               | The URL of the locks repository.             |\n| `--projectId` | `-p`       | string | For lock commands | CCD project ID.                              |\n| `--envId`     | `-e`       | string | For lock commands | CCD environment ID.                          |\n| `--bucketId`  | `-b`       | string | For lock commands | CCD bucket ID.                               |\n| `--message`   | `-m`       | string | For lock commands | The message to associate with the operation. |\n| `--force`     | `-f`       | flag   | No                | Bypass safety checks.                        |\n\nLock commands = `acquire`, `release`, `show`\n\n### Config Files\n\nYou can optionally have a JSON config file that you can pass with the `--config` argument that defines some of the arguments in it, so you don't have to write them all the time. \n\nKeys should correspond to argument names without the dashes. This is how it should look like:\n\n```json\n{\n\t\"repoUrl\": \"\u003cURL OF THE LOCKS REPO\u003e\",\n\t\"projectId\": \"\u003cYOUR PROJECT ID\u003e\",\n\t\"envId\": \"\u003cYOUR ENVIRONMENT ID\u003e\"\n}\n```\n\nNotes:\n\n- Arguments provided in the CLI have a higher priority than the arguments provided in the config file. This means that if the same argument is provided in both, then the CLI argument will be used.\n\n## Motivation\n\nCCD misbehaves when doing simultaneous operations on the same bucket. If you have ever seen one of these errors, then you very well know what I am talking about:\n\n```\nError! The state of the bucket changed unexpectedly. Please retry this operation.\n```\n\n```\nYou have an entry specified, but the matching file has not been uploaded, or the file size, or md5 hash of what was uploaded does not match\n```\n\nSometimes simply retrying works. Other times however, the bucket state gets corrupted and no further operations work properly.\n\nThis tool provides a way for you to have _locks_ on buckets, just like how some source control software allows you to lock files to prevent other people from changing them, or how an OS provides file locks to prevent files being altered by multiple processes.\n\n## License\n\nMIT License. Refer to the [LICENSE.md](LICENSE.md) file.\n\nCopyright (c) 2023 [S. Tarık Çetin](https://github.com/starikcetin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarikcetin%2Funity-ccd-locker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarikcetin%2Funity-ccd-locker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarikcetin%2Funity-ccd-locker/lists"}