@dev.sail.money/sailor 1.2.1-204 → 1.2.1-205

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev.sail.money/sailor",
3
- "version": "1.2.1-204",
3
+ "version": "1.2.1-205",
4
4
  "description": "Operator toolkit for Sail Protocol",
5
5
  "bin": {
6
6
  "sailor": "packages/cli/dist/index.cjs"
@@ -38519,7 +38519,8 @@ var import_websocket2 = __toESM(require_websocket2(), 1);
38519
38519
  var import_websocket_server2 = __toESM(require_websocket_server2(), 1);
38520
38520
 
38521
38521
  // src/signing/server.ts
38522
- var DEFAULT_SIGNING_PORT = Number(process.env.SAILOR_STATION_PORT ?? 3141);
38522
+ var _signingPort = parseInt(process.env.SAILOR_STATION_PORT ?? "", 10);
38523
+ var DEFAULT_SIGNING_PORT = Number.isFinite(_signingPort) && _signingPort >= 1 && _signingPort <= 65535 ? _signingPort : 3141;
38523
38524
  var RUNTIME_SUBDIR = (0, import_node_path4.join)(".sail", "runtime");
38524
38525
  var SERVER_STATE_FILE = "server.json";
38525
38526
  var REQUEST_SECRET_HEADER = "x-sailor-secret";
@@ -40694,7 +40695,8 @@ function scaffoldProjectWorkspace(dest, name, options) {
40694
40695
  import_node_fs9.default.mkdirSync(import_node_path8.default.join(sailDir2, "runtime"), { recursive: true });
40695
40696
  import_node_fs9.default.mkdirSync(import_node_path8.default.join(sailDir2, "state"), { recursive: true });
40696
40697
  const installMode = process.env.SAILOR_INSTALL_MODE === "docker" ? "docker" : "local";
40697
- const containerName = process.env.SAILOR_CONTAINER_NAME ?? "agent";
40698
+ const _rawContainerName = process.env.SAILOR_CONTAINER_NAME ?? "agent";
40699
+ const containerName = /^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/.test(_rawContainerName) ? _rawContainerName : "agent";
40698
40700
  import_node_fs9.default.writeFileSync(
40699
40701
  import_node_path8.default.join(sailDir2, "config.json"),
40700
40702
  `${JSON.stringify(
@@ -41030,7 +41032,8 @@ async function updateCommand() {
41030
41032
  try {
41031
41033
  const config = JSON.parse(import_node_fs10.default.readFileSync(configPath, "utf-8"));
41032
41034
  const newMode = process.env.SAILOR_INSTALL_MODE === "docker" ? "docker" : "local";
41033
- const containerName = process.env.SAILOR_CONTAINER_NAME ?? "agent";
41035
+ const _rawContainerName = process.env.SAILOR_CONTAINER_NAME ?? "agent";
41036
+ const containerName = /^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/.test(_rawContainerName) ? _rawContainerName : "agent";
41034
41037
  if (config.installMode !== newMode) {
41035
41038
  const previousMode = config.installMode;
41036
41039
  const previousContainer = config.containerName;
@@ -41058,6 +41061,7 @@ Switched to Docker install (container: ${containerName}).`);
41058
41061
  `, "utf-8");
41059
41062
  }
41060
41063
  } catch {
41064
+ console.warn("Warning: could not update install mode in .sail/config.json");
41061
41065
  }
41062
41066
  if (removed.length === 0 && updated.length === 0 && added.length === 0) {
41063
41067
  console.log("Nothing to update.");
@@ -45211,7 +45215,8 @@ async function uiCommand() {
45211
45215
  const serverBundle = import_node_path16.default.resolve(distDir, "server.cjs");
45212
45216
  const projectRoot = process.cwd();
45213
45217
  const sailDir2 = import_node_path16.default.join(projectRoot, ".sail");
45214
- const port = await findFreePort(process.env.PORT ? Number(process.env.PORT) : projectPort(projectRoot));
45218
+ const envPort = Number(process.env.PORT);
45219
+ const port = await findFreePort(Number.isInteger(envPort) && envPort > 0 ? envPort : projectPort(projectRoot));
45215
45220
  if (!import_node_fs20.default.existsSync(serverBundle)) {
45216
45221
  throw new Error(`Server bundle not found at ${serverBundle}. Re-run the sailor build.`);
45217
45222
  }
@@ -5,7 +5,7 @@
5
5
  * Do not edit manually — run `pnpm build` to regenerate.
6
6
  *
7
7
  * Spec version : 1.2.0
8
- * Generated at : 2026-06-20T19:09:38.935Z
8
+ * Generated at : 2026-06-22T17:36:05.564Z
9
9
  */
10
10
  export declare const SAIL_INTELLIGENCE_BASE_URL = "https://api.sail.money";
11
11
  export declare const SAIL_INTELLIGENCE_DOCS_URL = "https://api.sail.money/docs";
@@ -5,7 +5,7 @@
5
5
  * Do not edit manually — run `pnpm build` to regenerate.
6
6
  *
7
7
  * Spec version : 1.2.0
8
- * Generated at : 2026-06-20T19:09:38.935Z
8
+ * Generated at : 2026-06-22T17:36:05.564Z
9
9
  */
10
10
  export const SAIL_INTELLIGENCE_BASE_URL = "https://api.sail.money";
11
11
  export const SAIL_INTELLIGENCE_DOCS_URL = "https://api.sail.money/docs";