diff --git a/libs/core/src/components/hero/hero.tsx b/libs/core/src/components/hero/hero.tsx index 2c18dedb..bb047616 100644 --- a/libs/core/src/components/hero/hero.tsx +++ b/libs/core/src/components/hero/hero.tsx @@ -27,7 +27,7 @@ import blurCyanImage from '../../images/blur-cyan.png'; import blurIndigoImage from '../../images/blur-indigo.png'; const codeLanguage: Language = 'yaml'; -const code = `schemaVersion: 2.2.0 +const code = `schemaVersion: 2.3.0 metadata: name: go language: go diff --git a/libs/core/src/types/devfile-spec.ts b/libs/core/src/types/devfile-spec.ts index 19f9ae9d..ab46e8b4 100644 --- a/libs/core/src/types/devfile-spec.ts +++ b/libs/core/src/types/devfile-spec.ts @@ -25,6 +25,11 @@ export interface DevfileSpec { * containers, or other types of components */ components?: DevfileSpecComponent[]; + /** + * Additional projects related to the main project in the devfile, contianing names and + * sources locations + */ + dependentProjects?: DevfileSpecDependentProject[]; /** * Bindings of commands to events. Each command is referred-to by its name. */ @@ -801,6 +806,77 @@ export interface PurpleVolume { size?: string; } +export interface DevfileSpecDependentProject { + /** + * Map of implementation-dependant free-form YAML attributes. + */ + attributes?: { [key: string]: any }; + /** + * Path relative to the root of the projects to which this project should be cloned into. + * This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it + * is absolute or tries to escape the project root through the usage of '..'. If not + * specified, defaults to the project name. + */ + clonePath?: string; + /** + * Project's Git source + */ + git?: FluffyGit; + /** + * Project name + */ + name: string; + /** + * Project's Zip source + */ + zip?: PurpleZip; +} + +/** + * Project's Git source + */ +export interface FluffyGit { + /** + * Defines from what the project should be checked out. Required if there are more than one + * remote configured + */ + checkoutFrom?: FluffyCheckoutFrom; + /** + * The remotes map which should be initialized in the git project. Projects must have at + * least one remote configured while StarterProjects & Image Component's Git source can only + * have at most one remote configured. + */ + remotes: { [key: string]: string }; +} + +/** + * Defines from what the project should be checked out. Required if there are more than one + * remote configured + */ +export interface FluffyCheckoutFrom { + /** + * The remote name should be used as init. Required if there are more than one remote + * configured + */ + remote?: string; + /** + * The revision to checkout from. Should be branch name, tag or commit id. Default branch is + * used if missing or specified revision is not found. + */ + revision?: string; +} + +/** + * Project's Zip source + */ +export interface PurpleZip { + /** + * Zip project's source location address. Should be file path of the archive, e.g. + * file://$FILE_PATH + */ + location?: string; +} + /** * Bindings of commands to events. Each command is referred-to by its name. */ @@ -921,6 +997,11 @@ export interface Parent { * according to K8S strategic merge patch standard rules. */ components?: ParentComponent[]; + /** + * Overrides of dependentProjects encapsulated in a parent devfile. Overriding is done + * according to K8S strategic merge patch standard rules. + */ + dependentProjects?: ParentDependentProject[]; /** * Id in a registry that contains a Devfile yaml file */ @@ -1393,7 +1474,7 @@ export interface FluffyDockerfile { /** * Dockerfile's Git source */ - git?: FluffyGit; + git?: TentacledGit; /** * Specify if a privileged builder pod is required. * @@ -1428,12 +1509,12 @@ export interface FluffyDevfileRegistry { /** * Dockerfile's Git source */ -export interface FluffyGit { +export interface TentacledGit { /** * Defines from what the project should be checked out. Required if there are more than one * remote configured */ - checkoutFrom?: FluffyCheckoutFrom; + checkoutFrom?: TentacledCheckoutFrom; /** * Location of the Dockerfile in the Git repository when using git as Dockerfile src. * Defaults to Dockerfile. @@ -1451,7 +1532,7 @@ export interface FluffyGit { * Defines from what the project should be checked out. Required if there are more than one * remote configured */ -export interface FluffyCheckoutFrom { +export interface TentacledCheckoutFrom { /** * The remote name should be used as init. Required if there are more than one remote * configured @@ -1644,6 +1725,77 @@ export interface FluffyVolume { size?: string; } +export interface ParentDependentProject { + /** + * Map of implementation-dependant free-form YAML attributes. + */ + attributes?: { [key: string]: any }; + /** + * Path relative to the root of the projects to which this project should be cloned into. + * This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it + * is absolute or tries to escape the project root through the usage of '..'. If not + * specified, defaults to the project name. + */ + clonePath?: string; + /** + * Project's Git source + */ + git?: StickyGit; + /** + * Project name + */ + name: string; + /** + * Project's Zip source + */ + zip?: FluffyZip; +} + +/** + * Project's Git source + */ +export interface StickyGit { + /** + * Defines from what the project should be checked out. Required if there are more than one + * remote configured + */ + checkoutFrom?: StickyCheckoutFrom; + /** + * The remotes map which should be initialized in the git project. Projects must have at + * least one remote configured while StarterProjects & Image Component's Git source can only + * have at most one remote configured. + */ + remotes?: { [key: string]: string }; +} + +/** + * Defines from what the project should be checked out. Required if there are more than one + * remote configured + */ +export interface StickyCheckoutFrom { + /** + * The remote name should be used as init. Required if there are more than one remote + * configured + */ + remote?: string; + /** + * The revision to checkout from. Should be branch name, tag or commit id. Default branch is + * used if missing or specified revision is not found. + */ + revision?: string; +} + +/** + * Project's Zip source + */ +export interface FluffyZip { + /** + * Zip project's source location address. Should be file path of the archive, e.g. + * file://$FILE_PATH + */ + location?: string; +} + /** * Reference to a Kubernetes CRD of type DevWorkspaceTemplate */ @@ -1667,7 +1819,7 @@ export interface ParentProject { /** * Project's Git source */ - git?: TentacledGit; + git?: IndigoGit; /** * Project name */ @@ -1675,18 +1827,18 @@ export interface ParentProject { /** * Project's Zip source */ - zip?: PurpleZip; + zip?: TentacledZip; } /** * Project's Git source */ -export interface TentacledGit { +export interface IndigoGit { /** * Defines from what the project should be checked out. Required if there are more than one * remote configured */ - checkoutFrom?: TentacledCheckoutFrom; + checkoutFrom?: IndigoCheckoutFrom; /** * The remotes map which should be initialized in the git project. Projects must have at * least one remote configured while StarterProjects & Image Component's Git source can only @@ -1699,7 +1851,7 @@ export interface TentacledGit { * Defines from what the project should be checked out. Required if there are more than one * remote configured */ -export interface TentacledCheckoutFrom { +export interface IndigoCheckoutFrom { /** * The remote name should be used as init. Required if there are more than one remote * configured @@ -1715,7 +1867,7 @@ export interface TentacledCheckoutFrom { /** * Project's Zip source */ -export interface PurpleZip { +export interface TentacledZip { /** * Zip project's source location address. Should be file path of the archive, e.g. * file://$FILE_PATH @@ -1735,7 +1887,7 @@ export interface ParentStarterProject { /** * Project's Git source */ - git?: StickyGit; + git?: IndecentGit; /** * Project name */ @@ -1747,18 +1899,18 @@ export interface ParentStarterProject { /** * Project's Zip source */ - zip?: FluffyZip; + zip?: StickyZip; } /** * Project's Git source */ -export interface StickyGit { +export interface IndecentGit { /** * Defines from what the project should be checked out. Required if there are more than one * remote configured */ - checkoutFrom?: StickyCheckoutFrom; + checkoutFrom?: IndecentCheckoutFrom; /** * The remotes map which should be initialized in the git project. Projects must have at * least one remote configured while StarterProjects & Image Component's Git source can only @@ -1771,7 +1923,7 @@ export interface StickyGit { * Defines from what the project should be checked out. Required if there are more than one * remote configured */ -export interface StickyCheckoutFrom { +export interface IndecentCheckoutFrom { /** * The remote name should be used as init. Required if there are more than one remote * configured @@ -1787,7 +1939,7 @@ export interface StickyCheckoutFrom { /** * Project's Zip source */ -export interface FluffyZip { +export interface StickyZip { /** * Zip project's source location address. Should be file path of the archive, e.g. * file://$FILE_PATH @@ -1810,7 +1962,7 @@ export interface DevfileSpecProject { /** * Project's Git source */ - git?: IndigoGit; + git?: HilariousGit; /** * Project name */ @@ -1818,18 +1970,18 @@ export interface DevfileSpecProject { /** * Project's Zip source */ - zip?: TentacledZip; + zip?: IndigoZip; } /** * Project's Git source */ -export interface IndigoGit { +export interface HilariousGit { /** * Defines from what the project should be checked out. Required if there are more than one * remote configured */ - checkoutFrom?: IndigoCheckoutFrom; + checkoutFrom?: HilariousCheckoutFrom; /** * The remotes map which should be initialized in the git project. Projects must have at * least one remote configured while StarterProjects & Image Component's Git source can only @@ -1842,7 +1994,7 @@ export interface IndigoGit { * Defines from what the project should be checked out. Required if there are more than one * remote configured */ -export interface IndigoCheckoutFrom { +export interface HilariousCheckoutFrom { /** * The remote name should be used as init. Required if there are more than one remote * configured @@ -1858,7 +2010,7 @@ export interface IndigoCheckoutFrom { /** * Project's Zip source */ -export interface TentacledZip { +export interface IndigoZip { /** * Zip project's source location address. Should be file path of the archive, e.g. * file://$FILE_PATH @@ -1878,7 +2030,7 @@ export interface DevfileSpecStarterProject { /** * Project's Git source */ - git?: IndecentGit; + git?: AmbitiousGit; /** * Project name */ @@ -1890,18 +2042,18 @@ export interface DevfileSpecStarterProject { /** * Project's Zip source */ - zip?: StickyZip; + zip?: IndecentZip; } /** * Project's Git source */ -export interface IndecentGit { +export interface AmbitiousGit { /** * Defines from what the project should be checked out. Required if there are more than one * remote configured */ - checkoutFrom?: IndecentCheckoutFrom; + checkoutFrom?: AmbitiousCheckoutFrom; /** * The remotes map which should be initialized in the git project. Projects must have at * least one remote configured while StarterProjects & Image Component's Git source can only @@ -1914,7 +2066,7 @@ export interface IndecentGit { * Defines from what the project should be checked out. Required if there are more than one * remote configured */ -export interface IndecentCheckoutFrom { +export interface AmbitiousCheckoutFrom { /** * The remote name should be used as init. Required if there are more than one remote * configured @@ -1930,7 +2082,7 @@ export interface IndecentCheckoutFrom { /** * Project's Zip source */ -export interface StickyZip { +export interface IndecentZip { /** * Zip project's source location address. Should be file path of the archive, e.g. * file://$FILE_PATH @@ -2107,6 +2259,7 @@ const typeMap: any = { { json: "attributes", js: "attributes", typ: u(undefined, m("any")) }, { json: "commands", js: "commands", typ: u(undefined, a(r("DevfileSpecCommand"))) }, { json: "components", js: "components", typ: u(undefined, a(r("DevfileSpecComponent"))) }, + { json: "dependentProjects", js: "dependentProjects", typ: u(undefined, a(r("DevfileSpecDependentProject"))) }, { json: "events", js: "events", typ: u(undefined, r("Events")) }, { json: "metadata", js: "metadata", typ: u(undefined, r("Metadata")) }, { json: "parent", js: "parent", typ: u(undefined, r("Parent")) }, @@ -2267,6 +2420,24 @@ const typeMap: any = { { json: "ephemeral", js: "ephemeral", typ: u(undefined, true) }, { json: "size", js: "size", typ: u(undefined, "") }, ], false), + "DevfileSpecDependentProject": o([ + { json: "attributes", js: "attributes", typ: u(undefined, m("any")) }, + { json: "clonePath", js: "clonePath", typ: u(undefined, "") }, + { json: "git", js: "git", typ: u(undefined, r("FluffyGit")) }, + { json: "name", js: "name", typ: "" }, + { json: "zip", js: "zip", typ: u(undefined, r("PurpleZip")) }, + ], false), + "FluffyGit": o([ + { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("FluffyCheckoutFrom")) }, + { json: "remotes", js: "remotes", typ: m("") }, + ], false), + "FluffyCheckoutFrom": o([ + { json: "remote", js: "remote", typ: u(undefined, "") }, + { json: "revision", js: "revision", typ: u(undefined, "") }, + ], false), + "PurpleZip": o([ + { json: "location", js: "location", typ: u(undefined, "") }, + ], false), "Events": o([ { json: "postStart", js: "postStart", typ: u(undefined, a("")) }, { json: "postStop", js: "postStop", typ: u(undefined, a("")) }, @@ -2293,6 +2464,7 @@ const typeMap: any = { { json: "attributes", js: "attributes", typ: u(undefined, m("any")) }, { json: "commands", js: "commands", typ: u(undefined, a(r("ParentCommand"))) }, { json: "components", js: "components", typ: u(undefined, a(r("ParentComponent"))) }, + { json: "dependentProjects", js: "dependentProjects", typ: u(undefined, a(r("ParentDependentProject"))) }, { json: "id", js: "id", typ: u(undefined, "") }, { json: "kubernetes", js: "kubernetes", typ: u(undefined, r("ParentKubernetes")) }, { json: "projects", js: "projects", typ: u(undefined, a(r("ParentProject"))) }, @@ -2401,7 +2573,7 @@ const typeMap: any = { { json: "args", js: "args", typ: u(undefined, a("")) }, { json: "buildContext", js: "buildContext", typ: u(undefined, "") }, { json: "devfileRegistry", js: "devfileRegistry", typ: u(undefined, r("FluffyDevfileRegistry")) }, - { json: "git", js: "git", typ: u(undefined, r("FluffyGit")) }, + { json: "git", js: "git", typ: u(undefined, r("TentacledGit")) }, { json: "rootRequired", js: "rootRequired", typ: u(undefined, true) }, { json: "uri", js: "uri", typ: u(undefined, "") }, ], false), @@ -2409,12 +2581,12 @@ const typeMap: any = { { json: "id", js: "id", typ: u(undefined, "") }, { json: "registryUrl", js: "registryUrl", typ: u(undefined, "") }, ], false), - "FluffyGit": o([ - { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("FluffyCheckoutFrom")) }, + "TentacledGit": o([ + { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("TentacledCheckoutFrom")) }, { json: "fileLocation", js: "fileLocation", typ: u(undefined, "") }, { json: "remotes", js: "remotes", typ: u(undefined, m("")) }, ], false), - "FluffyCheckoutFrom": o([ + "TentacledCheckoutFrom": o([ { json: "remote", js: "remote", typ: u(undefined, "") }, { json: "revision", js: "revision", typ: u(undefined, "") }, ], false), @@ -2454,6 +2626,24 @@ const typeMap: any = { { json: "ephemeral", js: "ephemeral", typ: u(undefined, true) }, { json: "size", js: "size", typ: u(undefined, "") }, ], false), + "ParentDependentProject": o([ + { json: "attributes", js: "attributes", typ: u(undefined, m("any")) }, + { json: "clonePath", js: "clonePath", typ: u(undefined, "") }, + { json: "git", js: "git", typ: u(undefined, r("StickyGit")) }, + { json: "name", js: "name", typ: "" }, + { json: "zip", js: "zip", typ: u(undefined, r("FluffyZip")) }, + ], false), + "StickyGit": o([ + { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("StickyCheckoutFrom")) }, + { json: "remotes", js: "remotes", typ: u(undefined, m("")) }, + ], false), + "StickyCheckoutFrom": o([ + { json: "remote", js: "remote", typ: u(undefined, "") }, + { json: "revision", js: "revision", typ: u(undefined, "") }, + ], false), + "FluffyZip": o([ + { json: "location", js: "location", typ: u(undefined, "") }, + ], false), "ParentKubernetes": o([ { json: "name", js: "name", typ: "" }, { json: "namespace", js: "namespace", typ: u(undefined, "") }, @@ -2461,75 +2651,75 @@ const typeMap: any = { "ParentProject": o([ { json: "attributes", js: "attributes", typ: u(undefined, m("any")) }, { json: "clonePath", js: "clonePath", typ: u(undefined, "") }, - { json: "git", js: "git", typ: u(undefined, r("TentacledGit")) }, + { json: "git", js: "git", typ: u(undefined, r("IndigoGit")) }, { json: "name", js: "name", typ: "" }, - { json: "zip", js: "zip", typ: u(undefined, r("PurpleZip")) }, + { json: "zip", js: "zip", typ: u(undefined, r("TentacledZip")) }, ], false), - "TentacledGit": o([ - { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("TentacledCheckoutFrom")) }, + "IndigoGit": o([ + { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("IndigoCheckoutFrom")) }, { json: "remotes", js: "remotes", typ: u(undefined, m("")) }, ], false), - "TentacledCheckoutFrom": o([ + "IndigoCheckoutFrom": o([ { json: "remote", js: "remote", typ: u(undefined, "") }, { json: "revision", js: "revision", typ: u(undefined, "") }, ], false), - "PurpleZip": o([ + "TentacledZip": o([ { json: "location", js: "location", typ: u(undefined, "") }, ], false), "ParentStarterProject": o([ { json: "attributes", js: "attributes", typ: u(undefined, m("any")) }, { json: "description", js: "description", typ: u(undefined, "") }, - { json: "git", js: "git", typ: u(undefined, r("StickyGit")) }, + { json: "git", js: "git", typ: u(undefined, r("IndecentGit")) }, { json: "name", js: "name", typ: "" }, { json: "subDir", js: "subDir", typ: u(undefined, "") }, - { json: "zip", js: "zip", typ: u(undefined, r("FluffyZip")) }, + { json: "zip", js: "zip", typ: u(undefined, r("StickyZip")) }, ], false), - "StickyGit": o([ - { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("StickyCheckoutFrom")) }, + "IndecentGit": o([ + { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("IndecentCheckoutFrom")) }, { json: "remotes", js: "remotes", typ: u(undefined, m("")) }, ], false), - "StickyCheckoutFrom": o([ + "IndecentCheckoutFrom": o([ { json: "remote", js: "remote", typ: u(undefined, "") }, { json: "revision", js: "revision", typ: u(undefined, "") }, ], false), - "FluffyZip": o([ + "StickyZip": o([ { json: "location", js: "location", typ: u(undefined, "") }, ], false), "DevfileSpecProject": o([ { json: "attributes", js: "attributes", typ: u(undefined, m("any")) }, { json: "clonePath", js: "clonePath", typ: u(undefined, "") }, - { json: "git", js: "git", typ: u(undefined, r("IndigoGit")) }, + { json: "git", js: "git", typ: u(undefined, r("HilariousGit")) }, { json: "name", js: "name", typ: "" }, - { json: "zip", js: "zip", typ: u(undefined, r("TentacledZip")) }, + { json: "zip", js: "zip", typ: u(undefined, r("IndigoZip")) }, ], false), - "IndigoGit": o([ - { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("IndigoCheckoutFrom")) }, + "HilariousGit": o([ + { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("HilariousCheckoutFrom")) }, { json: "remotes", js: "remotes", typ: m("") }, ], false), - "IndigoCheckoutFrom": o([ + "HilariousCheckoutFrom": o([ { json: "remote", js: "remote", typ: u(undefined, "") }, { json: "revision", js: "revision", typ: u(undefined, "") }, ], false), - "TentacledZip": o([ + "IndigoZip": o([ { json: "location", js: "location", typ: u(undefined, "") }, ], false), "DevfileSpecStarterProject": o([ { json: "attributes", js: "attributes", typ: u(undefined, m("any")) }, { json: "description", js: "description", typ: u(undefined, "") }, - { json: "git", js: "git", typ: u(undefined, r("IndecentGit")) }, + { json: "git", js: "git", typ: u(undefined, r("AmbitiousGit")) }, { json: "name", js: "name", typ: "" }, { json: "subDir", js: "subDir", typ: u(undefined, "") }, - { json: "zip", js: "zip", typ: u(undefined, r("StickyZip")) }, + { json: "zip", js: "zip", typ: u(undefined, r("IndecentZip")) }, ], false), - "IndecentGit": o([ - { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("IndecentCheckoutFrom")) }, + "AmbitiousGit": o([ + { json: "checkoutFrom", js: "checkoutFrom", typ: u(undefined, r("AmbitiousCheckoutFrom")) }, { json: "remotes", js: "remotes", typ: m("") }, ], false), - "IndecentCheckoutFrom": o([ + "AmbitiousCheckoutFrom": o([ { json: "remote", js: "remote", typ: u(undefined, "") }, { json: "revision", js: "revision", typ: u(undefined, "") }, ], false), - "StickyZip": o([ + "IndecentZip": o([ { json: "location", js: "location", typ: u(undefined, "") }, ], false), "Kind": [