@powerlines/plugin-satori 0.1.251 → 0.1.253

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.
Files changed (39) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/index.cjs +3 -32
  3. package/dist/index.d.cts +3 -3
  4. package/dist/index.d.mts +3 -3
  5. package/dist/index.mjs +0 -3
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/types/index.cjs +0 -3
  8. package/dist/types/index.d.cts +2 -3
  9. package/dist/types/index.d.mts +2 -3
  10. package/dist/types/index.mjs +0 -4
  11. package/dist/types/module.cjs +0 -1
  12. package/dist/types/module.d.cts +12 -2
  13. package/dist/types/module.d.cts.map +1 -0
  14. package/dist/types/module.d.mts +12 -2
  15. package/dist/types/module.d.mts.map +1 -0
  16. package/dist/types/module.mjs +0 -2
  17. package/dist/types/plugin.cjs +0 -1
  18. package/dist/types/plugin.d.cts +48 -2
  19. package/dist/types/plugin.d.cts.map +1 -0
  20. package/dist/types/plugin.d.mts +48 -2
  21. package/dist/types/plugin.d.mts.map +1 -0
  22. package/dist/types/plugin.mjs +0 -2
  23. package/package.json +11 -11
  24. package/dist/index-CA4VvAY_.d.mts +0 -1
  25. package/dist/index-CmCelmEL.d.cts +0 -1
  26. package/dist/module-BjH2GuD9.mjs +0 -1
  27. package/dist/module-DTH7_i6X.cjs +0 -0
  28. package/dist/module-DWfSYSuA.d.mts +0 -12
  29. package/dist/module-DWfSYSuA.d.mts.map +0 -1
  30. package/dist/module-dJs7y8S5.d.cts +0 -12
  31. package/dist/module-dJs7y8S5.d.cts.map +0 -1
  32. package/dist/plugin-B-8QVe28.cjs +0 -0
  33. package/dist/plugin-B7p8VtjC.mjs +0 -1
  34. package/dist/plugin-Dma3oikO.d.mts +0 -48
  35. package/dist/plugin-Dma3oikO.d.mts.map +0 -1
  36. package/dist/plugin-bJ5d7XkT.d.cts +0 -48
  37. package/dist/plugin-bJ5d7XkT.d.cts.map +0 -1
  38. package/dist/types-BReKsBV6.mjs +0 -1
  39. package/dist/types-CBTc19th.cjs +0 -0
@@ -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,34 +1,5 @@
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('./module-DTH7_i6X.cjs');
30
- require('./plugin-B-8QVe28.cjs');
31
- require('./types-CBTc19th.cjs');
2
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
32
3
  let __stryke_convert_to_array = require("@stryke/convert/to-array");
33
4
  let __stryke_fs_exists = require("@stryke/fs/exists");
34
5
  let __stryke_fs_list_files = require("@stryke/fs/list-files");
@@ -36,10 +7,10 @@ let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
36
7
  let __stryke_path_join_paths = require("@stryke/path/join-paths");
37
8
  let __stryke_path_replace = require("@stryke/path/replace");
38
9
  let defu = require("defu");
39
- defu = __toESM(defu);
10
+ defu = require_rolldown_runtime.__toESM(defu);
40
11
  let powerlines_plugin_utils_paths = require("powerlines/plugin-utils/paths");
41
12
  let satori = require("satori");
42
- satori = __toESM(satori);
13
+ satori = require_rolldown_runtime.__toESM(satori);
43
14
 
44
15
  //#region src/index.ts
45
16
  /**
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as __ΩSatoriPluginContext, c as __ΩSatoriPluginUserConfig, i as SatoriPluginUserConfig, n as SatoriPluginOptions, o as __ΩSatoriPluginOptions, r as SatoriPluginResolvedConfig, s as __ΩSatoriPluginResolvedConfig, t as SatoriPluginContext } from "./plugin-bJ5d7XkT.cjs";
2
- import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "./module-dJs7y8S5.cjs";
3
- import "./index-CmCelmEL.cjs";
1
+ import { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig } from "./types/plugin.cjs";
2
+ import { SatoriComponentModule, __ΩSatoriComponentModule } from "./types/module.cjs";
3
+ import "./types/index.cjs";
4
4
  import { Plugin } from "powerlines/types/plugin";
5
5
 
6
6
  //#region src/index.d.ts
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as __ΩSatoriPluginContext, c as __ΩSatoriPluginUserConfig, i as SatoriPluginUserConfig, n as SatoriPluginOptions, o as __ΩSatoriPluginOptions, r as SatoriPluginResolvedConfig, s as __ΩSatoriPluginResolvedConfig, t as SatoriPluginContext } from "./plugin-Dma3oikO.mjs";
2
- import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "./module-DWfSYSuA.mjs";
3
- import "./index-CA4VvAY_.mjs";
1
+ import { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig } from "./types/plugin.mjs";
2
+ import { SatoriComponentModule, __ΩSatoriComponentModule } from "./types/module.mjs";
3
+ import "./types/index.mjs";
4
4
  import { Plugin } from "powerlines/types/plugin";
5
5
 
6
6
  //#region src/index.d.ts
package/dist/index.mjs CHANGED
@@ -1,6 +1,3 @@
1
- import "./module-BjH2GuD9.mjs";
2
- import "./plugin-B7p8VtjC.mjs";
3
- import "./types-BReKsBV6.mjs";
4
1
  import { toArray } from "@stryke/convert/to-array";
5
2
  import { existsSync } from "@stryke/fs/exists";
6
3
  import { listFiles } from "@stryke/fs/list-files";
@@ -1 +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 { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { findFileExtensionSafe } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport defu from \"defu\";\nimport { replacePathTokens } from \"powerlines/plugin-utils/paths\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport satori from \"satori\";\nimport { SatoriComponentModule } from \"./types/module\";\nimport {\n SatoriPluginContext,\n SatoriPluginOptions,\n SatoriPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to use Untyped for code generation based on user-defined schemas.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends SatoriPluginContext = SatoriPluginContext\n>(\n options: SatoriPluginOptions\n): Plugin<TContext> => {\n return {\n name: \"satori\",\n config() {\n return {\n satori: {\n defaultOptions: {},\n width: 1200,\n height: 630,\n fonts: [],\n ...options\n }\n } as Partial<SatoriPluginUserConfig>;\n },\n async configResolved() {\n if (!this.config.satori.path) {\n throw new Error(\n \"The Powerlines Satori plugin requires a \\`path\\` option to be specified.\"\n );\n }\n\n this.config.satori.inputs = (\n await Promise.all(\n toArray(this.config.satori.path).map(async path => {\n if (path.includes(\"*\")) {\n return listFiles(replacePathTokens(this, path));\n }\n\n return replacePathTokens(this, path);\n })\n )\n )\n .flat()\n .filter(\n path =>\n path &&\n [\"jsx\", \"tsx\"].includes(findFileExtensionSafe(path)) &&\n existsSync(path)\n );\n },\n async prepare() {\n await Promise.all(\n this.config.satori.inputs.map(async input => {\n try {\n const mod =\n await this.resolver.import<SatoriComponentModule>(input);\n if (mod && mod.default) {\n const result = await satori(\n mod.default,\n defu(mod.options ?? {}, this.config.satori.defaultOptions)\n );\n if (result) {\n await this.fs.write(\n this.config.satori.outputPath\n ? joinPaths(\n this.config.satori.outputPath,\n replacePath(\n input,\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.projectRoot\n )\n )\n )\n : input.replace(findFileExtensionSafe(input), \"svg\"),\n result\n );\n }\n }\n } catch (error) {\n this.debug(\n `Failed to load Satori schema from ${input}: ${(error as Error).message}`\n );\n }\n })\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,UAGX,YACqB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,QAAQ;IACN,gBAAgB,EAAE;IAClB,OAAO;IACP,QAAQ;IACR,OAAO,EAAE;IACT,GAAG;IACJ,EACF;;EAEH,MAAM,iBAAiB;AACrB,OAAI,CAAC,KAAK,OAAO,OAAO,KACtB,OAAM,IAAI,MACR,yEACD;AAGH,QAAK,OAAO,OAAO,UACjB,MAAM,QAAQ,IACZ,QAAQ,KAAK,OAAO,OAAO,KAAK,CAAC,IAAI,OAAM,SAAQ;AACjD,QAAI,KAAK,SAAS,IAAI,CACpB,QAAO,UAAU,kBAAkB,MAAM,KAAK,CAAC;AAGjD,WAAO,kBAAkB,MAAM,KAAK;KACpC,CACH,EAEA,MAAM,CACN,QACC,SACE,QACA,CAAC,OAAO,MAAM,CAAC,SAAS,sBAAsB,KAAK,CAAC,IACpD,WAAW,KAAK,CACnB;;EAEL,MAAM,UAAU;AACd,SAAM,QAAQ,IACZ,KAAK,OAAO,OAAO,OAAO,IAAI,OAAM,UAAS;AAC3C,QAAI;KACF,MAAM,MACJ,MAAM,KAAK,SAAS,OAA8B,MAAM;AAC1D,SAAI,OAAO,IAAI,SAAS;MACtB,MAAM,SAAS,MAAM,OACnB,IAAI,SACJ,KAAK,IAAI,WAAW,EAAE,EAAE,KAAK,OAAO,OAAO,eAAe,CAC3D;AACD,UAAI,OACF,OAAM,KAAK,GAAG,MACZ,KAAK,OAAO,OAAO,aACf,UACE,KAAK,OAAO,OAAO,YACnB,YACE,OACA,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,YACb,CACF,CACF,GACD,MAAM,QAAQ,sBAAsB,MAAM,EAAE,MAAM,EACtD,OACD;;aAGE,OAAO;AACd,UAAK,MACH,qCAAqC,MAAM,IAAK,MAAgB,UACjE;;KAEH,CACH;;EAEJ;;AAGH,kBAAe"}
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 { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { findFileExtensionSafe } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport defu from \"defu\";\nimport { replacePathTokens } from \"powerlines/plugin-utils/paths\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport satori from \"satori\";\nimport { SatoriComponentModule } from \"./types/module\";\nimport {\n SatoriPluginContext,\n SatoriPluginOptions,\n SatoriPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to use Untyped for code generation based on user-defined schemas.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends SatoriPluginContext = SatoriPluginContext\n>(\n options: SatoriPluginOptions\n): Plugin<TContext> => {\n return {\n name: \"satori\",\n config() {\n return {\n satori: {\n defaultOptions: {},\n width: 1200,\n height: 630,\n fonts: [],\n ...options\n }\n } as Partial<SatoriPluginUserConfig>;\n },\n async configResolved() {\n if (!this.config.satori.path) {\n throw new Error(\n \"The Powerlines Satori plugin requires a \\`path\\` option to be specified.\"\n );\n }\n\n this.config.satori.inputs = (\n await Promise.all(\n toArray(this.config.satori.path).map(async path => {\n if (path.includes(\"*\")) {\n return listFiles(replacePathTokens(this, path));\n }\n\n return replacePathTokens(this, path);\n })\n )\n )\n .flat()\n .filter(\n path =>\n path &&\n [\"jsx\", \"tsx\"].includes(findFileExtensionSafe(path)) &&\n existsSync(path)\n );\n },\n async prepare() {\n await Promise.all(\n this.config.satori.inputs.map(async input => {\n try {\n const mod =\n await this.resolver.import<SatoriComponentModule>(input);\n if (mod && mod.default) {\n const result = await satori(\n mod.default,\n defu(mod.options ?? {}, this.config.satori.defaultOptions)\n );\n if (result) {\n await this.fs.write(\n this.config.satori.outputPath\n ? joinPaths(\n this.config.satori.outputPath,\n replacePath(\n input,\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.projectRoot\n )\n )\n )\n : input.replace(findFileExtensionSafe(input), \"svg\"),\n result\n );\n }\n }\n } catch (error) {\n this.debug(\n `Failed to load Satori schema from ${input}: ${(error as Error).message}`\n );\n }\n })\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;AA2CA,MAAa,UAGX,YACqB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,QAAQ;IACN,gBAAgB,EAAE;IAClB,OAAO;IACP,QAAQ;IACR,OAAO,EAAE;IACT,GAAG;IACJ,EACF;;EAEH,MAAM,iBAAiB;AACrB,OAAI,CAAC,KAAK,OAAO,OAAO,KACtB,OAAM,IAAI,MACR,yEACD;AAGH,QAAK,OAAO,OAAO,UACjB,MAAM,QAAQ,IACZ,QAAQ,KAAK,OAAO,OAAO,KAAK,CAAC,IAAI,OAAM,SAAQ;AACjD,QAAI,KAAK,SAAS,IAAI,CACpB,QAAO,UAAU,kBAAkB,MAAM,KAAK,CAAC;AAGjD,WAAO,kBAAkB,MAAM,KAAK;KACpC,CACH,EAEA,MAAM,CACN,QACC,SACE,QACA,CAAC,OAAO,MAAM,CAAC,SAAS,sBAAsB,KAAK,CAAC,IACpD,WAAW,KAAK,CACnB;;EAEL,MAAM,UAAU;AACd,SAAM,QAAQ,IACZ,KAAK,OAAO,OAAO,OAAO,IAAI,OAAM,UAAS;AAC3C,QAAI;KACF,MAAM,MACJ,MAAM,KAAK,SAAS,OAA8B,MAAM;AAC1D,SAAI,OAAO,IAAI,SAAS;MACtB,MAAM,SAAS,MAAM,OACnB,IAAI,SACJ,KAAK,IAAI,WAAW,EAAE,EAAE,KAAK,OAAO,OAAO,eAAe,CAC3D;AACD,UAAI,OACF,OAAM,KAAK,GAAG,MACZ,KAAK,OAAO,OAAO,aACf,UACE,KAAK,OAAO,OAAO,YACnB,YACE,OACA,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,YACb,CACF,CACF,GACD,MAAM,QAAQ,sBAAsB,MAAM,EAAE,MAAM,EACtD,OACD;;aAGE,OAAO;AACd,UAAK,MACH,qCAAqC,MAAM,IAAK,MAAgB,UACjE;;KAEH,CACH;;EAEJ;;AAGH,kBAAe"}
@@ -1,3 +0,0 @@
1
- require('../module-DTH7_i6X.cjs');
2
- require('../plugin-B-8QVe28.cjs');
3
- require('../types-CBTc19th.cjs');
@@ -1,4 +1,3 @@
1
- import { a as __ΩSatoriPluginContext, c as __ΩSatoriPluginUserConfig, i as SatoriPluginUserConfig, n as SatoriPluginOptions, o as __ΩSatoriPluginOptions, r as SatoriPluginResolvedConfig, s as __ΩSatoriPluginResolvedConfig, t as SatoriPluginContext } from "../plugin-bJ5d7XkT.cjs";
2
- import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "../module-dJs7y8S5.cjs";
3
- import "../index-CmCelmEL.cjs";
1
+ import { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig } from "./plugin.cjs";
2
+ import { SatoriComponentModule, __ΩSatoriComponentModule } from "./module.cjs";
4
3
  export { SatoriComponentModule, SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriComponentModule, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig };
@@ -1,4 +1,3 @@
1
- import { a as __ΩSatoriPluginContext, c as __ΩSatoriPluginUserConfig, i as SatoriPluginUserConfig, n as SatoriPluginOptions, o as __ΩSatoriPluginOptions, r as SatoriPluginResolvedConfig, s as __ΩSatoriPluginResolvedConfig, t as SatoriPluginContext } from "../plugin-Dma3oikO.mjs";
2
- import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "../module-DWfSYSuA.mjs";
3
- import "../index-CA4VvAY_.mjs";
1
+ import { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig } from "./plugin.mjs";
2
+ import { SatoriComponentModule, __ΩSatoriComponentModule } from "./module.mjs";
4
3
  export { SatoriComponentModule, SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriComponentModule, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig };
@@ -1,5 +1 @@
1
- import "../module-BjH2GuD9.mjs";
2
- import "../plugin-B7p8VtjC.mjs";
3
- import "../types-BReKsBV6.mjs";
4
-
5
1
  export { };
@@ -1 +0,0 @@
1
- require('../module-DTH7_i6X.cjs');
@@ -1,2 +1,12 @@
1
- import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "../module-dJs7y8S5.cjs";
2
- export { SatoriComponentModule, __ΩSatoriComponentModule };
1
+ import { SatoriOptions } from "satori";
2
+ import { ReactNode } from "react";
3
+
4
+ //#region src/types/module.d.ts
5
+ interface SatoriComponentModule {
6
+ default: ReactNode;
7
+ options?: SatoriOptions;
8
+ }
9
+ declare type __ΩSatoriComponentModule = any[];
10
+ //#endregion
11
+ export { SatoriComponentModule, __ΩSatoriComponentModule };
12
+ //# sourceMappingURL=module.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.cts","names":[],"sources":["../../src/types/module.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,qBAAA;WACN;EADM,OAAA,CAAA,EAEL,aAFK"}
@@ -1,2 +1,12 @@
1
- import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "../module-DWfSYSuA.mjs";
2
- export { SatoriComponentModule, __ΩSatoriComponentModule };
1
+ import { SatoriOptions } from "satori";
2
+ import { ReactNode } from "react";
3
+
4
+ //#region src/types/module.d.ts
5
+ interface SatoriComponentModule {
6
+ default: ReactNode;
7
+ options?: SatoriOptions;
8
+ }
9
+ declare type __ΩSatoriComponentModule = any[];
10
+ //#endregion
11
+ export { SatoriComponentModule, __ΩSatoriComponentModule };
12
+ //# sourceMappingURL=module.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.mts","names":[],"sources":["../../src/types/module.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,qBAAA;WACN;EADM,OAAA,CAAA,EAEL,aAFK"}
@@ -1,3 +1 @@
1
- import "../module-BjH2GuD9.mjs";
2
-
3
1
  export { };
@@ -1 +0,0 @@
1
- require('../plugin-B-8QVe28.cjs');
@@ -1,2 +1,48 @@
1
- import { a as __ΩSatoriPluginContext, c as __ΩSatoriPluginUserConfig, i as SatoriPluginUserConfig, n as SatoriPluginOptions, o as __ΩSatoriPluginOptions, r as SatoriPluginResolvedConfig, s as __ΩSatoriPluginResolvedConfig, t as SatoriPluginContext } from "../plugin-bJ5d7XkT.cjs";
2
- export { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig };
1
+ import { UserConfig } from "powerlines/types/config";
2
+ import { PluginContext } from "powerlines/types/context";
3
+ import { ResolvedConfig } from "powerlines/types/resolved";
4
+ import { SatoriOptions } from "satori";
5
+
6
+ //#region src/types/plugin.d.ts
7
+ interface SatoriPluginOptions {
8
+ /**
9
+ * A path or glob pattern (or an array of paths and glob patterns) to files that have a Satori component default export.
10
+ */
11
+ path: string | string[];
12
+ /**
13
+ * The path for the generated Satori output images
14
+ *
15
+ * @remarks
16
+ * By default, it will generate the output files alongside each satori component file.
17
+ */
18
+ outputPath?: string;
19
+ /**
20
+ * Default Satori options to apply to all components.
21
+ *
22
+ * @remarks
23
+ * These options can be overridden by individual component modules that export their own options.
24
+ */
25
+ defaultOptions?: Partial<SatoriOptions>;
26
+ }
27
+ interface SatoriPluginUserConfig extends UserConfig {
28
+ satori?: Omit<SatoriPluginOptions, "defaultOptions"> & Required<Pick<SatoriPluginOptions, "defaultOptions">>;
29
+ }
30
+ interface SatoriPluginResolvedConfig extends ResolvedConfig {
31
+ satori: Omit<SatoriPluginOptions, "defaultOptions"> & Required<Pick<SatoriPluginOptions, "defaultOptions">> & {
32
+ /**
33
+ * An array of resolved input file paths containing Satori components.
34
+ *
35
+ * @remarks
36
+ * These paths are determined based on the {@link SatoriPluginOptions.path} option provided in the plugin configuration. These are **not** glob patterns, but the actual resolved file paths.
37
+ */
38
+ inputs: string[];
39
+ };
40
+ }
41
+ type SatoriPluginContext<TResolvedConfig extends SatoriPluginResolvedConfig = SatoriPluginResolvedConfig> = PluginContext<TResolvedConfig>;
42
+ declare type __ΩSatoriPluginOptions = any[];
43
+ declare type __ΩSatoriPluginUserConfig = any[];
44
+ declare type __ΩSatoriPluginResolvedConfig = any[];
45
+ declare type __ΩSatoriPluginContext = any[];
46
+ //#endregion
47
+ export { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig };
48
+ //# sourceMappingURL=plugin.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UAuBiB,mBAAA;;AAAjB;AAuBA;EACgB,IAAA,EAAA,MAAA,GAAA,MAAA,EAAA;EAAL;;;;;;EAIM,UAAA,CAAA,EAAA,MAAA;EACF;;;;;;EADmD,cAAA,CAAA,EAR/C,OAQ+C,CARvC,aAQuC,CAAA;AAalE;AAC0B,UAnBT,sBAAA,SAA+B,UAmBtB,CAAA;EACtB,MAAA,CAAA,EAnBO,IAmBP,CAnBY,mBAmBZ,EAAA,gBAAA,CAAA,GAlBA,QAkBA,CAlBS,IAkBT,CAlBc,mBAkBd,EAAA,gBAAA,CAAA,CAAA;;AACA,UAhBa,0BAAA,SAAmC,cAgBhD,CAAA;EAAa,MAAA,EAfP,IAeO,CAfF,mBAeE,EAAA,gBAAA,CAAA,GAdb,QAca,CAdJ,IAcI,CAdC,mBAcD,EAAA,gBAAA,CAAA,CAAA,GAAA;;;;;;;;;;KAHL,4CACc,6BACtB,8BACA,cAAc"}
@@ -1,2 +1,48 @@
1
- import { a as __ΩSatoriPluginContext, c as __ΩSatoriPluginUserConfig, i as SatoriPluginUserConfig, n as SatoriPluginOptions, o as __ΩSatoriPluginOptions, r as SatoriPluginResolvedConfig, s as __ΩSatoriPluginResolvedConfig, t as SatoriPluginContext } from "../plugin-Dma3oikO.mjs";
2
- export { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig };
1
+ import { SatoriOptions } from "satori";
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
+ interface SatoriPluginOptions {
8
+ /**
9
+ * A path or glob pattern (or an array of paths and glob patterns) to files that have a Satori component default export.
10
+ */
11
+ path: string | string[];
12
+ /**
13
+ * The path for the generated Satori output images
14
+ *
15
+ * @remarks
16
+ * By default, it will generate the output files alongside each satori component file.
17
+ */
18
+ outputPath?: string;
19
+ /**
20
+ * Default Satori options to apply to all components.
21
+ *
22
+ * @remarks
23
+ * These options can be overridden by individual component modules that export their own options.
24
+ */
25
+ defaultOptions?: Partial<SatoriOptions>;
26
+ }
27
+ interface SatoriPluginUserConfig extends UserConfig {
28
+ satori?: Omit<SatoriPluginOptions, "defaultOptions"> & Required<Pick<SatoriPluginOptions, "defaultOptions">>;
29
+ }
30
+ interface SatoriPluginResolvedConfig extends ResolvedConfig {
31
+ satori: Omit<SatoriPluginOptions, "defaultOptions"> & Required<Pick<SatoriPluginOptions, "defaultOptions">> & {
32
+ /**
33
+ * An array of resolved input file paths containing Satori components.
34
+ *
35
+ * @remarks
36
+ * These paths are determined based on the {@link SatoriPluginOptions.path} option provided in the plugin configuration. These are **not** glob patterns, but the actual resolved file paths.
37
+ */
38
+ inputs: string[];
39
+ };
40
+ }
41
+ type SatoriPluginContext<TResolvedConfig extends SatoriPluginResolvedConfig = SatoriPluginResolvedConfig> = PluginContext<TResolvedConfig>;
42
+ declare type __ΩSatoriPluginOptions = any[];
43
+ declare type __ΩSatoriPluginUserConfig = any[];
44
+ declare type __ΩSatoriPluginResolvedConfig = any[];
45
+ declare type __ΩSatoriPluginContext = any[];
46
+ //#endregion
47
+ export { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig };
48
+ //# sourceMappingURL=plugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UAuBiB,mBAAA;;AAAjB;AAuBA;EACgB,IAAA,EAAA,MAAA,GAAA,MAAA,EAAA;EAAL;;;;;;EAIM,UAAA,CAAA,EAAA,MAAA;EACF;;;;;;EADmD,cAAA,CAAA,EAR/C,OAQ+C,CARvC,aAQuC,CAAA;AAalE;AAC0B,UAnBT,sBAAA,SAA+B,UAmBtB,CAAA;EACtB,MAAA,CAAA,EAnBO,IAmBP,CAnBY,mBAmBZ,EAAA,gBAAA,CAAA,GAlBA,QAkBA,CAlBS,IAkBT,CAlBc,mBAkBd,EAAA,gBAAA,CAAA,CAAA;;AACA,UAhBa,0BAAA,SAAmC,cAgBhD,CAAA;EAAa,MAAA,EAfP,IAeO,CAfF,mBAeE,EAAA,gBAAA,CAAA,GAdb,QAca,CAdJ,IAcI,CAdC,mBAcD,EAAA,gBAAA,CAAA,CAAA,GAAA;;;;;;;;;;KAHL,4CACc,6BACtB,8BACA,cAAc"}
@@ -1,3 +1 @@
1
- import "../plugin-B7p8VtjC.mjs";
2
-
3
1
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-satori",
3
- "version": "0.1.251",
3
+ "version": "0.1.253",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to use Satori to generate SVG files from jsx/tsx components.",
6
6
  "repository": {
@@ -108,20 +108,20 @@
108
108
  "react-dom": { "optional": true }
109
109
  },
110
110
  "dependencies": {
111
- "@stryke/convert": "^0.6.37",
112
- "@stryke/fs": "^0.33.39",
113
- "@stryke/helpers": "^0.9.39",
114
- "@stryke/json": "^0.9.40",
115
- "@stryke/path": "^0.26.3",
116
- "@stryke/type-checks": "^0.5.22",
117
- "@stryke/types": "^0.10.36",
111
+ "@stryke/convert": "^0.6.38",
112
+ "@stryke/fs": "^0.33.40",
113
+ "@stryke/helpers": "^0.9.40",
114
+ "@stryke/json": "^0.9.41",
115
+ "@stryke/path": "^0.26.4",
116
+ "@stryke/type-checks": "^0.5.23",
117
+ "@stryke/types": "^0.10.37",
118
118
  "defu": "^6.1.4",
119
119
  "jiti": "^2.6.1",
120
- "powerlines": "^0.38.19",
120
+ "powerlines": "^0.38.21",
121
121
  "satori": "^0.18.4"
122
122
  },
123
123
  "devDependencies": {
124
- "@powerlines/plugin-plugin": "^0.12.203",
124
+ "@powerlines/plugin-plugin": "^0.12.205",
125
125
  "@storm-software/config": "^1.135.1",
126
126
  "@types/node": "^24.10.9",
127
127
  "@types/react": "^19.2.10",
@@ -129,5 +129,5 @@
129
129
  },
130
130
  "publishConfig": { "access": "public" },
131
131
  "types": "./dist/index.d.cts",
132
- "gitHead": "ed4d8044dcb6e1de7843b3908424bb0a7e636620"
132
+ "gitHead": "6000a15bf3fbc1b7eaaf967088c68eef9949786a"
133
133
  }
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
File without changes
@@ -1,12 +0,0 @@
1
- import { SatoriOptions } from "satori";
2
- import { ReactNode } from "react";
3
-
4
- //#region src/types/module.d.ts
5
- interface SatoriComponentModule {
6
- default: ReactNode;
7
- options?: SatoriOptions;
8
- }
9
- declare type __ΩSatoriComponentModule = any[];
10
- //#endregion
11
- export { __ΩSatoriComponentModule as n, SatoriComponentModule as t };
12
- //# sourceMappingURL=module-DWfSYSuA.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module-DWfSYSuA.d.mts","names":[],"sources":["../src/types/module.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,qBAAA;WACN;EADM,OAAA,CAAA,EAEL,aAFK"}
@@ -1,12 +0,0 @@
1
- import { SatoriOptions } from "satori";
2
- import { ReactNode } from "react";
3
-
4
- //#region src/types/module.d.ts
5
- interface SatoriComponentModule {
6
- default: ReactNode;
7
- options?: SatoriOptions;
8
- }
9
- declare type __ΩSatoriComponentModule = any[];
10
- //#endregion
11
- export { __ΩSatoriComponentModule as n, SatoriComponentModule as t };
12
- //# sourceMappingURL=module-dJs7y8S5.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module-dJs7y8S5.d.cts","names":[],"sources":["../src/types/module.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,qBAAA;WACN;EADM,OAAA,CAAA,EAEL,aAFK"}
File without changes
@@ -1 +0,0 @@
1
- export { };
@@ -1,48 +0,0 @@
1
- import { SatoriOptions } from "satori";
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
- interface SatoriPluginOptions {
8
- /**
9
- * A path or glob pattern (or an array of paths and glob patterns) to files that have a Satori component default export.
10
- */
11
- path: string | string[];
12
- /**
13
- * The path for the generated Satori output images
14
- *
15
- * @remarks
16
- * By default, it will generate the output files alongside each satori component file.
17
- */
18
- outputPath?: string;
19
- /**
20
- * Default Satori options to apply to all components.
21
- *
22
- * @remarks
23
- * These options can be overridden by individual component modules that export their own options.
24
- */
25
- defaultOptions?: Partial<SatoriOptions>;
26
- }
27
- interface SatoriPluginUserConfig extends UserConfig {
28
- satori?: Omit<SatoriPluginOptions, "defaultOptions"> & Required<Pick<SatoriPluginOptions, "defaultOptions">>;
29
- }
30
- interface SatoriPluginResolvedConfig extends ResolvedConfig {
31
- satori: Omit<SatoriPluginOptions, "defaultOptions"> & Required<Pick<SatoriPluginOptions, "defaultOptions">> & {
32
- /**
33
- * An array of resolved input file paths containing Satori components.
34
- *
35
- * @remarks
36
- * These paths are determined based on the {@link SatoriPluginOptions.path} option provided in the plugin configuration. These are **not** glob patterns, but the actual resolved file paths.
37
- */
38
- inputs: string[];
39
- };
40
- }
41
- type SatoriPluginContext<TResolvedConfig extends SatoriPluginResolvedConfig = SatoriPluginResolvedConfig> = PluginContext<TResolvedConfig>;
42
- declare type __ΩSatoriPluginOptions = any[];
43
- declare type __ΩSatoriPluginUserConfig = any[];
44
- declare type __ΩSatoriPluginResolvedConfig = any[];
45
- declare type __ΩSatoriPluginContext = any[];
46
- //#endregion
47
- export { __ΩSatoriPluginContext as a, __ΩSatoriPluginUserConfig as c, SatoriPluginUserConfig as i, SatoriPluginOptions as n, __ΩSatoriPluginOptions as o, SatoriPluginResolvedConfig as r, __ΩSatoriPluginResolvedConfig as s, SatoriPluginContext as t };
48
- //# sourceMappingURL=plugin-Dma3oikO.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-Dma3oikO.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UAuBiB,mBAAA;;AAAjB;AAuBA;EACgB,IAAA,EAAA,MAAA,GAAA,MAAA,EAAA;EAAL;;;;;;EAIM,UAAA,CAAA,EAAA,MAAA;EACF;;;;;;EADmD,cAAA,CAAA,EAR/C,OAQ+C,CARvC,aAQuC,CAAA;AAalE;AAC0B,UAnBT,sBAAA,SAA+B,UAmBtB,CAAA;EACtB,MAAA,CAAA,EAnBO,IAmBP,CAnBY,mBAmBZ,EAAA,gBAAA,CAAA,GAlBA,QAkBA,CAlBS,IAkBT,CAlBc,mBAkBd,EAAA,gBAAA,CAAA,CAAA;;AACA,UAhBa,0BAAA,SAAmC,cAgBhD,CAAA;EAAa,MAAA,EAfP,IAeO,CAfF,mBAeE,EAAA,gBAAA,CAAA,GAdb,QAca,CAdJ,IAcI,CAdC,mBAcD,EAAA,gBAAA,CAAA,CAAA,GAAA;;;;;;;;;;KAHL,4CACc,6BACtB,8BACA,cAAc"}
@@ -1,48 +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 { SatoriOptions } from "satori";
5
-
6
- //#region src/types/plugin.d.ts
7
- interface SatoriPluginOptions {
8
- /**
9
- * A path or glob pattern (or an array of paths and glob patterns) to files that have a Satori component default export.
10
- */
11
- path: string | string[];
12
- /**
13
- * The path for the generated Satori output images
14
- *
15
- * @remarks
16
- * By default, it will generate the output files alongside each satori component file.
17
- */
18
- outputPath?: string;
19
- /**
20
- * Default Satori options to apply to all components.
21
- *
22
- * @remarks
23
- * These options can be overridden by individual component modules that export their own options.
24
- */
25
- defaultOptions?: Partial<SatoriOptions>;
26
- }
27
- interface SatoriPluginUserConfig extends UserConfig {
28
- satori?: Omit<SatoriPluginOptions, "defaultOptions"> & Required<Pick<SatoriPluginOptions, "defaultOptions">>;
29
- }
30
- interface SatoriPluginResolvedConfig extends ResolvedConfig {
31
- satori: Omit<SatoriPluginOptions, "defaultOptions"> & Required<Pick<SatoriPluginOptions, "defaultOptions">> & {
32
- /**
33
- * An array of resolved input file paths containing Satori components.
34
- *
35
- * @remarks
36
- * These paths are determined based on the {@link SatoriPluginOptions.path} option provided in the plugin configuration. These are **not** glob patterns, but the actual resolved file paths.
37
- */
38
- inputs: string[];
39
- };
40
- }
41
- type SatoriPluginContext<TResolvedConfig extends SatoriPluginResolvedConfig = SatoriPluginResolvedConfig> = PluginContext<TResolvedConfig>;
42
- declare type __ΩSatoriPluginOptions = any[];
43
- declare type __ΩSatoriPluginUserConfig = any[];
44
- declare type __ΩSatoriPluginResolvedConfig = any[];
45
- declare type __ΩSatoriPluginContext = any[];
46
- //#endregion
47
- export { __ΩSatoriPluginContext as a, __ΩSatoriPluginUserConfig as c, SatoriPluginUserConfig as i, SatoriPluginOptions as n, __ΩSatoriPluginOptions as o, SatoriPluginResolvedConfig as r, __ΩSatoriPluginResolvedConfig as s, SatoriPluginContext as t };
48
- //# sourceMappingURL=plugin-bJ5d7XkT.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-bJ5d7XkT.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UAuBiB,mBAAA;;AAAjB;AAuBA;EACgB,IAAA,EAAA,MAAA,GAAA,MAAA,EAAA;EAAL;;;;;;EAIM,UAAA,CAAA,EAAA,MAAA;EACF;;;;;;EADmD,cAAA,CAAA,EAR/C,OAQ+C,CARvC,aAQuC,CAAA;AAalE;AAC0B,UAnBT,sBAAA,SAA+B,UAmBtB,CAAA;EACtB,MAAA,CAAA,EAnBO,IAmBP,CAnBY,mBAmBZ,EAAA,gBAAA,CAAA,GAlBA,QAkBA,CAlBS,IAkBT,CAlBc,mBAkBd,EAAA,gBAAA,CAAA,CAAA;;AACA,UAhBa,0BAAA,SAAmC,cAgBhD,CAAA;EAAa,MAAA,EAfP,IAeO,CAfF,mBAeE,EAAA,gBAAA,CAAA,GAdb,QAca,CAdJ,IAcI,CAdC,mBAcD,EAAA,gBAAA,CAAA,CAAA,GAAA;;;;;;;;;;KAHL,4CACc,6BACtB,8BACA,cAAc"}
@@ -1 +0,0 @@
1
- export { };
File without changes