@powerlines/plugin-tsc 0.2.7 → 0.2.8
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/chunk-FBBMZ4NC.cjs +7 -0
- package/dist/chunk-UCUR73HG.js +7 -0
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/index.d.cts +22 -0
- package/dist/helpers/index.d.ts +22 -0
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/type-check.cjs +9 -0
- package/dist/helpers/type-check.d.cts +40 -0
- package/dist/helpers/type-check.d.ts +40 -0
- package/dist/helpers/type-check.js +9 -0
- package/dist/plugin-zj8ivj8v.d.cts +1304 -0
- package/dist/plugin-zj8ivj8v.d.ts +1304 -0
- package/dist/src/index.cjs +8 -0
- package/dist/src/index.d.cts +34 -0
- package/dist/src/index.d.ts +34 -0
- package/dist/src/index.js +8 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +22 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.js +1 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +49 -0
- package/dist/types/plugin.d.ts +49 -0
- package/dist/types/plugin.js +0 -0
- package/package.json +4 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkFBBMZ4NC_cjs=require('../chunk-FBBMZ4NC.cjs'),p=require('defu'),r=require('typescript'),typeCheck=require('./helpers/type-check'),helpers=require('./helpers'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var p__default=/*#__PURE__*/_interopDefault(p);var r__default=/*#__PURE__*/_interopDefault(r);/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
const a=chunkFBBMZ4NC_cjs.a((n={})=>({name:"tsc",config(){return {transform:{tsc:p__default.default(n??{},{typeCheck:false})}}},async lint(){this.config.transform.tsc.typeCheck&&await typeCheck.typeCheck(this);},async transform(s,e){const t=r__default.default.transpileModule(s,{...this.config.transform.tsc,compilerOptions:{...this.tsconfig.options,...this.config.transform.tsc.compilerOptions},fileName:e});if(t.diagnostics&&t.diagnostics.length>0&&t.diagnostics?.some(o=>o.category===r__default.default.DiagnosticCategory.Error))throw new Error(`TypeScript Compiler - TypeScript transpilation errors in file: ${e}
|
|
8
|
+
${r__default.default.formatDiagnostics(t.diagnostics,{getCanonicalFileName:chunkFBBMZ4NC_cjs.a(o=>r__default.default.sys.useCaseSensitiveFileNames?o:o.toLowerCase(),"getCanonicalFileName"),getCurrentDirectory:chunkFBBMZ4NC_cjs.a(()=>r__default.default.sys.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:chunkFBBMZ4NC_cjs.a(()=>r__default.default.sys.newLine,"getNewLine")})}`);if(!t.outputText)throw new Error(`TypeScript Compiler - No output generated for file during TypeScript transpilation: ${e}`);return {code:t.outputText,id:e}}}),"plugin");var h=a;exports.default=h;exports.plugin=a;Object.keys(helpers).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return helpers[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { P as Plugin } from '../plugin-zj8ivj8v.cjs';
|
|
2
|
+
import { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions } from '../types/plugin.cjs';
|
|
3
|
+
export { TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig } from '../types/plugin.cjs';
|
|
4
|
+
export { typeCheck } from '../helpers/type-check.cjs';
|
|
5
|
+
import '@stryke/types/base';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '@stryke/types/array';
|
|
8
|
+
import '@storm-software/build-tools/types';
|
|
9
|
+
import '@storm-software/config-tools/types';
|
|
10
|
+
import '@storm-software/config/types';
|
|
11
|
+
import '@stryke/types/configuration';
|
|
12
|
+
import '@stryke/types/file';
|
|
13
|
+
import 'vite';
|
|
14
|
+
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/types/package-json';
|
|
16
|
+
import 'jiti';
|
|
17
|
+
import 'oxc-parser';
|
|
18
|
+
import 'semver';
|
|
19
|
+
import '@stryke/types/tsconfig';
|
|
20
|
+
import 'typescript';
|
|
21
|
+
import '@stryke/json/types';
|
|
22
|
+
import 'memfs';
|
|
23
|
+
import 'node:fs';
|
|
24
|
+
import 'unionfs';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* TypeScript Compiler plugin for Powerlines.
|
|
28
|
+
*
|
|
29
|
+
* @param options - The TypeScript Compiler plugin user configuration options.
|
|
30
|
+
* @returns A Powerlines plugin that integrates TypeScript Compiler transformations.
|
|
31
|
+
*/
|
|
32
|
+
declare const plugin: <TContext extends TypeScriptCompilerPluginContext = TypeScriptCompilerPluginContext>(options?: TypeScriptCompilerPluginOptions) => Plugin<TContext>;
|
|
33
|
+
|
|
34
|
+
export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, plugin as default, plugin };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { P as Plugin } from '../plugin-zj8ivj8v.js';
|
|
2
|
+
import { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions } from '../types/plugin.js';
|
|
3
|
+
export { TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig } from '../types/plugin.js';
|
|
4
|
+
export { typeCheck } from '../helpers/type-check.js';
|
|
5
|
+
import '@stryke/types/base';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '@stryke/types/array';
|
|
8
|
+
import '@storm-software/build-tools/types';
|
|
9
|
+
import '@storm-software/config-tools/types';
|
|
10
|
+
import '@storm-software/config/types';
|
|
11
|
+
import '@stryke/types/configuration';
|
|
12
|
+
import '@stryke/types/file';
|
|
13
|
+
import 'vite';
|
|
14
|
+
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/types/package-json';
|
|
16
|
+
import 'jiti';
|
|
17
|
+
import 'oxc-parser';
|
|
18
|
+
import 'semver';
|
|
19
|
+
import '@stryke/types/tsconfig';
|
|
20
|
+
import 'typescript';
|
|
21
|
+
import '@stryke/json/types';
|
|
22
|
+
import 'memfs';
|
|
23
|
+
import 'node:fs';
|
|
24
|
+
import 'unionfs';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* TypeScript Compiler plugin for Powerlines.
|
|
28
|
+
*
|
|
29
|
+
* @param options - The TypeScript Compiler plugin user configuration options.
|
|
30
|
+
* @returns A Powerlines plugin that integrates TypeScript Compiler transformations.
|
|
31
|
+
*/
|
|
32
|
+
declare const plugin: <TContext extends TypeScriptCompilerPluginContext = TypeScriptCompilerPluginContext>(options?: TypeScriptCompilerPluginOptions) => Plugin<TContext>;
|
|
33
|
+
|
|
34
|
+
export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, plugin as default, plugin };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import {a as a$1}from'../chunk-UCUR73HG.js';import p from'defu';import r from'typescript';import {typeCheck}from'./helpers/type-check';export*from'./helpers';export*from'./types';/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
const a=a$1((n={})=>({name:"tsc",config(){return {transform:{tsc:p(n??{},{typeCheck:false})}}},async lint(){this.config.transform.tsc.typeCheck&&await typeCheck(this);},async transform(s,e){const t=r.transpileModule(s,{...this.config.transform.tsc,compilerOptions:{...this.tsconfig.options,...this.config.transform.tsc.compilerOptions},fileName:e});if(t.diagnostics&&t.diagnostics.length>0&&t.diagnostics?.some(o=>o.category===r.DiagnosticCategory.Error))throw new Error(`TypeScript Compiler - TypeScript transpilation errors in file: ${e}
|
|
8
|
+
${r.formatDiagnostics(t.diagnostics,{getCanonicalFileName:a$1(o=>r.sys.useCaseSensitiveFileNames?o:o.toLowerCase(),"getCanonicalFileName"),getCurrentDirectory:a$1(()=>r.sys.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:a$1(()=>r.sys.newLine,"getNewLine")})}`);if(!t.outputText)throw new Error(`TypeScript Compiler - No output generated for file during TypeScript transpilation: ${e}`);return {code:t.outputText,id:e}}}),"plugin");var P=a;export{P as default,a as plugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var plugin=require('./plugin');Object.keys(plugin).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return plugin[k]}})});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig } from './plugin.cjs';
|
|
2
|
+
import '../plugin-zj8ivj8v.cjs';
|
|
3
|
+
import '@stryke/types/base';
|
|
4
|
+
import 'unplugin';
|
|
5
|
+
import '@stryke/types/array';
|
|
6
|
+
import '@storm-software/build-tools/types';
|
|
7
|
+
import '@storm-software/config-tools/types';
|
|
8
|
+
import '@storm-software/config/types';
|
|
9
|
+
import '@stryke/types/configuration';
|
|
10
|
+
import '@stryke/types/file';
|
|
11
|
+
import 'vite';
|
|
12
|
+
import '@stryke/env/get-env-paths';
|
|
13
|
+
import '@stryke/types/package-json';
|
|
14
|
+
import 'jiti';
|
|
15
|
+
import 'oxc-parser';
|
|
16
|
+
import 'semver';
|
|
17
|
+
import '@stryke/types/tsconfig';
|
|
18
|
+
import 'typescript';
|
|
19
|
+
import '@stryke/json/types';
|
|
20
|
+
import 'memfs';
|
|
21
|
+
import 'node:fs';
|
|
22
|
+
import 'unionfs';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig } from './plugin.js';
|
|
2
|
+
import '../plugin-zj8ivj8v.js';
|
|
3
|
+
import '@stryke/types/base';
|
|
4
|
+
import 'unplugin';
|
|
5
|
+
import '@stryke/types/array';
|
|
6
|
+
import '@storm-software/build-tools/types';
|
|
7
|
+
import '@storm-software/config-tools/types';
|
|
8
|
+
import '@storm-software/config/types';
|
|
9
|
+
import '@stryke/types/configuration';
|
|
10
|
+
import '@stryke/types/file';
|
|
11
|
+
import 'vite';
|
|
12
|
+
import '@stryke/env/get-env-paths';
|
|
13
|
+
import '@stryke/types/package-json';
|
|
14
|
+
import 'jiti';
|
|
15
|
+
import 'oxc-parser';
|
|
16
|
+
import 'semver';
|
|
17
|
+
import '@stryke/types/tsconfig';
|
|
18
|
+
import 'typescript';
|
|
19
|
+
import '@stryke/json/types';
|
|
20
|
+
import 'memfs';
|
|
21
|
+
import 'node:fs';
|
|
22
|
+
import 'unionfs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'./plugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { R as ResolvedConfig, a as PluginContext, U as UserConfig } from '../plugin-zj8ivj8v.cjs';
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
import '@stryke/types/base';
|
|
4
|
+
import 'unplugin';
|
|
5
|
+
import '@stryke/types/array';
|
|
6
|
+
import '@storm-software/build-tools/types';
|
|
7
|
+
import '@storm-software/config-tools/types';
|
|
8
|
+
import '@storm-software/config/types';
|
|
9
|
+
import '@stryke/types/configuration';
|
|
10
|
+
import '@stryke/types/file';
|
|
11
|
+
import 'vite';
|
|
12
|
+
import '@stryke/env/get-env-paths';
|
|
13
|
+
import '@stryke/types/package-json';
|
|
14
|
+
import 'jiti';
|
|
15
|
+
import 'oxc-parser';
|
|
16
|
+
import 'semver';
|
|
17
|
+
import '@stryke/types/tsconfig';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
|
|
23
|
+
type TypeScriptCompilerPluginOptions = Partial<Omit<ts.TranspileOptions, "fileName">> & {
|
|
24
|
+
/**
|
|
25
|
+
* Whether to perform type checking during the `lint` task.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue false
|
|
28
|
+
*/
|
|
29
|
+
typeCheck?: boolean;
|
|
30
|
+
};
|
|
31
|
+
interface TypeScriptCompilerPluginUserConfig extends UserConfig {
|
|
32
|
+
transform: {
|
|
33
|
+
/**
|
|
34
|
+
* TypeScript Compiler transformation options
|
|
35
|
+
*/
|
|
36
|
+
tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
interface TypeScriptCompilerPluginResolvedConfig extends ResolvedConfig {
|
|
40
|
+
transform: {
|
|
41
|
+
/**
|
|
42
|
+
* Resolved TypeScript Compiler transformation options
|
|
43
|
+
*/
|
|
44
|
+
tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
type TypeScriptCompilerPluginContext<TResolvedConfig extends TypeScriptCompilerPluginResolvedConfig = TypeScriptCompilerPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
48
|
+
|
|
49
|
+
export type { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { R as ResolvedConfig, a as PluginContext, U as UserConfig } from '../plugin-zj8ivj8v.js';
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
import '@stryke/types/base';
|
|
4
|
+
import 'unplugin';
|
|
5
|
+
import '@stryke/types/array';
|
|
6
|
+
import '@storm-software/build-tools/types';
|
|
7
|
+
import '@storm-software/config-tools/types';
|
|
8
|
+
import '@storm-software/config/types';
|
|
9
|
+
import '@stryke/types/configuration';
|
|
10
|
+
import '@stryke/types/file';
|
|
11
|
+
import 'vite';
|
|
12
|
+
import '@stryke/env/get-env-paths';
|
|
13
|
+
import '@stryke/types/package-json';
|
|
14
|
+
import 'jiti';
|
|
15
|
+
import 'oxc-parser';
|
|
16
|
+
import 'semver';
|
|
17
|
+
import '@stryke/types/tsconfig';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
|
|
23
|
+
type TypeScriptCompilerPluginOptions = Partial<Omit<ts.TranspileOptions, "fileName">> & {
|
|
24
|
+
/**
|
|
25
|
+
* Whether to perform type checking during the `lint` task.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue false
|
|
28
|
+
*/
|
|
29
|
+
typeCheck?: boolean;
|
|
30
|
+
};
|
|
31
|
+
interface TypeScriptCompilerPluginUserConfig extends UserConfig {
|
|
32
|
+
transform: {
|
|
33
|
+
/**
|
|
34
|
+
* TypeScript Compiler transformation options
|
|
35
|
+
*/
|
|
36
|
+
tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
interface TypeScriptCompilerPluginResolvedConfig extends ResolvedConfig {
|
|
40
|
+
transform: {
|
|
41
|
+
/**
|
|
42
|
+
* Resolved TypeScript Compiler transformation options
|
|
43
|
+
*/
|
|
44
|
+
tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
type TypeScriptCompilerPluginContext<TResolvedConfig extends TypeScriptCompilerPluginResolvedConfig = TypeScriptCompilerPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
48
|
+
|
|
49
|
+
export type { TypeScriptCompilerPluginContext, TypeScriptCompilerPluginOptions, TypeScriptCompilerPluginResolvedConfig, TypeScriptCompilerPluginUserConfig };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-tsc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing the TypeScript compiler plugin for Powerlines.",
|
|
6
6
|
"repository": {
|
|
@@ -128,10 +128,10 @@
|
|
|
128
128
|
"keywords": ["tsc", "powerlines", "storm-software", "powerlines-plugin"],
|
|
129
129
|
"dependencies": {
|
|
130
130
|
"defu": "^6.1.4",
|
|
131
|
-
"powerlines": "^0.
|
|
131
|
+
"powerlines": "^0.15.0",
|
|
132
132
|
"typescript": "^5.9.3"
|
|
133
133
|
},
|
|
134
|
-
"devDependencies": { "@powerlines/nx": "^0.
|
|
134
|
+
"devDependencies": { "@powerlines/nx": "^0.10.0", "@types/node": "^22.19.0" },
|
|
135
135
|
"publishConfig": { "access": "public" },
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "b64f9a9d53b6eb8054c361da347f6623a7ba9e45"
|
|
137
137
|
}
|