@cap-js/cds-types 0.1.0 → 0.3.0-beta.1

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/apis/utils.d.ts DELETED
@@ -1,89 +0,0 @@
1
- import * as fs from 'node:fs'
2
-
3
- /**
4
- * Provides a set of utility functionss
5
- */
6
- declare const utils : {
7
- /**
8
- * Generates a new v4 UUID
9
- * @see https://cap.cloud.sap/docs/node.js/cds-facade#cds-utils
10
- */
11
- uuid () : string
12
-
13
- /**
14
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#decodeuri
15
- */
16
- decodeURI(input: string): string
17
-
18
- /**
19
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#decodeuricomponent
20
- */
21
- decodeURIComponent(input: string): string
22
-
23
- /**
24
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#local-filename
25
- */
26
- local(filename: string): string
27
-
28
- /**
29
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#exists-file
30
- */
31
- exist(file: string): boolean
32
-
33
- /**
34
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#isdir-file
35
- */
36
- isdir(file: string): string
37
-
38
- /**
39
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#isdir-file
40
- */
41
- isfile(file: string): string
42
-
43
- /**
44
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#async-read-file
45
- */
46
- read(file: string): Promise<Buffer | {}>
47
-
48
- /**
49
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#async-write-data-to-file
50
- */
51
- write: {
52
- (data: Object): {
53
- to(...file: string[]): Promise<ReturnType<typeof fs.promises.writeFile>>
54
- }
55
- (file: string, data: Object): Promise<ReturnType<typeof fs.promises.writeFile>>
56
- }
57
-
58
- /**
59
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#async-copy-src-to-dst
60
- */
61
- copy: {
62
- (src: string): {
63
- to(...dst: string[]): Promise<ReturnType<typeof fs.promises.copyFile>>
64
- }
65
- (dst: string, src: string): Promise<ReturnType<typeof fs.promises.copyFile>>
66
- }
67
-
68
- /**
69
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#async-mkdirp-path
70
- */
71
- mkdirp: (...path: string[]) => Promise<string>
72
-
73
- /**
74
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#async-rmdir-path
75
- */
76
- rmdir: (...path: string[]) => Promise<ReturnType<typeof fs.promises.rm>>
77
-
78
-
79
- /**
80
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#async-rimraf-path
81
- */
82
- rimraf: (...path: string[]) => Promise<ReturnType<typeof fs.promises.rm>>
83
-
84
-
85
- /**
86
- * @see https://cap.cloud.sap/docs/node.js/cds-utils#async-rm-path
87
- */
88
- rm: (...path: string[]) => Promise<ReturnType<typeof fs.promises.rm>>
89
- }