tegami 1.1.0 → 1.1.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/_accessExpressionAsString-QhbUZzwv.js +44 -0
- package/dist/_assertGuard-BBn2NbSz.js +91 -0
- package/dist/_createStandardSchema-BGQyz-uA.js +89 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/{draft-BLbt4bSG.js → draft-DsxZOCOb.js} +168 -37
- package/dist/{generate-Rvz4Lu98.js → generate-Bg86OJP4.js} +1 -1
- package/dist/generators/simple.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/{npm-Cj685Ddn.js → npm-BLkgWr-D.js} +284 -36
- package/dist/plugins/cargo.d.ts +1 -1
- package/dist/plugins/cargo.js +491 -66
- package/dist/plugins/git.d.ts +1 -1
- package/dist/plugins/github.d.ts +1 -1
- package/dist/plugins/github.js +39 -12
- package/dist/plugins/gitlab.d.ts +1 -1
- package/dist/plugins/gitlab.js +2 -2
- package/dist/plugins/go.d.ts +1 -1
- package/dist/plugins/go.js +243 -28
- package/dist/providers/npm.d.ts +1 -1
- package/dist/providers/npm.js +1 -1
- package/dist/shared-C_iSTp_s.js +115 -0
- package/dist/{types-BoQR7Hlg.d.ts → types-VvvN6oyT.d.ts} +222 -366
- package/package.json +7 -3
- package/dist/shared-C92toqVI.js +0 -32
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.0.1_typescript@6.0.3/node_modules/typia/lib/internal/_accessExpressionAsString.mjs
|
|
2
|
+
const _accessExpressionAsString = (str) => variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;
|
|
3
|
+
const variable = (str) => reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str);
|
|
4
|
+
const reserved = (str) => RESERVED.has(str);
|
|
5
|
+
const RESERVED = /* @__PURE__ */ new Set([
|
|
6
|
+
"break",
|
|
7
|
+
"case",
|
|
8
|
+
"catch",
|
|
9
|
+
"class",
|
|
10
|
+
"const",
|
|
11
|
+
"continue",
|
|
12
|
+
"debugger",
|
|
13
|
+
"default",
|
|
14
|
+
"delete",
|
|
15
|
+
"do",
|
|
16
|
+
"else",
|
|
17
|
+
"enum",
|
|
18
|
+
"export",
|
|
19
|
+
"extends",
|
|
20
|
+
"false",
|
|
21
|
+
"finally",
|
|
22
|
+
"for",
|
|
23
|
+
"function",
|
|
24
|
+
"if",
|
|
25
|
+
"import",
|
|
26
|
+
"in",
|
|
27
|
+
"instanceof",
|
|
28
|
+
"new",
|
|
29
|
+
"null",
|
|
30
|
+
"return",
|
|
31
|
+
"super",
|
|
32
|
+
"switch",
|
|
33
|
+
"this",
|
|
34
|
+
"throw",
|
|
35
|
+
"true",
|
|
36
|
+
"try",
|
|
37
|
+
"typeof",
|
|
38
|
+
"var",
|
|
39
|
+
"void",
|
|
40
|
+
"while",
|
|
41
|
+
"with"
|
|
42
|
+
]);
|
|
43
|
+
//#endregion
|
|
44
|
+
export { _accessExpressionAsString as t };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.0.1_typescript@6.0.3/node_modules/typia/lib/TypeGuardError.mjs
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when type assertion fails.
|
|
4
|
+
*
|
|
5
|
+
* Thrown by {@link assert}, {@link assertGuard}, and other assert-family
|
|
6
|
+
* functions when input doesn't match expected type `T`. Contains detailed
|
|
7
|
+
* information about the first assertion failure:
|
|
8
|
+
*
|
|
9
|
+
* - `method`: Which typia function threw (e.g., `"typia.assert"`)
|
|
10
|
+
* - `path`: Property path where error occurred (e.g., `"input.user.age"`)
|
|
11
|
+
* - `expected`: Expected type string (e.g., `"number & ExclusiveMinimum<19>"`)
|
|
12
|
+
* - `value`: Actual value that failed validation
|
|
13
|
+
*
|
|
14
|
+
* @template T Expected type (for type safety)
|
|
15
|
+
*/
|
|
16
|
+
var TypeGuardError = class extends Error {
|
|
17
|
+
/**
|
|
18
|
+
* Name of the typia method that threw this error.
|
|
19
|
+
*
|
|
20
|
+
* E.g., `"typia.assert"`, `"typia.assertEquals"`, `"typia.assertGuard"`.
|
|
21
|
+
*/
|
|
22
|
+
method;
|
|
23
|
+
/**
|
|
24
|
+
* Property path where assertion failed.
|
|
25
|
+
*
|
|
26
|
+
* Uses dot notation for nested properties. `undefined` if error occurred at
|
|
27
|
+
* root level.
|
|
28
|
+
*
|
|
29
|
+
* E.g., `"input.age"`, `"input.profile.email"`, `"input[0].name"`.
|
|
30
|
+
*/
|
|
31
|
+
path;
|
|
32
|
+
/**
|
|
33
|
+
* String representation of expected type.
|
|
34
|
+
*
|
|
35
|
+
* E.g., `"string"`, `"number & ExclusiveMinimum<19>"`, `"{ name: string; age:
|
|
36
|
+
* number }"`.
|
|
37
|
+
*/
|
|
38
|
+
expected;
|
|
39
|
+
/**
|
|
40
|
+
* Actual value that failed assertion.
|
|
41
|
+
*
|
|
42
|
+
* The raw value at the error path, useful for debugging.
|
|
43
|
+
*/
|
|
44
|
+
value;
|
|
45
|
+
/**
|
|
46
|
+
* Optional human-readable error description.
|
|
47
|
+
*
|
|
48
|
+
* Primarily for AI agent libraries or custom validation scenarios needing
|
|
49
|
+
* additional context. Standard assertions rely on `path`, `expected`, and
|
|
50
|
+
* `value` for error reporting.
|
|
51
|
+
*/
|
|
52
|
+
description;
|
|
53
|
+
/**
|
|
54
|
+
* Phantom property for TypeScript type safety.
|
|
55
|
+
*
|
|
56
|
+
* Not used at runtime—exists only to preserve generic type `T` in the type
|
|
57
|
+
* system. Always `undefined`.
|
|
58
|
+
*
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
fake_expected_typed_value_;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a new TypeGuardError instance.
|
|
64
|
+
*
|
|
65
|
+
* @param props Error properties
|
|
66
|
+
*/
|
|
67
|
+
constructor(props) {
|
|
68
|
+
super(props.message || `Error on ${props.method}(): invalid type${props.path ? ` on ${props.path}` : ""}, expect to be ${props.expected}`);
|
|
69
|
+
const proto = new.target.prototype;
|
|
70
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(this, proto);
|
|
71
|
+
else this.__proto__ = proto;
|
|
72
|
+
this.method = props.method;
|
|
73
|
+
this.path = props.path;
|
|
74
|
+
this.expected = props.expected;
|
|
75
|
+
this.value = props.value;
|
|
76
|
+
if (props.description || props.value === void 0) this.description = props.description ?? [
|
|
77
|
+
"The value at this path is `undefined`.",
|
|
78
|
+
"",
|
|
79
|
+
`Please fill the \`${props.expected}\` typed value next time.`
|
|
80
|
+
].join("\n");
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.0.1_typescript@6.0.3/node_modules/typia/lib/internal/_assertGuard.mjs
|
|
85
|
+
const _assertGuard = (exceptionable, props, factory) => {
|
|
86
|
+
if (exceptionable === true) if (factory) throw factory(props);
|
|
87
|
+
else throw new TypeGuardError(props);
|
|
88
|
+
return false;
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
export { _assertGuard as t };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.0.1_typescript@6.0.3/node_modules/typia/lib/internal/_validateReport.mjs
|
|
2
|
+
const _validateReport = (array) => {
|
|
3
|
+
const reportable = (path) => {
|
|
4
|
+
if (array.length === 0) return true;
|
|
5
|
+
const last = array[array.length - 1].path;
|
|
6
|
+
return path.length > last.length || last.substring(0, path.length) !== path;
|
|
7
|
+
};
|
|
8
|
+
return (exceptable, error) => {
|
|
9
|
+
if (exceptable && reportable(error.path)) {
|
|
10
|
+
if (error.value === void 0) error.description ??= [
|
|
11
|
+
"The value at this path is `undefined`.",
|
|
12
|
+
"",
|
|
13
|
+
`Please fill the \`${error.expected}\` typed value next time.`
|
|
14
|
+
].join("\n");
|
|
15
|
+
array.push(error);
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.0.1_typescript@6.0.3/node_modules/typia/lib/internal/_createStandardSchema.mjs
|
|
22
|
+
const _createStandardSchema = (fn) => Object.assign(fn, { "~standard": {
|
|
23
|
+
version: 1,
|
|
24
|
+
vendor: "typia",
|
|
25
|
+
validate: (input) => {
|
|
26
|
+
const result = fn(input);
|
|
27
|
+
if (result.success) return { value: result.data };
|
|
28
|
+
else return { issues: result.errors.map((error) => ({
|
|
29
|
+
message: `expected ${error.expected}, got ${error.value}`,
|
|
30
|
+
path: typiaPathToStandardSchemaPath(error.path)
|
|
31
|
+
})) };
|
|
32
|
+
}
|
|
33
|
+
} });
|
|
34
|
+
var PathParserState;
|
|
35
|
+
(function(PathParserState) {
|
|
36
|
+
PathParserState[PathParserState["Start"] = 0] = "Start";
|
|
37
|
+
PathParserState[PathParserState["Property"] = 1] = "Property";
|
|
38
|
+
PathParserState[PathParserState["StringKey"] = 2] = "StringKey";
|
|
39
|
+
PathParserState[PathParserState["NumberKey"] = 3] = "NumberKey";
|
|
40
|
+
})(PathParserState || (PathParserState = {}));
|
|
41
|
+
const typiaPathToStandardSchemaPath = (path) => {
|
|
42
|
+
if (!path.startsWith("$input")) throw new Error(`Invalid path: ${JSON.stringify(path)}`);
|
|
43
|
+
const segments = [];
|
|
44
|
+
let currentSegment = "";
|
|
45
|
+
let state = PathParserState.Start;
|
|
46
|
+
let index = 5;
|
|
47
|
+
while (index < path.length - 1) {
|
|
48
|
+
index++;
|
|
49
|
+
const char = path[index];
|
|
50
|
+
if (state === PathParserState.Property) if (char === "." || char === "[") {
|
|
51
|
+
segments.push({ key: currentSegment });
|
|
52
|
+
state = PathParserState.Start;
|
|
53
|
+
} else if (index === path.length - 1) {
|
|
54
|
+
currentSegment += char;
|
|
55
|
+
segments.push({ key: currentSegment });
|
|
56
|
+
index++;
|
|
57
|
+
state = PathParserState.Start;
|
|
58
|
+
} else currentSegment += char;
|
|
59
|
+
else if (state === PathParserState.StringKey) if (char === "\"") {
|
|
60
|
+
segments.push({ key: JSON.parse(currentSegment + char) });
|
|
61
|
+
index += 2;
|
|
62
|
+
state = PathParserState.Start;
|
|
63
|
+
} else if (char === "\\") {
|
|
64
|
+
currentSegment += path[index];
|
|
65
|
+
index++;
|
|
66
|
+
currentSegment += path[index];
|
|
67
|
+
} else currentSegment += char;
|
|
68
|
+
else if (state === PathParserState.NumberKey) if (char === "]") {
|
|
69
|
+
segments.push({ key: Number.parseInt(currentSegment) });
|
|
70
|
+
index++;
|
|
71
|
+
state = PathParserState.Start;
|
|
72
|
+
} else currentSegment += char;
|
|
73
|
+
if (state === PathParserState.Start && index < path.length - 1) {
|
|
74
|
+
const newChar = path[index];
|
|
75
|
+
currentSegment = "";
|
|
76
|
+
if (newChar === "[") if (path[index + 1] === "\"") {
|
|
77
|
+
state = PathParserState.StringKey;
|
|
78
|
+
index++;
|
|
79
|
+
currentSegment = "\"";
|
|
80
|
+
} else state = PathParserState.NumberKey;
|
|
81
|
+
else if (newChar === ".") state = PathParserState.Property;
|
|
82
|
+
else throw new Error("Unreachable: pointer points invalid character");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (state !== PathParserState.Start) throw new Error(`Failed to parse path: ${JSON.stringify(path)}`);
|
|
86
|
+
return segments;
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
export { _validateReport as n, _createStandardSchema as t };
|
package/dist/cli/index.d.ts
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as generateFromCommits, t as changelogFilename } from "../generate-
|
|
1
|
+
import { n as generateFromCommits, t as changelogFilename } from "../generate-Bg86OJP4.js";
|
|
2
2
|
import { o as isCI, r as handlePluginError, t as CancelledError } from "../error-BhMYq9iW.js";
|
|
3
|
-
import {
|
|
3
|
+
import { t as renderChangelog } from "../shared-C_iSTp_s.js";
|
|
4
4
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
5
|
import path, { join, relative } from "node:path";
|
|
6
6
|
import { x } from "tinyexec";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { a as maxBump } from "./semver-EKJ8yK5U.js";
|
|
2
2
|
import { r as handlePluginError } from "./error-BhMYq9iW.js";
|
|
3
|
-
import {
|
|
3
|
+
import { t as _accessExpressionAsString } from "./_accessExpressionAsString-QhbUZzwv.js";
|
|
4
|
+
import { n as _validateReport, t as _createStandardSchema } from "./_createStandardSchema-BGQyz-uA.js";
|
|
5
|
+
import { n as validateChangelogFrontmatter, t as renderChangelog } from "./shared-C_iSTp_s.js";
|
|
6
|
+
import { t as _assertGuard } from "./_assertGuard-BBn2NbSz.js";
|
|
4
7
|
import { simpleGenerator } from "./generators/simple.js";
|
|
5
8
|
import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
|
|
6
9
|
import path, { basename, dirname, join } from "node:path";
|
|
7
10
|
import * as semver$1 from "semver";
|
|
8
|
-
import
|
|
9
|
-
import { dump, load, visit } from "js-yaml";
|
|
11
|
+
import { parse as parse$1, stringify } from "yaml";
|
|
10
12
|
//#region src/utils/frontmatter.ts
|
|
11
13
|
/**
|
|
12
14
|
* Inspired by https://github.com/jonschlinkert/gray-matter
|
|
@@ -25,7 +27,7 @@ function frontmatter(input) {
|
|
|
25
27
|
if (!match) return output;
|
|
26
28
|
output.matter = match[0];
|
|
27
29
|
output.content = input.slice(match[0].length);
|
|
28
|
-
output.data =
|
|
30
|
+
output.data = parse$1(match[1]) ?? {};
|
|
29
31
|
return output;
|
|
30
32
|
}
|
|
31
33
|
//#endregion
|
|
@@ -45,8 +47,11 @@ async function readChangelogEntries(context) {
|
|
|
45
47
|
/** Parse one changelog markdown file into release entries. */
|
|
46
48
|
function parseChangelogFile(filename, content) {
|
|
47
49
|
const parsed = frontmatter(content);
|
|
48
|
-
const
|
|
49
|
-
if (!success
|
|
50
|
+
const validated = validateChangelogFrontmatter(parsed.data);
|
|
51
|
+
if (!validated.success) return;
|
|
52
|
+
const { packages: packagesConfig } = validated.data;
|
|
53
|
+
if (!packagesConfig) return;
|
|
54
|
+
const data = validated.data;
|
|
50
55
|
let headingBump;
|
|
51
56
|
const packages = /* @__PURE__ */ new Map();
|
|
52
57
|
const sections = [];
|
|
@@ -60,10 +65,10 @@ function parseChangelogFile(filename, content) {
|
|
|
60
65
|
});
|
|
61
66
|
}
|
|
62
67
|
if (sections.length === 0) return;
|
|
63
|
-
if (Array.isArray(
|
|
68
|
+
if (Array.isArray(packagesConfig)) {
|
|
64
69
|
if (!headingBump) return;
|
|
65
|
-
for (const pkg of
|
|
66
|
-
} else for (const [k, v] of Object.entries(
|
|
70
|
+
for (const pkg of packagesConfig) packages.set(pkg, { type: headingBump });
|
|
71
|
+
} else for (const [k, v] of Object.entries(packagesConfig)) {
|
|
67
72
|
let config;
|
|
68
73
|
if (typeof v === "string") config = { type: v };
|
|
69
74
|
else if (v === null) config = { type: headingBump };
|
|
@@ -170,20 +175,6 @@ function headingToBump(depth) {
|
|
|
170
175
|
}
|
|
171
176
|
//#endregion
|
|
172
177
|
//#region src/plans/lock.ts
|
|
173
|
-
function inlineMultilineScalars(documents) {
|
|
174
|
-
visit(documents, (node) => {
|
|
175
|
-
if (node.kind !== "scalar" || !node.value.includes("\n")) return;
|
|
176
|
-
node.style.doubleQuoted = true;
|
|
177
|
-
node.style.literal = false;
|
|
178
|
-
node.style.folded = false;
|
|
179
|
-
node.style.singleQuoted = false;
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
const lockDumpOptions = {
|
|
183
|
-
sortKeys: true,
|
|
184
|
-
lineWidth: -1,
|
|
185
|
-
transform: inlineMultilineScalars
|
|
186
|
-
};
|
|
187
178
|
/**
|
|
188
179
|
* the data structure of `publish-lock.yaml` file.
|
|
189
180
|
*/
|
|
@@ -208,14 +199,54 @@ var PublishLock = class {
|
|
|
208
199
|
return this.data.get(namespace)?.length ?? 0;
|
|
209
200
|
}
|
|
210
201
|
serialize() {
|
|
211
|
-
let res =
|
|
202
|
+
let res = stringify(this.data, {
|
|
203
|
+
sortMapEntries: true,
|
|
204
|
+
lineWidth: 0,
|
|
205
|
+
blockQuote: false,
|
|
206
|
+
doubleQuotedAsJSON: true
|
|
207
|
+
});
|
|
212
208
|
if (!res.endsWith("\n")) res += "\n";
|
|
213
209
|
return res;
|
|
214
210
|
}
|
|
215
211
|
};
|
|
216
|
-
const
|
|
212
|
+
const assertPublishLockData = (() => {
|
|
213
|
+
const _io0 = (input) => Object.keys(input).every((key) => {
|
|
214
|
+
const value = input[key];
|
|
215
|
+
if (void 0 === value) return true;
|
|
216
|
+
return Array.isArray(value);
|
|
217
|
+
});
|
|
218
|
+
const _ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every((key) => {
|
|
219
|
+
const value = input[key];
|
|
220
|
+
if (void 0 === value) return true;
|
|
221
|
+
return Array.isArray(value) || _assertGuard(_exceptionable, {
|
|
222
|
+
method: "typia.createAssert",
|
|
223
|
+
path: _path + _accessExpressionAsString(key),
|
|
224
|
+
expected: "Array<unknown>",
|
|
225
|
+
value
|
|
226
|
+
}, _errorFactory);
|
|
227
|
+
});
|
|
228
|
+
const __is = (input) => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input);
|
|
229
|
+
let _errorFactory;
|
|
230
|
+
return (input, errorFactory) => {
|
|
231
|
+
if (false === __is(input)) {
|
|
232
|
+
_errorFactory = errorFactory;
|
|
233
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || _assertGuard(true, {
|
|
234
|
+
method: "typia.createAssert",
|
|
235
|
+
path: _path + "",
|
|
236
|
+
expected: "Record<string, Array<unknown>>",
|
|
237
|
+
value: input
|
|
238
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard(true, {
|
|
239
|
+
method: "typia.createAssert",
|
|
240
|
+
path: _path + "",
|
|
241
|
+
expected: "Record<string, Array<unknown>>",
|
|
242
|
+
value: input
|
|
243
|
+
}, _errorFactory))(input, "$input", true);
|
|
244
|
+
}
|
|
245
|
+
return input;
|
|
246
|
+
};
|
|
247
|
+
})();
|
|
217
248
|
function parsePublishLock(content) {
|
|
218
|
-
const data =
|
|
249
|
+
const data = assertPublishLockData(parse$1(content));
|
|
219
250
|
return new PublishLock(new Map(Object.entries(data)));
|
|
220
251
|
}
|
|
221
252
|
//#endregion
|
|
@@ -239,16 +270,116 @@ function groupPolicy(_ctx) {
|
|
|
239
270
|
}
|
|
240
271
|
//#endregion
|
|
241
272
|
//#region src/plans/draft.ts
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
273
|
+
const validateChangelogStore = (() => {
|
|
274
|
+
const _io0 = (input) => "0.0.0" === input.v && "string" === typeof input.filename && "string" === typeof input.content;
|
|
275
|
+
const _vo0 = (input, _path, _exceptionable = true) => [
|
|
276
|
+
"0.0.0" === input.v || _report(_exceptionable, {
|
|
277
|
+
path: _path + ".v",
|
|
278
|
+
expected: "\"0.0.0\"",
|
|
279
|
+
value: input.v
|
|
280
|
+
}),
|
|
281
|
+
"string" === typeof input.filename || _report(_exceptionable, {
|
|
282
|
+
path: _path + ".filename",
|
|
283
|
+
expected: "string",
|
|
284
|
+
value: input.filename
|
|
285
|
+
}),
|
|
286
|
+
"string" === typeof input.content || _report(_exceptionable, {
|
|
287
|
+
path: _path + ".content",
|
|
288
|
+
expected: "string",
|
|
289
|
+
value: input.content
|
|
290
|
+
})
|
|
291
|
+
].every((flag) => flag);
|
|
292
|
+
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
293
|
+
let errors;
|
|
294
|
+
let _report;
|
|
295
|
+
return _createStandardSchema((input) => {
|
|
296
|
+
if (false === __is(input)) {
|
|
297
|
+
errors = [];
|
|
298
|
+
_report = _validateReport(errors);
|
|
299
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
300
|
+
path: _path + "",
|
|
301
|
+
expected: "ChangelogStore",
|
|
302
|
+
value: input
|
|
303
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
304
|
+
path: _path + "",
|
|
305
|
+
expected: "ChangelogStore",
|
|
306
|
+
value: input
|
|
307
|
+
}))(input, "$input", true);
|
|
308
|
+
const success = 0 === errors.length;
|
|
309
|
+
return success ? {
|
|
310
|
+
success,
|
|
311
|
+
data: input
|
|
312
|
+
} : {
|
|
313
|
+
success,
|
|
314
|
+
errors,
|
|
315
|
+
data: input
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
success: true,
|
|
320
|
+
data: input
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
})();
|
|
324
|
+
const validatePackageStore = (() => {
|
|
325
|
+
const _io0 = (input) => "string" === typeof input.id && "boolean" === typeof input.updated && (void 0 === input.changelogIds || Array.isArray(input.changelogIds) && input.changelogIds.every((elem) => "string" === typeof elem));
|
|
326
|
+
const _vo0 = (input, _path, _exceptionable = true) => [
|
|
327
|
+
"string" === typeof input.id || _report(_exceptionable, {
|
|
328
|
+
path: _path + ".id",
|
|
329
|
+
expected: "string",
|
|
330
|
+
value: input.id
|
|
331
|
+
}),
|
|
332
|
+
"boolean" === typeof input.updated || _report(_exceptionable, {
|
|
333
|
+
path: _path + ".updated",
|
|
334
|
+
expected: "boolean",
|
|
335
|
+
value: input.updated
|
|
336
|
+
}),
|
|
337
|
+
void 0 === input.changelogIds || (Array.isArray(input.changelogIds) || _report(_exceptionable, {
|
|
338
|
+
path: _path + ".changelogIds",
|
|
339
|
+
expected: "(Array<string> | undefined)",
|
|
340
|
+
value: input.changelogIds
|
|
341
|
+
})) && input.changelogIds.map((elem, _index2) => "string" === typeof elem || _report(_exceptionable, {
|
|
342
|
+
path: _path + ".changelogIds[" + _index2 + "]",
|
|
343
|
+
expected: "string",
|
|
344
|
+
value: elem
|
|
345
|
+
})).every((flag) => flag) || _report(_exceptionable, {
|
|
346
|
+
path: _path + ".changelogIds",
|
|
347
|
+
expected: "(Array<string> | undefined)",
|
|
348
|
+
value: input.changelogIds
|
|
349
|
+
})
|
|
350
|
+
].every((flag) => flag);
|
|
351
|
+
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
352
|
+
let errors;
|
|
353
|
+
let _report;
|
|
354
|
+
return _createStandardSchema((input) => {
|
|
355
|
+
if (false === __is(input)) {
|
|
356
|
+
errors = [];
|
|
357
|
+
_report = _validateReport(errors);
|
|
358
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
359
|
+
path: _path + "",
|
|
360
|
+
expected: "PackageStore",
|
|
361
|
+
value: input
|
|
362
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
363
|
+
path: _path + "",
|
|
364
|
+
expected: "PackageStore",
|
|
365
|
+
value: input
|
|
366
|
+
}))(input, "$input", true);
|
|
367
|
+
const success = 0 === errors.length;
|
|
368
|
+
return success ? {
|
|
369
|
+
success,
|
|
370
|
+
data: input
|
|
371
|
+
} : {
|
|
372
|
+
success,
|
|
373
|
+
errors,
|
|
374
|
+
data: input
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
return {
|
|
378
|
+
success: true,
|
|
379
|
+
data: input
|
|
380
|
+
};
|
|
381
|
+
});
|
|
382
|
+
})();
|
|
252
383
|
/** a draft describes all operations to perform before the actual publishing, such as version bumps. */
|
|
253
384
|
var Draft = class {
|
|
254
385
|
context;
|
|
@@ -487,4 +618,4 @@ function attachChangelog(draft, entry) {
|
|
|
487
618
|
draft.changelogs.push(entry);
|
|
488
619
|
}
|
|
489
620
|
//#endregion
|
|
490
|
-
export { parseChangelogFile as a, parsePublishLock as i,
|
|
621
|
+
export { parseChangelogFile as a, parsePublishLock as i, validateChangelogStore as n, readChangelogEntries as o, validatePackageStore as r, createDraft as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as maxBump, t as bumpDepth } from "./semver-EKJ8yK5U.js";
|
|
2
2
|
import { n as execFailure } from "./error-BhMYq9iW.js";
|
|
3
|
-
import {
|
|
3
|
+
import { t as renderChangelog } from "./shared-C_iSTp_s.js";
|
|
4
4
|
import { x } from "tinyexec";
|
|
5
5
|
//#region src/utils/conventional-commit.ts
|
|
6
6
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as DraftPolicy, D as PackageGroup, E as PackageGraph, M as BumpType, O as WorkspacePackage, _ as PackagePublishResult, a as PublishPreflight, b as CommitChangelog, c as TegamiPluginOption, f as GenerateChangelogOptions, g as PackagePublishPlan, h as PublishLock, i as PackageOptions, j as PackageDraft, k as Draft, m as tegami, n as GroupOptions, o as TegamiOptions, p as Tegami, r as LogGenerator, s as TegamiPlugin, v as PublishOptions, x as TegamiContext, y as PublishPlan } from "./types-
|
|
1
|
+
import { A as DraftPolicy, D as PackageGroup, E as PackageGraph, M as BumpType, O as WorkspacePackage, _ as PackagePublishResult, a as PublishPreflight, b as CommitChangelog, c as TegamiPluginOption, f as GenerateChangelogOptions, g as PackagePublishPlan, h as PublishLock, i as PackageOptions, j as PackageDraft, k as Draft, m as tegami, n as GroupOptions, o as TegamiOptions, p as Tegami, r as LogGenerator, s as TegamiPlugin, v as PublishOptions, x as TegamiContext, y as PublishPlan } from "./types-VvvN6oyT.js";
|
|
2
2
|
export { type BumpType, type CommitChangelog, type Draft, type DraftPolicy, GenerateChangelogOptions, type GroupOptions, type LogGenerator, type PackageDraft, PackageGraph, type PackageGroup, type PackageOptions, type PackagePublishPlan, type PackagePublishResult, type PublishLock, type PublishOptions, type PublishPlan, type PublishPreflight, Tegami, type TegamiContext, type TegamiOptions, type TegamiPlugin, type TegamiPluginOption, WorkspacePackage, tegami };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as generateFromCommits } from "./generate-
|
|
1
|
+
import { n as generateFromCommits } from "./generate-Bg86OJP4.js";
|
|
2
2
|
import { r as handlePluginError } from "./error-BhMYq9iW.js";
|
|
3
|
-
import { a as runPreflights, i as publishPlanStatus, n as npm, o as runPublishPlan, r as initPublishPlan } from "./npm-
|
|
3
|
+
import { a as runPreflights, i as publishPlanStatus, n as npm, o as runPublishPlan, r as initPublishPlan } from "./npm-BLkgWr-D.js";
|
|
4
4
|
import { n as WorkspacePackage, t as PackageGraph } from "./graph-BmXTJZxx.js";
|
|
5
|
-
import { a as parseChangelogFile,
|
|
5
|
+
import { a as parseChangelogFile, o as readChangelogEntries, t as createDraft } from "./draft-DsxZOCOb.js";
|
|
6
6
|
import { mkdir, rm, writeFile } from "node:fs/promises";
|
|
7
7
|
import path, { join } from "node:path";
|
|
8
8
|
//#region src/context.ts
|