-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
3,283 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Actions Dispatcher | ||
|
||
GitHub Actions Dispatcher is allows you to trigger other GitHub Actions | ||
workflows from a single workflow. This is useful when you want to run multiple | ||
workflows in parallel or when you want to trigger a workflow from another | ||
repository. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Deployment Configs | ||
|
||
Deployment configs allow you to create deployments via YAML configuration files. | ||
This approach is useful for defining deployments in a declarative manner, | ||
enabling you to version control your deployment configurations and create better | ||
templates for other application development teams. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Release Scanner | ||
|
||
The Release Scanner is a tool that scans GitHub repositories for new releases | ||
and creates them for related deployments automatically. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Compute Scanner | ||
|
||
The Compute Scanner is a tool that scans Google Cloud projects for new instances | ||
and creates them for related deployments automatically. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { registerOTel } from "@vercel/otel"; | ||
|
||
export function register() { | ||
registerOTel({ serviceName: "ctrlplane/webservice" }); | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import baseConfig, { requireJsSuffix } from "@ctrlplane/eslint-config/base"; | ||
|
||
/** @type {import('typescript-eslint').Config} */ | ||
export default [ | ||
{ | ||
ignores: ["dist/**"], | ||
}, | ||
...requireJsSuffix, | ||
...baseConfig, | ||
]; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "@ctrlplane/logger", | ||
"private": true, | ||
"version": "0.1.0", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./src/index.ts" | ||
} | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "tsc", | ||
"dev": "tsc --watch", | ||
"clean": "rm -rf .turbo node_modules", | ||
"format": "prettier --check . --ignore-path ../../.gitignore", | ||
"lint": "eslint", | ||
"typecheck": "tsc --noEmit --emitDeclarationOnly false" | ||
}, | ||
"dependencies": { | ||
"@colors/colors": "^1.6.0", | ||
"winston": "^3.14.2", | ||
"zod": "catalog:" | ||
}, | ||
"devDependencies": { | ||
"@ctrlplane/eslint-config": "workspace:*", | ||
"@ctrlplane/prettier-config": "workspace:*", | ||
"@ctrlplane/tsconfig": "workspace:*", | ||
"eslint": "catalog:", | ||
"prettier": "catalog:", | ||
"typescript": "^5.4.5" | ||
}, | ||
"prettier": "@ctrlplane/prettier-config" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import colors from "@colors/colors/safe"; | ||
import * as winston from "winston"; | ||
|
||
const { LOG_LEVEL, NODE_ENV } = process.env; | ||
|
||
function createLogger(level: string) { | ||
const format = [ | ||
winston.format.timestamp(), | ||
winston.format.align(), | ||
winston.format.printf((info) => { | ||
const { timestamp, level, message, durationMs } = info; | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call | ||
const ts = timestamp?.slice(0, 19).replace("T", " "); | ||
const duration = durationMs != null ? `(Timer: ${durationMs}ms)` : ""; | ||
const hasLabel = info.label != null; | ||
const appendLabel = info.label?.length < 5 ? " " : ""; | ||
const label = hasLabel ? `\t[${info.label}]${appendLabel} ` : "\t\t"; | ||
|
||
return NODE_ENV === "production" | ||
? `${ts} ${duration} [${level}]: ${label} ${message} ${duration}` | ||
: `[${level}]: ${colors.gray(label)}${message} ${duration}`; | ||
}), | ||
]; | ||
|
||
// We dont want colors in production. They do not display correctly in cloud run console. | ||
if (NODE_ENV !== "production") format.unshift(winston.format.colorize()); | ||
|
||
return winston.createLogger({ | ||
level, | ||
format: winston.format.combine(...format), | ||
transports: [new winston.transports.Console()], | ||
}); | ||
} | ||
|
||
export const logger = createLogger(LOG_LEVEL ?? "verbose"); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "@ctrlplane/tsconfig/internal-package.json", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"baseUrl": ".", | ||
"incremental": true, | ||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" | ||
}, | ||
"include": ["*.ts", "src"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import baseConfig, { requireJsSuffix } from "@ctrlplane/eslint-config/base"; | ||
|
||
/** @type {import('typescript-eslint').Config} */ | ||
export default [ | ||
{ | ||
ignores: ["dist/**"], | ||
}, | ||
...requireJsSuffix, | ||
...baseConfig, | ||
]; |
Oops, something went wrong.