@powerlines/plugin-unimport 0.1.47 → 0.1.48
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/index-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +1 -7
- package/dist/index.d.cts +7 -26
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-Bvn-he2n.mjs +1 -0
- package/dist/plugin-CCAMJiDO.d.mts +1675 -0
- package/dist/plugin-CCAMJiDO.d.mts.map +1 -0
- package/dist/plugin-nd1nmmeZ.d.cts +1675 -0
- package/dist/plugin-nd1nmmeZ.d.cts.map +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +3 -23
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.d.cts +2 -23
- package/dist/types/plugin.d.mts +2 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/types-B7VYa_Pp.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +45 -27
- package/dist/index-BHL6PkTK.d.cts +0 -1586
- package/dist/index-BHL6PkTK.d.ts +0 -1586
- package/dist/index.d.ts +0 -34
- package/dist/index.js +0 -7
- package/dist/types/index.d.ts +0 -23
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.d.ts +0 -23
- /package/dist/{types/plugin.js → plugin-DHXHjv16.cjs} +0 -0
package/dist/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { U as UnimportPluginContext, a as UnimportPluginOptions, P as Plugin } from './index-BHL6PkTK.js';
|
|
2
|
-
export { b as UnimportContext, d as UnimportPluginResolvedConfig, c as UnimportPluginUserConfig, _ as __ΩUnimportContext, h as __ΩUnimportPluginContext, e as __ΩUnimportPluginOptions, g as __ΩUnimportPluginResolvedConfig, f as __ΩUnimportPluginUserConfig } from './index-BHL6PkTK.js';
|
|
3
|
-
import '@storm-software/build-tools/types';
|
|
4
|
-
import '@storm-software/config-tools/types';
|
|
5
|
-
import '@storm-software/config/types';
|
|
6
|
-
import '@stryke/types/base';
|
|
7
|
-
import '@stryke/types/configuration';
|
|
8
|
-
import '@stryke/types/file';
|
|
9
|
-
import 'vite';
|
|
10
|
-
import '@stryke/env/get-env-paths';
|
|
11
|
-
import '@stryke/http/fetch';
|
|
12
|
-
import '@stryke/types/package-json';
|
|
13
|
-
import 'jiti';
|
|
14
|
-
import 'magic-string';
|
|
15
|
-
import 'oxc-parser';
|
|
16
|
-
import 'semver';
|
|
17
|
-
import 'ts-morph';
|
|
18
|
-
import 'undici';
|
|
19
|
-
import 'unplugin';
|
|
20
|
-
import '@stryke/fs/resolve';
|
|
21
|
-
import '@stryke/types/tsconfig';
|
|
22
|
-
import 'typescript';
|
|
23
|
-
import '@stryke/types/array';
|
|
24
|
-
import 'unimport';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A Powerlines plugin to integrate Unimport for code generation.
|
|
28
|
-
*
|
|
29
|
-
* @param options - The plugin options.
|
|
30
|
-
* @returns A Powerlines plugin instance.
|
|
31
|
-
*/
|
|
32
|
-
declare const plugin: <TContext extends UnimportPluginContext = UnimportPluginContext>(options: UnimportPluginOptions) => Plugin<TContext>;
|
|
33
|
-
|
|
34
|
-
export { UnimportPluginContext, UnimportPluginOptions, plugin as default, plugin };
|
package/dist/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import {LogLevelLabel}from'@storm-software/config-tools/types';import {throttle}from'@stryke/helpers/throttle';import {StormJSON}from'@stryke/json/storm-json';import {joinPaths}from'@stryke/path/join';import h from'defu';import {createUnimport}from'unimport';export*from'./types';/*****************************************
|
|
2
|
-
*
|
|
3
|
-
* ⚡ Built by Storm Software
|
|
4
|
-
*
|
|
5
|
-
*****************************************/
|
|
6
|
-
|
|
7
|
-
var g=Object.defineProperty;var e=(r,t)=>g(r,"name",{value:t,configurable:true});const d=e(r=>({name:"unimport",config(){return {unimport:h(r,{commentsDisable:["@unimport-disable","@unimport-ignore","@imports-disable","@imports-ignore","@powerlines-disable","@powerlines-ignore"],commentsDebug:["@unimport-debug","@imports-debug","@powerlines-debug"],injectAtEnd:true})}},async configResolved(){const{injectImports:t,init:i,...o}=createUnimport(this.config.unimport);this.unimport={...o},this.unimport.dumpImports=throttle(async()=>{this.log(LogLevelLabel.TRACE,"Dumping import file...");const s=await this.unimport.getImports();this.log(LogLevelLabel.TRACE,`Writing imports-dump JSON file: ${joinPaths(this.dataPath,"imports-dump.json")}`);const n=StormJSON.stringify(s);n.trim()!==this.unimport.lastImportsDump?.trim()&&(this.unimport.lastImportsDump=n,await this.fs.write(joinPaths(this.dataPath,"imports-dump.json"),n));},1e3),this.unimport.injectImports=async(s,n,a)=>{const m=await t(s,n,a);return m.s.hasChanged()&&await this.unimport.dumpImports(),m},this.unimport.init=async()=>{await i(),await this.unimport.dumpImports();},await this.unimport.init();},async transform(t,i){const o=await this.unimport.injectImports(t,i);return o.s.hasChanged()?{id:i,code:o.s.toString(),map:o.s.generateMap({source:i,includeContent:true,hires:true})}:null}}),"plugin");var N=d;export{N as default,d as plugin};
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export { b as UnimportContext, U as UnimportPluginContext, a as UnimportPluginOptions, d as UnimportPluginResolvedConfig, c as UnimportPluginUserConfig, _ as __ΩUnimportContext, h as __ΩUnimportPluginContext, e as __ΩUnimportPluginOptions, g as __ΩUnimportPluginResolvedConfig, f as __ΩUnimportPluginUserConfig } from '../index-BHL6PkTK.js';
|
|
2
|
-
import '@storm-software/build-tools/types';
|
|
3
|
-
import '@storm-software/config-tools/types';
|
|
4
|
-
import '@storm-software/config/types';
|
|
5
|
-
import '@stryke/types/base';
|
|
6
|
-
import '@stryke/types/configuration';
|
|
7
|
-
import '@stryke/types/file';
|
|
8
|
-
import 'vite';
|
|
9
|
-
import '@stryke/env/get-env-paths';
|
|
10
|
-
import '@stryke/http/fetch';
|
|
11
|
-
import '@stryke/types/package-json';
|
|
12
|
-
import 'jiti';
|
|
13
|
-
import 'magic-string';
|
|
14
|
-
import 'oxc-parser';
|
|
15
|
-
import 'semver';
|
|
16
|
-
import 'ts-morph';
|
|
17
|
-
import 'undici';
|
|
18
|
-
import 'unplugin';
|
|
19
|
-
import '@stryke/fs/resolve';
|
|
20
|
-
import '@stryke/types/tsconfig';
|
|
21
|
-
import 'typescript';
|
|
22
|
-
import '@stryke/types/array';
|
|
23
|
-
import 'unimport';
|
package/dist/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from'./plugin';
|
package/dist/types/plugin.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export { b as UnimportContext, U as UnimportPluginContext, a as UnimportPluginOptions, d as UnimportPluginResolvedConfig, c as UnimportPluginUserConfig, _ as __ΩUnimportContext, h as __ΩUnimportPluginContext, e as __ΩUnimportPluginOptions, g as __ΩUnimportPluginResolvedConfig, f as __ΩUnimportPluginUserConfig } from '../index-BHL6PkTK.js';
|
|
2
|
-
import 'unimport';
|
|
3
|
-
import '@storm-software/build-tools/types';
|
|
4
|
-
import '@storm-software/config-tools/types';
|
|
5
|
-
import '@storm-software/config/types';
|
|
6
|
-
import '@stryke/types/base';
|
|
7
|
-
import '@stryke/types/configuration';
|
|
8
|
-
import '@stryke/types/file';
|
|
9
|
-
import 'vite';
|
|
10
|
-
import '@stryke/env/get-env-paths';
|
|
11
|
-
import '@stryke/http/fetch';
|
|
12
|
-
import '@stryke/types/package-json';
|
|
13
|
-
import 'jiti';
|
|
14
|
-
import 'magic-string';
|
|
15
|
-
import 'oxc-parser';
|
|
16
|
-
import 'semver';
|
|
17
|
-
import 'ts-morph';
|
|
18
|
-
import 'undici';
|
|
19
|
-
import 'unplugin';
|
|
20
|
-
import '@stryke/fs/resolve';
|
|
21
|
-
import '@stryke/types/tsconfig';
|
|
22
|
-
import 'typescript';
|
|
23
|
-
import '@stryke/types/array';
|
|
File without changes
|