@hotcodepush/node 0.0.0-stage → 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Genz IT Solutions GmbH
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.
package/README.md CHANGED
@@ -1,3 +1,70 @@
1
- # Temporary Holding Version
1
+ # @hotcodepush/node
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
+ The typed Node client for the [HotCodePush](https://hotcodepush.com) REST API.
4
+
5
+ ## Installation
6
+
7
+ The package is not on npm yet. Every commit on `main` is built to pkg.pr.new, so install one by its commit SHA and bump it deliberately, never `@main`:
8
+
9
+ ```sh
10
+ npm install https://pkg.pr.new/hotcodepush-team/hotcodepush-node/@hotcodepush/node@<sha>
11
+ ```
12
+
13
+ It requires Node.js 22 or later.
14
+
15
+ ## Usage
16
+
17
+ ```ts
18
+ import { HotCodePush } from '@hotcodepush/node';
19
+
20
+ // Reads the token from HOTCODEPUSH_TOKEN; pass `token` to set it yourself.
21
+ const hotCodePush = new HotCodePush();
22
+
23
+ const app = await hotCodePush.organizations.apps.create({
24
+ framework: 'capacitor',
25
+ name: 'Demo',
26
+ organizationId: '<organization id>',
27
+ });
28
+ const channel = await hotCodePush.apps.channels.create({
29
+ appId: app.id,
30
+ name: 'staging',
31
+ });
32
+ await hotCodePush.apps.channels.pause({ appId: app.id, channelId: channel.id });
33
+
34
+ const [release] = await hotCodePush.apps.releases.list({
35
+ appId: app.id,
36
+ channelId: channel.id,
37
+ number: 1,
38
+ });
39
+ ```
40
+
41
+ The resources mirror the API's paths, `/v1/apps/{appId}/channels` being `apps.channels`, and every paginated list has a `count` beside it.
42
+ A boolean filter such as `isRead` takes a `boolean`.
43
+ Each attempt of a call may take 60 seconds; pass `timeout` in milliseconds to change it. A binary upload gets ten minutes per attempt.
44
+ A `baseUrl` with a path, such as `https://proxy.example/hcp`, keeps it in front of every route.
45
+ Uploads stream their body, a `Blob` or a `ReadableStream` with its `contentLength`.
46
+ Creating calls send an `Idempotency-Key` and are retried; pass `idempotencyKey` to reuse one across your own retries.
47
+ A failed request throws a `HotCodePushError` with the API's `code`, `message`, `details` and the HTTP `status`.
48
+
49
+ ## Documentation
50
+
51
+ See [hotcodepush.com/docs/api/node](https://hotcodepush.com/docs/api/node) for this client and [hotcodepush.com/docs](https://hotcodepush.com/docs) for HotCodePush.
52
+
53
+ ## Development
54
+
55
+ ```sh
56
+ nvm use
57
+ npm ci
58
+ npm run build # tsdown into dist/
59
+ npm test
60
+ npm run lint && npm run typecheck
61
+ npm run fmt # ESLint's fixes and Prettier, run before every commit
62
+ ```
63
+
64
+ `npm run sync-openapi` fetches the API's OpenAPI document into `openapi.json`, and `npm run generate` regenerates the types from it.
65
+ `npm run check-openapi-drift` compares the operations of `openapi.json` with the live API's; CI runs it after the tests.
66
+ `CLAUDE.md` holds the layout and the rules.
67
+
68
+ ## License
69
+
70
+ See [LICENSE](./LICENSE).