@moonrepo/types 1.33.2 → 2.0.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.
- package/cjs/common.d.ts +9 -7
- package/cjs/common.d.ts.map +1 -1
- package/cjs/events.d.ts +29 -74
- package/cjs/events.d.ts.map +1 -1
- package/cjs/extensions-config.d.ts +26 -0
- package/cjs/extensions-config.d.ts.map +1 -0
- package/cjs/index.d.ts +3 -1
- package/cjs/index.d.ts.map +1 -1
- package/cjs/mcp.d.ts +6 -6
- package/cjs/mcp.d.ts.map +1 -1
- package/cjs/pipeline.d.ts +61 -72
- package/cjs/pipeline.d.ts.map +1 -1
- package/cjs/project-config.d.ts +129 -173
- package/cjs/project-config.d.ts.map +1 -1
- package/cjs/project.d.ts +8 -119
- package/cjs/project.d.ts.map +1 -1
- package/cjs/task.d.ts +83 -0
- package/cjs/task.d.ts.map +1 -0
- package/cjs/tasks-config.d.ts +380 -139
- package/cjs/tasks-config.d.ts.map +1 -1
- package/cjs/template-config.d.ts +24 -12
- package/cjs/template-config.d.ts.map +1 -1
- package/cjs/toolchains-config.d.ts +128 -0
- package/cjs/toolchains-config.d.ts.map +1 -0
- package/cjs/workspace-config.d.ts +381 -290
- package/cjs/workspace-config.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/common.ts +11 -9
- package/src/events.ts +30 -100
- package/src/extensions-config.ts +31 -0
- package/src/index.ts +3 -1
- package/src/mcp.ts +8 -8
- package/src/pipeline.ts +67 -82
- package/src/project-config.ts +138 -181
- package/src/project.ts +8 -140
- package/src/task.ts +106 -0
- package/src/tasks-config.ts +388 -142
- package/src/template-config.ts +24 -12
- package/src/toolchains-config.ts +143 -0
- package/src/workspace-config.ts +387 -297
- package/src/toolchain-config.ts +0 -814
package/src/template-config.ts
CHANGED
|
@@ -4,21 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
import type { Id } from './common';
|
|
6
6
|
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Configures the leading frontmatter within a template file.
|
|
9
|
+
* Docs: https://moonrepo.dev/docs/config/template#frontmatter
|
|
10
|
+
*/
|
|
8
11
|
export interface TemplateFrontmatterConfig {
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
$schema: string;
|
|
13
|
+
/** Force overwrite a file at the destination if there is a conflict. */
|
|
11
14
|
force: boolean;
|
|
15
|
+
/** Skip writing this file to the destination. */
|
|
12
16
|
skip: boolean;
|
|
17
|
+
/** Override the destination using a relative file path. */
|
|
13
18
|
to: string | null;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Configures the leading frontmatter within a template file.
|
|
23
|
+
* Docs: https://moonrepo.dev/docs/config/template#frontmatter
|
|
24
|
+
*/
|
|
17
25
|
export interface PartialTemplateFrontmatterConfig {
|
|
18
|
-
/** @default 'https://moonrepo.dev/schemas/template-frontmatter.json' */
|
|
19
26
|
$schema?: string | null;
|
|
27
|
+
/** Force overwrite a file at the destination if there is a conflict. */
|
|
20
28
|
force?: boolean | null;
|
|
29
|
+
/** Skip writing this file to the destination. */
|
|
21
30
|
skip?: boolean | null;
|
|
31
|
+
/** Override the destination using a relative file path. */
|
|
22
32
|
to?: string | null;
|
|
23
33
|
}
|
|
24
34
|
|
|
@@ -68,6 +78,8 @@ export interface TemplateVariableEnumValueConfig {
|
|
|
68
78
|
export type TemplateVariableEnumValue = string | TemplateVariableEnumValueConfig;
|
|
69
79
|
|
|
70
80
|
export interface TemplateVariableEnumSetting {
|
|
81
|
+
/** The default value of the variable if none was provided. */
|
|
82
|
+
defaultValue?: TemplateVariableEnumDefault;
|
|
71
83
|
/** The default value of the variable if none was provided. */
|
|
72
84
|
default: TemplateVariableEnumDefault;
|
|
73
85
|
/** Marks the variable as internal, and won't be overwritten via CLI arguments. */
|
|
@@ -147,8 +159,7 @@ export type TemplateVariable =
|
|
|
147
159
|
* Docs: https://moonrepo.dev/docs/config/template
|
|
148
160
|
*/
|
|
149
161
|
export interface TemplateConfig {
|
|
150
|
-
|
|
151
|
-
$schema?: string;
|
|
162
|
+
$schema: string;
|
|
152
163
|
/** A description on what the template scaffolds. */
|
|
153
164
|
description: string;
|
|
154
165
|
/**
|
|
@@ -158,12 +169,12 @@ export interface TemplateConfig {
|
|
|
158
169
|
destination: string | null;
|
|
159
170
|
/** Extends one or many other templates. */
|
|
160
171
|
extends: Id | Id[];
|
|
161
|
-
/** Overrides the
|
|
172
|
+
/** Overrides the identifier of the template, instead of using the folder name. */
|
|
162
173
|
id: Id | null;
|
|
163
174
|
/** A human-readable title for the template. */
|
|
164
175
|
title: string;
|
|
165
176
|
/**
|
|
166
|
-
* A
|
|
177
|
+
* A map of variables that'll be interpolated within each template file.
|
|
167
178
|
* Variables can also be populated by passing command line arguments.
|
|
168
179
|
*/
|
|
169
180
|
variables: Record<string, TemplateVariable>;
|
|
@@ -215,6 +226,8 @@ export interface PartialTemplateVariableEnumValueConfig {
|
|
|
215
226
|
export type PartialTemplateVariableEnumValue = string | PartialTemplateVariableEnumValueConfig;
|
|
216
227
|
|
|
217
228
|
export interface PartialTemplateVariableEnumSetting {
|
|
229
|
+
/** The default value of the variable if none was provided. */
|
|
230
|
+
defaultValue?: PartialTemplateVariableEnumDefault | null;
|
|
218
231
|
/** The default value of the variable if none was provided. */
|
|
219
232
|
default?: PartialTemplateVariableEnumDefault | null;
|
|
220
233
|
/** Marks the variable as internal, and won't be overwritten via CLI arguments. */
|
|
@@ -294,7 +307,6 @@ export type PartialTemplateVariable =
|
|
|
294
307
|
* Docs: https://moonrepo.dev/docs/config/template
|
|
295
308
|
*/
|
|
296
309
|
export interface PartialTemplateConfig {
|
|
297
|
-
/** @default 'https://moonrepo.dev/schemas/template.json' */
|
|
298
310
|
$schema?: string | null;
|
|
299
311
|
/** A description on what the template scaffolds. */
|
|
300
312
|
description?: string | null;
|
|
@@ -305,12 +317,12 @@ export interface PartialTemplateConfig {
|
|
|
305
317
|
destination?: string | null;
|
|
306
318
|
/** Extends one or many other templates. */
|
|
307
319
|
extends?: Id | Id[] | null;
|
|
308
|
-
/** Overrides the
|
|
320
|
+
/** Overrides the identifier of the template, instead of using the folder name. */
|
|
309
321
|
id?: Id | null;
|
|
310
322
|
/** A human-readable title for the template. */
|
|
311
323
|
title?: string | null;
|
|
312
324
|
/**
|
|
313
|
-
* A
|
|
325
|
+
* A map of variables that'll be interpolated within each template file.
|
|
314
326
|
* Variables can also be populated by passing command line arguments.
|
|
315
327
|
*/
|
|
316
328
|
variables?: Record<string, PartialTemplateVariable> | null;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// Automatically generated by schematic. DO NOT MODIFY!
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { ExtendsFrom, Id } from './common';
|
|
6
|
+
|
|
7
|
+
/** Configures how and where moon updates will be received. */
|
|
8
|
+
export interface MoonConfig {
|
|
9
|
+
/**
|
|
10
|
+
* A secure URL for downloading the moon binary itself.
|
|
11
|
+
*
|
|
12
|
+
* @default 'https://github.com/moonrepo/moon/releases/latest/download'
|
|
13
|
+
*/
|
|
14
|
+
downloadUrl?: string;
|
|
15
|
+
/**
|
|
16
|
+
* A secure URL to lookup the latest available version.
|
|
17
|
+
*
|
|
18
|
+
* @default 'https://launch.moonrepo.app/moon/check_version'
|
|
19
|
+
*/
|
|
20
|
+
manifestUrl?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type PluginLocator = string;
|
|
24
|
+
|
|
25
|
+
export type UnresolvedVersionSpec = string;
|
|
26
|
+
|
|
27
|
+
export type ToolchainPluginVersionFrom = boolean | string;
|
|
28
|
+
|
|
29
|
+
/** Configures an individual toolchain. */
|
|
30
|
+
export interface ToolchainPluginConfig {
|
|
31
|
+
/** Arbitrary configuration that'll be passed to the WASM plugin. */
|
|
32
|
+
config: Record<string, unknown>;
|
|
33
|
+
/** Location of the WASM plugin to use. */
|
|
34
|
+
plugin: PluginLocator | null;
|
|
35
|
+
/** The version of the toolchain to download and install. */
|
|
36
|
+
version: UnresolvedVersionSpec | null;
|
|
37
|
+
/**
|
|
38
|
+
* Inherit the version from the root `.prototools`.
|
|
39
|
+
* When true, matches using the same identifier, otherwise a
|
|
40
|
+
* string can be provided for a custom identifier.
|
|
41
|
+
*/
|
|
42
|
+
versionFromPrototools: ToolchainPluginVersionFrom;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type VersionSpec = string;
|
|
46
|
+
|
|
47
|
+
/** Configures how moon integrates with proto. */
|
|
48
|
+
export interface ProtoConfig {
|
|
49
|
+
/**
|
|
50
|
+
* The version of proto to download and install,
|
|
51
|
+
* and to use for installing and running other toolchains.
|
|
52
|
+
*/
|
|
53
|
+
version?: VersionSpec;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Configures all toolchains.
|
|
58
|
+
* Docs: https://moonrepo.dev/docs/config/toolchain
|
|
59
|
+
*/
|
|
60
|
+
export interface ToolchainsConfig {
|
|
61
|
+
/** @default './cache/schemas/toolchains.json' */
|
|
62
|
+
$schema?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Extends one or many toolchain configuration files.
|
|
65
|
+
* Supports a relative file path or a secure URL.
|
|
66
|
+
* @since 1.12.0
|
|
67
|
+
*/
|
|
68
|
+
extends: ExtendsFrom | null;
|
|
69
|
+
/** Configures moon itself. */
|
|
70
|
+
moon: MoonConfig;
|
|
71
|
+
/**
|
|
72
|
+
* Configures and integrates toolchains into the system using
|
|
73
|
+
* a unique identifier.
|
|
74
|
+
*/
|
|
75
|
+
plugins: Record<Id, ToolchainPluginConfig>;
|
|
76
|
+
/** Configures how moon integrates with proto. */
|
|
77
|
+
proto: ProtoConfig;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Configures how and where moon updates will be received. */
|
|
81
|
+
export interface PartialMoonConfig {
|
|
82
|
+
/**
|
|
83
|
+
* A secure URL for downloading the moon binary itself.
|
|
84
|
+
*
|
|
85
|
+
* @default 'https://github.com/moonrepo/moon/releases/latest/download'
|
|
86
|
+
*/
|
|
87
|
+
downloadUrl?: string | null;
|
|
88
|
+
/**
|
|
89
|
+
* A secure URL to lookup the latest available version.
|
|
90
|
+
*
|
|
91
|
+
* @default 'https://launch.moonrepo.app/moon/check_version'
|
|
92
|
+
*/
|
|
93
|
+
manifestUrl?: string | null;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Configures an individual toolchain. */
|
|
97
|
+
export interface PartialToolchainPluginConfig {
|
|
98
|
+
/** Arbitrary configuration that'll be passed to the WASM plugin. */
|
|
99
|
+
config?: Record<string, unknown> | null;
|
|
100
|
+
/** Location of the WASM plugin to use. */
|
|
101
|
+
plugin?: PluginLocator | null;
|
|
102
|
+
/** The version of the toolchain to download and install. */
|
|
103
|
+
version?: UnresolvedVersionSpec | null;
|
|
104
|
+
/**
|
|
105
|
+
* Inherit the version from the root `.prototools`.
|
|
106
|
+
* When true, matches using the same identifier, otherwise a
|
|
107
|
+
* string can be provided for a custom identifier.
|
|
108
|
+
*/
|
|
109
|
+
versionFromPrototools?: ToolchainPluginVersionFrom | null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Configures how moon integrates with proto. */
|
|
113
|
+
export interface PartialProtoConfig {
|
|
114
|
+
/**
|
|
115
|
+
* The version of proto to download and install,
|
|
116
|
+
* and to use for installing and running other toolchains.
|
|
117
|
+
*/
|
|
118
|
+
version?: VersionSpec | null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Configures all toolchains.
|
|
123
|
+
* Docs: https://moonrepo.dev/docs/config/toolchain
|
|
124
|
+
*/
|
|
125
|
+
export interface PartialToolchainsConfig {
|
|
126
|
+
/** @default './cache/schemas/toolchains.json' */
|
|
127
|
+
$schema?: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* Extends one or many toolchain configuration files.
|
|
130
|
+
* Supports a relative file path or a secure URL.
|
|
131
|
+
* @since 1.12.0
|
|
132
|
+
*/
|
|
133
|
+
extends?: ExtendsFrom | null;
|
|
134
|
+
/** Configures moon itself. */
|
|
135
|
+
moon?: PartialMoonConfig | null;
|
|
136
|
+
/**
|
|
137
|
+
* Configures and integrates toolchains into the system using
|
|
138
|
+
* a unique identifier.
|
|
139
|
+
*/
|
|
140
|
+
plugins?: Record<Id, PartialToolchainPluginConfig> | null;
|
|
141
|
+
/** Configures how moon integrates with proto. */
|
|
142
|
+
proto?: PartialProtoConfig | null;
|
|
143
|
+
}
|