Skip to content

Commit f705110

Browse files
authored
refactor: prep for Turborepo (#121)
* feat: deprecate docs sites * docs(docs): summarize original repo structure * build(scripts): add explanatory docstrings * refactor(scripts): remove unnecessary sub-directories * refactor(get-commit-date.sh): remove duplicate comment * build(scripts): simplify gitleaks scripts dir * refactor(archive): archive most repo artifiacts * build(.gitignore): ignore non-language files * docs(docs): add recommended structure * refactor(cisco): move to JavaScript packages * refactor(python): create Python packages directory * docs(LICENSE): update copyright year * ci(.github): document the Gitleaks check * ci(.github): use TruffleHog to scan secrets * build(javascript): reconfigure linting * test(javascript): reconfigure testing
1 parent 613ca60 commit f705110

320 files changed

Lines changed: 27059 additions & 83161 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/lint.yml‎

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,48 @@
1-
# GitHub Action
2-
# description: Lint the code
3-
# author: Matt Norris <matnorri@cisco.com>
1+
# GitHub Action: Lint JavaScript code
2+
#
3+
# This workflow lints the JavaScript code in the repository.
4+
#
5+
# Maintainer: Matt Norris <matnorri@cisco.com>
6+
#
7+
# Usage:
8+
# - Lints the JavaScript code in the repository.
9+
# - Fails the workflow if any linting issues are found.
10+
#
11+
# For more information on ESLint, see: https://eslint.org/
12+
# For more information on Prettier, see: https://prettier.io/
413

5-
name: Lint
14+
name: Lint JavaScript
615
on:
716
workflow_dispatch:
817
pull_request:
18+
types: [opened, reopened, synchronize]
19+
paths:
20+
- 'packages/javascript/**/*.js'
21+
- 'packages/javascript/**/*.json'
22+
- '.github/workflows/lint.yml'
23+
924
jobs:
1025
lint:
11-
if: github.event.pull_request.user.login != 'gveappsupport'
1226
runs-on: ubuntu-latest
27+
defaults:
28+
run:
29+
working-directory: packages/javascript
1330
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
1636
with:
17-
node-version: lts/fermium
18-
- run: npm ci
19-
- run: npm run lint
37+
node-version-file: '.nvmrc'
38+
cache: 'npm'
39+
cache-dependency-path: packages/javascript/package-lock.json
40+
41+
- name: Install dependencies
42+
run: npm ci
43+
44+
- name: Run ESLint
45+
run: npm run lint:eslint
46+
47+
- name: Run Prettier
48+
run: npm run lint:prettier

‎.github/workflows/scan-leaks.yml‎

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
1-
# GitHub Action
2-
# description: Scan the code for secrets, etc.
3-
# author: Matt Norris <matnorri@cisco.com>
1+
# GitHub Action: Scan for Secrets and Sensitive Data
2+
#
3+
# This workflow scans the repository for secrets, credentials, and other sensitive information
4+
# using TruffleHog OSS. It is triggered on pull requests and manual workflow dispatches.
5+
#
6+
# Maintainer: Matt Norris <matnorri@cisco.com>
7+
#
8+
# Usage:
9+
# - Ensures no sensitive data is committed to the repository.
10+
# - Fails the workflow if any secrets or sensitive patterns are detected.
11+
# - Uses .trufflehogignore file to exclude specific paths from scanning.
12+
#
13+
# For more information on TruffleHog, see: https://github.com/trufflesecurity/trufflehog
414

515
name: Scan for leaks
616

717
on: [pull_request, workflow_dispatch]
818

919
jobs:
10-
gitleaks:
20+
trufflehog:
1121
if: github.event.pull_request.user.login != 'gveappsupport'
1222
runs-on: ubuntu-latest
1323
steps:
14-
- uses: actions/checkout@v1
15-
- name: gitleaks-action
16-
uses: zricethezav/gitleaks-action@master
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0 # Fetch full git history for comprehensive scanning
28+
29+
- name: TruffleHog Secret Scan
30+
uses: trufflesecurity/trufflehog@main
31+
with:
32+
extra_args: --results=verified,unknown

‎.github/workflows/test.yml‎

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
1-
# GitHub Action
2-
# description: Run tests
3-
# author: Matt Norris <matnorri@cisco.com>
1+
# GitHub Action: Test JavaScript code
2+
#
3+
# This workflow runs tests for the JavaScript packages in the repository.
4+
#
5+
# Maintainer: Matt Norris <matnorri@cisco.com>
6+
#
7+
# Usage:
8+
# - Runs tests for all JavaScript packages that have tests.
9+
# - Fails the workflow if any tests fail.
10+
#
11+
# For more information on Jest, see: https://jestjs.io/
412

5-
name: Test
13+
name: Test JavaScript
614
on:
715
workflow_dispatch:
816
pull_request:
17+
types: [opened, reopened, synchronize]
18+
paths:
19+
- 'packages/javascript/**/*.js'
20+
- 'packages/javascript/**/*.json'
21+
- '.github/workflows/test.yml'
22+
923
jobs:
1024
test:
11-
if: github.event.pull_request.user.login != 'gveappsupport'
1225
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
working-directory: packages/javascript
1329
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v4
1635
with:
17-
node-version: lts/fermium
18-
- run: npm run lerna:ci
19-
- run: npm test
36+
node-version-file: '.nvmrc'
37+
cache: 'npm'
38+
cache-dependency-path: packages/javascript/package-lock.json
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Run tests
44+
run: npm test

‎.gitignore‎

Lines changed: 31 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,34 @@
1-
# Based on https://github.com/github/gitignore/blob/master/Node.gitignore
2-
3-
# Logs
4-
logs
5-
*.log
6-
npm-debug.log*
7-
yarn-debug.log*
8-
yarn-error.log*
9-
lerna-debug.log*
10-
11-
# Diagnostic reports (https://nodejs.org/api/report.html)
12-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13-
14-
# Runtime data
15-
pids
16-
*.pid
17-
*.seed
18-
*.pid.lock
19-
20-
# Directory for instrumented libs generated by jscoverage/JSCover
21-
lib-cov
22-
23-
# Coverage directory used by tools like istanbul
24-
coverage
25-
*.lcov
26-
27-
# Compiled binary addons (https://nodejs.org/api/addons.html)
28-
build/Release
29-
30-
# Dependency directories
31-
node_modules/
32-
jspm_packages/
33-
34-
# Optional npm cache directory
35-
.npm
36-
37-
# Optional eslint cache
38-
.eslintcache
39-
40-
# Optional REPL history
41-
.node_repl_history
42-
43-
# Output of 'npm pack'
44-
*.tgz
45-
46-
# dotenv environment variables file
47-
.env
48-
.env.*
49-
.env-*
50-
.env_*
51-
52-
# Gatsby files
53-
.cache/
54-
# Comment in the public line in if your project uses Gatsby and not Next.js
55-
# https://nextjs.org/blog/next-9-1#public-directory-support
56-
# public
57-
58-
# Serverless directories
59-
.serverless/
60-
61-
# Stores VSCode versions used for testing VSCode extensions
62-
.vscode-test
1+
# General
2+
.DS_Store
3+
__MACOSX/
4+
.AppleDouble
5+
.LSOverride
6+
Icon[
7+
]
8+
9+
# Thumbnails
10+
._*
11+
12+
# Files that might appear in the root of a volume
13+
.DocumentRevisions-V100
14+
.fseventsd
15+
.Spotlight-V100
16+
.TemporaryItems
17+
.Trashes
18+
.VolumeIcon.icns
19+
.com.apple.timemachine.donotpresent
20+
21+
# Directories potentially created on remote AFP share
22+
.AppleDB
23+
.AppleDesktop
24+
Network Trash Folder
25+
Temporary Items
26+
.apdisk
27+
28+
# Backup files
29+
*.bak
6330

64-
# Temporary and backup files
31+
# Temporary files
6532
tmp/
66-
*.bak
67-
*.orig
33+
tmp[-.]*
6834
*.tmp
69-
tmp.*
70-
tmp-*
71-
tmp_*
72-
73-
# Configuration
74-
local-*
75-
76-
# Temporary release files
77-
.local-*
78-
.releases
79-
local-releases
80-
81-
# Service account secrets
82-
*secret.yaml
83-
*secret.yml
84-
secret-*
85-
86-
# Private npm for publishing
87-
88-
## General
89-
.npmrc
90-
.npmrc-*
91-
92-
## Allow Docusaurus .npmrc
93-
!docs/.npmrc
94-
95-
## Verdaccio
96-
.local
97-
htpasswd
98-
99-
# Images
100-
*.psd
101-
102-
# Python
103-
__pycache__
104-
.ipynb_checkpoints
105-
.venv
106-
107-
# Generated output, e.g., documentation
108-
output
109-
110-
# Databases, e.g., sqlite
111-
*.db
112-
113-
# System files
114-
.DS_Store
115-
116-
# Local Netlify folder
117-
.netlify
118-
netlify.toml

‎.nvmrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/fermium
1+
lts/jod

‎.trufflehogignore‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Exclude Git internal files
2+
.git/
3+
4+
# Exclude common directories
5+
node_modules/
6+
7+
# Exclude lock files (use full paths or patterns)
8+
package-lock.json
9+
poetry.lock
10+
yarn.lock
11+
pnpm-lock.yaml

‎LICENSE‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2021 Cisco Systems, Inc. or its Affiliates
1+
Copyright 2025 Cisco Systems, Inc. or its Affiliates
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

‎Makefile‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Makefile
2+
# description: Build, lint, and run tasks for the essentials project
3+
# author: Matt Norris <matnorri@cisco.com>
4+
5+
.PHONY: help lint-javascript lint-js install-javascript install-js test-javascript test-js
6+
7+
# Default target - show help
8+
help:
9+
@echo "Available targets:"
10+
@echo " lint-javascript (lint-js) - Lint JavaScript packages"
11+
@echo " test-javascript (test-js) - Test JavaScript packages"
12+
@echo " install-javascript (install-js) - Install JavaScript dependencies"
13+
@echo " help - Show this help message"
14+
15+
# Lint JavaScript packages
16+
lint-javascript: lint-js
17+
lint-js:
18+
@echo "Linting JavaScript packages..."
19+
@cd packages/javascript && npm run lint
20+
21+
# Test JavaScript packages
22+
test-javascript: test-js
23+
test-js:
24+
@echo "Testing JavaScript packages..."
25+
@cd packages/javascript && npm test
26+
27+
# Install JavaScript dependencies
28+
install-javascript: install-js
29+
install-js:
30+
@echo "Installing JavaScript dependencies..."
31+
@cd packages/javascript && npm install

‎Taskfile‎

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)