@narumitw/pi-sync 0.49.11 → 0.49.13

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.
Files changed (36) hide show
  1. package/README.md +112 -91
  2. package/dist/chunks/chunk-3NDD5QPM.ts +5 -5
  3. package/dist/chunks/chunk-4F3W4CSC.ts +2 -2
  4. package/dist/chunks/{chunk-D3S54OXI.ts → chunk-5WJNWFTG.ts} +11 -9
  5. package/dist/chunks/{chunk-D3S54OXI.ts.map → chunk-5WJNWFTG.ts.map} +2 -2
  6. package/dist/chunks/chunk-APZVBSM6.ts +2 -2
  7. package/dist/chunks/chunk-BHJUISB4.ts +3 -3
  8. package/dist/chunks/chunk-EWX3TPLQ.ts +2 -2
  9. package/dist/chunks/chunk-FR6CVXAL.ts +6 -6
  10. package/dist/chunks/chunk-HGV24P4T.ts +1 -1
  11. package/dist/chunks/chunk-JNOOSPEW.ts +3 -3
  12. package/dist/chunks/chunk-LJDSHNS3.ts +2 -2
  13. package/dist/chunks/{chunk-3GRWMWUZ.ts → chunk-LONPFFNP.ts} +4 -4
  14. package/dist/chunks/chunk-RGJ6SOYR.ts +2 -2
  15. package/dist/chunks/chunk-W64NEHXT.ts +3 -3
  16. package/dist/chunks/file-selection-4UABOP44.ts +4 -4
  17. package/dist/chunks/git-backend-E3UOUUOM.ts +3 -3
  18. package/dist/chunks/manager-result-dispatcher-RNRQA3PW.ts +18 -0
  19. package/dist/chunks/{manager-ui-7E25VWUP.ts → manager-ui-QO2P4V3Z.ts} +25 -22
  20. package/dist/chunks/{manager-ui-7E25VWUP.ts.map → manager-ui-QO2P4V3Z.ts.map} +2 -2
  21. package/dist/chunks/remote-selection-ui-LHSAGKGA.ts +17 -0
  22. package/dist/chunks/s3-backend-3QZGO2EF.ts +5 -5
  23. package/dist/chunks/setup-switch-X3W3FALZ.ts +8 -8
  24. package/dist/chunks/snapshot-WBSV4MQG.ts +4 -4
  25. package/dist/chunks/sync-operations-MPAFVVHA.ts +11 -11
  26. package/dist/chunks/sync-state-36H7ULG2.ts +5 -5
  27. package/dist/chunks/webdav-backend-ZD5RHRIU.ts +3 -3
  28. package/dist/index.ts +18 -18
  29. package/package.json +7 -7
  30. package/src/cancellable-operation.ts +5 -4
  31. package/src/secret-input.ts +8 -5
  32. package/dist/chunks/manager-result-dispatcher-YKBLZ7KL.ts +0 -18
  33. package/dist/chunks/remote-selection-ui-J6OW5DKZ.ts +0 -17
  34. /package/dist/chunks/{chunk-3GRWMWUZ.ts.map → chunk-LONPFFNP.ts.map} +0 -0
  35. /package/dist/chunks/{manager-result-dispatcher-YKBLZ7KL.ts.map → manager-result-dispatcher-RNRQA3PW.ts.map} +0 -0
  36. /package/dist/chunks/{remote-selection-ui-J6OW5DKZ.ts.map → remote-selection-ui-LHSAGKGA.ts.map} +0 -0
@@ -2,7 +2,7 @@
2
2
  // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
3
  import {
4
4
  dispatchManagerResult
5
- } from "./chunk-3GRWMWUZ.js";
5
+ } from "./chunk-LONPFFNP.ts";
6
6
  import {
7
7
  errorMessage,
8
8
  ownRecord,
@@ -10,7 +10,7 @@ import {
10
10
  requiredInput,
11
11
  runCancellableOperation,
12
12
  safeTerminalText as safeTerminalText2
13
- } from "./chunk-D3S54OXI.js";
13
+ } from "./chunk-5WJNWFTG.ts";
14
14
  import {
15
15
  addStorageConnection,
16
16
  addSyncSetup,
@@ -19,31 +19,31 @@ import {
19
19
  saveNewV3Settings,
20
20
  updateStorageConnection,
21
21
  updateSyncSetup
22
- } from "./chunk-4F3W4CSC.js";
22
+ } from "./chunk-4F3W4CSC.ts";
23
23
  import {
24
24
  syncAttentionMatchesConfig
25
- } from "./chunk-JNOOSPEW.js";
25
+ } from "./chunk-JNOOSPEW.ts";
26
26
  import {
27
27
  SETUP_SWITCH_ACTION_OPTIONS,
28
28
  saveOnSwitch,
29
29
  setupSwitchActionFromLabel,
30
30
  setupSwitchActionLabel,
31
31
  useSyncSetup
32
- } from "./chunk-BHJUISB4.js";
32
+ } from "./chunk-BHJUISB4.ts";
33
33
  import {
34
34
  setSyncSetupCompletions
35
- } from "./chunk-4U6AFLJB.js";
36
- import "./chunk-FR6CVXAL.js";
35
+ } from "./chunk-4U6AFLJB.ts";
36
+ import "./chunk-FR6CVXAL.ts";
37
37
  import {
38
38
  inspectLock,
39
39
  isLockGuardHeld,
40
40
  isStaleLock
41
- } from "./chunk-LJDSHNS3.js";
41
+ } from "./chunk-LJDSHNS3.ts";
42
42
  import {
43
43
  safeTerminalText
44
- } from "./chunk-W64NEHXT.js";
45
- import "./chunk-RGJ6SOYR.js";
46
- import "./chunk-EWX3TPLQ.js";
44
+ } from "./chunk-W64NEHXT.ts";
45
+ import "./chunk-RGJ6SOYR.ts";
46
+ import "./chunk-EWX3TPLQ.ts";
47
47
  import {
48
48
  activeLocalConfigPath,
49
49
  configuredSyncSetupNames,
@@ -59,17 +59,17 @@ import {
59
59
  syncConfigReviewIdentity,
60
60
  validateWebDavCredentials,
61
61
  validateWebDavNamespace
62
- } from "./chunk-APZVBSM6.js";
62
+ } from "./chunk-APZVBSM6.ts";
63
63
  import {
64
64
  normalizeGitBranch,
65
65
  normalizeGitDirectory,
66
66
  normalizeGitRemote
67
- } from "./chunk-F5QL2GPY.js";
67
+ } from "./chunk-F5QL2GPY.ts";
68
68
  import {
69
69
  DEFAULT_SYNC_INCLUDE,
70
70
  compareSyncInclude,
71
71
  syncIncludeSelection
72
- } from "./chunk-YQ6UW7IF.js";
72
+ } from "./chunk-YQ6UW7IF.ts";
73
73
 
74
74
  // src/manager-ui.ts
75
75
  import { defineMenu as defineMenu4, runMenu as runMenu4 } from "@narumitw/pi-tui-kit";
@@ -384,7 +384,7 @@ function blockedSyncMenuItem(label, manager) {
384
384
  };
385
385
  }
386
386
  async function showManagerAttention(ctx, attention, runRoute, signal, onSelectionResolved) {
387
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-J6OW5DKZ.js");
387
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-LHSAGKGA.ts");
388
388
  if (signal?.aborted) return "close";
389
389
  const review = await showRemoteSelectionReview(
390
390
  ctx,
@@ -891,6 +891,8 @@ function backendStorageDescription(config) {
891
891
  import {
892
892
  CURSOR_MARKER,
893
893
  decodeKittyPrintable,
894
+ Key,
895
+ matchesKey,
894
896
  Text,
895
897
  truncateToWidth as truncateToWidth2
896
898
  } from "@earendil-works/pi-tui";
@@ -905,7 +907,7 @@ async function promptSecret(ctx, title, options = { required: true }) {
905
907
  const heading = new Text("", 0, 0);
906
908
  const hint = new Text("", 0, 0);
907
909
  const submitKey = keybindingText(keybindings, "tui.input.submit", "enter");
908
- const cancelKey = keybindingText(keybindings, "tui.select.cancel", "esc");
910
+ const cancelKey = keybindingText(keybindings, "tui.select.cancel", "esc", ["ctrl+c"]);
909
911
  const applyTheme = () => {
910
912
  heading.setText(theme.fg("accent", theme.bold(title)));
911
913
  hint.setText(theme.fg("dim", `${submitKey} save \u2022 ${cancelKey} cancel \u2022 Input is hidden`));
@@ -934,8 +936,9 @@ async function promptSecret(ctx, title, options = { required: true }) {
934
936
  hint.invalidate();
935
937
  },
936
938
  handleInput(data) {
937
- if (keybindings.matches(data, "tui.select.cancel")) complete(void 0);
938
- else if (keybindings.matches(data, "tui.input.submit")) complete(input.getValue());
939
+ if (matchesKey(data, Key.ctrl("c")) || keybindings.matches(data, "tui.select.cancel")) {
940
+ complete(void 0);
941
+ } else if (keybindings.matches(data, "tui.input.submit")) complete(input.getValue());
939
942
  else input.handleInput(data);
940
943
  tui.requestRender();
941
944
  },
@@ -1059,8 +1062,8 @@ var MaskedInput = class {
1059
1062
  this.cursor += characters.length;
1060
1063
  }
1061
1064
  };
1062
- function keybindingText(keybindings, binding, fallback) {
1063
- const keys = keybindings.getKeys(binding).map(String).map((key) => {
1065
+ function keybindingText(keybindings, binding, fallback, additionalKeys = []) {
1066
+ const keys = [.../* @__PURE__ */ new Set([...keybindings.getKeys(binding), ...additionalKeys])].map(String).map((key) => {
1064
1067
  if (key === "return") return "enter";
1065
1068
  if (key === "escape") return "esc";
1066
1069
  return hasControlCharacter(key) ? "" : key;
@@ -1237,7 +1240,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
1237
1240
  },
1238
1241
  "remote-include": async ({ signal: actionSignal }) => {
1239
1242
  const reviewSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
1240
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-J6OW5DKZ.js");
1243
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-LHSAGKGA.ts");
1241
1244
  if (reviewSignal.aborted) return { kind: "rejected" };
1242
1245
  const review = await showRemoteSelectionReview(ctx, setupName, reviewSignal, void 0, {
1243
1246
  origin: "settings",
@@ -2751,4 +2754,4 @@ export {
2751
2754
  showSetupWizard,
2752
2755
  showSyncManager
2753
2756
  };
2754
- //# sourceMappingURL=manager-ui-7E25VWUP.ts.map
2757
+ //# sourceMappingURL=manager-ui-QO2P4V3Z.ts.map