tegami 0.1.3 → 0.1.4

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.
@@ -1,5 +1,5 @@
1
- import { a as maxBump, t as bumpDepth } from "./semver-cnZp9koa.js";
2
- import { n as execFailure, r as handlePluginError } from "./error-qpTCB2ld.js";
1
+ import { a as maxBump, t as bumpDepth } from "./semver-C4vJ4SK8.js";
2
+ import { n as execFailure, r as handlePluginError } from "./error-DNy8R5ue.js";
3
3
  import { n as jsonCodec, t as bumpTypeSchema } from "./schemas-CurBAaW5.js";
4
4
  import { mkdir, writeFile } from "node:fs/promises";
5
5
  import { join } from "node:path";
@@ -8,12 +8,6 @@ import * as semver from "semver";
8
8
  import z$1 from "zod";
9
9
  import { dump } from "js-yaml";
10
10
  import { readFile as readFile$1 } from "fs/promises";
11
- //#region src/utils/changelog.ts
12
- function changelogFilename(disambiguator = 0) {
13
- const date = /* @__PURE__ */ new Date();
14
- return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}-${(Date.now() + disambiguator).toString(36)}.md`;
15
- }
16
- //#endregion
17
11
  //#region src/utils/conventional-commit.ts
18
12
  /**
19
13
  * Conventional commit header per conventionalcommits.org and semantic-release defaults.
@@ -185,9 +179,9 @@ function generateReplays(graph, base) {
185
179
  const resolved = graph.getByName(ref);
186
180
  for (const pkg of resolved) {
187
181
  const plan = pkg.initPlan();
188
- pkg.configurePlan(plan);
182
+ pkg.configurePlan(plan, graph.getPackageGroup(pkg.id));
189
183
  const prerelease = semver.prerelease(pkg.version)?.[0];
190
- const targetPrerelease = plan.prerelease ?? graph.getPackageGroup(pkg.id)?.options.prerelease;
184
+ const targetPrerelease = plan.prerelease;
191
185
  if (targetPrerelease && !prerelease || targetPrerelease && prerelease && targetPrerelease === prerelease) packages[pkg.id] = {
192
186
  type,
193
187
  replay: [`exit prerelease: ${pkg.name}`]
@@ -196,6 +190,10 @@ function generateReplays(graph, base) {
196
190
  }
197
191
  return packages;
198
192
  }
193
+ function changelogFilename(disambiguator = 0) {
194
+ const date = /* @__PURE__ */ new Date();
195
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}-${(Date.now() + disambiguator).toString(36)}.md`;
196
+ }
199
197
  //#endregion
200
198
  //#region src/plans/store.ts
201
199
  const packagePlanStoreSchema = z$1.object({
@@ -276,4 +274,4 @@ async function assertPublishPlanFinished(context) {
276
274
  if ((await publishPlanStatus(store, context)).state === "pending") throw new Error(`Publish plan already exists at ${context.planPath} and is pending. Publish it before applying a new plan.`);
277
275
  }
278
276
  //#endregion
279
- export { generateChangelog as a, renderChangelog as c, readPlanStore as i, changelogFilename as l, publishPlanStatus as n, generateReplays as o, createPlanStore as r, changelogFrontmatterSchema as s, assertPublishPlanFinished as t };
277
+ export { changelogFilename as a, changelogFrontmatterSchema as c, readPlanStore as i, renderChangelog as l, publishPlanStatus as n, generateChangelog as o, createPlanStore as r, generateReplays as s, assertPublishPlanFinished as t };
@@ -1,4 +1,4 @@
1
- import { k as DraftPlan, t as Awaitable, v as Tegami, w as PublishResult } from "../types-Di--A9X1.js";
1
+ import { k as DraftPlan, t as Awaitable, v as Tegami, w as PublishResult } from "../types-BXk2fMqa.js";
2
2
  import { Command } from "commander";
3
3
 
4
4
  //#region src/cli/index.d.ts
package/dist/cli/index.js CHANGED
@@ -1,11 +1,10 @@
1
- import { r as formatNpmDistTag } from "../semver-cnZp9koa.js";
2
- import { c as renderChangelog, l as changelogFilename, o as generateReplays, t as assertPublishPlanFinished } from "../checks-Smwtq_Li.js";
3
- import { n as execFailure, r as handlePluginError, t as CancelledError } from "../error-qpTCB2ld.js";
4
- import { t as isCI } from "../constants-B9qjNfvr.js";
1
+ import { r as formatNpmDistTag } from "../semver-C4vJ4SK8.js";
2
+ import { a as changelogFilename, l as renderChangelog, s as generateReplays, t as assertPublishPlanFinished } from "../checks-Cwz-Ezkq.js";
3
+ import { a as isCI, n as execFailure, r as handlePluginError, t as CancelledError } from "../error-DNy8R5ue.js";
5
4
  import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
6
5
  import path, { basename, isAbsolute, join, normalize, relative } from "node:path";
7
6
  import { x } from "tinyexec";
8
- import { detect, resolveCommand } from "package-manager-detector";
7
+ import { resolveCommand } from "package-manager-detector";
9
8
  import { autocompleteMultiselect, confirm, intro, isCancel, multiline, note, outro, select, spinner } from "@clack/prompts";
10
9
  import { Command, InvalidArgumentError } from "commander";
11
10
  import { tmpdir } from "node:os";
@@ -265,20 +264,14 @@ function renderAgentsMd(context) {
265
264
  ].join("\n");
266
265
  }
267
266
  //#endregion
268
- //#region src/utils/package-manager.ts
269
- async function formatRunScriptCommand(cwd, script, agent) {
270
- const resolved = resolveCommand(agent ?? (await detect({ cwd }))?.agent ?? "npm", "run", [script]);
271
- if (!resolved) return `npm run ${script}`;
272
- return [resolved.command, ...resolved.args].join(" ");
273
- }
274
- //#endregion
275
267
  //#region src/cli/pr.ts
276
268
  const TEGAMI_DOCS_URL = "https://tegami.fuma-nama.dev";
277
269
  const CHANGELOG_DOCS_URL = `${TEGAMI_DOCS_URL}/changelog`;
278
270
  const COMMENT_MARKER = "<!-- tegami -->";
279
271
  async function buildPrPreview(context, draft, options = {}) {
280
272
  const pullRequest = await resolvePullRequest(context, options);
281
- const tegamiCommand = await formatRunScriptCommand(context.cwd, "tegami", context.options.npm?.client);
273
+ const tegamiCommandRaw = resolveCommand(context.npm?.client ?? "npm", "run", ["tegami"]);
274
+ const tegamiCommand = [tegamiCommandRaw.command, ...tegamiCommandRaw.args].join(" ");
282
275
  const prChangelogFiles = await listPullRequestChangelogFiles(context, pullRequest.baseSha, pullRequest.headSha);
283
276
  const createLink = createChangelogUrl(context, pullRequest.headRepo, pullRequest.headRef, changelogFilename());
284
277
  const lines = [
@@ -0,0 +1,45 @@
1
+ //#region src/utils/constants.ts
2
+ const isCI = () => Boolean(process.env.CI);
3
+ //#endregion
4
+ //#region src/utils/error.ts
5
+ var CancelledError = class extends Error {
6
+ constructor() {
7
+ super("Cancelled.");
8
+ }
9
+ };
10
+ function execFailure(context, result) {
11
+ const lines = [context, `(exit ${result.exitCode})`];
12
+ const out = result.stdout.trim();
13
+ const err = result.stderr.trim();
14
+ if (out) lines.push(out);
15
+ if (err) lines.push(err);
16
+ return new Error(redactSensitiveTokens(lines.join("\n")));
17
+ }
18
+ function isNodeError(error) {
19
+ return error instanceof Error && "code" in error;
20
+ }
21
+ const SENSITIVE_TOKEN_PATTERNS = [
22
+ /\b(npm_[a-zA-Z0-9]{36,})\b/g,
23
+ /\b(gh[pousrsa]_[A-Za-z0-9_]{36,})\b/g,
24
+ /\b(bearer\s+[a-z0-9\-_]{20,})\b/gi,
25
+ /\b(glpat-[A-Za-z0-9-_]{20,})\b/g
26
+ ];
27
+ /**
28
+ * should not be needed, but we cannot be sure if the used CLI tools will expose secrets by accident.
29
+ */
30
+ function redactSensitiveTokens(text) {
31
+ if (!isCI()) return text;
32
+ let redacted = text;
33
+ for (const pattern of SENSITIVE_TOKEN_PATTERNS) redacted = redacted.replace(pattern, "[REDACTED_TOKEN]");
34
+ return redacted;
35
+ }
36
+ async function handlePluginError(plugin, hookName, callback) {
37
+ try {
38
+ return await callback();
39
+ } catch (error) {
40
+ const details = error instanceof Error ? error.message : String(error);
41
+ throw new Error(`Plugin "${plugin.name}" failed during ${hookName}:\n${redactSensitiveTokens(details)}`, { cause: error });
42
+ }
43
+ }
44
+ //#endregion
45
+ export { isCI as a, isNodeError as i, execFailure as n, handlePluginError as r, CancelledError as t };
@@ -1,4 +1,4 @@
1
- import { r as LogGenerator } from "../types-Di--A9X1.js";
1
+ import { r as LogGenerator } from "../types-BXk2fMqa.js";
2
2
 
3
3
  //#region src/generators/simple.d.ts
4
4
  declare function simpleGenerator(): LogGenerator;
@@ -1,4 +1,4 @@
1
- import { i as formatPackageVersion } from "../semver-cnZp9koa.js";
1
+ import { i as formatPackageVersion } from "../semver-C4vJ4SK8.js";
2
2
  //#region src/generators/simple.ts
3
3
  function simpleGenerator() {
4
4
  return { generate({ changelogs, version, packageName, plan }) {
@@ -1,4 +1,4 @@
1
- import { n as bumpVersion } from "./semver-cnZp9koa.js";
1
+ import { n as bumpVersion } from "./semver-C4vJ4SK8.js";
2
2
  //#region src/graph.ts
3
3
  /** Package discovered in the workspace. */
4
4
  var WorkspacePackage = class {
@@ -20,13 +20,14 @@ var WorkspacePackage = class {
20
20
  } };
21
21
  }
22
22
  /** configure an initial draft plan to match script-level configs. */
23
- configurePlan(plan) {
24
- const { publish, prerelease, npm } = this.opts;
23
+ configurePlan(plan, group) {
24
+ const groupOptions = group?.options;
25
+ const { publish, prerelease = groupOptions?.prerelease, npm: { distTag = groupOptions?.npm?.distTag } = {} } = this.opts;
25
26
  if (publish !== void 0) plan.publish = publish;
26
27
  if (prerelease !== void 0) plan.prerelease = prerelease;
27
- if (npm?.distTag) {
28
+ if (distTag) {
28
29
  plan.npm ??= {};
29
- plan.npm.distTag = npm.distTag;
30
+ plan.npm.distTag = distTag;
30
31
  }
31
32
  }
32
33
  };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as PackagePlan, C as PublishOptions, D as PackageGroup, E as PackageGraph, O as WorkspacePackage, S as PackagePublishResult, a as PublishPreflight, b as CreateChangelogOptions, c as TegamiPlugin, i as PackageOptions, k as DraftPlan, l as TegamiPluginOption, n as GroupOptions, o as RegistryClient, r as LogGenerator, s as TegamiOptions, v as Tegami, w as PublishResult, x as CreatedChangelog, y as tegami } from "./types-Di--A9X1.js";
2
- export { type CreateChangelogOptions, type CreatedChangelog, type DraftPlan, type GroupOptions, type LogGenerator, type PackageGraph, type PackageGroup, type PackageOptions, type PackagePlan, type PackagePublishResult, type PublishOptions, type PublishPreflight, type PublishResult, type RegistryClient, Tegami, type TegamiOptions, type TegamiPlugin, type TegamiPluginOption, type WorkspacePackage, tegami };
1
+ import { A as PackagePlan, C as PublishOptions, D as PackageGroup, E as PackageGraph, O as WorkspacePackage, S as PackagePublishResult, a as PublishPreflight, b as GenerateChangelogOptions, c as TegamiPlugin, i as PackageOptions, k as DraftPlan, l as TegamiPluginOption, n as GroupOptions, o as RegistryClient, r as LogGenerator, s as TegamiOptions, v as Tegami, w as PublishResult, x as GeneratedChangelog, y as tegami } from "./types-BXk2fMqa.js";
2
+ export { type DraftPlan, type GenerateChangelogOptions, type GeneratedChangelog, type GroupOptions, type LogGenerator, type PackageGraph, type PackageGroup, type PackageOptions, type PackagePlan, type PackagePublishResult, type PublishOptions, type PublishPreflight, type PublishResult, type RegistryClient, Tegami, type TegamiOptions, type TegamiPlugin, type TegamiPluginOption, type WorkspacePackage, tegami };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { a as maxBump } from "./semver-cnZp9koa.js";
2
- import { a as generateChangelog, i as readPlanStore, n as publishPlanStatus, r as createPlanStore, s as changelogFrontmatterSchema, t as assertPublishPlanFinished } from "./checks-Smwtq_Li.js";
3
- import { r as handlePluginError } from "./error-qpTCB2ld.js";
4
- import { t as PackageGraph } from "./graph-hBQUWKQA.js";
1
+ import { a as maxBump } from "./semver-C4vJ4SK8.js";
2
+ import { c as changelogFrontmatterSchema, i as readPlanStore, n as publishPlanStatus, o as generateChangelog, r as createPlanStore, t as assertPublishPlanFinished } from "./checks-Cwz-Ezkq.js";
3
+ import { r as handlePluginError } from "./error-DNy8R5ue.js";
4
+ import { t as PackageGraph } from "./graph-DLKPUXSD.js";
5
5
  import { cargo } from "./providers/cargo.js";
6
6
  import { npm } from "./providers/npm.js";
7
7
  import { simpleGenerator } from "./generators/simple.js";
@@ -272,11 +272,7 @@ var DraftPlan = class {
272
272
  const existing = this.packages.get(pkg.id);
273
273
  if (existing) return existing;
274
274
  this.packages.set(pkg.id, pkg.initPlan());
275
- return this.dispatchPackage(pkg, (plan) => {
276
- const group = this.context.graph.getPackageGroup(pkg.id);
277
- if (group?.options.prerelease) plan.prerelease = group.options.prerelease;
278
- pkg.configurePlan(plan);
279
- }, (plan) => {
275
+ return this.dispatchPackage(pkg, (plan) => pkg.configurePlan(plan, this.context.graph.getPackageGroup(pkg.id)), (plan) => {
280
276
  (plan.bumpReasons ??= /* @__PURE__ */ new Set()).add("align with script-level configs");
281
277
  });
282
278
  }
@@ -349,8 +345,7 @@ var DraftPlan = class {
349
345
  const isMatch = (condition) => {
350
346
  if (condition.type === "on-exit-prerelease") return graph.getByName(condition.name).some((pkg) => {
351
347
  const previous = snapshots.get(pkg.id);
352
- if (!previous) return false;
353
- return semver.inc(previous.version, "release") === pkg.version;
348
+ return previous && semver.inc(previous.version, "release") === pkg.version;
354
349
  });
355
350
  return graph.getByName(condition.name).some((pkg) => pkg.version === condition.version);
356
351
  };
@@ -1,4 +1,4 @@
1
- import { c as TegamiPlugin } from "../types-Di--A9X1.js";
1
+ import { c as TegamiPlugin } from "../types-BXk2fMqa.js";
2
2
 
3
3
  //#region src/plugins/git.d.ts
4
4
  interface GitPluginOptions {
@@ -1,5 +1,4 @@
1
- import { n as execFailure } from "../error-qpTCB2ld.js";
2
- import { t as isCI } from "../constants-B9qjNfvr.js";
1
+ import { a as isCI, n as execFailure } from "../error-DNy8R5ue.js";
3
2
  import { x } from "tinyexec";
4
3
  //#region src/plugins/git.ts
5
4
  /**
@@ -1,4 +1,4 @@
1
- import { S as PackagePublishResult, T as TegamiContext, c as TegamiPlugin, k as DraftPlan, t as Awaitable } from "../types-Di--A9X1.js";
1
+ import { S as PackagePublishResult, T as TegamiContext, c as TegamiPlugin, k as DraftPlan, t as Awaitable } from "../types-BXk2fMqa.js";
2
2
  import { GitPluginOptions } from "./git.js";
3
3
 
4
4
  //#region src/plugins/github.d.ts
@@ -1,6 +1,5 @@
1
- import { i as formatPackageVersion, r as formatNpmDistTag } from "../semver-cnZp9koa.js";
2
- import { n as execFailure } from "../error-qpTCB2ld.js";
3
- import { t as isCI } from "../constants-B9qjNfvr.js";
1
+ import { i as formatPackageVersion, r as formatNpmDistTag } from "../semver-C4vJ4SK8.js";
2
+ import { a as isCI, n as execFailure } from "../error-DNy8R5ue.js";
4
3
  import { git } from "./git.js";
5
4
  import { join, relative } from "node:path";
6
5
  import { x } from "tinyexec";
@@ -1,2 +1,2 @@
1
- import { d as CargoPluginOptions, f as CargoRegistryClient, p as cargo, u as CargoPackage } from "../types-Di--A9X1.js";
1
+ import { d as CargoPluginOptions, f as CargoRegistryClient, p as cargo, u as CargoPackage } from "../types-BXk2fMqa.js";
2
2
  export { CargoPackage, CargoPluginOptions, CargoRegistryClient, cargo };
@@ -1,5 +1,5 @@
1
- import { i as isNodeError, n as execFailure } from "../error-qpTCB2ld.js";
2
- import { n as WorkspacePackage } from "../graph-hBQUWKQA.js";
1
+ import { i as isNodeError, n as execFailure } from "../error-DNy8R5ue.js";
2
+ import { n as WorkspacePackage } from "../graph-DLKPUXSD.js";
3
3
  import { readFile, writeFile } from "node:fs/promises";
4
4
  import { join, normalize } from "node:path";
5
5
  import { x } from "tinyexec";
@@ -1,2 +1,2 @@
1
- import { _ as npm, g as NpmRegistryClient, h as NpmPluginOptions, m as NpmPackage } from "../types-Di--A9X1.js";
1
+ import { _ as npm, g as NpmRegistryClient, h as NpmPluginOptions, m as NpmPackage } from "../types-BXk2fMqa.js";
2
2
  export { NpmPackage, NpmPluginOptions, NpmRegistryClient, npm };
@@ -1,6 +1,6 @@
1
- import { i as isNodeError, n as execFailure } from "../error-qpTCB2ld.js";
1
+ import { i as isNodeError, n as execFailure } from "../error-DNy8R5ue.js";
2
2
  import { i as pnpmWorkspaceSchema, r as packageManifestSchema } from "../schemas-CurBAaW5.js";
3
- import { n as WorkspacePackage } from "../graph-hBQUWKQA.js";
3
+ import { n as WorkspacePackage } from "../graph-DLKPUXSD.js";
4
4
  import { readFile, writeFile } from "node:fs/promises";
5
5
  import path from "node:path";
6
6
  import { x } from "tinyexec";
@@ -211,11 +211,9 @@ function npm({ client: defaultClient, onBreakPeerDep = "set", updateLockFile = f
211
211
  name: "npm",
212
212
  enforce: "pre",
213
213
  async init() {
214
- if (defaultClient) {
215
- client = defaultClient;
216
- return;
217
- }
218
- client = (await detect({ cwd: this.cwd }))?.name ?? "npm";
214
+ if (defaultClient) client = defaultClient;
215
+ else client = (await detect({ cwd: this.cwd }))?.name ?? "npm";
216
+ this.npm = { client };
219
217
  },
220
218
  async resolve() {
221
219
  await discoverNpmPackages(this.cwd, (pkg) => this.graph.add(pkg));
@@ -33,7 +33,7 @@ function bumpVersion(version, type, prerelease) {
33
33
  const parsed = parse(version);
34
34
  if (!parsed) next = null;
35
35
  else if (prerelease) {
36
- if (parsed.prerelease[0] === prerelease) next = inc(parsed, "prerelease", prerelease);
36
+ if (parsed.prerelease[0] === prerelease && type) next = inc(parsed, "prerelease", prerelease);
37
37
  else if (type) next = inc(parsed, PRE[type], prerelease);
38
38
  } else if (type) next = inc(parsed, type);
39
39
  else if (parsed.prerelease.length > 0) next = inc(parsed, "release");
@@ -61,7 +61,7 @@ declare class DraftPlan {
61
61
  reason?: string;
62
62
  }): PackagePlan;
63
63
  dispatchPackage(pkg: WorkspacePackage, dispatch: (plan: PackagePlan) => void, onUpdate?: (plan: PackagePlan) => void): PackagePlan;
64
- private getOrInitPackage;
64
+ getOrInitPackage(pkg: WorkspacePackage): PackagePlan;
65
65
  hasPending(): boolean;
66
66
  getChangelogs(): ChangelogEntry[];
67
67
  getChangelog(id: string): ChangelogEntry | undefined;
@@ -107,7 +107,7 @@ declare abstract class WorkspacePackage {
107
107
  /** create the initial draft plan. */
108
108
  initPlan(): PackagePlan;
109
109
  /** configure an initial draft plan to match script-level configs. */
110
- configurePlan(plan: PackagePlan): void;
110
+ configurePlan(plan: PackagePlan, group?: PackageGroup): void;
111
111
  }
112
112
  interface PackageGroup {
113
113
  name: string;
@@ -154,6 +154,10 @@ interface TegamiContext {
154
154
  repo?: string;
155
155
  token?: string;
156
156
  };
157
+ /** additional context when npm plugin is configured */
158
+ npm?: {
159
+ client: AgentName;
160
+ };
157
161
  }
158
162
  //#endregion
159
163
  //#region src/plans/store.d.ts
@@ -230,7 +234,7 @@ type PackagePublishResult = ({
230
234
  };
231
235
  //#endregion
232
236
  //#region src/changelog/generate.d.ts
233
- interface CreateChangelogOptions {
237
+ interface GenerateChangelogOptions {
234
238
  /** Start revision. Defaults to the latest reachable git tag, or all history if none exists. */
235
239
  from?: string;
236
240
  /** End revision. Defaults to HEAD. */
@@ -242,7 +246,7 @@ interface CreateChangelogOptions {
242
246
  */
243
247
  write?: boolean;
244
248
  }
245
- interface CreatedChangelog {
249
+ interface GeneratedChangelog {
246
250
  filename: string;
247
251
  content: string;
248
252
  packages: Record<string, BumpType | ChangelogPackageConfig>;
@@ -260,7 +264,7 @@ interface CommitChange {
260
264
  //#region src/index.d.ts
261
265
  interface Tegami {
262
266
  /** Create pending changelog files from git commit history. */
263
- generateChangelog(options?: CreateChangelogOptions): Promise<CreatedChangelog[]>;
267
+ generateChangelog(options?: GenerateChangelogOptions): Promise<GeneratedChangelog[]>;
264
268
  /** Build a draft from pending changelog files. */
265
269
  draft(): Promise<DraftPlan>;
266
270
  /** Publish the current publish plan. */
@@ -468,6 +472,10 @@ interface GroupOptions {
468
472
  syncBump?: boolean;
469
473
  /** when multiple packages in the group are published, only one git tag will be created (as well as GitHub release) */
470
474
  syncGitTag?: boolean;
475
+ /** npm-specific options. */
476
+ npm?: {
477
+ /** npm dist-tag used when publishing. */distTag?: string;
478
+ };
471
479
  }
472
480
  interface PackageOptions<Group extends string = string> {
473
481
  /** Prerelease identifier appended to bumped versions (e.g. `alpha` → `1.1.0-alpha.0`). */
@@ -541,4 +549,4 @@ interface RegistryClient {
541
549
  }): Promise<void>;
542
550
  }
543
551
  //#endregion
544
- export { PackagePlan as A, PublishOptions as C, PackageGroup as D, PackageGraph as E, WorkspacePackage as O, PackagePublishResult as S, TegamiContext as T, npm as _, PublishPreflight as a, CreateChangelogOptions as b, TegamiPlugin as c, CargoPluginOptions as d, CargoRegistryClient as f, NpmRegistryClient as g, NpmPluginOptions as h, PackageOptions as i, DraftPlan as k, TegamiPluginOption as l, NpmPackage as m, GroupOptions as n, RegistryClient as o, cargo as p, LogGenerator as r, TegamiOptions as s, Awaitable as t, CargoPackage as u, Tegami as v, PublishResult as w, CreatedChangelog as x, tegami as y };
552
+ export { PackagePlan as A, PublishOptions as C, PackageGroup as D, PackageGraph as E, WorkspacePackage as O, PackagePublishResult as S, TegamiContext as T, npm as _, PublishPreflight as a, GenerateChangelogOptions as b, TegamiPlugin as c, CargoPluginOptions as d, CargoRegistryClient as f, NpmRegistryClient as g, NpmPluginOptions as h, PackageOptions as i, DraftPlan as k, TegamiPluginOption as l, NpmPackage as m, GroupOptions as n, RegistryClient as o, cargo as p, LogGenerator as r, TegamiOptions as s, Awaitable as t, CargoPackage as u, Tegami as v, PublishResult as w, GeneratedChangelog as x, tegami as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tegami",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Utility for package versioning & publish",
5
5
  "license": "MIT",
6
6
  "author": "Fuma Nama",
@@ -1,4 +0,0 @@
1
- //#region src/utils/constants.ts
2
- const isCI = () => Boolean(process.env.CI);
3
- //#endregion
4
- export { isCI as t };
@@ -1,27 +0,0 @@
1
- //#region src/utils/error.ts
2
- var CancelledError = class extends Error {
3
- constructor() {
4
- super("Cancelled.");
5
- }
6
- };
7
- function execFailure(context, result) {
8
- const lines = [context, `(exit ${result.exitCode})`];
9
- const out = result.stdout.trim();
10
- const err = result.stderr.trim();
11
- if (out) lines.push(out);
12
- if (err) lines.push(err);
13
- return new Error(lines.join("\n"));
14
- }
15
- function isNodeError(error) {
16
- return error instanceof Error && "code" in error;
17
- }
18
- async function handlePluginError(plugin, hookName, callback) {
19
- try {
20
- return await callback();
21
- } catch (error) {
22
- const details = error instanceof Error ? error.message : String(error);
23
- throw new Error(`Plugin "${plugin.name}" failed during ${hookName}:\n${details}`, { cause: error });
24
- }
25
- }
26
- //#endregion
27
- export { isNodeError as i, execFailure as n, handlePluginError as r, CancelledError as t };