1
0
Fork 0
mirror of synced 2024-07-15 11:15:59 +12:00

Merge pull request #10602 from Budibase/fix/cli-command-not-found

Further CLI build fixes (NPM)
This commit is contained in:
Michael Drury 2023-05-16 11:11:52 +01:00 committed by GitHub
commit 615fd0d5fe
3 changed files with 5 additions and 4 deletions

View file

@ -4,7 +4,7 @@
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "dist/index.js",
"bin": {
"budi": "dist/index.js"
"budi": "dist/src/index.js"
},
"author": "Budibase",
"license": "GPL-3.0",

View file

@ -2,17 +2,17 @@
process.env.DISABLE_PINO_LOGGER = "1"
import "./prebuilds"
import "./environment"
import { env } from "@budibase/backend-core"
import { getCommands } from "./options"
import { Command } from "commander"
import { getHelpDescription } from "./utils"
import { version } from "../package.json"
// add hosting config
async function init() {
const program = new Command()
.addHelpCommand("help", getHelpDescription("Help with Budibase commands."))
.helpOption(false)
.version(env.VERSION)
.version(version)
// add commands
for (let command of getCommands()) {
command.configure(program)

View file

@ -5,6 +5,7 @@
"declaration": true,
"sourceMap": true,
"baseUrl": ".",
"resolveJsonModule": true,
"paths": {
"@budibase/types": ["../types/src"],
"@budibase/backend-core": ["../backend-core/src"],
@ -16,6 +17,6 @@
"swc": true
},
"references": [{ "path": "../types" }, { "path": "../backend-core" }],
"include": ["src/**/*"],
"include": ["src/**/*", "package.json"],
"exclude": ["node_modules", "dist"]
}