@pollinations/cli 0.1.24 → 0.1.25

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.js CHANGED
@@ -14,7 +14,7 @@ var init_package = __esm({
14
14
  "package.json"() {
15
15
  package_default = {
16
16
  name: "@pollinations/cli",
17
- version: "0.1.24",
17
+ version: "0.1.25",
18
18
  description: "The Pollinations CLI \u2014 for humans, AI agents, and everything in between",
19
19
  type: "module",
20
20
  bin: {
@@ -4195,7 +4195,7 @@ var yamlClient = (adapter) => {
4195
4195
  const doc = parseDocument3(readTextIfExists(path) ?? "");
4196
4196
  if (doc.errors.length) throw doc.errors[0];
4197
4197
  if (doc.contents === null) doc.contents = doc.createNode({});
4198
- if (!isMap3(doc.contents) || doc.has(table) && !isMap3(doc.get(table))) {
4198
+ if (!isMap3(doc.contents) || doc.get(table) != null && !isMap3(doc.get(table))) {
4199
4199
  throw new Error(
4200
4200
  `${path}: expected YAML mappings for config and ${table}`
4201
4201
  );
@@ -4206,6 +4206,7 @@ var yamlClient = (adapter) => {
4206
4206
  if (JSON.stringify(entries) === JSON.stringify(before)) {
4207
4207
  return { installed: ownedEntryNames(entries), removed };
4208
4208
  }
4209
+ if (doc.get(table) == null) doc.set(table, doc.createNode({}));
4209
4210
  for (const name of Object.keys(before)) {
4210
4211
  if (!(name in entries)) doc.deleteIn([table, name]);
4211
4212
  }
@@ -5700,9 +5701,9 @@ function setupSsh() {
5700
5701
  "# Written by `polli sandbox ssh-config`.",
5701
5702
  "Host *.polli",
5702
5703
  " User user",
5703
- ` IdentityFile ${SSH_KEY}`,
5704
+ ` IdentityFile "${SSH_KEY}"`,
5704
5705
  " IdentitiesOnly yes",
5705
- ` UserKnownHostsFile ${join15(SSH_DIR, "known_hosts")}`,
5706
+ ` UserKnownHostsFile "${join15(SSH_DIR, "known_hosts")}"`,
5706
5707
  " StrictHostKeyChecking accept-new",
5707
5708
  ` ProxyCommand ${polli} sandbox proxy %h`,
5708
5709
  ""