create-vitnode-app 0.0.9-canary.65 → 0.0.9-canary.67
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 +1 -1
- package/package.json +2 -2
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/page.tsx +1 -8
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/[code]/dev/layout.tsx +0 -1
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/[code]/dev/permissions-admin/page.tsx +7 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/ai/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/graphql/types.ts +44 -24
- package/templates/basic/apps/frontend/src/plugins/admin/langs/en.json +47 -44
- package/templates/basic/apps/frontend/src/plugins/core/langs/en.json +2 -2
- package/templates/basic/apps/frontend/src/plugins/welcome/langs/en.json +3 -1
- package/eslint.config.mjs +0 -9
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/ai/settings/page.tsx +0 -10
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.
|
|
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.66",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.
|
|
3
|
+
"version": "0.0.9-canary.67",
|
|
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.
|
|
45
|
+
"eslint-config-typescript-vitnode": "0.0.9-canary.67"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"lint": "eslint .",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// ! DO NOT TOUCH THIS FILE!!! IT IS GENERATED BY VITNODE-CLI
|
|
2
2
|
// ! If you remove this then default page plugin will not work
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { TranslationsProvider } from 'vitnode-frontend/components/translations-provider';
|
|
5
4
|
import { getSessionData } from 'vitnode-frontend/graphql/get-session-data';
|
|
6
5
|
import { generateMetadataDefaultPage } from 'vitnode-frontend/views/theme/views/default-page';
|
|
7
6
|
|
|
@@ -20,11 +19,5 @@ export default async function Page() {
|
|
|
20
19
|
),
|
|
21
20
|
);
|
|
22
21
|
|
|
23
|
-
return
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25
|
-
// @ts-expect-error
|
|
26
|
-
<TranslationsProvider namespaces={`${plugin_default}.home`}>
|
|
27
|
-
<PageFromTheme />
|
|
28
|
-
</TranslationsProvider>
|
|
29
|
-
);
|
|
22
|
+
return <PageFromTheme />;
|
|
30
23
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PermissionsAdminDevPluginAdminView } from 'vitnode-frontend/views/admin/views/core/plugins/views/dev/permissions-admin/permissions-admin';
|
|
2
|
+
|
|
3
|
+
export default function Page(
|
|
4
|
+
props: React.ComponentProps<typeof PermissionsAdminDevPluginAdminView>,
|
|
5
|
+
) {
|
|
6
|
+
return <PermissionsAdminDevPluginAdminView {...props} />;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AiSettingsCoreAdminView,
|
|
3
|
+
generateMetadataAiSettingsAdmin,
|
|
4
|
+
} from 'vitnode-frontend/views/admin/views/core/settings/ai/ai-settings-core-admin-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataAiSettingsAdmin;
|
|
7
|
+
|
|
8
|
+
export default function Page() {
|
|
9
|
+
return <AiSettingsCoreAdminView />;
|
|
10
|
+
}
|
|
@@ -16,13 +16,6 @@ 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];
|
|
26
19
|
export const AllowTypeFilesEnum = {
|
|
27
20
|
all: 'all',
|
|
28
21
|
images: 'images',
|
|
@@ -42,7 +35,6 @@ export type AuthorizationAdminSessionsObj = {
|
|
|
42
35
|
export type AuthorizationCoreMiddleware = {
|
|
43
36
|
__typename?: 'AuthorizationCoreMiddleware';
|
|
44
37
|
force_login: Scalars['Boolean']['output'];
|
|
45
|
-
is_email_enabled: Scalars['Boolean']['output'];
|
|
46
38
|
lock_register: Scalars['Boolean']['output'];
|
|
47
39
|
};
|
|
48
40
|
|
|
@@ -259,7 +251,6 @@ export type LogsAdminEmailObj = {
|
|
|
259
251
|
|
|
260
252
|
export type Mutation = {
|
|
261
253
|
__typename?: 'Mutation';
|
|
262
|
-
admin__core_ai__edit: ShowAdminCoreAiObj;
|
|
263
254
|
admin__core_ai__test: Scalars['String']['output'];
|
|
264
255
|
admin__core_authorization_settings__edit: ShowAdminAuthorizationSettingsObj;
|
|
265
256
|
admin__core_email_settings__edit: ShowAdminEmailSettingsServiceObj;
|
|
@@ -286,6 +277,8 @@ export type Mutation = {
|
|
|
286
277
|
admin__core_plugins__nav__create: ShowAdminNavPluginsObj;
|
|
287
278
|
admin__core_plugins__nav__delete: Scalars['String']['output'];
|
|
288
279
|
admin__core_plugins__nav__edit: ShowAdminNavPluginsObj;
|
|
280
|
+
admin__core_plugins__permissions_admin__create_edit: ShowAdminPermissionsAdminPluginsObj;
|
|
281
|
+
admin__core_plugins__permissions_admin__delete: Scalars['String']['output'];
|
|
289
282
|
admin__core_plugins__upload: Scalars['String']['output'];
|
|
290
283
|
admin__core_security__captcha__edit: ShowAdminCaptchaSecurityObj;
|
|
291
284
|
admin__core_staff_administrators__create: ShowAdminStaffAdministrators;
|
|
@@ -314,13 +307,6 @@ export type Mutation = {
|
|
|
314
307
|
};
|
|
315
308
|
|
|
316
309
|
|
|
317
|
-
export type MutationAdmin__Core_Ai__EditArgs = {
|
|
318
|
-
key?: InputMaybe<Scalars['String']['input']>;
|
|
319
|
-
model: Scalars['String']['input'];
|
|
320
|
-
provider: AiProvider;
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
|
|
324
310
|
export type MutationAdmin__Core_Ai__TestArgs = {
|
|
325
311
|
prompt: Scalars['String']['input'];
|
|
326
312
|
};
|
|
@@ -517,6 +503,21 @@ export type MutationAdmin__Core_Plugins__Nav__EditArgs = {
|
|
|
517
503
|
};
|
|
518
504
|
|
|
519
505
|
|
|
506
|
+
export type MutationAdmin__Core_Plugins__Permissions_Admin__Create_EditArgs = {
|
|
507
|
+
id: Scalars['String']['input'];
|
|
508
|
+
old_id?: InputMaybe<Scalars['String']['input']>;
|
|
509
|
+
parent_id?: InputMaybe<Scalars['String']['input']>;
|
|
510
|
+
plugin_code: Scalars['String']['input'];
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
export type MutationAdmin__Core_Plugins__Permissions_Admin__DeleteArgs = {
|
|
515
|
+
id: Scalars['String']['input'];
|
|
516
|
+
parent_id?: InputMaybe<Scalars['String']['input']>;
|
|
517
|
+
plugin_code: Scalars['String']['input'];
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
|
|
520
521
|
export type MutationAdmin__Core_Plugins__UploadArgs = {
|
|
521
522
|
code?: InputMaybe<Scalars['String']['input']>;
|
|
522
523
|
file: Scalars['Upload']['input'];
|
|
@@ -673,9 +674,15 @@ export type PageInfo = {
|
|
|
673
674
|
totalCount: Scalars['Float']['output'];
|
|
674
675
|
};
|
|
675
676
|
|
|
677
|
+
export type PermissionsAdminStaffAdministrators = {
|
|
678
|
+
__typename?: 'PermissionsAdminStaffAdministrators';
|
|
679
|
+
permissions: Array<ShowAdminPermissionsAdminPluginsObj>;
|
|
680
|
+
plugin: Scalars['String']['output'];
|
|
681
|
+
plugin_code: Scalars['String']['output'];
|
|
682
|
+
};
|
|
683
|
+
|
|
676
684
|
export type Query = {
|
|
677
685
|
__typename?: 'Query';
|
|
678
|
-
admin__core_ai__show: ShowAdminCoreAiObj;
|
|
679
686
|
admin__core_authorization_settings__show: ShowAdminAuthorizationSettingsObj;
|
|
680
687
|
admin__core_email__logs: LogsAdminEmailObj;
|
|
681
688
|
admin__core_email_settings__show: ShowAdminEmailSettingsServiceObj;
|
|
@@ -685,6 +692,7 @@ export type Query = {
|
|
|
685
692
|
admin__core_members__show: ShowAdminMembersObj;
|
|
686
693
|
admin__core_members__stats_sign_up: Array<SignUpStatsAdminMembers>;
|
|
687
694
|
admin__core_plugins__nav__show: Array<ShowAdminNavPluginsObj>;
|
|
695
|
+
admin__core_plugins__permissions_admin__show: Array<ShowAdminPermissionsAdminPluginsObj>;
|
|
688
696
|
admin__core_plugins__show: ShowAdminPluginsObj;
|
|
689
697
|
admin__core_security__captcha__show: ShowAdminCaptchaSecurityObj;
|
|
690
698
|
admin__core_staff_administrators__show: ShowAdminStaffAdministratorsObj;
|
|
@@ -749,6 +757,11 @@ export type QueryAdmin__Core_Plugins__Nav__ShowArgs = {
|
|
|
749
757
|
};
|
|
750
758
|
|
|
751
759
|
|
|
760
|
+
export type QueryAdmin__Core_Plugins__Permissions_Admin__ShowArgs = {
|
|
761
|
+
plugin_code: Scalars['String']['input'];
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
|
|
752
765
|
export type QueryAdmin__Core_Plugins__ShowArgs = {
|
|
753
766
|
code?: InputMaybe<Scalars['String']['input']>;
|
|
754
767
|
cursor?: InputMaybe<Scalars['Int']['input']>;
|
|
@@ -841,7 +854,6 @@ export type SecurityCoreMiddleware = {
|
|
|
841
854
|
export type ShowAdminAuthorizationSettingsObj = {
|
|
842
855
|
__typename?: 'ShowAdminAuthorizationSettingsObj';
|
|
843
856
|
force_login: Scalars['Boolean']['output'];
|
|
844
|
-
is_email_enabled: Scalars['Boolean']['output'];
|
|
845
857
|
lock_register: Scalars['Boolean']['output'];
|
|
846
858
|
require_confirm_email: Scalars['Boolean']['output'];
|
|
847
859
|
};
|
|
@@ -853,12 +865,6 @@ export type ShowAdminCaptchaSecurityObj = {
|
|
|
853
865
|
type: CaptchaTypeEnum | `${CaptchaTypeEnum}`;
|
|
854
866
|
};
|
|
855
867
|
|
|
856
|
-
export type ShowAdminCoreAiObj = {
|
|
857
|
-
__typename?: 'ShowAdminCoreAiObj';
|
|
858
|
-
model?: Maybe<Scalars['String']['output']>;
|
|
859
|
-
provider: AiProvider | `${AiProvider}`;
|
|
860
|
-
};
|
|
861
|
-
|
|
862
868
|
export type ShowAdminEmailSettingsServiceObj = {
|
|
863
869
|
__typename?: 'ShowAdminEmailSettingsServiceObj';
|
|
864
870
|
color_primary: Scalars['String']['output'];
|
|
@@ -990,6 +996,17 @@ export type ShowAdminNavPluginsObj = {
|
|
|
990
996
|
keywords: Array<Scalars['String']['output']>;
|
|
991
997
|
};
|
|
992
998
|
|
|
999
|
+
export type ShowAdminPermissionsAdminPlugins = {
|
|
1000
|
+
__typename?: 'ShowAdminPermissionsAdminPlugins';
|
|
1001
|
+
id: Scalars['String']['output'];
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
export type ShowAdminPermissionsAdminPluginsObj = {
|
|
1005
|
+
__typename?: 'ShowAdminPermissionsAdminPluginsObj';
|
|
1006
|
+
children: Array<ShowAdminPermissionsAdminPlugins>;
|
|
1007
|
+
id: Scalars['String']['output'];
|
|
1008
|
+
};
|
|
1009
|
+
|
|
993
1010
|
export type ShowAdminPlugins = {
|
|
994
1011
|
__typename?: 'ShowAdminPlugins';
|
|
995
1012
|
allow_default: Scalars['Boolean']['output'];
|
|
@@ -1039,6 +1056,7 @@ export type ShowAdminStaffAdministratorsObj = {
|
|
|
1039
1056
|
__typename?: 'ShowAdminStaffAdministratorsObj';
|
|
1040
1057
|
edges: Array<ShowAdminStaffAdministrators>;
|
|
1041
1058
|
pageInfo: PageInfo;
|
|
1059
|
+
permissions: Array<PermissionsAdminStaffAdministrators>;
|
|
1042
1060
|
};
|
|
1043
1061
|
|
|
1044
1062
|
export type ShowAdminStaffAdministratorsSortByArgs = {
|
|
@@ -1182,6 +1200,8 @@ export type ShowCoreMiddlewareObj = {
|
|
|
1182
1200
|
__typename?: 'ShowCoreMiddlewareObj';
|
|
1183
1201
|
authorization: AuthorizationCoreMiddleware;
|
|
1184
1202
|
editor: EditorShowCoreMiddleware;
|
|
1203
|
+
is_ai_enabled: Scalars['Boolean']['output'];
|
|
1204
|
+
is_email_enabled: Scalars['Boolean']['output'];
|
|
1185
1205
|
languages: Array<LanguagesCoreMiddleware>;
|
|
1186
1206
|
plugins: Array<Scalars['String']['output']>;
|
|
1187
1207
|
security: SecurityCoreMiddleware;
|
|
@@ -199,6 +199,19 @@
|
|
|
199
199
|
"confirm": "Yes, delete policy",
|
|
200
200
|
"success": "Policy has been deleted."
|
|
201
201
|
}
|
|
202
|
+
},
|
|
203
|
+
"ai": {
|
|
204
|
+
"title": "Artificial Intelligence (AI)",
|
|
205
|
+
"desc": "Integrate powerful Artificial Intelligence to boost user experience with personalized content, smarter search, SEO optimization and more.",
|
|
206
|
+
"testing": {
|
|
207
|
+
"title": "Test Your AI",
|
|
208
|
+
"desc": "Here you can test your AI to see how it works.",
|
|
209
|
+
"response": "Response",
|
|
210
|
+
"response_success": "If you see the response, your AI is working correctly.",
|
|
211
|
+
"prompt": "Prompt",
|
|
212
|
+
"prompt_placeholder": "Ask a question...",
|
|
213
|
+
"submit": "Ask"
|
|
214
|
+
}
|
|
202
215
|
}
|
|
203
216
|
},
|
|
204
217
|
"metadata": {
|
|
@@ -290,6 +303,30 @@
|
|
|
290
303
|
"desc": "This action will delete <code></code> navigation.",
|
|
291
304
|
"success": "Navigation has been deleted."
|
|
292
305
|
}
|
|
306
|
+
},
|
|
307
|
+
"permissions-admin": {
|
|
308
|
+
"title": "Permissions in AdminCP",
|
|
309
|
+
"create_edit": {
|
|
310
|
+
"id": {
|
|
311
|
+
"label": "ID",
|
|
312
|
+
"desc": "Unique ID for this permission.",
|
|
313
|
+
"exists": "Permission with this ID already exists."
|
|
314
|
+
},
|
|
315
|
+
"parent": {
|
|
316
|
+
"label": "Parent Permission",
|
|
317
|
+
"null": "No parent permission"
|
|
318
|
+
},
|
|
319
|
+
"create_success": "Permission has been created."
|
|
320
|
+
},
|
|
321
|
+
"delete": {
|
|
322
|
+
"desc": "This action will delete the permission <id></id>. Remember to delete all conditions associated with this permission.",
|
|
323
|
+
"submit": "Yes, delete permission",
|
|
324
|
+
"success": "Permission has been deleted.",
|
|
325
|
+
"children_warn": {
|
|
326
|
+
"title": "This permission has children",
|
|
327
|
+
"desc": "If you delete this permission, all children will be deleted too."
|
|
328
|
+
}
|
|
329
|
+
}
|
|
293
330
|
}
|
|
294
331
|
},
|
|
295
332
|
"create": {
|
|
@@ -474,33 +511,6 @@
|
|
|
474
511
|
"submit": "Yes, delete file"
|
|
475
512
|
}
|
|
476
513
|
}
|
|
477
|
-
},
|
|
478
|
-
"ai": {
|
|
479
|
-
"settings": {
|
|
480
|
-
"key": "API Key",
|
|
481
|
-
"title": "Settings (AI)",
|
|
482
|
-
"desc": "Integrate powerful Artificial Intelligence to boost user experience with personalized content, smarter search, SEO optimization and more.",
|
|
483
|
-
"none": "None",
|
|
484
|
-
"google": {
|
|
485
|
-
"title": "Google AI",
|
|
486
|
-
"desc": "Read more on <link>Google AI - VitNode Docs</link>."
|
|
487
|
-
},
|
|
488
|
-
"openai": {
|
|
489
|
-
"title": "OpenAI",
|
|
490
|
-
"desc": "Read more on <link>OpenAI - VitNode Docs</link>."
|
|
491
|
-
},
|
|
492
|
-
"model": "Model",
|
|
493
|
-
"provider": "Provider",
|
|
494
|
-
"testing": {
|
|
495
|
-
"title": "Test Your AI",
|
|
496
|
-
"desc": "Here you can test your AI to see how it works.",
|
|
497
|
-
"response": "Response",
|
|
498
|
-
"response_success": "If you see the response, your AI is working correctly.",
|
|
499
|
-
"prompt": "Prompt",
|
|
500
|
-
"prompt_placeholder": "Ask a question...",
|
|
501
|
-
"submit": "Ask"
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
514
|
}
|
|
505
515
|
},
|
|
506
516
|
"members": {
|
|
@@ -590,25 +600,14 @@
|
|
|
590
600
|
}
|
|
591
601
|
},
|
|
592
602
|
"staff": {
|
|
593
|
-
"
|
|
594
|
-
"unrestricted": "Unrestricted",
|
|
595
|
-
"restricted": "Restricted",
|
|
596
|
-
"user": "User",
|
|
597
|
-
"group": "Group",
|
|
598
|
-
"already_exists": "This permission is already on the list.",
|
|
599
|
-
"table": {
|
|
600
|
-
"administrator": "Administrator",
|
|
601
|
-
"moderator": "Moderator",
|
|
603
|
+
"shared": {
|
|
602
604
|
"type": "Type",
|
|
603
605
|
"updated": "Updated",
|
|
604
|
-
"permissions": "Permissions"
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
"
|
|
608
|
-
|
|
609
|
-
"user": "User",
|
|
610
|
-
"group": "Group"
|
|
611
|
-
},
|
|
606
|
+
"permissions": "Permissions",
|
|
607
|
+
"restricted": "Restricted",
|
|
608
|
+
"user": "User",
|
|
609
|
+
"group": "Group",
|
|
610
|
+
"already_exists": "This permission is already on the list.",
|
|
612
611
|
"unrestricted": {
|
|
613
612
|
"title": "Unrestricted",
|
|
614
613
|
"desc": "Unrestricted administrators have full access to the admin control panel (AdminCP)."
|
|
@@ -616,6 +615,8 @@
|
|
|
616
615
|
},
|
|
617
616
|
"moderators": {
|
|
618
617
|
"title": "Moderators",
|
|
618
|
+
"desc": "Manage access to the moderator panel (ModCP).",
|
|
619
|
+
"moderator": "Moderator",
|
|
619
620
|
"add": {
|
|
620
621
|
"title": "Add Moderator",
|
|
621
622
|
"success": "Moderator has been added"
|
|
@@ -628,6 +629,8 @@
|
|
|
628
629
|
},
|
|
629
630
|
"administrators": {
|
|
630
631
|
"title": "Administrators",
|
|
632
|
+
"desc": "Manage access to the administrator panel (AdminCP).",
|
|
633
|
+
"administrator": "Administrator",
|
|
631
634
|
"add": {
|
|
632
635
|
"title": "Add Administrator",
|
|
633
636
|
"success": "Administrator has been added"
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"no_results": "No results found.",
|
|
33
33
|
"search_results": "Search Results",
|
|
34
34
|
"select_option": "Select an option",
|
|
35
|
+
"select_options": "Select options",
|
|
35
36
|
"go_back": "Go Back",
|
|
36
37
|
"clear": "Clear",
|
|
37
38
|
"download": "Download",
|
|
@@ -320,8 +321,7 @@
|
|
|
320
321
|
"settings_email": "Email",
|
|
321
322
|
"settings_authorization": "Authorization",
|
|
322
323
|
"settings_legal": "Legal & Policies",
|
|
323
|
-
"
|
|
324
|
-
"ai_settings": "Settings",
|
|
324
|
+
"settings_ai": "AI",
|
|
325
325
|
"plugins": "Plugins",
|
|
326
326
|
"styles": "Styles",
|
|
327
327
|
"styles_theme-editor": "Theme Editor",
|
package/eslint.config.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|