feat(core): Add permission-controlled Deno execution, configurable script server port, improved downloader, dependency bumps and test updates

This commit is contained in:
2025-12-02 11:27:35 +00:00
parent 01dd40e599
commit fb0bfed4ab
20 changed files with 7919 additions and 3613 deletions

View File

@@ -0,0 +1,47 @@
# Code Style and Conventions
## Naming Conventions
- **Interfaces**: Prefix with `I` (e.g., `IDenoRelease`, `IAsset`)
- **Types**: Prefix with `T` (not heavily used in this codebase)
- **Classes**: PascalCase (e.g., `SmartDeno`, `DenoDownloader`)
- **Files**: Lowercase, hyphenated (e.g., `classes.smartdeno.ts`, `classes.denodownloader.ts`)
- **Methods/Properties**: camelCase
## File Organization
- **Source**: `ts/` directory
- **Tests**: `test/` directory
- **Compiled Output**: `dist_ts/` (excluded from git)
- **Temporary Files**: `.nogit/` directory (excluded from git)
## File Naming Patterns
- Classes: `classes.<name>.ts` (e.g., `classes.smartdeno.ts`)
- Entry point: `index.ts`
- Plugin/dependency imports: `plugins.ts`
- Path configurations: `paths.ts`
## Import Patterns
1. **All module dependencies** imported in `ts/plugins.ts`
2. **References use full path**: `plugins.moduleName.className()`
3. **Local imports** use `.js` extension (for ESM compatibility)
Example from plugins.ts:
```typescript
import * as smartfile from '@push.rocks/smartfile';
export { smartfile };
```
Usage:
```typescript
import * as plugins from './plugins.js';
plugins.smartfile.fs.writeFile(...);
```
## Class Patterns
- Private properties for internal state
- Public async methods for API
- Dependency injection where appropriate
- JSDoc comments for public methods
## Module Resolution
- Always use `.js` extension in imports (even for `.ts` files)
- This is required for ESM compatibility with NodeNext resolution