@grekt/cli 6.40.1 → 6.40.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.
Files changed (2) hide show
  1. package/dist/index.js +13 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -103495,16 +103495,20 @@ function mapFilesToArtifacts(changedFiles, artifacts) {
103495
103495
  import { join as join31 } from "path";
103496
103496
  import { randomBytes as randomBytes3 } from "crypto";
103497
103497
  var CHANGESET_DIR = ".changeset";
103498
- function generateChangesetFile(artifacts, workspaceRoot) {
103498
+ function generateChangesetFiles(artifacts, workspaceRoot) {
103499
103499
  const changesetDir = join31(workspaceRoot, CHANGESET_DIR);
103500
103500
  if (!fs.exists(changesetDir)) {
103501
103501
  fs.mkdir(changesetDir, { recursive: true });
103502
103502
  }
103503
- const filename = `${randomBytes3(4).toString("hex")}.md`;
103504
- const filepath = join31(changesetDir, filename);
103505
- const content = buildChangesetContent(artifacts);
103506
- fs.writeFile(filepath, content);
103507
- return filepath;
103503
+ const paths = [];
103504
+ for (const artifact of artifacts) {
103505
+ const filename = `${randomBytes3(4).toString("hex")}.md`;
103506
+ const filepath = join31(changesetDir, filename);
103507
+ const content = buildChangesetContent([artifact]);
103508
+ fs.writeFile(filepath, content);
103509
+ paths.push(filepath);
103510
+ }
103511
+ return paths;
103508
103512
  }
103509
103513
  function buildChangesetContent(artifacts) {
103510
103514
  const frontmatterLines = [];
@@ -103690,9 +103694,9 @@ function outputResult(artifactChangelogs, baseRef, cwd, options2) {
103690
103694
  log(previewChangesetContent(artifactChangelogs));
103691
103695
  return;
103692
103696
  }
103693
- const filepath = generateChangesetFile(artifactChangelogs, cwd);
103697
+ const paths = generateChangesetFiles(artifactChangelogs, cwd);
103694
103698
  newline();
103695
- success(`Changeset written to ${filepath}`);
103699
+ success(`Generated ${paths.length} changeset file(s)`);
103696
103700
  }
103697
103701
  // src/commands/workspace/workspace.ts
103698
103702
  var listSubcommand = new Command("list").description("List all artifacts in the workspace").action(async () => {
@@ -104358,7 +104362,7 @@ var whoamiCommand = new Command("whoami").description("Show current user").actio
104358
104362
  // package.json
104359
104363
  var package_default = {
104360
104364
  name: "@grekt/cli",
104361
- version: "6.40.1",
104365
+ version: "6.40.2",
104362
104366
  description: "AI tools versioned, synced, and shared across tools and teams",
104363
104367
  type: "module",
104364
104368
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grekt/cli",
3
- "version": "6.40.1",
3
+ "version": "6.40.2",
4
4
  "description": "AI tools versioned, synced, and shared across tools and teams",
5
5
  "type": "module",
6
6
  "bin": {