@rharkor/caching-for-turbo 2.2.4 → 2.3.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/README.md CHANGED
@@ -104,7 +104,7 @@ the following step **before** you run `turbo build`:
104
104
  This GitHub Action facilitates:
105
105
 
106
106
  1. **Server Initialization**: Automatically spins up a server on
107
- `localhost:41230`.
107
+ `localhost:41230` (configurable via `server-port`).
108
108
  2. **Environment Setup**: Sets up `TURBO_API`, `TURBO_TOKEN`, and `TURBO_TEAM`
109
109
  environment variables required by `turbo build`.
110
110
  3. **Efficient Caching**: Leverages GitHub's cache service to significantly
@@ -167,6 +167,9 @@ S3_PREFIX=turbogha/
167
167
 
168
168
  # Optional: Custom cache prefix
169
169
  CACHE_PREFIX=turbogha_
170
+
171
+ # Optional: Custom server port (default: 41230)
172
+ SERVER_PORT=41230
170
173
  ```
171
174
 
172
175
  ### Using with Turbo
@@ -174,11 +177,16 @@ CACHE_PREFIX=turbogha_
174
177
  Once the server is running, you can use Turbo with remote caching:
175
178
 
176
179
  ```bash
177
- export TURBOGHA_PORT=41230
180
+ # If using default port (41230)
178
181
  export TURBO_API=http://localhost:41230
179
182
  export TURBO_TOKEN=turbogha
180
183
  export TURBO_TEAM=turbogha
181
184
 
185
+ # If using custom port (set via SERVER_PORT env var)
186
+ export TURBO_API=http://localhost:${SERVER_PORT:-41230}
187
+ export TURBO_TOKEN=turbogha
188
+ export TURBO_TEAM=turbogha
189
+
182
190
  # Now run your turbo commands
183
191
  turbo build
184
192
  ```
@@ -191,8 +199,8 @@ To stop the cache server:
191
199
 
192
200
  ```bash
193
201
  turbogha kill
194
- # or
195
- curl -X DELETE http://localhost:41230/shutdown
202
+ # or (use your custom port if configured)
203
+ curl -X DELETE http://localhost:${SERVER_PORT:-41230}/shutdown
196
204
  ```
197
205
 
198
206
  ## Configurable Options
@@ -204,6 +212,7 @@ provided):
204
212
  with:
205
213
  cache-prefix: turbogha_ # Custom prefix for cache keys
206
214
  provider: github # Storage provider: 'github' (default) or 's3'
215
+ server-port: 41230 # Port for the caching server (default: 41230)
207
216
 
208
217
  # S3 Provider Configuration (variables will be read from environment variables if not provided)
209
218
  s3-access-key-id: ${{ secrets.S3_ACCESS_KEY_ID }} # S3 access key
package/dist/cli/index.js CHANGED
@@ -203233,7 +203233,7 @@ const getInput = (name, envName) => {
203233
203233
  const envVar = envName || name.toUpperCase().replace(/-/g, '_');
203234
203234
  return process.env[envVar];
203235
203235
  };
203236
- const serverPort = 41230;
203236
+ const serverPort = parseInt(getInput('server-port', 'SERVER_PORT') || '41230', 10);
203237
203237
  const cachePath = 'turbogha_';
203238
203238
  const cachePrefix = getInput('cache-prefix', 'CACHE_PREFIX') || cachePath;
203239
203239
  const getCacheKey = (hash, tag) => `${cachePrefix}${hash}${tag ? `#${tag}` : ''}`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rharkor/caching-for-turbo",
3
3
  "description": "Sets up Turborepo Remote Caching to work with GitHub Actions built-in cache",
4
- "version": "2.2.4",
4
+ "version": "2.3.0",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/rharkor/caching-for-turbo",
7
7
  "repository": {