@grekt/cli 6.40.3 → 6.42.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.
Files changed (2) hide show
  1. package/dist/index.js +48 -39
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -69082,7 +69082,7 @@ function createTokenProvider(projectRoot, getToken, getSessionToken) {
69082
69082
  // src/context/engine.ts
69083
69083
  import { join as join6 } from "path";
69084
69084
 
69085
- // node_modules/@grekt-labs/cli-engine/dist/index.js
69085
+ // node_modules/@grekt/engine/dist/index.js
69086
69086
  import { createRequire as createRequire2 } from "node:module";
69087
69087
  import { resolve, normalize, isAbsolute as isAbsolute3, relative, join as join2 } from "path";
69088
69088
  import { tmpdir } from "os";
@@ -102291,6 +102291,45 @@ async function publishArtifact(publisher, ctx) {
102291
102291
  return publisher.publish(ctx);
102292
102292
  }
102293
102293
 
102294
+ // src/shared/git/git.ts
102295
+ function exec(args) {
102296
+ return shell.execFile("git", args).trim();
102297
+ }
102298
+ function execOrNull(args) {
102299
+ try {
102300
+ const result = exec(args);
102301
+ return result || null;
102302
+ } catch {
102303
+ return null;
102304
+ }
102305
+ }
102306
+ function splitLines(output) {
102307
+ if (!output)
102308
+ return [];
102309
+ return output.split(`
102310
+ `).map((line) => line.trim()).filter(Boolean);
102311
+ }
102312
+ function detectArtifactBaseRef(artifactName) {
102313
+ const lastTag = execOrNull([
102314
+ "describe",
102315
+ "--tags",
102316
+ "--abbrev=0",
102317
+ "--match",
102318
+ `${artifactName}@*`
102319
+ ]);
102320
+ if (lastTag)
102321
+ return lastTag;
102322
+ const firstCommit = execOrNull(["rev-list", "--max-parents=0", "HEAD"]);
102323
+ if (firstCommit)
102324
+ return firstCommit;
102325
+ warning(`${artifactName}: no tags found, falling back to HEAD~1`);
102326
+ return "HEAD~1";
102327
+ }
102328
+ function createArtifactTag(artifactName, version3) {
102329
+ const tag = `${artifactName}@${version3}`;
102330
+ exec(["tag", tag]);
102331
+ }
102332
+
102294
102333
  // src/workspace/workspace.ts
102295
102334
  var import_fast_glob2 = __toESM(require_out4(), 1);
102296
102335
  import { join as join30 } from "path";
@@ -102657,6 +102696,12 @@ async function publishSingleArtifact(artifactPath, projectRoot, options2, silent
102657
102696
  } else {
102658
102697
  success(`Published ${artifact.artifactId}@${artifact.manifest.version}`);
102659
102698
  }
102699
+ try {
102700
+ createArtifactTag(artifact.artifactId, artifact.manifest.version);
102701
+ } catch (err) {
102702
+ const message = err instanceof Error ? err.message : "Unknown error";
102703
+ warning(`Failed to create tag for ${artifact.artifactId}@${artifact.manifest.version}: ${message}`);
102704
+ }
102660
102705
  }
102661
102706
  function showKeywordsExample() {
102662
102707
  log("");
@@ -103393,23 +103438,6 @@ function findArtifacts(basePath) {
103393
103438
  }
103394
103439
 
103395
103440
  // src/commands/changelog/git.ts
103396
- function exec(args) {
103397
- return shell.execFile("git", args).trim();
103398
- }
103399
- function execOrNull(args) {
103400
- try {
103401
- const result = exec(args);
103402
- return result || null;
103403
- } catch {
103404
- return null;
103405
- }
103406
- }
103407
- function splitLines(output) {
103408
- if (!output)
103409
- return [];
103410
- return output.split(`
103411
- `).map((line) => line.trim()).filter(Boolean);
103412
- }
103413
103441
  function detectDefaultBranch() {
103414
103442
  const symbolicRef = execOrNull([
103415
103443
  "symbolic-ref",
@@ -103421,9 +103449,6 @@ function detectDefaultBranch() {
103421
103449
  }
103422
103450
  return "main";
103423
103451
  }
103424
- function getFirstCommit() {
103425
- return execOrNull(["rev-list", "--max-parents=0", "HEAD"]);
103426
- }
103427
103452
  function detectBaseRef(overrideSince) {
103428
103453
  if (overrideSince) {
103429
103454
  const resolved = execOrNull(["rev-parse", "--verify", overrideSince]);
@@ -103445,22 +103470,6 @@ function detectBaseRef(overrideSince) {
103445
103470
  warning("No remote found, falling back to local refs");
103446
103471
  return defaultBranch;
103447
103472
  }
103448
- function detectArtifactBaseRef(artifactName) {
103449
- const lastTag = execOrNull([
103450
- "describe",
103451
- "--tags",
103452
- "--abbrev=0",
103453
- "--match",
103454
- `${artifactName}@*`
103455
- ]);
103456
- if (lastTag)
103457
- return lastTag;
103458
- const firstCommit = getFirstCommit();
103459
- if (firstCommit)
103460
- return firstCommit;
103461
- warning(`${artifactName}: no tags found, falling back to HEAD~1`);
103462
- return "HEAD~1";
103463
- }
103464
103473
  function getChangedFiles(baseRef, path8) {
103465
103474
  const baseArgs = ["diff", "--name-only"];
103466
103475
  const pathFilter = path8 ? ["--", path8] : [];
@@ -104397,7 +104406,7 @@ var whoamiCommand = new Command("whoami").description("Show current user").actio
104397
104406
  // package.json
104398
104407
  var package_default = {
104399
104408
  name: "@grekt/cli",
104400
- version: "6.40.3",
104409
+ version: "6.42.0",
104401
104410
  description: "AI tools versioned, synced, and shared across tools and teams",
104402
104411
  type: "module",
104403
104412
  bin: {
@@ -104432,7 +104441,7 @@ var package_default = {
104432
104441
  },
104433
104442
  dependencies: {
104434
104443
  "@aws-sdk/client-s3": "^3.971.0",
104435
- "@grekt-labs/cli-engine": "6.1.0",
104444
+ "@grekt/engine": "6.1.1",
104436
104445
  "@inquirer/prompts": "^7.2.0",
104437
104446
  "@supabase/supabase-js": "^2.91.0",
104438
104447
  chalk: "^5.4.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grekt/cli",
3
- "version": "6.40.3",
3
+ "version": "6.42.0",
4
4
  "description": "AI tools versioned, synced, and shared across tools and teams",
5
5
  "type": "module",
6
6
  "bin": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@aws-sdk/client-s3": "^3.971.0",
38
- "@grekt-labs/cli-engine": "6.1.0",
38
+ "@grekt/engine": "6.1.1",
39
39
  "@inquirer/prompts": "^7.2.0",
40
40
  "@supabase/supabase-js": "^2.91.0",
41
41
  "chalk": "^5.4.1",