@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/toolchain-config.ts
DELETED
|
@@ -1,814 +0,0 @@
|
|
|
1
|
-
// Automatically generated by schematic. DO NOT MODIFY!
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
|
|
5
|
-
import type { ExtendsFrom, Id } from './common';
|
|
6
|
-
|
|
7
|
-
/** Formats that a `package.json` version dependency can be. */
|
|
8
|
-
export type NodeVersionFormat =
|
|
9
|
-
| 'file'
|
|
10
|
-
| 'link'
|
|
11
|
-
| 'star'
|
|
12
|
-
| 'version'
|
|
13
|
-
| 'version-caret'
|
|
14
|
-
| 'version-tilde'
|
|
15
|
-
| 'workspace'
|
|
16
|
-
| 'workspace-caret'
|
|
17
|
-
| 'workspace-tilde';
|
|
18
|
-
|
|
19
|
-
export type PluginLocator = string;
|
|
20
|
-
|
|
21
|
-
export type UnresolvedVersionSpec = string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Configures and enables the Bun platform.
|
|
25
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain#bun
|
|
26
|
-
*/
|
|
27
|
-
export interface BunConfig {
|
|
28
|
-
/**
|
|
29
|
-
* The dependency version format to use when syncing projects
|
|
30
|
-
* as dependencies.
|
|
31
|
-
*
|
|
32
|
-
* @default 'workspace'
|
|
33
|
-
* @type {'file' | 'link' | 'star' | 'version' | 'version-caret' | 'version-tilde' | 'workspace' | 'workspace-caret' | 'workspace-tilde'}
|
|
34
|
-
*/
|
|
35
|
-
dependencyVersionFormat: NodeVersionFormat;
|
|
36
|
-
/** Automatically infer moon tasks from `package.json` scripts. */
|
|
37
|
-
inferTasksFromScripts: boolean;
|
|
38
|
-
/** List of arguments to append to `bun install` commands. */
|
|
39
|
-
installArgs: string[];
|
|
40
|
-
/** Location of the WASM plugin to use for Bun support. */
|
|
41
|
-
plugin: PluginLocator | null;
|
|
42
|
-
/**
|
|
43
|
-
* Assumes only the root `package.json` is used for dependencies.
|
|
44
|
-
* Can be used to support the "one version policy" pattern.
|
|
45
|
-
*/
|
|
46
|
-
rootPackageOnly: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Automatically syncs moon project-to-project relationships as
|
|
49
|
-
* dependencies for each `package.json` in the workspace.
|
|
50
|
-
*
|
|
51
|
-
* @default true
|
|
52
|
-
*/
|
|
53
|
-
syncProjectWorkspaceDependencies?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* The version of Bun to download, install, and run `bun` tasks with.
|
|
56
|
-
*
|
|
57
|
-
* @envvar MOON_BUN_VERSION
|
|
58
|
-
*/
|
|
59
|
-
version: UnresolvedVersionSpec | null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/** Configures to a tool-specific binary to install. */
|
|
63
|
-
export interface BinConfig {
|
|
64
|
-
/** Name of the binary, with optional version separated by `@`. */
|
|
65
|
-
bin: string;
|
|
66
|
-
/** Force install the binary if it already exists. */
|
|
67
|
-
force: boolean;
|
|
68
|
-
/** Only install the binary locally, and not within CI. */
|
|
69
|
-
local: boolean;
|
|
70
|
-
/** For supported tools, a custom name to use. */
|
|
71
|
-
name: string | null;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type BinEntry = string | BinConfig;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Configures and enables the Deno platform.
|
|
78
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain#deno
|
|
79
|
-
*/
|
|
80
|
-
export interface DenoConfig {
|
|
81
|
-
/** List of binaries to install into the environment using `deno install`. */
|
|
82
|
-
bins: BinEntry[];
|
|
83
|
-
/**
|
|
84
|
-
* Relative path to a dependency management file. Used for content hashing.
|
|
85
|
-
*
|
|
86
|
-
* @default 'deps.ts'
|
|
87
|
-
*/
|
|
88
|
-
depsFile?: string;
|
|
89
|
-
/** List of arguments to append to `deno install` commands. */
|
|
90
|
-
installArgs: string[];
|
|
91
|
-
/** Requires and forces the use of `deno.lock` files. */
|
|
92
|
-
lockfile: boolean;
|
|
93
|
-
/** Location of the WASM plugin to use for Deno support. */
|
|
94
|
-
plugin: PluginLocator | null;
|
|
95
|
-
/**
|
|
96
|
-
* The version of Deno to download, install, and run `deno` tasks with.
|
|
97
|
-
*
|
|
98
|
-
* @envvar MOON_DENO_VERSION
|
|
99
|
-
*/
|
|
100
|
-
version: UnresolvedVersionSpec | null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/** Configures how and where updates will be received. */
|
|
104
|
-
export interface MoonConfig {
|
|
105
|
-
/**
|
|
106
|
-
* A secure URL for downloading the moon binary.
|
|
107
|
-
*
|
|
108
|
-
* @default 'https://github.com/moonrepo/moon/releases/latest/download'
|
|
109
|
-
*/
|
|
110
|
-
downloadUrl?: string;
|
|
111
|
-
/**
|
|
112
|
-
* A secure URL to lookup the latest version.
|
|
113
|
-
*
|
|
114
|
-
* @default 'https://launch.moonrepo.app/moon/check_version'
|
|
115
|
-
*/
|
|
116
|
-
manifestUrl?: string;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/** Options for Bun, when used as a package manager. */
|
|
120
|
-
export interface BunpmConfig {
|
|
121
|
-
/** List of arguments to append to `bun install` commands. */
|
|
122
|
-
installArgs: string[];
|
|
123
|
-
/** Location of the WASM plugin to use for Bun support. */
|
|
124
|
-
plugin: PluginLocator | null;
|
|
125
|
-
/**
|
|
126
|
-
* The version of Bun to download, install, and run `bun` tasks with.
|
|
127
|
-
*
|
|
128
|
-
* @envvar MOON_BUN_VERSION
|
|
129
|
-
*/
|
|
130
|
-
version: UnresolvedVersionSpec | null;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/** Options for npm, when used as a package manager. */
|
|
134
|
-
export interface NpmConfig {
|
|
135
|
-
/** List of arguments to append to `npm install` commands. */
|
|
136
|
-
installArgs?: string[];
|
|
137
|
-
/** Location of the WASM plugin to use for npm support. */
|
|
138
|
-
plugin: PluginLocator | null;
|
|
139
|
-
/**
|
|
140
|
-
* The version of npm to download, install, and run `npm` tasks with.
|
|
141
|
-
*
|
|
142
|
-
* @envvar MOON_NPM_VERSION
|
|
143
|
-
*/
|
|
144
|
-
version: UnresolvedVersionSpec | null;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/** The available package managers for Node.js. */
|
|
148
|
-
export type NodePackageManager = 'bun' | 'npm' | 'pnpm' | 'yarn';
|
|
149
|
-
|
|
150
|
-
/** Options for pnpm, when used as a package manager. */
|
|
151
|
-
export interface PnpmConfig {
|
|
152
|
-
/** List of arguments to append to `pnpm install` commands. */
|
|
153
|
-
installArgs: string[];
|
|
154
|
-
/** Location of the WASM plugin to use for pnpm support. */
|
|
155
|
-
plugin: PluginLocator | null;
|
|
156
|
-
/**
|
|
157
|
-
* The version of pnpm to download, install, and run `pnpm` tasks with.
|
|
158
|
-
*
|
|
159
|
-
* @envvar MOON_PNPM_VERSION
|
|
160
|
-
*/
|
|
161
|
-
version: UnresolvedVersionSpec | null;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/** The available version managers for Node.js. */
|
|
165
|
-
export type NodeVersionManager = 'nodenv' | 'nvm';
|
|
166
|
-
|
|
167
|
-
/** Options for Yarn, when used as a package manager. */
|
|
168
|
-
export interface YarnConfig {
|
|
169
|
-
/** List of arguments to append to `yarn install` commands. */
|
|
170
|
-
installArgs: string[];
|
|
171
|
-
/** Location of the WASM plugin to use for Yarn support. */
|
|
172
|
-
plugin: PluginLocator | null;
|
|
173
|
-
/** Plugins to automatically install for Yarn v2 and above. */
|
|
174
|
-
plugins: string[];
|
|
175
|
-
/**
|
|
176
|
-
* The version of Yarn to download, install, and run `yarn` tasks with.
|
|
177
|
-
*
|
|
178
|
-
* @envvar MOON_YARN_VERSION
|
|
179
|
-
*/
|
|
180
|
-
version: UnresolvedVersionSpec | null;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Configures and enables the Node.js platform.
|
|
185
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain#node
|
|
186
|
-
*/
|
|
187
|
-
export interface NodeConfig {
|
|
188
|
-
/**
|
|
189
|
-
* When `version` is defined, syncs the version as a constraint to
|
|
190
|
-
* `package.json` engines.
|
|
191
|
-
*
|
|
192
|
-
* @default true
|
|
193
|
-
*/
|
|
194
|
-
addEnginesConstraint?: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* Arguments to automatically pass to all tasks that execute the
|
|
197
|
-
* `node` binary.
|
|
198
|
-
*/
|
|
199
|
-
binExecArgs: string[];
|
|
200
|
-
/** Options for Bun, when used as a package manager. */
|
|
201
|
-
bun: BunpmConfig | null;
|
|
202
|
-
/**
|
|
203
|
-
* Automatically dedupes the lockfile when dependencies have changed.
|
|
204
|
-
*
|
|
205
|
-
* @default true
|
|
206
|
-
*/
|
|
207
|
-
dedupeOnLockfileChange?: boolean;
|
|
208
|
-
/**
|
|
209
|
-
* The dependency version format to use when syncing projects
|
|
210
|
-
* as dependencies.
|
|
211
|
-
*
|
|
212
|
-
* @default 'workspace'
|
|
213
|
-
* @type {'file' | 'link' | 'star' | 'version' | 'version-caret' | 'version-tilde' | 'workspace' | 'workspace-caret' | 'workspace-tilde'}
|
|
214
|
-
*/
|
|
215
|
-
dependencyVersionFormat: NodeVersionFormat;
|
|
216
|
-
/** Automatically infer moon tasks from `package.json` scripts. */
|
|
217
|
-
inferTasksFromScripts: boolean;
|
|
218
|
-
/** Options for npm, when used as a package manager. */
|
|
219
|
-
npm: NpmConfig;
|
|
220
|
-
/**
|
|
221
|
-
* The package manager to use for installing dependencies.
|
|
222
|
-
*
|
|
223
|
-
* @default 'npm'
|
|
224
|
-
* @type {'bun' | 'npm' | 'pnpm' | 'yarn'}
|
|
225
|
-
*/
|
|
226
|
-
packageManager: NodePackageManager;
|
|
227
|
-
/** Location of the WASM plugin to use for Node.js support. */
|
|
228
|
-
plugin: PluginLocator | null;
|
|
229
|
-
/** Options for pnpm, when used as a package manager. */
|
|
230
|
-
pnpm: PnpmConfig | null;
|
|
231
|
-
/**
|
|
232
|
-
* Assumes only the root `package.json` is used for dependencies.
|
|
233
|
-
* Can be used to support the "one version policy" pattern.
|
|
234
|
-
*/
|
|
235
|
-
rootPackageOnly: boolean;
|
|
236
|
-
/**
|
|
237
|
-
* Automatically syncs the configured package manager version
|
|
238
|
-
* to the root `packageManager` field in `package.json`.
|
|
239
|
-
*
|
|
240
|
-
* @default true
|
|
241
|
-
*/
|
|
242
|
-
syncPackageManagerField?: boolean;
|
|
243
|
-
/**
|
|
244
|
-
* Automatically syncs moon project-to-project relationships as
|
|
245
|
-
* dependencies for each `package.json` in the workspace.
|
|
246
|
-
*
|
|
247
|
-
* @default true
|
|
248
|
-
*/
|
|
249
|
-
syncProjectWorkspaceDependencies?: boolean;
|
|
250
|
-
/**
|
|
251
|
-
* When `version` is defined, syncs the version to the chosen config.
|
|
252
|
-
*
|
|
253
|
-
* @default 'nvm'
|
|
254
|
-
*/
|
|
255
|
-
syncVersionManagerConfig: NodeVersionManager | null;
|
|
256
|
-
/**
|
|
257
|
-
* The version of Node.js to download, install, and run `node` tasks with.
|
|
258
|
-
*
|
|
259
|
-
* @envvar MOON_NODE_VERSION
|
|
260
|
-
*/
|
|
261
|
-
version: UnresolvedVersionSpec | null;
|
|
262
|
-
/** Options for Yarn, when used as a package manager. */
|
|
263
|
-
yarn: YarnConfig | null;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export type ToolchainPluginVersionFrom = boolean | string;
|
|
267
|
-
|
|
268
|
-
/** Configures an individual toolchain. */
|
|
269
|
-
export interface ToolchainPluginConfig {
|
|
270
|
-
/** Arbitrary configuration that'll be passed to the WASM plugin. */
|
|
271
|
-
config: Record<string, unknown>;
|
|
272
|
-
disabled: boolean;
|
|
273
|
-
/** Location of the WASM plugin to use. */
|
|
274
|
-
plugin: PluginLocator | null;
|
|
275
|
-
/** The version of the toolchain to download and install. */
|
|
276
|
-
version: UnresolvedVersionSpec | null;
|
|
277
|
-
/**
|
|
278
|
-
* Inherit the version from the root `.prototools`.
|
|
279
|
-
* When true, matches using the same ID, otherwise a
|
|
280
|
-
* string can be provided for a custom ID.
|
|
281
|
-
*/
|
|
282
|
-
versionFromPrototools: ToolchainPluginVersionFrom;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export type VersionSpec = string;
|
|
286
|
-
|
|
287
|
-
/** Configures how moon integrates with proto. */
|
|
288
|
-
export interface ProtoConfig {
|
|
289
|
-
/**
|
|
290
|
-
* The version of proto to download and install,
|
|
291
|
-
* and to use for installing and running other toolchains.
|
|
292
|
-
*/
|
|
293
|
-
version?: VersionSpec;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/** The available package managers for Python. */
|
|
297
|
-
export type PythonPackageManager = 'pip' | 'uv';
|
|
298
|
-
|
|
299
|
-
export interface PipConfig {
|
|
300
|
-
/** List of arguments to append to `pip install` commands. */
|
|
301
|
-
installArgs: string[];
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
export interface UvConfig {
|
|
305
|
-
/** Location of the WASM plugin to use for uv support. */
|
|
306
|
-
plugin: PluginLocator | null;
|
|
307
|
-
/** List of arguments to append to `uv sync` commands. */
|
|
308
|
-
syncArgs: string[];
|
|
309
|
-
/**
|
|
310
|
-
* The version of uv to download, install, and run `uv` tasks with.
|
|
311
|
-
*
|
|
312
|
-
* @envvar MOON_UV_VERSION
|
|
313
|
-
*/
|
|
314
|
-
version: UnresolvedVersionSpec | null;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
export interface PythonConfig {
|
|
318
|
-
/**
|
|
319
|
-
* The package manager to use for installing dependencies and managing
|
|
320
|
-
* the virtual environment.
|
|
321
|
-
*
|
|
322
|
-
* @default 'pip'
|
|
323
|
-
* @type {'pip' | 'uv'}
|
|
324
|
-
*/
|
|
325
|
-
packageManager: PythonPackageManager;
|
|
326
|
-
/** Options for pip, when used as a package manager. */
|
|
327
|
-
pip: PipConfig;
|
|
328
|
-
/** Location of the WASM plugin to use for Python support. */
|
|
329
|
-
plugin: PluginLocator | null;
|
|
330
|
-
/**
|
|
331
|
-
* Assumes a workspace root virtual environment is used for dependencies.
|
|
332
|
-
* Can be used to support the "one version policy" pattern.
|
|
333
|
-
*/
|
|
334
|
-
rootRequirementsOnly?: boolean;
|
|
335
|
-
/**
|
|
336
|
-
* Assumes a workspace root virtual environment is used for dependencies.
|
|
337
|
-
* Can be used to support the "one version policy" pattern.
|
|
338
|
-
*/
|
|
339
|
-
rootVenvOnly: boolean;
|
|
340
|
-
/** Options for uv, when used as a package manager. */
|
|
341
|
-
uv: UvConfig | null;
|
|
342
|
-
/**
|
|
343
|
-
* Defines the virtual environment name, which will be created in the workspace root.
|
|
344
|
-
* Project dependencies will be installed into this.
|
|
345
|
-
*
|
|
346
|
-
* @default '.venv'
|
|
347
|
-
*/
|
|
348
|
-
venvName?: string;
|
|
349
|
-
/**
|
|
350
|
-
* The version of Python to download, install, and run `python` tasks with.
|
|
351
|
-
*
|
|
352
|
-
* @envvar MOON_PYTHON_VERSION
|
|
353
|
-
*/
|
|
354
|
-
version: UnresolvedVersionSpec | null;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Configures and enables the Rust platform.
|
|
359
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain#rust
|
|
360
|
-
*/
|
|
361
|
-
export interface RustConfig {
|
|
362
|
-
/** List of binaries to install into the environment using `cargo binstall`. */
|
|
363
|
-
bins: BinEntry[];
|
|
364
|
-
/** The version of `cargo-binstall` to install. Defaults to latest if not defined. */
|
|
365
|
-
binstallVersion: string | null;
|
|
366
|
-
/** Rust components to automatically install. */
|
|
367
|
-
components: string[];
|
|
368
|
-
/** Location of the WASM plugin to use for Rust support. */
|
|
369
|
-
plugin: PluginLocator | null;
|
|
370
|
-
/** When `version` is defined, syncs the version to `rust-toolchain.toml`. */
|
|
371
|
-
syncToolchainConfig: boolean;
|
|
372
|
-
/** Rust targets to automatically install. */
|
|
373
|
-
targets: string[];
|
|
374
|
-
/**
|
|
375
|
-
* The version of Rust to download, install, and run `cargo` tasks with.
|
|
376
|
-
*
|
|
377
|
-
* @envvar MOON_RUST_VERSION
|
|
378
|
-
*/
|
|
379
|
-
version: UnresolvedVersionSpec | null;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Configures all tools and platforms.
|
|
384
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain
|
|
385
|
-
*/
|
|
386
|
-
export interface ToolchainConfig {
|
|
387
|
-
/** @default 'https://moonrepo.dev/schemas/toolchain.json' */
|
|
388
|
-
$schema?: string;
|
|
389
|
-
/**
|
|
390
|
-
* Configures and enables the Bun platform.
|
|
391
|
-
*
|
|
392
|
-
* @deprecated Use `unstable_bun` instead.
|
|
393
|
-
*/
|
|
394
|
-
bun: BunConfig | null;
|
|
395
|
-
/**
|
|
396
|
-
* Configures and enables the Deno platform.
|
|
397
|
-
*
|
|
398
|
-
* @deprecated Use `unstable_deno` instead.
|
|
399
|
-
*/
|
|
400
|
-
deno: DenoConfig | null;
|
|
401
|
-
/**
|
|
402
|
-
* Extends one or many toolchain configuration files.
|
|
403
|
-
* Supports a relative file path or a secure URL.
|
|
404
|
-
*/
|
|
405
|
-
extends: ExtendsFrom | null;
|
|
406
|
-
/** Configures moon itself. */
|
|
407
|
-
moon: MoonConfig;
|
|
408
|
-
/**
|
|
409
|
-
* Configures and enables the Node.js platform.
|
|
410
|
-
*
|
|
411
|
-
* @deprecated Use `unstable_node` instead.
|
|
412
|
-
*/
|
|
413
|
-
node: NodeConfig | null;
|
|
414
|
-
/** All configured toolchains by unique ID. */
|
|
415
|
-
plugins: Record<Id, ToolchainPluginConfig>;
|
|
416
|
-
/** Configures how moon integrates with proto. */
|
|
417
|
-
proto: ProtoConfig;
|
|
418
|
-
/** Configures and enables the Python platform. */
|
|
419
|
-
python: PythonConfig | null;
|
|
420
|
-
/**
|
|
421
|
-
* Configures and enables the Rust platform.
|
|
422
|
-
*
|
|
423
|
-
* @deprecated Use `unstable_rust` instead.
|
|
424
|
-
*/
|
|
425
|
-
rust: RustConfig | null;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Configures and enables the Bun platform.
|
|
430
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain#bun
|
|
431
|
-
*/
|
|
432
|
-
export interface PartialBunConfig {
|
|
433
|
-
/**
|
|
434
|
-
* The dependency version format to use when syncing projects
|
|
435
|
-
* as dependencies.
|
|
436
|
-
*
|
|
437
|
-
* @default 'workspace'
|
|
438
|
-
*/
|
|
439
|
-
dependencyVersionFormat?: NodeVersionFormat | null;
|
|
440
|
-
/** Automatically infer moon tasks from `package.json` scripts. */
|
|
441
|
-
inferTasksFromScripts?: boolean | null;
|
|
442
|
-
/** List of arguments to append to `bun install` commands. */
|
|
443
|
-
installArgs?: string[] | null;
|
|
444
|
-
/** Location of the WASM plugin to use for Bun support. */
|
|
445
|
-
plugin?: PluginLocator | null;
|
|
446
|
-
/**
|
|
447
|
-
* Assumes only the root `package.json` is used for dependencies.
|
|
448
|
-
* Can be used to support the "one version policy" pattern.
|
|
449
|
-
*/
|
|
450
|
-
rootPackageOnly?: boolean | null;
|
|
451
|
-
/**
|
|
452
|
-
* Automatically syncs moon project-to-project relationships as
|
|
453
|
-
* dependencies for each `package.json` in the workspace.
|
|
454
|
-
*
|
|
455
|
-
* @default true
|
|
456
|
-
*/
|
|
457
|
-
syncProjectWorkspaceDependencies?: boolean | null;
|
|
458
|
-
/**
|
|
459
|
-
* The version of Bun to download, install, and run `bun` tasks with.
|
|
460
|
-
*
|
|
461
|
-
* @envvar MOON_BUN_VERSION
|
|
462
|
-
*/
|
|
463
|
-
version?: UnresolvedVersionSpec | null;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/** Configures to a tool-specific binary to install. */
|
|
467
|
-
export interface PartialBinConfig {
|
|
468
|
-
/** Name of the binary, with optional version separated by `@`. */
|
|
469
|
-
bin?: string | null;
|
|
470
|
-
/** Force install the binary if it already exists. */
|
|
471
|
-
force?: boolean | null;
|
|
472
|
-
/** Only install the binary locally, and not within CI. */
|
|
473
|
-
local?: boolean | null;
|
|
474
|
-
/** For supported tools, a custom name to use. */
|
|
475
|
-
name?: string | null;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
export type PartialBinEntry = string | PartialBinConfig;
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Configures and enables the Deno platform.
|
|
482
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain#deno
|
|
483
|
-
*/
|
|
484
|
-
export interface PartialDenoConfig {
|
|
485
|
-
/** List of binaries to install into the environment using `deno install`. */
|
|
486
|
-
bins?: PartialBinEntry[] | null;
|
|
487
|
-
/**
|
|
488
|
-
* Relative path to a dependency management file. Used for content hashing.
|
|
489
|
-
*
|
|
490
|
-
* @default 'deps.ts'
|
|
491
|
-
*/
|
|
492
|
-
depsFile?: string | null;
|
|
493
|
-
/** List of arguments to append to `deno install` commands. */
|
|
494
|
-
installArgs?: string[] | null;
|
|
495
|
-
/** Requires and forces the use of `deno.lock` files. */
|
|
496
|
-
lockfile?: boolean | null;
|
|
497
|
-
/** Location of the WASM plugin to use for Deno support. */
|
|
498
|
-
plugin?: PluginLocator | null;
|
|
499
|
-
/**
|
|
500
|
-
* The version of Deno to download, install, and run `deno` tasks with.
|
|
501
|
-
*
|
|
502
|
-
* @envvar MOON_DENO_VERSION
|
|
503
|
-
*/
|
|
504
|
-
version?: UnresolvedVersionSpec | null;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/** Configures how and where updates will be received. */
|
|
508
|
-
export interface PartialMoonConfig {
|
|
509
|
-
/**
|
|
510
|
-
* A secure URL for downloading the moon binary.
|
|
511
|
-
*
|
|
512
|
-
* @default 'https://github.com/moonrepo/moon/releases/latest/download'
|
|
513
|
-
*/
|
|
514
|
-
downloadUrl?: string | null;
|
|
515
|
-
/**
|
|
516
|
-
* A secure URL to lookup the latest version.
|
|
517
|
-
*
|
|
518
|
-
* @default 'https://launch.moonrepo.app/moon/check_version'
|
|
519
|
-
*/
|
|
520
|
-
manifestUrl?: string | null;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
/** Options for Bun, when used as a package manager. */
|
|
524
|
-
export interface PartialBunpmConfig {
|
|
525
|
-
/** List of arguments to append to `bun install` commands. */
|
|
526
|
-
installArgs?: string[] | null;
|
|
527
|
-
/** Location of the WASM plugin to use for Bun support. */
|
|
528
|
-
plugin?: PluginLocator | null;
|
|
529
|
-
/**
|
|
530
|
-
* The version of Bun to download, install, and run `bun` tasks with.
|
|
531
|
-
*
|
|
532
|
-
* @envvar MOON_BUN_VERSION
|
|
533
|
-
*/
|
|
534
|
-
version?: UnresolvedVersionSpec | null;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
/** Options for npm, when used as a package manager. */
|
|
538
|
-
export interface PartialNpmConfig {
|
|
539
|
-
/** List of arguments to append to `npm install` commands. */
|
|
540
|
-
installArgs?: string[] | null;
|
|
541
|
-
/** Location of the WASM plugin to use for npm support. */
|
|
542
|
-
plugin?: PluginLocator | null;
|
|
543
|
-
/**
|
|
544
|
-
* The version of npm to download, install, and run `npm` tasks with.
|
|
545
|
-
*
|
|
546
|
-
* @envvar MOON_NPM_VERSION
|
|
547
|
-
*/
|
|
548
|
-
version?: UnresolvedVersionSpec | null;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
/** Options for pnpm, when used as a package manager. */
|
|
552
|
-
export interface PartialPnpmConfig {
|
|
553
|
-
/** List of arguments to append to `pnpm install` commands. */
|
|
554
|
-
installArgs?: string[] | null;
|
|
555
|
-
/** Location of the WASM plugin to use for pnpm support. */
|
|
556
|
-
plugin?: PluginLocator | null;
|
|
557
|
-
/**
|
|
558
|
-
* The version of pnpm to download, install, and run `pnpm` tasks with.
|
|
559
|
-
*
|
|
560
|
-
* @envvar MOON_PNPM_VERSION
|
|
561
|
-
*/
|
|
562
|
-
version?: UnresolvedVersionSpec | null;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
/** Options for Yarn, when used as a package manager. */
|
|
566
|
-
export interface PartialYarnConfig {
|
|
567
|
-
/** List of arguments to append to `yarn install` commands. */
|
|
568
|
-
installArgs?: string[] | null;
|
|
569
|
-
/** Location of the WASM plugin to use for Yarn support. */
|
|
570
|
-
plugin?: PluginLocator | null;
|
|
571
|
-
/** Plugins to automatically install for Yarn v2 and above. */
|
|
572
|
-
plugins?: string[] | null;
|
|
573
|
-
/**
|
|
574
|
-
* The version of Yarn to download, install, and run `yarn` tasks with.
|
|
575
|
-
*
|
|
576
|
-
* @envvar MOON_YARN_VERSION
|
|
577
|
-
*/
|
|
578
|
-
version?: UnresolvedVersionSpec | null;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* Configures and enables the Node.js platform.
|
|
583
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain#node
|
|
584
|
-
*/
|
|
585
|
-
export interface PartialNodeConfig {
|
|
586
|
-
/**
|
|
587
|
-
* When `version` is defined, syncs the version as a constraint to
|
|
588
|
-
* `package.json` engines.
|
|
589
|
-
*
|
|
590
|
-
* @default true
|
|
591
|
-
*/
|
|
592
|
-
addEnginesConstraint?: boolean | null;
|
|
593
|
-
/**
|
|
594
|
-
* Arguments to automatically pass to all tasks that execute the
|
|
595
|
-
* `node` binary.
|
|
596
|
-
*/
|
|
597
|
-
binExecArgs?: string[] | null;
|
|
598
|
-
/** Options for Bun, when used as a package manager. */
|
|
599
|
-
bun?: PartialBunpmConfig | null;
|
|
600
|
-
/**
|
|
601
|
-
* Automatically dedupes the lockfile when dependencies have changed.
|
|
602
|
-
*
|
|
603
|
-
* @default true
|
|
604
|
-
*/
|
|
605
|
-
dedupeOnLockfileChange?: boolean | null;
|
|
606
|
-
/**
|
|
607
|
-
* The dependency version format to use when syncing projects
|
|
608
|
-
* as dependencies.
|
|
609
|
-
*
|
|
610
|
-
* @default 'workspace'
|
|
611
|
-
*/
|
|
612
|
-
dependencyVersionFormat?: NodeVersionFormat | null;
|
|
613
|
-
/** Automatically infer moon tasks from `package.json` scripts. */
|
|
614
|
-
inferTasksFromScripts?: boolean | null;
|
|
615
|
-
/** Options for npm, when used as a package manager. */
|
|
616
|
-
npm?: PartialNpmConfig | null;
|
|
617
|
-
/**
|
|
618
|
-
* The package manager to use for installing dependencies.
|
|
619
|
-
*
|
|
620
|
-
* @default 'npm'
|
|
621
|
-
*/
|
|
622
|
-
packageManager?: NodePackageManager | null;
|
|
623
|
-
/** Location of the WASM plugin to use for Node.js support. */
|
|
624
|
-
plugin?: PluginLocator | null;
|
|
625
|
-
/** Options for pnpm, when used as a package manager. */
|
|
626
|
-
pnpm?: PartialPnpmConfig | null;
|
|
627
|
-
/**
|
|
628
|
-
* Assumes only the root `package.json` is used for dependencies.
|
|
629
|
-
* Can be used to support the "one version policy" pattern.
|
|
630
|
-
*/
|
|
631
|
-
rootPackageOnly?: boolean | null;
|
|
632
|
-
/**
|
|
633
|
-
* Automatically syncs the configured package manager version
|
|
634
|
-
* to the root `packageManager` field in `package.json`.
|
|
635
|
-
*
|
|
636
|
-
* @default true
|
|
637
|
-
*/
|
|
638
|
-
syncPackageManagerField?: boolean | null;
|
|
639
|
-
/**
|
|
640
|
-
* Automatically syncs moon project-to-project relationships as
|
|
641
|
-
* dependencies for each `package.json` in the workspace.
|
|
642
|
-
*
|
|
643
|
-
* @default true
|
|
644
|
-
*/
|
|
645
|
-
syncProjectWorkspaceDependencies?: boolean | null;
|
|
646
|
-
/**
|
|
647
|
-
* When `version` is defined, syncs the version to the chosen config.
|
|
648
|
-
*
|
|
649
|
-
* @default 'nvm'
|
|
650
|
-
*/
|
|
651
|
-
syncVersionManagerConfig?: NodeVersionManager | null;
|
|
652
|
-
/**
|
|
653
|
-
* The version of Node.js to download, install, and run `node` tasks with.
|
|
654
|
-
*
|
|
655
|
-
* @envvar MOON_NODE_VERSION
|
|
656
|
-
*/
|
|
657
|
-
version?: UnresolvedVersionSpec | null;
|
|
658
|
-
/** Options for Yarn, when used as a package manager. */
|
|
659
|
-
yarn?: PartialYarnConfig | null;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
/** Configures an individual toolchain. */
|
|
663
|
-
export interface PartialToolchainPluginConfig {
|
|
664
|
-
/** Arbitrary configuration that'll be passed to the WASM plugin. */
|
|
665
|
-
config?: Record<string, unknown> | null;
|
|
666
|
-
disabled?: boolean | null;
|
|
667
|
-
/** Location of the WASM plugin to use. */
|
|
668
|
-
plugin?: PluginLocator | null;
|
|
669
|
-
/** The version of the toolchain to download and install. */
|
|
670
|
-
version?: UnresolvedVersionSpec | null;
|
|
671
|
-
/**
|
|
672
|
-
* Inherit the version from the root `.prototools`.
|
|
673
|
-
* When true, matches using the same ID, otherwise a
|
|
674
|
-
* string can be provided for a custom ID.
|
|
675
|
-
*/
|
|
676
|
-
versionFromPrototools?: ToolchainPluginVersionFrom | null;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
/** Configures how moon integrates with proto. */
|
|
680
|
-
export interface PartialProtoConfig {
|
|
681
|
-
/**
|
|
682
|
-
* The version of proto to download and install,
|
|
683
|
-
* and to use for installing and running other toolchains.
|
|
684
|
-
*/
|
|
685
|
-
version?: VersionSpec | null;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
export interface PartialPipConfig {
|
|
689
|
-
/** List of arguments to append to `pip install` commands. */
|
|
690
|
-
installArgs?: string[] | null;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
export interface PartialUvConfig {
|
|
694
|
-
/** Location of the WASM plugin to use for uv support. */
|
|
695
|
-
plugin?: PluginLocator | null;
|
|
696
|
-
/** List of arguments to append to `uv sync` commands. */
|
|
697
|
-
syncArgs?: string[] | null;
|
|
698
|
-
/**
|
|
699
|
-
* The version of uv to download, install, and run `uv` tasks with.
|
|
700
|
-
*
|
|
701
|
-
* @envvar MOON_UV_VERSION
|
|
702
|
-
*/
|
|
703
|
-
version?: UnresolvedVersionSpec | null;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
export interface PartialPythonConfig {
|
|
707
|
-
/**
|
|
708
|
-
* The package manager to use for installing dependencies and managing
|
|
709
|
-
* the virtual environment.
|
|
710
|
-
*
|
|
711
|
-
* @default 'pip'
|
|
712
|
-
*/
|
|
713
|
-
packageManager?: PythonPackageManager | null;
|
|
714
|
-
/** Options for pip, when used as a package manager. */
|
|
715
|
-
pip?: PartialPipConfig | null;
|
|
716
|
-
/** Location of the WASM plugin to use for Python support. */
|
|
717
|
-
plugin?: PluginLocator | null;
|
|
718
|
-
/**
|
|
719
|
-
* Assumes a workspace root virtual environment is used for dependencies.
|
|
720
|
-
* Can be used to support the "one version policy" pattern.
|
|
721
|
-
*/
|
|
722
|
-
rootRequirementsOnly?: boolean | null;
|
|
723
|
-
/**
|
|
724
|
-
* Assumes a workspace root virtual environment is used for dependencies.
|
|
725
|
-
* Can be used to support the "one version policy" pattern.
|
|
726
|
-
*/
|
|
727
|
-
rootVenvOnly?: boolean | null;
|
|
728
|
-
/** Options for uv, when used as a package manager. */
|
|
729
|
-
uv?: PartialUvConfig | null;
|
|
730
|
-
/**
|
|
731
|
-
* Defines the virtual environment name, which will be created in the workspace root.
|
|
732
|
-
* Project dependencies will be installed into this.
|
|
733
|
-
*
|
|
734
|
-
* @default '.venv'
|
|
735
|
-
*/
|
|
736
|
-
venvName?: string | null;
|
|
737
|
-
/**
|
|
738
|
-
* The version of Python to download, install, and run `python` tasks with.
|
|
739
|
-
*
|
|
740
|
-
* @envvar MOON_PYTHON_VERSION
|
|
741
|
-
*/
|
|
742
|
-
version?: UnresolvedVersionSpec | null;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
/**
|
|
746
|
-
* Configures and enables the Rust platform.
|
|
747
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain#rust
|
|
748
|
-
*/
|
|
749
|
-
export interface PartialRustConfig {
|
|
750
|
-
/** List of binaries to install into the environment using `cargo binstall`. */
|
|
751
|
-
bins?: PartialBinEntry[] | null;
|
|
752
|
-
/** The version of `cargo-binstall` to install. Defaults to latest if not defined. */
|
|
753
|
-
binstallVersion?: string | null;
|
|
754
|
-
/** Rust components to automatically install. */
|
|
755
|
-
components?: string[] | null;
|
|
756
|
-
/** Location of the WASM plugin to use for Rust support. */
|
|
757
|
-
plugin?: PluginLocator | null;
|
|
758
|
-
/** When `version` is defined, syncs the version to `rust-toolchain.toml`. */
|
|
759
|
-
syncToolchainConfig?: boolean | null;
|
|
760
|
-
/** Rust targets to automatically install. */
|
|
761
|
-
targets?: string[] | null;
|
|
762
|
-
/**
|
|
763
|
-
* The version of Rust to download, install, and run `cargo` tasks with.
|
|
764
|
-
*
|
|
765
|
-
* @envvar MOON_RUST_VERSION
|
|
766
|
-
*/
|
|
767
|
-
version?: UnresolvedVersionSpec | null;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* Configures all tools and platforms.
|
|
772
|
-
* Docs: https://moonrepo.dev/docs/config/toolchain
|
|
773
|
-
*/
|
|
774
|
-
export interface PartialToolchainConfig {
|
|
775
|
-
/** @default 'https://moonrepo.dev/schemas/toolchain.json' */
|
|
776
|
-
$schema?: string | null;
|
|
777
|
-
/**
|
|
778
|
-
* Configures and enables the Bun platform.
|
|
779
|
-
*
|
|
780
|
-
* @deprecated Use `unstable_bun` instead.
|
|
781
|
-
*/
|
|
782
|
-
bun?: PartialBunConfig | null;
|
|
783
|
-
/**
|
|
784
|
-
* Configures and enables the Deno platform.
|
|
785
|
-
*
|
|
786
|
-
* @deprecated Use `unstable_deno` instead.
|
|
787
|
-
*/
|
|
788
|
-
deno?: PartialDenoConfig | null;
|
|
789
|
-
/**
|
|
790
|
-
* Extends one or many toolchain configuration files.
|
|
791
|
-
* Supports a relative file path or a secure URL.
|
|
792
|
-
*/
|
|
793
|
-
extends?: ExtendsFrom | null;
|
|
794
|
-
/** Configures moon itself. */
|
|
795
|
-
moon?: PartialMoonConfig | null;
|
|
796
|
-
/**
|
|
797
|
-
* Configures and enables the Node.js platform.
|
|
798
|
-
*
|
|
799
|
-
* @deprecated Use `unstable_node` instead.
|
|
800
|
-
*/
|
|
801
|
-
node?: PartialNodeConfig | null;
|
|
802
|
-
/** All configured toolchains by unique ID. */
|
|
803
|
-
plugins?: Record<Id, PartialToolchainPluginConfig> | null;
|
|
804
|
-
/** Configures how moon integrates with proto. */
|
|
805
|
-
proto?: PartialProtoConfig | null;
|
|
806
|
-
/** Configures and enables the Python platform. */
|
|
807
|
-
python?: PartialPythonConfig | null;
|
|
808
|
-
/**
|
|
809
|
-
* Configures and enables the Rust platform.
|
|
810
|
-
*
|
|
811
|
-
* @deprecated Use `unstable_rust` instead.
|
|
812
|
-
*/
|
|
813
|
-
rust?: PartialRustConfig | null;
|
|
814
|
-
}
|