mfeflow 0.5.0 → 0.7.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.
- package/README.md +8 -3
- package/assets/features/deploy-cloudflare/feature.json +85 -0
- package/assets/features/deploy-cloudflare/files/cloudflare.json.eta +13 -0
- package/assets/features/deploy-cloudflare/files/cloudflare.md.eta +104 -0
- package/assets/features/deploy-cloudflare/files/deploy-cloudflare.ts +318 -0
- package/assets/features/deploy-cloudflare/files/deploy-cloudflare.yml +111 -0
- package/assets/features/deploy-cloudflare/files/headers.remote +14 -0
- package/assets/features/deploy-cloudflare/files/headers.shell.eta +18 -0
- package/assets/features/deploy-cloudflare/files/r2-cors.json +10 -0
- package/assets/features/deploy-cloudflare/files/registry-proxy.ts +80 -0
- package/assets/features/deploy-cloudflare/files/wrangler.remote.jsonc.eta +21 -0
- package/assets/features/deploy-cloudflare/files/wrangler.shell.jsonc.eta +40 -0
- package/assets/features/deploy-docker/feature.json +22 -0
- package/assets/features/deploy-docker/files/40-mfe-config.sh +76 -0
- package/assets/features/deploy-docker/files/Dockerfile +48 -0
- package/assets/features/deploy-docker/files/compose-registry.json.eta +19 -0
- package/assets/features/deploy-docker/files/compose.yaml.eta +50 -0
- package/assets/features/deploy-docker/files/docker.md +52 -0
- package/assets/features/deploy-docker/files/dockerignore +17 -0
- package/assets/features/deploy-docker/files/k8s.yaml +114 -0
- package/assets/features/deploy-docker/files/nginx.remote.conf +73 -0
- package/assets/features/deploy-docker/files/nginx.shell.conf +84 -0
- package/assets/features/registry-server/feature.json +128 -0
- package/assets/features/registry-server/files/deploy-server.yml +69 -0
- package/assets/features/registry-server/files/registry-server.md.eta +52 -0
- package/assets/features/registry-server/files/registry-sources.ts +12 -0
- package/assets/features/registry-static/feature.json +61 -0
- package/assets/features/registry-static/files/deploy.yml +61 -0
- package/assets/features/registry-static/files/registry.md.eta +49 -0
- package/assets/features/release/feature.json +43 -0
- package/assets/features/release/files/changeset-readme.md +7 -0
- package/assets/features/release/files/config.json +10 -0
- package/assets/features/release/files/releasing.md +21 -0
- package/assets/templates/monorepo/feature.json +7 -6
- package/assets/templates/monorepo/files/remote/{mfe.json.eta → mfeflow.app.json.eta} +1 -0
- package/assets/templates/monorepo/files/root/README.md.eta +1 -1
- package/assets/templates/monorepo/files/root/pnpm-workspace.yaml.eta +3 -2
- package/assets/templates/monorepo/files/shell/{mfe.json.eta → mfeflow.app.json.eta} +1 -0
- package/assets/templates/monorepo/files/shell/rsbuild.config.ts.eta +42 -6
- package/assets/templates/monorepo/migrations/0.4.0-app-file.mjs +58 -0
- package/assets/templates/polyrepo/feature.json +305 -0
- package/assets/templates/polyrepo/files/AGENTS.md.eta +15 -0
- package/assets/templates/polyrepo/files/changeset/README.md +5 -0
- package/assets/templates/polyrepo/files/changeset/config.json +9 -0
- package/assets/templates/polyrepo/files/packages/contracts/package.json.eta +23 -0
- package/assets/templates/polyrepo/files/packages/contracts/src/index.ts +11 -0
- package/assets/templates/polyrepo/files/packages/contracts/tsconfig.json.eta +5 -0
- package/assets/templates/polyrepo/files/packages/tokens/package.json.eta +23 -0
- package/assets/templates/polyrepo/files/packages/tokens/src/index.ts +13 -0
- package/assets/templates/polyrepo/files/packages/tokens/tsconfig.json.eta +5 -0
- package/assets/templates/polyrepo/files/platform/README.md.eta +43 -0
- package/assets/templates/polyrepo/files/platform/default.json.eta +27 -0
- package/assets/templates/polyrepo/files/remote/README.md.eta +23 -0
- package/assets/templates/polyrepo/files/renovate.json.eta +4 -0
- package/assets/templates/polyrepo/files/shell/README.md.eta +32 -0
- package/assets/templates/polyrepo/files/tsconfig.base.json.eta +13 -0
- package/assets/templates/polyrepo/files/workflows/platform-ci.yml +29 -0
- package/assets/templates/polyrepo/files/workflows/release.yml +40 -0
- package/assets/templates/polyrepo/files/workflows/reusable-ci.yml.eta +50 -0
- package/assets/templates/polyrepo/files/workflows/team-ci.yml.eta +12 -0
- package/dist/against.d.ts +16 -0
- package/dist/catalog.d.ts +4 -0
- package/dist/checks/compat.d.ts +12 -0
- package/dist/checks/index.d.ts +0 -1
- package/dist/commands/add.d.ts +0 -2
- package/dist/commands/adopt.d.ts +54 -0
- package/dist/commands/deploy.d.ts +35 -0
- package/dist/commands/doctor.d.ts +10 -0
- package/dist/commands/init.d.ts +9 -1
- package/dist/commands/server-mode.d.ts +210 -0
- package/dist/commands/status.d.ts +5 -0
- package/dist/commands/team-repo.d.ts +9 -0
- package/dist/commands/upgrade.d.ts +66 -0
- package/dist/devremotes.d.ts +15 -0
- package/dist/exit.d.ts +1 -0
- package/dist/glue.d.ts +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4600 -1875
- package/dist/inspect.d.ts +14 -2
- package/dist/output.d.ts +138 -3
- package/dist/pipeline.d.ts +5 -2
- package/dist/polyrepo.d.ts +69 -0
- package/dist/publish.d.ts +10 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/server-client.d.ts +69 -0
- package/dist/system.d.ts +2 -0
- package/dist/testing.d.ts +17 -1
- package/dist/upgrade.d.ts +25 -0
- package/dist/write.d.ts +8 -0
- package/package.json +5 -5
|
@@ -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>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface RemoteSpec {
|
|
2
|
+
name: string;
|
|
3
|
+
port: number;
|
|
4
|
+
}
|
|
5
|
+
/** The dev server of each remote, relative to the shell app: the one place a polyrepo shell reads them from. */
|
|
6
|
+
export declare const DEV_CONFIG = "apps/shell/public/config/runtime-config.dev.json";
|
|
7
|
+
export declare const DEV_CONFIG_IN_APP = "public/config/runtime-config.dev.json";
|
|
8
|
+
/** `runtime-config.dev.json` of the shell: where each remote's dev server is. */
|
|
9
|
+
export declare function devConfigText(remotes: readonly RemoteSpec[]): string;
|
|
10
|
+
/** The `devRemotes` of a shell's dev config; empty when the file or the key is missing. */
|
|
11
|
+
export declare function readDevRemotes(text: string | undefined): Record<string, string>;
|
|
12
|
+
/** `text` with one more remote in `devRemotes`. */
|
|
13
|
+
export declare function withDevRemote(text: string, remote: RemoteSpec): string;
|
|
14
|
+
/** The port of a dev URL like `http://localhost:4311/mf-manifest.json`. */
|
|
15
|
+
export declare function portOf(url: string): number | undefined;
|
package/dist/exit.d.ts
CHANGED
package/dist/glue.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { type LoadedFeature, type MfeflowProject } from '@mfeflow/core';
|
|
2
|
+
import type { Globals } from './args.js';
|
|
2
3
|
import type { AssetRoots } from './assets.js';
|
|
4
|
+
import type { Runtime } from './runtime.js';
|
|
3
5
|
export declare const SHELL_PORT = 4300;
|
|
4
6
|
export declare const REMOTE_PORT = 4311;
|
|
5
7
|
export declare function assertAppName(name: string, apps?: MfeflowProject['apps']): void;
|
|
6
8
|
/** The first free port from `start` upwards. */
|
|
7
9
|
export declare function freePort(project: Pick<MfeflowProject, 'apps'>, start: number): number;
|
|
8
10
|
export declare function routeComponent(remote: string): string;
|
|
11
|
+
export declare function portFor(args: Record<string, unknown>, project: Pick<MfeflowProject, 'apps'>, start: number): number;
|
|
12
|
+
export declare function nameFrom(rt: Runtime, globals: Globals, given: string | undefined, what: string): Promise<string>;
|
|
9
13
|
export declare const REGISTRY_ENVS: readonly ['dev', 'staging', 'prod'];
|
|
10
14
|
export interface RemoteSpec {
|
|
11
15
|
name: string;
|
|
@@ -18,6 +22,8 @@ export interface GlueOptions {
|
|
|
18
22
|
remote: RemoteSpec;
|
|
19
23
|
/** Write `registry/envs/<env>/<name>.json`. */
|
|
20
24
|
registry: boolean;
|
|
25
|
+
/** Which environments get an entry (default all). A polyrepo shell has no dev entry: its dev remotes are in config. */
|
|
26
|
+
registryEnvs?: readonly string[];
|
|
21
27
|
/** Apps (a shell name, or "shell" for every shell) that get a route to the remote. */
|
|
22
28
|
shells: readonly string[];
|
|
23
29
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { main } from './cli.js';
|
|
|
2
2
|
export { COMMANDS } from './cli.js';
|
|
3
3
|
export { EXIT, exitCodeFor } from './exit.js';
|
|
4
4
|
export { validateResult } from './output.js';
|
|
5
|
-
export type { AddResult, BudgetResult, DevResult, DeployResult, CliResult, FailureResult, FeatureInfo, FeaturesResult, InitResult, PlanReport, RegistryEntryInfo, RegistryResult, RegistryStatus, ReportResult, StatusResult, } from './output.js';
|
|
5
|
+
export type { AddResult, AdoptResult, BudgetResult, DevResult, DeployResult, CliResult, FailureResult, FeatureInfo, FeaturesResult, InitResult, PlanReport, RegistryEntryInfo, RegistryResult, RegistryStatus, ReportResult, StatusResult, UpgradeFileReport, UpgradeResult, } from './output.js';
|
|
6
6
|
export { realRuntime, type Runtime } from './runtime.js';
|
|
7
7
|
export type { Io } from './io.js';
|
|
8
8
|
export type { Prompter } from './prompter.js';
|