sku 14.10.1 → 14.11.0

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/context/getSiteForHost.d.ts +2 -0
  3. package/dist/{utils/contextUtils → context}/getSiteForHost.js +1 -2
  4. package/dist/{utils/contextUtils → context}/hosts.d.ts +1 -1
  5. package/dist/{utils/contextUtils → context}/hosts.js +2 -2
  6. package/dist/{utils/contextUtils → context}/resolveEnvironment.d.ts +1 -1
  7. package/dist/{openBrowser/index.d.ts → openBrowser.d.ts} +0 -1
  8. package/dist/{openBrowser/index.js → openBrowser.js} +3 -3
  9. package/dist/program/commands/format/format.action.js +1 -1
  10. package/dist/program/commands/init/init.action.js +1 -1
  11. package/dist/program/commands/lint/lint.action.js +1 -1
  12. package/dist/program/commands/serve/serve.action.js +4 -4
  13. package/dist/program/commands/setup-hosts/setup-hosts.action.js +1 -1
  14. package/dist/program/commands/start/start.action.js +3 -3
  15. package/dist/program/commands/start/webpack-start-handler.js +5 -5
  16. package/dist/program/commands/start-ssr/webpack-start-ssr-handler.js +2 -2
  17. package/dist/services/{prettier/runPrettier.js → prettier.js} +5 -5
  18. package/dist/services/vite/helpers/config/createConfig.js +1 -1
  19. package/dist/services/vite/index.js +1 -1
  20. package/dist/services/vite/plugins/httpsDevServerPlugin.js +1 -1
  21. package/dist/services/webpack/config/plugins/{metrics-plugin/index.d.ts → metricsPlugin.d.ts} +1 -2
  22. package/dist/services/webpack/config/plugins/{metrics-plugin/index.js → metricsPlugin.js} +2 -3
  23. package/dist/services/webpack/config/plugins/{sku-webpack-plugin/index.d.ts → skuWebpackPlugin.d.ts} +2 -1
  24. package/dist/services/webpack/config/plugins/{sku-webpack-plugin/index.js → skuWebpackPlugin.js} +7 -6
  25. package/dist/services/webpack/config/plugins/{sku-webpack-plugin/validateOptions.d.ts → validateOptions.d.ts} +1 -2
  26. package/dist/services/webpack/config/plugins/{sku-webpack-plugin/validateOptions.js → validateOptions.js} +2 -3
  27. package/dist/services/webpack/config/webpack.config.js +2 -2
  28. package/dist/services/webpack/config/webpack.config.ssr.js +2 -2
  29. package/dist/utils/routeMatcher.js +1 -1
  30. package/package.json +2 -2
  31. package/scripts/postinstall.js +5 -4
  32. package/dist/utils/contextUtils/getServerEntry.d.ts +0 -1
  33. package/dist/utils/contextUtils/getServerEntry.js +0 -1
  34. package/dist/utils/contextUtils/getSiteForHost.d.ts +0 -3
  35. /package/dist/{utils/contextUtils → context}/resolveEnvironment.js +0 -0
  36. /package/dist/services/{prettier/runPrettier.d.ts → prettier.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # sku
2
2
 
3
+ ## 14.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Expose named `SkuWebpackPlugin` export from `sku/webpack-plugin`, deprecate default export ([#1374](https://github.com/seek-oss/sku/pull/1374))
8
+
9
+ **MIGRATION GUIDE**
10
+
11
+ ```diff
12
+ -import SkuWebpackPlugin from 'sku/webpack-plugin';
13
+ +import { SkuWebpackPlugin } from 'sku/webpack-plugin';
14
+ ```
15
+
16
+ ### Patch Changes
17
+
18
+ - `start`: Shows Not Found (404) messaging instead of an error when routes are empty ([#1370](https://github.com/seek-oss/sku/pull/1370))
19
+
20
+ - Fixes a bug where `sku`'s `postinstall` script would fail during `sku init` ([#1376](https://github.com/seek-oss/sku/pull/1376))
21
+
3
22
  ## 14.10.1
4
23
 
5
24
  ### Patch Changes
@@ -0,0 +1,2 @@
1
+ import type { SkuContext } from './createSkuContext.js';
2
+ export declare const getSiteForHost: (hostname: string, defaultSite: string | undefined, sites: SkuContext["sites"]) => string | undefined;
@@ -1,4 +1,4 @@
1
- const getSiteForHost = (hostname, defaultSite, sites) => {
1
+ export const getSiteForHost = (hostname, defaultSite, sites) => {
2
2
  if (sites.length === 0) {
3
3
  return undefined;
4
4
  }
@@ -8,4 +8,3 @@ const getSiteForHost = (hostname, defaultSite, sites) => {
8
8
  }
9
9
  return defaultSite ? defaultSite : sites[0].name;
10
10
  };
11
- export default getSiteForHost;
@@ -1,4 +1,4 @@
1
- import type { SkuContext } from '../../context/createSkuContext.js';
1
+ import type { SkuContext } from './createSkuContext.js';
2
2
  type Line = string | [string, /* host */ string];
3
3
  type SetSystemHostFunction = (ip: string, host: string) => Promise<void>;
4
4
  type GetSystemHostFunction = (preserveFormatting: boolean) => Promise<Line[]>;
@@ -1,6 +1,6 @@
1
1
  import chalk from 'chalk';
2
- import { suggestScript } from '../suggestScript.js';
3
- import { hasErrorCode } from '../error-guards.js';
2
+ import { suggestScript } from '../utils/suggestScript.js';
3
+ import { hasErrorCode } from '../utils/error-guards.js';
4
4
  import { promisify } from 'node:util';
5
5
  import { set, get } from 'hostile';
6
6
  export const getAppHosts = ({ sites: configuredSites, hosts }) => configuredSites
@@ -1,4 +1,4 @@
1
- import type { SkuContext } from '../../context/createSkuContext.js';
1
+ import type { SkuContext } from './createSkuContext.js';
2
2
  export declare const resolveEnvironment: ({ environment: environmentOption, skuContext, }: {
3
3
  environment?: string;
4
4
  skuContext: SkuContext;
@@ -1,2 +1 @@
1
- export declare const BIN_DIR: string;
2
1
  export declare const openBrowser: (url: string) => Promise<true | undefined>;
@@ -2,14 +2,14 @@
2
2
  // https://github.com/facebook/create-react-app/commit/d2de54b25cc25800df1764058997e3e274bd79ac
3
3
  import chalk from 'chalk';
4
4
  import open from 'open';
5
- import isCI from '../utils/isCI.js';
5
+ import isCI from './utils/isCI.js';
6
6
  import getDefaultBrowser from 'default-browser';
7
7
  import { fileURLToPath } from 'node:url';
8
8
  import { resolve } from 'node:path';
9
9
  import debug from 'debug';
10
- import { execAsync } from '../utils/execAsync.js';
10
+ import { execAsync } from './utils/execAsync.js';
11
11
  const log = debug('sku:openBrowser');
12
- export const BIN_DIR = resolve(fileURLToPath(import.meta.url), '../../../bin');
12
+ const BIN_DIR = resolve(fileURLToPath(import.meta.url), '../../bin');
13
13
  const OSX_CHROME = 'google chrome';
14
14
  const supportedChromiumBrowsers = [
15
15
  'Chrome',
@@ -1,7 +1,7 @@
1
1
  import chalk from 'chalk';
2
2
  import { configureProject } from '../../../utils/configure.js';
3
3
  import { fix as esLintFix } from '../../../services/eslint/runESLint.js';
4
- import { write as prettierWrite } from '../../../services/prettier/runPrettier.js';
4
+ import { write as prettierWrite } from '../../../services/prettier.js';
5
5
  export const formatAction = async (paths, { skuContext }) => {
6
6
  await configureProject(skuContext);
7
7
  const pathsToCheck = paths.length > 0 ? paths : undefined;
@@ -7,7 +7,7 @@ import { Eta } from 'eta';
7
7
  import debug from 'debug';
8
8
  import skuPackageJson from 'sku/package.json' with { type: 'json' };
9
9
  import { packageManager, getRunCommand, getPackageManagerInstallPage, getInstallCommand, isAtLeastPnpmV10, rootDir, packageManagerVersion, } from '../../../services/packageManager/packageManager.js';
10
- import { write as prettierWrite } from '../../../services/prettier/runPrettier.js';
10
+ import { write as prettierWrite } from '../../../services/prettier.js';
11
11
  import { fix as esLintFix } from '../../../services/eslint/runESLint.js';
12
12
  import install from '../../../services/packageManager/install.js';
13
13
  import configure from '../../../utils/configureApp.js';
@@ -1,6 +1,6 @@
1
1
  import chalk from 'chalk';
2
2
  import { check as esLintCheck } from '../../../services/eslint/runESLint.js';
3
- import { check as prettierCheck } from '../../../services/prettier/runPrettier.js';
3
+ import { check as prettierCheck } from '../../../services/prettier.js';
4
4
  import runTsc from '../../../services/typescript/runTsc.js';
5
5
  import { runVocabCompile } from '../../../services/vocab/runVocab.js';
6
6
  import { configureProject } from '../../../utils/configure.js';
@@ -4,11 +4,11 @@ import express from 'express';
4
4
  import handler from 'serve-handler';
5
5
  import chalk from 'chalk';
6
6
  import { closest } from 'fastest-levenshtein';
7
- import { checkHosts, getAppHosts, withHostile, } from '../../../utils/contextUtils/hosts.js';
7
+ import { checkHosts, getAppHosts, withHostile, } from '../../../context/hosts.js';
8
8
  import allocatePort from '../../../utils/allocatePort.js';
9
- import { openBrowser } from '../../../openBrowser/index.js';
10
- import getSiteForHost from '../../../utils/contextUtils/getSiteForHost.js';
11
- import { resolveEnvironment } from '../../../utils/contextUtils/resolveEnvironment.js';
9
+ import { openBrowser } from '../../../openBrowser.js';
10
+ import { getSiteForHost } from '../../../context/getSiteForHost.js';
11
+ import { resolveEnvironment } from '../../../context/resolveEnvironment.js';
12
12
  import provider from '../../../services/telemetry/index.js';
13
13
  import createServer from '../../../utils/createServer.js';
14
14
  import { getRouteWithLanguage, getValidLanguagesForRoute, } from '../../../utils/language-utils.js';
@@ -1,4 +1,4 @@
1
- import { setupHosts, withHostile } from '../../../utils/contextUtils/hosts.js';
1
+ import { setupHosts, withHostile } from '../../../context/hosts.js';
2
2
  import provider from '../../../services/telemetry/index.js';
3
3
  const setupHostsWithHostile = withHostile(setupHosts);
4
4
  export const setupHostsAction = async ({ skuContext, }) => {
@@ -1,13 +1,13 @@
1
1
  import { configureProject, validatePeerDeps, } from '../../../utils/configure.js';
2
2
  import { watchVocabCompile } from '../../../services/vocab/runVocab.js';
3
- import { checkHosts, withHostile } from '../../../utils/contextUtils/hosts.js';
3
+ import { checkHosts, withHostile } from '../../../context/hosts.js';
4
4
  import chalk from 'chalk';
5
5
  export const startAction = async ({ stats, skuContext, }, command) => {
6
6
  const { environment } = command.optsWithGlobals();
7
7
  console.log(chalk.blue(`sku start`));
8
8
  await Promise.all([
9
- await configureProject(skuContext),
10
- await watchVocabCompile(skuContext),
9
+ configureProject(skuContext),
10
+ watchVocabCompile(skuContext),
11
11
  ]);
12
12
  withHostile(checkHosts)(skuContext);
13
13
  validatePeerDeps(skuContext);
@@ -2,15 +2,15 @@ import WebpackDevServer from 'webpack-dev-server';
2
2
  import webpack from 'webpack';
3
3
  import chalk from 'chalk';
4
4
  import exceptionFormatter from 'exception-formatter';
5
- import { openBrowser } from '../../../openBrowser/index.js';
5
+ import { openBrowser } from '../../../openBrowser.js';
6
6
  import getCertificate from '../../../utils/certificate.js';
7
7
  import getStatsConfig from '../../../services/webpack/config/statsConfig.js';
8
8
  import createHtmlRenderPlugin from '../../../services/webpack/config/plugins/createHtmlRenderPlugin.js';
9
9
  import makeWebpackConfig from '../../../services/webpack/config/webpack.config.js';
10
- import { getAppHosts } from '../../../utils/contextUtils/hosts.js';
10
+ import { getAppHosts } from '../../../context/hosts.js';
11
11
  import allocatePort from '../../../utils/allocatePort.js';
12
- import getSiteForHost from '../../../utils/contextUtils/getSiteForHost.js';
13
- import { resolveEnvironment } from '../../../utils/contextUtils/resolveEnvironment.js';
12
+ import { getSiteForHost } from '../../../context/getSiteForHost.js';
13
+ import { resolveEnvironment } from '../../../context/resolveEnvironment.js';
14
14
  import { getMatchingRoute } from '../../../utils/routeMatcher.js';
15
15
  import { getLanguageFromRoute, getRouteWithLanguage, } from '../../../utils/language-utils.js';
16
16
  const localhost = '0.0.0.0';
@@ -85,7 +85,7 @@ export const webpackStartHandler = async ({ stats: statsOption, environment: env
85
85
  hostname: req.hostname,
86
86
  path: req.path,
87
87
  sites,
88
- }) || { route: '' };
88
+ });
89
89
  if (!matchingRoute) {
90
90
  return next();
91
91
  }
@@ -6,11 +6,11 @@ import chalk from 'chalk';
6
6
  import debug from 'debug';
7
7
  import getCertificate from '../../../utils/certificate.js';
8
8
  import { copyPublicFiles, ensureTargetDirectory, cleanTargetDirectory, } from '../../../utils/buildFileUtils.js';
9
- import { checkHosts, getAppHosts, withHostile, } from '../../../utils/contextUtils/hosts.js';
9
+ import { checkHosts, getAppHosts, withHostile, } from '../../../context/hosts.js';
10
10
  import makeWebpackConfig from '../../../services/webpack/config/webpack.config.ssr.js';
11
11
  import getStatsConfig from '../../../services/webpack/config/statsConfig.js';
12
12
  import allocatePort from '../../../utils/allocatePort.js';
13
- import { openBrowser } from '../../../openBrowser/index.js';
13
+ import { openBrowser } from '../../../openBrowser.js';
14
14
  import createServerManager from '../../../services/serverManager.js';
15
15
  import { watchVocabCompile } from '../../../services/vocab/runVocab.js';
16
16
  import { configureProject, validatePeerDeps, } from '../../../utils/configure.js';
@@ -1,13 +1,13 @@
1
- import exists from '../../utils/exists.js';
1
+ import exists from '../utils/exists.js';
2
2
  import path, { dirname } from 'node:path';
3
3
  import chalk from 'chalk';
4
- import { runBin } from '../../utils/runBin.js';
5
- import { getPathFromCwd } from '../../utils/cwd.js';
6
- import { suggestScript } from '../../utils/suggestScript.js';
4
+ import { runBin } from '../utils/runBin.js';
5
+ import { getPathFromCwd } from '../utils/cwd.js';
6
+ import { suggestScript } from '../utils/suggestScript.js';
7
7
  import { fileURLToPath } from 'node:url';
8
8
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
9
  const prettierIgnorePath = getPathFromCwd('.prettierignore');
10
- const prettierConfigPath = path.join(__dirname, '../../config/prettier.js');
10
+ const prettierConfigPath = path.join(__dirname, '../config/prettier.js');
11
11
  const runPrettier = async ({ write, listDifferent, paths, }) => {
12
12
  console.log(chalk.cyan(`${write ? 'Formatting' : 'Checking'} code with Prettier`));
13
13
  const prettierArgs = ['--config', prettierConfigPath, '--cache'];
@@ -5,7 +5,7 @@ import { middlewarePlugin } from '../../plugins/middlewarePlugin.js';
5
5
  import { startTelemetryPlugin } from '../../plugins/startTelemetry.js';
6
6
  import { HMRTelemetryPlugin } from '../../plugins/HMRTelemetry.js';
7
7
  import { httpsDevServerPlugin } from '../../plugins/httpsDevServerPlugin.js';
8
- import { getAppHosts } from '../../../../utils/contextUtils/hosts.js';
8
+ import { getAppHosts } from '../../../../context/hosts.js';
9
9
  import isCI from '../../../../utils/isCI.js';
10
10
  import { bundleAnalyzerPlugin } from '../../plugins/bundleAnalyzer.js';
11
11
  import { vitePluginSsrCss } from '../../plugins/ssrCss/plugin.js';
@@ -2,7 +2,7 @@ import { build, createServer } from 'vite';
2
2
  import { createClientBuildConfig, createServerBuildConfig, createStartConfig, } from './helpers/config/createConfig.js';
3
3
  import { cleanTargetDirectory } from '../../utils/buildFileUtils.js';
4
4
  import { createOutDir } from './helpers/bundleConfig.js';
5
- import { getAppHosts } from '../../utils/contextUtils/hosts.js';
5
+ import { getAppHosts } from '../../context/hosts.js';
6
6
  import chalk from 'chalk';
7
7
  import { prerenderConcurrently } from './helpers/prerender/prerenderConcurrently.js';
8
8
  import allocatePort from '../../utils/allocatePort.js';
@@ -1,4 +1,4 @@
1
- import { getAppHosts } from '../../../utils/contextUtils/hosts.js';
1
+ import { getAppHosts } from '../../../context/hosts.js';
2
2
  import basicSsl from '@vitejs/plugin-basic-ssl';
3
3
  import path from 'node:path';
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import type { Compiler, WebpackPluginInstance } from 'webpack';
2
- declare class MetricsPlugin implements WebpackPluginInstance {
2
+ export declare class MetricsPlugin implements WebpackPluginInstance {
3
3
  private initial;
4
4
  private readonly target;
5
5
  private readonly type;
@@ -10,4 +10,3 @@ declare class MetricsPlugin implements WebpackPluginInstance {
10
10
  });
11
11
  apply(compiler: Compiler): void;
12
12
  }
13
- export default MetricsPlugin;
@@ -1,10 +1,10 @@
1
1
  import { performance } from 'node:perf_hooks';
2
2
  import prettyMilliseconds from 'pretty-ms';
3
3
  import debug from 'debug';
4
- import provider from '../../../../telemetry/index.js';
4
+ import provider from '../../../telemetry/index.js';
5
5
  const log = debug('sku:metrics');
6
6
  const smp = 'sku-metrics-plugin';
7
- class MetricsPlugin {
7
+ export class MetricsPlugin {
8
8
  initial;
9
9
  target;
10
10
  type;
@@ -43,4 +43,3 @@ class MetricsPlugin {
43
43
  });
44
44
  }
45
45
  }
46
- export default MetricsPlugin;
@@ -1,10 +1,11 @@
1
1
  import { type Compiler, type WebpackPluginInstance } from 'webpack';
2
2
  import { type SkuWebpackPluginOptions } from './validateOptions.js';
3
- declare class SkuWebpackPlugin implements WebpackPluginInstance {
3
+ export declare class SkuWebpackPlugin implements WebpackPluginInstance {
4
4
  options: SkuWebpackPluginOptions;
5
5
  compilePackages: string[];
6
6
  include: string[];
7
7
  constructor(options: SkuWebpackPluginOptions);
8
8
  apply(compiler: Compiler): void;
9
9
  }
10
+ /** @deprecated Please use the named `SkuWebpackPlugin` export */
10
11
  export default SkuWebpackPlugin;
@@ -1,12 +1,12 @@
1
1
  import webpack from 'webpack';
2
2
  import defaultSupportedBrowsers from 'browserslist-config-seek';
3
3
  import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin';
4
- import { makeJsLoaders, makeExternalCssLoaders, makeSvgLoaders, TYPESCRIPT, JAVASCRIPT, IMAGE, SVG, resolvePackage, } from '../../utils/index.js';
5
- import defaultCompilePackages from '../../../../../context/defaultCompilePackages.js';
6
- import validateOptions from './validateOptions.js';
7
- import targets from '../../../../../config/targets.json' with { type: 'json' };
8
- import { rootResolutionFileExtensions } from '../../../../../config/fileResolutionExtensions.js';
9
- class SkuWebpackPlugin {
4
+ import { makeJsLoaders, makeExternalCssLoaders, makeSvgLoaders, TYPESCRIPT, JAVASCRIPT, IMAGE, SVG, resolvePackage, } from '../utils/index.js';
5
+ import defaultCompilePackages from '../../../../context/defaultCompilePackages.js';
6
+ import { validateOptions, } from './validateOptions.js';
7
+ import targets from '../../../../config/targets.json' with { type: 'json' };
8
+ import { rootResolutionFileExtensions } from '../../../../config/fileResolutionExtensions.js';
9
+ export class SkuWebpackPlugin {
10
10
  options;
11
11
  compilePackages;
12
12
  include;
@@ -170,4 +170,5 @@ class SkuWebpackPlugin {
170
170
  }
171
171
  }
172
172
  }
173
+ /** @deprecated Please use the named `SkuWebpackPlugin` export */
173
174
  export default SkuWebpackPlugin;
@@ -12,5 +12,4 @@ export type SkuWebpackPluginOptions = {
12
12
  displayNamesProd?: boolean;
13
13
  rootResolution?: boolean;
14
14
  };
15
- declare const validateOptions: (options: SkuWebpackPluginOptions) => void;
16
- export default validateOptions;
15
+ export declare const validateOptions: (options: SkuWebpackPluginOptions) => void;
@@ -2,7 +2,7 @@ import Validator from 'fastest-validator';
2
2
  import browserslist from 'browserslist';
3
3
  import chalk from 'chalk';
4
4
  import { closest } from 'fastest-levenshtein';
5
- import { hasErrorMessage } from '../../../../../utils/error-guards.js';
5
+ import { hasErrorMessage } from '../../../../utils/error-guards.js';
6
6
  // @ts-expect-error
7
7
  const validator = new Validator();
8
8
  const exitWithErrors = async (errors) => {
@@ -67,7 +67,7 @@ const schema = {
67
67
  };
68
68
  const validate = validator.compile(schema);
69
69
  const availableOptions = Object.keys(schema);
70
- const validateOptions = (options) => {
70
+ export const validateOptions = (options) => {
71
71
  const errors = [];
72
72
  // Validate extra keys
73
73
  Object.keys(options)
@@ -105,4 +105,3 @@ const validateOptions = (options) => {
105
105
  exitWithErrors(errors);
106
106
  }
107
107
  };
108
- export default validateOptions;
@@ -8,8 +8,8 @@ import LoadablePlugin from '@loadable/webpack-plugin';
8
8
  import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
9
9
  import TerserPlugin from 'terser-webpack-plugin';
10
10
  import { bundleAnalyzerPlugin } from './plugins/bundleAnalyzer.js';
11
- import SkuWebpackPlugin from './plugins/sku-webpack-plugin/index.js';
12
- import MetricsPlugin from './plugins/metrics-plugin/index.js';
11
+ import { SkuWebpackPlugin } from './plugins/skuWebpackPlugin.js';
12
+ import { MetricsPlugin } from './plugins/metricsPlugin.js';
13
13
  import { VocabWebpackPlugin } from '@vocab/webpack';
14
14
  import { JAVASCRIPT, resolvePackage } from './utils/index.js';
15
15
  import { cwd } from '../../../utils/cwd.js';
@@ -8,8 +8,8 @@ import { findUpSync } from 'find-up';
8
8
  import LoadablePlugin from '@loadable/webpack-plugin';
9
9
  import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
10
10
  import TerserPlugin from 'terser-webpack-plugin';
11
- import SkuWebpackPlugin from './plugins/sku-webpack-plugin/index.js';
12
- import MetricsPlugin from './plugins/metrics-plugin/index.js';
11
+ import { SkuWebpackPlugin } from './plugins/skuWebpackPlugin.js';
12
+ import { MetricsPlugin } from './plugins/metricsPlugin.js';
13
13
  import { VocabWebpackPlugin } from '@vocab/webpack';
14
14
  import { bundleAnalyzerPlugin } from './plugins/bundleAnalyzer.js';
15
15
  import { JAVASCRIPT, resolvePackage } from './utils/index.js';
@@ -1,5 +1,5 @@
1
1
  import { match } from 'path-to-regexp';
2
- import getSiteForHost from './contextUtils/getSiteForHost.js';
2
+ import { getSiteForHost } from '../context/getSiteForHost.js';
3
3
  /**
4
4
  * Finds the appropriate route for a given URL
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sku",
3
- "version": "14.10.1",
3
+ "version": "14.11.0",
4
4
  "description": "Front-end development toolkit, powered by Webpack, Babel, Vanilla Extract and Jest",
5
5
  "types": "./dist/index.d.ts",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "types": "./dist/services/vite/client.d.ts"
31
31
  },
32
32
  "./@loadable/component": "./src/@loadable/component/index.ts",
33
- "./webpack-plugin": "./dist/services/webpack/config/plugins/sku-webpack-plugin/index.js",
33
+ "./webpack-plugin": "./dist/services/webpack/config/plugins/skuWebpackPlugin.js",
34
34
  "./package.json": "./package.json"
35
35
  },
36
36
  "engines": {
@@ -17,10 +17,11 @@ try {
17
17
 
18
18
  try {
19
19
  packageJsonContents = await readFile(packageJson, 'utf-8');
20
- } catch (error) {
21
- console.error(`Failed to read package.json file at ${packageJson}`);
22
- console.error(error);
23
- process.exit(1);
20
+ } catch {
21
+ console.log(
22
+ `package.json file does not exist at ${packageJson}. Skipping sku postinstall.`,
23
+ );
24
+ process.exit(0);
24
25
  }
25
26
 
26
27
  const {
@@ -1 +0,0 @@
1
- export declare const getServerEntry: () => void;
@@ -1 +0,0 @@
1
- export const getServerEntry = () => { };
@@ -1,3 +0,0 @@
1
- import type { SkuContext } from '../../context/createSkuContext.js';
2
- declare const getSiteForHost: (hostname: string, defaultSite: string | undefined, sites: SkuContext["sites"]) => string | undefined;
3
- export default getSiteForHost;