еще правки

This commit is contained in:
gorbenko.pavel
2026-07-28 17:58:46 +05:00
parent b0280281fb
commit 9cb5080bf9
6 changed files with 66 additions and 17 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
node_modules/
node_modules/
lib/
dist/
temp/
+1 -1
View File
@@ -1,4 +1,4 @@
{
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@microsoft/spfx-web-build-rig"
}
+1 -1
View File
@@ -1,4 +1,4 @@
{
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft-sass-plugin.schema.json",
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/sass.json"
}
+1 -1
View File
@@ -1,4 +1,4 @@
{
{
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/typescript.json",
"staticAssetsToCopy": {
"fileExtensions": [".resx", ".jpg", ".png", ".woff", ".eot", ".ttf", ".svg", ".gif"],
+25 -7
View File
@@ -14,6 +14,24 @@ $ErrorActionPreference = "Stop"
# на современных Node (node-gyp 3.8 требует Python 2).
$SpfxVersion = "1.22.1"
# ---- Запись файлов ----
# ВАЖНО: "Set-Content -Encoding UTF8" в Windows PowerShell 5.1 пишет UTF-8 С BOM.
# Heft, tsc и node на BOM в .json/.js спотыкаются:
# Unexpected token '<U+FEFF>', "<U+FEFF>{ ..." is not valid JSON
# Поэтому все конфиги пишем строго UTF-8 без BOM.
function Write-Utf8NoBom {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Content
)
$full = [System.IO.Path]::Combine((Get-Location).ProviderPath, $Path)
$dir = [System.IO.Path]::GetDirectoryName($full)
if ($dir -and -not (Test-Path $dir)) {
New-Item -ItemType Directory -Force -Path $dir | Out-Null
}
[System.IO.File]::WriteAllText($full, ($Content -replace "`r?`n", "`r`n"), (New-Object System.Text.UTF8Encoding($false)))
}
# ---- Цвета вывода ----
function Info { param($msg) Write-Host "[INFO] $msg" -ForegroundColor Cyan }
function Success { param($msg) Write-Host "[OK] $msg" -ForegroundColor Green }
@@ -152,7 +170,7 @@ $packageJson = @'
}
'@
$packageJson | Set-Content -Encoding UTF8 "package.json"
Write-Utf8NoBom "package.json" $packageJson
Success "package.json создан."
# ---------------------------------------------------------
@@ -237,7 +255,7 @@ $rigJson = @'
}
'@
$rigJson | Set-Content -Encoding UTF8 "config\rig.json"
Write-Utf8NoBom "config\rig.json" $rigJson
Success "config\rig.json создан."
# ---------------------------------------------------------
@@ -253,7 +271,7 @@ $sassJson = @'
}
'@
$sassJson | Set-Content -Encoding UTF8 "config\sass.json"
Write-Utf8NoBom "config\sass.json" $sassJson
Success "config\sass.json создан."
# ---------------------------------------------------------
@@ -272,7 +290,7 @@ $typescriptJson = @'
}
'@
$typescriptJson | Set-Content -Encoding UTF8 "config\typescript.json"
Write-Utf8NoBom "config\typescript.json" $typescriptJson
Success "config\typescript.json создан."
# ---------------------------------------------------------
@@ -287,7 +305,7 @@ if (-not (Test-Path "tsconfig.json")) {
}
'@
$tsConfig | Set-Content -Encoding UTF8 "tsconfig.json"
Write-Utf8NoBom "tsconfig.json" $tsConfig
Success "tsconfig.json создан."
} else {
Success "tsconfig.json уже существует, пропускаем."
@@ -308,7 +326,7 @@ module.exports = {
};
'@
$eslintConfig | Set-Content -Encoding UTF8 ".eslintrc.js"
Write-Utf8NoBom ".eslintrc.js" $eslintConfig
Success ".eslintrc.js создан."
} else {
Success ".eslintrc.js уже существует, пропускаем."
@@ -329,7 +347,7 @@ temp/
sharepoint/solution/
'@
$gitignore | Set-Content -Encoding UTF8 ".gitignore"
Write-Utf8NoBom ".gitignore" $gitignore
Success ".gitignore создан."
# ---------------------------------------------------------
+37 -6
View File
@@ -4164,6 +4164,34 @@
"integrity": "sha512-W+IzEBw8a6LOOfRJM02dTT7BDZijxm+Z7lhtOAz1+y9vQm1Kdz9jlAO+qCEKsfxtUOmKilW8DIRqFw2aUgKeGg==",
"license": "MIT"
},
"node_modules/@microsoft/microsoft-graph-client": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.2.tgz",
"integrity": "sha512-eYDiApYmiGsm1s1jfAa/rhB2xQCsX4pWt0vCTd1LZmiApMQfT/c0hXj2hvpuGz5GrcLdugbu05xB79rIV57Pjw==",
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/runtime": "^7.12.5",
"tslib": "^2.2.0"
},
"engines": {
"node": ">=12.0.0"
},
"peerDependenciesMeta": {
"@azure/identity": {
"optional": true
},
"@azure/msal-browser": {
"optional": true
},
"buffer": {
"optional": true
},
"stream-browserify": {
"optional": true
}
}
},
"node_modules/@microsoft/microsoft-graph-clientv1": {
"name": "@microsoft/microsoft-graph-client",
"version": "1.7.2-spfx",
@@ -6493,7 +6521,7 @@
"version": "26.1.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.2.tgz",
"integrity": "sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==",
"dev": true,
"devOptional": true,
"license": "MIT",
"dependencies": {
"undici-types": "~8.3.0"
@@ -6516,7 +6544,6 @@
"version": "15.7.15",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
"integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/qs": {
@@ -6537,7 +6564,6 @@
"version": "17.0.45",
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz",
"integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/prop-types": "*",
@@ -6549,7 +6575,6 @@
"version": "17.0.17",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.17.tgz",
"integrity": "sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/react": "^17"
@@ -6572,7 +6597,6 @@
"version": "0.26.0",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.26.0.tgz",
"integrity": "sha512-WFHp9YUJQ6CKshqoC37iOlHnQSmxNc795UhB26CyBBttrN9svdIrUjl/NjnNmfcwtncN0h/0PPAFWv9ovP8mLA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/send": {
@@ -17334,6 +17358,13 @@
"node": ">=v12.22.7"
}
},
"node_modules/scheduler": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
"integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
"license": "MIT",
"peer": true
},
"node_modules/schema-utils": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
@@ -18925,7 +18956,7 @@
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
"integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
"dev": true,
"devOptional": true,
"license": "MIT"
},
"node_modules/unicorn-magic": {