Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3dd04f
commit ba2de23
Showing
35 changed files
with
87 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Action } from '@stacksjs/actions' | ||
import { Glob } from 'bun' | ||
|
||
export default new Action({ | ||
name: 'GetModels', | ||
description: 'Gets the application models.', | ||
apiResponse: true, | ||
|
||
async handle() { | ||
const glob = new Glob('**/*.ts') | ||
|
||
// Scans the current working directory and each of its sub-directories recursively | ||
for await (const file of glob.scan({ | ||
cwd: '.', | ||
onlyFiles: true, | ||
})) { | ||
console.log(file) // => "index.ts" | ||
} | ||
|
||
// return Library.downloadCount() | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
<script setup> | ||
import { defineProps } from 'vue' | ||
defineProps({ | ||
live: Boolean, | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
storage/framework/core/components/notification/packages/Sonner.vue
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
storage/framework/core/components/notification/src/components/Expand.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
storage/framework/core/components/notification/src/components/Hero.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
storage/framework/core/components/notification/src/components/Installation.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
storage/framework/core/components/notification/src/components/Others.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
storage/framework/core/components/notification/src/components/Position.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
storage/framework/core/components/notification/src/components/Styling.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
storage/framework/core/components/notification/src/components/Theming.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...omponents/notification/packages/Toast.vue → ...nts/notification/src/components/Toast.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...ponents/notification/packages/Toaster.vue → ...s/notification/src/components/Toaster.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
storage/framework/core/components/notification/src/components/Types.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
storage/framework/core/components/notification/src/components/Usage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...components/notification/packages/index.ts → ...core/components/notification/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
79 changes: 0 additions & 79 deletions
79
storage/framework/core/components/notification/src/style.css
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { path } from '@stacksjs/path' | ||
import type { Model } from '@stacksjs/types' | ||
import { Glob } from 'bun' | ||
|
||
const glob = new Glob('**/*.ts') | ||
const scanOptions = { cwd: path.userModelsPath(), onlyFiles: true } | ||
const displayModels: Model[] = [] | ||
|
||
for await (const file of glob.scan(scanOptions)) { | ||
const model = (await import(path.userModelsPath(file))).default as Model | ||
if (model.highlight !== undefined && model.highlight !== false) | ||
displayModels.push(model) | ||
} | ||
|
||
if (!displayModels.length) { | ||
// If no models should be highlighted, we can just return up to 8 models in alphabetical order | ||
for await (const file of glob.scan(scanOptions)) { | ||
const model = (await import(path.userModelsPath(file))).default as Model | ||
displayModels.push(model) | ||
} | ||
} | ||
|
||
if (displayModels.length > 8) displayModels.length = 8 | ||
displayModels.sort((a, b) => a.name.localeCompare(b.name)) | ||
|
||
console.log(displayModels) // => "index.ts" |