Skip to content

Commit 5fdbe4f

Browse files
committed
chore: wip
chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip
1 parent 614ddac commit 5fdbe4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+282
-216
lines changed

.github/labeler.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ analytics:
7272
- any: ['.stacks/core/analytics/**', '!.stacks/core/analytics/package.json']
7373

7474
arrays:
75-
- any: ['.stacks/core/arrays/**', '!.stacks/core/arrays/package.json']
75+
- any: ['.stacks/core/utils/arrays/**', '!.stacks/core/utils/arrays/package.json']
7676

7777
auth:
7878
- any: ['.stacks/core/auth/**', '!.stacks/core/auth/package.json']
@@ -87,7 +87,7 @@ cache:
8787
- any: ['.stacks/core/cache/**', '!.stacks/core/cache/package.json']
8888

8989
chat:
90-
- any: ['.stacks/core/chat/**', '!.stacks/core/chat/package.json']
90+
- any: ['.stacks/core/notifications/chat/**', '!.stacks/core/notifications/chat/package.json']
9191

9292
cli:
9393
- any: ['.stacks/core/cli/**', '!.stacks/core/cli/package.json']
@@ -97,7 +97,7 @@ cloud:
9797
- any: ['.stacks/core/cloud/**', '!.stacks/core/cloud/package.json']
9898

9999
collections:
100-
- any: ['.stacks/core/collections/**', '!.stacks/core/collections/package.json']
100+
- any: ['.stacks/core/utils/collections/**', '!.stacks/core/utils/collections/package.json']
101101

102102
config:
103103
- any: ['.stacks/core/config/**', '!.stacks/core/config/package.json']
@@ -107,7 +107,7 @@ database:
107107
- any: ['.stacks/core/database/**', '!.stacks/core/database/package.json']
108108

109109
datetime:
110-
- any: ['.stacks/core/datetime/**', '!.stacks/core/datetime/package.json']
110+
- any: ['.stacks/core/utils/datetime/**', '!.stacks/core/utils/datetime/package.json']
111111

112112
desktop:
113113
- any: ['.stacks/core/desktop/**', '!.stacks/core/desktop/package.json']
@@ -126,7 +126,7 @@ docs:
126126
- config/docs.ts
127127

128128
email:
129-
- any: ['.stacks/core/email/**', '!.stacks/core/email/package.json']
129+
- any: ['.stacks/core/notifications/email/**', '!.stacks/core/notifications/email/package.json']
130130

131131
error-handling:
132132
- any: ['.stacks/core/error-handling/**', '!.stacks/core/error-handling/package.json']
@@ -139,13 +139,13 @@ faker:
139139
- any: ['.stacks/core/faker/**', '!.stacks/core/faker/package.json']
140140

141141
git:
142-
- any: ['.stacks/core/git/**', '!.stacks/core/git/package.json']
142+
- any: ['.stacks/core/utils/git/**', '!.stacks/core/utils/git/package.json']
143143

144144
health:
145145
- any: ['.stacks/core/health/**', '!.stacks/core/health/package.json']
146146

147147
lint:
148-
- any: ['.stacks/core/lint/**', '!.stacks/core/lint/package.json']
148+
- any: ['.stacks/core/utils/lint/**', '!.stacks/core/utils/lint/package.json']
149149

150150
logging:
151151
- any: ['.stacks/core/logging/**', '!.stacks/core/logging/package.json']
@@ -158,7 +158,7 @@ notifications:
158158
- app/notifications/**
159159

160160
objects:
161-
- any: ['.stacks/core/objects/**', '!.stacks/core/objects/package.json']
161+
- any: ['.stacks/core/utils/objects/**', '!.stacks/core/utils/objects/package.json']
162162

163163
orm:
164164
- any: ['.stacks/core/orm/**', '!.stacks/core/orm/package.json']
@@ -173,7 +173,7 @@ payments:
173173
- any: ['.stacks/core/payments/**', '!.stacks/core/payments/package.json']
174174

175175
push:
176-
- any: ['.stacks/core/push/**', '!.stacks/core/push/package.json']
176+
- any: ['.stacks/core/notifications/push/**', '!.stacks/core/notifications/push/package.json']
177177

178178
query-builder:
179179
- any: ['.stacks/core/query-builder/**', '!.stacks/core/query-builder/package.json']
@@ -209,14 +209,14 @@ slug:
209209
- any: ['.stacks/core/slug/**', '!.stacks/core/slug/package.json']
210210

211211
sms:
212-
- any: ['.stacks/core/sms/**', '!.stacks/core/sms/package.json']
212+
- any: ['.stacks/core/notifications/sms/**', '!.stacks/core/notifications/sms/package.json']
213213

214214
storage:
215215
- any: ['.stacks/core/storage/**', '!.stacks/core/storage/package.json']
216216
- storage/**
217217

218218
strings:
219-
- any: ['.stacks/core/strings/**', '!.stacks/core/strings/package.json']
219+
- any: ['.stacks/core/utils/strings/**', '!.stacks/core/utils/strings/package.json']
220220

221221
testing:
222222
- any: ['.stacks/core/testing/**', '!.stacks/core/testing/package.json']

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export const alias: Record<string, string> = {
5050
'@stacksjs/error-handling/*': p.errorHandlingPath('src/*'),
5151
'@stacksjs/events': p.eventsPath('src/index.ts'),
5252
'@stacksjs/events/*': p.eventsPath('src/*'),
53+
'@stacksjs/env': p.coreEnvPath('src/index.ts'),
54+
'@stacksjs/env/*': p.coreEnvPath('src/*'),
5355
'@stacksjs/faker': p.fakerPath('src/index.ts'),
5456
'@stacksjs/faker/*': p.fakerPath('src/*'),
5557
'@stacksjs/git': p.gitPath('src/index.ts'),
@@ -214,6 +216,7 @@ export const alias: Record<string, string> = {
214216
'~/lang/*': p.langPath('*'),
215217
'~/components/*': p.componentsPath('*'),
216218
'~/functions/*': p.functionsPath('*'),
219+
'~/resources/*': p.resourcesPath('*'),
217220
'~views/*': p.viewsPath('*'),
218221
'~/*': p.projectPath('*'),
219222
}

.stacks/core/env/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Stacks Objects
2+
3+
Easily work with objects.
4+
5+
## ☘️ Features
6+
7+
- Access to Laravel-like Collections API
8+
- Other object helpers
9+
10+
## 🤖 Usage
11+
12+
```bash
13+
pnpm i -D @stacksjs/objects
14+
```
15+
16+
Now, you can easily access it in your project:
17+
18+
```js
19+
import { collect } from '@stacksjs/objects'
20+
21+
const collection = collect([{
22+
name: 'My story',
23+
pages: 176,
24+
}, {
25+
name: 'Fantastic Beasts and Where to Find Them',
26+
pages: 1096,
27+
}])
28+
29+
console.log(collection.avg('pages')) // 636
30+
```
31+
32+
To view the full documentation, please visit [https://stacksjs.dev/objects](https://stacksjs.dev/objects).
33+
34+
## 🧪 Testing
35+
36+
```bash
37+
bun test
38+
```
39+
40+
## 📈 Changelog
41+
42+
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
43+
44+
## 🚜 Contributing
45+
46+
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
47+
48+
## 🏝 Community
49+
50+
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
51+
52+
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
53+
54+
For casual chit-chat with others using this package:
55+
56+
[Join the Stacks Discord Server](https://discord.ow3.org)
57+
58+
## 🙏🏼 Credits
59+
60+
Many thanks to the following core technologies & people who have contributed to this package:
61+
62+
- [Collect.js](https://github.com/ecrmnn/collect.js)
63+
- [Laravel](https://laravel.com/)
64+
- [Chris Breuer](https://github.com/chrisbbreuer)
65+
- [All Contributors](../../contributors)
66+
67+
## 📄 License
68+
69+
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
70+
71+
Made with ❤️

.stacks/core/env/build.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { log, runCommand } from '@stacksjs/cli'
2+
3+
const result = await runCommand('bun build ./src/index.ts --outdir dist --format esm', {
4+
cwd: import.meta.dir,
5+
})
6+
7+
if (result.isErr())
8+
log.error(result.error)
9+
10+
else
11+
log.success('Build complete')

.stacks/core/env/package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@stacksjs/env",
3+
"type": "module",
4+
"version": "0.57.4",
5+
"private": true,
6+
"description": "The Stacks env helper methods.",
7+
"author": "Chris Breuer",
8+
"license": "MIT",
9+
"funding": "https://github.com/sponsors/chrisbbreuer",
10+
"homepage": "https://github.com/stacksjs/stacks/tree/main/.stacks/core/env#readme",
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/stacksjs/stacks.git",
14+
"directory": "./.stacks/core/env"
15+
},
16+
"bugs": {
17+
"url": "https://github.com/stacksjs/stacks/issues"
18+
},
19+
"keywords": [
20+
"env",
21+
"utilities",
22+
"functions",
23+
"stacks"
24+
],
25+
"contributors": [
26+
"Chris Breuer <chris@ow3.org>"
27+
],
28+
"exports": {
29+
".": {
30+
"import": "./dist/index.mjs"
31+
}
32+
},
33+
"files": [
34+
"src",
35+
"README.md"
36+
],
37+
"scripts": {
38+
"build": "bun build.ts",
39+
"typecheck": "bun --bun tsc --noEmit",
40+
"prepublishOnly": "bun run build"
41+
},
42+
"devDependencies": {
43+
"@stacksjs/development": "workspace:*"
44+
}
45+
}

.stacks/core/validation/src/types/env.ts renamed to .stacks/core/env/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { loadEnv } from '@stacksjs/vite'
2-
31
export interface Env {
42
APP_NAME: string
53
APP_ENV: 'development' | 'staging' | 'production'
@@ -122,4 +120,4 @@ export type FrontendEnvKeys = keyof FrontendEnv
122120

123121
export const env: Partial<Env> = process.env
124122

125-
export { loadEnv }
123+
// export { loadEnv } from 'vite'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('example test', () => {
2+
test('assert', () => {
3+
expect(1).toBe(1)
4+
})
5+
})

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ export function eventsPath(path?: string) {
166166
return corePath(`events/${path || ''}`)
167167
}
168168

169+
export function coreEnvPath(path?: string) {
170+
return corePath(`env/${path || ''}`)
171+
}
172+
169173
export function examplesPath(type: 'vue-components' | 'web-components') {
170174
return frameworkPath(`examples/${type || ''}`)
171175
}
@@ -399,7 +403,7 @@ export function vitePath(path?: string) {
399403
}
400404

401405
export function xRayPath(path?: string) {
402-
return corePath(`x-ray/${path || ''}`)
406+
return frameworkPath(`stacks/x-ray/${path || ''}`)
403407
}
404408

405409
export const path = {
@@ -433,6 +437,7 @@ export const path = {
433437
emailPath,
434438
errorHandlingPath,
435439
eventsPath,
440+
coreEnvPath,
436441
healthPath,
437442
examplesPath,
438443
fakerPath,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ export interface AppOptions {
107107
// inspect: <InspectOptions>{},
108108
}
109109

110-
export type AppConfig = AppOptions
110+
export type AppConfig = Partial<AppOptions>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export interface BinaryOptions {
88
// path?: string // TODO: add this for a configurable path where the commands are located
99
}
1010

11-
export type BinaryConfig = BinaryOptions
11+
export type BinaryConfig = Partial<BinaryOptions>

0 commit comments

Comments
 (0)