@mastra/docker 0.12.0-alpha.2 → 0.12.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/dist/index.cjs +14 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1350,7 +1350,7 @@ const dockerSandboxProvider = {
|
|
|
1350
1350
|
* module normalizes both into {@link DockerTemplateBuildEvent}s and keeps a
|
|
1351
1351
|
* bounded tail of raw output for failure diagnostics.
|
|
1352
1352
|
*/
|
|
1353
|
-
const DEFAULT_MAX_OUTPUT_BYTES =
|
|
1353
|
+
const DEFAULT_MAX_OUTPUT_BYTES = 65536;
|
|
1354
1354
|
/** Keeps at most `maxBytes` (UTF-8) of the most recent text. */
|
|
1355
1355
|
var BoundedTail = class {
|
|
1356
1356
|
#maxBytes;
|
|
@@ -1902,9 +1902,7 @@ function synthesizeDockerfile(definition) {
|
|
|
1902
1902
|
case "pipInstall":
|
|
1903
1903
|
lines.push(renderPipInstall(operation.args[0], operation.args[1]));
|
|
1904
1904
|
break;
|
|
1905
|
-
case "npmInstall":
|
|
1906
|
-
lines.push(renderNpmInstall(operation.args[0], operation.args[1]));
|
|
1907
|
-
break;
|
|
1905
|
+
case "npmInstall": lines.push(renderNpmInstall(operation.args[0], operation.args[1]));
|
|
1908
1906
|
}
|
|
1909
1907
|
});
|
|
1910
1908
|
return `${lines.join("\n")}\n`;
|
|
@@ -1989,7 +1987,7 @@ function templateImageTag(definition) {
|
|
|
1989
1987
|
* ```
|
|
1990
1988
|
*/
|
|
1991
1989
|
const MAX_OPERATIONS = 256;
|
|
1992
|
-
const MAX_STRING_LENGTH =
|
|
1990
|
+
const MAX_STRING_LENGTH = 32768;
|
|
1993
1991
|
const MAX_COLLECTION_ITEMS = 512;
|
|
1994
1992
|
/**
|
|
1995
1993
|
* Immutable, chainable builder + build/lifecycle for a local Docker template.
|
|
@@ -2536,11 +2534,18 @@ const REPO_DIR_PATTERN = /^[\w.-]+$/;
|
|
|
2536
2534
|
function guardedSetupCommand({ repoDir, command, continueOnFailure }) {
|
|
2537
2535
|
if (!REPO_DIR_PATTERN.test(repoDir)) throw new TypeError(`Repository directory "${repoDir}" must match ${REPO_DIR_PATTERN}.`);
|
|
2538
2536
|
if (!continueOnFailure) return `cd "${repoDir}" && ${command}`;
|
|
2539
|
-
return `( cd "${repoDir}" && sh -c ${shellQuote$
|
|
2537
|
+
return `( cd "${repoDir}" && sh -c ${shellQuote$2(command)} ) || { mkdir -p "${SETUP_MARKER_DIR}" && grep -qxF -- '${repoDir}' "${SETUP_FAILED_MARKER_PATH}" 2>/dev/null || printf '%s\\n' '${repoDir}' >> "${SETUP_FAILED_MARKER_PATH}"; }`;
|
|
2540
2538
|
}
|
|
2541
|
-
function shellQuote$
|
|
2539
|
+
function shellQuote$2(value) {
|
|
2542
2540
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
2543
2541
|
}
|
|
2542
|
+
const { notFound, isDirectory, exists, notDirectory, destIsDirectory } = {
|
|
2543
|
+
notFound: 20,
|
|
2544
|
+
isDirectory: 21,
|
|
2545
|
+
exists: 22,
|
|
2546
|
+
notDirectory: 23,
|
|
2547
|
+
destIsDirectory: 24
|
|
2548
|
+
};
|
|
2544
2549
|
//#endregion
|
|
2545
2550
|
//#region src/template/repo-template.ts
|
|
2546
2551
|
/**
|