@revition/plugin-dev 0.0.0-canary.2a173bc

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 (205) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +8 -0
  3. package/dist/api.d.ts +43 -0
  4. package/dist/api.js +19 -0
  5. package/dist/api.js.map +1 -0
  6. package/dist/apps/apps-api.d.ts +12 -0
  7. package/dist/apps/apps-api.js +19 -0
  8. package/dist/apps/apps-api.js.map +1 -0
  9. package/dist/apps/keys.d.ts +26 -0
  10. package/dist/apps/keys.js +13 -0
  11. package/dist/apps/keys.js.map +1 -0
  12. package/dist/checks/local-checks.d.ts +40 -0
  13. package/dist/checks/local-checks.js +123 -0
  14. package/dist/checks/local-checks.js.map +1 -0
  15. package/dist/commands/account/link-workspace.d.ts +12 -0
  16. package/dist/commands/account/link-workspace.js +29 -0
  17. package/dist/commands/account/link-workspace.js.map +1 -0
  18. package/dist/commands/account/register.d.ts +14 -0
  19. package/dist/commands/account/register.js +51 -0
  20. package/dist/commands/account/register.js.map +1 -0
  21. package/dist/commands/account/status.d.ts +9 -0
  22. package/dist/commands/account/status.js +33 -0
  23. package/dist/commands/account/status.js.map +1 -0
  24. package/dist/commands/analytics.d.ts +55 -0
  25. package/dist/commands/analytics.js +79 -0
  26. package/dist/commands/analytics.js.map +1 -0
  27. package/dist/commands/apps/create.d.ts +13 -0
  28. package/dist/commands/apps/create.js +39 -0
  29. package/dist/commands/apps/create.js.map +1 -0
  30. package/dist/commands/apps/keys/create.d.ts +19 -0
  31. package/dist/commands/apps/keys/create.js +39 -0
  32. package/dist/commands/apps/keys/create.js.map +1 -0
  33. package/dist/commands/apps/keys/list.d.ts +16 -0
  34. package/dist/commands/apps/keys/list.js +28 -0
  35. package/dist/commands/apps/keys/list.js.map +1 -0
  36. package/dist/commands/apps/keys/revoke.d.ts +19 -0
  37. package/dist/commands/apps/keys/revoke.js +35 -0
  38. package/dist/commands/apps/keys/revoke.js.map +1 -0
  39. package/dist/commands/apps/keys/rotate.d.ts +17 -0
  40. package/dist/commands/apps/keys/rotate.js +38 -0
  41. package/dist/commands/apps/keys/rotate.js.map +1 -0
  42. package/dist/commands/apps/list.d.ts +13 -0
  43. package/dist/commands/apps/list.js +26 -0
  44. package/dist/commands/apps/list.js.map +1 -0
  45. package/dist/commands/apps/listing.d.ts +11 -0
  46. package/dist/commands/apps/listing.js +26 -0
  47. package/dist/commands/apps/listing.js.map +1 -0
  48. package/dist/commands/apps/scopes/set.d.ts +25 -0
  49. package/dist/commands/apps/scopes/set.js +52 -0
  50. package/dist/commands/apps/scopes/set.js.map +1 -0
  51. package/dist/commands/apps/view.d.ts +12 -0
  52. package/dist/commands/apps/view.js +26 -0
  53. package/dist/commands/apps/view.js.map +1 -0
  54. package/dist/commands/audit.d.ts +31 -0
  55. package/dist/commands/audit.js +48 -0
  56. package/dist/commands/audit.js.map +1 -0
  57. package/dist/commands/branches/eval.d.ts +42 -0
  58. package/dist/commands/branches/eval.js +104 -0
  59. package/dist/commands/branches/eval.js.map +1 -0
  60. package/dist/commands/branches/list.d.ts +21 -0
  61. package/dist/commands/branches/list.js +43 -0
  62. package/dist/commands/branches/list.js.map +1 -0
  63. package/dist/commands/branches/status.d.ts +26 -0
  64. package/dist/commands/branches/status.js +47 -0
  65. package/dist/commands/branches/status.js.map +1 -0
  66. package/dist/commands/branches/view.d.ts +19 -0
  67. package/dist/commands/branches/view.js +41 -0
  68. package/dist/commands/branches/view.js.map +1 -0
  69. package/dist/commands/build.d.ts +42 -0
  70. package/dist/commands/build.js +76 -0
  71. package/dist/commands/build.js.map +1 -0
  72. package/dist/commands/changelog.d.ts +41 -0
  73. package/dist/commands/changelog.js +44 -0
  74. package/dist/commands/changelog.js.map +1 -0
  75. package/dist/commands/deploy.d.ts +74 -0
  76. package/dist/commands/deploy.js +75 -0
  77. package/dist/commands/deploy.js.map +1 -0
  78. package/dist/commands/dev.d.ts +43 -0
  79. package/dist/commands/dev.js +191 -0
  80. package/dist/commands/dev.js.map +1 -0
  81. package/dist/commands/docs.d.ts +33 -0
  82. package/dist/commands/docs.js +101 -0
  83. package/dist/commands/docs.js.map +1 -0
  84. package/dist/commands/eval/list.d.ts +18 -0
  85. package/dist/commands/eval/list.js +49 -0
  86. package/dist/commands/eval/list.js.map +1 -0
  87. package/dist/commands/eval/run.d.ts +30 -0
  88. package/dist/commands/eval/run.js +190 -0
  89. package/dist/commands/eval/run.js.map +1 -0
  90. package/dist/commands/extension-points.d.ts +19 -0
  91. package/dist/commands/extension-points.js +26 -0
  92. package/dist/commands/extension-points.js.map +1 -0
  93. package/dist/commands/generate.d.ts +44 -0
  94. package/dist/commands/generate.js +145 -0
  95. package/dist/commands/generate.js.map +1 -0
  96. package/dist/commands/init.d.ts +29 -0
  97. package/dist/commands/init.js +91 -0
  98. package/dist/commands/init.js.map +1 -0
  99. package/dist/commands/link.d.ts +19 -0
  100. package/dist/commands/link.js +54 -0
  101. package/dist/commands/link.js.map +1 -0
  102. package/dist/commands/logs.d.ts +77 -0
  103. package/dist/commands/logs.js +128 -0
  104. package/dist/commands/logs.js.map +1 -0
  105. package/dist/commands/open.d.ts +28 -0
  106. package/dist/commands/open.js +54 -0
  107. package/dist/commands/open.js.map +1 -0
  108. package/dist/commands/runs/list.d.ts +31 -0
  109. package/dist/commands/runs/list.js +56 -0
  110. package/dist/commands/runs/list.js.map +1 -0
  111. package/dist/commands/scaffold.d.ts +22 -0
  112. package/dist/commands/scaffold.js +40 -0
  113. package/dist/commands/scaffold.js.map +1 -0
  114. package/dist/commands/secrets/list.d.ts +13 -0
  115. package/dist/commands/secrets/list.js +32 -0
  116. package/dist/commands/secrets/list.js.map +1 -0
  117. package/dist/commands/secrets/set.d.ts +23 -0
  118. package/dist/commands/secrets/set.js +45 -0
  119. package/dist/commands/secrets/set.js.map +1 -0
  120. package/dist/commands/secrets/unset.d.ts +20 -0
  121. package/dist/commands/secrets/unset.js +33 -0
  122. package/dist/commands/secrets/unset.js.map +1 -0
  123. package/dist/commands/starters/list.d.ts +16 -0
  124. package/dist/commands/starters/list.js +33 -0
  125. package/dist/commands/starters/list.js.map +1 -0
  126. package/dist/commands/starters/view.d.ts +19 -0
  127. package/dist/commands/starters/view.js +27 -0
  128. package/dist/commands/starters/view.js.map +1 -0
  129. package/dist/commands/submissions/list.d.ts +18 -0
  130. package/dist/commands/submissions/list.js +35 -0
  131. package/dist/commands/submissions/list.js.map +1 -0
  132. package/dist/commands/submissions/open.d.ts +28 -0
  133. package/dist/commands/submissions/open.js +49 -0
  134. package/dist/commands/submissions/open.js.map +1 -0
  135. package/dist/commands/submissions/view.d.ts +16 -0
  136. package/dist/commands/submissions/view.js +32 -0
  137. package/dist/commands/submissions/view.js.map +1 -0
  138. package/dist/commands/submit.d.ts +48 -0
  139. package/dist/commands/submit.js +85 -0
  140. package/dist/commands/submit.js.map +1 -0
  141. package/dist/commands/test.d.ts +42 -0
  142. package/dist/commands/test.js +137 -0
  143. package/dist/commands/test.js.map +1 -0
  144. package/dist/commands/versions/channels.d.ts +26 -0
  145. package/dist/commands/versions/channels.js +34 -0
  146. package/dist/commands/versions/channels.js.map +1 -0
  147. package/dist/commands/versions/list.d.ts +27 -0
  148. package/dist/commands/versions/list.js +41 -0
  149. package/dist/commands/versions/list.js.map +1 -0
  150. package/dist/commands/versions/open.d.ts +29 -0
  151. package/dist/commands/versions/open.js +48 -0
  152. package/dist/commands/versions/open.js.map +1 -0
  153. package/dist/commands/versions/rollouts.d.ts +27 -0
  154. package/dist/commands/versions/rollouts.js +32 -0
  155. package/dist/commands/versions/rollouts.js.map +1 -0
  156. package/dist/commands/wallet/open.d.ts +14 -0
  157. package/dist/commands/wallet/open.js +28 -0
  158. package/dist/commands/wallet/open.js.map +1 -0
  159. package/dist/commands/wallet/show.d.ts +27 -0
  160. package/dist/commands/wallet/show.js +51 -0
  161. package/dist/commands/wallet/show.js.map +1 -0
  162. package/dist/dev/sandbox-session.d.ts +48 -0
  163. package/dist/dev/sandbox-session.js +50 -0
  164. package/dist/dev/sandbox-session.js.map +1 -0
  165. package/dist/dev/uploader.d.ts +11 -0
  166. package/dist/dev/uploader.js +63 -0
  167. package/dist/dev/uploader.js.map +1 -0
  168. package/dist/dev/watcher.d.ts +6 -0
  169. package/dist/dev/watcher.js +30 -0
  170. package/dist/dev/watcher.js.map +1 -0
  171. package/dist/eval/report.d.ts +65 -0
  172. package/dist/eval/report.js +42 -0
  173. package/dist/eval/report.js.map +1 -0
  174. package/dist/generate/manifest-patch.d.ts +18 -0
  175. package/dist/generate/manifest-patch.js +59 -0
  176. package/dist/generate/manifest-patch.js.map +1 -0
  177. package/dist/generate/render.d.ts +20 -0
  178. package/dist/generate/render.js +55 -0
  179. package/dist/generate/render.js.map +1 -0
  180. package/dist/index.d.ts +2 -0
  181. package/dist/index.js +5 -0
  182. package/dist/index.js.map +1 -0
  183. package/dist/local/fixture-sdk.d.ts +27 -0
  184. package/dist/local/fixture-sdk.js +105 -0
  185. package/dist/local/fixture-sdk.js.map +1 -0
  186. package/dist/local/local-run.d.ts +58 -0
  187. package/dist/local/local-run.js +197 -0
  188. package/dist/local/local-run.js.map +1 -0
  189. package/dist/project/ownership.d.ts +8 -0
  190. package/dist/project/ownership.js +27 -0
  191. package/dist/project/ownership.js.map +1 -0
  192. package/dist/project/project-link.d.ts +13 -0
  193. package/dist/project/project-link.js +34 -0
  194. package/dist/project/project-link.js.map +1 -0
  195. package/dist/project/read-project.d.ts +6 -0
  196. package/dist/project/read-project.js +30 -0
  197. package/dist/project/read-project.js.map +1 -0
  198. package/dist/project/write-starter.d.ts +12 -0
  199. package/dist/project/write-starter.js +38 -0
  200. package/dist/project/write-starter.js.map +1 -0
  201. package/dist/secrets/secrets-api.d.ts +35 -0
  202. package/dist/secrets/secrets-api.js +54 -0
  203. package/dist/secrets/secrets-api.js.map +1 -0
  204. package/oclif.manifest.json +5658 -0
  205. package/package.json +72 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Revition
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,8 @@
1
+ Revition CLI
2
+ Copyright 2026 Revition
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ Trademarks: "Revition", the Revition name and the Revition logo are trademarks of Revition. The Apache License does not
7
+ grant permission to use them, except as required for reasonable and customary use in describing the origin of the work
8
+ and reproducing the content of this NOTICE file (Apache License 2.0, section 6).
package/dist/api.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ import { type ApiClient, type CommandContext } from '@revition/cli-core';
2
+ /**
3
+ * The Dev API as the signed-in developer (the same session / PAT resolution as every core command). Paths are the
4
+ * Foundry Dev API's (`/dev/...`), relative to the host's Foundry base, exactly as the core commands call them.
5
+ */
6
+ export declare function devApi(ctx: CommandContext): Promise<ApiClient>;
7
+ export declare const seg: (s: string) => string;
8
+ /**
9
+ * The PRODUCTION developer portal (a profile without `webOrigin`). Commands use their profile's links instead
10
+ * (`webLinksOf(ctx).developer`, plan amendment 2026-11-27, #537); this stays only as the documented default.
11
+ */
12
+ export declare const DEVELOPER_PORTAL_URL: string;
13
+ export interface Starter {
14
+ readonly id: string;
15
+ readonly title: string;
16
+ readonly extensionPoint: string;
17
+ readonly language: string;
18
+ readonly cloneRef?: string;
19
+ }
20
+ export interface StarterDetail extends Starter {
21
+ readonly files: Readonly<Record<string, string>>;
22
+ }
23
+ export interface DeveloperAccount {
24
+ readonly developerId: string;
25
+ readonly kind: 'tenant_member' | 'independent';
26
+ readonly linkedOrgId: string | null;
27
+ readonly verified: boolean;
28
+ readonly developerWalletId: string;
29
+ readonly agreementAccepted: boolean;
30
+ }
31
+ export interface AppRegistration {
32
+ readonly appId: string;
33
+ readonly manifestRef: string;
34
+ readonly manifest: Readonly<Record<string, unknown>>;
35
+ readonly declaredScopes: readonly string[];
36
+ readonly createdAt: string;
37
+ }
38
+ export interface DevProjectMeta {
39
+ readonly projectId: string;
40
+ readonly name: string;
41
+ readonly starterId: string | null;
42
+ readonly version: number;
43
+ }
package/dist/api.js ADDED
@@ -0,0 +1,19 @@
1
+ import { PRODUCTION_WEB_LINKS, RevitionCliError, runtime } from '@revition/cli-core';
2
+ /**
3
+ * The Dev API as the signed-in developer (the same session / PAT resolution as every core command). Paths are the
4
+ * Foundry Dev API's (`/dev/...`), relative to the host's Foundry base, exactly as the core commands call them.
5
+ */
6
+ export async function devApi(ctx) {
7
+ const rt = await runtime(ctx);
8
+ if (rt.session.mode === 'none') {
9
+ throw new RevitionCliError({ code: 'AUTH_REQUIRED', message: 'You are not signed in.', hint: 'Run `revition login`.' }, 3);
10
+ }
11
+ return rt.session.client;
12
+ }
13
+ export const seg = (s) => encodeURIComponent(s);
14
+ /**
15
+ * The PRODUCTION developer portal (a profile without `webOrigin`). Commands use their profile's links instead
16
+ * (`webLinksOf(ctx).developer`, plan amendment 2026-11-27, #537); this stays only as the documented default.
17
+ */
18
+ export const DEVELOPER_PORTAL_URL = PRODUCTION_WEB_LINKS.developer;
19
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,OAAO,EAAuC,MAAM,oBAAoB,CAAC;AAE1H;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,GAAmB;IAC9C,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC/B,MAAM,IAAI,gBAAgB,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,wBAAwB,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,CAAC,CAAC,CAAC;IAC7H,CAAC;IACD,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,SAAS,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type ApiClient } from '@revition/cli-core';
2
+ import type { AppRegistration } from '../api.js';
3
+ /** T2.2.1 - the developer's own apps (GET /dev/apps; there is no single-app route). */
4
+ export declare function listApps(api: ApiClient): Promise<readonly AppRegistration[]>;
5
+ /** One of the caller's apps; another developer's (or no) app is exit 4. */
6
+ export declare function ownApp(api: ApiClient, appId: string): Promise<AppRegistration>;
7
+ export declare const parseScopes: (raw: unknown) => string[];
8
+ /** The permission diff of a scope change. PURE. */
9
+ export declare function scopeDiff(current: readonly string[], next: readonly string[]): {
10
+ added: string[];
11
+ removed: string[];
12
+ };
@@ -0,0 +1,19 @@
1
+ import { EXIT, RevitionCliError } from '@revition/cli-core';
2
+ /** T2.2.1 - the developer's own apps (GET /dev/apps; there is no single-app route). */
3
+ export async function listApps(api) {
4
+ return (await api.request({ method: 'GET', path: '/dev/apps' })).body.apps;
5
+ }
6
+ /** One of the caller's apps; another developer's (or no) app is exit 4. */
7
+ export async function ownApp(api, appId) {
8
+ const app = (await listApps(api)).find((a) => a.appId === appId);
9
+ if (app === undefined) {
10
+ throw new RevitionCliError({ code: 'APP_NOT_OWNED', message: `${appId} is not one of your apps.`, hint: 'Run `revition apps list` to see your apps.' }, EXIT.permission);
11
+ }
12
+ return app;
13
+ }
14
+ export const parseScopes = (raw) => typeof raw === 'string' && raw.trim() !== '' ? [...new Set(raw.split(',').map((s) => s.trim()).filter((s) => s !== ''))].sort() : [];
15
+ /** The permission diff of a scope change. PURE. */
16
+ export function scopeDiff(current, next) {
17
+ return { added: next.filter((s) => !current.includes(s)), removed: current.filter((s) => !next.includes(s)) };
18
+ }
19
+ //# sourceMappingURL=apps-api.js.map
@@ -0,0 +1 @@
1
+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AAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAEvI,mDAAmD;AACnD,MAAM,UAAU,SAAS,CAAC,OAA0B,EAAE,IAAuB;IAC3E,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChH,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { CommandContext, HumanView } from '@revition/cli-core';
2
+ /** T2.2.2 - a developer key as the platform shows it (never the secret, which only creation / rotation return). */
3
+ export interface KeyView {
4
+ readonly keyId: string;
5
+ readonly appId: string;
6
+ readonly scopes: readonly string[];
7
+ readonly issuedAt: string;
8
+ readonly expiresAt: string;
9
+ readonly revokeAt: string | null;
10
+ }
11
+ export interface IssuedKey {
12
+ readonly keyId: string;
13
+ readonly appId: string;
14
+ readonly scopes: readonly string[];
15
+ readonly expiresAt: string;
16
+ /** The key itself (`rdk_<keyId>_<secret>`): shown exactly once, never written to disk by the CLI. */
17
+ readonly secret: string;
18
+ }
19
+ export declare function issued(body: {
20
+ key: string;
21
+ view: KeyView;
22
+ }): IssuedKey;
23
+ /** The once-only warning: under --json a warning naming data.secret; on a terminal a line on stderr. */
24
+ export declare function warnOnce(ctx: CommandContext): void;
25
+ /** Human output: the secret alone on stdout, through the one unredacted path. */
26
+ export declare const revealView: (k: IssuedKey) => HumanView;
@@ -0,0 +1,13 @@
1
+ export function issued(body) {
2
+ return { keyId: body.view.keyId, appId: body.view.appId, scopes: body.view.scopes, expiresAt: body.view.expiresAt, secret: body.key };
3
+ }
4
+ /** The once-only warning: under --json a warning naming data.secret; on a terminal a line on stderr. */
5
+ export function warnOnce(ctx) {
6
+ if (ctx.flags.json)
7
+ ctx.warn('data.secret is shown once: store it now; it will not be shown again.');
8
+ else if (ctx.io.stdoutIsTTY)
9
+ ctx.io.err('Store this now; it will not be shown again.\n');
10
+ }
11
+ /** Human output: the secret alone on stdout, through the one unredacted path. */
12
+ export const revealView = (k) => ({ text: '', reveal: k.secret });
13
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/apps/keys.ts"],"names":[],"mappings":"AAqBA,MAAM,UAAU,MAAM,CAAC,IAAoC;IACzD,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;AACxI,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,QAAQ,CAAC,GAAmB;IAC1C,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI;QAAE,GAAG,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;SAChG,IAAI,GAAG,CAAC,EAAE,CAAC,WAAW;QAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;AAC3F,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAY,EAAa,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * T2.1.2 - the local, free part of `revition build`: the platform's project layout rules
3
+ * (devportal/authoring/project.ts) that need no server - the size limits, the required files, the manifest's shape and
4
+ * capability count, each capability's source and tests, and no stray file. The field-level manifest schema
5
+ * (each capability's upload fields) is NOT in the published contract, so it is the server check's
6
+ * (`POST /dev/authoring/check`), which always runs when online. PURE.
7
+ */
8
+ export declare const PROJECT_MANIFEST_PATH = "revition.json";
9
+ export declare const LOCAL_ONLY_FILES: readonly string[];
10
+ export declare const UI_MANIFEST_PATH = "ui/manifest.json";
11
+ export declare const EVAL_SUITE_PATH: RegExp;
12
+ export declare const MAX_PROJECT_FILES = 32;
13
+ export declare const MAX_PROJECT_BYTES = 1500000;
14
+ export declare const MAX_CAPABILITIES = 5;
15
+ export type CheckId = 'size' | 'manifest' | 'layout' | 'tests';
16
+ export interface Problem {
17
+ readonly check: CheckId | 'server';
18
+ readonly file: string;
19
+ readonly message: string;
20
+ readonly severity: 'error' | 'warning';
21
+ }
22
+ type Files = Readonly<Record<string, string>>;
23
+ export declare function sizeProblems(files: Files): Problem[];
24
+ interface ManifestCapability {
25
+ readonly id: string;
26
+ readonly entrypoint: string;
27
+ readonly language: string;
28
+ }
29
+ /** The manifest's shape: an object with a summary and 1-5 capabilities, each with an id, a language and an entrypoint. */
30
+ export declare function manifestProblems(files: Files): {
31
+ problems: Problem[];
32
+ capabilities: ManifestCapability[];
33
+ };
34
+ export declare const sourcePath: (c: ManifestCapability) => string;
35
+ export declare const testsPath: (id: string) => string;
36
+ /** Each capability's source and tests (1-20 cases of {name, input, expect}); no file outside the layout. */
37
+ export declare function layoutProblems(files: Files, capabilities: readonly ManifestCapability[]): Problem[];
38
+ /** Every local problem, in check order: size first (an oversized project is refused before anything else). */
39
+ export declare function localChecks(files: Files): Problem[];
40
+ export {};
@@ -0,0 +1,123 @@
1
+ /**
2
+ * T2.1.2 - the local, free part of `revition build`: the platform's project layout rules
3
+ * (devportal/authoring/project.ts) that need no server - the size limits, the required files, the manifest's shape and
4
+ * capability count, each capability's source and tests, and no stray file. The field-level manifest schema
5
+ * (each capability's upload fields) is NOT in the published contract, so it is the server check's
6
+ * (`POST /dev/authoring/check`), which always runs when online. PURE.
7
+ */
8
+ export const PROJECT_MANIFEST_PATH = 'revition.json';
9
+ export const LOCAL_ONLY_FILES = ['fixtures.json', 'README.md'];
10
+ export const UI_MANIFEST_PATH = 'ui/manifest.json';
11
+ export const EVAL_SUITE_PATH = /^evals\/([a-z0-9][a-z0-9-]{0,62})\.json$/;
12
+ export const MAX_PROJECT_FILES = 32;
13
+ export const MAX_PROJECT_BYTES = 1_500_000;
14
+ export const MAX_CAPABILITIES = 5;
15
+ /** The platform's own map (runtime/code/coding-agent.ts SOURCE_EXT); any other language is `.txt`. */
16
+ const SOURCE_EXT = { python: 'py', ts: 'ts', wasm: 'wasm' };
17
+ function parse(files, file, out, check) {
18
+ try {
19
+ return JSON.parse(files[file] ?? '');
20
+ }
21
+ catch {
22
+ out.push({ check, file, message: 'not valid JSON', severity: 'error' });
23
+ return undefined;
24
+ }
25
+ }
26
+ export function sizeProblems(files) {
27
+ const names = Object.keys(files);
28
+ if (names.length > MAX_PROJECT_FILES) {
29
+ return [{ check: 'size', file: '(project)', message: `${names.length} files: the platform limit is ${MAX_PROJECT_FILES}`, severity: 'error' }];
30
+ }
31
+ const bytes = names.reduce((n, f) => n + Buffer.byteLength(f, 'utf8') + Buffer.byteLength(files[f] ?? '', 'utf8'), 0);
32
+ return bytes > MAX_PROJECT_BYTES
33
+ ? [{ check: 'size', file: '(project)', message: `${bytes} bytes: the platform limit is ${MAX_PROJECT_BYTES} bytes`, severity: 'error' }]
34
+ : [];
35
+ }
36
+ /** The manifest's shape: an object with a summary and 1-5 capabilities, each with an id, a language and an entrypoint. */
37
+ export function manifestProblems(files) {
38
+ const out = [];
39
+ if (files[PROJECT_MANIFEST_PATH] === undefined) {
40
+ return { problems: [{ check: 'manifest', file: PROJECT_MANIFEST_PATH, message: 'missing (run `revition init` to start a project)', severity: 'error' }], capabilities: [] };
41
+ }
42
+ const raw = parse(files, PROJECT_MANIFEST_PATH, out, 'manifest');
43
+ if (raw === undefined)
44
+ return { problems: out, capabilities: [] };
45
+ if (raw === null || typeof raw !== 'object' || Array.isArray(raw)) {
46
+ return { problems: [{ check: 'manifest', file: PROJECT_MANIFEST_PATH, message: '(root): an object with summary and capabilities', severity: 'error' }], capabilities: [] };
47
+ }
48
+ const m = raw;
49
+ if (typeof m['summary'] !== 'string' || m['summary'].length === 0 || m['summary'].length > 2000) {
50
+ out.push({ check: 'manifest', file: PROJECT_MANIFEST_PATH, message: 'summary: 1 to 2000 characters', severity: 'error' });
51
+ }
52
+ const caps = m['capabilities'];
53
+ if (!Array.isArray(caps) || caps.length < 1 || caps.length > MAX_CAPABILITIES) {
54
+ out.push({ check: 'manifest', file: PROJECT_MANIFEST_PATH, message: `capabilities: 1 to ${MAX_CAPABILITIES} capabilities`, severity: 'error' });
55
+ return { problems: out, capabilities: [] };
56
+ }
57
+ const capabilities = [];
58
+ caps.forEach((c, i) => {
59
+ const o = (c ?? {});
60
+ const missing = ['id', 'language', 'entrypoint'].filter((k) => typeof o[k] !== 'string' || o[k] === '');
61
+ if (missing.length > 0) {
62
+ out.push({ check: 'manifest', file: PROJECT_MANIFEST_PATH, message: `capabilities.${i}: ${missing.join(', ')} required`, severity: 'error' });
63
+ return;
64
+ }
65
+ capabilities.push({ id: String(o['id']), language: String(o['language']), entrypoint: String(o['entrypoint']) });
66
+ });
67
+ const ids = capabilities.map((c) => c.id);
68
+ const dup = ids.find((id, i) => ids.indexOf(id) !== i);
69
+ if (dup !== undefined)
70
+ out.push({ check: 'manifest', file: PROJECT_MANIFEST_PATH, message: `capability ${dup} twice`, severity: 'error' });
71
+ return { problems: out, capabilities };
72
+ }
73
+ export const sourcePath = (c) => `capabilities/${c.id}/${c.entrypoint}.${SOURCE_EXT[c.language] ?? 'txt'}`;
74
+ export const testsPath = (id) => `capabilities/${id}/tests.json`;
75
+ /** Each capability's source and tests (1-20 cases of {name, input, expect}); no file outside the layout. */
76
+ export function layoutProblems(files, capabilities) {
77
+ const out = [];
78
+ const known = new Set([PROJECT_MANIFEST_PATH, ...LOCAL_ONLY_FILES]);
79
+ for (const c of capabilities) {
80
+ const src = sourcePath(c);
81
+ const tf = testsPath(c.id);
82
+ known.add(src).add(tf);
83
+ if (files[src] === undefined)
84
+ out.push({ check: 'layout', file: src, message: "missing: the capability's source", severity: 'error' });
85
+ if (files[tf] === undefined) {
86
+ out.push({ check: 'tests', file: tf, message: 'missing: every capability ships at least one test', severity: 'error' });
87
+ continue;
88
+ }
89
+ const tests = parse(files, tf, out, 'tests');
90
+ if (tests === undefined)
91
+ continue;
92
+ if (!Array.isArray(tests) || tests.length < 1 || tests.length > 20) {
93
+ out.push({ check: 'tests', file: tf, message: '1 to 20 test cases', severity: 'error' });
94
+ continue;
95
+ }
96
+ tests.forEach((t, i) => {
97
+ const o = (t ?? {});
98
+ const extra = Object.keys(o).filter((k) => !['name', 'input', 'expect'].includes(k));
99
+ if (typeof o['name'] !== 'string' || o['name'] === '' || !('input' in o) || !('expect' in o) || extra.length > 0) {
100
+ out.push({ check: 'tests', file: tf, message: `${i}: a case is exactly {name, input, expect}`, severity: 'error' });
101
+ }
102
+ });
103
+ }
104
+ if (files[UI_MANIFEST_PATH] !== undefined) {
105
+ known.add(UI_MANIFEST_PATH);
106
+ parse(files, UI_MANIFEST_PATH, out, 'layout');
107
+ }
108
+ for (const f of Object.keys(files).filter((n) => !known.has(n) && !EVAL_SUITE_PATH.test(n))) {
109
+ out.push({ check: 'layout', file: f, message: 'not part of an extension project', severity: 'error' });
110
+ }
111
+ return out;
112
+ }
113
+ /** Every local problem, in check order: size first (an oversized project is refused before anything else). */
114
+ export function localChecks(files) {
115
+ const size = sizeProblems(files);
116
+ if (size.length > 0)
117
+ return size;
118
+ const m = manifestProblems(files);
119
+ if (m.problems.length > 0)
120
+ return m.problems;
121
+ return layoutProblems(files, m.capabilities);
122
+ }
123
+ //# sourceMappingURL=local-checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-checks.js","sourceRoot":"","sources":["../../src/checks/local-checks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACr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M,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5F,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,kCAAkC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IACzG,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,WAAW,CAAC,KAAY;IACtC,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC,QAAQ,CAAC;IAC7C,OAAO,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { RevitionCommand, type CommandContext, type CommandMeta, type HumanView } from '@revition/cli-core';
2
+ import { type DeveloperAccount } from '../../api.js';
3
+ export default class AccountLinkWorkspace extends RevitionCommand<DeveloperAccount> {
4
+ static summary: string;
5
+ static examples: string[];
6
+ static meta: CommandMeta;
7
+ static flags: {
8
+ org: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
+ };
10
+ protected run2(ctx: CommandContext): Promise<DeveloperAccount>;
11
+ protected human(a: DeveloperAccount): HumanView;
12
+ }
@@ -0,0 +1,29 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { RevitionCommand } from '@revition/cli-core';
3
+ import { devApi } from '../../api.js';
4
+ export default class AccountLinkWorkspace extends RevitionCommand {
5
+ static summary = 'Link your developer account to a workspace you are a member of (your wallet stays yours).';
6
+ static examples = ['revition account link-workspace --org org_123'];
7
+ static meta = {
8
+ id: 'account:link-workspace',
9
+ summary: AccountLinkWorkspace.summary,
10
+ examples: AccountLinkWorkspace.examples,
11
+ requiredScopes: ['cli:write'],
12
+ mutates: true,
13
+ confirm: 'prompt',
14
+ jsonSchemaId: 'revition.account.link-workspace.v1',
15
+ stability: 'stable',
16
+ };
17
+ static flags = {
18
+ org: Flags.string({ required: true, description: 'The workspace (org id). The platform checks your membership.' }),
19
+ };
20
+ async run2(ctx) {
21
+ const api = await devApi(ctx);
22
+ // The membership check is the platform's (POST /dev/link): a non-member gets 403 -> exit 4.
23
+ return (await api.request({ method: 'POST', path: '/dev/link', body: { orgId: String(ctx.commandFlags['org']) } })).body;
24
+ }
25
+ human(a) {
26
+ return { text: `Linked to workspace ${a.linkedOrgId ?? '-'} (${a.kind}). Your developer wallet is unchanged.\n` };
27
+ }
28
+ }
29
+ //# sourceMappingURL=link-workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-workspace.js","sourceRoot":"","sources":["../../../src/commands/account/link-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAyD,MAAM,oBAAoB,CAAC;AAE5G,OAAO,EAAE,MAAM,EAAyB,MAAM,cAAc,CAAC;AAE7D,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,eAAiC;IACjF,MAAM,CAAU,OAAO,GAAG,2FAA2F,CAAC;IACtH,MAAM,CAAU,QAAQ,GAAG,CAAC,+CAA+C,CAAC,CAAC;IAC7E,MAAM,CAAC,IAAI,GAAgB;QACzB,EAAE,EAAE,wBAAwB;QAC5B,OAAO,EAAE,oBAAoB,CAAC,OAAO;QACrC,QAAQ,EAAE,oBAAoB,CAAC,QAAQ;QACvC,cAAc,EAAE,CAAC,WAAW,CAAC;QAC7B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,QAAQ;QACjB,YAAY,EAAE,oCAAoC;QAClD,SAAS,EAAE,QAAQ;KACpB,CAAC;IACF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8DAA8D,EAAE,CAAC;KACnH,CAAC;IAEQ,KAAK,CAAC,IAAI,CAAC,GAAmB;QACtC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC;QAC9B,4FAA4F;QAC5F,OAAO,CAAC,MAAM,GAAG,CAAC,OAAO,CAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7I,CAAC;IAEkB,KAAK,CAAC,CAAmB;QAC1C,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC,WAAW,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,0CAA0C,EAAE,CAAC;IACpH,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { RevitionCommand, type CommandContext, type CommandMeta, type HumanView } from '@revition/cli-core';
2
+ import { type DeveloperAccount } from '../../api.js';
3
+ export default class AccountRegister extends RevitionCommand<DeveloperAccount> {
4
+ static summary: string;
5
+ static examples: string[];
6
+ static meta: CommandMeta;
7
+ static flags: {
8
+ kind: import("@oclif/core/interfaces").OptionFlag<"tenant_member" | "independent", import("@oclif/core/interfaces").CustomOptions>;
9
+ org: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ 'accept-terms': import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
+ };
12
+ protected run2(ctx: CommandContext): Promise<DeveloperAccount>;
13
+ protected human(a: DeveloperAccount): HumanView;
14
+ }