@grekt/cli 6.33.0 → 6.33.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.js +35 -4
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -90235,6 +90235,7 @@ async function resolveArtifact(sourceStr, options2) {
|
|
|
90235
90235
|
}
|
|
90236
90236
|
const fileHashes = hashDirectory2(tempDir);
|
|
90237
90237
|
const integrity = calculateIntegrity(fileHashes);
|
|
90238
|
+
const resolved = source.type === "local" ? undefined : downloadResult.resolved;
|
|
90238
90239
|
return {
|
|
90239
90240
|
success: true,
|
|
90240
90241
|
artifactId: resolvedArtifactId,
|
|
@@ -90243,7 +90244,7 @@ async function resolveArtifact(sourceStr, options2) {
|
|
|
90243
90244
|
version: artifactInfo.manifest.version,
|
|
90244
90245
|
integrity,
|
|
90245
90246
|
source: source.raw,
|
|
90246
|
-
resolved
|
|
90247
|
+
resolved,
|
|
90247
90248
|
mode: "lazy",
|
|
90248
90249
|
files: fileHashes
|
|
90249
90250
|
},
|
|
@@ -91260,7 +91261,10 @@ async function installFromLockfile(artifactId, entry, targetDir, projectRoot, fo
|
|
|
91260
91261
|
success(`Installed ${artifactId}@${entry.version}`);
|
|
91261
91262
|
return "installed";
|
|
91262
91263
|
}
|
|
91263
|
-
|
|
91264
|
+
function isLocalSource(source) {
|
|
91265
|
+
return parseSource(source).type === "local";
|
|
91266
|
+
}
|
|
91267
|
+
var installCommand = new Command("install").alias("i").description("Install artifacts from config, using lockfile for determinism").option("--force", "Reinstall even if already present").option("--ci", "Fail on local artifacts (also auto-detected via CI env var)").action(async (options2) => {
|
|
91264
91268
|
const projectRoot = process.cwd();
|
|
91265
91269
|
requireInitialized(projectRoot);
|
|
91266
91270
|
const config = getConfig(projectRoot);
|
|
@@ -91284,6 +91288,8 @@ var installCommand = new Command("install").alias("i").description("Install arti
|
|
|
91284
91288
|
log(colors5.dim(` ${plan.toPrune.length} to prune`));
|
|
91285
91289
|
}
|
|
91286
91290
|
newline();
|
|
91291
|
+
const isCI = options2.ci || !!process.env.CI;
|
|
91292
|
+
const localArtifacts = [];
|
|
91287
91293
|
let installed = 0;
|
|
91288
91294
|
let skipped = 0;
|
|
91289
91295
|
let resolved = 0;
|
|
@@ -91304,6 +91310,12 @@ var installCommand = new Command("install").alias("i").description("Install arti
|
|
|
91304
91310
|
failed++;
|
|
91305
91311
|
continue;
|
|
91306
91312
|
}
|
|
91313
|
+
if (isLocalSource(entry.source)) {
|
|
91314
|
+
localArtifacts.push(entry.artifactId);
|
|
91315
|
+
log(`${colors5.dim("skip")} ${entry.artifactId} (local source)`);
|
|
91316
|
+
skipped++;
|
|
91317
|
+
continue;
|
|
91318
|
+
}
|
|
91307
91319
|
const targetDir = `${projectRoot}/${ARTIFACTS_DIR}/${entry.artifactId}`;
|
|
91308
91320
|
const configEntry = configArtifacts[entry.artifactId];
|
|
91309
91321
|
const configMode = extractMode(configEntry);
|
|
@@ -91325,6 +91337,12 @@ var installCommand = new Command("install").alias("i").description("Install arti
|
|
|
91325
91337
|
failed++;
|
|
91326
91338
|
continue;
|
|
91327
91339
|
}
|
|
91340
|
+
if (isLocalSource(entry.source)) {
|
|
91341
|
+
localArtifacts.push(entry.artifactId);
|
|
91342
|
+
log(`${colors5.dim("skip")} ${entry.artifactId} (local source)`);
|
|
91343
|
+
skipped++;
|
|
91344
|
+
continue;
|
|
91345
|
+
}
|
|
91328
91346
|
const spin = spinner(`Resolving ${entry.artifactId}${entry.configVersion ? `@${entry.configVersion}` : ""}...`);
|
|
91329
91347
|
spin.start();
|
|
91330
91348
|
const result = await resolveArtifact(entry.source, {
|
|
@@ -91384,6 +91402,17 @@ var installCommand = new Command("install").alias("i").description("Install arti
|
|
|
91384
91402
|
generateArtifactIndex(projectRoot, config, lockfile);
|
|
91385
91403
|
await syncToTargets(config, lockfile, projectRoot);
|
|
91386
91404
|
}
|
|
91405
|
+
if (isCI && localArtifacts.length > 0) {
|
|
91406
|
+
newline();
|
|
91407
|
+
error("Local artifacts detected in CI environment:");
|
|
91408
|
+
for (const id of localArtifacts) {
|
|
91409
|
+
log(` ${colors5.highlight(id)}`);
|
|
91410
|
+
}
|
|
91411
|
+
newline();
|
|
91412
|
+
error("Local artifacts use filesystem paths that only exist on the author's machine.");
|
|
91413
|
+
info("Replace them with registry, GitHub, or GitLab sources before pushing.");
|
|
91414
|
+
process.exit(1);
|
|
91415
|
+
}
|
|
91387
91416
|
if (failed > 0) {
|
|
91388
91417
|
process.exit(1);
|
|
91389
91418
|
}
|
|
@@ -96359,7 +96388,7 @@ var whoamiCommand = new Command("whoami").description("Show current user").actio
|
|
|
96359
96388
|
// package.json
|
|
96360
96389
|
var package_default = {
|
|
96361
96390
|
name: "@grekt/cli",
|
|
96362
|
-
version: "6.33.
|
|
96391
|
+
version: "6.33.1",
|
|
96363
96392
|
description: "AI tools versioned, synced, and shared across tools and teams",
|
|
96364
96393
|
type: "module",
|
|
96365
96394
|
bin: {
|
|
@@ -96390,7 +96419,8 @@ var package_default = {
|
|
|
96390
96419
|
"test:watch": "bun test --watch",
|
|
96391
96420
|
"test:coverage": "bun test --coverage",
|
|
96392
96421
|
"test:e2e": "bun test spec/",
|
|
96393
|
-
"test:e2e:watch": "bun test spec/ --watch"
|
|
96422
|
+
"test:e2e:watch": "bun test spec/ --watch",
|
|
96423
|
+
prepare: "husky"
|
|
96394
96424
|
},
|
|
96395
96425
|
dependencies: {
|
|
96396
96426
|
"@aws-sdk/client-s3": "^3.971.0",
|
|
@@ -96410,6 +96440,7 @@ var package_default = {
|
|
|
96410
96440
|
"@semantic-release/git": "^10.0.1",
|
|
96411
96441
|
"@types/node": "^22.10.5",
|
|
96412
96442
|
"bun-types": "^1.3.6",
|
|
96443
|
+
husky: "^9.1.7",
|
|
96413
96444
|
"semantic-release": "^25.0.2",
|
|
96414
96445
|
typescript: "^5.7.2"
|
|
96415
96446
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grekt/cli",
|
|
3
|
-
"version": "6.33.
|
|
3
|
+
"version": "6.33.1",
|
|
4
4
|
"description": "AI tools versioned, synced, and shared across tools and teams",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"test:watch": "bun test --watch",
|
|
32
32
|
"test:coverage": "bun test --coverage",
|
|
33
33
|
"test:e2e": "bun test spec/",
|
|
34
|
-
"test:e2e:watch": "bun test spec/ --watch"
|
|
34
|
+
"test:e2e:watch": "bun test spec/ --watch",
|
|
35
|
+
"prepare": "husky"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@aws-sdk/client-s3": "^3.971.0",
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"@semantic-release/git": "^10.0.1",
|
|
52
53
|
"@types/node": "^22.10.5",
|
|
53
54
|
"bun-types": "^1.3.6",
|
|
55
|
+
"husky": "^9.1.7",
|
|
54
56
|
"semantic-release": "^25.0.2",
|
|
55
57
|
"typescript": "^5.7.2"
|
|
56
58
|
},
|