@nextcloud/files 3.5.1 → 3.7.0

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.
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
3
+ * SPDX-License-Identifier: AGPL-3.0-or-later
4
+ */
5
+ export * from './navigation';
6
+ export * from './column';
7
+ export * from './view';
@@ -1,4 +1,5 @@
1
1
  import { INode } from '../files/node';
2
+ import { SortingOrder } from './sorting';
2
3
 
3
4
  export declare enum FilesSortingMode {
4
5
  Name = "basename",
@@ -14,7 +15,7 @@ export interface FilesSortingOptions {
14
15
  /**
15
16
  * @default 'asc'
16
17
  */
17
- sortingOrder?: 'asc' | 'desc';
18
+ sortingOrder?: SortingOrder;
18
19
  /**
19
20
  * If set to true nodes marked as favorites are ordered on top of all other nodes
20
21
  * @default false
@@ -0,0 +1,51 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
3
+ * SPDX-License-Identifier: AGPL-3.0-or-later or LGPL-3.0-or-later
4
+ */
5
+ export declare enum InvalidFilenameErrorReason {
6
+ ReservedName = "reserved name",
7
+ Character = "character",
8
+ Extension = "extension"
9
+ }
10
+ interface InvalidFilenameErrorOptions {
11
+ /**
12
+ * The filename that was validated
13
+ */
14
+ filename: string;
15
+ /**
16
+ * Reason why the validation failed
17
+ */
18
+ reason: InvalidFilenameErrorReason;
19
+ /**
20
+ * Part of the filename that caused this error
21
+ */
22
+ segment: string;
23
+ }
24
+ export declare class InvalidFilenameError extends Error {
25
+ constructor(options: InvalidFilenameErrorOptions);
26
+ /**
27
+ * The filename that was validated
28
+ */
29
+ get filename(): string;
30
+ /**
31
+ * Reason why the validation failed
32
+ */
33
+ get reason(): InvalidFilenameErrorReason;
34
+ /**
35
+ * Part of the filename that caused this error
36
+ */
37
+ get segment(): string;
38
+ }
39
+ /**
40
+ * Validate a given filename
41
+ * @param filename The filename to check
42
+ * @throws {InvalidFilenameError}
43
+ */
44
+ export declare function validateFilename(filename: string): void;
45
+ /**
46
+ * Check the validity of a filename
47
+ * This is a convinient wrapper for `checkFilenameValidity` to only return a boolean for the valid
48
+ * @param filename Filename to check validity
49
+ */
50
+ export declare function isFilenameValid(filename: string): boolean;
51
+ export {};
@@ -2,12 +2,6 @@
2
2
  * SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
3
3
  * SPDX-License-Identifier: AGPL-3.0-or-later or LGPL-3.0-or-later
4
4
  */
5
- /**
6
- * Check the validity of a filename
7
- * This is a convinient wrapper for `checkFilenameValidity` to only return a boolean for the valid
8
- * @param filename Filename to check validity
9
- */
10
- export declare function isFilenameValid(filename: string): boolean;
11
5
  interface UniqueNameOptions {
12
6
  /**
13
7
  * A function that takes an index and returns a suffix to add to the file name, defaults to '(index)'
@@ -1,5 +1,5 @@
1
1
  type IdentifierFn<T> = (v: T) => unknown;
2
- type SortingOrder = 'asc' | 'desc';
2
+ export type SortingOrder = 'asc' | 'desc';
3
3
  /**
4
4
  * Natural order a collection
5
5
  * You can define identifiers as callback functions, that get the element and return the value to sort.
@@ -1,5 +1,9 @@
1
1
  Included dependencies:
2
2
 
3
+ @nextcloud/event-bus
4
+ version: 3.3.1
5
+ license: GPL-3.0-or-later
6
+
3
7
  fast-xml-parser
4
8
  version: 4.4.0
5
9
  license: MIT
@@ -8,6 +12,10 @@ is-svg
8
12
  version: 5.0.1
9
13
  license: MIT
10
14
 
15
+ semver
16
+ version: 7.6.3
17
+ license: ISC
18
+
11
19
  strnum
12
20
  version: 1.0.5
13
21
  license: MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextcloud/files",
3
- "version": "3.5.1",
3
+ "version": "3.7.0",
4
4
  "description": "Nextcloud files utils",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "scripts": {
31
31
  "build": "vite --mode production build",
32
- "build:doc": "typedoc --out dist/doc lib && touch dist/doc/.nojekyll",
32
+ "build:doc": "typedoc && touch dist/doc/.nojekyll",
33
33
  "dev": "vite --mode development build",
34
34
  "watch": "vite --mode development build --watch",
35
35
  "lint": "eslint .",
@@ -53,27 +53,30 @@
53
53
  "devDependencies": {
54
54
  "@codecov/vite-plugin": "^0.0.1-beta.10",
55
55
  "@nextcloud/eslint-config": "^8.4.1",
56
- "@nextcloud/typings": "^1.8.0",
57
- "@nextcloud/vite-config": "^2.0.2",
58
- "@types/node": "^20.14.5",
59
- "@vitest/coverage-istanbul": "^1.6.0",
56
+ "@nextcloud/event-bus": "^3.3.1",
57
+ "@nextcloud/typings": "^1.9.1",
58
+ "@nextcloud/vite-config": "^2.1.0",
59
+ "@types/node": "^20.14.11",
60
+ "@vitest/coverage-istanbul": "^2.0.3",
60
61
  "fast-xml-parser": "^4.4.0",
61
62
  "jsdom": "^24.1.0",
62
63
  "tslib": "^2.6.3",
63
- "typedoc": "^0.25.13",
64
- "typescript": "^5.4.5",
65
- "vite": "^5.3.1",
66
- "vitest": "^1.6.0"
64
+ "typedoc": "^0.26.4",
65
+ "typescript": "^5.5.3",
66
+ "vite": "^5.3.4",
67
+ "vitest": "^2.0.2"
67
68
  },
68
69
  "dependencies": {
69
70
  "@nextcloud/auth": "^2.3.0",
71
+ "@nextcloud/capabilities": "^1.2.0",
70
72
  "@nextcloud/l10n": "^3.1.0",
71
73
  "@nextcloud/logger": "^3.0.2",
72
- "@nextcloud/paths": "^2.1.0",
74
+ "@nextcloud/paths": "^2.2.0",
73
75
  "@nextcloud/router": "^3.0.1",
74
- "@nextcloud/sharing": "^0.2.1",
76
+ "@nextcloud/sharing": "^0.2.2",
75
77
  "cancelable-promise": "^4.3.1",
76
78
  "is-svg": "^5.0.1",
79
+ "typedoc-plugin-missing-exports": "^3.0.0",
77
80
  "typescript-event-target": "^1.1.1",
78
81
  "webdav": "^5.6.0"
79
82
  }