@power-plant/core 0.0.5 → 0.0.7
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/README.md +2 -2
- package/dist/config-B6Gr29ZK.d.cts +566 -0
- package/dist/config-B6Gr29ZK.d.cts.map +1 -0
- package/dist/config-B6Gr29ZK.d.mts +566 -0
- package/dist/config-B6Gr29ZK.d.mts.map +1 -0
- package/dist/config.cjs +1 -0
- package/dist/config.d.cts +34 -0
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +34 -0
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +2 -0
- package/dist/config.mjs.map +1 -0
- package/dist/context-QCvV8cA9.d.cts +129 -0
- package/dist/context-QCvV8cA9.d.cts.map +1 -0
- package/dist/context-neyaFruu.d.mts +129 -0
- package/dist/context-neyaFruu.d.mts.map +1 -0
- package/dist/context.cjs +1 -0
- package/dist/context.d.cts +91 -0
- package/dist/context.d.cts.map +1 -0
- package/dist/context.d.mts +91 -0
- package/dist/context.d.mts.map +1 -0
- package/dist/context.mjs +2 -0
- package/dist/context.mjs.map +1 -0
- package/dist/define.cjs +1 -0
- package/dist/define.d.cts +82 -0
- package/dist/define.d.cts.map +1 -0
- package/dist/define.d.mts +82 -0
- package/dist/define.d.mts.map +1 -0
- package/dist/define.mjs +2 -0
- package/dist/define.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -101
- package/dist/index.d.mts +7 -101
- package/dist/index.mjs +1 -1
- package/dist/type-checks-C3obf_M5.d.cts +53 -0
- package/dist/type-checks-C3obf_M5.d.cts.map +1 -0
- package/dist/type-checks-Cj1slvLD.d.mts +53 -0
- package/dist/type-checks-Cj1slvLD.d.mts.map +1 -0
- package/dist/type-checks.cjs +1 -0
- package/dist/type-checks.d.cts +2 -0
- package/dist/type-checks.d.mts +2 -0
- package/dist/type-checks.mjs +2 -0
- package/dist/type-checks.mjs.map +1 -0
- package/dist/types/__internal.cjs +0 -0
- package/dist/types/__internal.d.cts +14 -0
- package/dist/types/__internal.d.cts.map +1 -0
- package/dist/types/__internal.d.mts +14 -0
- package/dist/types/__internal.d.mts.map +1 -0
- package/dist/types/__internal.mjs +1 -0
- package/package.json +52 -53
- package/dist/context-BGSa-2fY.mjs +0 -2
- package/dist/context-BGSa-2fY.mjs.map +0 -1
- package/dist/context-Bcrz4kGb.cjs +0 -1
- package/dist/create-0IEoomGw.cjs +0 -1
- package/dist/create-CYRTmdJO.mjs +0 -2
- package/dist/create-CYRTmdJO.mjs.map +0 -1
- package/dist/create-D_u2Zj81.cjs +0 -1
- package/dist/create-DcfhZUHw.mjs +0 -2
- package/dist/create-DcfhZUHw.mjs.map +0 -1
- package/dist/create-MFKW4s0V.cjs +0 -1
- package/dist/create-cqJljXdZ.mjs +0 -2
- package/dist/create-cqJljXdZ.mjs.map +0 -1
- package/dist/define-B5baoppv.d.cts +0 -14
- package/dist/define-B5baoppv.d.cts.map +0 -1
- package/dist/define-BNsSORkE.d.cts +0 -13
- package/dist/define-BNsSORkE.d.cts.map +0 -1
- package/dist/define-B__DotaM.cjs +0 -1
- package/dist/define-BpCv3wD0.d.mts +0 -38
- package/dist/define-BpCv3wD0.d.mts.map +0 -1
- package/dist/define-Bviec8Ry.d.cts +0 -38
- package/dist/define-Bviec8Ry.d.cts.map +0 -1
- package/dist/define-C5_Sx-Eg.mjs +0 -2
- package/dist/define-C5_Sx-Eg.mjs.map +0 -1
- package/dist/define-C_GLY1-q.cjs +0 -1
- package/dist/define-Cjl-0yK0.d.mts +0 -13
- package/dist/define-Cjl-0yK0.d.mts.map +0 -1
- package/dist/define-DE0RBdIR.mjs +0 -2
- package/dist/define-DE0RBdIR.mjs.map +0 -1
- package/dist/define-DQQxZK9L.d.mts +0 -14
- package/dist/define-DQQxZK9L.d.mts.map +0 -1
- package/dist/define-DVggP_03.cjs +0 -1
- package/dist/define-DY1s6sGY.mjs +0 -2
- package/dist/define-DY1s6sGY.mjs.map +0 -1
- package/dist/define-OeGEPyv1.d.cts +0 -45
- package/dist/define-OeGEPyv1.d.cts.map +0 -1
- package/dist/define-hhs2D0Hq.d.mts +0 -45
- package/dist/define-hhs2D0Hq.d.mts.map +0 -1
- package/dist/generator/index.cjs +0 -1
- package/dist/generator/index.d.cts +0 -29
- package/dist/generator/index.d.cts.map +0 -1
- package/dist/generator/index.d.mts +0 -29
- package/dist/generator/index.d.mts.map +0 -1
- package/dist/generator/index.mjs +0 -2
- package/dist/generator/index.mjs.map +0 -1
- package/dist/generator-9GSAWmOj.d.mts +0 -126
- package/dist/generator-9GSAWmOj.d.mts.map +0 -1
- package/dist/generator-D9KikId4.d.cts +0 -126
- package/dist/generator-D9KikId4.d.cts.map +0 -1
- package/dist/helpers-8tc33xyp.mjs +0 -2
- package/dist/helpers-8tc33xyp.mjs.map +0 -1
- package/dist/helpers-BWqqSR02.cjs +0 -1
- package/dist/helpers-BcTg0l_X.cjs +0 -1
- package/dist/helpers-Botqc1jf.cjs +0 -1
- package/dist/helpers-Cfl4NsE5.mjs +0 -2
- package/dist/helpers-Cfl4NsE5.mjs.map +0 -1
- package/dist/helpers-DwNCh4F3.mjs +0 -2
- package/dist/helpers-DwNCh4F3.mjs.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/input/index.cjs +0 -1
- package/dist/input/index.d.cts +0 -35
- package/dist/input/index.d.cts.map +0 -1
- package/dist/input/index.d.mts +0 -35
- package/dist/input/index.d.mts.map +0 -1
- package/dist/input/index.mjs +0 -1
- package/dist/input-C3yGEfI-.d.mts +0 -58
- package/dist/input-C3yGEfI-.d.mts.map +0 -1
- package/dist/input-Osyk3YIo.d.cts +0 -58
- package/dist/input-Osyk3YIo.d.cts.map +0 -1
- package/dist/output/index.cjs +0 -1
- package/dist/output/index.d.cts +0 -35
- package/dist/output/index.d.cts.map +0 -1
- package/dist/output/index.d.mts +0 -35
- package/dist/output/index.d.mts.map +0 -1
- package/dist/output/index.mjs +0 -1
- package/dist/schema/index.cjs +0 -1
- package/dist/schema/index.d.cts +0 -33
- package/dist/schema/index.d.cts.map +0 -1
- package/dist/schema/index.d.mts +0 -33
- package/dist/schema/index.d.mts.map +0 -1
- package/dist/schema/index.mjs +0 -1
- package/dist/schema-DvnNqFd4.d.cts +0 -180
- package/dist/schema-DvnNqFd4.d.cts.map +0 -1
- package/dist/schema-DvnNqFd4.d.mts +0 -180
- package/dist/schema-DvnNqFd4.d.mts.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,101 +1,7 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
|
|
8
|
-
import { ExtractedSchemaEnvelope, JsonSchema } from "@power-plant/schema";
|
|
9
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10
|
-
|
|
11
|
-
//#region src/helpers/context.d.ts
|
|
12
|
-
declare function createContext(userConfig?: UserConfig): Context;
|
|
13
|
-
interface ContextStore {
|
|
14
|
-
asyncLocalStorage: AsyncLocalStorage<Context>;
|
|
15
|
-
use: () => Context;
|
|
16
|
-
tryUse: () => Context | undefined;
|
|
17
|
-
call: <R>(instance: Context, callback: () => R) => R;
|
|
18
|
-
callAsync: <R>(instance: Context, callback: () => R | Promise<R>) => Promise<R>;
|
|
19
|
-
}
|
|
20
|
-
declare const context: ContextStore;
|
|
21
|
-
declare const asyncLocalStorage: AsyncLocalStorage<Context>;
|
|
22
|
-
declare const useContext: () => Context;
|
|
23
|
-
declare const tryUseContext: () => Context | undefined;
|
|
24
|
-
declare const callContext: <R>(instance: Context, callback: () => R) => R;
|
|
25
|
-
declare const callAsyncContext: <R>(instance: Context, callback: () => R | Promise<R>) => Promise<R>;
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/helpers/meta.d.ts
|
|
28
|
-
declare function formatMetaVersion(value: string | number | Date): string;
|
|
29
|
-
/**
|
|
30
|
-
* Extracts the version information from a given input, which can be a string, number, or Date object. The function returns a string representation of the version in the format "YYYYMMDD" for Date inputs, or as a string for valid timestamp numbers. If the input is a string, it is returned as-is. If the input is invalid or not provided, a default version of "1.0" is returned.
|
|
31
|
-
*
|
|
32
|
-
* @param input - The input from which to extract the version. It can be a string, number, undefined, or Date object.
|
|
33
|
-
* @returns A string representing the extracted version information.
|
|
34
|
-
*/
|
|
35
|
-
declare function resolveMetaVersion<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, string | number | Date>): MetaValue<TSpec, TOptions, string>;
|
|
36
|
-
/**
|
|
37
|
-
* Resolves a metadata name using explicit input, metadata, or schema fallbacks.
|
|
38
|
-
*
|
|
39
|
-
* @param schema - The JSON Schema fragment to read fallback values from.
|
|
40
|
-
* @param meta - Metadata values that may already include a name.
|
|
41
|
-
* @param input - An explicit name value to prioritize when provided.
|
|
42
|
-
* @returns The resolved metadata name.
|
|
43
|
-
*/
|
|
44
|
-
declare function resolveMetaName<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, string>): MetaValue<TSpec, TOptions, string>;
|
|
45
|
-
/**
|
|
46
|
-
* Resolves a stable metadata identifier in the format `<name>@<version>`.
|
|
47
|
-
*
|
|
48
|
-
* @param schema - The JSON Schema fragment used to infer fallback values.
|
|
49
|
-
* @param meta - Metadata values used to resolve name and version.
|
|
50
|
-
* @returns The resolved metadata identifier, or a generated id when no name is available.
|
|
51
|
-
*/
|
|
52
|
-
declare function resolveMetaId<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>): MetaValue<TSpec, TOptions, string>;
|
|
53
|
-
/**
|
|
54
|
-
* Resolves a human-readable display name for metadata.
|
|
55
|
-
*
|
|
56
|
-
* @param schema - The JSON Schema fragment to read fallback display values from.
|
|
57
|
-
* @param meta - Metadata values that may already include a display name.
|
|
58
|
-
* @param input - An explicit display name value to prioritize when provided.
|
|
59
|
-
* @returns The resolved metadata display name.
|
|
60
|
-
*/
|
|
61
|
-
declare function resolveMetaTitle<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, string>): MetaValue<TSpec, TOptions, string>;
|
|
62
|
-
/**
|
|
63
|
-
* Resolves a metadata description from explicit input, metadata, or schema values.
|
|
64
|
-
*
|
|
65
|
-
* @param template - A template string used to generate a default description when no explicit description is provided.
|
|
66
|
-
* @param schema - The JSON Schema fragment to read fallback description values from.
|
|
67
|
-
* @param meta - Metadata values that may already include a description.
|
|
68
|
-
* @param input - An explicit description value to prioritize when provided.
|
|
69
|
-
* @returns The resolved description, if available.
|
|
70
|
-
*/
|
|
71
|
-
declare function resolveMetaDescription<TSpec, TOptions extends object>(template: MetaValue<TSpec, TOptions, string>, schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, string>): MetaValue<TSpec, TOptions, string>;
|
|
72
|
-
/**
|
|
73
|
-
* Resolves and normalizes metadata examples into a consistent object format.
|
|
74
|
-
*
|
|
75
|
-
* @typeParam TSpec - The schema specification type associated with example values.
|
|
76
|
-
* @param schema - The JSON Schema fragment to read fallback examples from.
|
|
77
|
-
* @param meta - Metadata values that may already include examples.
|
|
78
|
-
* @param input - Explicit examples to prioritize when provided.
|
|
79
|
-
* @returns A normalized list of examples with generated descriptions when needed.
|
|
80
|
-
*/
|
|
81
|
-
declare function resolveMetaExample<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<SchemaMeta<TSpec, TOptions>>, input?: SchemaMetaExample<TSpec> | MetaValue<TSpec, TOptions, SchemaMetaExample<TSpec>[]>): MetaValue<TSpec, TOptions, SchemaMetaExample<TSpec>[]>;
|
|
82
|
-
/**
|
|
83
|
-
* Resolves and de-duplicates metadata links from input, metadata, and schema docs.
|
|
84
|
-
*
|
|
85
|
-
* @param schema - The JSON Schema fragment to read fallback documentation links from.
|
|
86
|
-
* @param meta - Metadata values that may already include links.
|
|
87
|
-
* @param input - Explicit links to prioritize when provided.
|
|
88
|
-
* @returns A unique list of metadata links.
|
|
89
|
-
*/
|
|
90
|
-
declare function resolveMetaLinks<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, MetaLink[]>): MetaValue<TSpec, TOptions, MetaLink[]>;
|
|
91
|
-
/**
|
|
92
|
-
* Extracts and normalizes metadata for a specification based on the provided schema and optional configuration.
|
|
93
|
-
*
|
|
94
|
-
* @param schema - The schema that the specification is expected to conform to.
|
|
95
|
-
* @param config - Optional metadata configuration to extract and normalize.
|
|
96
|
-
* @returns The normalized specification metadata.
|
|
97
|
-
*/
|
|
98
|
-
declare function extractMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, config?: MetaConfig<TSpec, TOptions>): Meta<TSpec, TOptions>;
|
|
99
|
-
//#endregion
|
|
100
|
-
export { type Context, ContextStore, type Generator, type GeneratorConfig, type GeneratorConfigObject, type GeneratorMeta, type InferCreateGeneratorOptions, type InferCreateInputOptions, type InferCreateOutputOptions, type InferCreateSchemaOptions, type Input, type InputConfig, type InputConfigObject, type InputFunction, type InputMeta, type InputMetaConfig, type Meta, type MetaConfig, type MetaDeprecated, type MetaLink, type MetaValue, type Output, type OutputConfig, type OutputConfigObject, type OutputFunction, type OutputMeta, type OutputMetaConfig, type Schema, type SchemaConfigObject, type SchemaMeta, type SchemaMetaConfig, type SchemaMetaExample, type SchemaOf, asyncLocalStorage, callAsyncContext, callContext, context, createContext, defineGenerator, defineInput, defineOutput, defineSchema, extractMeta, formatMetaVersion, resolveMetaDescription, resolveMetaExample, resolveMetaId, resolveMetaLinks, resolveMetaName, resolveMetaTitle, resolveMetaVersion, tryUseContext, useContext };
|
|
101
|
-
//# sourceMappingURL=index.d.cts.map
|
|
1
|
+
import { $ as MetaDataPrimitive, A as ExtractedExecution, B as InferCreateSchemaOptions, C as GeneratorResult, D as ExecutionMeta, E as ExecutionDocument, F as InputConfig, G as SchemaMetaExample, H as SchemaConfigObject, I as InputConfigObject, J as InferExtractedMeta, K as SchemaOf, L as InputFunction, M as ExtractedExecutionSource, N as InferCreateInputOptions, O as ExecutionResult, P as Input, Q as MetaData, R as InputMeta, S as GeneratorMeta, T as Execution, U as SchemaMeta, V as Schema, W as SchemaMetaConfig, X as Meta, Y as InferExtractedMetaDataRecord, Z as MetaConfig, _ as Generator, a as UserConfigFnPromise, b as GeneratorFunction, c as Settings, d as OutputConfig, et as MetaDataRecord, f as OutputConfigObject, g as GeneratedDocument, h as OutputMetaConfig, i as UserConfigFnObject, j as ExtractedExecutionDocument, k as ExecutionSource, l as InferCreateOutputOptions, m as OutputMeta, n as UserConfigExport, nt as MetaLink, o as UserConfigParams, p as OutputFunction, q as BaseMeta, r as UserConfigFn, rt as MetaValue, s as Logger, t as UserConfig, tt as MetaDeprecated, u as Output, v as GeneratorConfig, w as InferCreateGeneratorOptions, x as GeneratorFunctionResult, y as GeneratorConfigObject, z as InputMetaConfig } from "./config-B6Gr29ZK.cjs";
|
|
2
|
+
import { defineConfig } from "./config.cjs";
|
|
3
|
+
import { a as SessionUserInfo, i as SessionDeviceInfo, n as SessionContext, r as Session, t as ExecutionContext } from "./context-QCvV8cA9.cjs";
|
|
4
|
+
import { ContextStore, callAsyncExecutionContext, callAsyncSessionContext, callExecutionContext, callSessionContext, executionAsyncLocalStorage, executionContext, sessionAsyncLocalStorage, sessionContext, tryUseExecutionContext, tryUseSessionContext, useExecutionContext, useSessionContext } from "./context.cjs";
|
|
5
|
+
import { defineGenerator, defineInput, defineOutput, defineSchema } from "./define.cjs";
|
|
6
|
+
import { a as Base, i as isSchemaConfigObject, n as isInputConfigObject, r as isOutputConfigObject, t as isGeneratorConfigObject } from "./type-checks-C3obf_M5.cjs";
|
|
7
|
+
export { type Base, type BaseMeta, ContextStore, type Execution, type ExecutionContext, type ExecutionDocument, type ExecutionMeta, type ExecutionResult, type ExecutionSource, type ExtractedExecution, type ExtractedExecutionDocument, type ExtractedExecutionSource, type GeneratedDocument, type Generator, type GeneratorConfig, type GeneratorConfigObject, type GeneratorFunction, type GeneratorFunctionResult, type GeneratorMeta, type GeneratorResult, type InferCreateGeneratorOptions, type InferCreateInputOptions, type InferCreateOutputOptions, type InferCreateSchemaOptions, type InferExtractedMeta, type InferExtractedMetaDataRecord, type Input, type InputConfig, type InputConfigObject, type InputFunction, type InputMeta, type InputMetaConfig, type Logger, type Meta, type MetaConfig, type MetaData, type MetaDataPrimitive, type MetaDataRecord, type MetaDeprecated, type MetaLink, type MetaValue, type Output, type OutputConfig, type OutputConfigObject, type OutputFunction, type OutputMeta, type OutputMetaConfig, type Schema, type SchemaConfigObject, type SchemaMeta, type SchemaMetaConfig, type SchemaMetaExample, type SchemaOf, type Session, type SessionContext, type SessionDeviceInfo, type SessionUserInfo, type Settings, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserConfigParams, callAsyncExecutionContext, callAsyncSessionContext, callExecutionContext, callSessionContext, defineConfig, defineGenerator, defineInput, defineOutput, defineSchema, executionAsyncLocalStorage, executionContext, isGeneratorConfigObject, isInputConfigObject, isOutputConfigObject, isSchemaConfigObject, sessionAsyncLocalStorage, sessionContext, tryUseExecutionContext, tryUseSessionContext, useExecutionContext, useSessionContext };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,101 +1,7 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
|
|
8
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
9
|
-
import { ExtractedSchemaEnvelope, JsonSchema } from "@power-plant/schema";
|
|
10
|
-
|
|
11
|
-
//#region src/helpers/context.d.ts
|
|
12
|
-
declare function createContext(userConfig?: UserConfig): Context;
|
|
13
|
-
interface ContextStore {
|
|
14
|
-
asyncLocalStorage: AsyncLocalStorage<Context>;
|
|
15
|
-
use: () => Context;
|
|
16
|
-
tryUse: () => Context | undefined;
|
|
17
|
-
call: <R>(instance: Context, callback: () => R) => R;
|
|
18
|
-
callAsync: <R>(instance: Context, callback: () => R | Promise<R>) => Promise<R>;
|
|
19
|
-
}
|
|
20
|
-
declare const context: ContextStore;
|
|
21
|
-
declare const asyncLocalStorage: AsyncLocalStorage<Context>;
|
|
22
|
-
declare const useContext: () => Context;
|
|
23
|
-
declare const tryUseContext: () => Context | undefined;
|
|
24
|
-
declare const callContext: <R>(instance: Context, callback: () => R) => R;
|
|
25
|
-
declare const callAsyncContext: <R>(instance: Context, callback: () => R | Promise<R>) => Promise<R>;
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/helpers/meta.d.ts
|
|
28
|
-
declare function formatMetaVersion(value: string | number | Date): string;
|
|
29
|
-
/**
|
|
30
|
-
* Extracts the version information from a given input, which can be a string, number, or Date object. The function returns a string representation of the version in the format "YYYYMMDD" for Date inputs, or as a string for valid timestamp numbers. If the input is a string, it is returned as-is. If the input is invalid or not provided, a default version of "1.0" is returned.
|
|
31
|
-
*
|
|
32
|
-
* @param input - The input from which to extract the version. It can be a string, number, undefined, or Date object.
|
|
33
|
-
* @returns A string representing the extracted version information.
|
|
34
|
-
*/
|
|
35
|
-
declare function resolveMetaVersion<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, string | number | Date>): MetaValue<TSpec, TOptions, string>;
|
|
36
|
-
/**
|
|
37
|
-
* Resolves a metadata name using explicit input, metadata, or schema fallbacks.
|
|
38
|
-
*
|
|
39
|
-
* @param schema - The JSON Schema fragment to read fallback values from.
|
|
40
|
-
* @param meta - Metadata values that may already include a name.
|
|
41
|
-
* @param input - An explicit name value to prioritize when provided.
|
|
42
|
-
* @returns The resolved metadata name.
|
|
43
|
-
*/
|
|
44
|
-
declare function resolveMetaName<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, string>): MetaValue<TSpec, TOptions, string>;
|
|
45
|
-
/**
|
|
46
|
-
* Resolves a stable metadata identifier in the format `<name>@<version>`.
|
|
47
|
-
*
|
|
48
|
-
* @param schema - The JSON Schema fragment used to infer fallback values.
|
|
49
|
-
* @param meta - Metadata values used to resolve name and version.
|
|
50
|
-
* @returns The resolved metadata identifier, or a generated id when no name is available.
|
|
51
|
-
*/
|
|
52
|
-
declare function resolveMetaId<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>): MetaValue<TSpec, TOptions, string>;
|
|
53
|
-
/**
|
|
54
|
-
* Resolves a human-readable display name for metadata.
|
|
55
|
-
*
|
|
56
|
-
* @param schema - The JSON Schema fragment to read fallback display values from.
|
|
57
|
-
* @param meta - Metadata values that may already include a display name.
|
|
58
|
-
* @param input - An explicit display name value to prioritize when provided.
|
|
59
|
-
* @returns The resolved metadata display name.
|
|
60
|
-
*/
|
|
61
|
-
declare function resolveMetaTitle<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, string>): MetaValue<TSpec, TOptions, string>;
|
|
62
|
-
/**
|
|
63
|
-
* Resolves a metadata description from explicit input, metadata, or schema values.
|
|
64
|
-
*
|
|
65
|
-
* @param template - A template string used to generate a default description when no explicit description is provided.
|
|
66
|
-
* @param schema - The JSON Schema fragment to read fallback description values from.
|
|
67
|
-
* @param meta - Metadata values that may already include a description.
|
|
68
|
-
* @param input - An explicit description value to prioritize when provided.
|
|
69
|
-
* @returns The resolved description, if available.
|
|
70
|
-
*/
|
|
71
|
-
declare function resolveMetaDescription<TSpec, TOptions extends object>(template: MetaValue<TSpec, TOptions, string>, schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, string>): MetaValue<TSpec, TOptions, string>;
|
|
72
|
-
/**
|
|
73
|
-
* Resolves and normalizes metadata examples into a consistent object format.
|
|
74
|
-
*
|
|
75
|
-
* @typeParam TSpec - The schema specification type associated with example values.
|
|
76
|
-
* @param schema - The JSON Schema fragment to read fallback examples from.
|
|
77
|
-
* @param meta - Metadata values that may already include examples.
|
|
78
|
-
* @param input - Explicit examples to prioritize when provided.
|
|
79
|
-
* @returns A normalized list of examples with generated descriptions when needed.
|
|
80
|
-
*/
|
|
81
|
-
declare function resolveMetaExample<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<SchemaMeta<TSpec, TOptions>>, input?: SchemaMetaExample<TSpec> | MetaValue<TSpec, TOptions, SchemaMetaExample<TSpec>[]>): MetaValue<TSpec, TOptions, SchemaMetaExample<TSpec>[]>;
|
|
82
|
-
/**
|
|
83
|
-
* Resolves and de-duplicates metadata links from input, metadata, and schema docs.
|
|
84
|
-
*
|
|
85
|
-
* @param schema - The JSON Schema fragment to read fallback documentation links from.
|
|
86
|
-
* @param meta - Metadata values that may already include links.
|
|
87
|
-
* @param input - Explicit links to prioritize when provided.
|
|
88
|
-
* @returns A unique list of metadata links.
|
|
89
|
-
*/
|
|
90
|
-
declare function resolveMetaLinks<TSpec, TOptions extends object>(schema: JsonSchema, meta: Partial<Meta<TSpec, TOptions>>, input?: MetaValue<TSpec, TOptions, MetaLink[]>): MetaValue<TSpec, TOptions, MetaLink[]>;
|
|
91
|
-
/**
|
|
92
|
-
* Extracts and normalizes metadata for a specification based on the provided schema and optional configuration.
|
|
93
|
-
*
|
|
94
|
-
* @param schema - The schema that the specification is expected to conform to.
|
|
95
|
-
* @param config - Optional metadata configuration to extract and normalize.
|
|
96
|
-
* @returns The normalized specification metadata.
|
|
97
|
-
*/
|
|
98
|
-
declare function extractMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, config?: MetaConfig<TSpec, TOptions>): Meta<TSpec, TOptions>;
|
|
99
|
-
//#endregion
|
|
100
|
-
export { type Context, ContextStore, type Generator, type GeneratorConfig, type GeneratorConfigObject, type GeneratorMeta, type InferCreateGeneratorOptions, type InferCreateInputOptions, type InferCreateOutputOptions, type InferCreateSchemaOptions, type Input, type InputConfig, type InputConfigObject, type InputFunction, type InputMeta, type InputMetaConfig, type Meta, type MetaConfig, type MetaDeprecated, type MetaLink, type MetaValue, type Output, type OutputConfig, type OutputConfigObject, type OutputFunction, type OutputMeta, type OutputMetaConfig, type Schema, type SchemaConfigObject, type SchemaMeta, type SchemaMetaConfig, type SchemaMetaExample, type SchemaOf, asyncLocalStorage, callAsyncContext, callContext, context, createContext, defineGenerator, defineInput, defineOutput, defineSchema, extractMeta, formatMetaVersion, resolveMetaDescription, resolveMetaExample, resolveMetaId, resolveMetaLinks, resolveMetaName, resolveMetaTitle, resolveMetaVersion, tryUseContext, useContext };
|
|
101
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1
|
+
import { $ as MetaDataPrimitive, A as ExtractedExecution, B as InferCreateSchemaOptions, C as GeneratorResult, D as ExecutionMeta, E as ExecutionDocument, F as InputConfig, G as SchemaMetaExample, H as SchemaConfigObject, I as InputConfigObject, J as InferExtractedMeta, K as SchemaOf, L as InputFunction, M as ExtractedExecutionSource, N as InferCreateInputOptions, O as ExecutionResult, P as Input, Q as MetaData, R as InputMeta, S as GeneratorMeta, T as Execution, U as SchemaMeta, V as Schema, W as SchemaMetaConfig, X as Meta, Y as InferExtractedMetaDataRecord, Z as MetaConfig, _ as Generator, a as UserConfigFnPromise, b as GeneratorFunction, c as Settings, d as OutputConfig, et as MetaDataRecord, f as OutputConfigObject, g as GeneratedDocument, h as OutputMetaConfig, i as UserConfigFnObject, j as ExtractedExecutionDocument, k as ExecutionSource, l as InferCreateOutputOptions, m as OutputMeta, n as UserConfigExport, nt as MetaLink, o as UserConfigParams, p as OutputFunction, q as BaseMeta, r as UserConfigFn, rt as MetaValue, s as Logger, t as UserConfig, tt as MetaDeprecated, u as Output, v as GeneratorConfig, w as InferCreateGeneratorOptions, x as GeneratorFunctionResult, y as GeneratorConfigObject, z as InputMetaConfig } from "./config-B6Gr29ZK.mjs";
|
|
2
|
+
import { defineConfig } from "./config.mjs";
|
|
3
|
+
import { a as SessionUserInfo, i as SessionDeviceInfo, n as SessionContext, r as Session, t as ExecutionContext } from "./context-neyaFruu.mjs";
|
|
4
|
+
import { ContextStore, callAsyncExecutionContext, callAsyncSessionContext, callExecutionContext, callSessionContext, executionAsyncLocalStorage, executionContext, sessionAsyncLocalStorage, sessionContext, tryUseExecutionContext, tryUseSessionContext, useExecutionContext, useSessionContext } from "./context.mjs";
|
|
5
|
+
import { defineGenerator, defineInput, defineOutput, defineSchema } from "./define.mjs";
|
|
6
|
+
import { a as Base, i as isSchemaConfigObject, n as isInputConfigObject, r as isOutputConfigObject, t as isGeneratorConfigObject } from "./type-checks-Cj1slvLD.mjs";
|
|
7
|
+
export { type Base, type BaseMeta, ContextStore, type Execution, type ExecutionContext, type ExecutionDocument, type ExecutionMeta, type ExecutionResult, type ExecutionSource, type ExtractedExecution, type ExtractedExecutionDocument, type ExtractedExecutionSource, type GeneratedDocument, type Generator, type GeneratorConfig, type GeneratorConfigObject, type GeneratorFunction, type GeneratorFunctionResult, type GeneratorMeta, type GeneratorResult, type InferCreateGeneratorOptions, type InferCreateInputOptions, type InferCreateOutputOptions, type InferCreateSchemaOptions, type InferExtractedMeta, type InferExtractedMetaDataRecord, type Input, type InputConfig, type InputConfigObject, type InputFunction, type InputMeta, type InputMetaConfig, type Logger, type Meta, type MetaConfig, type MetaData, type MetaDataPrimitive, type MetaDataRecord, type MetaDeprecated, type MetaLink, type MetaValue, type Output, type OutputConfig, type OutputConfigObject, type OutputFunction, type OutputMeta, type OutputMetaConfig, type Schema, type SchemaConfigObject, type SchemaMeta, type SchemaMetaConfig, type SchemaMetaExample, type SchemaOf, type Session, type SessionContext, type SessionDeviceInfo, type SessionUserInfo, type Settings, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserConfigParams, callAsyncExecutionContext, callAsyncSessionContext, callExecutionContext, callSessionContext, defineConfig, defineGenerator, defineInput, defineOutput, defineSchema, executionAsyncLocalStorage, executionContext, isGeneratorConfigObject, isInputConfigObject, isOutputConfigObject, isSchemaConfigObject, sessionAsyncLocalStorage, sessionContext, tryUseExecutionContext, tryUseSessionContext, useExecutionContext, useSessionContext };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{isGeneratorConfigObject as e,isInputConfigObject as t,isOutputConfigObject as n,isSchemaConfigObject as r}from"./type-checks.mjs";import{defineConfig as i}from"./config.mjs";import{callAsyncExecutionContext as a,callAsyncSessionContext as o,callExecutionContext as s,callSessionContext as c,executionAsyncLocalStorage as l,executionContext as u,sessionAsyncLocalStorage as d,sessionContext as f,tryUseExecutionContext as p,tryUseSessionContext as m,useExecutionContext as h,useSessionContext as g}from"./context.mjs";import{defineGenerator as _,defineInput as v,defineOutput as y,defineSchema as b}from"./define.mjs";export{a as callAsyncExecutionContext,o as callAsyncSessionContext,s as callExecutionContext,c as callSessionContext,i as defineConfig,_ as defineGenerator,v as defineInput,y as defineOutput,b as defineSchema,l as executionAsyncLocalStorage,u as executionContext,e as isGeneratorConfigObject,t as isInputConfigObject,n as isOutputConfigObject,r as isSchemaConfigObject,d as sessionAsyncLocalStorage,f as sessionContext,p as tryUseExecutionContext,m as tryUseSessionContext,h as useExecutionContext,g as useSessionContext};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { H as SchemaConfigObject, I as InputConfigObject, f as OutputConfigObject, y as GeneratorConfigObject } from "./config-B6Gr29ZK.cjs";
|
|
2
|
+
//#region src/types/base.d.ts
|
|
3
|
+
interface Base {
|
|
4
|
+
/**
|
|
5
|
+
* A unique identifier for the model.
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* The timestamp when the model was created.
|
|
10
|
+
*/
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
/**
|
|
13
|
+
* The timestamp when the model was last updated.
|
|
14
|
+
*/
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
/**
|
|
17
|
+
* The description of the model.
|
|
18
|
+
*/
|
|
19
|
+
description?: string;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/type-checks.d.ts
|
|
23
|
+
/**
|
|
24
|
+
* Checks if the provided configuration is a {@link GeneratorConfigObject}.
|
|
25
|
+
*
|
|
26
|
+
* @param config - The configuration to check.
|
|
27
|
+
* @returns True if the configuration is a {@link GeneratorConfigObject}, false otherwise.
|
|
28
|
+
*/
|
|
29
|
+
declare function isGeneratorConfigObject<TSpec, TOptions extends object, TReturns = void>(config: unknown): config is GeneratorConfigObject<TSpec, TOptions, TReturns>;
|
|
30
|
+
/**
|
|
31
|
+
* Checks if the provided input is a {@link InputConfigObject}.
|
|
32
|
+
*
|
|
33
|
+
* @param input - The input to check.
|
|
34
|
+
* @returns True if the input is a {@link InputConfigObject}, false otherwise.
|
|
35
|
+
*/
|
|
36
|
+
declare function isInputConfigObject<TSpec, TOptions extends object>(input: unknown): input is InputConfigObject<TSpec, TOptions>;
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the provided input is a {@link OutputConfigObject}.
|
|
39
|
+
*
|
|
40
|
+
* @param config - The input to check.
|
|
41
|
+
* @returns True if the input is a {@link OutputConfigObject}, false otherwise.
|
|
42
|
+
*/
|
|
43
|
+
declare function isOutputConfigObject<TSpec, TOptions extends object, TReturns = void>(config: unknown): config is OutputConfigObject<TSpec, TOptions, TReturns>;
|
|
44
|
+
/**
|
|
45
|
+
* Checks if the provided configuration is a {@link SchemaConfigObject}.
|
|
46
|
+
*
|
|
47
|
+
* @param config - The configuration to check.
|
|
48
|
+
* @returns True if the configuration is a {@link SchemaConfigObject}, false otherwise.
|
|
49
|
+
*/
|
|
50
|
+
declare function isSchemaConfigObject<TSpec, TOptions extends object>(config: unknown): config is SchemaConfigObject<TSpec, TOptions>;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Base as a, isSchemaConfigObject as i, isInputConfigObject as n, isOutputConfigObject as r, isGeneratorConfigObject as t };
|
|
53
|
+
//# sourceMappingURL=type-checks-C3obf_M5.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-checks-C3obf_M5.d.cts","names":[],"sources":["../src/types/base.ts","../src/type-checks.ts"],"mappings":";;UAkBiB,IAAA;;;;EAIf,EAAA;EAJmB;;;EASnB,SAAA,EAAW,IAAA;EAAX;;;EAKA,SAAA,EAAW,IAAI;EAKf;;AAAW;EAAX,WAAA;AAAA;;;;;;AAnBF;;;iBCcgB,uBAAA,kDAId,MAAA,YAAkB,MAAA,IAAU,qBAAA,CAAsB,KAAA,EAAO,QAAA,EAAU,QAAA;;;;;;;iBAcrD,mBAAA,iCACd,KAAA,YACC,KAAA,IAAS,iBAAA,CAAkB,KAAA,EAAO,QAAA;ADfxB;;;;ACLb;;ADKa,iBCyBG,oBAAA,kDAId,MAAA,YAAkB,MAAA,IAAU,kBAAA,CAAmB,KAAA,EAAO,QAAA,EAAU,QAAA;;;;;;;iBAYlD,oBAAA,iCACd,MAAA,YACC,MAAA,IAAU,kBAAA,CAAmB,KAAA,EAAO,QAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { H as SchemaConfigObject, I as InputConfigObject, f as OutputConfigObject, y as GeneratorConfigObject } from "./config-B6Gr29ZK.mjs";
|
|
2
|
+
//#region src/types/base.d.ts
|
|
3
|
+
interface Base {
|
|
4
|
+
/**
|
|
5
|
+
* A unique identifier for the model.
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* The timestamp when the model was created.
|
|
10
|
+
*/
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
/**
|
|
13
|
+
* The timestamp when the model was last updated.
|
|
14
|
+
*/
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
/**
|
|
17
|
+
* The description of the model.
|
|
18
|
+
*/
|
|
19
|
+
description?: string;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/type-checks.d.ts
|
|
23
|
+
/**
|
|
24
|
+
* Checks if the provided configuration is a {@link GeneratorConfigObject}.
|
|
25
|
+
*
|
|
26
|
+
* @param config - The configuration to check.
|
|
27
|
+
* @returns True if the configuration is a {@link GeneratorConfigObject}, false otherwise.
|
|
28
|
+
*/
|
|
29
|
+
declare function isGeneratorConfigObject<TSpec, TOptions extends object, TReturns = void>(config: unknown): config is GeneratorConfigObject<TSpec, TOptions, TReturns>;
|
|
30
|
+
/**
|
|
31
|
+
* Checks if the provided input is a {@link InputConfigObject}.
|
|
32
|
+
*
|
|
33
|
+
* @param input - The input to check.
|
|
34
|
+
* @returns True if the input is a {@link InputConfigObject}, false otherwise.
|
|
35
|
+
*/
|
|
36
|
+
declare function isInputConfigObject<TSpec, TOptions extends object>(input: unknown): input is InputConfigObject<TSpec, TOptions>;
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the provided input is a {@link OutputConfigObject}.
|
|
39
|
+
*
|
|
40
|
+
* @param config - The input to check.
|
|
41
|
+
* @returns True if the input is a {@link OutputConfigObject}, false otherwise.
|
|
42
|
+
*/
|
|
43
|
+
declare function isOutputConfigObject<TSpec, TOptions extends object, TReturns = void>(config: unknown): config is OutputConfigObject<TSpec, TOptions, TReturns>;
|
|
44
|
+
/**
|
|
45
|
+
* Checks if the provided configuration is a {@link SchemaConfigObject}.
|
|
46
|
+
*
|
|
47
|
+
* @param config - The configuration to check.
|
|
48
|
+
* @returns True if the configuration is a {@link SchemaConfigObject}, false otherwise.
|
|
49
|
+
*/
|
|
50
|
+
declare function isSchemaConfigObject<TSpec, TOptions extends object>(config: unknown): config is SchemaConfigObject<TSpec, TOptions>;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Base as a, isSchemaConfigObject as i, isInputConfigObject as n, isOutputConfigObject as r, isGeneratorConfigObject as t };
|
|
53
|
+
//# sourceMappingURL=type-checks-Cj1slvLD.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-checks-Cj1slvLD.d.mts","names":[],"sources":["../src/types/base.ts","../src/type-checks.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@stryke/type-checks/is-set-object");function t(t){return(0,e.isSetObject)(t)&&`generator`in t&&t.generator!==void 0}function n(t){return(0,e.isSetObject)(t)&&`input`in t&&t.input!==void 0}function r(t){return(0,e.isSetObject)(t)&&`output`in t&&t.output!==void 0}function i(t){return(0,e.isSetObject)(t)&&`schema`in t&&t.schema!==void 0}exports.isGeneratorConfigObject=t,exports.isInputConfigObject=n,exports.isOutputConfigObject=r,exports.isSchemaConfigObject=i;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isSetObject as e}from"@stryke/type-checks/is-set-object";function t(t){return e(t)&&`generator`in t&&t.generator!==void 0}function n(t){return e(t)&&`input`in t&&t.input!==void 0}function r(t){return e(t)&&`output`in t&&t.output!==void 0}function i(t){return e(t)&&`schema`in t&&t.schema!==void 0}export{t as isGeneratorConfigObject,n as isInputConfigObject,r as isOutputConfigObject,i as isSchemaConfigObject};
|
|
2
|
+
//# sourceMappingURL=type-checks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-checks.mjs","names":[],"sources":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { E as ExecutionDocument, K as SchemaOf, P as Input, u as Output } from "../config-B6Gr29ZK.cjs";
|
|
2
|
+
import { t as ExecutionContext } from "../context-QCvV8cA9.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/types/__internal.d.ts
|
|
5
|
+
interface Unstable_ExecutionContext<TSpec, TOptions extends object, TReturns = void> extends ExecutionContext<TSpec, TOptions, TReturns> {
|
|
6
|
+
"~spec": TSpec;
|
|
7
|
+
schema: SchemaOf<TSpec, TOptions>;
|
|
8
|
+
input: Input<TSpec, TOptions>;
|
|
9
|
+
output: Output<TSpec, TOptions, TReturns>;
|
|
10
|
+
documents: Record<string, ExecutionDocument<TSpec, TOptions>>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Unstable_ExecutionContext };
|
|
14
|
+
//# sourceMappingURL=__internal.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__internal.d.cts","names":[],"sources":["../../src/types/__internal.ts"],"mappings":";;;;UAyBiB,yBAAA,0DAIP,gBAAA,CAAiB,KAAA,EAAO,QAAA,EAAU,QAAA;EAC1C,OAAA,EAAS,KAAA;EACT,MAAA,EAAQ,QAAA,CAAS,KAAA,EAAO,QAAA;EACxB,KAAA,EAAO,KAAA,CAAM,KAAA,EAAO,QAAA;EACpB,MAAA,EAAQ,MAAA,CAAO,KAAA,EAAO,QAAA,EAAU,QAAA;EAChC,SAAA,EAAW,MAAA,SAAe,iBAAA,CAAkB,KAAA,EAAO,QAAA;AAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { E as ExecutionDocument, K as SchemaOf, P as Input, u as Output } from "../config-B6Gr29ZK.mjs";
|
|
2
|
+
import { t as ExecutionContext } from "../context-neyaFruu.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/types/__internal.d.ts
|
|
5
|
+
interface Unstable_ExecutionContext<TSpec, TOptions extends object, TReturns = void> extends ExecutionContext<TSpec, TOptions, TReturns> {
|
|
6
|
+
"~spec": TSpec;
|
|
7
|
+
schema: SchemaOf<TSpec, TOptions>;
|
|
8
|
+
input: Input<TSpec, TOptions>;
|
|
9
|
+
output: Output<TSpec, TOptions, TReturns>;
|
|
10
|
+
documents: Record<string, ExecutionDocument<TSpec, TOptions>>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Unstable_ExecutionContext };
|
|
14
|
+
//# sourceMappingURL=__internal.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__internal.d.mts","names":[],"sources":["../../src/types/__internal.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "
|
|
6
|
-
"keywords": ["power-plant", "
|
|
5
|
+
"description": "☢️ Text generation that gives your AI superpowers",
|
|
6
|
+
"keywords": ["power-plant", "storm-software"],
|
|
7
7
|
"homepage": "https://stormsoftware.com",
|
|
8
8
|
"bugs": {
|
|
9
9
|
"url": "https://stormsoftware.com/support",
|
|
@@ -54,61 +54,75 @@
|
|
|
54
54
|
"default": "./dist/index.mjs"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"./
|
|
57
|
+
"./config": {
|
|
58
58
|
"require": {
|
|
59
|
-
"types": "./dist/
|
|
60
|
-
"default": "./dist/
|
|
59
|
+
"types": "./dist/config.d.cts",
|
|
60
|
+
"default": "./dist/config.cjs"
|
|
61
61
|
},
|
|
62
62
|
"import": {
|
|
63
|
-
"types": "./dist/
|
|
64
|
-
"default": "./dist/
|
|
63
|
+
"types": "./dist/config.d.mts",
|
|
64
|
+
"default": "./dist/config.mjs"
|
|
65
65
|
},
|
|
66
66
|
"default": {
|
|
67
|
-
"types": "./dist/
|
|
68
|
-
"default": "./dist/
|
|
67
|
+
"types": "./dist/config.d.mts",
|
|
68
|
+
"default": "./dist/config.mjs"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
"./
|
|
71
|
+
"./context": {
|
|
72
72
|
"require": {
|
|
73
|
-
"types": "./dist/
|
|
74
|
-
"default": "./dist/
|
|
73
|
+
"types": "./dist/context.d.cts",
|
|
74
|
+
"default": "./dist/context.cjs"
|
|
75
75
|
},
|
|
76
76
|
"import": {
|
|
77
|
-
"types": "./dist/
|
|
78
|
-
"default": "./dist/
|
|
77
|
+
"types": "./dist/context.d.mts",
|
|
78
|
+
"default": "./dist/context.mjs"
|
|
79
79
|
},
|
|
80
80
|
"default": {
|
|
81
|
-
"types": "./dist/
|
|
82
|
-
"default": "./dist/
|
|
81
|
+
"types": "./dist/context.d.mts",
|
|
82
|
+
"default": "./dist/context.mjs"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"./
|
|
85
|
+
"./define": {
|
|
86
86
|
"require": {
|
|
87
|
-
"types": "./dist/
|
|
88
|
-
"default": "./dist/
|
|
87
|
+
"types": "./dist/define.d.cts",
|
|
88
|
+
"default": "./dist/define.cjs"
|
|
89
89
|
},
|
|
90
90
|
"import": {
|
|
91
|
-
"types": "./dist/
|
|
92
|
-
"default": "./dist/
|
|
91
|
+
"types": "./dist/define.d.mts",
|
|
92
|
+
"default": "./dist/define.mjs"
|
|
93
93
|
},
|
|
94
94
|
"default": {
|
|
95
|
-
"types": "./dist/
|
|
96
|
-
"default": "./dist/
|
|
95
|
+
"types": "./dist/define.d.mts",
|
|
96
|
+
"default": "./dist/define.mjs"
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"./package.json": "./package.json",
|
|
100
|
-
"./
|
|
100
|
+
"./type-checks": {
|
|
101
101
|
"require": {
|
|
102
|
-
"types": "./dist/
|
|
103
|
-
"default": "./dist/
|
|
102
|
+
"types": "./dist/type-checks.d.cts",
|
|
103
|
+
"default": "./dist/type-checks.cjs"
|
|
104
104
|
},
|
|
105
105
|
"import": {
|
|
106
|
-
"types": "./dist/
|
|
107
|
-
"default": "./dist/
|
|
106
|
+
"types": "./dist/type-checks.d.mts",
|
|
107
|
+
"default": "./dist/type-checks.mjs"
|
|
108
108
|
},
|
|
109
109
|
"default": {
|
|
110
|
-
"types": "./dist/
|
|
111
|
-
"default": "./dist/
|
|
110
|
+
"types": "./dist/type-checks.d.mts",
|
|
111
|
+
"default": "./dist/type-checks.mjs"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"./types/__internal": {
|
|
115
|
+
"require": {
|
|
116
|
+
"types": "./dist/types/__internal.d.cts",
|
|
117
|
+
"default": "./dist/types/__internal.cjs"
|
|
118
|
+
},
|
|
119
|
+
"import": {
|
|
120
|
+
"types": "./dist/types/__internal.d.mts",
|
|
121
|
+
"default": "./dist/types/__internal.mjs"
|
|
122
|
+
},
|
|
123
|
+
"default": {
|
|
124
|
+
"types": "./dist/types/__internal.d.mts",
|
|
125
|
+
"default": "./dist/types/__internal.mjs"
|
|
112
126
|
}
|
|
113
127
|
}
|
|
114
128
|
},
|
|
@@ -118,33 +132,18 @@
|
|
|
118
132
|
"typings": "dist/index.d.mts",
|
|
119
133
|
"files": ["dist"],
|
|
120
134
|
"dependencies": {
|
|
121
|
-
"@power-plant/schema": "^0.0.
|
|
122
|
-
"@
|
|
123
|
-
"@
|
|
124
|
-
"@
|
|
125
|
-
"@powerlines/plugin-automd": "^0.1.600",
|
|
126
|
-
"@stryke/convert": "^0.7.25",
|
|
127
|
-
"@stryke/date": "^0.0.6",
|
|
128
|
-
"@stryke/fs": "^0.33.95",
|
|
129
|
-
"@stryke/helpers": "^0.10.34",
|
|
130
|
-
"@stryke/json": "^0.15.18",
|
|
131
|
-
"@stryke/path": "^0.29.21",
|
|
132
|
-
"@stryke/resolve": "^0.0.10",
|
|
133
|
-
"@stryke/string-format": "^0.17.36",
|
|
134
|
-
"@stryke/type-checks": "^0.6.27",
|
|
135
|
-
"@stryke/types": "^0.12.22",
|
|
136
|
-
"@stryke/unique-id": "^0.3.106",
|
|
137
|
-
"automd": "^0.4.3",
|
|
135
|
+
"@power-plant/schema": "^0.0.7",
|
|
136
|
+
"@stryke/string-format": "^0.17.37",
|
|
137
|
+
"@stryke/type-checks": "^0.6.28",
|
|
138
|
+
"@stryke/types": "^0.12.23",
|
|
138
139
|
"defu": "^6.1.7",
|
|
139
|
-
"
|
|
140
|
-
"powerlines": "0.47.139",
|
|
141
|
-
"tsdown": "^0.22.3"
|
|
140
|
+
"unstorage": "^1.17.5"
|
|
142
141
|
},
|
|
143
142
|
"devDependencies": {
|
|
144
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
143
|
+
"@powerlines/plugin-tsdown": "^0.1.543",
|
|
145
144
|
"@types/node": "^25.9.4",
|
|
146
145
|
"typescript": "^6.0.3"
|
|
147
146
|
},
|
|
148
147
|
"publishConfig": { "access": "public" },
|
|
149
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "622dec3ff12d358e3f08b6317e16ab05d2073b76"
|
|
150
149
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isSetObject as e}from"@stryke/type-checks/is-set-object";import t from"defu";import{AsyncLocalStorage as n}from"node:async_hooks";import{debug as r,error as i,info as a,warn as o}from"node:console";import*as s from"node:fs";function c(t){return e(t)&&`schema`in t&&`input`in t&&`output`in t&&t.schema!==void 0&&t.input!==void 0&&t.output!==void 0}function l(e){if(!c(e))throw TypeError(`Invalid generator configuration provided.`);return e}function u(e={}){return{fs:t(e.fs,s),logger:t(e.logger,{debug:r,info:a,warn:o,error:i})}}const d=globalThis,f=`$$__power_plant_context__`,p=d[f]??(d[f]={asyncLocalStorage:new n,use(){let e=this.asyncLocalStorage.getStore();if(e===void 0)throw Error(`Context is not available`);return e},tryUse(){return this.asyncLocalStorage.getStore()},call(e,t){return this.asyncLocalStorage.run(e,t)},async callAsync(e,t){return this.asyncLocalStorage.run(e,t)}}),m=p.asyncLocalStorage,h=p.use,g=p.tryUse,_=p.call,v=p.callAsync;export{u as a,l as c,p as i,c as l,v as n,g as o,_ as r,h as s,m as t};
|
|
2
|
-
//# sourceMappingURL=context-BGSa-2fY.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-BGSa-2fY.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("@stryke/type-checks/is-set-object"),l=require("defu");l=s(l,1);let u=require("node:async_hooks"),d=require("node:console"),f=require("node:fs");f=s(f,1);function p(e){return(0,c.isSetObject)(e)&&`schema`in e&&`input`in e&&`output`in e&&e.schema!==void 0&&e.input!==void 0&&e.output!==void 0}function m(e){if(!p(e))throw TypeError(`Invalid generator configuration provided.`);return e}function h(e={}){return{fs:(0,l.default)(e.fs,f),logger:(0,l.default)(e.logger,{debug:d.debug,info:d.info,warn:d.warn,error:d.error})}}const g=globalThis,_=`$$__power_plant_context__`,v=g[_]??(g[_]={asyncLocalStorage:new u.AsyncLocalStorage,use(){let e=this.asyncLocalStorage.getStore();if(e===void 0)throw Error(`Context is not available`);return e},tryUse(){return this.asyncLocalStorage.getStore()},call(e,t){return this.asyncLocalStorage.run(e,t)},async callAsync(e,t){return this.asyncLocalStorage.run(e,t)}}),y=v.asyncLocalStorage,b=v.use,x=v.tryUse,S=v.call,C=v.callAsync;Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return y}});
|
package/dist/create-0IEoomGw.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./helpers-Botqc1jf.cjs"),t=require("./helpers-BcTg0l_X.cjs"),n=require("./create-D_u2Zj81.cjs");let r=require("@power-plant/schema"),i=require("@stryke/type-checks/is-function"),a=require("@stryke/resolve/load"),o=require("@stryke/resolve/type-checks");function s(t,n){let r=t?.schema??{},a=e.n(t,n);return a.description=e.i((0,i.isFunction)(a.title)?async(e,t)=>`Determines the ${await Promise.resolve(a.title(e,t))??``} specification from a {title} input.`:`Determines the ${a.title??``} specification from a {title} input.`,r,a,n?.description),a}async function c(e,i,l={}){let{input:u,meta:d,schema:f}=t.t(i)?i:{input:i,meta:{}},p=e;f&&(p=await n.t(f,l),p.schema=(0,r.mergeMetadata)(p.schema,e.schema));let m;if((0,o.isLoadReference)(u))try{let e=await(0,a.load)(u,l);m=t.t(e)?await c(p,e.input,l).then(e=>e.input):e}catch{}return m||=u,{schema:p,input:m,meta:s(p,d)}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
package/dist/create-CYRTmdJO.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t}from"./helpers-DwNCh4F3.mjs";import{t as n}from"./helpers-Cfl4NsE5.mjs";import{t as r}from"./create-DcfhZUHw.mjs";import{mergeMetadata as i}from"@power-plant/schema";import{isFunction as a}from"@stryke/type-checks/is-function";import{load as o}from"@stryke/resolve/load";import{isLoadReference as s}from"@stryke/resolve/type-checks";function c(n,r){let i=n?.schema??{},o=t(n,r);return o.description=e(a(o.title)?async(e,t)=>`Determines the ${await Promise.resolve(o.title(e,t))??``} specification from a {title} input.`:`Determines the ${o.title??``} specification from a {title} input.`,i,o,r?.description),o}async function l(e,t,a={}){let{input:u,meta:d,schema:f}=n(t)?t:{input:t,meta:{}},p=e;f&&(p=await r(f,a),p.schema=i(p.schema,e.schema));let m;if(s(u))try{let e=await o(u,a);m=n(e)?await l(p,e.input,a).then(e=>e.input):e}catch{}return m||=u,{schema:p,input:m,meta:c(p,d)}}export{c as n,l as t};
|
|
2
|
-
//# sourceMappingURL=create-CYRTmdJO.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-CYRTmdJO.mjs","names":[],"sources":[],"mappings":""}
|