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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ lib/*
dist-test/*
sandbox/*
.vscode/
pnpm-lock.yaml
pnpm-workspace.yaml
.DS_Store
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Once installed, run godspeed from your terminal to see the available commands an
| plugins | | manage eventsource and datasource plugins for godspeed. |
| gen-crud-api | | scans your prisma datasources and generate CRUD APIs events and workflows |
| gen-graphql-schema | | scans your graphql events and generate graphql schema . |
| tools | | Extra godspeed tools. |


## 📖 Documentation <a name="Documentation"></a>
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"glob": "10.3.4",
"inquirer": "^8.2.5",
"js-yaml": "^4.1.0",
"json-schema": "^0.4.0",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"path": "^0.12.7",
Expand All @@ -43,7 +44,8 @@
"rimraf": "^6.0.1",
"signale": "^1.4.0",
"simple-git": "^3.7.1",
"sinon": "^16.0.0"
"sinon": "^16.0.0",
"yaml": "^2.8.1"
},
"devDependencies": {
"@types/chai": "^4.3.6",
Expand All @@ -55,6 +57,7 @@
"@types/handlebars-helpers": "^0.5.3",
"@types/inquirer": "^9.0.3",
"@types/js-yaml": "^4.0.5",
"@types/json-schema": "^7.0.15",
"@types/mocha": "^10.0.1",
"@types/node": "^18.17.14",
"@types/proxyquire": "^1.3.29",
Expand Down
28 changes: 15 additions & 13 deletions src/commands/create/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fsExtras = require("fs-extra");
import path from "path"
import path from "path";

// import interactiveMode from "../../utils/interactiveMode";
// import {
Expand All @@ -9,7 +9,8 @@ import path from "path"
// } from "../../utils/dockerUtility";
// import checkPrerequisite from "../../utils/checkPrerequisite";
import {
installDependencies, installPackage,
installDependencies,
installPackage,
validateAndCreateProjectDirectory,
} from "../../utils/index";
import { copyingLocalTemplate } from "../../utils";
Expand Down Expand Up @@ -77,30 +78,31 @@ export default async function create(
const gitFilePath = path.join(process.cwd(), projectName, ".git");
fsExtras.removeSync(gitFilePath);



if(options.fromExample === 'mongo-as-prisma'){
await installPackage(projectDirPath,'@godspeedsystems/plugins-prisma-as-datastore')
}
if (options.fromExample === "mongo-as-prisma") {
await installPackage(
projectDirPath,
"@godspeedsystems/plugins-prisma-as-datastore"
);
}
await installDependencies(projectDirPath, projectName);

// Delete .template folder in project folder.
const templateFilePath = path.join(process.cwd(), projectName, ".template");

if (fsExtras.existsSync(templateFilePath)) {
fsExtras.removeSync(templateFilePath);
}

try {
// the NEW flow [without containers]


// const composeOptions = await getComposeOptions();

// if (composeOptions.composeOptions) {
// composeOptions.composeOptions.push(`${projectName}_devcontainer`);
// }

// composeOptions.cwd = path.resolve(projectDirPath, ".devcontainer");
// composeOptions.log = process.env.DEBUG ? Boolean(process.env.DEBUG) : false;

// // check if there are already running resources
// await prepareToStartContainers(projectName, composeOptions);

// await buildContainers(
// projectName,
// godspeedOptions,
Expand Down
Loading