groovectl 0.0.0-stage → 0.1.1

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.
Files changed (182) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE +4 -0
  4. package/README.md +266 -2
  5. package/SECURITY.md +10 -0
  6. package/dist/app/collection-service.d.ts +18 -0
  7. package/dist/app/collection-service.d.ts.map +1 -0
  8. package/dist/app/collection-service.js +79 -0
  9. package/dist/app/collection-service.js.map +1 -0
  10. package/dist/app/database-service.d.ts +21 -0
  11. package/dist/app/database-service.d.ts.map +1 -0
  12. package/dist/app/database-service.js +164 -0
  13. package/dist/app/database-service.js.map +1 -0
  14. package/dist/app/marketplace-service.d.ts +10 -0
  15. package/dist/app/marketplace-service.d.ts.map +1 -0
  16. package/dist/app/marketplace-service.js +53 -0
  17. package/dist/app/marketplace-service.js.map +1 -0
  18. package/dist/app/user-mappers.d.ts +4 -0
  19. package/dist/app/user-mappers.d.ts.map +1 -0
  20. package/dist/app/user-mappers.js +21 -0
  21. package/dist/app/user-mappers.js.map +1 -0
  22. package/dist/app/wantlist-service.d.ts +12 -0
  23. package/dist/app/wantlist-service.d.ts.map +1 -0
  24. package/dist/app/wantlist-service.js +32 -0
  25. package/dist/app/wantlist-service.js.map +1 -0
  26. package/dist/auth/keyring.d.ts +8 -0
  27. package/dist/auth/keyring.d.ts.map +1 -0
  28. package/dist/auth/keyring.js +39 -0
  29. package/dist/auth/keyring.js.map +1 -0
  30. package/dist/auth/prompt.d.ts +3 -0
  31. package/dist/auth/prompt.d.ts.map +1 -0
  32. package/dist/auth/prompt.js +8 -0
  33. package/dist/auth/prompt.js.map +1 -0
  34. package/dist/auth/token-provider.d.ts +31 -0
  35. package/dist/auth/token-provider.d.ts.map +1 -0
  36. package/dist/auth/token-provider.js +94 -0
  37. package/dist/auth/token-provider.js.map +1 -0
  38. package/dist/bin/groovectl.d.ts +3 -0
  39. package/dist/bin/groovectl.d.ts.map +1 -0
  40. package/dist/bin/groovectl.js +9 -0
  41. package/dist/bin/groovectl.js.map +1 -0
  42. package/dist/cli/commands/artist.d.ts +5 -0
  43. package/dist/cli/commands/artist.d.ts.map +1 -0
  44. package/dist/cli/commands/artist.js +51 -0
  45. package/dist/cli/commands/artist.js.map +1 -0
  46. package/dist/cli/commands/auth.d.ts +5 -0
  47. package/dist/cli/commands/auth.d.ts.map +1 -0
  48. package/dist/cli/commands/auth.js +49 -0
  49. package/dist/cli/commands/auth.js.map +1 -0
  50. package/dist/cli/commands/collection.d.ts +5 -0
  51. package/dist/cli/commands/collection.d.ts.map +1 -0
  52. package/dist/cli/commands/collection.js +200 -0
  53. package/dist/cli/commands/collection.js.map +1 -0
  54. package/dist/cli/commands/config.d.ts +5 -0
  55. package/dist/cli/commands/config.d.ts.map +1 -0
  56. package/dist/cli/commands/config.js +65 -0
  57. package/dist/cli/commands/config.js.map +1 -0
  58. package/dist/cli/commands/database-common.d.ts +18 -0
  59. package/dist/cli/commands/database-common.d.ts.map +1 -0
  60. package/dist/cli/commands/database-common.js +49 -0
  61. package/dist/cli/commands/database-common.js.map +1 -0
  62. package/dist/cli/commands/label.d.ts +5 -0
  63. package/dist/cli/commands/label.d.ts.map +1 -0
  64. package/dist/cli/commands/label.js +52 -0
  65. package/dist/cli/commands/label.js.map +1 -0
  66. package/dist/cli/commands/marketplace.d.ts +5 -0
  67. package/dist/cli/commands/marketplace.d.ts.map +1 -0
  68. package/dist/cli/commands/marketplace.js +76 -0
  69. package/dist/cli/commands/marketplace.js.map +1 -0
  70. package/dist/cli/commands/master.d.ts +5 -0
  71. package/dist/cli/commands/master.d.ts.map +1 -0
  72. package/dist/cli/commands/master.js +54 -0
  73. package/dist/cli/commands/master.js.map +1 -0
  74. package/dist/cli/commands/release.d.ts +5 -0
  75. package/dist/cli/commands/release.d.ts.map +1 -0
  76. package/dist/cli/commands/release.js +46 -0
  77. package/dist/cli/commands/release.js.map +1 -0
  78. package/dist/cli/commands/search.d.ts +5 -0
  79. package/dist/cli/commands/search.d.ts.map +1 -0
  80. package/dist/cli/commands/search.js +125 -0
  81. package/dist/cli/commands/search.js.map +1 -0
  82. package/dist/cli/commands/wantlist.d.ts +5 -0
  83. package/dist/cli/commands/wantlist.d.ts.map +1 -0
  84. package/dist/cli/commands/wantlist.js +122 -0
  85. package/dist/cli/commands/wantlist.js.map +1 -0
  86. package/dist/cli/confirmation.d.ts +3 -0
  87. package/dist/cli/confirmation.d.ts.map +1 -0
  88. package/dist/cli/confirmation.js +21 -0
  89. package/dist/cli/confirmation.js.map +1 -0
  90. package/dist/cli/create-program.d.ts +8 -0
  91. package/dist/cli/create-program.d.ts.map +1 -0
  92. package/dist/cli/create-program.js +89 -0
  93. package/dist/cli/create-program.js.map +1 -0
  94. package/dist/cli/global-options.d.ts +14 -0
  95. package/dist/cli/global-options.d.ts.map +1 -0
  96. package/dist/cli/global-options.js +22 -0
  97. package/dist/cli/global-options.js.map +1 -0
  98. package/dist/cli/run-cli.d.ts +7 -0
  99. package/dist/cli/run-cli.d.ts.map +1 -0
  100. package/dist/cli/run-cli.js +27 -0
  101. package/dist/cli/run-cli.js.map +1 -0
  102. package/dist/cli/runtime.d.ts +29 -0
  103. package/dist/cli/runtime.d.ts.map +1 -0
  104. package/dist/cli/runtime.js +89 -0
  105. package/dist/cli/runtime.js.map +1 -0
  106. package/dist/config/paths.d.ts +2 -0
  107. package/dist/config/paths.d.ts.map +1 -0
  108. package/dist/config/paths.js +18 -0
  109. package/dist/config/paths.js.map +1 -0
  110. package/dist/config/schema.d.ts +20 -0
  111. package/dist/config/schema.d.ts.map +1 -0
  112. package/dist/config/schema.js +15 -0
  113. package/dist/config/schema.js.map +1 -0
  114. package/dist/config/store.d.ts +10 -0
  115. package/dist/config/store.d.ts.map +1 -0
  116. package/dist/config/store.js +74 -0
  117. package/dist/config/store.js.map +1 -0
  118. package/dist/discogs/client.d.ts +129 -0
  119. package/dist/discogs/client.d.ts.map +1 -0
  120. package/dist/discogs/client.js +233 -0
  121. package/dist/discogs/client.js.map +1 -0
  122. package/dist/discogs/database-schemas.d.ts +150 -0
  123. package/dist/discogs/database-schemas.d.ts.map +1 -0
  124. package/dist/discogs/database-schemas.js +82 -0
  125. package/dist/discogs/database-schemas.js.map +1 -0
  126. package/dist/discogs/marketplace-schemas.d.ts +47 -0
  127. package/dist/discogs/marketplace-schemas.d.ts.map +1 -0
  128. package/dist/discogs/marketplace-schemas.js +48 -0
  129. package/dist/discogs/marketplace-schemas.js.map +1 -0
  130. package/dist/discogs/schemas.d.ts +84 -0
  131. package/dist/discogs/schemas.d.ts.map +1 -0
  132. package/dist/discogs/schemas.js +62 -0
  133. package/dist/discogs/schemas.js.map +1 -0
  134. package/dist/discogs/user-schemas.d.ts +216 -0
  135. package/dist/discogs/user-schemas.d.ts.map +1 -0
  136. package/dist/discogs/user-schemas.js +76 -0
  137. package/dist/discogs/user-schemas.js.map +1 -0
  138. package/dist/domain/database-resource.d.ts +70 -0
  139. package/dist/domain/database-resource.d.ts.map +1 -0
  140. package/dist/domain/database-resource.js +2 -0
  141. package/dist/domain/database-resource.js.map +1 -0
  142. package/dist/domain/marketplace.d.ts +41 -0
  143. package/dist/domain/marketplace.d.ts.map +1 -0
  144. package/dist/domain/marketplace.js +15 -0
  145. package/dist/domain/marketplace.js.map +1 -0
  146. package/dist/domain/release.d.ts +13 -0
  147. package/dist/domain/release.d.ts.map +1 -0
  148. package/dist/domain/release.js +2 -0
  149. package/dist/domain/release.js.map +1 -0
  150. package/dist/domain/search-result.d.ts +15 -0
  151. package/dist/domain/search-result.d.ts.map +1 -0
  152. package/dist/domain/search-result.js +2 -0
  153. package/dist/domain/search-result.js.map +1 -0
  154. package/dist/domain/user-resource.d.ts +61 -0
  155. package/dist/domain/user-resource.d.ts.map +1 -0
  156. package/dist/domain/user-resource.js +2 -0
  157. package/dist/domain/user-resource.js.map +1 -0
  158. package/dist/errors/app-error.d.ts +19 -0
  159. package/dist/errors/app-error.d.ts.map +1 -0
  160. package/dist/errors/app-error.js +55 -0
  161. package/dist/errors/app-error.js.map +1 -0
  162. package/dist/http/rate-limit.d.ts +12 -0
  163. package/dist/http/rate-limit.d.ts.map +1 -0
  164. package/dist/http/rate-limit.js +27 -0
  165. package/dist/http/rate-limit.js.map +1 -0
  166. package/dist/http/request.d.ts +19 -0
  167. package/dist/http/request.d.ts.map +1 -0
  168. package/dist/http/request.js +165 -0
  169. package/dist/http/request.js.map +1 -0
  170. package/dist/output/records.d.ts +12 -0
  171. package/dist/output/records.d.ts.map +1 -0
  172. package/dist/output/records.js +94 -0
  173. package/dist/output/records.js.map +1 -0
  174. package/dist/output/renderer.d.ts +8 -0
  175. package/dist/output/renderer.d.ts.map +1 -0
  176. package/dist/output/renderer.js +54 -0
  177. package/dist/output/renderer.js.map +1 -0
  178. package/dist/version.d.ts +11 -0
  179. package/dist/version.d.ts.map +1 -0
  180. package/dist/version.js +16 -0
  181. package/dist/version.js.map +1 -0
  182. package/package.json +71 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,40 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1 — 2026-10-24
4
+
5
+ - Prepare the first public npm distribution under the `groovectl` command.
6
+ - Add repository links, public-registry publishing configuration, and release
7
+ checks.
8
+ - Document npm installation, one-off execution, upgrades, and uninstallation.
9
+ - Include the changelog in the published package.
10
+ - Enforce LF checkouts on Windows so formatting checks agree across platforms.
11
+ - Resolve Windows package-manager shims to absolute paths during installation
12
+ tests.
13
+
14
+ ## 0.1.0 — 2026-10-24
15
+
16
+ First local release of Groovectl for Discogs (formerly Crateflow).
17
+
18
+ - Database search and Release, Master, Artist, and Label reads.
19
+ - Collection folders, listing, membership, add/update/remove, and valuation.
20
+ - Wantlist listing, add/update/remove, ratings, and notes.
21
+ - Marketplace statistics, known-listing details, and official fee reads.
22
+ - Optional tokens with stdin, environment, hidden prompts, and OS keyring
23
+ storage.
24
+ - Table, JSON, JSONL, TSV, field selection, and paginated streaming output.
25
+ - Dry runs, confirmed removals, bounded GET retries, and sanitized diagnostics.
26
+ - Local/global npm installation under the `groovectl` command; Node.js 24+.
27
+
28
+ Pre-release review fixes:
29
+
30
+ - Validate output options before Collection/Wantlist mutation requests.
31
+ - Initialize the native keyring lazily for headless and anonymous usage.
32
+ - Map interactive prompt cancellation to exit code 10.
33
+ - Execute Windows package-manager and CLI shims through `cmd.exe`.
34
+ - Restore executable permissions after clean builds for linked Unix installs.
35
+ - Clarify that HTTP timeouts apply per attempt, not to the entire command.
36
+ - Upgrade Zod to a patched version for GHSA-mrhx-c7xc-m3w5.
37
+
38
+ Marketplace reads do not include monitoring, scheduling, notifications, or price
39
+ history. The package remains private until an npm publication is explicitly
40
+ prepared; this version does not publish to npm or create a GitHub release.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,4 @@
1
+ Groovectl for Discogs
2
+ Copyright 2026 Groovectl contributors
3
+
4
+ This product includes software developed by Groovectl contributors.
package/README.md CHANGED
@@ -1,3 +1,267 @@
1
- # Temporary Holding Version
1
+ # Groovectl for Discogs
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A script-friendly Discogs CLI for exploring releases, managing your collection
4
+ and wantlist, and reading Marketplace data.
5
+
6
+ > This application uses Discogs' API but is not affiliated with, sponsored or
7
+ > endorsed by Discogs. "Discogs" is a trademark of Zink Media, LLC.
8
+
9
+ ## Installation
10
+
11
+ Requires Node.js 24 or newer and npm. End users do not need pnpm, TypeScript, or
12
+ a source checkout.
13
+
14
+ ```sh
15
+ npm install --global groovectl
16
+ groovectl --help
17
+ groovectl version --json
18
+ groovectl release get 249504 --json
19
+ ```
20
+
21
+ For a one-off invocation without a global installation:
22
+
23
+ ```sh
24
+ npm exec --package=groovectl -- groovectl --help
25
+ ```
26
+
27
+ Upgrade or uninstall:
28
+
29
+ ```sh
30
+ npm install --global groovectl@latest
31
+ npm uninstall --global groovectl
32
+ ```
33
+
34
+ Global commands must be on PATH. If npm reports a permissions error, use a
35
+ user-owned Node.js installation rather than changing system directory
36
+ permissions. Discogs authentication is separate from npm installation; use
37
+ `groovectl --token auth login` when you want to save a Discogs User Token.
38
+
39
+ ## Local development
40
+
41
+ Requirements: Node.js 24 LTS and pnpm 10.
42
+
43
+ ```sh
44
+ pnpm install
45
+ pnpm build
46
+ npm install --global .
47
+
48
+ groovectl --help
49
+ groovectl release get 249504 --json
50
+ ```
51
+
52
+ Run the installation commands in the project directory. After installation,
53
+ `groovectl` works from any directory as long as npm's global executable
54
+ directory is on PATH. This local installation links to the checkout, so rebuild
55
+ with `pnpm build` after changing source code and keep the checkout in place.
56
+
57
+ A built tarball can also be installed with
58
+ `npm install -g /path/to/groovectl-0.1.1.tgz`; recipients need Node.js 24+, but
59
+ do not need pnpm or a TypeScript compiler.
60
+
61
+ For local development without installing, use `pnpm start -- --help` or
62
+ `node dist/bin/groovectl.js --help` after building.
63
+
64
+ ## Rename from Crateflow
65
+
66
+ The package and executable are now `groovectl` (Groovectl for Discogs). The
67
+ local checkout folder does not need to be renamed. Reinstall from the checkout
68
+ to register the new command. If an older global `crateflow` package is
69
+ installed, you can remove it with `npm uninstall -g crateflow` after verifying
70
+ `groovectl`.
71
+
72
+ Existing settings and saved tokens remain in the original `crateflow` config
73
+ directory and OS credential-store namespace; the rename does not migrate or
74
+ delete them. The `DISCOGS_TOKEN` environment variable and token options are
75
+ unchanged. Error prefixes now use `GROOVECTL_`; scripts matching the old
76
+ `CRATEFLOW_` errors need updating. Build/test environment variables use
77
+ `GROOVECTL_`, with legacy `CRATEFLOW_` aliases accepted for compatibility.
78
+
79
+ ## Implemented commands
80
+
81
+ - `groovectl --help`
82
+ - `groovectl version [--json]`
83
+ - `groovectl auth login|status|logout`
84
+ - `groovectl search [query] [filters] [--all]`
85
+ - `groovectl release get <id>`
86
+ - `groovectl master get <id>` / `groovectl master versions <id>`
87
+ - `groovectl artist get <id>` / `groovectl artist releases <id>`
88
+ - `groovectl label get <id>` / `groovectl label releases <id>`
89
+ - `groovectl collection folders|list|contains|add|update|remove|value`
90
+ - `groovectl wantlist list|add|update|remove`
91
+ - `groovectl config get|set`
92
+ - `groovectl marketplace stats <release-id> [--currency <code>]`
93
+ - `groovectl marketplace listing get <listing-id> [--currency <code>]`
94
+ - `groovectl marketplace fee <price> [--currency <code>]`
95
+
96
+ Resource commands support `--format table|json|jsonl|tsv` and `--json` as a
97
+ shortcut. Search uses `--output` for output format because its `--format` flag
98
+ filters the release medium (for example Vinyl). List commands support `--page`,
99
+ `--per-page`, and `--all`. Use the global `--fields id,title,...` option to
100
+ select and order output fields. JSONL streams one record per line; JSON arrays
101
+ are capped at 10,000 records to avoid unbounded memory use.
102
+
103
+ ## Collection and Wantlist
104
+
105
+ These commands always operate on the identity associated with the active token;
106
+ they do not accept an arbitrary username.
107
+
108
+ ```sh
109
+ groovectl collection folders --json
110
+ groovectl collection list --folder 0 --sort added --sort-order desc --all --format jsonl
111
+ groovectl collection contains 249504 --json
112
+ groovectl collection add 249504 --folder 1 --dry-run --json
113
+ groovectl collection update 1 249504 123456 --rating 5 --dry-run
114
+ groovectl collection remove 1 249504 123456 --yes
115
+ groovectl collection value --json
116
+
117
+ groovectl wantlist list --all --format jsonl
118
+ groovectl wantlist add 249504 --rating 5 --notes "Find a clean copy" --dry-run
119
+ groovectl wantlist update 249504 --notes "Prefer first pressing"
120
+ groovectl wantlist remove 249504 --yes
121
+ ```
122
+
123
+ `--dry-run` still authenticates and resolves the current username, but sends no
124
+ write request. Destructive `remove` commands prompt interactively; automation
125
+ must pass `--yes`. Non-interactive removal without `--yes` exits with code 10.
126
+ Mutation commands validate output format and selected fields before sending
127
+ requests, so an invalid output option cannot accidentally modify account data.
128
+
129
+ ## Marketplace reads
130
+
131
+ These commands make one-shot reads of the official API. Token input remains
132
+ optional, and the usual token resolution applies without a separate identity
133
+ lookup. In live verification on 2026-10-11, stats worked anonymously, while
134
+ listing and fee requests returned HTTP 401 without a token. When the API
135
+ requires authentication, an anonymous request exits with
136
+ `GROOVECTL_AUTH_REQUIRED` and instructions for supplying a token. An HTTP 401
137
+ with a supplied token remains `GROOVECTL_AUTH_INVALID`; the CLI does not
138
+ silently discard invalid credentials.
139
+
140
+ ```sh
141
+ groovectl marketplace stats 249504 --currency USD --json
142
+ # Supply a token when required (hidden prompt); auth login also supports reuse.
143
+ # Replace the example with a known listing ID from a Discogs item URL.
144
+ groovectl --token marketplace listing get 123456789 --currency EUR --json
145
+ groovectl --token marketplace fee 45.00 --currency USD --json
146
+ groovectl marketplace stats 249504 --fields releaseId,lowestPrice,numForSale --format tsv
147
+ ```
148
+
149
+ All three commands support table, JSON, JSONL, TSV, and `--fields` with
150
+ top-level output field names (for example `price` or `seller`, not
151
+ `price.value`). Monetary values are `{ value, currency }` objects. Missing
152
+ prices/counts remain `null` in JSON/JSONL; table and TSV display null as an
153
+ empty value. No-stock and blocked releases are successful results. A missing
154
+ listing is a not-found error.
155
+
156
+ Supported currencies: USD, GBP, EUR, CAD, AUD, JPY, CHF, MXN, BRL, NZD, SEK,
157
+ ZAR. Omitting `--currency` leaves the choice to Discogs: stats use USD
158
+ anonymously or the authenticated buyer's currency; fees default to USD.
159
+ Groovectl never converts currencies or calculates fees locally. Fee prices
160
+ accept non-negative decimal notation, not scientific notation or currency
161
+ symbols.
162
+
163
+ Stats contain the lowest **item price**, not a delivered total including
164
+ shipping and taxes. The official API does not document an endpoint to list every
165
+ offer for a release; `listing get` needs an existing listing ID. Listing output
166
+ uses `release.description` and normalizes original price currency and seller
167
+ rating. Only a stable public subset is exposed, including when the token belongs
168
+ to the listing owner; private inventory fields and cart state are omitted.
169
+
170
+ There is no watch mode, scheduler, notification service, price history, or
171
+ Marketplace cache/state file. Data is read for the current invocation and is not
172
+ persisted or sent to telemetry. Tests use synthetic responses. Data provided by
173
+ Discogs. See the
174
+ [official API documentation](https://www.discogs.com/developers#page:marketplace)
175
+ and
176
+ [API Terms of Use](https://support.discogs.com/hc/en-us/articles/360009334593-API-Terms-of-Use).
177
+
178
+ ## Authentication
179
+
180
+ Public Database reads work anonymously. Database search requires a Discogs User
181
+ Token. Token resolution uses this order:
182
+
183
+ 1. `--token-stdin`
184
+ 2. `DISCOGS_TOKEN`
185
+ 3. an explicit hidden prompt from `--token`
186
+ 4. the OS credential store populated by `auth login`
187
+
188
+ ```sh
189
+ # Hidden interactive prompt; validates before saving to Keychain/keyring.
190
+ groovectl --token auth login
191
+
192
+ # Temporary token for automation. The token is not persisted.
193
+ printf '%s\n' "$DISCOGS_TOKEN" \
194
+ | groovectl --token-stdin search "Kind of Blue" --type release --json
195
+
196
+ groovectl auth status --json
197
+ groovectl auth logout
198
+ ```
199
+
200
+ `auth logout` only deletes the locally stored credential; revoke the token in
201
+ Discogs account settings when it should no longer remain valid.
202
+
203
+ ## Configuration
204
+
205
+ Groovectl stores non-secret settings in the platform-standard user config
206
+ directory. Tokens are never written to this file.
207
+
208
+ ```sh
209
+ groovectl config get --json
210
+ groovectl config set format jsonl
211
+ groovectl config set timeoutMs 45000
212
+ groovectl config set maxRateLimitWaitMs 60000
213
+ ```
214
+
215
+ Supported keys are `format`, `color`, `locale`, `timeoutMs`, and
216
+ `maxRateLimitWaitMs`. `format`, request timeout, and maximum accepted
217
+ `Retry-After` delay are active in P0. `--timeout` overrides the stored timeout
218
+ for each HTTP attempt in one invocation; retries and rate-limit waits can make
219
+ the command's total duration longer. `--verbose` writes sanitized
220
+ method/path/status/timing diagnostics to stderr and never includes tokens, query
221
+ values, or request bodies.
222
+
223
+ ## Reliability
224
+
225
+ GET requests use bounded exponential-backoff retries for transient network and
226
+ Discogs 502/503/504 failures. A 429 response is retried only when Discogs sends
227
+ a `Retry-After` value within the configured safety limit. Cross-origin
228
+ pagination URLs are rejected. Write requests are never automatically retried.
229
+ Rate-limit response headers are used to pace subsequent requests, and broken
230
+ pipes exit cleanly for shell pipelines. The native credential store is
231
+ initialized only when accessed; missing keyring services do not prevent help,
232
+ version, config, or explicitly supplied tokens from working. Cancelling an
233
+ interactive prompt exits with code 10.
234
+
235
+ Stable exit-code classes include usage/validation `2`, authentication `3`,
236
+ forbidden `4`, not found `5`, rate limit `6`, upstream `7`, network `8`, and
237
+ cancelled/confirmation-required `10`.
238
+
239
+ ## Security
240
+
241
+ Do not report vulnerabilities in public issues. See [SECURITY.md](SECURITY.md).
242
+
243
+ ## Publishing
244
+
245
+ Maintainers need Node.js 24+, pnpm 10, and npm publishing access to `groovectl`.
246
+ The package name and version in `package.json` must match the release tag.
247
+
248
+ 1. Update the version and changelog, commit the release, and wait for all three
249
+ platform CI jobs to pass for that exact commit.
250
+ 2. Run `pnpm release:check` and `pnpm verify:package` from a clean checkout.
251
+ 3. Authenticate with `npm login --registry=https://registry.npmjs.org` if
252
+ needed.
253
+ 4. Run `npm publish --dry-run`, inspect the payload, then `npm publish`.
254
+ Publishing runs the release checks and builds the distributable
255
+ automatically.
256
+ 5. Verify the published version using `npm view groovectl version`, install it
257
+ into an isolated directory, and exercise `groovectl version --json` and help.
258
+ 6. Create the matching `vX.Y.Z` tag only after the registry publish succeeds.
259
+
260
+ The existing GitHub workflow validates changes; it does not publish packages.
261
+ The first npm publication uses interactive npm authentication. Future automated
262
+ publishing can use npm Trusted Publishing with a specifically authorized GitHub
263
+ workflow, without storing a long-lived npm publishing token.
264
+
265
+ ## License
266
+
267
+ Apache-2.0.
package/SECURITY.md ADDED
@@ -0,0 +1,10 @@
1
+ # Security policy
2
+
3
+ Groovectl handles Discogs user tokens and private collection data. Do not submit
4
+ real tokens, account data, or private API responses in public issues.
5
+
6
+ Before the repository is published, the maintainer will add a private security
7
+ contact and GitHub private vulnerability reporting instructions.
8
+
9
+ Until then, keep security reports local and do not publish proof-of-concept
10
+ details.
@@ -0,0 +1,18 @@
1
+ import type { CollectionListParameters, DiscogsClient } from "../discogs/client.js";
2
+ import type { CollectionAddResult, CollectionFolder, CollectionItem, CollectionValue } from "../domain/user-resource.js";
3
+ export declare class CollectionService {
4
+ #private;
5
+ constructor(client: DiscogsClient);
6
+ folders(username: string): Promise<CollectionFolder[]>;
7
+ list(username: string, folderId: number, parameters: CollectionListParameters): Promise<CollectionItem[]>;
8
+ listAll(username: string, folderId: number, parameters: Omit<CollectionListParameters, "page">): AsyncGenerator<CollectionItem>;
9
+ contains(username: string, releaseId: number): Promise<CollectionItem[]>;
10
+ add(username: string, folderId: number, releaseId: number): Promise<CollectionAddResult>;
11
+ update(username: string, folderId: number, releaseId: number, instanceId: number, update: {
12
+ folder_id?: number;
13
+ rating?: number;
14
+ }): Promise<void>;
15
+ remove(username: string, folderId: number, releaseId: number, instanceId: number): Promise<void>;
16
+ value(username: string): Promise<CollectionValue>;
17
+ }
18
+ //# sourceMappingURL=collection-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection-service.d.ts","sourceRoot":"","sources":["../../src/app/collection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,aAAa,EACd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,eAAe,EAEhB,MAAM,4BAA4B,CAAC;AAGpC,qBAAa,iBAAiB;;gBAGhB,MAAM,EAAE,aAAa;IAI3B,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAWtD,IAAI,CACR,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,wBAAwB,GACnC,OAAO,CAAC,cAAc,EAAE,CAAC;IAMrB,OAAO,CACZ,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,GACjD,cAAc,CAAC,cAAc,CAAC;IAU3B,QAAQ,CACZ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,cAAc,EAAE,CAAC;IAMtB,GAAG,CACP,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,mBAAmB,CAAC;IAczB,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAC9C,OAAO,CAAC,IAAI,CAAC;IAUV,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC;IASV,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAsBxD"}
@@ -0,0 +1,79 @@
1
+ import { mapBasicInformation } from "./user-mappers.js";
2
+ export class CollectionService {
3
+ #client;
4
+ constructor(client) {
5
+ this.#client = client;
6
+ }
7
+ async folders(username) {
8
+ return (await this.#client.getCollectionFolders(username)).map((folder) => ({
9
+ id: folder.id,
10
+ name: folder.name,
11
+ count: folder.count,
12
+ resourceUrl: folder.resource_url,
13
+ }));
14
+ }
15
+ async list(username, folderId, parameters) {
16
+ return (await this.#client.getCollectionItems(username, folderId, parameters)).map((item) => this.#mapItem(item));
17
+ }
18
+ async *listAll(username, folderId, parameters) {
19
+ for await (const item of this.#client.getCollectionItemsAll(username, folderId, parameters)) {
20
+ yield this.#mapItem(item);
21
+ }
22
+ }
23
+ async contains(username, releaseId) {
24
+ return (await this.#client.getCollectionItemsByRelease(username, releaseId)).map((item) => this.#mapItem(item));
25
+ }
26
+ async add(username, folderId, releaseId) {
27
+ const result = await this.#client.addToCollection(username, folderId, releaseId);
28
+ return {
29
+ releaseId,
30
+ folderId,
31
+ instanceId: result.instance_id,
32
+ resourceUrl: result.resource_url,
33
+ };
34
+ }
35
+ async update(username, folderId, releaseId, instanceId, update) {
36
+ await this.#client.updateCollectionInstance(username, folderId, releaseId, instanceId, update);
37
+ }
38
+ async remove(username, folderId, releaseId, instanceId) {
39
+ await this.#client.removeCollectionInstance(username, folderId, releaseId, instanceId);
40
+ }
41
+ async value(username) {
42
+ const value = await this.#client.getCollectionValue(username);
43
+ return {
44
+ minimum: parseMoney(value.minimum),
45
+ median: parseMoney(value.median),
46
+ maximum: parseMoney(value.maximum),
47
+ };
48
+ }
49
+ #mapItem(item) {
50
+ return {
51
+ ...mapBasicInformation(item.basic_information),
52
+ instanceId: item.instance_id,
53
+ folderId: item.folder_id,
54
+ rating: item.rating,
55
+ dateAdded: item.date_added ?? null,
56
+ notes: item.notes.map((note) => ({
57
+ fieldId: note.field_id,
58
+ value: note.value,
59
+ })),
60
+ };
61
+ }
62
+ }
63
+ function parseMoney(display) {
64
+ const symbols = {
65
+ $: "USD",
66
+ "€": "EUR",
67
+ "£": "GBP",
68
+ "¥": "JPY",
69
+ };
70
+ const symbol = Object.keys(symbols).find((candidate) => display.includes(candidate));
71
+ const normalized = display.replace(/[^0-9.,-]/gu, "").replaceAll(",", "");
72
+ const parsed = Number(normalized);
73
+ return {
74
+ value: Number.isFinite(parsed) ? parsed : null,
75
+ currency: symbol === undefined ? null : (symbols[symbol] ?? null),
76
+ display,
77
+ };
78
+ }
79
+ //# sourceMappingURL=collection-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection-service.js","sourceRoot":"","sources":["../../src/app/collection-service.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,OAAO,iBAAiB;IACnB,OAAO,CAAgB;IAEhC,YAAY,MAAqB;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAgB;QAC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E,EAAE,CAAC,CAAC;gBAC/B,OAAO,EAAE,IAAI,CAAC,QAAQ;gBACtB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;CACF;AAED,SAAS,UAAU,CAAC,OAAe;IACjC,MAAM,OAAO,GAA2B;QACtC,CAAC,EAAE,KAAK;QACR,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;KACX,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACrD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAC5B,CAAC;IACF,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;QAC9C,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;QACjE,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { DiscogsClient, PaginationParameters, SearchParameters } from "../discogs/client.js";
2
+ import type { Artist, ArtistRelease, Label, LabelRelease, Master, MasterVersion } from "../domain/database-resource.js";
3
+ import type { Release } from "../domain/release.js";
4
+ import type { SearchResult } from "../domain/search-result.js";
5
+ export declare class DatabaseService {
6
+ #private;
7
+ constructor(client: DiscogsClient);
8
+ getRelease(id: number): Promise<Release>;
9
+ search(parameters: SearchParameters): Promise<SearchResult[]>;
10
+ getMaster(id: number): Promise<Master>;
11
+ getMasterVersions(id: number, parameters: PaginationParameters): Promise<MasterVersion[]>;
12
+ getMasterVersionsAll(id: number, parameters: Omit<PaginationParameters, "page">): AsyncGenerator<MasterVersion>;
13
+ getArtist(id: number): Promise<Artist>;
14
+ getArtistReleases(id: number, parameters: PaginationParameters): Promise<ArtistRelease[]>;
15
+ getArtistReleasesAll(id: number, parameters: Omit<PaginationParameters, "page">): AsyncGenerator<ArtistRelease>;
16
+ getLabel(id: number): Promise<Label>;
17
+ getLabelReleases(id: number, parameters: PaginationParameters): Promise<LabelRelease[]>;
18
+ getLabelReleasesAll(id: number, parameters: Omit<PaginationParameters, "page">): AsyncGenerator<LabelRelease>;
19
+ searchAll(parameters: SearchParameters): AsyncGenerator<SearchResult>;
20
+ }
21
+ //# sourceMappingURL=database-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database-service.d.ts","sourceRoot":"","sources":["../../src/app/database-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,KAAK,EACL,YAAY,EACZ,MAAM,EACN,aAAa,EACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,qBAAa,eAAe;;gBAGd,MAAM,EAAE,aAAa;IAI3B,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAwBxC,MAAM,CAAC,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAK7D,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAetC,iBAAiB,CACrB,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,oBAAo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