@microsoft/power-apps-cli 0.9.1 → 0.10.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 (202) hide show
  1. package/README.md +81 -10
  2. package/dist/ArgumentProvider.d.ts +61 -0
  3. package/dist/ArgumentProvider.d.ts.map +1 -0
  4. package/dist/ArgumentProvider.js +247 -0
  5. package/dist/ArgumentProvider.js.map +1 -0
  6. package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts +17 -0
  7. package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts.map +1 -0
  8. package/dist/Authentication/NodeMsalAuthenticationProvider.js +91 -0
  9. package/dist/Authentication/NodeMsalAuthenticationProvider.js.map +1 -0
  10. package/dist/Authentication/PacCliAuthenticationProvider.d.ts +15 -0
  11. package/dist/Authentication/PacCliAuthenticationProvider.d.ts.map +1 -0
  12. package/dist/Authentication/PacCliAuthenticationProvider.js +51 -0
  13. package/dist/Authentication/PacCliAuthenticationProvider.js.map +1 -0
  14. package/dist/Authentication/ServicePrincipalAuthenticationProvider.d.ts +20 -0
  15. package/dist/Authentication/ServicePrincipalAuthenticationProvider.d.ts.map +1 -0
  16. package/dist/Authentication/ServicePrincipalAuthenticationProvider.js +51 -0
  17. package/dist/Authentication/ServicePrincipalAuthenticationProvider.js.map +1 -0
  18. package/dist/Bin.d.ts +6 -0
  19. package/dist/Bin.d.ts.map +1 -0
  20. package/dist/Bin.js +2 -3357
  21. package/dist/Bin.js.map +1 -0
  22. package/dist/Cli.d.ts +2 -0
  23. package/dist/Cli.d.ts.map +1 -0
  24. package/dist/Cli.js +131 -0
  25. package/dist/Cli.js.map +1 -0
  26. package/dist/CliSettings.d.ts +14 -0
  27. package/dist/CliSettings.d.ts.map +1 -0
  28. package/dist/CliSettings.js +70 -0
  29. package/dist/CliSettings.js.map +1 -0
  30. package/dist/CliUtils.d.ts +21 -0
  31. package/dist/CliUtils.d.ts.map +1 -0
  32. package/dist/CliUtils.js +92 -0
  33. package/dist/CliUtils.js.map +1 -0
  34. package/dist/Constants/HelpStrings.d.ts +168 -0
  35. package/dist/Constants/HelpStrings.d.ts.map +1 -0
  36. package/dist/Constants/HelpStrings.js +216 -0
  37. package/dist/Constants/HelpStrings.js.map +1 -0
  38. package/dist/Constants/VerbRegistry.d.ts +79 -0
  39. package/dist/Constants/VerbRegistry.d.ts.map +1 -0
  40. package/dist/Constants/VerbRegistry.js +46 -0
  41. package/dist/Constants/VerbRegistry.js.map +1 -0
  42. package/dist/Constants.d.ts +10 -0
  43. package/dist/Constants.d.ts.map +1 -0
  44. package/dist/Constants.js +12 -0
  45. package/dist/Constants.js.map +1 -0
  46. package/dist/Errors/CliError.d.ts +11 -0
  47. package/dist/Errors/CliError.d.ts.map +1 -0
  48. package/dist/Errors/CliError.js +16 -0
  49. package/dist/Errors/CliError.js.map +1 -0
  50. package/dist/FS/CliFs.d.ts +41 -0
  51. package/dist/FS/CliFs.d.ts.map +1 -0
  52. package/dist/FS/CliFs.js +136 -0
  53. package/dist/FS/CliFs.js.map +1 -0
  54. package/dist/HttpClient/CliHttpClient.d.ts +21 -0
  55. package/dist/HttpClient/CliHttpClient.d.ts.map +1 -0
  56. package/dist/HttpClient/CliHttpClient.js +118 -0
  57. package/dist/HttpClient/CliHttpClient.js.map +1 -0
  58. package/dist/Logger/CliLogger.d.ts +27 -0
  59. package/dist/Logger/CliLogger.d.ts.map +1 -0
  60. package/dist/Logger/CliLogger.js +222 -0
  61. package/dist/Logger/CliLogger.js.map +1 -0
  62. package/dist/Logger/ConsoleWriter.d.ts +15 -0
  63. package/dist/Logger/ConsoleWriter.d.ts.map +1 -0
  64. package/dist/Logger/ConsoleWriter.js +45 -0
  65. package/dist/Logger/ConsoleWriter.js.map +1 -0
  66. package/dist/Logger/Constants.d.ts +6 -0
  67. package/dist/Logger/Constants.d.ts.map +1 -0
  68. package/dist/Logger/Constants.js +15 -0
  69. package/dist/Logger/Constants.js.map +1 -0
  70. package/dist/Logger/LoggerSettings.d.ts +18 -0
  71. package/dist/Logger/LoggerSettings.d.ts.map +1 -0
  72. package/dist/Logger/LoggerSettings.js +100 -0
  73. package/dist/Logger/LoggerSettings.js.map +1 -0
  74. package/dist/Logger/OneDSWriter.d.ts +22 -0
  75. package/dist/Logger/OneDSWriter.d.ts.map +1 -0
  76. package/dist/Logger/OneDSWriter.js +137 -0
  77. package/dist/Logger/OneDSWriter.js.map +1 -0
  78. package/dist/Logger/Scrubber/ScrubCustomDimensions.d.ts +5 -0
  79. package/dist/Logger/Scrubber/ScrubCustomDimensions.d.ts.map +1 -0
  80. package/dist/Logger/Scrubber/ScrubCustomDimensions.js +46 -0
  81. package/dist/Logger/Scrubber/ScrubCustomDimensions.js.map +1 -0
  82. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.d.ts +27 -0
  83. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.d.ts.map +1 -0
  84. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.js +168 -0
  85. package/dist/Logger/Scrubber/ScrubCustomDimensionsConfig.js.map +1 -0
  86. package/dist/Logger/Scrubber/ScrubUtils.d.ts +8 -0
  87. package/dist/Logger/Scrubber/ScrubUtils.d.ts.map +1 -0
  88. package/dist/Logger/Scrubber/ScrubUtils.js +34 -0
  89. package/dist/Logger/Scrubber/ScrubUtils.js.map +1 -0
  90. package/dist/Types/Argument.types.d.ts +20 -0
  91. package/dist/Types/Argument.types.d.ts.map +1 -0
  92. package/dist/Types/Argument.types.js +5 -0
  93. package/dist/Types/Argument.types.js.map +1 -0
  94. package/dist/Types/Cli.types.d.ts +35 -0
  95. package/dist/Types/Cli.types.d.ts.map +1 -0
  96. package/dist/Types/Cli.types.js +5 -0
  97. package/dist/Types/Cli.types.js.map +1 -0
  98. package/dist/Types/Datasource.types.d.ts +43 -0
  99. package/dist/Types/Datasource.types.d.ts.map +1 -0
  100. package/dist/Types/Datasource.types.js +5 -0
  101. package/dist/Types/Datasource.types.js.map +1 -0
  102. package/dist/Types/LoggerTypes.types.d.ts +17 -0
  103. package/dist/Types/LoggerTypes.types.d.ts.map +1 -0
  104. package/dist/Types/LoggerTypes.types.js +5 -0
  105. package/dist/Types/LoggerTypes.types.js.map +1 -0
  106. package/dist/Utils/BuildVerbDescriptionTable.d.ts +9 -0
  107. package/dist/Utils/BuildVerbDescriptionTable.d.ts.map +1 -0
  108. package/dist/Utils/BuildVerbDescriptionTable.js +29 -0
  109. package/dist/Utils/BuildVerbDescriptionTable.js.map +1 -0
  110. package/dist/Utils/ConsoleOutput.d.ts +39 -0
  111. package/dist/Utils/ConsoleOutput.d.ts.map +1 -0
  112. package/dist/Utils/ConsoleOutput.js +111 -0
  113. package/dist/Utils/ConsoleOutput.js.map +1 -0
  114. package/dist/Utils/EnhanceNetworkError.d.ts +14 -0
  115. package/dist/Utils/EnhanceNetworkError.d.ts.map +1 -0
  116. package/dist/Utils/EnhanceNetworkError.js +59 -0
  117. package/dist/Utils/EnhanceNetworkError.js.map +1 -0
  118. package/dist/Verbs/AddDataSource.d.ts +19 -0
  119. package/dist/Verbs/AddDataSource.d.ts.map +1 -0
  120. package/dist/Verbs/AddDataSource.js +157 -0
  121. package/dist/Verbs/AddDataSource.js.map +1 -0
  122. package/dist/Verbs/AddDataverseApi.d.ts +13 -0
  123. package/dist/Verbs/AddDataverseApi.d.ts.map +1 -0
  124. package/dist/Verbs/AddDataverseApi.js +67 -0
  125. package/dist/Verbs/AddDataverseApi.js.map +1 -0
  126. package/dist/Verbs/AddFlow.d.ts +12 -0
  127. package/dist/Verbs/AddFlow.d.ts.map +1 -0
  128. package/dist/Verbs/AddFlow.js +66 -0
  129. package/dist/Verbs/AddFlow.js.map +1 -0
  130. package/dist/Verbs/DeleteDataSource.d.ts +6 -0
  131. package/dist/Verbs/DeleteDataSource.d.ts.map +1 -0
  132. package/dist/Verbs/DeleteDataSource.js +108 -0
  133. package/dist/Verbs/DeleteDataSource.js.map +1 -0
  134. package/dist/Verbs/FindDataverseApi.d.ts +12 -0
  135. package/dist/Verbs/FindDataverseApi.d.ts.map +1 -0
  136. package/dist/Verbs/FindDataverseApi.js +101 -0
  137. package/dist/Verbs/FindDataverseApi.js.map +1 -0
  138. package/dist/Verbs/Init.d.ts +6 -0
  139. package/dist/Verbs/Init.d.ts.map +1 -0
  140. package/dist/Verbs/Init.js +146 -0
  141. package/dist/Verbs/Init.js.map +1 -0
  142. package/dist/Verbs/ListCodeApps.d.ts +6 -0
  143. package/dist/Verbs/ListCodeApps.d.ts.map +1 -0
  144. package/dist/Verbs/ListCodeApps.js +31 -0
  145. package/dist/Verbs/ListCodeApps.js.map +1 -0
  146. package/dist/Verbs/ListConnectionReferences.d.ts +6 -0
  147. package/dist/Verbs/ListConnectionReferences.d.ts.map +1 -0
  148. package/dist/Verbs/ListConnectionReferences.js +80 -0
  149. package/dist/Verbs/ListConnectionReferences.js.map +1 -0
  150. package/dist/Verbs/ListDatasets.d.ts +6 -0
  151. package/dist/Verbs/ListDatasets.d.ts.map +1 -0
  152. package/dist/Verbs/ListDatasets.js +83 -0
  153. package/dist/Verbs/ListDatasets.js.map +1 -0
  154. package/dist/Verbs/ListEnvironmentVariables.d.ts +14 -0
  155. package/dist/Verbs/ListEnvironmentVariables.d.ts.map +1 -0
  156. package/dist/Verbs/ListEnvironmentVariables.js +82 -0
  157. package/dist/Verbs/ListEnvironmentVariables.js.map +1 -0
  158. package/dist/Verbs/ListFlows.d.ts +13 -0
  159. package/dist/Verbs/ListFlows.d.ts.map +1 -0
  160. package/dist/Verbs/ListFlows.js +88 -0
  161. package/dist/Verbs/ListFlows.js.map +1 -0
  162. package/dist/Verbs/ListSqlStoredProcedures.d.ts +6 -0
  163. package/dist/Verbs/ListSqlStoredProcedures.d.ts.map +1 -0
  164. package/dist/Verbs/ListSqlStoredProcedures.js +84 -0
  165. package/dist/Verbs/ListSqlStoredProcedures.js.map +1 -0
  166. package/dist/Verbs/ListTables.d.ts +6 -0
  167. package/dist/Verbs/ListTables.d.ts.map +1 -0
  168. package/dist/Verbs/ListTables.js +95 -0
  169. package/dist/Verbs/ListTables.js.map +1 -0
  170. package/dist/Verbs/Logout.d.ts +6 -0
  171. package/dist/Verbs/Logout.d.ts.map +1 -0
  172. package/dist/Verbs/Logout.js +28 -0
  173. package/dist/Verbs/Logout.js.map +1 -0
  174. package/dist/Verbs/Push.d.ts +6 -0
  175. package/dist/Verbs/Push.d.ts.map +1 -0
  176. package/dist/Verbs/Push.js +108 -0
  177. package/dist/Verbs/Push.js.map +1 -0
  178. package/dist/Verbs/RefreshDataSource.d.ts +6 -0
  179. package/dist/Verbs/RefreshDataSource.d.ts.map +1 -0
  180. package/dist/Verbs/RefreshDataSource.js +70 -0
  181. package/dist/Verbs/RefreshDataSource.js.map +1 -0
  182. package/dist/Verbs/RemoveFlow.d.ts +12 -0
  183. package/dist/Verbs/RemoveFlow.d.ts.map +1 -0
  184. package/dist/Verbs/RemoveFlow.js +98 -0
  185. package/dist/Verbs/RemoveFlow.js.map +1 -0
  186. package/dist/Verbs/Run.d.ts +6 -0
  187. package/dist/Verbs/Run.d.ts.map +1 -0
  188. package/dist/Verbs/Run.js +122 -0
  189. package/dist/Verbs/Run.js.map +1 -0
  190. package/dist/Verbs/TelemetrySettings.d.ts +12 -0
  191. package/dist/Verbs/TelemetrySettings.d.ts.map +1 -0
  192. package/dist/Verbs/TelemetrySettings.js +158 -0
  193. package/dist/Verbs/TelemetrySettings.js.map +1 -0
  194. package/dist/Verbs/VerbConstants.d.ts +203 -0
  195. package/dist/Verbs/VerbConstants.d.ts.map +1 -0
  196. package/dist/Verbs/VerbConstants.js +201 -0
  197. package/dist/Verbs/VerbConstants.js.map +1 -0
  198. package/dist/Verbs/index.d.ts +22 -0
  199. package/dist/Verbs/index.d.ts.map +1 -0
  200. package/dist/Verbs/index.js +22 -0
  201. package/dist/Verbs/index.js.map +1 -0
  202. package/package.json +5 -5
@@ -0,0 +1,216 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ export const HelpStrings = {
5
+ Global: {
6
+ ProgramDescription: 'Power Apps CLI for managing Power Apps code apps.',
7
+ Cloud: 'Cloud instance to use (e.g., prod, test, etc.).',
8
+ EnvironmentId: 'Environment ID to connect to.',
9
+ },
10
+ Verbs: {
11
+ 'Add-data-source': {
12
+ Description: 'Add a data source to the current Power Apps code app.',
13
+ Options: {
14
+ ApiId: 'API identifier.',
15
+ ConnectionId: 'Connection identifier.',
16
+ ConnectionRef: 'Connection reference name.',
17
+ ResourceName: 'Table or resource name.',
18
+ Dataset: 'Dataset identifier.',
19
+ OrgUrl: 'Organization URL.',
20
+ SqlStoredProcedure: 'SQL stored procedure name.',
21
+ SolutionId: 'Solution identifier.',
22
+ },
23
+ Examples: [
24
+ 'npx power-apps add-data-source --api-id dataverse --resource-name contact',
25
+ 'npx power-apps add-data-source --api-id shared_sql --connection-id <id> --dataset <db> --resource-name <table>',
26
+ ],
27
+ },
28
+ 'Delete-data-source': {
29
+ Description: 'Remove a data source from the Power Apps code app.',
30
+ Options: {
31
+ ApiId: 'API identifier associated with the data source.',
32
+ DataSourceName: 'Data source or table name to remove.',
33
+ SqlStoredProcedure: 'SQL stored procedure name to remove.',
34
+ Force: 'Skip confirmation prompt.',
35
+ },
36
+ Examples: [
37
+ 'npx power-apps delete-data-source --api-id dataverse --data-source-name contact',
38
+ 'npx power-apps delete-data-source --api-id shared_sql --data-source-name <table>',
39
+ 'npx power-apps delete-data-source --api-id dataverse --data-source-name contact --force',
40
+ ],
41
+ },
42
+ 'Refresh-data-source': {
43
+ Description: 'Refresh one or all data sources in the current Power Apps code app.',
44
+ Options: {
45
+ DataSourceName: 'Name of the specific data source to refresh. Omit to refresh all.',
46
+ },
47
+ Examples: [
48
+ 'npx power-apps refresh-data-source',
49
+ 'npx power-apps refresh-data-source --data-source-name contact',
50
+ 'npx power-apps refresh-data-source -n contact',
51
+ ],
52
+ },
53
+ 'Add-dataverse-api': {
54
+ Description: 'Add a Dataverse API (action or function) to the current Power Apps code app.',
55
+ Options: {
56
+ ApiName: 'Dataverse API name to add.',
57
+ },
58
+ Examples: [
59
+ 'npx power-apps add-dataverse-api --api-name msdyn_CreateOrder',
60
+ 'npx power-apps add-dataverse-api --api-name WinOpportunity',
61
+ ],
62
+ },
63
+ 'Find-dataverse-api': {
64
+ Description: 'Search Dataverse actions and functions in the environment by name.',
65
+ Options: {
66
+ SearchTerm: 'Search term to filter Dataverse operations by name.',
67
+ },
68
+ Examples: [
69
+ 'npx power-apps find-dataverse-api --search "account"',
70
+ 'npx power-apps find-dataverse-api --search "account" --json',
71
+ ],
72
+ },
73
+ Init: {
74
+ Description: 'Initialize a new Power Apps code app.',
75
+ Options: {
76
+ EnvironmentId: 'Environment ID to connect to.',
77
+ Cloud: 'Cloud instance to use (e.g., prod, test, etc.).',
78
+ DisplayName: 'Display name for the app.',
79
+ Description: 'App description.',
80
+ BuildPath: 'Build output path (default: ./dist).',
81
+ FileEntryPoint: 'Entry point file for the app.',
82
+ AppUrl: 'Local URL where the app is hosted.',
83
+ LogoPath: 'Path to the app logo file.',
84
+ },
85
+ Examples: [
86
+ 'npx power-apps init --environment-id <id> --display-name "My App"',
87
+ 'npx power-apps init --cloud test --environment-id <id> --display-name "My App" --build-path ./build',
88
+ ],
89
+ },
90
+ 'List-codeapps': {
91
+ Description: 'List all code apps in the environment.',
92
+ Examples: ['npx power-apps list-codeapps', 'npx power-apps list-codeapps --json'],
93
+ },
94
+ 'List-connection-references': {
95
+ Description: 'List all connection references in the environment.',
96
+ Options: {
97
+ SolutionId: 'Solution identifier to filter by.',
98
+ OrgUrl: 'Organization URL.',
99
+ },
100
+ Examples: [
101
+ 'npx power-apps list-connection-references --org-url https://org.crm.dynamics.com',
102
+ 'npx power-apps list-connection-references --json',
103
+ ],
104
+ },
105
+ 'List-datasets': {
106
+ Description: 'List all datasets for a connection.',
107
+ Options: {
108
+ ApiId: 'API identifier.',
109
+ ConnectionId: 'Connection identifier.',
110
+ },
111
+ Examples: [
112
+ 'npx power-apps list-datasets --api-id shared_sql --connection-id <id>',
113
+ 'npx power-apps list-datasets --api-id shared_sql --connection-id <id> --json',
114
+ ],
115
+ },
116
+ 'List-environment-variables': {
117
+ Description: 'List all environment variables in the environment.',
118
+ Options: {
119
+ OrgUrl: 'Organization URL.',
120
+ },
121
+ Examples: [
122
+ 'npx power-apps list-environment-variables',
123
+ 'npx power-apps list-environment-variables --json',
124
+ ],
125
+ },
126
+ 'List-flows': {
127
+ Description: 'List all solution cloud flows that are invokable from Power Apps.',
128
+ Options: {
129
+ Search: 'Filter flows by name (case-insensitive substring match)',
130
+ },
131
+ Examples: [
132
+ 'npx power-apps list-flows',
133
+ 'npx power-apps list-flows --search "approval" --json',
134
+ ],
135
+ },
136
+ 'Add-flow': {
137
+ Description: 'Add a cloud flow to the current Power Apps code app by flow ID.',
138
+ Options: {
139
+ FlowId: 'The unique identifier (GUID) of the flow to add.',
140
+ },
141
+ Examples: ['npx power-apps add-flow --flow-id 00000000-0000-0000-0000-000000000000'],
142
+ },
143
+ 'Remove-flow': {
144
+ Description: 'Remove a cloud flow from the current Power Apps code app.',
145
+ Options: {
146
+ FlowDataSourceName: 'The flow data source name to remove (as it appears in power.config). Provide either this or --flow-id.',
147
+ FlowId: 'The flow resource ID (GUID) to remove — same ID used with add-flow. Provide either this or --flow-name.',
148
+ },
149
+ Examples: [
150
+ 'npx power-apps remove-flow --flow-name myFlow',
151
+ 'npx power-apps remove-flow --flow-id 00000000-0000-0000-0000-000000000000',
152
+ ],
153
+ },
154
+ 'List-sqlStoredProcedures': {
155
+ Description: 'List all SQL stored procedures for a dataset.',
156
+ Options: {
157
+ ConnectionId: 'Connection identifier.',
158
+ Dataset: 'Dataset name.',
159
+ },
160
+ Examples: [
161
+ 'npx power-apps list-sqlStoredProcedures --connection-id <id> --dataset <db>',
162
+ 'npx power-apps list-sqlStoredProcedures --connection-id <id> --dataset <db> --json',
163
+ ],
164
+ },
165
+ 'List-tables': {
166
+ Description: 'List all tables for a dataset.',
167
+ Options: {
168
+ ApiId: 'API identifier.',
169
+ ConnectionId: 'Connection identifier.',
170
+ Dataset: 'Dataset name.',
171
+ },
172
+ Examples: [
173
+ 'npx power-apps list-tables --api-id shared_sql --connection-id <id> --dataset <db>',
174
+ 'npx power-apps list-tables --api-id shared_sql --connection-id <id> --dataset <db> --json',
175
+ ],
176
+ },
177
+ Logout: {
178
+ Description: 'Log out the current user.',
179
+ Examples: ['npx power-apps logout'],
180
+ },
181
+ Push: {
182
+ Description: 'Push the code app to the Power Apps environment.',
183
+ Options: {
184
+ SolutionName: 'Solution name to add the app to.',
185
+ },
186
+ Examples: ['npx power-apps push', 'npx power-apps push --solution-name "MySolution"'],
187
+ },
188
+ Run: {
189
+ Description: 'Run the code app locally.',
190
+ Options: {
191
+ Port: 'Port number for the local server.',
192
+ LocalAppUrl: 'Local URL where the app is hosted.',
193
+ },
194
+ Examples: [
195
+ 'npx power-apps run',
196
+ 'npx power-apps run --port 8080 --local-app-url http://localhost:3000',
197
+ ],
198
+ },
199
+ Telemetry: {
200
+ Description: 'Manage telemetry settings.',
201
+ Options: {
202
+ Enable: 'Enable telemetry.',
203
+ Disable: 'Disable telemetry.',
204
+ ShowSettings: 'Show current telemetry settings.',
205
+ ConsoleOnly: 'Output telemetry to console only.',
206
+ OutputToConsole: 'Output telemetry to console in addition to sending it.',
207
+ },
208
+ Examples: [
209
+ 'npx power-apps telemetry --show-settings',
210
+ 'npx power-apps telemetry --enable',
211
+ 'npx power-apps telemetry --show-settings --json',
212
+ ],
213
+ },
214
+ },
215
+ };
216
+ //# sourceMappingURL=HelpStrings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelpStrings.js","sourceRoot":"","sources":["../../src/Constants/HelpStrings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE;QACN,kBAAkB,EAAE,mDAAmD;QACvE,KAAK,EAAE,iDAAiD;QACxD,aAAa,EAAE,+BAA+B;KAC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
@@ -0,0 +1,79 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ /**
5
+ * Metadata for each CLI verb used to generate help output
6
+ */
7
+ export interface VerbMetadata {
8
+ description: string;
9
+ }
10
+ /**
11
+ * Central registry of all CLI verbs with their descriptions.
12
+ * This array is used to generate the verb table in --help output.
13
+ *
14
+ * IMPORTANT: When adding a new verb, you must:
15
+ * 1. Add to Verb type in Cli.types.ts
16
+ * 2. Add case to executeVerb() switch in Cli.ts
17
+ * 3. Add entry to this VERB_REGISTRY array
18
+ * 4. Add entry to HelpStrings.Verbs in HelpStrings.ts
19
+ */
20
+ export declare const VERB_HELP_REGISTRY: {
21
+ init: {
22
+ description: string;
23
+ };
24
+ push: {
25
+ description: string;
26
+ };
27
+ run: {
28
+ description: string;
29
+ };
30
+ 'add-data-source': {
31
+ description: string;
32
+ };
33
+ 'add-dataverse-api': {
34
+ description: string;
35
+ };
36
+ 'find-dataverse-api': {
37
+ description: string;
38
+ };
39
+ 'list-codeapps': {
40
+ description: string;
41
+ };
42
+ 'list-datasets': {
43
+ description: string;
44
+ };
45
+ 'list-tables': {
46
+ description: string;
47
+ };
48
+ 'list-sqlStoredProcedures': {
49
+ description: string;
50
+ };
51
+ 'delete-data-source': {
52
+ description: string;
53
+ };
54
+ 'list-environment-variables': {
55
+ description: string;
56
+ };
57
+ 'list-connection-references': {
58
+ description: string;
59
+ };
60
+ 'list-flows': {
61
+ description: string;
62
+ };
63
+ 'add-flow': {
64
+ description: string;
65
+ };
66
+ 'remove-flow': {
67
+ description: string;
68
+ };
69
+ 'refresh-data-source': {
70
+ description: string;
71
+ };
72
+ logout: {
73
+ description: string;
74
+ };
75
+ telemetry: {
76
+ description: string;
77
+ };
78
+ };
79
+ //# sourceMappingURL=VerbRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerbRegistry.d.ts","sourceRoot":"","sources":["../../src/Constants/VerbRegistry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BU,CAAC"}
@@ -0,0 +1,46 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import { HelpStrings } from './HelpStrings.js';
5
+ /**
6
+ * Central registry of all CLI verbs with their descriptions.
7
+ * This array is used to generate the verb table in --help output.
8
+ *
9
+ * IMPORTANT: When adding a new verb, you must:
10
+ * 1. Add to Verb type in Cli.types.ts
11
+ * 2. Add case to executeVerb() switch in Cli.ts
12
+ * 3. Add entry to this VERB_REGISTRY array
13
+ * 4. Add entry to HelpStrings.Verbs in HelpStrings.ts
14
+ */
15
+ export const VERB_HELP_REGISTRY = {
16
+ init: { description: HelpStrings.Verbs.Init.Description },
17
+ push: { description: HelpStrings.Verbs.Push.Description },
18
+ run: { description: HelpStrings.Verbs.Run.Description },
19
+ 'add-data-source': { description: HelpStrings.Verbs['Add-data-source'].Description },
20
+ 'add-dataverse-api': {
21
+ description: HelpStrings.Verbs['Add-dataverse-api'].Description,
22
+ },
23
+ 'find-dataverse-api': {
24
+ description: HelpStrings.Verbs['Find-dataverse-api'].Description,
25
+ },
26
+ 'list-codeapps': { description: HelpStrings.Verbs['List-codeapps'].Description },
27
+ 'list-datasets': { description: HelpStrings.Verbs['List-datasets'].Description },
28
+ 'list-tables': { description: HelpStrings.Verbs['List-tables'].Description },
29
+ 'list-sqlStoredProcedures': {
30
+ description: HelpStrings.Verbs['List-sqlStoredProcedures'].Description,
31
+ },
32
+ 'delete-data-source': { description: HelpStrings.Verbs['Delete-data-source'].Description },
33
+ 'list-environment-variables': {
34
+ description: HelpStrings.Verbs['List-environment-variables'].Description,
35
+ },
36
+ 'list-connection-references': {
37
+ description: HelpStrings.Verbs['List-connection-references'].Description,
38
+ },
39
+ 'list-flows': { description: HelpStrings.Verbs['List-flows'].Description },
40
+ 'add-flow': { description: HelpStrings.Verbs['Add-flow'].Description },
41
+ 'remove-flow': { description: HelpStrings.Verbs['Remove-flow'].Description },
42
+ 'refresh-data-source': { description: HelpStrings.Verbs['Refresh-data-source'].Description },
43
+ logout: { description: HelpStrings.Verbs.Logout.Description },
44
+ telemetry: { description: HelpStrings.Verbs.Telemetry.Description },
45
+ };
46
+ //# sourceMappingURL=VerbRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerbRegistry.js","sourceRoot":"","sources":["../../src/Constants/VerbRegistry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE;IACzD,IAAI,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE;IACzD,GAAG,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE;IACvD,iBAAiB,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE;IACpF,mBAAmB,EAAE;QACnB,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,WAAW;KAChE;IACD,oBAAoB,EAAE;QACpB,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,WAAW;KACjE;IACD,eAAe,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,WAAW,EAAE;IAChF,eAAe,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,WAAW,EAAE;IAChF,aAAa,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE;IAC5E,0BAA0B,EAAE;QAC1B,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,WAAW;KACvE;IACD,oBAAoB,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,WAAW,EAAE;IAC1F,4BAA4B,EAAE;QAC5B,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,WAAW;KACzE;IACD,4BAA4B,EAAE;QAC5B,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,WAAW;KACzE;IACD,YAAY,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE;IAC1E,UAAU,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE;IACtE,aAAa,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE;IAC5E,qBAAqB,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,WAAW,EAAE;IAC5F,MAAM,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE;IAC7D,SAAS,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE;CAC5B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ export declare const APP_CONFIG_FILE = "power.config.json";
5
+ export declare const WORKING_DIRECTORY: string;
6
+ export declare const CLI_CONFIG_DIRECTORY: string;
7
+ export declare const AUTH_CACHE_DIRECTORY: string;
8
+ export declare const MS_CLIENT_REQUESTID = "x-ms-client-request-id";
9
+ export declare const USER_SETTINGS_FILE = "userSettings.json";
10
+ //# sourceMappingURL=Constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,iBAAiB,QAAiD,CAAC;AAChF,eAAO,MAAM,oBAAoB,QAA4C,CAAC;AAC9E,eAAO,MAAM,oBAAoB,QAAmD,CAAC;AACrF,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAC5D,eAAO,MAAM,kBAAkB,sBAAsB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import * as os from 'os';
5
+ import * as path from 'path';
6
+ export const APP_CONFIG_FILE = 'power.config.json';
7
+ export const WORKING_DIRECTORY = process.env.WORKING_DIRECTORY || process.cwd();
8
+ export const CLI_CONFIG_DIRECTORY = path.join(os.homedir(), '.powerapps-cli');
9
+ export const AUTH_CACHE_DIRECTORY = path.join(CLI_CONFIG_DIRECTORY, 'cache', 'auth');
10
+ export const MS_CLIENT_REQUESTID = 'x-ms-client-request-id';
11
+ export const USER_SETTINGS_FILE = 'userSettings.json';
12
+ //# sourceMappingURL=Constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Constants.js","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC;AACnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAChF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACrF,MAAM,CAAC,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AAC5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ export declare class CliError extends Error {
5
+ readonly exitCode: number;
6
+ constructor(message: string, exitCode?: number);
7
+ }
8
+ export declare class UsageError extends CliError {
9
+ constructor(message: string);
10
+ }
11
+ //# sourceMappingURL=CliError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CliError.d.ts","sourceRoot":"","sources":["../../src/Errors/CliError.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,QAAS,SAAQ,KAAK;aAGf,QAAQ,EAAE,MAAM;gBADhC,OAAO,EAAE,MAAM,EACC,QAAQ,GAAE,MAAU;CAIvC;AAED,qBAAa,UAAW,SAAQ,QAAQ;gBAC1B,OAAO,EAAE,MAAM;CAG5B"}
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ export class CliError extends Error {
5
+ exitCode;
6
+ constructor(message, exitCode = 1) {
7
+ super(message);
8
+ this.exitCode = exitCode;
9
+ }
10
+ }
11
+ export class UsageError extends CliError {
12
+ constructor(message) {
13
+ super(message, 2);
14
+ }
15
+ }
16
+ //# sourceMappingURL=CliError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CliError.js","sourceRoot":"","sources":["../../src/Errors/CliError.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,QAAS,SAAQ,KAAK;IAGf;IAFlB,YACE,OAAe,EACC,WAAmB,CAAC;QAEpC,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,aAAQ,GAAR,QAAQ,CAAY;IAGtC,CAAC;CACF;AAED,MAAM,OAAO,UAAW,SAAQ,QAAQ;IACtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,41 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import type { Vfs, VfsConfig, VfsFileStats, WriteFileOptions } from '@microsoft/power-apps-actions';
5
+ export declare class CliFS implements Vfs {
6
+ private readonly cwd;
7
+ constructor(config: VfsConfig);
8
+ rmdir(dirPath: string): Promise<void>;
9
+ /**
10
+ * Normalize and resolve a path within the VFS context
11
+ */
12
+ private normalizePath;
13
+ /**
14
+ * Validate path for read access
15
+ */
16
+ private validateReadPath;
17
+ /**
18
+ * Validate path for write access
19
+ */
20
+ private validateWritePath;
21
+ getCwd(): string;
22
+ getAbsolutePath(relativePath: string): string;
23
+ readFile(inputPath: string, encoding?: BufferEncoding): Promise<string>;
24
+ writeFile(inputPath: string, content: string, options?: WriteFileOptions): Promise<void>;
25
+ appendFile(inputPath: string, content: string): Promise<void>;
26
+ readdir(inputPath: string): Promise<string[]>;
27
+ mkdir(inputPath: string, options?: {
28
+ recursive?: boolean;
29
+ }): Promise<void>;
30
+ exists(inputPath: string): Promise<boolean>;
31
+ stat(inputPath: string): Promise<VfsFileStats>;
32
+ isFile(inputPath: string): Promise<boolean>;
33
+ isDirectory(inputPath: string): Promise<boolean>;
34
+ resolve(...paths: string[]): string;
35
+ join(...paths: string[]): string;
36
+ relative(from: string, to: string): string;
37
+ basename(inputPath: string): string;
38
+ dirname(inputPath: string): string;
39
+ unlink(inputPath: string): Promise<void>;
40
+ }
41
+ //# sourceMappingURL=CliFs.d.ts.map
@@ -0,0 +1 @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OAAO,CAAC,OAAO,CAAC;IAK3C,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMtD,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAInC,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAIhC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM;IAI1C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAInC,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAIlC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIhD"}
@@ -0,0 +1,136 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ export class CliFS {
4
+ cwd;
5
+ constructor(config) {
6
+ // Normalize and validate cwd
7
+ this.cwd = path.resolve(config.cwd);
8
+ if (!fs.existsSync(this.cwd)) {
9
+ throw new Error(`Current working directory does not exist: ${this.cwd}`);
10
+ }
11
+ }
12
+ async rmdir(dirPath) {
13
+ const normalizedPath = this.validateWritePath(dirPath);
14
+ await fs.promises.rm(normalizedPath, { recursive: true });
15
+ }
16
+ /**
17
+ * Normalize and resolve a path within the VFS context
18
+ */
19
+ normalizePath(inputPath) {
20
+ if (path.isAbsolute(inputPath)) {
21
+ return path.resolve(inputPath);
22
+ }
23
+ return path.resolve(this.cwd, inputPath);
24
+ }
25
+ /**
26
+ * Validate path for read access
27
+ */
28
+ validateReadPath(inputPath) {
29
+ const normalizedPath = this.normalizePath(inputPath);
30
+ return normalizedPath;
31
+ }
32
+ /**
33
+ * Validate path for write access
34
+ */
35
+ validateWritePath(inputPath) {
36
+ const normalizedPath = this.normalizePath(inputPath);
37
+ return normalizedPath;
38
+ }
39
+ // VFS Interface Implementation
40
+ getCwd() {
41
+ return this.cwd;
42
+ }
43
+ getAbsolutePath(relativePath) {
44
+ return this.normalizePath(relativePath);
45
+ }
46
+ async readFile(inputPath, encoding = 'utf-8') {
47
+ const normalizedPath = this.validateReadPath(inputPath);
48
+ try {
49
+ return await fs.promises.readFile(normalizedPath, encoding);
50
+ }
51
+ catch (error) {
52
+ if (error instanceof Error) {
53
+ if (error.code === 'ENOENT') {
54
+ throw new Error(`File not found: ${normalizedPath}`);
55
+ }
56
+ throw new Error(`Failed to read file: ${error.message}`);
57
+ }
58
+ throw new Error('Unknown error occurred while reading file');
59
+ }
60
+ }
61
+ async writeFile(inputPath, content, options = {}) {
62
+ const normalizedPath = this.validateWritePath(inputPath);
63
+ const { createDirectories = true, encoding = 'utf-8' } = options;
64
+ // Create parent directories if needed
65
+ if (createDirectories) {
66
+ const parentDir = path.dirname(normalizedPath);
67
+ if (!fs.existsSync(parentDir)) {
68
+ await fs.promises.mkdir(parentDir, { recursive: true });
69
+ }
70
+ }
71
+ await fs.promises.writeFile(normalizedPath, content, { encoding });
72
+ }
73
+ async appendFile(inputPath, content) {
74
+ const normalizedPath = this.validateWritePath(inputPath);
75
+ await fs.promises.appendFile(normalizedPath, content, 'utf-8');
76
+ }
77
+ async readdir(inputPath) {
78
+ const normalizedPath = this.validateReadPath(inputPath);
79
+ return await fs.promises.readdir(normalizedPath);
80
+ }
81
+ async mkdir(inputPath, options = {}) {
82
+ const normalizedPath = this.validateWritePath(inputPath);
83
+ await fs.promises.mkdir(normalizedPath, options);
84
+ }
85
+ async exists(inputPath) {
86
+ const normalizedPath = this.normalizePath(inputPath);
87
+ // Don't check permissions for existence checks - just normalize the path
88
+ try {
89
+ await fs.promises.stat(normalizedPath);
90
+ return true;
91
+ }
92
+ catch {
93
+ return false;
94
+ }
95
+ }
96
+ async stat(inputPath) {
97
+ const normalizedPath = this.validateReadPath(inputPath);
98
+ const stats = await fs.promises.stat(normalizedPath);
99
+ return {
100
+ isFile: () => stats.isFile(),
101
+ isDirectory: () => stats.isDirectory(),
102
+ size: stats.size,
103
+ mtime: stats.mtime,
104
+ ctime: stats.ctime,
105
+ };
106
+ }
107
+ async isFile(inputPath) {
108
+ const stats = await this.stat(inputPath);
109
+ return stats.isFile();
110
+ }
111
+ async isDirectory(inputPath) {
112
+ const stats = await this.stat(inputPath);
113
+ return stats.isDirectory();
114
+ }
115
+ // Path operation methods (delegate to Node.js path module)
116
+ resolve(...paths) {
117
+ return path.resolve(...paths);
118
+ }
119
+ join(...paths) {
120
+ return path.join(...paths);
121
+ }
122
+ relative(from, to) {
123
+ return path.relative(from, to);
124
+ }
125
+ basename(inputPath) {
126
+ return path.basename(inputPath);
127
+ }
128
+ dirname(inputPath) {
129
+ return path.dirname(inputPath);
130
+ }
131
+ unlink(inputPath) {
132
+ const normalizedPath = this.validateWritePath(inputPath);
133
+ return fs.promises.unlink(normalizedPath);
134
+ }
135
+ }
136
+ //# sourceMappingURL=CliFs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CliFs.js","sourceRoot":"","sources":["../../src/FS/CliFs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,OAAO,KAAK;IACC,GAAG,CAAS;IAE7B,YAAY,MAAiB;QAC3B,6BAA6B;QAC7B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,6CAA6C,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,OAAe;QAChC,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvD,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CA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;IAED,2DAA2D;IACpD,OAAO,CAAC,GAAG,KAAe;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;IAChC,CAAC;IAEM,IAAI,CAAC,GAAG,KAAe;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC7B,CAAC;IAEM,QAAQ,CAAC,IAAY,EAAE,EAAU;QACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACjC,CAAC;IAEM,QAAQ,CAAC,SAAiB;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAEM,OAAO,CAAC,SAAiB;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAEM,MAAM,CAAC,SAAiB;QAC7B,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACzD,OAAO,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAC5C,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import type { IHttpClient, RequestConfig, Response as HttpClientResponse } from '@microsoft/power-apps-actions';
5
+ import type { IAuthenticationProvider } from '../Types/Cli.types.js';
6
+ export declare class CliHttpClient implements IHttpClient {
7
+ private _authenticationProvider;
8
+ private _inflight;
9
+ private _spinner;
10
+ constructor(_authenticationProvider: IAuthenticationProvider);
11
+ get<T = unknown>(url: string, config?: RequestConfig): Promise<HttpClientResponse<T>>;
12
+ post<T = unknown>(url: string, config?: RequestConfig): Promise<HttpClientResponse<T>>;
13
+ patch<T = unknown>(url: string, config?: RequestConfig): Promise<HttpClientResponse<T>>;
14
+ put<T = unknown>(url: string, config?: RequestConfig): Promise<HttpClientResponse<T>>;
15
+ private _sendRequestAsync;
16
+ private _startSpinner;
17
+ private _stopSpinner;
18
+ private _parseResponse;
19
+ private _transformHeaders;
20
+ }
21
+ //# sourceMappingURL=CliHttpClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CliHttpClient.d.ts","sourceRoot":"","sources":["../../src/HttpClient/CliHttpClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,QAAQ,IAAI,kBAAkB,EAC/B,MAAM,+BAA+B,CAAC;AAKvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGlE,qBAAa,aAAc,YAAW,WAAW;IAInC,OAAO,CAAC,uBAAuB;IAH3C,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,QAAQ,CAAa;gBAET,uBAAuB,EAAE,uBAAuB;IAEvD,GAAG,CAAC,CAAC,GAAG,OAAO,EAC1B,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAGpB,IAAI,CAAC,CAAC,GAAG,OAAO,EAC3B,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAGpB,KAAK,CAAC,CAAC,GAAG,OAAO,EAC5B,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAGpB,GAAG,CAAC,CAAC,GAAG,OAAO,EAC1B,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;YAInB,iBAAiB;IAiE/B,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,YAAY;YAaN,cAAc;YAkBd,iBAAiB;CAOhC"}