Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
67 changes: 67 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This file defines path-specific settings for Git, such as line ending
# normalization, binary file handling, and GitHub-specific display options.
#
# https://git-scm.com/docs/gitattributes

# Handle line endings automatically for files detected as text
# and ensure that all checked-in text files have the LF newline character.
* text=auto

# Common source files
*.js text
*.jsx text
*.ts text
*.tsx text
*.json text
*.html text
*.css text
*.scss text
*.md text
*.yml text
*.yaml text
*.xml text

# Force LF for shell scripts and configuration files (Unix-style)
*.sh text eol=lf
*.bash text eol=lf
.htaccess text eol=lf
Makefile text eol=lf

# Force CRLF for Windows batch files
*.bat text eol=crlf
*.cmd text eol=crlf

# Denote all files that are truly binary and should not be modified by Git.
# Images
*.jpg binary
*.png binary
*.gif binary
*.ico binary
*.webp binary

# Fonts
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary

# Documents
*.pdf binary

# Archives
*.zip binary
*.tar binary
*.gz binary

# These settings affect how GitHub calculates language statistics and searches.
dist/* linguist-vendored
build/* linguist-vendored
docs/* linguist-documentation
vendor/* linguist-vendored
test/* linguist-vendored

# Treat lock files as binary during merge to prevent conflicts.
# These should be managed by their respective package managers.
package-lock.json merge=binary
yarn.lock merge=binary
pnpm-lock.yaml merge=binary
18 changes: 0 additions & 18 deletions .github/dependabot.yml

This file was deleted.

104 changes: 95 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,110 @@
# Logs
logs
# This file specifies intentionally untracked files that Git should ignore.
# It helps keep the repository clean and prevents sensitive or temporary
# files from being committed.
#
# Reference: https://git-scm.com/docs/gitignore

# Ignore dependency directories and non-essential lock files
node_modules/
yarn.lock
pnpm-lock.yaml
# Note: package-lock.json is NOT ignored to ensure consistent builds
# package-lock.json

# Compilation results, build artifacts, and TypeScript cache
dist/
build/
out/
compiled/
compiled_app_output/
*.tsbuildinfo

# Test coverage reports and temporary test framework files
coverage/
.coverage
.nyc_output/
*.junit.xml
junit.xml
test-results.json
test-results/
.vitest-reports/

# Various log files from package managers, build tools, and runtimes
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
*storybook.log
build-storybook.log
build.log

node_modules
build
dist
dist-ssr
*.local
# Configuration files for popular IDEs and editors

# Editor directories and files
.DS_Store
# JetBrains (WebStorm, IntelliJ IDEA, etc.)
.idea/
*.iws
*.iml
*.ipr

# VS Code
.vscode/*
!.vscode/extensions.json
!.vscode/settings.default.json
!.vscode/launch.json

# Sublime Text
*.sublime-project
*.sublime-workspace

# Other temporary editor files
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.swp
*.bak
.editorconfig
.prettierignore
.eslintignore

# Environment variables, access tokens, and private keys
.env
.env.*
!.env.example
.secrets/
google-generated-credentials.json
.clasp.json
creds.json
*.pem
*.key

# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Various temporary data and application cache
.tmp/
tmp/
.data/
.cache/
.eslintcache
.stylelintcache
.npm
.pnpm-store

# Project-specific reports and temporary files
*.0x
nodelinter.config.json
CHANGELOG-*.md
*.mdx
trivy_report*
!/.gitignore
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/scopes/appsscript.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/scopes/stories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/scopes/webapp.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .idea/webResources.xml

This file was deleted.

95 changes: 95 additions & 0 deletions .junie/guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
### Build and Configuration Instructions

#### Prerequisites

- Node.js (latest LTS recommended)
- npm (installed with Node.js)

#### Installation

Install project dependencies using:

```bash
npm install
```

#### Build

The project uses the TypeScript compiler (`tsc`) for building. To compile the source code:

```bash
npm run build
```

The output will be located in the `dist` directory.

#### Code Quality

- **Formatting**: Uses Prettier. Run `npm run format` to format the codebase.
- **Linting**: Uses ESLint. Run `npm run lint` to check for and fix linting issues.

---

### Testing Information

#### Configuration

The project uses [Vitest](https://vitest.dev/) for testing. Configuration is defined in `vitest.config.ts`.
Important: The project relies on `reflect-metadata`, which must be imported at the beginning of test files or via a
setup file.

#### Running Tests

- **All tests**: `npm run test`
- **Watch mode**: `npm run dev`
- **Specific test file**: `npx vitest run path/to/test.ts`

#### Adding New Tests

1. Create a `.test.ts` file in the `test` directory (or subdirectories mirroring `src`).
2. Ensure `import "reflect-metadata";` is at the top of the file if using decorators or metadata.
3. Use `describe`, `it`, and `expect` from `vitest`.

#### Test Example

```typescript
import "reflect-metadata";
import { describe, expect, it } from "vitest";
import { HttpController } from "../src/decorators";
import { CONTROLLER_WATERMARK } from "../src/config/constants";

describe("Example Test", () => {
it("should verify controller metadata", () => {
@HttpController("/api")
class MyController {}

const isController = Reflect.getMetadata(CONTROLLER_WATERMARK, MyController);
expect(isController).toBe(true);
});
});
```

---

### Additional Development Information

#### Code Style

- Follow the existing NestJS-like architecture.
- Use decorators for defining controllers, routes, and dependency injection.
- Prefer explicit type definitions where possible.
- Use `reflect-metadata` for any custom metadata handling.

#### Key Directories

- `src/`: Source code.
- `decorators/`: Custom decorators for controllers and methods.
- `types/`: TypeScript type definitions and interfaces.
- `utils/`: Internal utility functions for routing and metadata.
- `test/`: Test suites mirroring the `src` structure.

#### Dependency Management

The project has a dependency on `apps-script-utils` from a GitHub repository:
`"apps-script-utils": "github:MaksymStoianov/apps-script-utils#main"`
Ensure you have network access to GitHub when installing dependencies.
Loading
Loading