gigadrive 2.5.0 → 2.5.2
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 +2 -2
package/dist/index.cjs
CHANGED
|
@@ -32,7 +32,7 @@ var import_effect29 = require("effect");
|
|
|
32
32
|
// package.json
|
|
33
33
|
var package_default = {
|
|
34
34
|
name: "gigadrive",
|
|
35
|
-
version: "2.5.
|
|
35
|
+
version: "2.5.2",
|
|
36
36
|
repository: {
|
|
37
37
|
type: "git",
|
|
38
38
|
url: "https://github.com/Gigadrive/sdk.git",
|
|
@@ -533,11 +533,6 @@ var CLI_SCOPES = [
|
|
|
533
533
|
"network:deployments:trigger",
|
|
534
534
|
"network:ai_gateway:chat",
|
|
535
535
|
"network:ai_gateway:models",
|
|
536
|
-
"network:ai_gateway:usage:read",
|
|
537
|
-
"network:ai_gateway:budgets:read",
|
|
538
|
-
"network:ai_gateway:budgets:write",
|
|
539
|
-
"network:ai_gateway:policies:read",
|
|
540
|
-
"network:ai_gateway:policies:write",
|
|
541
536
|
// Provisioning local-dev API credentials
|
|
542
537
|
"platform:api_keys:read",
|
|
543
538
|
"platform:api_keys:write",
|
|
@@ -2383,7 +2378,15 @@ var import_effect23 = require("effect");
|
|
|
2383
2378
|
var import_ignore = __toESM(require("ignore"), 1);
|
|
2384
2379
|
var nodeFs = __toESM(require("fs"), 1);
|
|
2385
2380
|
var nodeFsPromises = __toESM(require("fs/promises"), 1);
|
|
2386
|
-
var IGNORE_FILE_NAMES = [".
|
|
2381
|
+
var IGNORE_FILE_NAMES = [".gitignore", ".dockerignore", ".nowignore", ".vercelignore", ".gigadriveignore"];
|
|
2382
|
+
var MANAGED_IGNORE_PATTERNS = [
|
|
2383
|
+
".git/",
|
|
2384
|
+
"**/.git/",
|
|
2385
|
+
"node_modules/",
|
|
2386
|
+
"**/node_modules/",
|
|
2387
|
+
"**/.DS_Store",
|
|
2388
|
+
"**/Thumbs.db"
|
|
2389
|
+
];
|
|
2387
2390
|
var readIgnoreFile = (fs, ignorePath) => fs.readFileString(ignorePath, "utf8").pipe(
|
|
2388
2391
|
import_effect23.Effect.map((content) => content.split("\n").filter((line) => line.trim() !== "")),
|
|
2389
2392
|
import_effect23.Effect.catchAll(() => import_effect23.Effect.succeed([]))
|
|
@@ -2414,19 +2417,23 @@ var collectIgnorePatterns = (fs, pathService, dir, baseDir, ignoreRules) => impo
|
|
|
2414
2417
|
}
|
|
2415
2418
|
}
|
|
2416
2419
|
}).pipe(import_effect23.Effect.catchAll(() => import_effect23.Effect.void));
|
|
2417
|
-
var initializeIgnoreRules = (fs, pathService, baseDir) => import_effect23.Effect.gen(function* () {
|
|
2420
|
+
var initializeIgnoreRules = (fs, pathService, baseDir, useIgnoreFiles, useManagedIgnore) => import_effect23.Effect.gen(function* () {
|
|
2418
2421
|
const ignoreRules = (0, import_ignore.default)();
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
)
|
|
2422
|
+
if (useManagedIgnore) {
|
|
2423
|
+
ignoreRules.add(MANAGED_IGNORE_PATTERNS);
|
|
2424
|
+
}
|
|
2425
|
+
if (useIgnoreFiles) {
|
|
2426
|
+
for (const ignoreFileName of IGNORE_FILE_NAMES) {
|
|
2427
|
+
const ignoreFilePath = pathService.join(baseDir, ignoreFileName);
|
|
2428
|
+
const patterns = yield* readIgnoreFile(fs, ignoreFilePath);
|
|
2429
|
+
if (patterns.length > 0) {
|
|
2430
|
+
ignoreRules.add(
|
|
2431
|
+
patterns.map((pattern) => pattern.startsWith("!") ? `!${pattern.slice(1)}` : pattern)
|
|
2432
|
+
);
|
|
2433
|
+
}
|
|
2427
2434
|
}
|
|
2435
|
+
yield* collectIgnorePatterns(fs, pathService, baseDir, baseDir, ignoreRules);
|
|
2428
2436
|
}
|
|
2429
|
-
yield* collectIgnorePatterns(fs, pathService, baseDir, baseDir, ignoreRules);
|
|
2430
2437
|
return ignoreRules;
|
|
2431
2438
|
});
|
|
2432
2439
|
var getFilesToInclude = (fs, pathService, dir, ignoreRules) => import_effect23.Effect.gen(function* () {
|
|
@@ -2463,7 +2470,13 @@ var ArchiveService = class extends import_effect23.Effect.Service()("ArchiveServ
|
|
|
2463
2470
|
yield* import_effect23.Effect.annotateCurrentSpan("inputDir", inputDir);
|
|
2464
2471
|
yield* import_effect23.Effect.annotateCurrentSpan("outputFile", outputFile);
|
|
2465
2472
|
yield* import_effect23.Effect.log("Creating zip archive", { inputDir, outputFile });
|
|
2466
|
-
const ignoreRules =
|
|
2473
|
+
const ignoreRules = yield* initializeIgnoreRules(
|
|
2474
|
+
fs,
|
|
2475
|
+
pathService,
|
|
2476
|
+
inputDir,
|
|
2477
|
+
options.useIgnoreFiles !== false,
|
|
2478
|
+
options.useManagedIgnore !== false
|
|
2479
|
+
);
|
|
2467
2480
|
const filesToInclude = options.whitelist ? yield* import_effect23.Effect.tryPromise({
|
|
2468
2481
|
try: () => Promise.all(
|
|
2469
2482
|
options.whitelist.map((file) => (0, import_build_utils3.getFilesForPattern)(file, inputDir, options.excludeFiles ?? []))
|
|
@@ -2728,9 +2741,7 @@ var deployCommand = import_cli11.Command.make(
|
|
|
2728
2741
|
const archivePath = pathService.join(os4.tmpdir(), `project-${Date.now()}.zip`);
|
|
2729
2742
|
const archive = yield* archiveService.createZipArchive(config.userArchive?.rootOverwrite || cwd, archivePath, {
|
|
2730
2743
|
whitelist: config.userArchive?.fileWhitelist,
|
|
2731
|
-
excludeFiles: config.excludeFiles
|
|
2732
|
-
useIgnoreFiles: false,
|
|
2733
|
-
useManagedIgnore: false
|
|
2744
|
+
excludeFiles: config.excludeFiles
|
|
2734
2745
|
});
|
|
2735
2746
|
yield* import_effect25.Console.log(`Archive created (${(0, import_commons.formatFileSize)(archive.size)})`);
|
|
2736
2747
|
yield* import_effect25.Console.log("Uploading archive...");
|