@plurnk/plurnk-mimetypes-text-dockerfile 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/.dockerfile-grammar-pin +1 -0
- package/LICENSE +21 -0
- package/README.md +33 -0
- package/dist/TextDockerfile.d.ts +7 -0
- package/dist/TextDockerfile.d.ts.map +1 -0
- package/dist/TextDockerfile.js +36 -0
- package/dist/TextDockerfile.js.map +1 -0
- package/dist/dockerfile.d.ts +3 -0
- package/dist/dockerfile.d.ts.map +1 -0
- package/dist/dockerfile.js +96 -0
- package/dist/dockerfile.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dockerfile.wasm +0 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
971acdd908568b4531b0ba28a445bf0bb720aba5
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PossumTech Laboratories, LLC
|
|
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,33 @@
|
|
|
1
|
+
# @plurnk/plurnk-mimetypes-text-dockerfile
|
|
2
|
+
|
|
3
|
+
`text/x-dockerfile` mimetype handler for the [plurnk](https://github.com/plurnk) ecosystem. Tier 2 — uses the [camdencheek/tree-sitter-dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) grammar built to WASM and shipped pre-built in this package (52 KB).
|
|
4
|
+
|
|
5
|
+
## install
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm i @plurnk/plurnk-mimetypes-text-dockerfile
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
No build tools required at install time. The `dockerfile.wasm` artifact is included.
|
|
12
|
+
|
|
13
|
+
## what it does
|
|
14
|
+
|
|
15
|
+
Three channels per the framework's #10 contract:
|
|
16
|
+
|
|
17
|
+
- **symbols** (`extractRaw` / `preview`) — multi-stage builds surface each `FROM ... AS <name>` stage as a `module`; ARG declarations and ENV/LABEL pair names surface as `constant` symbols. Imperative instructions (RUN, COPY, CMD, ENTRYPOINT, WORKDIR, EXPOSE, USER, etc.) don't produce symbols — they have no name to navigate to. The model can still find them via regex or deep-json queries.
|
|
18
|
+
- **deep-json** (`deepJson`) — inherited from `TreeSitterExtractor`: full named-children walk of the Dockerfile parse tree. jsonpath queries like `$..children[?(@.type=='run_instruction')]` find every RUN, `$..children[?(@.type=='copy_instruction')]` finds every COPY, etc.
|
|
19
|
+
- **deep-xml** — framework-projected from deep-json.
|
|
20
|
+
|
|
21
|
+
Registers as `text/x-dockerfile` with extensions `.dockerfile` and exact filenames `Dockerfile` and `Containerfile`.
|
|
22
|
+
|
|
23
|
+
## coverage
|
|
24
|
+
|
|
25
|
+
Validated against real-world Dockerfiles including BuildKit syntax. The grammar handles standard and multi-stage builds cleanly; advanced BuildKit features (`--mount=type=secret`, `COPY --parents` from the dockerfile/1.7-labs syntax) may produce localized parse warnings but symbol extraction continues to work.
|
|
26
|
+
|
|
27
|
+
## the grammar pin
|
|
28
|
+
|
|
29
|
+
`.dockerfile-grammar-pin` records the upstream commit SHA `dockerfile.wasm` is built from. `scripts/build-wasm.mjs` builds it; `scripts/verify-wasm.mjs` rebuilds and byte-compares.
|
|
30
|
+
|
|
31
|
+
## license
|
|
32
|
+
|
|
33
|
+
MIT.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TreeSitterExtractor } from "@plurnk/plurnk-mimetypes";
|
|
2
|
+
import type { HandlerContent, MimeSymbol, TreeSitterParser, TreeSitterTree } from "@plurnk/plurnk-mimetypes";
|
|
3
|
+
export default class TextDockerfile extends TreeSitterExtractor {
|
|
4
|
+
protected loadParser(): Promise<TreeSitterParser>;
|
|
5
|
+
protected extractFromTree(tree: TreeSitterTree, _content: HandlerContent): MimeSymbol[];
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=TextDockerfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextDockerfile.d.ts","sourceRoot":"","sources":["../src/TextDockerfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EACR,cAAc,EACd,UAAU,EAEV,gBAAgB,EAChB,cAAc,EACjB,MAAM,0BAA0B,CAAC;AAclC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,mBAAmB;cAC3C,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAkBvD,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,GAAG,UAAU,EAAE;CAG1F"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
import { TreeSitterExtractor } from "@plurnk/plurnk-mimetypes";
|
|
10
|
+
import { extract } from "./dockerfile.js";
|
|
11
|
+
// text/x-dockerfile handler. Tier 2 — tree-sitter-dockerfile grammar built to
|
|
12
|
+
// WASM at package publish time and shipped alongside this code. The .wasm file
|
|
13
|
+
// lives at the package root; we resolve it via import.meta.url so the path is
|
|
14
|
+
// stable across consumers.
|
|
15
|
+
//
|
|
16
|
+
// Why Tier 2: camdencheek/tree-sitter-dockerfile's npm package doesn't ship
|
|
17
|
+
// WASM. We build it ourselves (see scripts/build-wasm.mjs +
|
|
18
|
+
// scripts/verify-wasm.mjs) so consumers get pure WASM at install time.
|
|
19
|
+
//
|
|
20
|
+
// Also registers as `Dockerfile` and `Containerfile` filename matches (no
|
|
21
|
+
// extension; the framework's discover() routes by exact filename for these).
|
|
22
|
+
export default class TextDockerfile extends TreeSitterExtractor {
|
|
23
|
+
async loadParser() {
|
|
24
|
+
const ts = await import(__rewriteRelativeImportExtension("web-tree-sitter"));
|
|
25
|
+
await ts.Parser.init();
|
|
26
|
+
const wasmUrl = new URL("../dockerfile.wasm", import.meta.url);
|
|
27
|
+
const lang = await ts.Language.load(wasmUrl.pathname);
|
|
28
|
+
const parser = new ts.Parser();
|
|
29
|
+
parser.setLanguage(lang);
|
|
30
|
+
return parser;
|
|
31
|
+
}
|
|
32
|
+
extractFromTree(tree, _content) {
|
|
33
|
+
return extract(tree.rootNode);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=TextDockerfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextDockerfile.js","sourceRoot":"","sources":["../src/TextDockerfile.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAQ/D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,2BAA2B;AAC3B,EAAE;AACF,4EAA4E;AAC5E,4DAA4D;AAC5D,uEAAuE;AACvE,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,mBAAmB;IACjD,KAAK,CAAC,UAAU;QACtB,MAAM,EAAE,GAAG,MAAM,MAAM,kCAAC,iBAA2B,EAQlD,CAAC;QACF,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/D,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;QAC/B,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzB,OAAO,MAAqC,CAAC;IACjD,CAAC;IAES,eAAe,CAAC,IAAoB,EAAE,QAAwB;QACpE,OAAO,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dockerfile.d.ts","sourceRoot":"","sources":["../src/dockerfile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAc3E,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU,EAAE,CAqE1D"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Dockerfile SPEC §3 mapping for tree-sitter-dockerfile.
|
|
2
|
+
//
|
|
3
|
+
// from_instruction with `as: image_alias` → module, named by the alias
|
|
4
|
+
// from_instruction without alias → module, "stage" + index
|
|
5
|
+
// arg_instruction → constant (named by arg name)
|
|
6
|
+
// env_instruction → constant per env_pair (named by env var)
|
|
7
|
+
// label_instruction → constant per label_pair (named by label key)
|
|
8
|
+
//
|
|
9
|
+
// Everything else (RUN, COPY, CMD, ENTRYPOINT, WORKDIR, EXPOSE, USER,
|
|
10
|
+
// VOLUME, HEALTHCHECK, SHELL, STOPSIGNAL) is not surfaced as a symbol —
|
|
11
|
+
// they're imperative steps with no name to navigate to. The model can
|
|
12
|
+
// still find them via regex or the deep-json channel.
|
|
13
|
+
export function extract(root) {
|
|
14
|
+
const out = [];
|
|
15
|
+
let stageIndex = 0;
|
|
16
|
+
for (let i = 0; i < root.namedChildCount; i += 1) {
|
|
17
|
+
const child = root.namedChild(i);
|
|
18
|
+
if (!child)
|
|
19
|
+
continue;
|
|
20
|
+
switch (child.type) {
|
|
21
|
+
case "from_instruction": {
|
|
22
|
+
const alias = child.childForFieldName("as");
|
|
23
|
+
const name = alias ? alias.text : `stage_${stageIndex}`;
|
|
24
|
+
stageIndex += 1;
|
|
25
|
+
out.push({
|
|
26
|
+
name,
|
|
27
|
+
kind: "module",
|
|
28
|
+
line: child.startPosition.row + 1,
|
|
29
|
+
endLine: child.endPosition.row + 1,
|
|
30
|
+
});
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
case "arg_instruction": {
|
|
34
|
+
const nameNode = child.childForFieldName("name");
|
|
35
|
+
if (nameNode) {
|
|
36
|
+
out.push({
|
|
37
|
+
name: nameNode.text,
|
|
38
|
+
kind: "constant",
|
|
39
|
+
line: child.startPosition.row + 1,
|
|
40
|
+
endLine: child.endPosition.row + 1,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
case "env_instruction": {
|
|
46
|
+
for (let j = 0; j < child.namedChildCount; j += 1) {
|
|
47
|
+
const pair = child.namedChild(j);
|
|
48
|
+
if (!pair || pair.type !== "env_pair")
|
|
49
|
+
continue;
|
|
50
|
+
const nameNode = pair.childForFieldName("name");
|
|
51
|
+
if (nameNode) {
|
|
52
|
+
out.push({
|
|
53
|
+
name: nameNode.text,
|
|
54
|
+
kind: "constant",
|
|
55
|
+
line: pair.startPosition.row + 1,
|
|
56
|
+
endLine: pair.endPosition.row + 1,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case "label_instruction": {
|
|
63
|
+
for (let j = 0; j < child.namedChildCount; j += 1) {
|
|
64
|
+
const pair = child.namedChild(j);
|
|
65
|
+
if (!pair || pair.type !== "label_pair")
|
|
66
|
+
continue;
|
|
67
|
+
const keyNode = pair.childForFieldName("key");
|
|
68
|
+
if (keyNode) {
|
|
69
|
+
out.push({
|
|
70
|
+
name: stripQuotes(keyNode.text),
|
|
71
|
+
kind: "constant",
|
|
72
|
+
line: pair.startPosition.row + 1,
|
|
73
|
+
endLine: pair.endPosition.row + 1,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
default:
|
|
80
|
+
// imperative instructions (RUN/COPY/CMD/etc.) — no symbol
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
function stripQuotes(text) {
|
|
87
|
+
if (text.length >= 2) {
|
|
88
|
+
const first = text.charCodeAt(0);
|
|
89
|
+
const last = text.charCodeAt(text.length - 1);
|
|
90
|
+
if ((first === 0x22 && last === 0x22) || (first === 0x27 && last === 0x27)) {
|
|
91
|
+
return text.slice(1, -1);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return text;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=dockerfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dockerfile.js","sourceRoot":"","sources":["../src/dockerfile.ts"],"names":[],"mappings":"AAEA,yDAAyD;AACzD,EAAE;AACF,yEAAyE;AACzE,sEAAsE;AACtE,mDAAmD;AACnD,+DAA+D;AAC/D,qEAAqE;AACrE,EAAE;AACF,sEAAsE;AACtE,wEAAwE;AACxE,sEAAsE;AACtE,sDAAsD;AACtD,MAAM,UAAU,OAAO,CAAC,IAAoB;IACxC,MAAM,GAAG,GAAiB,EAAE,CAAC;IAC7B,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK;YAAE,SAAS;QACrB,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACjB,KAAK,kBAAkB,CAAC,CAAC,CAAC;gBACtB,MAAM,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBAC5C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC;gBACxD,UAAU,IAAI,CAAC,CAAC;gBAChB,GAAG,CAAC,IAAI,CAAC;oBACL,IAAI;oBACJ,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,KAAK,CA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C;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dockerfile.wasm
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@plurnk/plurnk-mimetypes-text-dockerfile",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "text/x-dockerfile mimetype handler for plurnk-service. Tier 2: tree-sitter-dockerfile grammar built to WASM and shipped pre-built in this package.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=25"
|
|
12
|
+
},
|
|
13
|
+
"plurnk": {
|
|
14
|
+
"kind": "mimetype",
|
|
15
|
+
"handlers": [
|
|
16
|
+
{
|
|
17
|
+
"name": "text/x-dockerfile",
|
|
18
|
+
"glyph": "🐳",
|
|
19
|
+
"extensions": [
|
|
20
|
+
".dockerfile",
|
|
21
|
+
"Dockerfile",
|
|
22
|
+
"Containerfile"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json",
|
|
33
|
+
"./dockerfile.wasm": "./dockerfile.wasm"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist/**/*",
|
|
37
|
+
"dockerfile.wasm",
|
|
38
|
+
".dockerfile-grammar-pin",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build:wasm": "node scripts/build-wasm.mjs",
|
|
43
|
+
"build:dist": "tsc -p tsconfig.build.json",
|
|
44
|
+
"build": "npm run build:dist",
|
|
45
|
+
"test:lint": "tsc --noEmit",
|
|
46
|
+
"test:unit": "node --test src/**/*.test.ts",
|
|
47
|
+
"test": "npm run test:lint && npm run test:unit",
|
|
48
|
+
"prepare": "npm run build",
|
|
49
|
+
"verify:wasm": "node scripts/verify-wasm.mjs"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"web-tree-sitter": "^0.25.10"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@types/node": "^25.9.1",
|
|
56
|
+
"tree-sitter-cli": "^0.26.9",
|
|
57
|
+
"typescript": "^6.0.3",
|
|
58
|
+
"@plurnk/plurnk-mimetypes": "^0.14.1"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@plurnk/plurnk-mimetypes": "^0.14.1"
|
|
62
|
+
}
|
|
63
|
+
}
|