Skip to content

Commit 3bf97e2

Browse files
committed
chore: wip
1 parent 62d164f commit 3bf97e2

File tree

11 files changed

+112
-198
lines changed

11 files changed

+112
-198
lines changed

config/api.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

config/cloud.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@ export default {
3131
},
3232
},
3333

34+
api: {
35+
prefix: env.API_PREFIX || 'api',
36+
description: 'Stacks API',
37+
memorySize: 512,
38+
prewarm: 10,
39+
timeout: 30,
40+
},
41+
3442
ai: true, // deploys AI endpoints
3543
cli: true, // deploys CLI setup endpoint (./bootstrap)
3644
docs: true, // deploys documentation
37-
api: true, // deploys API
3845
fileSystem: true, // enables file system
3946

4047
// compute: {},

config/docs.ts

Lines changed: 72 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -188,79 +188,83 @@ const sidebar = {
188188
],
189189
},
190190
{ text: 'Model-View-Action', link: '/guide/model-view-action' },
191-
{
192-
text: 'Packages',
193-
collapsible: true,
194-
collapsed: true,
195-
items: [
196-
{ text: 'Actions', link: '/guide/packages/actions' },
197-
{ text: 'AI', link: '/guide/packages/ai' },
198-
{ text: 'Alias', link: '/guide/packages/alias' },
199-
{ text: 'Analytics', link: '/guide/packages/analytics' },
200-
{ text: 'Arrays', link: '/guide/packages/arrays' },
201-
{ text: 'Auth', link: '/guide/packages/auth' },
202-
{ text: 'Buddy', link: '/guide/packages/buddy' },
203-
{ text: 'Build', link: '/guide/packages/build' },
204-
{ text: 'Cache', link: '/guide/packages/cache' },
205-
{ text: 'Chat', link: '/guide/packages/chat' },
206-
{ text: 'CLI', link: '/guide/packages/cli' },
207-
{ text: 'Cloud', link: '/guide/packages/cloud' },
208-
{ text: 'Collections', link: '/guide/packages/collections' },
209-
{ text: 'Config', link: '/guide/packages/config' },
210-
{ text: 'Database', link: '/guide/packages/database' },
211-
{ text: 'Datetime', link: '/guide/packages/datetime' },
212-
{ text: 'Desktop', link: '/guide/packages/desktop' },
213-
{ text: 'Development', link: '/guide/packages/development' },
214-
{ text: 'DNS', link: '/guide/packages/dns' },
215-
{ text: 'Docs', link: '/guide/packages/docs' },
216-
{ text: 'Email', link: '/guide/packages/email' },
217-
{ text: 'Env', link: '/guide/packages/env' },
218-
{ text: 'Error Handling', link: '/guide/packages/error-handling' },
219-
{ text: 'ESlint Config', link: '/guide/packages/error-handling' },
220-
{ text: 'Events', link: '/guide/packages/events' },
221-
{ text: 'Faker', link: '/guide/packages/faker' },
222-
{ text: 'Git', link: '/guide/packages/git' },
223-
{ text: 'Health', link: '/guide/packages/health' },
224-
{ text: 'Http', link: '/guide/packages/http' },
225-
{ text: 'Lint', link: '/guide/packages/lint' },
226-
{ text: 'Logging', link: '/guide/packages/logging' },
227-
{ text: 'Modules', link: '/guide/packages/modules' },
228-
{ text: 'Notifications', link: '/guide/packages/notifications' },
229-
{ text: 'Objects', link: '/guide/packages/objects' },
230-
{ text: 'ORM', link: '/guide/packages/orm' },
231-
{ text: 'Path', link: '/guide/packages/path' },
232-
{ text: 'Payments', link: '/guide/packages/payments' },
233-
{ text: 'Permissions', link: '/guide/packages/permissions' },
234-
{ text: 'Push', link: '/guide/packages/push' },
235-
{ text: 'Query Builder', link: '/guide/packages/query-builder' },
236-
{ text: 'Queue', link: '/guide/packages/queue' },
237-
{ text: 'Realtime', link: '/guide/packages/realtime' },
238-
{ text: 'REPL', link: '/guide/packages/repl' },
239-
{ text: 'Router', link: '/guide/packages/router' },
240-
{ text: 'Scheduler', link: '/guide/packages/scheduler' },
241-
{ text: 'Search Engine', link: '/guide/packages/search-engine' },
242-
{ text: 'Security', link: '/guide/packages/security' },
243-
{ text: 'Server', link: '/guide/packages/server' },
244-
{ text: 'Signals', link: '/guide/packages/signals' },
245-
{ text: 'Slug', link: '/guide/packages/slug' },
246-
{ text: 'SMS', link: '/guide/packages/sms' },
247-
{ text: 'Storage', link: '/guide/packages/storage' },
248-
{ text: 'Strings', link: '/guide/packages/strings' },
249-
{ text: 'Testing', link: '/guide/packages/testing' },
250-
{ text: 'Tinker', link: '/guide/packages/tinker' },
251-
{ text: 'Tunnel', link: '/guide/packages/tunnel' },
252-
{ text: 'Types', link: '/guide/packages/types' },
253-
{ text: 'UI', link: '/guide/packages/ui' },
254-
{ text: 'Utils', link: '/guide/packages/utils' },
255-
{ text: 'Validation', link: '/guide/packages/validation' },
256-
{ text: 'Vite', link: '/guide/packages/vite' },
257-
],
258-
},
259191
{ text: 'Plugins', link: '/guide/plugins' },
260192
{ text: 'Testing', link: '/guide/testing' },
261193
],
262194
},
263195

196+
{
197+
text: 'Features',
198+
collapsible: true,
199+
collapsed: true,
200+
items: [
201+
{ text: '$ Shell', link: '/features/$-shell' },
202+
{ text: 'Actions', link: '/features/actions' },
203+
{ text: 'AI', link: '/features/ai' },
204+
{ text: 'Alias', link: '/features/alias' },
205+
{ text: 'Analytics', link: '/features/analytics' },
206+
{ text: 'Arrays', link: '/features/arrays' },
207+
{ text: 'Auth', link: '/features/auth' },
208+
{ text: 'Buddy', link: '/features/buddy' },
209+
{ text: 'Build', link: '/features/build' },
210+
{ text: 'Cache', link: '/features/cache' },
211+
{ text: 'Chat', link: '/features/chat' },
212+
{ text: 'CLI', link: '/features/cli' },
213+
{ text: 'Cloud', link: '/features/cloud' },
214+
{ text: 'Collections', link: '/features/collections' },
215+
{ text: 'Config', link: '/features/config' },
216+
{ text: 'Database', link: '/features/database' },
217+
{ text: 'Datetime', link: '/features/datetime' },
218+
{ text: 'Desktop', link: '/features/desktop' },
219+
{ text: 'Development', link: '/features/development' },
220+
{ text: 'DNS', link: '/features/dns' },
221+
{ text: 'Docs', link: '/features/docs' },
222+
{ text: 'Email', link: '/features/email' },
223+
{ text: 'Env', link: '/features/env' },
224+
{ text: 'Error Handling', link: '/features/error-handling' },
225+
{ text: 'ESlint Config', link: '/features/error-handling' },
226+
{ text: 'Events', link: '/features/events' },
227+
{ text: 'Faker', link: '/features/faker' },
228+
{ text: 'Git', link: '/features/git' },
229+
{ text: 'Glob', link: '/features/glob' },
230+
{ text: 'Health', link: '/features/health' },
231+
{ text: 'Http', link: '/features/http' },
232+
{ text: 'Lint', link: '/features/lint' },
233+
{ text: 'Logging', link: '/features/logging' },
234+
{ text: 'Modules', link: '/features/modules' },
235+
{ text: 'Notifications', link: '/features/notifications' },
236+
{ text: 'Objects', link: '/features/objects' },
237+
{ text: 'ORM', link: '/features/orm' },
238+
{ text: 'Path', link: '/features/path' },
239+
{ text: 'Payments', link: '/features/payments' },
240+
{ text: 'Permissions', link: '/features/permissions' },
241+
{ text: 'Push', link: '/features/push' },
242+
{ text: 'Query Builder', link: '/features/query-builder' },
243+
{ text: 'Queue', link: '/features/queue' },
244+
{ text: 'Realtime', link: '/features/realtime' },
245+
{ text: 'REPL', link: '/features/repl' },
246+
{ text: 'Router', link: '/features/router' },
247+
{ text: 'Scheduler', link: '/features/scheduler' },
248+
{ text: 'Search Engine', link: '/features/search-engine' },
249+
{ text: 'Security', link: '/features/security' },
250+
{ text: 'Semver', link: '/features/semver' },
251+
{ text: 'Server', link: '/features/server' },
252+
{ text: 'Signals', link: '/features/signals' },
253+
{ text: 'Slug', link: '/features/slug' },
254+
{ text: 'SMS', link: '/features/sms' },
255+
{ text: 'Storage', link: '/features/storage' },
256+
{ text: 'Strings', link: '/features/strings' },
257+
{ text: 'Testing', link: '/features/testing' },
258+
{ text: 'Tinker', link: '/features/tinker' },
259+
{ text: 'Tunnel', link: '/features/tunnel' },
260+
{ text: 'Types', link: '/features/types' },
261+
{ text: 'UI', link: '/features/ui' },
262+
{ text: 'Utils', link: '/features/utils' },
263+
{ text: 'Validation', link: '/features/validation' },
264+
{ text: 'Vite', link: '/features/vite' },
265+
],
266+
},
267+
264268
{
265269
text: 'Terminology',
266270
link: '/terminology',

resources/components/Dashboard/SettingsHeader.stx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
role="list"
77
class="flex min-w-full flex-none gap-x-6 px-4 text-sm font-semibold leading-6 text-gray-600 sm:px-6 lg:px-8"
88
>
9+
<li>
10+
<RouterLink
11+
to="/settings/ai"
12+
>
13+
AI
14+
</RouterLink>
15+
<RouterLink
16+
to="/settings/analytics"
17+
>
18+
Analytics
19+
</RouterLink>
20+
</li>
921
<li>
1022
<RouterLink
1123
to="/settings/cache"

resources/components/Dashboard/Sidebar.stx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
class="sidebar-links"
119119
>
120120
<div class="i-heroicons-cog-6-tooth text-gray-500 w-6 h-6 dark:text-gray-200 group-hover:text-gray-700 transition duration-150 ease-in-out" />
121-
<span class="truncate">Settings</span>
121+
<span class="truncate">Config</span>
122122
</RouterLink>
123123
</li>
124124
</ul>

resources/views/dashboard/index.stx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<dl class="mx-auto grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 lg:px-2 xl:px-0">
77
<div class="flex items-baseline flex-wrap justify-between gap-y-2 gap-x-4 border-t border-gray-900/5 px-4 py-6 sm:px-6 lg:border-t-0 xl:px-8">
88
<dt class="text-sm font-medium leading-6 text-gray-500 dark:text-gray-300">
9-
Users
9+
Total Users
1010
</dt>
1111

1212
<dd class="w-full flex-none text-xl font-medium leading-10 tracking-tight text-gray-900 dark:text-gray-100">
13-
862
13+
1,234
1414
</dd>
1515
</div>
1616

@@ -26,11 +26,11 @@
2626

2727
<div class="flex items-baseline flex-wrap justify-between gap-y-2 gap-x-4 border-t border-gray-900/5 px-4 py-6 sm:px-6 lg:border-t-0 xl:px-8 sm:border-l">
2828
<dt class="text-sm font-medium leading-6 text-gray-500 dark:text-gray-300">
29-
Library
29+
Total Downloads
3030
</dt>
3131

3232
<dd class="w-full flex-none text-xl font-medium leading-10 tracking-tight text-gray-900 dark:text-gray-100">
33-
500 Downloads
33+
12,345
3434
</dd>
3535
</div>
3636

storage/framework/core/tables/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import process from 'node:process'
22
import { defineConfig, loadEnv } from 'vite'
3-
import type { BuildOptions as ViteBuildOptions } from 'vite'
3+
import type { BuildOptions as ViteBuildOptions } from '@stacksjs/vite'
44
import Components from 'unplugin-vue-components/vite'
55
import type { ViteConfig } from '../types/src'
66
import { libraryEntryPath, libsPath, projectPath, storagePath } from '../path/src'

storage/framework/core/types/src/cloud.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { ApiOptions } from './api'
12
import type { FirewallConfig } from './security'
23

34
export type CountryCode =
@@ -73,10 +74,11 @@ export interface CloudOptions {
7374
}
7475
}
7576

77+
api: Partial<ApiOptions>
78+
7679
ai: boolean
7780
cli: boolean
7881
docs: boolean
79-
api: boolean
8082
fileSystem: boolean
8183
}
8284

storage/framework/core/vite/src/dashboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { server } from '@stacksjs/server'
66
import { alias } from '@stacksjs/alias'
77
import VueMacros from 'unplugin-vue-macros/vite'
88
import { config } from '@stacksjs/config'
9-
import { autoImports, components, cssEngine, devtools, i18n, layouts, router } from './plugins'
9+
import { autoImports, components, cssEngine, i18n, layouts, router } from './plugins'
1010

1111
// import { autoImports, components, cssEngine, devtools, i18n, layouts, markdown, pwa, router } from './stacks'
1212

Lines changed: 2 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,3 @@
1-
import { path as p } from '@stacksjs/path'
2-
import { defineConfig } from 'vite'
3-
import Vue from '@vitejs/plugin-vue'
4-
import generateSitemap from 'vite-ssg-sitemap'
5-
import { server } from '@stacksjs/server'
6-
import { alias } from '@stacksjs/alias'
7-
import VueMacros from 'unplugin-vue-macros/vite'
8-
import { autoImports } from './plugin/auto-imports'
9-
import { components } from './plugin/components'
10-
import { cssEngine } from './plugin/css-engine'
11-
import { devtools } from './plugin/devtools'
12-
import { i18n } from './plugin/i18n'
13-
import { layouts } from './plugin/layouts'
14-
import { markdown } from './plugin/markdown'
15-
import { pwa } from './plugin/pwa'
16-
import { router } from './plugin/router'
1+
import desktopConfig from './views'
172

18-
// import { fonts } from './plugin/fonts'
19-
20-
// const isMaintenanceMode = config.app.maintenanceMode
21-
// const maintenancePath = isMaintenanceMode ? '' : './maintenance'
22-
23-
export default defineConfig({
24-
build: {
25-
rollupOptions: {
26-
external: ['path', 'fs', 'net', 'tls', 'stream', 'node:process', 'constants', 'node:dns/promises', 'node:util'],
27-
},
28-
},
29-
30-
root: p.frameworkPath('views/web'),
31-
publicDir: p.publicPath(),
32-
envDir: p.projectPath(),
33-
envPrefix: 'FRONTEND_',
34-
35-
assetsInclude: [
36-
p.resourcesPath('assets/*'),
37-
p.resourcesPath('assets/**/*'),
38-
],
39-
40-
optimizeDeps: {
41-
exclude: ['bun:test', 'webpack', 'chokidar', 'fsevents', '@intlify/unplugin-vue-i18n', '@stacksjs/ui'],
42-
},
43-
44-
server: server({
45-
type: 'frontend',
46-
}),
47-
48-
resolve: {
49-
alias,
50-
},
51-
52-
plugins: [
53-
VueMacros({
54-
plugins: {
55-
vue: Vue({
56-
include: /\.(stx|vue|md)($|\?)/,
57-
}),
58-
},
59-
}),
60-
61-
router(),
62-
layouts({
63-
extensions: ['stx', 'vue'],
64-
layoutsDirs: p.layoutsPath('', { relative: true }),
65-
}),
66-
autoImports(),
67-
components(),
68-
cssEngine(),
69-
markdown(),
70-
pwa(),
71-
devtools(),
72-
i18n(),
73-
74-
// https://github.com/feat-agency/vite-plugin-webfont-dl
75-
// fonts(),
76-
// webfontDownload(),
77-
],
78-
79-
// https://github.com/antfu/vite-ssg
80-
ssgOptions: {
81-
script: 'async',
82-
formatting: 'minify',
83-
84-
crittersOptions: {
85-
reduceInlineStyles: false,
86-
},
87-
88-
onFinished() {
89-
generateSitemap()
90-
},
91-
},
92-
93-
ssr: {
94-
// TODO: workaround until they support native ESM
95-
noExternal: ['workbox-window', /vue-i18n/],
96-
},
97-
})
3+
export default desktopConfig

0 commit comments

Comments
 (0)