gigadrive 2.5.0 → 2.5.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/dist/index.cjs +32 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +32 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { Effect as Effect27, Layer, LogLevel, Logger } from "effect";
|
|
|
9
9
|
// package.json
|
|
10
10
|
var package_default = {
|
|
11
11
|
name: "gigadrive",
|
|
12
|
-
version: "2.5.
|
|
12
|
+
version: "2.5.1",
|
|
13
13
|
repository: {
|
|
14
14
|
type: "git",
|
|
15
15
|
url: "https://github.com/Gigadrive/sdk.git",
|
|
@@ -510,11 +510,6 @@ var CLI_SCOPES = [
|
|
|
510
510
|
"network:deployments:trigger",
|
|
511
511
|
"network:ai_gateway:chat",
|
|
512
512
|
"network:ai_gateway:models",
|
|
513
|
-
"network:ai_gateway:usage:read",
|
|
514
|
-
"network:ai_gateway:budgets:read",
|
|
515
|
-
"network:ai_gateway:budgets:write",
|
|
516
|
-
"network:ai_gateway:policies:read",
|
|
517
|
-
"network:ai_gateway:policies:write",
|
|
518
513
|
// Provisioning local-dev API credentials
|
|
519
514
|
"platform:api_keys:read",
|
|
520
515
|
"platform:api_keys:write",
|
|
@@ -2368,7 +2363,15 @@ import { Effect as Effect21 } from "effect";
|
|
|
2368
2363
|
import ignore from "ignore";
|
|
2369
2364
|
import * as nodeFs from "fs";
|
|
2370
2365
|
import * as nodeFsPromises from "fs/promises";
|
|
2371
|
-
var IGNORE_FILE_NAMES = [".
|
|
2366
|
+
var IGNORE_FILE_NAMES = [".gitignore", ".dockerignore", ".nowignore", ".vercelignore", ".gigadriveignore"];
|
|
2367
|
+
var MANAGED_IGNORE_PATTERNS = [
|
|
2368
|
+
".git/",
|
|
2369
|
+
"**/.git/",
|
|
2370
|
+
"node_modules/",
|
|
2371
|
+
"**/node_modules/",
|
|
2372
|
+
"**/.DS_Store",
|
|
2373
|
+
"**/Thumbs.db"
|
|
2374
|
+
];
|
|
2372
2375
|
var readIgnoreFile = (fs, ignorePath) => fs.readFileString(ignorePath, "utf8").pipe(
|
|
2373
2376
|
Effect21.map((content) => content.split("\n").filter((line) => line.trim() !== "")),
|
|
2374
2377
|
Effect21.catchAll(() => Effect21.succeed([]))
|
|
@@ -2399,19 +2402,23 @@ var collectIgnorePatterns = (fs, pathService, dir, baseDir, ignoreRules) => Effe
|
|
|
2399
2402
|
}
|
|
2400
2403
|
}
|
|
2401
2404
|
}).pipe(Effect21.catchAll(() => Effect21.void));
|
|
2402
|
-
var initializeIgnoreRules = (fs, pathService, baseDir) => Effect21.gen(function* () {
|
|
2405
|
+
var initializeIgnoreRules = (fs, pathService, baseDir, useIgnoreFiles, useManagedIgnore) => Effect21.gen(function* () {
|
|
2403
2406
|
const ignoreRules = ignore();
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
)
|
|
2407
|
+
if (useManagedIgnore) {
|
|
2408
|
+
ignoreRules.add(MANAGED_IGNORE_PATTERNS);
|
|
2409
|
+
}
|
|
2410
|
+
if (useIgnoreFiles) {
|
|
2411
|
+
for (const ignoreFileName of IGNORE_FILE_NAMES) {
|
|
2412
|
+
const ignoreFilePath = pathService.join(baseDir, ignoreFileName);
|
|
2413
|
+
const patterns = yield* readIgnoreFile(fs, ignoreFilePath);
|
|
2414
|
+
if (patterns.length > 0) {
|
|
2415
|
+
ignoreRules.add(
|
|
2416
|
+
patterns.map((pattern) => pattern.startsWith("!") ? `!${pattern.slice(1)}` : pattern)
|
|
2417
|
+
);
|
|
2418
|
+
}
|
|
2412
2419
|
}
|
|
2420
|
+
yield* collectIgnorePatterns(fs, pathService, baseDir, baseDir, ignoreRules);
|
|
2413
2421
|
}
|
|
2414
|
-
yield* collectIgnorePatterns(fs, pathService, baseDir, baseDir, ignoreRules);
|
|
2415
2422
|
return ignoreRules;
|
|
2416
2423
|
});
|
|
2417
2424
|
var getFilesToInclude = (fs, pathService, dir, ignoreRules) => Effect21.gen(function* () {
|
|
@@ -2448,7 +2455,13 @@ var ArchiveService = class extends Effect21.Service()("ArchiveService", {
|
|
|
2448
2455
|
yield* Effect21.annotateCurrentSpan("inputDir", inputDir);
|
|
2449
2456
|
yield* Effect21.annotateCurrentSpan("outputFile", outputFile);
|
|
2450
2457
|
yield* Effect21.log("Creating zip archive", { inputDir, outputFile });
|
|
2451
|
-
const ignoreRules =
|
|
2458
|
+
const ignoreRules = yield* initializeIgnoreRules(
|
|
2459
|
+
fs,
|
|
2460
|
+
pathService,
|
|
2461
|
+
inputDir,
|
|
2462
|
+
options.useIgnoreFiles !== false,
|
|
2463
|
+
options.useManagedIgnore !== false
|
|
2464
|
+
);
|
|
2452
2465
|
const filesToInclude = options.whitelist ? yield* Effect21.tryPromise({
|
|
2453
2466
|
try: () => Promise.all(
|
|
2454
2467
|
options.whitelist.map((file) => getFilesForPattern(file, inputDir, options.excludeFiles ?? []))
|
|
@@ -2713,9 +2726,7 @@ var deployCommand = Command11.make(
|
|
|
2713
2726
|
const archivePath = pathService.join(os4.tmpdir(), `project-${Date.now()}.zip`);
|
|
2714
2727
|
const archive = yield* archiveService.createZipArchive(config.userArchive?.rootOverwrite || cwd, archivePath, {
|
|
2715
2728
|
whitelist: config.userArchive?.fileWhitelist,
|
|
2716
|
-
excludeFiles: config.excludeFiles
|
|
2717
|
-
useIgnoreFiles: false,
|
|
2718
|
-
useManagedIgnore: false
|
|
2729
|
+
excludeFiles: config.excludeFiles
|
|
2719
2730
|
});
|
|
2720
2731
|
yield* Console11.log(`Archive created (${formatFileSize(archive.size)})`);
|
|
2721
2732
|
yield* Console11.log("Uploading archive...");
|