Skip to content

Commit 1cc264d

Browse files
author
dilucesr
committed
Apply fixes to validation scripts to all apps
1 parent b4b864f commit 1cc264d

21 files changed

Lines changed: 82 additions & 251 deletions

File tree

AI/mcp-server/package-lock.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AI/ocr/package-lock.json

Lines changed: 10 additions & 105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AI/ocr/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"react": "^18.2.0",
2626
"react-dom": "^18.2.0",
2727
"react-scripts": "^5.0.1",
28+
"scheduler": "^0.20.2",
2829
"restify": "11.1.0",
2930
"web-vitals": "^2.1.4"
3031
},
@@ -64,6 +65,7 @@
6465
"@types/jsonwebtoken": "9.0.5",
6566
"@types/restify": "8.5.12",
6667
"env-cmd": "10.1.0",
67-
"npm-run-all": "4.1.5"
68+
"npm-run-all": "4.1.5",
69+
"typescript": "5.1.6"
6870
}
6971
}

AI/ocr/server/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"jsx":"preserve",
1414
"esModuleInterop": true,
15-
"moduleResolution": "node",
16-
"strict": true
15+
"strict": true,
16+
"skipLibCheck": true
1717
}
1818
}

AI/ocr/src/components/files.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,14 @@ export const Files = (props: IFilesProps) => {
137137
};
138138

139139
const onDeleteItemClick = async () => {
140+
const selectedRow = selectedRows.values().next().value;
141+
if (!selectedRow) {
142+
setDeleteDialogOpen(false);
143+
return;
144+
}
145+
140146
const graphClient = Providers.globalProvider.graph.client;
141-
const endpoint = `/drives/${props.container.id}/items/${selectedRows.entries().next().value[0]}`;
147+
const endpoint = `/drives/${props.container.id}/items/${selectedRow}`;
142148
await graphClient.api(endpoint).delete();
143149
await loadItems(folderId || 'root');
144150
setDeleteDialogOpen(false);

AI/ocr/src/react-app-env.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/// <reference types="react-scripts" />
2+
3+
declare module "*.css";

AI/ocr/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"jsx": "preserve",
1313
"esModuleInterop": true,
14-
"moduleResolution": "node",
14+
"moduleResolution": "bundler",
1515
"strict": true,
1616
"allowJs": true,
1717
"skipLibCheck": true,

AI/ocr/validate-sample.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ try {
4646

4747
if (-not $SkipInstall) {
4848
Write-Step 'Installing dependencies'
49-
Invoke-ExternalCommand -FilePath 'npm' -Arguments @('install') -WorkingDirectory $appRoot -Environment $nodeEnvironment
49+
Invoke-ExternalCommand -FilePath 'npm' -Arguments @('install', '--legacy-peer-deps') -WorkingDirectory $appRoot -Environment $nodeEnvironment
5050
}
5151

5252
Write-Step 'Building backend'

Custom Apps/boilerplate-react-azurefunction/validate-sample.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $functionsRoot = Join-Path $appRoot 'packages/azure-functions'
2020
$clientEnvPath = Join-Path $clientRoot '.env'
2121
$localSettingsPath = Join-Path $functionsRoot 'local.settings.json'
2222
$nodeEnvironment = Get-ValidationNodeEnvironment
23+
$clientBuildEnvironment = Merge-EnvironmentTables @($nodeEnvironment, @{ CI = '' })
2324
$handles = @()
2425
$runtimeSkipReasons = @()
2526

@@ -40,7 +41,7 @@ try {
4041
}
4142

4243
Write-Step 'Building client-app'
43-
Invoke-ExternalCommand -FilePath 'npm' -Arguments @('run', 'build') -WorkingDirectory $clientRoot -Environment $nodeEnvironment
44+
Invoke-ExternalCommand -FilePath 'npm' -Arguments @('run', 'build') -WorkingDirectory $clientRoot -Environment $clientBuildEnvironment
4445

4546
if ($SkipTests) {
4647
Write-Host 'Skipping client-app tests because -SkipTests was specified.' -ForegroundColor Yellow

Custom Apps/boilerplate-typescript-react/function-api/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://json.schemastore.org/tsconfig",
33
"compilerOptions": {
44
"target": "ES2015",
5-
"module": "commonjs",
5+
"module": "Node16",
66
"lib": [
77
"es5",
88
"es6",

0 commit comments

Comments
 (0)