@nextcloud/files 3.9.1 → 3.9.2

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.d.ts CHANGED
@@ -12,7 +12,6 @@ export { FileType } from './files/fileType';
12
12
  export { File, type IFile } from './files/file';
13
13
  export { Folder, type IFolder } from './files/folder';
14
14
  export { Node, NodeStatus, type INode } from './files/node';
15
- export type { NodeData } from './files/nodeData.ts';
16
15
  export * from './utils/filename-validation';
17
16
  export { getUniqueName } from './utils/filename';
18
17
  export { formatFileSize, parseFileSize } from './utils/fileSize';
package/dist/index.mjs CHANGED
@@ -117,9 +117,6 @@ class FileAction {
117
117
  get default() {
118
118
  return this._action.default;
119
119
  }
120
- get destructive() {
121
- return this._action.destructive;
122
- }
123
120
  get inline() {
124
121
  return this._action.inline;
125
122
  }
@@ -151,9 +148,6 @@ class FileAction {
151
148
  if ("order" in action && typeof action.order !== "number") {
152
149
  throw new Error("Invalid order");
153
150
  }
154
- if (action.destructive !== void 0 && typeof action.destructive !== "boolean") {
155
- throw new Error("Invalid destructive flag");
156
- }
157
151
  if ("parent" in action && typeof action.parent !== "string") {
158
152
  throw new Error("Invalid parent");
159
153
  }
@@ -718,12 +712,6 @@ class Node {
718
712
  set status(status) {
719
713
  this._data.status = status;
720
714
  }
721
- /**
722
- * Get the node data
723
- */
724
- get data() {
725
- return structuredClone(this._data);
726
- }
727
715
  /**
728
716
  * Move the node to a new destination
729
717
  *
@@ -786,12 +774,6 @@ class File extends Node {
786
774
  get type() {
787
775
  return FileType.File;
788
776
  }
789
- /**
790
- * Returns a clone of the file
791
- */
792
- clone() {
793
- return new File(this.data);
794
- }
795
777
  }
796
778
  class Folder extends Node {
797
779
  constructor(data) {
@@ -809,12 +791,6 @@ class Folder extends Node {
809
791
  get mime() {
810
792
  return "httpd/unix-directory";
811
793
  }
812
- /**
813
- * Returns a clone of the folder
814
- */
815
- clone() {
816
- return new Folder(this.data);
817
- }
818
794
  }
819
795
  function davGetRootPath() {
820
796
  if (isPublicShare()) {
@@ -1096,7 +1072,7 @@ function sortNodes(nodes, options = {}) {
1096
1072
  // 3: Use sorting mode if NOT basename (to be able to use display name too)
1097
1073
  ...sortingOptions.sortingMode !== "basename" ? [(v) => v[sortingOptions.sortingMode]] : [],
1098
1074
  // 4: Use display name if available, fallback to name
1099
- (v) => basename2(v.displayname || v.attributes?.displayname || v.basename),
1075
+ (v) => basename2(v.attributes?.displayname || v.basename),
1100
1076
  // 5: Finally, use basename if all previous sorting methods failed
1101
1077
  (v) => v.basename
1102
1078
  ];