@lukoweb/apitogo 0.1.45 → 0.1.47

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/cli/cli.js CHANGED
@@ -4133,7 +4133,7 @@ import {
4133
4133
  // package.json
4134
4134
  var package_default = {
4135
4135
  name: "@lukoweb/apitogo",
4136
- version: "0.1.45",
4136
+ version: "0.1.47",
4137
4137
  type: "module",
4138
4138
  sideEffects: [
4139
4139
  "**/*.css",
@@ -7760,32 +7760,40 @@ var viteModulesPlugin = () => {
7760
7760
  `import UserPanelPlansPage from "${resolveProjectPageImport(config2.__meta.rootDir, plansPagePath)}";`
7761
7761
  );
7762
7762
  }
7763
+ const configuredPlugins = [];
7764
+ if (landing.enabled) {
7765
+ code.push(`import { landingModule } from "${landingImport}";`);
7766
+ code.push(
7767
+ `const landing = landingModule({`,
7768
+ ` ...${JSON.stringify(landingConfig)},`,
7769
+ ` component: config.modules?.landing?.component${landingPagePath ? " ?? LandingPage" : ""},`,
7770
+ `});`
7771
+ );
7772
+ configuredPlugins.push("...(landing ? [landing] : [])");
7773
+ }
7774
+ if (userPanel.enabled) {
7775
+ code.push(`import { userPanelModule } from "${userPanelImport}";`);
7776
+ code.push(
7777
+ `const userPanel = userPanelModule({`,
7778
+ ` ...${JSON.stringify(userPanelConfig)},`,
7779
+ ` dashboard: {`,
7780
+ ` ...${JSON.stringify(userPanelConfig.dashboard)},`,
7781
+ ` component: config.modules?.userPanel?.dashboard?.component${dashboardPagePath ? " ?? UserPanelDashboardPage" : ""},`,
7782
+ ` },`,
7783
+ ` userManagement: {`,
7784
+ ` ...${JSON.stringify(userPanelConfig.userManagement)},`,
7785
+ ` component: config.modules?.userPanel?.userManagement?.component${profilePagePath ? " ?? UserPanelProfilePage" : ""},`,
7786
+ ` },`,
7787
+ ` plans: {`,
7788
+ ` ...${JSON.stringify(userPanelConfig.plans)},`,
7789
+ ` component: config.modules?.userPanel?.plans?.component${plansPagePath ? " ?? UserPanelPlansPage" : ""},`,
7790
+ ` },`,
7791
+ `});`
7792
+ );
7793
+ configuredPlugins.push("...(userPanel ? [userPanel] : [])");
7794
+ }
7763
7795
  code.push(
7764
- `import { landingModule } from "${landingImport}";`,
7765
- `import { userPanelModule } from "${userPanelImport}";`,
7766
- `const landing = landingModule({`,
7767
- ` ...${JSON.stringify(landingConfig)},`,
7768
- ` component: config.modules?.landing?.component${landingPagePath ? " ?? LandingPage" : ""},`,
7769
- `});`,
7770
- `const userPanel = userPanelModule({`,
7771
- ` ...${JSON.stringify(userPanelConfig)},`,
7772
- ` dashboard: {`,
7773
- ` ...${JSON.stringify(userPanelConfig.dashboard)},`,
7774
- ` component: config.modules?.userPanel?.dashboard?.component${dashboardPagePath ? " ?? UserPanelDashboardPage" : ""},`,
7775
- ` },`,
7776
- ` userManagement: {`,
7777
- ` ...${JSON.stringify(userPanelConfig.userManagement)},`,
7778
- ` component: config.modules?.userPanel?.userManagement?.component${profilePagePath ? " ?? UserPanelProfilePage" : ""},`,
7779
- ` },`,
7780
- ` plans: {`,
7781
- ` ...${JSON.stringify(userPanelConfig.plans)},`,
7782
- ` component: config.modules?.userPanel?.plans?.component${plansPagePath ? " ?? UserPanelPlansPage" : ""},`,
7783
- ` },`,
7784
- `});`,
7785
- `export const configuredModulesPlugins = [`,
7786
- ` ...(landing ? [landing] : []),`,
7787
- ` ...(userPanel ? [userPanel] : []),`,
7788
- `];`
7796
+ `export const configuredModulesPlugins = [${configuredPlugins.join(", ")}];`
7789
7797
  );
7790
7798
  await writePluginDebugCode(config2.__meta.rootDir, "modules-plugin", code);
7791
7799
  return code.join("\n");
@@ -8237,7 +8245,10 @@ async function getViteConfig(dir, configEnv) {
8237
8245
  target: "es2022"
8238
8246
  },
8239
8247
  entries: [path22.posix.join(getZudokuRootDir(), "src/{app,lib}/**")],
8240
- exclude: ["@lukoweb/apitogo"],
8248
+ exclude: [
8249
+ "@lukoweb/apitogo",
8250
+ "@lukoweb/apitogo-plugin-dev-portal-billing"
8251
+ ],
8241
8252
  include: [
8242
8253
  "react-dom/client",
8243
8254
  "@lukoweb/apitogo/icons",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukoweb/apitogo",
3
- "version": "0.1.45",
3
+ "version": "0.1.47",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -194,7 +194,10 @@ export async function getViteConfig(
194
194
  target: "es2022",
195
195
  },
196
196
  entries: [path.posix.join(getZudokuRootDir(), "src/{app,lib}/**")],
197
- exclude: ["@lukoweb/apitogo"],
197
+ exclude: [
198
+ "@lukoweb/apitogo",
199
+ "@lukoweb/apitogo-plugin-dev-portal-billing",
200
+ ],
198
201
  include: [
199
202
  "react-dom/client",
200
203
  "@lukoweb/apitogo/icons",
@@ -106,32 +106,43 @@ const viteModulesPlugin = (): Plugin => {
106
106
  );
107
107
  }
108
108
 
109
+ const configuredPlugins: string[] = [];
110
+
111
+ if (landing.enabled) {
112
+ code.push(`import { landingModule } from "${landingImport}";`);
113
+ code.push(
114
+ `const landing = landingModule({`,
115
+ ` ...${JSON.stringify(landingConfig)},`,
116
+ ` component: config.modules?.landing?.component${landingPagePath ? " ?? LandingPage" : ""},`,
117
+ `});`,
118
+ );
119
+ configuredPlugins.push("...(landing ? [landing] : [])");
120
+ }
121
+
122
+ if (userPanel.enabled) {
123
+ code.push(`import { userPanelModule } from "${userPanelImport}";`);
124
+ code.push(
125
+ `const userPanel = userPanelModule({`,
126
+ ` ...${JSON.stringify(userPanelConfig)},`,
127
+ ` dashboard: {`,
128
+ ` ...${JSON.stringify(userPanelConfig.dashboard)},`,
129
+ ` component: config.modules?.userPanel?.dashboard?.component${dashboardPagePath ? " ?? UserPanelDashboardPage" : ""},`,
130
+ ` },`,
131
+ ` userManagement: {`,
132
+ ` ...${JSON.stringify(userPanelConfig.userManagement)},`,
133
+ ` component: config.modules?.userPanel?.userManagement?.component${profilePagePath ? " ?? UserPanelProfilePage" : ""},`,
134
+ ` },`,
135
+ ` plans: {`,
136
+ ` ...${JSON.stringify(userPanelConfig.plans)},`,
137
+ ` component: config.modules?.userPanel?.plans?.component${plansPagePath ? " ?? UserPanelPlansPage" : ""},`,
138
+ ` },`,
139
+ `});`,
140
+ );
141
+ configuredPlugins.push("...(userPanel ? [userPanel] : [])");
142
+ }
143
+
109
144
  code.push(
110
- `import { landingModule } from "${landingImport}";`,
111
- `import { userPanelModule } from "${userPanelImport}";`,
112
- `const landing = landingModule({`,
113
- ` ...${JSON.stringify(landingConfig)},`,
114
- ` component: config.modules?.landing?.component${landingPagePath ? " ?? LandingPage" : ""},`,
115
- `});`,
116
- `const userPanel = userPanelModule({`,
117
- ` ...${JSON.stringify(userPanelConfig)},`,
118
- ` dashboard: {`,
119
- ` ...${JSON.stringify(userPanelConfig.dashboard)},`,
120
- ` component: config.modules?.userPanel?.dashboard?.component${dashboardPagePath ? " ?? UserPanelDashboardPage" : ""},`,
121
- ` },`,
122
- ` userManagement: {`,
123
- ` ...${JSON.stringify(userPanelConfig.userManagement)},`,
124
- ` component: config.modules?.userPanel?.userManagement?.component${profilePagePath ? " ?? UserPanelProfilePage" : ""},`,
125
- ` },`,
126
- ` plans: {`,
127
- ` ...${JSON.stringify(userPanelConfig.plans)},`,
128
- ` component: config.modules?.userPanel?.plans?.component${plansPagePath ? " ?? UserPanelPlansPage" : ""},`,
129
- ` },`,
130
- `});`,
131
- `export const configuredModulesPlugins = [`,
132
- ` ...(landing ? [landing] : []),`,
133
- ` ...(userPanel ? [userPanel] : []),`,
134
- `];`,
145
+ `export const configuredModulesPlugins = [${configuredPlugins.join(", ")}];`,
135
146
  );
136
147
 
137
148
  await writePluginDebugCode(config.__meta.rootDir, "modules-plugin", code);