FE-6254 Setting schema on 'fauna local --database Foo' #712
Annotations
12 errors and 11 warnings
/home/runner/work/fauna-shell/fauna-shell/test/config.mjs.configuration file location --local arg sets the argv.url to http://localhost:8443 if no --url is given:
test/config.mjs#L182
expected stdout to have been called with arguments { test: [Function],
message: 'match(secret: no-config, url: http://localhost:8443)' }
{ _: [ 'argv' ],
secret: 'no-config',
local: true,
color: true,
config: '.',
json: false,
quiet: false,
'verbose-component': [],
verboseComponent: [],
verbosity: 0,
'$0': 'fauna',
url: 'http://0.0.0.0:8443' } match(secret: no-config, url: http://localhost:8443)
|
/home/runner/work/fauna-shell/fauna-shell/test/config.mjs.configuration file location --local sets the argv.secret to 'secret' if no --secret is given:
test/config.mjs#L204
expected stdout to have been called with arguments { test: [Function],
message: 'match(secret: secret, url: http://localhost:8443)' }
{ _: [ 'argv' ],
local: true,
color: true,
config: '.',
json: false,
quiet: false,
'verbose-component': [],
verboseComponent: [],
verbosity: 0,
'$0': 'fauna',
url: 'http://0.0.0.0:8443',
secret: 'secret' } match(secret: secret, url: http://localhost:8443)
|
/home/runner/work/fauna-shell/fauna-shell/test/config.mjs.configuration file location --secret arg takes precedence over --local arg for the argv.secret:
test/config.mjs#L215
expected stdout to have been called with arguments { test: [Function],
message: 'match(secret: sauce, url: http://localhost:8443)' }
{ _: [ 'argv' ],
local: true,
secret: 'sauce',
color: true,
config: '.',
json: false,
quiet: false,
'verbose-component': [],
verboseComponent: [],
verbosity: 0,
'$0': 'fauna',
url: 'http://0.0.0.0:8443' } match(secret: sauce, url: http://localhost:8443)
|
/home/runner/work/fauna-shell/fauna-shell/test/database/list.mjs.database list when --local is provided calls fauna with the correct args: --local:
test/database/list.mjs#L57
expected stub to have been called exactly once with arguments { url: 'http://localhost:8443',
secret: 'secret',
expression: 'Database.all().paginate(1000).data { name }' }
{ url: 'http://0.0.0.0:8443',
{ url: 'http://localhost:8443',
secret: 'secret',
expression: 'Database.all().paginate(1000).data { name }' }
|
/home/runner/work/fauna-shell/fauna-shell/test/database/list.mjs.database list when --local is provided calls fauna with the correct args: --local --secret taco:
test/database/list.mjs#L57
expected stub to have been called exactly once with arguments { url: 'http://localhost:8443',
secret: 'taco',
expression: 'Database.all().paginate(1000).data { name }' }
{ url: 'http://0.0.0.0:8443',
{ url: 'http://localhost:8443',
secret: 'taco',
expression: 'Database.all().paginate(1000).data { name }' }
|
/home/runner/work/fauna-shell/fauna-shell/test/database/list.mjs.database list when --local is provided calls fauna with the correct args: --local --pageSize 10:
test/database/list.mjs#L57
expected stub to have been called exactly once with arguments { url: 'http://localhost:8443',
secret: 'secret',
expression: 'Database.all().paginate(10).data { name }' }
{ url: 'http://0.0.0.0:8443',
{ url: 'http://localhost:8443',
secret: 'secret',
expression: 'Database.all().paginate(10).data { name }' }
|
/home/runner/work/fauna-shell/fauna-shell/test/lib/middleware.mjs.middlewares applyLocalArg should set url to localhost:8443 when --local is true and no url provided:
test/lib/middleware.mjs#L20
expected 'http://0.0.0.0:8443' to equal 'http://localhost:8443'
|
/home/runner/work/fauna-shell/fauna-shell/test/lib/middleware.mjs.middlewares applyLocalArg should not modify secret if already provided:
test/lib/middleware.mjs#L41
expected 'http://0.0.0.0:8443' to equal 'http://localhost:8443'
|
/home/runner/work/fauna-shell/fauna-shell/test/query.mjs.query --local usage calls query with a default secret of 'secret':
test/query.mjs#L197
expected stub to have been called with arguments '"Database.all()"', { test: [Function],
message: 'match(apiVersion: 10, secret: secret, url: http://localhost:8443)' }
'"\\"Database.all()\\""'
{ apiVersion: '10',
secret: 'secret',
url: 'http://0.0.0.0:8443',
timeout: 5000,
typecheck: undefined,
performanceHints: false,
format: 'fql',
color: false } match(apiVersion: 10, secret: secret, url: http://localhost:8443)
|
/home/runner/work/fauna-shell/fauna-shell/test/query.mjs.query --local usage calls query with a scoped secret when a database argument is provided:
test/query.mjs#L214
expected stub to have been called with arguments '"Database.all()"', { test: [Function],
message: 'match(apiVersion: 10, secret: secret:Taco:admin, url: http://localhost:8443)' }
'"\\"Database.all()\\""'
{ apiVersion: '10',
secret: 'secret:Taco:admin',
url: 'http://0.0.0.0:8443',
timeout: 5000,
typecheck: undefined,
performanceHints: false,
format: 'fql',
color: false } match(apiVersion: 10, secret: secret:Taco:admin, url: http://localhost:8443)
|
/home/runner/work/fauna-shell/fauna-shell/test/query.mjs.query --local usage calls query with a scoped secret when a role argument is provided:
test/query.mjs#L231
expected stub to have been called with arguments '"Database.all()"', { test: [Function],
message: 'match(apiVersion: 10, secret: secret:MyRole, url: http://localhost:8443)' }
'"\\"Database.all()\\""'
{ apiVersion: '10',
secret: 'secret:MyRole',
url: 'http://0.0.0.0:8443',
timeout: 5000,
typecheck: undefined,
performanceHints: false,
format: 'fql',
color: false } match(apiVersion: 10, secret: secret:MyRole, url: http://localhost:8443)
|
/home/runner/work/fauna-shell/fauna-shell/test/query.mjs.query --local usage calls query with a scoped secret when a role and database argument ares provided:
test/query.mjs#L251
expected stub to have been called with arguments '"Database.all()"', { test: [Function],
message: 'match(apiVersion: 10, secret: secret:Db:MyRole, url: http://localhost:8443)' }
'"\\"Database.all()\\""'
{ apiVersion: '10',
secret: 'secret:Db:MyRole',
url: 'http://0.0.0.0:8443',
timeout: 5000,
typecheck: undefined,
performanceHints: false,
format: 'fql',
color: false } match(apiVersion: 10, secret: secret:Db:MyRole, url: http://localhost:8443)
|
lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
lint:
src/cli.mjs#L144
Unexpected 'todo' comment: 'TODO: this doesn't handle aliasing, and...'
|
lint:
src/commands/local.mjs#L203
Arrow function has a complexity of 11. Maximum allowed is 10
|
lint:
src/commands/shell.mjs#L42
Unexpected 'todo' comment: 'TODO: integrate with fql-analyzer for...'
|
lint:
src/lib/auth/accountKeys.mjs#L84
Unexpected 'todo' comment: 'TODO: track ttl for account and refresh...'
|
lint:
src/lib/auth/credentials.mjs#L67
Unexpected 'todo' comment: 'TODO: set expiration'
|
lint:
src/lib/auth/oauth-client.mjs#L56
Method '_handleRequest' has a complexity of 13. Maximum allowed is 10
|
lint:
src/lib/fauna-account-client.mjs#L135
Unexpected 'todo' comment: 'TODO: get/set expiration details'
|
lint:
src/lib/fauna-account-client.mjs#L152
Unexpected 'todo' comment: 'TODO: get/set expiration details'
|
lint:
src/lib/fauna-client.mjs#L189
Arrow function has a complexity of 11. Maximum allowed is 10
|
lint:
src/lib/middleware.mjs#L46
Unexpected 'todo' comment: 'TODO: figure out upgrade path for SEA...'
|