sparqlc-cli 0.1.0 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # sparqlc-cli
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2b52118: Ship an agent skill in each package with guidance for configuring and using its SPARQL integration.
8
+ - Updated dependencies [2b52118]
9
+ - sparqlc@0.3.1
10
+
3
11
  ## 0.1.0
4
12
 
5
13
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sparqlc-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -11,7 +11,8 @@
11
11
  "CHANGELOG.md",
12
12
  "bin",
13
13
  "*.js",
14
- "*.d.ts"
14
+ "*.d.ts",
15
+ "skills"
15
16
  ],
16
17
  "scripts": {
17
18
  "build": "tsc",
@@ -27,7 +28,7 @@
27
28
  },
28
29
  "dependencies": {
29
30
  "commander": "13 - 15",
30
- "sparqlc": "^0.3.0"
31
+ "sparqlc": "^0.3.1"
31
32
  },
32
33
  "peerDependencies": {
33
34
  "typescript": "5 || 6"
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: sparqlc-cli
3
+ description: Type-check and build TypeScript projects with SPARQL imports or compile individual queries. Use when configuring sparqlc-tsc, copying query assets, or running the sparqlc command.
4
+ ---
5
+
6
+ # SPARQL compiler commands
7
+
8
+ Install `sparqlc-cli`, `sparqlc`, and TypeScript 5 or 6 in the consuming project.
9
+
10
+ ## TypeScript projects
11
+
12
+ Use `sparqlc-tsc` in place of `tsc` for query-aware command-line builds:
13
+
14
+ ```json
15
+ {
16
+ "scripts": {
17
+ "build": "sparqlc-tsc",
18
+ "typecheck": "sparqlc-tsc --noEmit",
19
+ "watch": "sparqlc-tsc --watch"
20
+ }
21
+ }
22
+ ```
23
+
24
+ Enable `compilerOptions.allowArbitraryExtensions` in the project's tsconfig and preserve its existing module settings. A Node ESM project can use `module` and `moduleResolution` set to `NodeNext`.
25
+
26
+ The wrapper serves virtual `foo.d.rq.ts` / `foo.d.ru.ts` declarations from query sources. Unlike plain `tsc`, it can infer query-specific types without loading an editor language service plugin.
27
+
28
+ When JavaScript is emitted to `outDir`, statically imported `.rq` and `.ru` files are copied alongside the output, preserving their paths. Runtime Node imports still require registration of `node-loader-sparql`.
29
+
30
+ Query copying skips `--noEmit`, `--emitDeclarationOnly`, and failed builds under `noEmitOnError`. Computed dynamic imports are not tracked. `outFile` is unsupported for query copying, and `-b --clean` does not remove copied query assets. Use `--listEmittedFiles` to inspect copied paths.
31
+
32
+ ## Individual query compilation
33
+
34
+ ```sh
35
+ npx sparqlc --base http://example.org/ queries/find-all.rq > dist/find-all.js
36
+ ```
37
+
38
+ The command writes generated JavaScript module source to stdout. Ensure the destination directory exists before redirecting output. `.ru` update files use the same command. Import the generated module's default export as a sparqlc executor; compilation itself does not execute the query.