Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { renderSync } from 'sass';
import {
writeFileSync,
mkdirSync,
existsSync,
rmdirSync,
readdirSync,
} from 'fs';
import { writeFileSync, mkdirSync, existsSync, rmSync, readdirSync } from 'fs';
import path from 'path';

const getDirectories = (source: string) =>
Expand All @@ -23,22 +17,21 @@ const templates = getDirectories(path.join(__dirname, 'templates'));
const layouts = getDirectories(path.join(__dirname, 'layouts'));

async function compileSass(dir: string, subdir: string) {
let styleResult: Record<any, any> = {};
try {
styleResult = renderSync({
const styleResult = renderSync({
file: dir,
outFile: subdir,
});
writeFileSync(subdir, styleResult.css, 'utf8');
} catch (e) {
console.log(e);
console.error(e);
}
writeFileSync(subdir, styleResult.css, 'utf8');
}

async function main(directories: Record<any, any>) {
// remove css directory if already present
if (existsSync(path.join(__dirname, 'css'))) {
rmdirSync(path.join(__dirname, 'css'), { recursive: true });
rmSync(path.join(__dirname, 'css'), { recursive: true, force: true });
}
mkdirSync(path.join(__dirname, 'css'));

Expand Down
12 changes: 9 additions & 3 deletions packages/fxa-auth-server/test/oauth/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,10 @@ describe('#integration - /v1', function () {

assert.equal(res.statusCode, 200);
assertSecurityHeaders(res);
assert.equal(res.result.scope, 'email https://identity.mozilla.com/apps/notes');
assert.equal(
res.result.scope,
'email https://identity.mozilla.com/apps/notes'
);
});
});
});
Expand Down Expand Up @@ -2296,7 +2299,10 @@ describe('#integration - /v1', function () {
assert.equal(res.statusCode, 200);
assert.ok(res.result.access_token);
// Should contain all requested scopes (including invalid ones)
assert.equal(res.result.scope, 'profile email invalid:scope another:invalid');
assert.equal(
res.result.scope,
'profile email invalid:scope another:invalid'
);
});
});
});
Expand Down Expand Up @@ -3337,7 +3343,7 @@ describe('#integration - /v1', function () {
assert.equal(clients2[0].client_id, client2Id.toString('hex'));
});

it('should seperately list different refresh tokens from the same client', async () => {
it('should separately list different refresh tokens from the same client', async () => {
await makeAccessToken(client1, user1, ['profile']);
await makeAccessToken(client1, user1, ['other', 'scope']);
await makeRefreshToken(client2, user1, ['profile']);
Expand Down