Skip to content

Commit

Permalink
Merge pull request #332 from kloudlite/update/msvc-page
Browse files Browse the repository at this point in the history
WEB: Update msvg page with plugins
  • Loading branch information
nxtcoder19 authored Nov 28, 2024
2 parents ff8c477 + 75bb6d0 commit 0bc2a1d
Show file tree
Hide file tree
Showing 102 changed files with 10,238 additions and 4,623 deletions.
11 changes: 7 additions & 4 deletions fake-data-generator/gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const types: string[] = [
'ConsoleListAllClustersQuery',
'ConsoleListRegistryImagesQuery',
'ConsoleListImagePullSecretsQuery',
'ConsoleListHelmChartsQuery',
'ConsoleListServiceBindingQuery',
'ConsoleListMSvPluginsQuery',
];

async function fake(files: string[], types: string[] = []) {
Expand All @@ -60,7 +63,7 @@ async function fake(files: string[], types: string[] = []) {
const generator = tjs.buildGenerator(
program,
{ validationKeywords, required: true, include: files },
files
files,
);
if (!generator) {
throw new Error('Failed to create generator');
Expand All @@ -74,7 +77,7 @@ async function fake(files: string[], types: string[] = []) {
}
const jsonSchema = generator.getSchemaForSymbol(sym);
return jsf.resolve(jsonSchema, []);
})
}),
);
for (let i = 0; i < fakeDatas.length; i += 1) {
if (fakeDatas[i]) {
Expand All @@ -88,7 +91,7 @@ async function fake(files: string[], types: string[] = []) {
// @ts-ignore
// just to make it work in node
global.location = new URL(
'file:///home/runner/work/nextjs-graphql/nextjs-graphql/src/generated/gql/server.ts'
'file:///home/runner/work/nextjs-graphql/nextjs-graphql/src/generated/gql/server.ts',
);

(async () => {
Expand All @@ -100,6 +103,6 @@ global.location = new URL(
const fake = ${JSON.stringify(data, null, 2)};
export default fake;`
export default fake;`,
);
})();
Loading

0 comments on commit 0bc2a1d

Please sign in to comment.