@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.cjs
CHANGED
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
@@ -1084,7 +1084,7 @@ function normalizeHostConfigValue(field, value) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
if (field === "Tmpfs" && value && typeof value === "object" && !Array.isArray(value)) {
|
|
1086
1086
|
if (Object.keys(value).length === 0) return void 0;
|
|
1087
|
-
return Object.fromEntries(Object.entries(value).sort(([a], [b]) => a.localeCompare(b)).map(([path
|
|
1087
|
+
return Object.fromEntries(Object.entries(value).sort(([a], [b]) => a.localeCompare(b)).map(([path, options]) => [path, typeof options === "string" ? normalizeTmpfsOptions(options) : options]));
|
|
1088
1088
|
}
|
|
1089
1089
|
if (Array.isArray(value)) {
|
|
1090
1090
|
if (field === "Ulimits" && value.length === 0) return void 0;
|
|
@@ -1375,7 +1375,7 @@ const dockerSandboxProvider = {
|
|
|
1375
1375
|
* module normalizes both into {@link DockerTemplateBuildEvent}s and keeps a
|
|
1376
1376
|
* bounded tail of raw output for failure diagnostics.
|
|
1377
1377
|
*/
|
|
1378
|
-
const DEFAULT_MAX_OUTPUT_BYTES =
|
|
1378
|
+
const DEFAULT_MAX_OUTPUT_BYTES = 65536;
|
|
1379
1379
|
/** Keeps at most `maxBytes` (UTF-8) of the most recent text. */
|
|
1380
1380
|
var BoundedTail = class {
|
|
1381
1381
|
#maxBytes;
|
|
@@ -1927,9 +1927,7 @@ function synthesizeDockerfile(definition) {
|
|
|
1927
1927
|
case "pipInstall":
|
|
1928
1928
|
lines.push(renderPipInstall(operation.args[0], operation.args[1]));
|
|
1929
1929
|
break;
|
|
1930
|
-
case "npmInstall":
|
|
1931
|
-
lines.push(renderNpmInstall(operation.args[0], operation.args[1]));
|
|
1932
|
-
break;
|
|
1930
|
+
case "npmInstall": lines.push(renderNpmInstall(operation.args[0], operation.args[1]));
|
|
1933
1931
|
}
|
|
1934
1932
|
});
|
|
1935
1933
|
return `${lines.join("\n")}\n`;
|
|
@@ -2014,7 +2012,7 @@ function templateImageTag(definition) {
|
|
|
2014
2012
|
* ```
|
|
2015
2013
|
*/
|
|
2016
2014
|
const MAX_OPERATIONS = 256;
|
|
2017
|
-
const MAX_STRING_LENGTH =
|
|
2015
|
+
const MAX_STRING_LENGTH = 32768;
|
|
2018
2016
|
const MAX_COLLECTION_ITEMS = 512;
|
|
2019
2017
|
/**
|
|
2020
2018
|
* Immutable, chainable builder + build/lifecycle for a local Docker template.
|
|
@@ -2561,11 +2559,18 @@ const REPO_DIR_PATTERN = /^[\w.-]+$/;
|
|
|
2561
2559
|
function guardedSetupCommand({ repoDir, command, continueOnFailure }) {
|
|
2562
2560
|
if (!REPO_DIR_PATTERN.test(repoDir)) throw new TypeError(`Repository directory "${repoDir}" must match ${REPO_DIR_PATTERN}.`);
|
|
2563
2561
|
if (!continueOnFailure) return `cd "${repoDir}" && ${command}`;
|
|
2564
|
-
return `( cd "${repoDir}" && sh -c ${shellQuote$
|
|
2562
|
+
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}"; }`;
|
|
2565
2563
|
}
|
|
2566
|
-
function shellQuote$
|
|
2564
|
+
function shellQuote$2(value) {
|
|
2567
2565
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
2568
2566
|
}
|
|
2567
|
+
const { notFound, isDirectory, exists, notDirectory, destIsDirectory } = {
|
|
2568
|
+
notFound: 20,
|
|
2569
|
+
isDirectory: 21,
|
|
2570
|
+
exists: 22,
|
|
2571
|
+
notDirectory: 23,
|
|
2572
|
+
destIsDirectory: 24
|
|
2573
|
+
};
|
|
2569
2574
|
//#endregion
|
|
2570
2575
|
//#region src/template/repo-template.ts
|
|
2571
2576
|
/**
|