create-fluxstack 1.0.5 → 1.0.6
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/.claude/settings.local.json +2 -1
- package/create-fluxstack.ts +1 -0
- package/package.json +1 -1
- package/ENV_TESTING_REPORT.md +0 -292
- package/FRAMEWORK_ROADMAP.md +0 -183
- package/FRONTEND_TESTS_README.md +0 -287
- package/TEST_RESULTS.md +0 -130
- package/docs/dynamic-environment-variables.md +0 -380
- package/examples/dynamic-env-usage.ts +0 -283
- package/examples/hybrid-env-strategy.ts +0 -212
- package/examples/simplified-env-usage.ts +0 -251
- package/meu-app-teste/README.md +0 -44
- package/meu-app-teste/app/client/README.md +0 -69
- package/meu-app-teste/app/client/frontend-only.ts +0 -12
- package/meu-app-teste/app/client/index.html +0 -13
- package/meu-app-teste/app/client/public/vite.svg +0 -1
- package/meu-app-teste/app/client/src/App.css +0 -883
- package/meu-app-teste/app/client/src/App.tsx +0 -669
- package/meu-app-teste/app/client/src/assets/react.svg +0 -1
- package/meu-app-teste/app/client/src/components/TestPage.tsx +0 -453
- package/meu-app-teste/app/client/src/index.css +0 -51
- package/meu-app-teste/app/client/src/lib/eden-api.ts +0 -110
- package/meu-app-teste/app/client/src/main.tsx +0 -10
- package/meu-app-teste/app/client/src/vite-env.d.ts +0 -1
- package/meu-app-teste/app/client/tsconfig.app.json +0 -43
- package/meu-app-teste/app/client/tsconfig.json +0 -7
- package/meu-app-teste/app/client/tsconfig.node.json +0 -25
- package/meu-app-teste/app/server/app.ts +0 -10
- package/meu-app-teste/app/server/backend-only.ts +0 -15
- package/meu-app-teste/app/server/controllers/users.controller.ts +0 -69
- package/meu-app-teste/app/server/index.ts +0 -104
- package/meu-app-teste/app/server/routes/index.ts +0 -25
- package/meu-app-teste/app/server/routes/users.routes.ts +0 -121
- package/meu-app-teste/app/server/types/index.ts +0 -1
- package/meu-app-teste/app/shared/types/index.ts +0 -18
- package/meu-app-teste/bun.lock +0 -1053
- package/meu-app-teste/core/__tests__/integration.test.ts +0 -227
- package/meu-app-teste/core/build/index.ts +0 -186
- package/meu-app-teste/core/cli/command-registry.ts +0 -334
- package/meu-app-teste/core/cli/index.ts +0 -394
- package/meu-app-teste/core/cli/plugin-discovery.ts +0 -200
- package/meu-app-teste/core/client/standalone.ts +0 -57
- package/meu-app-teste/core/config/__tests__/config-loader.test.ts +0 -591
- package/meu-app-teste/core/config/__tests__/config-merger.test.ts +0 -657
- package/meu-app-teste/core/config/__tests__/env-converter.test.ts +0 -372
- package/meu-app-teste/core/config/__tests__/env-processor.test.ts +0 -431
- package/meu-app-teste/core/config/__tests__/env.test.ts +0 -452
- package/meu-app-teste/core/config/__tests__/integration.test.ts +0 -418
- package/meu-app-teste/core/config/__tests__/loader.test.ts +0 -331
- package/meu-app-teste/core/config/__tests__/schema.test.ts +0 -129
- package/meu-app-teste/core/config/__tests__/validator.test.ts +0 -318
- package/meu-app-teste/core/config/env-dynamic.ts +0 -326
- package/meu-app-teste/core/config/env.ts +0 -597
- package/meu-app-teste/core/config/index.ts +0 -317
- package/meu-app-teste/core/config/loader.ts +0 -546
- package/meu-app-teste/core/config/runtime-config.ts +0 -322
- package/meu-app-teste/core/config/schema.ts +0 -694
- package/meu-app-teste/core/config/validator.ts +0 -540
- package/meu-app-teste/core/framework/__tests__/server.test.ts +0 -233
- package/meu-app-teste/core/framework/client.ts +0 -132
- package/meu-app-teste/core/framework/index.ts +0 -8
- package/meu-app-teste/core/framework/server.ts +0 -501
- package/meu-app-teste/core/framework/types.ts +0 -63
- package/meu-app-teste/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/meu-app-teste/core/plugins/__tests__/manager.test.ts +0 -398
- package/meu-app-teste/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/meu-app-teste/core/plugins/__tests__/registry.test.ts +0 -335
- package/meu-app-teste/core/plugins/built-in/index.ts +0 -142
- package/meu-app-teste/core/plugins/built-in/logger/index.ts +0 -180
- package/meu-app-teste/core/plugins/built-in/monitoring/README.md +0 -193
- package/meu-app-teste/core/plugins/built-in/monitoring/index.ts +0 -912
- package/meu-app-teste/core/plugins/built-in/static/index.ts +0 -289
- package/meu-app-teste/core/plugins/built-in/swagger/index.ts +0 -229
- package/meu-app-teste/core/plugins/built-in/vite/index.ts +0 -316
- package/meu-app-teste/core/plugins/config.ts +0 -348
- package/meu-app-teste/core/plugins/discovery.ts +0 -350
- package/meu-app-teste/core/plugins/executor.ts +0 -351
- package/meu-app-teste/core/plugins/index.ts +0 -195
- package/meu-app-teste/core/plugins/manager.ts +0 -583
- package/meu-app-teste/core/plugins/registry.ts +0 -424
- package/meu-app-teste/core/plugins/types.ts +0 -254
- package/meu-app-teste/core/server/framework.ts +0 -123
- package/meu-app-teste/core/server/index.ts +0 -8
- package/meu-app-teste/core/server/plugins/database.ts +0 -182
- package/meu-app-teste/core/server/plugins/logger.ts +0 -47
- package/meu-app-teste/core/server/plugins/swagger.ts +0 -34
- package/meu-app-teste/core/server/standalone.ts +0 -91
- package/meu-app-teste/core/templates/create-project.ts +0 -455
- package/meu-app-teste/core/types/api.ts +0 -169
- package/meu-app-teste/core/types/build.ts +0 -174
- package/meu-app-teste/core/types/config.ts +0 -68
- package/meu-app-teste/core/types/index.ts +0 -127
- package/meu-app-teste/core/types/plugin.ts +0 -94
- package/meu-app-teste/core/utils/__tests__/errors.test.ts +0 -139
- package/meu-app-teste/core/utils/__tests__/helpers.test.ts +0 -297
- package/meu-app-teste/core/utils/__tests__/logger.test.ts +0 -141
- package/meu-app-teste/core/utils/env-runtime-v2.ts +0 -232
- package/meu-app-teste/core/utils/env-runtime.ts +0 -252
- package/meu-app-teste/core/utils/errors/codes.ts +0 -115
- package/meu-app-teste/core/utils/errors/handlers.ts +0 -63
- package/meu-app-teste/core/utils/errors/index.ts +0 -81
- package/meu-app-teste/core/utils/helpers.ts +0 -180
- package/meu-app-teste/core/utils/index.ts +0 -18
- package/meu-app-teste/core/utils/logger/index.ts +0 -161
- package/meu-app-teste/core/utils/logger.ts +0 -106
- package/meu-app-teste/core/utils/monitoring/index.ts +0 -212
- package/meu-app-teste/package.json +0 -92
- package/meu-app-teste/tsconfig.json +0 -51
- package/meu-app-teste/vite.config.ts +0 -42
- package/my-final-test/README.md +0 -44
- package/my-final-test/app/client/README.md +0 -69
- package/my-final-test/app/client/frontend-only.ts +0 -12
- package/my-final-test/app/client/index.html +0 -13
- package/my-final-test/app/client/public/vite.svg +0 -1
- package/my-final-test/app/client/src/App.css +0 -883
- package/my-final-test/app/client/src/App.tsx +0 -669
- package/my-final-test/app/client/src/assets/react.svg +0 -1
- package/my-final-test/app/client/src/components/TestPage.tsx +0 -453
- package/my-final-test/app/client/src/index.css +0 -51
- package/my-final-test/app/client/src/lib/eden-api.ts +0 -110
- package/my-final-test/app/client/src/main.tsx +0 -10
- package/my-final-test/app/client/src/vite-env.d.ts +0 -1
- package/my-final-test/app/client/tsconfig.app.json +0 -43
- package/my-final-test/app/client/tsconfig.json +0 -7
- package/my-final-test/app/client/tsconfig.node.json +0 -25
- package/my-final-test/app/server/app.ts +0 -10
- package/my-final-test/app/server/backend-only.ts +0 -15
- package/my-final-test/app/server/controllers/users.controller.ts +0 -69
- package/my-final-test/app/server/index.ts +0 -104
- package/my-final-test/app/server/routes/index.ts +0 -25
- package/my-final-test/app/server/routes/users.routes.ts +0 -121
- package/my-final-test/app/server/types/index.ts +0 -1
- package/my-final-test/app/shared/types/index.ts +0 -18
- package/my-final-test/bun.lock +0 -993
- package/my-final-test/core/__tests__/integration.test.ts +0 -227
- package/my-final-test/core/build/index.ts +0 -186
- package/my-final-test/core/cli/command-registry.ts +0 -334
- package/my-final-test/core/cli/index.ts +0 -394
- package/my-final-test/core/cli/plugin-discovery.ts +0 -200
- package/my-final-test/core/client/standalone.ts +0 -57
- package/my-final-test/core/config/__tests__/config-loader.test.ts +0 -591
- package/my-final-test/core/config/__tests__/config-merger.test.ts +0 -657
- package/my-final-test/core/config/__tests__/env-converter.test.ts +0 -372
- package/my-final-test/core/config/__tests__/env-processor.test.ts +0 -431
- package/my-final-test/core/config/__tests__/env.test.ts +0 -452
- package/my-final-test/core/config/__tests__/integration.test.ts +0 -418
- package/my-final-test/core/config/__tests__/loader.test.ts +0 -331
- package/my-final-test/core/config/__tests__/schema.test.ts +0 -129
- package/my-final-test/core/config/__tests__/validator.test.ts +0 -318
- package/my-final-test/core/config/env-dynamic.ts +0 -326
- package/my-final-test/core/config/env.ts +0 -597
- package/my-final-test/core/config/index.ts +0 -317
- package/my-final-test/core/config/loader.ts +0 -546
- package/my-final-test/core/config/runtime-config.ts +0 -322
- package/my-final-test/core/config/schema.ts +0 -694
- package/my-final-test/core/config/validator.ts +0 -540
- package/my-final-test/core/framework/__tests__/server.test.ts +0 -233
- package/my-final-test/core/framework/client.ts +0 -132
- package/my-final-test/core/framework/index.ts +0 -8
- package/my-final-test/core/framework/server.ts +0 -501
- package/my-final-test/core/framework/types.ts +0 -63
- package/my-final-test/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/my-final-test/core/plugins/__tests__/manager.test.ts +0 -398
- package/my-final-test/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/my-final-test/core/plugins/__tests__/registry.test.ts +0 -335
- package/my-final-test/core/plugins/built-in/index.ts +0 -142
- package/my-final-test/core/plugins/built-in/logger/index.ts +0 -180
- package/my-final-test/core/plugins/built-in/monitoring/README.md +0 -193
- package/my-final-test/core/plugins/built-in/monitoring/index.ts +0 -912
- package/my-final-test/core/plugins/built-in/static/index.ts +0 -289
- package/my-final-test/core/plugins/built-in/swagger/index.ts +0 -229
- package/my-final-test/core/plugins/built-in/vite/index.ts +0 -316
- package/my-final-test/core/plugins/config.ts +0 -348
- package/my-final-test/core/plugins/discovery.ts +0 -350
- package/my-final-test/core/plugins/executor.ts +0 -351
- package/my-final-test/core/plugins/index.ts +0 -195
- package/my-final-test/core/plugins/manager.ts +0 -583
- package/my-final-test/core/plugins/registry.ts +0 -424
- package/my-final-test/core/plugins/types.ts +0 -254
- package/my-final-test/core/server/framework.ts +0 -123
- package/my-final-test/core/server/index.ts +0 -8
- package/my-final-test/core/server/plugins/database.ts +0 -182
- package/my-final-test/core/server/plugins/logger.ts +0 -47
- package/my-final-test/core/server/plugins/swagger.ts +0 -34
- package/my-final-test/core/server/standalone.ts +0 -91
- package/my-final-test/core/templates/create-project.ts +0 -455
- package/my-final-test/core/types/api.ts +0 -169
- package/my-final-test/core/types/build.ts +0 -174
- package/my-final-test/core/types/config.ts +0 -68
- package/my-final-test/core/types/index.ts +0 -127
- package/my-final-test/core/types/plugin.ts +0 -94
- package/my-final-test/core/utils/__tests__/errors.test.ts +0 -139
- package/my-final-test/core/utils/__tests__/helpers.test.ts +0 -297
- package/my-final-test/core/utils/__tests__/logger.test.ts +0 -141
- package/my-final-test/core/utils/env-runtime-v2.ts +0 -232
- package/my-final-test/core/utils/env-runtime.ts +0 -252
- package/my-final-test/core/utils/errors/codes.ts +0 -115
- package/my-final-test/core/utils/errors/handlers.ts +0 -63
- package/my-final-test/core/utils/errors/index.ts +0 -81
- package/my-final-test/core/utils/helpers.ts +0 -180
- package/my-final-test/core/utils/index.ts +0 -18
- package/my-final-test/core/utils/logger/index.ts +0 -161
- package/my-final-test/core/utils/logger.ts +0 -106
- package/my-final-test/core/utils/monitoring/index.ts +0 -212
- package/my-final-test/package.json +0 -68
- package/my-final-test/tsconfig.json +0 -51
- package/my-final-test/vite.config.ts +0 -42
- package/publish-setup.md +0 -111
- package/teste-corrigido/README.md +0 -44
- package/teste-corrigido/app/client/README.md +0 -69
- package/teste-corrigido/app/client/frontend-only.ts +0 -12
- package/teste-corrigido/app/client/index.html +0 -13
- package/teste-corrigido/app/client/public/vite.svg +0 -1
- package/teste-corrigido/app/client/src/App.css +0 -883
- package/teste-corrigido/app/client/src/App.tsx +0 -669
- package/teste-corrigido/app/client/src/assets/react.svg +0 -1
- package/teste-corrigido/app/client/src/components/TestPage.tsx +0 -453
- package/teste-corrigido/app/client/src/index.css +0 -51
- package/teste-corrigido/app/client/src/lib/eden-api.ts +0 -110
- package/teste-corrigido/app/client/src/main.tsx +0 -10
- package/teste-corrigido/app/client/src/vite-env.d.ts +0 -1
- package/teste-corrigido/app/client/tsconfig.app.json +0 -43
- package/teste-corrigido/app/client/tsconfig.json +0 -7
- package/teste-corrigido/app/client/tsconfig.node.json +0 -25
- package/teste-corrigido/app/server/app.ts +0 -10
- package/teste-corrigido/app/server/backend-only.ts +0 -15
- package/teste-corrigido/app/server/controllers/users.controller.ts +0 -69
- package/teste-corrigido/app/server/index.ts +0 -104
- package/teste-corrigido/app/server/routes/index.ts +0 -25
- package/teste-corrigido/app/server/routes/users.routes.ts +0 -121
- package/teste-corrigido/app/server/types/index.ts +0 -1
- package/teste-corrigido/app/shared/types/index.ts +0 -18
- package/teste-corrigido/bun.lock +0 -1053
- package/teste-corrigido/core/__tests__/integration.test.ts +0 -227
- package/teste-corrigido/core/build/index.ts +0 -186
- package/teste-corrigido/core/cli/command-registry.ts +0 -334
- package/teste-corrigido/core/cli/index.ts +0 -394
- package/teste-corrigido/core/cli/plugin-discovery.ts +0 -200
- package/teste-corrigido/core/client/standalone.ts +0 -57
- package/teste-corrigido/core/config/__tests__/config-loader.test.ts +0 -591
- package/teste-corrigido/core/config/__tests__/config-merger.test.ts +0 -657
- package/teste-corrigido/core/config/__tests__/env-converter.test.ts +0 -372
- package/teste-corrigido/core/config/__tests__/env-processor.test.ts +0 -431
- package/teste-corrigido/core/config/__tests__/env.test.ts +0 -452
- package/teste-corrigido/core/config/__tests__/integration.test.ts +0 -418
- package/teste-corrigido/core/config/__tests__/loader.test.ts +0 -331
- package/teste-corrigido/core/config/__tests__/schema.test.ts +0 -129
- package/teste-corrigido/core/config/__tests__/validator.test.ts +0 -318
- package/teste-corrigido/core/config/env-dynamic.ts +0 -326
- package/teste-corrigido/core/config/env.ts +0 -597
- package/teste-corrigido/core/config/index.ts +0 -317
- package/teste-corrigido/core/config/loader.ts +0 -546
- package/teste-corrigido/core/config/runtime-config.ts +0 -322
- package/teste-corrigido/core/config/schema.ts +0 -694
- package/teste-corrigido/core/config/validator.ts +0 -540
- package/teste-corrigido/core/framework/__tests__/server.test.ts +0 -233
- package/teste-corrigido/core/framework/client.ts +0 -132
- package/teste-corrigido/core/framework/index.ts +0 -8
- package/teste-corrigido/core/framework/server.ts +0 -501
- package/teste-corrigido/core/framework/types.ts +0 -63
- package/teste-corrigido/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/teste-corrigido/core/plugins/__tests__/manager.test.ts +0 -398
- package/teste-corrigido/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/teste-corrigido/core/plugins/__tests__/registry.test.ts +0 -335
- package/teste-corrigido/core/plugins/built-in/index.ts +0 -142
- package/teste-corrigido/core/plugins/built-in/logger/index.ts +0 -180
- package/teste-corrigido/core/plugins/built-in/monitoring/README.md +0 -193
- package/teste-corrigido/core/plugins/built-in/monitoring/index.ts +0 -912
- package/teste-corrigido/core/plugins/built-in/static/index.ts +0 -289
- package/teste-corrigido/core/plugins/built-in/swagger/index.ts +0 -229
- package/teste-corrigido/core/plugins/built-in/vite/index.ts +0 -316
- package/teste-corrigido/core/plugins/config.ts +0 -348
- package/teste-corrigido/core/plugins/discovery.ts +0 -350
- package/teste-corrigido/core/plugins/executor.ts +0 -351
- package/teste-corrigido/core/plugins/index.ts +0 -195
- package/teste-corrigido/core/plugins/manager.ts +0 -583
- package/teste-corrigido/core/plugins/registry.ts +0 -424
- package/teste-corrigido/core/plugins/types.ts +0 -254
- package/teste-corrigido/core/server/framework.ts +0 -123
- package/teste-corrigido/core/server/index.ts +0 -8
- package/teste-corrigido/core/server/plugins/database.ts +0 -182
- package/teste-corrigido/core/server/plugins/logger.ts +0 -47
- package/teste-corrigido/core/server/plugins/swagger.ts +0 -34
- package/teste-corrigido/core/server/standalone.ts +0 -91
- package/teste-corrigido/core/templates/create-project.ts +0 -455
- package/teste-corrigido/core/types/api.ts +0 -169
- package/teste-corrigido/core/types/build.ts +0 -174
- package/teste-corrigido/core/types/config.ts +0 -68
- package/teste-corrigido/core/types/index.ts +0 -127
- package/teste-corrigido/core/types/plugin.ts +0 -94
- package/teste-corrigido/core/utils/__tests__/errors.test.ts +0 -139
- package/teste-corrigido/core/utils/__tests__/helpers.test.ts +0 -297
- package/teste-corrigido/core/utils/__tests__/logger.test.ts +0 -141
- package/teste-corrigido/core/utils/env-runtime-v2.ts +0 -232
- package/teste-corrigido/core/utils/env-runtime.ts +0 -252
- package/teste-corrigido/core/utils/errors/codes.ts +0 -115
- package/teste-corrigido/core/utils/errors/handlers.ts +0 -63
- package/teste-corrigido/core/utils/errors/index.ts +0 -81
- package/teste-corrigido/core/utils/helpers.ts +0 -180
- package/teste-corrigido/core/utils/index.ts +0 -18
- package/teste-corrigido/core/utils/logger/index.ts +0 -161
- package/teste-corrigido/core/utils/logger.ts +0 -106
- package/teste-corrigido/core/utils/monitoring/index.ts +0 -212
- package/teste-corrigido/package-template.json +0 -51
- package/teste-corrigido/package.json +0 -51
- package/teste-corrigido/tsconfig.json +0 -51
- package/teste-corrigido/vite.config.ts +0 -42
- package/teste-final-npm/README.md +0 -44
- package/teste-final-npm/app/client/README.md +0 -69
- package/teste-final-npm/app/client/frontend-only.ts +0 -12
- package/teste-final-npm/app/client/index.html +0 -13
- package/teste-final-npm/app/client/public/vite.svg +0 -1
- package/teste-final-npm/app/client/src/App.css +0 -883
- package/teste-final-npm/app/client/src/App.tsx +0 -669
- package/teste-final-npm/app/client/src/assets/react.svg +0 -1
- package/teste-final-npm/app/client/src/components/TestPage.tsx +0 -453
- package/teste-final-npm/app/client/src/index.css +0 -51
- package/teste-final-npm/app/client/src/lib/eden-api.ts +0 -110
- package/teste-final-npm/app/client/src/main.tsx +0 -10
- package/teste-final-npm/app/client/src/vite-env.d.ts +0 -1
- package/teste-final-npm/app/client/tsconfig.app.json +0 -43
- package/teste-final-npm/app/client/tsconfig.json +0 -7
- package/teste-final-npm/app/client/tsconfig.node.json +0 -25
- package/teste-final-npm/app/server/app.ts +0 -10
- package/teste-final-npm/app/server/backend-only.ts +0 -15
- package/teste-final-npm/app/server/controllers/users.controller.ts +0 -69
- package/teste-final-npm/app/server/index.ts +0 -104
- package/teste-final-npm/app/server/routes/index.ts +0 -25
- package/teste-final-npm/app/server/routes/users.routes.ts +0 -121
- package/teste-final-npm/app/server/types/index.ts +0 -1
- package/teste-final-npm/app/shared/types/index.ts +0 -18
- package/teste-final-npm/bun.lock +0 -1053
- package/teste-final-npm/core/__tests__/integration.test.ts +0 -227
- package/teste-final-npm/core/build/index.ts +0 -186
- package/teste-final-npm/core/cli/command-registry.ts +0 -334
- package/teste-final-npm/core/cli/index.ts +0 -394
- package/teste-final-npm/core/cli/plugin-discovery.ts +0 -200
- package/teste-final-npm/core/client/standalone.ts +0 -57
- package/teste-final-npm/core/config/__tests__/config-loader.test.ts +0 -591
- package/teste-final-npm/core/config/__tests__/config-merger.test.ts +0 -657
- package/teste-final-npm/core/config/__tests__/env-converter.test.ts +0 -372
- package/teste-final-npm/core/config/__tests__/env-processor.test.ts +0 -431
- package/teste-final-npm/core/config/__tests__/env.test.ts +0 -452
- package/teste-final-npm/core/config/__tests__/integration.test.ts +0 -418
- package/teste-final-npm/core/config/__tests__/loader.test.ts +0 -331
- package/teste-final-npm/core/config/__tests__/schema.test.ts +0 -129
- package/teste-final-npm/core/config/__tests__/validator.test.ts +0 -318
- package/teste-final-npm/core/config/env-dynamic.ts +0 -326
- package/teste-final-npm/core/config/env.ts +0 -597
- package/teste-final-npm/core/config/index.ts +0 -317
- package/teste-final-npm/core/config/loader.ts +0 -546
- package/teste-final-npm/core/config/runtime-config.ts +0 -322
- package/teste-final-npm/core/config/schema.ts +0 -694
- package/teste-final-npm/core/config/validator.ts +0 -540
- package/teste-final-npm/core/framework/__tests__/server.test.ts +0 -233
- package/teste-final-npm/core/framework/client.ts +0 -132
- package/teste-final-npm/core/framework/index.ts +0 -8
- package/teste-final-npm/core/framework/server.ts +0 -501
- package/teste-final-npm/core/framework/types.ts +0 -63
- package/teste-final-npm/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/teste-final-npm/core/plugins/__tests__/manager.test.ts +0 -398
- package/teste-final-npm/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/teste-final-npm/core/plugins/__tests__/registry.test.ts +0 -335
- package/teste-final-npm/core/plugins/built-in/index.ts +0 -142
- package/teste-final-npm/core/plugins/built-in/logger/index.ts +0 -180
- package/teste-final-npm/core/plugins/built-in/monitoring/README.md +0 -193
- package/teste-final-npm/core/plugins/built-in/monitoring/index.ts +0 -912
- package/teste-final-npm/core/plugins/built-in/static/index.ts +0 -289
- package/teste-final-npm/core/plugins/built-in/swagger/index.ts +0 -229
- package/teste-final-npm/core/plugins/built-in/vite/index.ts +0 -316
- package/teste-final-npm/core/plugins/config.ts +0 -348
- package/teste-final-npm/core/plugins/discovery.ts +0 -350
- package/teste-final-npm/core/plugins/executor.ts +0 -351
- package/teste-final-npm/core/plugins/index.ts +0 -195
- package/teste-final-npm/core/plugins/manager.ts +0 -583
- package/teste-final-npm/core/plugins/registry.ts +0 -424
- package/teste-final-npm/core/plugins/types.ts +0 -254
- package/teste-final-npm/core/server/framework.ts +0 -123
- package/teste-final-npm/core/server/index.ts +0 -8
- package/teste-final-npm/core/server/plugins/database.ts +0 -182
- package/teste-final-npm/core/server/plugins/logger.ts +0 -47
- package/teste-final-npm/core/server/plugins/swagger.ts +0 -34
- package/teste-final-npm/core/server/standalone.ts +0 -91
- package/teste-final-npm/core/templates/create-project.ts +0 -455
- package/teste-final-npm/core/types/api.ts +0 -169
- package/teste-final-npm/core/types/build.ts +0 -174
- package/teste-final-npm/core/types/config.ts +0 -68
- package/teste-final-npm/core/types/index.ts +0 -127
- package/teste-final-npm/core/types/plugin.ts +0 -94
- package/teste-final-npm/core/utils/__tests__/errors.test.ts +0 -139
- package/teste-final-npm/core/utils/__tests__/helpers.test.ts +0 -297
- package/teste-final-npm/core/utils/__tests__/logger.test.ts +0 -141
- package/teste-final-npm/core/utils/env-runtime-v2.ts +0 -232
- package/teste-final-npm/core/utils/env-runtime.ts +0 -252
- package/teste-final-npm/core/utils/errors/codes.ts +0 -115
- package/teste-final-npm/core/utils/errors/handlers.ts +0 -63
- package/teste-final-npm/core/utils/errors/index.ts +0 -81
- package/teste-final-npm/core/utils/helpers.ts +0 -180
- package/teste-final-npm/core/utils/index.ts +0 -18
- package/teste-final-npm/core/utils/logger/index.ts +0 -161
- package/teste-final-npm/core/utils/logger.ts +0 -106
- package/teste-final-npm/core/utils/monitoring/index.ts +0 -212
- package/teste-final-npm/package-template.json +0 -51
- package/teste-final-npm/package.json +0 -51
- package/teste-final-npm/tsconfig.json +0 -51
- package/teste-final-npm/vite.config.ts +0 -42
|
@@ -1,455 +0,0 @@
|
|
|
1
|
-
import { spawn } from "bun"
|
|
2
|
-
import { join, resolve } from "path"
|
|
3
|
-
import { mkdir } from "fs/promises"
|
|
4
|
-
|
|
5
|
-
export interface CreateProjectOptions {
|
|
6
|
-
name: string
|
|
7
|
-
targetDir?: string
|
|
8
|
-
template?: 'basic' | 'full'
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class ProjectCreator {
|
|
12
|
-
private projectName: string
|
|
13
|
-
private targetDir: string
|
|
14
|
-
|
|
15
|
-
constructor(options: CreateProjectOptions) {
|
|
16
|
-
this.projectName = options.name
|
|
17
|
-
this.targetDir = options.targetDir || resolve(process.cwd(), options.name)
|
|
18
|
-
// Template option available but basic template is used for now
|
|
19
|
-
// const template = options.template || 'basic'
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async create() {
|
|
23
|
-
console.log(`🎉 Creating FluxStack project: ${this.projectName}`)
|
|
24
|
-
console.log(`📁 Target directory: ${this.targetDir}`)
|
|
25
|
-
console.log()
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
// 1. Create project directory
|
|
29
|
-
await this.createDirectory()
|
|
30
|
-
|
|
31
|
-
// 2. Copy template files
|
|
32
|
-
await this.copyTemplate()
|
|
33
|
-
|
|
34
|
-
// 3. Generate package.json
|
|
35
|
-
await this.generatePackageJson()
|
|
36
|
-
|
|
37
|
-
// 4. Generate config files
|
|
38
|
-
await this.generateConfigFiles()
|
|
39
|
-
|
|
40
|
-
// 5. Install dependencies
|
|
41
|
-
await this.installDependencies()
|
|
42
|
-
|
|
43
|
-
// 6. Initialize git
|
|
44
|
-
await this.initGit()
|
|
45
|
-
|
|
46
|
-
console.log()
|
|
47
|
-
console.log("🎉 Project created successfully!")
|
|
48
|
-
console.log()
|
|
49
|
-
console.log("Next steps:")
|
|
50
|
-
console.log(` cd ${this.projectName}`)
|
|
51
|
-
console.log(` bun run dev`)
|
|
52
|
-
console.log()
|
|
53
|
-
console.log("Happy coding! 🚀")
|
|
54
|
-
|
|
55
|
-
} catch (error) {
|
|
56
|
-
console.error("❌ Error creating project:", error instanceof Error ? error.message : String(error))
|
|
57
|
-
process.exit(1)
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
private async createDirectory() {
|
|
62
|
-
console.log("📁 Creating project directory...")
|
|
63
|
-
await mkdir(this.targetDir, { recursive: true })
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
private async copyTemplate() {
|
|
67
|
-
console.log("📋 Copying template files...")
|
|
68
|
-
|
|
69
|
-
// Copy files using Bun's built-in functions for better performance
|
|
70
|
-
const rootDir = join(__dirname, '..', '..')
|
|
71
|
-
|
|
72
|
-
// Copy app structure (exclude node_modules and dist)
|
|
73
|
-
await this.copyDirectory(
|
|
74
|
-
join(rootDir, 'app'),
|
|
75
|
-
join(this.targetDir, 'app'),
|
|
76
|
-
['node_modules', 'dist', '.vite']
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
// Copy core framework (exclude node_modules)
|
|
80
|
-
await this.copyDirectory(
|
|
81
|
-
join(rootDir, 'core'),
|
|
82
|
-
join(this.targetDir, 'core'),
|
|
83
|
-
['node_modules']
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
// Copy config
|
|
87
|
-
await this.copyDirectory(
|
|
88
|
-
join(rootDir, 'config'),
|
|
89
|
-
join(this.targetDir, 'config')
|
|
90
|
-
)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
private async copyDirectory(src: string, dest: string, exclude: string[] = []) {
|
|
94
|
-
await mkdir(dest, { recursive: true })
|
|
95
|
-
|
|
96
|
-
const entries = await Bun.file(src).exists() ?
|
|
97
|
-
await (await import("fs/promises")).readdir(src, { withFileTypes: true }) : []
|
|
98
|
-
|
|
99
|
-
for (const entry of entries) {
|
|
100
|
-
if (exclude.includes(entry.name)) continue
|
|
101
|
-
|
|
102
|
-
const srcPath = join(src, entry.name)
|
|
103
|
-
const destPath = join(dest, entry.name)
|
|
104
|
-
|
|
105
|
-
if (entry.isDirectory()) {
|
|
106
|
-
await this.copyDirectory(srcPath, destPath, exclude)
|
|
107
|
-
} else {
|
|
108
|
-
const content = await Bun.file(srcPath).text()
|
|
109
|
-
await Bun.write(destPath, content)
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
private async generatePackageJson() {
|
|
115
|
-
console.log("📦 Generating package.json...")
|
|
116
|
-
|
|
117
|
-
const packageJson = {
|
|
118
|
-
name: this.projectName,
|
|
119
|
-
version: "1.0.0",
|
|
120
|
-
description: `FluxStack project: ${this.projectName}`,
|
|
121
|
-
keywords: ["fluxstack", "full-stack", "typescript", "elysia", "react", "bun"],
|
|
122
|
-
author: "FluxStack Developer",
|
|
123
|
-
license: "MIT",
|
|
124
|
-
module: "app/server/index.ts",
|
|
125
|
-
type: "module",
|
|
126
|
-
bin: {
|
|
127
|
-
flux: "./core/cli/index.ts"
|
|
128
|
-
},
|
|
129
|
-
scripts: {
|
|
130
|
-
dev: "bun run core/cli/index.ts dev",
|
|
131
|
-
"dev:frontend": "bun run core/cli/index.ts frontend",
|
|
132
|
-
"dev:backend": "bun run core/cli/index.ts backend",
|
|
133
|
-
build: "bun run core/cli/index.ts build",
|
|
134
|
-
"build:frontend": "bun run core/cli/index.ts build:frontend",
|
|
135
|
-
"build:backend": "bun run core/cli/index.ts build:backend",
|
|
136
|
-
start: "bun run core/cli/index.ts start",
|
|
137
|
-
test: "vitest",
|
|
138
|
-
"test:ui": "vitest --ui",
|
|
139
|
-
"test:run": "vitest run",
|
|
140
|
-
"test:coverage": "vitest run --coverage",
|
|
141
|
-
"test:watch": "vitest --watch"
|
|
142
|
-
},
|
|
143
|
-
devDependencies: {
|
|
144
|
-
"@types/bun": "latest",
|
|
145
|
-
"@types/react": "^18.2.0",
|
|
146
|
-
"@types/react-dom": "^18.2.0",
|
|
147
|
-
"@testing-library/react": "^14.0.0",
|
|
148
|
-
"@testing-library/jest-dom": "^6.1.0",
|
|
149
|
-
"@testing-library/user-event": "^14.5.0",
|
|
150
|
-
"@vitest/ui": "^1.0.0",
|
|
151
|
-
"@vitest/coverage-v8": "^1.0.0",
|
|
152
|
-
"jsdom": "^23.0.0",
|
|
153
|
-
typescript: "^5.0.0",
|
|
154
|
-
vitest: "^1.0.0"
|
|
155
|
-
},
|
|
156
|
-
dependencies: {
|
|
157
|
-
"@elysiajs/eden": "^1.3.2",
|
|
158
|
-
"@vitejs/plugin-react": "^4.0.0",
|
|
159
|
-
elysia: "latest",
|
|
160
|
-
react: "^18.2.0",
|
|
161
|
-
"react-dom": "^18.2.0",
|
|
162
|
-
vite: "^5.0.0"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
await Bun.write(
|
|
167
|
-
join(this.targetDir, "package.json"),
|
|
168
|
-
JSON.stringify(packageJson, null, 2)
|
|
169
|
-
)
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
private async generateConfigFiles() {
|
|
173
|
-
console.log("⚙️ Generating config files...")
|
|
174
|
-
|
|
175
|
-
// TypeScript config
|
|
176
|
-
const tsConfig = {
|
|
177
|
-
compilerOptions: {
|
|
178
|
-
lib: ["ESNext", "DOM"],
|
|
179
|
-
target: "ESNext",
|
|
180
|
-
module: "ESNext",
|
|
181
|
-
moduleDetection: "force",
|
|
182
|
-
jsx: "react-jsx",
|
|
183
|
-
allowJs: true,
|
|
184
|
-
moduleResolution: "bundler",
|
|
185
|
-
allowImportingTsExtensions: true,
|
|
186
|
-
verbatimModuleSyntax: true,
|
|
187
|
-
noEmit: true,
|
|
188
|
-
baseUrl: ".",
|
|
189
|
-
paths: {
|
|
190
|
-
"@/*": ["./*"],
|
|
191
|
-
"@/core/*": ["./core/*"],
|
|
192
|
-
"@/app/*": ["./app/*"],
|
|
193
|
-
"@/config/*": ["./config/*"],
|
|
194
|
-
"@/shared/*": ["./app/shared/*"]
|
|
195
|
-
},
|
|
196
|
-
strict: true,
|
|
197
|
-
skipLibCheck: true,
|
|
198
|
-
noFallthroughCasesInSwitch: true,
|
|
199
|
-
noUnusedLocals: false,
|
|
200
|
-
noUnusedParameters: false,
|
|
201
|
-
noPropertyAccessFromIndexSignature: false
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
await Bun.write(
|
|
206
|
-
join(this.targetDir, "tsconfig.json"),
|
|
207
|
-
JSON.stringify(tsConfig, null, 2)
|
|
208
|
-
)
|
|
209
|
-
|
|
210
|
-
// Bun config
|
|
211
|
-
const bunConfig = `# FluxStack Bun Configuration
|
|
212
|
-
[build]
|
|
213
|
-
target = "bun"
|
|
214
|
-
|
|
215
|
-
[install]
|
|
216
|
-
cache = true
|
|
217
|
-
lockfile = true
|
|
218
|
-
|
|
219
|
-
# Path mapping (alias support)
|
|
220
|
-
[build.alias]
|
|
221
|
-
"@" = "."
|
|
222
|
-
"@/core" = "./core"
|
|
223
|
-
"@/app" = "./app"
|
|
224
|
-
"@/config" = "./config"
|
|
225
|
-
"@/shared" = "./app/shared"
|
|
226
|
-
`
|
|
227
|
-
|
|
228
|
-
await Bun.write(join(this.targetDir, "bunfig.toml"), bunConfig)
|
|
229
|
-
|
|
230
|
-
// Environment file
|
|
231
|
-
const envContent = `# FluxStack Environment Variables
|
|
232
|
-
|
|
233
|
-
# Development Mode
|
|
234
|
-
NODE_ENV=development
|
|
235
|
-
|
|
236
|
-
# Server Configuration
|
|
237
|
-
PORT=3000
|
|
238
|
-
HOST=localhost
|
|
239
|
-
|
|
240
|
-
# Frontend Configuration
|
|
241
|
-
FRONTEND_PORT=5173
|
|
242
|
-
VITE_API_URL=http://localhost:3000
|
|
243
|
-
|
|
244
|
-
# Backend Configuration
|
|
245
|
-
BACKEND_PORT=3001
|
|
246
|
-
API_URL=http://localhost:3001
|
|
247
|
-
|
|
248
|
-
# CORS Configuration
|
|
249
|
-
CORS_ORIGINS=http://localhost:3000,http://localhost:5173
|
|
250
|
-
CORS_METHODS=GET,POST,PUT,DELETE,OPTIONS
|
|
251
|
-
CORS_HEADERS=Content-Type,Authorization
|
|
252
|
-
|
|
253
|
-
# Logging
|
|
254
|
-
LOG_LEVEL=info
|
|
255
|
-
|
|
256
|
-
# Build Configuration
|
|
257
|
-
BUILD_TARGET=bun
|
|
258
|
-
BUILD_OUTDIR=dist
|
|
259
|
-
|
|
260
|
-
# Database (optional - uncomment to use)
|
|
261
|
-
# DATABASE_URL=postgresql://user:password@localhost:5432/${this.projectName}
|
|
262
|
-
# DATABASE_HOST=localhost
|
|
263
|
-
# DATABASE_PORT=5432
|
|
264
|
-
# DATABASE_NAME=${this.projectName}
|
|
265
|
-
# DATABASE_USER=user
|
|
266
|
-
# DATABASE_PASSWORD=password
|
|
267
|
-
|
|
268
|
-
# Authentication (optional - uncomment to use)
|
|
269
|
-
# JWT_SECRET=your-super-secret-jwt-key-here
|
|
270
|
-
# JWT_EXPIRES_IN=24h
|
|
271
|
-
|
|
272
|
-
# External APIs (optional - uncomment to use)
|
|
273
|
-
# STRIPE_SECRET_KEY=sk_test_...
|
|
274
|
-
# STRIPE_PUBLISHABLE_KEY=pk_test_...
|
|
275
|
-
|
|
276
|
-
# Email Service (optional - uncomment to use)
|
|
277
|
-
# SMTP_HOST=smtp.gmail.com
|
|
278
|
-
# SMTP_PORT=587
|
|
279
|
-
# SMTP_USER=your-email@gmail.com
|
|
280
|
-
# SMTP_PASS=your-app-password
|
|
281
|
-
|
|
282
|
-
# File Upload (optional - uncomment to use)
|
|
283
|
-
# UPLOAD_PATH=uploads
|
|
284
|
-
# MAX_FILE_SIZE=10485760
|
|
285
|
-
`
|
|
286
|
-
|
|
287
|
-
await Bun.write(join(this.targetDir, ".env"), envContent)
|
|
288
|
-
|
|
289
|
-
// README
|
|
290
|
-
const readme = `# ${this.projectName}
|
|
291
|
-
|
|
292
|
-
Modern full-stack TypeScript application built with FluxStack framework.
|
|
293
|
-
|
|
294
|
-
## Tech Stack
|
|
295
|
-
|
|
296
|
-
- **Backend**: Elysia.js (high-performance web framework)
|
|
297
|
-
- **Frontend**: React + Vite (modern development experience)
|
|
298
|
-
- **Runtime**: Bun (ultra-fast JavaScript runtime)
|
|
299
|
-
- **Type Safety**: Eden Treaty (end-to-end type safety)
|
|
300
|
-
|
|
301
|
-
## Getting Started
|
|
302
|
-
|
|
303
|
-
### Install Dependencies
|
|
304
|
-
\`\`\`bash
|
|
305
|
-
bun install
|
|
306
|
-
\`\`\`
|
|
307
|
-
|
|
308
|
-
### Development
|
|
309
|
-
|
|
310
|
-
#### Full-Stack (Recommended)
|
|
311
|
-
\`\`\`bash
|
|
312
|
-
bun run dev
|
|
313
|
-
# Frontend + Backend integrated at http://localhost:3000
|
|
314
|
-
\`\`\`
|
|
315
|
-
|
|
316
|
-
#### Separate Development
|
|
317
|
-
\`\`\`bash
|
|
318
|
-
# Terminal 1: Backend API
|
|
319
|
-
bun run dev:backend
|
|
320
|
-
# API at http://localhost:3001
|
|
321
|
-
|
|
322
|
-
# Terminal 2: Frontend
|
|
323
|
-
bun run dev:frontend
|
|
324
|
-
# Frontend at http://localhost:5173
|
|
325
|
-
\`\`\`
|
|
326
|
-
|
|
327
|
-
### Production
|
|
328
|
-
|
|
329
|
-
\`\`\`bash
|
|
330
|
-
# Build everything
|
|
331
|
-
bun run build
|
|
332
|
-
|
|
333
|
-
# Start production server
|
|
334
|
-
bun run start
|
|
335
|
-
\`\`\`
|
|
336
|
-
|
|
337
|
-
## Project Structure
|
|
338
|
-
|
|
339
|
-
\`\`\`
|
|
340
|
-
${this.projectName}/
|
|
341
|
-
├── app/ # Your application code
|
|
342
|
-
│ ├── server/ # Backend (controllers, routes)
|
|
343
|
-
│ ├── client/ # Frontend (React components)
|
|
344
|
-
│ └── shared/ # Shared types
|
|
345
|
-
├── core/ # FluxStack framework (don't edit)
|
|
346
|
-
├── config/ # Configuration files
|
|
347
|
-
└── dist/ # Production build
|
|
348
|
-
\`\`\`
|
|
349
|
-
|
|
350
|
-
## Available Commands
|
|
351
|
-
|
|
352
|
-
- \`bun run dev\` - Full-stack development
|
|
353
|
-
- \`bun run dev:frontend\` - Frontend only
|
|
354
|
-
- \`bun run dev:backend\` - Backend only
|
|
355
|
-
- \`bun run build\` - Build for production
|
|
356
|
-
- \`bun run start\` - Start production server
|
|
357
|
-
|
|
358
|
-
## Health Check
|
|
359
|
-
|
|
360
|
-
\`\`\`bash
|
|
361
|
-
curl http://localhost:3000/api/health
|
|
362
|
-
\`\`\`
|
|
363
|
-
|
|
364
|
-
Built with ❤️ using FluxStack framework.
|
|
365
|
-
`
|
|
366
|
-
|
|
367
|
-
await Bun.write(join(this.targetDir, "README.md"), readme)
|
|
368
|
-
|
|
369
|
-
// .gitignore
|
|
370
|
-
const gitignore = `# Dependencies
|
|
371
|
-
node_modules/
|
|
372
|
-
*.lockb
|
|
373
|
-
|
|
374
|
-
# Build outputs
|
|
375
|
-
dist/
|
|
376
|
-
build/
|
|
377
|
-
.next/
|
|
378
|
-
|
|
379
|
-
# Environment variables
|
|
380
|
-
.env.local
|
|
381
|
-
.env.production
|
|
382
|
-
|
|
383
|
-
# IDE
|
|
384
|
-
.vscode/
|
|
385
|
-
.idea/
|
|
386
|
-
*.swp
|
|
387
|
-
*.swo
|
|
388
|
-
|
|
389
|
-
# OS
|
|
390
|
-
.DS_Store
|
|
391
|
-
Thumbs.db
|
|
392
|
-
|
|
393
|
-
# Logs
|
|
394
|
-
*.log
|
|
395
|
-
logs/
|
|
396
|
-
|
|
397
|
-
# Runtime
|
|
398
|
-
.tmp/
|
|
399
|
-
.cache/
|
|
400
|
-
|
|
401
|
-
# Bun
|
|
402
|
-
bun.lockb
|
|
403
|
-
`
|
|
404
|
-
|
|
405
|
-
await Bun.write(join(this.targetDir, ".gitignore"), gitignore)
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
private async installDependencies() {
|
|
409
|
-
console.log("📦 Installing dependencies...")
|
|
410
|
-
|
|
411
|
-
const installProcess = spawn({
|
|
412
|
-
cmd: ["bun", "install"],
|
|
413
|
-
cwd: this.targetDir,
|
|
414
|
-
stdout: "pipe",
|
|
415
|
-
stderr: "pipe"
|
|
416
|
-
})
|
|
417
|
-
|
|
418
|
-
const exitCode = await installProcess.exited
|
|
419
|
-
|
|
420
|
-
if (exitCode !== 0) {
|
|
421
|
-
throw new Error("Failed to install dependencies")
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
private async initGit() {
|
|
426
|
-
console.log("🔧 Initializing git repository...")
|
|
427
|
-
|
|
428
|
-
const gitInitProcess = spawn({
|
|
429
|
-
cmd: ["git", "init"],
|
|
430
|
-
cwd: this.targetDir,
|
|
431
|
-
stdout: "pipe",
|
|
432
|
-
stderr: "pipe"
|
|
433
|
-
})
|
|
434
|
-
|
|
435
|
-
await gitInitProcess.exited
|
|
436
|
-
|
|
437
|
-
const gitAddProcess = spawn({
|
|
438
|
-
cmd: ["git", "add", "."],
|
|
439
|
-
cwd: this.targetDir,
|
|
440
|
-
stdout: "pipe",
|
|
441
|
-
stderr: "pipe"
|
|
442
|
-
})
|
|
443
|
-
|
|
444
|
-
await gitAddProcess.exited
|
|
445
|
-
|
|
446
|
-
const gitCommitProcess = spawn({
|
|
447
|
-
cmd: ["git", "commit", "-m", "Initial commit - FluxStack project created"],
|
|
448
|
-
cwd: this.targetDir,
|
|
449
|
-
stdout: "pipe",
|
|
450
|
-
stderr: "pipe"
|
|
451
|
-
})
|
|
452
|
-
|
|
453
|
-
await gitCommitProcess.exited
|
|
454
|
-
}
|
|
455
|
-
}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API and HTTP-related types
|
|
3
|
-
* Type definitions for API endpoints, requests, responses, and HTTP utilities
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD'
|
|
7
|
-
|
|
8
|
-
export interface ApiEndpoint {
|
|
9
|
-
method: HttpMethod
|
|
10
|
-
path: string
|
|
11
|
-
handler: Function
|
|
12
|
-
schema?: ApiSchema
|
|
13
|
-
middleware?: Function[]
|
|
14
|
-
description?: string
|
|
15
|
-
tags?: string[]
|
|
16
|
-
deprecated?: boolean
|
|
17
|
-
version?: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface ApiSchema {
|
|
21
|
-
params?: any
|
|
22
|
-
query?: any
|
|
23
|
-
body?: any
|
|
24
|
-
response?: any
|
|
25
|
-
headers?: any
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface ApiResponse<T = any> {
|
|
29
|
-
data?: T
|
|
30
|
-
error?: ApiError
|
|
31
|
-
meta?: ApiMeta
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface ApiError {
|
|
35
|
-
code: string
|
|
36
|
-
message: string
|
|
37
|
-
details?: any
|
|
38
|
-
statusCode: number
|
|
39
|
-
timestamp: string
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface ApiMeta {
|
|
43
|
-
pagination?: PaginationMeta
|
|
44
|
-
timing?: TimingMeta
|
|
45
|
-
version?: string
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface PaginationMeta {
|
|
49
|
-
page: number
|
|
50
|
-
limit: number
|
|
51
|
-
total: number
|
|
52
|
-
totalPages: number
|
|
53
|
-
hasNext: boolean
|
|
54
|
-
hasPrev: boolean
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface TimingMeta {
|
|
58
|
-
requestId: string
|
|
59
|
-
duration: number
|
|
60
|
-
timestamp: string
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface RequestContext {
|
|
64
|
-
id: string
|
|
65
|
-
method: HttpMethod
|
|
66
|
-
path: string
|
|
67
|
-
url: string
|
|
68
|
-
headers: Record<string, string>
|
|
69
|
-
query: Record<string, any>
|
|
70
|
-
params: Record<string, any>
|
|
71
|
-
body?: any
|
|
72
|
-
user?: any
|
|
73
|
-
startTime: number
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface ResponseContext extends RequestContext {
|
|
77
|
-
statusCode: number
|
|
78
|
-
headers: Record<string, string>
|
|
79
|
-
body?: any
|
|
80
|
-
duration: number
|
|
81
|
-
size: number
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface MiddlewareContext {
|
|
85
|
-
request: RequestContext
|
|
86
|
-
response?: ResponseContext
|
|
87
|
-
next: () => Promise<void>
|
|
88
|
-
state: Record<string, any>
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface RouteHandler {
|
|
92
|
-
(context: RequestContext): Promise<any> | any
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface MiddlewareHandler {
|
|
96
|
-
(context: MiddlewareContext): Promise<void> | void
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface ApiDocumentation {
|
|
100
|
-
title: string
|
|
101
|
-
version: string
|
|
102
|
-
description?: string
|
|
103
|
-
servers: ApiServer[]
|
|
104
|
-
paths: Record<string, ApiPath>
|
|
105
|
-
components?: ApiComponents
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface ApiServer {
|
|
109
|
-
url: string
|
|
110
|
-
description?: string
|
|
111
|
-
variables?: Record<string, ApiServerVariable>
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface ApiServerVariable {
|
|
115
|
-
default: string
|
|
116
|
-
description?: string
|
|
117
|
-
enum?: string[]
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export interface ApiPath {
|
|
121
|
-
[method: string]: ApiOperation
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export interface ApiOperation {
|
|
125
|
-
summary?: string
|
|
126
|
-
description?: string
|
|
127
|
-
operationId?: string
|
|
128
|
-
tags?: string[]
|
|
129
|
-
parameters?: ApiParameter[]
|
|
130
|
-
requestBody?: ApiRequestBody
|
|
131
|
-
responses: Record<string, ApiResponse>
|
|
132
|
-
deprecated?: boolean
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export interface ApiParameter {
|
|
136
|
-
name: string
|
|
137
|
-
in: 'query' | 'header' | 'path' | 'cookie'
|
|
138
|
-
description?: string
|
|
139
|
-
required?: boolean
|
|
140
|
-
schema: any
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export interface ApiRequestBody {
|
|
144
|
-
description?: string
|
|
145
|
-
content: Record<string, ApiMediaType>
|
|
146
|
-
required?: boolean
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface ApiMediaType {
|
|
150
|
-
schema: any
|
|
151
|
-
example?: any
|
|
152
|
-
examples?: Record<string, ApiExample>
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface ApiExample {
|
|
156
|
-
summary?: string
|
|
157
|
-
description?: string
|
|
158
|
-
value: any
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export interface ApiComponents {
|
|
162
|
-
schemas?: Record<string, any>
|
|
163
|
-
responses?: Record<string, ApiResponse>
|
|
164
|
-
parameters?: Record<string, ApiParameter>
|
|
165
|
-
examples?: Record<string, ApiExample>
|
|
166
|
-
requestBodies?: Record<string, ApiRequestBody>
|
|
167
|
-
headers?: Record<string, any>
|
|
168
|
-
securitySchemes?: Record<string, any>
|
|
169
|
-
}
|