stacktape 3.0.8-beta.3 → 3.0.8

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/bin/stacktape.js CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  const { spawnSync, execSync } = require('node:child_process');
9
- const { createWriteStream, existsSync, chmodSync, mkdirSync, accessSync, constants } = require('node:fs');
9
+ const { createWriteStream, existsSync, chmodSync, mkdirSync, accessSync, constants, unlinkSync } = require('node:fs');
10
10
  const { get: httpsGet } = require('node:https');
11
11
  const { platform, arch, homedir } = require('node:os');
12
12
  const { join } = require('node:path');
@@ -184,9 +184,7 @@ async function ensureBinary() {
184
184
 
185
185
  console.info(`Stacktape binary not found. Installing version ${version} for ${platformKey}...`);
186
186
 
187
- if (!existsSync(cacheDir)) {
188
- mkdirSync(cacheDir, { recursive: true });
189
- }
187
+ mkdirSync(cacheDir, { recursive: true });
190
188
 
191
189
  const downloadUrl = `https://github.com/${GITHUB_REPO}/releases/download/${version}/${platformInfo.fileName}`;
192
190
  const archivePath = join(cacheDir, platformInfo.fileName);
@@ -200,7 +198,6 @@ async function ensureBinary() {
200
198
 
201
199
  setExecutablePermissions(cacheDir);
202
200
 
203
- const { unlinkSync } = require('node:fs');
204
201
  unlinkSync(archivePath);
205
202
 
206
203
  if (!existsSync(binaryPath)) {
@@ -233,11 +230,35 @@ function getManualInstallCommand(platformKey) {
233
230
  return commands[platformKey] || 'See https://docs.stacktape.com for installation instructions';
234
231
  }
235
232
 
233
+ function getGlobalBinaryPath() {
234
+ const binaryName = platform() === 'win32' ? 'stacktape.exe' : 'stacktape';
235
+ const globalBinaryPath = join(homedir(), '.stacktape', 'bin', binaryName);
236
+ if (existsSync(globalBinaryPath)) {
237
+ try {
238
+ accessSync(globalBinaryPath, constants.X_OK);
239
+ return globalBinaryPath;
240
+ } catch {
241
+ return globalBinaryPath;
242
+ }
243
+ }
244
+ return null;
245
+ }
246
+
236
247
  async function main() {
237
248
  try {
238
- const binaryPath = await ensureBinary();
239
249
  const args = process.argv.slice(2);
240
250
 
251
+ const globalBinaryPath = getGlobalBinaryPath();
252
+ if (globalBinaryPath) {
253
+ const result = spawnSync(globalBinaryPath, args, {
254
+ stdio: 'inherit',
255
+ env: process.env
256
+ });
257
+ process.exit(result.status || 0);
258
+ }
259
+
260
+ const binaryPath = await ensureBinary();
261
+
241
262
  const result = spawnSync(binaryPath, args, {
242
263
  stdio: 'inherit',
243
264
  env: process.env
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stacktape",
3
- "version": "3.0.8-beta.3",
3
+ "version": "3.0.8",
4
4
  "description": "PaaS 2.0 that deploys to your own AWS account.",
5
5
  "author": "Stacktape team <support@stacktape.com>",
6
6
  "license": "MIT",
package/sdk.d.ts CHANGED
@@ -25808,6 +25808,16 @@ declare class Stacktape {
25808
25808
  */
25809
25809
  noCache?: boolean,
25810
25810
  /**
25811
+ * #### Disable Docker Remote Cache
25812
+ *
25813
+ * ---
25814
+ *
25815
+ * Disables Docker layer caching using ECR as remote cache storage.
25816
+ * By default, remote caching is enabled to speed up Docker builds by reusing layers.
25817
+ * Set to `true` to disable remote caching.
25818
+ */
25819
+ disableDockerRemoteCache?: boolean,
25820
+ /**
25811
25821
  * #### Disable Auto-Rollback
25812
25822
  *
25813
25823
  * ---
@@ -26071,6 +26081,16 @@ declare class Stacktape {
26071
26081
  */
26072
26082
  noCache?: boolean,
26073
26083
  /**
26084
+ * #### Disable Docker Remote Cache
26085
+ *
26086
+ * ---
26087
+ *
26088
+ * Disables Docker layer caching using ECR as remote cache storage.
26089
+ * By default, remote caching is enabled to speed up Docker builds by reusing layers.
26090
+ * Set to `true` to disable remote caching.
26091
+ */
26092
+ disableDockerRemoteCache?: boolean,
26093
+ /**
26074
26094
  * #### Disable Auto-Rollback
26075
26095
  *
26076
26096
  * ---