Skip to content

Commit

Permalink
fix: api playground (#147)
Browse files Browse the repository at this point in the history
* fix: add submodules recursive

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 1

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 2

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 4

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 5

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 6

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 7

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 8

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 9

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: add submodules recursive 10

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

---------

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
Co-Signed-off-by: Animesh Pathak <kurosakiichigo.songoku@gmail.com>
  • Loading branch information
gouravkrosx authored Nov 28, 2024
1 parent ba79aa4 commit e5257e8
Showing 22 changed files with 3,656 additions and 2,687 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Install Dependencies
run: npm install
18 changes: 16 additions & 2 deletions app/api/createFileStructure/route.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import { NextRequest, NextResponse } from 'next/server';
import { Directory } from '@/components/atg/Editor/utils/file-manager';
import { createFileStructure } from '@/components/atg/Editor/utils/File-Structure';
import { join } from 'path';
import { existsSync } from 'fs';
import { existsSync,readdirSync } from 'fs';

interface ErrorResponse {
message: string;
@@ -28,7 +28,21 @@ export async function GET(
}

const basePath = process.cwd();
const projectPath = join(basePath, pathsMap[projectKey]);
const projectPath = join(basePath, pathsMap[projectKey]); // find the project map

console.log("projectInMap", pathsMap[projectKey]);
console.log("basePath", basePath);
console.log("projectPath", projectPath); // check the path


console.log('Available directories(basepath):', readdirSync(basePath));
console.log('Available directories(components):', readdirSync(join(basePath, 'components')));
console.log('Available directories(atg):', readdirSync(join(basePath, 'components/atg')));
console.log('Available directories(demo-projects):', readdirSync(join(basePath, 'components/atg/demo-projects')));
console.log('Available directories(projects):', readdirSync(join(basePath, 'components/atg/demo-projects/projects')));
console.log('Available directories(projectPath):', readdirSync(projectPath));


// Check if path exists before proceeding
if (!existsSync(projectPath)) {
console.error(`Path does not exist: ${projectPath}`);
1 change: 1 addition & 0 deletions components/atg/demo-projects
Submodule demo-projects added at 3871f0
2 changes: 0 additions & 2 deletions components/atg/demo-projects/README.md

This file was deleted.

69 changes: 0 additions & 69 deletions components/atg/demo-projects/projects/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion components/atg/demo-projects/projects/cred.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions components/atg/demo-projects/projects/goapp/go.mod

This file was deleted.

117 changes: 0 additions & 117 deletions components/atg/demo-projects/projects/goapp/go.sum

This file was deleted.

82 changes: 0 additions & 82 deletions components/atg/demo-projects/projects/goapp/schema.json

This file was deleted.

24 changes: 0 additions & 24 deletions components/atg/demo-projects/projects/goapp/server.go

This file was deleted.

1 change: 0 additions & 1 deletion components/atg/demo-projects/projects/installation-id.yaml

This file was deleted.

Loading

0 comments on commit e5257e8

Please sign in to comment.