@powerlines/plugin-unimport 0.1.253 → 0.1.255

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,29 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
package/dist/index.cjs CHANGED
@@ -1,38 +1,10 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- //#region rolldown:runtime
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
- key = keys[i];
13
- if (!__hasOwnProp.call(to, key) && key !== except) {
14
- __defProp(to, key, {
15
- get: ((k) => from[k]).bind(null, key),
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- }
19
- }
20
- }
21
- return to;
22
- };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
- value: mod,
25
- enumerable: true
26
- }) : target, mod));
27
-
28
- //#endregion
29
- require('./plugin-DHXHjv16.cjs');
30
- require('./types-DHkg7xmX.cjs');
2
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
31
3
  let __stryke_helpers_throttle = require("@stryke/helpers/throttle");
32
4
  let __stryke_json_storm_json = require("@stryke/json/storm-json");
33
5
  let __stryke_path_join = require("@stryke/path/join");
34
6
  let defu = require("defu");
35
- defu = __toESM(defu);
7
+ defu = require_rolldown_runtime.__toESM(defu);
36
8
  let unimport = require("unimport");
37
9
 
38
10
  //#region src/index.ts
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as UnimportPluginUserConfig, c as __ΩUnimportPluginOptions, i as UnimportPluginResolvedConfig, l as __ΩUnimportPluginResolvedConfig, n as UnimportPluginContext, o as __ΩUnimportContext, r as UnimportPluginOptions, s as __ΩUnimportPluginContext, t as UnimportContext, u as __ΩUnimportPluginUserConfig } from "./plugin-DVJW0hOO.cjs";
2
- import "./index-CEgs-Dz2.cjs";
1
+ import { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig } from "./types/plugin.cjs";
2
+ import "./types/index.cjs";
3
3
  import { Plugin } from "powerlines/types/plugin";
4
4
 
5
5
  //#region src/index.d.ts
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as UnimportPluginUserConfig, c as __ΩUnimportPluginOptions, i as UnimportPluginResolvedConfig, l as __ΩUnimportPluginResolvedConfig, n as UnimportPluginContext, o as __ΩUnimportContext, r as UnimportPluginOptions, s as __ΩUnimportPluginContext, t as UnimportContext, u as __ΩUnimportPluginUserConfig } from "./plugin-DCPN38Qw.mjs";
2
- import "./index-BgAdqTbb.mjs";
1
+ import { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig } from "./types/plugin.mjs";
2
+ import "./types/index.mjs";
3
3
  import { Plugin } from "powerlines/types/plugin";
4
4
 
5
5
  //#region src/index.d.ts
package/dist/index.mjs CHANGED
@@ -1,5 +1,3 @@
1
- import "./plugin-C3MaN5jp.mjs";
2
- import "./types-CTUnla4x.mjs";
3
1
  import { throttle } from "@stryke/helpers/throttle";
4
2
  import { StormJSON } from "@stryke/json/storm-json";
5
3
  import { joinPaths } from "@stryke/path/join";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["options"],"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 { throttle } from \"@stryke/helpers/throttle\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport defu from \"defu\";\nimport MagicString from \"magic-string\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport {\n createUnimport,\n ImportInjectionResult,\n InjectImportsOptions\n} from \"unimport\";\nimport {\n UnimportContext,\n UnimportPluginContext,\n UnimportPluginOptions,\n UnimportPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate Unimport for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends UnimportPluginContext = UnimportPluginContext\n>(\n options: UnimportPluginOptions\n): Plugin<TContext> => {\n return {\n name: \"unimport\",\n config() {\n return {\n unimport: defu(options, {\n commentsDisable: [\n \"@unimport-disable\",\n \"@unimport-ignore\",\n \"@imports-disable\",\n \"@imports-ignore\",\n \"@powerlines-disable\",\n \"@powerlines-ignore\"\n ],\n commentsDebug: [\n \"@unimport-debug\",\n \"@imports-debug\",\n \"@powerlines-debug\"\n ],\n injectAtEnd: true\n })\n } as Partial<UnimportPluginUserConfig>;\n },\n async configResolved() {\n const { injectImports, init, ...rest } = createUnimport(\n this.config.unimport\n );\n this.unimport = { ...rest } as UnimportContext;\n\n this.unimport.dumpImports = throttle(async () => {\n this.trace(\"Dumping import file...\");\n\n const items = await this.unimport.getImports();\n\n this.trace(\n `Writing imports-dump JSON file: ${joinPaths(this.dataPath, \"imports-dump.json\")}`\n );\n\n const content = StormJSON.stringify(items);\n if (content.trim() !== this.unimport.lastImportsDump?.trim()) {\n this.unimport.lastImportsDump = content;\n await this.fs.write(\n joinPaths(this.dataPath, \"imports-dump.json\"),\n content\n );\n }\n }, 1000);\n\n this.unimport.injectImports = async (\n code: string | MagicString,\n id?: string,\n options?: InjectImportsOptions\n ): Promise<ImportInjectionResult> => {\n const result = await injectImports(code, id, options);\n\n if (!result.s.hasChanged()) {\n return result;\n }\n\n await this.unimport.dumpImports();\n\n return result;\n };\n\n this.unimport.init = async () => {\n await init();\n await this.unimport.dumpImports();\n };\n\n await this.unimport.init();\n },\n async transform(code, id) {\n const result = await this.unimport.injectImports(code, id);\n if (!result.s.hasChanged()) {\n return null;\n }\n\n return {\n id,\n code: result.s.toString(),\n map: result.s.generateMap({\n source: id,\n includeContent: true,\n hires: true\n })\n };\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;AA4CA,MAAa,UAGX,YACqB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,UAAU,KAAK,SAAS;IACtB,iBAAiB;KACf;KACA;KACA;KACA;KACA;KACA;KACD;IACD,eAAe;KACb;KACA;KACA;KACD;IACD,aAAa;IACd,CAAC,EACH;;EAEH,MAAM,iBAAiB;GACrB,MAAM,EAAE,eAAe,MAAM,GAAG,SAAS,eACvC,KAAK,OAAO,SACb;AACD,QAAK,WAAW,EAAE,GAAG,MAAM;AAE3B,QAAK,SAAS,cAAc,SAAS,YAAY;AAC/C,SAAK,MAAM,yBAAyB;IAEpC,MAAM,QAAQ,MAAM,KAAK,SAAS,YAAY;AAE9C,SAAK,MACH,mCAAmC,UAAU,KAAK,UAAU,oBAAoB,GACjF;IAED,MAAM,UAAU,UAAU,UAAU,MAAM;AAC1C,QAAI,QAAQ,MAAM,KAAK,KAAK,SAAS,iBAAiB,MAAM,EAAE;AAC5D,UAAK,SAAS,kBAAkB;AAChC,WAAM,KAAK,GAAG,MACZ,UAAU,KAAK,UAAU,oBAAoB,EAC7C,QACD;;MAEF,IAAK;AAER,QAAK,SAAS,gBAAgB,OAC5B,MACA,IACA,cACmC;IACnC,MAAM,SAAS,MAAM,cAAc,MAAM,IAAIA,UAAQ;AAErD,QAAI,CAAC,OAAO,EAAE,YAAY,CACxB,QAAO;AAGT,UAAM,KAAK,SAAS,aAAa;AAEjC,WAAO;;AAGT,QAAK,SAAS,OAAO,YAAY;AAC/B,UAAM,MAAM;AACZ,UAAM,KAAK,SAAS,aAAa;;AAGnC,SAAM,KAAK,SAAS,MAAM;;EAE5B,MAAM,UAAU,MAAM,IAAI;GACxB,MAAM,SAAS,MAAM,KAAK,SAAS,cAAc,MAAM,GAAG;AAC1D,OAAI,CAAC,OAAO,EAAE,YAAY,CACxB,QAAO;AAGT,UAAO;IACL;IACA,MAAM,OAAO,EAAE,UAAU;IACzB,KAAK,OAAO,EAAE,YAAY;KACxB,QAAQ;KACR,gBAAgB;KAChB,OAAO;KACR,CAAC;IACH;;EAEJ;;AAGH,kBAAe"}
1
+ {"version":3,"file":"index.mjs","names":["options"],"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 { throttle } from \"@stryke/helpers/throttle\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport defu from \"defu\";\nimport MagicString from \"magic-string\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport {\n createUnimport,\n ImportInjectionResult,\n InjectImportsOptions\n} from \"unimport\";\nimport {\n UnimportContext,\n UnimportPluginContext,\n UnimportPluginOptions,\n UnimportPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate Unimport for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends UnimportPluginContext = UnimportPluginContext\n>(\n options: UnimportPluginOptions\n): Plugin<TContext> => {\n return {\n name: \"unimport\",\n config() {\n return {\n unimport: defu(options, {\n commentsDisable: [\n \"@unimport-disable\",\n \"@unimport-ignore\",\n \"@imports-disable\",\n \"@imports-ignore\",\n \"@powerlines-disable\",\n \"@powerlines-ignore\"\n ],\n commentsDebug: [\n \"@unimport-debug\",\n \"@imports-debug\",\n \"@powerlines-debug\"\n ],\n injectAtEnd: true\n })\n } as Partial<UnimportPluginUserConfig>;\n },\n async configResolved() {\n const { injectImports, init, ...rest } = createUnimport(\n this.config.unimport\n );\n this.unimport = { ...rest } as UnimportContext;\n\n this.unimport.dumpImports = throttle(async () => {\n this.trace(\"Dumping import file...\");\n\n const items = await this.unimport.getImports();\n\n this.trace(\n `Writing imports-dump JSON file: ${joinPaths(this.dataPath, \"imports-dump.json\")}`\n );\n\n const content = StormJSON.stringify(items);\n if (content.trim() !== this.unimport.lastImportsDump?.trim()) {\n this.unimport.lastImportsDump = content;\n await this.fs.write(\n joinPaths(this.dataPath, \"imports-dump.json\"),\n content\n );\n }\n }, 1000);\n\n this.unimport.injectImports = async (\n code: string | MagicString,\n id?: string,\n options?: InjectImportsOptions\n ): Promise<ImportInjectionResult> => {\n const result = await injectImports(code, id, options);\n\n if (!result.s.hasChanged()) {\n return result;\n }\n\n await this.unimport.dumpImports();\n\n return result;\n };\n\n this.unimport.init = async () => {\n await init();\n await this.unimport.dumpImports();\n };\n\n await this.unimport.init();\n },\n async transform(code, id) {\n const result = await this.unimport.injectImports(code, id);\n if (!result.s.hasChanged()) {\n return null;\n }\n\n return {\n id,\n code: result.s.toString(),\n map: result.s.generateMap({\n source: id,\n includeContent: true,\n hires: true\n })\n };\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;AA4CA,MAAa,UAGX,YACqB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,UAAU,KAAK,SAAS;IACtB,iBAAiB;KACf;KACA;KACA;KACA;KACA;KACA;KACD;IACD,eAAe;KACb;KACA;KACA;KACD;IACD,aAAa;IACd,CAAC,EACH;;EAEH,MAAM,iBAAiB;GACrB,MAAM,EAAE,eAAe,MAAM,GAAG,SAAS,eACvC,KAAK,OAAO,SACb;AACD,QAAK,WAAW,EAAE,GAAG,MAAM;AAE3B,QAAK,SAAS,cAAc,SAAS,YAAY;AAC/C,SAAK,MAAM,yBAAyB;IAEpC,MAAM,QAAQ,MAAM,KAAK,SAAS,YAAY;AAE9C,SAAK,MACH,mCAAmC,UAAU,KAAK,UAAU,oBAAoB,GACjF;IAED,MAAM,UAAU,UAAU,UAAU,MAAM;AAC1C,QAAI,QAAQ,MAAM,KAAK,KAAK,SAAS,iBAAiB,MAAM,EAAE;AAC5D,UAAK,SAAS,kBAAkB;AAChC,WAAM,KAAK,GAAG,MACZ,UAAU,KAAK,UAAU,oBAAoB,EAC7C,QACD;;MAEF,IAAK;AAER,QAAK,SAAS,gBAAgB,OAC5B,MACA,IACA,cACmC;IACnC,MAAM,SAAS,MAAM,cAAc,MAAM,IAAIA,UAAQ;AAErD,QAAI,CAAC,OAAO,EAAE,YAAY,CACxB,QAAO;AAGT,UAAM,KAAK,SAAS,aAAa;AAEjC,WAAO;;AAGT,QAAK,SAAS,OAAO,YAAY;AAC/B,UAAM,MAAM;AACZ,UAAM,KAAK,SAAS,aAAa;;AAGnC,SAAM,KAAK,SAAS,MAAM;;EAE5B,MAAM,UAAU,MAAM,IAAI;GACxB,MAAM,SAAS,MAAM,KAAK,SAAS,cAAc,MAAM,GAAG;AAC1D,OAAI,CAAC,OAAO,EAAE,YAAY,CACxB,QAAO;AAGT,UAAO;IACL;IACA,MAAM,OAAO,EAAE,UAAU;IACzB,KAAK,OAAO,EAAE,YAAY;KACxB,QAAQ;KACR,gBAAgB;KAChB,OAAO;KACR,CAAC;IACH;;EAEJ;;AAGH,kBAAe"}
@@ -1,2 +0,0 @@
1
- require('../plugin-DHXHjv16.cjs');
2
- require('../types-DHkg7xmX.cjs');
@@ -1,3 +1,2 @@
1
- import { a as UnimportPluginUserConfig, c as __ΩUnimportPluginOptions, i as UnimportPluginResolvedConfig, l as __ΩUnimportPluginResolvedConfig, n as UnimportPluginContext, o as __ΩUnimportContext, r as UnimportPluginOptions, s as __ΩUnimportPluginContext, t as UnimportContext, u as __ΩUnimportPluginUserConfig } from "../plugin-DVJW0hOO.cjs";
2
- import "../index-CEgs-Dz2.cjs";
1
+ import { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig } from "./plugin.cjs";
3
2
  export { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig };
@@ -1,3 +1,2 @@
1
- import { a as UnimportPluginUserConfig, c as __ΩUnimportPluginOptions, i as UnimportPluginResolvedConfig, l as __ΩUnimportPluginResolvedConfig, n as UnimportPluginContext, o as __ΩUnimportContext, r as UnimportPluginOptions, s as __ΩUnimportPluginContext, t as UnimportContext, u as __ΩUnimportPluginUserConfig } from "../plugin-DCPN38Qw.mjs";
2
- import "../index-BgAdqTbb.mjs";
1
+ import { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig } from "./plugin.mjs";
3
2
  export { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig };
@@ -1,4 +1 @@
1
- import "../plugin-C3MaN5jp.mjs";
2
- import "../types-CTUnla4x.mjs";
3
-
4
1
  export { };
@@ -1 +0,0 @@
1
- require('../plugin-DHXHjv16.cjs');
@@ -1,2 +1,41 @@
1
- import { a as UnimportPluginUserConfig, c as __ΩUnimportPluginOptions, i as UnimportPluginResolvedConfig, l as __ΩUnimportPluginResolvedConfig, n as UnimportPluginContext, o as __ΩUnimportContext, r as UnimportPluginOptions, s as __ΩUnimportPluginContext, t as UnimportContext, u as __ΩUnimportPluginUserConfig } from "../plugin-DVJW0hOO.cjs";
2
- export { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig };
1
+ import { UserConfig } from "powerlines/types/config";
2
+ import { PluginContext } from "powerlines/types/context";
3
+ import { ResolvedConfig } from "powerlines/types/resolved";
4
+ import { Unimport, UnimportOptions } from "unimport";
5
+
6
+ //#region src/types/plugin.d.ts
7
+ type UnimportContext = Unimport & {
8
+ lastImportsDump?: string;
9
+ dumpImports: () => Promise<void>;
10
+ };
11
+ type UnimportPluginOptions = Partial<Omit<UnimportOptions, "presets">> & Required<Pick<UnimportOptions, "presets">> & {
12
+ /**
13
+ * Custom magic comments to be opt-out for auto import, per file/module
14
+ *
15
+ * @defaultValue ["@unimport-disable", "@unimport-ignore", "@imports-disable", "@imports-ignore", "@powerlines-disable", "@powerlines-ignore"]
16
+ */
17
+ commentsDisable?: string[];
18
+ /**
19
+ * Custom magic comments to debug auto import, printed to console
20
+ *
21
+ * @defaultValue ["@unimport-debug", "@imports-debug", "@powerlines-debug"]
22
+ */
23
+ commentsDebug?: string[];
24
+ };
25
+ type UnimportPluginUserConfig = UserConfig & {
26
+ unimport?: UnimportPluginOptions;
27
+ };
28
+ type UnimportPluginResolvedConfig = ResolvedConfig & {
29
+ unimport: UnimportPluginOptions;
30
+ };
31
+ type UnimportPluginContext<TResolvedConfig extends UnimportPluginResolvedConfig = UnimportPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
32
+ unimport: UnimportContext;
33
+ };
34
+ declare type __ΩUnimportContext = any[];
35
+ declare type __ΩUnimportPluginOptions = any[];
36
+ declare type __ΩUnimportPluginUserConfig = any[];
37
+ declare type __ΩUnimportPluginResolvedConfig = any[];
38
+ declare type __ΩUnimportPluginContext = any[];
39
+ //#endregion
40
+ export { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig };
41
+ //# sourceMappingURL=plugin.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,eAAA,GAAkB;;EAAlB,WAAA,EAAA,GAAA,GAES,OAFM,CAAA,IAAG,CAAA;AAK9B,CAAA;AAAiD,KAArC,qBAAA,GAAwB,OAAa,CAAL,IAAK,CAAA,eAAA,EAAA,SAAA,CAAA,CAAA,GAC/C,QAD+C,CACtC,IADsC,CACjC,eADiC,EAAA,SAAA,CAAA,CAAA,GAAA;EAAL;;;;;EAClC,eAAA,CAAA,EAAA,MAAA,EAAA;EAgBE;AAIZ;AAIA;;;EAGkB,aAAA,CAAA,EAAA,MAAA,EAAA;CAAd;AACQ,KAZA,wBAAA,GAA2B,UAY3B,GAAA;EAAe,QAAA,CAAA,EAXd,qBAWc;;KARf,4BAAA,GAA+B;YAC/B;;KAGA,8CACc,+BACtB,gCACA,cAAc;YACN"}
@@ -1,2 +1,41 @@
1
- import { a as UnimportPluginUserConfig, c as __ΩUnimportPluginOptions, i as UnimportPluginResolvedConfig, l as __ΩUnimportPluginResolvedConfig, n as UnimportPluginContext, o as __ΩUnimportContext, r as UnimportPluginOptions, s as __ΩUnimportPluginContext, t as UnimportContext, u as __ΩUnimportPluginUserConfig } from "../plugin-DCPN38Qw.mjs";
2
- export { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig };
1
+ import { Unimport, UnimportOptions } from "unimport";
2
+ import { UserConfig } from "powerlines/types/config";
3
+ import { PluginContext } from "powerlines/types/context";
4
+ import { ResolvedConfig } from "powerlines/types/resolved";
5
+
6
+ //#region src/types/plugin.d.ts
7
+ type UnimportContext = Unimport & {
8
+ lastImportsDump?: string;
9
+ dumpImports: () => Promise<void>;
10
+ };
11
+ type UnimportPluginOptions = Partial<Omit<UnimportOptions, "presets">> & Required<Pick<UnimportOptions, "presets">> & {
12
+ /**
13
+ * Custom magic comments to be opt-out for auto import, per file/module
14
+ *
15
+ * @defaultValue ["@unimport-disable", "@unimport-ignore", "@imports-disable", "@imports-ignore", "@powerlines-disable", "@powerlines-ignore"]
16
+ */
17
+ commentsDisable?: string[];
18
+ /**
19
+ * Custom magic comments to debug auto import, printed to console
20
+ *
21
+ * @defaultValue ["@unimport-debug", "@imports-debug", "@powerlines-debug"]
22
+ */
23
+ commentsDebug?: string[];
24
+ };
25
+ type UnimportPluginUserConfig = UserConfig & {
26
+ unimport?: UnimportPluginOptions;
27
+ };
28
+ type UnimportPluginResolvedConfig = ResolvedConfig & {
29
+ unimport: UnimportPluginOptions;
30
+ };
31
+ type UnimportPluginContext<TResolvedConfig extends UnimportPluginResolvedConfig = UnimportPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
32
+ unimport: UnimportContext;
33
+ };
34
+ declare type __ΩUnimportContext = any[];
35
+ declare type __ΩUnimportPluginOptions = any[];
36
+ declare type __ΩUnimportPluginUserConfig = any[];
37
+ declare type __ΩUnimportPluginResolvedConfig = any[];
38
+ declare type __ΩUnimportPluginContext = any[];
39
+ //#endregion
40
+ export { UnimportContext, UnimportPluginContext, UnimportPluginOptions, UnimportPluginResolvedConfig, UnimportPluginUserConfig, __ΩUnimportContext, __ΩUnimportPluginContext, __ΩUnimportPluginOptions, __ΩUnimportPluginResolvedConfig, __ΩUnimportPluginUserConfig };
41
+ //# sourceMappingURL=plugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,eAAA,GAAkB;;EAAlB,WAAA,EAAA,GAAA,GAES,OAFM,CAAA,IAAG,CAAA;AAK9B,CAAA;AAAiD,KAArC,qBAAA,GAAwB,OAAa,CAAL,IAAK,CAAA,eAAA,EAAA,SAAA,CAAA,CAAA,GAC/C,QAD+C,CACtC,IADsC,CACjC,eADiC,EAAA,SAAA,CAAA,CAAA,GAAA;EAAL;;;;;EAClC,eAAA,CAAA,EAAA,MAAA,EAAA;EAgBE;AAIZ;AAIA;;;EAGkB,aAAA,CAAA,EAAA,MAAA,EAAA;CAAd;AACQ,KAZA,wBAAA,GAA2B,UAY3B,GAAA;EAAe,QAAA,CAAA,EAXd,qBAWc;;KARf,4BAAA,GAA+B;YAC/B;;KAGA,8CACc,+BACtB,gCACA,cAAc;YACN"}
@@ -1,3 +1 @@
1
- import "../plugin-C3MaN5jp.mjs";
2
-
3
1
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-unimport",
3
- "version": "0.1.253",
3
+ "version": "0.1.255",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to add imports to source code automatically via unimport.",
6
6
  "repository": {
@@ -89,19 +89,19 @@
89
89
  "files": ["dist/**/*"],
90
90
  "keywords": ["unimport", "powerlines", "storm-software", "powerlines-plugin"],
91
91
  "dependencies": {
92
- "@stryke/helpers": "^0.9.39",
93
- "@stryke/json": "^0.9.40",
94
- "@stryke/path": "^0.26.3",
92
+ "@stryke/helpers": "^0.9.40",
93
+ "@stryke/json": "^0.9.41",
94
+ "@stryke/path": "^0.26.4",
95
95
  "defu": "^6.1.4",
96
96
  "magic-string": "^0.30.21",
97
- "powerlines": "^0.38.19",
97
+ "powerlines": "^0.38.21",
98
98
  "unimport": "^5.6.0"
99
99
  },
100
100
  "devDependencies": {
101
- "@powerlines/plugin-plugin": "^0.12.203",
101
+ "@powerlines/plugin-plugin": "^0.12.205",
102
102
  "@types/node": "^24.10.9"
103
103
  },
104
104
  "publishConfig": { "access": "public" },
105
105
  "types": "./dist/index.d.cts",
106
- "gitHead": "ed4d8044dcb6e1de7843b3908424bb0a7e636620"
106
+ "gitHead": "6000a15bf3fbc1b7eaaf967088c68eef9949786a"
107
107
  }
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,41 +0,0 @@
1
- import { Unimport, UnimportOptions } from "unimport";
2
- import { UserConfig } from "powerlines/types/config";
3
- import { PluginContext } from "powerlines/types/context";
4
- import { ResolvedConfig } from "powerlines/types/resolved";
5
-
6
- //#region src/types/plugin.d.ts
7
- type UnimportContext = Unimport & {
8
- lastImportsDump?: string;
9
- dumpImports: () => Promise<void>;
10
- };
11
- type UnimportPluginOptions = Partial<Omit<UnimportOptions, "presets">> & Required<Pick<UnimportOptions, "presets">> & {
12
- /**
13
- * Custom magic comments to be opt-out for auto import, per file/module
14
- *
15
- * @defaultValue ["@unimport-disable", "@unimport-ignore", "@imports-disable", "@imports-ignore", "@powerlines-disable", "@powerlines-ignore"]
16
- */
17
- commentsDisable?: string[];
18
- /**
19
- * Custom magic comments to debug auto import, printed to console
20
- *
21
- * @defaultValue ["@unimport-debug", "@imports-debug", "@powerlines-debug"]
22
- */
23
- commentsDebug?: string[];
24
- };
25
- type UnimportPluginUserConfig = UserConfig & {
26
- unimport?: UnimportPluginOptions;
27
- };
28
- type UnimportPluginResolvedConfig = ResolvedConfig & {
29
- unimport: UnimportPluginOptions;
30
- };
31
- type UnimportPluginContext<TResolvedConfig extends UnimportPluginResolvedConfig = UnimportPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
32
- unimport: UnimportContext;
33
- };
34
- declare type __ΩUnimportContext = any[];
35
- declare type __ΩUnimportPluginOptions = any[];
36
- declare type __ΩUnimportPluginUserConfig = any[];
37
- declare type __ΩUnimportPluginResolvedConfig = any[];
38
- declare type __ΩUnimportPluginContext = any[];
39
- //#endregion
40
- export { UnimportPluginUserConfig as a, __ΩUnimportPluginOptions as c, UnimportPluginResolvedConfig as i, __ΩUnimportPluginResolvedConfig as l, UnimportPluginContext as n, __ΩUnimportContext as o, UnimportPluginOptions as r, __ΩUnimportPluginContext as s, UnimportContext as t, __ΩUnimportPluginUserConfig as u };
41
- //# sourceMappingURL=plugin-DCPN38Qw.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-DCPN38Qw.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,eAAA,GAAkB;;EAAlB,WAAA,EAAA,GAAA,GAES,OAFM,CAAA,IAAG,CAAA;AAK9B,CAAA;AAAiD,KAArC,qBAAA,GAAwB,OAAa,CAAL,IAAK,CAAA,eAAA,EAAA,SAAA,CAAA,CAAA,GAC/C,QAD+C,CACtC,IADsC,CACjC,eADiC,EAAA,SAAA,CAAA,CAAA,GAAA;EAAL;;;;;EAClC,eAAA,CAAA,EAAA,MAAA,EAAA;EAgBE;AAIZ;AAIA;;;EAGkB,aAAA,CAAA,EAAA,MAAA,EAAA;CAAd;AACQ,KAZA,wBAAA,GAA2B,UAY3B,GAAA;EAAe,QAAA,CAAA,EAXd,qBAWc;;KARf,4BAAA,GAA+B;YAC/B;;KAGA,8CACc,+BACtB,gCACA,cAAc;YACN"}
File without changes
@@ -1,41 +0,0 @@
1
- import { UserConfig } from "powerlines/types/config";
2
- import { PluginContext } from "powerlines/types/context";
3
- import { ResolvedConfig } from "powerlines/types/resolved";
4
- import { Unimport, UnimportOptions } from "unimport";
5
-
6
- //#region src/types/plugin.d.ts
7
- type UnimportContext = Unimport & {
8
- lastImportsDump?: string;
9
- dumpImports: () => Promise<void>;
10
- };
11
- type UnimportPluginOptions = Partial<Omit<UnimportOptions, "presets">> & Required<Pick<UnimportOptions, "presets">> & {
12
- /**
13
- * Custom magic comments to be opt-out for auto import, per file/module
14
- *
15
- * @defaultValue ["@unimport-disable", "@unimport-ignore", "@imports-disable", "@imports-ignore", "@powerlines-disable", "@powerlines-ignore"]
16
- */
17
- commentsDisable?: string[];
18
- /**
19
- * Custom magic comments to debug auto import, printed to console
20
- *
21
- * @defaultValue ["@unimport-debug", "@imports-debug", "@powerlines-debug"]
22
- */
23
- commentsDebug?: string[];
24
- };
25
- type UnimportPluginUserConfig = UserConfig & {
26
- unimport?: UnimportPluginOptions;
27
- };
28
- type UnimportPluginResolvedConfig = ResolvedConfig & {
29
- unimport: UnimportPluginOptions;
30
- };
31
- type UnimportPluginContext<TResolvedConfig extends UnimportPluginResolvedConfig = UnimportPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
32
- unimport: UnimportContext;
33
- };
34
- declare type __ΩUnimportContext = any[];
35
- declare type __ΩUnimportPluginOptions = any[];
36
- declare type __ΩUnimportPluginUserConfig = any[];
37
- declare type __ΩUnimportPluginResolvedConfig = any[];
38
- declare type __ΩUnimportPluginContext = any[];
39
- //#endregion
40
- export { UnimportPluginUserConfig as a, __ΩUnimportPluginOptions as c, UnimportPluginResolvedConfig as i, __ΩUnimportPluginResolvedConfig as l, UnimportPluginContext as n, __ΩUnimportContext as o, UnimportPluginOptions as r, __ΩUnimportPluginContext as s, UnimportContext as t, __ΩUnimportPluginUserConfig as u };
41
- //# sourceMappingURL=plugin-DVJW0hOO.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-DVJW0hOO.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,eAAA,GAAkB;;EAAlB,WAAA,EAAA,GAAA,GAES,OAFM,CAAA,IAAG,CAAA;AAK9B,CAAA;AAAiD,KAArC,qBAAA,GAAwB,OAAa,CAAL,IAAK,CAAA,eAAA,EAAA,SAAA,CAAA,CAAA,GAC/C,QAD+C,CACtC,IADsC,CACjC,eADiC,EAAA,SAAA,CAAA,CAAA,GAAA;EAAL;;;;;EAClC,eAAA,CAAA,EAAA,MAAA,EAAA;EAgBE;AAIZ;AAIA;;;EAGkB,aAAA,CAAA,EAAA,MAAA,EAAA;CAAd;AACQ,KAZA,wBAAA,GAA2B,UAY3B,GAAA;EAAe,QAAA,CAAA,EAXd,qBAWc;;KARf,4BAAA,GAA+B;YAC/B;;KAGA,8CACc,+BACtB,gCACA,cAAc;YACN"}
@@ -1 +0,0 @@
1
- export { };
File without changes