Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Fix package vulnerabilities; add support for @skyux/config@^4.4.0 #339

Closed
wants to merge 8 commits into from
Closed
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
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes codecov report.

- name: Install
run: |
npx -p @skyux-sdk/cli skyux certs install
Expand Down
18 changes: 6 additions & 12 deletions lib/sky-pages-module-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ function getSource(skyAppConfig) {
],
useFactory: SkyAppConfigFactory
}`,
`{
provide: SkyAppParamsConfig,
useFactory: skyAppParamsConfigFactory,
deps: [SkyAppConfig]
}`,
`{
provide: SkyAppAssetsService,
useClass: ${assetsGenerator.getClassName()}
Expand All @@ -104,7 +99,7 @@ function getSource(skyAppConfig) {
`import { FormsModule, ReactiveFormsModule } from '@angular/forms';`,
`import { RouterModule } from '@angular/router';`,
`import { SkyAppAssetsService } from '@skyux/assets';`,
`import { SkyAppRuntimeConfigParams, SkyAppConfig, SkyAppParamsConfig } from '@skyux/config';`,
`import { SkyAppRuntimeConfigParams, SkyAppConfig, SkyAppConfigModule } from '@skyux/config';`,
`import { SkyAppWindowRef } from '@skyux/core';`,
`import { SkyThemeModule, SkyThemeService } from '@skyux/theme';`,
`import { SkyI18nModule } from '@skyux/i18n';`,
Expand All @@ -128,6 +123,11 @@ function getSource(skyAppConfig) {
'SkyThemeModule'
];

runtimeModuleImports.push(`SkyAppConfigModule.forRoot({
params: ${JSON.stringify(skyAppConfig.skyux.params)},
host: ${JSON.stringify(skyAppConfig.skyux.host)}
})`);

if (skyAppConfig.skyux.help) {
nodeModuleImports.push(`import { BBHelpModule } from '@blackbaud/skyux-lib-help';`);
runtimeModuleImports.push('BBHelpModule');
Expand Down Expand Up @@ -249,12 +249,6 @@ export function skyViewkeeperHostOptionsFactory(config: SkyAppConfig): SkyViewke
return hostOptions;
}

export function skyAppParamsConfigFactory(config: SkyAppConfig): SkyAppParamsConfig {
return new SkyAppParamsConfig({
params: config.skyux.params
});
}

// Setting skyux config as static property exclusively for Bootstrapper
SkyAppBootstrapper.config = ${JSON.stringify(skyAppConfig.skyux)};

Expand Down
Loading