@sap-ux/project-access 1.0.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.
Files changed (47) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +22 -0
  3. package/dist/constants.d.ts +8 -0
  4. package/dist/constants.js +11 -0
  5. package/dist/file/file-access.d.ts +26 -0
  6. package/dist/file/file-access.js +74 -0
  7. package/dist/file/file-search.d.ts +40 -0
  8. package/dist/file/file-search.js +105 -0
  9. package/dist/file/index.d.ts +3 -0
  10. package/dist/file/index.js +11 -0
  11. package/dist/index.d.ts +4 -0
  12. package/dist/index.js +27 -0
  13. package/dist/project/cap.d.ts +42 -0
  14. package/dist/project/cap.js +118 -0
  15. package/dist/project/dependencies.d.ts +10 -0
  16. package/dist/project/dependencies.js +13 -0
  17. package/dist/project/index.d.ts +5 -0
  18. package/dist/project/index.js +17 -0
  19. package/dist/project/module-loader.d.ts +9 -0
  20. package/dist/project/module-loader.js +53 -0
  21. package/dist/project/search.d.ts +23 -0
  22. package/dist/project/search.js +238 -0
  23. package/dist/project/ui5-config.d.ts +8 -0
  24. package/dist/project/ui5-config.js +40 -0
  25. package/dist/types/cap/index.d.ts +136 -0
  26. package/dist/types/cap/index.js +3 -0
  27. package/dist/types/find/index.d.ts +8 -0
  28. package/dist/types/find/index.js +3 -0
  29. package/dist/types/index.d.ts +6 -0
  30. package/dist/types/index.js +18 -0
  31. package/dist/types/package/basic.d.ts +47 -0
  32. package/dist/types/package/basic.js +3 -0
  33. package/dist/types/package/index.d.ts +12 -0
  34. package/dist/types/package/index.js +3 -0
  35. package/dist/types/package/literal-union.d.ts +32 -0
  36. package/dist/types/package/literal-union.js +3 -0
  37. package/dist/types/package/package-json.d.ts +510 -0
  38. package/dist/types/package/package-json.js +3 -0
  39. package/dist/types/package/primitive.d.ts +7 -0
  40. package/dist/types/package/primitive.js +3 -0
  41. package/dist/types/vscode/index.d.ts +10 -0
  42. package/dist/types/vscode/index.js +3 -0
  43. package/dist/types/webapp/index.d.ts +4 -0
  44. package/dist/types/webapp/index.js +3 -0
  45. package/dist/types/webapp/manifest.d.ts +2823 -0
  46. package/dist/types/webapp/manifest.js +4 -0
  47. package/package.json +46 -0
@@ -0,0 +1,136 @@
1
+ export declare type CapProjectType = 'CAPJava' | 'CAPNodejs';
2
+ export interface CapCustomPaths {
3
+ app: string;
4
+ db: string;
5
+ srv: string;
6
+ }
7
+ declare type SELECT = {
8
+ SELECT: {
9
+ distinct?: true;
10
+ one?: boolean;
11
+ from: source;
12
+ columns?: column_expr[];
13
+ excluding?: string[];
14
+ where?: predicate;
15
+ having?: predicate;
16
+ groupBy?: expr[];
17
+ orderBy?: ordering_term[];
18
+ limit?: {
19
+ rows: number;
20
+ offset: number;
21
+ };
22
+ };
23
+ };
24
+ declare type source = (ref | SELECT) & {
25
+ as?: name;
26
+ join?: name;
27
+ on?: xpr;
28
+ };
29
+ declare type name = string;
30
+ declare type operator = string;
31
+ declare type predicate = _xpr;
32
+ declare type _xpr = (expr | operator)[];
33
+ declare type expr = ref | val | xpr | SELECT;
34
+ declare type ref = {
35
+ ref: (name & {
36
+ id?: string;
37
+ where?: expr;
38
+ args?: expr[];
39
+ })[];
40
+ };
41
+ declare type val = {
42
+ val: any;
43
+ };
44
+ declare type xpr = {
45
+ xpr: _xpr;
46
+ };
47
+ declare type ordering_term = expr & {
48
+ asc?: true;
49
+ desc?: true;
50
+ };
51
+ declare type column_expr = expr & {
52
+ as?: name;
53
+ cast?: any;
54
+ expand?: column_expr[];
55
+ inline?: column_expr[];
56
+ };
57
+ /** A parsed model. */
58
+ export declare type csn = CSN;
59
+ export interface CSN {
60
+ /** The assigned namespace. If parsed from multiple sources, this is the topmost model's namespace, if any, not the ones of imported models. */
61
+ namespace?: string;
62
+ /** The list of usings in this parsed model. Not available after imports have been resolved into a merged model. */
63
+ using?: {
64
+ name: string;
65
+ as?: string;
66
+ from?: string;
67
+ }[];
68
+ /** All definitions in the model including those from imported models. */
69
+ definitions?: Definitions;
70
+ /** All extensions in the model including those from imported models. Not available after extensions have been applied. */
71
+ extensions?: Definition[];
72
+ $sources?: string[];
73
+ }
74
+ interface DefinitionRegistry {
75
+ type: Type;
76
+ struct: Struct;
77
+ entity: Entity;
78
+ Association: Association;
79
+ }
80
+ declare type Definition = DefinitionRegistry[keyof DefinitionRegistry];
81
+ interface Definitions {
82
+ [name: string]: Definition;
83
+ }
84
+ declare type kind = 'context' | 'service' | 'type' | 'entity' | 'element' | 'const' | 'annotation';
85
+ declare type Element = Type & Struct & Association & {
86
+ kind: 'element' | undefined;
87
+ };
88
+ interface Type {
89
+ kind?: kind;
90
+ type?: string;
91
+ name: string;
92
+ }
93
+ interface Struct extends Type {
94
+ /** structs have elements which are in turn Definitions */
95
+ elements: {
96
+ [name: string]: Element;
97
+ };
98
+ /** References to definitions to be included. Not available after extensions have been applied. */
99
+ include?: string[];
100
+ }
101
+ interface Entity extends Struct {
102
+ kind: 'entity';
103
+ /** Entities with a query signify a view */
104
+ query?: SELECT & {
105
+ cql: string;
106
+ };
107
+ /** Elements of entities may have additional qualifiers */
108
+ elements: {
109
+ [name: string]: Element & {
110
+ key?: boolean;
111
+ virtual?: boolean;
112
+ unique?: boolean;
113
+ notNull?: boolean;
114
+ };
115
+ };
116
+ keys: {
117
+ [name: string]: Definition;
118
+ };
119
+ }
120
+ interface Association extends Type {
121
+ type: 'cds.Association' | 'cds.Composition';
122
+ /** The fully-qualified name of the Association's target entity */
123
+ target: string;
124
+ /** The specified cardinality. to-one = {max:1}, to-many = {max:'*'} */
125
+ cardinality?: {
126
+ src?: 1;
127
+ min?: 1 | 0;
128
+ max?: 1 | '*';
129
+ };
130
+ /** The parsed on condition in case of unmanaged Associations */
131
+ on?: predicate;
132
+ /** The optionally specified keys in case of managed Associations */
133
+ keys?: column_expr[];
134
+ }
135
+ export {};
136
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,8 @@
1
+ import type { Manifest } from '../webapp';
2
+ export interface AllAppResults {
3
+ appRoot: string;
4
+ projectRoot: string;
5
+ manifestPath: string;
6
+ manifest: Manifest;
7
+ }
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ export * from './cap';
2
+ export * from './package';
3
+ export * from './find';
4
+ export * from './vscode';
5
+ export * from './webapp';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./cap"), exports);
14
+ __exportStar(require("./package"), exports);
15
+ __exportStar(require("./find"), exports);
16
+ __exportStar(require("./vscode"), exports);
17
+ __exportStar(require("./webapp"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,47 @@
1
+ /**
2
+ Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
3
+
4
+ @category Class
5
+ */
6
+ export declare type Class<T, Arguments extends unknown[] = any[]> = Constructor<T, Arguments> & {
7
+ prototype: T;
8
+ };
9
+ /**
10
+ Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
11
+
12
+ @category Class
13
+ */
14
+ export declare type Constructor<T, Arguments extends unknown[] = any[]> = new (...arguments_: Arguments) => T;
15
+ /**
16
+ Matches a JSON object.
17
+
18
+ This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
19
+
20
+ @category JSON
21
+ */
22
+ export declare type JsonObject = {
23
+ [Key in string]: JsonValue;
24
+ } & {
25
+ [Key in string]?: JsonValue | undefined;
26
+ };
27
+ /**
28
+ Matches a JSON array.
29
+
30
+ @category JSON
31
+ */
32
+ export declare type JsonArray = JsonValue[];
33
+ /**
34
+ Matches any valid JSON primitive value.
35
+
36
+ @category JSON
37
+ */
38
+ export declare type JsonPrimitive = string | number | boolean | null;
39
+ /**
40
+ Matches any valid JSON value.
41
+
42
+ @see `Jsonify` if you need to transform a type to one that is assignable to `JsonValue`.
43
+
44
+ @category JSON
45
+ */
46
+ export declare type JsonValue = JsonPrimitive | JsonObject | JsonArray;
47
+ //# sourceMappingURL=basic.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=basic.js.map
@@ -0,0 +1,12 @@
1
+ import type { PackageJson } from './package-json';
2
+ interface SapUxPackage {
3
+ sapux?: boolean | string[];
4
+ sapuxLayer?: UI5FlexLayer;
5
+ cds?: object;
6
+ ui5?: object;
7
+ remarkConfig?: object;
8
+ }
9
+ export declare type UI5FlexLayer = 'VENDOR' | 'CUSTOMER_BASE';
10
+ export declare type Package = PackageJson & SapUxPackage;
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,32 @@
1
+ import type { Primitive } from './primitive';
2
+ /**
3
+ Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
4
+
5
+ Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
6
+
7
+ This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
8
+
9
+ @example
10
+ ```
11
+ import type {LiteralUnion} from 'type-fest';
12
+
13
+ // Before
14
+
15
+ type Pet = 'dog' | 'cat' | string;
16
+
17
+ const pet: Pet = '';
18
+ // Start typing in your TypeScript-enabled IDE.
19
+ // You **will not** get auto-completion for `dog` and `cat` literals.
20
+
21
+ // After
22
+
23
+ type Pet2 = LiteralUnion<'dog' | 'cat', string>;
24
+
25
+ const pet: Pet2 = '';
26
+ // You **will** get auto-completion for `dog` and `cat` literals.
27
+ ```
28
+
29
+ @category Type
30
+ */
31
+ export declare type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
32
+ //# sourceMappingURL=literal-union.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=literal-union.js.map