create-fluxstack 1.0.4 → 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 +6 -1
- package/create-fluxstack.ts +10 -6
- 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,233 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for FluxStack Framework Server
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
|
|
6
|
-
import { FluxStackFramework } from '../server'
|
|
7
|
-
import type { Plugin } from '../../plugins/types'
|
|
8
|
-
|
|
9
|
-
// Mock dependencies
|
|
10
|
-
vi.mock('../../config', () => ({
|
|
11
|
-
getConfigSync: vi.fn(() => ({
|
|
12
|
-
server: {
|
|
13
|
-
port: 3000,
|
|
14
|
-
apiPrefix: '/api',
|
|
15
|
-
cors: {
|
|
16
|
-
origins: ['*'],
|
|
17
|
-
methods: ['GET', 'POST'],
|
|
18
|
-
headers: ['Content-Type'],
|
|
19
|
-
credentials: false
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
app: {
|
|
23
|
-
name: 'test-app',
|
|
24
|
-
version: '1.0.0'
|
|
25
|
-
}
|
|
26
|
-
})),
|
|
27
|
-
getEnvironmentInfo: vi.fn(() => ({
|
|
28
|
-
isDevelopment: true,
|
|
29
|
-
isProduction: false,
|
|
30
|
-
isTest: true,
|
|
31
|
-
name: 'test'
|
|
32
|
-
}))
|
|
33
|
-
}))
|
|
34
|
-
|
|
35
|
-
vi.mock('../../utils/logger', () => ({
|
|
36
|
-
logger: {
|
|
37
|
-
framework: vi.fn(),
|
|
38
|
-
warn: vi.fn(),
|
|
39
|
-
error: vi.fn(),
|
|
40
|
-
child: vi.fn(() => ({
|
|
41
|
-
framework: vi.fn(),
|
|
42
|
-
warn: vi.fn(),
|
|
43
|
-
error: vi.fn()
|
|
44
|
-
}))
|
|
45
|
-
}
|
|
46
|
-
}))
|
|
47
|
-
|
|
48
|
-
vi.mock('../../utils/errors/handlers', () => ({
|
|
49
|
-
createErrorHandler: vi.fn(() => vi.fn())
|
|
50
|
-
}))
|
|
51
|
-
|
|
52
|
-
vi.mock('elysia', () => ({
|
|
53
|
-
Elysia: vi.fn(() => ({
|
|
54
|
-
onRequest: vi.fn().mockReturnThis(),
|
|
55
|
-
onAfterHandle: vi.fn().mockReturnThis(),
|
|
56
|
-
onError: vi.fn().mockReturnThis(),
|
|
57
|
-
options: vi.fn().mockReturnThis(),
|
|
58
|
-
use: vi.fn().mockReturnThis(),
|
|
59
|
-
listen: vi.fn((_port, callback) => {
|
|
60
|
-
if (callback) callback()
|
|
61
|
-
})
|
|
62
|
-
}))
|
|
63
|
-
}))
|
|
64
|
-
|
|
65
|
-
describe('FluxStackFramework', () => {
|
|
66
|
-
let framework: FluxStackFramework
|
|
67
|
-
|
|
68
|
-
beforeEach(() => {
|
|
69
|
-
framework = new FluxStackFramework()
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
afterEach(() => {
|
|
73
|
-
vi.clearAllMocks()
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
describe('Constructor', () => {
|
|
77
|
-
it('should initialize framework with default config', () => {
|
|
78
|
-
expect(framework).toBeInstanceOf(FluxStackFramework)
|
|
79
|
-
expect(framework.getContext()).toBeDefined()
|
|
80
|
-
expect(framework.getApp()).toBeDefined()
|
|
81
|
-
expect(framework.getPluginRegistry()).toBeDefined()
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
it('should initialize framework with custom config', () => {
|
|
85
|
-
const customConfig = {
|
|
86
|
-
server: {
|
|
87
|
-
port: 4000,
|
|
88
|
-
host: 'localhost',
|
|
89
|
-
apiPrefix: '/custom-api',
|
|
90
|
-
cors: {
|
|
91
|
-
origins: ['*'],
|
|
92
|
-
methods: ['GET', 'POST'],
|
|
93
|
-
headers: ['Content-Type'],
|
|
94
|
-
credentials: false,
|
|
95
|
-
maxAge: 86400
|
|
96
|
-
},
|
|
97
|
-
middleware: []
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const customFramework = new FluxStackFramework(customConfig)
|
|
102
|
-
const context = customFramework.getContext()
|
|
103
|
-
|
|
104
|
-
expect(context.config.server.port).toBe(4000)
|
|
105
|
-
expect(context.config.server.apiPrefix).toBe('/custom-api')
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
it('should set up context correctly', () => {
|
|
109
|
-
const context = framework.getContext()
|
|
110
|
-
|
|
111
|
-
expect(context.isDevelopment).toBe(true)
|
|
112
|
-
expect(context.isProduction).toBe(false)
|
|
113
|
-
expect(context.isTest).toBe(true)
|
|
114
|
-
expect(context.environment).toBe('test')
|
|
115
|
-
})
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
describe('Plugin Management', () => {
|
|
119
|
-
it('should register plugins successfully', () => {
|
|
120
|
-
const mockPlugin: Plugin = {
|
|
121
|
-
name: 'test-plugin',
|
|
122
|
-
setup: vi.fn()
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
expect(() => framework.use(mockPlugin)).not.toThrow()
|
|
126
|
-
expect(framework.getPluginRegistry().get('test-plugin')).toBe(mockPlugin)
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
it('should throw error when registering duplicate plugin', () => {
|
|
130
|
-
const mockPlugin: Plugin = {
|
|
131
|
-
name: 'duplicate-plugin',
|
|
132
|
-
setup: vi.fn()
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
framework.use(mockPlugin)
|
|
136
|
-
expect(() => framework.use(mockPlugin)).toThrow()
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
it('should validate plugin dependencies', async () => {
|
|
140
|
-
const pluginA: Plugin = {
|
|
141
|
-
name: 'plugin-a',
|
|
142
|
-
setup: vi.fn()
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const pluginB: Plugin = {
|
|
146
|
-
name: 'plugin-b',
|
|
147
|
-
dependencies: ['plugin-a'],
|
|
148
|
-
setup: vi.fn()
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
framework.use(pluginA)
|
|
152
|
-
framework.use(pluginB)
|
|
153
|
-
|
|
154
|
-
await expect(framework.start()).resolves.not.toThrow()
|
|
155
|
-
})
|
|
156
|
-
|
|
157
|
-
it('should throw error for missing dependencies', async () => {
|
|
158
|
-
const pluginWithMissingDep: Plugin = {
|
|
159
|
-
name: 'plugin-with-missing-dep',
|
|
160
|
-
dependencies: ['non-existent-plugin'],
|
|
161
|
-
setup: vi.fn()
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
framework.use(pluginWithMissingDep)
|
|
165
|
-
await expect(framework.start()).rejects.toThrow()
|
|
166
|
-
})
|
|
167
|
-
})
|
|
168
|
-
|
|
169
|
-
describe('Lifecycle Management', () => {
|
|
170
|
-
it('should start framework successfully', async () => {
|
|
171
|
-
const mockPlugin: Plugin = {
|
|
172
|
-
name: 'lifecycle-plugin',
|
|
173
|
-
setup: vi.fn(),
|
|
174
|
-
onServerStart: vi.fn()
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
framework.use(mockPlugin)
|
|
178
|
-
await framework.start()
|
|
179
|
-
|
|
180
|
-
expect(mockPlugin.setup).toHaveBeenCalled()
|
|
181
|
-
expect(mockPlugin.onServerStart).toHaveBeenCalled()
|
|
182
|
-
})
|
|
183
|
-
|
|
184
|
-
it('should stop framework successfully', async () => {
|
|
185
|
-
const mockPlugin: Plugin = {
|
|
186
|
-
name: 'lifecycle-plugin',
|
|
187
|
-
setup: vi.fn(),
|
|
188
|
-
onServerStart: vi.fn(),
|
|
189
|
-
onServerStop: vi.fn()
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
framework.use(mockPlugin)
|
|
193
|
-
await framework.start()
|
|
194
|
-
await framework.stop()
|
|
195
|
-
|
|
196
|
-
expect(mockPlugin.onServerStop).toHaveBeenCalled()
|
|
197
|
-
})
|
|
198
|
-
|
|
199
|
-
it('should not start framework twice', async () => {
|
|
200
|
-
await framework.start()
|
|
201
|
-
await framework.start() // Should not throw or cause issues
|
|
202
|
-
|
|
203
|
-
// Should log warning about already started
|
|
204
|
-
const { logger } = await import('../../utils/logger')
|
|
205
|
-
expect(logger.warn).toHaveBeenCalled()
|
|
206
|
-
})
|
|
207
|
-
|
|
208
|
-
it('should handle plugin setup errors', async () => {
|
|
209
|
-
const errorPlugin: Plugin = {
|
|
210
|
-
name: 'error-plugin',
|
|
211
|
-
setup: vi.fn().mockRejectedValue(new Error('Setup failed'))
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
framework.use(errorPlugin)
|
|
215
|
-
await expect(framework.start()).rejects.toThrow('Setup failed')
|
|
216
|
-
})
|
|
217
|
-
})
|
|
218
|
-
|
|
219
|
-
describe('Routes', () => {
|
|
220
|
-
it('should add routes to the app', () => {
|
|
221
|
-
const mockRouteModule = { get: vi.fn() }
|
|
222
|
-
|
|
223
|
-
expect(() => framework.routes(mockRouteModule)).not.toThrow()
|
|
224
|
-
})
|
|
225
|
-
})
|
|
226
|
-
|
|
227
|
-
describe('Error Handling', () => {
|
|
228
|
-
it('should set up error handling', async () => {
|
|
229
|
-
const { createErrorHandler } = await import('../../utils/errors/handlers')
|
|
230
|
-
expect(createErrorHandler).toHaveBeenCalled()
|
|
231
|
-
})
|
|
232
|
-
})
|
|
233
|
-
})
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FluxStack Client Framework Utilities
|
|
3
|
-
* Provides client-side utilities and integrations
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { FluxStackConfig } from "../types"
|
|
7
|
-
|
|
8
|
-
export interface ClientFrameworkOptions {
|
|
9
|
-
config: FluxStackConfig
|
|
10
|
-
baseUrl?: string
|
|
11
|
-
timeout?: number
|
|
12
|
-
retries?: number
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export class FluxStackClient {
|
|
16
|
-
private config: FluxStackConfig
|
|
17
|
-
private baseUrl: string
|
|
18
|
-
private timeout: number
|
|
19
|
-
private retries: number
|
|
20
|
-
|
|
21
|
-
constructor(options: ClientFrameworkOptions) {
|
|
22
|
-
this.config = options.config
|
|
23
|
-
this.baseUrl = options.baseUrl || `http://localhost:${options.config.server.port}`
|
|
24
|
-
this.timeout = options.timeout || 10000
|
|
25
|
-
this.retries = options.retries || 3
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Create a configured fetch client
|
|
29
|
-
createFetchClient() {
|
|
30
|
-
return async (url: string, options: RequestInit = {}) => {
|
|
31
|
-
const fullUrl = url.startsWith('http') ? url : `${this.baseUrl}${url}`
|
|
32
|
-
|
|
33
|
-
const requestOptions: RequestInit = {
|
|
34
|
-
...options,
|
|
35
|
-
headers: {
|
|
36
|
-
'Content-Type': 'application/json',
|
|
37
|
-
...options.headers
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Add timeout
|
|
42
|
-
const controller = new AbortController()
|
|
43
|
-
const timeoutId = setTimeout(() => controller.abort(), this.timeout)
|
|
44
|
-
requestOptions.signal = controller.signal
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
const response = await fetch(fullUrl, requestOptions)
|
|
48
|
-
clearTimeout(timeoutId)
|
|
49
|
-
|
|
50
|
-
if (!response.ok) {
|
|
51
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}`)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return response
|
|
55
|
-
} catch (error) {
|
|
56
|
-
clearTimeout(timeoutId)
|
|
57
|
-
throw error
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Create API client with retry logic
|
|
63
|
-
createApiClient() {
|
|
64
|
-
const fetchClient = this.createFetchClient()
|
|
65
|
-
|
|
66
|
-
return {
|
|
67
|
-
get: async <T>(url: string): Promise<T> => {
|
|
68
|
-
return this.withRetry(async () => {
|
|
69
|
-
const response = await fetchClient(url, { method: 'GET' })
|
|
70
|
-
return response.json()
|
|
71
|
-
})
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
post: async <T>(url: string, data: any): Promise<T> => {
|
|
75
|
-
return this.withRetry(async () => {
|
|
76
|
-
const response = await fetchClient(url, {
|
|
77
|
-
method: 'POST',
|
|
78
|
-
body: JSON.stringify(data)
|
|
79
|
-
})
|
|
80
|
-
return response.json()
|
|
81
|
-
})
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
put: async <T>(url: string, data: any): Promise<T> => {
|
|
85
|
-
return this.withRetry(async () => {
|
|
86
|
-
const response = await fetchClient(url, {
|
|
87
|
-
method: 'PUT',
|
|
88
|
-
body: JSON.stringify(data)
|
|
89
|
-
})
|
|
90
|
-
return response.json()
|
|
91
|
-
})
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
delete: async <T>(url: string): Promise<T> => {
|
|
95
|
-
return this.withRetry(async () => {
|
|
96
|
-
const response = await fetchClient(url, { method: 'DELETE' })
|
|
97
|
-
return response.json()
|
|
98
|
-
})
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
private async withRetry<T>(fn: () => Promise<T>): Promise<T> {
|
|
104
|
-
let lastError: Error
|
|
105
|
-
|
|
106
|
-
for (let attempt = 1; attempt <= this.retries; attempt++) {
|
|
107
|
-
try {
|
|
108
|
-
return await fn()
|
|
109
|
-
} catch (error) {
|
|
110
|
-
lastError = error as Error
|
|
111
|
-
|
|
112
|
-
if (attempt === this.retries) {
|
|
113
|
-
throw lastError
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Exponential backoff
|
|
117
|
-
const delay = Math.min(1000 * Math.pow(2, attempt - 1), 10000)
|
|
118
|
-
await new Promise(resolve => setTimeout(resolve, delay))
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
throw lastError!
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
getConfig(): FluxStackConfig {
|
|
126
|
-
return this.config
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
getBaseUrl(): string {
|
|
130
|
-
return this.baseUrl
|
|
131
|
-
}
|
|
132
|
-
}
|