Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 colorLogs #523

Closed
wants to merge 159 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
24b0313
wip
echo-bravo-yahoo Sep 26, 2024
955faa3
wip
echo-bravo-yahoo Sep 27, 2024
4116599
move files
echo-bravo-yahoo Sep 27, 2024
5d2fba8
fix project so older, tsc version can coexist with newer, not-built v…
echo-bravo-yahoo Sep 30, 2024
1a223d7
login poc (#370)
mwilde345 Oct 1, 2024
9b43e48
add schema push (#371)
echo-bravo-yahoo Oct 2, 2024
d0c8039
login test (#372)
mwilde345 Oct 3, 2024
66f8123
improve schema commands, testing (#373)
echo-bravo-yahoo Oct 3, 2024
7f43633
add first draft of remaining schema commands
echo-bravo-yahoo Oct 3, 2024
7eb9618
add first draft of remaining schema tests
echo-bravo-yahoo Oct 3, 2024
b2c9a01
update dependencies
echo-bravo-yahoo Oct 3, 2024
b3648c6
fix logger breaking at runtime
echo-bravo-yahoo Oct 3, 2024
a01f6b3
add tests for schema diff and schema status
echo-bravo-yahoo Oct 3, 2024
244eb5a
update eslint, move eslint config files, make changes
echo-bravo-yahoo Oct 4, 2024
2939639
run eslint and prettier
echo-bravo-yahoo Oct 4, 2024
2cff039
Updated config.yml
echo-bravo-yahoo Oct 4, 2024
192df25
Updated config.yml
echo-bravo-yahoo Oct 4, 2024
ca6d6e7
fix entrypoint
echo-bravo-yahoo Oct 4, 2024
e64fb67
update dependencies
echo-bravo-yahoo Oct 4, 2024
2bbd130
more entrypoint fixes
echo-bravo-yahoo Oct 4, 2024
ba2ef44
cleanup
echo-bravo-yahoo Oct 4, 2024
eb185a1
refactor error handler, argv, no more double invocations
echo-bravo-yahoo Oct 4, 2024
36bcb33
Junit test reports (#376)
echo-bravo-yahoo Oct 7, 2024
8ae0a0b
infer types via JSDoc through IoC container (#377)
echo-bravo-yahoo Oct 7, 2024
1ac236e
test fixes
echo-bravo-yahoo Oct 7, 2024
f9a2bcd
add tscheck annotations, add JSDoc types to makeFaunaRequest (#379)
echo-bravo-yahoo Oct 8, 2024
70088ed
Persist Account keys on login (#375)
mwilde345 Oct 8, 2024
8336240
Stash resolutions (#384)
echo-bravo-yahoo Oct 10, 2024
f99229d
misc improvements (#385)
echo-bravo-yahoo Oct 11, 2024
baea78d
Removing things (#386)
echo-bravo-yahoo Oct 11, 2024
e20c08d
makeAccountRequest wrapper. Basic create key
mwilde345 Oct 11, 2024
ffb9854
Test additions (#390)
echo-bravo-yahoo Oct 11, 2024
6d44c0b
move shared options after command-specific options
echo-bravo-yahoo Oct 11, 2024
d4ce8d3
persist secrets (#393)
mwilde345 Oct 21, 2024
c819808
check for updates weekly on run (#402)
echo-bravo-yahoo Oct 22, 2024
cccc904
swap to npm (#401)
echo-bravo-yahoo Oct 22, 2024
63ffffe
Add Github action for testing (#404)
echo-bravo-yahoo Oct 22, 2024
ccad6a7
use @fauna/typescript for prettier, eslint configs (#405)
echo-bravo-yahoo Oct 22, 2024
587ebee
move prettier from json config to js config
echo-bravo-yahoo Oct 23, 2024
989e2ec
build: use prettier as authoritative style formatter (#406)
echo-bravo-yahoo Oct 24, 2024
7054ce5
eslint proposal (#407)
echo-bravo-yahoo Oct 24, 2024
653ff5f
first draft of SEA build (mac only)
echo-bravo-yahoo Oct 25, 2024
492a383
fix linting and make runnable in more envs
echo-bravo-yahoo Oct 25, 2024
7677510
update @fauna/typescript
echo-bravo-yahoo Oct 25, 2024
c41f6c3
fix: update CI tests
echo-bravo-yahoo Oct 25, 2024
cc6a473
build SEA binaries with github action
echo-bravo-yahoo Oct 25, 2024
0527a92
run prettier on every file
echo-bravo-yahoo Oct 25, 2024
d8e148c
move to --no-input instead of --force
echo-bravo-yahoo Oct 21, 2024
3199c26
catch schema commands up to main branch
echo-bravo-yahoo Oct 21, 2024
665db93
address PR feedback
echo-bravo-yahoo Oct 29, 2024
b5f4e99
clean up schema commands and tests, fix complexity lint warns
echo-bravo-yahoo Oct 29, 2024
3b45962
prevent SEA installations from attempting an update check
echo-bravo-yahoo Oct 29, 2024
df3ae7e
login redirect (#415)
mwilde345 Nov 19, 2024
f8f6916
update nvmrc version
echo-bravo-yahoo Nov 19, 2024
54d93f1
add ts-check annotations to more files, clean up tests
echo-bravo-yahoo Nov 19, 2024
de23074
add shell command
echo-bravo-yahoo Nov 13, 2024
ac50ebb
fix tests
echo-bravo-yahoo Nov 19, 2024
cbd2569
improve fn name
echo-bravo-yahoo Nov 19, 2024
7954da1
add v4 test and extend tests for 2+ shell commands
echo-bravo-yahoo Nov 20, 2024
7c87a02
tweak tests
echo-bravo-yahoo Nov 20, 2024
c0b0138
add typecheck test
echo-bravo-yahoo Nov 20, 2024
ff73fec
add another test
echo-bravo-yahoo Nov 20, 2024
53a92e7
fix linting
echo-bravo-yahoo Nov 20, 2024
24dab06
add github linting workflow step (#418)
echo-bravo-yahoo Nov 20, 2024
d337bf1
fix the build in github
echo-bravo-yahoo Nov 20, 2024
672c6d5
persist secrets (#417)
mwilde345 Nov 20, 2024
51b6eaa
update dependencies (#421)
echo-bravo-yahoo Nov 21, 2024
b31f354
fix cloud login failing on DI
echo-bravo-yahoo Nov 21, 2024
ddaaaa2
add timeouts to github action jobs
echo-bravo-yahoo Nov 21, 2024
a3c58b5
move to mocha-multi-reporter
echo-bravo-yahoo Nov 21, 2024
f59d94f
fix CLI packaging
echo-bravo-yahoo Nov 21, 2024
dd80caf
add stubs for additional tests
echo-bravo-yahoo Nov 21, 2024
04c5d4e
update package-lock
echo-bravo-yahoo Nov 21, 2024
95f1f7f
prevent nodeJS warnings in production
echo-bravo-yahoo Nov 21, 2024
3d2b287
address PR feedback
echo-bravo-yahoo Nov 21, 2024
d78560f
[FE-6125] Stub out create database (#424)
henryfauna Nov 22, 2024
0a937a1
Install fauna (#426)
cleve-fauna Nov 22, 2024
2c268e7
Remove unused jira workflows (#427)
ecooper Nov 22, 2024
7204707
If no command is given show help text; and instructions on sub-help. …
cleve-fauna Nov 22, 2024
844b39a
Add some more Github standardization (#428)
ecooper Nov 22, 2024
805385b
add test for incorrect flags
echo-bravo-yahoo Nov 22, 2024
82d4fa9
Update test/general-cli.mjs
cleve-fauna Nov 22, 2024
40d10bd
improve type inference on things pulled from awilix (#433)
echo-bravo-yahoo Nov 23, 2024
10dabb3
Create Database Command (#435)
henryfauna Nov 25, 2024
347bd5d
Clarify quick start text (#430)
cleve-fauna Nov 25, 2024
25615ca
Use `homedir` provided by the container (#436)
ptpaterson Nov 26, 2024
5bb7f4a
[FE-6127] Delete Database (#437)
henryfauna Nov 26, 2024
e37507e
Config (#422)
echo-bravo-yahoo Nov 26, 2024
0285ab4
Fauna Query Options (#441)
henryfauna Nov 26, 2024
33271d3
fix config tests (#442)
echo-bravo-yahoo Nov 26, 2024
ecc0524
Improve credential handling (#432)
mwilde345 Nov 27, 2024
cbdc8cd
Rework eval and shell to fully implement eval (#443)
ecooper Dec 2, 2024
22c64c5
login and account keys should reference 'user' instead of 'profile' (…
mwilde345 Dec 2, 2024
1153265
Support running commands against container. (#447)
cleve-fauna Dec 3, 2024
33ea345
FE-5990 Set argv.secret to 'secret' when --local passed in and --secr…
cleve-fauna Dec 3, 2024
216715f
Move middleware to separate method for testability. Add debug logging…
cleve-fauna Dec 3, 2024
7fce0fa
Finish the `database list` command (#448)
henryfauna Dec 3, 2024
aca56f4
Confirm correct usage of Fauna instead of the Account API when --loca…
cleve-fauna Dec 3, 2024
daf9815
fix help text not displaying (#446)
echo-bravo-yahoo Dec 3, 2024
af18f6b
Add colorized output to database, query, and shell commands (#456)
ecooper Dec 4, 2024
ecd8d58
add methods to command signature for database, schema (#458)
echo-bravo-yahoo Dec 4, 2024
6c7acb6
FE-6024 Implement shell history (#453)
ptpaterson Dec 4, 2024
8bbdb35
Review help strings (#451)
jrodewig Dec 4, 2024
1e6a2ea
[FE-6155] - Support `--database` in database commands (#454)
henryfauna Dec 4, 2024
3059802
improve pre-argv parsing (#459)
echo-bravo-yahoo Dec 4, 2024
798c39c
enable --version flag (#457)
echo-bravo-yahoo Dec 4, 2024
4030666
Improve error handling (#462)
ecooper Dec 4, 2024
8d1fb06
group options (#463)
echo-bravo-yahoo Dec 4, 2024
f165610
[FE-6169] Support Shorthand Region Groups (#464)
henryfauna Dec 4, 2024
f91d109
Fix verbosity check (#470)
ecooper Dec 4, 2024
3b48bad
disable strict options parsing (#460)
echo-bravo-yahoo Dec 4, 2024
9abff40
Add dynamic key support to schema (#466)
ecooper Dec 4, 2024
f6bc79f
Remove some options from login command (#472)
ptpaterson Dec 4, 2024
40ab83f
remove test reliance on color (#471)
echo-bravo-yahoo Dec 5, 2024
e3dd92e
lint and prettify on PR push/change (#465)
echo-bravo-yahoo Dec 5, 2024
33f4369
Don't let config parse for help or version when getting profile (#474)
ecooper Dec 5, 2024
f1344de
document --no-<arg> for the remaining default true boolean options (#…
henryfauna Dec 5, 2024
dd4799a
default oauth to prod client (#476)
mwilde345 Dec 5, 2024
9585314
Bare strings break colorize (#473)
ecooper Dec 5, 2024
05dec44
Review examples and help strings (#477)
jrodewig Dec 5, 2024
4165d88
Consolidate Validation Helpers (#467)
henryfauna Dec 5, 2024
66411f2
Remove 'login options' group from login cmd (#480)
jrodewig Dec 5, 2024
d52a149
Credentials Middleware tests (#461)
mwilde345 Dec 5, 2024
8347082
add -h alias for help (#483)
echo-bravo-yahoo Dec 5, 2024
4fd660a
make command descriptions more consistent (#482)
echo-bravo-yahoo Dec 5, 2024
a7227a3
Create Key (#468)
cleve-fauna Dec 5, 2024
593d754
FE-6181 validate profile when no config is found (#481)
ptpaterson Dec 5, 2024
deff6bc
FE-6168 Allow users to scope secrets when running with --local (#488)
cleve-fauna Dec 6, 2024
f7bb80d
[FE-6183] Update Permissions on Credentials Files (#487)
henryfauna Dec 6, 2024
c61a437
Review `fauna key create` examples + help text (#486)
jrodewig Dec 6, 2024
88b3a22
Fast succeed login when --local arg is given (#489)
cleve-fauna Dec 9, 2024
38f5cab
Prettify Login Success Page (#485)
henryfauna Dec 9, 2024
de234ba
remove --dir option from schema commands that don't use it (#484)
echo-bravo-yahoo Dec 9, 2024
40242a4
don't compute role from key name string when calling frontdoor (#493)
mwilde345 Dec 9, 2024
fabed04
turn login tests back on (#492)
mwilde345 Dec 9, 2024
53bf7cc
Rename "extra" option to "raw" (#490)
ptpaterson Dec 10, 2024
5951ab7
[FE-6195] Disable JS Completions (#495)
henryfauna Dec 10, 2024
8047c4d
Clean up output formatting and support colorizing FQL results (#496)
ecooper Dec 10, 2024
4eed51c
Require a database or secret on schema commands (#498)
henryfauna Dec 10, 2024
42d02d6
handle accountKey arg with user and secret (#500)
mwilde345 Dec 10, 2024
b1f1cbd
Update use of schema API for the pull command (#499)
ptpaterson Dec 10, 2024
79681b6
Add performance hints (#501)
ecooper Dec 11, 2024
b3b82eb
Update usage of the schema API for push, status, and diff (#502)
ptpaterson Dec 11, 2024
69a1217
Handle No Local Schema Files (#505)
henryfauna Dec 11, 2024
5a5c028
Move error handling to its own module and don't colorize if it alread…
ecooper Dec 11, 2024
a520215
Do not display a scary message if summary is empty (#508)
ecooper Dec 11, 2024
e25ef6d
Catch all yargs validation errors in isYargsError (#504)
ecooper Dec 11, 2024
fb4fdd2
provide a more actionable error message on invalid database names (#510)
henryfauna Dec 11, 2024
82fd6d4
Notify on `schema push` if no schema files are found (#507)
henryfauna Dec 11, 2024
02b5166
Fail the shell fast if you cannot query the database (#509)
ecooper Dec 11, 2024
1801770
Command to start a local container (#491)
cleve-fauna Dec 12, 2024
45ddf9c
don't use a default profile (#514)
mwilde345 Dec 12, 2024
531a17d
Update README (#513)
jrodewig Dec 12, 2024
2071e2e
Redact secrets in logArgv (#511)
ecooper Dec 12, 2024
0c7a40d
Remove duplicate arg aliases from database list (#515)
ptpaterson Dec 12, 2024
8ac0681
Clarify `--raw` flag help (#516)
jrodewig Dec 12, 2024
c963ec9
Handle network errors with better messaging (#519)
ecooper Dec 13, 2024
2b9c521
Detect if port for local Fauna is already occupied. Allow users to co…
cleve-fauna Dec 13, 2024
af5f309
Color log lines in fauna local command.
cleve-fauna Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ executors:
core:
resource_class: large
docker:
- image: cimg/node:18.20
- image: cimg/node:22.9.0
environment:
TERM: xterm-256color

commands:
build_and_test:
Expand All @@ -15,11 +17,14 @@ commands:

- run:
name: Install dependencies
command: yarn install
command: npm ci

- run:
name: Run Tests
command: yarn test
command: npm test

- store_test_results:
path: test-results.xml

- store_artifacts:
path: coverage
Expand All @@ -37,3 +42,10 @@ workflows:
jobs:
- fauna-shell-tests:
context: faunadb-drivers
filters:
branches:
# only build the branch "main"
# and branches ending in "-old"
only:
- main
- /^.+-old$/
4 changes: 0 additions & 4 deletions .env.example

This file was deleted.

4 changes: 0 additions & 4 deletions .env.test

This file was deleted.

2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

57 changes: 0 additions & 57 deletions .eslintrc

This file was deleted.

2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Ticket(s): FE-###

## Problem

Explain the context and why you're making that change. What is the problem you're trying to solve? In some cases there is not a problem and this can be thought of being the motivation for your change.
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build binaries
on:
push:
branches: [build]

jobs:
build-binaries:
name: Build binaries
timeout-minutes: 5

strategy:
matrix:
runner: [macos-13, macos-latest, ubuntu-latest, windows-latest]
node: [22.x]
include:
- runner: macos-13
os: mac
arch: x64
- runner: macos-latest
os: mac
arch: arm
- runner: ubuntu-latest
os: linux
arch: x64
- runner: windows-latest
os: windows
arch: x64
# github-hosted (free) linux arm64 runner is planned by end of 2024
# it's currently available on team/enterprise github plans:
# https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/

runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- name: Build binary
run: npm run build
- uses: actions/upload-artifact@v4
with:
# Name of the artifact to upload.
name: fauna-shell-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.node }}

# A file, directory or wildcard pattern that describes what to upload
path: ${{ matrix.os == 'windows' && 'dist\fauna.exe' || 'dist/fauna' }}

# Fail the action with an error message if no files are found at the path.
if-no-files-found: error

# Duration after which artifact will expire in days. 0 means use the repository's default retention.
retention-days: 0

# The level of compression for Zlib to be applied to the artifact archive from 0 (none) to 9 (most).
compression-level: 6

# Deletes any artifact with a matching name before a new one is uploaded.
# Does not fail if the artifact does not exist.
overwrite: true

# Don't upload hidden files in the provided path.
include-hidden-files: false
36 changes: 0 additions & 36 deletions .github/workflows/close-jira-ticket.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/create-jira-ticket-from-issue.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/create-jira-ticket-from-pull-request.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Lint and prettify

on:
# temporarily "v3"; change to "main" after merge
push:
branches: ["v3"]
pull_request:
branches: ["v3"]

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v4
- name: Lint (nodeJS 22.x)
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "npm"
- run: npm ci
- run: npm run format:check
- run: npm run lint
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Test

on:
# temporarily "v3"; change to "main" after merge
push:
branches: ["v3"]
pull_request:
branches: ["v3"]

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 3

strategy:
matrix:
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Test (nodeJS ${{ matrix.node-version }})
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run test:ci
env:
TERM: xterm-256color
# Set to the correct color level; 2 is 256 colors
# https://github.com/chalk/chalk?tab=readme-ov-file#supportscolor
FORCE_COLOR: 2
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: "**/test-results.xml"
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,16 @@ experiments
*#
.log
coverage
test-results.xml
.history

# test directory for persisted files
/test/test-homedir

# default fauna config file names
fauna.config.yaml,
fauna.config.yml,
fauna.config.json,
.fauna.config.yaml,
.fauna.config.yml,
.fauna.config.json,
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run format && npm run lint
1 change: 1 addition & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.0x/**
12 changes: 0 additions & 12 deletions .mocharc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
22
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

Loading
Loading