tegami 1.0.2 → 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-BqHcSCeX.js → draft-DsxZOCOb.js} +212 -55
- package/dist/{generate-Rvz4Lu98.js → generate-Bg86OJP4.js} +1 -1
- package/dist/generators/simple.d.ts +1 -1
- package/dist/{graph-gThXu8Cz.js → graph-BmXTJZxx.js} +18 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/{npm-5cG02krT.js → npm-BLkgWr-D.js} +289 -42
- package/dist/plugins/cargo.d.ts +1 -1
- package/dist/plugins/cargo.js +583 -159
- package/dist/plugins/git.d.ts +1 -1
- package/dist/plugins/git.js +1 -2
- 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 +246 -32
- 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-DHddSAez.d.ts → types-VvvN6oyT.d.ts} +258 -377
- package/dist/utils/index.d.ts +5 -1
- package/dist/utils/index.js +2 -2
- package/package.json +7 -3
- package/dist/shared-C92toqVI.js +0 -32
|
@@ -1,19 +1,159 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
1
|
import { AgentName } from "package-manager-detector";
|
|
3
2
|
|
|
4
3
|
//#region src/utils/semver.d.ts
|
|
5
4
|
type BumpType = "major" | "minor" | "patch";
|
|
6
5
|
//#endregion
|
|
6
|
+
//#region ../../node_modules/.pnpm/@typia+interface@12.1.1/node_modules/@typia/interface/lib/tags/TagBase.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Base type for all typia validation tags.
|
|
9
|
+
*
|
|
10
|
+
* `TagBase` is the foundation for all typia type tags (constraints like
|
|
11
|
+
* `Minimum`, `MaxLength`, `Format`, etc.). It attaches compile-time metadata to
|
|
12
|
+
* TypeScript types using a phantom property pattern.
|
|
13
|
+
*
|
|
14
|
+
* The typia transformer reads these tags at compile time and generates
|
|
15
|
+
* appropriate runtime validation code. The tags themselves have no runtime
|
|
16
|
+
* presence - they exist only in the type system.
|
|
17
|
+
*
|
|
18
|
+
* This is an internal implementation detail. Use the specific tag types (e.g.,
|
|
19
|
+
* {@link Minimum}, {@link Format}, {@link Pattern}) rather than `TagBase`
|
|
20
|
+
* directly.
|
|
21
|
+
*
|
|
22
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
23
|
+
* @template Props Tag properties defining validation behavior and schema output
|
|
24
|
+
*/
|
|
25
|
+
type TagBase<Props extends TagBase.IProps<any, any, any, any, any, any>> = {
|
|
26
|
+
/**
|
|
27
|
+
* Compile-time marker property for typia transformer.
|
|
28
|
+
*
|
|
29
|
+
* This phantom property carries tag metadata in the type system. It is never
|
|
30
|
+
* assigned at runtime - it exists only for the transformer to read during
|
|
31
|
+
* compilation.
|
|
32
|
+
*/
|
|
33
|
+
"typia.tag"?: Props;
|
|
34
|
+
};
|
|
35
|
+
declare namespace TagBase {
|
|
36
|
+
/**
|
|
37
|
+
* Configuration interface for validation tag properties.
|
|
38
|
+
*
|
|
39
|
+
* Defines all the metadata a validation tag can specify, including what types
|
|
40
|
+
* it applies to, how to validate values, and what to output in JSON Schema.
|
|
41
|
+
*
|
|
42
|
+
* @template Target Which primitive type(s) this tag can be applied to
|
|
43
|
+
* @template Kind Unique identifier for this tag type
|
|
44
|
+
* @template Value The constraint value specified by the user
|
|
45
|
+
* @template Validate The validation expression to generate
|
|
46
|
+
* @template Exclusive Whether this tag conflicts with others
|
|
47
|
+
* @template Schema Additional JSON Schema properties to output
|
|
48
|
+
*/
|
|
49
|
+
interface IProps<Target extends "boolean" | "bigint" | "number" | "string" | "array" | "object", Kind extends string, Value extends boolean | bigint | number | string | undefined, Validate extends string | { [key in Target]?: string }, Exclusive extends boolean | string[], Schema extends object | undefined> {
|
|
50
|
+
/**
|
|
51
|
+
* Target primitive type(s) this tag applies to.
|
|
52
|
+
*
|
|
53
|
+
* The transformer will error if the tag is applied to a property of a
|
|
54
|
+
* different type. For example, `MinLength` targets `"string"` and cannot be
|
|
55
|
+
* applied to numbers.
|
|
56
|
+
*/
|
|
57
|
+
target: Target;
|
|
58
|
+
/**
|
|
59
|
+
* Unique identifier for this tag type.
|
|
60
|
+
*
|
|
61
|
+
* Used internally to identify the constraint kind. Examples: `"minimum"`,
|
|
62
|
+
* `"maxLength"`, `"format"`, `"pattern"`.
|
|
63
|
+
*/
|
|
64
|
+
kind: Kind;
|
|
65
|
+
/**
|
|
66
|
+
* User-configured constraint value.
|
|
67
|
+
*
|
|
68
|
+
* The value provided by the user when applying the tag. For `Minimum<5>`,
|
|
69
|
+
* this would be `5`. For `Format<"email">`, this would be `"email"`.
|
|
70
|
+
*/
|
|
71
|
+
value: Value;
|
|
72
|
+
/**
|
|
73
|
+
* Validation expression template.
|
|
74
|
+
*
|
|
75
|
+
* JavaScript expression string that validates the input value. Use `$input`
|
|
76
|
+
* as a placeholder for the actual value. The expression is inserted into
|
|
77
|
+
* the generated validation function.
|
|
78
|
+
*
|
|
79
|
+
* Can be a single string or an object mapping target types to different
|
|
80
|
+
* expressions (for tags supporting multiple types).
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* `"5 <= $input"`; // For Minimum<5>
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* `"$input.length <= 10"`; // For MaxLength<10>
|
|
87
|
+
*/
|
|
88
|
+
validate?: Validate;
|
|
89
|
+
/**
|
|
90
|
+
* Tag exclusivity configuration.
|
|
91
|
+
*
|
|
92
|
+
* Controls which other tags cannot be combined with this one:
|
|
93
|
+
*
|
|
94
|
+
* - `true`: No duplicate tags of the same kind allowed
|
|
95
|
+
* - `string[]`: List of incompatible tag kinds
|
|
96
|
+
* - `false` (default): No exclusivity restrictions
|
|
97
|
+
*
|
|
98
|
+
* For example, `Minimum` and `ExclusiveMinimum` are mutually exclusive -
|
|
99
|
+
* only one can be applied to a property.
|
|
100
|
+
*
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
exclusive?: Exclusive | string[];
|
|
104
|
+
/**
|
|
105
|
+
* Additional JSON Schema properties to output.
|
|
106
|
+
*
|
|
107
|
+
* Object containing schema properties to merge into the generated JSON
|
|
108
|
+
* Schema for the annotated type. For `Minimum<5>`, this would be `{
|
|
109
|
+
* minimum: 5 }`.
|
|
110
|
+
*/
|
|
111
|
+
schema?: Schema;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region ../../node_modules/.pnpm/@typia+interface@12.1.1/node_modules/@typia/interface/lib/tags/MinLength.d.ts
|
|
116
|
+
/**
|
|
117
|
+
* String minimum length constraint.
|
|
118
|
+
*
|
|
119
|
+
* `MinLength<N>` is a type tag that validates string values have at least the
|
|
120
|
+
* specified number of characters. Apply it to `string` properties using
|
|
121
|
+
* TypeScript intersection types.
|
|
122
|
+
*
|
|
123
|
+
* This constraint is commonly combined with {@link MaxLength} to define a valid
|
|
124
|
+
* length range. Multiple length constraints can be applied to the same property
|
|
125
|
+
* (all must pass).
|
|
126
|
+
*
|
|
127
|
+
* The constraint is enforced at runtime by `typia.is()`, `typia.assert()`, and
|
|
128
|
+
* `typia.validate()`. It generates `minLength` in JSON Schema output.
|
|
129
|
+
*
|
|
130
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
131
|
+
* @example
|
|
132
|
+
* interface User {
|
|
133
|
+
* // Username must be at least 3 characters
|
|
134
|
+
* username: string & MinLength<3> & MaxLength<20>;
|
|
135
|
+
* // Password must be at least 8 characters
|
|
136
|
+
* password: string & MinLength<8>;
|
|
137
|
+
* }
|
|
138
|
+
*
|
|
139
|
+
* @template Value Minimum number of characters required
|
|
140
|
+
*/
|
|
141
|
+
type MinLength<Value extends number> = TagBase<{
|
|
142
|
+
target: "string";
|
|
143
|
+
kind: "minLength";
|
|
144
|
+
value: Value;
|
|
145
|
+
validate: `${Value} <= $input.length`;
|
|
146
|
+
exclusive: true;
|
|
147
|
+
schema: {
|
|
148
|
+
minLength: Value;
|
|
149
|
+
};
|
|
150
|
+
}>;
|
|
151
|
+
//#endregion
|
|
7
152
|
//#region src/changelog/shared.d.ts
|
|
8
|
-
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
patch: "patch";
|
|
13
|
-
}>>;
|
|
14
|
-
replay: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
-
}, z.core.$strip>;
|
|
16
|
-
type ChangelogPackageConfig = z.output<typeof changelogPackageConfigSchema>;
|
|
153
|
+
interface ChangelogPackageConfig {
|
|
154
|
+
type?: BumpType;
|
|
155
|
+
replay?: (string & MinLength<1>)[];
|
|
156
|
+
}
|
|
17
157
|
//#endregion
|
|
18
158
|
//#region src/changelog/parse.d.ts
|
|
19
159
|
interface ChangelogEntry {
|
|
@@ -101,22 +241,31 @@ declare abstract class WorkspacePackage {
|
|
|
101
241
|
abstract readonly path: string;
|
|
102
242
|
abstract readonly manager: string;
|
|
103
243
|
abstract readonly version: string | undefined;
|
|
104
|
-
get id(): string;
|
|
105
|
-
private opts;
|
|
106
244
|
/** note: this will only be available after package graph is resolved */
|
|
107
|
-
|
|
108
|
-
|
|
245
|
+
group?: PackageGroup;
|
|
246
|
+
/** note: this will only be available after package graph is resolved */
|
|
247
|
+
options: PackageOptions;
|
|
248
|
+
get id(): string;
|
|
109
249
|
/** create the initial draft. */
|
|
110
250
|
initDraft(): PackageDraft;
|
|
111
251
|
/** configure an initial draft to match script-level configs. */
|
|
112
|
-
configureDraft(
|
|
252
|
+
configureDraft({
|
|
253
|
+
draft
|
|
254
|
+
}: {
|
|
255
|
+
draft: PackageDraft;
|
|
256
|
+
}): void;
|
|
113
257
|
}
|
|
114
258
|
interface PackageGroup {
|
|
115
259
|
name: string;
|
|
116
260
|
options: GroupOptions;
|
|
117
261
|
packages: WorkspacePackage[];
|
|
118
262
|
}
|
|
119
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* Unified graph for discovered workspace packages.
|
|
265
|
+
*
|
|
266
|
+
* This is only used as a storage for all indexed packages.
|
|
267
|
+
* For registry-specific relationships (e.g. virtual workspaces), they are stored in the provider plugin internally.
|
|
268
|
+
*/
|
|
120
269
|
declare class PackageGraph {
|
|
121
270
|
private readonly packages;
|
|
122
271
|
private readonly groups;
|
|
@@ -145,367 +294,99 @@ interface GitLabToken {
|
|
|
145
294
|
}
|
|
146
295
|
//#endregion
|
|
147
296
|
//#region src/plugins/cargo/schema.d.ts
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
version
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
workspace: z.ZodLiteral<true>;
|
|
205
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
206
|
-
package: z.ZodOptional<z.ZodString>;
|
|
207
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
208
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
210
|
-
path: z.ZodString;
|
|
211
|
-
version: z.ZodOptional<z.ZodString>;
|
|
212
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
213
|
-
package: z.ZodOptional<z.ZodString>;
|
|
214
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
216
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
217
|
-
git: z.ZodString;
|
|
218
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
219
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
220
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
221
|
-
version: z.ZodOptional<z.ZodString>;
|
|
222
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
223
|
-
package: z.ZodOptional<z.ZodString>;
|
|
224
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
225
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
227
|
-
version: z.ZodString;
|
|
228
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
229
|
-
}, z.core.$strip>]>>>;
|
|
230
|
-
"dev-dependencies": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
231
|
-
package: z.ZodOptional<z.ZodString>;
|
|
232
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
233
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
234
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
235
|
-
workspace: z.ZodLiteral<true>;
|
|
236
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
237
|
-
package: z.ZodOptional<z.ZodString>;
|
|
238
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
239
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
241
|
-
path: z.ZodString;
|
|
242
|
-
version: z.ZodOptional<z.ZodString>;
|
|
243
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
-
package: z.ZodOptional<z.ZodString>;
|
|
245
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
246
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
247
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
248
|
-
git: z.ZodString;
|
|
249
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
250
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
251
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
252
|
-
version: z.ZodOptional<z.ZodString>;
|
|
253
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
-
package: z.ZodOptional<z.ZodString>;
|
|
255
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
258
|
-
version: z.ZodString;
|
|
259
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
260
|
-
}, z.core.$strip>]>>>;
|
|
261
|
-
"build-dependencies": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
262
|
-
package: z.ZodOptional<z.ZodString>;
|
|
263
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
265
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
266
|
-
workspace: z.ZodLiteral<true>;
|
|
267
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
268
|
-
package: z.ZodOptional<z.ZodString>;
|
|
269
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
270
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
271
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
272
|
-
path: z.ZodString;
|
|
273
|
-
version: z.ZodOptional<z.ZodString>;
|
|
274
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
-
package: z.ZodOptional<z.ZodString>;
|
|
276
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
277
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
278
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
279
|
-
git: z.ZodString;
|
|
280
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
281
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
282
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
283
|
-
version: z.ZodOptional<z.ZodString>;
|
|
284
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
285
|
-
package: z.ZodOptional<z.ZodString>;
|
|
286
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
287
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
288
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
289
|
-
version: z.ZodString;
|
|
290
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
291
|
-
}, z.core.$strip>]>>>;
|
|
292
|
-
}, z.core.$loose>>;
|
|
293
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
294
|
-
package: z.ZodOptional<z.ZodString>;
|
|
295
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
296
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
297
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
298
|
-
workspace: z.ZodLiteral<true>;
|
|
299
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
300
|
-
package: z.ZodOptional<z.ZodString>;
|
|
301
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
302
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
303
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
304
|
-
path: z.ZodString;
|
|
305
|
-
version: z.ZodOptional<z.ZodString>;
|
|
306
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
307
|
-
package: z.ZodOptional<z.ZodString>;
|
|
308
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
309
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
311
|
-
git: z.ZodString;
|
|
312
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
313
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
314
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
315
|
-
version: z.ZodOptional<z.ZodString>;
|
|
316
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
317
|
-
package: z.ZodOptional<z.ZodString>;
|
|
318
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
319
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
320
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
321
|
-
version: z.ZodString;
|
|
322
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
323
|
-
}, z.core.$strip>]>>>;
|
|
324
|
-
"dev-dependencies": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
325
|
-
package: z.ZodOptional<z.ZodString>;
|
|
326
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
327
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
328
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
329
|
-
workspace: z.ZodLiteral<true>;
|
|
330
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
331
|
-
package: z.ZodOptional<z.ZodString>;
|
|
332
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
333
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
334
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
335
|
-
path: z.ZodString;
|
|
336
|
-
version: z.ZodOptional<z.ZodString>;
|
|
337
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
338
|
-
package: z.ZodOptional<z.ZodString>;
|
|
339
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
340
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
341
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
342
|
-
git: z.ZodString;
|
|
343
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
344
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
345
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
346
|
-
version: z.ZodOptional<z.ZodString>;
|
|
347
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
348
|
-
package: z.ZodOptional<z.ZodString>;
|
|
349
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
350
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
352
|
-
version: z.ZodString;
|
|
353
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
354
|
-
}, z.core.$strip>]>>>;
|
|
355
|
-
"build-dependencies": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
356
|
-
package: z.ZodOptional<z.ZodString>;
|
|
357
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
358
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
359
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
360
|
-
workspace: z.ZodLiteral<true>;
|
|
361
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
362
|
-
package: z.ZodOptional<z.ZodString>;
|
|
363
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
364
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
365
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
366
|
-
path: z.ZodString;
|
|
367
|
-
version: z.ZodOptional<z.ZodString>;
|
|
368
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
369
|
-
package: z.ZodOptional<z.ZodString>;
|
|
370
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
371
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
372
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
373
|
-
git: z.ZodString;
|
|
374
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
375
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
376
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
377
|
-
version: z.ZodOptional<z.ZodString>;
|
|
378
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
379
|
-
package: z.ZodOptional<z.ZodString>;
|
|
380
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
381
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
382
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
383
|
-
version: z.ZodString;
|
|
384
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
385
|
-
}, z.core.$strip>]>>>;
|
|
386
|
-
target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
387
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
388
|
-
package: z.ZodOptional<z.ZodString>;
|
|
389
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
390
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
391
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
392
|
-
workspace: z.ZodLiteral<true>;
|
|
393
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
394
|
-
package: z.ZodOptional<z.ZodString>;
|
|
395
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
396
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
397
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
398
|
-
path: z.ZodString;
|
|
399
|
-
version: z.ZodOptional<z.ZodString>;
|
|
400
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
401
|
-
package: z.ZodOptional<z.ZodString>;
|
|
402
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
403
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
404
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
405
|
-
git: z.ZodString;
|
|
406
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
407
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
408
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
409
|
-
version: z.ZodOptional<z.ZodString>;
|
|
410
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
411
|
-
package: z.ZodOptional<z.ZodString>;
|
|
412
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
413
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
414
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
415
|
-
version: z.ZodString;
|
|
416
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
417
|
-
}, z.core.$strip>]>>>;
|
|
418
|
-
"dev-dependencies": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
419
|
-
package: z.ZodOptional<z.ZodString>;
|
|
420
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
421
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
422
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
423
|
-
workspace: z.ZodLiteral<true>;
|
|
424
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
425
|
-
package: z.ZodOptional<z.ZodString>;
|
|
426
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
427
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
428
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
429
|
-
path: z.ZodString;
|
|
430
|
-
version: z.ZodOptional<z.ZodString>;
|
|
431
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
432
|
-
package: z.ZodOptional<z.ZodString>;
|
|
433
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
434
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
435
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
436
|
-
git: z.ZodString;
|
|
437
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
438
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
439
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
440
|
-
version: z.ZodOptional<z.ZodString>;
|
|
441
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
442
|
-
package: z.ZodOptional<z.ZodString>;
|
|
443
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
444
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
445
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
446
|
-
version: z.ZodString;
|
|
447
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
448
|
-
}, z.core.$strip>]>>>;
|
|
449
|
-
"build-dependencies": z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
450
|
-
package: z.ZodOptional<z.ZodString>;
|
|
451
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
452
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
453
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
454
|
-
workspace: z.ZodLiteral<true>;
|
|
455
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
456
|
-
package: z.ZodOptional<z.ZodString>;
|
|
457
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
458
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
459
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
460
|
-
path: z.ZodString;
|
|
461
|
-
version: z.ZodOptional<z.ZodString>;
|
|
462
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
463
|
-
package: z.ZodOptional<z.ZodString>;
|
|
464
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
465
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
466
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
467
|
-
git: z.ZodString;
|
|
468
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
469
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
470
|
-
rev: z.ZodOptional<z.ZodString>;
|
|
471
|
-
version: z.ZodOptional<z.ZodString>;
|
|
472
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
473
|
-
package: z.ZodOptional<z.ZodString>;
|
|
474
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
475
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
476
|
-
"default-features": z.ZodOptional<z.ZodBoolean>;
|
|
477
|
-
version: z.ZodString;
|
|
478
|
-
registry: z.ZodOptional<z.ZodString>;
|
|
479
|
-
}, z.core.$strip>]>>>;
|
|
480
|
-
}, z.core.$loose>>>;
|
|
481
|
-
}, z.core.$loose>;
|
|
482
|
-
type CargoDependency = z.infer<typeof cargoDependencySchema>;
|
|
483
|
-
type CargoManifest = z.infer<typeof cargoManifestSchema>;
|
|
297
|
+
interface CargoDepBase {
|
|
298
|
+
package?: string;
|
|
299
|
+
features?: string[];
|
|
300
|
+
optional?: boolean;
|
|
301
|
+
"default-features"?: boolean;
|
|
302
|
+
}
|
|
303
|
+
interface CargoWorkspaceDependency extends CargoDepBase {
|
|
304
|
+
workspace: true;
|
|
305
|
+
}
|
|
306
|
+
interface CargoPathDependency extends CargoDepBase {
|
|
307
|
+
path: string;
|
|
308
|
+
version?: string;
|
|
309
|
+
}
|
|
310
|
+
interface CargoGitDependency extends CargoDepBase {
|
|
311
|
+
git: string;
|
|
312
|
+
branch?: string;
|
|
313
|
+
tag?: string;
|
|
314
|
+
rev?: string;
|
|
315
|
+
version?: string;
|
|
316
|
+
}
|
|
317
|
+
interface CargoRegistryDependency extends CargoDepBase {
|
|
318
|
+
version: string;
|
|
319
|
+
registry?: string;
|
|
320
|
+
}
|
|
321
|
+
type CargoDependency = string | CargoWorkspaceDependency | CargoPathDependency | CargoGitDependency | CargoRegistryDependency;
|
|
322
|
+
interface CargoInherit {
|
|
323
|
+
workspace: true;
|
|
324
|
+
}
|
|
325
|
+
interface CargoTargetSection {
|
|
326
|
+
dependencies?: Record<string, CargoDependency>;
|
|
327
|
+
"dev-dependencies"?: Record<string, CargoDependency>;
|
|
328
|
+
"build-dependencies"?: Record<string, CargoDependency>;
|
|
329
|
+
}
|
|
330
|
+
interface CargoWorkspace {
|
|
331
|
+
members?: string[];
|
|
332
|
+
exclude?: string[];
|
|
333
|
+
package?: {
|
|
334
|
+
version?: string;
|
|
335
|
+
publish?: boolean;
|
|
336
|
+
};
|
|
337
|
+
dependencies?: Record<string, CargoDependency>;
|
|
338
|
+
"dev-dependencies"?: Record<string, CargoDependency>;
|
|
339
|
+
"build-dependencies"?: Record<string, CargoDependency>;
|
|
340
|
+
}
|
|
341
|
+
interface CargoManifest {
|
|
342
|
+
package?: {
|
|
343
|
+
name: string;
|
|
344
|
+
version: string | CargoInherit;
|
|
345
|
+
publish?: boolean | CargoInherit;
|
|
346
|
+
};
|
|
347
|
+
workspace?: CargoWorkspace;
|
|
348
|
+
dependencies?: Record<string, CargoDependency>;
|
|
349
|
+
"dev-dependencies"?: Record<string, CargoDependency>;
|
|
350
|
+
"build-dependencies"?: Record<string, CargoDependency>;
|
|
351
|
+
target?: Record<string, CargoTargetSection>;
|
|
352
|
+
}
|
|
484
353
|
//#endregion
|
|
485
354
|
//#region src/plugins/cargo.d.ts
|
|
486
355
|
declare const DEP_FIELDS$1: readonly ["dependencies", "dev-dependencies", "build-dependencies"];
|
|
487
|
-
|
|
356
|
+
type DepKind = (typeof DEP_FIELDS$1)[number];
|
|
357
|
+
declare class CargoToml<Data extends CargoManifest = CargoManifest> {
|
|
488
358
|
path: string;
|
|
489
359
|
content: string;
|
|
490
360
|
data: Data;
|
|
361
|
+
private dependencies;
|
|
362
|
+
workspace?: CargoToml<RequireFields<CargoManifest, "workspace">>;
|
|
363
|
+
constructor(path: string, content: string, data: Data);
|
|
364
|
+
listDependencies(graph: CargoGraph): ResolvedDependency[];
|
|
365
|
+
patch(path: string, value: unknown): void;
|
|
366
|
+
}
|
|
367
|
+
interface ResolvedDependency {
|
|
368
|
+
path: [...string[], kind: DepKind, key: string];
|
|
369
|
+
spec: CargoDependency;
|
|
370
|
+
resolved?: CargoPackage;
|
|
371
|
+
range?: string;
|
|
372
|
+
setRange?: (v: string) => void;
|
|
491
373
|
}
|
|
492
374
|
declare class CargoPackage extends WorkspacePackage {
|
|
493
375
|
readonly path: string;
|
|
494
376
|
/** a crate must have `package` field defined, otherwise it is merely a virutal workspace file, and Tegami should not include it. */
|
|
495
377
|
readonly file: CargoToml<RequireFields<CargoManifest, "package">>;
|
|
496
|
-
readonly workspaceFile?: CargoToml<RequireFields<CargoManifest, "workspace">> | undefined;
|
|
497
378
|
readonly manager = "cargo";
|
|
498
379
|
readonly manifest: RequireFields<CargoManifest, "package">;
|
|
499
380
|
constructor(path: string, /** a crate must have `package` field defined, otherwise it is merely a virutal workspace file, and Tegami should not include it. */
|
|
500
381
|
|
|
501
|
-
file: CargoToml<RequireFields<CargoManifest, "package"
|
|
382
|
+
file: CargoToml<RequireFields<CargoManifest, "package">>);
|
|
502
383
|
get name(): string;
|
|
503
384
|
get version(): string;
|
|
504
385
|
setVersion(version: string): void;
|
|
505
386
|
}
|
|
506
387
|
interface DependentRef$1 {
|
|
507
388
|
dependent: CargoPackage;
|
|
508
|
-
kind:
|
|
389
|
+
kind: DepKind;
|
|
509
390
|
name: string;
|
|
510
391
|
spec: CargoDependency;
|
|
511
392
|
version?: string;
|
|
@@ -566,26 +447,22 @@ interface TegamiContext {
|
|
|
566
447
|
}
|
|
567
448
|
//#endregion
|
|
568
449
|
//#region src/providers/npm/schema.d.ts
|
|
569
|
-
|
|
570
|
-
name:
|
|
571
|
-
version
|
|
572
|
-
private
|
|
573
|
-
publishConfig
|
|
574
|
-
access
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
peerDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
586
|
-
optionalDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
587
|
-
}, z.core.$loose>;
|
|
588
|
-
type PackageManifest = z.infer<typeof packageManifestSchema>;
|
|
450
|
+
interface PackageManifest {
|
|
451
|
+
name: string;
|
|
452
|
+
version?: string;
|
|
453
|
+
private?: boolean;
|
|
454
|
+
publishConfig?: {
|
|
455
|
+
access?: "public" | "restricted";
|
|
456
|
+
registry?: string;
|
|
457
|
+
tag?: string;
|
|
458
|
+
};
|
|
459
|
+
scripts?: Record<string, string>;
|
|
460
|
+
workspaces?: string[];
|
|
461
|
+
dependencies?: Record<string, string>;
|
|
462
|
+
devDependencies?: Record<string, string>;
|
|
463
|
+
peerDependencies?: Record<string, string>;
|
|
464
|
+
optionalDependencies?: Record<string, string>;
|
|
465
|
+
}
|
|
589
466
|
//#endregion
|
|
590
467
|
//#region src/changelog/generate.d.ts
|
|
591
468
|
interface GenerateFromCommitsOptions {
|
|
@@ -751,7 +628,11 @@ declare class NpmPackage extends WorkspacePackage {
|
|
|
751
628
|
write(): Promise<void>;
|
|
752
629
|
initDraft(): PackageDraft;
|
|
753
630
|
getRegistry(): string;
|
|
754
|
-
configureDraft(
|
|
631
|
+
configureDraft({
|
|
632
|
+
draft
|
|
633
|
+
}: {
|
|
634
|
+
draft: PackageDraft;
|
|
635
|
+
}): void;
|
|
755
636
|
}
|
|
756
637
|
type DependencySpec = {
|
|
757
638
|
protocol: "npm";
|