Skip to content

Commit

Permalink
chore: Generated tsrouter-client
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjay Khona committed Nov 27, 2024
0 parents commit b2252e0
Show file tree
Hide file tree
Showing 95 changed files with 25,207 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
> 0.5%
last 2 versions
Firefox ESR
not IE 11
not op_mini all
not dead
8 changes: 8 additions & 0 deletions .build-config/ci-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"test": {
"parameters": {
"agent_count": "1"
},
"template": "js-frontend-test"
}
}
26 changes: 26 additions & 0 deletions .ccorerc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const path = require('node:path');

const projectCommands = []
.concat(
['cypress.js', 'test-ci.js'].map((cmd) =>
path.join(process.cwd(), 'node_modules', '@oreillymedia/fef-server', 'src/commands', cmd),
),
)
.concat(
['merge-coverage.cjs'].map((cmd) =>
path.join(process.cwd(), 'node_modules', '@oreillymedia/chassis-core', 'src/commands', cmd),
),
);

/**
* This configuration file controls many aspects of how the tooling provided by
* the fef-server library works. It is expected that projects consuming this
* library will modify this file.
*/
module.exports = {
// This value should match whatever `env.` file you use for your production
// environment.
defaultMode: 'prod-gke',
commands: {},
projectCommands,
};
42 changes: 42 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "Tsrouter Client",
"dockerComposeFile": [
"docker-compose.yml",
"docker-compose.local.yml"
],
"mounts": [
// Bind the chassis configuration.
"type=bind,source=${localEnv:HOME}/.chassis,target=/home/developer/.chassis",
// Bind ssh keys
"type=bind,source=${localEnv:HOME}/.ssh,target=/home/developer/.ssh",
// Bind gcloud config.
"type=bind,source=${localEnv:HOME}/.config/devcontainer/gcloud,target=/home/developer/.config/gcloud"
],
"service": "workspace",
"workspaceFolder": "/orm/service",
// Run when a new Dev Container instance is created.
"postCreateCommand": "/orm/devcontainer/chassis/scripts/post-create.sh ${containerWorkspaceFolder}",
// Run whenever the Dev Container is initially started or restarted from a
// stopped state.
"postStartCommand": "/orm/devcontainer/chassis/scripts/post-start.sh",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"mikestead.dotenv"
],
"settings": {
"eslint.workingDirectories": [
{
"mode": "auto"
}
],
"terminal.integrated.defaultProfile.linux": "zsh",
"window.title": "${activeEditorShort}${separator}Tsrouter Client"
}
}
}
}
41 changes: 41 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This file is automatically created by the `regen` command.
# To make changes please edit the `SERVICE_FEATURES` setting.
# See https://devdocs.common-build.gcp.oreilly.com/chassis/features.html#service-features-setting
name: tsrouter-client_devcontainer
networks:
default:
external: true
name: platform
services:
workspace:
command: /bin/sh -c "while sleep 1000; do :; done"
environment:
DD_TRACE_ENABLED: 'False'
DJANGO_SETTINGS_MODULE: tsrouter_client.settings
IPYTHONDIR: /orm/service/.ipython/
ORM_SERVICE_NAME: tsrouter-client
PYTHONPATH: /orm/:/orm/service/:/orm/chassis/
SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock
image: us-central1-docker.pkg.dev/common-build/orm-hub/orm-devcontainer-chassis:latest
labels:
- traefik.docker.network=platform
- traefik.enable=true
- traefik.http.routers.tsrouter-client--web--learning-oreilly.rule=Host(`learning.oreilly.local`)
&& PathPrefix(`/science`)
- traefik.http.routers.tsrouter-client--web--learning-oreilly.tls=True
networks:
default: {}
ports:
- 9753:9999
volumes:
- source: ..
target: /orm/service
type: bind
- source: /run/host-services/ssh-auth.sock
target: /run/host-services/ssh-auth.sock
type: bind
- source: node-modules
target: /orm/service/node_modules
type: volume
volumes:
node-modules: {}
60 changes: 60 additions & 0 deletions .devcontainer/initialize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash

red=$(tput setaf 1)
yellow=$(tput setaf 3)
normal=$(tput sgr0)

# Create docker-compose.local.yml if it doesn't exist

COMPOSE_CONTENTS=$(cat <<-END
# This file allows you to customize the Dev Container environment when running
# it on your machine. It should not be committed to the git repository.
services: {}
END
)

if [[ ! -f './.devcontainer/docker-compose.local.yml' ]]
then
echo "${yellow}Creating .devcontainer/docker-compose.local.yml...${normal}"

echo "${COMPOSE_CONTENTS}" > .devcontainer/docker-compose.local.yml
fi

# Ensure directories mounted by the `devcontainer.json` exist.

if [[ ! -d "$HOME/.chassis" ]]
then
echo "${yellow}Creating chassis config directory...${normal}"
mkdir -p "$HOME/.chassis"
fi

if [[ ! -d "$HOME/.ssh" ]]
then
echo "${yellow}Creating ssh directory...${normal}"
mkdir -p "$HOME/.ssh"
fi

if [[ ! -d "$HOME/.config/devcontainer/gcloud" ]]
then
echo "${yellow}Creating devcontainer gcloud config directory...${normal}"
mkdir -p "$HOME/.config/devcontainer/gcloud"
fi

# Docker network create support

function create_docker_network() {
if [[ ! "$1" =~ $2 ]]
then
echo "${yellow}Creating "$2" docker network...${normal}"
docker network create "$2" 1>/dev/null 2>/dev/null
fi
}

if ! network_command_output=$(docker network list --format '{{.Name}}' 2>/dev/null)
then
echo "${red}ERROR: Could not get list of docker networks.${normal}"
else
existing_networks="${network_command_output[*]}"
create_docker_network "$existing_networks" "platform"
create_docker_network "$existing_networks" "local"
fi
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
node_modules/
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.py]
indent_size=4
24 changes: 24 additions & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: LaunchDarkly code references
on:
push:
branches-ignore:
- 'renovate/**'
- 'maintenance-**'
- 'orm-vulnerability-patcher/**'
# cancel any in-flight workflow if a new one is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
launchDarklyCodeReferences:
name: LaunchDarkly code references
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 10 # This value must be set if the lookback configuration option is not disabled for find-code-references. Read more: https://github.com/launchdarkly/ld-find-code-references#searching-for-unused-flags-extinctions
- name: LaunchDarkly code references
if: "!contains(github.event.issue.labels.*.name, 'maintenance')"
uses: launchdarkly/find-code-references@v2.10.0
with:
accessToken: ${{ secrets.LAUNCH_DARKLY_CODE_REFS_SECRET }}
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
*~
__pycache__
*.pyc
*.secret.*

# Add a docker-compose.override.yml to set local secrets in the containers
docker-compose.override.yml

# IDE related files
.idea
.coverage
cov.xml
.cov.xml
.environment
.userid
*.sublime-*

# Test coverage files
coverage
test-report.xml
junit.xml
cypress/videos/
cypress/screenshots/
.nyc_output/

# Temporary storage
.DS_Store
temp/
*.tgz

# generated directories for deployment pipeline
istio-system/
kube/


# Frontend files
dist/
node_modules/
env.debug

# Dev Container Related Config
.vscode/*
!/.vscode/launch.json
!/.vscode/tasks.json
devsecrets.json
docker-compose.local.yml

# Terraform metadata directory
**/.terraform/*

# All terraform plan files
**/tf-plan-file

# .tfstate files
*.tfstate
*.tfstate.*

# .tfvars files - ignored b/c we template them out
*.tfvars
*.tfvars.json
5 changes: 5 additions & 0 deletions .launchdarkly/coderefs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
projects:
- key: platform
dir: src
aliases:
- type: camelcase
1 change: 1 addition & 0 deletions .ldignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.json
32 changes: 32 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const fs = require('node:fs');
const path = require('node:path');

const autoprefixer = require('autoprefixer');
const postCssImport = require('postcss-import');
const postCssGlobalData = require('@csstools/postcss-global-data');
const postCssCustomMedia = require('postcss-custom-media');
const postCssMediaMinMax = require('postcss-media-minmax');
const postCssNested = require('postcss-nested');

let globalFiles = [];
const omuiCssRoot = path.resolve('./node_modules/@oreillymedia/omui/dist');
if (fs.existsSync(omuiCssRoot)) {
globalFiles = [path.join(omuiCssRoot, 'custommedia.css')];
}

module.exports = {
// Note that plugins are processed from first to last, and that order can be
// important.
plugins: [
postCssImport,
postCssGlobalData({
files: globalFiles,
}),
postCssCustomMedia({
preserve: true,
}),
postCssMediaMinMax,
postCssNested,
autoprefixer({ remove: false }),
],
};
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coverage
dist
application.json
package-lock.json
package.json
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
printWidth: 120,
singleQuote: true,
tabWidth: 2,
useTabs: false,
};
Loading

0 comments on commit b2252e0

Please sign in to comment.