@teispace/next-maker 2.0.0 → 2.1.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/CHANGELOG.md +20 -0
- package/README.md +23 -7
- package/dist/index.js +342 -200
- package/dist/index.js.map +4 -4
- package/dist/src/commands/setup.d.ts.map +1 -1
- package/dist/src/config/paths.d.ts +10 -0
- package/dist/src/config/paths.d.ts.map +1 -1
- package/dist/src/detection/project.detector.d.ts +7 -0
- package/dist/src/detection/project.detector.d.ts.map +1 -1
- package/dist/src/manifests/http-client.manifest.d.ts.map +1 -1
- package/dist/src/manifests/index.d.ts +2 -1
- package/dist/src/manifests/index.d.ts.map +1 -1
- package/dist/src/manifests/ws.manifest.d.ts +3 -0
- package/dist/src/manifests/ws.manifest.d.ts.map +1 -0
- package/dist/src/prompts/create-app.prompt.d.ts +6 -0
- package/dist/src/prompts/create-app.prompt.d.ts.map +1 -1
- package/dist/src/services/init/cleanup/http.cleanup.d.ts.map +1 -1
- package/dist/src/services/init/cleanup/index.d.ts.map +1 -1
- package/dist/src/services/init/cleanup/seo.cleanup.d.ts +15 -0
- package/dist/src/services/init/cleanup/seo.cleanup.d.ts.map +1 -0
- package/dist/src/services/init/cleanup/ws.cleanup.d.ts +15 -0
- package/dist/src/services/init/cleanup/ws.cleanup.d.ts.map +1 -0
- package/dist/src/services/init/providers.service.d.ts.map +1 -1
- package/dist/src/services/setup/http-client/assets.d.ts.map +1 -1
- package/dist/src/services/setup/http-client/index.d.ts.map +1 -1
- package/dist/src/services/setup/http-client/injectors.d.ts +72 -0
- package/dist/src/services/setup/http-client/injectors.d.ts.map +1 -1
- package/dist/src/services/setup/ws/assets.d.ts +21 -0
- package/dist/src/services/setup/ws/assets.d.ts.map +1 -0
- package/dist/src/services/setup/ws/checks.d.ts +18 -0
- package/dist/src/services/setup/ws/checks.d.ts.map +1 -0
- package/dist/src/services/setup/ws/index.d.ts +21 -0
- package/dist/src/services/setup/ws/index.d.ts.map +1 -0
- package/dist/src/services/setup/ws/injectors.d.ts +57 -0
- package/dist/src/services/setup/ws/injectors.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/commands/setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/commands/setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgCzC,eAAO,MAAM,oBAAoB,GAAI,SAAS,OAAO,SA2GpD,CAAC"}
|
|
@@ -38,11 +38,20 @@ export declare const PROJECT_PATHS: {
|
|
|
38
38
|
readonly CONFIG_INDEX: "src/lib/config/index.ts";
|
|
39
39
|
readonly CONSTANTS: "src/lib/config/constants.ts";
|
|
40
40
|
readonly APP_LOCALES: "src/lib/config/app-locales.ts";
|
|
41
|
+
readonly SEO_FILE: "src/lib/config/seo.ts";
|
|
42
|
+
readonly SITEMAP_FILE: "src/app/sitemap.ts";
|
|
41
43
|
readonly MIDDLEWARE: "src/middleware.ts";
|
|
42
44
|
readonly PROXY: "src/proxy.ts";
|
|
43
45
|
readonly I18N_TYPES: "src/types/i18n.ts";
|
|
44
46
|
readonly HTTP_UTILS: "src/lib/utils/http";
|
|
45
47
|
readonly HTTP_SHARED: "src/lib/utils/http/shared";
|
|
48
|
+
readonly HTTP_SERVER_FILE: "src/lib/utils/http/server.ts";
|
|
49
|
+
readonly HTTP_BUNDLE_SENTINEL_DIR: "src/lib/utils/http/__bundle-sentinel__";
|
|
50
|
+
readonly HTTP_BUNDLE_SENTINEL_FILE: "src/lib/utils/http/__bundle-sentinel__/client-bundle-sentinel.tsx";
|
|
51
|
+
readonly WS_UTILS: "src/lib/utils/ws";
|
|
52
|
+
readonly WS_SLICE_FILE: "src/store/slices/ws.slice.ts";
|
|
53
|
+
readonly ROOT_REDUCER: "src/store/rootReducer.ts";
|
|
54
|
+
readonly TEST_SETUP_FILE: "test/setup.ts";
|
|
46
55
|
readonly AXIOS_CLIENT: "src/lib/utils/http/axios-client";
|
|
47
56
|
readonly FETCH_CLIENT: "src/lib/utils/http/fetch-client";
|
|
48
57
|
readonly AXIOS_CLIENT_FILE: "src/lib/utils/http/axios-client/index.ts";
|
|
@@ -64,6 +73,7 @@ export declare const PROJECT_PATHS: {
|
|
|
64
73
|
readonly THEME_PROVIDER: "src/providers/CustomThemeProvider.tsx";
|
|
65
74
|
readonly COUNTER_COMPONENT: "src/features/counter/components/Counter.tsx";
|
|
66
75
|
readonly LOCALE_PAGE: "src/app/[locale]/page.tsx";
|
|
76
|
+
readonly LOCALE_LAYOUT: "src/app/[locale]/layout.tsx";
|
|
67
77
|
readonly COMMITLINT_CONFIG: "commitlint.config.mjs";
|
|
68
78
|
readonly LINTSTAGED_RC: ".lintstagedrc.mjs";
|
|
69
79
|
readonly CZRC: ".czrc";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/config/paths.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/config/paths.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2GhB,CAAC"}
|
|
@@ -3,6 +3,13 @@ export interface ProjectDetection {
|
|
|
3
3
|
httpClient: 'axios' | 'fetch' | 'both' | 'none';
|
|
4
4
|
hasI18n: boolean;
|
|
5
5
|
hasTests: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* `'present'` when both the `socket.io-client` dependency and the
|
|
8
|
+
* `src/lib/utils/ws/` directory exist. The dual signal mirrors httpClient
|
|
9
|
+
* — a stray dep without the directory (or vice-versa) is reported as
|
|
10
|
+
* `'none'` so doctor's "is this feature installed?" check stays honest.
|
|
11
|
+
*/
|
|
12
|
+
ws: 'none' | 'present';
|
|
6
13
|
}
|
|
7
14
|
export declare const detectProjectSetup: (projectPath: string) => Promise<ProjectDetection>;
|
|
8
15
|
//# sourceMappingURL=project.detector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.detector.d.ts","sourceRoot":"","sources":["../../../src/detection/project.detector.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"project.detector.d.ts","sourceRoot":"","sources":["../../../src/detection/project.detector.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,kBAAkB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,gBAAgB,CAyEtF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.manifest.d.ts","sourceRoot":"","sources":["../../../src/manifests/http-client.manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-client.manifest.d.ts","sourceRoot":"","sources":["../../../src/manifests/http-client.manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI/C,eAAO,MAAM,kBAAkB,EAAE,eAqEhC,CAAC"}
|
|
@@ -13,11 +13,12 @@ import { securityHeadersManifest } from './security-headers.manifest';
|
|
|
13
13
|
import { testsManifest } from './tests.manifest';
|
|
14
14
|
import type { FeatureManifest } from './types';
|
|
15
15
|
import { validateScriptsManifest } from './validate-scripts.manifest';
|
|
16
|
+
import { wsManifest } from './ws.manifest';
|
|
16
17
|
export type { RemoveSummary } from './runner';
|
|
17
18
|
export { checkManifest, reverseManifest } from './runner';
|
|
18
19
|
export type { CodeBlockRequirement, DepKind, FeatureCheckResult, FeatureFinding, FeatureManifest, FileRequirement, PackageRequirement, ScriptRequirement, } from './types';
|
|
19
20
|
/** Ordered for sensible doctor output: simple/visible features first. */
|
|
20
21
|
export declare const MANIFESTS: ReadonlyArray<FeatureManifest>;
|
|
21
22
|
export declare const getManifest: (id: string) => FeatureManifest | undefined;
|
|
22
|
-
export { bundleAnalyzerManifest, commitizenManifest, darkThemeManifest, httpClientManifest, i18nManifest, reactCompilerManifest, reduxManifest, securityHeadersManifest, testsManifest, validateScriptsManifest, };
|
|
23
|
+
export { bundleAnalyzerManifest, commitizenManifest, darkThemeManifest, httpClientManifest, i18nManifest, reactCompilerManifest, reduxManifest, securityHeadersManifest, testsManifest, validateScriptsManifest, wsManifest, };
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/manifests/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAA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kBAAkB,EAClB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,yEAAyE;AACzE,eAAO,MAAM,SAAS,EAAE,aAAa,CAAC,eAAe,CAepD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,IAAI,MAAM,KAAG,eAAe,GAAG,SACvB,CAAC;AAErC,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACvB,UAAU,GACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws.manifest.d.ts","sourceRoot":"","sources":["../../../src/manifests/ws.manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAwB/C,eAAO,MAAM,UAAU,EAAE,eA4CxB,CAAC"}
|
|
@@ -25,6 +25,12 @@ export interface ProjectPrompts {
|
|
|
25
25
|
keepTemplates: boolean;
|
|
26
26
|
darkMode: boolean;
|
|
27
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;
|
|
28
34
|
i18n: boolean;
|
|
29
35
|
communityFiles: string[];
|
|
30
36
|
readme: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-app.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/create-app.prompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAQ9D;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,GAAG,SAAS,EAC/B,YAAW,OAAO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B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,uBAAuB,GAAU,cAAc,MAAM,KAAG,OAAO,CAAC,cAAc,CA0S1F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.cleanup.d.ts","sourceRoot":"","sources":["../../../../../src/services/init/cleanup/http.cleanup.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"http.cleanup.d.ts","sourceRoot":"","sources":["../../../../../src/services/init/cleanup/http.cleanup.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAQzE,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,EACnB,SAAS,cAAc,KACtB,OAAO,CAAC,IAAI,CAyBd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/init/cleanup/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/init/cleanup/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAmBzE,eAAO,MAAM,eAAe,GAC1B,aAAa,MAAM,EACnB,SAAS,cAAc,KACtB,OAAO,CAAC,IAAI,CAoCd,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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>;
|
|
15
|
+
//# sourceMappingURL=seo.cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seo.cleanup.d.ts","sourceRoot":"","sources":["../../../../../src/services/init/cleanup/seo.cleanup.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,GAAU,aAAa,MAAM,EAAE,SAAS,cAAc,KAAG,OAAO,CAAC,IAAI,CAY3F,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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>;
|
|
15
|
+
//# sourceMappingURL=ws.cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws.cleanup.d.ts","sourceRoot":"","sources":["../../../../../src/services/init/cleanup/ws.cleanup.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGzE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,GAAU,aAAa,MAAM,EAAE,SAAS,cAAc,KAAG,OAAO,CAAC,IAAI,CAmB1F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.service.d.ts","sourceRoot":"","sources":["../../../../src/services/init/providers.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,eAAO,MAAM,oBAAoB,GAC/B,aAAa,MAAM,EACnB,SAAS,cAAc,KACtB,OAAO,CAAC,IAAI,CAiFd,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,aAAa,MAAM,EACnB,SAAS,cAAc,KACtB,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"providers.service.d.ts","sourceRoot":"","sources":["../../../../src/services/init/providers.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,eAAO,MAAM,oBAAoB,GAC/B,aAAa,MAAM,EACnB,SAAS,cAAc,KACtB,OAAO,CAAC,IAAI,CAiFd,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,aAAa,MAAM,EACnB,SAAS,cAAc,KACtB,OAAO,CAAC,IAAI,CAgEd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/http-client/assets.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI/B,eAAO,MAAM,WAAW,GAAU,SAAS,MAAM,EAAE,SAAS,GAAG,KAAG,OAAO,CAAC,IAAI,CAQ7E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,EACnB,SAAS,MAAM,EACf,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,EAC9B,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,KACpC,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/http-client/assets.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI/B,eAAO,MAAM,WAAW,GAAU,SAAS,MAAM,EAAE,SAAS,GAAG,KAAG,OAAO,CAAC,IAAI,CAQ7E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,EACnB,SAAS,MAAM,EACf,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,EAC9B,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,KACpC,OAAO,CAAC,IAAI,CAkJd,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CA2G1E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/http-client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/http-client/index.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,eAAe,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CA2JvE,CAAC"}
|
|
@@ -8,6 +8,41 @@ export declare const cleanupHttpTypes: (projectPath: string, clients: ("fetch" |
|
|
|
8
8
|
* Example: fetch -> axios will replace all fetchClient imports/usages with axiosClient
|
|
9
9
|
*/
|
|
10
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>;
|
|
11
46
|
export declare const removeHttpExports: (projectPath: string) => Promise<void>;
|
|
12
47
|
/**
|
|
13
48
|
* Check if a file or module is used in the project
|
|
@@ -23,4 +58,41 @@ export declare const isFileUsed: (projectPath: string, importPath: string, exclu
|
|
|
23
58
|
* @param excludePaths Array of absolute paths to exclude from search results
|
|
24
59
|
*/
|
|
25
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>;
|
|
26
98
|
//# sourceMappingURL=injectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injectors.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/http-client/injectors.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,GAC1B,aAAa,MAAM,EACnB,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,KAC7B,OAAO,CAAC,IAAI,CAmBd,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CASxE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CAYxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CASzE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,aAAa,MAAM,EACnB,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,KAC7B,OAAO,CAAC,IAAI,CAkBd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,EACnB,YAAY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**
|
|
4
|
+
* Copy the entire WS subtree + the connection-state slice. The subtree is
|
|
5
|
+
* package-managed code (not a user-edit surface) so it's always overwritten.
|
|
6
|
+
*
|
|
7
|
+
* `keepTests=false` strips `*.test.ts(x)` files and the `__test-utils__/`
|
|
8
|
+
* helper directory so projects without vitest don't carry dead test files.
|
|
9
|
+
* The strip is applied AFTER the recursive copy because cherry-picking files
|
|
10
|
+
* with `fs.cp` filters is awkward and slow on this small a tree.
|
|
11
|
+
*/
|
|
12
|
+
export declare const copyWsFiles: (projectPath: string, tempDir: string, options: {
|
|
13
|
+
keepTests: boolean;
|
|
14
|
+
}) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Walk the copied ws/ tree and remove `*.test.ts`, `*.test.tsx`, and the
|
|
17
|
+
* `__test-utils__/` directory. Used when the project doesn't have vitest —
|
|
18
|
+
* orphan test files generate IDE noise and never run.
|
|
19
|
+
*/
|
|
20
|
+
export declare const stripWsTestArtifacts: (wsRoot: string) => Promise<void>;
|
|
21
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/ws/assets.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI/B,eAAO,MAAM,WAAW,GAAU,SAAS,MAAM,EAAE,SAAS,GAAG,KAAG,OAAO,CAAC,IAAI,CAQ7E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GACtB,aAAa,MAAM,EACnB,SAAS,MAAM,EACf,SAAS;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,KAC9B,OAAO,CAAC,IAAI,CAed,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CAiBvE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type WsSetupStatus = {
|
|
2
|
+
isSetup: boolean;
|
|
3
|
+
reason?: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Reports `isSetup: true` when the ws directory is already on disk —
|
|
7
|
+
* matches the dual-signal check `detectProjectSetup` uses, but doesn't
|
|
8
|
+
* require the dep to be resolved (the setup service installs the dep
|
|
9
|
+
* itself, so we don't want to gate on it).
|
|
10
|
+
*/
|
|
11
|
+
export declare const checkIsAlreadySetup: (projectPath: string) => Promise<WsSetupStatus>;
|
|
12
|
+
/**
|
|
13
|
+
* WS layer depends on Redux: the bridge dispatches into `wsReducer`, and
|
|
14
|
+
* `src/store/rootReducer.ts` is the file we register the reducer in. Fail
|
|
15
|
+
* loud before any files are copied so the user can run `setup --redux` first.
|
|
16
|
+
*/
|
|
17
|
+
export declare const validateProjectStructure: (projectPath: string) => Promise<void>;
|
|
18
|
+
//# sourceMappingURL=checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/ws/checks.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,aAAa,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,aAAa,CAMpF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CAwBhF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set up the WebSocket transport layer in an existing project.
|
|
3
|
+
*
|
|
4
|
+
* Pre-requisites validated up front: Redux must be installed (the bridge
|
|
5
|
+
* dispatches into a Redux slice). On a fresh install the orchestrator
|
|
6
|
+
* fails fast with guidance to run `setup --redux` first rather than
|
|
7
|
+
* leaving a half-applied state.
|
|
8
|
+
*
|
|
9
|
+
* Steps:
|
|
10
|
+
* 1. pre-check (skip if ws/ already exists)
|
|
11
|
+
* 2. validate Redux is present
|
|
12
|
+
* 3. degit the starter into a tempdir
|
|
13
|
+
* 4. copy ws/ subtree + wsReducer slice (strip *.test.ts when no vitest)
|
|
14
|
+
* 5. wire wsReducer into rootReducer (no persist — connection state is ephemeral)
|
|
15
|
+
* 6. mount attachWsBridge inside StoreProvider's useEffect
|
|
16
|
+
* 7. ensure test/setup.ts has the react-secure-storage + server-only mocks
|
|
17
|
+
* 8. install socket.io-client (pinned to ^4.8.3 — backend protocol match)
|
|
18
|
+
* 9. format via `lint:fix`
|
|
19
|
+
*/
|
|
20
|
+
export declare const setupWs: (projectPath: string) => Promise<void>;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/ws/index.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,OAAO,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CA2D/D,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register `wsReducer` in `src/store/rootReducer.ts` WITHOUT wrapping it in
|
|
3
|
+
* `persistReducer` — connection state is ephemeral and rehydrating it would
|
|
4
|
+
* lie about the actual transport. Delegates to the existing root-reducer
|
|
5
|
+
* modifier; passing `persist: false` produces the same shape the template ships.
|
|
6
|
+
*/
|
|
7
|
+
export declare const registerWsReducer: (projectPath: string) => Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Pure helper: insert the `attachWsBridge` import + useEffect block into a
|
|
10
|
+
* StoreProvider.tsx source string. Idempotent — bails when the import is
|
|
11
|
+
* already present.
|
|
12
|
+
*
|
|
13
|
+
* The bridge effect mounts immediately after the `if (!storeRef.current) {...}`
|
|
14
|
+
* initialiser, matching the template. We anchor on the closing brace of that
|
|
15
|
+
* block to preserve any pre-existing effects further down (a user may have
|
|
16
|
+
* added unrelated mount logic).
|
|
17
|
+
*/
|
|
18
|
+
export declare const injectBridgeMount: (content: string) => string;
|
|
19
|
+
/**
|
|
20
|
+
* Reverse of `injectBridgeMount`. Drops the import + effect block, and also
|
|
21
|
+
* prunes `useEffect` from the React import when no other `useEffect(` call
|
|
22
|
+
* survives (so we don't leave an unused-import lint error).
|
|
23
|
+
*
|
|
24
|
+
* Anchored on **stable code tokens** — the import path `@/lib/utils/ws` and
|
|
25
|
+
* the function name `attachWsBridge` — not the comment wording. Upstream
|
|
26
|
+
* comment drift won't silently break strip.
|
|
27
|
+
*/
|
|
28
|
+
export declare const stripBridgeMount: (content: string) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Filesystem-bound install/strip pair.
|
|
31
|
+
*/
|
|
32
|
+
export declare const installBridgeMount: (projectPath: string) => Promise<void>;
|
|
33
|
+
export declare const removeBridgeMount: (projectPath: string) => Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Append `react-secure-storage` and `server-only` mocks to `test/setup.ts`
|
|
36
|
+
* if either is missing. The template ships them by default; this helper
|
|
37
|
+
* covers the case where the user has customised setup.ts after init.
|
|
38
|
+
*
|
|
39
|
+
* No-op when `test/setup.ts` doesn't exist (vitest isn't installed).
|
|
40
|
+
*/
|
|
41
|
+
export declare const ensureTestSetupMocks: (projectPath: string) => Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Pure helper: strip the `wsReducer` import + `ws: wsReducer,` entry from a
|
|
44
|
+
* rootReducer.ts source string. Also removes the JSDoc block above
|
|
45
|
+
* `combineReducers` that explains why `ws` is unwrapped (misleading once the
|
|
46
|
+
* entry is gone). Idempotent — re-applying is a no-op on clean input.
|
|
47
|
+
*
|
|
48
|
+
* Used by both `cleanupWs` (init-time opt-out) and the WS manifest's
|
|
49
|
+
* `removePattern` (so `remove ws` auto-strips instead of surfacing as
|
|
50
|
+
* manual cleanup).
|
|
51
|
+
*
|
|
52
|
+
* Anchored on stable code tokens (`wsReducer`, the import path, and the
|
|
53
|
+
* `ws` + `persistReducer` keywords inside the JSDoc) rather than literal
|
|
54
|
+
* comment text — upstream comment rewording doesn't break it.
|
|
55
|
+
*/
|
|
56
|
+
export declare const stripWsReducerRegistration: (content: string) => string;
|
|
57
|
+
//# sourceMappingURL=injectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectors.d.ts","sourceRoot":"","sources":["../../../../../src/services/setup/ws/injectors.ts"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CAOzE,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,MA8BnD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,MAsBlD,CAAC;AA2BF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CAM1E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CAMzE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CAoB5E,CAAC;AA2DF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,GAAI,SAAS,MAAM,KAAG,MAuB5D,CAAC"}
|