@power-plant/core 0.0.3 → 0.0.4
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/create-23iLtMb_.cjs +1 -0
- package/dist/create-BR4IeVl4.mjs +2 -0
- package/dist/create-BR4IeVl4.mjs.map +1 -0
- package/dist/{create-DVpg-3po.d.mts → create-BqRl9d7m.d.cts} +2 -2
- package/dist/create-BqRl9d7m.d.cts.map +1 -0
- package/dist/create-C-rR8nuY.d.mts +23 -0
- package/dist/create-C-rR8nuY.d.mts.map +1 -0
- package/dist/create-Cz9qVT4m.d.cts +23 -0
- package/dist/create-Cz9qVT4m.d.cts.map +1 -0
- package/dist/create-DAGPeYVI.d.cts +25 -0
- package/dist/create-DAGPeYVI.d.cts.map +1 -0
- package/dist/create-DEe398aQ.d.mts +25 -0
- package/dist/create-DEe398aQ.d.mts.map +1 -0
- package/dist/create-DUt-efk7.d.cts +25 -0
- package/dist/create-DUt-efk7.d.cts.map +1 -0
- package/dist/{create-Cfgth9sz.d.cts → create-DcCu_zM3.d.mts} +2 -2
- package/dist/create-DcCu_zM3.d.mts.map +1 -0
- package/dist/create-Qxy2mq7r.d.mts +25 -0
- package/dist/create-Qxy2mq7r.d.mts.map +1 -0
- package/dist/define-BPfeEA9Z.d.cts +14 -0
- package/dist/define-BPfeEA9Z.d.cts.map +1 -0
- package/dist/define-CQZ042K5.d.mts +14 -0
- package/dist/define-CQZ042K5.d.mts.map +1 -0
- package/dist/{define-DEe-HPar.d.cts → define-Dw8JgVQ1.d.mts} +2 -2
- package/dist/define-Dw8JgVQ1.d.mts.map +1 -0
- package/dist/{define-RneysDu1.d.mts → define-aWeW6VVo.d.cts} +2 -2
- package/dist/{define-DEe-HPar.d.cts.map → define-aWeW6VVo.d.cts.map} +1 -1
- package/dist/generator/create.cjs +1 -1
- package/dist/generator/create.d.cts +1 -1
- package/dist/generator/create.d.mts +1 -1
- package/dist/generator/create.mjs +1 -1
- package/dist/generator/helpers.d.cts +1 -1
- package/dist/generator/helpers.d.mts +1 -1
- package/dist/generator/index.d.cts +1 -1
- package/dist/generator/index.d.mts +1 -1
- package/dist/{generator-MC25UERM.d.mts → generator-BGkKE8HQ.d.mts} +6 -5
- package/dist/generator-BGkKE8HQ.d.mts.map +1 -0
- package/dist/{generator-C1_Q-QAb.d.cts → generator-Dq0PL5w6.d.cts} +6 -5
- package/dist/generator-Dq0PL5w6.d.cts.map +1 -0
- package/dist/helpers-BqnQPaP5.d.cts +13 -0
- package/dist/helpers-BqnQPaP5.d.cts.map +1 -0
- package/dist/helpers-CgXgqnVu.d.mts +13 -0
- package/dist/helpers-CgXgqnVu.d.mts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -8
- package/dist/index.d.mts +12 -8
- package/dist/index.mjs +1 -1
- package/dist/schema/create.cjs +1 -0
- package/dist/schema/create.d.cts +2 -0
- package/dist/schema/create.d.mts +2 -0
- package/dist/schema/create.mjs +1 -0
- package/dist/schema/define.cjs +1 -0
- package/dist/schema/define.d.cts +2 -0
- package/dist/schema/define.d.mts +2 -0
- package/dist/schema/define.mjs +2 -0
- package/dist/schema/define.mjs.map +1 -0
- package/dist/schema/helpers.cjs +1 -0
- package/dist/schema/helpers.d.cts +2 -0
- package/dist/schema/helpers.d.mts +2 -0
- package/dist/schema/helpers.mjs +2 -0
- package/dist/schema/helpers.mjs.map +1 -0
- package/dist/schema/index.cjs +1 -0
- package/dist/schema/index.d.cts +4 -0
- package/dist/schema/index.d.mts +4 -0
- package/dist/schema/index.mjs +1 -0
- package/dist/schema-xFkmOyE6.d.cts +205 -0
- package/dist/schema-xFkmOyE6.d.cts.map +1 -0
- package/dist/schema-xFkmOyE6.d.mts +205 -0
- package/dist/schema-xFkmOyE6.d.mts.map +1 -0
- package/dist/sink/create.cjs +1 -1
- package/dist/sink/create.d.cts +1 -1
- package/dist/sink/create.d.mts +1 -1
- package/dist/sink/create.mjs +1 -1
- package/dist/sink/define.d.cts +1 -1
- package/dist/sink/define.d.mts +1 -1
- package/dist/sink/helpers.d.cts +1 -1
- package/dist/sink/helpers.d.mts +1 -1
- package/dist/sink/index.d.cts +1 -1
- package/dist/sink/index.d.mts +1 -1
- package/dist/{sink-CAWlC7am.d.mts → sink-CHQncb8H.d.mts} +7 -7
- package/dist/sink-CHQncb8H.d.mts.map +1 -0
- package/dist/{sink-CTx7UtqU.d.cts → sink-DHpx94GM.d.cts} +7 -7
- package/dist/sink-DHpx94GM.d.cts.map +1 -0
- package/dist/source/create.cjs +1 -1
- package/dist/source/create.d.cts +1 -1
- package/dist/source/create.d.mts +1 -1
- package/dist/source/create.mjs +1 -1
- package/dist/source/define.d.cts +1 -1
- package/dist/source/define.d.mts +1 -1
- package/dist/source/helpers.d.cts +1 -1
- package/dist/source/helpers.d.mts +1 -1
- package/dist/source/index.d.cts +2 -2
- package/dist/source/index.d.mts +2 -2
- package/dist/{source-B3tctCZE.d.cts → source-BiOs3_-8.d.mts} +7 -7
- package/dist/source-BiOs3_-8.d.mts.map +1 -0
- package/dist/{source-DjKhYXZ6.d.mts → source-txi0ZuzR.d.cts} +7 -7
- package/dist/source-txi0ZuzR.d.cts.map +1 -0
- package/package.json +73 -13
- package/dist/base-BKbfgxno.d.cts +0 -28
- package/dist/base-BKbfgxno.d.cts.map +0 -1
- package/dist/base-BKbfgxno.d.mts +0 -28
- package/dist/base-BKbfgxno.d.mts.map +0 -1
- package/dist/create-B14Jt6Iu.d.mts +0 -17
- package/dist/create-B14Jt6Iu.d.mts.map +0 -1
- package/dist/create-Cfgth9sz.d.cts.map +0 -1
- package/dist/create-D32Jusq_.d.cts +0 -17
- package/dist/create-D32Jusq_.d.cts.map +0 -1
- package/dist/create-DVpg-3po.d.mts.map +0 -1
- package/dist/create-DoyLue8r.d.cts +0 -17
- package/dist/create-DoyLue8r.d.cts.map +0 -1
- package/dist/create-vgEDsShD.d.mts +0 -17
- package/dist/create-vgEDsShD.d.mts.map +0 -1
- package/dist/define-RneysDu1.d.mts.map +0 -1
- package/dist/generator-C1_Q-QAb.d.cts.map +0 -1
- package/dist/generator-MC25UERM.d.mts.map +0 -1
- package/dist/metadata-Cb6iMZqW.cjs +0 -1
- package/dist/metadata-Dmhrb3Kv.mjs +0 -2
- package/dist/metadata-Dmhrb3Kv.mjs.map +0 -1
- package/dist/sink-CAWlC7am.d.mts.map +0 -1
- package/dist/sink-CTx7UtqU.d.cts.map +0 -1
- package/dist/source-B3tctCZE.d.cts.map +0 -1
- package/dist/source-DjKhYXZ6.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./schema/helpers.cjs");let t=require("@stryke/type-checks/is-function"),n=require("@power-plant/schema/extract"),r=require("@power-plant/schema/codegen"),i=require("@power-plant/schema/type-checks"),a=require("@stryke/convert/to-array"),o=require("@stryke/helpers/get-unique"),s=require("@stryke/string-format/kebab-case"),c=require("@stryke/string-format/title-case"),l=require("@stryke/type-checks/is-date"),u=require("@stryke/type-checks/is-number"),d=require("@stryke/type-checks/is-set-object"),f=require("@stryke/type-checks/is-set-string");function p(e,t){let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`),a=t?.separator??`-`;return`${n}${a}${r}${a}${i}`}function m(e){return Number.isInteger(e)&&e>=0}Array.from({length:26},(e,t)=>String.fromCodePoint(t+97));function h(e){if(e===null)throw TypeError(`array cannot be null`);for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function g(e=21){return h(new Uint8Array(e)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+=`-`:e+=`_`,e),``)}function _(e){return(0,l.isDate)(e)?p(e):(0,u.isNumber)(e)?m(e)&&e>1e9?p(new Date(e)):e.toString():(0,f.isSetString)(e)?e:`1.0`}function v(e,n,r){let i=r??n?.version??e?.version;return(0,t.isFunction)(i)?async(e,t)=>_(await Promise.resolve(i(e,t))):_(i)}function y(e,t,n){return n??t.name??((0,f.isSetString)(e?.name)?e.name:(0,f.isSetString)(e?.title)?e.title:e.$id?(0,s.kebabCase)(e.$id):(0,r.stringifyType)(e))}function b(e,n){let r=y(e,n),i=v(e,n);return r?(0,t.isFunction)(r)?(0,t.isFunction)(i)?async(e,t)=>`${(0,s.kebabCase)(await Promise.resolve(r(e,t)))}@${await Promise.resolve(i(e,t))}`:async(e,t)=>`${(0,s.kebabCase)(await Promise.resolve(r(e,t)))}@${i}`:(0,t.isFunction)(i)?async(e,t)=>`${(0,s.kebabCase)(r)}@${await Promise.resolve(i(e,t))}`:`${(0,s.kebabCase)(r)}@${i}`:g()}function x(e,n,i){let a=i??n.title??e?.title;if(a!==void 0)return a;let o=n.name;return(0,t.isFunction)(o)?async(e,t)=>(0,c.titleCase)(await Promise.resolve(o(e,t))):(0,c.titleCase)(o??(0,r.stringifyType)(e))}function S(e,n,r,i){r.title??=x(n,r);let a=r.title,o=(0,t.isFunction)(a)?async(n,r)=>(0,t.isFunction)(e)?(await Promise.resolve(e(n,r))).replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a(n,r))):e.replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a(n,r))):(0,t.isFunction)(e)?async(t,n)=>(await Promise.resolve(e(t,n))).replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a)):e.replaceAll(/\{\s*title\s*\}/g,a),s=i??r.description??n?.description;if((0,t.isFunction)(s)){let e=s;return async(n,r)=>{let i=await Promise.resolve(e(n,r));return(0,f.isSetString)(i)?i:(0,t.isFunction)(o)?Promise.resolve(o(n,r)):Promise.resolve(o)}}return(0,f.isSetString)(s)?s:o}function C(e,n,r){let i=e=>e.map((e,t)=>(0,f.isSetString)(e)?{name:`example-${t+1}`,description:`Example Specification #${t+1}`,value:e}:(0,d.isSetObject)(e)&&`value`in e&&(0,f.isSetString)(e.value)?{name:`example-${t+1}`,description:e.description||`Example Specification #${t+1}`,value:e.value}:void 0).filter(Boolean),o=r??n.examples??e?.examples??[];return(0,t.isFunction)(o)?async(e,t)=>i((0,a.toArray)(await Promise.resolve(o(e,t)))):i((0,a.toArray)(o))}function w(e,n,r){return(0,t.isFunction)(r)||(0,t.isFunction)(n.links)?async(i,s)=>(0,o.getUnique)((0,a.toArray)((0,t.isFunction)(r)?await Promise.resolve(r(i,s)):r).concat((0,t.isFunction)(n.links)?await Promise.resolve(n.links(i,s)):n.links??[]).concat(e?.docs??[])):(0,o.getUnique)((0,a.toArray)(r).concat(n.links??[]).concat(e?.docs??[]))}function T(e,t){let n=(0,i.isSchemaOf)(e)?e:e??{schema:{}},r={};return r.name=y(n?.schema,r,t?.name),r.version=v(n?.schema,r,t?.version),r.id=b(n?.schema,r),r.title=x(n?.schema,r,t?.title),r.links=w(n?.schema,r,t?.links),t?.deprecated&&(r.deprecated=t?.deprecated),t?.usage&&(r.usage=t?.usage),t?.tags&&(r.tags=t?.tags),r}function E(e,n){let r=e?.schema??{},i=T(e,n);return i.description=S((0,t.isFunction)(i.title)?async(e,t)=>`Accepts a ${await Promise.resolve(i.title(e,t))??``} specification and processes it with a {title} sink.`:`Accepts a ${i.title??``} specification and processes it with a {title} sink.`,r,i,n?.description),i.examples=C(r,i,n?.examples),i}async function D(t,r={}){let{meta:i,schema:a}=e.isSchemaInputObject(t)?t:{schema:t,meta:{}},o=await(0,n.extractSchemaWithSource)(a,r);return{...o,meta:E(o,i)}}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return D}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isSchemaInputObject as e}from"./schema/helpers.mjs";import{isFunction as t}from"@stryke/type-checks/is-function";import{extractSchemaWithSource as n}from"@power-plant/schema/extract";import{stringifyType as r}from"@power-plant/schema/codegen";import{isSchemaOf as i}from"@power-plant/schema/type-checks";import{toArray as a}from"@stryke/convert/to-array";import{getUnique as o}from"@stryke/helpers/get-unique";import{kebabCase as s}from"@stryke/string-format/kebab-case";import{titleCase as c}from"@stryke/string-format/title-case";import{isDate as l}from"@stryke/type-checks/is-date";import{isNumber as u}from"@stryke/type-checks/is-number";import{isSetObject as d}from"@stryke/type-checks/is-set-object";import{isSetString as f}from"@stryke/type-checks/is-set-string";function p(e,t){let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`),a=t?.separator??`-`;return`${n}${a}${r}${a}${i}`}function m(e){return Number.isInteger(e)&&e>=0}Array.from({length:26},(e,t)=>String.fromCodePoint(t+97));function h(e){if(e===null)throw TypeError(`array cannot be null`);for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function g(e=21){return h(new Uint8Array(e)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+=`-`:e+=`_`,e),``)}function _(e){return l(e)?p(e):u(e)?m(e)&&e>1e9?p(new Date(e)):e.toString():f(e)?e:`1.0`}function v(e,n,r){let i=r??n?.version??e?.version;return t(i)?async(e,t)=>_(await Promise.resolve(i(e,t))):_(i)}function y(e,t,n){return n??t.name??(f(e?.name)?e.name:f(e?.title)?e.title:e.$id?s(e.$id):r(e))}function b(e,n){let r=y(e,n),i=v(e,n);return r?t(r)?t(i)?async(e,t)=>`${s(await Promise.resolve(r(e,t)))}@${await Promise.resolve(i(e,t))}`:async(e,t)=>`${s(await Promise.resolve(r(e,t)))}@${i}`:t(i)?async(e,t)=>`${s(r)}@${await Promise.resolve(i(e,t))}`:`${s(r)}@${i}`:g()}function x(e,n,i){let a=i??n.title??e?.title;if(a!==void 0)return a;let o=n.name;return t(o)?async(e,t)=>c(await Promise.resolve(o(e,t))):c(o??r(e))}function S(e,n,r,i){r.title??=x(n,r);let a=r.title,o=t(a)?async(n,r)=>t(e)?(await Promise.resolve(e(n,r))).replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a(n,r))):e.replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a(n,r))):t(e)?async(t,n)=>(await Promise.resolve(e(t,n))).replaceAll(/\{\s*title\s*\}/g,await Promise.resolve(a)):e.replaceAll(/\{\s*title\s*\}/g,a),s=i??r.description??n?.description;if(t(s)){let e=s;return async(n,r)=>{let i=await Promise.resolve(e(n,r));return f(i)?i:t(o)?Promise.resolve(o(n,r)):Promise.resolve(o)}}return f(s)?s:o}function C(e,n,r){let i=e=>e.map((e,t)=>f(e)?{name:`example-${t+1}`,description:`Example Specification #${t+1}`,value:e}:d(e)&&`value`in e&&f(e.value)?{name:`example-${t+1}`,description:e.description||`Example Specification #${t+1}`,value:e.value}:void 0).filter(Boolean),o=r??n.examples??e?.examples??[];return t(o)?async(e,t)=>i(a(await Promise.resolve(o(e,t)))):i(a(o))}function w(e,n,r){return t(r)||t(n.links)?async(i,s)=>o(a(t(r)?await Promise.resolve(r(i,s)):r).concat(t(n.links)?await Promise.resolve(n.links(i,s)):n.links??[]).concat(e?.docs??[])):o(a(r).concat(n.links??[]).concat(e?.docs??[]))}function T(e,t){let n=i(e)?e:e??{schema:{}},r={};return r.name=y(n?.schema,r,t?.name),r.version=v(n?.schema,r,t?.version),r.id=b(n?.schema,r),r.title=x(n?.schema,r,t?.title),r.links=w(n?.schema,r,t?.links),t?.deprecated&&(r.deprecated=t?.deprecated),t?.usage&&(r.usage=t?.usage),t?.tags&&(r.tags=t?.tags),r}function E(e,n){let r=e?.schema??{},i=T(e,n);return i.description=S(t(i.title)?async(e,t)=>`Accepts a ${await Promise.resolve(i.title(e,t))??``} specification and processes it with a {title} sink.`:`Accepts a ${i.title??``} specification and processes it with a {title} sink.`,r,i,n?.description),i.examples=C(r,i,n?.examples),i}async function D(t,r={}){let{meta:i,schema:a}=e(t)?t:{schema:t,meta:{}},o=await n(a,r);return{...o,meta:E(o,i)}}export{S as i,E as n,T as r,D as t};
|
|
2
|
+
//# sourceMappingURL=create-BR4IeVl4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-BR4IeVl4.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator } from "./generator-
|
|
1
|
+
import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator } from "./generator-Dq0PL5w6.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/generator/create.d.ts
|
|
4
4
|
/**
|
|
@@ -16,4 +16,4 @@ import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator }
|
|
|
16
16
|
declare function createGenerator<TSpec, TOptions extends object, TReturns = void>(input: GeneratorInput<TSpec, TOptions, TReturns>, options?: InferCreateGeneratorOptions<typeof input>): Promise<Generator<TSpec, TOptions, TReturns>>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { createGenerator as t };
|
|
19
|
-
//# sourceMappingURL=create-
|
|
19
|
+
//# sourceMappingURL=create-BqRl9d7m.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-BqRl9d7m.d.cts","names":[],"sources":["../src/generator/create.ts"],"mappings":";;;;;AA4CA;;;;;;;;;;iBAAsB,eAAA,kDAKpB,KAAA,EAAO,cAAA,CAAe,KAAA,EAAO,QAAA,EAAU,QAAA,GACvC,OAAA,GAAS,2BAAA,QAAmC,KAAA,IAC3C,OAAA,CAAQ,SAAA,CAAU,KAAA,EAAO,QAAA,EAAU,QAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { i as SchemaMeta, o as SchemaMetaInput, r as SchemaInputObject, s as SchemaOf, t as InferCreateSchemaOptions } from "./schema-xFkmOyE6.mjs";
|
|
2
|
+
import { ExtractedSchemaEnvelope, SchemaEnvelopeOf, SchemaSourceInput } from "@power-plant/schema/types";
|
|
3
|
+
|
|
4
|
+
//#region src/schema/create.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Extracts and normalizes {@link SchemaMeta | schema metadata} from a given {@link SchemaMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
|
|
7
|
+
*
|
|
8
|
+
* @param schema - The schema from which to extract metadata.
|
|
9
|
+
* @param input - The schema metadata input to extract and normalize.
|
|
10
|
+
* @returns The normalized schema metadata.
|
|
11
|
+
*/
|
|
12
|
+
declare function extractSchemaMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec>, input?: SchemaMetaInput<TSpec, TOptions>): SchemaMeta<TSpec, TOptions>;
|
|
13
|
+
/**
|
|
14
|
+
* Normalizes any accepted schema input into a concrete schema descriptor.
|
|
15
|
+
*
|
|
16
|
+
* @param input - The schema input to normalize.
|
|
17
|
+
* @param options - Optional options for resolving the schema input.
|
|
18
|
+
* @returns A promise that resolves to a normalized schema descriptor.
|
|
19
|
+
*/
|
|
20
|
+
declare function createSchema<TSpec, TOptions extends object>(input: SchemaSourceInput<TSpec> | SchemaEnvelopeOf<TSpec> | SchemaInputObject<TSpec, TOptions>, options?: InferCreateSchemaOptions<typeof input>): Promise<SchemaOf<TSpec, TOptions>>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { extractSchemaMeta as n, createSchema as t };
|
|
23
|
+
//# sourceMappingURL=create-C-rR8nuY.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-C-rR8nuY.d.mts","names":[],"sources":["../src/schema/create.ts"],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { i as SchemaMeta, o as SchemaMetaInput, r as SchemaInputObject, s as SchemaOf, t as InferCreateSchemaOptions } from "./schema-xFkmOyE6.cjs";
|
|
2
|
+
import { ExtractedSchemaEnvelope, SchemaEnvelopeOf, SchemaSourceInput } from "@power-plant/schema/types";
|
|
3
|
+
|
|
4
|
+
//#region src/schema/create.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Extracts and normalizes {@link SchemaMeta | schema metadata} from a given {@link SchemaMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
|
|
7
|
+
*
|
|
8
|
+
* @param schema - The schema from which to extract metadata.
|
|
9
|
+
* @param input - The schema metadata input to extract and normalize.
|
|
10
|
+
* @returns The normalized schema metadata.
|
|
11
|
+
*/
|
|
12
|
+
declare function extractSchemaMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec>, input?: SchemaMetaInput<TSpec, TOptions>): SchemaMeta<TSpec, TOptions>;
|
|
13
|
+
/**
|
|
14
|
+
* Normalizes any accepted schema input into a concrete schema descriptor.
|
|
15
|
+
*
|
|
16
|
+
* @param input - The schema input to normalize.
|
|
17
|
+
* @param options - Optional options for resolving the schema input.
|
|
18
|
+
* @returns A promise that resolves to a normalized schema descriptor.
|
|
19
|
+
*/
|
|
20
|
+
declare function createSchema<TSpec, TOptions extends object>(input: SchemaSourceInput<TSpec> | SchemaEnvelopeOf<TSpec> | SchemaInputObject<TSpec, TOptions>, options?: InferCreateSchemaOptions<typeof input>): Promise<SchemaOf<TSpec, TOptions>>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { extractSchemaMeta as n, createSchema as t };
|
|
23
|
+
//# sourceMappingURL=create-Cz9qVT4m.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-Cz9qVT4m.d.cts","names":[],"sources":["../src/schema/create.ts"],"mappings":";;;;;;AA8CA;;;;;iBAAgB,iBAAA,iCACd,MAAA,EAAQ,uBAAA,CAAwB,KAAA,GAChC,KAAA,GAAQ,eAAA,CAAgB,KAAA,EAAO,QAAA,IAC9B,UAAA,CAAW,KAAA,EAAO,QAAA;;;;;;;;iBAoCC,YAAA,iCACpB,KAAA,EACI,iBAAA,CAAkB,KAAA,IAClB,gBAAA,CAAiB,KAAA,IACjB,iBAAA,CAAkB,KAAA,EAAO,QAAA,GAC7B,OAAA,GAAS,wBAAA,QAAgC,KAAA,IACxC,OAAA,CAAQ,QAAA,CAAS,KAAA,EAAO,QAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { s as SchemaOf } from "./schema-xFkmOyE6.cjs";
|
|
2
|
+
import { i as SinkInput, n as Sink, o as SinkMeta, s as SinkMetaInput, t as InferCreateSinkOptions } from "./sink-DHpx94GM.cjs";
|
|
3
|
+
import { ExtractedSchemaEnvelope } from "@power-plant/schema/types";
|
|
4
|
+
|
|
5
|
+
//#region src/sink/create.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Extracts and normalizes {@link SinkMeta | sink metadata} from a given {@link SinkMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema that the sink input is expected to conform to.
|
|
10
|
+
* @param input - The sink metadata input to extract and normalize.
|
|
11
|
+
* @returns The normalized sink metadata.
|
|
12
|
+
*/
|
|
13
|
+
declare function extractSinkMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, input?: SinkMetaInput<TSpec, TOptions>): SinkMeta<TSpec, TOptions>;
|
|
14
|
+
/**
|
|
15
|
+
* Normalizes any accepted sink input into a concrete sink descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @param schema - The schema that the sink input is expected to conform to.
|
|
18
|
+
* @param input - The sink input to normalize.
|
|
19
|
+
* @param options - Optional options for resolving the sink input.
|
|
20
|
+
* @returns A promise that resolves to a normalized sink descriptor.
|
|
21
|
+
*/
|
|
22
|
+
declare function createSink<TSpec, TOptions extends object, TReturns = void>(schema: SchemaOf<TSpec, TOptions>, input: SinkInput<TSpec, TOptions, TReturns>, options?: InferCreateSinkOptions<typeof input>): Promise<Sink<TSpec, TOptions, TReturns>>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { extractSinkMeta as n, createSink as t };
|
|
25
|
+
//# sourceMappingURL=create-DAGPeYVI.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-DAGPeYVI.d.cts","names":[],"sources":["../src/sink/create.ts"],"mappings":";;;;;;;AA2CA;;;;;iBAAgB,eAAA,iCACd,MAAA,EAAQ,uBAAA,CAAwB,KAAA,IAAS,QAAA,CAAS,KAAA,EAAO,QAAA,GACzD,KAAA,GAAQ,aAAA,CAAc,KAAA,EAAO,QAAA,IAC5B,QAAA,CAAS,KAAA,EAAO,QAAA;;;;;;;;;iBAoCG,UAAA,kDAKpB,MAAA,EAAQ,QAAA,CAAS,KAAA,EAAO,QAAA,GACxB,KAAA,EAAO,SAAA,CAAU,KAAA,EAAO,QAAA,EAAU,QAAA,GAClC,OAAA,GAAS,sBAAA,QAA8B,KAAA,IACtC,OAAA,CAAQ,IAAA,CAAK,KAAA,EAAO,QAAA,EAAU,QAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { s as SchemaOf } from "./schema-xFkmOyE6.mjs";
|
|
2
|
+
import { i as SinkInput, n as Sink, o as SinkMeta, s as SinkMetaInput, t as InferCreateSinkOptions } from "./sink-CHQncb8H.mjs";
|
|
3
|
+
import { ExtractedSchemaEnvelope } from "@power-plant/schema/types";
|
|
4
|
+
|
|
5
|
+
//#region src/sink/create.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Extracts and normalizes {@link SinkMeta | sink metadata} from a given {@link SinkMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema that the sink input is expected to conform to.
|
|
10
|
+
* @param input - The sink metadata input to extract and normalize.
|
|
11
|
+
* @returns The normalized sink metadata.
|
|
12
|
+
*/
|
|
13
|
+
declare function extractSinkMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, input?: SinkMetaInput<TSpec, TOptions>): SinkMeta<TSpec, TOptions>;
|
|
14
|
+
/**
|
|
15
|
+
* Normalizes any accepted sink input into a concrete sink descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @param schema - The schema that the sink input is expected to conform to.
|
|
18
|
+
* @param input - The sink input to normalize.
|
|
19
|
+
* @param options - Optional options for resolving the sink input.
|
|
20
|
+
* @returns A promise that resolves to a normalized sink descriptor.
|
|
21
|
+
*/
|
|
22
|
+
declare function createSink<TSpec, TOptions extends object, TReturns = void>(schema: SchemaOf<TSpec, TOptions>, input: SinkInput<TSpec, TOptions, TReturns>, options?: InferCreateSinkOptions<typeof input>): Promise<Sink<TSpec, TOptions, TReturns>>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { extractSinkMeta as n, createSink as t };
|
|
25
|
+
//# sourceMappingURL=create-DEe398aQ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-DEe398aQ.d.mts","names":[],"sources":["../src/sink/create.ts"],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { s as SchemaOf } from "./schema-xFkmOyE6.cjs";
|
|
2
|
+
import { i as SourceInput, n as Source, o as SourceMeta, s as SourceMetaInput, t as InferCreateSourceOptions } from "./source-txi0ZuzR.cjs";
|
|
3
|
+
import { ExtractedSchemaEnvelope } from "@power-plant/schema/types";
|
|
4
|
+
|
|
5
|
+
//#region src/source/create.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Extracts and normalizes {@link SourceMeta | source metadata} from a given {@link SourceMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema that the source input is expected to conform to.
|
|
10
|
+
* @param input - The source metadata input to extract and normalize.
|
|
11
|
+
* @returns The normalized source metadata.
|
|
12
|
+
*/
|
|
13
|
+
declare function extractSourceMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, input?: SourceMetaInput<TSpec, TOptions>): SourceMeta<TSpec, TOptions>;
|
|
14
|
+
/**
|
|
15
|
+
* Normalizes any accepted source input into a concrete source descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @param schema - The schema that the source input is expected to conform to.
|
|
18
|
+
* @param input - The source input to normalize.
|
|
19
|
+
* @param options - Optional options for resolving the source input.
|
|
20
|
+
* @returns A promise that resolves to a normalized source descriptor.
|
|
21
|
+
*/
|
|
22
|
+
declare function createSource<TSpec, TOptions extends object>(schema: SchemaOf<TSpec, TOptions>, input: SourceInput<TSpec, TOptions>, options?: InferCreateSourceOptions<typeof input>): Promise<Source<TSpec, TOptions>>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { extractSourceMeta as n, createSource as t };
|
|
25
|
+
//# sourceMappingURL=create-DUt-efk7.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-DUt-efk7.d.cts","names":[],"sources":["../src/source/create.ts"],"mappings":";;;;;;;AA2CA;;;;;iBAAgB,iBAAA,iCACd,MAAA,EAAQ,uBAAA,CAAwB,KAAA,IAAS,QAAA,CAAS,KAAA,EAAO,QAAA,GACzD,KAAA,GAAQ,eAAA,CAAgB,KAAA,EAAO,QAAA,IAC9B,UAAA,CAAW,KAAA,EAAO,QAAA;;;;;;;;;iBAoCC,YAAA,iCACpB,MAAA,EAAQ,QAAA,CAAS,KAAA,EAAO,QAAA,GACxB,KAAA,EAAO,WAAA,CAAY,KAAA,EAAO,QAAA,GAC1B,OAAA,GAAS,wBAAA,QAAgC,KAAA,IACxC,OAAA,CAAQ,MAAA,CAAO,KAAA,EAAO,QAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator } from "./generator-
|
|
1
|
+
import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator } from "./generator-BGkKE8HQ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/generator/create.d.ts
|
|
4
4
|
/**
|
|
@@ -16,4 +16,4 @@ import { a as InferCreateGeneratorOptions, n as GeneratorInput, t as Generator }
|
|
|
16
16
|
declare function createGenerator<TSpec, TOptions extends object, TReturns = void>(input: GeneratorInput<TSpec, TOptions, TReturns>, options?: InferCreateGeneratorOptions<typeof input>): Promise<Generator<TSpec, TOptions, TReturns>>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { createGenerator as t };
|
|
19
|
-
//# sourceMappingURL=create-
|
|
19
|
+
//# sourceMappingURL=create-DcCu_zM3.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-DcCu_zM3.d.mts","names":[],"sources":["../src/generator/create.ts"],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { s as SchemaOf } from "./schema-xFkmOyE6.mjs";
|
|
2
|
+
import { i as SourceInput, n as Source, o as SourceMeta, s as SourceMetaInput, t as InferCreateSourceOptions } from "./source-BiOs3_-8.mjs";
|
|
3
|
+
import { ExtractedSchemaEnvelope } from "@power-plant/schema/types";
|
|
4
|
+
|
|
5
|
+
//#region src/source/create.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Extracts and normalizes {@link SourceMeta | source metadata} from a given {@link SourceMetaInput}. This function ensures that the metadata is in a consistent format, converting version numbers to strings and filtering out any invalid or empty tags.
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema that the source input is expected to conform to.
|
|
10
|
+
* @param input - The source metadata input to extract and normalize.
|
|
11
|
+
* @returns The normalized source metadata.
|
|
12
|
+
*/
|
|
13
|
+
declare function extractSourceMeta<TSpec, TOptions extends object>(schema: ExtractedSchemaEnvelope<TSpec> | SchemaOf<TSpec, TOptions>, input?: SourceMetaInput<TSpec, TOptions>): SourceMeta<TSpec, TOptions>;
|
|
14
|
+
/**
|
|
15
|
+
* Normalizes any accepted source input into a concrete source descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @param schema - The schema that the source input is expected to conform to.
|
|
18
|
+
* @param input - The source input to normalize.
|
|
19
|
+
* @param options - Optional options for resolving the source input.
|
|
20
|
+
* @returns A promise that resolves to a normalized source descriptor.
|
|
21
|
+
*/
|
|
22
|
+
declare function createSource<TSpec, TOptions extends object>(schema: SchemaOf<TSpec, TOptions>, input: SourceInput<TSpec, TOptions>, options?: InferCreateSourceOptions<typeof input>): Promise<Source<TSpec, TOptions>>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { extractSourceMeta as n, createSource as t };
|
|
25
|
+
//# sourceMappingURL=create-Qxy2mq7r.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-Qxy2mq7r.d.mts","names":[],"sources":["../src/source/create.ts"],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { r as SchemaInputObject } from "./schema-xFkmOyE6.cjs";
|
|
2
|
+
import { SchemaEnvelopeOf, SchemaSourceInput } from "@power-plant/schema/types";
|
|
3
|
+
|
|
4
|
+
//#region src/schema/define.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Defines a schema input object. If the provided schema is already a schema input object, it will be returned as-is. Otherwise, it will be wrapped in an object with a `schema` property.
|
|
7
|
+
*
|
|
8
|
+
* @param schema - The schema input to define. This can be either a schema source input, a schema envelope, or a schema input object.
|
|
9
|
+
* @returns A schema input object that contains the provided schema. If the input was already a schema input object, it will be returned unchanged.
|
|
10
|
+
*/
|
|
11
|
+
declare function defineSchema<TSpec, TOptions extends object>(schema: SchemaSourceInput<TSpec> | SchemaEnvelopeOf<TSpec> | SchemaInputObject<TSpec, TOptions>): SchemaInputObject<TSpec, TOptions>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { defineSchema as t };
|
|
14
|
+
//# sourceMappingURL=define-BPfeEA9Z.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-BPfeEA9Z.d.cts","names":[],"sources":["../src/schema/define.ts"],"mappings":";;;;;;AA+BA;;;;iBAAgB,YAAA,iCACd,MAAA,EACI,iBAAA,CAAkB,KAAA,IAClB,gBAAA,CAAiB,KAAA,IACjB,iBAAA,CAAkB,KAAA,EAAO,QAAA,IAC5B,iBAAA,CAAkB,KAAA,EAAO,QAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { r as SchemaInputObject } from "./schema-xFkmOyE6.mjs";
|
|
2
|
+
import { SchemaEnvelopeOf, SchemaSourceInput } from "@power-plant/schema/types";
|
|
3
|
+
|
|
4
|
+
//#region src/schema/define.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Defines a schema input object. If the provided schema is already a schema input object, it will be returned as-is. Otherwise, it will be wrapped in an object with a `schema` property.
|
|
7
|
+
*
|
|
8
|
+
* @param schema - The schema input to define. This can be either a schema source input, a schema envelope, or a schema input object.
|
|
9
|
+
* @returns A schema input object that contains the provided schema. If the input was already a schema input object, it will be returned unchanged.
|
|
10
|
+
*/
|
|
11
|
+
declare function defineSchema<TSpec, TOptions extends object>(schema: SchemaSourceInput<TSpec> | SchemaEnvelopeOf<TSpec> | SchemaInputObject<TSpec, TOptions>): SchemaInputObject<TSpec, TOptions>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { defineSchema as t };
|
|
14
|
+
//# sourceMappingURL=define-CQZ042K5.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-CQZ042K5.d.mts","names":[],"sources":["../src/schema/define.ts"],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SourceInputObject, i as SourceInput } from "./source-
|
|
1
|
+
import { a as SourceInputObject, i as SourceInput } from "./source-BiOs3_-8.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/source/define.d.ts
|
|
4
4
|
/**
|
|
@@ -35,4 +35,4 @@ import { a as SourceInputObject, i as SourceInput } from "./source-B3tctCZE.cjs"
|
|
|
35
35
|
declare function defineSource<TSpec, TOptions extends object>(source: SourceInput<TSpec, TOptions>): SourceInputObject<TSpec, TOptions>;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { defineSource as t };
|
|
38
|
-
//# sourceMappingURL=define-
|
|
38
|
+
//# sourceMappingURL=define-Dw8JgVQ1.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-Dw8JgVQ1.d.mts","names":[],"sources":["../src/source/define.ts"],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SourceInputObject, i as SourceInput } from "./source-
|
|
1
|
+
import { a as SourceInputObject, i as SourceInput } from "./source-txi0ZuzR.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/source/define.d.ts
|
|
4
4
|
/**
|
|
@@ -35,4 +35,4 @@ import { a as SourceInputObject, i as SourceInput } from "./source-DjKhYXZ6.mjs"
|
|
|
35
35
|
declare function defineSource<TSpec, TOptions extends object>(source: SourceInput<TSpec, TOptions>): SourceInputObject<TSpec, TOptions>;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { defineSource as t };
|
|
38
|
-
//# sourceMappingURL=define-
|
|
38
|
+
//# sourceMappingURL=define-aWeW6VVo.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-
|
|
1
|
+
{"version":3,"file":"define-aWeW6VVo.d.cts","names":[],"sources":["../src/source/define.ts"],"mappings":";;;;;AAoDA;;;;;;;;;;;;;;;;;;;;;AAEoC;;;;;;;;iBAFpB,YAAA,iCACd,MAAA,EAAQ,WAAA,CAAY,KAAA,EAAO,QAAA,IAC1B,iBAAA,CAAkB,KAAA,EAAO,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../create-23iLtMb_.cjs"),t=require("../sink/create.cjs"),n=require("../source/create.cjs"),r=require("./helpers.cjs");let i=require("@stryke/resolve/load"),a=require("@stryke/type-checks/is-function");async function o(o,s={}){let c;c=r.isGeneratorInputObject(o)?o:await(0,i.load)(o,s);let l=await e.t(c.schema,s),[u,d]=await Promise.all([n.createSource(l,c.source,s),t.createSink(l,c.sink,s)]);return{meta:c.meta,schema:l,source:u,sink:d,generate:async e=>{let t=(0,a.isFunction)(u.source)?await u.source(e):u.source,n=typeof c.meta?.description==`function`?c.meta.description(t):c.meta?.description;return n&&console.log(`Generating ${n}...`),d.sink(t,e)}}}exports.createGenerator=o;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createGenerator } from "../create-
|
|
1
|
+
import { t as createGenerator } from "../create-BqRl9d7m.cjs";
|
|
2
2
|
export { createGenerator };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createGenerator } from "../create-
|
|
1
|
+
import { t as createGenerator } from "../create-DcCu_zM3.mjs";
|
|
2
2
|
export { createGenerator };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"../create-BR4IeVl4.mjs";import{createSink as t}from"../sink/create.mjs";import{createSource as n}from"../source/create.mjs";import{isGeneratorInputObject as r}from"./helpers.mjs";import{load as i}from"@stryke/resolve/load";import{isFunction as a}from"@stryke/type-checks/is-function";async function o(o,s={}){let c;c=r(o)?o:await i(o,s);let l=await e(c.schema,s),[u,d]=await Promise.all([n(l,c.source,s),t(l,c.sink,s)]);return{meta:c.meta,schema:l,source:u,sink:d,generate:async e=>{let t=a(u.source)?await u.source(e):u.source,n=typeof c.meta?.description==`function`?c.meta.description(t):c.meta?.description;return n&&console.log(`Generating ${n}...`),d.sink(t,e)}}}export{o as createGenerator};
|
|
2
2
|
//# sourceMappingURL=create.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as GeneratorInputObject } from "../generator-
|
|
1
|
+
import { r as GeneratorInputObject } from "../generator-Dq0PL5w6.cjs";
|
|
2
2
|
//#region src/generator/helpers.d.ts
|
|
3
3
|
declare function isGeneratorInputObject<TSpec, TOptions extends object, TReturns = void>(input: unknown): input is GeneratorInputObject<TSpec, TOptions, TReturns>;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as GeneratorInputObject } from "../generator-
|
|
1
|
+
import { r as GeneratorInputObject } from "../generator-BGkKE8HQ.mjs";
|
|
2
2
|
//#region src/generator/helpers.d.ts
|
|
3
3
|
declare function isGeneratorInputObject<TSpec, TOptions extends object, TReturns = void>(input: unknown): input is GeneratorInputObject<TSpec, TOptions, TReturns>;
|
|
4
4
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createGenerator } from "../create-
|
|
1
|
+
import { t as createGenerator } from "../create-BqRl9d7m.cjs";
|
|
2
2
|
export { createGenerator };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createGenerator } from "../create-
|
|
1
|
+
import { t as createGenerator } from "../create-DcCu_zM3.mjs";
|
|
2
2
|
export { createGenerator };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
1
|
+
import { s as SchemaOf } from "./schema-xFkmOyE6.mjs";
|
|
2
|
+
import { i as SinkInput, n as Sink } from "./sink-CHQncb8H.mjs";
|
|
3
|
+
import { i as SourceInput, n as Source } from "./source-BiOs3_-8.mjs";
|
|
4
|
+
import { SchemaInput } from "@power-plant/schema";
|
|
4
5
|
import { InferLoadOptions, LoadInput } from "@stryke/resolve/types";
|
|
5
6
|
|
|
6
7
|
//#region src/types/generator.d.ts
|
|
@@ -38,7 +39,7 @@ interface Generator<TSpec, TOptions extends object, TReturns = void> {
|
|
|
38
39
|
/**
|
|
39
40
|
* The schema input that defines the structure of the specification object for this generator.
|
|
40
41
|
*/
|
|
41
|
-
schema: SchemaOf<TSpec>;
|
|
42
|
+
schema: SchemaOf<TSpec, TOptions>;
|
|
42
43
|
/**
|
|
43
44
|
* The source of the generator, which can be used to specify where the generator retrieves its input data from. This can be defined as a function that takes the specification and returns a value, or it can be a static value.
|
|
44
45
|
*/
|
|
@@ -57,4 +58,4 @@ interface Generator<TSpec, TOptions extends object, TReturns = void> {
|
|
|
57
58
|
}
|
|
58
59
|
//#endregion
|
|
59
60
|
export { InferCreateGeneratorOptions as a, GeneratorMeta as i, GeneratorInput as n, GeneratorInputObject as r, Generator as t };
|
|
60
|
-
//# sourceMappingURL=generator-
|
|
61
|
+
//# sourceMappingURL=generator-BGkKE8HQ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-BGkKE8HQ.d.mts","names":[],"sources":["../src/types/generator.ts"],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
1
|
+
import { s as SchemaOf } from "./schema-xFkmOyE6.cjs";
|
|
2
|
+
import { i as SinkInput, n as Sink } from "./sink-DHpx94GM.cjs";
|
|
3
|
+
import { i as SourceInput, n as Source } from "./source-txi0ZuzR.cjs";
|
|
4
|
+
import { SchemaInput } from "@power-plant/schema";
|
|
4
5
|
import { InferLoadOptions, LoadInput } from "@stryke/resolve/types";
|
|
5
6
|
|
|
6
7
|
//#region src/types/generator.d.ts
|
|
@@ -38,7 +39,7 @@ interface Generator<TSpec, TOptions extends object, TReturns = void> {
|
|
|
38
39
|
/**
|
|
39
40
|
* The schema input that defines the structure of the specification object for this generator.
|
|
40
41
|
*/
|
|
41
|
-
schema: SchemaOf<TSpec>;
|
|
42
|
+
schema: SchemaOf<TSpec, TOptions>;
|
|
42
43
|
/**
|
|
43
44
|
* The source of the generator, which can be used to specify where the generator retrieves its input data from. This can be defined as a function that takes the specification and returns a value, or it can be a static value.
|
|
44
45
|
*/
|
|
@@ -57,4 +58,4 @@ interface Generator<TSpec, TOptions extends object, TReturns = void> {
|
|
|
57
58
|
}
|
|
58
59
|
//#endregion
|
|
59
60
|
export { InferCreateGeneratorOptions as a, GeneratorMeta as i, GeneratorInput as n, GeneratorInputObject as r, Generator as t };
|
|
60
|
-
//# sourceMappingURL=generator-
|
|
61
|
+
//# sourceMappingURL=generator-Dq0PL5w6.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-Dq0PL5w6.d.cts","names":[],"sources":["../src/types/generator.ts"],"mappings":";;;;;;;UAyBiB,aAAA;;AAAjB;;EAIE,WAAA,cAAyB,IAAA,EAAM,KAAK;AAAA;AAAA,UAGrB,oBAAA;EAPqB;;;EAepC,IAAA,GAAO,aAAA,CAAc,KAAA,EAAO,QAAA;EAXQ;AAAA;AAGtC;EAaE,MAAA,EAAQ,WAAA,CAAY,KAAA;EAbe;;;EAkBnC,MAAA,EAAQ,WAAA,CAAY,KAAA,EAAO,QAAA;EALP;;;EAUpB,IAAA,EAAM,SAAA,CAAU,KAAA,EAAO,QAAA,EAAU,QAAA;AAAA;AAAA,KAGvB,cAAA,oDACR,SAAA,GACA,oBAAA,CAAqB,KAAA,EAAO,QAAA,EAAU,QAAA;AAAA,KAE9B,2BAAA,WACA,cAAA,mBACR,CAAA,SAAU,SAAA,GACV,gBAAA,CAAiB,CAAA;AAAA,UAIJ,SAAA;EAdT;;;EAkBN,IAAA,GAAO,aAAA,CAAc,KAAA,EAAO,QAAA;EAvC5B;;;EA4CA,MAAA,EAAQ,QAAA,CAAS,KAAA,EAAO,QAAA;EAtCH;;;EA2CrB,MAAA,EAAQ,MAAA,CAAO,KAAA,EAAO,QAAA;EAtCF;;;EA2CpB,IAAA,EAAM,IAAA,CAAK,KAAA,EAAO,QAAA,EAAU,QAAA;EAtCD;;;;;;EA8C3B,QAAA,GAAW,OAAA,EAAS,QAAA,KAAa,OAAA,CAAQ,QAAA;AAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { r as SchemaInputObject } from "./schema-xFkmOyE6.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/schema/helpers.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the provided input is a {@link SchemaInputObject}.
|
|
6
|
+
*
|
|
7
|
+
* @param input - The input to check.
|
|
8
|
+
* @returns True if the input is a {@link SchemaInputObject}, false otherwise.
|
|
9
|
+
*/
|
|
10
|
+
declare function isSchemaInputObject<TSpec, TOptions extends object>(input: unknown): input is SchemaInputObject<TSpec, TOptions>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { isSchemaInputObject as t };
|
|
13
|
+
//# sourceMappingURL=helpers-BqnQPaP5.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers-BqnQPaP5.d.cts","names":[],"sources":["../src/schema/helpers.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,mBAAA,iCACd,KAAA,YACC,KAAA,IAAS,iBAAA,CAAkB,KAAA,EAAO,QAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { r as SchemaInputObject } from "./schema-xFkmOyE6.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/schema/helpers.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the provided input is a {@link SchemaInputObject}.
|
|
6
|
+
*
|
|
7
|
+
* @param input - The input to check.
|
|
8
|
+
* @returns True if the input is a {@link SchemaInputObject}, false otherwise.
|
|
9
|
+
*/
|
|
10
|
+
declare function isSchemaInputObject<TSpec, TOptions extends object>(input: unknown): input is SchemaInputObject<TSpec, TOptions>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { isSchemaInputObject as t };
|
|
13
|
+
//# sourceMappingURL=helpers-CgXgqnVu.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers-CgXgqnVu.d.mts","names":[],"sources":["../src/schema/helpers.ts"],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./sink/create.cjs"),
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./create-23iLtMb_.cjs"),t=require("./schema/helpers.cjs"),n=require("./sink/create.cjs"),r=require("./source/create.cjs"),i=require("./generator/create.cjs");require("./generator/index.cjs");const a=require("./schema/define.cjs");require("./schema/index.cjs"),require("./sink/index.cjs");const o=require("./source/define.cjs");require("./source/index.cjs"),exports.createGenerator=i.createGenerator,exports.createSchema=e.t,exports.createSink=n.createSink,exports.createSource=r.createSource,exports.defineSchema=a.defineSchema,exports.defineSource=o.defineSource,exports.extractSchemaMeta=e.n,exports.extractSinkMeta=n.extractSinkMeta,exports.extractSourceMeta=r.extractSourceMeta,exports.isSchemaInputObject=t.isSchemaInputObject;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
|
|
1
|
+
import { a as SchemaMetaExample, c as Meta, d as MetaLink, f as MetaValue, i as SchemaMeta, l as MetaDeprecated, n as Schema, o as SchemaMetaInput, r as SchemaInputObject, s as SchemaOf, t as InferCreateSchemaOptions, u as MetaInput } from "./schema-xFkmOyE6.cjs";
|
|
2
|
+
import { a as SinkInputObject, i as SinkInput, n as Sink, o as SinkMeta, r as SinkFunction, s as SinkMetaInput, t as InferCreateSinkOptions } from "./sink-DHpx94GM.cjs";
|
|
3
|
+
import { a as SourceInputObject, i as SourceInput, n as Source, o as SourceMeta, r as SourceFunction, s as SourceMetaInput, t as InferCreateSourceOptions } from "./source-txi0ZuzR.cjs";
|
|
4
|
+
import { a as InferCreateGeneratorOptions, i as GeneratorMeta, n as GeneratorInput, r as GeneratorInputObject, t as Generator } from "./generator-Dq0PL5w6.cjs";
|
|
5
|
+
import { t as createGenerator } from "./create-BqRl9d7m.cjs";
|
|
6
|
+
import { n as extractSchemaMeta, t as createSchema } from "./create-Cz9qVT4m.cjs";
|
|
7
|
+
import { t as defineSchema } from "./define-BPfeEA9Z.cjs";
|
|
8
|
+
import { t as isSchemaInputObject } from "./helpers-BqnQPaP5.cjs";
|
|
9
|
+
import { n as extractSinkMeta, t as createSink } from "./create-DAGPeYVI.cjs";
|
|
10
|
+
import { n as extractSourceMeta, t as createSource } from "./create-DUt-efk7.cjs";
|
|
11
|
+
import { t as defineSource } from "./define-aWeW6VVo.cjs";
|
|
12
|
+
export { type Generator, type GeneratorInput, type GeneratorInputObject, type GeneratorMeta, type InferCreateGeneratorOptions, type InferCreateSchemaOptions, type InferCreateSinkOptions, type InferCreateSourceOptions, type Meta, type MetaDeprecated, type MetaInput, type MetaLink, type MetaValue, type Schema, type SchemaInputObject, type SchemaMeta, type SchemaMetaExample, type SchemaMetaInput, type SchemaOf, type Sink, type SinkFunction, type SinkInput, type SinkInputObject, type SinkMeta, type SinkMetaInput, type Source, type SourceFunction, type SourceInput, type SourceInputObject, type SourceMeta, type SourceMetaInput, createGenerator, createSchema, createSink, createSource, defineSchema, defineSource, extractSchemaMeta, extractSinkMeta, extractSourceMeta, isSchemaInputObject };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
|
|
1
|
+
import { a as SchemaMetaExample, c as Meta, d as MetaLink, f as MetaValue, i as SchemaMeta, l as MetaDeprecated, n as Schema, o as SchemaMetaInput, r as SchemaInputObject, s as SchemaOf, t as InferCreateSchemaOptions, u as MetaInput } from "./schema-xFkmOyE6.mjs";
|
|
2
|
+
import { a as SinkInputObject, i as SinkInput, n as Sink, o as SinkMeta, r as SinkFunction, s as SinkMetaInput, t as InferCreateSinkOptions } from "./sink-CHQncb8H.mjs";
|
|
3
|
+
import { a as SourceInputObject, i as SourceInput, n as Source, o as SourceMeta, r as SourceFunction, s as SourceMetaInput, t as InferCreateSourceOptions } from "./source-BiOs3_-8.mjs";
|
|
4
|
+
import { a as InferCreateGeneratorOptions, i as GeneratorMeta, n as GeneratorInput, r as GeneratorInputObject, t as Generator } from "./generator-BGkKE8HQ.mjs";
|
|
5
|
+
import { t as createGenerator } from "./create-DcCu_zM3.mjs";
|
|
6
|
+
import { n as extractSchemaMeta, t as createSchema } from "./create-C-rR8nuY.mjs";
|
|
7
|
+
import { t as defineSchema } from "./define-CQZ042K5.mjs";
|
|
8
|
+
import { t as isSchemaInputObject } from "./helpers-CgXgqnVu.mjs";
|
|
9
|
+
import { n as extractSinkMeta, t as createSink } from "./create-DEe398aQ.mjs";
|
|
10
|
+
import { n as extractSourceMeta, t as createSource } from "./create-Qxy2mq7r.mjs";
|
|
11
|
+
import { t as defineSource } from "./define-Dw8JgVQ1.mjs";
|
|
12
|
+
export { type Generator, type GeneratorInput, type GeneratorInputObject, type GeneratorMeta, type InferCreateGeneratorOptions, type InferCreateSchemaOptions, type InferCreateSinkOptions, type InferCreateSourceOptions, type Meta, type MetaDeprecated, type MetaInput, type MetaLink, type MetaValue, type Schema, type SchemaInputObject, type SchemaMeta, type SchemaMetaExample, type SchemaMetaInput, type SchemaOf, type Sink, type SinkFunction, type SinkInput, type SinkInputObject, type SinkMeta, type SinkMetaInput, type Source, type SourceFunction, type SourceInput, type SourceInputObject, type SourceMeta, type SourceMetaInput, createGenerator, createSchema, createSink, createSource, defineSchema, defineSource, extractSchemaMeta, extractSinkMeta, extractSourceMeta, isSchemaInputObject };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as e,t}from"./create-BR4IeVl4.mjs";import{isSchemaInputObject as n}from"./schema/helpers.mjs";import{createSink as r,extractSinkMeta as i}from"./sink/create.mjs";import{createSource as a,extractSourceMeta as o}from"./source/create.mjs";import{createGenerator as s}from"./generator/create.mjs";import"./generator/index.mjs";import{defineSchema as c}from"./schema/define.mjs";import"./schema/index.mjs";import"./sink/index.mjs";import{defineSource as l}from"./source/define.mjs";import"./source/index.mjs";export{s as createGenerator,t as createSchema,r as createSink,a as createSource,c as defineSchema,l as defineSource,e as extractSchemaMeta,i as extractSinkMeta,o as extractSourceMeta,n as isSchemaInputObject};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../create-23iLtMb_.cjs");exports.createSchema=e.t,exports.extractSchemaMeta=e.n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"../create-BR4IeVl4.mjs";export{t as createSchema,e as extractSchemaMeta};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./helpers.cjs");function t(t){return e.isSchemaInputObject(t)?t:{schema:t}}exports.defineSchema=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.mjs","names":[],"sources":[],"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)&&`schema`in t&&t.schema!==void 0}exports.isSchemaInputObject=t;
|