chore: update .idea/workspace.xml and project guidelines
- Refined IntelliJ IDEA settings in `.idea/workspace.xml`, including updates to `ProblemsViewState` and `PropertiesComponent` for project consistency. - Renamed and expanded `.junie/guidelines.md` to reflect updated best practices, project structure, and development workflows.
This commit is contained in:
parent
7adaf82c1b
commit
2a82fe6cf2
2 changed files with 87 additions and 63 deletions
111
.idea/workspace.xml
generated
111
.idea/workspace.xml
generated
|
|
@ -5,29 +5,8 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="d7a71994-2699-4ae4-9fd2-ee13b7f33d35" name="Changes" comment="chore: add tests for schema and API config mocking - Added unit tests for schema loader, mocking Config variables and resolvers. - Added unit tests for Zabbix API configuration, verifying constants derived from Config. - Mocked relevant modules and filesystem behaviors to enable isolated testing. - Optimized imports on all files and include this within a new .junie/guidelines.md file">
|
||||
<change afterPath="$PROJECT_DIR$/.junie/guidelines.md" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/test/logger_config.test.ts" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/test/schema_config.test.ts" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/test/zabbix_api_config.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/common_utils.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/common_utils.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/datasources/zabbix-hosts.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/datasources/zabbix-hosts.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/datasources/zabbix-templates.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/datasources/zabbix-templates.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/datasources/zabbix-usergroups.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/datasources/zabbix-usergroups.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/execution/host_exporter.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/execution/host_exporter.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/execution/template_deleter.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/execution/template_deleter.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/execution/template_importer.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/execution/template_importer.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/schema/generated/graphql.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/schema/generated/graphql.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/host_importer.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/host_importer.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/host_integration.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/host_integration.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/host_query.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/host_query.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/misc_resolvers.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/misc_resolvers.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/template_deleter.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/template_deleter.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/template_importer.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/template_importer.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/template_integration.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/template_integration.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/template_query.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/template_query.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/user_rights.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/user_rights.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/user_rights_integration.test.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/user_rights_integration.test.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.junie/guidelines.md" beforeDir="false" afterPath="$PROJECT_DIR$/.junie/guidelines.md" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -65,6 +44,9 @@
|
|||
<commands />
|
||||
<urls />
|
||||
</component>
|
||||
<component name="ProblemsViewState">
|
||||
<option name="selectedTabId" value="CurrentFile" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 2
|
||||
}</component>
|
||||
|
|
@ -76,44 +58,45 @@
|
|||
<option name="openDirectoriesWithSingleClick" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"NIXITCH_NIXPKGS_CONFIG": "",
|
||||
"NIXITCH_NIX_CONF_DIR": "",
|
||||
"NIXITCH_NIX_OTHER_STORES": "",
|
||||
"NIXITCH_NIX_PATH": "",
|
||||
"NIXITCH_NIX_PROFILES": "",
|
||||
"NIXITCH_NIX_REMOTE": "",
|
||||
"NIXITCH_NIX_USER_PROFILE_DIR": "",
|
||||
"Node.js.index.ts.executor": "Run",
|
||||
"RunOnceActivity.MCP Project settings loaded": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
|
||||
"git-widget-placeholder": "main",
|
||||
"go.import.settings.migrated": "true",
|
||||
"javascript.preferred.runtime.type.id": "node",
|
||||
"junie.onboarding.icon.badge.shown": "true",
|
||||
"last_opened_file_path": "//wsl.localhost/Ubuntu/home/ahilbig/git/vcr/zabbix-graphql-api/src",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_interpreter_path": "wsl://Ubuntu@/home/ahilbig/.nvm/versions/node/v24.12.0/bin/node",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"npm.codegen.executor": "Run",
|
||||
"npm.compile.executor": "Run",
|
||||
"npm.copy-schema.executor": "Run",
|
||||
"npm.prod.executor": "Run",
|
||||
"npm.test.executor": "Run",
|
||||
"settings.editor.selected.configurable": "settings.javascript.runtime",
|
||||
"to.speed.mode.migration.done": "true",
|
||||
"ts.external.directory.path": "\\\\wsl.localhost\\Ubuntu\\home\\ahilbig\\git\\vcr\\zabbix-graphql-api\\node_modules\\typescript\\lib",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"NIXITCH_NIXPKGS_CONFIG": "",
|
||||
"NIXITCH_NIX_CONF_DIR": "",
|
||||
"NIXITCH_NIX_OTHER_STORES": "",
|
||||
"NIXITCH_NIX_PATH": "",
|
||||
"NIXITCH_NIX_PROFILES": "",
|
||||
"NIXITCH_NIX_REMOTE": "",
|
||||
"NIXITCH_NIX_USER_PROFILE_DIR": "",
|
||||
"Node.js.index.ts.executor": "Run",
|
||||
"RunOnceActivity.MCP Project settings loaded": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
|
||||
"git-widget-placeholder": "main",
|
||||
"go.import.settings.migrated": "true",
|
||||
"javascript.preferred.runtime.type.id": "node",
|
||||
"junie.onboarding.icon.badge.shown": "true",
|
||||
"last_opened_file_path": "//wsl.localhost/Ubuntu/home/ahilbig/git/vcr/zabbix-graphql-api/src",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_interpreter_path": "wsl://Ubuntu@/home/ahilbig/.nvm/versions/node/v24.12.0/bin/node",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"npm.codegen.executor": "Run",
|
||||
"npm.compile.executor": "Run",
|
||||
"npm.copy-schema.executor": "Run",
|
||||
"npm.prod.executor": "Run",
|
||||
"npm.test.executor": "Run",
|
||||
"settings.editor.selected.configurable": "ml.llm.LLMConfigurable",
|
||||
"settings.editor.splitter.proportion": "0.3839406",
|
||||
"to.speed.mode.migration.done": "true",
|
||||
"ts.external.directory.path": "\\\\wsl.localhost\\Ubuntu\\home\\ahilbig\\git\\vcr\\zabbix-graphql-api\\node_modules\\typescript\\lib",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="RecapSpentCounter">
|
||||
<option name="endsOfQuotaMs" value="1768327208764" />
|
||||
<option name="spentUsd" value="0.04010335" />
|
||||
|
|
@ -382,7 +365,15 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1769535965695</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="22" />
|
||||
<task id="LOCAL-00022" summary="chore: add tests for schema and API config mocking - Added unit tests for schema loader, mocking Config variables and resolvers. - Added unit tests for Zabbix API configuration, verifying constants derived from Config. - Mocked relevant modules and filesystem behaviors to enable isolated testing. - Optimized imports on all files and include this within a new .junie/guidelines.md file">
|
||||
<option name="closed" value="true" />
|
||||
<created>1769582068426</created>
|
||||
<option name="number" value="00022" />
|
||||
<option name="presentableId" value="LOCAL-00022" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1769582068426</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="23" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,37 @@
|
|||
# Junie Guidelines
|
||||
# Project Guidelines
|
||||
|
||||
- Always include "Optimize imports" as a step in the plan before executing any commits or finishing a task (via `submit`).
|
||||
- This ensures consistency with the project's IntelliJ IDEA settings (`OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT` is enabled).
|
||||
This document provides concise information and best practices for developers working on the Zabbix GraphQL API project.
|
||||
|
||||
## Tech Stack
|
||||
- **Runtime**: Node.js (v18+)
|
||||
- **Language**: TypeScript (ESM)
|
||||
- **API**: GraphQL (Apollo Server 4)
|
||||
- **Testing**: Jest
|
||||
- **Deployment**: Docker
|
||||
|
||||
## Project Structure
|
||||
- `src/api/`: GraphQL server configuration, schema loading, and root resolvers (see `createResolvers` in `resolvers.ts`).
|
||||
- `src/datasources/`: Modular classes for interacting with various Zabbix API components (hosts, items, etc.).
|
||||
- `src/execution/`: Business logic for complex, multi-step operations (importers, exporters, deleters).
|
||||
- `src/model/`: Shared data models and enumerations.
|
||||
- `src/test/`: Unit and integration tests.
|
||||
- `schema/`: GraphQL Schema Definition Language (SDL) files.
|
||||
|
||||
## Common Scripts
|
||||
- `npm run start`: Launches the development server with `tsx` and `nodemon` for hot-reloading.
|
||||
- `npm run test`: Executes the Jest test suite.
|
||||
- `npm run codegen`: Generates TypeScript types based on the GraphQL schema definitions.
|
||||
- `npm run compile`: Compiles TypeScript source files into the `dist/` directory.
|
||||
- `npm run prod`: Prepares the schema and runs the compiled production build.
|
||||
|
||||
## Best Practices & Standards
|
||||
- **ESM & Imports**: The project uses ECMAScript Modules (ESM). Always use the `.js` extension when importing local files (e.g., `import { Config } from "../common_utils.js";`), even though the source files are `.ts`.
|
||||
- **Configuration**: Always use the `Config` class to access environment variables. Avoid direct `process.env` calls.
|
||||
- **Type Safety**: Leverage types generated via `npm run codegen` for resolvers and data handling to ensure consistency with the schema.
|
||||
- **Import Optimization**:
|
||||
- Always optimize imports before committing.
|
||||
- Project setting `OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT` is enabled.
|
||||
- Junie should include "Optimize imports" as a step in every plan.
|
||||
- **Modular Datasources**: When adding support for new Zabbix features, create a new datasource class in `src/datasources/` extending `ZabbixRESTDataSource`.
|
||||
- **Schema Organization**: Place GraphQL SDL files in the `schema/` directory. Use descriptive comments in SDL as they are used for API documentation.
|
||||
- **Testing**: Write reproduction tests for bugs and cover new features with both unit and integration tests in `src/test/`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue