@r_masseater/vite-plus-adopt 0.0.0-stage → 0.2.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 +23 -0
- package/README.md +145 -2
- package/THIRD-PARTY-NOTICES +279 -0
- package/dist/attempt-5nU57gc3.mjs +28 -0
- package/dist/attempt-5nU57gc3.mjs.map +1 -0
- package/dist/attw.d.mts +206 -0
- package/dist/attw.mjs +5388 -0
- package/dist/attw.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +332 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/config-C8pUNPt5.mjs +28 -0
- package/dist/config-C8pUNPt5.mjs.map +1 -0
- package/dist/fsd.d.mts +10 -0
- package/dist/fsd.mjs +1336 -0
- package/dist/fsd.mjs.map +1 -0
- package/dist/index.d.mts +13 -0
- package/dist/index.mjs +1 -0
- package/dist/parsers/tree-sitter-astro.wasm +0 -0
- package/dist/parsers/tree-sitter-svelte.wasm +0 -0
- package/dist/parsers/tree-sitter-tsx.wasm +0 -0
- package/dist/parsers/tree-sitter-vue.wasm +0 -0
- package/dist/postinstall.d.mts +1 -0
- package/dist/postinstall.mjs +16 -0
- package/dist/postinstall.mjs.map +1 -0
- package/dist/run-cli-DspfTYgh.mjs +165 -0
- package/dist/run-cli-DspfTYgh.mjs.map +1 -0
- package/dist/types-BtHVwMCx.d.mts +62 -0
- package/package.json +124 -3
package/dist/attw.d.mts
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { ModuleKind as ModuleKind$1 } from "typescript/sync";
|
|
2
|
+
type ResolutionKind = "node10" | "node16-cjs" | "node16-esm" | "bundler";
|
|
3
|
+
type ResolutionOption = "node10" | "node16" | "bundler";
|
|
4
|
+
interface EntrypointInfo {
|
|
5
|
+
subpath: string;
|
|
6
|
+
resolutions: Record<ResolutionKind, EntrypointResolutionAnalysis>;
|
|
7
|
+
hasTypes: boolean;
|
|
8
|
+
isWildcard: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface IncludedTypes {
|
|
11
|
+
kind: "included";
|
|
12
|
+
}
|
|
13
|
+
interface TypesPackage {
|
|
14
|
+
kind: "@types";
|
|
15
|
+
packageName: string;
|
|
16
|
+
packageVersion: string;
|
|
17
|
+
definitelyTypedUrl?: string;
|
|
18
|
+
}
|
|
19
|
+
type AnalysisTypes = IncludedTypes | TypesPackage;
|
|
20
|
+
type BuildTool = "@arethetypeswrong/cli" | "typescript" | "rollup" | "@rollup/plugin-typescript" | "@rollup/plugin-typescript2" | "webpack" | "esbuild" | "parcel-bundler" | "@preconstruct/cli" | "vite" | "snowpack" | "microbundle" | "@microsoft/api-extractor" | "tshy" | "@rspack/cli" | "tsup" | "tsdown";
|
|
21
|
+
interface Analysis {
|
|
22
|
+
packageName: string;
|
|
23
|
+
packageVersion: string;
|
|
24
|
+
buildTools: Partial<Record<BuildTool, string>>;
|
|
25
|
+
types: AnalysisTypes;
|
|
26
|
+
entrypoints: Record<string, EntrypointInfo>;
|
|
27
|
+
programInfo: Record<ResolutionOption, ProgramInfo>;
|
|
28
|
+
problems: Problem[];
|
|
29
|
+
}
|
|
30
|
+
interface UntypedResult {
|
|
31
|
+
packageName: string;
|
|
32
|
+
packageVersion: string;
|
|
33
|
+
types: false;
|
|
34
|
+
}
|
|
35
|
+
type CheckResult = Analysis | UntypedResult;
|
|
36
|
+
interface EntrypointResolutionAnalysis {
|
|
37
|
+
name: string;
|
|
38
|
+
resolutionKind: ResolutionKind;
|
|
39
|
+
isWildcard?: boolean;
|
|
40
|
+
resolution?: Resolution;
|
|
41
|
+
implementationResolution?: Resolution;
|
|
42
|
+
files?: string[];
|
|
43
|
+
/** Indices into `analysis.problems` */
|
|
44
|
+
visibleProblems?: number[];
|
|
45
|
+
}
|
|
46
|
+
interface Resolution {
|
|
47
|
+
fileName: string;
|
|
48
|
+
isTypeScript: boolean;
|
|
49
|
+
isJson: boolean;
|
|
50
|
+
trace: string[];
|
|
51
|
+
}
|
|
52
|
+
interface ProgramInfo {
|
|
53
|
+
moduleKinds?: Record<string, ModuleKind>;
|
|
54
|
+
}
|
|
55
|
+
type ModuleKindReason = "extension" | "type" | "no:type";
|
|
56
|
+
interface ModuleKind {
|
|
57
|
+
detectedKind: ModuleKind$1.ESNext | ModuleKind$1.CommonJS;
|
|
58
|
+
detectedReason: ModuleKindReason;
|
|
59
|
+
reasonFileName: string;
|
|
60
|
+
}
|
|
61
|
+
interface EntrypointResolutionProblem {
|
|
62
|
+
entrypoint: string;
|
|
63
|
+
resolutionKind: ResolutionKind;
|
|
64
|
+
}
|
|
65
|
+
interface FilePairProblem {
|
|
66
|
+
typesFileName: string;
|
|
67
|
+
implementationFileName: string;
|
|
68
|
+
}
|
|
69
|
+
interface ModuleKindPairProblem {
|
|
70
|
+
typesModuleKind: ModuleKind;
|
|
71
|
+
implementationModuleKind: ModuleKind;
|
|
72
|
+
}
|
|
73
|
+
interface FileTextRangeProblem {
|
|
74
|
+
fileName: string;
|
|
75
|
+
pos: number;
|
|
76
|
+
end: number;
|
|
77
|
+
}
|
|
78
|
+
interface NoResolutionProblem extends EntrypointResolutionProblem {
|
|
79
|
+
kind: "NoResolution";
|
|
80
|
+
}
|
|
81
|
+
interface UntypedResolutionProblem extends EntrypointResolutionProblem {
|
|
82
|
+
kind: "UntypedResolution";
|
|
83
|
+
}
|
|
84
|
+
interface FalseESMProblem extends FilePairProblem, ModuleKindPairProblem {
|
|
85
|
+
kind: "FalseESM";
|
|
86
|
+
}
|
|
87
|
+
interface FalseCJSProblem extends FilePairProblem, ModuleKindPairProblem {
|
|
88
|
+
kind: "FalseCJS";
|
|
89
|
+
}
|
|
90
|
+
interface CJSResolvesToESMProblem extends EntrypointResolutionProblem {
|
|
91
|
+
kind: "CJSResolvesToESM";
|
|
92
|
+
}
|
|
93
|
+
interface NamedExportsProblem extends FilePairProblem {
|
|
94
|
+
kind: "NamedExports";
|
|
95
|
+
isMissingAllNamed: boolean;
|
|
96
|
+
missing: string[];
|
|
97
|
+
}
|
|
98
|
+
interface FallbackConditionProblem extends EntrypointResolutionProblem {
|
|
99
|
+
kind: "FallbackCondition";
|
|
100
|
+
}
|
|
101
|
+
interface FalseExportDefaultProblem extends FilePairProblem {
|
|
102
|
+
kind: "FalseExportDefault";
|
|
103
|
+
}
|
|
104
|
+
interface MissingExportEqualsProblem extends FilePairProblem {
|
|
105
|
+
kind: "MissingExportEquals";
|
|
106
|
+
}
|
|
107
|
+
interface InternalResolutionErrorProblem extends FileTextRangeProblem {
|
|
108
|
+
kind: "InternalResolutionError";
|
|
109
|
+
resolutionOption: ResolutionOption;
|
|
110
|
+
moduleSpecifier: string;
|
|
111
|
+
resolutionMode: ModuleKind$1.ESNext | ModuleKind$1.CommonJS | undefined;
|
|
112
|
+
trace: string[];
|
|
113
|
+
}
|
|
114
|
+
interface UnexpectedModuleSyntaxProblem extends FileTextRangeProblem {
|
|
115
|
+
kind: "UnexpectedModuleSyntax";
|
|
116
|
+
syntax: ModuleKind$1.ESNext | ModuleKind$1.CommonJS;
|
|
117
|
+
moduleKind: ModuleKind;
|
|
118
|
+
}
|
|
119
|
+
interface CJSOnlyExportsDefaultProblem extends FileTextRangeProblem {
|
|
120
|
+
kind: "CJSOnlyExportsDefault";
|
|
121
|
+
}
|
|
122
|
+
type Problem = NoResolutionProblem | UntypedResolutionProblem | FalseESMProblem | FalseCJSProblem | CJSResolvesToESMProblem | NamedExportsProblem | FallbackConditionProblem | FalseExportDefaultProblem | MissingExportEqualsProblem | InternalResolutionErrorProblem | UnexpectedModuleSyntaxProblem | CJSOnlyExportsDefaultProblem;
|
|
123
|
+
type ProblemKind = Problem["kind"];
|
|
124
|
+
type Failable<T> = {
|
|
125
|
+
status: "error";
|
|
126
|
+
error: string;
|
|
127
|
+
data?: never;
|
|
128
|
+
} | {
|
|
129
|
+
status: "success";
|
|
130
|
+
data: T;
|
|
131
|
+
};
|
|
132
|
+
interface ParsedPackageSpec {
|
|
133
|
+
name: string;
|
|
134
|
+
versionKind: "none" | "exact" | "range" | "tag";
|
|
135
|
+
version: string;
|
|
136
|
+
}
|
|
137
|
+
export declare class Package {
|
|
138
|
+
#private;
|
|
139
|
+
readonly packageName: string;
|
|
140
|
+
readonly packageVersion: string;
|
|
141
|
+
readonly resolvedUrl?: string;
|
|
142
|
+
readonly typesPackage?: {
|
|
143
|
+
packageName: string;
|
|
144
|
+
packageVersion: string;
|
|
145
|
+
resolvedUrl?: string;
|
|
146
|
+
};
|
|
147
|
+
constructor(files: Record<string, string | Uint8Array>, packageName: string, packageVersion: string, resolvedUrl?: string, typesPackage?: Package["typesPackage"]);
|
|
148
|
+
tryReadFile(path: string): string | undefined;
|
|
149
|
+
readFile(path: string): string;
|
|
150
|
+
fileExists(path: string): boolean;
|
|
151
|
+
directoryExists(path: string): boolean;
|
|
152
|
+
containsTypes(directory?: string): boolean;
|
|
153
|
+
listFiles(directory?: string): string[];
|
|
154
|
+
mergedWithTypes(typesPackage: Package): Package;
|
|
155
|
+
}
|
|
156
|
+
interface CreatePackageFromNpmOptions {
|
|
157
|
+
/**
|
|
158
|
+
* Controls inclusion of a corresponding `@types` package. Ignored if the implementation
|
|
159
|
+
* package contains TypeScript files. The value is the version or SemVer range of the
|
|
160
|
+
* `@types` package to include, `true` to infer the version from the implementation
|
|
161
|
+
* package version, or `false` to prevent inclusion of a `@types` package.
|
|
162
|
+
* @default true
|
|
163
|
+
*/
|
|
164
|
+
definitelyTyped?: string | boolean;
|
|
165
|
+
before?: Date;
|
|
166
|
+
allowDeprecated?: boolean;
|
|
167
|
+
}
|
|
168
|
+
export declare function createPackageFromNpm(packageSpec: string, { definitelyTyped, ...options }?: CreatePackageFromNpmOptions): Promise<Package>;
|
|
169
|
+
export declare function resolveImplementationPackageForTypesPackage(typesPackageName: string, typesPackageVersion: string, options?: Omit<CreatePackageFromNpmOptions, "definitelyTyped">): Promise<ResolvedPackageId>;
|
|
170
|
+
export declare function resolveTypesPackageForPackage(packageName: string, packageVersion: string, options?: Omit<CreatePackageFromNpmOptions, "definitelyTyped">): Promise<ResolvedPackageId | undefined>;
|
|
171
|
+
interface ResolvedPackageId {
|
|
172
|
+
packageName: string;
|
|
173
|
+
packageVersion: string;
|
|
174
|
+
tarballUrl: string;
|
|
175
|
+
}
|
|
176
|
+
export declare class Npm404Error extends Error {
|
|
177
|
+
packageSpecs: readonly ParsedPackageSpec[];
|
|
178
|
+
kind: string;
|
|
179
|
+
constructor(packageSpecs: readonly ParsedPackageSpec[]);
|
|
180
|
+
}
|
|
181
|
+
export declare function createPackageFromTarballUrl(tarballUrl: string): Promise<Package>;
|
|
182
|
+
export declare function createPackageFromTarballData(tarball: Uint8Array): Package;
|
|
183
|
+
interface CheckPackageOptions {
|
|
184
|
+
/**
|
|
185
|
+
* Exhaustive list of entrypoints to check. The package root is `"."`.
|
|
186
|
+
* Specifying this option disables automatic entrypoint discovery,
|
|
187
|
+
* and overrides the `includeEntrypoints` and `excludeEntrypoints` options.
|
|
188
|
+
*/
|
|
189
|
+
entrypoints?: string[];
|
|
190
|
+
/**
|
|
191
|
+
* Entrypoints to check in addition to automatically discovered ones.
|
|
192
|
+
*/
|
|
193
|
+
includeEntrypoints?: string[];
|
|
194
|
+
/**
|
|
195
|
+
* Entrypoints to exclude from checking.
|
|
196
|
+
*/
|
|
197
|
+
excludeEntrypoints?: (string | RegExp)[];
|
|
198
|
+
/**
|
|
199
|
+
* Whether to automatically consider all published files as entrypoints
|
|
200
|
+
* in the absence of any other detected or configured entrypoints.
|
|
201
|
+
*/
|
|
202
|
+
entrypointsLegacy?: boolean;
|
|
203
|
+
}
|
|
204
|
+
export declare function checkPackage(pkg: Package, options?: CheckPackageOptions): Promise<CheckResult>;
|
|
205
|
+
export type { Analysis, AnalysisTypes, BuildTool, CJSOnlyExportsDefaultProblem, CJSResolvesToESMProblem, CheckPackageOptions, CheckResult, CreatePackageFromNpmOptions, EntrypointInfo, EntrypointResolutionAnalysis, EntrypointResolutionProblem, Failable, FallbackConditionProblem, FalseCJSProblem, FalseESMProblem, FalseExportDefaultProblem, FilePairProblem, FileTextRangeProblem, IncludedTypes, InternalResolutionErrorProblem, MissingExportEqualsProblem, ModuleKind, ModuleKindPairProblem, ModuleKindReason, NamedExportsProblem, NoResolutionProblem, ParsedPackageSpec, Problem, ProblemKind, ProgramInfo, Resolution, ResolutionKind, ResolutionOption, ResolvedPackageId, TypesPackage, UnexpectedModuleSyntaxProblem, UntypedResolutionProblem, UntypedResult };
|
|
206
|
+
//# sourceMappingURL=attw.d.mts.map
|