@strav/create 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +1 -1
- package/src/index.ts +3 -3
- package/src/templates/api/config/http.ts +1 -1
- package/src/templates/api/index.ts +8 -8
- package/src/templates/api/start/routes.ts +1 -1
- package/src/templates/shared/config/app.ts +1 -1
- package/src/templates/shared/config/database.ts +1 -1
- package/src/templates/shared/config/encryption.ts +1 -1
- package/src/templates/shared/database/schemas/user.ts +1 -1
- package/src/templates/shared/package.json +6 -6
- package/src/templates/shared/strav.ts +1 -1
- package/src/templates/web/config/http.ts +1 -1
- package/src/templates/web/index.ts +10 -10
- package/src/templates/web/start/routes.ts +2 -2
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @strav/create
|
|
2
2
|
|
|
3
|
-
Scaffold a new [Strav](https://www.npmjs.com/package/@
|
|
3
|
+
Scaffold a new [Strav](https://www.npmjs.com/package/@strav/core) application.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
bunx @
|
|
9
|
-
bunx @
|
|
10
|
-
bunx @
|
|
8
|
+
bunx @strav/create@latest my-app --api # headless REST API
|
|
9
|
+
bunx @strav/create@latest my-app --web # full-stack with views
|
|
10
|
+
bunx @strav/create@latest my-app # interactive prompt
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Templates
|
|
@@ -18,7 +18,7 @@ bunx @stravigor/create@latest my-app # interactive prompt
|
|
|
18
18
|
## Options
|
|
19
19
|
|
|
20
20
|
```
|
|
21
|
-
bunx @
|
|
21
|
+
bunx @strav/create <project-name> [options]
|
|
22
22
|
|
|
23
23
|
--api Headless REST API template
|
|
24
24
|
--web Full-stack template with views and static files
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -57,10 +57,10 @@ function parseArgs(): ParsedArgs {
|
|
|
57
57
|
|
|
58
58
|
function printUsage(): void {
|
|
59
59
|
console.log(`
|
|
60
|
-
${bold('@
|
|
60
|
+
${bold('@strav/create')} ${dim(`v${VERSION}`)}
|
|
61
61
|
|
|
62
62
|
${bold('Usage:')}
|
|
63
|
-
bunx @
|
|
63
|
+
bunx @strav/create ${cyan('<project-name>')} [options]
|
|
64
64
|
|
|
65
65
|
${bold('Options:')}
|
|
66
66
|
--api Headless REST API template
|
|
@@ -86,7 +86,7 @@ async function main(): Promise<void> {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
console.log()
|
|
89
|
-
console.log(` ${bold('@
|
|
89
|
+
console.log(` ${bold('@strav/create')} ${dim(`v${VERSION}`)}`)
|
|
90
90
|
console.log()
|
|
91
91
|
|
|
92
92
|
// Project name
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import 'reflect-metadata'
|
|
2
|
-
import { app } from '@
|
|
3
|
-
import { router } from '@
|
|
4
|
-
import { ConfigProvider, EncryptionProvider } from '@
|
|
5
|
-
import { DatabaseProvider } from '@
|
|
6
|
-
import BaseModel from '@
|
|
7
|
-
import Database from '@
|
|
8
|
-
import Server from '@
|
|
9
|
-
import { ExceptionHandler } from '@
|
|
2
|
+
import { app } from '@strav/kernel/core'
|
|
3
|
+
import { router } from '@strav/http/http'
|
|
4
|
+
import { ConfigProvider, EncryptionProvider } from '@strav/kernel/providers'
|
|
5
|
+
import { DatabaseProvider } from '@strav/database/providers'
|
|
6
|
+
import BaseModel from '@strav/database/orm/base_model'
|
|
7
|
+
import Database from '@strav/database/database/database'
|
|
8
|
+
import Server from '@strav/http/http/server'
|
|
9
|
+
import { ExceptionHandler } from '@strav/kernel/exceptions'
|
|
10
10
|
|
|
11
11
|
// Register service providers
|
|
12
12
|
app.use(new ConfigProvider()).use(new DatabaseProvider()).use(new EncryptionProvider())
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
"test": "bun test tests/"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"@
|
|
12
|
+
"@strav/kernel": "__CORE_VERSION__",
|
|
13
|
+
"@strav/http": "__CORE_VERSION__",
|
|
14
|
+
"@strav/view": "__CORE_VERSION__",
|
|
15
|
+
"@strav/database": "__CORE_VERSION__",
|
|
16
|
+
"@strav/cli": "__CORE_VERSION__",
|
|
17
17
|
"luxon": "^3.7.2",
|
|
18
18
|
"reflect-metadata": "^0.2.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/bun": "latest",
|
|
22
22
|
"@types/luxon": "^3.7.1",
|
|
23
|
-
"@
|
|
23
|
+
"@strav/testing": "__CORE_VERSION__"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import '@
|
|
2
|
+
import '@strav/cli/cli/strav'
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import 'reflect-metadata'
|
|
2
|
-
import { app } from '@
|
|
3
|
-
import { router } from '@
|
|
4
|
-
import { ConfigProvider, EncryptionProvider } from '@
|
|
5
|
-
import { DatabaseProvider } from '@
|
|
6
|
-
import { SessionProvider } from '@
|
|
7
|
-
import { ViewProvider } from '@
|
|
8
|
-
import BaseModel from '@
|
|
9
|
-
import Database from '@
|
|
10
|
-
import Server from '@
|
|
11
|
-
import { ExceptionHandler } from '@
|
|
2
|
+
import { app } from '@strav/kernel/core'
|
|
3
|
+
import { router } from '@strav/http/http'
|
|
4
|
+
import { ConfigProvider, EncryptionProvider } from '@strav/kernel/providers'
|
|
5
|
+
import { DatabaseProvider } from '@strav/database/providers'
|
|
6
|
+
import { SessionProvider } from '@strav/http/providers'
|
|
7
|
+
import { ViewProvider } from '@strav/view'
|
|
8
|
+
import BaseModel from '@strav/database/orm/base_model'
|
|
9
|
+
import Database from '@strav/database/database/database'
|
|
10
|
+
import Server from '@strav/http/http/server'
|
|
11
|
+
import { ExceptionHandler } from '@strav/kernel/exceptions'
|
|
12
12
|
|
|
13
13
|
// Register service providers
|
|
14
14
|
app
|