@osdlc/repo-cleaner 0.0.1-stage → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +202 -0
- package/CONTRIBUTING.md +59 -0
- package/LICENSE-APACHE +202 -0
- package/LICENSE-MIT +21 -0
- package/README.md +301 -3
- package/SECURITY.md +21 -0
- package/bin/repo-cleaner.js +9 -0
- package/dist/apply.d.ts +62 -0
- package/dist/apply.js +316 -0
- package/dist/branches.d.ts +61 -0
- package/dist/branches.js +303 -0
- package/dist/cli.d.ts +19 -0
- package/dist/cli.js +298 -0
- package/dist/config.d.ts +53 -0
- package/dist/config.js +67 -0
- package/dist/discover.d.ts +32 -0
- package/dist/discover.js +88 -0
- package/dist/hooks.d.ts +15 -0
- package/dist/hooks.js +7 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +29 -0
- package/dist/plan.d.ts +101 -0
- package/dist/plan.js +107 -0
- package/dist/processes.d.ts +103 -0
- package/dist/processes.js +189 -0
- package/dist/prs.d.ts +26 -0
- package/dist/prs.js +82 -0
- package/dist/receipt.d.ts +114 -0
- package/dist/receipt.js +35 -0
- package/dist/render.d.ts +43 -0
- package/dist/render.js +219 -0
- package/dist/resolve.d.ts +46 -0
- package/dist/resolve.js +90 -0
- package/dist/sweep.d.ts +68 -0
- package/dist/sweep.js +129 -0
- package/dist/types.d.ts +147 -0
- package/dist/types.js +77 -0
- package/dist/version.generated.d.ts +2 -0
- package/dist/version.generated.js +3 -0
- package/dist/worktrees.d.ts +48 -0
- package/dist/worktrees.js +338 -0
- package/dist/write-json.d.ts +6 -0
- package/dist/write-json.js +40 -0
- package/package.json +72 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# @osdlc/repo-cleaner
|
|
2
|
+
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bb61f10: `--version` prints the package version and exits 0.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [bb61f10]
|
|
12
|
+
- @osdlc/cli-tool@0.11.0
|
|
13
|
+
|
|
14
|
+
## 0.5.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [da5e6a3]
|
|
19
|
+
- Updated dependencies [da5e6a3]
|
|
20
|
+
- Updated dependencies [da5e6a3]
|
|
21
|
+
- @osdlc/command-seam@0.14.0
|
|
22
|
+
- @osdlc/typed-gh@0.11.0
|
|
23
|
+
- @osdlc/typed-git@0.10.0
|
|
24
|
+
- @osdlc/cli-tool@0.10.1
|
|
25
|
+
|
|
26
|
+
## 0.5.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [b835ae4]
|
|
31
|
+
- Updated dependencies [b835ae4]
|
|
32
|
+
- Updated dependencies [b835ae4]
|
|
33
|
+
- Updated dependencies [b835ae4]
|
|
34
|
+
- Updated dependencies [b835ae4]
|
|
35
|
+
- Updated dependencies [fdef74f]
|
|
36
|
+
- @osdlc/cli-tool@0.10.0
|
|
37
|
+
- @osdlc/command-seam@0.13.0
|
|
38
|
+
- @osdlc/config-layers@0.8.0
|
|
39
|
+
- @osdlc/typed-gh@0.10.0
|
|
40
|
+
- @osdlc/typed-git@0.9.0
|
|
41
|
+
|
|
42
|
+
## 0.5.0
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- c3f0d1d: The first release of `@osdlc/repo-cleaner` on npm. It finds what has been merged into the default branch and can go away: local branches, worktrees and remote branches, across one repository or many.
|
|
47
|
+
|
|
48
|
+
- `sweepRepo` and `sweepRepos` classify each item `safe-to-delete`, `safe-to-keep` or `needs-investigation`, with the evidence behind the verdict and the command that would act on it. A merged pull request whose head is the branch tip, or a tip reachable from `<remote>/<default>`, settles most items. A sweep deletes nothing.
|
|
49
|
+
- `planRepo`, `writePlan`, `readPlan` and `applyPlan` write the deletable rows as a plan and apply the ones a person approves. Each delete is compare-and-swap on the judged sha, each step is verified, the first failure stops the run and a receipt records every step. Rows that need `abandon-unmerged`, `discard-changes` or `confirm-open-pr` are dropped without that grant.
|
|
50
|
+
- The `repo-cleaner` command sweeps the repository you are in, or a path, or the repositories in `<config-home>/repo-cleaner/config.yaml` with `--all`. `repo-cleaner apply` applies a plan. The directories are named `repo-cleaner`, moved by the `REPO_CLEANER_*` environment variables.
|
|
51
|
+
- ESM only, compiled JavaScript with `.d.ts`, Node 22 or newer. `git` is required; `gh` is optional and `--no-gh` skips it. Licence `MIT OR Apache-2.0`.
|
|
52
|
+
- b3b7ecc: A worktree lock held by a dead process no longer blocks removal, and a live process inside a worktree now does.
|
|
53
|
+
|
|
54
|
+
- A lock reason with a `pid <N>` token (optionally `start <time>`) is read as an owner claim. When that process is dead, or its start time (a timestamp precise to the second) differs from the lock's, the lock is stale: the worktree gets `facts.stale_lock`, no `locked-worktree` blocker, and `apply` runs a new `unlock-worktree` step before the remove. It checks the owner and the directory again just before the unlock and the remove, and `stale_lock` is part of the worktree fingerprint. A lock with no `pid` token, or a live owner, still blocks.
|
|
55
|
+
- A new `live-process` blocker covers any process other than an idle shell (`sh`, `bash`, `zsh`, `fish` with no child processes) whose working directory is inside the worktree. Idle shells are listed in `facts.idle_shells`. When the process table cannot be read, the worktree gets a `process-probe-failed` blocker instead.
|
|
56
|
+
- New `ProcessProbe` port (`alive`, `holders`; `probe` is required on `gatherWorktrees` and `classifyWorktree`) with a default over `ps` and `lsof` run through `@osdlc/command-seam`. Pass `probe` to `sweepRepo`, `sweepRepos`, `applyPlan`, `gatherWorktrees` or `classifyWorktree` to replace it. Exports: `defaultProcessProbe`, `parseLockOwner`, `parseLsofCwd`, `isIdleShell`, `worktreeUnlockCommand` and the types.
|
|
57
|
+
- The receipt's step `action` gains `unlock-worktree`. Uses `worktreeUnlock` from `@osdlc/typed-git`.
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies [7addea1]
|
|
62
|
+
- Updated dependencies [f013f38]
|
|
63
|
+
- Updated dependencies [3d6d087]
|
|
64
|
+
- Updated dependencies [f013f38]
|
|
65
|
+
- @osdlc/cli-tool@0.9.1
|
|
66
|
+
- @osdlc/command-seam@0.12.1
|
|
67
|
+
- @osdlc/typed-gh@0.9.6
|
|
68
|
+
- @osdlc/typed-git@0.8.2
|
|
69
|
+
|
|
70
|
+
## History before the first public release
|
|
71
|
+
|
|
72
|
+
These versions were never published. The first release of `@osdlc/repo-cleaner` on
|
|
73
|
+
npm is 0.5.0, and the entry for it is added above this section when it is released.
|
|
74
|
+
|
|
75
|
+
### [0.4.3] (unpublished)
|
|
76
|
+
|
|
77
|
+
#### Added
|
|
78
|
+
|
|
79
|
+
- `VENDOR_DIRS` export.
|
|
80
|
+
|
|
81
|
+
#### Changed
|
|
82
|
+
|
|
83
|
+
- Stops depending on an internal wrapper for its directory names.
|
|
84
|
+
- The directory vendor is `repo-cleaner` and the override variables are `REPO_CLEANER_*`, in place of an internal vendor name.
|
|
85
|
+
- The `FLEET_ROOT`, `FLEET_*` and `FLEET_MACHINE_CONFIG` variables are no longer read; there is no fallback, and the replacements are `REPO_CLEANER_ROOT`, `REPO_CLEANER_*` and `REPO_CLEANER_MACHINE_CONFIG`. The config directory paths themselves do not change.
|
|
86
|
+
- Compiled JavaScript with `.d.ts` for Node, in place of TypeScript source for Bun.
|
|
87
|
+
|
|
88
|
+
#### Fixed
|
|
89
|
+
|
|
90
|
+
- The current-worktree check uses `@osdlc/path-guard`: a cwd is placed by its real path, `..` taken
|
|
91
|
+
through a symlink included, and a cwd that no longer exists below a symlinked parent still counts.
|
|
92
|
+
- Git reads use the typed git client's soft door and its new API.
|
|
93
|
+
- Path containment is separator-aware, so a sibling directory that shares a path prefix is not
|
|
94
|
+
counted as inside.
|
|
95
|
+
|
|
96
|
+
### [0.3.0] - 2026-10-06 (unpublished)
|
|
97
|
+
|
|
98
|
+
#### Added
|
|
99
|
+
|
|
100
|
+
- **Plan and apply.** `planRepo`, `writePlan` and `readPlan` write and read the
|
|
101
|
+
deletable rows of a sweep with a fingerprint of each. `applyPlan` sweeps
|
|
102
|
+
again, drops rows that moved or lack an authorization, deletes
|
|
103
|
+
compare-and-swap, verifies each step and writes a receipt. A host passes its
|
|
104
|
+
re-ranking as the `annotate` hook.
|
|
105
|
+
- **`repo-cleaner apply`, `--branch`, `--write-plan`, `--plan-out`.** The CLI
|
|
106
|
+
plans and applies on its own, and runs on `defineCli`/`runMain`.
|
|
107
|
+
- **`worktreeRemoveCommand` / `worktreePruneCommand`.**
|
|
108
|
+
|
|
109
|
+
#### Changed
|
|
110
|
+
|
|
111
|
+
- Every emitted command quotes its words for the shell, so a path with a space
|
|
112
|
+
pastes as one argument.
|
|
113
|
+
- **BREAKING:** "Nothing to sweep" exits `10`, not `2`, which means a malformed
|
|
114
|
+
command.
|
|
115
|
+
|
|
116
|
+
### [0.2.0] - 2026-10-05 (unpublished)
|
|
117
|
+
|
|
118
|
+
#### Added
|
|
119
|
+
|
|
120
|
+
- **Worktree blockers.** A worktree that is locked, has files flagged
|
|
121
|
+
skip-worktree or assume-unchanged, holds a nested repository in an
|
|
122
|
+
untracked or ignored directory, or shares its branch with another worktree
|
|
123
|
+
is `needs-investigation` with no command and `deletable: false`.
|
|
124
|
+
`facts.blockers` names each one, and the investigation parts say what to
|
|
125
|
+
do about it.
|
|
126
|
+
- **Named authorizations on every row.** `requires` lists what a delete of
|
|
127
|
+
the row needs approved: `abandon-unmerged` (commits not on the default
|
|
128
|
+
branch or an exact-head merged PR, counted in `facts.unique_commits`),
|
|
129
|
+
`discard-changes` (a dirty worktree), `confirm-open-pr`. `deletable: false`
|
|
130
|
+
marks rows kept for structure. `requiresNote` renders them.
|
|
131
|
+
`proposedCommands` (`--commands`) leaves out rows that need one.
|
|
132
|
+
- **Fetch before classifying.** `SweepOptions.fetch` runs
|
|
133
|
+
`git fetch --prune --quiet --no-write-fetch-head <remote>` first; a failed
|
|
134
|
+
fetch makes that repository an error row. `RepoInfo.fetched` records it. The
|
|
135
|
+
CLI fetches by default; `--no-fetch` turns it off.
|
|
136
|
+
|
|
137
|
+
#### Changed
|
|
138
|
+
|
|
139
|
+
- **BREAKING: `investigation_prompt` became `investigationParts`.** A list of
|
|
140
|
+
sentences rather than one string, so a host can append its own before
|
|
141
|
+
rendering.
|
|
142
|
+
- **BREAKING: task-derived verdicts are gone.** A host applies them to
|
|
143
|
+
the returned rows. Every git-derived verdict already outranked them, so
|
|
144
|
+
nothing in the ladder moved.
|
|
145
|
+
- **PR state reads through the typed GitHub client** rather than a hand-rolled
|
|
146
|
+
`gh pr list --json` and `JSON.parse`.
|
|
147
|
+
- **A merged PR is landing proof only on an exact head match.** It must come
|
|
148
|
+
from this repository, target the default branch, and have the branch tip as
|
|
149
|
+
its head commit. Otherwise `facts.pr.evidence` names the gap (`head-moved`,
|
|
150
|
+
`other-base`) and the row needs investigation. Fork PRs are ignored.
|
|
151
|
+
Local-branch `facts.sha` is the full sha.
|
|
152
|
+
- **BREAKING: local-branch ancestry is measured against `<remote>/<default>`.**
|
|
153
|
+
A branch merged only into an unpushed local default branch is no longer
|
|
154
|
+
`safe-to-delete`. The local default is used only when there is no remote,
|
|
155
|
+
and a missing remote-tracking ref leaves ancestry unknown. The fact is
|
|
156
|
+
renamed `ancestor_of_remote_main`, and `facts.compare_against` names the ref.
|
|
157
|
+
- **BREAKING: branch deletes are compare-and-swap on the judged sha.** Local
|
|
158
|
+
rows propose `git update-ref -d refs/heads/<b> <sha>` in place of
|
|
159
|
+
`branch -d` / `-D`; remote rows propose
|
|
160
|
+
`git push --force-with-lease=refs/heads/<b>:<sha> <remote> :refs/heads/<b>`
|
|
161
|
+
in place of `push --delete`. Both refuse when the branch moved after the
|
|
162
|
+
sweep. `localDeleteCommand` / `remoteDeleteCommand` are exported.
|
|
163
|
+
|
|
164
|
+
#### Fixed
|
|
165
|
+
|
|
166
|
+
- A slashed default branch name is read whole: `release/v2` stays
|
|
167
|
+
`release/v2` rather than becoming `v2`.
|
|
168
|
+
|
|
169
|
+
### [0.1.0] - 2026-09-13 (unpublished)
|
|
170
|
+
|
|
171
|
+
The sweep was extracted into a standalone package; a host's own knowledge
|
|
172
|
+
stays outside it, as an annotation over the returned inventory.
|
|
173
|
+
|
|
174
|
+
#### Added
|
|
175
|
+
|
|
176
|
+
- **`sweepRepo` / `sweepRepos`.** A repository's local branches, worktrees and
|
|
177
|
+
remote branches, classified `safe-to-delete` / `safe-to-keep` /
|
|
178
|
+
`needs-investigation`, each row carrying the evidence behind its verdict and
|
|
179
|
+
the command that would act on it. Read-only.
|
|
180
|
+
- **Multi-repository resolution.** What an entry names is read off the disk:
|
|
181
|
+
a checkout names that repository, anything else is searched for the
|
|
182
|
+
checkouts under it. The report says what that search cost — entries
|
|
183
|
+
searched, directories read, checkouts found — and an enormous tree says so
|
|
184
|
+
on stderr mid-walk rather than after it. Candidates de-duplicate on the main
|
|
185
|
+
checkout, so a linked worktree collapses into the repository it belongs to.
|
|
186
|
+
An entry that resolves to nothing is reported, never dropped.
|
|
187
|
+
- **Duplicate checkouts.** `SweepResult.duplicates` lists each remote that
|
|
188
|
+
two or more separate main checkouts share, and the text report opens with a
|
|
189
|
+
"Duplicate checkouts" section. A linked worktree is not a duplicate. Report
|
|
190
|
+
only.
|
|
191
|
+
- **Per-repository error containment.** A repository that cannot be read
|
|
192
|
+
becomes an `error` row and the sweep continues. Single-repository callers
|
|
193
|
+
check the field.
|
|
194
|
+
- **The config file is `@osdlc/config-layers`'s machine file** —
|
|
195
|
+
`<config-home>/repo-cleaner/config.yaml`, Zod as the contract, never
|
|
196
|
+
throws, relocated by `REPO_CLEANER_MACHINE_CONFIG` or `--config`. It
|
|
197
|
+
carries `paths:` as well, so a `repos:` entry says `{dev}` instead of
|
|
198
|
+
spelling a directory twice.
|
|
199
|
+
- **The `repo-cleaner` CLI.** Scope is opt-in: a bare invocation sweeps the
|
|
200
|
+
repository you are standing in, `--all` reaches the config file, and
|
|
201
|
+
positional paths name repositories directly. `--output json`, `--commands`,
|
|
202
|
+
`--scope`, `--no-gh`, `--keep`.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in `@osdlc/repo-cleaner`.
|
|
4
|
+
|
|
5
|
+
## Issues
|
|
6
|
+
|
|
7
|
+
Report bugs and ask for features in the
|
|
8
|
+
[issue tracker](https://github.com/osdlc/osdlc/issues). For a bug, include the
|
|
9
|
+
library version, your runtime and its version, your operating system, and
|
|
10
|
+
the call and inputs that misbehave. Report security
|
|
11
|
+
problems privately. See [SECURITY.md](./SECURITY.md).
|
|
12
|
+
|
|
13
|
+
## Pull requests
|
|
14
|
+
|
|
15
|
+
This package lives in [osdlc/osdlc](https://github.com/osdlc/osdlc) under
|
|
16
|
+
`packages/ts/repo-cleaner`. Open pull requests there. They are reviewed and merged
|
|
17
|
+
there.
|
|
18
|
+
|
|
19
|
+
## Running the tests
|
|
20
|
+
|
|
21
|
+
The repository is a pnpm workspace. Install from the repository root, then
|
|
22
|
+
work in the package directory. The tests run on [Vitest](https://vitest.dev)
|
|
23
|
+
under Node 22.22.2 or later. They run offline and need `git` on the PATH. Some
|
|
24
|
+
tests build throwaway repositories in a temp directory, and a canned `gh`
|
|
25
|
+
stands in for GitHub, so the tests need no network and no login. The package
|
|
26
|
+
imports its sibling libraries through their built `dist/`, so run
|
|
27
|
+
`pnpm run build` at the repository root first.
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
pnpm install
|
|
31
|
+
pnpm run build
|
|
32
|
+
cd packages/ts/repo-cleaner
|
|
33
|
+
pnpm test
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To run the CLI from a checkout, build the package and run
|
|
37
|
+
`node bin/repo-cleaner.js --help`.
|
|
38
|
+
|
|
39
|
+
Other checks:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
pnpm run typecheck
|
|
43
|
+
pnpm run lint
|
|
44
|
+
pnpm run format:check
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Code style
|
|
48
|
+
|
|
49
|
+
- TypeScript, ES modules, and explicit `.ts` import paths.
|
|
50
|
+
- Prettier formats the code and oxlint checks it. Run `pnpm run format` and
|
|
51
|
+
`pnpm run lint` before you commit.
|
|
52
|
+
- Add a test for each behaviour change or bug fix. Test against a throwaway
|
|
53
|
+
repository or a fake runner and check what ran.
|
|
54
|
+
- Shell out only through the command seam, never with a raw `child_process`
|
|
55
|
+
call.
|
|
56
|
+
- For a change users can see, add a changeset: run `pnpm changeset` at the
|
|
57
|
+
repository root. Start a breaking change's summary with `**Breaking:**`.
|
|
58
|
+
Do not edit `CHANGELOG.md` or `version` by hand. The release writes them.
|
|
59
|
+
See [packages/README.md](https://github.com/osdlc/osdlc/blob/main/packages/README.md).
|
package/LICENSE-APACHE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 sksizer
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/LICENSE-MIT
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 sksizer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|