@multiplatform.one/cli 6.1.0 → 6.4.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 +72 -0
- package/bin/createMultiplatformApp.mjs +77 -0
- package/lib/bin/multiplatformOne.mjs +35 -10
- package/lib/commands/e2e.mjs +3 -3
- package/lib/commands/init.mjs +16 -12
- package/lib/commands/initApp.mjs +175 -0
- package/lib/commands/updateApp.mjs +260 -0
- package/lib/generateVscode.mjs +27 -10
- package/package.json +23 -12
- package/src/bin/multiplatformOne.ts +83 -20
- package/src/commands/init.ts +7 -18
- package/src/commands/initApp.spec.ts +210 -0
- package/src/commands/initApp.ts +274 -0
- package/src/commands/updateApp.ts +277 -0
- package/src/generateVscode.ts +31 -9
- package/templates/app/AGENTS.md +142 -0
- package/templates/app/README.md +62 -0
- package/templates/app/apps/__NAME__/index.html +36 -0
- package/templates/app/apps/__NAME__/package.json +30 -0
- package/templates/app/apps/__NAME__/public/fonts/inter-400.woff2 +0 -0
- package/templates/app/apps/__NAME__/public/fonts/inter-700.woff2 +0 -0
- package/templates/app/apps/__NAME__/src/App.tsx +9 -0
- package/templates/app/apps/__NAME__/src/main.tsx +14 -0
- package/templates/app/apps/__NAME__/tsconfig.json +8 -0
- package/templates/app/apps/__NAME__/vite.config.ts +17 -0
- package/templates/app/features/__NAME__/package.json +34 -0
- package/templates/app/features/__NAME__/src/HomeScreen.tsx +70 -0
- package/templates/app/features/__NAME__/src/index.ts +1 -0
- package/templates/app/features/__NAME__/tsconfig.json +5 -0
- package/templates/app/gitignore +8 -0
- package/templates/app/npmrc +2 -0
- package/templates/app/oxlintrc.json +39 -0
- package/templates/app/package.json +20 -0
- package/templates/app/packages/config/config.json +4 -0
- package/templates/app/packages/config/index.ts +5 -0
- package/templates/app/packages/config/package.json +17 -0
- package/templates/app/packages/config/tsconfig.json +5 -0
- package/templates/app/pnpm-workspace.yaml +4 -0
- package/templates/app/tsconfig.base.json +16 -0
- package/templates/universal/AGENTS.md +142 -0
- package/templates/universal/README.md +97 -0
- package/templates/universal/apps/__NAME__/app.config.js +31 -0
- package/templates/universal/apps/__NAME__/config/tamagui.config.ts +4 -0
- package/templates/universal/apps/__NAME__/package.json +61 -0
- package/templates/universal/apps/__NAME__/polyfills.native.ts +23 -0
- package/templates/universal/apps/__NAME__/polyfills.ts +3 -0
- package/templates/universal/apps/__NAME__/public/fonts/inter-400.woff2 +0 -0
- package/templates/universal/apps/__NAME__/public/fonts/inter-700.woff2 +0 -0
- package/templates/universal/apps/__NAME__/routes/_layout.tsx +22 -0
- package/templates/universal/apps/__NAME__/routes/_layout.web.tsx +21 -0
- package/templates/universal/apps/__NAME__/routes/about.tsx +3 -0
- package/templates/universal/apps/__NAME__/routes/index.tsx +3 -0
- package/templates/universal/apps/__NAME__/src/app.ts +10 -0
- package/templates/universal/apps/__NAME__/tamagui.css +3 -0
- package/templates/universal/apps/__NAME__/tsconfig.json +8 -0
- package/templates/universal/apps/__NAME__/types.d.ts +9 -0
- package/templates/universal/apps/__NAME__/vite.config.ts +66 -0
- package/templates/universal/features/__NAME__/package.json +35 -0
- package/templates/universal/features/__NAME__/src/AboutScreen.tsx +27 -0
- package/templates/universal/features/__NAME__/src/AppLayout.tsx +50 -0
- package/templates/universal/features/__NAME__/src/ContactForm.spec.tsx +22 -0
- package/templates/universal/features/__NAME__/src/ContactForm.tsx +55 -0
- package/templates/universal/features/__NAME__/src/HomeScreen.tsx +40 -0
- package/templates/universal/features/__NAME__/src/index.ts +4 -0
- package/templates/universal/features/__NAME__/src/screens.spec.ts +12 -0
- package/templates/universal/features/__NAME__/tsconfig.json +5 -0
- package/templates/universal/features/__NAME__/vitest.config.mjs +7 -0
- package/templates/universal/gitignore +12 -0
- package/templates/universal/npmrc +3 -0
- package/templates/universal/oxlintrc.json +39 -0
- package/templates/universal/package.json +27 -0
- package/templates/universal/packages/config/config.json +4 -0
- package/templates/universal/packages/config/index.ts +5 -0
- package/templates/universal/packages/config/package.json +17 -0
- package/templates/universal/packages/config/tsconfig.json +5 -0
- package/templates/universal/packages/i18n/en/common.json +30 -0
- package/templates/universal/packages/i18n/es/common.json +30 -0
- package/templates/universal/packages/i18n/i18n.d.ts +16 -0
- package/templates/universal/packages/i18n/index.ts +26 -0
- package/templates/universal/packages/i18n/package.json +20 -0
- package/templates/universal/packages/i18n/resources.ts +13 -0
- package/templates/universal/packages/i18n/tsconfig.json +5 -0
- package/templates/universal/packages/themes/accent.ts +32 -0
- package/templates/universal/packages/themes/base.ts +50 -0
- package/templates/universal/packages/themes/fonts.ts +8 -0
- package/templates/universal/packages/themes/index.ts +33 -0
- package/templates/universal/packages/themes/package.json +23 -0
- package/templates/universal/packages/themes/tamagui.config.ts +14 -0
- package/templates/universal/packages/themes/tsconfig.json +5 -0
- package/templates/universal/pnpm-workspace.yaml +4 -0
- package/templates/universal/tsconfig.base.json +21 -0
- package/templates/universal/types/env.d.ts +9 -0
- package/types/bin/multiplatformOne.d.ts +11 -0
- package/types/bin/multiplatformOne.d.ts.map +1 -0
- package/types/commands/e2e.d.ts +14 -0
- package/types/commands/e2e.d.ts.map +1 -0
- package/types/commands/init.d.ts +16 -0
- package/types/commands/init.d.ts.map +1 -0
- package/types/commands/initApp.d.ts +41 -0
- package/types/commands/initApp.d.ts.map +1 -0
- package/types/commands/updateApp.d.ts +24 -0
- package/types/commands/updateApp.d.ts.map +1 -0
- package/types/generateVscode.d.ts +7 -0
- package/types/generateVscode.d.ts.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -0
- package/types/types.d.ts +6 -0
- package/types/types.d.ts.map +1 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Static resource map for native (web loads translations through the vite
|
|
2
|
+
// i18next loader instead — see apps/__NAME__/routes/_layout.web.tsx).
|
|
3
|
+
import en from "./en/common.json";
|
|
4
|
+
import es from "./es/common.json";
|
|
5
|
+
|
|
6
|
+
export const resources = {
|
|
7
|
+
en: {
|
|
8
|
+
common: en,
|
|
9
|
+
},
|
|
10
|
+
es: {
|
|
11
|
+
common: es,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Framework default brand accent: solid-surface hsla(250) ramps. Replace with
|
|
2
|
+
// your brand color ramps to rebrand the whole app in one place.
|
|
3
|
+
export const accentTheme = {
|
|
4
|
+
darkPalette: [
|
|
5
|
+
"hsla(250, 50%, 35%, 1)",
|
|
6
|
+
"hsla(250, 50%, 38%, 1)",
|
|
7
|
+
"hsla(250, 50%, 41%, 1)",
|
|
8
|
+
"hsla(250, 50%, 43%, 1)",
|
|
9
|
+
"hsla(250, 50%, 46%, 1)",
|
|
10
|
+
"hsla(250, 50%, 49%, 1)",
|
|
11
|
+
"hsla(250, 50%, 52%, 1)",
|
|
12
|
+
"hsla(250, 50%, 54%, 1)",
|
|
13
|
+
"hsla(250, 50%, 57%, 1)",
|
|
14
|
+
"hsla(250, 50%, 60%, 1)",
|
|
15
|
+
"hsla(250, 50%, 90%, 1)",
|
|
16
|
+
"hsla(250, 50%, 95%, 1)",
|
|
17
|
+
],
|
|
18
|
+
lightPalette: [
|
|
19
|
+
"hsla(250, 50%, 95%, 1)",
|
|
20
|
+
"hsla(250, 50%, 95%, 1)",
|
|
21
|
+
"hsla(250, 50%, 65%, 1)",
|
|
22
|
+
"hsla(250, 50%, 62%, 1)",
|
|
23
|
+
"hsla(250, 50%, 59%, 1)",
|
|
24
|
+
"hsla(250, 50%, 57%, 1)",
|
|
25
|
+
"hsla(250, 50%, 54%, 1)",
|
|
26
|
+
"hsla(250, 50%, 51%, 1)",
|
|
27
|
+
"hsla(250, 50%, 48%, 1)",
|
|
28
|
+
"hsla(250, 50%, 46%, 1)",
|
|
29
|
+
"hsla(250, 50%, 43%, 1)",
|
|
30
|
+
"hsla(250, 50%, 40%, 1)",
|
|
31
|
+
],
|
|
32
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Framework default neutral ramps: Radix-mauve-shaped with a slight purple
|
|
2
|
+
// tint (hue 270) harmonizing with the hsla(250) accent. Steps: near-white
|
|
3
|
+
// surfaces (1-2), component/hover (3-5), borders (6-8), solid/muted (9-10),
|
|
4
|
+
// readable text (11-12). Swap these palettes to rebrand.
|
|
5
|
+
export const baseTheme = {
|
|
6
|
+
darkPalette: [
|
|
7
|
+
"hsla(270, 6%, 8.7%, 1)",
|
|
8
|
+
"hsla(270, 6%, 10.5%, 1)",
|
|
9
|
+
"hsla(270, 6%, 13.5%, 1)",
|
|
10
|
+
"hsla(270, 6%, 16%, 1)",
|
|
11
|
+
"hsla(270, 6%, 18.5%, 1)",
|
|
12
|
+
"hsla(270, 6%, 21.5%, 1)",
|
|
13
|
+
"hsla(270, 6%, 25.5%, 1)",
|
|
14
|
+
"hsla(270, 6%, 32%, 1)",
|
|
15
|
+
"hsla(270, 6%, 43%, 1)",
|
|
16
|
+
"hsla(270, 6%, 48%, 1)",
|
|
17
|
+
"hsla(270, 6%, 62.5%, 1)",
|
|
18
|
+
"hsla(270, 6%, 94%, 1)",
|
|
19
|
+
],
|
|
20
|
+
lightPalette: [
|
|
21
|
+
"hsla(270, 6%, 99.5%, 1)",
|
|
22
|
+
"hsla(270, 6%, 98.2%, 1)",
|
|
23
|
+
"hsla(270, 6%, 95.2%, 1)",
|
|
24
|
+
"hsla(270, 6%, 92.5%, 1)",
|
|
25
|
+
"hsla(270, 6%, 90%, 1)",
|
|
26
|
+
"hsla(270, 6%, 87%, 1)",
|
|
27
|
+
"hsla(270, 6%, 82.5%, 1)",
|
|
28
|
+
"hsla(270, 6%, 75%, 1)",
|
|
29
|
+
"hsla(270, 6%, 56.5%, 1)",
|
|
30
|
+
"hsla(270, 6%, 52%, 1)",
|
|
31
|
+
"hsla(270, 6%, 40%, 1)",
|
|
32
|
+
"hsla(270, 6%, 14%, 1)",
|
|
33
|
+
],
|
|
34
|
+
lightShadows: {
|
|
35
|
+
shadow1: "rgba(0,0,0,0.04)",
|
|
36
|
+
shadow2: "rgba(0,0,0,0.08)",
|
|
37
|
+
shadow3: "rgba(0,0,0,0.16)",
|
|
38
|
+
shadow4: "rgba(0,0,0,0.24)",
|
|
39
|
+
shadow5: "rgba(0,0,0,0.32)",
|
|
40
|
+
shadow6: "rgba(0,0,0,0.4)",
|
|
41
|
+
},
|
|
42
|
+
darkShadows: {
|
|
43
|
+
shadow1: "rgba(0,0,0,0.2)",
|
|
44
|
+
shadow2: "rgba(0,0,0,0.3)",
|
|
45
|
+
shadow3: "rgba(0,0,0,0.4)",
|
|
46
|
+
shadow4: "rgba(0,0,0,0.5)",
|
|
47
|
+
shadow5: "rgba(0,0,0,0.6)",
|
|
48
|
+
shadow6: "rgba(0,0,0,0.7)",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createFontLoader } from "@multiplatform.one/theme";
|
|
2
|
+
|
|
3
|
+
// Loads the default Inter faces on native (web gets them via CSS). Add custom
|
|
4
|
+
// fonts by listing { family, nativeModule } entries.
|
|
5
|
+
export const { importFonts } = createFontLoader({
|
|
6
|
+
fonts: [],
|
|
7
|
+
inter: true,
|
|
8
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createDefaultThemeConfig } from "@multiplatform.one/theme";
|
|
2
|
+
import { accentTheme } from "./accent";
|
|
3
|
+
import { baseTheme } from "./base";
|
|
4
|
+
|
|
5
|
+
// House defaults: neutral base ramps + brand accent ramps with a normalized
|
|
6
|
+
// interaction ramp. Fonts fall back to the framework's Inter defaults —
|
|
7
|
+
// pass `fonts` here to customize.
|
|
8
|
+
export const themeConfig = createDefaultThemeConfig({
|
|
9
|
+
base: baseTheme,
|
|
10
|
+
accent: accentTheme,
|
|
11
|
+
builderOptions: {
|
|
12
|
+
getTheme: ({ theme }) => ({
|
|
13
|
+
// Interaction ramp: background 5 → 6 → 4, border 5 → 6 → 7.
|
|
14
|
+
backgroundPress: theme.color5,
|
|
15
|
+
backgroundFocus: theme.color6,
|
|
16
|
+
backgroundActive: theme.color4,
|
|
17
|
+
placeholderColor: theme.color10,
|
|
18
|
+
borderColor: theme.color5,
|
|
19
|
+
borderColorHover: theme.color6,
|
|
20
|
+
borderColorFocus: theme.color7,
|
|
21
|
+
borderColorPress: theme.color7,
|
|
22
|
+
// Semantic aliases for palette slots not covered by Tamagui defaults.
|
|
23
|
+
textMuted: theme.color10,
|
|
24
|
+
textSubtle: theme.color6,
|
|
25
|
+
borderStrong: theme.color7,
|
|
26
|
+
borderStrongHover: theme.color8,
|
|
27
|
+
borderStrongPress: theme.color6,
|
|
28
|
+
surfaceStrong: theme.color7,
|
|
29
|
+
surfaceMuted: theme.color10,
|
|
30
|
+
surfacePressStrong: theme.color6,
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@package/themes",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.ts",
|
|
9
|
+
"./fonts": "./fonts.ts",
|
|
10
|
+
"./tamagui.config": "./tamagui.config.ts"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"typecheck": "tsc --noEmit"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@multiplatform.one/theme": "__MPO_VERSION__",
|
|
17
|
+
"@tamagui/font-inter": "2.0.0-rc.41",
|
|
18
|
+
"tamagui": "2.0.0-rc.41"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"typescript": "~5.9.3"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { themeConfig } from "./index";
|
|
2
|
+
|
|
3
|
+
export const config = themeConfig.tamagui;
|
|
4
|
+
export type AppConfig = typeof config;
|
|
5
|
+
|
|
6
|
+
// Module augmentation must target @tamagui/web where TamaguiCustomConfig is
|
|
7
|
+
// defined; keep the @tamagui/core augmentation for consumers importing types
|
|
8
|
+
// from there.
|
|
9
|
+
declare module "@tamagui/web" {
|
|
10
|
+
interface TamaguiCustomConfig extends AppConfig {}
|
|
11
|
+
}
|
|
12
|
+
declare module "@tamagui/core" {
|
|
13
|
+
interface TamaguiCustomConfig extends AppConfig {}
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "Bundler",
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"strict": true,
|
|
10
|
+
// Published @multiplatform.one/* packages currently resolve types to
|
|
11
|
+
// their TypeScript sources (not compiled .d.ts), so typecheck re-checks
|
|
12
|
+
// framework code. Implicit-any strictness is relaxed until the packages
|
|
13
|
+
// publish compiled declarations; the rest of strict mode stays on.
|
|
14
|
+
"noImplicitAny": false,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"noEmit": true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Published @multiplatform.one/* packages ship TypeScript source, so package
|
|
2
|
+
// typechecks follow them into code that reads import.meta.env (vite-injected).
|
|
3
|
+
// Packages that don't load vite/client types include this minimal shape
|
|
4
|
+
// instead (apps/* use vite/client directly). Values are `any` to match
|
|
5
|
+
// vite/client's ImportMetaEnv index signature.
|
|
6
|
+
interface ImportMeta {
|
|
7
|
+
// biome-ignore lint/suspicious/noExplicitAny: mirrors vite/client typing
|
|
8
|
+
readonly env?: Record<string, any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Workspaces that have Storybook and can run visual regression (discovered from filesystem + package.json). */
|
|
2
|
+
export type StorybookVisualWorkspace = {
|
|
3
|
+
dirName: string;
|
|
4
|
+
absolutePath: string;
|
|
5
|
+
/** How to run visual test: run `make test/visual` in absolutePath, or run pnpm script by name. */
|
|
6
|
+
runVisual: "make" | "pnpm";
|
|
7
|
+
pnpmScript?: string;
|
|
8
|
+
/** If true, run `pnpm run build` then `pnpm exec lost-pixel` in workspace (no named script). */
|
|
9
|
+
runLostPixelAfterBuild?: boolean;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=multiplatformOne.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiplatformOne.d.ts","sourceRoot":"","sources":["../../src/bin/multiplatformOne.ts"],"names":[],"mappings":"AA2FA,gHAAgH;AAChH,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,kGAAkG;IAClG,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface E2EOptions {
|
|
2
|
+
upOnly?: boolean;
|
|
3
|
+
down?: boolean;
|
|
4
|
+
portOffset?: number;
|
|
5
|
+
project?: string;
|
|
6
|
+
noBuild?: boolean;
|
|
7
|
+
filter?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Discover app that has Playwright config (for E2E test cwd). Returns app name (e.g. "one") or null. */
|
|
10
|
+
export declare function discoverE2EApp(projectRoot: string): Promise<string | null>;
|
|
11
|
+
export declare function detectServices(projectRoot: string): Promise<string[]>;
|
|
12
|
+
export declare function generateCompose(services: string[], portOffset: number, projectRoot: string): string;
|
|
13
|
+
export declare function runE2ESession(projectRoot: string, options: E2EOptions): Promise<void>;
|
|
14
|
+
//# sourceMappingURL=e2e.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2e.d.ts","sourceRoot":"","sources":["../../src/commands/e2e.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmDD,yGAAyG;AACzG,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkBhF;AAED,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAkB3E;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAAE,EAClB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB,MAAM,CAsBR;AAiHD,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAiH3F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface InitOptions {
|
|
2
|
+
name?: string;
|
|
3
|
+
services?: string;
|
|
4
|
+
apps?: string;
|
|
5
|
+
checkout?: string;
|
|
6
|
+
/** Path to clone.sh script (from CLI); if set, clone via script instead of execSync */
|
|
7
|
+
cloneScript?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Shared modify step: remove unselected apps/services and rewrite configs.
|
|
11
|
+
* Used by both init (with prompted selections) and update (with getPresentApps/getPresentServices).
|
|
12
|
+
*/
|
|
13
|
+
export declare function runModifyStep(dir: string, selectedServices: string[], selectedApps: string[]): void;
|
|
14
|
+
export declare function init(nameArg: string | undefined, options: InitOptions): Promise<void>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAsEA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,gBAAgB,EAAE,MAAM,EAAE,EAC1B,YAAY,EAAE,MAAM,EAAE,GACrB,IAAI,CAuDN;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,WAAW,iBAqI3E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consumer project templates:
|
|
3
|
+
* - "universal": one-based app serving web + iOS + Android from one codebase
|
|
4
|
+
* (apps/<name> + features/<name> + packages/{config,i18n,themes})
|
|
5
|
+
* - "app": web-only Vite + React shell
|
|
6
|
+
* (apps/<name> + features/<name> + packages/config)
|
|
7
|
+
*/
|
|
8
|
+
export type InitAppTemplate = "universal" | "app";
|
|
9
|
+
export interface InitAppOptions {
|
|
10
|
+
/** Skip pnpm install (useful for CI / dry scaffolding). */
|
|
11
|
+
skipInstall?: boolean;
|
|
12
|
+
/** Pin @multiplatform.one/* to this semver range. Default: ^<cli version>. */
|
|
13
|
+
version?: string;
|
|
14
|
+
/** Project template. When omitted: prompt (interactive) or "universal". */
|
|
15
|
+
template?: InitAppTemplate;
|
|
16
|
+
/** Accept defaults instead of prompting (non-interactive / CI). */
|
|
17
|
+
yes?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function cliVersion(): string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Scaffold provenance (the copier-answers equivalent): which template, which
|
|
22
|
+
* CLI version and which vars produced this project. `mpo update` regenerates
|
|
23
|
+
* the ORIGINAL scaffold from this record to use as the merge base for a
|
|
24
|
+
* three-way template update.
|
|
25
|
+
*/
|
|
26
|
+
export interface MpoProvenance {
|
|
27
|
+
template: InitAppTemplate;
|
|
28
|
+
cliVersion: string;
|
|
29
|
+
name: string;
|
|
30
|
+
mpoVersion: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const PROVENANCE_FILE = ".mpo.json";
|
|
33
|
+
export declare function writeProvenance(targetDir: string, provenance: MpoProvenance): void;
|
|
34
|
+
export declare function readProvenance(projectDir: string): MpoProvenance | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Scaffold a consumer project (universal by default, web-only with
|
|
37
|
+
* template: "app") that depends on @multiplatform.one/* at semver ranges
|
|
38
|
+
* (never workspace:*). This is NOT a monorepo fork.
|
|
39
|
+
*/
|
|
40
|
+
export declare function initApp(nameArg: string | undefined, options?: InitAppOptions): Promise<void>;
|
|
41
|
+
//# sourceMappingURL=initApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initApp.d.ts","sourceRoot":"","sources":["../../src/commands/initApp.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,KAAK,CAAC;AAElD,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,mEAAmE;IACnE,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AA0CD,wBAAgB,UAAU,IAAI,MAAM,GAAG,SAAS,CAQ/C;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,cAAc,CAAC;AAE3C,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,GAAG,IAAI,CAElF;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAe5E;AAuED;;;;GAIG;AACH,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA6Ef"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mpo update` for scaffolded consumer projects — the modern successor of
|
|
3
|
+
* the old cookiecutter flow (init a fresh project, swap your .git in, merge
|
|
4
|
+
* your changes on top), rebuilt with a TRUE three-way merge:
|
|
5
|
+
*
|
|
6
|
+
* base = the ORIGINAL scaffold, regenerated from the CLI version recorded
|
|
7
|
+
* in .mpo.json at init time (published CLIs ship their templates,
|
|
8
|
+
* so `pnpm dlx @multiplatform.one/cli@<old> init` reproduces it)
|
|
9
|
+
* ours = the project's HEAD (all your custom changes)
|
|
10
|
+
* theirs= a fresh scaffold from the CURRENT CLI version
|
|
11
|
+
*
|
|
12
|
+
* `git merge-tree --write-tree --merge-base=<base>` merges template
|
|
13
|
+
* evolution with your customizations; conflicts land in the worktree with
|
|
14
|
+
* normal conflict markers. An `.updateignore` file (one pathspec per line)
|
|
15
|
+
* pins matching paths to your HEAD version, exactly like the old script.
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateAppOptions {
|
|
18
|
+
/** Skip pnpm install after the merge. */
|
|
19
|
+
skipInstall?: boolean;
|
|
20
|
+
/** Override the semver range written for @multiplatform.one/* deps. */
|
|
21
|
+
version?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function updateApp(options?: UpdateAppOptions): Promise<void>;
|
|
24
|
+
//# sourceMappingURL=updateApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateApp.d.ts","sourceRoot":"","sources":["../../src/commands/updateApp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAQH,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA2FD,wBAAsB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6J7E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate .vscode/launch.json and .vscode/tasks.json from discovered apps.
|
|
3
|
+
* Invoked by `mpo update` after merging upstream.
|
|
4
|
+
* Safe for subset projects: only includes configs for workspaces that exist.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateVscodeConfig(root: string): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=generateVscode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateVscode.d.ts","sourceRoot":"","sources":["../src/generateVscode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAwNH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBtE"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,CAAC"}
|
package/types/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC"}
|