@teispace/next-maker 3.0.3 → 3.0.4

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 (162) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/index.js +146 -146
  3. package/package.json +12 -10
  4. package/dist/build.d.ts +0 -1
  5. package/dist/src/commands/app.d.ts +0 -2
  6. package/dist/src/commands/component.d.ts +0 -2
  7. package/dist/src/commands/doctor.d.ts +0 -2
  8. package/dist/src/commands/env.d.ts +0 -2
  9. package/dist/src/commands/favicon.d.ts +0 -2
  10. package/dist/src/commands/feature.d.ts +0 -2
  11. package/dist/src/commands/hook.d.ts +0 -2
  12. package/dist/src/commands/index.d.ts +0 -2
  13. package/dist/src/commands/layout.d.ts +0 -2
  14. package/dist/src/commands/locale.d.ts +0 -2
  15. package/dist/src/commands/page.d.ts +0 -2
  16. package/dist/src/commands/provider.d.ts +0 -2
  17. package/dist/src/commands/remove.d.ts +0 -2
  18. package/dist/src/commands/service.d.ts +0 -2
  19. package/dist/src/commands/setup.d.ts +0 -2
  20. package/dist/src/commands/slice.d.ts +0 -2
  21. package/dist/src/commands/test.d.ts +0 -2
  22. package/dist/src/config/constants.d.ts +0 -0
  23. package/dist/src/config/errorHandlers.d.ts +0 -6
  24. package/dist/src/config/index.d.ts +0 -5
  25. package/dist/src/config/output.d.ts +0 -10
  26. package/dist/src/config/packages.d.ts +0 -25
  27. package/dist/src/config/path-safety.d.ts +0 -28
  28. package/dist/src/config/paths.d.ts +0 -93
  29. package/dist/src/config/spinner.d.ts +0 -11
  30. package/dist/src/config/utils.d.ts +0 -4
  31. package/dist/src/core/files.d.ts +0 -7
  32. package/dist/src/core/git.d.ts +0 -9
  33. package/dist/src/core/package-manager.d.ts +0 -11
  34. package/dist/src/detection/existence.checker.d.ts +0 -8
  35. package/dist/src/detection/index.d.ts +0 -3
  36. package/dist/src/detection/project.detector.d.ts +0 -14
  37. package/dist/src/generators/component.generator.d.ts +0 -8
  38. package/dist/src/generators/crud-service.generator.d.ts +0 -5
  39. package/dist/src/generators/feature.generator.d.ts +0 -6
  40. package/dist/src/generators/hook.generator.d.ts +0 -7
  41. package/dist/src/generators/index.d.ts +0 -19
  42. package/dist/src/generators/layout.generator.d.ts +0 -21
  43. package/dist/src/generators/locale.generator.d.ts +0 -9
  44. package/dist/src/generators/page.generator.d.ts +0 -9
  45. package/dist/src/generators/provider.generator.d.ts +0 -13
  46. package/dist/src/generators/service.generator.d.ts +0 -5
  47. package/dist/src/generators/slice.generator.d.ts +0 -10
  48. package/dist/src/generators/templates/barrel.template.d.ts +0 -11
  49. package/dist/src/generators/templates/component.template.d.ts +0 -4
  50. package/dist/src/generators/templates/crud-service.template.d.ts +0 -9
  51. package/dist/src/generators/templates/custom-hook.template.d.ts +0 -4
  52. package/dist/src/generators/templates/hook.template.d.ts +0 -8
  53. package/dist/src/generators/templates/layout.template.d.ts +0 -12
  54. package/dist/src/generators/templates/page.template.d.ts +0 -17
  55. package/dist/src/generators/templates/persist.template.d.ts +0 -5
  56. package/dist/src/generators/templates/provider.template.d.ts +0 -11
  57. package/dist/src/generators/templates/selectors.template.d.ts +0 -5
  58. package/dist/src/generators/templates/service.template.d.ts +0 -4
  59. package/dist/src/generators/templates/shared-component.template.d.ts +0 -9
  60. package/dist/src/generators/templates/slice.template.d.ts +0 -5
  61. package/dist/src/generators/templates/test.template.d.ts +0 -26
  62. package/dist/src/generators/templates/types.template.d.ts +0 -4
  63. package/dist/src/generators/test.generator.d.ts +0 -18
  64. package/dist/src/generators/types.d.ts +0 -18
  65. package/dist/src/index.d.ts +0 -1
  66. package/dist/src/manifests/bundle-analyzer.manifest.d.ts +0 -2
  67. package/dist/src/manifests/commitizen.manifest.d.ts +0 -2
  68. package/dist/src/manifests/dark-theme.manifest.d.ts +0 -2
  69. package/dist/src/manifests/http-client.manifest.d.ts +0 -2
  70. package/dist/src/manifests/i18n.manifest.d.ts +0 -2
  71. package/dist/src/manifests/index.d.ts +0 -23
  72. package/dist/src/manifests/react-compiler.manifest.d.ts +0 -2
  73. package/dist/src/manifests/redux.manifest.d.ts +0 -8
  74. package/dist/src/manifests/runner.d.ts +0 -36
  75. package/dist/src/manifests/security-headers.manifest.d.ts +0 -2
  76. package/dist/src/manifests/tests.manifest.d.ts +0 -2
  77. package/dist/src/manifests/transforms/next-config.d.ts +0 -24
  78. package/dist/src/manifests/transforms/unwrap-jsx.d.ts +0 -31
  79. package/dist/src/manifests/types.d.ts +0 -131
  80. package/dist/src/manifests/validate-scripts.manifest.d.ts +0 -2
  81. package/dist/src/manifests/ws.manifest.d.ts +0 -2
  82. package/dist/src/modifiers/api-registration.modifier.d.ts +0 -5
  83. package/dist/src/modifiers/app-paths.modifier.d.ts +0 -4
  84. package/dist/src/modifiers/crud-api-registration.modifier.d.ts +0 -4
  85. package/dist/src/modifiers/env-var.modifier.d.ts +0 -59
  86. package/dist/src/modifiers/helpers.d.ts +0 -13
  87. package/dist/src/modifiers/index.d.ts +0 -8
  88. package/dist/src/modifiers/root-provider.modifier.d.ts +0 -25
  89. package/dist/src/modifiers/root-reducer.modifier.d.ts +0 -6
  90. package/dist/src/modifiers/translation.modifier.d.ts +0 -4
  91. package/dist/src/modifiers/types.d.ts +0 -14
  92. package/dist/src/pipelines/feature.pipeline.d.ts +0 -13
  93. package/dist/src/pipelines/index.d.ts +0 -8
  94. package/dist/src/pipelines/runner.d.ts +0 -6
  95. package/dist/src/pipelines/service.pipeline.d.ts +0 -7
  96. package/dist/src/pipelines/slice.pipeline.d.ts +0 -8
  97. package/dist/src/pipelines/types.d.ts +0 -11
  98. package/dist/src/prompts/component.prompt.d.ts +0 -9
  99. package/dist/src/prompts/create-app.prompt.d.ts +0 -49
  100. package/dist/src/prompts/favicon.prompt.d.ts +0 -6
  101. package/dist/src/prompts/feature.prompt.d.ts +0 -10
  102. package/dist/src/prompts/hook.prompt.d.ts +0 -4
  103. package/dist/src/prompts/locale.prompt.d.ts +0 -12
  104. package/dist/src/prompts/page.prompt.d.ts +0 -12
  105. package/dist/src/prompts/service.prompt.d.ts +0 -6
  106. package/dist/src/prompts/slice.prompt.d.ts +0 -5
  107. package/dist/src/services/common/test-utils.d.ts +0 -11
  108. package/dist/src/services/favicon/css-colors.d.ts +0 -7
  109. package/dist/src/services/favicon/detect.d.ts +0 -15
  110. package/dist/src/services/favicon/encoders.d.ts +0 -22
  111. package/dist/src/services/favicon/index.d.ts +0 -6
  112. package/dist/src/services/favicon/manifest.d.ts +0 -24
  113. package/dist/src/services/favicon/pipeline.d.ts +0 -2
  114. package/dist/src/services/favicon/shapes.d.ts +0 -10
  115. package/dist/src/services/favicon/types.d.ts +0 -31
  116. package/dist/src/services/favicon/validate.d.ts +0 -10
  117. package/dist/src/services/init/cleanup/bundle-analyzer.cleanup.d.ts +0 -2
  118. package/dist/src/services/init/cleanup/dark-mode.cleanup.d.ts +0 -2
  119. package/dist/src/services/init/cleanup/http.cleanup.d.ts +0 -2
  120. package/dist/src/services/init/cleanup/i18n.cleanup.d.ts +0 -2
  121. package/dist/src/services/init/cleanup/index.d.ts +0 -2
  122. package/dist/src/services/init/cleanup/misc.cleanup.d.ts +0 -12
  123. package/dist/src/services/init/cleanup/react-compiler.cleanup.d.ts +0 -2
  124. package/dist/src/services/init/cleanup/redux.cleanup.d.ts +0 -2
  125. package/dist/src/services/init/cleanup/seo.cleanup.d.ts +0 -14
  126. package/dist/src/services/init/cleanup/tests.cleanup.d.ts +0 -2
  127. package/dist/src/services/init/cleanup/ws.cleanup.d.ts +0 -14
  128. package/dist/src/services/init/config.service.d.ts +0 -2
  129. package/dist/src/services/init/devtools.service.d.ts +0 -2
  130. package/dist/src/services/init/providers.service.d.ts +0 -3
  131. package/dist/src/services/init/template.service.d.ts +0 -1
  132. package/dist/src/services/setup/bundle-analyzer/index.d.ts +0 -1
  133. package/dist/src/services/setup/commitizen/index.d.ts +0 -2
  134. package/dist/src/services/setup/commitizen/package-modifier.d.ts +0 -16
  135. package/dist/src/services/setup/dark-theme/assets.d.ts +0 -3
  136. package/dist/src/services/setup/dark-theme/checks.d.ts +0 -5
  137. package/dist/src/services/setup/dark-theme/index.d.ts +0 -1
  138. package/dist/src/services/setup/dark-theme/injectors.d.ts +0 -4
  139. package/dist/src/services/setup/dark-theme/utils.d.ts +0 -1
  140. package/dist/src/services/setup/http-client/assets.d.ts +0 -4
  141. package/dist/src/services/setup/http-client/checks.d.ts +0 -7
  142. package/dist/src/services/setup/http-client/index.d.ts +0 -1
  143. package/dist/src/services/setup/http-client/injectors.d.ts +0 -97
  144. package/dist/src/services/setup/i18n/assets.d.ts +0 -3
  145. package/dist/src/services/setup/i18n/checks.d.ts +0 -5
  146. package/dist/src/services/setup/i18n/index.d.ts +0 -1
  147. package/dist/src/services/setup/i18n/injectors.d.ts +0 -5
  148. package/dist/src/services/setup/react-compiler/index.d.ts +0 -1
  149. package/dist/src/services/setup/redux/assets.d.ts +0 -4
  150. package/dist/src/services/setup/redux/checks.d.ts +0 -5
  151. package/dist/src/services/setup/redux/index.d.ts +0 -1
  152. package/dist/src/services/setup/redux/injectors.d.ts +0 -3
  153. package/dist/src/services/setup/security-headers/headers.d.ts +0 -28
  154. package/dist/src/services/setup/security-headers/index.d.ts +0 -2
  155. package/dist/src/services/setup/tests/index.d.ts +0 -1
  156. package/dist/src/services/setup/validate-scripts/index.d.ts +0 -3
  157. package/dist/src/services/setup/validate-scripts/package-modifier.d.ts +0 -18
  158. package/dist/src/services/setup/validate-scripts/scripts.d.ts +0 -11
  159. package/dist/src/services/setup/ws/assets.d.ts +0 -20
  160. package/dist/src/services/setup/ws/checks.d.ts +0 -17
  161. package/dist/src/services/setup/ws/index.d.ts +0 -20
  162. package/dist/src/services/setup/ws/injectors.d.ts +0 -56
@@ -1,49 +0,0 @@
1
- import type { PackageManager } from '../core/package-manager';
2
- /**
3
- * The opinionated production defaults `init --yes` ships. Mirrors the
4
- * "should I include X?" answer the prompt walkthrough would suggest as
5
- * `initial`/`default` for each question — every architecture feature ON,
6
- * the heavyweight integrations (Docker, GitHub Actions, bundle analyzer)
7
- * OFF. Users who want a leaner install run `next-maker remove <feature>`
8
- * after init.
9
- */
10
- export declare const defaultProjectAnswers: (initialName: string | undefined, overrides?: Partial<ProjectPrompts>) => ProjectPrompts;
11
- export interface ProjectPrompts {
12
- projectName: string;
13
- description: string;
14
- author: string;
15
- version: string;
16
- packageManager: PackageManager;
17
- gitRemote: string;
18
- pushToRemote: boolean;
19
- gitIssues: string;
20
- gitHomepage: string;
21
- httpClient: 'axios' | 'fetch' | 'both' | 'none';
22
- reactSecureStorage?: boolean;
23
- email: string;
24
- company: string;
25
- keepTemplates: boolean;
26
- darkMode: boolean;
27
- redux: boolean;
28
- /**
29
- * Include the WebSocket transport layer (`src/lib/utils/ws/` + `wsReducer`).
30
- * Requires Redux — if `redux: false`, this is forced to `false` regardless
31
- * of how it's set, because the WS bridge dispatches into the WS slice.
32
- */
33
- ws: boolean;
34
- i18n: boolean;
35
- communityFiles: string[];
36
- readme: boolean;
37
- docker: boolean;
38
- containerName?: string;
39
- imageName?: string;
40
- imageTag?: string;
41
- ci: boolean;
42
- preCommitHooks: boolean;
43
- commitizen: boolean;
44
- copyEnv: boolean;
45
- tests: boolean;
46
- reactCompiler: boolean;
47
- bundleAnalyzer: boolean;
48
- }
49
- export declare const promptForProjectDetails: (initialName?: string) => Promise<ProjectPrompts>;
@@ -1,6 +0,0 @@
1
- export interface FaviconPromptResult {
2
- source: string;
3
- }
4
- export declare const promptForFaviconSource: (presets?: {
5
- source?: string;
6
- }) => Promise<FaviconPromptResult>;
@@ -1,10 +0,0 @@
1
- export interface FeatureOptions {
2
- featureName: string;
3
- hasRedux: boolean;
4
- createStore: boolean;
5
- persistStore: boolean;
6
- httpClient: 'axios' | 'fetch' | 'both' | 'none';
7
- createService: boolean;
8
- selectedHttpClient?: 'axios' | 'fetch';
9
- }
10
- export declare const promptForFeatureDetails: (featureName?: string, hasRedux?: boolean, httpClient?: "axios" | "fetch" | "both" | "none", skipStore?: boolean, storeOption?: "persist" | "no-persist", skipService?: boolean, serviceClient?: "axios" | "fetch") => Promise<FeatureOptions>;
@@ -1,4 +0,0 @@
1
- export interface HookPromptResult {
2
- hookName: string;
3
- }
4
- export declare const promptForHookDetails: (name?: string) => Promise<HookPromptResult>;
@@ -1,12 +0,0 @@
1
- export interface LocalePromptResult {
2
- code: string;
3
- name: string;
4
- country: string;
5
- flag: string;
6
- copyTranslations: boolean;
7
- }
8
- export interface LocalePromptPresets {
9
- /** When set, the copy-translations prompt is skipped and this value is used. */
10
- copyTranslations?: boolean;
11
- }
12
- export declare const promptForLocaleDetails: (code?: string, presets?: LocalePromptPresets) => Promise<LocalePromptResult>;
@@ -1,12 +0,0 @@
1
- export interface PagePromptResult {
2
- pageName: string;
3
- withLoading: boolean;
4
- withError: boolean;
5
- }
6
- export interface PagePromptPresets {
7
- /** When set, the loading prompt is skipped and this value is used. */
8
- loading?: boolean;
9
- /** When set, the error prompt is skipped and this value is used. */
10
- error?: boolean;
11
- }
12
- export declare const promptForPageDetails: (name?: string, presets?: PagePromptPresets) => Promise<PagePromptResult>;
@@ -1,6 +0,0 @@
1
- interface ServiceOptions {
2
- serviceName: string;
3
- httpClient: 'axios' | 'fetch';
4
- }
5
- export declare const promptForServiceDetails: (name?: string, axiosFlag?: boolean, fetchFlag?: boolean, availableClients?: "axios" | "fetch" | "both" | "none") => Promise<ServiceOptions>;
6
- export {};
@@ -1,5 +0,0 @@
1
- export interface SliceOptions {
2
- sliceName: string;
3
- persistSlice: boolean;
4
- }
5
- export declare const promptForSliceDetails: (sliceName?: string, persist?: boolean) => Promise<SliceOptions>;
@@ -1,11 +0,0 @@
1
- export type TestUtilsFeatures = {
2
- redux: boolean;
3
- i18n: boolean;
4
- };
5
- /**
6
- * Emit `test/test-utils.tsx` tailored to the currently-enabled features.
7
- * Selected between four pre-baked variants so the output stays readable and
8
- * the cross-feature edge cases (redux-only / i18n-only / neither) produce
9
- * a file that actually type-checks.
10
- */
11
- export declare const writeTestUtils: (projectPath: string, features: TestUtilsFeatures) => Promise<void>;
@@ -1,7 +0,0 @@
1
- /**
2
- * Standard CSS named colors. Used to validate --bg before passing it to sharp,
3
- * which silently accepts unknown strings.
4
- *
5
- * Source: https://developer.mozilla.org/en-US/docs/Web/CSS/named-color
6
- */
7
- export declare const CSS_NAMED_COLORS: Set<string>;
@@ -1,15 +0,0 @@
1
- /**
2
- * Resolve the App Router directory for metadata files.
3
- * Prefers `src/app`, falls back to `app`. Returns absolute path.
4
- */
5
- export declare const detectAppDir: (projectPath: string) => Promise<string | null>;
6
- export interface PwaDetection {
7
- isPwa: boolean;
8
- /** Path to a static manifest file (json/webmanifest) if present in /public. */
9
- publicManifestPath?: string;
10
- /** Path to a typed `manifest.ts`/`manifest.tsx` in app dir if present. */
11
- appManifestPath?: string;
12
- /** Detected PWA framework, if any. */
13
- framework?: 'next-pwa' | '@ducanh2912/next-pwa' | '@serwist/next' | 'serwist';
14
- }
15
- export declare const detectPwa: (projectPath: string) => Promise<PwaDetection>;
@@ -1,22 +0,0 @@
1
- import sharp from 'sharp';
2
- import type { FaviconFit, FaviconShape } from './types';
3
- export interface RenderOptions {
4
- /** Pre-loaded source bytes — read once by the pipeline and reused per size. */
5
- sourceBuffer: Buffer;
6
- size: number;
7
- shape: FaviconShape;
8
- radiusPercent: number;
9
- bg: string;
10
- paddingPercent: number;
11
- fit: FaviconFit;
12
- /** PNG compression level mapped 1..100 → 9..0; lossless, affects file size only. */
13
- quality: number;
14
- /** When true, never apply shape clipping (used for ICO frames). */
15
- forceSquare?: boolean;
16
- }
17
- export declare const renderPng: (opts: RenderOptions) => Promise<Buffer>;
18
- export declare const flatColor: (color: string) => Promise<sharp.Color>;
19
- /**
20
- * Build a multi-size ICO from a set of source PNG buffers.
21
- */
22
- export declare const encodeIco: (frames: Buffer[]) => Promise<Buffer>;
@@ -1,6 +0,0 @@
1
- export type { PwaDetection } from './detect';
2
- export { detectAppDir, detectPwa } from './detect';
3
- export { runFavicon } from './pipeline';
4
- export { buildShapeMask } from './shapes';
5
- export type { FaviconFit, FaviconOptions, FaviconRunResult, FaviconShape, FaviconWriteResult, } from './types';
6
- export { isHexColor, parseSizes, validateSource } from './validate';
@@ -1,24 +0,0 @@
1
- export interface ManifestIcon {
2
- src: string;
3
- sizes: string;
4
- type: string;
5
- purpose?: string;
6
- }
7
- export declare const buildIconEntries: (publicPaths: {
8
- src: string;
9
- size: number;
10
- }[]) => ManifestIcon[];
11
- /**
12
- * Merge new icons into a JSON manifest, deduping by `src`. Returns the
13
- * formatted JSON string ready to write back.
14
- */
15
- export declare const patchJsonManifest: (manifestPath: string, icons: ManifestIcon[]) => Promise<string>;
16
- export declare const writeJsonManifest: (manifestPath: string, icons: ManifestIcon[]) => Promise<void>;
17
- /**
18
- * Render a snippet the user can paste into a typed `manifest.ts`.
19
- */
20
- export declare const renderManifestSnippet: (icons: ManifestIcon[]) => string;
21
- /**
22
- * Bootstrap a fresh `manifest.webmanifest` for projects without one.
23
- */
24
- export declare const buildBootstrapManifest: (appName: string, themeColor: string, icons: ManifestIcon[]) => string;
@@ -1,2 +0,0 @@
1
- import type { FaviconOptions, FaviconRunResult } from './types';
2
- export declare const runFavicon: (projectPath: string, options: FaviconOptions) => Promise<FaviconRunResult>;
@@ -1,10 +0,0 @@
1
- import type { FaviconShape } from './types';
2
- /**
3
- * Build an SVG mask (white shape on transparent) sized to `size` × `size`.
4
- * Used as a destIn composite over the resized source to clip it to the shape.
5
- */
6
- export declare const buildShapeMask: (shape: FaviconShape, size: number, radiusPercent: number) => string;
7
- /**
8
- * Build a flat-color background SVG of the given size.
9
- */
10
- export declare const buildBackground: (size: number, color: string) => string;
@@ -1,31 +0,0 @@
1
- export type FaviconShape = 'square' | 'rounded' | 'circle' | 'squircle';
2
- export type FaviconFit = 'contain' | 'cover' | 'clip';
3
- export interface FaviconOptions {
4
- source: string;
5
- outDir: string;
6
- force: boolean;
7
- dryRun: boolean;
8
- emitIcon: boolean;
9
- emitApple: boolean;
10
- emitOg: boolean;
11
- emitTwitter: boolean;
12
- ogSource?: string;
13
- pwa: boolean;
14
- pwaInit: boolean;
15
- shape: FaviconShape;
16
- radius: number;
17
- bg: string;
18
- padding: number;
19
- fit: FaviconFit;
20
- icoSizes: number[];
21
- quality: number;
22
- }
23
- export interface FaviconWriteResult {
24
- path: string;
25
- bytes: number;
26
- skipped?: boolean;
27
- }
28
- export interface FaviconRunResult {
29
- outputs: FaviconWriteResult[];
30
- pwaSnippet?: string;
31
- }
@@ -1,10 +0,0 @@
1
- export interface SourceInfo {
2
- absolutePath: string;
3
- ext: string;
4
- bytes: number;
5
- isVector: boolean;
6
- }
7
- export declare const validateSource: (source: string) => Promise<SourceInfo>;
8
- export declare const isHexColor: (value: string) => boolean;
9
- export declare const normalizeBg: (value: string) => string;
10
- export declare const parseSizes: (raw: string | undefined, fallback: number[]) => number[];
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupBundleAnalyzer: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupDarkMode: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupHttpClient: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupI18n: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupFeatures: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,12 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupSecureStorage: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
3
- export declare const cleanupLicense: (projectPath: string) => Promise<void>;
4
- export declare const cleanupChangelog: (projectPath: string) => Promise<void>;
5
- export declare const cleanupConfig: (projectPath: string) => Promise<void>;
6
- /**
7
- * Remove template-specific directories that should not ship in generated projects.
8
- * - .claude/ — Claude Code workspace config from the starter template
9
- * - docs/ — Starter template documentation (structure.md etc.)
10
- * - .vscode/ — IDE-specific settings from the starter
11
- */
12
- export declare const cleanupTemplateArtifacts: (projectPath: string) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupReactCompiler: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupRedux: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,14 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- /**
3
- * The template's `src/lib/config/seo.ts` and `src/app/sitemap.ts` import
4
- * `routing` from `@/i18n/routing` to compose locale-aware URLs. When the
5
- * user opts out of i18n, `src/i18n/` is deleted by `cleanupI18n` — but
6
- * these two files are outside the i18n manifest's footprint, so they
7
- * survive and then fail to compile.
8
- *
9
- * Rather than regex-transform the originals (brittle against template
10
- * drift), we overwrite both with intl-free versions that keep the same
11
- * public surface: `generateSEOMetadata({ title, description, path, image,
12
- * noIndex })` still works for any generated page that calls it.
13
- */
14
- export declare const cleanupSEO: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- export declare const cleanupTests: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,14 +0,0 @@
1
- import type { ProjectPrompts } from '../../../prompts/create-app.prompt';
2
- /**
3
- * Cleanup applied when the user opts OUT of WebSocket support at `init`.
4
- *
5
- * The template ships the WS layer fully wired (ws/ subtree, slice, reducer
6
- * registration in rootReducer, bridge mount in StoreProvider). Without
7
- * cleanup, opting out leaves dangling imports that break `yarn build`.
8
- *
9
- * Ordering note: this MUST run before `cleanupRedux`. When both are off,
10
- * `cleanupRedux` nukes the entire `src/store/` directory; our surgical
11
- * edits to `rootReducer.ts` would be wasted work (though harmless). The
12
- * `if (answers.redux)` guards below short-circuit those edits cleanly.
13
- */
14
- export declare const cleanupWs: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../prompts/create-app.prompt';
2
- export declare const configurePackageJson: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import type { ProjectPrompts } from '../../prompts/create-app.prompt';
2
- export declare const setupDevTools: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1,3 +0,0 @@
1
- import type { ProjectPrompts } from '../../prompts/create-app.prompt';
2
- export declare const generateRootProvider: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
3
- export declare const generateLayout: (projectPath: string, answers: ProjectPrompts) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const cloneTemplate: (projectPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const setupBundleAnalyzer: (projectPath: string) => Promise<void>;
@@ -1,2 +0,0 @@
1
- export { addCommitizen, missingCommitizenDeps, type PackageJsonShape, } from './package-modifier';
2
- export declare const setupCommitizen: (projectPath: string) => Promise<void>;
@@ -1,16 +0,0 @@
1
- /**
2
- * Pure JSON modifier for Commitizen retrofit. Kept separate from the service
3
- * so it can be unit-tested with no filesystem.
4
- */
5
- export interface PackageJsonShape {
6
- scripts?: Record<string, string>;
7
- devDependencies?: Record<string, string>;
8
- config?: Record<string, unknown> & {
9
- commitizen?: {
10
- path: string;
11
- };
12
- };
13
- [key: string]: unknown;
14
- }
15
- export declare const addCommitizen: (pkg: PackageJsonShape) => PackageJsonShape;
16
- export declare const missingCommitizenDeps: (pkg: PackageJsonShape) => string[];
@@ -1,3 +0,0 @@
1
- import type { Ora } from 'ora';
2
- export declare const fetchAssets: (tempDir: string, spinner: Ora) => Promise<void>;
3
- export declare const copyThemeProvider: (projectPath: string, tempDir: string) => Promise<void>;
@@ -1,5 +0,0 @@
1
- export declare const checkIsAlreadySetup: (projectPath: string) => Promise<{
2
- isSetup: boolean;
3
- reason: string;
4
- }>;
5
- export declare const validateProjectStructure: (projectPath: string) => Promise<string>;
@@ -1 +0,0 @@
1
- export declare const setupDarkTheme: (projectPath: string) => Promise<void>;
@@ -1,4 +0,0 @@
1
- export declare const updateProvidersIndex: (projectPath: string) => Promise<void>;
2
- export declare const updateRootProvider: (projectPath: string) => Promise<void>;
3
- export declare const updateGlobalsCss: (projectPath: string, tempDir: string) => Promise<void>;
4
- export declare const updateLayout: (layoutPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const findLayoutPath: (projectPath: string) => Promise<string>;
@@ -1,4 +0,0 @@
1
- import type { Ora } from 'ora';
2
- export declare const fetchAssets: (tempDir: string, spinner: Ora) => Promise<void>;
3
- export declare const copyHttpClientFiles: (projectPath: string, tempDir: string, clients: ("fetch" | "axios")[], removeClients?: ("fetch" | "axios")[]) => Promise<void>;
4
- export declare const performFullCleanup: (projectPath: string) => Promise<void>;
@@ -1,7 +0,0 @@
1
- export type HttpClientType = 'fetch' | 'axios' | 'none' | 'both';
2
- export interface HttpClientSetupStatus {
3
- status: HttpClientType;
4
- reason?: string;
5
- }
6
- export declare const checkIsAlreadySetup: (projectPath: string) => Promise<HttpClientSetupStatus>;
7
- export declare const validateProjectStructure: (projectPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const setupHttpClient: (projectPath: string) => Promise<void>;
@@ -1,97 +0,0 @@
1
- export declare const updateHttpIndex: (projectPath: string, clients: ("fetch" | "axios")[]) => Promise<void>;
2
- export declare const updateUtilsIndex: (projectPath: string) => Promise<void>;
3
- export declare const updateTypesIndex: (projectPath: string) => Promise<void>;
4
- export declare const updateConfigIndex: (projectPath: string) => Promise<void>;
5
- export declare const cleanupHttpTypes: (projectPath: string, clients: ("fetch" | "axios")[]) => Promise<void>;
6
- /**
7
- * Migrate all HTTP client import and usage patterns when replacing one client with another
8
- * Example: fetch -> axios will replace all fetchClient imports/usages with axiosClient
9
- */
10
- export declare const migrateClientUsages: (projectPath: string, fromClient: "fetch" | "axios", toClient: "fetch" | "axios") => Promise<void>;
11
- /**
12
- * Find the layout file that should host the bundle sentinel — `[locale]/layout.tsx`
13
- * when i18n is installed, falling back to the non-i18n root `src/app/layout.tsx`.
14
- * Returns `null` if neither exists (the project structure is unexpected;
15
- * callers warn rather than fail).
16
- */
17
- export declare const resolveBundleSentinelLayoutPath: (projectPath: string) => string | null;
18
- /**
19
- * Mount `<HttpClientBundleSentinel />` as the first child of `<RootProvider>`
20
- * in the relevant layout file, plus add the import at the bottom of the
21
- * import block. Idempotent — re-running is a no-op.
22
- *
23
- * The sentinel itself is a `'use client'` component that imports every
24
- * public symbol from `@/lib/utils/http`. If anyone later regresses the
25
- * server/universal split, the build fails immediately. See
26
- * `src/lib/utils/http/__bundle-sentinel__/client-bundle-sentinel.tsx`.
27
- */
28
- export declare const injectBundleSentinel: (content: string) => string;
29
- /**
30
- * Reverse of `injectBundleSentinel`. Strips the import + (optional preceding
31
- * comment) + JSX line. Idempotent.
32
- *
33
- * Anchored on **stable code tokens** — the import path and the JSX tag name —
34
- * not on the comment wording. If the template's comment text drifts upstream,
35
- * strip still removes the line. The comment is also dropped *only when it
36
- * immediately precedes the matching import*, so we don't accidentally remove
37
- * an unrelated user comment that mentions "Regression sentinel".
38
- */
39
- export declare const stripBundleSentinel: (content: string) => string;
40
- /**
41
- * Filesystem-bound wrappers for the two pure helpers. Reads the resolved
42
- * layout file, applies the transform, writes back only when something changed.
43
- */
44
- export declare const installBundleSentinelMount: (projectPath: string) => Promise<void>;
45
- export declare const removeBundleSentinelMount: (projectPath: string) => Promise<void>;
46
- export declare const removeHttpExports: (projectPath: string) => Promise<void>;
47
- /**
48
- * Check if a file or module is used in the project
49
- * @param projectPath Root project path
50
- * @param importPath Import path to search for (e.g., '@/lib/config/app-apis' or 'app-apis')
51
- * @param excludePaths Array of absolute paths to exclude from search results
52
- */
53
- export declare const isFileUsed: (projectPath: string, importPath: string, excludePaths?: string[]) => Promise<boolean>;
54
- /**
55
- * Check if a specific string (symbol, class name, etc.) is present in the project files
56
- * @param projectPath Root project path
57
- * @param searchString String to search for
58
- * @param excludePaths Array of absolute paths to exclude from search results
59
- */
60
- export declare const isStringUsed: (projectPath: string, searchString: string, excludePaths?: string[]) => Promise<boolean>;
61
- /**
62
- * Rewrite the sentinel's import list to match the active client variants.
63
- *
64
- * The template ships the sentinel hardcoded to import BOTH axios and fetch
65
- * symbols from `@/lib/utils/http`. When `setup --http-client` strips one
66
- * variant (e.g. user picks fetch only), the universal entry no longer
67
- * exports the axios symbols and the sentinel fails to build. This helper
68
- * keeps the sentinel honest: only references symbols that actually exist
69
- * at the universal entry.
70
- *
71
- * Idempotent — running on an already-correct sentinel is a no-op.
72
- *
73
- * `toSearchParams` is always present (lives in `shared/`, not in either
74
- * client variant), so it's emitted regardless. When `clients` is empty,
75
- * the sentinel is no longer meaningful, but this helper still produces
76
- * a valid TSX file (the caller is responsible for removing the mount).
77
- */
78
- export declare const rewriteSentinelImports: (projectPath: string, clients: ("fetch" | "axios")[]) => Promise<void>;
79
- /**
80
- * Rewrite `src/lib/utils/http/server.ts` so it only imports/instantiates the
81
- * client variants the project actually has on disk.
82
- *
83
- * The template ships server.ts with both axios and fetch unconditionally
84
- * imported, instantiated, and re-exported. When `setup --http-client`
85
- * removes one variant, its `./axios-client` or `./fetch-client` directory
86
- * is gone — the universal `index.ts` is already aware of this (via
87
- * `updateHttpIndex`), but `server.ts` keeps the dangling import and the
88
- * `yarn build` typecheck fails with "Cannot find module".
89
- *
90
- * Strategy: regex-strip the variant-specific blocks (import, instantiation,
91
- * re-export) for the client(s) NOT in the active set. Idempotent — running
92
- * on an already-correct server.ts is a no-op.
93
- *
94
- * When `clients` is empty the server entry should already be deleted by
95
- * the caller; this helper is a no-op in that case.
96
- */
97
- export declare const rewriteServerEntryImports: (projectPath: string, clients: ("fetch" | "axios")[]) => Promise<void>;
@@ -1,3 +0,0 @@
1
- import type { Ora } from 'ora';
2
- export declare const fetchAssets: (tempDir: string, spinner: Ora) => Promise<void>;
3
- export declare const copyI18nFiles: (projectPath: string, tempDir: string) => Promise<void>;
@@ -1,5 +0,0 @@
1
- export declare const checkIsAlreadySetup: (projectPath: string) => Promise<{
2
- isSetup: boolean;
3
- reason: string;
4
- }>;
5
- export declare const validateProjectStructure: (projectPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const setupI18n: (projectPath: string) => Promise<void>;
@@ -1,5 +0,0 @@
1
- export declare const updateNextConfig: (projectPath: string) => Promise<void>;
2
- export declare const updateTypesIndex: (projectPath: string) => Promise<void>;
3
- export declare const updateConfigIndex: (projectPath: string) => Promise<void>;
4
- export declare const updateRootProvider: (projectPath: string) => Promise<void>;
5
- export declare const migrateToLocaleStructure: (projectPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const setupReactCompiler: (projectPath: string) => Promise<void>;
@@ -1,4 +0,0 @@
1
- import type { Ora } from 'ora';
2
- export declare const fetchAssets: (tempDir: string, spinner: Ora) => Promise<void>;
3
- export declare const copyReduxFiles: (projectPath: string, tempDir: string) => Promise<void>;
4
- export declare const createCounterFeature: (projectPath: string, tempDir: string) => Promise<void>;
@@ -1,5 +0,0 @@
1
- export declare const checkIsAlreadySetup: (projectPath: string) => Promise<{
2
- isSetup: boolean;
3
- reason: string;
4
- }>;
5
- export declare const validateProjectStructure: (projectPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const setupRedux: (projectPath: string) => Promise<void>;
@@ -1,3 +0,0 @@
1
- export declare const updateProvidersIndex: (_projectPath: string) => Promise<void>;
2
- export declare const updateRootProvider: (projectPath: string) => Promise<void>;
3
- export declare const updatePage: (projectPath: string) => Promise<void>;
@@ -1,28 +0,0 @@
1
- /**
2
- * Pure transformation logic for the `setupSecurityHeaders` retrofit.
3
- *
4
- * Kept separate from `index.ts` so it can be unit-tested with string inputs
5
- * without touching the filesystem.
6
- */
7
- /**
8
- * The header set the starter ships in `next.config.ts`. Single source of truth
9
- * — `setupSecurityHeaders` and the manifest (D1) both consume this list.
10
- */
11
- export declare const SECURITY_HEADERS: ReadonlyArray<{
12
- key: string;
13
- value: string;
14
- }>;
15
- export declare const hasSecurityHeaders: (content: string) => boolean;
16
- /**
17
- * Inject the standard security-headers block into a `next.config.ts` source.
18
- *
19
- * - Idempotent: returns the input unchanged if a `headers:` key already exists
20
- * anywhere in the file (we never overwrite a user-defined header set).
21
- * - Throws if the canonical `const nextConfig: NextConfig = {` shape is missing
22
- * — same contract as the React-Compiler retrofit, so behaviour stays
23
- * predictable across `setup` services.
24
- */
25
- export declare const injectSecurityHeaders: (content: string, headers?: ReadonlyArray<{
26
- key: string;
27
- value: string;
28
- }>) => string;
@@ -1,2 +0,0 @@
1
- export { hasSecurityHeaders, injectSecurityHeaders, SECURITY_HEADERS } from './headers';
2
- export declare const setupSecurityHeaders: (projectPath: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const setupTests: (projectPath: string) => Promise<void>;