Skip to content

Commit 9c82083

Browse files
committed
chore: wip
1 parent 631bc4c commit 9c82083

File tree

8 files changed

+153
-12
lines changed

8 files changed

+153
-12
lines changed

.stacks/core/alias/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export const alias: Record<string, string> = {
1111
'@stacksjs/actions': p.actionsPath('src/index.ts'),
1212
'@stacksjs/actions/*': p.actionsPath('src/*'),
1313
'@stacksjs/alias': p.aliasPath(),
14+
'@stacksjs/analytics': p.analyticsPath('src/index.ts'),
15+
'@stacksjs/analytics/*': p.analyticsPath('src/*'),
1416
'@stacksjs/arrays': p.arraysPath('src/index.ts'),
1517
'@stacksjs/arrays/*': p.arraysPath('src/*'),
1618
'@stacksjs/auth': p.authPath('src/index.ts'),
@@ -33,6 +35,8 @@ export const alias: Record<string, string> = {
3335
'@stacksjs/dashboard/*': p.dashboardPath('src/*'),
3436
'@stacksjs/database': p.databasePath('src/index.ts'),
3537
'@stacksjs/database/*': p.databasePath('src/*'),
38+
'@stacksjs/datetime': p.datetimePath('src/index.ts'),
39+
'@stacksjs/datetime/*': p.datetimePath('src/*'),
3640
'@stacksjs/development': p.developmentPath('src/index.ts'),
3741
'@stacksjs/development/*': p.developmentPath('src/*'),
3842
// '@stacksjs/desktop': p.desktopPath('src/index.ts'),
@@ -66,6 +70,8 @@ export const alias: Record<string, string> = {
6670
'@stacksjs/path/*': p.pathPath('src/*'),
6771
'@stacksjs/push': p.pushPath('src/index.ts'),
6872
'@stacksjs/push/*': p.pushPath('src/*'),
73+
'@stacksjs/queue': p.queuePath('src/index.ts'),
74+
'@stacksjs/queue/*': p.queuePath('src/*'),
6975
'@stacksjs/query-builder': p.queryBuilderPath('src/index.ts'),
7076
'@stacksjs/query-builder/*': p.queryBuilderPath('src/*'),
7177
'@stacksjs/repl': p.replPath('src/index.ts'),

.stacks/core/orm/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@
3939
// else
4040
// return null
4141
// }
42+
43+
export {}

.stacks/core/path/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export function runtimePath(path?: string) {
4646
return frameworkPath(`buddy/${path || ''}`)
4747
}
4848

49+
export function analyticsPath(path?: string) {
50+
return corePath(`analytics/${path || ''}`)
51+
}
52+
4953
export function arraysPath(path?: string) {
5054
return corePath(`arrays/${path || ''}`)
5155
}
@@ -398,6 +402,7 @@ export const path = {
398402
aiPath,
399403
actionsPath,
400404
aliasPath,
405+
analyticsPath,
401406
arraysPath,
402407
appPath,
403408
authPath,

.stacks/core/validation/src/types/env.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import process from 'node:process'
22
import type { VineObject } from '@vinejs/vine'
33
import validator from '@vinejs/vine'
4-
import type { Infer } from '@vinejs/vine/build/src/types'
54
import { loadEnv } from 'vite'
65
import { projectPath } from '@stacksjs/path'
76

7+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
8+
// @ts-expect-error
9+
import type { Infer } from '@vinejs/vine/build/src/types'
10+
811
// TODO: envSchema needs to be auto generated from the .env file
912
// envSchema could also be named "backendEnvSchema"
1013
const envSchema = validator.object({

.stacks/core/validation/src/types/money.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import type { FieldOptions, Validation } from '@vinejs/vine/build/src/types'
21
import type { Money } from '@stacksjs/types'
32
import { BaseLiteralType } from '@vinejs/vine'
3+
4+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
5+
// @ts-expect-error
6+
import type { FieldOptions, Validation } from '@vinejs/vine/build/src/types'
47
import { isMoney } from '../rules'
58

69
export class MoneyValidator extends BaseLiteralType<Money, Money> {

.stacks/core/validation/src/validate.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Validator.macro('money', () => {
77
})
88

99
const validate: Validator = validator
10-
const string: ValidationString = validator.string()
11-
const number: Validator['number'] = validator.number
12-
const boolean: Validator['boolean'] = validator.boolean
13-
const array: Validator['array'] = validator.array
14-
const object: Validator['object'] = validator.object
15-
const any: Validator['any'] = validator.any
10+
const RuleString: ValidationString = validator.string()
11+
const RuleNumber: Validator['number'] = validator.number
12+
const RuleBoolean: Validator['boolean'] = validator.boolean
13+
const RuleArray: Validator['array'] = validator.array
14+
const RuleObject: Validator['object'] = validator.object
15+
const RuleAny: Validator['any'] = validator.any
1616
// const email = () => validator.string().email()
1717

18-
export { validate, validator, Validator, string, number, boolean, array, object, any }
18+
export { validate, validator, Validator, RuleString, RuleNumber, RuleBoolean, RuleArray, RuleObject, RuleAny }

.stacks/src/index.ts

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
// finish this and then ensure it is used to simplify the auto-imports
2+
3+
export * from '@stacksjs/actions'
4+
export * as actions from '@stacksjs/actions'
5+
export * from '@stacksjs/ai'
6+
export * as ai from '@stacksjs/ai'
7+
export * from '@stacksjs/alias'
8+
export * from '@stacksjs/analytics'
9+
export * as analytics from '@stacksjs/analytics'
10+
export * from '@stacksjs/arrays'
11+
export * as arrays from '@stacksjs/arrays'
12+
export * from '@stacksjs/auth'
13+
export * as auth from '@stacksjs/auth'
14+
// export * from '@stacksjs/buddy'
15+
export * as buddy from '@stacksjs/buddy'
16+
export * from '@stacksjs/build'
17+
export * as build from '@stacksjs/build'
18+
export * from '@stacksjs/cache'
19+
export * as cache from '@stacksjs/cache'
20+
export * from '@stacksjs/chat'
21+
export * as chat from '@stacksjs/chat'
22+
export * from '@stacksjs/cli'
23+
export * as cli from '@stacksjs/cli'
24+
export * from '@stacksjs/cloud'
25+
export * as cloud from '@stacksjs/cloud'
26+
export * from '@stacksjs/collections'
27+
export * as collections from '@stacksjs/collections'
28+
export * from '@stacksjs/config'
29+
export * as config from '@stacksjs/config'
30+
export * from '@stacksjs/database'
31+
export * as database from '@stacksjs/database'
32+
export * from '@stacksjs/datetime'
33+
export * as datetime from '@stacksjs/datetime'
34+
export * from '@stacksjs/desktop'
35+
export * as desktop from '@stacksjs/desktop'
36+
export * from '@stacksjs/development'
37+
export * as development from '@stacksjs/development'
38+
export * from '@stacksjs/dns'
39+
export * as dns from '@stacksjs/dns'
40+
export * from '@stacksjs/docs'
41+
export * as docs from '@stacksjs/docs'
42+
export * from '@stacksjs/email'
43+
export * as email from '@stacksjs/email'
44+
export * from '@stacksjs/error-handling'
45+
export * as errorHandling from '@stacksjs/error-handling'
46+
export * from '@stacksjs/events'
47+
export * as events from '@stacksjs/events'
48+
export * from '@stacksjs/faker'
49+
export * as faker from '@stacksjs/faker'
50+
export * from '@stacksjs/git'
51+
export * as git from '@stacksjs/git'
52+
export * from '@stacksjs/health'
53+
export * as health from '@stacksjs/health'
54+
export * from '@stacksjs/lint'
55+
export * as lint from '@stacksjs/lint'
56+
export * from '@stacksjs/logging'
57+
export * as logging from '@stacksjs/logging'
58+
// export * from '@stacksjs/modules'
59+
// export * as modules from '@stacksjs/modules'
60+
export * from '@stacksjs/notifications'
61+
export * as notifications from '@stacksjs/notifications'
62+
export * from '@stacksjs/objects'
63+
export * as objects from '@stacksjs/objects'
64+
export * from '@stacksjs/orm'
65+
export * as orm from '@stacksjs/orm'
66+
// export * from '@stacksjs/permissions'
67+
// export * as permissions from '@stacksjs/permissions'
68+
export * from '@stacksjs/path'
69+
export * as path from '@stacksjs/path'
70+
export * from '@stacksjs/payments'
71+
export * as payments from '@stacksjs/payments'
72+
export * from '@stacksjs/push'
73+
export * as push from '@stacksjs/push'
74+
export * from '@stacksjs/query-builder'
75+
export * as queryBuilder from '@stacksjs/query-builder'
76+
export * from '@stacksjs/queue'
77+
export * as queue from '@stacksjs/queue'
78+
export * from '@stacksjs/realtime'
79+
export * as realtime from '@stacksjs/realtime'
80+
export * from '@stacksjs/repl'
81+
export * as repl from '@stacksjs/repl'
82+
export * from '@stacksjs/router'
83+
export * as router from '@stacksjs/router'
84+
export * from '@stacksjs/scheduler'
85+
export * as scheduler from '@stacksjs/scheduler'
86+
export * from '@stacksjs/search-engine'
87+
export * as searchEngine from '@stacksjs/search-engine'
88+
export * from '@stacksjs/security'
89+
export * as security from '@stacksjs/security'
90+
export * from '@stacksjs/server'
91+
export * as server from '@stacksjs/server'
92+
export * from '@stacksjs/signals'
93+
export * as signals from '@stacksjs/signals'
94+
export * from '@stacksjs/slug'
95+
export * as slug from '@stacksjs/slug'
96+
export * from '@stacksjs/sms'
97+
export * as sms from '@stacksjs/sms'
98+
export * from '@stacksjs/storage'
99+
export * as storage from '@stacksjs/storage'
100+
export * from '@stacksjs/strings'
101+
export * as strings from '@stacksjs/strings'
102+
export * from '@stacksjs/testing'
103+
export * as testing from '@stacksjs/testing'
104+
export * from '@stacksjs/types'
105+
export * as types from '@stacksjs/types'
106+
export * from '@stacksjs/ui'
107+
export * as ui from '@stacksjs/ui'
108+
export * from '@stacksjs/utils'
109+
export * as utils from '@stacksjs/utils'
110+
// export * from '@stacksjs/validation'
111+
export * as validation from '@stacksjs/validation'
112+
// export * from '@stacksjs/vite-plugin'

.stacks/tsconfig.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"@stacksjs/actions": ["./core/actions/src/index.ts"],
3636
"@stacksjs/actions/*": ["./core/actions/src/*"],
3737
"@stacksjs/alias": ["./core/alias/src/index.ts"],
38+
"@stacksjs/analytics/*": ["./core/analytics/src/*"],
39+
"@stacksjs/analytics": ["./core/analytics/src/index.ts"],
3840
"@stacksjs/arrays/*": ["./core/arrays/src/*"],
3941
"@stacksjs/arrays": ["./core/arrays/src/index.ts"],
4042
"@stacksjs/buddy": ["./core/buddy/src/index.ts"],
@@ -57,6 +59,8 @@
5759
"@stacksjs/dashboard/*": ["./stacks/dashboard/src/*"],
5860
"@stacksjs/database": ["./core/database/src/index.ts"],
5961
"@stacksjs/database/*": ["./core/database/src/*"],
62+
"@stacksjs/datetime": ["./core/datetime/src/index.ts"],
63+
"@stacksjs/datetime/*": ["./core/datetime/src/*"],
6064
"@stacksjs/development": ["./core/development/src/index.ts"],
6165
"@stacksjs/development/*": ["./core/development/src/*"],
6266
// "@stacksjs/desktop": ["./core/desktop/src/index.ts"],
@@ -84,6 +88,8 @@
8488
"@stacksjs/path/*": ["./core/path/src/*"],
8589
"@stacksjs/push": ["./core/push/src/index.ts"],
8690
"@stacksjs/push/*": ["./core/push/src/*"],
91+
"@stacksjs/queue": ["./core/queue/src/index.ts"],
92+
"@stacksjs/queue/*": ["./core/queue/src/*"],
8793
"@stacksjs/query-builder": ["./core/query-builder/src/index.ts"],
8894
"@stacksjs/query-builder/*": ["./core/query-builder/src/*"],
8995
"@stacksjs/repl": ["./core/repl/src/index.ts"],
@@ -216,20 +222,24 @@
216222
"buddy": ["./core/buddy/src/index.ts"],
217223
"buddy/*": ["./core/buddy/src/*"],
218224
"framework/*": ["./*"],
225+
"models/*": ["../app/models/*"],
219226
"app/*": ["../app/*"],
220227
"config/*": ["../config/*"],
221-
"resources/*": ["../resources/*"],
222228
"functions/*": ["../resources/functions/*"],
223229
"components/*": ["../resources/components/*"],
224230
"views/*": ["../resources/views/*"],
225-
"models/*": ["../app/models/*"]
231+
"resources/*": ["../resources/*"]
226232
}
227233
},
228234
"include": [
229235
"./**.d.ts",
230236
"./**/*",
231237
"../app/*",
232238
"../app/**/*",
239+
"../docs/*",
240+
"../docs/**/*",
241+
"../lang/*",
242+
"../lang/**/*",
233243
"../resources/*",
234244
"../resources/**/*",
235245
"../router/*",
@@ -241,7 +251,7 @@
241251
],
242252
"exclude": [
243253
"./vitest.config.ts",
244-
"./examples/**",
254+
"./libs/examples/**",
245255
"../commitlint.config.cjs",
246256
"../**/README.md",
247257
"../**/dist",

0 commit comments

Comments
 (0)