@powerlines/plugin-tsc 0.2.131 → 0.2.133
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/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/helpers/index.cjs +2 -3
- package/dist/helpers/index.d.cts +1 -3
- package/dist/helpers/index.d.mts +1 -3
- package/dist/helpers/index.mjs +1 -2
- package/dist/helpers/type-check.cjs +21 -2
- package/dist/helpers/type-check.d.cts +11 -2
- package/dist/helpers/type-check.d.mts +11 -2
- package/dist/helpers/type-check.mjs +19 -1
- package/dist/index.cjs +12 -36
- package/dist/index.d.cts +3 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +7 -4
- package/dist/powerlines/src/types/build.d.cts +145 -0
- package/dist/powerlines/src/types/build.d.mts +145 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +9 -0
- package/dist/powerlines/src/types/config.d.cts +376 -0
- package/dist/powerlines/src/types/config.d.mts +376 -0
- package/dist/powerlines/src/types/context.d.cts +403 -0
- package/dist/powerlines/src/types/context.d.mts +405 -0
- package/dist/powerlines/src/types/fs.d.cts +486 -0
- package/dist/powerlines/src/types/fs.d.mts +486 -0
- package/dist/powerlines/src/types/hooks.d.mts +2 -0
- package/dist/powerlines/src/types/plugin.d.cts +231 -0
- package/dist/powerlines/src/types/plugin.d.mts +231 -0
- package/dist/powerlines/src/types/resolved.d.cts +81 -0
- package/dist/powerlines/src/types/resolved.d.mts +81 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.d.cts +1 -3
- package/dist/types/index.d.mts +1 -3
- package/dist/types/index.mjs +0 -3
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +36 -2
- package/dist/types/plugin.d.mts +36 -2
- package/dist/types/plugin.mjs +0 -2
- package/package.json +5 -4
- package/dist/context-BKnG0PBM.d.mts +0 -1756
- package/dist/context-DJwegHpz.d.cts +0 -1756
- package/dist/helpers-B15z10jN.mjs +0 -1
- package/dist/helpers-LF26RHol.cjs +0 -0
- package/dist/index-CUbWeWHc.d.mts +0 -1
- package/dist/index-D6CnpA_r.d.cts +0 -1
- package/dist/index-DL0uimUT.d.mts +0 -1
- package/dist/index-DWPDThxu.d.cts +0 -1
- package/dist/plugin-BH3d1UOw.d.mts +0 -35
- package/dist/plugin-DZYL6q5t.d.cts +0 -35
- package/dist/plugin-ifZVa20V.mjs +0 -1
- package/dist/plugin-pBKbb5K9.cjs +0 -0
- package/dist/type-check-BM6tW_xw.cjs +0 -27
- package/dist/type-check-Bkbb5EkH.mjs +0 -21
- package/dist/type-check-CTF3SB99.d.mts +0 -12
- package/dist/type-check-yDG1LQxV.d.cts +0 -12
- package/dist/types-U3zd8PTP.mjs +0 -1
- package/dist/types-o3zWarRp.cjs +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { a as ResolvedConfig, n as PluginContext, r as UserConfig } from "./context-BKnG0PBM.mjs";
|
|
2
|
-
import ts from "typescript";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
type TypeScriptCompilerPluginOptions = Partial<Omit<ts.TranspileOptions, "fileName">> & {
|
|
6
|
-
/**
|
|
7
|
-
* Whether to perform type checking during the `lint` task.
|
|
8
|
-
*
|
|
9
|
-
* @defaultValue false
|
|
10
|
-
*/
|
|
11
|
-
typeCheck?: boolean;
|
|
12
|
-
};
|
|
13
|
-
interface TypeScriptCompilerPluginUserConfig extends UserConfig {
|
|
14
|
-
transform: {
|
|
15
|
-
/**
|
|
16
|
-
* TypeScript Compiler transformation options
|
|
17
|
-
*/
|
|
18
|
-
tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
interface TypeScriptCompilerPluginResolvedConfig extends ResolvedConfig {
|
|
22
|
-
transform: {
|
|
23
|
-
/**
|
|
24
|
-
* Resolved TypeScript Compiler transformation options
|
|
25
|
-
*/
|
|
26
|
-
tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
type TypeScriptCompilerPluginContext<TResolvedConfig extends TypeScriptCompilerPluginResolvedConfig = TypeScriptCompilerPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
30
|
-
declare type __ΩTypeScriptCompilerPluginOptions = any[];
|
|
31
|
-
declare type __ΩTypeScriptCompilerPluginUserConfig = any[];
|
|
32
|
-
declare type __ΩTypeScriptCompilerPluginResolvedConfig = any[];
|
|
33
|
-
declare type __ΩTypeScriptCompilerPluginContext = any[];
|
|
34
|
-
//#endregion
|
|
35
|
-
export { __ΩTypeScriptCompilerPluginContext as a, __ΩTypeScriptCompilerPluginUserConfig as c, TypeScriptCompilerPluginUserConfig as i, TypeScriptCompilerPluginOptions as n, __ΩTypeScriptCompilerPluginOptions as o, TypeScriptCompilerPluginResolvedConfig as r, __ΩTypeScriptCompilerPluginResolvedConfig as s, TypeScriptCompilerPluginContext as t };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { a as ResolvedConfig, n as PluginContext, r as UserConfig } from "./context-DJwegHpz.cjs";
|
|
2
|
-
import ts from "typescript";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
type TypeScriptCompilerPluginOptions = Partial<Omit<ts.TranspileOptions, "fileName">> & {
|
|
6
|
-
/**
|
|
7
|
-
* Whether to perform type checking during the `lint` task.
|
|
8
|
-
*
|
|
9
|
-
* @defaultValue false
|
|
10
|
-
*/
|
|
11
|
-
typeCheck?: boolean;
|
|
12
|
-
};
|
|
13
|
-
interface TypeScriptCompilerPluginUserConfig extends UserConfig {
|
|
14
|
-
transform: {
|
|
15
|
-
/**
|
|
16
|
-
* TypeScript Compiler transformation options
|
|
17
|
-
*/
|
|
18
|
-
tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
interface TypeScriptCompilerPluginResolvedConfig extends ResolvedConfig {
|
|
22
|
-
transform: {
|
|
23
|
-
/**
|
|
24
|
-
* Resolved TypeScript Compiler transformation options
|
|
25
|
-
*/
|
|
26
|
-
tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
type TypeScriptCompilerPluginContext<TResolvedConfig extends TypeScriptCompilerPluginResolvedConfig = TypeScriptCompilerPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
30
|
-
declare type __ΩTypeScriptCompilerPluginOptions = any[];
|
|
31
|
-
declare type __ΩTypeScriptCompilerPluginUserConfig = any[];
|
|
32
|
-
declare type __ΩTypeScriptCompilerPluginResolvedConfig = any[];
|
|
33
|
-
declare type __ΩTypeScriptCompilerPluginContext = any[];
|
|
34
|
-
//#endregion
|
|
35
|
-
export { __ΩTypeScriptCompilerPluginContext as a, __ΩTypeScriptCompilerPluginUserConfig as c, TypeScriptCompilerPluginUserConfig as i, TypeScriptCompilerPluginOptions as n, __ΩTypeScriptCompilerPluginOptions as o, TypeScriptCompilerPluginResolvedConfig as r, __ΩTypeScriptCompilerPluginResolvedConfig as s, TypeScriptCompilerPluginContext as t };
|
package/dist/plugin-ifZVa20V.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-pBKbb5K9.cjs
DELETED
|
File without changes
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const require_index = require('./index.cjs');
|
|
2
|
-
let typescript = require("typescript");
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/type-check.ts
|
|
5
|
-
/**
|
|
6
|
-
* Perform type checks on the provided sources using TypeScript's compiler API.
|
|
7
|
-
*
|
|
8
|
-
* @param context - The build context containing information about the current build.
|
|
9
|
-
*/
|
|
10
|
-
async function typeCheck(context) {
|
|
11
|
-
const result = context.program.emitToMemory();
|
|
12
|
-
const diagnosticMessages = [];
|
|
13
|
-
result.getDiagnostics().forEach((diagnostic) => {
|
|
14
|
-
if (diagnostic.getSourceFile()?.getBaseName()) diagnosticMessages.push(`${diagnostic.getSourceFile()?.getBaseName()} (${(diagnostic.getLineNumber() ?? 0) + 1}): ${(0, typescript.flattenDiagnosticMessageText)(diagnostic.getMessageText().toString(), "\n")}`);
|
|
15
|
-
else diagnosticMessages.push((0, typescript.flattenDiagnosticMessageText)(diagnostic.getMessageText().toString(), "\n"));
|
|
16
|
-
});
|
|
17
|
-
const diagnosticMessage = diagnosticMessages.join("\n");
|
|
18
|
-
if (diagnosticMessage) throw new Error(`TypeScript compilation failed: \n\n${diagnosticMessage.length > 5e3 ? `${diagnosticMessage.slice(0, 5e3)}...` : diagnosticMessage}`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
Object.defineProperty(exports, 'typeCheck', {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () {
|
|
25
|
-
return typeCheck;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { flattenDiagnosticMessageText } from "typescript";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/type-check.ts
|
|
4
|
-
/**
|
|
5
|
-
* Perform type checks on the provided sources using TypeScript's compiler API.
|
|
6
|
-
*
|
|
7
|
-
* @param context - The build context containing information about the current build.
|
|
8
|
-
*/
|
|
9
|
-
async function typeCheck(context) {
|
|
10
|
-
const result = context.program.emitToMemory();
|
|
11
|
-
const diagnosticMessages = [];
|
|
12
|
-
result.getDiagnostics().forEach((diagnostic) => {
|
|
13
|
-
if (diagnostic.getSourceFile()?.getBaseName()) diagnosticMessages.push(`${diagnostic.getSourceFile()?.getBaseName()} (${(diagnostic.getLineNumber() ?? 0) + 1}): ${flattenDiagnosticMessageText(diagnostic.getMessageText().toString(), "\n")}`);
|
|
14
|
-
else diagnosticMessages.push(flattenDiagnosticMessageText(diagnostic.getMessageText().toString(), "\n"));
|
|
15
|
-
});
|
|
16
|
-
const diagnosticMessage = diagnosticMessages.join("\n");
|
|
17
|
-
if (diagnosticMessage) throw new Error(`TypeScript compilation failed: \n\n${diagnosticMessage.length > 5e3 ? `${diagnosticMessage.slice(0, 5e3)}...` : diagnosticMessage}`);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { typeCheck as t };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { t as Context } from "./context-BKnG0PBM.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/type-check.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Perform type checks on the provided sources using TypeScript's compiler API.
|
|
7
|
-
*
|
|
8
|
-
* @param context - The build context containing information about the current build.
|
|
9
|
-
*/
|
|
10
|
-
declare function typeCheck(context: Context): Promise<void>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { typeCheck as t };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { t as Context } from "./context-DJwegHpz.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/type-check.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Perform type checks on the provided sources using TypeScript's compiler API.
|
|
7
|
-
*
|
|
8
|
-
* @param context - The build context containing information about the current build.
|
|
9
|
-
*/
|
|
10
|
-
declare function typeCheck(context: Context): Promise<void>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { typeCheck as t };
|
package/dist/types-U3zd8PTP.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/types-o3zWarRp.cjs
DELETED
|
File without changes
|