@powerlines/plugin-satori 0.1.122 → 0.1.123

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 (50) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/index.cjs +6 -66
  3. package/dist/index.d.cts +3 -3
  4. package/dist/index.d.mts +4 -3
  5. package/dist/index.mjs +1 -35
  6. package/dist/powerlines/src/plugin-utils/paths.cjs +36 -0
  7. package/dist/powerlines/src/plugin-utils/paths.mjs +35 -0
  8. package/dist/powerlines/src/types/babel.d.mts +2 -0
  9. package/dist/powerlines/src/types/build.d.cts +145 -0
  10. package/dist/powerlines/src/types/build.d.mts +145 -0
  11. package/dist/powerlines/src/types/commands.d.cts +8 -0
  12. package/dist/powerlines/src/types/commands.d.mts +9 -0
  13. package/dist/powerlines/src/types/config.d.cts +376 -0
  14. package/dist/powerlines/src/types/config.d.mts +376 -0
  15. package/dist/powerlines/src/types/context.d.cts +403 -0
  16. package/dist/powerlines/src/types/context.d.mts +405 -0
  17. package/dist/powerlines/src/types/fs.d.cts +486 -0
  18. package/dist/powerlines/src/types/fs.d.mts +486 -0
  19. package/dist/powerlines/src/types/hooks.d.mts +2 -0
  20. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  21. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  22. package/dist/powerlines/src/types/resolved.d.cts +81 -0
  23. package/dist/powerlines/src/types/resolved.d.mts +81 -0
  24. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  25. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  26. package/dist/types/index.cjs +0 -3
  27. package/dist/types/index.d.cts +2 -3
  28. package/dist/types/index.d.mts +2 -3
  29. package/dist/types/index.mjs +0 -4
  30. package/dist/types/module.cjs +0 -1
  31. package/dist/types/module.d.cts +10 -1
  32. package/dist/types/module.d.mts +10 -1
  33. package/dist/types/module.mjs +0 -2
  34. package/dist/types/plugin.cjs +0 -1
  35. package/dist/types/plugin.d.cts +46 -1
  36. package/dist/types/plugin.d.mts +46 -1
  37. package/dist/types/plugin.mjs +0 -2
  38. package/package.json +5 -5
  39. package/dist/index-CA4VvAY_.d.mts +0 -1
  40. package/dist/index-CmCelmEL.d.cts +0 -1
  41. package/dist/module-BjH2GuD9.mjs +0 -1
  42. package/dist/module-DTH7_i6X.cjs +0 -0
  43. package/dist/module-DWfSYSuA.d.mts +0 -11
  44. package/dist/module-dJs7y8S5.d.cts +0 -11
  45. package/dist/plugin-B-8QVe28.cjs +0 -0
  46. package/dist/plugin-B7p8VtjC.mjs +0 -1
  47. package/dist/plugin-DTFyaBO6.d.cts +0 -1798
  48. package/dist/plugin-YUvr66rC.d.mts +0 -1798
  49. package/dist/types-BReKsBV6.mjs +0 -1
  50. package/dist/types-CBTc19th.cjs +0 -0
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -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-DTFyaBO6.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-YUvr66rC.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,11 @@
1
- import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "../module-dJs7y8S5.cjs";
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
2
11
  export { SatoriComponentModule, __ΩSatoriComponentModule };
@@ -1,2 +1,11 @@
1
- import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "../module-DWfSYSuA.mjs";
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
2
11
  export { SatoriComponentModule, __ΩSatoriComponentModule };
@@ -1,3 +1 @@
1
- import "../module-BjH2GuD9.mjs";
2
-
3
1
  export { };
@@ -1 +0,0 @@
1
- require('../plugin-B-8QVe28.cjs');
@@ -1,2 +1,47 @@
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-DTFyaBO6.cjs";
1
+ import { UserConfig } from "../powerlines/src/types/config.cjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.cjs";
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
2
47
  export { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig };
@@ -1,2 +1,47 @@
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-YUvr66rC.mjs";
1
+ import { UserConfig } from "../powerlines/src/types/config.mjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.mjs";
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
2
47
  export { SatoriPluginContext, SatoriPluginOptions, SatoriPluginResolvedConfig, SatoriPluginUserConfig, __ΩSatoriPluginContext, __ΩSatoriPluginOptions, __ΩSatoriPluginResolvedConfig, __ΩSatoriPluginUserConfig };
@@ -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.122",
3
+ "version": "0.1.123",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to use Satori to generate SVG files from jsx/tsx components.",
6
6
  "repository": {
@@ -131,17 +131,17 @@
131
131
  "@stryke/types": "^0.10.29",
132
132
  "defu": "^6.1.4",
133
133
  "jiti": "^2.6.1",
134
- "powerlines": "^0.36.27",
134
+ "powerlines": "^0.36.28",
135
135
  "satori": "^0.18.3"
136
136
  },
137
137
  "devDependencies": {
138
- "@powerlines/nx": "^0.11.53",
139
- "@powerlines/plugin-plugin": "^0.12.75",
138
+ "@powerlines/nx": "^0.11.54",
139
+ "@powerlines/plugin-plugin": "^0.12.76",
140
140
  "@storm-software/config": "^1.134.75",
141
141
  "@types/node": "^24.10.4",
142
142
  "@types/react": "^19.2.7",
143
143
  "@types/react-dom": "^19.2.3"
144
144
  },
145
145
  "publishConfig": { "access": "public" },
146
- "gitHead": "fbc59ce584fd0f78d90d2dbaa18f9c9267bd3b61"
146
+ "gitHead": "6891ff1330798e807c4caef6134df09d9f57686d"
147
147
  }
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
File without changes
@@ -1,11 +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 };
@@ -1,11 +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 };
File without changes
@@ -1 +0,0 @@
1
- export { };