This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| /** | |
| * JENKINS DISCOVERY SCRIPT | |
| * | |
| * This script inspects a Jenkins job to discover ALL available data fields | |
| * in the build responses. Use this to understand what data your Jenkins | |
| * instance provides, then write a custom extraction script based on the results. | |
| * | |
| * USAGE: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| /** | |
| * SELF-CONTAINED GITHUB TIME TO GREEN (TTG) DATA COLLECTION SCRIPT | |
| * | |
| * This script collects Time to Green metrics from GitHub by fetching Pull Requests | |
| * and their associated workflow runs (CI builds). It provides comprehensive TTG data | |
| * for analyzing development velocity and CI performance. | |
| * | |
| * USAGE: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ServeFullstackExecutorSchema } from './schema'; | |
| import { ExecutorContext } from '@nrwl/devkit'; | |
| import { ChildProcess, exec } from 'child_process'; | |
| import * as chalk from 'chalk'; | |
| const LARGE_BUFFER = 1024 * 1000000; | |
| export default async function runExecutor( | |
| options: ServeFullstackExecutorSchema, | |
| _context: ExecutorContext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ServeFullstackExecutorSchema } from './schema'; | |
| import { ExecutorContext } from '@nrwl/devkit'; | |
| import { ChildProcess, exec } from 'child_process'; | |
| const LARGE_BUFFER = 1024 * 1000000; | |
| export default async function runExecutor( | |
| options: ServeFullstackExecutorSchema, | |
| _context: ExecutorContext | |
| ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function startBackendServer(options: ServeFullstackExecutorSchema) { | |
| let frontendServerStarted = false; | |
| return new Promise(() => { | |
| const childProcess = exec(`npx nx serve ${options.backendProject}`, { | |
| maxBuffer: LARGE_BUFFER, | |
| }); | |
| process.on('exit', () => childProcess.kill()); | |
| process.on('SIGTERM', () => childProcess.kill()); | |
| childProcess.stdout.on('data', (data) => { | |
| if (!frontendServerStarted && data.includes('build succeeded, watching for changes...')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function startBackendServer(options: ServeFullstackExecutorSchema) { | |
| let frontendServerStarted = false; | |
| return new Promise(() => { | |
| const childProcess = exec(`npx nx serve ${options.backendProject}`, { | |
| maxBuffer: LARGE_BUFFER, | |
| }); | |
| process.on('exit', () => childProcess.kill()); | |
| process.on('SIGTERM', () => childProcess.kill()); | |
| childProcess.stdout.on('data', (data) => { | |
| if (!frontendServerStarted && data.includes('build succeeded, watching for changes...')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { applicationGenerator as nodeAppGenerator } from '@nrwl/node'; | |
| // ... | |
| async function createNodeApplication( | |
| tree: Tree, | |
| options: AppGeneratorSchema, | |
| serverName: string, | |
| webAppName: string | |
| ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { getWorkspaceLayout, names, Tree, updateJson } from '@nrwl/devkit' | |
| // ... | |
| function adjustDefaultDevPort(tree: Tree, options: AppGeneratorSchema) { | |
| const { fileName } = names(options.name); | |
| updateJson(tree, `apps/${fileName}-web/project.json`, (json) => ({ | |
| ...json, | |
| targets: { | |
| ...json.targets, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { names, Tree } from '@nrwl/devkit'; | |
| import { AppGeneratorSchema } from './schema'; | |
| const defaultPorts = { | |
| frontendPort: 3000, | |
| backendPort: 3333, | |
| }; | |
| export default async function (tree: Tree, options: AppGeneratorSchema) { | |
| const optionsWithDefaults = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ServeFullstackExecutorSchema } from './schema'; | |
| import { ExecutorContext } from '@nrwl/devkit'; | |
| import { ChildProcess, exec } from 'child_process'; | |
| const LARGE_BUFFER = 1024 * 1000000; | |
| export default async function runExecutor( | |
| options: ServeFullstackExecutorSchema, | |
| _context: ExecutorContext | |
| ) { |
NewerOlder