create-fluxstack 1.0.5 → 1.0.7
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 +3 -3
- 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,401 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for Monitoring Plugin
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'
|
|
6
|
-
import { monitoringPlugin } from '../built-in/monitoring'
|
|
7
|
-
import type { PluginContext, RequestContext, ResponseContext, ErrorContext } from '../types'
|
|
8
|
-
import type { Logger } from '../../utils/logger/index'
|
|
9
|
-
import type { FluxStackConfig } from '../../config/schema'
|
|
10
|
-
|
|
11
|
-
// Mock logger
|
|
12
|
-
const mockLogger: Logger = {
|
|
13
|
-
debug: vi.fn(),
|
|
14
|
-
info: vi.fn(),
|
|
15
|
-
warn: vi.fn(),
|
|
16
|
-
error: vi.fn(),
|
|
17
|
-
child: vi.fn(() => mockLogger),
|
|
18
|
-
time: vi.fn(),
|
|
19
|
-
timeEnd: vi.fn(),
|
|
20
|
-
request: vi.fn()
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Mock utils
|
|
24
|
-
const mockUtils = {
|
|
25
|
-
createTimer: vi.fn(() => ({ end: vi.fn(() => 100) })),
|
|
26
|
-
formatBytes: vi.fn((bytes: number) => `${bytes} bytes`),
|
|
27
|
-
isProduction: vi.fn(() => false),
|
|
28
|
-
isDevelopment: vi.fn(() => true),
|
|
29
|
-
getEnvironment: vi.fn(() => 'development'),
|
|
30
|
-
createHash: vi.fn(() => 'hash123'),
|
|
31
|
-
deepMerge: vi.fn((a, b) => ({ ...a, ...b })),
|
|
32
|
-
validateSchema: vi.fn(() => ({ valid: true, errors: [] }))
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Mock config
|
|
36
|
-
const mockConfig: FluxStackConfig = {
|
|
37
|
-
app: { name: 'test-app', version: '1.0.0' },
|
|
38
|
-
server: {
|
|
39
|
-
port: 3000,
|
|
40
|
-
host: 'localhost',
|
|
41
|
-
apiPrefix: '/api',
|
|
42
|
-
cors: {
|
|
43
|
-
origins: ['*'],
|
|
44
|
-
methods: ['GET', 'POST'],
|
|
45
|
-
headers: ['Content-Type']
|
|
46
|
-
},
|
|
47
|
-
middleware: []
|
|
48
|
-
},
|
|
49
|
-
client: {
|
|
50
|
-
port: 5173,
|
|
51
|
-
proxy: { target: 'http://localhost:3000' },
|
|
52
|
-
build: {
|
|
53
|
-
sourceMaps: true,
|
|
54
|
-
minify: false,
|
|
55
|
-
target: 'esnext',
|
|
56
|
-
outDir: 'dist/client'
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
build: {
|
|
60
|
-
target: 'bun',
|
|
61
|
-
outDir: 'dist',
|
|
62
|
-
optimization: {
|
|
63
|
-
minify: false,
|
|
64
|
-
treeshake: false,
|
|
65
|
-
compress: false,
|
|
66
|
-
splitChunks: false,
|
|
67
|
-
bundleAnalyzer: false
|
|
68
|
-
},
|
|
69
|
-
sourceMaps: true,
|
|
70
|
-
clean: true
|
|
71
|
-
},
|
|
72
|
-
plugins: {
|
|
73
|
-
enabled: [],
|
|
74
|
-
disabled: [],
|
|
75
|
-
config: {
|
|
76
|
-
monitoring: {
|
|
77
|
-
enabled: true,
|
|
78
|
-
httpMetrics: true,
|
|
79
|
-
systemMetrics: true,
|
|
80
|
-
customMetrics: true,
|
|
81
|
-
collectInterval: 1000, // Faster for testing
|
|
82
|
-
retentionPeriod: 5000,
|
|
83
|
-
exporters: [
|
|
84
|
-
{
|
|
85
|
-
type: 'console',
|
|
86
|
-
interval: 2000,
|
|
87
|
-
enabled: true
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
thresholds: {
|
|
91
|
-
responseTime: 500,
|
|
92
|
-
errorRate: 0.1,
|
|
93
|
-
memoryUsage: 0.9,
|
|
94
|
-
cpuUsage: 0.9
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
logging: {
|
|
100
|
-
level: 'info',
|
|
101
|
-
format: 'pretty',
|
|
102
|
-
transports: []
|
|
103
|
-
},
|
|
104
|
-
monitoring: {
|
|
105
|
-
enabled: true,
|
|
106
|
-
metrics: {
|
|
107
|
-
enabled: true,
|
|
108
|
-
collectInterval: 5000,
|
|
109
|
-
httpMetrics: true,
|
|
110
|
-
systemMetrics: true,
|
|
111
|
-
customMetrics: true
|
|
112
|
-
},
|
|
113
|
-
profiling: {
|
|
114
|
-
enabled: false,
|
|
115
|
-
sampleRate: 0.1,
|
|
116
|
-
memoryProfiling: false,
|
|
117
|
-
cpuProfiling: false
|
|
118
|
-
},
|
|
119
|
-
exporters: []
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
describe('Monitoring Plugin', () => {
|
|
124
|
-
let context: PluginContext
|
|
125
|
-
|
|
126
|
-
beforeEach(() => {
|
|
127
|
-
context = {
|
|
128
|
-
config: mockConfig,
|
|
129
|
-
logger: mockLogger,
|
|
130
|
-
app: { use: vi.fn(), get: vi.fn() },
|
|
131
|
-
utils: mockUtils
|
|
132
|
-
}
|
|
133
|
-
vi.clearAllMocks()
|
|
134
|
-
})
|
|
135
|
-
|
|
136
|
-
afterEach(() => {
|
|
137
|
-
// Clean up any intervals that might have been created
|
|
138
|
-
const intervals = (context as any).monitoringIntervals as NodeJS.Timeout[]
|
|
139
|
-
if (intervals) {
|
|
140
|
-
intervals.forEach(interval => clearInterval(interval))
|
|
141
|
-
}
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
describe('Plugin Structure', () => {
|
|
145
|
-
it('should have correct metadata', () => {
|
|
146
|
-
expect(monitoringPlugin.name).toBe('monitoring')
|
|
147
|
-
expect(monitoringPlugin.version).toBe('1.0.0')
|
|
148
|
-
expect(monitoringPlugin.priority).toBe('high')
|
|
149
|
-
expect(monitoringPlugin.category).toBe('monitoring')
|
|
150
|
-
expect(monitoringPlugin.tags).toContain('monitoring')
|
|
151
|
-
expect(monitoringPlugin.tags).toContain('metrics')
|
|
152
|
-
expect(monitoringPlugin.tags).toContain('performance')
|
|
153
|
-
expect(monitoringPlugin.configSchema).toBeDefined()
|
|
154
|
-
expect(monitoringPlugin.defaultConfig).toBeDefined()
|
|
155
|
-
})
|
|
156
|
-
|
|
157
|
-
it('should have all required lifecycle hooks', () => {
|
|
158
|
-
expect(monitoringPlugin.setup).toBeDefined()
|
|
159
|
-
expect(monitoringPlugin.onServerStart).toBeDefined()
|
|
160
|
-
expect(monitoringPlugin.onServerStop).toBeDefined()
|
|
161
|
-
expect(monitoringPlugin.onRequest).toBeDefined()
|
|
162
|
-
expect(monitoringPlugin.onResponse).toBeDefined()
|
|
163
|
-
expect(monitoringPlugin.onError).toBeDefined()
|
|
164
|
-
})
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
describe('Plugin Setup', () => {
|
|
168
|
-
it('should setup successfully when enabled', async () => {
|
|
169
|
-
await monitoringPlugin.setup!(context)
|
|
170
|
-
|
|
171
|
-
expect(mockLogger.info).toHaveBeenCalledWith('Initializing monitoring plugin', expect.any(Object))
|
|
172
|
-
expect(mockLogger.info).toHaveBeenCalledWith('Monitoring plugin initialized successfully')
|
|
173
|
-
expect((context as any).metricsRegistry).toBeDefined()
|
|
174
|
-
})
|
|
175
|
-
|
|
176
|
-
it('should skip setup when disabled', async () => {
|
|
177
|
-
const disabledConfig = {
|
|
178
|
-
...mockConfig,
|
|
179
|
-
plugins: {
|
|
180
|
-
...mockConfig.plugins,
|
|
181
|
-
config: {
|
|
182
|
-
monitoring: {
|
|
183
|
-
enabled: false
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
const disabledContext = { ...context, config: disabledConfig }
|
|
190
|
-
await monitoringPlugin.setup!(disabledContext)
|
|
191
|
-
|
|
192
|
-
expect(mockLogger.info).toHaveBeenCalledWith('Monitoring plugin disabled by configuration')
|
|
193
|
-
expect((disabledContext as any).metricsRegistry).toBeUndefined()
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
it('should initialize metrics registry', async () => {
|
|
197
|
-
await monitoringPlugin.setup!(context)
|
|
198
|
-
|
|
199
|
-
const registry = (context as any).metricsRegistry
|
|
200
|
-
expect(registry).toBeDefined()
|
|
201
|
-
expect(registry.counters).toBeInstanceOf(Map)
|
|
202
|
-
expect(registry.gauges).toBeInstanceOf(Map)
|
|
203
|
-
expect(registry.histograms).toBeInstanceOf(Map)
|
|
204
|
-
})
|
|
205
|
-
})
|
|
206
|
-
|
|
207
|
-
describe('Server Lifecycle', () => {
|
|
208
|
-
beforeEach(async () => {
|
|
209
|
-
await monitoringPlugin.setup!(context)
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
it('should handle server start', async () => {
|
|
213
|
-
await monitoringPlugin.onServerStart!(context)
|
|
214
|
-
|
|
215
|
-
expect(mockLogger.info).toHaveBeenCalledWith(
|
|
216
|
-
'Monitoring plugin: Server monitoring started',
|
|
217
|
-
expect.objectContaining({
|
|
218
|
-
pid: expect.any(Number),
|
|
219
|
-
nodeVersion: expect.any(String),
|
|
220
|
-
platform: expect.any(String)
|
|
221
|
-
})
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
// Check that server start metric was recorded
|
|
225
|
-
const registry = (context as any).metricsRegistry
|
|
226
|
-
expect(registry.counters.size).toBeGreaterThan(0)
|
|
227
|
-
})
|
|
228
|
-
|
|
229
|
-
it('should handle server stop', async () => {
|
|
230
|
-
await monitoringPlugin.onServerStop!(context)
|
|
231
|
-
|
|
232
|
-
expect(mockLogger.info).toHaveBeenCalledWith('Monitoring plugin: Server monitoring stopped')
|
|
233
|
-
|
|
234
|
-
// Check that server stop metric was recorded
|
|
235
|
-
const registry = (context as any).metricsRegistry
|
|
236
|
-
expect(registry.counters.size).toBeGreaterThan(0)
|
|
237
|
-
})
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
describe('HTTP Metrics', () => {
|
|
241
|
-
beforeEach(async () => {
|
|
242
|
-
await monitoringPlugin.setup!(context)
|
|
243
|
-
})
|
|
244
|
-
|
|
245
|
-
it('should record request metrics', async () => {
|
|
246
|
-
const requestContext: RequestContext = {
|
|
247
|
-
request: new Request('http://localhost:3000/test'),
|
|
248
|
-
path: '/test',
|
|
249
|
-
method: 'GET',
|
|
250
|
-
headers: { 'content-length': '100' },
|
|
251
|
-
query: {},
|
|
252
|
-
params: {},
|
|
253
|
-
startTime: Date.now()
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// Add metrics registry to request context for testing
|
|
257
|
-
;(requestContext as any).metricsRegistry = (context as any).metricsRegistry
|
|
258
|
-
|
|
259
|
-
await monitoringPlugin.onRequest!(requestContext)
|
|
260
|
-
|
|
261
|
-
const registry = (context as any).metricsRegistry
|
|
262
|
-
expect(registry.counters.size).toBeGreaterThan(0)
|
|
263
|
-
expect(registry.histograms.size).toBeGreaterThan(0)
|
|
264
|
-
})
|
|
265
|
-
|
|
266
|
-
it('should record response metrics', async () => {
|
|
267
|
-
const responseContext: ResponseContext = {
|
|
268
|
-
request: new Request('http://localhost:3000/test'),
|
|
269
|
-
path: '/test',
|
|
270
|
-
method: 'GET',
|
|
271
|
-
headers: {},
|
|
272
|
-
query: {},
|
|
273
|
-
params: {},
|
|
274
|
-
startTime: Date.now() - 100,
|
|
275
|
-
response: new Response('OK'),
|
|
276
|
-
statusCode: 200,
|
|
277
|
-
duration: 100,
|
|
278
|
-
size: 50
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// Add metrics registry to response context for testing
|
|
282
|
-
;(responseContext as any).metricsRegistry = (context as any).metricsRegistry
|
|
283
|
-
|
|
284
|
-
await monitoringPlugin.onResponse!(responseContext)
|
|
285
|
-
|
|
286
|
-
const registry = (context as any).metricsRegistry
|
|
287
|
-
expect(registry.counters.size).toBeGreaterThan(0)
|
|
288
|
-
expect(registry.histograms.size).toBeGreaterThan(0)
|
|
289
|
-
})
|
|
290
|
-
|
|
291
|
-
it('should record error metrics', async () => {
|
|
292
|
-
const errorContext: ErrorContext = {
|
|
293
|
-
request: new Request('http://localhost:3000/test'),
|
|
294
|
-
path: '/test',
|
|
295
|
-
method: 'GET',
|
|
296
|
-
headers: {},
|
|
297
|
-
query: {},
|
|
298
|
-
params: {},
|
|
299
|
-
startTime: Date.now() - 100,
|
|
300
|
-
error: new Error('Test error'),
|
|
301
|
-
duration: 100,
|
|
302
|
-
handled: false
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// Add metrics registry to error context for testing
|
|
306
|
-
;(errorContext as any).metricsRegistry = (context as any).metricsRegistry
|
|
307
|
-
|
|
308
|
-
await monitoringPlugin.onError!(errorContext)
|
|
309
|
-
|
|
310
|
-
const registry = (context as any).metricsRegistry
|
|
311
|
-
expect(registry.counters.size).toBeGreaterThan(0)
|
|
312
|
-
expect(registry.histograms.size).toBeGreaterThan(0)
|
|
313
|
-
})
|
|
314
|
-
})
|
|
315
|
-
|
|
316
|
-
describe('System Metrics', () => {
|
|
317
|
-
it('should collect system metrics', async () => {
|
|
318
|
-
await monitoringPlugin.setup!(context)
|
|
319
|
-
|
|
320
|
-
// Wait a bit for system metrics to be collected
|
|
321
|
-
await new Promise(resolve => setTimeout(resolve, 1100))
|
|
322
|
-
|
|
323
|
-
const registry = (context as any).metricsRegistry
|
|
324
|
-
expect(registry.gauges.size).toBeGreaterThan(0)
|
|
325
|
-
|
|
326
|
-
// Check for specific system metrics
|
|
327
|
-
const gaugeKeys = Array.from(registry.gauges.keys()) as string[]
|
|
328
|
-
expect(gaugeKeys.some(key => key.includes('process_memory'))).toBe(true)
|
|
329
|
-
expect(gaugeKeys.some(key => key.includes('process_cpu'))).toBe(true)
|
|
330
|
-
expect(gaugeKeys.some(key => key.includes('process_uptime'))).toBe(true)
|
|
331
|
-
})
|
|
332
|
-
})
|
|
333
|
-
|
|
334
|
-
describe('Metrics Export', () => {
|
|
335
|
-
it('should export metrics to console', async () => {
|
|
336
|
-
await monitoringPlugin.setup!(context)
|
|
337
|
-
|
|
338
|
-
// Wait for export interval
|
|
339
|
-
await new Promise(resolve => setTimeout(resolve, 2100))
|
|
340
|
-
|
|
341
|
-
// Should have logged metrics
|
|
342
|
-
expect(mockLogger.info).toHaveBeenCalledWith(
|
|
343
|
-
'Metrics snapshot',
|
|
344
|
-
expect.objectContaining({
|
|
345
|
-
timestamp: expect.any(String),
|
|
346
|
-
counters: expect.any(Number),
|
|
347
|
-
gauges: expect.any(Number),
|
|
348
|
-
histograms: expect.any(Number),
|
|
349
|
-
metrics: expect.any(Object)
|
|
350
|
-
})
|
|
351
|
-
)
|
|
352
|
-
})
|
|
353
|
-
})
|
|
354
|
-
|
|
355
|
-
describe('Configuration', () => {
|
|
356
|
-
it('should use default configuration when none provided', async () => {
|
|
357
|
-
const contextWithoutConfig = {
|
|
358
|
-
...context,
|
|
359
|
-
config: {
|
|
360
|
-
...mockConfig,
|
|
361
|
-
plugins: {
|
|
362
|
-
...mockConfig.plugins,
|
|
363
|
-
config: {}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
await monitoringPlugin.setup!(contextWithoutConfig)
|
|
369
|
-
|
|
370
|
-
// Should still initialize with defaults
|
|
371
|
-
expect((contextWithoutConfig as any).metricsRegistry).toBeDefined()
|
|
372
|
-
})
|
|
373
|
-
|
|
374
|
-
it('should merge custom configuration with defaults', async () => {
|
|
375
|
-
const customConfig = {
|
|
376
|
-
...mockConfig,
|
|
377
|
-
plugins: {
|
|
378
|
-
...mockConfig.plugins,
|
|
379
|
-
config: {
|
|
380
|
-
monitoring: {
|
|
381
|
-
enabled: true,
|
|
382
|
-
httpMetrics: false,
|
|
383
|
-
systemMetrics: true
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
const customContext = { ...context, config: customConfig }
|
|
390
|
-
await monitoringPlugin.setup!(customContext)
|
|
391
|
-
|
|
392
|
-
expect(mockLogger.info).toHaveBeenCalledWith(
|
|
393
|
-
'Initializing monitoring plugin',
|
|
394
|
-
expect.objectContaining({
|
|
395
|
-
httpMetrics: false,
|
|
396
|
-
systemMetrics: true
|
|
397
|
-
})
|
|
398
|
-
)
|
|
399
|
-
})
|
|
400
|
-
})
|
|
401
|
-
})
|