gh-upload-file 0.0.0-stage → 0.12.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,241 @@
1
+ # gh-upload-log
2
+
3
+ ## 0.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b30b770: Track the published compatibility package in the README badge, explain renamed-package availability, and add actionable npm authorization diagnostics.
8
+
9
+ ## 0.12.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 3b926b7: Publish the universal package as `gh-upload-file`: npm refuses `gh-upload` as too similar to `rc-upload`. The `gh-upload` command is unchanged and `gh-upload-file` is added as a command.
14
+
15
+ ## 0.11.0
16
+
17
+ ### Minor Changes
18
+
19
+ - b86bb49: Publish gh-upload alongside gh-upload-log with both command names and an uploadFile API alias. Automatically archive binary files with streaming gzip and split oversized archives into parts of at most 100 MB, while retaining readable text uploads, retries and resume support. Verify publication of every package name with uncached npm registry checks before creating a release.
20
+
21
+ ## 0.10.1
22
+
23
+ ### Patch Changes
24
+
25
+ - de23ee4: Give real Git integration tests explicit Windows-sized timeouts and bounded subprocess diagnostics so slow runners do not block releases at Bun's default five-second limit.
26
+
27
+ ## 0.10.0
28
+
29
+ ### Minor Changes
30
+
31
+ - 722cc83: Add explicit existing repository and branch targets for installation-token uploads without querying the authenticated user or creating repositories. Keep repository reads scoped to the selected branch and distinguish permanent Gist permission failures from retryable rate limits.
32
+
33
+ ## 0.9.3
34
+
35
+ ### Patch Changes
36
+
37
+ - ea2dc72: Retry transient shared-repository push failures with exponential backoff and fetch/rebase recovery. Commit and push each log chunk separately, and resume incomplete uploads without treating the first chunk as a complete log. Add `--chunk-size` / `GH_UPLOAD_LOG_CHUNK_SIZE` and the library `chunkSize` option. Split chunks on line boundaries where possible and preserve UTF-8 characters when a line exceeds the byte limit.
38
+
39
+ ## 0.9.2
40
+
41
+ ### Patch Changes
42
+
43
+ - 1b31255: Fail the release workflow when release-note formatting commands fail, and run both formatting helpers with Bun and locked dependencies.
44
+
45
+ ## 0.9.1
46
+
47
+ ### Patch Changes
48
+
49
+ - 770cea8: Ship the existing relative-path upload fix to npm by repairing trusted publishing, reject failed publish commands instead of creating false-success GitHub releases, and report the installed package version from the CLI.
50
+
51
+ ## 0.9.0
52
+
53
+ ### Minor Changes
54
+
55
+ - a00463b: Upload a log again when its content changed, even if the same path was uploaded before (#38).
56
+
57
+ Repository-mode uploads are now content addressed: logs are stored as
58
+ `<normalized-directory>/<content-hash>/<file-name>.log.txt` instead of
59
+ `log-<flattened-path>/<flattened-path>.log.txt`. A changed file gets a new hash
60
+ folder and is uploaded again, identical content is deduplicated and links to the
61
+ file that actually exists, and the path is no longer duplicated in the folder and
62
+ file names.
63
+ - Deduplication now checks that the expected file exists in the folder, so a
64
+ partial upload is retried instead of being reported as complete.
65
+ - New `--gist-limit` / `GH_UPLOAD_LOG_GIST_LIMIT` option to configure the gist
66
+ size threshold (clamped to GitHub's documented 100MB per gist file).
67
+ - Gist creation retries on transient `502`/`503`/`504` responses instead of failing.
68
+ - New `--check-raw-url` / `GH_UPLOAD_LOG_CHECK_RAW_URL` option verifies that the
69
+ reported raw URL is reachable, with a hint about private-repository token expiry.
70
+ - Verbose mode reports the content hash, stored file name and deduplication decision.
71
+ - `self-test` cleanup refuses to delete the shared `private-logs`/`public-logs`
72
+ repositories.
73
+
74
+ ## 0.8.3
75
+
76
+ ### Patch Changes
77
+
78
+ - c6cc736: Accept every log file path form (bare relative, `./`, `../`, `~/`, absolute) by resolving paths to absolute before use, run git commands with command-stream's `cwd` option instead of a `cd` prefix that changed the process working directory, and initialize temporary repositories with `git -c init.defaultBranch=<branch> init -q` so the "Using 'master' as the name for the initial branch" hint and other command noise are no longer printed.
79
+
80
+ ## 0.8.2
81
+
82
+ ### Patch Changes
83
+
84
+ - 5d82718: Use `.log.txt` names for uploaded log files so raw gist and repository links open as text in browsers.
85
+
86
+ ## 0.8.1
87
+
88
+ ### Patch Changes
89
+
90
+ - 647ab73: Route repository fallbacks through shared log repositories by default.
91
+
92
+ ## 0.8.0
93
+
94
+ ### Minor Changes
95
+
96
+ - 4c94056: Default large repository uploads to the shared `private-logs` /
97
+ `public-logs` repositories, skip duplicate large-log uploads that already
98
+ exist there, and add CLI/library configuration to keep the legacy dedicated
99
+ repository flow when needed. Also update `lino-arguments` to `0.3.0`.
100
+
101
+ ## 0.7.1
102
+
103
+ ### Patch Changes
104
+
105
+ - 4c2044e: Handle repository-create exit failures correctly and retry with a unique
106
+ repository name when the generated name already exists.
107
+
108
+ ## 0.7.0
109
+
110
+ ### Minor Changes
111
+
112
+ - 940281d: Handle ENOSPC (no space left on device) errors gracefully with actionable error messages, disk cleanup suggestions, and smart fallback prevention. Gist uploads can work without extra disk space; the tool now suggests --only-gist when appropriate.
113
+
114
+ ## 0.6.1
115
+
116
+ ### Patch Changes
117
+
118
+ - 524dc7e: Fail early with a clean error message when the specified file does not exist, avoiding unnecessary output like the upload status line before the error.
119
+
120
+ ## 0.6.0
121
+
122
+ ### Minor Changes
123
+
124
+ - 05f977a: Add direct raw file URL support for single-file uploads
125
+
126
+ When uploading a single log file (not split into chunks), the tool now displays a direct link to the raw file content in addition to the repository/gist URL.
127
+
128
+ For gists:
129
+ - Returns the permanent `raw_url` from the GitHub API
130
+ - This URL is accessible without authentication (even for secret gists)
131
+
132
+ For repositories:
133
+ - Returns the `download_url` from the GitHub API
134
+ - For private repositories, includes a token that enables unauthenticated access
135
+ - Displays a warning that the token expires in ~10 minutes for private repos
136
+
137
+ Example output:
138
+
139
+ ```
140
+ ✅ Gist created (🔒 private)
141
+ 🔗 https://gist.github.com/user/abc123
142
+ 📄 https://gist.githubusercontent.com/user/abc123/raw/hash/file.log
143
+ ```
144
+
145
+ This enhancement addresses issue #21 and makes it easier to share direct links to uploaded log files.
146
+
147
+ ## 0.5.0
148
+
149
+ ### Minor Changes
150
+
151
+ - 428588e: Fix gist upload failing with HTTP 502 for large files
152
+ - Lower gist threshold from 100MB to 25MB to match GitHub's web interface limit and avoid HTTP 502 errors
153
+ - Add validation to detect failed gist creation (empty URL in stdout)
154
+ - Add automatic fallback from gist to repository mode when gist upload fails
155
+ - Add --test and --quick CLI flags for self-testing upload functionality
156
+ - Add test file generator script for different file sizes
157
+ - Update unit tests for new behavior
158
+
159
+ ## 0.4.1
160
+
161
+ ### Patch Changes
162
+
163
+ - 456226d: Add npm version badge to README.md for better package visibility
164
+
165
+ ## 0.4.0
166
+
167
+ ### Minor Changes
168
+
169
+ - 32150a1: Make output more user friendly with cleaner, shorter format and emojis
170
+ - Reduced duplicate information (file size, URL were shown multiple times)
171
+ - Added colorful emojis for visual clarity: ⏳ (uploading), ✅ (success), 🔍 (dry run), 🔒 (private), 🌐 (public), 🔗 (URL)
172
+ - Moved verbose details (strategy, mode, file name) to --verbose mode only
173
+ - Output is now short and minimalistic by default while preserving all important information (size, visibility, URL)
174
+
175
+ ## 0.3.1
176
+
177
+ ### Patch Changes
178
+
179
+ - 9719c35: fix: Gist URL capture and human-readable file size display
180
+ - Fix gist URL not being captured due to empty string interpolation in command-stream template literal
181
+ - Add formatFileSize() function for human-readable file sizes (e.g., "1.90 KB" instead of "0.00 MB")
182
+ - Improve CLI output with better formatting and file info display before upload
183
+ - Add comprehensive tests for formatFileSize function
184
+
185
+ ## 0.3.0
186
+
187
+ ### Minor Changes
188
+
189
+ - 2cc28d3: feat: Make repository Bun-only
190
+ - Updated README.md to use Bun instead of Node.js/npm/Deno
191
+ - Changed all shebangs from `#!/usr/bin/env node` to `#!/usr/bin/env bun`
192
+ - Updated package.json scripts to use Bun commands
193
+ - Updated CI workflows to only run Bun tests (3 OS matrix: Ubuntu, macOS, Windows)
194
+ - Removed deno.json configuration file
195
+ - Changed engine requirement from Node.js to Bun ≥1.0.0
196
+
197
+ ## 0.2.0
198
+
199
+ ### Minor Changes
200
+
201
+ - 76ccd16: Complete template feature alignment with manual release support and enhanced CI/CD
202
+
203
+ This release implements ALL missing features from the js-ai-driven-development-pipeline-template repository:
204
+
205
+ **Manual Release Support**:
206
+ - **Instant releases**: Trigger immediate version bumps and npm publishing via GitHub Actions UI
207
+ - **Changeset PR mode**: Create pull requests with changesets for review before release
208
+ - **workflow_dispatch trigger**: Supports patch, minor, and major version bumps with optional descriptions
209
+
210
+ **Enhanced CI/CD**:
211
+ - **PR-scoped validation**: Only validates changesets added by the current PR using git diff, preventing failures when other PRs merge first
212
+ - **Multiple changeset merging**: Automatically merges multiple changesets during release with highest bump type selection and chronological description preservation
213
+ - **Modular release scripts**: Migrated to modular architecture using lino-arguments, command-stream, and use-m
214
+ - **OIDC trusted publishing**: Secure npm publishing without stored tokens
215
+
216
+ **New Scripts**:
217
+ - `version-and-commit.mjs` - Unified version bumping and git commits
218
+ - `publish-to-npm.mjs` - OIDC-enabled npm publishing
219
+ - `create-github-release.mjs` - Automated GitHub release creation
220
+ - `format-github-release.mjs` - Release note formatting with PR detection
221
+ - `create-manual-changeset.mjs` - Manual changeset file generation
222
+ - `setup-npm.mjs` - npm OIDC setup for trusted publishing
223
+ - `instant-version-bump.mjs` - Fast-track version bumps without changesets
224
+
225
+ These improvements provide complete feature parity with the template repository and enable flexible release workflows.
226
+
227
+ ## 0.1.1
228
+
229
+ ### Patch Changes
230
+
231
+ - ffde303: **Bug Fix**: Fixed CLI showing "Arguments public and private are mutually exclusive" error on every invocation
232
+
233
+ **Root Cause**: The `--public` and `--private` options had default values which caused yargs' `.conflicts()` method to always trigger, preventing the CLI from working at all.
234
+
235
+ **Solution**: Removed default values from conflicting CLI options (`--public`/`--private` and `--only-gist`/`--only-repository`). Default behavior is now handled in application code.
236
+
237
+ **Impact**: This critical bug prevented the CLI from working at all when installed via npm or bun. Users can now use the tool as intended.
238
+
239
+ **Testing**: Added comprehensive integration tests to verify the fix and prevent regression.
240
+
241
+ Fixes #6
package/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org>