@f1ql/core 0.0.1
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/LICENSE +21 -0
- package/README.md +56 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Saurav Khare
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# F1QL
|
|
2
|
+
|
|
3
|
+
> A query language for Formula 1 analytics.
|
|
4
|
+
|
|
5
|
+
F1QL is an open-source language for expressing Formula 1 queries in a concise, human-readable syntax.
|
|
6
|
+
|
|
7
|
+
> 🚧 F1QL is currently in active development.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @f1ql/core
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { parse } from "@f1ql/core";
|
|
19
|
+
|
|
20
|
+
parse("Max @ Spa");
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Vision
|
|
24
|
+
|
|
25
|
+
Instead of writing verbose SQL or application-specific filters, F1QL lets developers express motorsport queries naturally.
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
Max @ Spa
|
|
31
|
+
|
|
32
|
+
Hamilton @ Monaco 2024
|
|
33
|
+
|
|
34
|
+
Hamilton vs Verstappen
|
|
35
|
+
|
|
36
|
+
Alonso & Hamilton @ Monza
|
|
37
|
+
|
|
38
|
+
Michael @ India & Monaco
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Roadmap
|
|
42
|
+
|
|
43
|
+
- [ ] Tokenizer
|
|
44
|
+
- [ ] Parser
|
|
45
|
+
- [ ] AST
|
|
46
|
+
- [ ] Entity resolution
|
|
47
|
+
- [ ] Validation
|
|
48
|
+
- [ ] Language specification
|
|
49
|
+
|
|
50
|
+
## Contributing
|
|
51
|
+
|
|
52
|
+
Contributions are welcome once the language reaches its first public milestone.
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
MIT
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Parses an F1QL query.\n */\nexport function parse(query: string): never {\n\tthrow new Error(\n\t\t`\"${query}\" could not be parsed because the parser has not been implemented yet.`,\n\t);\n}\n"],"mappings":";AAGO,SAAS,MAAM,OAAsB;AAC3C,QAAM,IAAI;AAAA,IACT,IAAI,KAAK;AAAA,EACV;AACD;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@f1ql/core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A query language for Formula 1 analytics.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"author": "Saurav Khare",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/SauravKhare/f1ql.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/SauravKhare/f1ql/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/SauravKhare/f1ql#readme",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"f1",
|
|
18
|
+
"formula1",
|
|
19
|
+
"query-language",
|
|
20
|
+
"dsl",
|
|
21
|
+
"parser",
|
|
22
|
+
"compiler"
|
|
23
|
+
],
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"devEngines": {
|
|
35
|
+
"packageManager": {
|
|
36
|
+
"name": "pnpm",
|
|
37
|
+
"version": "^11.7.0",
|
|
38
|
+
"onFail": "download"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@biomejs/biome": "^2.5.1",
|
|
43
|
+
"tsup": "^8.5.1",
|
|
44
|
+
"typescript": "^6.0.3",
|
|
45
|
+
"vitest": "^4.1.9"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsup",
|
|
49
|
+
"dev": "tsup --watch",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:watch": "vitest",
|
|
52
|
+
"lint": "biome check .",
|
|
53
|
+
"format": "biome format --write ."
|
|
54
|
+
}
|
|
55
|
+
}
|