@upstart.gg/sdk 0.0.58 → 0.0.59
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/node/cli/api.js +1 -1
- package/dist/node/cli/commands/login/cmd-login.js +1 -1
- package/dist/node/cli/commands/publish/cmd-publish.js +18 -18
- package/dist/node/cli/commands/publish/uploader.js +1 -1
- package/dist/node/cli/program.js +15 -15
- package/dist/node/cli/store.js +1 -1
- package/dist/node/metafile-esm.json +1 -1
- package/dist/node/shared/config.js +6 -6
- package/dist/node/shared/logger.js +1 -1
- package/dist/shared/attributes.d.ts +3 -2
- package/dist/shared/attributes.js +1 -1
- package/dist/shared/datarecords/types.d.ts +1 -1
- package/dist/shared/datasources/external/facebook/posts/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/instagram/feed/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/json/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/mastodon/account/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/mastodon/status/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/meta/oauth/config.d.ts +1 -1
- package/dist/shared/datasources/external/rss/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/threads/media/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/tiktok/oauth/config.d.ts +1 -1
- package/dist/shared/datasources/external/tiktok/video/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/youtube/list/fetcher.d.ts +1 -1
- package/dist/shared/datasources/external/youtube/oauth/config.d.ts +1 -1
- package/dist/shared/datasources/samples.d.ts +1 -1
- package/dist/shared/datasources/types.d.ts +1 -1
- package/dist/shared/{datasources-DilDY3W4.d.ts → datasources-BZeakKLp.d.ts} +7 -7
- package/dist/shared/datasources.d.ts +1 -1
- package/dist/shared/manifest.d.ts +2 -1
- package/dist/shared/manifest.js +1 -1
- package/dist/shared/metafile-esm.json +1 -1
- package/dist/shared/page.d.ts +1 -1
- package/dist/shared/page.js +1 -1
- package/dist/shared/template-config.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*! Enpage - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
|
|
2
|
-
import n from"zod";var f=n.object({id:n.string().optional(),name:n.string(),description:n.string(),readme:n.record(n.string()).optional(),tags:n.array(n.string()).optional(),author:n.string(),thumbnail:n.string().url().optional(),homepage:n.string().url().optional()});import{Type as o}from"@sinclair/typebox";import{Value as
|
|
3
|
-
`)),{...r,success:(s,a)=>r.info(u.green(s),a),error:(s,a)=>r.error(u.red(s),a),warn:(s,a)=>r.warn(u.yellow(s),a),warnOnce:(s,a)=>r.warnOnce(u.yellow(s),a),debug:(s,a)=>{
|
|
2
|
+
import n from"zod";var f=n.object({id:n.string().optional(),name:n.string(),description:n.string(),readme:n.record(n.string()).optional(),tags:n.array(n.string()).optional(),author:n.string(),thumbnail:n.string().url().optional(),homepage:n.string().url().optional()});import{Type as o}from"@sinclair/typebox";import{Value as $}from"@sinclair/typebox/value";function y(t){for(let e in t)if(e.startsWith("$"))throw new Error(`Attribute names starting with '$' (like "${e}") are reserved for internal use. Please rename it.`);return o.Object({...O,...t},{$id:"attributes"})}var p={string(t,e="",i){return o.String({title:t,default:e,...i})},number(t,e=0,i){return o.Number({title:t,default:e,...i})},boolean(t,e=!1,i){let r={"ui:field":"switch"};return o.Boolean({title:t,default:e,...r,...i})},enum(t,e,i){let r={"ui:field":"enum","ui:display":i.displayAs||"select"},{options:s,displayAs:a,...d}=i;return o.Union(s.map(l=>o.Literal(typeof l=="string"?l:l.value,{title:typeof l=="string"?l:l.title,"ui:icon":typeof l=="string"?void 0:l.icon})),{title:t,default:e,...r,...d})},file(t,e="",i={}){return o.String({title:t,default:e,...i,format:"data-url"})},url(t,e="",i={}){return o.String({title:t,default:e,...i,format:"uri"})},color(t,e="",i){let r={"ui:field":"color"};return o.String({title:t,default:e,...r,...i})},date(t,e=new Date,i={}){return o.String({title:t,default:e.toISOString(),...i,format:"date"})},datetime(t,e=new Date,i={}){return o.String({title:t,default:e.toISOString(),...i,format:"date-time"})},geolocation(t,e,i={}){return o.Object({lat:o.Number({minimum:-90,maximum:90}),lng:o.Number({minimum:-180,maximum:180}),name:o.Optional(o.String({title:"Name"}))},{title:t,default:e,...i})}},O={$pageLanguage:p.enum("Page language","en",{options:[{value:"ar",title:"Arabic"},{value:"zh",title:"Chinese"},{value:"cs",title:"Czech"},{value:"nl",title:"Dutch"},{value:"en",title:"English"},{value:"fr",title:"French"},{value:"de",title:"German"},{value:"he",title:"Hebrew"},{value:"hi",title:"Hindi"},{value:"it",title:"Italian"},{value:"ja",title:"Japanese"},{value:"ko",title:"Korean"},{value:"fa",title:"Persian"},{value:"pl",title:"Polish"},{value:"pt",title:"Portuguese"},{value:"ru",title:"Russian"},{value:"es",title:"Spanish"},{value:"tr",title:"Turkish"},{value:"vi",title:"Vietnamese"}],"ui:group":"meta","ui:group:title":"Meta tags / SEO"}),$pagePath:p.string("Page path","/",{description:"The URL path of the page","ui:group":"location","ui:group:title":"Location","ui:group:order":1,"ui:field":"path"}),$pageTitle:p.string("Page title","Untitled",{"ui:group":"meta","ui:group:title":"Meta tags / SEO"}),$pageDescription:p.string("Page description","",{"ui:widget":"textarea","ui:options":{rows:3,widget:"textarea"},"ui:group":"meta","ui:group:title":"Meta tags / SEO"}),$pageKeywords:p.string("Page keywords","",{"ui:group":"meta","ui:group:title":"Meta tags / SEO"}),$pageLastUpdated:p.datetime("Last updated",void 0,{"ui:hidden":!0}),$pageWidth:p.enum("Page width","max-w-screen-2xl",{options:[{value:"max-w-screen-lg",title:"M",description:"Common for text-heavy content/blog posts"},{value:"max-w-screen-xl",title:"L",description:"Usefull or some landing pages"},{value:"max-w-screen-2xl",title:"XL",description:"Common width"},{value:"max-w-full",title:"Full",description:"Takes the entire space"}],description:"The maximum width of the page. Desktop only.",displayAs:"button-group","ui:group":"layout","ui:group:title":"Page Layout & Design"}),$pagePaddingVertical:p.enum("Page vertical spacing","20",{options:[{value:"0",title:"None"},{value:"10",title:"S"},{value:"20",title:"M"},{value:"30",title:"L"},{value:"50",title:"XL"}],description:"Vertical spacing. Desktop only.",displayAs:"button-group","ui:group":"layout","ui:group:title":"Page Layout & Design"}),$pagePaddingHorizontal:p.enum("Page horizontal spacing","20",{options:[{value:"0",title:"None"},{value:"10",title:"S"},{value:"20",title:"M"},{value:"30",title:"L"},{value:"50",title:"XL"}],description:"Horizontal spacing. Desktop only.",displayAs:"button-group","ui:group":"layout","ui:group:title":"Page Layout & Design"}),$backgroundColor:p.color("Page background color","#ffffff",{"ui:field":"color","ui:group":"layout","ui:group:title":"Page Layout & Design"}),$textColor:p.color("Default text color","#222222",{"ui:field":"color","ui:group":"layout","ui:group:title":"Page Layout & Design","ui:color-type":"page-text"})};import g from"node:fs";import{readFile as S}from"node:fs/promises";import k from"fast-glob";import{createLogger as L}from"vite";var h="0.0.59";import u from"chalk";function w(t,e,i=!1){let r=L(t==="debug"?"info":t,{prefix:"[enpage]",allowClearScreen:e});return i&&r.info(u.hex("#7270c6").bold(`\u{1F680} Enpage v${h}
|
|
3
|
+
`)),{...r,success:(s,a)=>r.info(u.green(s),a),error:(s,a)=>r.error(u.red(s),a),warn:(s,a)=>r.warn(u.yellow(s),a),warnOnce:(s,a)=>r.warnOnce(u.yellow(s),a),debug:(s,a)=>{t==="debug"&&r.info(u.gray(s),a)}}}var b=w();import{fromError as A}from"zod-validation-error";import{basename as v,dirname as P,extname as j}from"node:path";async function K(t,e=b){g.existsSync(t)||(e.error(`\u{1F534} No enpage.config.js found!
|
|
4
4
|
Your project must have an enpage.config.js file in the root directory.
|
|
5
5
|
|
|
6
|
-
`),process.exit(1));let i=await import(
|
|
6
|
+
`),process.exit(1));let i=await import(t),r=P(t),s={},a=await k(["README.enpage.md","README.enpage.*.md"],{cwd:r,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let d of a){let l=v(d,".md"),m=j(l),c=(m===".enpage"?"en":m.substring(1)).toLowerCase();e.debug(`Found template readme file (${c}): ${v(d)}`),s[c]=await S(d,"utf-8")}return i.manifest.readme=s,i}function W(t,e){return g.existsSync(t)||(e.error(`\u{1F534} No enpage.manifest.json found!
|
|
7
7
|
You may want to 'build' your template.
|
|
8
8
|
|
|
9
|
-
`),process.exit(1)),JSON.parse(g.readFileSync(
|
|
10
|
-
`);let r=
|
|
9
|
+
`),process.exit(1)),JSON.parse(g.readFileSync(t,"utf-8"))}function Y(t,e){for(let r in t.datasources)!(t.datasources[r].provider||t.datasources[r].provider==="json")&&!t.datasources[r].sampleData&&(e.error(`\u{1F534} Error: Datasource "${r}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${r} datasource.`),process.exit(1));t.attributes||(t.attributes=y({}));let i=f.safeParse(t.manifest);if(!i.success){e.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
|
|
10
|
+
`);let r=A(i.error);e.error(`Hint: ${r.toString()}
|
|
11
11
|
|
|
12
|
-
`),process.exit(1)}return
|
|
12
|
+
`),process.exit(1)}return t}export{K as loadConfigFromJsFile,W as loadConfigFromManifestFile,Y as validateTemplateConfig};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! Enpage - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
|
|
2
|
-
import{createLogger as d}from"vite";var i="0.0.
|
|
2
|
+
import{createLogger as d}from"vite";var i="0.0.59";import r from"chalk";function c(o,a,p=!1){let t=d(o==="debug"?"info":o,{prefix:"[enpage]",allowClearScreen:a});return p&&t.info(r.hex("#7270c6").bold(`\u{1F680} Enpage v${i}
|
|
3
3
|
`)),{...t,success:(e,s)=>t.info(r.green(e),s),error:(e,s)=>t.error(r.red(e),s),warn:(e,s)=>t.warn(r.yellow(e),s),warnOnce:(e,s)=>t.warnOnce(r.yellow(e),s),debug:(e,s)=>{o==="debug"&&t.info(r.gray(e),s)}}}var h=c();export{c as createLogger,h as logger};
|
|
@@ -35,6 +35,7 @@ declare function defineAttributes(attrs: TProperties): _sinclair_typebox.TObject
|
|
|
35
35
|
$backgroundColor: _sinclair_typebox.TString;
|
|
36
36
|
$textColor: _sinclair_typebox.TString;
|
|
37
37
|
}>;
|
|
38
|
+
type Attributes = ReturnType<typeof defineAttributes>;
|
|
38
39
|
declare const attr: {
|
|
39
40
|
/**
|
|
40
41
|
* Define a text
|
|
@@ -84,7 +85,7 @@ declare const attr: {
|
|
|
84
85
|
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
85
86
|
}>;
|
|
86
87
|
};
|
|
87
|
-
declare function resolveAttributes(attributes:
|
|
88
|
+
declare function resolveAttributes(attributes: Attributes): {
|
|
88
89
|
$pageLanguage: string;
|
|
89
90
|
$pagePath: string;
|
|
90
91
|
$pageTitle: string;
|
|
@@ -99,4 +100,4 @@ declare function resolveAttributes(attributes: ReturnType<typeof defineAttribute
|
|
|
99
100
|
};
|
|
100
101
|
type AttributesResolved = ReturnType<typeof resolveAttributes>;
|
|
101
102
|
|
|
102
|
-
export { type AttributesResolved, attr, defineAttributes, resolveAttributes };
|
|
103
|
+
export { type Attributes, type AttributesResolved, attr, defineAttributes, resolveAttributes };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! Enpage - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
|
|
2
|
-
import{Type as r}from"@sinclair/typebox";import{Value as s}from"@sinclair/typebox/value";function c(t){for(let e in t)if(e.startsWith("$"))throw new Error(`Attribute names starting with '$' (like "${e}") are reserved for internal use. Please rename it.`);return r.Object({...p,...t},{$id:"attributes"})}var n={string(t,e="",i){return r.String({title:t,default:e,...i})},number(t,e=0,i){return r.Number({title:t,default:e,...i})},boolean(t,e=!1,i){let
|
|
2
|
+
import{Type as r}from"@sinclair/typebox";import{Value as s}from"@sinclair/typebox/value";function c(t){for(let e in t)if(e.startsWith("$"))throw new Error(`Attribute names starting with '$' (like "${e}") are reserved for internal use. Please rename it.`);return r.Object({...p,...t},{$id:"attributes"})}var n={string(t,e="",i){return r.String({title:t,default:e,...i})},number(t,e=0,i){return r.Number({title:t,default:e,...i})},boolean(t,e=!1,i){let u={"ui:field":"switch"};return r.Boolean({title:t,default:e,...u,...i})},enum(t,e,i){let u={"ui:field":"enum","ui:display":i.displayAs||"select"},{options:a,displayAs:g,...l}=i;return r.Union(a.map(o=>r.Literal(typeof o=="string"?o:o.value,{title:typeof o=="string"?o:o.title,"ui:icon":typeof o=="string"?void 0:o.icon})),{title:t,default:e,...u,...l})},file(t,e="",i={}){return r.String({title:t,default:e,...i,format:"data-url"})},url(t,e="",i={}){return r.String({title:t,default:e,...i,format:"uri"})},color(t,e="",i){let u={"ui:field":"color"};return r.String({title:t,default:e,...u,...i})},date(t,e=new Date,i={}){return r.String({title:t,default:e.toISOString(),...i,format:"date"})},datetime(t,e=new Date,i={}){return r.String({title:t,default:e.toISOString(),...i,format:"date-time"})},geolocation(t,e,i={}){return r.Object({lat:r.Number({minimum:-90,maximum:90}),lng:r.Number({minimum:-180,maximum:180}),name:r.Optional(r.String({title:"Name"}))},{title:t,default:e,...i})}},p={$pageLanguage:n.enum("Page language","en",{options:[{value:"ar",title:"Arabic"},{value:"zh",title:"Chinese"},{value:"cs",title:"Czech"},{value:"nl",title:"Dutch"},{value:"en",title:"English"},{value:"fr",title:"French"},{value:"de",title:"German"},{value:"he",title:"Hebrew"},{value:"hi",title:"Hindi"},{value:"it",title:"Italian"},{value:"ja",title:"Japanese"},{value:"ko",title:"Korean"},{value:"fa",title:"Persian"},{value:"pl",title:"Polish"},{value:"pt",title:"Portuguese"},{value:"ru",title:"Russian"},{value:"es",title:"Spanish"},{value:"tr",title:"Turkish"},{value:"vi",title:"Vietnamese"}],"ui:group":"meta","ui:group:title":"Meta tags / SEO"}),$pagePath:n.string("Page path","/",{description:"The URL path of the page","ui:group":"location","ui:group:title":"Location","ui:group:order":1,"ui:field":"path"}),$pageTitle:n.string("Page title","Untitled",{"ui:group":"meta","ui:group:title":"Meta tags / SEO"}),$pageDescription:n.string("Page description","",{"ui:widget":"textarea","ui:options":{rows:3,widget:"textarea"},"ui:group":"meta","ui:group:title":"Meta tags / SEO"}),$pageKeywords:n.string("Page keywords","",{"ui:group":"meta","ui:group:title":"Meta tags / SEO"}),$pageLastUpdated:n.datetime("Last updated",void 0,{"ui:hidden":!0}),$pageWidth:n.enum("Page width","max-w-screen-2xl",{options:[{value:"max-w-screen-lg",title:"M",description:"Common for text-heavy content/blog posts"},{value:"max-w-screen-xl",title:"L",description:"Usefull or some landing pages"},{value:"max-w-screen-2xl",title:"XL",description:"Common width"},{value:"max-w-full",title:"Full",description:"Takes the entire space"}],description:"The maximum width of the page. Desktop only.",displayAs:"button-group","ui:group":"layout","ui:group:title":"Page Layout & Design"}),$pagePaddingVertical:n.enum("Page vertical spacing","20",{options:[{value:"0",title:"None"},{value:"10",title:"S"},{value:"20",title:"M"},{value:"30",title:"L"},{value:"50",title:"XL"}],description:"Vertical spacing. Desktop only.",displayAs:"button-group","ui:group":"layout","ui:group:title":"Page Layout & Design"}),$pagePaddingHorizontal:n.enum("Page horizontal spacing","20",{options:[{value:"0",title:"None"},{value:"10",title:"S"},{value:"20",title:"M"},{value:"30",title:"L"},{value:"50",title:"XL"}],description:"Horizontal spacing. Desktop only.",displayAs:"button-group","ui:group":"layout","ui:group:title":"Page Layout & Design"}),$backgroundColor:n.color("Page background color","#ffffff",{"ui:field":"color","ui:group":"layout","ui:group:title":"Page Layout & Design"}),$textColor:n.color("Default text color","#222222",{"ui:field":"color","ui:group":"layout","ui:group:title":"Page Layout & Design","ui:color-type":"page-text"})};function f(t){return s.Create(t)}export{n as attr,c as defineAttributes,f as resolveAttributes};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
2
2
|
import { Static } from '@sinclair/typebox';
|
|
3
3
|
import z from 'zod';
|
|
4
|
-
import { G as GenericPageConfig } from '../datasources-
|
|
4
|
+
import { G as GenericPageConfig } from '../datasources-BZeakKLp.js';
|
|
5
5
|
import '../attributes.js';
|
|
6
6
|
import '../themes/color-system.js';
|
|
7
7
|
import '../theme.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FacebookPostSchema } from './schema.js';
|
|
2
2
|
import { MetaOAuthConfig } from '../../meta/oauth/config.js';
|
|
3
|
-
import { a as DatasourceFetcher } from '../../../../datasources-
|
|
3
|
+
import { a as DatasourceFetcher } from '../../../../datasources-BZeakKLp.js';
|
|
4
4
|
import { MetaOptions } from '../../meta/options.js';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import 'zod';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InstagramFeedSchema } from './schema.js';
|
|
2
2
|
import { MetaOAuthConfig } from '../../meta/oauth/config.js';
|
|
3
|
-
import { a as DatasourceFetcher } from '../../../../datasources-
|
|
3
|
+
import { a as DatasourceFetcher } from '../../../../datasources-BZeakKLp.js';
|
|
4
4
|
import { MetaOptions } from '../../meta/options.js';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import 'zod';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpJsonOptions } from './options.js';
|
|
2
|
-
import { a as DatasourceFetcher } from '../../../datasources-
|
|
2
|
+
import { a as DatasourceFetcher } from '../../../datasources-BZeakKLp.js';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../../attributes.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MastodonAccountSchema } from './schema.js';
|
|
2
|
-
import { a as DatasourceFetcher } from '../../../../datasources-
|
|
2
|
+
import { a as DatasourceFetcher } from '../../../../datasources-BZeakKLp.js';
|
|
3
3
|
import { MastodonCommonOptions } from '../options.js';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import 'zod';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MastodonStatusArraySchema } from './schema.js';
|
|
2
|
-
import { a as DatasourceFetcher } from '../../../../datasources-
|
|
2
|
+
import { a as DatasourceFetcher } from '../../../../datasources-BZeakKLp.js';
|
|
3
3
|
import { MastodonCommonOptions } from '../options.js';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import 'zod';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RssOptions } from './options.js';
|
|
2
|
-
import { a as DatasourceFetcher } from '../../../datasources-
|
|
2
|
+
import { a as DatasourceFetcher } from '../../../datasources-BZeakKLp.js';
|
|
3
3
|
import { RssSchema } from './schema.js';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import 'zod';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThreadsMediaSchema } from './schema.js';
|
|
2
2
|
import { MetaOAuthConfig } from '../../meta/oauth/config.js';
|
|
3
|
-
import { a as DatasourceFetcher } from '../../../../datasources-
|
|
3
|
+
import { a as DatasourceFetcher } from '../../../../datasources-BZeakKLp.js';
|
|
4
4
|
import { MetaOptions } from '../../meta/options.js';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import 'zod';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TiktokVideoOptions } from './options.js';
|
|
2
2
|
import { TiktokVideoResponseSchema } from './schema.js';
|
|
3
3
|
import { TiktokOAuthConfig } from '../oauth/config.js';
|
|
4
|
-
import { a as DatasourceFetcher } from '../../../../datasources-
|
|
4
|
+
import { a as DatasourceFetcher } from '../../../../datasources-BZeakKLp.js';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import '../../../../attributes.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { YoutubeListOptions } from './options.js';
|
|
2
2
|
import { YoutubeListSchema } from './schema.js';
|
|
3
|
-
import { a as DatasourceFetcher } from '../../../../datasources-
|
|
3
|
+
import { a as DatasourceFetcher } from '../../../../datasources-BZeakKLp.js';
|
|
4
4
|
import { YoutubeOAuthConfig } from '../oauth/config.js';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import 'zod';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Static, TSchema } from '@sinclair/typebox';
|
|
2
|
-
import { D as DatasourceProvider } from '../datasources-
|
|
2
|
+
import { D as DatasourceProvider } from '../datasources-BZeakKLp.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../attributes.js';
|
|
5
5
|
import '../themes/color-system.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@sinclair/typebox';
|
|
2
2
|
import 'zod';
|
|
3
|
-
export { a as DatasourceFetcher,
|
|
3
|
+
export { a as DatasourceFetcher, h as DatasourceFetcherParams, D as DatasourceProvider, O as OAuthConfig, g as ProviderOptions, i as datasourceProvider, p as providerOptions } from '../datasources-BZeakKLp.js';
|
|
4
4
|
import '../attributes.js';
|
|
5
5
|
import '../themes/color-system.js';
|
|
6
6
|
import '../theme.js';
|
|
@@ -5,7 +5,7 @@ import { defineAttributes, AttributesResolved } from './attributes.js';
|
|
|
5
5
|
import { Brick } from './bricks.js';
|
|
6
6
|
import { defineManifest } from './manifest.js';
|
|
7
7
|
|
|
8
|
-
type
|
|
8
|
+
type TemplateConfig = {
|
|
9
9
|
/**
|
|
10
10
|
* The template manifest and settings
|
|
11
11
|
*/
|
|
@@ -13,7 +13,7 @@ type EnpageTemplateConfig = {
|
|
|
13
13
|
/**
|
|
14
14
|
* The attributes declared for the template
|
|
15
15
|
*/
|
|
16
|
-
attributes
|
|
16
|
+
attributes?: ReturnType<typeof defineAttributes>;
|
|
17
17
|
/**
|
|
18
18
|
* The datasources declared for the template
|
|
19
19
|
*/
|
|
@@ -23,6 +23,7 @@ type EnpageTemplateConfig = {
|
|
|
23
23
|
*/
|
|
24
24
|
pages: ReturnType<typeof definePages>;
|
|
25
25
|
};
|
|
26
|
+
type ResolvedTemplateConfig = TemplateConfig & Required<Pick<TemplateConfig, "attributes">>;
|
|
26
27
|
|
|
27
28
|
type PageBasicInfo = {
|
|
28
29
|
id: string;
|
|
@@ -32,7 +33,7 @@ type PageBasicInfo = {
|
|
|
32
33
|
/**
|
|
33
34
|
* The Page config represents the page configuration (datasources, attributes, etc)
|
|
34
35
|
*/
|
|
35
|
-
type PageConfig<D extends DatasourceManifestMap, A extends
|
|
36
|
+
type PageConfig<D extends DatasourceManifestMap, A extends ResolvedTemplateConfig["attributes"], B extends Brick[]> = {
|
|
36
37
|
/**
|
|
37
38
|
* The page id.
|
|
38
39
|
*/
|
|
@@ -78,9 +79,9 @@ type PageConfig<D extends DatasourceManifestMap, A extends EnpageTemplateConfig[
|
|
|
78
79
|
attr: AttributesResolved;
|
|
79
80
|
bricks: B;
|
|
80
81
|
};
|
|
81
|
-
type GenericPageConfig = PageConfig<DatasourceManifestMap,
|
|
82
|
+
type GenericPageConfig = PageConfig<DatasourceManifestMap, ResolvedTemplateConfig["attributes"], Brick[]>;
|
|
82
83
|
type GenericPageContext = Omit<GenericPageConfig, "attributes">;
|
|
83
|
-
declare function createPageConfigSampleFromTemplateConfig(templateConfig:
|
|
84
|
+
declare function createPageConfigSampleFromTemplateConfig(templateConfig: TemplateConfig, path?: string): {
|
|
84
85
|
id: string;
|
|
85
86
|
siteId: string;
|
|
86
87
|
hostname: string;
|
|
@@ -88,7 +89,6 @@ declare function createPageConfigSampleFromTemplateConfig(templateConfig: Enpage
|
|
|
88
89
|
pagesMap: never[];
|
|
89
90
|
path: string;
|
|
90
91
|
datasources: DatasourceManifestMap | undefined;
|
|
91
|
-
data: undefined;
|
|
92
92
|
attributes: _sinclair_typebox.TObject<{
|
|
93
93
|
$pageLanguage: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<string>[]>;
|
|
94
94
|
$pagePath: _sinclair_typebox.TString;
|
|
@@ -199,4 +199,4 @@ type DatasourceResolved<D extends DatasourceManifestMap> = {
|
|
|
199
199
|
};
|
|
200
200
|
declare function defineDataSources<T extends DatasourceManifestMap>(datasources: T): EnsureDatasourceManifestMap<T>;
|
|
201
201
|
|
|
202
|
-
export { type DatasourceProvider as D, type
|
|
202
|
+
export { type DatasourceProvider as D, type GenericPageConfig as G, type OAuthConfig as O, type PageBasicInfo as P, type ResolvedTemplateConfig as R, type TemplateConfig as T, type DatasourceFetcher as a, type PageConfig as b, type GenericPageContext as c, createPageConfigSampleFromTemplateConfig as d, type TemplatePage as e, definePages as f, type ProviderOptions as g, type DatasourceFetcherParams as h, datasourceProvider as i, providersSchemaMap as j, type DatasourceProviderSchemaMap as k, providersOptionsMap as l, type DatasourceProviderOptionsMap as m, type DatasourceProviderManifest as n, type DatasourceGenericManifest as o, providerOptions as p, type DatasourceManifestMap as q, type DatasourceResolved as r, defineDataSources as s };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { TSchema, Type as ds } from '@sinclair/typebox';
|
|
2
|
-
export {
|
|
2
|
+
export { o as DatasourceGenericManifest, q as DatasourceManifestMap, n as DatasourceProviderManifest, m as DatasourceProviderOptionsMap, k as DatasourceProviderSchemaMap, r as DatasourceResolved, s as defineDataSources, l as providersOptionsMap, j as providersSchemaMap } from './datasources-BZeakKLp.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import './attributes.js';
|
|
5
5
|
import './themes/color-system.js';
|
|
@@ -29,6 +29,7 @@ declare const templateManifestSchema: z.ZodObject<{
|
|
|
29
29
|
homepage?: string | undefined;
|
|
30
30
|
}>;
|
|
31
31
|
type TemplateManifest = z.infer<typeof templateManifestSchema>;
|
|
32
|
+
type PublishedTemplateManifest = TemplateManifest & Required<Pick<TemplateManifest, "id">>;
|
|
32
33
|
declare function defineManifest(manifest: Omit<TemplateManifest, "id" | "thumbnail">): TemplateManifest;
|
|
33
34
|
|
|
34
|
-
export { type TemplateManifest, defineManifest, templateManifestSchema };
|
|
35
|
+
export { type PublishedTemplateManifest, type TemplateManifest, defineManifest, templateManifestSchema };
|
package/dist/shared/manifest.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! Enpage - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
|
|
2
|
-
import t from"zod";var
|
|
2
|
+
import t from"zod";var a=t.object({id:t.string().optional(),name:t.string(),description:t.string(),readme:t.record(t.string()).optional(),tags:t.array(t.string()).optional(),author:t.string(),thumbnail:t.string().url().optional(),homepage:t.string().url().optional()});function n(e){return e}export{n as defineManifest,a as templateManifestSchema};
|