* Mobile fix for MM-65084 * Changing test/setup.ts to use a deterministic fill This avoids the ci issue about parenthesis and is more clear that this is just a fixed sequence for testing, similar to randomUUID above. * Add setBearerToken and setCSRFToken to Client definition * Use setClientCredentials and memoize createPkceBundle * Restoring the preauthSecret back to the Client constructors This came out of a response to MM-65085: Support Pre Shared Password on server connect where preauthSecret was added in the buildConfig. Claude (correctly imo) identified this as now redundant and so removed it but it is valid to keep it as well. In any case, putting it back to be consistent with ClientTracking and ClientBase. * Rename PKCE to SAML based terminology, similar to server * Fix lint issue with too many blank lines at eof * Removing plain on mobile side --------- Co-authored-by: Mattermost Build <build@mattermost.com>
34 lines
903 B
Bash
Executable file
34 lines
903 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.js$|\.ts$|\.tsx$')
|
|
exit_code=0
|
|
|
|
if [ -z "$jsfiles" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
if [ -n "$jsfiles" ]; then
|
|
echo "Checking lint for:"
|
|
for js in $jsfiles; do
|
|
echo "$js"
|
|
e=$(node_modules/.bin/eslint --quiet --fix --config eslint.precommit.config.mjs $js)
|
|
if [ -n "$e" ]; then
|
|
echo "ERROR: Check eslint hints."
|
|
echo "$e"
|
|
exit_code=1
|
|
fi
|
|
done
|
|
|
|
echo "Checking for TSC (fast incremental check)"
|
|
# Use incremental TypeScript checking - much faster on subsequent runs
|
|
tsc=$(node_modules/.bin/tsc --noEmit --incremental --tsBuildInfoFile .tsbuildinfo.precommit 2>&1)
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: TypeScript issues found."
|
|
echo "$tsc"
|
|
exit_code=1
|
|
fi
|
|
fi
|
|
|
|
# scripts/precommit/i18n.sh
|
|
|
|
exit $exit_code
|