Skip to content
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
606 changes: 606 additions & 0 deletions libs/@local/hashql/sdk/typescript/LICENSE.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions libs/@local/hashql/sdk/typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# HashQL TypeScript SDK

TypeScript SDK for HashQL.
32 changes: 32 additions & 0 deletions libs/@local/hashql/sdk/typescript/docs/task-dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"package": "@local/hashql",
"dependencies": [
"@local/oxlint",
"@local/tsconfig"
],
"tasks": {
"build": {
"dependsOn": [
"@local/oxlint#build"
]
},
"lint:oxlint": {
"dependsOn": [
"@local/oxlint#build"
]
},
"lint:tsc": {
"dependsOn": [
"@local/oxlint#build"
]
},
"test:unit": {
"dependsOn": [
"@local/oxlint#build"
],
"env": [
"TEST_COVERAGE"
]
}
}
}
21 changes: 21 additions & 0 deletions libs/@local/hashql/sdk/typescript/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineConfig } from "@local/oxlint";

import type { OxlintConfig } from "oxlint";

const config: OxlintConfig = defineConfig({
frameworks: ["effect", "vitest"],
runtime: "browser",
overrides: [
{
files: ["src/**/*.ts"],
rules: {
"unicorn/filename-case": [
"deny", // Module files follow Effect naming conventions.
{ cases: { pascalCase: true, kebabCase: true } },
],
},
},
],
});

export default config;
34 changes: 34 additions & 0 deletions libs/@local/hashql/sdk/typescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "@local/hashql",
"version": "0.0.0-private",
"private": true,
"description": "TypeScript SDK for HashQL",
"license": "AGPL-3",
"files": [
"dist"
],
"type": "module",
"exports": {
".": {
"types": "./dist/main.d.ts",
"default": "./dist/main.js"
}
},
"scripts": {
"build": "tsdown",
"fix:oxlint": "oxlint --disable-nested-config -c oxlint.config.ts --fix",
"lint:oxlint": "oxlint --disable-nested-config -c oxlint.config.ts",
"lint:tsc": "tsc --noEmit",
"test:unit": "vitest run --typecheck --passWithNoTests"
},
"devDependencies": {
"@local/oxlint": "workspace:*",
"@local/tsconfig": "workspace:*",
"@tsconfig/bases": "catalog:",
"oxlint": "catalog:",
"tsdown": "0.23.0",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:"
}
}
2 changes: 2 additions & 0 deletions libs/@local/hashql/sdk/typescript/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// oxlint-disable-next-line unicorn/require-module-specifiers -- This scaffold intentionally exposes no API.
export {};
16 changes: 16 additions & 0 deletions libs/@local/hashql/sdk/typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": ["@tsconfig/bases/strictest", "@local/tsconfig/policy.json"],
"compilerOptions": {
"lib": ["es2024"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"types": [],
"verbatimModuleSyntax": true,
"erasableSyntaxOnly": true,
"declaration": true,
"isolatedDeclarations": true,
"noEmit": true
},
"include": ["src", "oxlint.config.ts", "tsdown.config.ts"]
}
27 changes: 27 additions & 0 deletions libs/@local/hashql/sdk/typescript/tsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"tagDefinitions": [
{
"tagName": "@category",
"syntaxKind": "block"
},
{
"tagName": "@stability",
"syntaxKind": "block"
},
{
"tagName": "@since",
"syntaxKind": "block"
},
{
"tagName": "@module",
"syntaxKind": "modifier"
}
],
"supportForTags": {
"@category": true,
"@stability": true,
"@since": true,
"@module": true
}
}
15 changes: 15 additions & 0 deletions libs/@local/hashql/sdk/typescript/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from "tsdown";

import type { UserConfig } from "tsdown";

const config: UserConfig = defineConfig({
entry: ["src/main.ts"],
format: "esm",
platform: "neutral",
unbundle: true,
fixedExtension: false,
dts: true,
sourcemap: true,
});

export default config;
13 changes: 13 additions & 0 deletions libs/@local/hashql/sdk/typescript/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
},
"test:unit": {
"dependsOn": ["^build"]
}
}
}
17 changes: 16 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10088,6 +10088,21 @@ __metadata:
languageName: unknown
linkType: soft

"@local/hashql@workspace:libs/@local/hashql/sdk/typescript":
version: 0.0.0-use.local
resolution: "@local/hashql@workspace:libs/@local/hashql/sdk/typescript"
dependencies:
"@local/oxlint": "workspace:*"
"@local/tsconfig": "workspace:*"
"@tsconfig/bases": "catalog:"
oxlint: "catalog:"
tsdown: "npm:0.23.0"
typescript: "catalog:"
vite: "catalog:"
vitest: "catalog:"
languageName: unknown
linkType: soft

"@local/internal-api-client@workspace:*, @local/internal-api-client@workspace:libs/@local/internal-api-client/typescript":
version: 0.0.0-use.local
resolution: "@local/internal-api-client@workspace:libs/@local/internal-api-client/typescript"
Expand All @@ -10102,7 +10117,7 @@ __metadata:
languageName: unknown
linkType: soft

"@local/oxlint@workspace:libs/@local/oxlint":
"@local/oxlint@workspace:*, @local/oxlint@workspace:libs/@local/oxlint":
version: 0.0.0-use.local
resolution: "@local/oxlint@workspace:libs/@local/oxlint"
dependencies:
Expand Down
Loading