create-vitnode-app 0.0.7-canary.26 → 0.0.7-canary.27

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.
Files changed (30) hide show
  1. package/dist/index.cjs +1 -1
  2. package/package.json +4 -7
  3. package/templates/basic/backend/nest-cli.json +15 -0
  4. package/templates/basic/backend/src/app.module.ts +23 -0
  5. package/templates/basic/backend/src/database.ts +19 -0
  6. package/templates/basic/backend/src/main.ts +27 -0
  7. package/templates/basic/backend/src/plugins/plugins.module.ts +14 -0
  8. package/templates/basic/backend/src/plugins/welcome/admin/admin.module.ts +4 -0
  9. package/templates/basic/backend/src/plugins/welcome/admin/database/drizzle.config.ts +11 -0
  10. package/templates/basic/backend/src/plugins/welcome/admin/database/functions.ts +6 -0
  11. package/templates/basic/backend/src/plugins/welcome/admin/database/index.ts +1 -0
  12. package/templates/basic/backend/src/plugins/welcome/config.json +10 -0
  13. package/templates/basic/backend/src/plugins/welcome/versions.json +3 -0
  14. package/templates/basic/backend/src/plugins/welcome/welcome.module.ts +8 -0
  15. package/templates/basic/backend/tsconfig.build.json +4 -0
  16. package/templates/basic/backend/tsconfig.json +14 -0
  17. package/templates/basic/backend/uploads/index.html +0 -0
  18. package/templates/basic/backend/uploads/private/index.html +0 -0
  19. package/templates/basic/backend/uploads/public/index.html +0 -0
  20. package/templates/basic/backend/uploads/temp/index.html +0 -0
  21. package/templates/basic/frontend/i18n.ts +13 -0
  22. package/templates/basic/frontend/middleware.ts +7 -0
  23. package/templates/basic/frontend/next.config.mjs +6 -0
  24. package/templates/basic/frontend/postcss.config.mjs +9 -0
  25. package/templates/basic/frontend/tailwind.config.ts +15 -0
  26. package/templates/basic/frontend/tsconfig.json +19 -0
  27. package/templates/basic/tsconfig.json +4 -0
  28. package/templates/eslint/.prettierrc.mjs +11 -0
  29. package/templates/eslint/backend/.eslintrc.json +5 -0
  30. package/templates/eslint/frontend/.eslintrc.json +5 -0
package/dist/index.cjs CHANGED
@@ -20,7 +20,7 @@ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
20
20
  `),this.outputHelp({error:!0}));let i=t||{},n=i.exitCode||1,s=i.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in p.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,p.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Be(this.options),t=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&t(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let i=r=>{let l=r.attributeName(),a=this.getOptionValue(l),u=this.options.find(c=>c.negate&&l===c.attributeName()),h=this.options.find(c=>!c.negate&&l===c.attributeName());return u&&(u.presetArg===void 0&&a===!1||u.presetArg!==void 0&&a===u.presetArg)?u:h||r},n=r=>{let l=i(r),a=l.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},s=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let r=s.createHelp().visibleOptions(s).filter(l=>l.long).map(l=>l.long);n=n.concat(r),s=s.parent}while(s&&!s._enablePositionalOptions);t=re(e,n)}let i=`error: unknown option '${e}'${t}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,i=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${i} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),t=re(e,n)}let i=`error: unknown command '${e}'${t}`;this.error(i,{code:"commander.unknownCommand"})}version(e,t,i){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",i=i||"output the version number";let n=this.createOption(t,i);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
21
21
  `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(i=>Le(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=b.basename(e,b.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},i;return t.error?i=n=>this._outputConfiguration.writeErr(n):i=n=>this._outputConfiguration.writeOut(n),t.write=e.write||i,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(t&&(n=t(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=p.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
22
22
  Expecting one of '${i.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let r;typeof t=="function"?r=t({error:s.error,command:s.command}):r=t,r&&s.write(`${r}
23
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function oe(o){return o.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:i=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],i=s[3],n=s[4]),t&&n!=="0"?`${t}=${i}:${parseInt(n)+1}`:e})}ae.Command=Y});var pe=v(f=>{"use strict";var{Argument:ue}=S(),{Command:K}=le(),{CommanderError:Ge,InvalidArgumentError:he}=E(),{Help:Je}=M(),{Option:ce}=B();f.program=new K;f.createCommand=o=>new K(o);f.createOption=(o,e)=>new ce(o,e);f.createArgument=(o,e)=>new ue(o,e);f.Command=K;f.Option=ce;f.Argument=ue;f.Help=Je;f.CommanderError=Ge;f.InvalidArgumentError=he;f.InvalidOptionArgumentError=he});var _=require("path"),ve=require("fs");var me=O(pe(),1),{program:nt,createCommand:st,createArgument:rt,createOption:ot,CommanderError:at,InvalidArgumentError:lt,InvalidOptionArgumentError:ut,Command:de,Argument:ht,Option:fe,Help:ct}=me.default;var g=O(require("picocolors"),1),xe=O(require("figlet"),1),Ee=O(require("prompts"),1);var ge={name:"create-vitnode-app",version:"0.0.7-canary.25",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/aXenDeveloper/VitNode.git",directory:"packages/create-vitnode-app"},files:["dist"],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"},dependencies:{figlet:"^1.7.0",picocolors:"^1.0.1",prompts:"^2.4.2","validate-npm-package-name":"^5.0.1"},devDependencies:{"@types/figlet":"^1.5.8","@types/node":"^20","@types/prompts":"^2.4.9","@types/validate-npm-package-name":"^4.0.2",commander:"^12.1.0",tsup:"^8.1.0",typescript:"^5","eslint-config-typescript-vitnode":"workspace:*"}};var _e=O(require("validate-npm-package-name"),1),X=({name:o})=>{let e=(0,_e.default)(o);return e.validForNewPackages?{valid:!0}:{valid:!1,problems:[...e.errors||[],...e.warnings||[]]}};var H=require("fs"),Oe=require("path"),Q=O(require("picocolors"),1);function N(o,e){let t=[".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,H.readdirSync)(o).filter(n=>!t.includes(n)&&!n.endsWith(".iml"));if(i.length>0){console.log(`The directory ${Q.default.green(e)} contains files that could conflict:`),console.log();for(let n of i)try{(0,H.lstatSync)((0,Oe.join)(o,n)).isDirectory()?console.log(`${Q.default.blue(n)}/`):console.log(`${n}`)}catch{console.log(`${n}`)}return console.log(`
23
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function oe(o){return o.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:i=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],i=s[3],n=s[4]),t&&n!=="0"?`${t}=${i}:${parseInt(n)+1}`:e})}ae.Command=Y});var pe=v(f=>{"use strict";var{Argument:ue}=S(),{Command:K}=le(),{CommanderError:Ge,InvalidArgumentError:he}=E(),{Help:Je}=M(),{Option:ce}=B();f.program=new K;f.createCommand=o=>new K(o);f.createOption=(o,e)=>new ce(o,e);f.createArgument=(o,e)=>new ue(o,e);f.Command=K;f.Option=ce;f.Argument=ue;f.Help=Je;f.CommanderError=Ge;f.InvalidArgumentError=he;f.InvalidOptionArgumentError=he});var _=require("path"),ve=require("fs");var me=O(pe(),1),{program:nt,createCommand:st,createArgument:rt,createOption:ot,CommanderError:at,InvalidArgumentError:lt,InvalidOptionArgumentError:ut,Command:de,Argument:ht,Option:fe,Help:ct}=me.default;var g=O(require("picocolors"),1),xe=O(require("figlet"),1),Ee=O(require("prompts"),1);var ge={name:"create-vitnode-app",version:"0.0.7-canary.26",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/aXenDeveloper/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"},dependencies:{figlet:"^1.7.0",picocolors:"^1.0.1",prompts:"^2.4.2","validate-npm-package-name":"^5.0.1"},devDependencies:{"@types/figlet":"^1.5.8","@types/node":"^20.14.11","@types/prompts":"^2.4.9","@types/validate-npm-package-name":"^4.0.2",commander:"^12.1.0",tsup:"^8.1.0",typescript:"^5.5.3","eslint-config-typescript-vitnode":"workspace:*"}};var _e=O(require("validate-npm-package-name"),1),X=({name:o})=>{let e=(0,_e.default)(o);return e.validForNewPackages?{valid:!0}:{valid:!1,problems:[...e.errors||[],...e.warnings||[]]}};var H=require("fs"),Oe=require("path"),Q=O(require("picocolors"),1);function N(o,e){let t=[".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,H.readdirSync)(o).filter(n=>!t.includes(n)&&!n.endsWith(".iml"));if(i.length>0){console.log(`The directory ${Q.default.green(e)} contains files that could conflict:`),console.log();for(let n of i)try{(0,H.lstatSync)((0,Oe.join)(o,n)).isDirectory()?console.log(`${Q.default.blue(n)}/`):console.log(`${n}`)}catch{console.log(`${n}`)}return console.log(`
24
24
  Either try using a new directory name, or remove the files listed above.
25
25
  `),!1}return!0}var be=require("constants"),Ce=require("fs/promises");async function Ae(o){try{return await(0,Ce.access)(o,be.W_OK),!0}catch{return!1}}var C=require("fs"),x=require("path"),Z=O(require("picocolors"),1);var we=({root:o,appName:e,packageManager:t,eslint:i})=>{let n=(0,x.join)(__dirname,"..","templates");console.log(n),console.log(`Creating a new VitNode app in ${Z.default.green(o)}. Using ${Z.default.green(t)}...
26
26
  `),(0,C.mkdirSync)(o,{recursive:!0}),N(o,e)||process.exit(1),process.chdir(o);let s=(0,x.join)(o,"package.json");if((0,C.cpSync)((0,x.join)(n,"basic"),o,{recursive:!0}),t==="pnpm"){let r=(0,x.join)(o,"frontend","tailwind.config.ts"),a=(0,C.readFileSync)(r,"utf-8").replace("../../node_modules/vitnode-frontend/src/components/**/*.tsx","./node_modules/vitnode-frontend/src/components/**/*.tsx").replace("../../node_modules/vitnode-frontend/src/views/**/*.tsx","./node_modules/vitnode-frontend/src/views/**/*.tsx");(0,C.writeFileSync)(r,a)}i&&(0,C.cpSync)((0,x.join)(n,"eslint"),o,{recursive:!0})};var P=O(require("picocolors"),1),F=O(require("prompts"),1),$=o=>{o.aborted&&(process.stdout.write("\x1B[?25h"),process.stdout.write(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vitnode-app",
3
- "version": "0.0.7-canary.26",
3
+ "version": "0.0.7-canary.27",
4
4
  "description": "Create a new VitNode app in seconds.",
5
5
  "author": "VitNode Team",
6
6
  "license": "MIT",
@@ -10,9 +10,6 @@
10
10
  "url": "git+https://github.com/aXenDeveloper/VitNode.git",
11
11
  "directory": "packages/create-vitnode-app"
12
12
  },
13
- "files": [
14
- "dist"
15
- ],
16
13
  "type": "module",
17
14
  "bin": {
18
15
  "create-vitnode-app": "dist/index.cjs"
@@ -25,13 +22,13 @@
25
22
  },
26
23
  "devDependencies": {
27
24
  "@types/figlet": "^1.5.8",
28
- "@types/node": "^20",
25
+ "@types/node": "^20.14.11",
29
26
  "@types/prompts": "^2.4.9",
30
27
  "@types/validate-npm-package-name": "^4.0.2",
31
28
  "commander": "^12.1.0",
32
29
  "tsup": "^8.1.0",
33
- "typescript": "^5",
34
- "eslint-config-typescript-vitnode": "0.0.7-canary.26"
30
+ "typescript": "^5.5.3",
31
+ "eslint-config-typescript-vitnode": "0.0.7-canary.27"
35
32
  },
36
33
  "scripts": {
37
34
  "lint": "eslint .",
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/nest-cli",
3
+ "collection": "@nestjs/schematics",
4
+ "sourceRoot": "src",
5
+ "compilerOptions": {
6
+ "deleteOutDir": true,
7
+ "builder": {
8
+ "type": "swc",
9
+ "options": {
10
+ "extensions": [".ts", ".tsx"]
11
+ }
12
+ },
13
+ "typeCheck": true
14
+ }
15
+ }
@@ -0,0 +1,23 @@
1
+ import { join } from 'path';
2
+
3
+ import { Module } from '@nestjs/common';
4
+ import { VitNodeCoreModule } from 'vitnode-backend';
5
+
6
+ import { PluginsModule } from './plugins/plugins.module';
7
+ import { DATABASE_ENVS, schemaDatabase } from './database';
8
+
9
+ @Module({
10
+ imports: [
11
+ VitNodeCoreModule.register({
12
+ paths: {
13
+ envFile: join(process.cwd(), '..', '..', '.env'),
14
+ },
15
+ database: {
16
+ config: DATABASE_ENVS,
17
+ schemaDatabase,
18
+ },
19
+ }),
20
+ PluginsModule,
21
+ ],
22
+ })
23
+ export class AppModule {}
@@ -0,0 +1,19 @@
1
+ // ! DO NOT REMOVE, MODIFY OR MOVE THIS FILE!!!
2
+
3
+ import tableCore from '@/plugins/core/admin/database/index';
4
+ import tableWelcome from '@/plugins/welcome/admin/database/index';
5
+ // ! === IMPORT ===
6
+
7
+ export const schemaDatabase = {
8
+ ...tableWelcome,
9
+ // ! === MODULE ===
10
+ ...tableCore,
11
+ };
12
+
13
+ export const DATABASE_ENVS = {
14
+ host: process.env.DB_HOST || 'localhost',
15
+ port: process.env.DB_PORT ? +process.env.DB_PORT : 5432,
16
+ user: process.env.DB_USER || 'root',
17
+ password: process.env.DB_PASSWORD || 'root',
18
+ database: process.env.DB_DATABASE || 'vitnode',
19
+ };
@@ -0,0 +1,27 @@
1
+ /* eslint-disable no-console */
2
+ import { NestFactory } from '@nestjs/core';
3
+ import { INestApplication } from '@nestjs/common';
4
+ import { nestjsMainApp } from 'vitnode-backend';
5
+
6
+ import { AppModule } from './app.module';
7
+
8
+ async function bootstrap() {
9
+ const app: INestApplication = await NestFactory.create(AppModule);
10
+
11
+ nestjsMainApp(app, {
12
+ cors: {
13
+ origin: [
14
+ process.env.NEXT_PUBLIC_FRONTEND_URL
15
+ ? process.env.NEXT_PUBLIC_FRONTEND_URL
16
+ : 'http://localhost:3000',
17
+ ],
18
+ },
19
+ });
20
+
21
+ await app.listen(process.env.PORT ?? '8080', null, () => {
22
+ console.log(
23
+ `Application is running on: http://localhost:${process.env.PORT ?? 8080}/graphql`,
24
+ );
25
+ });
26
+ }
27
+ bootstrap();
@@ -0,0 +1,14 @@
1
+ // ! DO NOT REMOVE, MODIFY OR MOVE THIS FILE!!!
2
+
3
+ import { Module } from '@nestjs/common';
4
+
5
+ import { WelcomeModule } from './welcome/welcome.module';
6
+ // ! === IMPORT ===
7
+
8
+ @Module({
9
+ imports: [
10
+ WelcomeModule,
11
+ // ! === MODULE ===
12
+ ],
13
+ })
14
+ export class PluginsModule {}
@@ -0,0 +1,4 @@
1
+ import { Module } from '@nestjs/common';
2
+
3
+ @Module({})
4
+ export class AdminWelcomeModule {}
@@ -0,0 +1,11 @@
1
+ // ! DO NOT REMOVE, MODIFY OR MOVE THIS FILE!!!
2
+ import { defineConfig } from 'drizzle-kit';
3
+
4
+ import { DATABASE_ENVS } from '@/database';
5
+
6
+ export default defineConfig({
7
+ dialect: 'postgresql',
8
+ dbCredentials: DATABASE_ENVS,
9
+ schema: './plugins/welcome/admin/database/schema/*.ts',
10
+ out: './plugins/welcome/admin/database/migrations/',
11
+ });
@@ -0,0 +1,6 @@
1
+ // ! DO NOT REMOVE, MODIFY OR MOVE THIS FILE!!!
2
+ import { default as tables } from './index';
3
+
4
+ export const getTables = () => {
5
+ return Object.keys(tables);
6
+ };
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "Welcome",
3
+ "description": "Basic plugin with default page.",
4
+ "code": "welcome",
5
+ "author": "VitNode",
6
+ "author_url": "https://vitnode.com/",
7
+ "support_url": "https://github.com/aXenDeveloper/vitnode/issues",
8
+ "allow_default": true,
9
+ "nav": []
10
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "10000": "1.0.0"
3
+ }
@@ -0,0 +1,8 @@
1
+ import { Module } from '@nestjs/common';
2
+
3
+ import { AdminWelcomeModule } from './admin/admin.module';
4
+
5
+ @Module({
6
+ imports: [AdminWelcomeModule],
7
+ })
8
+ export class WelcomeModule {}
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "uploads"]
4
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "eslint-config-typescript-vitnode/tsconfig.nest.json",
4
+ "compilerOptions": {
5
+ "target": "ESNext",
6
+ "module": "commonjs",
7
+ "baseUrl": "./",
8
+ "outDir": "./dist",
9
+ "paths": {
10
+ "@/*": ["./src/*", "./node_modules/vitnode-backend/dist/*"]
11
+ }
12
+ },
13
+ "exclude": ["uploads"]
14
+ }
File without changes
@@ -0,0 +1,13 @@
1
+ import { getRequestConfig } from 'next-intl/server';
2
+ import { i18nConfig } from 'vitnode-frontend/i18n';
3
+
4
+ export default getRequestConfig(async args => {
5
+ const config = await i18nConfig({
6
+ ...args,
7
+ pathsToMessagesFromPlugins: async ({ plugin, locale }) => {
8
+ return import(`./plugins/${plugin}/langs/${locale}.json`);
9
+ },
10
+ });
11
+
12
+ return config;
13
+ });
@@ -0,0 +1,7 @@
1
+ import createMiddleware from 'vitnode-frontend/middleware';
2
+
3
+ export default createMiddleware();
4
+
5
+ export const config = {
6
+ matcher: '/((?!_next/static|_next/image|robots.txt|sitemap.xml|sitemap).*)',
7
+ };
@@ -0,0 +1,6 @@
1
+ import VitNodeConfig from 'vitnode-frontend/next.config';
2
+
3
+ /** @type {import('next').NextConfig} */
4
+ const nextConfig = {};
5
+
6
+ export default VitNodeConfig(nextConfig);
@@ -0,0 +1,9 @@
1
+ /** @type {import('postcss-load-config').Config} */
2
+ const config = {
3
+ plugins: {
4
+ tailwindcss: {},
5
+ autoprefixer: {},
6
+ },
7
+ };
8
+
9
+ export default config;
@@ -0,0 +1,15 @@
1
+ import { Config } from 'tailwindcss';
2
+ import vitnodeConfig from 'vitnode-frontend/tailwind.config';
3
+
4
+ const config = {
5
+ presets: [vitnodeConfig],
6
+ content: [
7
+ '../../node_modules/vitnode-frontend/src/components/**/*.tsx',
8
+ '../../node_modules/vitnode-frontend/src/views/**/*.tsx',
9
+ './components/**/*.{ts,tsx}',
10
+ './app/**/*.{ts,tsx}',
11
+ './plugins/templates/**/*.{ts,tsx}',
12
+ ],
13
+ } satisfies Config;
14
+
15
+ export default config;
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "eslint-config-typescript-vitnode/tsconfig.next.json",
4
+ "compilerOptions": {
5
+ "target": "ES2022",
6
+ "module": "ESNext",
7
+ "baseUrl": "./",
8
+ "lib": ["dom", "dom.iterable", "esnext"],
9
+ "plugins": [
10
+ {
11
+ "name": "next"
12
+ }
13
+ ],
14
+ "paths": {
15
+ "@/*": ["./*"]
16
+ }
17
+ },
18
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"]
19
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "eslint-config-typescript-vitnode/tsconfig.shared.json"
4
+ }
@@ -0,0 +1,11 @@
1
+ import vitnodePrettier from "eslint-config-typescript-vitnode/prettierrc.mjs";
2
+
3
+ /**
4
+ * @see https://prettier.io/docs/en/configuration.html
5
+ * @type {import("prettier").Config}
6
+ */
7
+ const config = {
8
+ ...vitnodePrettier,
9
+ };
10
+
11
+ export default config;
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/eslintrc",
3
+ "extends": ["eslint-config-typescript-vitnode/.eslintrc.shared.json"],
4
+ "ignorePatterns": ["uploads"]
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/eslintrc",
3
+ "extends": ["eslint-config-typescript-vitnode/.eslintrc.react.json"],
4
+ "ignorePatterns": ["next-config-temp.js"]
5
+ }