@textmode/tsconfig 0.2.2 → 0.3.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 -121
- package/README.md +7 -7
- package/dist/cli/textmode-types.d.ts +3 -0
- package/dist/cli/textmode-types.d.ts.map +1 -0
- package/dist/cli/textmode-types.js +95 -0
- package/dist/cli/textmode-types.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/check-project.d.ts +52 -0
- package/dist/internal/check-project.d.ts.map +1 -0
- package/dist/internal/check-project.js +65 -0
- package/dist/internal/check-project.js.map +1 -0
- package/dist/internal/declaration-doc-tags.d.ts +45 -0
- package/dist/internal/declaration-doc-tags.d.ts.map +1 -0
- package/dist/internal/declaration-doc-tags.js +210 -0
- package/dist/internal/declaration-doc-tags.js.map +1 -0
- package/dist/internal/declarations.d.ts +20 -0
- package/dist/internal/declarations.d.ts.map +1 -0
- package/dist/internal/declarations.js +136 -0
- package/dist/internal/declarations.js.map +1 -0
- package/dist/internal/project.d.ts +68 -0
- package/dist/internal/project.d.ts.map +1 -0
- package/dist/internal/project.js +100 -0
- package/dist/internal/project.js.map +1 -0
- package/dist/internal/typescript-compiler.d.ts +25 -0
- package/dist/internal/typescript-compiler.d.ts.map +1 -0
- package/dist/internal/typescript-compiler.js +43 -0
- package/dist/internal/typescript-compiler.js.map +1 -0
- package/package.json +70 -50
- package/src/cli/textmode-types.mjs +0 -99
- package/src/internal/declaration-doc-tags.mjs +0 -202
- package/src/internal/project.mjs +0 -282
package/LICENSE
CHANGED
|
@@ -1,121 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
the purpose of contributing to a commons of creative, cultural and
|
|
23
|
-
scientific works ("Commons") that the public can reliably and without fear
|
|
24
|
-
of later claims of infringement build upon, modify, incorporate in other
|
|
25
|
-
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
26
|
-
and for any purposes, including without limitation commercial purposes.
|
|
27
|
-
These owners may contribute to the Commons to promote the ideal of a free
|
|
28
|
-
culture and the further production of creative, cultural and scientific
|
|
29
|
-
works, or to gain reputation or greater distribution for their Work in
|
|
30
|
-
part through the use and efforts of others.
|
|
31
|
-
|
|
32
|
-
For these and/or other purposes and motivations, and without any
|
|
33
|
-
expectation of additional consideration or compensation, the person
|
|
34
|
-
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
35
|
-
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
36
|
-
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
37
|
-
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
38
|
-
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
39
|
-
|
|
40
|
-
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
41
|
-
protected by copyright and related or neighboring rights ("Copyright and
|
|
42
|
-
Related Rights"). Copyright and Related Rights include, but are not
|
|
43
|
-
limited to, the following:
|
|
44
|
-
|
|
45
|
-
i. the right to reproduce, adapt, distribute, perform, display,
|
|
46
|
-
communicate, and translate a Work;
|
|
47
|
-
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
48
|
-
iii. publicity and privacy rights pertaining to a person's image or
|
|
49
|
-
likeness depicted in a Work;
|
|
50
|
-
iv. rights protecting against unfair competition in regards to a Work,
|
|
51
|
-
subject to the limitations in paragraph 4(a), below;
|
|
52
|
-
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
53
|
-
in a Work;
|
|
54
|
-
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
55
|
-
European Parliament and of the Council of 11 March 1996 on the legal
|
|
56
|
-
protection of databases, and under any national implementation
|
|
57
|
-
thereof, including any amended or successor version of such
|
|
58
|
-
directive); and
|
|
59
|
-
vii. other similar, equivalent or corresponding rights throughout the
|
|
60
|
-
world based on applicable law or treaty, and any national
|
|
61
|
-
implementations thereof.
|
|
62
|
-
|
|
63
|
-
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
64
|
-
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
65
|
-
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
66
|
-
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
67
|
-
of action, whether now known or unknown (including existing as well as
|
|
68
|
-
future claims and causes of action), in the Work (i) in all territories
|
|
69
|
-
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
70
|
-
treaty (including future time extensions), (iii) in any current or future
|
|
71
|
-
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
72
|
-
including without limitation commercial, advertising or promotional
|
|
73
|
-
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
74
|
-
member of the public at large and to the detriment of Affirmer's heirs and
|
|
75
|
-
successors, fully intending that such Waiver shall not be subject to
|
|
76
|
-
revocation, rescission, cancellation, termination, or any other legal or
|
|
77
|
-
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
78
|
-
as contemplated by Affirmer's express Statement of Purpose.
|
|
79
|
-
|
|
80
|
-
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
81
|
-
be judged legally invalid or ineffective under applicable law, then the
|
|
82
|
-
Waiver shall be preserved to the maximum extent permitted taking into
|
|
83
|
-
account Affirmer's express Statement of Purpose. In addition, to the
|
|
84
|
-
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
85
|
-
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
86
|
-
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
87
|
-
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
88
|
-
maximum duration provided by applicable law or treaty (including future
|
|
89
|
-
time extensions), (iii) in any current or future medium and for any number
|
|
90
|
-
of copies, and (iv) for any purpose whatsoever, including without
|
|
91
|
-
limitation commercial, advertising or promotional purposes (the
|
|
92
|
-
"License"). The License shall be deemed effective as of the date CC0 was
|
|
93
|
-
applied by Affirmer to the Work. Should any part of the License for any
|
|
94
|
-
reason be judged legally invalid or ineffective under applicable law, such
|
|
95
|
-
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
96
|
-
of the License, and in such case Affirmer hereby affirms that he or she
|
|
97
|
-
will not (i) exercise any of his or her remaining Copyright and Related
|
|
98
|
-
Rights in the Work or (ii) assert any associated claims and causes of
|
|
99
|
-
action with respect to the Work, in either case contrary to Affirmer's
|
|
100
|
-
express Statement of Purpose.
|
|
101
|
-
|
|
102
|
-
4. Limitations and Disclaimers.
|
|
103
|
-
|
|
104
|
-
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
105
|
-
surrendered, licensed or otherwise affected by this document.
|
|
106
|
-
b. Affirmer offers the Work as-is and makes no representations or
|
|
107
|
-
warranties of any kind concerning the Work, express, implied,
|
|
108
|
-
statutory or otherwise, including without limitation warranties of
|
|
109
|
-
title, merchantability, fitness for a particular purpose, non
|
|
110
|
-
infringement, or the absence of latent or other defects, accuracy, or
|
|
111
|
-
the present or absence of errors, whether or not discoverable, all to
|
|
112
|
-
the greatest extent permissible under applicable law.
|
|
113
|
-
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
114
|
-
that may apply to the Work or any use thereof, including without
|
|
115
|
-
limitation any person's Copyright and Related Rights in the Work.
|
|
116
|
-
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
117
|
-
consents, permissions or other rights required for any use of the
|
|
118
|
-
Work.
|
|
119
|
-
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
120
|
-
party to this document and has no duty or obligation with respect to
|
|
121
|
-
this CC0 or use of the Work.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 humanbydefinition
|
|
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
<img alt="@textmode/tsconfig — type textmode strictly" src="
|
|
5
|
+
<img alt="@textmode/tsconfig — type textmode strictly" src="../../.github/assets/readme-og-tsconfig.png" />
|
|
6
6
|
|
|
7
7
|
| [](https://www.typescriptlang.org/) [](https://nodejs.org/) | [](https://code.textmode.art/) [](https://discord.gg/sjrw8QXNks) | [](https://ko-fi.com/V7V8JG2FY) [](https://github.com/sponsors/humanbydefinition) |
|
|
8
8
|
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -58,7 +58,7 @@ project root and TypeScript config.
|
|
|
58
58
|
removes `@category` and `@categoryDescription` blocks from emitted JSDoc.
|
|
59
59
|
Source comments are unchanged, so TypeDoc continues to use that metadata when
|
|
60
60
|
generating API documentation; other declaration documentation is preserved.
|
|
61
|
-
- `verify`
|
|
61
|
+
- `verify` checks non-JSON package exports from a temporary consumer with
|
|
62
62
|
`skipLibCheck: false`, including dependencies that reference the package or
|
|
63
63
|
one of its exported subpaths.
|
|
64
64
|
- `show-config` reports the complete authoring and declaration programs.
|
|
@@ -85,10 +85,10 @@ and avoiding accidental API removal in packages that historically emitted them.
|
|
|
85
85
|
`@textmode/tsconfig` is the foundation of the tooling stack and is consumed by
|
|
86
86
|
the following textmode-tooling packages:
|
|
87
87
|
|
|
88
|
-
| Package
|
|
89
|
-
|
|
|
90
|
-
| [`@textmode/docs`](
|
|
91
|
-
| [`@textmode/build`](
|
|
88
|
+
| Package | Relationship |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| [`@textmode/docs`](https://github.com/textmode-art/tooling/tree/main/packages/docs) | TypeDoc reads the consumer `tsconfig` |
|
|
91
|
+
| [`@textmode/build`](https://github.com/textmode-art/tooling/tree/main/packages/build) | Library builds and tests compile against the shared TypeScript policy |
|
|
92
92
|
|
|
93
93
|
## Presets
|
|
94
94
|
|
|
@@ -105,4 +105,4 @@ as aliases and should not be used by new projects.
|
|
|
105
105
|
|
|
106
106
|
## License
|
|
107
107
|
|
|
108
|
-
The `@textmode/tsconfig` package is licensed under the [
|
|
108
|
+
The `@textmode/tsconfig` package is licensed under the [MIT License](https://github.com/textmode-art/tooling/blob/main/LICENSE).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textmode-types.d.ts","sourceRoot":"","sources":["../../src/cli/textmode-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
import { parseArgs } from 'node:util';
|
|
5
|
+
import { checkProject, describeProject } from '../internal/check-project.js';
|
|
6
|
+
import { buildDeclarations, verifyDeclarations } from '../internal/declarations.js';
|
|
7
|
+
import { ProjectError, resolveProject } from '../internal/project.js';
|
|
8
|
+
const PACKAGE_JSON = JSON.parse(fs.readFileSync(new URL('../../package.json', import.meta.url), 'utf8'));
|
|
9
|
+
const COMMANDS = new Set(['check', 'build', 'verify', 'show-config']);
|
|
10
|
+
function printHelp() {
|
|
11
|
+
console.log(`@textmode/tsconfig ${PACKAGE_JSON.version}`);
|
|
12
|
+
console.log('');
|
|
13
|
+
console.log('Usage: textmode-types <command> [options]');
|
|
14
|
+
console.log('');
|
|
15
|
+
console.log('Commands:');
|
|
16
|
+
console.log(' check Type-check the authored project and reject unclaimed TypeScript files');
|
|
17
|
+
console.log(' build Emit production declarations to dist/types');
|
|
18
|
+
console.log(' verify Resolve every package export from an isolated declaration consumer');
|
|
19
|
+
console.log(' show-config Print the resolved authoring and declaration programs');
|
|
20
|
+
console.log('');
|
|
21
|
+
console.log('Options:');
|
|
22
|
+
console.log(' --cwd <dir> Project root containing package.json');
|
|
23
|
+
console.log(' --project <file> TypeScript config relative to the project root');
|
|
24
|
+
console.log(' --help, -h Show help');
|
|
25
|
+
console.log(' --version, -v Show version');
|
|
26
|
+
}
|
|
27
|
+
function parseCli(argv) {
|
|
28
|
+
const parsed = parseArgs({
|
|
29
|
+
args: argv,
|
|
30
|
+
allowPositionals: true,
|
|
31
|
+
strict: true,
|
|
32
|
+
options: {
|
|
33
|
+
cwd: { type: 'string' },
|
|
34
|
+
project: { type: 'string' },
|
|
35
|
+
help: { type: 'boolean', short: 'h' },
|
|
36
|
+
version: { type: 'boolean', short: 'v' },
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
if (parsed.values.version)
|
|
40
|
+
return { action: 'version' };
|
|
41
|
+
if (parsed.values.help && parsed.positionals.length === 0)
|
|
42
|
+
return { action: 'help' };
|
|
43
|
+
const command = parsed.positionals[0];
|
|
44
|
+
if (parsed.positionals.length !== 1 || !command || !COMMANDS.has(command)) {
|
|
45
|
+
throw new ProjectError('Expected one command: check, build, verify, or show-config.');
|
|
46
|
+
}
|
|
47
|
+
if (parsed.values.help)
|
|
48
|
+
return { action: 'help' };
|
|
49
|
+
return { action: 'run', command, values: parsed.values };
|
|
50
|
+
}
|
|
51
|
+
function run(argv) {
|
|
52
|
+
let cli;
|
|
53
|
+
try {
|
|
54
|
+
cli = parseCli(argv);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
58
|
+
process.exitCode = 2;
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (cli.action === 'help') {
|
|
62
|
+
printHelp();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (cli.action === 'version') {
|
|
66
|
+
console.log(PACKAGE_JSON.version);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
const project = resolveProject({ cwd: cli.values.cwd, project: cli.values.project });
|
|
71
|
+
let ok = true;
|
|
72
|
+
switch (cli.command) {
|
|
73
|
+
case 'check':
|
|
74
|
+
ok = checkProject(project);
|
|
75
|
+
break;
|
|
76
|
+
case 'build':
|
|
77
|
+
ok = buildDeclarations(project);
|
|
78
|
+
break;
|
|
79
|
+
case 'verify':
|
|
80
|
+
ok = verifyDeclarations(project);
|
|
81
|
+
break;
|
|
82
|
+
case 'show-config':
|
|
83
|
+
console.log(JSON.stringify(describeProject(project), null, 2));
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
if (!ok)
|
|
87
|
+
process.exitCode = 1;
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
console.error(error instanceof Error ? (error.stack ?? error.message) : String(error));
|
|
91
|
+
process.exitCode = error instanceof ProjectError ? 2 : 1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
run(process.argv.slice(2));
|
|
95
|
+
//# sourceMappingURL=textmode-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textmode-types.js","sourceRoot":"","sources":["../../src/cli/textmode-types.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAEtG,CAAC;AACF,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,CAAU,CAAC,CAAC;AAY/E,SAAS,SAAS;IACjB,OAAO,CAAC,GAAG,CAAC,sBAAsB,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACzB,OAAO,CAAC,GAAG,CAAC,wFAAwF,CA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X,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;gBAC3B,MAAM;YACP,KAAK,OAAO;gBACX,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBAChC,MAAM;YACP,KAAK,QAAQ;gBACZ,EAAE,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;gBACjC,MAAM;YACP,KAAK,aAAa;gBACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC/D,MAAM;QACR,CAAC;QACD,IAAI,CAAC,EAAE;YAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACvF,OAAO,CAAC,QAAQ,GAAG,KAAK,YAAY,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;AACF,CAAC;AAED,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared TypeScript project orchestration and declaration sanitization utilities for the `textmode.js` ecosystem.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export { STRIPPED_DECLARATION_DOC_TAGS, findDeclarationDocTags, sanitizeDeclarationDocTags, stripDeclarationDocTags, type SanitizeDeclarationDocTagsResult, type StripDeclarationDocTagsResult, } from './internal/declaration-doc-tags.js';
|
|
7
|
+
export { checkProject, describeProject, findUnclaimedFiles, type ProjectDescription, } from './internal/check-project.js';
|
|
8
|
+
export { buildDeclarations, verifyDeclarations } from './internal/declarations.js';
|
|
9
|
+
export { ProjectError, discoverAuthoredFiles, resolveProject, type PackageManifest, type ResolveProjectOptions, type ResolvedTypeScriptProject, } from './internal/project.js';
|
|
10
|
+
export { readEffectiveConfig, type EffectiveTypeScriptConfig } from './internal/typescript-compiler.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACN,6BAA6B,EAC7B,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,GAClC,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACN,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,KAAK,kBAAkB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EACN,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,KAAK,yBAAyB,EAAE,MAAM,mCAAmC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared TypeScript project orchestration and declaration sanitization utilities for the `textmode.js` ecosystem.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export { STRIPPED_DECLARATION_DOC_TAGS, findDeclarationDocTags, sanitizeDeclarationDocTags, stripDeclarationDocTags, } from './internal/declaration-doc-tags.js';
|
|
7
|
+
export { checkProject, describeProject, findUnclaimedFiles, } from './internal/check-project.js';
|
|
8
|
+
export { buildDeclarations, verifyDeclarations } from './internal/declarations.js';
|
|
9
|
+
export { ProjectError, discoverAuthoredFiles, resolveProject, } from './internal/project.js';
|
|
10
|
+
export { readEffectiveConfig } from './internal/typescript-compiler.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACN,6BAA6B,EAC7B,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,GAGvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACN,YAAY,EACZ,eAAe,EACf,kBAAkB,GAElB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EACN,YAAY,EACZ,qBAAqB,EACrB,cAAc,GAId,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAkC,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type ResolvedTypeScriptProject } from './project.js';
|
|
2
|
+
import { type EffectiveTypeScriptConfig } from './typescript-compiler.js';
|
|
3
|
+
/**
|
|
4
|
+
* Structured project summary returned by {@link describeProject}.
|
|
5
|
+
*/
|
|
6
|
+
export interface ProjectDescription {
|
|
7
|
+
/** Absolute path to the project root. */
|
|
8
|
+
projectRoot: string;
|
|
9
|
+
/** Package name from `package.json`. */
|
|
10
|
+
packageName: string;
|
|
11
|
+
/** Path to the TypeScript config relative to `projectRoot`. */
|
|
12
|
+
config: string;
|
|
13
|
+
/** Files claimed by the TypeScript project, relative to `projectRoot`. */
|
|
14
|
+
files: string[];
|
|
15
|
+
/** Authored TypeScript files not claimed by the project config. */
|
|
16
|
+
unclaimedFiles: string[];
|
|
17
|
+
/** Effective compiler options reported by `tsc --showConfig`. */
|
|
18
|
+
compilerOptions: Record<string, unknown> | undefined;
|
|
19
|
+
/** Declaration emission settings owned by `textmode-types build`. */
|
|
20
|
+
declarations: {
|
|
21
|
+
sourceDir: string;
|
|
22
|
+
declarationDir: string;
|
|
23
|
+
excludedTests: boolean;
|
|
24
|
+
declarationMap: boolean;
|
|
25
|
+
strippedDocTags: readonly string[];
|
|
26
|
+
stripInternal: boolean;
|
|
27
|
+
types: string[];
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Find authored TypeScript files that are not included in the effective `tsconfig.json`.
|
|
32
|
+
*
|
|
33
|
+
* @param project - Resolved project metadata.
|
|
34
|
+
* @param effectiveConfig - Optional pre-computed effective TypeScript config.
|
|
35
|
+
* @returns Sorted list of absolute paths for unclaimed files.
|
|
36
|
+
*/
|
|
37
|
+
export declare function findUnclaimedFiles(project: ResolvedTypeScriptProject, effectiveConfig?: EffectiveTypeScriptConfig): string[];
|
|
38
|
+
/**
|
|
39
|
+
* Verify that all authored TypeScript files are claimed by the config and pass `tsc --noEmit`.
|
|
40
|
+
*
|
|
41
|
+
* @param project - Resolved project metadata.
|
|
42
|
+
* @returns `true` when every file is claimed and type checking succeeds.
|
|
43
|
+
*/
|
|
44
|
+
export declare function checkProject(project: ResolvedTypeScriptProject): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Build a JSON-serializable summary of the resolved authoring and declaration TypeScript programs.
|
|
47
|
+
*
|
|
48
|
+
* @param project - Resolved project metadata.
|
|
49
|
+
* @returns Structured project summary.
|
|
50
|
+
*/
|
|
51
|
+
export declare function describeProject(project: ResolvedTypeScriptProject): ProjectDescription;
|
|
52
|
+
//# sourceMappingURL=check-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-project.d.ts","sourceRoot":"","sources":["../../src/internal/check-project.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAsC,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE9G;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,mEAAmE;IACnE,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iEAAiE;IACjE,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IACrD,qEAAqE;IACrE,YAAY,EAAE;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,OAAO,CAAC;QACvB,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;QACnC,aAAa,EAAE,OAAO,CAAC;QACvB,KAAK,EAAE,MAAM,EAAE,CAAC;KAChB,CAAC;CACF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,yBAAyB,EAClC,eAAe,GAAE,yBAAwD,GACvE,MAAM,EAAE,CAGV;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAgBxE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,yBAAyB,GAAG,kBAAkB,CAqBtF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { STRIPPED_DECLARATION_DOC_TAGS } from './declaration-doc-tags.js';
|
|
3
|
+
import { discoverAuthoredFiles } from './project.js';
|
|
4
|
+
import { readEffectiveConfig, runTypeScript } from './typescript-compiler.js';
|
|
5
|
+
/**
|
|
6
|
+
* Find authored TypeScript files that are not included in the effective `tsconfig.json`.
|
|
7
|
+
*
|
|
8
|
+
* @param project - Resolved project metadata.
|
|
9
|
+
* @param effectiveConfig - Optional pre-computed effective TypeScript config.
|
|
10
|
+
* @returns Sorted list of absolute paths for unclaimed files.
|
|
11
|
+
*/
|
|
12
|
+
export function findUnclaimedFiles(project, effectiveConfig = readEffectiveConfig(project)) {
|
|
13
|
+
const claimed = new Set((effectiveConfig.files ?? []).map((file) => path.resolve(project.root, file)));
|
|
14
|
+
return [...discoverAuthoredFiles(project)].filter((file) => !claimed.has(file)).sort();
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Verify that all authored TypeScript files are claimed by the config and pass `tsc --noEmit`.
|
|
18
|
+
*
|
|
19
|
+
* @param project - Resolved project metadata.
|
|
20
|
+
* @returns `true` when every file is claimed and type checking succeeds.
|
|
21
|
+
*/
|
|
22
|
+
export function checkProject(project) {
|
|
23
|
+
const effectiveConfig = readEffectiveConfig(project);
|
|
24
|
+
const unclaimed = findUnclaimedFiles(project, effectiveConfig);
|
|
25
|
+
if (unclaimed.length > 0) {
|
|
26
|
+
console.error('TypeScript config does not claim every authored TypeScript file:');
|
|
27
|
+
for (const file of unclaimed) {
|
|
28
|
+
console.error(`- ${path.relative(project.root, file)}`);
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
const result = runTypeScript(project, ['--noEmit', '-p', project.configPath]);
|
|
33
|
+
if (result.status === 0) {
|
|
34
|
+
console.log(`TypeScript check passed (${(effectiveConfig.files ?? []).length} files).`);
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Build a JSON-serializable summary of the resolved authoring and declaration TypeScript programs.
|
|
41
|
+
*
|
|
42
|
+
* @param project - Resolved project metadata.
|
|
43
|
+
* @returns Structured project summary.
|
|
44
|
+
*/
|
|
45
|
+
export function describeProject(project) {
|
|
46
|
+
const effectiveConfig = readEffectiveConfig(project);
|
|
47
|
+
return {
|
|
48
|
+
projectRoot: project.root,
|
|
49
|
+
packageName: project.manifest.name,
|
|
50
|
+
config: path.relative(project.root, project.configPath),
|
|
51
|
+
files: (effectiveConfig.files ?? []).map((file) => path.relative(project.root, path.resolve(project.root, file))),
|
|
52
|
+
unclaimedFiles: findUnclaimedFiles(project, effectiveConfig).map((file) => path.relative(project.root, file)),
|
|
53
|
+
compilerOptions: effectiveConfig.compilerOptions,
|
|
54
|
+
declarations: {
|
|
55
|
+
sourceDir: path.relative(project.root, project.sourceDir),
|
|
56
|
+
declarationDir: path.relative(project.root, project.declarationDir),
|
|
57
|
+
excludedTests: true,
|
|
58
|
+
declarationMap: false,
|
|
59
|
+
strippedDocTags: STRIPPED_DECLARATION_DOC_TAGS,
|
|
60
|
+
stripInternal: project.declarationOptions.stripInternal,
|
|
61
|
+
types: [],
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=check-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-project.js","sourceRoot":"","sources":["../../src/internal/check-project.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAkC,MAAM,cAAc,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAkC,MAAM,0BAA0B,CAAC;AA8B9G;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CACjC,OAAkC,EAClC,kBAA6C,mBAAmB,CAAC,OAAO,CAAC;IAEzE,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,eAAe,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,C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AC,IAAI;QAClC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC;QACvD,KAAK,EAAE,CAAC,eAAe,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACjD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAC7D;QACD,cAAc,EAAE,kBAAkB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7G,eAAe,EAAE,eAAe,CAAC,eAAe;QAChD,YAAY,EAAE;YACb,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC;YACzD,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC;YACnE,aAAa,EAAE,IAAI;YACnB,cAAc,EAAE,KAAK;YACrB,eAAe,EAAE,6BAA6B;YAC9C,aAAa,EAAE,OAAO,CAAC,kBAAkB,CAAC,aAAa;YACvD,KAAK,EAAE,EAAE;SACT;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeDoc JSDoc tags stripped from emitted declaration files.
|
|
3
|
+
*/
|
|
4
|
+
export declare const STRIPPED_DECLARATION_DOC_TAGS: readonly string[];
|
|
5
|
+
/**
|
|
6
|
+
* Result returned after stripping prohibited TypeDoc tags from a source string.
|
|
7
|
+
*/
|
|
8
|
+
export interface StripDeclarationDocTagsResult {
|
|
9
|
+
/** Updated declaration source text. */
|
|
10
|
+
code: string;
|
|
11
|
+
/** Total number of prohibited tags removed. */
|
|
12
|
+
removedTags: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Result returned after sanitizing all declaration files in a directory.
|
|
16
|
+
*/
|
|
17
|
+
export interface SanitizeDeclarationDocTagsResult {
|
|
18
|
+
/** Absolute paths of files that were modified on disk. */
|
|
19
|
+
changedFiles: string[];
|
|
20
|
+
/** Total number of prohibited tags removed across all files. */
|
|
21
|
+
removedTags: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Strip TypeDoc category tags (`@category` and `@categoryDescription`) from JSDoc blocks in declaration source text.
|
|
25
|
+
*
|
|
26
|
+
* @param source - Declaration file source text.
|
|
27
|
+
* @returns The transformed source text and the count of removed tags.
|
|
28
|
+
*/
|
|
29
|
+
export declare function stripDeclarationDocTags(source: string): StripDeclarationDocTagsResult;
|
|
30
|
+
/**
|
|
31
|
+
* Find prohibited TypeDoc category tags remaining in declaration JSDoc comments.
|
|
32
|
+
*
|
|
33
|
+
* @param source - Declaration file source text.
|
|
34
|
+
* @returns List of discovered tag names (such as `@category`).
|
|
35
|
+
*/
|
|
36
|
+
export declare function findDeclarationDocTags(source: string): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Recursively sanitize emitted `.d.ts`, `.d.mts`, and `.d.cts` files under a directory.
|
|
39
|
+
*
|
|
40
|
+
* @param directory - Directory containing emitted declaration files.
|
|
41
|
+
* @returns The modified file paths and total count of removed tags.
|
|
42
|
+
* @throws {Error} When prohibited tags remain after sanitization.
|
|
43
|
+
*/
|
|
44
|
+
export declare function sanitizeDeclarationDocTags(directory: string): SanitizeDeclarationDocTagsResult;
|
|
45
|
+
//# sourceMappingURL=declaration-doc-tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declaration-doc-tags.d.ts","sourceRoot":"","sources":["../../src/internal/declaration-doc-tags.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EAAwC,CAAC;AAMpG;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD,0DAA0D;IAC1D,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;CACpB;AAyJD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,6BAA6B,CAQrF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAa/D;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,gCAAgC,CAwB9F"}
|