-
Notifications
You must be signed in to change notification settings - Fork 265
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
doc: add sri to cdn script tag in readme #1498
doc: add sri to cdn script tag in readme #1498
Conversation
d024275
to
bad9383
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, up to you w.r.t. CLI API
scripts/generate-sri.js
Outdated
const argv = yargs(hideBin(process.argv)).argv; | ||
const version = argv['authjs-version']; | ||
if (!version) { | ||
throw new Error('--authjs-version is required'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: similar comment on mono PR re; CLI args vs flags = required vs optional
scripts/generate-sri.js
Outdated
const fs = require('fs'); | ||
const path = require('path'); | ||
const { spawn } = require('child_process'); | ||
const { https } = require('follow-redirects'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be accomplished without requiring an additional dependency?
scripts/generate-sri.js
Outdated
} | ||
|
||
const artifactPath = path.join(ARTIFACTS, artifact); | ||
await unpackArchive(artifactPath, UNPACK_DIR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fetching of the tar and unpacking could be more easily with
npm i --prefix <dir> @okta/[email protected]
scripts/generate-sri.js
Outdated
} | ||
|
||
async function main() { | ||
const argv = yargs(hideBin(process.argv)).argv; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think parsing argv
for a single flag justifies introducing a new dependency
Compared files from CDN and registry against v7.4.1, both are generated same sri script used
console output:
|
scripts/setup-e2e.sh
Outdated
@@ -11,6 +11,7 @@ if [ -n "${TEST_SUITE_ID}" ]; then | |||
|
|||
# this chrome install is not used, however it will install linux deps chrome needs (via apt-get) | |||
setup_service google-chrome-stable 118.0.5993.70-1 | |||
export PUPPETEER_DOWNLOAD_BASE_URL="https://storage.googleapis.com/chrome-for-testing-public" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending @jaredperreault-okta's comment re; PUPPETEER_DOWNLOAD_BASE_URL
No description provided.