From 87b2efe47d203a80dd0fe88751f6054380e3b46f Mon Sep 17 00:00:00 2001 From: Modern Sapien Date: Fri, 10 Dec 2021 16:09:20 -0500 Subject: [PATCH] addresses graphqlcodegen, webpack and gulp issues with Windows. --- packages/graphql/schemas/cloud.graphql | 5 +++++ packages/graphql/schemas/schema.graphql | 3 +++ scripts/gulp/tasks/gulpGraphql.ts | 3 ++- scripts/gulp/tasks/gulpRegistry.ts | 6 +++++- scripts/gulp/tasks/gulpWebpack.ts | 6 ++++-- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/packages/graphql/schemas/cloud.graphql b/packages/graphql/schemas/cloud.graphql index acbc5de9179..ac6de33a02a 100644 --- a/packages/graphql/schemas/cloud.graphql +++ b/packages/graphql/schemas/cloud.graphql @@ -84,6 +84,11 @@ type CloudProject implements Node { """ latestRun: CloudRun + """ + Given name of the project + """ + name: String! + """ The organization the project is a member of """ diff --git a/packages/graphql/schemas/schema.graphql b/packages/graphql/schemas/schema.graphql index c3d70d4cd8d..1f23b27d7f9 100644 --- a/packages/graphql/schemas/schema.graphql +++ b/packages/graphql/schemas/schema.graphql @@ -87,6 +87,9 @@ type CloudProject implements Node { """The latest run for a given spec""" latestRun: CloudRun + """Given name of the project""" + name: String! + """The organization the project is a member of""" organization: CloudOrganization diff --git a/scripts/gulp/tasks/gulpGraphql.ts b/scripts/gulp/tasks/gulpGraphql.ts index 11984a50bf2..88aa7826c26 100644 --- a/scripts/gulp/tasks/gulpGraphql.ts +++ b/scripts/gulp/tasks/gulpGraphql.ts @@ -43,8 +43,9 @@ export async function graphqlCodegen () { } export async function graphqlCodegenWatch () { - const spawned = spawn('graphql-codegen', ['--watch', '--config', 'graphql-codegen.yml'], { + const spawned = spawn('bash.exe', ['graphql-codegen','--watch', '--config', 'graphql-codegen.yml'], { cwd: monorepoPaths.root, + shell:true }) const dfd = pDefer() let hasResolved = false diff --git a/scripts/gulp/tasks/gulpRegistry.ts b/scripts/gulp/tasks/gulpRegistry.ts index 74460b9bdb4..f415bfa9c35 100644 --- a/scripts/gulp/tasks/gulpRegistry.ts +++ b/scripts/gulp/tasks/gulpRegistry.ts @@ -10,7 +10,11 @@ let hasExited = false export function addChildProcess (child: ChildProcess) { if (hasExited) { - treeKill(child.pid) + treeKill(child.pid, + err => { + console.log(err) + } + ) return } diff --git a/scripts/gulp/tasks/gulpWebpack.ts b/scripts/gulp/tasks/gulpWebpack.ts index 2d394ed397a..a93afa08035 100644 --- a/scripts/gulp/tasks/gulpWebpack.ts +++ b/scripts/gulp/tasks/gulpWebpack.ts @@ -22,14 +22,16 @@ type RunWebpackCfg = { export async function runWebpack (cfg: RunWebpackCfg) { const { cwd, args = [], env = process.env, devServer = false, prefix } = cfg + console.log(cwd); const dfd = pDefer() const spawned = spawn( - devServer + `bash.exe ${devServer ? './node_modules/.bin/webpack-dev-server' - : './node_modules/.bin/webpack', + : './node_modules/.bin/webpack'}`, args, { cwd, + shell:true, env: { ...(env || process.env), FORCE_COLOR: '1',