@solidxai/solidctl 0.0.1

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 (111) hide show
  1. package/README.md +98 -0
  2. package/dist/app.module.d.ts +2 -0
  3. package/dist/app.module.js +17 -0
  4. package/dist/app.module.js.map +1 -0
  5. package/dist/commands/build.command.d.ts +2 -0
  6. package/dist/commands/build.command.js +139 -0
  7. package/dist/commands/build.command.js.map +1 -0
  8. package/dist/commands/create-app/create-app.command.d.ts +2 -0
  9. package/dist/commands/create-app/create-app.command.js +71 -0
  10. package/dist/commands/create-app/create-app.command.js.map +1 -0
  11. package/dist/commands/create-app/helpers.d.ts +59 -0
  12. package/dist/commands/create-app/helpers.js +219 -0
  13. package/dist/commands/create-app/helpers.js.map +1 -0
  14. package/dist/commands/create-app/setup-questions.d.ts +31 -0
  15. package/dist/commands/create-app/setup-questions.js +70 -0
  16. package/dist/commands/create-app/setup-questions.js.map +1 -0
  17. package/dist/commands/info.command.d.ts +2 -0
  18. package/dist/commands/info.command.js +40 -0
  19. package/dist/commands/info.command.js.map +1 -0
  20. package/dist/commands/local-upgrade.command.d.ts +2 -0
  21. package/dist/commands/local-upgrade.command.js +94 -0
  22. package/dist/commands/local-upgrade.command.js.map +1 -0
  23. package/dist/commands/release.command.d.ts +2 -0
  24. package/dist/commands/release.command.js +181 -0
  25. package/dist/commands/release.command.js.map +1 -0
  26. package/dist/commands/seed.command.d.ts +2 -0
  27. package/dist/commands/seed.command.js +40 -0
  28. package/dist/commands/seed.command.js.map +1 -0
  29. package/dist/commands/test-data.command.d.ts +2 -0
  30. package/dist/commands/test-data.command.js +38 -0
  31. package/dist/commands/test-data.command.js.map +1 -0
  32. package/dist/commands/upgrade.command.d.ts +2 -0
  33. package/dist/commands/upgrade.command.js +48 -0
  34. package/dist/commands/upgrade.command.js.map +1 -0
  35. package/dist/helper.d.ts +1 -0
  36. package/dist/helper.js +19 -0
  37. package/dist/helper.js.map +1 -0
  38. package/dist/main.d.ts +2 -0
  39. package/dist/main.js +34 -0
  40. package/dist/main.js.map +1 -0
  41. package/dist/shims/solid-shim.js +23 -0
  42. package/dist/tsconfig.build.tsbuildinfo +1 -0
  43. package/package.json +99 -0
  44. package/templates/dot-templates/dot.vscode.template/launch.json +35 -0
  45. package/templates/nest-template/README.md +73 -0
  46. package/templates/nest-template/bin/solid +2 -0
  47. package/templates/nest-template/dot-templates/dot.dockerignore.template +1 -0
  48. package/templates/nest-template/dot-templates/dot.eslintrc.template.js +25 -0
  49. package/templates/nest-template/dot-templates/dot.gitignore.template +56 -0
  50. package/templates/nest-template/dot-templates/dot.prettierrc.template +4 -0
  51. package/templates/nest-template/nest-cli.json +8 -0
  52. package/templates/nest-template/nodemon.json +13 -0
  53. package/templates/nest-template/package.json +132 -0
  54. package/templates/nest-template/src/app-default-database.module.ts +75 -0
  55. package/templates/nest-template/src/app.controller.spec.ts +22 -0
  56. package/templates/nest-template/src/app.module.ts +51 -0
  57. package/templates/nest-template/src/app.service.ts +32 -0
  58. package/templates/nest-template/src/database.utils.ts +18 -0
  59. package/templates/nest-template/src/main-cli.ts +81 -0
  60. package/templates/nest-template/src/main.ts +116 -0
  61. package/templates/nest-template/test/app.e2e-spec.ts +24 -0
  62. package/templates/nest-template/test/jest-e2e.json +9 -0
  63. package/templates/nest-template/tsconfig.build.json +4 -0
  64. package/templates/nest-template/tsconfig.json +22 -0
  65. package/templates/next-template/README.md +36 -0
  66. package/templates/next-template/app/GlobalProvider.tsx +23 -0
  67. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/form/[id]/page.tsx +19 -0
  68. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/kanban/page.tsx +18 -0
  69. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/list/page.tsx +18 -0
  70. package/templates/next-template/app/admin/core/[moduleName]/home/page.tsx +15 -0
  71. package/templates/next-template/app/admin/core/[moduleName]/settings/[settings]/page.tsx +11 -0
  72. package/templates/next-template/app/admin/layout.tsx +11 -0
  73. package/templates/next-template/app/admin/loading.tsx +8 -0
  74. package/templates/next-template/app/admin/page.tsx +10 -0
  75. package/templates/next-template/app/api/auth/[...nextauth]/route.ts +6 -0
  76. package/templates/next-template/app/auth/confirm-forgot-password/page.tsx +12 -0
  77. package/templates/next-template/app/auth/forgot-password/page.tsx +11 -0
  78. package/templates/next-template/app/auth/initiate-forgot-password/page.tsx +11 -0
  79. package/templates/next-template/app/auth/initiate-forgot-password-thank-you/page.tsx +11 -0
  80. package/templates/next-template/app/auth/initiate-google-oauth/page.tsx +9 -0
  81. package/templates/next-template/app/auth/initiate-login/page.tsx +13 -0
  82. package/templates/next-template/app/auth/initiate-register/page.tsx +14 -0
  83. package/templates/next-template/app/auth/layout.tsx +10 -0
  84. package/templates/next-template/app/auth/login/page.tsx +12 -0
  85. package/templates/next-template/app/auth/otp-verify/page.tsx +12 -0
  86. package/templates/next-template/app/auth/register/page.tsx +12 -0
  87. package/templates/next-template/app/auth/reset-password/page.tsx +13 -0
  88. package/templates/next-template/app/auth/sso/page.tsx +80 -0
  89. package/templates/next-template/app/layout.tsx +56 -0
  90. package/templates/next-template/app/solid-extensions.ts +8 -0
  91. package/templates/next-template/dot-templates/dot.gitignore.template +44 -0
  92. package/templates/next-template/eslint.config.mjs +16 -0
  93. package/templates/next-template/middleware.ts +23 -0
  94. package/templates/next-template/next-env.d.ts +5 -0
  95. package/templates/next-template/next-solidx-run.js +18 -0
  96. package/templates/next-template/next.config.js +47 -0
  97. package/templates/next-template/package.json +79 -0
  98. package/templates/next-template/public/favicon.ico +0 -0
  99. package/templates/next-template/public/file.svg +1 -0
  100. package/templates/next-template/public/globe.svg +1 -0
  101. package/templates/next-template/public/next.svg +1 -0
  102. package/templates/next-template/public/themes/solid-dark-purple/theme.css +6203 -0
  103. package/templates/next-template/public/themes/solid-light-purple/solid-login-light.png +0 -0
  104. package/templates/next-template/public/themes/solid-light-purple/theme.css +6256 -0
  105. package/templates/next-template/public/vercel.svg +1 -0
  106. package/templates/next-template/public/window.svg +1 -0
  107. package/templates/next-template/redux/store.ts +52 -0
  108. package/templates/next-template/tsconfig.json +33 -0
  109. package/templates/next-template/types/index.d.ts +7 -0
  110. package/templates/next-template/types/layout.d.ts +94 -0
  111. package/templates/next-template/types/next.d.ts +46 -0
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
@@ -0,0 +1,52 @@
1
+ // 'use client';
2
+ // @ts-nocheck
3
+ import { configureStore } from "@reduxjs/toolkit";
4
+ import {
5
+ solidApiSlices,
6
+ solidReducers,
7
+ createSolidEntityApi
8
+ } from "@solidxai/core-ui";
9
+
10
+ export function initializeStore(entities: string[] = []) {
11
+
12
+ const reducers = {
13
+ ...solidReducers,
14
+ ...Object.fromEntries(
15
+ solidApiSlices.map(api => [api.reducerPath, api.reducer])
16
+ ),
17
+ //add anditional custom api slice
18
+ //eg. [customImportTransactionApi.reducerPath]: customImportTransactionApi.reducer,
19
+
20
+ // Add any additional reducers here
21
+ // eg.theme: themeReducer,
22
+ };
23
+
24
+
25
+ const middlewares = [
26
+ ...solidApiSlices.map(api => api.middleware),
27
+ //add any additional custom middlewares here
28
+ //eg. customImportTransactionApi.middleware,
29
+ ];
30
+
31
+
32
+ for (let i = 0; i < entities.length; i++) {
33
+ const entity = entities[i];
34
+
35
+ // Dynamic API slice creation...
36
+ const apiSlice = createSolidEntityApi(entity);
37
+
38
+ // Use the dynamically created slice to register a reducer and middleware.
39
+ //@ts-ignore
40
+ reducers[apiSlice.reducerPath] = apiSlice.reducer;
41
+ middlewares.push(apiSlice.middleware);
42
+ }
43
+
44
+ return configureStore({
45
+ reducer: reducers,
46
+ middleware: (getDefaultMiddleware) =>
47
+ getDefaultMiddleware().concat(middlewares),
48
+ });
49
+ }
50
+
51
+ // export type RootState = ReturnType<ReturnType<typeof initializeStore>['getState']>;
52
+ // export type AppDispatch = ReturnType<typeof initializeStore>['dispatch']
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "esnext",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "jsx": "preserve",
15
+ "incremental": true,
16
+ "plugins": [
17
+ {
18
+ "name": "next"
19
+ }
20
+ ],
21
+ "paths": {
22
+ "@/*": ["./*"]
23
+ },
24
+ },
25
+ "include": [
26
+ "next-env.d.ts",
27
+ "./types/**/*.d.ts",
28
+ "**/*.ts",
29
+ "**/*.tsx",
30
+ ".next/types/**/*.ts"
31
+ ],
32
+ "exclude": ["node_modules"]
33
+ }
@@ -0,0 +1,7 @@
1
+ declare module "react-star-ratings";
2
+ declare module "react-js-pagination";
3
+ declare module "bcryptjs";
4
+ declare module "nodemailer";
5
+ declare module "mapbox-gl/dist/mapbox-gl.js";
6
+ declare module "react-datepicker";
7
+ declare module "moment";
@@ -0,0 +1,94 @@
1
+ import React, { ReactElement, Dispatch, SetStateAction, HTMLAttributeAnchorTarget, ReactNode } from 'react';
2
+ import { NextPage } from 'next';
3
+ import { Demo } from './demo';
4
+ import { Toast } from 'primereact/toast';
5
+
6
+ /* Breadcrumb Types */
7
+ export interface AppBreadcrumbProps {
8
+ className?: string;
9
+ }
10
+
11
+ export interface Breadcrumb {
12
+ labels?: string[];
13
+ to?: string;
14
+ }
15
+
16
+ export interface BreadcrumbItem {
17
+ label: string;
18
+ to?: string;
19
+ items?: BreadcrumbItem[];
20
+ }
21
+
22
+ /* Context Types */
23
+ export type LayoutState = {
24
+ overlayMenuActive: boolean;
25
+ profileSidebarVisible: boolean;
26
+ configSidebarVisible: boolean;
27
+ staticMenuMobileActive: boolean;
28
+ menuHoverActive: boolean;
29
+ };
30
+
31
+ export type LayoutConfig = {
32
+ inputStyle: string;
33
+ colorScheme: string;
34
+ theme: string;
35
+ scale: number;
36
+ authLayout : string
37
+ };
38
+
39
+ export interface LayoutContextProps {
40
+ layoutConfig: LayoutConfig;
41
+ setLayoutConfig: Dispatch<SetStateAction<LayoutConfig>>;
42
+ layoutState: LayoutState;
43
+ setLayoutState: Dispatch<SetStateAction<LayoutState>>;
44
+ onMenuToggle: () => void;
45
+ showProfileSidebar: () => void;
46
+ }
47
+
48
+ export interface MenuContextProps {
49
+ activeMenu: string;
50
+ setActiveMenu: Dispatch<SetStateAction<string>>;
51
+ }
52
+
53
+ /* AppConfig Types */
54
+ export interface AppConfigProps {
55
+ simple?: boolean;
56
+ }
57
+
58
+ /* AppTopbar Types */
59
+ export type NodeRef = MutableRefObject<ReactNode>;
60
+ export interface AppTopbarRef {
61
+ menubutton?: HTMLButtonElement | null;
62
+ topbarmenu?: HTMLDivElement | null;
63
+ topbarmenubutton?: HTMLButtonElement | null;
64
+ }
65
+
66
+ /* AppMenu Types */
67
+ type CommandProps = {
68
+ originalEvent: React.MouseEvent<HTMLAnchorElement, MouseEvent>;
69
+ item: MenuModelItem;
70
+ };
71
+ export interface MenuProps {
72
+ model: MenuModel[];
73
+ }
74
+
75
+
76
+ export interface MenuModel {
77
+ title: string;
78
+ key?: string;
79
+ children?: MenuModel[];
80
+ path?: string;
81
+ }
82
+
83
+ export interface AppMenuItem extends MenuModel {
84
+ children?: AppMenuItem[];
85
+ key?: string
86
+ }
87
+
88
+ export interface AppMenuItemProps {
89
+ item?: AppMenuItem;
90
+ parentKey?: string;
91
+ index?: number;
92
+ root?: boolean;
93
+ className?: string;
94
+ }
@@ -0,0 +1,46 @@
1
+ import { IUser } from "@/backend/models/user";
2
+ import { FetchBaseQueryError } from "@reduxjs/toolkit/query/react";
3
+ import { NextRequest } from "next/server";
4
+ import NextAuth, { DefaultSession, DefaultUser } from 'next-auth';
5
+ import { JWT } from 'next-auth/jwt';
6
+
7
+ declare module "next/server" {
8
+ interface NextRequest {
9
+ user: IUser;
10
+ }
11
+ }
12
+
13
+
14
+ declare module "@reduxjs/toolkit/query/react" {
15
+ interface FetchBaseQueryError {
16
+ data?: any;
17
+ }
18
+ }
19
+
20
+
21
+
22
+ declare module 'next-auth' {
23
+ interface Session {
24
+ error:string | null,
25
+ user: {
26
+ accessToken: string;
27
+ refreshToken: string;
28
+ accessTokenExpires:number;
29
+ } & DefaultSession['user'];
30
+ }
31
+
32
+ interface User {
33
+ accessToken: string;
34
+ refreshToken: string;
35
+ accessTokenExpires:number;
36
+ }
37
+ }
38
+
39
+ declare module 'next-auth/jwt' {
40
+ interface JWT {
41
+ accessToken: string;
42
+ refreshToken: string;
43
+ error:string;
44
+ accessTokenExpires:number;
45
+ }
46
+ }