create-vitnode-app 0.0.9-canary.60 → 0.0.9-canary.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -24,7 +24,7 @@ Expecting one of '${i.join("', '")}'`);let r=`${e}Help`;return this.on(r,u=>{let
24
24
  `),process.exit(1))},Tt=async t=>{let e=t.opts(),n={packageManager:e.packageManager,eslint:e.eslint,install:!e.skipInstall,docker:e.docker};if(!e.packageManager){let i=await St(),r=G.default.blue("package manager"),{packageManager:u}=await(0,U.default)({onState:I,name:"packageManager",type:"select",message:`Which ${r} do you want to use?`,initial:e.packageManager,choices:[{title:`npm${i.npm?`@${i.npm}`:""}`,value:"npm",disabled:!i.npm},{title:`pnpm${i.pnpm?`@${i.pnpm}`:""}`,value:"pnpm",disabled:!i.pnpm}]});n={...n,packageManager:`${u}@${i[u]}`}}if(e.eslint===void 0){let i=G.default.blue("ESLint"),{eslint:r}=await(0,U.default)({onState:I,type:"toggle",name:"eslint",message:`Would you like to use ${i}?`,initial:e.eslint?"Yes":"No",active:"Yes",inactive:"No"});n={...n,eslint:!!r}}if(e.docker===void 0){let i=G.default.blue("Dockerfile & Docker Compose"),{docker:r}=await(0,U.default)({onState:I,type:"toggle",name:"docker",message:`Would you like to create ${i}?`,initial:e.i18nRouting?"Yes":"No",active:"Yes",inactive:"No"});n={...n,docker:!!r}}if(e.skipInstall===void 0){let i=G.default.blue("Install dependencies"),{install:r}=await(0,U.default)({onState:I,type:"toggle",name:"install",message:`Would you like to ${i}?`,initial:e.eslint?"Yes":"No",active:"Yes",inactive:"No"});n={...n,install:!!r}}return n};var re=require("fs"),kt=require("path"),Se=p(require("picocolors"),1);function ue(t,e){let n=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"],i=(0,re.readdirSync)(t).filter(r=>!n.includes(r)&&!r.endsWith(".iml"));if(i.length>0){console.log(`The directory ${Se.default.green(e)} contains files that could conflict:
25
25
  `);for(let r of i)try{(0,re.lstatSync)((0,kt.join)(t,r)).isDirectory()?console.log(`${Se.default.blue(r)}/`):console.log(r)}catch{console.log(r)}return console.log(`
26
26
  Either try using a new directory name, or remove the files listed above.
27
- `),!1}return!0}var $t=require("constants"),Pt=require("fs/promises");async function Nt(t){try{return await(0,Pt.access)(t,$t.W_OK),!0}catch{return!1}}var It=p(require("validate-npm-package-name"),1),Te=({name:t})=>{let e=(0,It.default)(t);return e.validForNewPackages?{valid:!0}:{valid:!1,problems:[...e.errors??[],...e.warnings??[]]}};var Rt={name:"create-vitnode-app",version:"0.0.9-canary.59",description:"Create a new VitNode app in seconds.",author:"VitNode Team",license:"MIT",homepage:"https://vitnode.com",repository:{type:"git",url:"git+https://github.com/VitNode/vitnode.git",directory:"packages/create-vitnode-app"},type:"module",bin:{"create-vitnode-app":"dist/index.cjs"},scripts:{lint:"eslint .","lint:fix":"eslint . --fix","build:scripts":"tsup index.ts","dev:script":"tsup index.ts --watch","start:script":"node dist/index.cjs"},keywords:["vitnode","react","next","nest","nextjs","nestjs","typescript","next.js","nest.js"],dependencies:{figlet:"^1.7.0",picocolors:"^1.1.0",prompts:"^2.4.2","validate-npm-package-name":"^6.0.0"},devDependencies:{"@types/cross-spawn":"^6.0.6","@types/figlet":"^1.5.8","@types/node":"^22.7.4","@types/prompts":"^2.4.9","@types/validate-npm-package-name":"^4.0.2",commander:"^12.1.0","cross-spawn":"^7.0.3","eslint-config-typescript-vitnode":"workspace:*",ora:"^8.1.0",tsup:"^8.3.0",typescript:"^5.6.2"}};var C=require("fs"),A=require("path"),oi=require("crypto"),ai=p(require("figlet"),1);var Z=p(require("process"),1);var jt=(t=0)=>e=>`\x1B[${e+t}m`,Vt=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Mt=(t=0)=>(e,n,i)=>`\x1B[${38+t};2;${e};${n};${i}m`,m={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Cu=Object.keys(m.modifier),Ni=Object.keys(m.color),Ii=Object.keys(m.bgColor),Eu=[...Ni,...Ii];function Ri(){let t=new Map;for(let[e,n]of Object.entries(m)){for(let[i,r]of Object.entries(n))m[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=m[i],t.set(r[0],r[1]);Object.defineProperty(m,e,{value:n,enumerable:!1})}return Object.defineProperty(m,"codes",{value:t,enumerable:!1}),m.color.close="\x1B[39m",m.bgColor.close="\x1B[49m",m.color.ansi=jt(),m.color.ansi256=Vt(),m.color.ansi16m=Mt(),m.bgColor.ansi=jt(10),m.bgColor.ansi256=Vt(10),m.bgColor.ansi16m=Mt(10),Object.defineProperties(m,{rgbToAnsi256:{value(e,n,i){return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(e){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(u=>u+u).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>m.rgbToAnsi256(...m.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,i,r;if(e>=232)n=((e-232)*10+8)/255,i=n,r=n;else{e-=16;let o=e%36;n=Math.floor(e/36)/5,i=Math.floor(o/6)/5,r=o%6/5}let u=Math.max(n,i,r)*2;if(u===0)return 30;let s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return u===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,n,i)=>m.ansi256ToAnsi(m.rgbToAnsi256(e,n,i)),enumerable:!1},hexToAnsi:{value:e=>m.ansi256ToAnsi(m.hexToAnsi256(e)),enumerable:!1}}),m}var ji=Ri(),v=ji;var oe=p(require("process"),1),Wt=p(require("os"),1),ke=p(require("tty"),1);function x(t,e=globalThis.Deno?globalThis.Deno.args:oe.default.argv){let n=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(n+t),r=e.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:d}=oe.default,se;x("no-color")||x("no-colors")||x("color=false")||x("color=never")?se=0:(x("color")||x("colors")||x("color=true")||x("color=always"))&&(se=1);function Vi(){if("FORCE_COLOR"in d)return d.FORCE_COLOR==="true"?1:d.FORCE_COLOR==="false"?0:d.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(d.FORCE_COLOR,10),3)}function Mi(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Hi(t,{streamIsTTY:e,sniffFlags:n=!0}={}){let i=Vi();i!==void 0&&(se=i);let r=n?se:i;if(r===0)return 0;if(n){if(x("color=16m")||x("color=full")||x("color=truecolor"))return 3;if(x("color=256"))return 2}if("TF_BUILD"in d&&"AGENT_NAME"in d)return 1;if(t&&!e&&r===void 0)return 0;let u=r||0;if(d.TERM==="dumb")return u;if(oe.default.platform==="win32"){let s=Wt.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in d)return"GITHUB_ACTIONS"in d||"GITEA_ACTIONS"in d?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in d)||d.CI_NAME==="codeship"?1:u;if("TEAMCITY_VERSION"in d)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d.TEAMCITY_VERSION)?1:0;if(d.COLORTERM==="truecolor"||d.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in d){let s=Number.parseInt((d.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(d.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d.TERM)||"COLORTERM"in d?1:u}function Ht(t,e={}){let n=Hi(t,{streamIsTTY:t&&t.isTTY,...e});return Mi(n)}var Wi={stdout:Ht({isTTY:ke.default.isatty(1)}),stderr:Ht({isTTY:ke.default.isatty(2)})},qt=Wi;function Lt(t,e,n){let i=t.indexOf(e);if(i===-1)return t;let r=e.length,u=0,s="";do s+=t.slice(u,i)+e+n,u=i+r,i=t.indexOf(e,u);while(i!==-1);return s+=t.slice(u),s}function Gt(t,e,n,i){let r=0,u="";do{let s=t[i-1]==="\r";u+=t.slice(r,s?i-1:i)+e+(s?`\r
27
+ `),!1}return!0}var $t=require("constants"),Pt=require("fs/promises");async function Nt(t){try{return await(0,Pt.access)(t,$t.W_OK),!0}catch{return!1}}var It=p(require("validate-npm-package-name"),1),Te=({name:t})=>{let e=(0,It.default)(t);return e.validForNewPackages?{valid:!0}:{valid:!1,problems:[...e.errors??[],...e.warnings??[]]}};var Rt={name:"create-vitnode-app",version:"0.0.9-canary.61",description:"Create a new VitNode app in seconds.",author:"VitNode Team",license:"MIT",homepage:"https://vitnode.com",repository:{type:"git",url:"git+https://github.com/VitNode/vitnode.git",directory:"packages/create-vitnode-app"},type:"module",bin:{"create-vitnode-app":"dist/index.cjs"},scripts:{lint:"eslint .","lint:fix":"eslint . --fix","build:scripts":"tsup index.ts","dev:script":"tsup index.ts --watch","start:script":"node dist/index.cjs"},keywords:["vitnode","react","next","nest","nextjs","nestjs","typescript","next.js","nest.js"],dependencies:{figlet:"^1.7.0",picocolors:"^1.1.0",prompts:"^2.4.2","validate-npm-package-name":"^6.0.0"},devDependencies:{"@types/cross-spawn":"^6.0.6","@types/figlet":"^1.5.8","@types/node":"^22.7.4","@types/prompts":"^2.4.9","@types/validate-npm-package-name":"^4.0.2",commander:"^12.1.0","cross-spawn":"^7.0.3","eslint-config-typescript-vitnode":"workspace:*",ora:"^8.1.0",tsup:"^8.3.0",typescript:"^5.6.2"}};var C=require("fs"),A=require("path"),oi=require("crypto"),ai=p(require("figlet"),1);var Z=p(require("process"),1);var jt=(t=0)=>e=>`\x1B[${e+t}m`,Vt=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Mt=(t=0)=>(e,n,i)=>`\x1B[${38+t};2;${e};${n};${i}m`,m={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Cu=Object.keys(m.modifier),Ni=Object.keys(m.color),Ii=Object.keys(m.bgColor),Eu=[...Ni,...Ii];function Ri(){let t=new Map;for(let[e,n]of Object.entries(m)){for(let[i,r]of Object.entries(n))m[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=m[i],t.set(r[0],r[1]);Object.defineProperty(m,e,{value:n,enumerable:!1})}return Object.defineProperty(m,"codes",{value:t,enumerable:!1}),m.color.close="\x1B[39m",m.bgColor.close="\x1B[49m",m.color.ansi=jt(),m.color.ansi256=Vt(),m.color.ansi16m=Mt(),m.bgColor.ansi=jt(10),m.bgColor.ansi256=Vt(10),m.bgColor.ansi16m=Mt(10),Object.defineProperties(m,{rgbToAnsi256:{value(e,n,i){return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(e){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(u=>u+u).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>m.rgbToAnsi256(...m.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,i,r;if(e>=232)n=((e-232)*10+8)/255,i=n,r=n;else{e-=16;let o=e%36;n=Math.floor(e/36)/5,i=Math.floor(o/6)/5,r=o%6/5}let u=Math.max(n,i,r)*2;if(u===0)return 30;let s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return u===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,n,i)=>m.ansi256ToAnsi(m.rgbToAnsi256(e,n,i)),enumerable:!1},hexToAnsi:{value:e=>m.ansi256ToAnsi(m.hexToAnsi256(e)),enumerable:!1}}),m}var ji=Ri(),v=ji;var oe=p(require("process"),1),Wt=p(require("os"),1),ke=p(require("tty"),1);function x(t,e=globalThis.Deno?globalThis.Deno.args:oe.default.argv){let n=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(n+t),r=e.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:d}=oe.default,se;x("no-color")||x("no-colors")||x("color=false")||x("color=never")?se=0:(x("color")||x("colors")||x("color=true")||x("color=always"))&&(se=1);function Vi(){if("FORCE_COLOR"in d)return d.FORCE_COLOR==="true"?1:d.FORCE_COLOR==="false"?0:d.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(d.FORCE_COLOR,10),3)}function Mi(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Hi(t,{streamIsTTY:e,sniffFlags:n=!0}={}){let i=Vi();i!==void 0&&(se=i);let r=n?se:i;if(r===0)return 0;if(n){if(x("color=16m")||x("color=full")||x("color=truecolor"))return 3;if(x("color=256"))return 2}if("TF_BUILD"in d&&"AGENT_NAME"in d)return 1;if(t&&!e&&r===void 0)return 0;let u=r||0;if(d.TERM==="dumb")return u;if(oe.default.platform==="win32"){let s=Wt.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in d)return"GITHUB_ACTIONS"in d||"GITEA_ACTIONS"in d?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in d)||d.CI_NAME==="codeship"?1:u;if("TEAMCITY_VERSION"in d)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d.TEAMCITY_VERSION)?1:0;if(d.COLORTERM==="truecolor"||d.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in d){let s=Number.parseInt((d.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(d.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d.TERM)||"COLORTERM"in d?1:u}function Ht(t,e={}){let n=Hi(t,{streamIsTTY:t&&t.isTTY,...e});return Mi(n)}var Wi={stdout:Ht({isTTY:ke.default.isatty(1)}),stderr:Ht({isTTY:ke.default.isatty(2)})},qt=Wi;function Lt(t,e,n){let i=t.indexOf(e);if(i===-1)return t;let r=e.length,u=0,s="";do s+=t.slice(u,i)+e+n,u=i+r,i=t.indexOf(e,u);while(i!==-1);return s+=t.slice(u),s}function Gt(t,e,n,i){let r=0,u="";do{let s=t[i-1]==="\r";u+=t.slice(r,s?i-1:i)+e+(s?`\r
28
28
  `:`
29
29
  `)+n,r=i+1,i=t.indexOf(`
30
30
  `,r)}while(i!==-1);return u+=t.slice(r),u}var{stdout:Ut,stderr:Yt}=qt,$e=Symbol("GENERATOR"),R=Symbol("STYLER"),Y=Symbol("IS_EMPTY"),zt=["ansi","ansi","ansi256","ansi16m"],j=Object.create(null),qi=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=Ut?Ut.level:0;t.level=e.level===void 0?n:e.level};var Li=t=>{let e=(...n)=>n.join(" ");return qi(e,t),Object.setPrototypeOf(e,z.prototype),e};function z(t){return Li(t)}Object.setPrototypeOf(z.prototype,Function.prototype);for(let[t,e]of Object.entries(v))j[t]={get(){let n=ae(this,Ne(e.open,e.close,this[R]),this[Y]);return Object.defineProperty(this,t,{value:n}),n}};j.visible={get(){let t=ae(this,this[R],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Pe=(t,e,n,...i)=>t==="rgb"?e==="ansi16m"?v[n].ansi16m(...i):e==="ansi256"?v[n].ansi256(v.rgbToAnsi256(...i)):v[n].ansi(v.rgbToAnsi(...i)):t==="hex"?Pe("rgb",e,n,...v.hexToRgb(...i)):v[n][t](...i),Gi=["rgb","hex","ansi256"];for(let t of Gi){j[t]={get(){let{level:n}=this;return function(...i){let r=Ne(Pe(t,zt[n],"color",...i),v.color.close,this[R]);return ae(this,r,this[Y])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);j[e]={get(){let{level:n}=this;return function(...i){let r=Ne(Pe(t,zt[n],"bgColor",...i),v.bgColor.close,this[R]);return ae(this,r,this[Y])}}}}var Ui=Object.defineProperties(()=>{},{...j,level:{enumerable:!0,get(){return this[$e].level},set(t){this[$e].level=t}}}),Ne=(t,e,n)=>{let i,r;return n===void 0?(i=t,r=e):(i=n.openAll+t,r=e+n.closeAll),{open:t,close:e,openAll:i,closeAll:r,parent:n}},ae=(t,e,n)=>{let i=(...r)=>Yi(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,Ui),i[$e]=t,i[R]=e,i[Y]=n,i},Yi=(t,e)=>{if(t.level<=0||!e)return t[Y]?"":e;let n=t[R];if(n===void 0)return e;let{openAll:i,closeAll:r}=n;if(e.includes("\x1B"))for(;n!==void 0;)e=Lt(e,n.close,n.open),n=n.parent;let u=e.indexOf(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vitnode-app",
3
- "version": "0.0.9-canary.60",
3
+ "version": "0.0.9-canary.62",
4
4
  "description": "Create a new VitNode app in seconds.",
5
5
  "author": "VitNode Team",
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "ora": "^8.1.0",
43
43
  "tsup": "^8.3.0",
44
44
  "typescript": "^5.6.2",
45
- "eslint-config-typescript-vitnode": "0.0.9-canary.60"
45
+ "eslint-config-typescript-vitnode": "0.0.9-canary.62"
46
46
  },
47
47
  "scripts": {
48
48
  "lint": "eslint .",
@@ -0,0 +1,10 @@
1
+ import {
2
+ generateMetadataSettingsAiAdmin,
3
+ SettingsAiAdminView,
4
+ } from 'vitnode-frontend/views/admin/views/core/ai/settings/settings-ai-admin-view';
5
+
6
+ export const generateMetadata = generateMetadataSettingsAiAdmin;
7
+
8
+ export default function Page() {
9
+ return <SettingsAiAdminView />;
10
+ }
@@ -16,6 +16,13 @@ export type Scalars = {
16
16
  Upload: { input: File; output: File; }
17
17
  };
18
18
 
19
+ export const AiProvider = {
20
+ google: 'google',
21
+ none: 'none',
22
+ openai: 'openai'
23
+ } as const;
24
+
25
+ export type AiProvider = typeof AiProvider[keyof typeof AiProvider];
19
26
  export const AllowTypeFilesEnum = {
20
27
  all: 'all',
21
28
  images: 'images',
@@ -259,6 +266,8 @@ export type LogsAdminEmailObj = {
259
266
 
260
267
  export type Mutation = {
261
268
  __typename?: 'Mutation';
269
+ admin__core_ai__edit: ShowAdminCoreAiObj;
270
+ admin__core_ai__test: Scalars['String']['output'];
262
271
  admin__core_authorization_settings__edit: ShowAdminAuthorizationSettingsObj;
263
272
  admin__core_email_settings__edit: ShowAdminEmailSettingsServiceObj;
264
273
  admin__core_email_settings__test: Scalars['String']['output'];
@@ -312,6 +321,18 @@ export type Mutation = {
312
321
  };
313
322
 
314
323
 
324
+ export type MutationAdmin__Core_Ai__EditArgs = {
325
+ key?: InputMaybe<Scalars['String']['input']>;
326
+ model: Scalars['String']['input'];
327
+ provider: AiProvider;
328
+ };
329
+
330
+
331
+ export type MutationAdmin__Core_Ai__TestArgs = {
332
+ prompt: Scalars['String']['input'];
333
+ };
334
+
335
+
315
336
  export type MutationAdmin__Core_Authorization_Settings__EditArgs = {
316
337
  force_login: Scalars['Boolean']['input'];
317
338
  lock_register: Scalars['Boolean']['input'];
@@ -665,6 +686,7 @@ export type PageInfo = {
665
686
 
666
687
  export type Query = {
667
688
  __typename?: 'Query';
689
+ admin__core_ai__show: ShowAdminCoreAiObj;
668
690
  admin__core_authorization_settings__show: ShowAdminAuthorizationSettingsObj;
669
691
  admin__core_email__logs: LogsAdminEmailObj;
670
692
  admin__core_email_settings__show: ShowAdminEmailSettingsServiceObj;
@@ -850,6 +872,12 @@ export type ShowAdminCaptchaSecurityObj = {
850
872
  type: CaptchaTypeEnum | `${CaptchaTypeEnum}`;
851
873
  };
852
874
 
875
+ export type ShowAdminCoreAiObj = {
876
+ __typename?: 'ShowAdminCoreAiObj';
877
+ model?: Maybe<Scalars['String']['output']>;
878
+ provider: AiProvider | `${AiProvider}`;
879
+ };
880
+
853
881
  export type ShowAdminEmailSettingsServiceObj = {
854
882
  __typename?: 'ShowAdminEmailSettingsServiceObj';
855
883
  color_primary: Scalars['String']['output'];
@@ -306,7 +306,6 @@
306
306
  },
307
307
  "create": {
308
308
  "title": "Create Plugin",
309
- "success": "Plugin has been created.",
310
309
  "name": {
311
310
  "label": "Name",
312
311
  "desc": "Min 3-50 characters."
@@ -341,11 +340,6 @@
341
340
  "title": "Upload Plugin",
342
341
  "title_new_version": "Upload New Version Plugin",
343
342
  "info": "After uploading the plugin, you need to restart the server to apply the changes.",
344
- "success": {
345
- "title": "Plugin has been uploaded.",
346
- "update": "The plugin has been updated.",
347
- "desc": "You can now restart the server to apply the changes."
348
- },
349
343
  "errors": {
350
344
  "PLUGIN_ALREADY_EXISTS": "Plugin with this code already exists. If you want to update the plugin, use the upload new version form from the plugin dropdown menu.",
351
345
  "PLUGIN_VERSION_IS_LOWER": "The version of the uploaded plugin is lower than the current version."
@@ -355,11 +349,7 @@
355
349
  "delete": {
356
350
  "submit": "Yes, delete plugin",
357
351
  "desc": "This action will delete <name></name> plugin created by <author></author> and all data associated with it.",
358
- "info": "You may see the errors while the system is changing files. After the process is complete, you need to restart the server to apply the changes.",
359
- "success": {
360
- "title": "Plugin has been deleted.",
361
- "desc": "You can now restart the server to apply the changes."
362
- }
352
+ "info": "You may see the errors while the system is changing files. After the process is complete, you need to restart the server to apply the changes."
363
353
  },
364
354
  "download": {
365
355
  "title": "Download Plugin",
@@ -496,6 +486,33 @@
496
486
  "submit": "Yes, delete file"
497
487
  }
498
488
  }
489
+ },
490
+ "ai": {
491
+ "settings": {
492
+ "key": "API Key",
493
+ "title": "Settings (AI)",
494
+ "desc": "Integrate powerful Artificial Intelligence to boost user experience with personalized content, smarter search, SEO optimization and more.",
495
+ "none": "None",
496
+ "google": {
497
+ "title": "Google AI",
498
+ "desc": "Read more on <link>Google AI - VitNode Docs</link>."
499
+ },
500
+ "openai": {
501
+ "title": "OpenAI",
502
+ "desc": "Read more on <link>OpenAI - VitNode Docs</link>."
503
+ },
504
+ "model": "Model",
505
+ "provider": "Provider",
506
+ "testing": {
507
+ "title": "Test Your AI",
508
+ "desc": "Here you can test your AI to see how it works.",
509
+ "response": "Response",
510
+ "response_success": "If you see the response, your AI is working correctly.",
511
+ "prompt": "Prompt",
512
+ "prompt_placeholder": "Ask a question...",
513
+ "submit": "Ask"
514
+ }
515
+ }
499
516
  }
500
517
  },
501
518
  "members": {
@@ -319,6 +319,8 @@
319
319
  "settings_email": "Email",
320
320
  "settings_authorization": "Authorization",
321
321
  "settings_legal": "Legal & Policies",
322
+ "ai": "Artificial Intelligence (AI)",
323
+ "ai_settings": "Settings",
322
324
  "plugins": "Plugins",
323
325
  "styles": "Styles",
324
326
  "styles_theme-editor": "Theme Editor",