Skip to content

Commit 89f43d3

Browse files
committed
chore: wip
1 parent f9c506c commit 89f43d3

File tree

17 files changed

+113
-189
lines changed

17 files changed

+113
-189
lines changed

.stacks/core/config/build.config.ts

Lines changed: 32 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -1,170 +1,48 @@
11
import { alias } from '@stacksjs/alias'
22
import { defineBuildConfig, withCjsEntries as entries } from '@stacksjs/development'
33

4+
// this is just the config to build the stacks/config
5+
// so users could do
6+
// import { app } from '@stacksjs/config'
7+
8+
// app.url === 'https://stacks.test' or whatever set in env
9+
// let me show you now the auto-imports stuff
10+
411
export default defineBuildConfig({
512
alias,
613
entries,
714

815
externals: [
9-
'@types/pluralize',
10-
'rimraf',
11-
'@dinero.js/currencies',
12-
'dinero.js',
13-
'export-size',
14-
'detect-indent',
15-
'title-case',
16-
'redis',
17-
'perfect-debounce',
18-
'vue-component-meta',
19-
'detect-newline',
20-
'@maverick-js/signals',
21-
'nitropack',
22-
'kolorist',
23-
'mysql2',
24-
'@playwright/test',
25-
'macroable',
26-
'consola',
27-
'pinia',
28-
'constructs',
29-
'@unocss/transformer-compile-class',
30-
'@julr/unocss-preset-forms',
31-
'pathe',
32-
'vitest',
33-
'node-ray',
34-
'eslint',
35-
'collect.js',
36-
'unbuild',
37-
'changelogen',
38-
'@faker-js/faker',
39-
'unocss',
40-
'@novu/stateless',
41-
'meilisearch',
42-
'vue',
43-
'@vinejs/vine',
44-
'vite-plugin-pwa',
45-
'vite-plugin-inspect',
46-
'neverthrow',
47-
'cac',
48-
'execa',
49-
'unplugin-vue-components',
16+
'stacks',
5017
'vite-ssg',
51-
'vite',
52-
'vitepress',
18+
'unplugin-vue-components',
19+
'execa',
5320
'unplugin-auto-import',
5421
'ora',
55-
'stacks',
56-
'stacks/actions',
57-
'stacks/ai',
58-
'stacks/alias',
59-
'stacks/analytics',
60-
'stacks/arrays',
61-
'stacks/auth',
62-
'stacks/buddy',
63-
'stacks/build',
64-
'stacks/cache',
65-
'stacks/chat',
66-
'stacks/cli',
67-
'stacks/cloud',
68-
'stacks/collections',
69-
'stacks/config',
70-
'stacks/database',
71-
'stacks/datetime',
72-
'stacks/desktop',
73-
'stacks/development',
74-
'stacks/dns',
75-
'stacks/docs',
76-
'stacks/email',
77-
'stacks/error-handling',
78-
'stacks/events',
79-
'stacks/faker',
80-
'stacks/git',
81-
'stacks/health',
82-
'stacks/lint',
83-
'stacks/logging',
84-
'stacks/notifications',
85-
'stacks/objects',
86-
'stacks/orm',
87-
'stacks/path',
88-
'stacks/payments',
89-
'stacks/push',
90-
'stacks/query-builder',
91-
'stacks/queue',
92-
'stacks/realtime',
93-
'stacks/repl',
94-
'stacks/router',
95-
'stacks/scheduler',
96-
'stacks/search-engine',
97-
'stacks/security',
98-
'stacks/server',
99-
'stacks/signals',
100-
'stacks/slug',
101-
'stacks/sms',
102-
'stacks/storage',
103-
'stacks/strings',
104-
'stacks/tinker',
105-
'stacks/testing',
106-
'stacks/types',
107-
'stacks/ui',
108-
'stacks/utils',
109-
'stacks/validation',
22+
'cac',
23+
'vite-plugin-inspect',
24+
'vite-plugin-pwa',
25+
'vite',
26+
'vue',
27+
'@vinejs/vine',
28+
'meilisearch',
29+
'vitepress',
30+
'neverthrow',
31+
'@novu/stateless',
32+
'collect.js',
33+
'@faker-js/faker',
11034
'stacks/vite',
111-
'stacks/vite-plugin',
112-
'@stacksjs/actions',
113-
'@stacksjs/ai',
114-
'@stacksjs/alias',
115-
'@stacksjs/analytics',
116-
'@stacksjs/arrays',
117-
'@stacksjs/auth',
118-
'@stacksjs/buddy',
119-
'@stacksjs/build',
120-
'@stacksjs/cache',
121-
'@stacksjs/chat',
122-
'@stacksjs/cli',
123-
'@stacksjs/cloud',
124-
'@stacksjs/collections',
125-
'@stacksjs/config',
126-
'@stacksjs/database',
127-
'@stacksjs/datetime',
128-
'@stacksjs/desktop',
129-
'@stacksjs/development',
130-
'@stacksjs/dns',
131-
'@stacksjs/docs',
132-
'@stacksjs/email',
133-
'@stacksjs/error-handling',
134-
'@stacksjs/events',
135-
'@stacksjs/faker',
136-
'@stacksjs/git',
137-
'@stacksjs/health',
35+
'stacks/utils',
36+
'stacks/ui',
37+
'unbuild',
38+
'changelogen',
39+
'node-ray',
40+
'stacks/lint',
41+
'@types/eslint',
42+
'unocss',
43+
'@vueuse/math',
44+
'@vueuse/core',
13845
'@stacksjs/lint',
139-
'@stacksjs/logging',
140-
'@stacksjs/notifications',
141-
'@stacksjs/objects',
142-
'@stacksjs/orm',
143-
'@stacksjs/path',
144-
'@stacksjs/payments',
145-
'@stacksjs/push',
146-
'@stacksjs/query-builder',
147-
'@stacksjs/queue',
148-
'@stacksjs/realtime',
149-
'@stacksjs/repl',
150-
'@stacksjs/router',
151-
'@stacksjs/scheduler',
152-
'@stacksjs/search-engine',
153-
'@stacksjs/security',
154-
'@stacksjs/server',
155-
'@stacksjs/signals',
156-
'@stacksjs/slug',
157-
'@stacksjs/sms',
158-
'@stacksjs/storage',
159-
'@stacksjs/strings',
160-
'@stacksjs/tinker',
161-
'@stacksjs/testing',
162-
'@stacksjs/types',
163-
'@stacksjs/ui',
164-
'@stacksjs/utils',
165-
'@stacksjs/validation',
166-
'@stacksjs/vite',
167-
'@stacksjs/vite-plugin',
16846
],
16947

17048
rollup: {

.stacks/core/config/src/defaults.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { ResolvedStacksOptions } from 'stacks/types'
22
import app from '../../../../config/app'
3+
import binary from '../../../../config/binary'
34
import cache from '../../../../config/cache'
45
import cdn from '../../../../config/cdn'
5-
import cli from '../../../../config/cli'
66
import database from '../../../../config/database'
77
import dependencies from '../../../../config/deps'
88
import dns from '../../../../config/dns'
@@ -19,11 +19,11 @@ import searchEngine from '../../../../config/search-engine'
1919
import services from '../../../../config/services'
2020
import ui from '../../../../config/ui'
2121

22-
export const defaults: ResolvedStacksOptions = {
22+
const defaults: ResolvedStacksOptions = {
2323
app,
24+
binary,
2425
cache,
2526
cdn,
26-
cli,
2727
database,
2828
dependencies,
2929
dns,
@@ -42,10 +42,11 @@ export const defaults: ResolvedStacksOptions = {
4242
}
4343

4444
export {
45+
defaults,
4546
app,
47+
binary,
4648
cache,
4749
cdn,
48-
cli,
4950
database,
5051
dependencies,
5152
dns,

.stacks/core/strings/src/pluralize.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
1-
export { plural, singular, isPlural, isSingular, addPluralRule, addSingularRule, addIrregularRule, addUncountableRule } from 'pluralize'
1+
import * as pluralize from 'pluralize'
2+
3+
type Rule = string | RegExp
4+
type Replacement = string
5+
type Word = string
6+
export type PluralizeTest = (word: Word) => boolean
7+
8+
export interface Pluralize {
9+
plural: (word: Word, count?: number, inclusive?: boolean) => Word
10+
singular: (word: Word) => Word
11+
isPlural: (word: Word) => boolean
12+
isSingular: (word: Word) => boolean
13+
addPluralRule: (rule: Rule, replacement: Replacement) => void
14+
addSingularRule: (rule: Rule, replacement: Replacement) => void
15+
addIrregularRule: (single: Word, plural: Word) => void
16+
addUncountableRule: (word: Word | RegExp) => void
17+
}
18+
19+
export const plural: Pluralize['plural'] = pluralize.plural
20+
export const singular: Pluralize['singular'] = pluralize.singular
21+
export const isPlural: Pluralize['isPlural'] = pluralize.isPlural
22+
export const isSingular: Pluralize['isSingular'] = pluralize.isSingular
23+
export const addPluralRule: Pluralize['addPluralRule'] = pluralize.addPluralRule
24+
export const addSingularRule: Pluralize['addSingularRule'] = pluralize.addSingularRule
25+
export const addIrregularRule: Pluralize['addIrregularRule'] = pluralize.addIrregularRule
26+
export const addUncountableRule: Pluralize['addUncountableRule'] = pluralize.addUncountableRule

.stacks/core/types/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"@types/crypto-js": "^4.1.1",
5858
"@types/eslint": "^8.44.0",
5959
"@types/fs-extra": "^11.0.1",
60-
"@types/js-yaml": "^4.0.5",
6160
"@types/markdown-it-link-attributes": "^3.0.1",
6261
"@types/minimatch": "^5.1.2",
6362
"@types/node": "^18.16.19",

.stacks/core/types/src/cli.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ type SpinnerOptions = Ora
3434
export type CliOptionsKeys = keyof CliOptions
3535

3636
/**
37-
* The CLI Options used in `./config/cli.ts`.
37+
* The Binary/CLI Options used in `./config/binary.ts`.
3838
*/
39-
export interface UserCliOptions {
39+
export interface BinaryOptions {
4040
name?: string
4141
command?: string
4242
description?: string
43+
// path?: string // TODO: add this for a configurable path where the commands are located
4344
}
4445

4546
/**

.stacks/core/types/src/cron-jobs.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ export interface JobOptions {
1515
enabled?: boolean
1616
}
1717

18-
export type Job = JobOptions
19-
export type Jobs = Job[]
20-
export type CronJob = Job
21-
export type CronJobs = Jobs
18+
// export type Job = JobOptions
19+
// export type Jobs = Job[]
20+
// export type CronJob = Job
21+
// export type CronJobs = Jobs
2222

2323
export enum Every {
2424
Second = '* * * * * *',

.stacks/core/types/src/stacks.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type {
22
AppOptions,
3+
BinaryOptions,
34
CacheOptions,
45
CdnOptions,
56
DatabaseOptions,
@@ -17,7 +18,6 @@ import type {
1718
ServicesOptions,
1819
StorageOptions,
1920
UiOptions,
20-
UserCliOptions,
2121
} from './'
2222

2323
/**
@@ -38,31 +38,31 @@ export interface StacksOptions {
3838
app: Partial<AppOptions>
3939

4040
/**
41-
* **Cache Options**
41+
* **Binary Options**
4242
*
43-
* This configuration defines all of your Cache options. Because Stacks is fully-typed, you
43+
* This configuration defines all of your Binary options. Because Stacks is fully-typed, you
4444
* may hover any of the options below and the definitions will be provided. In case you
4545
* have any questions, feel free to reach out via Discord or GitHub Discussions.
4646
*/
47-
cache: Partial<CacheOptions>
47+
binary: Partial<BinaryOptions>
4848

4949
/**
50-
* **CDN Options**
50+
* **Cache Options**
5151
*
52-
* This configuration defines all of your CDN options. Because Stacks is fully-typed, you
52+
* This configuration defines all of your Cache options. Because Stacks is fully-typed, you
5353
* may hover any of the options below and the definitions will be provided. In case you
5454
* have any questions, feel free to reach out via Discord or GitHub Discussions.
5555
*/
56-
cdn: Partial<CdnOptions>
56+
cache: Partial<CacheOptions>
5757

5858
/**
59-
* **CLI Options**
59+
* **CDN Options**
6060
*
61-
* This configuration defines all of your CLI options. Because Stacks is fully-typed, you
61+
* This configuration defines all of your CDN options. Because Stacks is fully-typed, you
6262
* may hover any of the options below and the definitions will be provided. In case you
6363
* have any questions, feel free to reach out via Discord or GitHub Discussions.
6464
*/
65-
cli: Partial<UserCliOptions>
65+
cdn: Partial<CdnOptions>
6666

6767
/**
6868
* **Database Options**

.stacks/core/utils/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
},
105105
"devDependencies": {
106106
"@stacksjs/development": "workspace:*",
107+
"@types/js-yaml": "^4.0.5",
107108
"markdown-table": "^3.0.3"
108109
}
109110
}

0 commit comments

Comments
 (0)