@powerlines/plugin-satori 0.1.120 → 0.1.121
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-CA4VvAY_.d.mts +1 -0
- package/dist/index-CmCelmEL.d.cts +1 -0
- package/dist/index.cjs +66 -6
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -4
- package/dist/index.mjs +35 -1
- package/dist/module-BjH2GuD9.mjs +1 -0
- package/dist/module-DTH7_i6X.cjs +0 -0
- package/dist/module-DWfSYSuA.d.mts +11 -0
- package/dist/module-dJs7y8S5.d.cts +11 -0
- package/dist/plugin-B-8QVe28.cjs +0 -0
- package/dist/plugin-B7p8VtjC.mjs +1 -0
- package/dist/plugin-BOfmA_eT.d.cts +1791 -0
- package/dist/plugin-B_-jrgw3.d.mts +1791 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/index.mjs +4 -0
- package/dist/types/module.cjs +1 -0
- package/dist/types/module.d.cts +1 -10
- package/dist/types/module.d.mts +1 -10
- package/dist/types/module.mjs +2 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -46
- package/dist/types/plugin.d.mts +1 -46
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-BReKsBV6.mjs +1 -0
- package/dist/types-CBTc19th.cjs +0 -0
- package/package.json +3 -3
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
- package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
- package/dist/powerlines/src/types/babel.d.mts +0 -2
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -145
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -369
- package/dist/powerlines/src/types/config.d.mts +0 -369
- package/dist/powerlines/src/types/context.d.cts +0 -403
- package/dist/powerlines/src/types/context.d.mts +0 -405
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -81
- package/dist/powerlines/src/types/resolved.d.mts +0 -81
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
|
|
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');
|
|
4
32
|
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
5
33
|
let __stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
6
34
|
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
@@ -9,10 +37,42 @@ let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
|
9
37
|
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
10
38
|
let __stryke_path_replace = require("@stryke/path/replace");
|
|
11
39
|
let defu = require("defu");
|
|
12
|
-
defu =
|
|
40
|
+
defu = __toESM(defu);
|
|
13
41
|
let satori = require("satori");
|
|
14
|
-
satori =
|
|
42
|
+
satori = __toESM(satori);
|
|
43
|
+
|
|
44
|
+
//#region ../powerlines/src/plugin-utils/paths.ts
|
|
45
|
+
/**
|
|
46
|
+
* Replaces tokens in the given path string with their corresponding values from the context.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* The following tokens are supported:
|
|
50
|
+
* - `{workspaceRoot}` - The root directory of the workspace.
|
|
51
|
+
* - `{root}` - The root directory of the project (same as `{projectRoot}`).
|
|
52
|
+
* - `{projectRoot}` - The root directory of the project (same as `{root}`).
|
|
53
|
+
* - `{sourceRoot}` - The source root directory of the project (usually `./src`).
|
|
54
|
+
* - `{powerlinesPath}` - The directory where Powerlines is installed.
|
|
55
|
+
* - `{cachePath}` - The environment's directory for cached files.
|
|
56
|
+
* - `{dataPath}` - The environment's directory for data files.
|
|
57
|
+
* - `{logPath}` - The environment's directory for log files.
|
|
58
|
+
* - `{tempPath}` - The environment's directory for temporary files.
|
|
59
|
+
* - `{configPath}` - The environment's directory for configuration files.
|
|
60
|
+
* - `{outputPath}` - The configured output directory for the project.
|
|
61
|
+
* - `{buildPath}` - The configured distribution directory for the project.
|
|
62
|
+
* - `{artifactsPath}` - The configured directory for build artifacts.
|
|
63
|
+
* - `{builtinPath}` - The configured directory for generated built-in plugins.
|
|
64
|
+
* - `{entryPath}` - The configured directory for generated entry files.
|
|
65
|
+
*
|
|
66
|
+
* @param context - The context containing the values for the path tokens.
|
|
67
|
+
* @param path - The path string with tokens to replace.
|
|
68
|
+
* @returns The path string with tokens replaced by their corresponding values from the context.
|
|
69
|
+
*/
|
|
70
|
+
function replacePathTokens(context, path) {
|
|
71
|
+
if (!path) return path;
|
|
72
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", (0, __stryke_path_replace.replacePath)(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", (0, __stryke_path_replace.replacePath)(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", (0, __stryke_path_replace.replacePath)(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
73
|
+
}
|
|
15
74
|
|
|
75
|
+
//#endregion
|
|
16
76
|
//#region src/index.ts
|
|
17
77
|
/**
|
|
18
78
|
* A Powerlines plugin to use Untyped for code generation based on user-defined schemas.
|
|
@@ -35,8 +95,8 @@ const plugin = (options) => {
|
|
|
35
95
|
async configResolved() {
|
|
36
96
|
if (!this.config.satori.path) throw new Error("The Powerlines Satori plugin requires a `path` option to be specified.");
|
|
37
97
|
this.config.satori.inputs = (await Promise.all((0, __stryke_convert_to_array.toArray)(this.config.satori.path).map(async (path) => {
|
|
38
|
-
if (path.includes("*")) return (0, __stryke_fs_list_files.listFiles)(
|
|
39
|
-
return
|
|
98
|
+
if (path.includes("*")) return (0, __stryke_fs_list_files.listFiles)(replacePathTokens(this, path));
|
|
99
|
+
return replacePathTokens(this, path);
|
|
40
100
|
}))).flat().filter((path) => path && ["jsx", "tsx"].includes((0, __stryke_path_file_path_fns.findFileExtensionSafe)(path)) && (0, __stryke_fs_exists.existsSync)(path));
|
|
41
101
|
},
|
|
42
102
|
async prepare() {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Plugin } from "./
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { a as __ΩSatoriPluginContext, c as __ΩSatoriPluginUserConfig, i as SatoriPluginUserConfig, l as Plugin, n as SatoriPluginOptions, o as __ΩSatoriPluginOptions, r as SatoriPluginResolvedConfig, s as __ΩSatoriPluginResolvedConfig, t as SatoriPluginContext } from "./plugin-BOfmA_eT.cjs";
|
|
2
|
+
import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "./module-dJs7y8S5.cjs";
|
|
3
|
+
import "./index-CmCelmEL.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Plugin } from "./
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import "./types/index.mjs";
|
|
1
|
+
import { a as __ΩSatoriPluginContext, c as __ΩSatoriPluginUserConfig, i as SatoriPluginUserConfig, l as Plugin, n as SatoriPluginOptions, o as __ΩSatoriPluginOptions, r as SatoriPluginResolvedConfig, s as __ΩSatoriPluginResolvedConfig, t as SatoriPluginContext } from "./plugin-B_-jrgw3.mjs";
|
|
2
|
+
import { n as __ΩSatoriComponentModule, t as SatoriComponentModule } from "./module-DWfSYSuA.mjs";
|
|
3
|
+
import "./index-CA4VvAY_.mjs";
|
|
5
4
|
|
|
6
5
|
//#region src/index.d.ts
|
|
7
6
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./module-BjH2GuD9.mjs";
|
|
2
|
+
import "./plugin-B7p8VtjC.mjs";
|
|
3
|
+
import "./types-BReKsBV6.mjs";
|
|
2
4
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
3
5
|
import { toArray } from "@stryke/convert/to-array";
|
|
4
6
|
import { existsSync } from "@stryke/fs/exists";
|
|
@@ -9,6 +11,38 @@ import { replacePath } from "@stryke/path/replace";
|
|
|
9
11
|
import defu from "defu";
|
|
10
12
|
import satori from "satori";
|
|
11
13
|
|
|
14
|
+
//#region ../powerlines/src/plugin-utils/paths.ts
|
|
15
|
+
/**
|
|
16
|
+
* Replaces tokens in the given path string with their corresponding values from the context.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* The following tokens are supported:
|
|
20
|
+
* - `{workspaceRoot}` - The root directory of the workspace.
|
|
21
|
+
* - `{root}` - The root directory of the project (same as `{projectRoot}`).
|
|
22
|
+
* - `{projectRoot}` - The root directory of the project (same as `{root}`).
|
|
23
|
+
* - `{sourceRoot}` - The source root directory of the project (usually `./src`).
|
|
24
|
+
* - `{powerlinesPath}` - The directory where Powerlines is installed.
|
|
25
|
+
* - `{cachePath}` - The environment's directory for cached files.
|
|
26
|
+
* - `{dataPath}` - The environment's directory for data files.
|
|
27
|
+
* - `{logPath}` - The environment's directory for log files.
|
|
28
|
+
* - `{tempPath}` - The environment's directory for temporary files.
|
|
29
|
+
* - `{configPath}` - The environment's directory for configuration files.
|
|
30
|
+
* - `{outputPath}` - The configured output directory for the project.
|
|
31
|
+
* - `{buildPath}` - The configured distribution directory for the project.
|
|
32
|
+
* - `{artifactsPath}` - The configured directory for build artifacts.
|
|
33
|
+
* - `{builtinPath}` - The configured directory for generated built-in plugins.
|
|
34
|
+
* - `{entryPath}` - The configured directory for generated entry files.
|
|
35
|
+
*
|
|
36
|
+
* @param context - The context containing the values for the path tokens.
|
|
37
|
+
* @param path - The path string with tokens to replace.
|
|
38
|
+
* @returns The path string with tokens replaced by their corresponding values from the context.
|
|
39
|
+
*/
|
|
40
|
+
function replacePathTokens(context, path) {
|
|
41
|
+
if (!path) return path;
|
|
42
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
12
46
|
//#region src/index.ts
|
|
13
47
|
/**
|
|
14
48
|
* A Powerlines plugin to use Untyped for code generation based on user-defined schemas.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
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 };
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|