sku 16.5.0 → 16.6.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.
- package/CHANGELOG.md +31 -0
- package/dist/@loadable/component.mjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +2 -3
- package/dist/bin/sku.mjs +1 -2
- package/dist/config/babel.mjs +1 -2
- package/dist/config/eslint/ignores.mjs +1 -2
- package/dist/config/eslint/importOrder.mjs +1 -2
- package/dist/config/eslint/jsonFiles.mjs +1 -2
- package/dist/config/eslint/plugins/package-json.mjs +1 -2
- package/dist/config/eslint.d.mts +0 -2
- package/dist/config/eslint.mjs +2 -3
- package/dist/config/fileResolutionExtensions.mjs +1 -2
- package/dist/config/prettier.d.mts +0 -2
- package/dist/config/prettier.mjs +1 -2
- package/dist/config/storybook/viteConfig.d.mts +0 -2
- package/dist/config/storybook/viteConfig.mjs +1 -2
- package/dist/config/storybook/webpackConfig.d.mts +0 -2
- package/dist/config/storybook/webpackConfig.mjs +3 -4
- package/dist/config/targets.mjs +1 -2
- package/dist/context/cjsInteropDeps.mjs +1 -2
- package/dist/context/configPath.mjs +1 -2
- package/dist/context/configSchema.mjs +2 -2
- package/dist/context/createSkuContext.mjs +4 -3
- package/dist/context/defaultClientEntry.mjs +1 -2
- package/dist/context/defaultCompilePackages.mjs +1 -2
- package/dist/context/defaultSkuConfig.mjs +2 -2
- package/dist/context/getSiteForHost.mjs +1 -2
- package/dist/context/hosts.mjs +3 -4
- package/dist/context/hostsFile.mjs +2 -3
- package/dist/context/resolveEnvironment.mjs +1 -2
- package/dist/context/validateConfig.mjs +10 -4
- package/dist/context/validatePathAliases.mjs +1 -2
- package/dist/entries/ssr-client.dev.mjs +1 -2
- package/dist/entries/ssr-client.mjs +1 -2
- package/dist/entries/ssr-server.d.mts +0 -2
- package/dist/entries/ssr-server.mjs +2 -3
- package/dist/entries/vite-client.mjs +1 -2
- package/dist/entries/vite-render.d.mts +0 -2
- package/dist/entries/vite-render.mjs +1 -2
- package/dist/jest/file-mock.d.mts +0 -2
- package/dist/jest/file-mock.mjs +1 -2
- package/dist/jest/js-transform.d.mts +0 -2
- package/dist/jest/js-transform.mjs +1 -2
- package/dist/jest/ts-transform.d.mts +0 -2
- package/dist/jest/ts-transform.mjs +1 -2
- package/dist/jest-preset.d.mts +0 -2
- package/dist/jest-preset.mjs +1 -2
- package/dist/node_modules/.pnpm/ansi-regex@6.5.0/node_modules/ansi-regex/index.mjs +9 -0
- package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.mjs +1 -2
- package/dist/node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs +1 -2
- package/dist/node_modules/.pnpm/{get-east-asian-width@1.6.0 → get-east-asian-width@1.7.0}/node_modules/get-east-asian-width/index.mjs +3 -4
- package/dist/node_modules/.pnpm/{get-east-asian-width@1.6.0 → get-east-asian-width@1.7.0}/node_modules/get-east-asian-width/lookup-data.mjs +18 -13
- package/dist/node_modules/.pnpm/{get-east-asian-width@1.6.0 → get-east-asian-width@1.7.0}/node_modules/get-east-asian-width/lookup.mjs +3 -4
- package/dist/node_modules/.pnpm/{get-east-asian-width@1.6.0 → get-east-asian-width@1.7.0}/node_modules/get-east-asian-width/utilities.mjs +1 -2
- package/dist/node_modules/.pnpm/indent-string@5.0.0/node_modules/indent-string/index.mjs +1 -2
- package/dist/node_modules/.pnpm/package-manager-detector@0.2.11/node_modules/package-manager-detector/dist/commands.mjs +1 -2
- package/dist/node_modules/.pnpm/package-manager-detector@0.2.11/node_modules/package-manager-detector/dist/constants.mjs +1 -2
- package/dist/node_modules/.pnpm/package-manager-detector@0.2.11/node_modules/package-manager-detector/dist/detect.mjs +2 -3
- package/dist/node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/index.mjs +1 -2
- package/dist/node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/macro.mjs +1 -2
- package/dist/node_modules/.pnpm/{rolldown@1.2.2 → rolldown@1.2.16}/node_modules/rolldown/dist/filter-index.mjs +1 -2
- package/dist/node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.mjs +2 -3
- package/dist/node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.mjs +2 -3
- package/dist/node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.mjs +2 -3
- package/dist/openBrowser.mjs +2 -3
- package/dist/package.mjs +1 -2
- package/dist/packages/sku/package.mjs +2 -3
- package/dist/private/utils/src/console/banner.mjs +2 -3
- package/dist/private/utils/src/console/styles.mjs +1 -2
- package/dist/private/utils/src/filesystem/cwd.mjs +1 -2
- package/dist/private/utils/src/filesystem/index.mjs +1 -2
- package/dist/private/utils/src/packageManager/index.mjs +1 -2
- package/dist/private/utils/src/packageManager/packageManager.mjs +1 -2
- package/dist/private/utils/src/packageManager/skuPackageManager.mjs +0 -1
- package/dist/private/utils/src/path/toPosixPath.mjs +1 -2
- package/dist/private/utils/src/serverUrls.mjs +1 -2
- package/dist/program/commands/build/build.action.mjs +1 -2
- package/dist/program/commands/build/build.command.mjs +1 -2
- package/dist/program/commands/build/vite-build-handler.mjs +6 -7
- package/dist/program/commands/build/webpack-build-handler.mjs +18 -10
- package/dist/program/commands/build-ssr/build-ssr.action.mjs +14 -7
- package/dist/program/commands/build-ssr/build-ssr.command.mjs +1 -2
- package/dist/program/commands/configure/configure.action.mjs +1 -2
- package/dist/program/commands/configure/configure.command.mjs +1 -2
- package/dist/program/commands/format/format.action.mjs +3 -4
- package/dist/program/commands/format/format.command.mjs +1 -2
- package/dist/program/commands/index.mjs +1 -2
- package/dist/program/commands/lint/lint.action.mjs +5 -6
- package/dist/program/commands/lint/lint.command.mjs +1 -2
- package/dist/program/commands/serve/serve.action.mjs +42 -18
- package/dist/program/commands/serve/serve.command.mjs +1 -2
- package/dist/program/commands/setup-hosts/setup-hosts.action.mjs +2 -3
- package/dist/program/commands/setup-hosts/setup-hosts.command.mjs +1 -2
- package/dist/program/commands/start/start.action.mjs +5 -6
- package/dist/program/commands/start/start.command.mjs +2 -3
- package/dist/program/commands/start/vite-start-handler.mjs +2 -3
- package/dist/program/commands/start/webpack-start-handler.mjs +6 -7
- package/dist/program/commands/start-ssr/start-ssr.action.mjs +1 -2
- package/dist/program/commands/start-ssr/start-ssr.command.mjs +1 -2
- package/dist/program/commands/start-ssr/webpack-start-ssr-handler.mjs +8 -9
- package/dist/program/commands/test/jest-test-handler.mjs +1 -2
- package/dist/program/commands/test/test.action.mjs +1 -2
- package/dist/program/commands/test/test.command.mjs +1 -2
- package/dist/program/commands/test/vitest-test-handler.mjs +2 -3
- package/dist/program/commands/translations/commands/compile/compile.action.mjs +3 -4
- package/dist/program/commands/translations/commands/compile/compile.command.mjs +1 -2
- package/dist/program/commands/translations/commands/index.mjs +1 -2
- package/dist/program/commands/translations/commands/pull/pull.action.mjs +3 -4
- package/dist/program/commands/translations/commands/pull/pull.command.mjs +1 -2
- package/dist/program/commands/translations/commands/push/auto-translate.option.mjs +1 -2
- package/dist/program/commands/translations/commands/push/delete-unused-keys.option.mjs +1 -2
- package/dist/program/commands/translations/commands/push/push.action.mjs +3 -4
- package/dist/program/commands/translations/commands/push/push.command.mjs +1 -2
- package/dist/program/commands/translations/commands/validate/validate.action.mjs +3 -4
- package/dist/program/commands/translations/commands/validate/validate.command.mjs +1 -2
- package/dist/program/commands/translations/helpers/translation-helpers.mjs +1 -2
- package/dist/program/commands/translations/translations.command.mjs +1 -2
- package/dist/program/hooks/preAction/preAction.hook.mjs +1 -2
- package/dist/program/index.mjs +2 -3
- package/dist/program/options/config.option.mjs +1 -2
- package/dist/program/options/convertLoadable.option.mjs +1 -2
- package/dist/program/options/debug.option.mjs +1 -2
- package/dist/program/options/environment.option.mjs +1 -2
- package/dist/program/options/list-urls.mjs +1 -2
- package/dist/program/options/port.option.mjs +1 -2
- package/dist/program/options/site.option.mjs +1 -2
- package/dist/program/options/stats.option.mjs +0 -1
- package/dist/program/options/watch.option.mjs +1 -2
- package/dist/runtime.d.mts +1 -1
- package/dist/services/bundlerConstants.mjs +1 -2
- package/dist/services/eslint/lint.mjs +1 -2
- package/dist/services/eslint/runESLint.mjs +2 -3
- package/dist/services/packageManager/getPnpmConfigDependencies.mjs +1 -2
- package/dist/services/packageManager/pnpmConfig.mjs +1 -2
- package/dist/services/prettier.mjs +4 -5
- package/dist/services/serverManager.mjs +1 -2
- package/dist/services/telemetry/index.mjs +1 -2
- package/dist/services/telemetry/metricsMeasurers.mjs +1 -2
- package/dist/services/telemetry/provider.mjs +1 -2
- package/dist/services/typescript/runTsc.mjs +2 -3
- package/dist/services/typescript/tsconfig.mjs +35 -26
- package/dist/services/vite/helpers/allocateClientPort.mjs +1 -2
- package/dist/services/vite/helpers/browserslist-to-esbuild.mjs +1 -2
- package/dist/services/vite/helpers/bundleConfig.mjs +11 -6
- package/dist/services/vite/helpers/config/createConfig.mjs +1 -2
- package/dist/services/vite/helpers/config/dependencyGraph.mjs +1 -2
- package/dist/services/vite/helpers/html/createPreRenderedHtml.mjs +1 -2
- package/dist/services/vite/helpers/makePluginName.mjs +1 -2
- package/dist/services/vite/helpers/prerender/prerenderConcurrently.mjs +15 -8
- package/dist/services/vite/helpers/printServerUrls.mjs +2 -3
- package/dist/services/vite/helpers/resolveManifestModuleId.mjs +1 -2
- package/dist/services/vite/helpers/serializeConfig.mjs +1 -2
- package/dist/services/vite/index.mjs +1 -2
- package/dist/services/vite/plugins/build.mjs +11 -9
- package/dist/services/vite/plugins/bundleAnalyzer.mjs +1 -2
- package/dist/services/vite/plugins/config.mjs +2 -3
- package/dist/services/vite/plugins/dangerouslySetViteConfig.mjs +1 -2
- package/dist/services/vite/plugins/devServer.mjs +2 -3
- package/dist/services/vite/plugins/entrySideEffects.mjs +2 -3
- package/dist/services/vite/plugins/esbuild/convertLoadableDepOptimizePlugin.mjs +2 -3
- package/dist/services/vite/plugins/esbuild/fixViteVanillaExtractDepScanPlugin.mjs +1 -2
- package/dist/services/vite/plugins/httpsDevServer.mjs +1 -2
- package/dist/services/vite/plugins/lazyRouteModuleId/injectLazyRouteModuleId.mjs +1 -2
- package/dist/services/vite/plugins/lazyRouteModuleId/lazyRouteModuleIdPlugin.mjs +1 -2
- package/dist/services/vite/plugins/middleware.mjs +4 -5
- package/dist/services/vite/plugins/polyfills.mjs +2 -3
- package/dist/services/vite/plugins/preloadPlugin/helpers/constants.mjs +1 -2
- package/dist/services/vite/plugins/preloadPlugin/helpers/convertWebpackToViteImport.mjs +1 -2
- package/dist/services/vite/plugins/preloadPlugin/helpers/getViteLoadableSpecifierName.mjs +1 -2
- package/dist/services/vite/plugins/preloadPlugin/helpers/getWebpackLoadableSpecifierName.mjs +1 -2
- package/dist/services/vite/plugins/preloadPlugin/helpers/injectModuleID.mjs +1 -2
- package/dist/services/vite/plugins/preloadPlugin/helpers/rewriteWebpackLoadableImports.mjs +1 -2
- package/dist/services/vite/plugins/preloadPlugin/preloadPlugin.mjs +2 -3
- package/dist/services/vite/plugins/setNoExternal.mjs +2 -3
- package/dist/services/vite/plugins/ssr.mjs +10 -8
- package/dist/services/vite/plugins/ssrCss/collect.mjs +1 -2
- package/dist/services/vite/plugins/ssrCss/constants.mjs +1 -2
- package/dist/services/vite/plugins/ssrCss/plugin.mjs +2 -3
- package/dist/services/vite/plugins/static.mjs +8 -6
- package/dist/services/vite/plugins/stripServerConfig.mjs +1 -2
- package/dist/services/vite/plugins/telemetry.mjs +2 -3
- package/dist/services/vite/plugins/telemetryClients.mjs +2 -3
- package/dist/services/vite/plugins/telemetryEvents.mjs +1 -2
- package/dist/services/vite/skuPlugin.mjs +1 -2
- package/dist/services/vite/ssr/abortReason.mjs +1 -2
- package/dist/services/vite/ssr/bindCommit.mjs +1 -2
- package/dist/services/vite/ssr/bootstrap.mjs +1 -2
- package/dist/services/vite/ssr/build.mjs +8 -6
- package/dist/services/vite/ssr/buildSiteRouteTrees.mjs +1 -2
- package/dist/services/vite/ssr/buildSiteStaticHandlers.mjs +1 -2
- package/dist/services/vite/ssr/clientManifestPath.mjs +3 -4
- package/dist/services/vite/ssr/collectRouteHeaders.mjs +1 -2
- package/dist/services/vite/ssr/createDevSsrServer.mjs +3 -4
- package/dist/services/vite/ssr/createDocumentAttempt.mjs +1 -2
- package/dist/services/vite/ssr/createHtmlRenderMiddleware.mjs +2 -3
- package/dist/services/vite/ssr/createInsertHtmlTransform.mjs +1 -2
- package/dist/services/vite/ssr/createSsrRequestContextStore.mjs +1 -2
- package/dist/services/vite/ssr/createWebRequest.mjs +1 -2
- package/dist/services/vite/ssr/csp.mjs +1 -2
- package/dist/services/vite/ssr/defineEntry.d.mts +0 -2
- package/dist/services/vite/ssr/defineEntry.mjs +1 -2
- package/dist/services/vite/ssr/documentAssets.d.mts +0 -2
- package/dist/services/vite/ssr/documentAssets.mjs +1 -2
- package/dist/services/vite/ssr/entryTypeExtractors.d.mts +0 -2
- package/dist/services/vite/ssr/getModuleIds.mjs +1 -2
- package/dist/services/vite/ssr/getStaticContextFromError.mjs +1 -2
- package/dist/services/vite/ssr/insertHtml.d.mts +0 -2
- package/dist/services/vite/ssr/insertHtml.mjs +1 -2
- package/dist/services/vite/ssr/installSsrRequestContextStorage.mjs +1 -2
- package/dist/services/vite/ssr/listen.mjs +1 -2
- package/dist/services/vite/ssr/normaliseClientContext.mjs +1 -2
- package/dist/services/vite/ssr/preloadRoute.d.mts +0 -2
- package/dist/services/vite/ssr/preloadRoute.mjs +1 -2
- package/dist/services/vite/ssr/readRoutesEntry.mjs +1 -2
- package/dist/services/vite/ssr/render.mjs +2 -3
- package/dist/services/vite/ssr/requestContext.d.mts +0 -2
- package/dist/services/vite/ssr/requestContext.mjs +1 -2
- package/dist/services/vite/ssr/resolveAssets.d.mts +0 -2
- package/dist/services/vite/ssr/resolveAssets.mjs +2 -3
- package/dist/services/vite/ssr/resolveConfigSiteNames.mjs +1 -2
- package/dist/services/vite/ssr/selectForSite.mjs +1 -2
- package/dist/services/vite/ssr/sendResponse.mjs +1 -2
- package/dist/services/vite/ssr/skuContext.d.mts +0 -2
- package/dist/services/vite/ssr/skuContext.mjs +1 -2
- package/dist/services/vite/ssr/ssrRequestContextMiddleware.mjs +1 -2
- package/dist/services/vite/ssr/ssrServerShared.mjs +0 -1
- package/dist/services/vite/ssr/start.mjs +1 -2
- package/dist/services/vite/ssr/startProductionSsrServer.mjs +2 -3
- package/dist/services/vite/ssr/streamDocument.mjs +1 -2
- package/dist/services/vite/ssr/types.d.mts +1 -3
- package/dist/services/vite/ssr/wrapPipeWithInsertHtml.mjs +1 -2
- package/dist/services/vite/static/build.mjs +18 -6
- package/dist/services/vite/static/start.mjs +2 -3
- package/dist/services/vocab/config.mjs +1 -2
- package/dist/services/vocab/runVocab.mjs +1 -2
- package/dist/services/webpack/config/cache.mjs +1 -2
- package/dist/services/webpack/config/plugins/bundleAnalyzer.mjs +1 -2
- package/dist/services/webpack/config/plugins/createHtmlRenderPlugin.mjs +8 -4
- package/dist/services/webpack/config/plugins/metricsPlugin.mjs +1 -2
- package/dist/services/webpack/config/plugins/validateOptions.d.mts +0 -2
- package/dist/services/webpack/config/plugins/validateOptions.mjs +1 -2
- package/dist/services/webpack/config/resolveModules.mjs +1 -2
- package/dist/services/webpack/config/sourceMaps.mjs +1 -2
- package/dist/services/webpack/config/statsConfig.mjs +1 -2
- package/dist/services/webpack/config/utils/index.mjs +1 -2
- package/dist/services/webpack/config/utils/loaders.mjs +1 -2
- package/dist/services/webpack/config/utils/resolvePackage.mjs +1 -2
- package/dist/services/webpack/config/webpack.config.mjs +12 -8
- package/dist/services/webpack/config/webpack.config.ssr.mjs +15 -11
- package/dist/services/webpack/entry/csp.mjs +1 -2
- package/dist/services/webpack/entry/makeExtractor.mjs +1 -2
- package/dist/services/webpack/entry/render/render-to-string.mjs +1 -2
- package/dist/services/webpack/entry/server/server.mjs +2 -3
- package/dist/services/webpack/runWebpack.mjs +1 -2
- package/dist/types/types.d.mts +18 -3
- package/dist/utils/allocatePort.mjs +1 -2
- package/dist/utils/buildFileUtils.mjs +17 -7
- package/dist/utils/certificate.mjs +2 -3
- package/dist/utils/configure.mjs +3 -4
- package/dist/utils/configureApp.mjs +3 -4
- package/dist/utils/constants/clientContextKey.mjs +1 -2
- package/dist/utils/copyDirContents.mjs +1 -2
- package/dist/utils/coverageFolder.mjs +3 -0
- package/dist/utils/createServer.mjs +1 -2
- package/dist/utils/csp.mjs +1 -2
- package/dist/utils/debug.mjs +1 -2
- package/dist/utils/detectUnnecessaryPolyfillsFromConfig.mjs +1 -2
- package/dist/utils/detectUnnecessaryPolyfillsFromDependencies.mjs +1 -2
- package/dist/utils/distDirectories.mjs +17 -0
- package/dist/utils/error-guards.mjs +1 -2
- package/dist/utils/execAsync.mjs +1 -2
- package/dist/utils/exists.mjs +1 -2
- package/dist/utils/formatMs.mjs +1 -2
- package/dist/utils/isCI.mjs +1 -2
- package/dist/utils/language-utils.mjs +6 -5
- package/dist/utils/pathAliasImports.mjs +2 -3
- package/dist/utils/polyfillDetector.mjs +1 -2
- package/dist/utils/polyfillRegistry.mjs +1 -2
- package/dist/utils/polyfillWarnings.mjs +3 -4
- package/dist/utils/resolvePolyfills.mjs +1 -2
- package/dist/utils/routeMatcher.mjs +1 -2
- package/dist/utils/runBin.mjs +1 -2
- package/dist/utils/runLintChecks.mjs +1 -2
- package/dist/utils/suggestScript.mjs +1 -2
- package/dist/utils/validatePeerDeps.mjs +1 -2
- package/dist/utils/validateSkuConfigFormat.mjs +1 -2
- package/dist/utils/warnOnLegacyReact.mjs +1 -2
- package/dist/vite/prerender-worker.mjs +8 -6
- package/dist/webpack/client.mjs +1 -2
- package/dist/webpack/library-render.d.mts +0 -2
- package/dist/webpack/library-render.mjs +1 -2
- package/dist/webpack/render.d.mts +0 -2
- package/dist/webpack/render.mjs +3 -4
- package/dist/webpack/server.mjs +1 -2
- package/dist/webpack-plugin.d.mts +0 -2
- package/dist/webpack-plugin.mjs +3 -4
- package/package.json +2 -2
- package/dist/node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.mjs +0 -6
|
@@ -2,12 +2,11 @@ import { pullCommand } from "./pull/pull.command.mjs";
|
|
|
2
2
|
import { pushCommand } from "./push/push.command.mjs";
|
|
3
3
|
import { compileCommand } from "./compile/compile.command.mjs";
|
|
4
4
|
import { validateCommand } from "./validate/validate.command.mjs";
|
|
5
|
-
|
|
5
|
+
// src/program/commands/translations/commands/index.ts
|
|
6
6
|
const commands = [
|
|
7
7
|
pullCommand,
|
|
8
8
|
pushCommand,
|
|
9
9
|
compileCommand,
|
|
10
10
|
validateCommand
|
|
11
11
|
];
|
|
12
|
-
//#endregion
|
|
13
12
|
export { commands };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { accentLight, strong } from "../../../../../private/utils/src/console/styles.mjs";
|
|
2
|
-
import "../../../../../private/utils/src/console/index.mjs";
|
|
3
|
-
import { configureProject } from "../../../../../utils/configure.mjs";
|
|
4
2
|
import { ensureBranch, getResolvedVocabConfig } from "../../helpers/translation-helpers.mjs";
|
|
3
|
+
import { configureProject } from "../../../../../utils/configure.mjs";
|
|
4
|
+
import "../../../../../private/utils/src/console/index.mjs";
|
|
5
5
|
import { pull } from "@vocab/phrase";
|
|
6
|
-
|
|
6
|
+
// src/program/commands/translations/commands/pull/pull.action.ts
|
|
7
7
|
const log = (message) => console.log(accentLight(message));
|
|
8
8
|
const pullAction = async ({ skuContext }) => {
|
|
9
9
|
await configureProject(skuContext);
|
|
@@ -21,5 +21,4 @@ const pullAction = async ({ skuContext }) => {
|
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { pullAction };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
|
|
2
|
+
// src/program/commands/translations/commands/pull/pull.command.ts
|
|
3
3
|
const pullCommand = new Command("pull").description("Pull translations from Phrase").action(async (options) => {
|
|
4
4
|
const { pullAction } = await import("./pull.action.mjs");
|
|
5
5
|
await pullAction(options);
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { pullCommand };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Option } from "commander";
|
|
2
|
-
|
|
2
|
+
// src/program/commands/translations/commands/push/auto-translate.option.ts
|
|
3
3
|
const autoTranslateOption = new Option("--auto-translate", "Enable automatic translation for missing translations").default(false);
|
|
4
|
-
//#endregion
|
|
5
4
|
export { autoTranslateOption };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Option } from "commander";
|
|
2
|
-
|
|
2
|
+
// src/program/commands/translations/commands/push/delete-unused-keys.option.ts
|
|
3
3
|
const deleteUnusedKeysOption = new Option("--delete-unused-keys", "delete unused keys").default(false);
|
|
4
|
-
//#endregion
|
|
5
4
|
export { deleteUnusedKeysOption };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { accentLight, strong } from "../../../../../private/utils/src/console/styles.mjs";
|
|
2
|
-
import "../../../../../private/utils/src/console/index.mjs";
|
|
3
|
-
import { configureProject } from "../../../../../utils/configure.mjs";
|
|
4
2
|
import { ensureBranch, getResolvedVocabConfig } from "../../helpers/translation-helpers.mjs";
|
|
3
|
+
import { configureProject } from "../../../../../utils/configure.mjs";
|
|
4
|
+
import "../../../../../private/utils/src/console/index.mjs";
|
|
5
5
|
import { push } from "@vocab/phrase";
|
|
6
|
-
|
|
6
|
+
// src/program/commands/translations/commands/push/push.action.ts
|
|
7
7
|
const log = (message) => console.log(accentLight(message));
|
|
8
8
|
const pushAction = async ({ autoTranslate, deleteUnusedKeys, skuContext }) => {
|
|
9
9
|
await configureProject(skuContext);
|
|
@@ -25,5 +25,4 @@ const pushAction = async ({ autoTranslate, deleteUnusedKeys, skuContext }) => {
|
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { pushAction };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { deleteUnusedKeysOption } from "./delete-unused-keys.option.mjs";
|
|
2
2
|
import { autoTranslateOption } from "./auto-translate.option.mjs";
|
|
3
3
|
import { Command } from "commander";
|
|
4
|
-
|
|
4
|
+
// src/program/commands/translations/commands/push/push.command.ts
|
|
5
5
|
const pushCommand = new Command("push").description("Push translations to Phrase").addOption(autoTranslateOption).addOption(deleteUnusedKeysOption).action(async (options) => {
|
|
6
6
|
const { pushAction } = await import("./push.action.mjs");
|
|
7
7
|
await pushAction(options);
|
|
8
8
|
});
|
|
9
|
-
//#endregion
|
|
10
9
|
export { pushCommand };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { accentLight, strong } from "../../../../../private/utils/src/console/styles.mjs";
|
|
2
|
-
import "../../../../../private/utils/src/console/index.mjs";
|
|
3
|
-
import { configureProject } from "../../../../../utils/configure.mjs";
|
|
4
2
|
import { getResolvedVocabConfig } from "../../helpers/translation-helpers.mjs";
|
|
3
|
+
import { configureProject } from "../../../../../utils/configure.mjs";
|
|
4
|
+
import "../../../../../private/utils/src/console/index.mjs";
|
|
5
5
|
import { validate } from "@vocab/core";
|
|
6
|
-
|
|
6
|
+
// src/program/commands/translations/commands/validate/validate.action.ts
|
|
7
7
|
const log = (message) => console.log(accentLight(message));
|
|
8
8
|
const validateAction = async ({ skuContext }) => {
|
|
9
9
|
await configureProject(skuContext);
|
|
@@ -20,5 +20,4 @@ const validateAction = async ({ skuContext }) => {
|
|
|
20
20
|
process.exit(1);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { validateAction };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
|
|
2
|
+
// src/program/commands/translations/commands/validate/validate.command.ts
|
|
3
3
|
const validateCommand = new Command("validate").description("Validate .vocab files").action(async (options) => {
|
|
4
4
|
const { validateAction } = await import("./validate.action.mjs");
|
|
5
5
|
await validateAction(options);
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { validateCommand };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getVocabConfig } from "../../../../services/vocab/config.mjs";
|
|
2
2
|
import { resolveConfig } from "@vocab/core";
|
|
3
3
|
import { execSync } from "node:child_process";
|
|
4
|
-
|
|
4
|
+
// src/program/commands/translations/helpers/translation-helpers.ts
|
|
5
5
|
const ensureBranch = async () => {
|
|
6
6
|
const branch = getGitBranch();
|
|
7
7
|
if (!branch) throw new Error("Unable to determine branch from environment variables. Branch is required for this command.");
|
|
@@ -31,5 +31,4 @@ function getGitBranch() {
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { ensureBranch, getResolvedVocabConfig };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { commands } from "./commands/index.mjs";
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
|
|
3
|
+
// src/program/commands/translations/translations.command.ts
|
|
4
4
|
const translationsCommand = new Command("translations").description("Manage vocab translations");
|
|
5
5
|
for (const command of commands) translationsCommand.addCommand(command);
|
|
6
|
-
//#endregion
|
|
7
6
|
export { translationsCommand };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getSkuContext } from "../../../context/createSkuContext.mjs";
|
|
2
2
|
import { setGlobalTags } from "../../../services/telemetry/index.mjs";
|
|
3
|
-
|
|
3
|
+
// src/program/hooks/preAction/preAction.hook.ts
|
|
4
4
|
const preActionHook = async (rootCommand, actionCommand) => {
|
|
5
5
|
const { port, strictPort } = actionCommand.opts();
|
|
6
6
|
const skuContext = await getSkuContext({
|
|
@@ -14,5 +14,4 @@ const preActionHook = async (rootCommand, actionCommand) => {
|
|
|
14
14
|
setGlobalTags(skuContext);
|
|
15
15
|
actionCommand.setOptionValue("skuContext", skuContext);
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { preActionHook };
|
package/dist/program/index.mjs
CHANGED
|
@@ -3,14 +3,13 @@ import { debugOption } from "./options/debug.option.mjs";
|
|
|
3
3
|
import { configOption } from "./options/config.option.mjs";
|
|
4
4
|
import { environmentOption } from "./options/environment.option.mjs";
|
|
5
5
|
import { initDebug } from "../utils/debug.mjs";
|
|
6
|
-
import package_default from "../packages/sku/package.mjs";
|
|
7
6
|
import { preActionHook } from "./hooks/preAction/preAction.hook.mjs";
|
|
7
|
+
import package_default from "../packages/sku/package.mjs";
|
|
8
8
|
import { Command } from "commander";
|
|
9
|
-
|
|
9
|
+
// src/program/index.ts
|
|
10
10
|
const { name, description, version } = package_default;
|
|
11
11
|
const program = new Command().name(name).description(description).version(version).allowUnknownOption(true).addOption(environmentOption).addOption(configOption).addOption(debugOption).on("option:debug", () => {
|
|
12
12
|
if (program.opts()?.debug) initDebug();
|
|
13
13
|
}).hook("preAction", preActionHook);
|
|
14
14
|
for (const command of commands) program.addCommand(command);
|
|
15
|
-
//#endregion
|
|
16
15
|
export { program };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Option } from "commander";
|
|
2
|
-
|
|
2
|
+
// src/program/options/convertLoadable.option.ts
|
|
3
3
|
const convertLoadableOption = new Option("--convert-loadable", "Convert webpack loadable imports to vite imports. Only works when using vite as the bundler.").default(false);
|
|
4
|
-
//#endregion
|
|
5
4
|
export { convertLoadableOption };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Option } from "commander";
|
|
2
|
-
|
|
2
|
+
// src/program/options/environment.option.ts
|
|
3
3
|
const environmentOption = new Option("-e, --environment [environment]", "program environment to run in");
|
|
4
|
-
//#endregion
|
|
5
4
|
export { environmentOption };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Option } from "commander";
|
|
2
|
-
|
|
2
|
+
// src/program/options/port.option.ts
|
|
3
3
|
const portOption = new Option("--port [port]", "Port to serve on").argParser(Number);
|
|
4
4
|
const strictPortOption = new Option("--strict-port", "Fail if the requested port is unavailable").default(false);
|
|
5
|
-
//#endregion
|
|
6
5
|
export { portOption, strictPortOption };
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SiteOf } from "./services/vite/ssr/entryTypeExtractors.mjs";
|
|
2
|
-
import { JsonValue, MapRoutePath, MapRoutePathArgs, SkuClientEntry, SkuMiddleware, SkuOnHydrate, SkuOnListen, SkuRouteObject, SkuServerEntry } from "./services/vite/ssr/types.mjs";
|
|
3
2
|
import { defineClientEntry, defineServerEntry } from "./services/vite/ssr/defineEntry.mjs";
|
|
3
|
+
import { JsonValue, MapRoutePath, MapRoutePathArgs, SkuClientEntry, SkuMiddleware, SkuOnHydrate, SkuOnListen, SkuRouteObject, SkuServerEntry } from "./services/vite/ssr/types.mjs";
|
|
4
4
|
import { createSkuContexts } from "#runtime/skuContext";
|
|
5
5
|
import { usePreloadRoute } from "#runtime/preloadRoute";
|
|
6
6
|
import { getCspNonce } from "#runtime/requestContext";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { accentLight, caution, secondary } from "../../private/utils/src/console/styles.mjs";
|
|
2
|
-
import "../../private/utils/src/console/index.mjs";
|
|
3
2
|
import { lintExtensions } from "./lint.mjs";
|
|
3
|
+
import "../../private/utils/src/console/index.mjs";
|
|
4
4
|
import assert from "node:assert";
|
|
5
5
|
import { loadESLint } from "eslint";
|
|
6
|
-
|
|
6
|
+
// src/services/eslint/runESLint.ts
|
|
7
7
|
const extensions = lintExtensions.map((ext) => `.${ext}`);
|
|
8
8
|
const runESLint = async ({ fix = false, paths }) => {
|
|
9
9
|
console.log(accentLight(`${fix ? "Fixing" : "Checking"} code with ESLint`));
|
|
@@ -52,5 +52,4 @@ const fix = (options) => runESLint({
|
|
|
52
52
|
fix: true,
|
|
53
53
|
paths: options?.paths
|
|
54
54
|
});
|
|
55
|
-
//#endregion
|
|
56
55
|
export { check, fix };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { execAsync } from "../../utils/execAsync.mjs";
|
|
2
|
-
|
|
2
|
+
// src/services/packageManager/getPnpmConfigDependencies.ts
|
|
3
3
|
const getPnpmConfigDependencies = async () => {
|
|
4
4
|
const rawResult = await execAsync(`pnpm config get --json`);
|
|
5
5
|
if (!rawResult) return [];
|
|
@@ -8,5 +8,4 @@ const getPnpmConfigDependencies = async () => {
|
|
|
8
8
|
if (!configDependencies) return [];
|
|
9
9
|
return Object.keys(configDependencies);
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { getPnpmConfigDependencies };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { accent } from "../../private/utils/src/console/styles.mjs";
|
|
2
2
|
import { banner } from "../../private/utils/src/console/banner.mjs";
|
|
3
3
|
import "../../private/utils/src/console/index.mjs";
|
|
4
|
-
|
|
4
|
+
// src/services/packageManager/pnpmConfig.ts
|
|
5
5
|
const validatePnpmConfig = async ({ hasRecommendedPnpmVersionInstalled, pnpmPluginSkuInstalled }) => {
|
|
6
6
|
if (!pnpmPluginSkuInstalled || !hasRecommendedPnpmVersionInstalled) {
|
|
7
7
|
const messages = [];
|
|
@@ -10,5 +10,4 @@ const validatePnpmConfig = async ({ hasRecommendedPnpmVersionInstalled, pnpmPlug
|
|
|
10
10
|
banner("caution", "pnpm-plugin-sku is not configured correctly", messages);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { validatePnpmConfig };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getPathFromCwd } from "../private/utils/src/filesystem/cwd.mjs";
|
|
2
2
|
import { accentLight, critical, secondary } from "../private/utils/src/console/styles.mjs";
|
|
3
|
-
import "../private/utils/src/index.mjs";
|
|
4
|
-
import "../private/utils/src/console/index.mjs";
|
|
5
3
|
import exists from "../utils/exists.mjs";
|
|
6
|
-
import { suggestScript } from "../utils/suggestScript.mjs";
|
|
7
4
|
import { runBin } from "../utils/runBin.mjs";
|
|
8
|
-
|
|
5
|
+
import "../private/utils/src/index.mjs";
|
|
6
|
+
import { suggestScript } from "../utils/suggestScript.mjs";
|
|
7
|
+
import "../private/utils/src/console/index.mjs";
|
|
8
|
+
// src/services/prettier.ts
|
|
9
9
|
const prettierIgnorePath = getPathFromCwd(".prettierignore");
|
|
10
10
|
const prettierConfigPath = import.meta.resolve("sku/config/prettier");
|
|
11
11
|
const runPrettier = async ({ write, listDifferent, paths }) => {
|
|
@@ -40,5 +40,4 @@ const write = (paths) => runPrettier({
|
|
|
40
40
|
write: true,
|
|
41
41
|
paths
|
|
42
42
|
});
|
|
43
|
-
//#endregion
|
|
44
43
|
export { check, write };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createDebug } from "obug";
|
|
2
2
|
import cluster from "node:cluster";
|
|
3
|
-
|
|
3
|
+
// src/services/serverManager.ts
|
|
4
4
|
const log = createDebug("sku:server-watcher");
|
|
5
5
|
function createServerManager(serverFilePath) {
|
|
6
6
|
let activeWorker;
|
|
@@ -45,5 +45,4 @@ function createServerManager(serverFilePath) {
|
|
|
45
45
|
kill: killIfNotDead
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
//#endregion
|
|
49
48
|
export { createServerManager };
|
|
@@ -5,7 +5,7 @@ import provider, { registerGlobalTags } from "./provider.mjs";
|
|
|
5
5
|
import package_default from "../../packages/sku/package.mjs";
|
|
6
6
|
import { createDebug } from "obug";
|
|
7
7
|
import os from "node:os";
|
|
8
|
-
|
|
8
|
+
// src/services/telemetry/index.ts
|
|
9
9
|
const log = createDebug("sku:telemetry");
|
|
10
10
|
const computeGlobalTags = ({ languages, bundler }) => {
|
|
11
11
|
let projectName = "unknown";
|
|
@@ -38,5 +38,4 @@ const setGlobalTags = (skuContext) => {
|
|
|
38
38
|
registerGlobalTags(() => computeGlobalTags(skuContext));
|
|
39
39
|
};
|
|
40
40
|
var telemetry_default = provider;
|
|
41
|
-
//#endregion
|
|
42
41
|
export { telemetry_default as default, setGlobalTags };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createDebug } from "obug";
|
|
2
|
-
|
|
2
|
+
// src/services/telemetry/metricsMeasurers.ts
|
|
3
3
|
const log = createDebug("sku:metrics");
|
|
4
4
|
const skuStartMarkName = "skuStartComplete";
|
|
5
5
|
const skuStart = {
|
|
@@ -29,5 +29,4 @@ const metricsMeasurers = {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { metricsMeasurers };
|
|
@@ -4,7 +4,7 @@ import { banner } from "../../private/utils/src/console/banner.mjs";
|
|
|
4
4
|
import "../../private/utils/src/console/index.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { createDebug } from "obug";
|
|
7
|
-
|
|
7
|
+
// src/services/telemetry/provider.ts
|
|
8
8
|
const require = createRequire(import.meta.url);
|
|
9
9
|
const debug = createDebug("sku:telemetry");
|
|
10
10
|
const noopDebug = (functionName) => (...args) => {
|
|
@@ -83,5 +83,4 @@ const provider = {
|
|
|
83
83
|
await activeProvider.close();
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
//#endregion
|
|
87
86
|
export { provider as default, registerGlobalTags };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cwd } from "../../private/utils/src/filesystem/cwd.mjs";
|
|
2
2
|
import { accentLight, secondary } from "../../private/utils/src/console/styles.mjs";
|
|
3
|
-
import "../../private/utils/src/index.mjs";
|
|
4
3
|
import "../../private/utils/src/console/index.mjs";
|
|
5
4
|
import { runBin } from "../../utils/runBin.mjs";
|
|
6
|
-
|
|
5
|
+
import "../../private/utils/src/index.mjs";
|
|
6
|
+
// src/services/typescript/runTsc.ts
|
|
7
7
|
const runTsc = async (pathsToCheck) => {
|
|
8
8
|
if (pathsToCheck && pathsToCheck.length > 0) {
|
|
9
9
|
console.log(accentLight(`Skipping TypeScript check`));
|
|
@@ -23,5 +23,4 @@ const runTsc = async (pathsToCheck) => {
|
|
|
23
23
|
options: { stdio: "inherit" }
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { runTsc };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { requireFromCwd } from "../../private/utils/src/filesystem/cwd.mjs";
|
|
2
2
|
import "../../private/utils/src/index.mjs";
|
|
3
|
-
|
|
3
|
+
import { bundleReportFolder } from "../webpack/config/plugins/bundleAnalyzer.mjs";
|
|
4
|
+
import { coverageFolder } from "../../utils/coverageFolder.mjs";
|
|
5
|
+
// src/services/typescript/tsconfig.ts
|
|
4
6
|
const generateTypeScriptPaths = (pathAliases) => {
|
|
5
7
|
if (!pathAliases || Object.keys(pathAliases).length === 0) return;
|
|
6
8
|
return Object.fromEntries(Object.entries(pathAliases).map(([alias, destination]) => [alias, [destination]]));
|
|
@@ -17,36 +19,43 @@ const hasTypesInstalledForPackage = (packageName) => {
|
|
|
17
19
|
return false;
|
|
18
20
|
}
|
|
19
21
|
};
|
|
20
|
-
const createTSConfig = ({ tsconfigDecorator, testRunner, pathAliases }) => {
|
|
22
|
+
const createTSConfig = ({ tsconfigDecorator, testRunner, pathAliases, paths }) => {
|
|
21
23
|
const tsPaths = generateTypeScriptPaths(pathAliases);
|
|
22
24
|
const makeTypes = () => {
|
|
23
25
|
const types = ["node"];
|
|
24
26
|
if (testRunner === "jest" && hasTypesInstalledForPackage("jest")) types.push("jest");
|
|
25
27
|
return types;
|
|
26
28
|
};
|
|
27
|
-
return tsconfigDecorator({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
29
|
+
return tsconfigDecorator({
|
|
30
|
+
compilerOptions: {
|
|
31
|
+
noEmit: true,
|
|
32
|
+
incremental: true,
|
|
33
|
+
outDir: "node_modules",
|
|
34
|
+
skipLibCheck: true,
|
|
35
|
+
moduleResolution: "bundler",
|
|
36
|
+
module: "es2022",
|
|
37
|
+
allowImportingTsExtensions: true,
|
|
38
|
+
allowSyntheticDefaultImports: true,
|
|
39
|
+
allowJs: true,
|
|
40
|
+
esModuleInterop: true,
|
|
41
|
+
isolatedModules: true,
|
|
42
|
+
resolveJsonModule: true,
|
|
43
|
+
verbatimModuleSyntax: true,
|
|
44
|
+
noUncheckedSideEffectImports: false,
|
|
45
|
+
strict: true,
|
|
46
|
+
forceConsistentCasingInFileNames: true,
|
|
47
|
+
jsx: "react-jsx",
|
|
48
|
+
lib: ["dom", "es2022"],
|
|
49
|
+
target: "es2022",
|
|
50
|
+
...tsPaths ? { paths: tsPaths } : {},
|
|
51
|
+
types: makeTypes()
|
|
52
|
+
},
|
|
53
|
+
exclude: [
|
|
54
|
+
"node_modules",
|
|
55
|
+
paths.relativeTarget,
|
|
56
|
+
coverageFolder,
|
|
57
|
+
bundleReportFolder
|
|
58
|
+
]
|
|
59
|
+
});
|
|
50
60
|
};
|
|
51
|
-
//#endregion
|
|
52
61
|
export { createTSConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import allocatePort from "../../../utils/allocatePort.mjs";
|
|
2
|
-
|
|
2
|
+
// src/services/vite/helpers/allocateClientPort.ts
|
|
3
3
|
const allocateClientPort = async (skuContext) => {
|
|
4
4
|
const port = await allocatePort({
|
|
5
5
|
port: skuContext.port.client,
|
|
@@ -16,5 +16,4 @@ const allocateClientPort = async (skuContext) => {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { allocateClientPort };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import browserslist from "browserslist";
|
|
2
|
-
|
|
2
|
+
// src/services/vite/helpers/browserslist-to-esbuild.ts
|
|
3
3
|
function browserslistToEsbuild(browserslistConfig = void 0, options = {}) {
|
|
4
4
|
let internalBrowserslistConfig = browserslistConfig;
|
|
5
5
|
if (!internalBrowserslistConfig) {
|
|
@@ -45,5 +45,4 @@ function browserslistToEsbuild(browserslistConfig = void 0, options = {}) {
|
|
|
45
45
|
return acc;
|
|
46
46
|
}, []).map((b) => b.join(""));
|
|
47
47
|
}
|
|
48
|
-
//#endregion
|
|
49
48
|
export { browserslistToEsbuild as default };
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { getDistDirectories } from "../../../utils/distDirectories.mjs";
|
|
1
2
|
import path from "node:path";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
// src/services/vite/helpers/bundleConfig.ts
|
|
4
|
+
/**
|
|
5
|
+
* Resolves the Vite output directories for a build target.
|
|
6
|
+
* SSR output always uses subfolders, so SSR callers pass `true`.
|
|
7
|
+
*/
|
|
8
|
+
const createOutDir = ({ targetPath, useSubfolders }) => ({
|
|
9
|
+
...getDistDirectories({
|
|
10
|
+
targetPath,
|
|
11
|
+
useSubfolders
|
|
12
|
+
}),
|
|
7
13
|
ssg: path.join(targetPath, "render"),
|
|
8
14
|
join: (subPath) => path.join(targetPath, subPath)
|
|
9
15
|
});
|
|
10
16
|
const renderEntryChunkName = "render.js";
|
|
11
|
-
//#endregion
|
|
12
17
|
export { createOutDir, renderEntryChunkName };
|
|
@@ -6,7 +6,7 @@ import { vitePluginVocab } from "@vocab/vite";
|
|
|
6
6
|
import { cjsInterop } from "vite-plugin-cjs-interop";
|
|
7
7
|
import react from "@vitejs/plugin-react";
|
|
8
8
|
import babel from "@rolldown/plugin-babel";
|
|
9
|
-
|
|
9
|
+
// src/services/vite/helpers/config/createConfig.ts
|
|
10
10
|
const require = createRequire(import.meta.url);
|
|
11
11
|
const vanillaExtractCompilerPluginAllowlist = ["sku:dangerously-set-vite-config", "sku:strip-server-config"];
|
|
12
12
|
const createConfig = (skuContext, environment) => {
|
|
@@ -45,5 +45,4 @@ const createConfig = (skuContext, environment) => {
|
|
|
45
45
|
})
|
|
46
46
|
] };
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { createConfig };
|
|
@@ -3,7 +3,7 @@ import { createDebug } from "obug";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import assert from "node:assert";
|
|
6
|
-
|
|
6
|
+
// src/services/vite/helpers/config/dependencyGraph.ts
|
|
7
7
|
const log = createDebug("sku:dependency-graph");
|
|
8
8
|
const require = createRequire(import.meta.url);
|
|
9
9
|
const ROOT = "ROOT";
|
|
@@ -75,5 +75,4 @@ const getSsrExternalsForCompiledDependency = (depName, depGraph) => {
|
|
|
75
75
|
log(`Found dependencies to prevent externalising for ${depName}:`, noExternal);
|
|
76
76
|
return { noExternal };
|
|
77
77
|
};
|
|
78
|
-
//#endregion
|
|
79
78
|
export { extractDependencyGraph, getSsrExternalsForCompiledDependency };
|
|
@@ -4,7 +4,7 @@ import { createDebug } from "obug";
|
|
|
4
4
|
import { LoadableProvider } from "@sku-lib/vite/loadable";
|
|
5
5
|
import { getChunkName } from "@vocab/vite/chunks";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/services/vite/helpers/html/createPreRenderedHtml.tsx
|
|
8
8
|
const log = createDebug("sku:render:html");
|
|
9
9
|
const createPreRenderedHtml = async ({ environment, language, route, routeName, site, render, hooks, loadableCollector, createUnsafeNonce }) => {
|
|
10
10
|
const renderContext = {
|
|
@@ -51,5 +51,4 @@ const createPreRenderedHtml = async ({ environment, language, route, routeName,
|
|
|
51
51
|
app
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
-
//#endregion
|
|
55
54
|
export { createPreRenderedHtml };
|