Skip to content

Commit

Permalink
Update prettier dev-dependency to v2.5.1 in Remote Rendering, Schema …
Browse files Browse the repository at this point in the history
…Registry and Web-PubSub (#19563)

* Update Remote Rendering

* Update Schema Registry

* Update WebPubSub

* Rush update
  • Loading branch information
JonathanCrd authored Jan 4, 2022
1 parent 3ab2c17 commit bae8aba
Show file tree
Hide file tree
Showing 59 changed files with 369 additions and 370 deletions.
20 changes: 10 additions & 10 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions sdk/remoterendering/mixed-reality-remote-rendering/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const {
jsonRecordingFilterFunction,
isPlaybackMode,
isSoftRecordMode,
isRecordMode
isRecordMode,
} = require("@azure-tools/test-recorder");

module.exports = function(config) {
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: "./",
Expand All @@ -31,13 +31,13 @@ module.exports = function(config) {
"karma-coverage",
"karma-junit-reporter",
"karma-json-to-file-reporter",
"karma-json-preprocessor"
"karma-json-preprocessor",
],

// list of files / patterns to load in the browser
files: [
"dist-test/index.browser.js",
{ pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true }
{ pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true },
].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []),

// list of files / patterns to exclude
Expand All @@ -50,7 +50,7 @@ module.exports = function(config) {
"recordings/browsers/**/*.json": ["json"],
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
// Preprocess source file to calculate code coverage, however this will make source file unreadable
"test-browser/index.js": ["coverage"]
"test-browser/index.js": ["coverage"],
},

envPreprocessor: [
Expand All @@ -64,7 +64,7 @@ module.exports = function(config) {
"REMOTERENDERING_ARR_SERVICE_ENDPOINT",
"AZURE_CLIENT_ID",
"AZURE_CLIENT_SECRET",
"AZURE_TENANT_ID"
"AZURE_TENANT_ID",
],

// test results reporter to use
Expand All @@ -75,7 +75,7 @@ module.exports = function(config) {
coverageReporter: {
// specify a common output directory
dir: "coverage-browser/",
reporters: [{ type: "json", subdir: ".", file: "coverage.json" }]
reporters: [{ type: "json", subdir: ".", file: "coverage.json" }],
},

junitReporter: {
Expand All @@ -85,12 +85,12 @@ module.exports = function(config) {
useBrowserName: false, // add browser name to report and classes names
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
properties: {} // key value pair of properties to add to the <properties> section of the report
properties: {}, // key value pair of properties to add to the <properties> section of the report
},

jsonToFileReporter: {
filter: jsonRecordingFilterFunction,
outputPath: "."
outputPath: ".",
},

// web server port
Expand All @@ -112,8 +112,8 @@ module.exports = function(config) {
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: "ChromeHeadless",
flags: ["--no-sandbox", "--disable-web-security"]
}
flags: ["--no-sandbox", "--disable-web-security"],
},
},

// Continuous Integration mode
Expand All @@ -128,15 +128,15 @@ module.exports = function(config) {
browserDisconnectTimeout: 10000,
browserDisconnectTolerance: 3,
browserConsoleLogOptions: {
terminal: !isRecordMode()
terminal: !isRecordMode(),
},

client: {
mocha: {
// change Karma's debug.html to the mocha web reporter
reporter: "html",
timeout: "600000"
}
}
timeout: "600000",
},
},
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"mocha": "^7.1.1",
"mocha-junit-reporter": "^2.0.0",
"nyc": "^15.0.0",
"prettier": "^1.16.4",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
"rollup": "^1.16.3",
"typescript": "~4.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function main() {
const sessionId: string = uuid();
await client.beginSession(sessionId, {
maxLeaseTimeInMinutes: 5,
size: "Standard"
size: "Standard",
});
await delay(10000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import {
AssetConversionOutputSettings,
AssetConversionSettings,
AssetConversionPollerLike,
AssetConversion
AssetConversion,
} from "@azure/mixed-reality-remote-rendering";
import {
DeviceCodeCredential,
DeviceCodeInfo,
ClientSecretCredential,
DefaultAzureCredential
DefaultAzureCredential,
} from "@azure/identity";
import { AzureKeyCredential } from "@azure/core-auth";

Expand Down Expand Up @@ -58,11 +58,11 @@ export function getClientWithAccountKey() {

export function getClientWithAAD() {
const credential = new ClientSecretCredential(tenantId, clientId, clientSecret, {
authorityHost: "https://login.microsoftonline.com/" + tenantId
authorityHost: "https://login.microsoftonline.com/" + tenantId,
});

return new RemoteRenderingClient(serviceEndpoint, accountId, accountDomain, credential, {
authenticationEndpointUrl: "https://sts.mixedreality.azure.com"
authenticationEndpointUrl: "https://sts.mixedreality.azure.com",
});
}

Expand All @@ -76,19 +76,19 @@ export function getClientWithDeviceCode() {
tenantId: tenantId,
clientId: clientId,
userPromptCallback: userPromptCallback,
authorityHost: "https://login.microsoftonline.com/" + tenantId
authorityHost: "https://login.microsoftonline.com/" + tenantId,
});

return new RemoteRenderingClient(serviceEndpoint, accountId, accountDomain, credential, {
authenticationEndpointUrl: "https://sts.mixedreality.azure.com/mixedreality.signin"
authenticationEndpointUrl: "https://sts.mixedreality.azure.com/mixedreality.signin",
});
}

export function getClientWithDefaultAzureCredential() {
const credential = new DefaultAzureCredential();

return new RemoteRenderingClient(serviceEndpoint, accountId, accountDomain, credential, {
authenticationEndpointUrl: "https://sts.mixedreality.azure.com"
authenticationEndpointUrl: "https://sts.mixedreality.azure.com",
});
}

Expand All @@ -107,11 +107,11 @@ export async function main() {
const inputSettings: AssetConversionInputSettings = {
storageContainerUrl: inputStorageUrl,
blobPrefix: "Bicycle",
relativeInputAssetPath: "bicycle.gltf"
relativeInputAssetPath: "bicycle.gltf",
};
const outputSettings: AssetConversionOutputSettings = {
storageContainerUrl: outputStorageUrl,
blobPrefix: "ConvertedBicycle"
blobPrefix: "ConvertedBicycle",
};
const conversionSettings: AssetConversionSettings = { inputSettings, outputSettings };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
RemoteRenderingClient,
RenderingSessionSettings,
RenderingSessionPollerLike,
RenderingSession
RenderingSession,
} from "@azure/mixed-reality-remote-rendering";
import { AzureKeyCredential } from "@azure/core-auth";

Expand Down Expand Up @@ -41,7 +41,7 @@ export async function main() {

const sessionSettings: RenderingSessionSettings = {
maxLeaseTimeInMinutes: 4,
size: "Standard"
size: "Standard",
};

// A randomly generated UUID is a good choice for a conversionId.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
AssetConversionOutputSettings,
AssetConversionSettings,
AssetConversionPollerLike,
AssetConversion
AssetConversion,
} from "@azure/mixed-reality-remote-rendering";
import { AzureKeyCredential } from "@azure/core-auth";

Expand Down Expand Up @@ -49,10 +49,10 @@ export async function main() {

const inputSettings: AssetConversionInputSettings = {
storageContainerUrl,
relativeInputAssetPath: "box.fbx"
relativeInputAssetPath: "box.fbx",
};
const outputSettings: AssetConversionOutputSettings = {
storageContainerUrl
storageContainerUrl,
};
const conversionSettings: AssetConversionSettings = { inputSettings, outputSettings };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class MixedRealityAccountKeyCredential implements TokenCredential {
getToken(_scopes: string | string[], _options?: GetTokenOptions): Promise<AccessToken | null> {
const result: AccessToken = {
expiresOnTimestamp: maxTimestampMs,
token: `${this.accountId}:${this.accountKey.key}`
token: `${this.accountId}:${this.accountKey.key}`,
};

return Promise.resolve(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-auth"

import {
MixedRealityStsClient,
MixedRealityStsClientOptions
MixedRealityStsClientOptions,
} from "@azure/mixed-reality-authentication";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
Conversion,
AssetConversionSettings,
AssetConversionOutput,
KnownAssetConversionStatus
KnownAssetConversionStatus,
} from "../generated/models/index";
import {
RemoteRenderingServiceError,
createRemoteRenderingServiceError
createRemoteRenderingServiceError,
} from "../remoteRenderingServiceError";

/** Properties available for an AssetConversion in any state. */
Expand Down Expand Up @@ -74,35 +74,35 @@ export function assetConversionFromConversion(conversion: Conversion): AssetConv
const baseProperties: AssetConversionBase = {
conversionId: conversion.conversionId,
settings: conversion.settings,
createdOn: conversion.createdOn
createdOn: conversion.createdOn,
};
switch (conversion.status) {
case KnownAssetConversionStatus.NotStarted:
return {
status: "NotStarted",
...baseProperties
...baseProperties,
};
case KnownAssetConversionStatus.Running:
return {
status: "Running",
...baseProperties
...baseProperties,
};
case KnownAssetConversionStatus.Succeeded:
return {
status: "Succeeded",
...baseProperties,
output: conversion.output!
output: conversion.output!,
};
case KnownAssetConversionStatus.Cancelled:
return {
status: "Cancelled",
...baseProperties
...baseProperties,
};
case KnownAssetConversionStatus.Failed:
return {
status: "Failed",
...baseProperties,
error: createRemoteRenderingServiceError(conversion.error!)
error: createRemoteRenderingServiceError(conversion.error!),
};
default:
throw new Error("Unrecognized AssetConversionStatus returned by the service");
Expand Down
Loading

0 comments on commit bae8aba

Please sign in to comment.