@treeseed/sdk 0.12.7 → 0.12.8
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.
|
@@ -1048,9 +1048,11 @@ export declare function workflowRelease(helpers: WorkflowOperationHelpers, input
|
|
|
1048
1048
|
rootInstall: {
|
|
1049
1049
|
status: string;
|
|
1050
1050
|
reason: string;
|
|
1051
|
+
attempts?: undefined;
|
|
1051
1052
|
} | {
|
|
1052
1053
|
status: string;
|
|
1053
1054
|
reason: null;
|
|
1055
|
+
attempts: number;
|
|
1054
1056
|
};
|
|
1055
1057
|
commit: {
|
|
1056
1058
|
committed: boolean;
|
|
@@ -1933,31 +1933,36 @@ function runReleaseNpmInstall(repoDir, options = {}) {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
const args = repoDir === options.workspaceRoot ? ["install", "--package-lock-only", "--ignore-scripts", "--no-audit", "--no-fund"] : ["install", "--package-lock-only", "--ignore-scripts", "--workspaces=false", "--no-audit", "--no-fund"];
|
|
1935
1935
|
const spawnCommand = npmCommandForWorkflowSpawn(args);
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1936
|
+
let lastDetail = "";
|
|
1937
|
+
for (let attempt = 1; attempt <= 10; attempt += 1) {
|
|
1938
|
+
const result = spawnSync(spawnCommand.command, spawnCommand.args, {
|
|
1939
|
+
cwd: repoDir,
|
|
1940
|
+
env: {
|
|
1941
|
+
...process.env,
|
|
1942
|
+
npm_config_audit: "false",
|
|
1943
|
+
npm_config_fetch_retries: "4",
|
|
1944
|
+
npm_config_fund: "false",
|
|
1945
|
+
npm_config_foreground_scripts: "true",
|
|
1946
|
+
npm_config_loglevel: "warn",
|
|
1947
|
+
npm_config_maxsockets: "4",
|
|
1948
|
+
npm_config_prefer_online: "true",
|
|
1949
|
+
npm_config_progress: "false"
|
|
1950
|
+
},
|
|
1951
|
+
stdio: "pipe",
|
|
1952
|
+
encoding: "utf8"
|
|
1953
|
+
});
|
|
1954
|
+
if (result.status === 0) {
|
|
1955
|
+
return { status: "completed", reason: null, attempts: attempt };
|
|
1956
|
+
}
|
|
1957
|
+
lastDetail = [
|
|
1954
1958
|
result.error?.message,
|
|
1955
1959
|
result.stderr?.trim(),
|
|
1956
1960
|
result.stdout?.trim()
|
|
1957
1961
|
].filter(Boolean).join("\n");
|
|
1958
|
-
|
|
1962
|
+
if (!/No matching version found|notarget|ETARGET|E404/u.test(lastDetail) || attempt === 10) break;
|
|
1963
|
+
spawnSync("sleep", ["30"], { stdio: "ignore" });
|
|
1959
1964
|
}
|
|
1960
|
-
|
|
1965
|
+
throw new Error(lastDetail || `npm ${args.join(" ")} failed`);
|
|
1961
1966
|
}
|
|
1962
1967
|
function pathIsWithin(parent, candidate) {
|
|
1963
1968
|
const path = relative(parent, candidate);
|