diff --git a/.yarn/versions/22a0caa2.yml b/.yarn/versions/22a0caa2.yml index ead60d33b1b..997894edcae 100644 --- a/.yarn/versions/22a0caa2.yml +++ b/.yarn/versions/22a0caa2.yml @@ -8,3 +8,9 @@ releases: '@moonrepo/core-macos-x64': minor '@moonrepo/core-windows-x64-msvc': minor '@moonrepo/visualizer': minor + '@moonrepo/types': minor + '@moonrepo/report': minor + +declined: + - '@moonrepo/runtime' + - website diff --git a/nextgen/action-graph/src/action_node.rs b/nextgen/action-graph/src/action_node.rs index 365e13ffde5..8c15a04ba7b 100644 --- a/nextgen/action-graph/src/action_node.rs +++ b/nextgen/action-graph/src/action_node.rs @@ -5,6 +5,7 @@ use serde::Serialize; use std::hash::{Hash, Hasher}; #[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(tag = "action", content = "params")] pub enum ActionNode { /// Install tool dependencies in the workspace root. InstallDeps { runtime: Runtime }, diff --git a/nextgen/platform-runtime/src/lib.rs b/nextgen/platform-runtime/src/lib.rs index b3627dc60a5..872419ee011 100644 --- a/nextgen/platform-runtime/src/lib.rs +++ b/nextgen/platform-runtime/src/lib.rs @@ -4,6 +4,7 @@ use std::fmt; use std::hash::{Hash, Hasher}; #[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(untagged)] pub enum RuntimeReq { // Use tool available on PATH Global, diff --git a/packages/types/src/common.ts b/packages/types/src/common.ts index dc18029f2ea..196b6cd03e0 100644 --- a/packages/types/src/common.ts +++ b/packages/types/src/common.ts @@ -8,6 +8,7 @@ export interface Duration { } export interface Runtime { - platform: Capitalize; - version?: string; + platform: PlatformType; + requirement?: string; + overridden?: boolean; } diff --git a/packages/types/src/pipeline.ts b/packages/types/src/pipeline.ts index 22008cecc66..a03a78b5533 100644 --- a/packages/types/src/pipeline.ts +++ b/packages/types/src/pipeline.ts @@ -19,6 +19,7 @@ export interface Attempt { } export interface Action { + allowFailure?: boolean; attempts: Attempt[] | null; createdAt: string; duration: Duration | null; @@ -75,37 +76,52 @@ export interface RunReport { export type ActionNode = | ActionNodeInstallDeps | ActionNodeInstallProjectDeps - | ActionNodeRunPersistentTarget - | ActionNodeRunTarget + | ActionNodeRunTask | ActionNodeSetupTool - | ActionNodeSyncProject; + | ActionNodeSyncProject + | ActionNodeSyncWorkspace; export interface ActionNodeInstallDeps { action: 'InstallDeps'; - params: Runtime; + params: { + runtime: Runtime; + }; } export interface ActionNodeInstallProjectDeps { action: 'InstallProjectDeps'; - params: [Runtime, string]; -} - -export interface ActionNodeRunTarget { - action: 'RunTarget'; - params: [Runtime, string]; + params: { + runtime: Runtime; + project: string; + }; } -export interface ActionNodeRunPersistentTarget { - action: 'RunPersistentTarget'; - params: [Runtime, string]; +export interface ActionNodeRunTask { + action: 'RunTask'; + params: { + interactive: boolean; + persistent: boolean; + runtime: Runtime; + target: string; + }; } export interface ActionNodeSetupTool { action: 'SetupTool'; - params: Runtime; + params: { + runtime: Runtime; + }; } export interface ActionNodeSyncProject { action: 'SyncProject'; - params: [Runtime, string]; + params: { + runtime: Runtime; + project: string; + }; +} + +export interface ActionNodeSyncWorkspace { + action: 'SyncWorkspace'; + params: {}; }