@tablation/crew 0.75.2 → 0.75.3
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/cli.js +10 -15
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2571,8 +2571,8 @@ function parseOneRoute(c, where, file, base, stateDir, raw, missing, crewHome, t
|
|
|
2571
2571
|
}
|
|
2572
2572
|
const hasRepos = Object.keys(repoDirs).length > 0;
|
|
2573
2573
|
const reposBasePath = expand(String(c?.reposBasePath ?? raw.ship?.reposBasePath ?? DEFAULT_REPOS_BASE_PATH), base);
|
|
2574
|
-
const dirIsCloneBase = !c?.dir && !hasRepos &&
|
|
2575
|
-
const dir = c?.dir ? expand(String(c.dir), base) : hasRepos ? Object.values(repoDirs)[0] : dirIsCloneBase ? join9(reposBasePath, splitRoute(route)[0]) :
|
|
2574
|
+
const dirIsCloneBase = !c?.dir && !hasRepos && !Array.isArray(c?.repos);
|
|
2575
|
+
const dir = c?.dir ? expand(String(c.dir), base) : hasRepos ? Object.values(repoDirs)[0] : dirIsCloneBase ? join9(reposBasePath, splitRoute(route)[0]) : "";
|
|
2576
2576
|
const weight = c?.weight === void 0 ? void 0 : Number(c.weight);
|
|
2577
2577
|
if (weight !== void 0 && !(Number.isFinite(weight) && weight > 0)) {
|
|
2578
2578
|
missing.add(`${where}.weight must be a positive number (got "${c?.weight}")`);
|
|
@@ -10846,7 +10846,7 @@ function renderShipBlock(a) {
|
|
|
10846
10846
|
agent: { bin: a.agentBin },
|
|
10847
10847
|
...a.extraPath ? { extraPath: a.extraPath } : {}
|
|
10848
10848
|
}
|
|
10849
|
-
});
|
|
10849
|
+
}, { lineWidth: 0 });
|
|
10850
10850
|
}
|
|
10851
10851
|
function renderFullConfig(a, routeBlock) {
|
|
10852
10852
|
return `${renderShipBlock(a)}
|
|
@@ -13967,23 +13967,18 @@ async function createOperatorRow(o, found) {
|
|
|
13967
13967
|
}
|
|
13968
13968
|
}
|
|
13969
13969
|
function renderConnection(d, route, dir, opts = {}) {
|
|
13970
|
-
const apiKeyFileLine = opts.keychainBacked ?
|
|
13970
|
+
const apiKeyFileLine = opts.keychainBacked ? "" : opts.apiKeyFile ? ` apiKeyFile: "${opts.apiKeyFile}"` : ` apiKeyFile: "REPLACE \u2014 a file holding this workspace's key"`;
|
|
13971
13971
|
const apiKeyVarLine = opts.keychainBacked ? "" : opts.apiKeyVar ? `
|
|
13972
13972
|
apiKeyVar: ${opts.apiKeyVar}` : `
|
|
13973
13973
|
apiKeyVar: REPLACE_KEY_VAR`;
|
|
13974
|
+
const baseUrlLine = opts.baseUrl ? opts.baseUrl.replace(/\/+$/, "") === DEFAULT_BASE_URL ? "" : ` baseUrl: "${opts.baseUrl}"
|
|
13975
|
+
` : ' baseUrl: "REPLACE \u2014 the same baseUrl as your other routes"\n';
|
|
13976
|
+
const keyLines = [apiKeyFileLine, apiKeyVarLine.replace(/^\n/, "")].filter(Boolean).join("\n");
|
|
13974
13977
|
return ` - route: ${route}
|
|
13975
|
-
enabled: false #
|
|
13978
|
+
enabled: false # set to true once \`crew doctor\` is green
|
|
13976
13979
|
${opts.area ? ` area: "${opts.area}"
|
|
13977
|
-
` : ""}
|
|
13978
|
-
|
|
13979
|
-
# directory name (ISSUE-400). Only set this if every repo this route
|
|
13980
|
-
# serves genuinely wants the SAME prefix, which is rare once an area has
|
|
13981
|
-
# more than one repo.
|
|
13982
|
-
# What a host must be to build this \u2014 unix, macos, linux, or windows \u2014
|
|
13983
|
-
# belongs in each repo's own .crew.yaml, not here (see docs/REPO_SPEC.md).
|
|
13984
|
-
baseUrl: ${opts.baseUrl ? `"${opts.baseUrl}"` : '"REPLACE \u2014 the same baseUrl as your other routes"'}
|
|
13985
|
-
${opts.hostPassengers ? " hostPassengers: true\n" : ""}${apiKeyFileLine}${apiKeyVarLine}
|
|
13986
|
-
`;
|
|
13980
|
+
` : ""}${dir === null ? "" : ` dir: "${dir}"
|
|
13981
|
+
`}${baseUrlLine}${opts.hostPassengers ? " hostPassengers: true\n" : ""}${keyLines ? keyLines + "\n" : ""}`;
|
|
13987
13982
|
}
|
|
13988
13983
|
|
|
13989
13984
|
// src/cli.ts
|
package/package.json
CHANGED