trigger_system 1.0.7 → 1.1.5

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/README.md CHANGED
@@ -52,7 +52,7 @@ _Guide to advanced logic like counters, sequences, and combos._
52
52
  _Tools to help you build and debug rules._
53
53
 
54
54
  - CLI Validator (`bun run validate`)
55
- - VS Code LSP Integration
55
+ - VS Code LSP Integration (Autocompletion, Linting Checks)
56
56
  - Circular Dependency Detection
57
57
 
58
58
  ### [📝 YAML Best Practices](./docs/yaml-best-practices.md)
@@ -69,11 +69,48 @@ _Learn by doing with progressive tutorials._
69
69
 
70
70
  - 1.0 Basic Rule
71
71
  - 1.1 Multiple Conditions
72
+ - 1.2 Advanced Operators
72
73
  - 1.3 Stateful Counters
74
+ - 1.4 Action Groups
73
75
  - 2.0 SDK Usage
76
+ - 2.1 Dynamic Rule Updates
77
+ - 2.2 File-Based Rule Updates
78
+ - 2.3 Real-Time Rule Updates
79
+ - 2.4 Loader Watch
80
+ - 3.0 HTTP Methods (Fetch) - TypeScript
81
+ - 3.1 HTTP Methods (Fetch) - YAML
74
82
 
75
83
  ---
76
84
 
85
+ ## 🛠️ Linting & Formatting
86
+
87
+ The project now includes built-in support for **Biome** to ensure code quality and consistency.
88
+
89
+ ```bash
90
+ # Check for linting errors and formatting issues
91
+ bun run check
92
+
93
+ # Fix linting issues automatically
94
+ bun run lint:fix
95
+
96
+ # Format code automatically
97
+ bun run format:fix
98
+ ```
99
+
100
+ ## 🧠 LSP Features & Directives
101
+
102
+ The system includes a Language Server Protocol (LSP) implementation that provides:
103
+
104
+ - **Autocompletion**: Context-aware suggestions for keys, operators, and paths.
105
+ - **Path Resolution**: Smart autocomplete for file paths in imports (Linux/Windows compatible).
106
+ - **Directives**: Control the validator directly from your YAML files.
107
+
108
+ ### Supported Directives
109
+
110
+ - `# @import alias from "./path/to/data.json"`: Import data for autocomplete context.
111
+ - `# @disable-lint`: Disable all linting for the file.
112
+ - `# @disable-next-line`: Disable linting for the next line.
113
+
77
114
  ## 📦 Installation & Import Options
78
115
 
79
116
  ```bash
@@ -86,15 +123,15 @@ The package supports multiple import patterns for different environments:
86
123
 
87
124
  ```typescript
88
125
  // Universal import (auto-detects environment)
89
- import * as sdk from 'trigger_system';
126
+ import * as sdk from "trigger_system";
90
127
 
91
128
  // Node.js specific import (includes file system features)
92
- import * as nodeSdk from 'trigger_system/node';
129
+ import * as nodeSdk from "trigger_system/node";
93
130
 
94
131
  // Client/Browser import (optimized for browser environments)
95
- import * as clientSdk from 'trigger_system/client';
132
+ import * as clientSdk from "trigger_system/client";
96
133
  // or
97
- import * as browserSdk from 'trigger_system/browser';
134
+ import * as browserSdk from "trigger_system/browser";
98
135
  ```
99
136
 
100
137
  ### Environment-Specific Features
@@ -125,3 +162,4 @@ do:
125
162
  - **Hot Reloading**: Edit rules in YAML and see changes instantly.
126
163
  - **Type-Safe**: Built with TypeScript and ArkType for robust validation.
127
164
  - **Stateful**: Memories and counters allow for complex behaviors.
165
+ - **Smart Validation**: LSP disabled by default to avoid false positives; activates via directives or rule heuristics.