@@ -19701,7 +19701,7 @@ var require_core = __commonJS({
1970119701 return inputs.map((input) => input.trim());
1970219702 }
1970319703 exports.getMultilineInput = getMultilineInput;
19704- function getBooleanInput (name, options) {
19704+ function getBooleanInput2 (name, options) {
1970519705 const trueValue = ["true", "True", "TRUE"];
1970619706 const falseValue = ["false", "False", "FALSE"];
1970719707 const val = getInput2(name, options);
@@ -19712,7 +19712,7 @@ var require_core = __commonJS({
1971219712 throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}
1971319713Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
1971419714 }
19715- exports.getBooleanInput = getBooleanInput ;
19715+ exports.getBooleanInput = getBooleanInput2 ;
1971619716 function setOutput2(name, value) {
1971719717 const filePath = process.env["GITHUB_OUTPUT"] || "";
1971819718 if (filePath) {
@@ -35345,7 +35345,10 @@ var getTurboPlan = async (commit) => {
3534535345 write(chunk, encoding, callback) {
3534635346 }
3534735347 });
35348- const command = `pnpm --silent turbo run build --filter="...[${commit}]" --dry=json`;
35348+ let command = `pnpm --silent turbo run build --dry=json`;
35349+ if (commit) {
35350+ command += ` --filter="...[${commit}]" `;
35351+ }
3534935352 const options = {
3535035353 env: {
3535135354 TURBO_TELEMETRY_DISABLED: "1",
@@ -35413,7 +35416,7 @@ var Client = class {
3541335416 this.token = token.accessToken;
3541435417 return this.token;
3541535418 };
35416- getLatestVersion = async (component, branch) => {
35419+ getLatestVersion = async (component, branch, allowComponentNotFound ) => {
3541735420 const url = `https://api.mach.cloud/organizations/${this.credentials.organization}/projects/${this.credentials.project}/components/${component}/latest?branch=${branch}`;
3541835421 console.log("Request info from " + url);
3541935422 const response = await fetch(url, {
@@ -35422,6 +35425,12 @@ var Client = class {
3542235425 }
3542335426 });
3542435427 if (!response.ok) {
35428+ if (response.status === 404 && allowComponentNotFound) {
35429+ console.warn(
35430+ `Component ${component} not found in branch ${branch}. Continuing without it.`
35431+ );
35432+ return null;
35433+ }
3542535434 console.log(await response.text());
3542635435 throw new Error("Failed to fetch latest version");
3542735436 }
@@ -35451,7 +35460,8 @@ async function run() {
3545135460 core3.info(`Processing ${pkgConfig.name}`);
3545235461 const commitHash = await client.getLatestVersion(
3545335462 pkgConfig.name,
35454- inputs.branch
35463+ inputs.branch,
35464+ inputs.allowComponentNotFound
3545535465 );
3545635466 let affectedPackages = [];
3545735467 if (commitHash) {
@@ -35461,6 +35471,8 @@ async function run() {
3546135471 pkgConfig,
3546235472 inputs.fallbackReference
3546335473 );
35474+ } else if (inputs.allowComponentNotFound) {
35475+ affectedPackages = [pkgConfig.scope];
3546435476 }
3546535477 for (const pkg of affectedPackages) {
3546635478 if (!result.includes(pkg)) {
@@ -35483,7 +35495,8 @@ var readInputs = () => {
3548335495 mccClientID: core3.getInput("mcc_client_id"),
3548435496 mccClientSecret: core3.getInput("mcc_client_secret"),
3548535497 mccOrganization: core3.getInput("mcc_organization"),
35486- mccProject: core3.getInput("mcc_project")
35498+ mccProject: core3.getInput("mcc_project"),
35499+ allowComponentNotFound: core3.getBooleanInput("allow_component_not_found")
3548735500 };
3548835501};
3548935502
0 commit comments