@abp/ng.schematics 5.0.1 → 5.0.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.
Files changed (141) hide show
  1. package/README.md +3 -3
  2. package/collection.json +29 -29
  3. package/commands/api/files-enum/proxy/__namespace@dir__/__name@kebab__.enum.ts.template +8 -8
  4. package/commands/api/files-model/proxy/__namespace@dir__/models.ts.template +9 -9
  5. package/commands/api/files-service/proxy/__namespace@dir__/__name@kebab__.service.ts.template +25 -25
  6. package/commands/api/index.d.ts +2 -2
  7. package/commands/api/index.js +112 -112
  8. package/commands/api/schema.json +45 -45
  9. package/commands/proxy-add/index.d.ts +2 -2
  10. package/commands/proxy-add/index.js +41 -41
  11. package/commands/proxy-add/schema.json +45 -45
  12. package/commands/proxy-index/index.d.ts +4 -4
  13. package/commands/proxy-index/index.js +14 -14
  14. package/commands/proxy-index/schema.json +18 -18
  15. package/commands/proxy-refresh/index.d.ts +3 -3
  16. package/commands/proxy-refresh/index.js +27 -27
  17. package/commands/proxy-refresh/schema.json +45 -45
  18. package/commands/proxy-remove/index.d.ts +3 -3
  19. package/commands/proxy-remove/index.js +33 -33
  20. package/commands/proxy-remove/schema.json +45 -45
  21. package/constants/api.d.ts +1 -1
  22. package/constants/api.js +4 -4
  23. package/constants/index.d.ts +4 -4
  24. package/constants/index.js +16 -16
  25. package/constants/proxy.d.ts +4 -4
  26. package/constants/proxy.js +24 -24
  27. package/constants/system-types.d.ts +1 -1
  28. package/constants/system-types.js +27 -27
  29. package/constants/volo.d.ts +1 -1
  30. package/constants/volo.js +4 -4
  31. package/enums/binding-source-id.d.ts +6 -6
  32. package/enums/binding-source-id.js +10 -10
  33. package/enums/exception.d.ts +16 -16
  34. package/enums/exception.js +2 -2
  35. package/enums/import-keyword.d.ts +4 -4
  36. package/enums/import-keyword.js +8 -8
  37. package/enums/index.d.ts +4 -4
  38. package/enums/index.js +16 -16
  39. package/enums/method-modifier.d.ts +6 -6
  40. package/enums/method-modifier.js +10 -10
  41. package/index.d.ts +1 -1
  42. package/index.js +2 -2
  43. package/models/api-definition.d.ts +72 -72
  44. package/models/api-definition.js +2 -2
  45. package/models/generate-proxy-schema.d.ts +18 -18
  46. package/models/generate-proxy-schema.js +2 -2
  47. package/models/import.d.ts +11 -11
  48. package/models/import.js +13 -13
  49. package/models/index.d.ts +10 -10
  50. package/models/index.js +22 -22
  51. package/models/method.d.ts +31 -31
  52. package/models/method.js +61 -61
  53. package/models/model.d.ts +48 -48
  54. package/models/model.js +71 -71
  55. package/models/project.d.ts +5 -5
  56. package/models/project.js +2 -2
  57. package/models/proxy-config.d.ts +4 -4
  58. package/models/proxy-config.js +2 -2
  59. package/models/service.d.ts +21 -21
  60. package/models/service.js +11 -11
  61. package/models/tree.d.ts +1 -1
  62. package/models/tree.js +2 -2
  63. package/models/util.d.ts +7 -7
  64. package/models/util.js +2 -2
  65. package/package.json +1 -1
  66. package/test-setup.d.ts +1 -1
  67. package/test-setup.js +3 -3
  68. package/utils/angular/ast-utils.d.ts +115 -115
  69. package/utils/angular/ast-utils.js +598 -598
  70. package/utils/angular/change.d.ts +66 -66
  71. package/utils/angular/change.js +96 -96
  72. package/utils/angular/config.d.ts +455 -455
  73. package/utils/angular/config.js +70 -70
  74. package/utils/angular/dependencies.d.ts +23 -23
  75. package/utils/angular/dependencies.js +58 -58
  76. package/utils/angular/find-module.d.ts +35 -35
  77. package/utils/angular/find-module.js +105 -105
  78. package/utils/angular/index.d.ts +17 -17
  79. package/utils/angular/index.js +29 -29
  80. package/utils/angular/json-file.d.ts +23 -23
  81. package/utils/angular/json-file.js +61 -61
  82. package/utils/angular/json-utils.d.ts +14 -14
  83. package/utils/angular/json-utils.js +158 -158
  84. package/utils/angular/latest-versions.d.ts +18 -18
  85. package/utils/angular/latest-versions.js +26 -26
  86. package/utils/angular/lint-fix.d.ts +9 -9
  87. package/utils/angular/lint-fix.js +41 -41
  88. package/utils/angular/ng-ast-utils.d.ts +5 -5
  89. package/utils/angular/ng-ast-utils.js +75 -75
  90. package/utils/angular/parse-name.d.ts +13 -13
  91. package/utils/angular/parse-name.js +21 -21
  92. package/utils/angular/paths.d.ts +8 -8
  93. package/utils/angular/paths.js +21 -21
  94. package/utils/angular/project-targets.d.ts +9 -9
  95. package/utils/angular/project-targets.js +15 -15
  96. package/utils/angular/tsconfig.d.ts +16 -16
  97. package/utils/angular/tsconfig.js +62 -62
  98. package/utils/angular/validation.d.ts +4 -4
  99. package/utils/angular/validation.js +73 -73
  100. package/utils/angular/workspace-models.d.ts +159 -159
  101. package/utils/angular/workspace-models.js +29 -29
  102. package/utils/angular/workspace.d.ts +18 -18
  103. package/utils/angular/workspace.js +75 -75
  104. package/utils/api.d.ts +2 -2
  105. package/utils/api.js +8 -8
  106. package/utils/ast.d.ts +4 -4
  107. package/utils/ast.js +23 -23
  108. package/utils/barrel.d.ts +4 -4
  109. package/utils/barrel.js +92 -92
  110. package/utils/common.d.ts +6 -6
  111. package/utils/common.js +33 -33
  112. package/utils/enum.d.ts +18 -18
  113. package/utils/enum.js +40 -40
  114. package/utils/file.d.ts +2 -2
  115. package/utils/file.js +9 -9
  116. package/utils/generics.d.ts +24 -24
  117. package/utils/generics.js +87 -87
  118. package/utils/import.d.ts +3 -3
  119. package/utils/import.js +11 -11
  120. package/utils/index.d.ts +19 -19
  121. package/utils/index.js +31 -31
  122. package/utils/model.d.ts +11 -11
  123. package/utils/model.js +141 -141
  124. package/utils/namespace.d.ts +1 -1
  125. package/utils/namespace.js +18 -18
  126. package/utils/path.d.ts +2 -2
  127. package/utils/path.js +36 -36
  128. package/utils/rule.d.ts +4 -4
  129. package/utils/rule.js +27 -27
  130. package/utils/service.d.ts +6 -6
  131. package/utils/service.js +82 -82
  132. package/utils/source.d.ts +13 -13
  133. package/utils/source.js +162 -162
  134. package/utils/text.d.ts +9 -9
  135. package/utils/text.js +46 -46
  136. package/utils/tree.d.ts +13 -13
  137. package/utils/tree.js +56 -56
  138. package/utils/type.d.ts +12 -12
  139. package/utils/type.js +102 -102
  140. package/utils/workspace.d.ts +8 -8
  141. package/utils/workspace.js +66 -66
@@ -1,66 +1,66 @@
1
- /**
2
- * @license
3
- * Copyright Google Inc. All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- export interface Host {
9
- write(path: string, content: string): Promise<void>;
10
- read(path: string): Promise<string>;
11
- }
12
- export interface Change {
13
- apply(host: Host): Promise<void>;
14
- readonly path: string | null;
15
- readonly order: number;
16
- readonly description: string;
17
- }
18
- /**
19
- * An operation that does nothing.
20
- */
21
- export declare class NoopChange implements Change {
22
- description: string;
23
- order: number;
24
- path: null;
25
- apply(): Promise<void>;
26
- }
27
- /**
28
- * Will add text to the source code.
29
- */
30
- export declare class InsertChange implements Change {
31
- path: string;
32
- pos: number;
33
- toAdd: string;
34
- order: number;
35
- description: string;
36
- constructor(path: string, pos: number, toAdd: string);
37
- /**
38
- * This method does not insert spaces if there is none in the original string.
39
- */
40
- apply(host: Host): Promise<void>;
41
- }
42
- /**
43
- * Will remove text from the source code.
44
- */
45
- export declare class RemoveChange implements Change {
46
- path: string;
47
- private pos;
48
- private toRemove;
49
- order: number;
50
- description: string;
51
- constructor(path: string, pos: number, toRemove: string);
52
- apply(host: Host): Promise<void>;
53
- }
54
- /**
55
- * Will replace text from the source code.
56
- */
57
- export declare class ReplaceChange implements Change {
58
- path: string;
59
- private pos;
60
- private oldText;
61
- private newText;
62
- order: number;
63
- description: string;
64
- constructor(path: string, pos: number, oldText: string, newText: string);
65
- apply(host: Host): Promise<void>;
66
- }
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ export interface Host {
9
+ write(path: string, content: string): Promise<void>;
10
+ read(path: string): Promise<string>;
11
+ }
12
+ export interface Change {
13
+ apply(host: Host): Promise<void>;
14
+ readonly path: string | null;
15
+ readonly order: number;
16
+ readonly description: string;
17
+ }
18
+ /**
19
+ * An operation that does nothing.
20
+ */
21
+ export declare class NoopChange implements Change {
22
+ description: string;
23
+ order: number;
24
+ path: null;
25
+ apply(): Promise<void>;
26
+ }
27
+ /**
28
+ * Will add text to the source code.
29
+ */
30
+ export declare class InsertChange implements Change {
31
+ path: string;
32
+ pos: number;
33
+ toAdd: string;
34
+ order: number;
35
+ description: string;
36
+ constructor(path: string, pos: number, toAdd: string);
37
+ /**
38
+ * This method does not insert spaces if there is none in the original string.
39
+ */
40
+ apply(host: Host): Promise<void>;
41
+ }
42
+ /**
43
+ * Will remove text from the source code.
44
+ */
45
+ export declare class RemoveChange implements Change {
46
+ path: string;
47
+ private pos;
48
+ private toRemove;
49
+ order: number;
50
+ description: string;
51
+ constructor(path: string, pos: number, toRemove: string);
52
+ apply(host: Host): Promise<void>;
53
+ }
54
+ /**
55
+ * Will replace text from the source code.
56
+ */
57
+ export declare class ReplaceChange implements Change {
58
+ path: string;
59
+ private pos;
60
+ private oldText;
61
+ private newText;
62
+ order: number;
63
+ description: string;
64
+ constructor(path: string, pos: number, oldText: string, newText: string);
65
+ apply(host: Host): Promise<void>;
66
+ }
@@ -1,97 +1,97 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReplaceChange = exports.RemoveChange = exports.InsertChange = exports.NoopChange = void 0;
4
- /**
5
- * An operation that does nothing.
6
- */
7
- class NoopChange {
8
- constructor() {
9
- this.description = 'No operation.';
10
- this.order = Infinity;
11
- this.path = null;
12
- }
13
- apply() {
14
- return Promise.resolve();
15
- }
16
- }
17
- exports.NoopChange = NoopChange;
18
- /**
19
- * Will add text to the source code.
20
- */
21
- class InsertChange {
22
- constructor(path, pos, toAdd) {
23
- this.path = path;
24
- this.pos = pos;
25
- this.toAdd = toAdd;
26
- if (pos < 0) {
27
- throw new Error('Negative positions are invalid');
28
- }
29
- this.description = `Inserted ${toAdd} into position ${pos} of ${path}`;
30
- this.order = pos;
31
- }
32
- /**
33
- * This method does not insert spaces if there is none in the original string.
34
- */
35
- apply(host) {
36
- return host.read(this.path).then(content => {
37
- const prefix = content.substring(0, this.pos);
38
- const suffix = content.substring(this.pos);
39
- return host.write(this.path, `${prefix}${this.toAdd}${suffix}`);
40
- });
41
- }
42
- }
43
- exports.InsertChange = InsertChange;
44
- /**
45
- * Will remove text from the source code.
46
- */
47
- class RemoveChange {
48
- constructor(path, pos, toRemove) {
49
- this.path = path;
50
- this.pos = pos;
51
- this.toRemove = toRemove;
52
- if (pos < 0) {
53
- throw new Error('Negative positions are invalid');
54
- }
55
- this.description = `Removed ${toRemove} into position ${pos} of ${path}`;
56
- this.order = pos;
57
- }
58
- apply(host) {
59
- return host.read(this.path).then(content => {
60
- const prefix = content.substring(0, this.pos);
61
- const suffix = content.substring(this.pos + this.toRemove.length);
62
- // TODO: throw error if toRemove doesn't match removed string.
63
- return host.write(this.path, `${prefix}${suffix}`);
64
- });
65
- }
66
- }
67
- exports.RemoveChange = RemoveChange;
68
- /**
69
- * Will replace text from the source code.
70
- */
71
- class ReplaceChange {
72
- constructor(path, pos, oldText, newText) {
73
- this.path = path;
74
- this.pos = pos;
75
- this.oldText = oldText;
76
- this.newText = newText;
77
- if (pos < 0) {
78
- throw new Error('Negative positions are invalid');
79
- }
80
- this.description = `Replaced ${oldText} into position ${pos} of ${path} with ${newText}`;
81
- this.order = pos;
82
- }
83
- apply(host) {
84
- return host.read(this.path).then(content => {
85
- const prefix = content.substring(0, this.pos);
86
- const suffix = content.substring(this.pos + this.oldText.length);
87
- const text = content.substring(this.pos, this.pos + this.oldText.length);
88
- if (text !== this.oldText) {
89
- return Promise.reject(new Error(`Invalid replace: "${text}" != "${this.oldText}".`));
90
- }
91
- // TODO: throw error if oldText doesn't match removed string.
92
- return host.write(this.path, `${prefix}${this.newText}${suffix}`);
93
- });
94
- }
95
- }
96
- exports.ReplaceChange = ReplaceChange;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReplaceChange = exports.RemoveChange = exports.InsertChange = exports.NoopChange = void 0;
4
+ /**
5
+ * An operation that does nothing.
6
+ */
7
+ class NoopChange {
8
+ constructor() {
9
+ this.description = 'No operation.';
10
+ this.order = Infinity;
11
+ this.path = null;
12
+ }
13
+ apply() {
14
+ return Promise.resolve();
15
+ }
16
+ }
17
+ exports.NoopChange = NoopChange;
18
+ /**
19
+ * Will add text to the source code.
20
+ */
21
+ class InsertChange {
22
+ constructor(path, pos, toAdd) {
23
+ this.path = path;
24
+ this.pos = pos;
25
+ this.toAdd = toAdd;
26
+ if (pos < 0) {
27
+ throw new Error('Negative positions are invalid');
28
+ }
29
+ this.description = `Inserted ${toAdd} into position ${pos} of ${path}`;
30
+ this.order = pos;
31
+ }
32
+ /**
33
+ * This method does not insert spaces if there is none in the original string.
34
+ */
35
+ apply(host) {
36
+ return host.read(this.path).then(content => {
37
+ const prefix = content.substring(0, this.pos);
38
+ const suffix = content.substring(this.pos);
39
+ return host.write(this.path, `${prefix}${this.toAdd}${suffix}`);
40
+ });
41
+ }
42
+ }
43
+ exports.InsertChange = InsertChange;
44
+ /**
45
+ * Will remove text from the source code.
46
+ */
47
+ class RemoveChange {
48
+ constructor(path, pos, toRemove) {
49
+ this.path = path;
50
+ this.pos = pos;
51
+ this.toRemove = toRemove;
52
+ if (pos < 0) {
53
+ throw new Error('Negative positions are invalid');
54
+ }
55
+ this.description = `Removed ${toRemove} into position ${pos} of ${path}`;
56
+ this.order = pos;
57
+ }
58
+ apply(host) {
59
+ return host.read(this.path).then(content => {
60
+ const prefix = content.substring(0, this.pos);
61
+ const suffix = content.substring(this.pos + this.toRemove.length);
62
+ // TODO: throw error if toRemove doesn't match removed string.
63
+ return host.write(this.path, `${prefix}${suffix}`);
64
+ });
65
+ }
66
+ }
67
+ exports.RemoveChange = RemoveChange;
68
+ /**
69
+ * Will replace text from the source code.
70
+ */
71
+ class ReplaceChange {
72
+ constructor(path, pos, oldText, newText) {
73
+ this.path = path;
74
+ this.pos = pos;
75
+ this.oldText = oldText;
76
+ this.newText = newText;
77
+ if (pos < 0) {
78
+ throw new Error('Negative positions are invalid');
79
+ }
80
+ this.description = `Replaced ${oldText} into position ${pos} of ${path} with ${newText}`;
81
+ this.order = pos;
82
+ }
83
+ apply(host) {
84
+ return host.read(this.path).then(content => {
85
+ const prefix = content.substring(0, this.pos);
86
+ const suffix = content.substring(this.pos + this.oldText.length);
87
+ const text = content.substring(this.pos, this.pos + this.oldText.length);
88
+ if (text !== this.oldText) {
89
+ return Promise.reject(new Error(`Invalid replace: "${text}" != "${this.oldText}".`));
90
+ }
91
+ // TODO: throw error if oldText doesn't match removed string.
92
+ return host.write(this.path, `${prefix}${this.newText}${suffix}`);
93
+ });
94
+ }
95
+ }
96
+ exports.ReplaceChange = ReplaceChange;
97
97
  //# sourceMappingURL=change.js.map