Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/app-builder/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "@effectify/app-builder-cli",
"version": "0.0.0",
"type": "module",
"bin": {
"effectify-app-builder": "./dist/src/main.js"
},
"dependencies": {
"@effectify/app-builder-generation": "workspace:*",
"tslib": "catalog:"
Expand Down
8 changes: 8 additions & 0 deletions packages/app-builder/cli/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env node

import { realpathSync } from "node:fs"
import { readFile } from "node:fs/promises"
import { pathToFileURL } from "node:url"
import * as Effect from "effect/Effect"
import {
type CliCommand,
Expand Down Expand Up @@ -171,3 +175,7 @@ export const runNodeCli = (args: ReadonlyArray<string> = process.argv.slice(2)):
process.exitCode = code
return code
})

if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href) {
await runNodeCli()
}
6 changes: 6 additions & 0 deletions packages/app-builder/e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
},
"test": {
"executor": "nx:run-commands",
"dependsOn": [
{
"projects": ["@effectify/app-builder-cli"],
"target": "build"
}
],
"options": {
"command": "../../../node_modules/.bin/vitest run --config vitest.config.mts",
"cwd": "packages/app-builder/e2e"
Expand Down
Loading
Loading