@apimatic/cli 1.1.0-beta.8 → 1.1.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 (216) hide show
  1. package/README.md +117 -13
  2. package/lib/actions/portal/copilot.d.ts +1 -0
  3. package/lib/actions/portal/copilot.js +12 -12
  4. package/lib/actions/portal/copilot.js.map +1 -1
  5. package/lib/actions/portal/generate.js +7 -1
  6. package/lib/actions/portal/generate.js.map +1 -1
  7. package/lib/actions/portal/quickstart.d.ts +1 -0
  8. package/lib/actions/portal/quickstart.js +40 -6
  9. package/lib/actions/portal/quickstart.js.map +1 -1
  10. package/lib/actions/portal/serve.d.ts +1 -0
  11. package/lib/actions/portal/serve.js +77 -20
  12. package/lib/actions/portal/serve.js.map +1 -1
  13. package/lib/actions/portal/toc/new-toc.js +8 -20
  14. package/lib/actions/portal/toc/new-toc.js.map +1 -1
  15. package/lib/actions/publishing/profile/list.d.ts +11 -0
  16. package/lib/actions/publishing/profile/list.js +29 -0
  17. package/lib/actions/publishing/profile/list.js.map +1 -0
  18. package/lib/actions/sdk/generate.d.ts +9 -5
  19. package/lib/actions/sdk/generate.js +76 -30
  20. package/lib/actions/sdk/generate.js.map +1 -1
  21. package/lib/actions/sdk/merge-source-tree.d.ts +12 -0
  22. package/lib/actions/sdk/merge-source-tree.js +78 -0
  23. package/lib/actions/sdk/merge-source-tree.js.map +1 -0
  24. package/lib/actions/sdk/publish/interactive.d.ts +13 -0
  25. package/lib/actions/sdk/publish/interactive.js +105 -0
  26. package/lib/actions/sdk/publish/interactive.js.map +1 -0
  27. package/lib/actions/sdk/publish/non-interactive.d.ts +14 -0
  28. package/lib/actions/sdk/publish/non-interactive.js +101 -0
  29. package/lib/actions/sdk/publish/non-interactive.js.map +1 -0
  30. package/lib/actions/sdk/publish.d.ts +18 -0
  31. package/lib/actions/sdk/publish.js +56 -0
  32. package/lib/actions/sdk/publish.js.map +1 -0
  33. package/lib/actions/sdk/quickstart.js +2 -1
  34. package/lib/actions/sdk/quickstart.js.map +1 -1
  35. package/lib/actions/sdk/save-changes.d.ts +8 -0
  36. package/lib/actions/sdk/save-changes.js +93 -0
  37. package/lib/actions/sdk/save-changes.js.map +1 -0
  38. package/lib/application/portal/recipe/recipe-generator.js +14 -29
  39. package/lib/application/portal/recipe/recipe-generator.js.map +1 -1
  40. package/lib/application/portal/toc/toc-structure-generator.d.ts +3 -19
  41. package/lib/application/portal/toc/toc-structure-generator.js +43 -33
  42. package/lib/application/portal/toc/toc-structure-generator.js.map +1 -1
  43. package/lib/commands/portal/recipe/new.js +2 -2
  44. package/lib/commands/portal/recipe/new.js.map +1 -1
  45. package/lib/commands/portal/serve.js +3 -3
  46. package/lib/commands/portal/serve.js.map +1 -1
  47. package/lib/commands/portal/toc/new.js +2 -2
  48. package/lib/commands/portal/toc/new.js.map +1 -1
  49. package/lib/commands/publishing/profile/list.d.ts +9 -0
  50. package/lib/commands/publishing/profile/list.js +28 -0
  51. package/lib/commands/publishing/profile/list.js.map +1 -0
  52. package/lib/commands/quickstart.js +1 -1
  53. package/lib/commands/quickstart.js.map +1 -1
  54. package/lib/commands/sdk/generate.d.ts +7 -2
  55. package/lib/commands/sdk/generate.js +37 -9
  56. package/lib/commands/sdk/generate.js.map +1 -1
  57. package/lib/commands/sdk/publish.d.ts +18 -0
  58. package/lib/commands/sdk/publish.js +73 -0
  59. package/lib/commands/sdk/publish.js.map +1 -0
  60. package/lib/commands/sdk/save-changes.d.ts +14 -0
  61. package/lib/commands/sdk/save-changes.js +51 -0
  62. package/lib/commands/sdk/save-changes.js.map +1 -0
  63. package/lib/hooks/not-found.js +1 -1
  64. package/lib/hooks/not-found.js.map +1 -1
  65. package/lib/infrastructure/debounce-service.js +3 -0
  66. package/lib/infrastructure/debounce-service.js.map +1 -1
  67. package/lib/infrastructure/env-info.d.ts +2 -0
  68. package/lib/infrastructure/env-info.js +23 -12
  69. package/lib/infrastructure/env-info.js.map +1 -1
  70. package/lib/infrastructure/file-service.d.ts +9 -0
  71. package/lib/infrastructure/file-service.js +94 -5
  72. package/lib/infrastructure/file-service.js.map +1 -1
  73. package/lib/infrastructure/git-service.d.ts +14 -0
  74. package/lib/infrastructure/git-service.js +90 -0
  75. package/lib/infrastructure/git-service.js.map +1 -0
  76. package/lib/infrastructure/launcher-service.d.ts +5 -0
  77. package/lib/infrastructure/launcher-service.js +35 -2
  78. package/lib/infrastructure/launcher-service.js.map +1 -1
  79. package/lib/infrastructure/os-extensions.d.ts +2 -0
  80. package/lib/infrastructure/os-extensions.js +6 -0
  81. package/lib/infrastructure/os-extensions.js.map +1 -0
  82. package/lib/infrastructure/service-error.d.ts +14 -2
  83. package/lib/infrastructure/service-error.js +26 -9
  84. package/lib/infrastructure/service-error.js.map +1 -1
  85. package/lib/infrastructure/services/api-service.d.ts +1 -0
  86. package/lib/infrastructure/services/api-service.js +26 -2
  87. package/lib/infrastructure/services/api-service.js.map +1 -1
  88. package/lib/infrastructure/services/portal-service.d.ts +11 -2
  89. package/lib/infrastructure/services/portal-service.js +123 -18
  90. package/lib/infrastructure/services/portal-service.js.map +1 -1
  91. package/lib/infrastructure/services/publishing-api-service.d.ts +19 -0
  92. package/lib/infrastructure/services/publishing-api-service.js +111 -0
  93. package/lib/infrastructure/services/publishing-api-service.js.map +1 -0
  94. package/lib/infrastructure/services/validation-service.js.map +1 -1
  95. package/lib/infrastructure/zip-service.d.ts +2 -2
  96. package/lib/infrastructure/zip-service.js +46 -25
  97. package/lib/infrastructure/zip-service.js.map +1 -1
  98. package/lib/prompts/format.d.ts +0 -2
  99. package/lib/prompts/format.js +0 -31
  100. package/lib/prompts/format.js.map +1 -1
  101. package/lib/prompts/portal/generate.d.ts +1 -1
  102. package/lib/prompts/portal/generate.js +9 -3
  103. package/lib/prompts/portal/generate.js.map +1 -1
  104. package/lib/prompts/portal/quickstart.d.ts +4 -0
  105. package/lib/prompts/portal/quickstart.js +22 -0
  106. package/lib/prompts/portal/quickstart.js.map +1 -1
  107. package/lib/prompts/portal/serve.d.ts +4 -0
  108. package/lib/prompts/portal/serve.js +20 -1
  109. package/lib/prompts/portal/serve.js.map +1 -1
  110. package/lib/prompts/portal/toc/new-toc.d.ts +2 -2
  111. package/lib/prompts/portal/toc/new-toc.js +3 -3
  112. package/lib/prompts/portal/toc/new-toc.js.map +1 -1
  113. package/lib/prompts/prompt.d.ts +6 -0
  114. package/lib/prompts/prompt.js +45 -0
  115. package/lib/prompts/prompt.js.map +1 -1
  116. package/lib/prompts/publishing/profile/list.d.ts +9 -0
  117. package/lib/prompts/publishing/profile/list.js +27 -0
  118. package/lib/prompts/publishing/profile/list.js.map +1 -0
  119. package/lib/prompts/sdk/generate.d.ts +9 -4
  120. package/lib/prompts/sdk/generate.js +37 -15
  121. package/lib/prompts/sdk/generate.js.map +1 -1
  122. package/lib/prompts/sdk/merge-source-tree.d.ts +22 -0
  123. package/lib/prompts/sdk/merge-source-tree.js +90 -0
  124. package/lib/prompts/sdk/merge-source-tree.js.map +1 -0
  125. package/lib/prompts/sdk/publish/interactive.d.ts +30 -0
  126. package/lib/prompts/sdk/publish/interactive.js +139 -0
  127. package/lib/prompts/sdk/publish/interactive.js.map +1 -0
  128. package/lib/prompts/sdk/publish/non-interactive.d.ts +27 -0
  129. package/lib/prompts/sdk/publish/non-interactive.js +97 -0
  130. package/lib/prompts/sdk/publish/non-interactive.js.map +1 -0
  131. package/lib/prompts/sdk/publish.d.ts +12 -0
  132. package/lib/prompts/sdk/publish.js +16 -0
  133. package/lib/prompts/sdk/publish.js.map +1 -0
  134. package/lib/prompts/sdk/save-changes.d.ts +21 -0
  135. package/lib/prompts/sdk/save-changes.js +84 -0
  136. package/lib/prompts/sdk/save-changes.js.map +1 -0
  137. package/lib/types/build/build.d.ts +81 -2
  138. package/lib/types/build/build.js +158 -0
  139. package/lib/types/build/build.js.map +1 -1
  140. package/lib/types/build-context.d.ts +12 -1
  141. package/lib/types/build-context.js +78 -4
  142. package/lib/types/build-context.js.map +1 -1
  143. package/lib/types/events/sdk-changes-saved.d.ts +8 -0
  144. package/lib/types/events/sdk-changes-saved.js +11 -0
  145. package/lib/types/events/sdk-changes-saved.js.map +1 -0
  146. package/lib/types/events/sdk-changes-tracked.d.ts +8 -0
  147. package/lib/types/events/sdk-changes-tracked.js +11 -0
  148. package/lib/types/events/sdk-changes-tracked.js.map +1 -0
  149. package/lib/types/events/sdk-conflicts-resolved.d.ts +8 -0
  150. package/lib/types/events/sdk-conflicts-resolved.js +11 -0
  151. package/lib/types/events/sdk-conflicts-resolved.js.map +1 -0
  152. package/lib/types/events/sdk-publish-validation-failed.d.ts +5 -0
  153. package/lib/types/events/sdk-publish-validation-failed.js +8 -0
  154. package/lib/types/events/sdk-publish-validation-failed.js.map +1 -0
  155. package/lib/types/file/directory.d.ts +10 -1
  156. package/lib/types/file/directory.js +63 -5
  157. package/lib/types/file/directory.js.map +1 -1
  158. package/lib/types/file/directoryPath.js.map +1 -1
  159. package/lib/types/file/urlPath.d.ts +4 -0
  160. package/lib/types/file/urlPath.js +9 -0
  161. package/lib/types/file/urlPath.js.map +1 -1
  162. package/lib/types/merge-source-tree-context.d.ts +28 -0
  163. package/lib/types/merge-source-tree-context.js +63 -0
  164. package/lib/types/merge-source-tree-context.js.map +1 -0
  165. package/lib/types/package-settings-context.d.ts +10 -0
  166. package/lib/types/package-settings-context.js +20 -0
  167. package/lib/types/package-settings-context.js.map +1 -0
  168. package/lib/types/publish/package-settings-configuration.d.ts +74 -0
  169. package/lib/types/publish/package-settings-configuration.js +2 -0
  170. package/lib/types/publish/package-settings-configuration.js.map +1 -0
  171. package/lib/types/publish/profile-id.d.ts +10 -0
  172. package/lib/types/publish/profile-id.js +22 -0
  173. package/lib/types/publish/profile-id.js.map +1 -0
  174. package/lib/types/publish/publishing-profile.d.ts +26 -0
  175. package/lib/types/publish/publishing-profile.js +154 -0
  176. package/lib/types/publish/publishing-profile.js.map +1 -0
  177. package/lib/types/publish/publishing-profiles.d.ts +12 -0
  178. package/lib/types/publish/publishing-profiles.js +36 -0
  179. package/lib/types/publish/publishing-profiles.js.map +1 -0
  180. package/lib/types/publish/version.d.ts +7 -0
  181. package/lib/types/publish/version.js +17 -0
  182. package/lib/types/publish/version.js.map +1 -0
  183. package/lib/types/publish-api/publish-log.d.ts +20 -0
  184. package/lib/types/publish-api/publish-log.js +2 -0
  185. package/lib/types/publish-api/publish-log.js.map +1 -0
  186. package/lib/types/publish-api/publishing-info.d.ts +4 -0
  187. package/lib/types/publish-api/publishing-info.js +2 -0
  188. package/lib/types/publish-api/publishing-info.js.map +1 -0
  189. package/lib/types/publish-api/publishing-profile-item.d.ts +190 -0
  190. package/lib/types/publish-api/publishing-profile-item.js +6 -0
  191. package/lib/types/publish-api/publishing-profile-item.js.map +1 -0
  192. package/lib/types/save-changes-context.d.ts +17 -0
  193. package/lib/types/save-changes-context.js +42 -0
  194. package/lib/types/save-changes-context.js.map +1 -0
  195. package/lib/types/sdk/generate.d.ts +8 -0
  196. package/lib/types/sdk/generate.js +10 -0
  197. package/lib/types/sdk/generate.js.map +1 -1
  198. package/lib/types/sdk-context.d.ts +5 -4
  199. package/lib/types/sdk-context.js +26 -13
  200. package/lib/types/sdk-context.js.map +1 -1
  201. package/lib/types/sdl/sdl.d.ts +0 -28
  202. package/lib/types/sdl/sdl.js +1 -128
  203. package/lib/types/sdl/sdl.js.map +1 -1
  204. package/lib/types/spec-context.js.map +1 -1
  205. package/lib/types/temp-context.js.map +1 -1
  206. package/lib/types/toc/toc-components.d.ts +37 -0
  207. package/lib/types/toc/toc-components.js +97 -0
  208. package/lib/types/toc/toc-components.js.map +1 -0
  209. package/lib/types/toc/toc.d.ts +11 -0
  210. package/lib/utils/string-utils.d.ts +0 -1
  211. package/lib/utils/string-utils.js +0 -42
  212. package/lib/utils/string-utils.js.map +1 -1
  213. package/package.json +28 -20
  214. package/lib/types/versioned-build-context.d.ts +0 -9
  215. package/lib/types/versioned-build-context.js +0 -21
  216. package/lib/types/versioned-build-context.js.map +0 -1
@@ -0,0 +1,36 @@
1
+ import { err, ok } from 'neverthrow';
2
+ import { PublishingProfile } from './publishing-profile.js';
3
+ export class PublishingProfiles {
4
+ constructor(items) {
5
+ this.items = items;
6
+ }
7
+ static create(items) {
8
+ if (items.length === 0) {
9
+ return err('No publishing profiles found. Please create a publishing profile on the APIMatic App before publishing an SDK.');
10
+ }
11
+ return ok(new PublishingProfiles(items.map((item) => PublishingProfile.create(item))));
12
+ }
13
+ getActiveProfiles() {
14
+ return this.items.filter((p) => p.hasEnabledLanguages());
15
+ }
16
+ toActiveProfilesGroups() {
17
+ return this.groupByApiGroup(this.getActiveProfiles().map((p) => p.toPublishingProfileWithLanguagesGroup()));
18
+ }
19
+ toPublishingProfileSummariesByApiGroups() {
20
+ return this.groupByApiGroup(this.items.map((p) => p.toPublishingProfileSummaryGroup()));
21
+ }
22
+ groupByApiGroup(entries) {
23
+ const map = new Map();
24
+ for (const entry of entries) {
25
+ const existing = map.get(entry.apiGroupName);
26
+ if (existing) {
27
+ existing.profiles.push(...entry.profiles);
28
+ }
29
+ else {
30
+ map.set(entry.apiGroupName, Object.assign(Object.assign({}, entry), { profiles: [...entry.profiles] }));
31
+ }
32
+ }
33
+ return [...map.values()];
34
+ }
35
+ }
36
+ //# sourceMappingURL=publishing-profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishing-profiles.js","sourceRoot":"","sources":["../../../src/types/publish/publishing-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,YAAY,CAAC;AAM7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,kBAAkB;IAC7B,YAAqC,KAA0B;QAA1B,UAAK,GAAL,KAAK,CAAqB;IAAG,CAAC;IAE5D,MAAM,CAAC,MAAM,CAAC,KAA8B;QACjD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,GAAG,CAAC,gHAAgH,CAAC,C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M,EAAE,CAAC,CAAC;IAC3B,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ import { Result } from 'neverthrow';
2
+ export declare class SemVersion {
3
+ private readonly value;
4
+ private constructor();
5
+ static tryCreate(value: string): Result<SemVersion, string>;
6
+ toString(): string;
7
+ }
@@ -0,0 +1,17 @@
1
+ import { ok, err } from 'neverthrow';
2
+ export class SemVersion {
3
+ constructor(value) {
4
+ this.value = value;
5
+ }
6
+ static tryCreate(value) {
7
+ const parts = value.split('.');
8
+ if (parts.length !== 3 || !parts.every((p) => p !== '' && !isNaN(Number(p)) && Number(p) >= 0)) {
9
+ return err('Invalid version format. Expected major.minor.patch (e.g., 1.0.0).');
10
+ }
11
+ return ok(new SemVersion(value));
12
+ }
13
+ toString() {
14
+ return this.value;
15
+ }
16
+ }
17
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/types/publish/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,EAAE,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,OAAO,UAAU;IAGrB,YAAoB,KAAa;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YAC/F,OAAO,GAAG,CAAC,mEAAmE,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,EAAE,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACnC,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ type SdkLanguage = "CSharp" | "Java" | "Php" | "Python" | "Ruby" | "TypeScript";
2
+ type PublishType = "Package" | "SourceCode";
3
+ type PublishEventType = "Queued" | "InProgress" | "Succeeded" | "Failed" | "Exception" | "InternalError";
4
+ export interface PublishLogEventItem {
5
+ sdkLanguage: SdkLanguage;
6
+ languageVersion: string;
7
+ publishType: PublishType;
8
+ eventType: PublishEventType;
9
+ inProgressTimeStamp: string | null;
10
+ timeStamp: string;
11
+ logUrl: string | null;
12
+ sdkUrl: string | null;
13
+ packageUrl: string | null;
14
+ sourceUrl: string | null;
15
+ }
16
+ export interface PublishLogItem {
17
+ publishLogId: string;
18
+ events: PublishLogEventItem[];
19
+ }
20
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=publish-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish-log.js","sourceRoot":"","sources":["../../../src/types/publish-api/publish-log.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface PublishingInfo {
2
+ publishLogId: string;
3
+ publishingLogUrl: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=publishing-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishing-info.js","sourceRoot":"","sources":["../../../src/types/publish-api/publishing-info.ts"],"names":[],"mappings":""}
@@ -0,0 +1,190 @@
1
+ import { Language } from '../sdk/generate.js';
2
+ export declare enum PublishType {
3
+ PackagePublishing = "package",
4
+ SourceCodePublishing = "sourcecode"
5
+ }
6
+ export interface KeyValueItem {
7
+ key: string;
8
+ value: string;
9
+ }
10
+ export interface GitConfigurationItem {
11
+ isEnabled: boolean;
12
+ credentialsId: string;
13
+ repositoryName: string;
14
+ branch: string;
15
+ }
16
+ export interface CSharpConfigurationItem {
17
+ isEnabled: boolean;
18
+ credentialsId: string;
19
+ packageId: string;
20
+ authors: string | null;
21
+ description: string | null;
22
+ title: string | null;
23
+ packageTags: string | null;
24
+ repositoryUrl: string | null;
25
+ repositoryType: string | null;
26
+ packageProjectUrl: string | null;
27
+ packageIcon: string | null;
28
+ packageReleaseNotes: string | null;
29
+ copyright: string | null;
30
+ }
31
+ export interface GoConfigurationItem {
32
+ isEnabled: boolean;
33
+ credentialsId: string;
34
+ packageName: string;
35
+ }
36
+ export interface JavaDeveloper {
37
+ name: string;
38
+ email: string;
39
+ organization: string | null;
40
+ organizationUrl: string | null;
41
+ }
42
+ export interface JavaSnapShotRepository {
43
+ id: string;
44
+ name: string | null;
45
+ url: string | null;
46
+ }
47
+ export interface JavaDistributionManagement {
48
+ snapShotRepository: JavaSnapShotRepository;
49
+ }
50
+ export interface JavaScm {
51
+ connection: string;
52
+ developerConnection: string;
53
+ url: string;
54
+ }
55
+ export interface JavaConfigurationItem {
56
+ isEnabled: boolean;
57
+ credentialsId: string;
58
+ groupId: string;
59
+ artifactId: string;
60
+ name: string;
61
+ description: string;
62
+ url: string;
63
+ developers: JavaDeveloper[];
64
+ distributionManagement: JavaDistributionManagement;
65
+ scm: JavaScm;
66
+ }
67
+ export interface PhpAuthor {
68
+ name: string | null;
69
+ email: string | null;
70
+ homepage: string | null;
71
+ role: string | null;
72
+ }
73
+ export interface PhpSupport {
74
+ email: string | null;
75
+ issues: string | null;
76
+ forum: string | null;
77
+ wiki: string | null;
78
+ irc: string | null;
79
+ chat: string | null;
80
+ source: string | null;
81
+ docs: string | null;
82
+ rss: string | null;
83
+ }
84
+ export interface PhpConfigurationItem {
85
+ isEnabled: boolean;
86
+ credentialsId: string;
87
+ gitCredentialsId: string;
88
+ repositoryName: string;
89
+ branchName: string;
90
+ vendorName: string;
91
+ projectName: string;
92
+ description: string;
93
+ type: string | null;
94
+ keywords: string[];
95
+ homepage: string | null;
96
+ authors: PhpAuthor[];
97
+ support: PhpSupport;
98
+ releaseNotes: string | null;
99
+ }
100
+ export interface PythonPerson {
101
+ email: string | null;
102
+ name: string | null;
103
+ }
104
+ export interface PythonConfigurationItem {
105
+ isEnabled: boolean;
106
+ credentialsId: string;
107
+ name: string;
108
+ description: string | null;
109
+ authors: PythonPerson[];
110
+ maintainers: PythonPerson[];
111
+ keywords: string[];
112
+ classifiers: string[];
113
+ urls: KeyValueItem[];
114
+ }
115
+ export interface RubyConfigurationItem {
116
+ isEnabled: boolean;
117
+ credentialsId: string;
118
+ name: string;
119
+ authors: string[];
120
+ summary: string;
121
+ description: string | null;
122
+ email: string[];
123
+ homepage: string | null;
124
+ metadata: KeyValueItem[];
125
+ postInstallMessage: string | null;
126
+ requirements: string[];
127
+ }
128
+ export interface TsPerson {
129
+ name: string | null;
130
+ email: string | null;
131
+ url: string | null;
132
+ }
133
+ export interface TsBugs {
134
+ url: string | null;
135
+ email: string | null;
136
+ }
137
+ export interface TsRepository {
138
+ type: string | null;
139
+ url: string | null;
140
+ directory: string | null;
141
+ }
142
+ export interface TypeScriptConfigurationItem {
143
+ isEnabled: boolean;
144
+ credentialsId: string;
145
+ name: string;
146
+ author: TsPerson;
147
+ description: string | null;
148
+ contributors: TsPerson[];
149
+ bugs: TsBugs;
150
+ keywords: string[];
151
+ homepage: string | null;
152
+ repository: TsRepository;
153
+ }
154
+ export interface PublishingProfileItem {
155
+ id: string;
156
+ name: string;
157
+ apiGroupId: string;
158
+ apiGroupName: string;
159
+ cSharpConfiguration: CSharpConfigurationItem | null;
160
+ goConfiguration: GoConfigurationItem | null;
161
+ javaConfiguration: JavaConfigurationItem | null;
162
+ phpConfiguration: PhpConfigurationItem | null;
163
+ pythonConfiguration: PythonConfigurationItem | null;
164
+ rubyConfiguration: RubyConfigurationItem | null;
165
+ typeScriptConfiguration: TypeScriptConfigurationItem | null;
166
+ cSharpGitConfiguration: GitConfigurationItem | null;
167
+ goGitConfiguration: GitConfigurationItem | null;
168
+ javaGitConfiguration: GitConfigurationItem | null;
169
+ phpGitConfiguration: GitConfigurationItem | null;
170
+ pythonGitConfiguration: GitConfigurationItem | null;
171
+ rubyGitConfiguration: GitConfigurationItem | null;
172
+ typeScriptGitConfiguration: GitConfigurationItem | null;
173
+ }
174
+ export interface PublishingProfileWithLanguages {
175
+ profile: PublishingProfileItem;
176
+ enabledLanguages: Language[];
177
+ }
178
+ export interface PublishingProfileWithLanguagesGroup {
179
+ apiGroupName: string;
180
+ profiles: PublishingProfileWithLanguages[];
181
+ }
182
+ export interface PublishingProfileSummary {
183
+ name: string;
184
+ id: string;
185
+ enabledLanguages: Language[];
186
+ }
187
+ export interface PublishingProfileSummaryGroup {
188
+ apiGroupName: string;
189
+ profiles: PublishingProfileSummary[];
190
+ }
@@ -0,0 +1,6 @@
1
+ export var PublishType;
2
+ (function (PublishType) {
3
+ PublishType["PackagePublishing"] = "package";
4
+ PublishType["SourceCodePublishing"] = "sourcecode";
5
+ })(PublishType || (PublishType = {}));
6
+ //# sourceMappingURL=publishing-profile-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishing-profile-item.js","sourceRoot":"","sources":["../../../src/types/publish-api/publishing-profile-item.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4CAA6B,CAAA;IAC7B,kDAAmC,CAAA;AACrC,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
@@ -0,0 +1,17 @@
1
+ import { Directory } from "./file/directory.js";
2
+ import { DirectoryPath } from "./file/directoryPath.js";
3
+ import { FilePath } from "./file/filePath.js";
4
+ import { Language } from "./sdk/generate.js";
5
+ export declare class SaveChangesContext {
6
+ private readonly sourceTreePath;
7
+ private readonly sdkReviewDirectory;
8
+ private readonly fileService;
9
+ private readonly zipService;
10
+ private readonly gitService;
11
+ private readonly sdkInputDirectory;
12
+ constructor(sourceTreePath: FilePath, sdkReviewDirectory: DirectoryPath, sdkInputDirectory: DirectoryPath | undefined, workingDirectory: DirectoryPath, language: Language, version: string | undefined);
13
+ isSdkInputDirectoryMissing(onMissingDirectory: (directory: DirectoryPath) => void): Promise<boolean>;
14
+ getChangesForReviewDirectory(): Promise<Directory>;
15
+ cleanUpSdkReviewDirectory(onCleanUpFailure: () => void): Promise<void>;
16
+ saveSourceTree(): Promise<void>;
17
+ }
@@ -0,0 +1,42 @@
1
+ import { FileService } from "../infrastructure/file-service.js";
2
+ import { GitService } from "../infrastructure/git-service.js";
3
+ import { ZipService } from "../infrastructure/zip-service.js";
4
+ import { FileName } from "./file/fileName.js";
5
+ export class SaveChangesContext {
6
+ constructor(sourceTreePath, sdkReviewDirectory, sdkInputDirectory, workingDirectory, language, version) {
7
+ this.sourceTreePath = sourceTreePath;
8
+ this.sdkReviewDirectory = sdkReviewDirectory;
9
+ this.fileService = new FileService();
10
+ this.zipService = new ZipService();
11
+ this.gitService = new GitService();
12
+ this.sdkInputDirectory = sdkInputDirectory !== null && sdkInputDirectory !== void 0 ? sdkInputDirectory : (version
13
+ ? workingDirectory.join("sdk").join(version).join(language)
14
+ : workingDirectory.join("sdk").join(language));
15
+ }
16
+ async isSdkInputDirectoryMissing(onMissingDirectory) {
17
+ if (await this.fileService.directoryEmpty(this.sdkInputDirectory)) {
18
+ onMissingDirectory(this.sdkInputDirectory);
19
+ return true;
20
+ }
21
+ return false;
22
+ }
23
+ async getChangesForReviewDirectory() {
24
+ const sdkGitDir = this.sdkReviewDirectory.join(".git");
25
+ await this.fileService.createDirectoryIfNotExists(sdkGitDir);
26
+ await this.zipService.unArchive(this.sourceTreePath, sdkGitDir);
27
+ await this.gitService.checkoutCustomBranch(this.sdkReviewDirectory);
28
+ await this.fileService.cleanDirectoryExcluding(this.sdkReviewDirectory, [new FileName(".git")]);
29
+ await this.fileService.copyDirectoryExcluding(this.sdkInputDirectory, this.sdkReviewDirectory, [new FileName(".git")]);
30
+ return this.gitService.getDirectoryWithUpdatedFiles(this.sdkReviewDirectory);
31
+ }
32
+ async cleanUpSdkReviewDirectory(onCleanUpFailure) {
33
+ await this.fileService.pollDeleteDirectory(this.sdkReviewDirectory, onCleanUpFailure);
34
+ }
35
+ async saveSourceTree() {
36
+ const sdkGitDir = this.sdkReviewDirectory.join(".git");
37
+ await this.gitService.commitReviewedChanges(this.sdkReviewDirectory);
38
+ await this.gitService.forceCheckoutMainBranch(this.sdkReviewDirectory);
39
+ await this.zipService.archive(sdkGitDir, this.sourceTreePath);
40
+ }
41
+ }
42
+ //# sourceMappingURL=save-changes-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-changes-context.js","sourceRoot":"","sources":["../../src/types/save-changes-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAI9C,MAAM,OAAO,kBAAkB;IAM7B,YACmB,cAAwB,EACxB,kBAAiC,EAClD,iBAA4C,EAC5C,gBAA+B,EAC/B,QAAkB,EAClB,OAA2B;QALV,mBAAc,GAAd,cAAc,CAAU;QACxB,uBAAkB,GAAlB,kBAAkB,CAAe;QAPnC,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAChC,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;QAC9B,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;QAW7C,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,aAAjB,iBAAiB,cAAjB,iBAAiB,GAAI,CAAC,OAAO;YAClD,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC3D,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,CAAC;IAEM,KA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CAAC,CAAC;QACvD,MAAM,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACrE,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACvE,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -7,4 +7,12 @@ export declare enum Language {
7
7
  TYPESCRIPT = "typescript",
8
8
  GO = "go"
9
9
  }
10
+ export declare enum CodeGenerationVersion {
11
+ V3 = "v3",
12
+ V4 = "v4"
13
+ }
14
+ export declare enum Stability {
15
+ STABLE = "stable",
16
+ BETA = "beta"
17
+ }
10
18
  export declare function mapLanguages(languageFlag: number): Language[];
@@ -8,6 +8,16 @@ export var Language;
8
8
  Language["TYPESCRIPT"] = "typescript";
9
9
  Language["GO"] = "go";
10
10
  })(Language || (Language = {}));
11
+ export var CodeGenerationVersion;
12
+ (function (CodeGenerationVersion) {
13
+ CodeGenerationVersion["V3"] = "v3";
14
+ CodeGenerationVersion["V4"] = "v4";
15
+ })(CodeGenerationVersion || (CodeGenerationVersion = {}));
16
+ export var Stability;
17
+ (function (Stability) {
18
+ Stability["STABLE"] = "stable";
19
+ Stability["BETA"] = "beta";
20
+ })(Stability || (Stability = {}));
11
21
  const languageMap = {
12
22
  1: Language.CSHARP,
13
23
  2: Language.GO,
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/types/sdk/generate.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAQX;AARD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,uBAAW,CAAA;IACX,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,qCAAyB,CAAA;IACzB,qBAAS,CAAA;AACX,CAAC,EARW,QAAQ,KAAR,QAAQ,QAQnB;A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MAAM;IAClB,CAAC,EAAE,QAAQ,CAAC,EAAE;IACd,CAAC,EAAE,QAAQ,CAAC,IAAI;IAChB,CAAC,EAAE,QAAQ,CAAC,GAAG;IACf,EAAE,EAAE,QAAQ,CAAC,MAAM;IACnB,EAAE,EAAE,QAAQ,CAAC,IAAI;IACjB,GAAG,EAAE,QAAQ,CAAC,UAAU;CACzB,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,YAAoB;IAC/C,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;SAC/B,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;SACzD,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC"}
@@ -2,13 +2,14 @@ import { DirectoryPath } from "./file/directoryPath.js";
2
2
  import { FilePath } from "./file/filePath.js";
3
3
  import { Language } from "./sdk/generate.js";
4
4
  export declare class SdkContext {
5
- private readonly sdkDirectory;
6
5
  private readonly language;
7
6
  private readonly fileService;
8
7
  private readonly zipService;
9
- constructor(sdkDirectory: DirectoryPath, language: Language);
8
+ private readonly sdkDirectory;
9
+ constructor(language: Language, sdkDirectory: DirectoryPath, requireUncustomizedDir: boolean, version?: string);
10
10
  private get zipPath();
11
- get sdkLanguageDirectory(): DirectoryPath;
12
11
  exists(): Promise<boolean>;
13
- save(tempPortalFilePath: FilePath, zipPortal: boolean): Promise<DirectoryPath>;
12
+ save(tempSdkDirectory: DirectoryPath, zipSdk: boolean): Promise<DirectoryPath>;
13
+ loadSdkInTempDirectory(tempDirectory: DirectoryPath, tempSdk: FilePath): Promise<DirectoryPath>;
14
+ loadSdkWithSourceTreeInTempDirectory(tempDirectory: DirectoryPath, tempSdk: FilePath, tempSdkSourceTree: FilePath): Promise<DirectoryPath>;
14
15
  }
@@ -3,30 +3,43 @@ import { FilePath } from "./file/filePath.js";
3
3
  import { FileName } from "./file/fileName.js";
4
4
  import { ZipService } from "../infrastructure/zip-service.js";
5
5
  export class SdkContext {
6
- constructor(sdkDirectory, language) {
7
- this.sdkDirectory = sdkDirectory;
6
+ constructor(language, sdkDirectory, requireUncustomizedDir, version) {
8
7
  this.language = language;
9
8
  this.fileService = new FileService();
10
9
  this.zipService = new ZipService();
10
+ const baseDirectory = requireUncustomizedDir ? sdkDirectory.join('uncustomized') : sdkDirectory;
11
+ this.sdkDirectory = version ? baseDirectory.join(version).join(language) : baseDirectory.join(language);
11
12
  }
12
13
  get zipPath() {
13
- return new FilePath(this.sdkLanguageDirectory, new FileName(`${this.language}.zip`));
14
- }
15
- get sdkLanguageDirectory() {
16
- return this.sdkDirectory.join(this.language);
14
+ return new FilePath(this.sdkDirectory, new FileName(`${this.language}.zip`));
17
15
  }
18
16
  async exists() {
19
- return !(await this.fileService.directoryEmpty(this.sdkLanguageDirectory));
17
+ return !(await this.fileService.directoryEmpty(this.sdkDirectory));
20
18
  }
21
- async save(tempPortalFilePath, zipPortal) {
22
- await this.fileService.cleanDirectory(this.sdkLanguageDirectory);
23
- if (zipPortal) {
24
- await this.fileService.copy(tempPortalFilePath, this.zipPath);
19
+ async save(tempSdkDirectory, zipSdk) {
20
+ await this.fileService.cleanDirectory(this.sdkDirectory);
21
+ if (!zipSdk) {
22
+ await this.fileService.copyDirectoryContents(tempSdkDirectory, this.sdkDirectory);
25
23
  }
26
24
  else {
27
- await this.zipService.unArchive(tempPortalFilePath, this.sdkLanguageDirectory);
25
+ await this.zipService.archive(tempSdkDirectory, this.zipPath);
28
26
  }
29
- return this.sdkLanguageDirectory;
27
+ return this.sdkDirectory;
28
+ }
29
+ async loadSdkInTempDirectory(tempDirectory, tempSdk) {
30
+ const tempSdkDirectory = tempDirectory.join('sdk-original');
31
+ await this.fileService.createDirectoryIfNotExists(tempSdkDirectory);
32
+ await this.zipService.unArchive(tempSdk, tempSdkDirectory);
33
+ return tempSdkDirectory;
34
+ }
35
+ async loadSdkWithSourceTreeInTempDirectory(tempDirectory, tempSdk, tempSdkSourceTree) {
36
+ const tempSdkDirectory = tempDirectory.join('sdk');
37
+ await this.fileService.createDirectoryIfNotExists(tempSdkDirectory);
38
+ await this.zipService.unArchive(tempSdk, tempSdkDirectory);
39
+ const gitSourceTreeDir = tempSdkDirectory.join('.git');
40
+ await this.fileService.createDirectoryIfNotExists(gitSourceTreeDir);
41
+ await this.zipService.unArchive(tempSdkSourceTree, gitSourceTreeDir);
42
+ return tempSdkDirectory;
30
43
  }
31
44
  }
32
45
  //# sourceMappingURL=sdk-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk-context.js","sourceRoot":"","sources":["../../src/types/sdk-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,MAAM,OAAO,UAAU;IAIrB,YAA6B,YAA2B,EAAmB,QAAkB;QAAhE,iBAAY,GAAZ,YAAY,CAAe;QAAmB,aAAQ,GAAR,QAAQ,CAAU;QAH5E,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAChC,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;IAG/C,CAAC;IAED,IAAY,OAAO;QACjB,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,QAAQ,CAAC,GAAG,IAAI,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC;IACvF,CAAC;IAED,IAAW,oBAAoB;QAC7B,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,OAAO,CAA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3B,MAAM,gBAAgB,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,WAAW,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;QACpE,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QAC3D,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvD,MAAM,IAAI,CAAC,WAAW,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;QACpE,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;QACrE,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF"}
@@ -1,38 +1,10 @@
1
- import { TocEndpoint, TocModelPage, TocWebhookPage, TocCallbackPage } from '../toc/toc.js';
2
- export type EndpointGroup = Map<string, TocEndpoint[]>;
3
- export type WebhookGroup = Map<string, TocWebhookPage[]>;
4
- export type CallbackGroup = Map<string, TocCallbackPage[]>;
5
- export type SdlTocComponents = {
6
- endpointGroups: EndpointGroup;
7
- models: TocModelPage[];
8
- webhookGroups: WebhookGroup;
9
- callbackGroups: CallbackGroup;
10
- };
11
1
  export interface Sdl {
12
2
  readonly Endpoints: SdlEndpoint[];
13
- readonly CustomTypes: SdlModel[];
14
- readonly Webhooks: SdlWebhook[];
15
3
  }
16
4
  export interface SdlEndpoint {
17
5
  readonly Name: string;
18
6
  readonly Description: string;
19
7
  readonly Group: string;
20
- readonly Callbacks: SdlCallback[];
21
- }
22
- export interface SdlModel {
23
- readonly Name: string;
24
- }
25
- export interface SdlCallback {
26
- readonly Id: string;
27
- readonly CallbackGroupName?: string;
28
- }
29
- export interface SdlWebhook {
30
- readonly Id: string;
31
- readonly WebhookGroupName?: string;
32
8
  }
33
9
  export declare function getEndpointDescription(endpointGroups: Map<string, SdlEndpoint[]>, endpointGroupName: string, endpointName: string): string;
34
10
  export declare function getEndpointGroupsFromSdl(sdl: Sdl): Map<string, SdlEndpoint[]>;
35
- export declare function extractEndpointGroupsForToc(sdl: Sdl): Map<string, TocEndpoint[]>;
36
- export declare function extractModelsForToc(sdl: Sdl): TocModelPage[];
37
- export declare function extractWebhooksForToc(sdl: Sdl): Map<string, TocWebhookPage[]>;
38
- export declare function extractCallbacksForToc(sdl: Sdl): Map<string, TocCallbackPage[]>;