@teispace/next-maker 3.0.1 → 3.0.2
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 +7 -0
- package/dist/build.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/src/commands/app.d.ts +0 -1
- package/dist/src/commands/component.d.ts +0 -1
- package/dist/src/commands/doctor.d.ts +0 -1
- package/dist/src/commands/env.d.ts +0 -1
- package/dist/src/commands/favicon.d.ts +0 -1
- package/dist/src/commands/feature.d.ts +0 -1
- package/dist/src/commands/hook.d.ts +0 -1
- package/dist/src/commands/index.d.ts +0 -1
- package/dist/src/commands/layout.d.ts +0 -1
- package/dist/src/commands/locale.d.ts +0 -1
- package/dist/src/commands/page.d.ts +0 -1
- package/dist/src/commands/provider.d.ts +0 -1
- package/dist/src/commands/remove.d.ts +0 -1
- package/dist/src/commands/service.d.ts +0 -1
- package/dist/src/commands/setup.d.ts +0 -1
- package/dist/src/commands/slice.d.ts +0 -1
- package/dist/src/commands/test.d.ts +0 -1
- package/dist/src/config/constants.d.ts +0 -1
- package/dist/src/config/errorHandlers.d.ts +0 -1
- package/dist/src/config/index.d.ts +0 -1
- package/dist/src/config/output.d.ts +0 -1
- package/dist/src/config/packages.d.ts +0 -1
- package/dist/src/config/path-safety.d.ts +0 -1
- package/dist/src/config/paths.d.ts +0 -1
- package/dist/src/config/spinner.d.ts +0 -1
- package/dist/src/config/utils.d.ts +0 -1
- package/dist/src/core/files.d.ts +0 -1
- package/dist/src/core/git.d.ts +0 -1
- package/dist/src/core/package-manager.d.ts +0 -1
- package/dist/src/detection/existence.checker.d.ts +0 -1
- package/dist/src/detection/index.d.ts +0 -1
- package/dist/src/detection/project.detector.d.ts +0 -1
- package/dist/src/generators/component.generator.d.ts +0 -1
- package/dist/src/generators/crud-service.generator.d.ts +0 -1
- package/dist/src/generators/feature.generator.d.ts +0 -1
- package/dist/src/generators/hook.generator.d.ts +0 -1
- package/dist/src/generators/index.d.ts +0 -1
- package/dist/src/generators/layout.generator.d.ts +0 -1
- package/dist/src/generators/locale.generator.d.ts +0 -1
- package/dist/src/generators/page.generator.d.ts +0 -1
- package/dist/src/generators/provider.generator.d.ts +0 -1
- package/dist/src/generators/service.generator.d.ts +0 -1
- package/dist/src/generators/slice.generator.d.ts +0 -1
- package/dist/src/generators/templates/barrel.template.d.ts +0 -1
- package/dist/src/generators/templates/component.template.d.ts +0 -1
- package/dist/src/generators/templates/crud-service.template.d.ts +0 -1
- package/dist/src/generators/templates/custom-hook.template.d.ts +0 -1
- package/dist/src/generators/templates/hook.template.d.ts +0 -1
- package/dist/src/generators/templates/layout.template.d.ts +0 -1
- package/dist/src/generators/templates/page.template.d.ts +0 -1
- package/dist/src/generators/templates/persist.template.d.ts +0 -1
- package/dist/src/generators/templates/provider.template.d.ts +0 -1
- package/dist/src/generators/templates/selectors.template.d.ts +0 -1
- package/dist/src/generators/templates/service.template.d.ts +0 -1
- package/dist/src/generators/templates/shared-component.template.d.ts +0 -1
- package/dist/src/generators/templates/slice.template.d.ts +0 -1
- package/dist/src/generators/templates/test.template.d.ts +0 -1
- package/dist/src/generators/templates/types.template.d.ts +0 -1
- package/dist/src/generators/test.generator.d.ts +0 -1
- package/dist/src/generators/types.d.ts +0 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/manifests/bundle-analyzer.manifest.d.ts +0 -1
- package/dist/src/manifests/commitizen.manifest.d.ts +0 -1
- package/dist/src/manifests/dark-theme.manifest.d.ts +0 -1
- package/dist/src/manifests/http-client.manifest.d.ts +0 -1
- package/dist/src/manifests/i18n.manifest.d.ts +0 -1
- package/dist/src/manifests/index.d.ts +0 -1
- package/dist/src/manifests/react-compiler.manifest.d.ts +0 -1
- package/dist/src/manifests/redux.manifest.d.ts +0 -1
- package/dist/src/manifests/runner.d.ts +0 -1
- package/dist/src/manifests/security-headers.manifest.d.ts +0 -1
- package/dist/src/manifests/tests.manifest.d.ts +0 -1
- package/dist/src/manifests/transforms/next-config.d.ts +0 -1
- package/dist/src/manifests/transforms/unwrap-jsx.d.ts +0 -1
- package/dist/src/manifests/types.d.ts +0 -1
- package/dist/src/manifests/validate-scripts.manifest.d.ts +0 -1
- package/dist/src/manifests/ws.manifest.d.ts +0 -1
- package/dist/src/modifiers/api-registration.modifier.d.ts +0 -1
- package/dist/src/modifiers/app-paths.modifier.d.ts +0 -1
- package/dist/src/modifiers/crud-api-registration.modifier.d.ts +0 -1
- package/dist/src/modifiers/env-var.modifier.d.ts +0 -1
- package/dist/src/modifiers/helpers.d.ts +0 -1
- package/dist/src/modifiers/index.d.ts +0 -1
- package/dist/src/modifiers/root-provider.modifier.d.ts +0 -1
- package/dist/src/modifiers/root-reducer.modifier.d.ts +0 -1
- package/dist/src/modifiers/translation.modifier.d.ts +0 -1
- package/dist/src/modifiers/types.d.ts +0 -1
- package/dist/src/pipelines/feature.pipeline.d.ts +0 -1
- package/dist/src/pipelines/index.d.ts +0 -1
- package/dist/src/pipelines/runner.d.ts +0 -1
- package/dist/src/pipelines/service.pipeline.d.ts +0 -1
- package/dist/src/pipelines/slice.pipeline.d.ts +0 -1
- package/dist/src/pipelines/types.d.ts +0 -1
- package/dist/src/prompts/component.prompt.d.ts +0 -1
- package/dist/src/prompts/create-app.prompt.d.ts +0 -1
- package/dist/src/prompts/favicon.prompt.d.ts +0 -1
- package/dist/src/prompts/feature.prompt.d.ts +0 -1
- package/dist/src/prompts/hook.prompt.d.ts +0 -1
- package/dist/src/prompts/locale.prompt.d.ts +0 -1
- package/dist/src/prompts/page.prompt.d.ts +0 -1
- package/dist/src/prompts/service.prompt.d.ts +0 -1
- package/dist/src/prompts/slice.prompt.d.ts +0 -1
- package/dist/src/services/common/test-utils.d.ts +0 -1
- package/dist/src/services/favicon/css-colors.d.ts +0 -1
- package/dist/src/services/favicon/detect.d.ts +0 -1
- package/dist/src/services/favicon/encoders.d.ts +0 -1
- package/dist/src/services/favicon/index.d.ts +0 -1
- package/dist/src/services/favicon/manifest.d.ts +0 -1
- package/dist/src/services/favicon/pipeline.d.ts +0 -1
- package/dist/src/services/favicon/shapes.d.ts +0 -1
- package/dist/src/services/favicon/types.d.ts +0 -1
- package/dist/src/services/favicon/validate.d.ts +0 -1
- package/dist/src/services/init/cleanup/bundle-analyzer.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/dark-mode.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/http.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/i18n.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/index.d.ts +0 -1
- package/dist/src/services/init/cleanup/misc.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/react-compiler.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/redux.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/seo.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/tests.cleanup.d.ts +0 -1
- package/dist/src/services/init/cleanup/ws.cleanup.d.ts +0 -1
- package/dist/src/services/init/config.service.d.ts +0 -1
- package/dist/src/services/init/devtools.service.d.ts +0 -1
- package/dist/src/services/init/providers.service.d.ts +0 -1
- package/dist/src/services/init/template.service.d.ts +0 -1
- package/dist/src/services/setup/bundle-analyzer/index.d.ts +0 -1
- package/dist/src/services/setup/commitizen/index.d.ts +0 -1
- package/dist/src/services/setup/commitizen/package-modifier.d.ts +0 -1
- package/dist/src/services/setup/dark-theme/assets.d.ts +0 -1
- package/dist/src/services/setup/dark-theme/checks.d.ts +0 -1
- package/dist/src/services/setup/dark-theme/index.d.ts +0 -1
- package/dist/src/services/setup/dark-theme/injectors.d.ts +0 -1
- package/dist/src/services/setup/dark-theme/utils.d.ts +0 -1
- package/dist/src/services/setup/http-client/assets.d.ts +0 -1
- package/dist/src/services/setup/http-client/checks.d.ts +0 -1
- package/dist/src/services/setup/http-client/index.d.ts +0 -1
- package/dist/src/services/setup/http-client/injectors.d.ts +0 -1
- package/dist/src/services/setup/i18n/assets.d.ts +0 -1
- package/dist/src/services/setup/i18n/checks.d.ts +0 -1
- package/dist/src/services/setup/i18n/index.d.ts +0 -1
- package/dist/src/services/setup/i18n/injectors.d.ts +0 -1
- package/dist/src/services/setup/react-compiler/index.d.ts +0 -1
- package/dist/src/services/setup/redux/assets.d.ts +0 -1
- package/dist/src/services/setup/redux/checks.d.ts +0 -1
- package/dist/src/services/setup/redux/index.d.ts +0 -1
- package/dist/src/services/setup/redux/injectors.d.ts +0 -1
- package/dist/src/services/setup/security-headers/headers.d.ts +0 -1
- package/dist/src/services/setup/security-headers/index.d.ts +0 -1
- package/dist/src/services/setup/tests/index.d.ts +0 -1
- package/dist/src/services/setup/validate-scripts/index.d.ts +0 -1
- package/dist/src/services/setup/validate-scripts/package-modifier.d.ts +0 -1
- package/dist/src/services/setup/validate-scripts/scripts.d.ts +0 -1
- package/dist/src/services/setup/ws/assets.d.ts +0 -1
- package/dist/src/services/setup/ws/checks.d.ts +0 -1
- package/dist/src/services/setup/ws/index.d.ts +0 -1
- package/dist/src/services/setup/ws/injectors.d.ts +0 -1
- package/package.json +1 -1
- package/dist/build.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/src/commands/app.d.ts.map +0 -1
- package/dist/src/commands/component.d.ts.map +0 -1
- package/dist/src/commands/doctor.d.ts.map +0 -1
- package/dist/src/commands/env.d.ts.map +0 -1
- package/dist/src/commands/favicon.d.ts.map +0 -1
- package/dist/src/commands/feature.d.ts.map +0 -1
- package/dist/src/commands/hook.d.ts.map +0 -1
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/layout.d.ts.map +0 -1
- package/dist/src/commands/locale.d.ts.map +0 -1
- package/dist/src/commands/page.d.ts.map +0 -1
- package/dist/src/commands/provider.d.ts.map +0 -1
- package/dist/src/commands/remove.d.ts.map +0 -1
- package/dist/src/commands/service.d.ts.map +0 -1
- package/dist/src/commands/setup.d.ts.map +0 -1
- package/dist/src/commands/slice.d.ts.map +0 -1
- package/dist/src/commands/test.d.ts.map +0 -1
- package/dist/src/config/constants.d.ts.map +0 -1
- package/dist/src/config/errorHandlers.d.ts.map +0 -1
- package/dist/src/config/index.d.ts.map +0 -1
- package/dist/src/config/output.d.ts.map +0 -1
- package/dist/src/config/packages.d.ts.map +0 -1
- package/dist/src/config/path-safety.d.ts.map +0 -1
- package/dist/src/config/paths.d.ts.map +0 -1
- package/dist/src/config/spinner.d.ts.map +0 -1
- package/dist/src/config/utils.d.ts.map +0 -1
- package/dist/src/core/files.d.ts.map +0 -1
- package/dist/src/core/git.d.ts.map +0 -1
- package/dist/src/core/package-manager.d.ts.map +0 -1
- package/dist/src/detection/existence.checker.d.ts.map +0 -1
- package/dist/src/detection/index.d.ts.map +0 -1
- package/dist/src/detection/project.detector.d.ts.map +0 -1
- package/dist/src/generators/component.generator.d.ts.map +0 -1
- package/dist/src/generators/crud-service.generator.d.ts.map +0 -1
- package/dist/src/generators/feature.generator.d.ts.map +0 -1
- package/dist/src/generators/hook.generator.d.ts.map +0 -1
- package/dist/src/generators/index.d.ts.map +0 -1
- package/dist/src/generators/layout.generator.d.ts.map +0 -1
- package/dist/src/generators/locale.generator.d.ts.map +0 -1
- package/dist/src/generators/page.generator.d.ts.map +0 -1
- package/dist/src/generators/provider.generator.d.ts.map +0 -1
- package/dist/src/generators/service.generator.d.ts.map +0 -1
- package/dist/src/generators/slice.generator.d.ts.map +0 -1
- package/dist/src/generators/templates/barrel.template.d.ts.map +0 -1
- package/dist/src/generators/templates/component.template.d.ts.map +0 -1
- package/dist/src/generators/templates/crud-service.template.d.ts.map +0 -1
- package/dist/src/generators/templates/custom-hook.template.d.ts.map +0 -1
- package/dist/src/generators/templates/hook.template.d.ts.map +0 -1
- package/dist/src/generators/templates/layout.template.d.ts.map +0 -1
- package/dist/src/generators/templates/page.template.d.ts.map +0 -1
- package/dist/src/generators/templates/persist.template.d.ts.map +0 -1
- package/dist/src/generators/templates/provider.template.d.ts.map +0 -1
- package/dist/src/generators/templates/selectors.template.d.ts.map +0 -1
- package/dist/src/generators/templates/service.template.d.ts.map +0 -1
- package/dist/src/generators/templates/shared-component.template.d.ts.map +0 -1
- package/dist/src/generators/templates/slice.template.d.ts.map +0 -1
- package/dist/src/generators/templates/test.template.d.ts.map +0 -1
- package/dist/src/generators/templates/types.template.d.ts.map +0 -1
- package/dist/src/generators/test.generator.d.ts.map +0 -1
- package/dist/src/generators/types.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/manifests/bundle-analyzer.manifest.d.ts.map +0 -1
- package/dist/src/manifests/commitizen.manifest.d.ts.map +0 -1
- package/dist/src/manifests/dark-theme.manifest.d.ts.map +0 -1
- package/dist/src/manifests/http-client.manifest.d.ts.map +0 -1
- package/dist/src/manifests/i18n.manifest.d.ts.map +0 -1
- package/dist/src/manifests/index.d.ts.map +0 -1
- package/dist/src/manifests/react-compiler.manifest.d.ts.map +0 -1
- package/dist/src/manifests/redux.manifest.d.ts.map +0 -1
- package/dist/src/manifests/runner.d.ts.map +0 -1
- package/dist/src/manifests/security-headers.manifest.d.ts.map +0 -1
- package/dist/src/manifests/tests.manifest.d.ts.map +0 -1
- package/dist/src/manifests/transforms/next-config.d.ts.map +0 -1
- package/dist/src/manifests/transforms/unwrap-jsx.d.ts.map +0 -1
- package/dist/src/manifests/types.d.ts.map +0 -1
- package/dist/src/manifests/validate-scripts.manifest.d.ts.map +0 -1
- package/dist/src/manifests/ws.manifest.d.ts.map +0 -1
- package/dist/src/modifiers/api-registration.modifier.d.ts.map +0 -1
- package/dist/src/modifiers/app-paths.modifier.d.ts.map +0 -1
- package/dist/src/modifiers/crud-api-registration.modifier.d.ts.map +0 -1
- package/dist/src/modifiers/env-var.modifier.d.ts.map +0 -1
- package/dist/src/modifiers/helpers.d.ts.map +0 -1
- package/dist/src/modifiers/index.d.ts.map +0 -1
- package/dist/src/modifiers/root-provider.modifier.d.ts.map +0 -1
- package/dist/src/modifiers/root-reducer.modifier.d.ts.map +0 -1
- package/dist/src/modifiers/translation.modifier.d.ts.map +0 -1
- package/dist/src/modifiers/types.d.ts.map +0 -1
- package/dist/src/pipelines/feature.pipeline.d.ts.map +0 -1
- package/dist/src/pipelines/index.d.ts.map +0 -1
- package/dist/src/pipelines/runner.d.ts.map +0 -1
- package/dist/src/pipelines/service.pipeline.d.ts.map +0 -1
- package/dist/src/pipelines/slice.pipeline.d.ts.map +0 -1
- package/dist/src/pipelines/types.d.ts.map +0 -1
- package/dist/src/prompts/component.prompt.d.ts.map +0 -1
- package/dist/src/prompts/create-app.prompt.d.ts.map +0 -1
- package/dist/src/prompts/favicon.prompt.d.ts.map +0 -1
- package/dist/src/prompts/feature.prompt.d.ts.map +0 -1
- package/dist/src/prompts/hook.prompt.d.ts.map +0 -1
- package/dist/src/prompts/locale.prompt.d.ts.map +0 -1
- package/dist/src/prompts/page.prompt.d.ts.map +0 -1
- package/dist/src/prompts/service.prompt.d.ts.map +0 -1
- package/dist/src/prompts/slice.prompt.d.ts.map +0 -1
- package/dist/src/services/common/test-utils.d.ts.map +0 -1
- package/dist/src/services/favicon/css-colors.d.ts.map +0 -1
- package/dist/src/services/favicon/detect.d.ts.map +0 -1
- package/dist/src/services/favicon/encoders.d.ts.map +0 -1
- package/dist/src/services/favicon/index.d.ts.map +0 -1
- package/dist/src/services/favicon/manifest.d.ts.map +0 -1
- package/dist/src/services/favicon/pipeline.d.ts.map +0 -1
- package/dist/src/services/favicon/shapes.d.ts.map +0 -1
- package/dist/src/services/favicon/types.d.ts.map +0 -1
- package/dist/src/services/favicon/validate.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/bundle-analyzer.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/dark-mode.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/http.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/i18n.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/index.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/misc.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/react-compiler.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/redux.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/seo.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/tests.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/cleanup/ws.cleanup.d.ts.map +0 -1
- package/dist/src/services/init/config.service.d.ts.map +0 -1
- package/dist/src/services/init/devtools.service.d.ts.map +0 -1
- package/dist/src/services/init/providers.service.d.ts.map +0 -1
- package/dist/src/services/init/template.service.d.ts.map +0 -1
- package/dist/src/services/setup/bundle-analyzer/index.d.ts.map +0 -1
- package/dist/src/services/setup/commitizen/index.d.ts.map +0 -1
- package/dist/src/services/setup/commitizen/package-modifier.d.ts.map +0 -1
- package/dist/src/services/setup/dark-theme/assets.d.ts.map +0 -1
- package/dist/src/services/setup/dark-theme/checks.d.ts.map +0 -1
- package/dist/src/services/setup/dark-theme/index.d.ts.map +0 -1
- package/dist/src/services/setup/dark-theme/injectors.d.ts.map +0 -1
- package/dist/src/services/setup/dark-theme/utils.d.ts.map +0 -1
- package/dist/src/services/setup/http-client/assets.d.ts.map +0 -1
- package/dist/src/services/setup/http-client/checks.d.ts.map +0 -1
- package/dist/src/services/setup/http-client/index.d.ts.map +0 -1
- package/dist/src/services/setup/http-client/injectors.d.ts.map +0 -1
- package/dist/src/services/setup/i18n/assets.d.ts.map +0 -1
- package/dist/src/services/setup/i18n/checks.d.ts.map +0 -1
- package/dist/src/services/setup/i18n/index.d.ts.map +0 -1
- package/dist/src/services/setup/i18n/injectors.d.ts.map +0 -1
- package/dist/src/services/setup/react-compiler/index.d.ts.map +0 -1
- package/dist/src/services/setup/redux/assets.d.ts.map +0 -1
- package/dist/src/services/setup/redux/checks.d.ts.map +0 -1
- package/dist/src/services/setup/redux/index.d.ts.map +0 -1
- package/dist/src/services/setup/redux/injectors.d.ts.map +0 -1
- package/dist/src/services/setup/security-headers/headers.d.ts.map +0 -1
- package/dist/src/services/setup/security-headers/index.d.ts.map +0 -1
- package/dist/src/services/setup/tests/index.d.ts.map +0 -1
- package/dist/src/services/setup/validate-scripts/index.d.ts.map +0 -1
- package/dist/src/services/setup/validate-scripts/package-modifier.d.ts.map +0 -1
- package/dist/src/services/setup/validate-scripts/scripts.d.ts.map +0 -1
- package/dist/src/services/setup/ws/assets.d.ts.map +0 -1
- package/dist/src/services/setup/ws/checks.d.ts.map +0 -1
- package/dist/src/services/setup/ws/index.d.ts.map +0 -1
- package/dist/src/services/setup/ws/injectors.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.2](https://github.com/teispace/npm-packages/compare/next-maker-v3.0.1...next-maker-v3.0.2) (2026-05-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* minify published dist and drop sourcemaps ([4c5a092](https://github.com/teispace/npm-packages/commit/4c5a092765c14b2397eaed1941ec609dbf4bce3b))
|
|
9
|
+
|
|
3
10
|
## [3.0.1](https://github.com/teispace/npm-packages/compare/next-maker-v3.0.0...next-maker-v3.0.1) (2026-05-31)
|
|
4
11
|
|
|
5
12
|
|
package/dist/build.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ ${s}
|
|
|
24
24
|
};`),await g(r,n)},_e=async(e,t)=>{let r=A.join(e,c.HTTP_SERVER_FILE);if(!m(r)||t.length===0)return;let n=await f(r),i=o=>{n=n.replace(o,"")};t.includes("axios")||(i(/^import\s*\{\s*createAxiosClient\s*\}\s*from\s*['"]\.\/axios-client['"];\n?/m),i(/export const axiosClient = createAxiosClient\(\{[\s\S]*?\}\);\n?\n?/),n=xn(n,"createAxiosClient")),t.includes("fetch")||(i(/^import\s*\{\s*createFetchClient\s*\}\s*from\s*['"]\.\/fetch-client['"];\n?/m),i(/export const fetchClient = createFetchClient\(\{[\s\S]*?\}\);\n?\n?/),n=xn(n,"createFetchClient")),n=n.replace(/\n{3,}/g,`
|
|
25
25
|
|
|
26
26
|
`),await g(r,n)},xn=(e,t)=>{let r=/^export\s*\{([^}]*)\};\n?/m;return e.replace(r,(n,i)=>{let o=i.split(",").map(s=>s.trim()).filter(s=>s.length>0&&s!==t);return o.length===0?"":`export { ${o.join(", ")} };
|
|
27
|
-
`})}});import{existsSync as sc}from"node:fs";import{access as ac}from"node:fs/promises";import Yn from"node:path";var de,It,Kn=Ie(()=>{"use strict";de=async(e,t,r)=>{try{return await ac(Yn.join(e,r,t)),!0}catch{return!1}},It=(e,t,r)=>sc(Yn.join(e,t,r))});import{access as Nt,readFile as cc}from"node:fs/promises";import Xe from"node:path";var F,Zn=Ie(()=>{"use strict";F=async e=>{try{let t=Xe.join(e,"package.json"),r=await cc(t,"utf-8"),n=JSON.parse(r),i={...n.dependencies,...n.devDependencies},o=!!(i["@reduxjs/toolkit"]&&i["react-redux"]),s=!!i["next-intl"],a=!!i.axios,p=!1,u=Xe.join(e,"src","lib","utils","http","axios-client");try{await Nt(u)}catch{a=!1}let d=Xe.join(e,"src","lib","utils","http","fetch-client");try{await Nt(d),p=!0}catch{p=!1}let h;a&&p?h="both":a?h="axios":p?h="fetch":h="none";let x=!!i.vitest;if(!x)try{await Nt(Xe.join(e,"vitest.config.ts")),x=!0}catch{}let $="none";if(i["socket.io-client"])try{await Nt(Xe.join(e,"src","lib","utils","ws")),$="present"}catch{}return{hasRedux:o,httpClient:h,hasI18n:s,hasTests:x,ws:$}}catch(t){throw new Error(`Failed to detect project setup: ${t}`,{cause:t})}}});var Ye={};Jt(Ye,{detectProjectSetup:()=>F,directoryExists:()=>de,fileExistsAt:()=>It});var H=Ie(()=>{"use strict";Kn();Zn()});import{Command as sm}from"commander";var en={name:"@teispace/next-maker",version:"3.0.1",description:"Create a new Teispace Next.js application with interactive setup.",keywords:["nextjs","react","typescript","tailwindcss","starter","template","redux"],type:"module",homepage:"https://github.com/teispace/npm-packages/tree/main/packages/next-maker#readme",bugs:{url:"https://github.com/teispace/npm-packages/issues"},license:"MIT",author:"Teispace",files:["dist","README.md","LICENSE","CHANGELOG.md"],main:"dist/index.js",types:"dist/index.d.ts",bin:"dist/index.js",repository:{type:"git",url:"git+https://github.com/teispace/npm-packages.git",directory:"packages/next-maker"},scripts:{build:"tsx build.ts && tsc --emitDeclarationOnly --outDir dist",start:"node dist/index.js",dev:"tsx --watch src/index.ts",test:"vitest run","test:watch":"vitest"},dependencies:{commander:"^15.0.0",degit:"^3.3.2",enquirer:"^2.4.1",ora:"^9.4.0",picocolors:"^1.1.1","png-to-ico":"^3.0.1",sharp:"^0.34.5"},devDependencies:{"@types/degit":"^2.8.6","@types/node":"^25.9.1",esbuild:"^0.28.0",tsx:"^4.22.3",typescript:"^6.0.3",vitest:"^4.1.7"},engines:{node:">=22.12.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"}};import or from"node:path";import X from"picocolors";function tn(e){let{logger:t=s=>console.error(s),exitOnCancel:r=process.env.NODE_ENV!=="test"}=e??{},n=()=>{console.log(""),console.log(""),t("Setup cancelled by user"),console.log(""),r&&process.exit(0)},i=s=>{if(s!==null&&typeof s=="object"&&"code"in s&&s.code==="ERR_USE_AFTER_CLOSE"){n();return}if(s instanceof Error){t(`Uncaught exception: ${s.message}`);return}t(`Uncaught exception: ${String(s)}`)},o=s=>{if(s instanceof Error){t(`Unhandled promise rejection: ${s.message}`);return}t(`Unhandled promise rejection: ${String(s)}`)};return process.on("SIGINT",n),process.on("SIGTERM",n),process.on("uncaughtException",i),process.on("unhandledRejection",o),()=>{process.off("SIGINT",n),process.off("SIGTERM",n),process.off("uncaughtException",i),process.off("unhandledRejection",o)}}import te from"picocolors";var Ds={reset:e=>e,red:te.red,green:te.green,yellow:te.yellow,blue:te.blue,cyan:te.cyan,magenta:te.magenta,white:te.white,gray:te.gray,bright:te.bold,dim:te.dim};function pe(e,t="reset"){let r=Ds[t]??(n=>n);console.log(r(e))}function St(e){pe(`\u2716 ${e}`,"red")}var v=St;function rn(e){pe(`\u26A0 ${e}`,"yellow")}function l(e){pe(e)}function nn(){console.log(""),pe("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557","cyan"),pe("\u2551 \u2551","cyan"),pe("\u2551 \u{1F680} Create Teispace Next.js App \u{1F680} \u2551","cyan"),pe("\u2551 \u2551","cyan"),pe("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D","cyan"),console.log("")}import Ls from"ora";function b(e="",t){let r=Ls({text:e,...t});return r.start(),r}var Ms=e=>e.charAt(0).toUpperCase()+e.slice(1),j=e=>e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase()),R=e=>Ms(j(e));import Gs from"ora";var y=Gs();P();import{execFile as Us}from"node:child_process";import{promisify as Hs}from"node:util";var Bs=Hs(Us),se=(e,t)=>Bs("git",e,t?{cwd:t}:void 0);function zs(e){let t=e.trim();if(!t||t.startsWith("-"))throw new Error(`Invalid git remote "${e}".`);if(!(/^https?:\/\/\S+$/.test(t)||/^git@[\w.-]+:\S+$/.test(t)||/^ssh:\/\/\S+$/.test(t)||/^[\w.-]+\/[\w.-]+$/.test(t)))throw new Error(`Invalid git remote "${e}". Expected an https/ssh URL or "owner/repo".`)}var sn=async(e,t,r)=>{try{if(await se(["init"],e),await se(["add","."],e),await se(["commit","-m","Initial commit from @teispace/next-maker"],e),t&&(zs(t),await se(["remote","add","origin",t],e),r)){await se(["fetch","origin"],e);let n="main";try{await se(["show-branch","origin/main"],e)}catch{try{await se(["show-branch","origin/master"],e),n="master"}catch{n="main"}}await se(["merge",`origin/${n}`,"--allow-unrelated-histories","-X","ours"],e),await se(["push","origin",`HEAD:${n}`],e)}}catch(n){console.warn("Failed to initialize git repository",n)}};import{exec as Js}from"node:child_process";import{promisify as Vs}from"node:util";var Ge=Vs(Js),an=async(e,t)=>{let r=`${t} install`;try{await Ge(r,{cwd:e})}catch(n){throw new Error(`Failed to install dependencies with ${t}: ${n}`,{cause:n})}},J=async(e,t,r)=>{let n=t==="npm"?`${t} run ${r}`:`${t} ${r}`;try{await Ge(n,{cwd:e})}catch(i){console.warn(`Warning: Failed to run script '${r}': ${i}`)}},Ws=()=>{let e=process.env.npm_config_user_agent;if(e){if(e.startsWith("yarn"))return"yarn";if(e.startsWith("pnpm"))return"pnpm";if(e.startsWith("bun"))return"bun"}return"npm"},k=async e=>{let{existsSync:t}=await import("node:fs"),r=await import("node:path");return t(r.join(e,"pnpm-lock.yaml"))?"pnpm":t(r.join(e,"yarn.lock"))?"yarn":t(r.join(e,"bun.lockb"))?"bun":t(r.join(e,"package-lock.json"))?"npm":Ws()},qs=async(e,t,r)=>{if(r.length===0)return;let i=`${cn(t)} ${r.join(" ")}`;try{await Ge(i,{cwd:e})}catch(o){throw new Error(`Failed to install packages with ${t}: ${o}`,{cause:o})}},cn=e=>{switch(e){case"npm":return"npm install";case"yarn":return"yarn add";case"pnpm":return"pnpm add";case"bun":return"bun add";default:return"npm install"}},G=async(e,t)=>{let r=await k(e);await qs(e,r,[t])},Xs=e=>{switch(e){case"npm":return"--save-dev";case"yarn":case"pnpm":case"bun":return"-D";default:return"--save-dev"}},we=async(e,t,r)=>{if(r.length===0)return;let n=cn(t),i=Xs(t),o=`${n} ${i} ${r.join(" ")}`;try{await Ge(o,{cwd:e})}catch(s){throw new Error(`Failed to install dev packages with ${t}: ${s}`,{cause:s})}},Et=async(e,t)=>{let r=await k(e);await we(e,r,[t])},Wt=async(e,t,r)=>{if(r.length===0)return;let i=`${Ys(t)} ${r.join(" ")}`;try{await Ge(i,{cwd:e})}catch(o){throw new Error(`Failed to uninstall packages with ${t}: ${o}`,{cause:o})}},Ys=e=>{switch(e){case"npm":return"npm uninstall";case"yarn":return"yarn remove";case"pnpm":return"pnpm remove";case"bun":return"bun remove";default:return"npm uninstall"}},Ne=async(e,t)=>{let r=await k(e);await Wt(e,r,[t])};import Ks from"enquirer";var Zs=/^[a-z0-9-_]+$/,Qs=/^\d+\.\d+\.\d+$/,pn=e=>Zs.test(e),ea=e=>Qs.test(e),ln=(e,t={})=>{let r=t.projectName??e??"my-app";if(!pn(r))throw new Error(`Invalid project name "${r}". Use lowercase letters, digits, hyphens, and underscores only.`);let n=t.version??"0.1.0";if(!ea(n))throw new Error(`Invalid version "${n}". Expected semver (e.g. 0.1.0).`);let i=t.author??"Teispace",o=t.company??i;return{projectName:r,description:t.description??"A Next.js application",author:i,version:n,packageManager:t.packageManager??"yarn",gitRemote:t.gitRemote??"",pushToRemote:t.pushToRemote??!1,gitIssues:t.gitIssues??"",gitHomepage:t.gitHomepage??"",httpClient:t.httpClient??"fetch",reactSecureStorage:t.reactSecureStorage??!0,email:t.email??"support@example.com",company:o,keepTemplates:t.keepTemplates??!1,darkMode:t.darkMode??!0,redux:t.redux??!0,ws:(t.redux??!0)&&(t.ws??!1),i18n:t.i18n??!0,communityFiles:t.communityFiles??[],readme:t.readme??!0,docker:t.docker??!1,containerName:t.containerName,imageName:t.imageName,imageTag:t.imageTag,ci:t.ci??!1,preCommitHooks:t.preCommitHooks??!0,commitizen:t.commitizen??!0,copyEnv:t.copyEnv??!0,tests:t.tests??!0,reactCompiler:t.reactCompiler??!0,bundleAnalyzer:t.bundleAnalyzer??!1}},{prompt:ta}=Ks,mn=async e=>{if(e!==void 0&&!pn(e))throw new Error(`Invalid project name "${e}". Use lowercase letters, digits, hyphens, and underscores only \u2014 no slashes, "..", or absolute paths.`);let t=await ta([{type:"input",name:"projectName",message:"What is the project name?",initial:e||"my-app",skip:!!e,validate:r=>/^[a-z0-9-_]+$/.test(r)?!0:"Project name must be lowercase and contain only alphanumeric characters, hyphens, and underscores."},{type:"input",name:"description",message:"Project description:",initial:"A Next.js application"},{type:"input",name:"author",message:"Author:",initial:"Teispace"},{type:"input",name:"version",message:"Version:",initial:"0.1.0",validate:r=>/^\d+\.\d+\.\d+$/.test(r)?!0:"Version must be a valid semantic version (x.y.z)."},{type:"input",name:"email",message:"Support email:",initial:"support@example.com",validate:r=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)?!0:"Please enter a valid email address."},{type:"select",name:"packageManager",message:"Which package manager would you like to use?",choices:["npm","yarn","pnpm","bun"],initial:1},{type:"input",name:"gitRemote",message:"GitHub repository URL (optional):",initial:""},{type:"confirm",name:"pushToRemote",message:"Would you like to push the changes to the remote repository?",initial:!0,skip:function(){return!this.state?.answers?.gitRemote}},{type:"input",name:"gitIssues",message:"GitHub issues URL (optional):",initial:"",skip:function(){return!this.state?.answers?.gitRemote},validate:r=>r?/^https:\/\/github\.com\/[\w-]+\/[\w.-]+\/issues$/.test(r)?!0:"Please enter a valid GitHub issues URL (e.g., https://github.com/user/repo/issues)":!0},{type:"input",name:"gitHomepage",message:"GitHub homepage URL (optional):",initial:"",skip:function(){return!this.state?.answers?.gitRemote},validate:r=>r?/^https:\/\/github\.com\/[\w-]+\/[\w.-]+#readme$/.test(r)?!0:"Please enter a valid GitHub homepage URL (e.g., https://github.com/user/repo#readme)":!0},{type:"confirm",name:"keepTemplates",message:"Do you want to keep GitHub issue and pull request templates?",initial:!1},{type:"select",name:"httpClient",message:"Which HTTP client do you want to use?",choices:["axios","fetch","both","none"],initial:1},{type:"confirm",name:"reactSecureStorage",message:"Do you want to include react-secure-storage?",initial:!0,skip:function(){let r=this.state?.answers??this.enquirer?.answers??{};return!!(r.httpClient&&r.httpClient!=="none")}},{type:"confirm",name:"darkMode",message:"Do you want to include Dark Mode (Tailwind + @teispace/next-themes)?",initial:!0},{type:"confirm",name:"redux",message:"Do you want to include Redux Toolkit?",initial:!0},{type:"confirm",name:"ws",message:"Do you want to include WebSocket support (socket.io-client + Redux bridge)?",initial:!1,skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).redux}},{type:"confirm",name:"i18n",message:"Do you want to include Internationalization (next-intl)?",initial:!0},{type:"confirm",name:"tests",message:"Do you want to include testing setup (Vitest + React Testing Library)?",initial:!0},{type:"confirm",name:"reactCompiler",message:"Do you want to enable the React Compiler?",initial:!0},{type:"confirm",name:"bundleAnalyzer",message:"Do you want to include @next/bundle-analyzer?",initial:!1},{type:"multiselect",name:"communityFiles",message:"Select community files to include:",choices:[{name:"CODE_OF_CONDUCT.md",value:"CODE_OF_CONDUCT.md"},{name:"CONTRIBUTING.md",value:"CONTRIBUTING.md"},{name:"SECURITY.md",value:"SECURITY.md"}],initial:[]},{type:"confirm",name:"readme",message:"Do you want to create a README.md?",initial:!0},{type:"confirm",name:"docker",message:"Do you want to include Docker configuration?",initial:!1},{type:"input",name:"containerName",message:"Docker Container Name:",initial:"next-app",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker},validate:r=>/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/.test(r)?!0:"Invalid Docker container name."},{type:"input",name:"imageName",message:"Docker Image Name:",initial:"nextjs-starter",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker},validate:r=>/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/.test(r)?!0:"Invalid Docker image name (must be lowercase)."},{type:"input",name:"imageTag",message:"Docker Image Tag:",initial:"latest",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker},validate:r=>/^[a-zA-Z0-9_][a-zA-Z0-9_.-]{0,127}$/.test(r)?!0:"Invalid Docker image tag."},{type:"confirm",name:"ci",message:"Do you want to include GitHub Actions (CI/CD)?",initial:!1},{type:"confirm",name:"preCommitHooks",message:"Do you want to setup pre-commit hooks (Husky, Commitlint, Lint-staged)?",initial:!0},{type:"confirm",name:"commitizen",message:"Do you want to setup Commitizen?",initial:!0},{type:"confirm",name:"copyEnv",message:"Want to copy .env.example to .env?",initial:!0}]);if(t.company=t.author,t.ws=!!t.redux&&!!t.ws,t.gitRemote&&!t.gitHomepage){let r=t.gitRemote.replace("git@github.com:","https://github.com/").replace(/\.git$/,"");t.gitHomepage=`${r}#readme`,t.gitIssues=`${r}/issues`}return t};P();import ra from"node:path";var le=async(e,t)=>{let r=na(t);await g(ra.join(e,"test/test-utils.tsx"),r)},na=({redux:e,i18n:t})=>e&&t?ia:e?oa:t?sa:aa,ia=`import { type RenderOptions, render } from '@testing-library/react';
|
|
27
|
+
`})}});import{existsSync as sc}from"node:fs";import{access as ac}from"node:fs/promises";import Yn from"node:path";var de,It,Kn=Ie(()=>{"use strict";de=async(e,t,r)=>{try{return await ac(Yn.join(e,r,t)),!0}catch{return!1}},It=(e,t,r)=>sc(Yn.join(e,t,r))});import{access as Nt,readFile as cc}from"node:fs/promises";import Xe from"node:path";var F,Zn=Ie(()=>{"use strict";F=async e=>{try{let t=Xe.join(e,"package.json"),r=await cc(t,"utf-8"),n=JSON.parse(r),i={...n.dependencies,...n.devDependencies},o=!!(i["@reduxjs/toolkit"]&&i["react-redux"]),s=!!i["next-intl"],a=!!i.axios,p=!1,u=Xe.join(e,"src","lib","utils","http","axios-client");try{await Nt(u)}catch{a=!1}let d=Xe.join(e,"src","lib","utils","http","fetch-client");try{await Nt(d),p=!0}catch{p=!1}let h;a&&p?h="both":a?h="axios":p?h="fetch":h="none";let x=!!i.vitest;if(!x)try{await Nt(Xe.join(e,"vitest.config.ts")),x=!0}catch{}let $="none";if(i["socket.io-client"])try{await Nt(Xe.join(e,"src","lib","utils","ws")),$="present"}catch{}return{hasRedux:o,httpClient:h,hasI18n:s,hasTests:x,ws:$}}catch(t){throw new Error(`Failed to detect project setup: ${t}`,{cause:t})}}});var Ye={};Jt(Ye,{detectProjectSetup:()=>F,directoryExists:()=>de,fileExistsAt:()=>It});var H=Ie(()=>{"use strict";Kn();Zn()});import{Command as sm}from"commander";var en={name:"@teispace/next-maker",version:"3.0.2",description:"Create a new Teispace Next.js application with interactive setup.",keywords:["nextjs","react","typescript","tailwindcss","starter","template","redux"],type:"module",homepage:"https://github.com/teispace/npm-packages/tree/main/packages/next-maker#readme",bugs:{url:"https://github.com/teispace/npm-packages/issues"},license:"MIT",author:"Teispace",files:["dist","README.md","LICENSE","CHANGELOG.md"],main:"dist/index.js",types:"dist/index.d.ts",bin:"dist/index.js",repository:{type:"git",url:"git+https://github.com/teispace/npm-packages.git",directory:"packages/next-maker"},scripts:{build:"tsx build.ts && tsc --emitDeclarationOnly --outDir dist",start:"node dist/index.js",dev:"tsx --watch src/index.ts",test:"vitest run","test:watch":"vitest"},dependencies:{commander:"^15.0.0",degit:"^3.3.2",enquirer:"^2.4.1",ora:"^9.4.0",picocolors:"^1.1.1","png-to-ico":"^3.0.1",sharp:"^0.34.5"},devDependencies:{"@types/degit":"^2.8.6","@types/node":"^25.9.1",esbuild:"^0.28.0",tsx:"^4.22.3",typescript:"^6.0.3",vitest:"^4.1.7"},engines:{node:">=22.12.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"}};import or from"node:path";import X from"picocolors";function tn(e){let{logger:t=s=>console.error(s),exitOnCancel:r=process.env.NODE_ENV!=="test"}=e??{},n=()=>{console.log(""),console.log(""),t("Setup cancelled by user"),console.log(""),r&&process.exit(0)},i=s=>{if(s!==null&&typeof s=="object"&&"code"in s&&s.code==="ERR_USE_AFTER_CLOSE"){n();return}if(s instanceof Error){t(`Uncaught exception: ${s.message}`);return}t(`Uncaught exception: ${String(s)}`)},o=s=>{if(s instanceof Error){t(`Unhandled promise rejection: ${s.message}`);return}t(`Unhandled promise rejection: ${String(s)}`)};return process.on("SIGINT",n),process.on("SIGTERM",n),process.on("uncaughtException",i),process.on("unhandledRejection",o),()=>{process.off("SIGINT",n),process.off("SIGTERM",n),process.off("uncaughtException",i),process.off("unhandledRejection",o)}}import te from"picocolors";var Ds={reset:e=>e,red:te.red,green:te.green,yellow:te.yellow,blue:te.blue,cyan:te.cyan,magenta:te.magenta,white:te.white,gray:te.gray,bright:te.bold,dim:te.dim};function pe(e,t="reset"){let r=Ds[t]??(n=>n);console.log(r(e))}function St(e){pe(`\u2716 ${e}`,"red")}var v=St;function rn(e){pe(`\u26A0 ${e}`,"yellow")}function l(e){pe(e)}function nn(){console.log(""),pe("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557","cyan"),pe("\u2551 \u2551","cyan"),pe("\u2551 \u{1F680} Create Teispace Next.js App \u{1F680} \u2551","cyan"),pe("\u2551 \u2551","cyan"),pe("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D","cyan"),console.log("")}import Ls from"ora";function b(e="",t){let r=Ls({text:e,...t});return r.start(),r}var Ms=e=>e.charAt(0).toUpperCase()+e.slice(1),j=e=>e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase()),R=e=>Ms(j(e));import Gs from"ora";var y=Gs();P();import{execFile as Us}from"node:child_process";import{promisify as Hs}from"node:util";var Bs=Hs(Us),se=(e,t)=>Bs("git",e,t?{cwd:t}:void 0);function zs(e){let t=e.trim();if(!t||t.startsWith("-"))throw new Error(`Invalid git remote "${e}".`);if(!(/^https?:\/\/\S+$/.test(t)||/^git@[\w.-]+:\S+$/.test(t)||/^ssh:\/\/\S+$/.test(t)||/^[\w.-]+\/[\w.-]+$/.test(t)))throw new Error(`Invalid git remote "${e}". Expected an https/ssh URL or "owner/repo".`)}var sn=async(e,t,r)=>{try{if(await se(["init"],e),await se(["add","."],e),await se(["commit","-m","Initial commit from @teispace/next-maker"],e),t&&(zs(t),await se(["remote","add","origin",t],e),r)){await se(["fetch","origin"],e);let n="main";try{await se(["show-branch","origin/main"],e)}catch{try{await se(["show-branch","origin/master"],e),n="master"}catch{n="main"}}await se(["merge",`origin/${n}`,"--allow-unrelated-histories","-X","ours"],e),await se(["push","origin",`HEAD:${n}`],e)}}catch(n){console.warn("Failed to initialize git repository",n)}};import{exec as Js}from"node:child_process";import{promisify as Vs}from"node:util";var Ge=Vs(Js),an=async(e,t)=>{let r=`${t} install`;try{await Ge(r,{cwd:e})}catch(n){throw new Error(`Failed to install dependencies with ${t}: ${n}`,{cause:n})}},J=async(e,t,r)=>{let n=t==="npm"?`${t} run ${r}`:`${t} ${r}`;try{await Ge(n,{cwd:e})}catch(i){console.warn(`Warning: Failed to run script '${r}': ${i}`)}},Ws=()=>{let e=process.env.npm_config_user_agent;if(e){if(e.startsWith("yarn"))return"yarn";if(e.startsWith("pnpm"))return"pnpm";if(e.startsWith("bun"))return"bun"}return"npm"},k=async e=>{let{existsSync:t}=await import("node:fs"),r=await import("node:path");return t(r.join(e,"pnpm-lock.yaml"))?"pnpm":t(r.join(e,"yarn.lock"))?"yarn":t(r.join(e,"bun.lockb"))?"bun":t(r.join(e,"package-lock.json"))?"npm":Ws()},qs=async(e,t,r)=>{if(r.length===0)return;let i=`${cn(t)} ${r.join(" ")}`;try{await Ge(i,{cwd:e})}catch(o){throw new Error(`Failed to install packages with ${t}: ${o}`,{cause:o})}},cn=e=>{switch(e){case"npm":return"npm install";case"yarn":return"yarn add";case"pnpm":return"pnpm add";case"bun":return"bun add";default:return"npm install"}},G=async(e,t)=>{let r=await k(e);await qs(e,r,[t])},Xs=e=>{switch(e){case"npm":return"--save-dev";case"yarn":case"pnpm":case"bun":return"-D";default:return"--save-dev"}},we=async(e,t,r)=>{if(r.length===0)return;let n=cn(t),i=Xs(t),o=`${n} ${i} ${r.join(" ")}`;try{await Ge(o,{cwd:e})}catch(s){throw new Error(`Failed to install dev packages with ${t}: ${s}`,{cause:s})}},Et=async(e,t)=>{let r=await k(e);await we(e,r,[t])},Wt=async(e,t,r)=>{if(r.length===0)return;let i=`${Ys(t)} ${r.join(" ")}`;try{await Ge(i,{cwd:e})}catch(o){throw new Error(`Failed to uninstall packages with ${t}: ${o}`,{cause:o})}},Ys=e=>{switch(e){case"npm":return"npm uninstall";case"yarn":return"yarn remove";case"pnpm":return"pnpm remove";case"bun":return"bun remove";default:return"npm uninstall"}},Ne=async(e,t)=>{let r=await k(e);await Wt(e,r,[t])};import Ks from"enquirer";var Zs=/^[a-z0-9-_]+$/,Qs=/^\d+\.\d+\.\d+$/,pn=e=>Zs.test(e),ea=e=>Qs.test(e),ln=(e,t={})=>{let r=t.projectName??e??"my-app";if(!pn(r))throw new Error(`Invalid project name "${r}". Use lowercase letters, digits, hyphens, and underscores only.`);let n=t.version??"0.1.0";if(!ea(n))throw new Error(`Invalid version "${n}". Expected semver (e.g. 0.1.0).`);let i=t.author??"Teispace",o=t.company??i;return{projectName:r,description:t.description??"A Next.js application",author:i,version:n,packageManager:t.packageManager??"yarn",gitRemote:t.gitRemote??"",pushToRemote:t.pushToRemote??!1,gitIssues:t.gitIssues??"",gitHomepage:t.gitHomepage??"",httpClient:t.httpClient??"fetch",reactSecureStorage:t.reactSecureStorage??!0,email:t.email??"support@example.com",company:o,keepTemplates:t.keepTemplates??!1,darkMode:t.darkMode??!0,redux:t.redux??!0,ws:(t.redux??!0)&&(t.ws??!1),i18n:t.i18n??!0,communityFiles:t.communityFiles??[],readme:t.readme??!0,docker:t.docker??!1,containerName:t.containerName,imageName:t.imageName,imageTag:t.imageTag,ci:t.ci??!1,preCommitHooks:t.preCommitHooks??!0,commitizen:t.commitizen??!0,copyEnv:t.copyEnv??!0,tests:t.tests??!0,reactCompiler:t.reactCompiler??!0,bundleAnalyzer:t.bundleAnalyzer??!1}},{prompt:ta}=Ks,mn=async e=>{if(e!==void 0&&!pn(e))throw new Error(`Invalid project name "${e}". Use lowercase letters, digits, hyphens, and underscores only \u2014 no slashes, "..", or absolute paths.`);let t=await ta([{type:"input",name:"projectName",message:"What is the project name?",initial:e||"my-app",skip:!!e,validate:r=>/^[a-z0-9-_]+$/.test(r)?!0:"Project name must be lowercase and contain only alphanumeric characters, hyphens, and underscores."},{type:"input",name:"description",message:"Project description:",initial:"A Next.js application"},{type:"input",name:"author",message:"Author:",initial:"Teispace"},{type:"input",name:"version",message:"Version:",initial:"0.1.0",validate:r=>/^\d+\.\d+\.\d+$/.test(r)?!0:"Version must be a valid semantic version (x.y.z)."},{type:"input",name:"email",message:"Support email:",initial:"support@example.com",validate:r=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)?!0:"Please enter a valid email address."},{type:"select",name:"packageManager",message:"Which package manager would you like to use?",choices:["npm","yarn","pnpm","bun"],initial:1},{type:"input",name:"gitRemote",message:"GitHub repository URL (optional):",initial:""},{type:"confirm",name:"pushToRemote",message:"Would you like to push the changes to the remote repository?",initial:!0,skip:function(){return!this.state?.answers?.gitRemote}},{type:"input",name:"gitIssues",message:"GitHub issues URL (optional):",initial:"",skip:function(){return!this.state?.answers?.gitRemote},validate:r=>r?/^https:\/\/github\.com\/[\w-]+\/[\w.-]+\/issues$/.test(r)?!0:"Please enter a valid GitHub issues URL (e.g., https://github.com/user/repo/issues)":!0},{type:"input",name:"gitHomepage",message:"GitHub homepage URL (optional):",initial:"",skip:function(){return!this.state?.answers?.gitRemote},validate:r=>r?/^https:\/\/github\.com\/[\w-]+\/[\w.-]+#readme$/.test(r)?!0:"Please enter a valid GitHub homepage URL (e.g., https://github.com/user/repo#readme)":!0},{type:"confirm",name:"keepTemplates",message:"Do you want to keep GitHub issue and pull request templates?",initial:!1},{type:"select",name:"httpClient",message:"Which HTTP client do you want to use?",choices:["axios","fetch","both","none"],initial:1},{type:"confirm",name:"reactSecureStorage",message:"Do you want to include react-secure-storage?",initial:!0,skip:function(){let r=this.state?.answers??this.enquirer?.answers??{};return!!(r.httpClient&&r.httpClient!=="none")}},{type:"confirm",name:"darkMode",message:"Do you want to include Dark Mode (Tailwind + @teispace/next-themes)?",initial:!0},{type:"confirm",name:"redux",message:"Do you want to include Redux Toolkit?",initial:!0},{type:"confirm",name:"ws",message:"Do you want to include WebSocket support (socket.io-client + Redux bridge)?",initial:!1,skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).redux}},{type:"confirm",name:"i18n",message:"Do you want to include Internationalization (next-intl)?",initial:!0},{type:"confirm",name:"tests",message:"Do you want to include testing setup (Vitest + React Testing Library)?",initial:!0},{type:"confirm",name:"reactCompiler",message:"Do you want to enable the React Compiler?",initial:!0},{type:"confirm",name:"bundleAnalyzer",message:"Do you want to include @next/bundle-analyzer?",initial:!1},{type:"multiselect",name:"communityFiles",message:"Select community files to include:",choices:[{name:"CODE_OF_CONDUCT.md",value:"CODE_OF_CONDUCT.md"},{name:"CONTRIBUTING.md",value:"CONTRIBUTING.md"},{name:"SECURITY.md",value:"SECURITY.md"}],initial:[]},{type:"confirm",name:"readme",message:"Do you want to create a README.md?",initial:!0},{type:"confirm",name:"docker",message:"Do you want to include Docker configuration?",initial:!1},{type:"input",name:"containerName",message:"Docker Container Name:",initial:"next-app",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker},validate:r=>/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/.test(r)?!0:"Invalid Docker container name."},{type:"input",name:"imageName",message:"Docker Image Name:",initial:"nextjs-starter",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker},validate:r=>/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/.test(r)?!0:"Invalid Docker image name (must be lowercase)."},{type:"input",name:"imageTag",message:"Docker Image Tag:",initial:"latest",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker},validate:r=>/^[a-zA-Z0-9_][a-zA-Z0-9_.-]{0,127}$/.test(r)?!0:"Invalid Docker image tag."},{type:"confirm",name:"ci",message:"Do you want to include GitHub Actions (CI/CD)?",initial:!1},{type:"confirm",name:"preCommitHooks",message:"Do you want to setup pre-commit hooks (Husky, Commitlint, Lint-staged)?",initial:!0},{type:"confirm",name:"commitizen",message:"Do you want to setup Commitizen?",initial:!0},{type:"confirm",name:"copyEnv",message:"Want to copy .env.example to .env?",initial:!0}]);if(t.company=t.author,t.ws=!!t.redux&&!!t.ws,t.gitRemote&&!t.gitHomepage){let r=t.gitRemote.replace("git@github.com:","https://github.com/").replace(/\.git$/,"");t.gitHomepage=`${r}#readme`,t.gitIssues=`${r}/issues`}return t};P();import ra from"node:path";var le=async(e,t)=>{let r=na(t);await g(ra.join(e,"test/test-utils.tsx"),r)},na=({redux:e,i18n:t})=>e&&t?ia:e?oa:t?sa:aa,ia=`import { type RenderOptions, render } from '@testing-library/react';
|
|
28
28
|
import { NextIntlClientProvider } from 'next-intl';
|
|
29
29
|
import type { ReactElement, ReactNode } from 'react';
|
|
30
30
|
import { Provider } from 'react-redux';
|
|
@@ -1203,4 +1203,3 @@ Infers the kind from filename/content; pass --kind to override.`).option("--kind
|
|
|
1203
1203
|
`)),m(i)||(v(`Source file not found: ${t}`),process.exit(1));let o=await F(n);o.hasTests||(v("Testing is not installed in this project. Run `next-maker setup --tests` first."),process.exit(1));let s=await f(i),a=rm(r.kind)??nm(i,s);a||(v(`Could not infer test kind for ${ee.basename(i)}. Pass --kind component|hook|slice.`),process.exit(1));let p=im(i,a),u=om(i,a);m(u)&&!r.force&&(v(`Test file already exists: ${ee.relative(n,u)}. Use --force to overwrite.`),process.exit(1)),y.start(`Generating ${a} test...`);let d=await ae({projectPath:n,sourceFile:i,kind:a,symbolName:p,hasRedux:o.hasRedux,hasI18n:o.hasI18n,hookUsesStore:a==="hook"&&o.hasRedux&&s.includes("useAppSelector")});y.succeed("Test generated"),l(Qr.green(`
|
|
1204
1204
|
\u2728 Test '${ee.basename(d)}' created.
|
|
1205
1205
|
`)),l(Qr.dim(` \u{1F9EA} ${ee.relative(n,d)}`)),l("")}catch(n){y.fail("Test generation failed"),v(`${n}`),process.exit(1)}})},rm=e=>{if(!e)return null;if(e==="component"||e==="hook"||e==="slice")return e;throw new Error(`Invalid --kind: ${e}. Use component | hook | slice.`)},nm=(e,t)=>{let r=ee.basename(e);return/\.slice\.ts$/.test(r)?"slice":/^use[A-Z]/.test(r.replace(/\.tsx?$/,""))?"hook":r.endsWith(".tsx")?"component":/createSlice\s*\(/.test(t)?"slice":/^export\s+(const|function)\s+use[A-Z]/m.test(t)?"hook":null},im=(e,t)=>{let r=ee.basename(e).replace(/\.(tsx?|jsx?)$/i,"");return t==="slice"?j(r.replace(/\.slice$/,"")):t==="hook"?/^use[A-Z]/.test(r)?r:`use${R(r.replace(/^use-?/,""))}`:R(r)},om=(e,t)=>{let r=ee.dirname(e),n=ee.basename(e).replace(/\.(tsx?|jsx?)$/i,""),i=t==="component"?".tsx":".ts";return ee.join(r,`${n}.test${i}`)};var _s=e=>{Wn(e),Is(e),fs(e),ks(e),$s(e),Ss(e),ys(e),bi(e),Ps(e),hs(e),Es(e),Jo(e),cs(e),Do(e),Cs(e),As(e)};var am=process.emitWarning;process.emitWarning=function(e,t,r,n){if(!(typeof e=="string"&&e.includes("--localstorage-file")&&e.includes("was provided without a valid path")))return am.apply(process,arguments)};async function cm(){tn({logger:t=>St(t)});let e=new sm;e.name("next-maker").description("Teispace Next.js Project Generator").version(en.version),_s(e),e.parse()}cm().catch(e=>{let t=e&&typeof e=="object"&&"message"in e?e.message:String(e);St(`Unexpected error: ${t}`)});
|
|
1206
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -26,4 +26,3 @@ export declare function assertSafeRelativePath(relPath: string, label?: string):
|
|
|
26
26
|
* @throws Error if the resolved path escapes `root`.
|
|
27
27
|
*/
|
|
28
28
|
export declare function resolveInside(root: string, ...relativeParts: string[]): string;
|
|
29
|
-
//# sourceMappingURL=path-safety.d.ts.map
|
|
@@ -2,4 +2,3 @@ export declare const capitalize: (str: string) => string;
|
|
|
2
2
|
export declare const kebabToCamel: (str: string) => string;
|
|
3
3
|
export declare const kebabToPascal: (str: string) => string;
|
|
4
4
|
export declare const camelToKebab: (str: string) => string;
|
|
5
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/src/core/files.d.ts
CHANGED
|
@@ -5,4 +5,3 @@ export declare const deleteFile: (filePath: string) => Promise<void>;
|
|
|
5
5
|
export declare const deleteDirectory: (dirPath: string) => Promise<void>;
|
|
6
6
|
export declare const updateJson: <T = any>(filePath: string, update: (json: T) => T) => Promise<void>;
|
|
7
7
|
export declare const fileExists: (filePath: string) => boolean;
|
|
8
|
-
//# sourceMappingURL=files.d.ts.map
|
package/dist/src/core/git.d.ts
CHANGED
|
@@ -7,4 +7,3 @@ export declare function assertValidRemote(remote: string): void;
|
|
|
7
7
|
export declare const initializeGit: (cwd: string, gitRemote?: string, pushToRemote?: boolean) => Promise<void>;
|
|
8
8
|
export declare const addRemote: (cwd: string, url: string) => Promise<void>;
|
|
9
9
|
export declare const isGitInstalled: () => Promise<boolean>;
|
|
10
|
-
//# sourceMappingURL=git.d.ts.map
|
|
@@ -9,4 +9,3 @@ export declare const installDevPackages: (cwd: string, manager: PackageManager,
|
|
|
9
9
|
export declare const installDevPackage: (cwd: string, packageName: string) => Promise<void>;
|
|
10
10
|
export declare const uninstallPackages: (cwd: string, manager: PackageManager, packages: string[]) => Promise<void>;
|
|
11
11
|
export declare const uninstallPackage: (cwd: string, packageName: string) => Promise<void>;
|
|
12
|
-
//# sourceMappingURL=package-manager.d.ts.map
|
|
@@ -6,4 +6,3 @@ export declare const directoryExists: (projectPath: string, name: string, basePa
|
|
|
6
6
|
* Check if a specific file exists at projectPath/basePath/fileName.
|
|
7
7
|
*/
|
|
8
8
|
export declare const fileExistsAt: (projectPath: string, basePath: string, fileName: string) => boolean;
|
|
9
|
-
//# sourceMappingURL=existence.checker.d.ts.map
|
|
@@ -3,4 +3,3 @@ import type { ServiceGeneratorOptions } from './types';
|
|
|
3
3
|
* Generate a CRUD API service file with getAll, getById, create, update, delete methods + DTO types.
|
|
4
4
|
*/
|
|
5
5
|
export declare const generateCrudService: (options: ServiceGeneratorOptions) => Promise<void>;
|
|
6
|
-
//# sourceMappingURL=crud-service.generator.d.ts.map
|
|
@@ -17,4 +17,3 @@ export { generateSlice } from './slice.generator';
|
|
|
17
17
|
export type { GenerateTestOptions, TestKind } from './test.generator';
|
|
18
18
|
export { generateTest } from './test.generator';
|
|
19
19
|
export type { FeatureGeneratorOptions, ServiceGeneratorOptions, SliceGeneratorOptions, } from './types';
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts
CHANGED
|
@@ -21,4 +21,3 @@ export type { CodeBlockRequirement, DepKind, FeatureCheckResult, FeatureFinding,
|
|
|
21
21
|
export declare const MANIFESTS: ReadonlyArray<FeatureManifest>;
|
|
22
22
|
export declare const getManifest: (id: string) => FeatureManifest | undefined;
|
|
23
23
|
export { bundleAnalyzerManifest, commitizenManifest, darkThemeManifest, httpClientManifest, i18nManifest, reactCompilerManifest, reduxManifest, securityHeadersManifest, testsManifest, validateScriptsManifest, wsManifest, };
|
|
24
|
-
//# sourceMappingURL=index.d.ts.map
|