Skip to content

Commit

Permalink
NAS-130429 / 24.10 / Update packages (#10401)
Browse files Browse the repository at this point in the history
  • Loading branch information
undsoft authored Aug 9, 2024
1 parent 51b658d commit 55be791
Show file tree
Hide file tree
Showing 19 changed files with 1,640 additions and 2,053 deletions.
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn strict-null-checks
yarn lint-staged
yarn extract
Expand Down
3 changes: 0 additions & 3 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn jira-prepare-commit-msg $1
106 changes: 53 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"extract": "node scripts/extract_strings.js",
"extract-ui-search-elements": "ts-node scripts/ui-search/extract-ui-search-elements.ts",
"validate-translations": "node scripts/validate_translations.js",
"prepare": "husky install",
"prepare": "husky",
"ui": "cd $(git rev-parse --show-toplevel) && yarn run --silent ts-node ./scripts/ui/ui.ts",
"strict-null-checks": "node_modules/typescript/bin/tsc --project tsconfig.strictNullChecks.json",
"compile-grammar": "lezer-generator --typeScript --noTerms src/app/modules/forms/search-input/services/query-parser/query.grammar -o src/app/modules/forms/search-input/services/query-parser/query-grammar.ts"
Expand All @@ -40,26 +40,26 @@
},
"private": true,
"dependencies": {
"@angular-devkit/core": "^18.0.1",
"@angular-eslint/builder": "~17.2.1",
"@angular-eslint/eslint-plugin": "~17.2.1",
"@angular-eslint/eslint-plugin-template": "~17.2.1",
"@angular-eslint/template-parser": "~17.2.1",
"@angular/animations": "^18.0.0",
"@angular/build": "^18.0.1",
"@angular/cdk": "^18.0.0",
"@angular/cli": "^18.0.1",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/material": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"@angular-devkit/core": "^18.1.3",
"@angular-eslint/builder": "~18.2.0",
"@angular-eslint/eslint-plugin": "~18.2.0",
"@angular-eslint/eslint-plugin-template": "~18.2.0",
"@angular-eslint/template-parser": "~18.2.0",
"@angular/animations": "^18.1.3",
"@angular/build": "^18.1.3",
"@angular/cdk": "^18.1.3",
"@angular/cli": "^18.1.3",
"@angular/common": "^18.1.3",
"@angular/compiler": "^18.1.3",
"@angular/compiler-cli": "^18.1.3",
"@angular/core": "^18.1.3",
"@angular/forms": "^18.1.3",
"@angular/material": "^18.1.3",
"@angular/platform-browser": "^18.1.3",
"@angular/platform-browser-dynamic": "^18.1.3",
"@angular/router": "^18.1.3",
"@biesbjerg/ngx-translate-extract-marker": "~1.0.0",
"@bugsplat/angular-tree-component": "~13.0.1",
"@bugsplat/angular-tree-component": "~18.0.0",
"@codemirror/autocomplete": "~6.13.0",
"@codemirror/lang-json": "~6.0.1",
"@codemirror/lang-yaml": "~6.0.0",
Expand All @@ -70,23 +70,25 @@
"@codemirror/view": "~6.24.1",
"@commitlint/cli": "~13.1.0",
"@ctrl/tinycolor": "~4.1.0",
"@inquirer/prompts": "^5.3.8",
"@lezer/common": "~1.2.1",
"@lezer/generator": "~1.7.0",
"@lezer/lr": "~1.4.0",
"@lezer/generator": "~1.7.1",
"@lezer/lr": "~1.4.2",
"@material-design-icons/font": "~0.14.13",
"@mdi/font": "~7.4.47",
"@ngbracket/ngx-layout": "~17.0.1",
"@ngneat/reactive-forms": "~5.0.2",
"@ngneat/spectator": "~19.0.0",
"@ngneat/until-destroy": "~9.2.3",
"@ngrx/component-store": "~17.2.0",
"@ngrx/effects": "~17.2.0",
"@ngrx/entity": "~17.2.0",
"@ngrx/router-store": "~17.2.0",
"@ngrx/store": "~17.2.0",
"@ngrx/store-devtools": "~17.2.0",
"@ngx-translate/core": "~14.0.0",
"@ngx-translate/http-loader": "~7.0.0",
"@ngneat/until-destroy": "~10.0.0",
"@ngrx/component-store": "~18.0.2",
"@ngrx/effects": "~18.0.2",
"@ngrx/entity": "~18.0.2",
"@ngrx/operators": "^18.0.0",
"@ngrx/router-store": "~18.0.2",
"@ngrx/store": "~18.0.2",
"@ngrx/store-devtools": "~18.0.2",
"@ngx-translate/core": "~15.0.0",
"@ngx-translate/http-loader": "~8.0.0",
"@pixi/filter-advanced-bloom": "~2.7.0",
"@popperjs/core": "^2.9.3",
"@sentry/angular": "5.30.0",
Expand All @@ -97,26 +99,27 @@
"@types/dygraphs": "^2.1.2",
"@types/figlet": "~1.5.5",
"@types/fontfaceobserver": "^0.0.6",
"@types/inquirer": "^8.0.0",
"@types/jest": "~29.5.0",
"@types/jest-when": "^3.5.2",
"@types/jest-when": "^3.5.5",
"@types/js-yaml": "~4.0.8",
"@types/lodash": "4.17.0",
"@types/lodash": "4.17.7",
"@types/marked": "^4.3.0",
"@types/mime-types": "~2.1.1",
"@types/node": "~10.12.7",
"@types/pixi.js": "~4.7.1",
"@types/randomcolor": "~0.5.9",
"@typescript-eslint/eslint-plugin": "~6.18.1",
"@typescript-eslint/parser": "~6.18.1",
"@vendure/ngx-translate-extract": "~9.2.0",
"@vendure/ngx-translate-extract": "~9.2.1",
"@xterm/addon-fit": "~0.10.0",
"@xterm/xterm": "~5.5.0",
"angular-resize-event": "^3.2.0",
"angular2-uuid": "~1.1.1",
"chart.js": "~4.4.2",
"chart.js": "~4.4.3",
"chartjs-adapter-date-fns": "~3.0.0",
"cheerio": "~1.0.0-rc.12",
"codemirror": "~6.0.1",
"commander": "~10.0.1",
"commander": "~12.1.0",
"commitlint-config-jira": "~1.5.1",
"commitlint-plugin-jira-rules": "~1.5.1",
"core-js": "~3.6.4",
Expand All @@ -126,10 +129,10 @@
"d3": "~5.16.0",
"date-fns": "~2.28.0",
"date-fns-tz": "~1.3.8",
"dygraphs": "~2.1.0",
"dygraphs": "~2.2.1",
"email-validator": "~2.0.4",
"error-stack-parser": "~2.1.4",
"eslint": "~8.56.0",
"eslint": "~8.57.0",
"eslint-config-airbnb-base": "~15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-plugin-angular-file-naming": "~1.0.2",
Expand All @@ -141,24 +144,23 @@
"eslint-plugin-sonarjs": "~0.17.0",
"eslint-plugin-unicorn": "^43.0.1",
"eslint-plugin-unused-imports": "^2.0.0",
"figlet": "~1.6.0",
"figlet": "~1.7.0",
"fontfaceobserver": "^2.3.0",
"fuse.js": "~7.0.0",
"html2canvas": "~1.4.1",
"husky": "^7.0.4",
"husky": "^9.1.4",
"immer": "~10.1.1",
"inquirer": "^8.0.0",
"ip-regex": "~4.3.0",
"is-cidr": "~3.1.1",
"jdenticon": "~3.2.0",
"jest": "~29.5.0",
"jdenticon": "~3.3.0",
"jest": "~29.7.0",
"jest-canvas-mock": "^2.5.0",
"jest-fail-on-console": "~3.1.2",
"jest-preset-angular": "~14.1.0",
"jest-fail-on-console": "~3.3.0",
"jest-preset-angular": "~14.2.2",
"jest-when": "~3.5.1",
"jira-prepare-commit-msg": "^1.6.1",
"js-yaml": "~4.1.0",
"lint-staged": "^11.1.2",
"lint-staged": "^15.2.8",
"lodash": "~4.17.21",
"marked": "^4.3.0",
"markuplint": "~2.9.0",
Expand All @@ -170,15 +172,15 @@
"ng-lazyload-image": "~9.1.3",
"ng-mocks": "~14.13.0",
"ng-qrcode": "~8.0.1",
"ng2-charts": "~6.0.0",
"ng2-charts": "~6.0.1",
"ng2-fittext": "~1.4.3",
"ngx-drag-drop": "~16.0.0",
"ngx-drag-drop": "~18.0.2",
"ngx-img-fallback": "^2.0.0",
"ngx-markdown": "~16.0.0",
"ngx-popperjs": "^16.0.1",
"ngx-skeleton-loader": "~5.0.0",
"ngx-translate-messageformat-compiler": "~5.0.1",
"ngx-webstorage": "~12.0.0",
"ngx-webstorage": "~18.0.0",
"pixi-filters": "~2.7.1",
"pixi.js": "~4.7.1",
"popmotion": "~8.7.1",
Expand All @@ -193,9 +195,7 @@
"ts-node": "~10.9.2",
"tsconfig-paths": "~4.2.0",
"typescript": "~5.4.5",
"utility-types": "~3.10.0",
"xterm": "~4.9.0",
"xterm-addon-fit": "~0.4.0",
"utility-types": "~3.11.0",
"zone.js": "~0.14.4"
},
"lint-staged": {
Expand Down
91 changes: 34 additions & 57 deletions scripts/ui/commands/mock-enclosure.command.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as inquirer from 'inquirer';
import type { QuestionCollection } from 'inquirer';
import { confirm, select, input } from '@inquirer/prompts';
import { enclosureMocks } from 'app/core/testing/mock-enclosure/enclosure-templates/enclosure-mocks';
import {
MockStorageScenario,
Expand All @@ -8,19 +7,9 @@ import {
// eslint-disable-next-line no-restricted-imports
import { getCurrentConfig, updateEnvironment } from '../utils/save-environment';

interface Answers {
controllerModel: string;
expansionModels: string;
scenario: MockStorageScenario;
}

export async function mockEnclosureCommand(): Promise<void> {
console.info(currentMockConfig());
const { enable }: { enable: boolean } = await inquirer.prompt({
name: 'enable',
type: 'confirm',
message: 'Enable enclosure mocking?',
});
const enable = await confirm({ message: 'Enable enclosure mocking?' });

if (!enable) {
updateEnvironment({
Expand All @@ -31,61 +20,49 @@ export async function mockEnclosureCommand(): Promise<void> {
return;
}

const answers = await inquirer.prompt<Answers>(getMockQuestions());
const controllerModel = await select({
message: 'Select a controller model',
choices: enclosureMocks
.filter((mock) => mock.controller)
.map((mock) => ({
name: mock.model,
value: mock.model,
})),
});

const allShelves = enclosureMocks
.filter((mock) => !mock.controller)
.map((mock) => mock.model);

const expansionModels = answers.expansionModels
? answers.expansionModels.split(',').map((model) => model.trim())
const expansionModelsAnswer = await input({
message: `What expansion shelves would you like to use?
Enter zero or more answers separated with a comma.
Available options: ${allShelves.join(', ')}:\n`,
default: '',
});
const expansionModels = expansionModelsAnswer
? expansionModelsAnswer.split(',').map((model) => model.trim())
: [];

const scenario = await select({
message: 'Select mocking scenario',
choices: Array.from(mockStorageScenarioLabels).map(([key, name]) => ({
name,
value: key,
})),
default: MockStorageScenario.FillSomeSlots,
});

updateEnvironment({
mockConfig: {
controllerModel,
expansionModels,
scenario,
enabled: true,
controllerModel: answers.controllerModel,
scenario: answers.scenario,
},
});
}

// MockEnclosureConfig
function getMockQuestions(): QuestionCollection {
return [
{
name: 'controllerModel',
message: 'Select a controller model',
type: 'list',
choices: enclosureMocks
.filter((mock) => mock.controller)
.map((mock) => mock.model),
},
{
name: 'expansionModels',
message: () => {
const shelves = enclosureMocks
.filter((mock) => !mock.controller)
.map((mock) => mock.model);
return `What expansion shelves would you like to use?
Enter zero or more answers separated with a comma.
Available options: ${shelves.join(', ')}:\n`;
},
type: 'input',
default: '',
},
{
name: 'scenario',
message: 'Select mocking scenario',
type: 'list',
choices: () => {
return Array.from(mockStorageScenarioLabels).map(([key, name]) => ({
name,
value: key,
}));
},
default: MockStorageScenario.FillSomeSlots,
},
];
}

export function currentMockConfig(): string {
const environment = getCurrentConfig();
const printedConfig = `Enclosure Mocks: ${environment.mockConfig.enabled ? 'Enabled' : 'Disabled'}`;
Expand Down
6 changes: 4 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import {
TranslateMessageFormatCompiler,
} from 'ngx-translate-messageformat-compiler';
import { NgxWebstorageModule } from 'ngx-webstorage';
import { provideNgxWebstorage, withLocalStorage } from 'ngx-webstorage';
import { rootRouterConfig } from 'app/app.routing';
import { IcuMissingTranslationHandler } from 'app/core/classes/icu-missing-translation-handler';
import { createTranslateLoader } from 'app/core/classes/icu-translations-loader';
Expand Down Expand Up @@ -92,7 +92,6 @@ import { RoutePartsService } from './services/route-parts/route-parts.service';
NgxPopperjsModule.forRoot({ appendTo: 'body', hideOnScroll: true }),
MatSnackBarModule,
CommonDirectivesModule,
NgxWebstorageModule.forRoot(),
StoreModule.forRoot(rootReducers, {
runtimeChecks: {
strictStateImmutability: true,
Expand Down Expand Up @@ -137,6 +136,9 @@ import { RoutePartsService } from './services/route-parts/route-parts.service';
IxSlideInService,
IxChainedSlideInService,
UploadService,
provideNgxWebstorage(
withLocalStorage(),
),
{
provide: ErrorHandler,
useClass: ErrorHandlerService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
import { ControlValueAccessor, NgControl } from '@angular/forms';
import { Compartment } from '@codemirror/state';
import { oneDark } from '@codemirror/theme-one-dark';
import { EditorViewConfig, placeholder } from '@codemirror/view';
import { EditorView, EditorViewConfig, placeholder } from '@codemirror/view';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { EditorView, basicSetup } from 'codemirror';
import { basicSetup } from 'codemirror';
import {
BehaviorSubject, Observable, combineLatest, filter, take, tap,
} from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
margin: 0;
right: 0;
top: 0;
z-index: 1;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:host ::ng-deep {
@import 'xterm/css/xterm';
@import '@xterm/xterm/css/xterm';
}

.terminal-wrapper {
Expand Down
Loading

0 comments on commit 55be791

Please sign in to comment.