@plurnk/plurnk-mimetypes-text-plain 0.1.0
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 +27 -0
- package/dist/TextPlain.d.ts +4 -0
- package/dist/TextPlain.d.ts.map +1 -0
- package/dist/TextPlain.js +8 -0
- package/dist/TextPlain.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/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PossumTech Laboratories
|
|
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,27 @@
|
|
|
1
|
+
# @plurnk/plurnk-mimetypes-text-plain
|
|
2
|
+
|
|
3
|
+
`text/plain` mimetype handler for the [plurnk](https://github.com/plurnk) ecosystem.
|
|
4
|
+
|
|
5
|
+
## install
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm install @plurnk/plurnk-mimetypes-text-plain
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
plurnk-service discovers this handler automatically via its `plurnk.kind: "mimetype"` declaration in `package.json`.
|
|
12
|
+
|
|
13
|
+
## what it does
|
|
14
|
+
|
|
15
|
+
Nothing structural. text/plain has no symbols to extract — [`BaseHandler`](https://github.com/plurnk/plurnk-mimetypes)'s defaults (empty `extract`, no-op `validate`, derived `symbols`/`preview`) are exactly right. When the framework's `Mimetypes.process` calls this handler and gets back no symbols, its raw-content fallback path supplies the preview.
|
|
16
|
+
|
|
17
|
+
## development
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm install
|
|
21
|
+
npm run build
|
|
22
|
+
npm test
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## license
|
|
26
|
+
|
|
27
|
+
MIT.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextPlain.d.ts","sourceRoot":"","sources":["../src/TextPlain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAMvD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;CAAG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseHandler } from "@plurnk/plurnk-mimetypes";
|
|
2
|
+
// text/plain handler. BaseHandler's defaults (empty extract, no-op validate,
|
|
3
|
+
// derived symbols/preview) are exactly right — text/plain has no structural
|
|
4
|
+
// declarations to extract. The framework's raw-content fallback path in
|
|
5
|
+
// Mimetypes.process supplies preview content when extract is empty.
|
|
6
|
+
export default class TextPlain extends BaseHandler {
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=TextPlain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextPlain.js","sourceRoot":"","sources":["../src/TextPlain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,6EAA6E;AAC7E,4EAA4E;AAC5E,wEAAwE;AACxE,oEAAoE;AACpE,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;CAAG"}
|
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,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,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,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@plurnk/plurnk-mimetypes-text-plain",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "text/plain mimetype handler for plurnk-service.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=25"
|
|
12
|
+
},
|
|
13
|
+
"plurnk": {
|
|
14
|
+
"kind": "mimetype",
|
|
15
|
+
"name": "text/plain",
|
|
16
|
+
"glyph": "📄",
|
|
17
|
+
"extensions": [".txt"]
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/**/*",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"test:lint": "tsc --noEmit",
|
|
32
|
+
"test:unit": "node --test src/**/*.test.ts",
|
|
33
|
+
"test": "npm run test:lint && npm run test:unit",
|
|
34
|
+
"build:dist": "tsc -p tsconfig.build.json",
|
|
35
|
+
"build": "npm run build:dist",
|
|
36
|
+
"prepare": "npm run build"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@plurnk/plurnk-mimetypes": "^0.1.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "^25.8.0",
|
|
43
|
+
"typescript": "^6.0.3"
|
|
44
|
+
}
|
|
45
|
+
}
|