arui-scripts 14.5.0-feat-modules.1 → 14.5.0-feat-modules.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ # [14.5.0-feat-modules.3](https://github.com/core-ds/arui-scripts/compare/v14.5.0-feat-modules.2...v14.5.0-feat-modules.3) (2023-05-17)
2
+
3
+
4
+ ### Features
5
+
6
+ * **dev-server:** add configuration to set CORS headers ([db54131](https://github.com/core-ds/arui-scripts/commit/db54131481e40434e8e9a695629fab4965578fb0))
7
+ * **widgets:** add server resources fetcher ([5faccc5](https://github.com/core-ds/arui-scripts/commit/5faccc56f0f4d58323df7d320da5345fbd136ff4))
8
+ * **widgets:** massive api changes ([6b8366d](https://github.com/core-ds/arui-scripts/commit/6b8366d5261a9f8f56dd93f1c7834cb41f4afa20))
9
+
10
+ # [14.5.0-feat-modules.2](https://github.com/core-ds/arui-scripts/compare/v14.5.0-feat-modules.1...v14.5.0-feat-modules.2) (2023-05-15)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * correctly pass auth token to publish jobs ([da5a0fd](https://github.com/core-ds/arui-scripts/commit/da5a0fd03f6945fb2ca1b0a1dad2b2d725373a11))
16
+
1
17
  # [14.5.0-feat-modules.1](https://github.com/core-ds/arui-scripts/compare/v14.4.1...v14.5.0-feat-modules.1) (2023-05-15)
2
18
 
3
19
 
package/README.md CHANGED
@@ -79,6 +79,8 @@ npm install arui-scripts --save-dev
79
79
  - `componentsTheme` - путь к css файлу с темой для [core-components](https://github.com/core-ds/core-components). Используется для настройки [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties#importfrom).
80
80
  - `keepCssVars` - отключает `postcss-custom-properties`, css переменные будут оставаться в бандле.
81
81
  - `removeDevDependenciesDuringDockerBuild` - отключает удаление devDependencies из node_modules при сборке докер образа. Используется когда вам не нужно удалять devDependencies, т.к. в своём Dockerfile вы не переносите node_modules в докер-контейнер
82
+ - `devServerCors` - включает добавление cors-заголовков в dev-server. Может быть полезным при локальном тестировании модулей.
83
+ - `embeddedModules`, `mfModules` - позволяет настраивать работу с модулями, подробнее в разделе [Модули](./docs/modules.md).
82
84
 
83
85
  В целях отладки все эти настройки можно переопределить не изменяя package.json
84
86
  Просто передайте необходимые настройки в environment переменной ARUI_SCRIPTS_CONFIG
@@ -8,6 +8,7 @@ export declare function calculateDependentConfig(config: AppConfigs): {
8
8
  serverPort: number;
9
9
  debug: boolean;
10
10
  devSourceMaps: string;
11
+ devServerCors: boolean;
11
12
  useServerHMR: boolean;
12
13
  presets: string | null;
13
14
  buildPath: string;
@@ -27,7 +28,7 @@ export declare function calculateDependentConfig(config: AppConfigs): {
27
28
  useTscLoader: boolean;
28
29
  webpack4Compatibility: boolean;
29
30
  installServerSourceMaps: boolean;
30
- componentsTheme: string | undefined;
31
+ componentsTheme: string | null;
31
32
  keepCssVars: boolean;
32
33
  embeddedModules: {
33
34
  shared?: {
@@ -16,6 +16,7 @@ function getDefaultAppConfig() {
16
16
  serverPort: 3000,
17
17
  debug: false,
18
18
  devSourceMaps: 'eval',
19
+ devServerCors: false,
19
20
  useServerHMR: false,
20
21
  presets: null,
21
22
  // paths
@@ -41,7 +42,7 @@ function getDefaultAppConfig() {
41
42
  webpack4Compatibility: false,
42
43
  installServerSourceMaps: false,
43
44
  // CSS
44
- componentsTheme: undefined,
45
+ componentsTheme: null,
45
46
  keepCssVars: false,
46
47
  // Modules
47
48
  embeddedModules: null,
@@ -6,6 +6,7 @@ export type AppConfigs = {
6
6
  serverPort: number;
7
7
  debug: boolean;
8
8
  devSourceMaps: string;
9
+ devServerCors: boolean;
9
10
  useServerHMR: boolean;
10
11
  presets: string | null;
11
12
  buildPath: string;
@@ -26,7 +27,7 @@ export type AppConfigs = {
26
27
  useTscLoader: boolean;
27
28
  webpack4Compatibility: boolean;
28
29
  installServerSourceMaps: boolean;
29
- componentsTheme: string | undefined;
30
+ componentsTheme: string | null;
30
31
  keepCssVars: boolean;
31
32
  embeddedModules: {
32
33
  shared?: {
@@ -1,16 +1,3 @@
1
- declare const devServerConfig: {
2
- port: number;
3
- liveReload: boolean;
4
- client: {
5
- overlay: {
6
- errors: boolean;
7
- warnings: boolean;
8
- };
9
- };
10
- devMiddleware: {
11
- publicPath: string;
12
- };
13
- static: string[];
14
- proxy: any;
15
- };
1
+ /// <reference types="webpack-dev-server" />
2
+ declare const devServerConfig: import("webpack-dev-server").Configuration;
16
3
  export default devServerConfig;
@@ -32,10 +32,17 @@ const devServerConfig = (0, apply_overrides_1.default)('devServer', {
32
32
  const cspHeader = proxyRes.headers['content-security-policy'];
33
33
  if (typeof cspHeader === 'string' && !cspHeader.includes('unsafe-eval')) {
34
34
  proxyRes.headers['content-security-policy'] = cspHeader
35
- .replace(/script-src/, "script-src 'unsafe-eval'");
35
+ .replace(/script-src/, 'script-src \'unsafe-eval\'');
36
36
  }
37
- }
38
- } : {}))
39
- })
37
+ },
38
+ } : {})),
39
+ }),
40
+ headers: app_configs_1.default.devServerCors
41
+ ? {
42
+ 'Access-Control-Allow-Origin': '*',
43
+ 'Access-Control-Allow-Headers': '*',
44
+ 'Access-Control-Allow-Methods': '*',
45
+ }
46
+ : {},
40
47
  });
41
48
  exports.default = devServerConfig;
@@ -9,7 +9,7 @@ export declare const postcssPlugins: string[];
9
9
  export declare const postcssPluginsOptions: {
10
10
  'postcss-custom-properties'?: {
11
11
  preserve: boolean;
12
- importFrom: string | undefined;
12
+ importFrom: string | null;
13
13
  } | undefined;
14
14
  'postcss-import': {
15
15
  path: string[];