inspex 0.0.0-stage → 0.0.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Chenxin Yan
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 CHANGED
@@ -1,3 +1,40 @@
1
- # Temporary Holding Version
1
+ # inspex
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Import a spec file in TypeScript and get its types, with no generation step.
4
+
5
+ `inspex` is a set of [TypeScript content mappers](https://devblogs.microsoft.com/typescript/announcing-typescript-7-1-beta/#content-mappers). A content mapper tells the compiler how to read a file type it does not know, so the types live in the spec itself: change the spec and every file that no longer matches it fails the type check.
6
+
7
+ > [!WARNING]
8
+ > Nothing usable is published yet. The first mapper, for OpenAPI documents, is in development. Content mappers need TypeScript 7.1, which is in beta.
9
+
10
+ ## Planned
11
+
12
+ ```jsonc
13
+ // tsconfig.json
14
+ {
15
+ "contentMappers": [{ "package": "inspex", "extensions": [".openapi.jsonc"] }],
16
+ }
17
+ ```
18
+
19
+ ```ts
20
+ import type { paths } from "./acme.openapi.jsonc";
21
+ ```
22
+
23
+ ## Development
24
+
25
+ Install [mise](https://mise.jdx.dev/getting-started.html), then:
26
+
27
+ ```sh
28
+ mise trust && mise install
29
+ pnpm install
30
+ pnpm run check # format and lint
31
+ pnpm run check:types # type check
32
+ pnpm run test # tests
33
+ pnpm run build # build dist/
34
+ ```
35
+
36
+ Record user-visible changes with `pnpm run changeset`. Merging to `main` opens a release pull request; merging that publishes to npm.
37
+
38
+ ## License
39
+
40
+ MIT
@@ -0,0 +1,2 @@
1
+ /** The package name, as written in a `contentMappers` entry of `tsconfig.json`. */
2
+ export declare const packageName: string;
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ // src/index.ts
2
+ /** The package name, as written in a `contentMappers` entry of `tsconfig.json`. */
3
+ const packageName = "inspex";
4
+ export { packageName };
package/package.json CHANGED
@@ -1,6 +1,62 @@
1
1
  {
2
- "name": "inspex",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "inspex",
3
+ "version": "0.0.0",
4
+ "description": "TypeScript content mappers: import a spec file and get its types, with no generation step",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "license": "MIT",
8
+ "author": "chenxin-yan",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/chenxin-yan/inspex.git"
12
+ },
13
+ "homepage": "https://github.com/chenxin-yan/inspex#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/chenxin-yan/inspex/issues"
16
+ },
17
+ "keywords": [
18
+ "typescript",
19
+ "content-mapper",
20
+ "openapi",
21
+ "types",
22
+ "codegen"
23
+ ],
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js"
31
+ }
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "scripts": {
37
+ "build": "vp pack",
38
+ "dev": "vp pack --watch",
39
+ "lint": "vp lint",
40
+ "lint:fix": "vp lint --fix",
41
+ "format": "vp fmt --check",
42
+ "format:fix": "vp fmt",
43
+ "check": "vp check",
44
+ "check:fix": "vp check --fix",
45
+ "check:types": "tsc --noEmit",
46
+ "test": "vp test",
47
+ "changeset": "changeset",
48
+ "release:version": "changeset version && pnpm install --lockfile-only --ignore-scripts",
49
+ "release:pack": "node ./scripts/release.mjs --pack-dir",
50
+ "release:publish": "node ./scripts/release.mjs --publish-dir"
51
+ },
52
+ "devDependencies": {
53
+ "@arethetypeswrong/core": "^0.18.5",
54
+ "@changesets/changelog-github": "^1.0.1",
55
+ "@changesets/cli": "^3.0.3",
56
+ "@types/node": "^24.0.0",
57
+ "publint": "^0.3.25",
58
+ "typescript": "^7.0.2",
59
+ "vite-plus": "1.4.0"
60
+ },
61
+ "packageManager": "pnpm@12.16.1"
62
+ }