mfeflow 0.4.0 → 0.6.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 (82) hide show
  1. package/README.md +14 -5
  2. package/assets/features/analytics-gtm/feature.json +1 -1
  3. package/assets/features/ci-github/feature.json +1 -1
  4. package/assets/features/env-t3/feature.json +1 -1
  5. package/assets/features/lint-oxlint/feature.json +1 -1
  6. package/assets/features/registry-server/feature.json +128 -0
  7. package/assets/features/registry-server/files/deploy-server.yml +69 -0
  8. package/assets/features/registry-server/files/registry-server.md.eta +52 -0
  9. package/assets/features/registry-server/files/registry-sources.ts +12 -0
  10. package/assets/features/registry-static/feature.json +61 -0
  11. package/assets/features/registry-static/files/deploy.yml +61 -0
  12. package/assets/features/registry-static/files/registry.md.eta +49 -0
  13. package/assets/features/release/feature.json +43 -0
  14. package/assets/features/release/files/changeset-readme.md +7 -0
  15. package/assets/features/release/files/config.json +10 -0
  16. package/assets/features/release/files/releasing.md +21 -0
  17. package/assets/features/testing/feature.json +1 -1
  18. package/assets/features/tsconfig/feature.json +1 -1
  19. package/assets/features/url-factory/feature.json +1 -1
  20. package/assets/templates/monorepo/feature.json +13 -6
  21. package/assets/templates/monorepo/files/remote/{mfe.json.eta → mfeflow.app.json.eta} +1 -0
  22. package/assets/templates/monorepo/files/root/README.md.eta +16 -1
  23. package/assets/templates/monorepo/files/shell/{mfe.json.eta → mfeflow.app.json.eta} +1 -0
  24. package/assets/templates/monorepo/files/shell/rsbuild.config.ts.eta +42 -6
  25. package/assets/templates/monorepo/files/shell/src/assert.ts.eta +37 -0
  26. package/assets/templates/monorepo/files/shell/src/bootstrap.tsx.eta +12 -2
  27. package/assets/templates/monorepo/migrations/0.4.0-app-file.mjs +58 -0
  28. package/assets/templates/polyrepo/feature.json +305 -0
  29. package/assets/templates/polyrepo/files/AGENTS.md.eta +15 -0
  30. package/assets/templates/polyrepo/files/changeset/README.md +5 -0
  31. package/assets/templates/polyrepo/files/changeset/config.json +9 -0
  32. package/assets/templates/polyrepo/files/packages/contracts/package.json.eta +23 -0
  33. package/assets/templates/polyrepo/files/packages/contracts/src/index.ts +11 -0
  34. package/assets/templates/polyrepo/files/packages/contracts/tsconfig.json.eta +5 -0
  35. package/assets/templates/polyrepo/files/packages/tokens/package.json.eta +23 -0
  36. package/assets/templates/polyrepo/files/packages/tokens/src/index.ts +13 -0
  37. package/assets/templates/polyrepo/files/packages/tokens/tsconfig.json.eta +5 -0
  38. package/assets/templates/polyrepo/files/platform/README.md.eta +43 -0
  39. package/assets/templates/polyrepo/files/platform/default.json.eta +27 -0
  40. package/assets/templates/polyrepo/files/remote/README.md.eta +23 -0
  41. package/assets/templates/polyrepo/files/renovate.json.eta +4 -0
  42. package/assets/templates/polyrepo/files/shell/README.md.eta +32 -0
  43. package/assets/templates/polyrepo/files/tsconfig.base.json.eta +13 -0
  44. package/assets/templates/polyrepo/files/workflows/platform-ci.yml +29 -0
  45. package/assets/templates/polyrepo/files/workflows/release.yml +40 -0
  46. package/assets/templates/polyrepo/files/workflows/reusable-ci.yml.eta +50 -0
  47. package/assets/templates/polyrepo/files/workflows/team-ci.yml.eta +12 -0
  48. package/dist/against.d.ts +16 -0
  49. package/dist/catalog.d.ts +8 -0
  50. package/dist/checks/compat.d.ts +12 -0
  51. package/dist/checks/index.d.ts +0 -1
  52. package/dist/checks/singletons.d.ts +2 -5
  53. package/dist/commands/add.d.ts +4 -2
  54. package/dist/commands/adopt.d.ts +54 -0
  55. package/dist/commands/deploy.d.ts +262 -0
  56. package/dist/commands/doctor.d.ts +5 -0
  57. package/dist/commands/init.d.ts +9 -1
  58. package/dist/commands/server-mode.d.ts +210 -0
  59. package/dist/commands/status.d.ts +63 -0
  60. package/dist/commands/team-repo.d.ts +9 -0
  61. package/dist/commands/upgrade.d.ts +66 -0
  62. package/dist/deploy-testing.d.ts +41 -0
  63. package/dist/devregistry.d.ts +4 -5
  64. package/dist/devremotes.d.ts +15 -0
  65. package/dist/exit.d.ts +2 -1
  66. package/dist/glue.d.ts +6 -0
  67. package/dist/hosts.d.ts +25 -0
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.js +5477 -1643
  70. package/dist/inspect.d.ts +14 -2
  71. package/dist/output.d.ts +214 -7
  72. package/dist/pipeline.d.ts +13 -2
  73. package/dist/polyrepo.d.ts +69 -0
  74. package/dist/publish.d.ts +98 -0
  75. package/dist/runtime.d.ts +10 -1
  76. package/dist/server-client.d.ts +61 -0
  77. package/dist/system.d.ts +2 -0
  78. package/dist/testing.d.ts +82 -0
  79. package/dist/trust.d.ts +4 -0
  80. package/dist/upgrade.d.ts +25 -0
  81. package/dist/write.d.ts +8 -0
  82. package/package.json +5 -4
@@ -0,0 +1,262 @@
1
+ import type { DeployResult } from '../output.js';
2
+ import type { Runtime } from '../runtime.js';
3
+ export declare const DEPLOY_ARGS: {
4
+ readonly yes: {
5
+ readonly type: 'boolean';
6
+ readonly alias: 'y';
7
+ readonly description: 'Take the defaults and never prompt';
8
+ };
9
+ readonly preset: {
10
+ readonly type: 'string';
11
+ readonly description: 'Replay options from a JSON file or an https URL';
12
+ readonly valueHint: 'file|url';
13
+ };
14
+ readonly json: {
15
+ readonly type: 'boolean';
16
+ readonly description: 'Print one JSON document on stdout, nothing else';
17
+ };
18
+ readonly 'dry-run': {
19
+ readonly type: 'boolean';
20
+ readonly description: 'Print the summary and diff, write nothing';
21
+ };
22
+ readonly cwd: {
23
+ readonly type: 'string';
24
+ readonly description: 'Run as if started in this folder';
25
+ readonly valueHint: 'dir';
26
+ };
27
+ readonly install: {
28
+ readonly type: 'boolean';
29
+ readonly default: true;
30
+ readonly description: 'Run the package manager after writing (--no-install to skip)';
31
+ };
32
+ readonly verbose: {
33
+ readonly type: 'boolean';
34
+ readonly description: 'Show package manager output and stack traces';
35
+ };
36
+ readonly local: {
37
+ readonly type: 'string';
38
+ readonly description: 'Link @mfeflow/* from a built mfeflow checkout (env MFEFLOW_LOCAL)';
39
+ readonly valueHint: 'path';
40
+ };
41
+ readonly help: {
42
+ readonly type: 'boolean';
43
+ readonly alias: 'h';
44
+ readonly description: 'Show this help';
45
+ };
46
+ readonly 'registry-url': {
47
+ readonly type: 'string';
48
+ readonly description: 'Registry server address (env MFEFLOW_REGISTRY_URL). The token is only read from MFEFLOW_REGISTRY_TOKEN';
49
+ readonly valueHint: 'url';
50
+ };
51
+ readonly percent: {
52
+ readonly type: 'string';
53
+ readonly description: 'Start a percentage rollout at this share of visitors, 1 to 99 (registry server only)';
54
+ readonly valueHint: 'n';
55
+ };
56
+ readonly steps: {
57
+ readonly type: 'string';
58
+ readonly description: 'Later rollout steps, rising, like 50,100 (needs --percent)';
59
+ readonly valueHint: 'a,b,c';
60
+ };
61
+ readonly host: {
62
+ readonly type: 'string';
63
+ readonly description: 'Where the registry lives: file:<dir> or s3://<bucket>[/prefix] (default registry.host)';
64
+ readonly valueHint: 'spec';
65
+ };
66
+ readonly 'base-url': {
67
+ readonly type: 'string';
68
+ readonly description: "Where the host's files are served from (default registry.baseUrl)";
69
+ readonly valueHint: 'url';
70
+ };
71
+ readonly 'shell-manifest': {
72
+ readonly type: 'string';
73
+ readonly description: "The shell's deployed mf-manifest.json (default envs/<env>/shell/ on the host)";
74
+ readonly valueHint: 'file';
75
+ };
76
+ readonly env: {
77
+ readonly type: 'string';
78
+ readonly description: 'Environment to deploy to';
79
+ readonly valueHint: 'env';
80
+ };
81
+ readonly version: {
82
+ readonly type: 'string';
83
+ readonly description: "Version to publish (default: the remote's package.json version)";
84
+ readonly valueHint: 'v';
85
+ };
86
+ readonly dist: {
87
+ readonly type: 'string';
88
+ readonly description: 'Build output folder inside the remote (default dist)';
89
+ readonly valueHint: 'dir';
90
+ };
91
+ readonly publish: {
92
+ readonly type: 'boolean';
93
+ readonly default: true;
94
+ readonly description: 'Move the index to the new version (--no-publish uploads the files and stops)';
95
+ };
96
+ };
97
+ export declare const PROMOTE_ARGS: {
98
+ readonly yes: {
99
+ readonly type: 'boolean';
100
+ readonly alias: 'y';
101
+ readonly description: 'Take the defaults and never prompt';
102
+ };
103
+ readonly preset: {
104
+ readonly type: 'string';
105
+ readonly description: 'Replay options from a JSON file or an https URL';
106
+ readonly valueHint: 'file|url';
107
+ };
108
+ readonly json: {
109
+ readonly type: 'boolean';
110
+ readonly description: 'Print one JSON document on stdout, nothing else';
111
+ };
112
+ readonly 'dry-run': {
113
+ readonly type: 'boolean';
114
+ readonly description: 'Print the summary and diff, write nothing';
115
+ };
116
+ readonly cwd: {
117
+ readonly type: 'string';
118
+ readonly description: 'Run as if started in this folder';
119
+ readonly valueHint: 'dir';
120
+ };
121
+ readonly install: {
122
+ readonly type: 'boolean';
123
+ readonly default: true;
124
+ readonly description: 'Run the package manager after writing (--no-install to skip)';
125
+ };
126
+ readonly verbose: {
127
+ readonly type: 'boolean';
128
+ readonly description: 'Show package manager output and stack traces';
129
+ };
130
+ readonly local: {
131
+ readonly type: 'string';
132
+ readonly description: 'Link @mfeflow/* from a built mfeflow checkout (env MFEFLOW_LOCAL)';
133
+ readonly valueHint: 'path';
134
+ };
135
+ readonly help: {
136
+ readonly type: 'boolean';
137
+ readonly alias: 'h';
138
+ readonly description: 'Show this help';
139
+ };
140
+ readonly 'registry-url': {
141
+ readonly type: 'string';
142
+ readonly description: 'Registry server address (env MFEFLOW_REGISTRY_URL). The token is only read from MFEFLOW_REGISTRY_TOKEN';
143
+ readonly valueHint: 'url';
144
+ };
145
+ readonly percent: {
146
+ readonly type: 'string';
147
+ readonly description: 'Start a percentage rollout at this share of visitors, 1 to 99 (registry server only)';
148
+ readonly valueHint: 'n';
149
+ };
150
+ readonly steps: {
151
+ readonly type: 'string';
152
+ readonly description: 'Later rollout steps, rising, like 50,100 (needs --percent)';
153
+ readonly valueHint: 'a,b,c';
154
+ };
155
+ readonly host: {
156
+ readonly type: 'string';
157
+ readonly description: 'Where the registry lives: file:<dir> or s3://<bucket>[/prefix] (default registry.host)';
158
+ readonly valueHint: 'spec';
159
+ };
160
+ readonly 'base-url': {
161
+ readonly type: 'string';
162
+ readonly description: "Where the host's files are served from (default registry.baseUrl)";
163
+ readonly valueHint: 'url';
164
+ };
165
+ readonly 'shell-manifest': {
166
+ readonly type: 'string';
167
+ readonly description: "The shell's deployed mf-manifest.json (default envs/<env>/shell/ on the host)";
168
+ readonly valueHint: 'file';
169
+ };
170
+ readonly from: {
171
+ readonly type: 'string';
172
+ readonly description: 'Environment to copy the version from';
173
+ readonly valueHint: 'env';
174
+ };
175
+ readonly to: {
176
+ readonly type: 'string';
177
+ readonly description: 'Environment to point at it';
178
+ readonly valueHint: 'env';
179
+ };
180
+ };
181
+ export declare const ROLLBACK_ARGS: {
182
+ readonly yes: {
183
+ readonly type: 'boolean';
184
+ readonly alias: 'y';
185
+ readonly description: 'Take the defaults and never prompt';
186
+ };
187
+ readonly preset: {
188
+ readonly type: 'string';
189
+ readonly description: 'Replay options from a JSON file or an https URL';
190
+ readonly valueHint: 'file|url';
191
+ };
192
+ readonly json: {
193
+ readonly type: 'boolean';
194
+ readonly description: 'Print one JSON document on stdout, nothing else';
195
+ };
196
+ readonly 'dry-run': {
197
+ readonly type: 'boolean';
198
+ readonly description: 'Print the summary and diff, write nothing';
199
+ };
200
+ readonly cwd: {
201
+ readonly type: 'string';
202
+ readonly description: 'Run as if started in this folder';
203
+ readonly valueHint: 'dir';
204
+ };
205
+ readonly install: {
206
+ readonly type: 'boolean';
207
+ readonly default: true;
208
+ readonly description: 'Run the package manager after writing (--no-install to skip)';
209
+ };
210
+ readonly verbose: {
211
+ readonly type: 'boolean';
212
+ readonly description: 'Show package manager output and stack traces';
213
+ };
214
+ readonly local: {
215
+ readonly type: 'string';
216
+ readonly description: 'Link @mfeflow/* from a built mfeflow checkout (env MFEFLOW_LOCAL)';
217
+ readonly valueHint: 'path';
218
+ };
219
+ readonly help: {
220
+ readonly type: 'boolean';
221
+ readonly alias: 'h';
222
+ readonly description: 'Show this help';
223
+ };
224
+ readonly 'registry-url': {
225
+ readonly type: 'string';
226
+ readonly description: 'Registry server address (env MFEFLOW_REGISTRY_URL). The token is only read from MFEFLOW_REGISTRY_TOKEN';
227
+ readonly valueHint: 'url';
228
+ };
229
+ readonly host: {
230
+ readonly type: 'string';
231
+ readonly description: 'Where the registry lives: file:<dir> or s3://<bucket>[/prefix] (default registry.host)';
232
+ readonly valueHint: 'spec';
233
+ };
234
+ readonly 'base-url': {
235
+ readonly type: 'string';
236
+ readonly description: "Where the host's files are served from (default registry.baseUrl)";
237
+ readonly valueHint: 'url';
238
+ };
239
+ readonly 'shell-manifest': {
240
+ readonly type: 'string';
241
+ readonly description: "The shell's deployed mf-manifest.json (default envs/<env>/shell/ on the host)";
242
+ readonly valueHint: 'file';
243
+ };
244
+ readonly env: {
245
+ readonly type: 'string';
246
+ readonly description: 'Environment to roll back';
247
+ readonly valueHint: 'env';
248
+ };
249
+ readonly to: {
250
+ readonly type: 'string';
251
+ readonly description: 'Version to go back to (default: the previous one)';
252
+ readonly valueHint: 'v';
253
+ };
254
+ readonly force: {
255
+ readonly type: 'boolean';
256
+ readonly description: 'Roll back even if the schema, route or compatibility checks fail (the files must still exist)';
257
+ };
258
+ };
259
+ export declare function formatDeploy(result: DeployResult): string;
260
+ export declare function runDeploy(rt: Runtime, args: Record<string, unknown>, raw: readonly string[]): Promise<DeployResult>;
261
+ export declare function runPromote(rt: Runtime, args: Record<string, unknown>, raw: readonly string[]): Promise<DeployResult>;
262
+ export declare function runRollback(rt: Runtime, args: Record<string, unknown>, raw: readonly string[]): Promise<DeployResult>;
@@ -135,6 +135,11 @@ export declare const COMPAT_ARGS: {
135
135
  readonly alias: 'h';
136
136
  readonly description: 'Show this help';
137
137
  };
138
+ readonly against: {
139
+ readonly type: 'string';
140
+ readonly description: 'Check against the shell a registry index or a deployed mf-manifest.json describes (file or https URL)';
141
+ readonly valueHint: 'url|file';
142
+ };
138
143
  };
139
144
  export declare function runDoctor(rt: Runtime, args: Record<string, unknown>, raw: readonly string[]): Promise<ReportResult>;
140
145
  export declare function runValidate(rt: Runtime, args: Record<string, unknown>, raw: readonly string[]): Promise<ReportResult>;
@@ -74,16 +74,24 @@ export declare const INIT_ARGS: {
74
74
  };
75
75
  readonly topology: {
76
76
  readonly type: 'string';
77
- readonly description: 'monorepo (the only one in this release)';
77
+ readonly description: 'monorepo (default), or polyrepo: a platform repo, a shell repo and a repo for each remote';
78
78
  readonly valueHint: 'name';
79
79
  };
80
+ readonly org: {
81
+ readonly type: 'string';
82
+ readonly description: 'polyrepo: the GitHub owner the CI and Renovate files point at (default: the scope without @)';
83
+ readonly valueHint: 'owner';
84
+ };
80
85
  readonly option: {
81
86
  readonly type: 'string';
82
87
  readonly description: 'A feature option, repeatable: --option feature.key=value';
83
88
  readonly valueHint: 'f.k=v';
84
89
  };
85
90
  };
91
+ export type Topology = 'monorepo' | 'polyrepo';
86
92
  export interface InitOptions {
93
+ topology: Topology;
94
+ org?: string;
87
95
  dir: string;
88
96
  scope: string;
89
97
  remotes: string[];
@@ -0,0 +1,210 @@
1
+ import type { ArgsDef } from 'citty';
2
+ import type { DeployResult, KillCommandResult, RolloutCommandResult, StatusResult } from '../output.js';
3
+ import type { Runtime } from '../runtime.js';
4
+ import type { ServerClient } from '../server-client.js';
5
+ export declare const SERVER_ARGS: {
6
+ readonly 'registry-url': {
7
+ readonly type: 'string';
8
+ readonly description: 'Registry server address (env MFEFLOW_REGISTRY_URL). The token is only read from MFEFLOW_REGISTRY_TOKEN';
9
+ readonly valueHint: 'url';
10
+ };
11
+ };
12
+ export declare const ROLLOUT_ARGS: {
13
+ readonly percent: {
14
+ readonly type: 'string';
15
+ readonly description: 'Start a percentage rollout at this share of visitors, 1 to 99 (registry server only)';
16
+ readonly valueHint: 'n';
17
+ };
18
+ readonly steps: {
19
+ readonly type: 'string';
20
+ readonly description: 'Later rollout steps, rising, like 50,100 (needs --percent)';
21
+ readonly valueHint: 'a,b,c';
22
+ };
23
+ };
24
+ export declare const ROLLOUT_CMD_ARGS: {
25
+ readonly yes: {
26
+ readonly type: 'boolean';
27
+ readonly alias: 'y';
28
+ readonly description: 'Take the defaults and never prompt';
29
+ };
30
+ readonly preset: {
31
+ readonly type: 'string';
32
+ readonly description: 'Replay options from a JSON file or an https URL';
33
+ readonly valueHint: 'file|url';
34
+ };
35
+ readonly json: {
36
+ readonly type: 'boolean';
37
+ readonly description: 'Print one JSON document on stdout, nothing else';
38
+ };
39
+ readonly 'dry-run': {
40
+ readonly type: 'boolean';
41
+ readonly description: 'Print the summary and diff, write nothing';
42
+ };
43
+ readonly cwd: {
44
+ readonly type: 'string';
45
+ readonly description: 'Run as if started in this folder';
46
+ readonly valueHint: 'dir';
47
+ };
48
+ readonly install: {
49
+ readonly type: 'boolean';
50
+ readonly default: true;
51
+ readonly description: 'Run the package manager after writing (--no-install to skip)';
52
+ };
53
+ readonly verbose: {
54
+ readonly type: 'boolean';
55
+ readonly description: 'Show package manager output and stack traces';
56
+ };
57
+ readonly local: {
58
+ readonly type: 'string';
59
+ readonly description: 'Link @mfeflow/* from a built mfeflow checkout (env MFEFLOW_LOCAL)';
60
+ readonly valueHint: 'path';
61
+ };
62
+ readonly help: {
63
+ readonly type: 'boolean';
64
+ readonly alias: 'h';
65
+ readonly description: 'Show this help';
66
+ };
67
+ readonly 'registry-url': {
68
+ readonly type: 'string';
69
+ readonly description: 'Registry server address (env MFEFLOW_REGISTRY_URL). The token is only read from MFEFLOW_REGISTRY_TOKEN';
70
+ readonly valueHint: 'url';
71
+ };
72
+ readonly env: {
73
+ readonly type: 'string';
74
+ readonly description: 'Environment the rollout runs in';
75
+ readonly valueHint: 'env';
76
+ };
77
+ readonly reason: {
78
+ readonly type: 'string';
79
+ readonly description: 'Why, for the audit log (abort only)';
80
+ readonly valueHint: 'text';
81
+ };
82
+ };
83
+ export declare const KILL_ARGS: {
84
+ readonly yes: {
85
+ readonly type: 'boolean';
86
+ readonly alias: 'y';
87
+ readonly description: 'Take the defaults and never prompt';
88
+ };
89
+ readonly preset: {
90
+ readonly type: 'string';
91
+ readonly description: 'Replay options from a JSON file or an https URL';
92
+ readonly valueHint: 'file|url';
93
+ };
94
+ readonly json: {
95
+ readonly type: 'boolean';
96
+ readonly description: 'Print one JSON document on stdout, nothing else';
97
+ };
98
+ readonly 'dry-run': {
99
+ readonly type: 'boolean';
100
+ readonly description: 'Print the summary and diff, write nothing';
101
+ };
102
+ readonly cwd: {
103
+ readonly type: 'string';
104
+ readonly description: 'Run as if started in this folder';
105
+ readonly valueHint: 'dir';
106
+ };
107
+ readonly install: {
108
+ readonly type: 'boolean';
109
+ readonly default: true;
110
+ readonly description: 'Run the package manager after writing (--no-install to skip)';
111
+ };
112
+ readonly verbose: {
113
+ readonly type: 'boolean';
114
+ readonly description: 'Show package manager output and stack traces';
115
+ };
116
+ readonly local: {
117
+ readonly type: 'string';
118
+ readonly description: 'Link @mfeflow/* from a built mfeflow checkout (env MFEFLOW_LOCAL)';
119
+ readonly valueHint: 'path';
120
+ };
121
+ readonly help: {
122
+ readonly type: 'boolean';
123
+ readonly alias: 'h';
124
+ readonly description: 'Show this help';
125
+ };
126
+ readonly 'registry-url': {
127
+ readonly type: 'string';
128
+ readonly description: 'Registry server address (env MFEFLOW_REGISTRY_URL). The token is only read from MFEFLOW_REGISTRY_TOKEN';
129
+ readonly valueHint: 'url';
130
+ };
131
+ readonly env: {
132
+ readonly type: 'string';
133
+ readonly description: 'Environment to remove the remote from';
134
+ readonly valueHint: 'env';
135
+ };
136
+ readonly reason: {
137
+ readonly type: 'string';
138
+ readonly description: 'Why, for the audit log';
139
+ readonly valueHint: 'text';
140
+ };
141
+ };
142
+ export declare const RESTORE_ARGS: {
143
+ readonly yes: {
144
+ readonly type: 'boolean';
145
+ readonly alias: 'y';
146
+ readonly description: 'Take the defaults and never prompt';
147
+ };
148
+ readonly preset: {
149
+ readonly type: 'string';
150
+ readonly description: 'Replay options from a JSON file or an https URL';
151
+ readonly valueHint: 'file|url';
152
+ };
153
+ readonly json: {
154
+ readonly type: 'boolean';
155
+ readonly description: 'Print one JSON document on stdout, nothing else';
156
+ };
157
+ readonly 'dry-run': {
158
+ readonly type: 'boolean';
159
+ readonly description: 'Print the summary and diff, write nothing';
160
+ };
161
+ readonly cwd: {
162
+ readonly type: 'string';
163
+ readonly description: 'Run as if started in this folder';
164
+ readonly valueHint: 'dir';
165
+ };
166
+ readonly install: {
167
+ readonly type: 'boolean';
168
+ readonly default: true;
169
+ readonly description: 'Run the package manager after writing (--no-install to skip)';
170
+ };
171
+ readonly verbose: {
172
+ readonly type: 'boolean';
173
+ readonly description: 'Show package manager output and stack traces';
174
+ };
175
+ readonly local: {
176
+ readonly type: 'string';
177
+ readonly description: 'Link @mfeflow/* from a built mfeflow checkout (env MFEFLOW_LOCAL)';
178
+ readonly valueHint: 'path';
179
+ };
180
+ readonly help: {
181
+ readonly type: 'boolean';
182
+ readonly alias: 'h';
183
+ readonly description: 'Show this help';
184
+ };
185
+ readonly 'registry-url': {
186
+ readonly type: 'string';
187
+ readonly description: 'Registry server address (env MFEFLOW_REGISTRY_URL). The token is only read from MFEFLOW_REGISTRY_TOKEN';
188
+ readonly valueHint: 'url';
189
+ };
190
+ readonly env: {
191
+ readonly type: 'string';
192
+ readonly description: 'Environment to put the remote back in';
193
+ readonly valueHint: 'env';
194
+ };
195
+ };
196
+ export interface RolloutPlan {
197
+ percent: number;
198
+ steps: number[];
199
+ }
200
+ /** `--percent` and `--steps` as the server wants them, or undefined when neither is given. */
201
+ export declare function rolloutOf(args: Record<string, unknown>): RolloutPlan | undefined;
202
+ /** A rollout was asked for in static mode, which has no way to split traffic. */
203
+ export declare function refuseRolloutFlags(args: Record<string, unknown>): void;
204
+ export declare function deployViaServer(rt: Runtime, args: Record<string, unknown>, raw: readonly string[], defs: ArgsDef, client: ServerClient): Promise<DeployResult>;
205
+ export declare function promoteViaServer(rt: Runtime, args: Record<string, unknown>, raw: readonly string[], defs: ArgsDef, client: ServerClient): Promise<DeployResult>;
206
+ export declare function rollbackViaServer(rt: Runtime, args: Record<string, unknown>, raw: readonly string[], defs: ArgsDef, client: ServerClient): Promise<DeployResult>;
207
+ export declare function statusViaServer(rt: Runtime, args: Record<string, unknown>, raw: readonly string[], defs: ArgsDef, client: ServerClient): Promise<StatusResult>;
208
+ export declare function runRolloutCommand(rt: Runtime, args: Record<string, unknown>, raw: readonly string[], client: ServerClient | undefined): Promise<RolloutCommandResult>;
209
+ export declare function runKillCommand(rt: Runtime, args: Record<string, unknown>, raw: readonly string[], restore: boolean, client: ServerClient | undefined): Promise<KillCommandResult>;
210
+ export declare function formatServerAction(result: RolloutCommandResult | KillCommandResult): string;
@@ -0,0 +1,63 @@
1
+ import type { StatusResult } from '../output.js';
2
+ import type { Runtime } from '../runtime.js';
3
+ export declare const STATUS_ARGS: {
4
+ readonly yes: {
5
+ readonly type: 'boolean';
6
+ readonly alias: 'y';
7
+ readonly description: 'Take the defaults and never prompt';
8
+ };
9
+ readonly preset: {
10
+ readonly type: 'string';
11
+ readonly description: 'Replay options from a JSON file or an https URL';
12
+ readonly valueHint: 'file|url';
13
+ };
14
+ readonly json: {
15
+ readonly type: 'boolean';
16
+ readonly description: 'Print one JSON document on stdout, nothing else';
17
+ };
18
+ readonly 'dry-run': {
19
+ readonly type: 'boolean';
20
+ readonly description: 'Print the summary and diff, write nothing';
21
+ };
22
+ readonly cwd: {
23
+ readonly type: 'string';
24
+ readonly description: 'Run as if started in this folder';
25
+ readonly valueHint: 'dir';
26
+ };
27
+ readonly install: {
28
+ readonly type: 'boolean';
29
+ readonly default: true;
30
+ readonly description: 'Run the package manager after writing (--no-install to skip)';
31
+ };
32
+ readonly verbose: {
33
+ readonly type: 'boolean';
34
+ readonly description: 'Show package manager output and stack traces';
35
+ };
36
+ readonly local: {
37
+ readonly type: 'string';
38
+ readonly description: 'Link @mfeflow/* from a built mfeflow checkout (env MFEFLOW_LOCAL)';
39
+ readonly valueHint: 'path';
40
+ };
41
+ readonly help: {
42
+ readonly type: 'boolean';
43
+ readonly alias: 'h';
44
+ readonly description: 'Show this help';
45
+ };
46
+ readonly 'registry-url': {
47
+ readonly type: 'string';
48
+ readonly description: 'Registry server address (env MFEFLOW_REGISTRY_URL). The token is only read from MFEFLOW_REGISTRY_TOKEN';
49
+ readonly valueHint: 'url';
50
+ };
51
+ readonly env: {
52
+ readonly type: 'string';
53
+ readonly description: 'Only this environment (default: every env on the host, and every folder in registry/envs but dev)';
54
+ readonly valueHint: 'env';
55
+ };
56
+ readonly host: {
57
+ readonly type: 'string';
58
+ readonly description: 'Where the registry lives: file:<dir> or s3://<bucket>[/prefix] (default registry.host)';
59
+ readonly valueHint: 'spec';
60
+ };
61
+ };
62
+ export declare function formatStatus(result: StatusResult): string;
63
+ export declare function runStatus(rt: Runtime, args: Record<string, unknown>, raw: readonly string[]): Promise<StatusResult>;
@@ -0,0 +1,9 @@
1
+ import type { Globals } from '../args.js';
2
+ import { type AddResult } from '../output.js';
3
+ import type { Runtime } from '../runtime.js';
4
+ /**
5
+ * `mfeflow add team-repo <name>`, run in the shell repo: makes `../<name>` a new git repo with the
6
+ * remote in it, then registers the remote here (a route, staging and prod registry entries and its
7
+ * dev server in the dev config). The new repo is written first, so a failure here leaves no folder.
8
+ */
9
+ export declare function addTeamRepo(rt: Runtime, globals: Globals, args: Record<string, unknown>, given: string | undefined): Promise<AddResult>;
@@ -0,0 +1,66 @@
1
+ import { type UpgradeResult } from '../output.js';
2
+ import type { Runtime } from '../runtime.js';
3
+ export declare const UPGRADE_ARGS: {
4
+ readonly yes: {
5
+ readonly type: 'boolean';
6
+ readonly alias: 'y';
7
+ readonly description: 'Take the defaults and never prompt';
8
+ };
9
+ readonly preset: {
10
+ readonly type: 'string';
11
+ readonly description: 'Replay options from a JSON file or an https URL';
12
+ readonly valueHint: 'file|url';
13
+ };
14
+ readonly json: {
15
+ readonly type: 'boolean';
16
+ readonly description: 'Print one JSON document on stdout, nothing else';
17
+ };
18
+ readonly 'dry-run': {
19
+ readonly type: 'boolean';
20
+ readonly description: 'Print the summary and diff, write nothing';
21
+ };
22
+ readonly cwd: {
23
+ readonly type: 'string';
24
+ readonly description: 'Run as if started in this folder';
25
+ readonly valueHint: 'dir';
26
+ };
27
+ readonly install: {
28
+ readonly type: 'boolean';
29
+ readonly default: true;
30
+ readonly description: 'Run the package manager after writing (--no-install to skip)';
31
+ };
32
+ readonly verbose: {
33
+ readonly type: 'boolean';
34
+ readonly description: 'Show package manager output and stack traces';
35
+ };
36
+ readonly local: {
37
+ readonly type: 'string';
38
+ readonly description: 'Link @mfeflow/* from a built mfeflow checkout (env MFEFLOW_LOCAL)';
39
+ readonly valueHint: 'path';
40
+ };
41
+ readonly help: {
42
+ readonly type: 'boolean';
43
+ readonly alias: 'h';
44
+ readonly description: 'Show this help';
45
+ };
46
+ readonly to: {
47
+ readonly type: 'string';
48
+ readonly description: 'The version to upgrade to; only the version of this mfeflow is possible';
49
+ readonly valueHint: 'version';
50
+ };
51
+ readonly accept: {
52
+ readonly type: 'string';
53
+ readonly description: 'Replace a file you changed with the new version: a path, a list, or all';
54
+ readonly valueHint: 'path|all';
55
+ };
56
+ readonly keep: {
57
+ readonly type: 'string';
58
+ readonly description: 'Keep your version of a file you changed: a path, a list, or all';
59
+ readonly valueHint: 'path|all';
60
+ };
61
+ readonly 'accept-changed-content': {
62
+ readonly type: 'boolean';
63
+ readonly description: 'Take registry content that differs from the hash recorded in mfeflow.json: every feature, or only those named after the flag (a,b)';
64
+ };
65
+ };
66
+ export declare function runUpgrade(rt: Runtime, args: Record<string, unknown>, raw: readonly string[]): Promise<UpgradeResult>;