@powerlines/plugin-tsc 0.2.441 → 0.2.443

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.
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./type-check.cjs`);exports.typeCheck=e.typeCheck;
@@ -0,0 +1,2 @@
1
+ import { typeCheck } from "./type-check.cjs";
2
+ export { typeCheck };
@@ -0,0 +1,2 @@
1
+ import { typeCheck } from "./type-check.mjs";
2
+ export { typeCheck };
@@ -0,0 +1 @@
1
+ import{typeCheck as e}from"./type-check.mjs";export{e as typeCheck};
@@ -0,0 +1,4 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`typescript`),t=require(`@stryke/path/replace`),n=require(`powerlines/typescript`);async function r(r){let i=(0,n.createProgram)(r,{skipAddingFilesFromTsConfig:!0,compilerOptions:{declaration:!0,declarationMap:!1,emitDeclarationOnly:!0,sourceMap:!1,outDir:(0,t.replacePath)(r.builtinsPath,r.config.cwd),composite:!1,incremental:!1,tsBuildInfoFile:void 0}}).emitToMemory(),a=[];i.getDiagnostics().forEach(t=>{t.getSourceFile()?.getBaseName()?a.push(`${t.getSourceFile()?.getBaseName()} (${(t.getLineNumber()??0)+1}): ${(0,e.flattenDiagnosticMessageText)(t.getMessageText().toString(),`
2
+ `)}`):a.push((0,e.flattenDiagnosticMessageText)(t.getMessageText().toString(),`
3
+ `))});let o=a.join(`
4
+ `);if(o)throw Error(`TypeScript compilation failed: \n\n${o.length>5e3?`${o.slice(0,5e3)}...`:o}`)}exports.typeCheck=r;
@@ -0,0 +1,12 @@
1
+ import { Context } from "powerlines";
2
+
3
+ //#region src/helpers/type-check.d.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
+ declare function typeCheck(context: Context): Promise<void>;
10
+ //#endregion
11
+ export { typeCheck };
12
+ //# sourceMappingURL=type-check.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-check.d.cts","names":[],"sources":["../../src/helpers/type-check.ts"],"mappings":";;;;;AA4BA;;;iBAAsB,SAAA,CAAU,OAAA,EAAS,OAAA,GAAU,OAAA"}
@@ -0,0 +1,12 @@
1
+ import { Context } from "powerlines";
2
+
3
+ //#region src/helpers/type-check.d.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
+ declare function typeCheck(context: Context): Promise<void>;
10
+ //#endregion
11
+ export { typeCheck };
12
+ //# sourceMappingURL=type-check.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-check.d.mts","names":[],"sources":["../../src/helpers/type-check.ts"],"mappings":";;;;;AA4BA;;;iBAAsB,SAAA,CAAU,OAAA,EAAS,OAAA,GAAU,OAAA"}
@@ -0,0 +1,5 @@
1
+ import{flattenDiagnosticMessageText as e}from"typescript";import{replacePath as t}from"@stryke/path/replace";import{createProgram as n}from"powerlines/typescript";async function r(r){let i=n(r,{skipAddingFilesFromTsConfig:!0,compilerOptions:{declaration:!0,declarationMap:!1,emitDeclarationOnly:!0,sourceMap:!1,outDir:t(r.builtinsPath,r.config.cwd),composite:!1,incremental:!1,tsBuildInfoFile:void 0}}).emitToMemory(),a=[];i.getDiagnostics().forEach(t=>{t.getSourceFile()?.getBaseName()?a.push(`${t.getSourceFile()?.getBaseName()} (${(t.getLineNumber()??0)+1}): ${e(t.getMessageText().toString(),`
2
+ `)}`):a.push(e(t.getMessageText().toString(),`
3
+ `))});let o=a.join(`
4
+ `);if(o)throw Error(`TypeScript compilation failed: \n\n${o.length>5e3?`${o.slice(0,5e3)}...`:o}`)}export{r as typeCheck};
5
+ //# sourceMappingURL=type-check.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-check.mjs","names":[],"sources":["../../src/helpers/type-check.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { replacePath } from \"@stryke/path/replace\";\nimport { Context } from \"powerlines\";\nimport { createProgram } from \"powerlines/typescript\";\nimport { flattenDiagnosticMessageText } from \"typescript\";\n\n/**\n * Perform type checks on the provided sources using TypeScript's compiler API.\n *\n * @param context - The build context containing information about the current build.\n */\nexport async function typeCheck(context: Context): Promise<void> {\n const program = createProgram(context, {\n skipAddingFilesFromTsConfig: true,\n compilerOptions: {\n declaration: true,\n declarationMap: false,\n emitDeclarationOnly: true,\n sourceMap: false,\n outDir: replacePath(context.builtinsPath, context.config.cwd),\n composite: false,\n incremental: false,\n tsBuildInfoFile: undefined\n }\n });\n const result = program.emitToMemory();\n\n const diagnosticMessages: string[] = [];\n result.getDiagnostics().forEach(diagnostic => {\n if (diagnostic.getSourceFile()?.getBaseName()) {\n diagnosticMessages.push(\n `${diagnostic.getSourceFile()?.getBaseName()} (${\n (diagnostic.getLineNumber() ?? 0) + 1\n }): ${flattenDiagnosticMessageText(\n diagnostic.getMessageText().toString(),\n \"\\n\"\n )}`\n );\n } else {\n diagnosticMessages.push(\n flattenDiagnosticMessageText(\n diagnostic.getMessageText().toString(),\n \"\\n\"\n )\n );\n }\n });\n\n const diagnosticMessage = diagnosticMessages.join(\"\\n\");\n if (diagnosticMessage) {\n throw new Error(\n `TypeScript compilation failed: \\n\\n${\n diagnosticMessage.length > 5000\n ? `${diagnosticMessage.slice(0, 5000)}...`\n : diagnosticMessage\n }`\n );\n }\n}\n"],"mappings":"mKA4BA,eAAsB,EAAU,EAAiC,CAc/D,IAAM,EAbU,EAAc,EAAS,CACrC,4BAA6B,GAC7B,gBAAiB,CACf,YAAa,GACb,eAAgB,GAChB,oBAAqB,GACrB,UAAW,GACX,OAAQ,EAAY,EAAQ,aAAc,EAAQ,OAAO,IAAI,CAC7D,UAAW,GACX,YAAa,GACb,gBAAiB,IAAA,GAClB,CACF,CACqB,CAAC,cAAc,CAE/B,EAA+B,EAAE,CACvC,EAAO,gBAAgB,CAAC,QAAQ,GAAc,CACxC,EAAW,eAAe,EAAE,aAAa,CAC3C,EAAmB,KACjB,GAAG,EAAW,eAAe,EAAE,aAAa,CAAC,KAC1C,EAAW,eAAe,EAAI,GAAK,EACrC,KAAK,EACJ,EAAW,gBAAgB,CAAC,UAAU,CACtC;EACD,GACF,CAED,EAAmB,KACjB,EACE,EAAW,gBAAgB,CAAC,UAAU,CACtC;EACD,CACF,EAEH,CAEF,IAAM,EAAoB,EAAmB,KAAK;EAAK,CACvD,GAAI,EACF,MAAU,MACR,sCACE,EAAkB,OAAS,IACvB,GAAG,EAAkB,MAAM,EAAG,IAAK,CAAC,KACpC,IAEP"}
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./_virtual/_rolldown/runtime.cjs`),t=require(`./helpers/type-check.cjs`);require(`./helpers/index.cjs`);let n=require(`defu`);n=e.__toESM(n,1);let r=require(`powerlines/constants`),i=require(`powerlines/plugin-utils`),a=require(`typescript`);a=e.__toESM(a,1);const o=(e={})=>({name:`tsc`,config(){return this.trace(`Merging TypeScript Compiler plugin configuration`),{tsc:(0,n.default)(e??{},{typeCheck:!1,filter:{id:{include:/\.(?:[cm]?ts|tsx)(?=\s*$)/i,exclude:/\.(?:d|spec|test)\.(?:[cm]?ts|tsx)(?=\s*$)/i}}})}},async lint(){this.config.tsc.typeCheck&&await t.typeCheck(this)},transform:{filter:{id:{exclude:/\.(?:[cm]?js|jsx)(?=\s*$)/i}},async handler(e,t){if(!(0,i.createFilterForTransform)(this.config.tsc.filter?.id,this.config.tsc.filter?.code)?.(t,e))return{code:e,id:t};let n=a.default.transpileModule(e,{...this.config.tsc,compilerOptions:{...this.tsconfig.options,...this.config.tsc.compilerOptions},fileName:t.replace(r.VIRTUAL_MODULE_PREFIX_REGEX,``)});if(n.diagnostics&&n.diagnostics.length>0&&n.diagnostics?.some(e=>e.category===a.default.DiagnosticCategory.Error))throw Error(`TypeScript Compiler - TypeScript transpilation errors in file: ${t}\n${a.default.formatDiagnostics(n.diagnostics,{getCanonicalFileName:e=>a.default.sys.useCaseSensitiveFileNames?e:e.toLowerCase(),getCurrentDirectory:()=>a.default.sys.getCurrentDirectory(),getNewLine:()=>a.default.sys.newLine})}`);if(!n.outputText)throw Error(`TypeScript Compiler - No output generated for file during TypeScript transpilation: ${t}`);return{code:n.outputText,id:t}}}});exports.default=o,exports.plugin=o,exports.typeCheck=t.typeCheck;
@@ -0,0 +1,20 @@
1
+ import { typeCheck } from "./helpers/type-check.cjs";
2
+ import { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig } from "./types/plugin.cjs";
3
+ import { Plugin } from "powerlines";
4
+
5
+ //#region src/index.d.ts
6
+ declare module "powerlines" {
7
+ interface Config {
8
+ tsc?: TypeScriptCompilerPluginOptions;
9
+ }
10
+ }
11
+ /**
12
+ * TypeScript Compiler plugin for Powerlines.
13
+ *
14
+ * @param options - The TypeScript Compiler plugin user configuration options.
15
+ * @returns A Powerlines plugin that integrates TypeScript Compiler transformations.
16
+ */
17
+ declare const plugin: <TContext extends TypeScriptCompilerPluginContext = TypeScriptCompilerPluginContext>(options?: TypeScriptCompilerPluginOptions) => Plugin<TContext>;
18
+ //#endregion
19
+ export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig, plugin as default, plugin, typeCheck };
20
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YAiCY,MAAA;IACR,GAAA,GAAM,+BAAA;EAAA;AAAA;;;;;;;cAUG,MAAA,oBACM,+BAAA,GACf,+BAAA,EAEF,OAAA,GAAS,+BAAA,KACR,MAAA,CAAO,QAAA"}
@@ -0,0 +1,20 @@
1
+ import { typeCheck } from "./helpers/type-check.mjs";
2
+ import { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig } from "./types/plugin.mjs";
3
+ import { Plugin } from "powerlines";
4
+
5
+ //#region src/index.d.ts
6
+ declare module "powerlines" {
7
+ interface Config {
8
+ tsc?: TypeScriptCompilerPluginOptions;
9
+ }
10
+ }
11
+ /**
12
+ * TypeScript Compiler plugin for Powerlines.
13
+ *
14
+ * @param options - The TypeScript Compiler plugin user configuration options.
15
+ * @returns A Powerlines plugin that integrates TypeScript Compiler transformations.
16
+ */
17
+ declare const plugin: <TContext extends TypeScriptCompilerPluginContext = TypeScriptCompilerPluginContext>(options?: TypeScriptCompilerPluginOptions) => Plugin<TContext>;
18
+ //#endregion
19
+ export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig, plugin as default, plugin, typeCheck };
20
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YAiCY,MAAA;IACR,GAAA,GAAM,+BAAA;EAAA;AAAA;;;;;;;cAUG,MAAA,oBACM,+BAAA,GACf,+BAAA,EAEF,OAAA,GAAS,+BAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import{typeCheck as e}from"./helpers/type-check.mjs";import"./helpers/index.mjs";import t from"defu";import{VIRTUAL_MODULE_PREFIX_REGEX as n}from"powerlines/constants";import{createFilterForTransform as r}from"powerlines/plugin-utils";import i from"typescript";const a=(a={})=>({name:`tsc`,config(){return this.trace(`Merging TypeScript Compiler plugin configuration`),{tsc:t(a??{},{typeCheck:!1,filter:{id:{include:/\.(?:[cm]?ts|tsx)(?=\s*$)/i,exclude:/\.(?:d|spec|test)\.(?:[cm]?ts|tsx)(?=\s*$)/i}}})}},async lint(){this.config.tsc.typeCheck&&await e(this)},transform:{filter:{id:{exclude:/\.(?:[cm]?js|jsx)(?=\s*$)/i}},async handler(e,t){if(!r(this.config.tsc.filter?.id,this.config.tsc.filter?.code)?.(t,e))return{code:e,id:t};let a=i.transpileModule(e,{...this.config.tsc,compilerOptions:{...this.tsconfig.options,...this.config.tsc.compilerOptions},fileName:t.replace(n,``)});if(a.diagnostics&&a.diagnostics.length>0&&a.diagnostics?.some(e=>e.category===i.DiagnosticCategory.Error))throw Error(`TypeScript Compiler - TypeScript transpilation errors in file: ${t}\n${i.formatDiagnostics(a.diagnostics,{getCanonicalFileName:e=>i.sys.useCaseSensitiveFileNames?e:e.toLowerCase(),getCurrentDirectory:()=>i.sys.getCurrentDirectory(),getNewLine:()=>i.sys.newLine})}`);if(!a.outputText)throw Error(`TypeScript Compiler - No output generated for file during TypeScript transpilation: ${t}`);return{code:a.outputText,id:t}}}});export{a as default,a as plugin,e as typeCheck};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { VIRTUAL_MODULE_PREFIX_REGEX } from \"powerlines/constants\";\nimport { createFilterForTransform } from \"powerlines/plugin-utils\";\nimport ts from \"typescript\";\nimport { typeCheck } from \"./helpers/type-check\";\nimport type {\n TypeScriptCompilerPluginContext,\n TypeScriptCompilerPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n tsc?: TypeScriptCompilerPluginOptions;\n }\n}\n\n/**\n * TypeScript Compiler plugin for Powerlines.\n *\n * @param options - The TypeScript Compiler plugin user configuration options.\n * @returns A Powerlines plugin that integrates TypeScript Compiler transformations.\n */\nexport const plugin = <\n TContext extends TypeScriptCompilerPluginContext =\n TypeScriptCompilerPluginContext\n>(\n options: TypeScriptCompilerPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"tsc\",\n config() {\n this.trace(\"Merging TypeScript Compiler plugin configuration\");\n\n return {\n tsc: defu(options ?? {}, {\n typeCheck: false,\n filter: {\n id: {\n include: /\\.(?:[cm]?ts|tsx)(?=\\s*$)/i,\n exclude: /\\.(?:d|spec|test)\\.(?:[cm]?ts|tsx)(?=\\s*$)/i\n }\n }\n })\n };\n },\n async lint() {\n if (this.config.tsc.typeCheck) {\n await typeCheck(this);\n }\n },\n transform: {\n filter: {\n id: { exclude: /\\.(?:[cm]?js|jsx)(?=\\s*$)/i }\n },\n async handler(code: string, id: string) {\n if (\n !createFilterForTransform(\n this.config.tsc.filter?.id,\n this.config.tsc.filter?.code\n )?.(id, code)\n ) {\n return { code, id };\n }\n\n const result = ts.transpileModule(code, {\n ...this.config.tsc,\n compilerOptions: {\n ...this.tsconfig.options,\n ...this.config.tsc.compilerOptions\n },\n fileName: id.replace(VIRTUAL_MODULE_PREFIX_REGEX, \"\")\n });\n if (\n result.diagnostics &&\n result.diagnostics.length > 0 &&\n result.diagnostics?.some(\n diagnostic => diagnostic.category === ts.DiagnosticCategory.Error\n )\n ) {\n throw new Error(\n `TypeScript Compiler - TypeScript transpilation errors in file: ${id}\\n${ts.formatDiagnostics(\n result.diagnostics,\n {\n getCanonicalFileName: fileName =>\n ts.sys.useCaseSensitiveFileNames\n ? fileName\n : fileName.toLowerCase(),\n getCurrentDirectory: () => ts.sys.getCurrentDirectory(),\n getNewLine: () => ts.sys.newLine\n }\n )}`\n );\n }\n\n if (!result.outputText) {\n throw new Error(\n `TypeScript Compiler - No output generated for file during TypeScript transpilation: ${id}`\n );\n }\n\n return { code: result.outputText, id };\n }\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"qQA4CA,MAAa,GAIX,EAA2C,EAAE,IAEtC,CACL,KAAM,MACN,QAAS,CAGP,OAFA,KAAK,MAAM,mDAAmD,CAEvD,CACL,IAAK,EAAK,GAAW,EAAE,CAAE,CACvB,UAAW,GACX,OAAQ,CACN,GAAI,CACF,QAAS,6BACT,QAAS,8CACV,CACF,CACF,CAAC,CACH,EAEH,MAAM,MAAO,CACP,KAAK,OAAO,IAAI,WAClB,MAAM,EAAU,KAAK,EAGzB,UAAW,CACT,OAAQ,CACN,GAAI,CAAE,QAAS,6BAA8B,CAC9C,CACD,MAAM,QAAQ,EAAc,EAAY,CACtC,GACE,CAAC,EACC,KAAK,OAAO,IAAI,QAAQ,GACxB,KAAK,OAAO,IAAI,QAAQ,KACzB,GAAG,EAAI,EAAK,CAEb,MAAO,CAAE,OAAM,KAAI,CAGrB,IAAM,EAAS,EAAG,gBAAgB,EAAM,CACtC,GAAG,KAAK,OAAO,IACf,gBAAiB,CACf,GAAG,KAAK,SAAS,QACjB,GAAG,KAAK,OAAO,IAAI,gBACpB,CACD,SAAU,EAAG,QAAQ,EAA6B,GAAG,CACtD,CAAC,CACF,GACE,EAAO,aACP,EAAO,YAAY,OAAS,GAC5B,EAAO,aAAa,KAClB,GAAc,EAAW,WAAa,EAAG,mBAAmB,MAC7D,CAED,MAAU,MACR,kEAAkE,EAAG,IAAI,EAAG,kBAC1E,EAAO,YACP,CACE,qBAAsB,GACpB,EAAG,IAAI,0BACH,EACA,EAAS,aAAa,CAC5B,wBAA2B,EAAG,IAAI,qBAAqB,CACvD,eAAkB,EAAG,IAAI,QAC1B,CACF,GACF,CAGH,GAAI,CAAC,EAAO,WACV,MAAU,MACR,uFAAuF,IACxF,CAGH,MAAO,CAAE,KAAM,EAAO,WAAY,KAAI,EAEzC,CACF"}
File without changes
@@ -0,0 +1,2 @@
1
+ import { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig } from "./plugin.cjs";
2
+ export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig };
@@ -0,0 +1,2 @@
1
+ import { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig } from "./plugin.mjs";
2
+ export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig };
@@ -0,0 +1 @@
1
+ export{};
File without changes
@@ -0,0 +1,36 @@
1
+ import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
2
+ import ts from "typescript";
3
+ import { HookFilter } from "unplugin";
4
+
5
+ //#region src/types/plugin.d.ts
6
+ type TypeScriptCompilerPluginOptions = Partial<Omit<ts.TranspileOptions, "fileName">> & {
7
+ /**
8
+ * Filter configuration to determine which files should be processed by the plugin's transformation hook.
9
+ *
10
+ * @defaultValue \{ id: /\.(?:(?:(?<dts>d)\.)?(?<type>[cm])?ts|tsx)(?=\\s*$)/ \}
11
+ */
12
+ filter?: HookFilter;
13
+ /**
14
+ * Whether to perform type checking during the `lint` task.
15
+ *
16
+ * @defaultValue false
17
+ */
18
+ typeCheck?: boolean;
19
+ };
20
+ interface TypeScriptCompilerPluginUserConfig extends UserConfig {
21
+ tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
22
+ }
23
+ interface TypeScriptCompilerPluginResolvedConfig extends ResolvedConfig {
24
+ /**
25
+ * Resolved TypeScript Compiler transformation options
26
+ */
27
+ tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
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, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig };
36
+ //# sourceMappingURL=plugin.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAsBY,+BAAA,GAAkC,OAAA,CAC5C,IAAA,CAAK,EAAA,CAAG,gBAAA;;AADV;;;;EAQE,MAAA,GAAS,UAAA;EARmC;;;;;EAe5C,SAAA;AAAA;AAAA,UAGe,kCAAA,SAA2C,UAAA;EAC1D,GAAA,EAAK,OAAA,CAAQ,IAAA,CAAK,+BAAA,kBAChB,QAAA,CAAS,IAAA,CAAK,+BAAA;AAAA;AAAA,UAGD,sCAAA,SAA+C,cAAA;EARrD;;AAGX;EASE,GAAA,EAAK,OAAA,CAAQ,IAAA,CAAK,+BAAA,kBAChB,QAAA,CAAS,IAAA,CAAK,+BAAA;AAAA;AAAA,KAGN,+BAAA,yBACc,sCAAA,GACtB,sCAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
@@ -0,0 +1,36 @@
1
+ import ts from "typescript";
2
+ import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
3
+ import { HookFilter } from "unplugin";
4
+
5
+ //#region src/types/plugin.d.ts
6
+ type TypeScriptCompilerPluginOptions = Partial<Omit<ts.TranspileOptions, "fileName">> & {
7
+ /**
8
+ * Filter configuration to determine which files should be processed by the plugin's transformation hook.
9
+ *
10
+ * @defaultValue \{ id: /\.(?:(?:(?<dts>d)\.)?(?<type>[cm])?ts|tsx)(?=\\s*$)/ \}
11
+ */
12
+ filter?: HookFilter;
13
+ /**
14
+ * Whether to perform type checking during the `lint` task.
15
+ *
16
+ * @defaultValue false
17
+ */
18
+ typeCheck?: boolean;
19
+ };
20
+ interface TypeScriptCompilerPluginUserConfig extends UserConfig {
21
+ tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
22
+ }
23
+ interface TypeScriptCompilerPluginResolvedConfig extends ResolvedConfig {
24
+ /**
25
+ * Resolved TypeScript Compiler transformation options
26
+ */
27
+ tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
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, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig, __ΩTypeScriptCompilerPluginContext, __ΩTypeScriptCompilerPluginOptions, __ΩTypeScriptCompilerPluginResolvedConfig, __ΩTypeScriptCompilerPluginUserConfig };
36
+ //# sourceMappingURL=plugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAsBY,+BAAA,GAAkC,OAAA,CAC5C,IAAA,CAAK,EAAA,CAAG,gBAAA;;AADV;;;;EAQE,MAAA,GAAS,UAAA;EARmC;;;;;EAe5C,SAAA;AAAA;AAAA,UAGe,kCAAA,SAA2C,UAAA;EAC1D,GAAA,EAAK,OAAA,CAAQ,IAAA,CAAK,+BAAA,kBAChB,QAAA,CAAS,IAAA,CAAK,+BAAA;AAAA;AAAA,UAGD,sCAAA,SAA+C,cAAA;EARrD;;AAGX;EASE,GAAA,EAAK,OAAA,CAAQ,IAAA,CAAK,+BAAA,kBAChB,QAAA,CAAS,IAAA,CAAK,+BAAA;AAAA;AAAA,KAGN,+BAAA,yBACc,sCAAA,GACtB,sCAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
@@ -0,0 +1 @@
1
+ export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-tsc",
3
- "version": "0.2.441",
3
+ "version": "0.2.443",
4
4
  "type": "module",
5
5
  "description": "A package containing the TypeScript compiler plugin for Powerlines.",
6
6
  "repository": {
@@ -118,16 +118,16 @@
118
118
  "files": ["dist/**/*"],
119
119
  "keywords": ["tsc", "powerlines", "storm-software", "powerlines-plugin"],
120
120
  "dependencies": {
121
- "@stryke/path": "^0.27.5",
121
+ "@stryke/path": "^0.28.1",
122
122
  "defu": "^6.1.7",
123
- "powerlines": "^0.43.28",
123
+ "powerlines": "^0.43.30",
124
124
  "unplugin": "^3.0.0",
125
125
  "typescript": "^6.0.3"
126
126
  },
127
127
  "devDependencies": {
128
- "@powerlines/plugin-plugin": "^0.12.383",
128
+ "@powerlines/plugin-plugin": "^0.12.385",
129
129
  "@types/node": "^25.6.0"
130
130
  },
131
131
  "publishConfig": { "access": "public" },
132
- "gitHead": "efeaec793549f37c700f2e876bf6097c37375c46"
132
+ "gitHead": "36f3385b33024e00aafb6c4a10e7a2e3c896aad5"
133
133
  }