@orkestrel/scaffold 0.0.28 → 0.0.29

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.
@@ -289,7 +289,7 @@ var DEFAULT_ENGINES = `>=${MINIMUM_NODE_VERSION}`;
289
289
  var BASE_DEV_DEPENDENCIES = Object.freeze({
290
290
  "@microsoft/api-extractor": "^7.58.12",
291
291
  "@orkestrel/guide": "^0.0.10",
292
- "@orkestrel/scaffold": "^0.0.28",
292
+ "@orkestrel/scaffold": "^0.0.29",
293
293
  "@types/node": "^26.2.0",
294
294
  oxfmt: "^0.62.0",
295
295
  oxlint: "^1.77.0",
@@ -385,11 +385,11 @@ var CONFIG_TEMPLATES = Object.freeze({
385
385
  vite: `import type { {{viteTypes}} } from 'vite'
386
386
  {{imports}}import { defineConfig, mergeConfig } from 'vitest/config'
387
387
  import tsconfig from './tsconfig.json' with { type: 'json' }
388
- {{helpers}}import { lstatSync, readdirSync, realpathSync } from 'node:fs'
388
+ {{helpers}}{{browsers}}import { lstatSync, readdirSync, realpathSync } from 'node:fs'
389
389
  import { basename, join, parse, relative, resolve as resolvePath, sep } from 'node:path'
390
390
  import { fileURLToPath, URL } from 'node:url'
391
391
 
392
- export function resolveWorkspacePath(relativePath: string): string {
392
+ {{options}}export function resolveWorkspacePath(relativePath: string): string {
393
393
  return fileURLToPath(new URL(relativePath, import.meta.url))
394
394
  }
395
395
 
@@ -483,7 +483,7 @@ const resolve = {
483
483
  {{exclude}} setupFiles: ['./tests/setup.ts', './tests/setupBrowser.ts'],
484
484
  browser: {
485
485
  enabled: true,
486
- provider: playwright(),
486
+ provider: playwright(browserOptions),
487
487
  instances: [{ browser: 'chromium', headless: true }],
488
488
  },
489
489
  fileParallelism: false,
@@ -594,7 +594,7 @@ const resolve = {
594
594
  setupFiles: ['./tests/setup.ts', './tests/setupBrowser.ts'],
595
595
  browser: {
596
596
  enabled: true,
597
- provider: playwright(),
597
+ provider: playwright(browserOptions),
598
598
  instances: [{ browser: 'chromium', headless: true }],
599
599
  },
600
600
  fileParallelism: false,
@@ -919,12 +919,22 @@ export default defineConfig(
919
919
  import dts from 'vite-plugin-dts'
920
920
  import { srcBrowser, resolveWorkspacePath } from '../../vite.config.ts'
921
921
 
922
+ // vite-plugin-dts rolls this face into one declaration, and the roll-up reaches
923
+ // src/core through a relative source path the tarball does not carry. The path
924
+ // keeps each source module's own depth, so a module in a browser subfolder emits
925
+ // one that leaves dist/src entirely. The rewrite below externalizes core through
926
+ // the package's own published root export, on the final roll-up only.
922
927
  export default defineConfig(
923
928
  srcBrowser({
924
929
  plugins: [
925
930
  dts({
926
931
  tsconfigPath: resolveWorkspacePath('configs/src/tsconfig.browser.json'),
927
932
  bundleTypes: true,
933
+ beforeWriteFile: (path, content) => ({
934
+ content: /[\\\\/]dist[\\\\/]src[\\\\/]browser[\\\\/]index\\.d\\.ts$/.test(path)
935
+ {{replacement}}
936
+ : content,
937
+ }),
928
938
  }),
929
939
  ],
930
940
  }),
@@ -993,7 +1003,319 @@ import { appShowcase } from '../../vite.config.ts'
993
1003
  export default defineConfig(appShowcase())
994
1004
  `
995
1005
  })
996
- })
1006
+ }),
1007
+ browsers: `// A generated browser workspace resolves its own Chromium here rather than in
1008
+ // \`configs/helpers.ts\`, because that leaf is vendored byte-identical to every
1009
+ // workspace and most of them declare no \`playwright\` to import.
1010
+
1011
+ import type { PlaywrightProviderOptions } from '@vitest/browser-playwright'
1012
+ import { chromium } from 'playwright'
1013
+ import { accessSync, constants as FS_CONSTANTS, globSync, readdirSync, statSync } from 'node:fs'
1014
+ import { basename, dirname, join, resolve as resolvePath } from 'node:path'
1015
+
1016
+ /**
1017
+ * Chromium executable layouts inside a \`chromium-<revision>\` browsers-directory entry, per
1018
+ * platform.
1019
+ *
1020
+ * @remarks
1021
+ * The current Playwright build ships Chrome for Testing on macOS. The trailing \`Chromium.app\`
1022
+ * layouts are what earlier builds shipped, so the list spans Playwright versions instead of
1023
+ * pinning to the installed one.
1024
+ */
1025
+ export const CHROMIUM_LAYOUTS = Object.freeze([
1026
+ 'chrome-linux/chrome',
1027
+ 'chrome-linux64/chrome',
1028
+ 'chrome-win/chrome.exe',
1029
+ 'chrome-win64/chrome.exe',
1030
+ 'chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing',
1031
+ 'chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing',
1032
+ 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
1033
+ 'chrome-mac-arm64/Chromium.app/Contents/MacOS/Chromium',
1034
+ ])
1035
+
1036
+ /** The \`chromium-<revision>\` entry name Playwright installs one managed build into. */
1037
+ export const CHROMIUM_ENTRY_PATTERN = /^chromium-\\d+$/
1038
+
1039
+ /** The revision number carried by any path containing a \`chromium-<revision>\` segment. */
1040
+ export const CHROMIUM_REVISION_PATTERN = /chromium-(\\d+)/
1041
+
1042
+ /** The directory a managed Linux container installs its bundled Playwright browsers into. */
1043
+ export const BUNDLED_BROWSERS_ROOT = '/opt/pw-browsers'
1044
+
1045
+ /**
1046
+ * Bundled Chromium layouts under the managed-container browsers root, as glob patterns.
1047
+ *
1048
+ * @remarks
1049
+ * The revision directory and its inner layout both drift across Playwright builds, and the
1050
+ * container also carries a top-level \`chromium\` alias, so every known shape is globbed.
1051
+ */
1052
+ export const BUNDLED_CHROMIUM_LAYOUTS = Object.freeze([
1053
+ 'chromium',
1054
+ 'chromium-*/chrome-linux64/chrome',
1055
+ 'chromium-*/chrome-linux/chrome',
1056
+ ])
1057
+
1058
+ /** Stable Playwright Chromium channels and their standard executable layouts. */
1059
+ export const SYSTEM_BROWSER_CHANNELS = Object.freeze([
1060
+ Object.freeze({
1061
+ channel: 'chrome',
1062
+ layouts: Object.freeze({
1063
+ linux: '/opt/google/chrome/chrome',
1064
+ darwin: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
1065
+ win32: Object.freeze(['Google', 'Chrome', 'Application', 'chrome.exe']),
1066
+ }),
1067
+ }),
1068
+ Object.freeze({
1069
+ channel: 'msedge',
1070
+ layouts: Object.freeze({
1071
+ linux: '/opt/microsoft/msedge/msedge',
1072
+ darwin: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
1073
+ win32: Object.freeze(['Microsoft', 'Edge', 'Application', 'msedge.exe']),
1074
+ }),
1075
+ }),
1076
+ ])
1077
+
1078
+ /**
1079
+ * Determine whether a path identifies an executable regular file.
1080
+ *
1081
+ * @param path - The filesystem path to inspect.
1082
+ * @returns Whether the path is a regular file with execute access.
1083
+ *
1084
+ * @example
1085
+ * \`\`\`ts
1086
+ * isBrowserExecutable('/opt/google/chrome/chrome')
1087
+ * \`\`\`
1088
+ */
1089
+ export function isBrowserExecutable(path: string): boolean {
1090
+ try {
1091
+ if (!statSync(path).isFile()) return false
1092
+ accessSync(path, FS_CONSTANTS.X_OK)
1093
+ return true
1094
+ } catch {
1095
+ return false
1096
+ }
1097
+ }
1098
+
1099
+ /**
1100
+ * Order two Chromium paths so the highest revision sorts first.
1101
+ *
1102
+ * @param left - The first path or directory entry to compare.
1103
+ * @param right - The second path or directory entry to compare.
1104
+ * @returns A negative number when \`left\` sorts first, positive when \`right\` does.
1105
+ *
1106
+ * @remarks
1107
+ * Revisions are numbers, so \`chromium-1200\` outranks \`chromium-999\` despite sorting below it
1108
+ * lexically. A path carrying no revision falls back to descending name order.
1109
+ *
1110
+ * @example
1111
+ * \`\`\`ts
1112
+ * ['chromium-999', 'chromium-1200'].sort(compareRevisions)
1113
+ * \`\`\`
1114
+ */
1115
+ export function compareRevisions(left: string, right: string): number {
1116
+ const leftRevision = CHROMIUM_REVISION_PATTERN.exec(left)?.[1]
1117
+ const rightRevision = CHROMIUM_REVISION_PATTERN.exec(right)?.[1]
1118
+ if (leftRevision === undefined || rightRevision === undefined) return right.localeCompare(left)
1119
+ return Number(rightRevision) - Number(leftRevision)
1120
+ }
1121
+
1122
+ /**
1123
+ * Read the executable path of Playwright's pinned Chromium revision.
1124
+ *
1125
+ * @returns The pinned executable path, or \`undefined\` when this platform has none.
1126
+ *
1127
+ * @remarks
1128
+ * Playwright throws rather than returning a path when the current platform carries no initialized
1129
+ * executable, and an unguarded call would fail configuration evaluation for every project.
1130
+ *
1131
+ * @example
1132
+ * \`\`\`ts
1133
+ * resolvePinnedBrowser()
1134
+ * \`\`\`
1135
+ */
1136
+ export function resolvePinnedBrowser(): string | undefined {
1137
+ try {
1138
+ const pinned = chromium.executablePath()
1139
+ return pinned.length === 0 ? undefined : pinned
1140
+ } catch {
1141
+ return undefined
1142
+ }
1143
+ }
1144
+
1145
+ /**
1146
+ * Resolve a launchable Playwright-managed Chromium executable: the pinned revision when installed,
1147
+ * otherwise a \`chromium\` / \`chromium.exe\` alias or any other \`chromium-*\` revision under the same
1148
+ * Playwright browsers directory. A pinned-revision miss is not Chromium absence — managed
1149
+ * containers ship one usable build, often behind a revision-agnostic alias, for many Playwright
1150
+ * versions.
1151
+ *
1152
+ * @param pinned - The executable path for Playwright's pinned Chromium revision.
1153
+ * @returns The managed executable path, or \`undefined\` when none is executable.
1154
+ *
1155
+ * @example
1156
+ * \`\`\`ts
1157
+ * resolveManagedBrowser('/root/.cache/ms-playwright/chromium-1234/chrome-linux64/chrome')
1158
+ * \`\`\`
1159
+ */
1160
+ export function resolveManagedBrowser(pinned: string): string | undefined {
1161
+ if (isBrowserExecutable(pinned)) return pinned
1162
+ let revisionRoot = dirname(pinned)
1163
+ for (;;) {
1164
+ if (CHROMIUM_ENTRY_PATTERN.test(basename(revisionRoot))) break
1165
+ const parent = dirname(revisionRoot)
1166
+ if (parent === revisionRoot) return undefined
1167
+ revisionRoot = parent
1168
+ }
1169
+ const browsersRoot = dirname(revisionRoot)
1170
+ for (const alias of ['chromium', 'chromium.exe']) {
1171
+ const candidate = resolvePath(browsersRoot, alias)
1172
+ if (isBrowserExecutable(candidate)) return candidate
1173
+ }
1174
+ let entries: readonly string[]
1175
+ try {
1176
+ entries = readdirSync(browsersRoot)
1177
+ } catch {
1178
+ return undefined
1179
+ }
1180
+ const revisions = entries
1181
+ .filter((entry) => CHROMIUM_ENTRY_PATTERN.test(entry))
1182
+ .sort(compareRevisions)
1183
+ for (const revision of revisions) {
1184
+ for (const layout of CHROMIUM_LAYOUTS) {
1185
+ const candidate = resolvePath(browsersRoot, revision, layout)
1186
+ if (isBrowserExecutable(candidate)) return candidate
1187
+ }
1188
+ }
1189
+ return undefined
1190
+ }
1191
+
1192
+ /**
1193
+ * Resolve the Chromium a managed Linux container bundles outside the Playwright cache.
1194
+ *
1195
+ * @param platform - The Node platform the container runs on.
1196
+ * @param root - The bundled browsers directory to search.
1197
+ * @returns The highest matching executable path, or \`undefined\` when none is executable.
1198
+ *
1199
+ * @example
1200
+ * \`\`\`ts
1201
+ * resolveBundledBrowser('linux', BUNDLED_BROWSERS_ROOT)
1202
+ * \`\`\`
1203
+ */
1204
+ export function resolveBundledBrowser(platform: NodeJS.Platform, root: string): string | undefined {
1205
+ if (platform !== 'linux') return undefined
1206
+ for (const layout of BUNDLED_CHROMIUM_LAYOUTS) {
1207
+ let matches: readonly string[]
1208
+ try {
1209
+ matches = globSync(layout, { cwd: root })
1210
+ } catch {
1211
+ return undefined
1212
+ }
1213
+ for (const match of [...matches].sort(compareRevisions)) {
1214
+ const candidate = resolvePath(root, match)
1215
+ if (isBrowserExecutable(candidate)) return candidate
1216
+ }
1217
+ }
1218
+ return undefined
1219
+ }
1220
+
1221
+ /**
1222
+ * Resolve the first installed stable system Chromium channel.
1223
+ *
1224
+ * @param platform - The Node platform whose standard layouts should be probed.
1225
+ * @param environment - The process environment supplying Windows installation roots.
1226
+ * @returns \`chrome\`, then \`msedge\`, or \`undefined\` when neither is executable.
1227
+ *
1228
+ * @example
1229
+ * \`\`\`ts
1230
+ * resolveSystemBrowser(process.platform, process.env)
1231
+ * \`\`\`
1232
+ */
1233
+ export function resolveSystemBrowser(
1234
+ platform: NodeJS.Platform,
1235
+ environment: NodeJS.ProcessEnv,
1236
+ ): string | undefined {
1237
+ if (platform !== 'linux' && platform !== 'darwin' && platform !== 'win32') return undefined
1238
+ const roots = new Set<string>()
1239
+ if (platform === 'win32') {
1240
+ for (const root of [
1241
+ environment.LOCALAPPDATA,
1242
+ environment.PROGRAMFILES,
1243
+ environment['PROGRAMFILES(X86)'],
1244
+ ]) {
1245
+ if (root !== undefined && root.length > 0) roots.add(root)
1246
+ }
1247
+ const homeDrive = environment.HOMEDRIVE
1248
+ if (homeDrive !== undefined && homeDrive.length > 0) {
1249
+ roots.add(join(homeDrive, 'Program Files'))
1250
+ roots.add(join(homeDrive, 'Program Files (x86)'))
1251
+ }
1252
+ }
1253
+ for (const browser of SYSTEM_BROWSER_CHANNELS) {
1254
+ if (platform === 'win32') {
1255
+ for (const root of roots) {
1256
+ if (isBrowserExecutable(join(root, ...browser.layouts.win32))) return browser.channel
1257
+ }
1258
+ continue
1259
+ }
1260
+ if (isBrowserExecutable(browser.layouts[platform])) return browser.channel
1261
+ }
1262
+ return undefined
1263
+ }
1264
+
1265
+ /**
1266
+ * Resolve Playwright provider options for whatever browser this host can actually launch.
1267
+ *
1268
+ * @param pinned - The executable path for Playwright's pinned Chromium revision, when it has one.
1269
+ * @param platform - The Node platform whose standard layouts should be probed.
1270
+ * @param environment - The process environment supplying operator overrides and Windows roots.
1271
+ * @param root - The managed-container bundled browsers directory to search.
1272
+ * @returns Provider options naming an executable, a WebSocket endpoint, or a channel.
1273
+ *
1274
+ * @remarks
1275
+ * Precedence, most important first: \`PLAYWRIGHT_EXECUTABLE_PATH\`, \`PLAYWRIGHT_WS_ENDPOINT\`,
1276
+ * \`PLAYWRIGHT_CHANNEL\`, the managed Playwright Chromium, the container's bundled Chromium, a
1277
+ * verified system channel, then the platform default channel. An operator override outranks
1278
+ * discovery and is returned exactly as given: none of those three environment values is checked
1279
+ * against the filesystem, because verifying an override would defeat the override. The pinned
1280
+ * managed revision outranks anything found on the host because it is deterministic. The installed
1281
+ * pinned revision returns empty options so Playwright keeps its own default launch semantics. Only
1282
+ * a discovered system channel is verified before it is named. The platform default is unverified
1283
+ * as well and exists only as a last resort: Windows takes \`msedge\`, which ships with the OS and
1284
+ * never collides with a foreground Chrome.
1285
+ *
1286
+ * @example
1287
+ * \`\`\`ts
1288
+ * resolveBrowser(resolvePinnedBrowser(), process.platform, process.env)
1289
+ * \`\`\`
1290
+ */
1291
+ export function resolveBrowser(
1292
+ pinned: string | undefined,
1293
+ platform: NodeJS.Platform,
1294
+ environment: NodeJS.ProcessEnv,
1295
+ root: string = BUNDLED_BROWSERS_ROOT,
1296
+ ): PlaywrightProviderOptions {
1297
+ const executable = environment.PLAYWRIGHT_EXECUTABLE_PATH
1298
+ if (executable !== undefined && executable.length > 0) {
1299
+ return { launchOptions: { executablePath: executable } }
1300
+ }
1301
+ const endpoint = environment.PLAYWRIGHT_WS_ENDPOINT
1302
+ if (endpoint !== undefined && endpoint.length > 0) {
1303
+ return { connectOptions: { wsEndpoint: endpoint } }
1304
+ }
1305
+ const requested = environment.PLAYWRIGHT_CHANNEL
1306
+ if (requested !== undefined && requested.length > 0) {
1307
+ return { launchOptions: { channel: requested } }
1308
+ }
1309
+ const managed = pinned === undefined ? undefined : resolveManagedBrowser(pinned)
1310
+ if (managed !== undefined) {
1311
+ return managed === pinned ? {} : { launchOptions: { executablePath: managed } }
1312
+ }
1313
+ const bundled = resolveBundledBrowser(platform, root)
1314
+ if (bundled !== undefined) return { launchOptions: { executablePath: bundled } }
1315
+ const fallback = platform === 'win32' ? 'msedge' : 'chrome'
1316
+ return { launchOptions: { channel: resolveSystemBrowser(platform, environment) ?? fallback } }
1317
+ }
1318
+ `
997
1319
  });
998
1320
  /**
999
1321
  * Formatter-stable template text for source, test, document, guide, and service artifacts.
@@ -2074,6 +2396,46 @@ function nameToGuide(name) {
2074
2396
  return `guides/${name.slice(name.lastIndexOf("/") + 1)}.md`;
2075
2397
  }
2076
2398
  /**
2399
+ * Derive the declaration rewrite a published face's `beforeWriteFile` applies.
2400
+ *
2401
+ * @param name - The workspace's own bare package name.
2402
+ * @returns The ternary consequent an emitted `vite.{browser,server}.config.ts`
2403
+ * fills its `{{replacement}}` span with, indented for that span.
2404
+ *
2405
+ * @remarks
2406
+ * `vite-plugin-dts` rolls a face into one declaration and keeps each source
2407
+ * module's own relative depth, so a nested module emits a path that escapes
2408
+ * `dist/src` and a flat one resolves only by luck. Both faces rewrite the same
2409
+ * relative core path to the package's published root export, so the branch is
2410
+ * derived once here. The extension alternation is what the two permitted import
2411
+ * spellings produce: an `@src/core` alias resolves to the core source module and
2412
+ * prints `.ts`, while a relative import prints the `.js` specifier it was
2413
+ * written with. The formatter keeps the call on one line only while the line it
2414
+ * prints measures inside the vendored width, and the workspace name is what
2415
+ * varies, so the shape is chosen by measuring the candidate: a tab prints as the
2416
+ * vendored two columns, and the gate admits a name long enough to push the
2417
+ * joined call past 100.
2418
+ *
2419
+ * @example
2420
+ * ```ts
2421
+ * import { nameToRewrite } from '@orkestrel/scaffold'
2422
+ *
2423
+ * nameToRewrite('router').includes("'@orkestrel/router'") // true
2424
+ * ```
2425
+ */
2426
+ function nameToRewrite(name) {
2427
+ const specifier = serializeTypeScriptString(`@orkestrel/${name}`);
2428
+ const pattern = "/(?:\\.\\.\\/)+core\\/index\\.[jt]s/g";
2429
+ const joined = `\t\t\t\t\t\t? content.replaceAll(${pattern}, ${specifier})`;
2430
+ if (joined.replaceAll(" ", " ").length <= 100) return joined;
2431
+ return [
2432
+ " ? content.replaceAll(",
2433
+ `\t\t\t\t\t\t\t\t${pattern},`,
2434
+ `\t\t\t\t\t\t\t\t${specifier},`,
2435
+ " )"
2436
+ ].join("\n");
2437
+ }
2438
+ /**
2077
2439
  * Select the host paths a named workspace vendors.
2078
2440
  *
2079
2441
  * @param paths - The candidate host paths, in their declared order.
@@ -3132,6 +3494,8 @@ ${projects.map((project) => `\t\t\t${project},`).join("\n")}
3132
3494
  viteTypes: machinery.showcase ? "PluginOption, UserConfig" : "UserConfig",
3133
3495
  imports: imports.length === 0 ? "" : `${imports.join("\n")}\n`,
3134
3496
  helpers: boundaries.length === 0 ? "" : `import { ${boundaries.join(", ")} } from './configs/helpers.js'\n`,
3497
+ browsers: machinery.browser ? "import { resolveBrowser, resolvePinnedBrowser } from './configs/browsers.js'\n" : "",
3498
+ options: machinery.browser ? "const browserOptions = resolveBrowser(resolvePinnedBrowser(), process.platform, process.env)\n\n" : "",
3135
3499
  factories: body,
3136
3500
  projects: projectRows
3137
3501
  });
@@ -3165,22 +3529,20 @@ function blueprintToConfigArtifacts(blueprint) {
3165
3529
  origin: "template",
3166
3530
  content: blueprintToRootVite(blueprint)
3167
3531
  }];
3532
+ if (blueprintToMachinery(blueprint).browser) artifacts.push({
3533
+ path: "configs/browsers.ts",
3534
+ group: "configs",
3535
+ ownership: "content",
3536
+ origin: "template",
3537
+ content: CONFIG_TEMPLATES.browsers
3538
+ });
3168
3539
  for (const environment of blueprint.src) for (const path of SRC_MATRIX[environment].configs) {
3169
3540
  let content = CONFIG_TEMPLATES.vites.src.core;
3170
3541
  if (path === "configs/src/tsconfig.core.json") content = CONFIG_TEMPLATES.tsconfigs.src.core;
3171
- else if (path === "configs/src/vite.browser.config.ts") content = CONFIG_TEMPLATES.vites.src.browser;
3542
+ else if (path === "configs/src/vite.browser.config.ts") content = fillTemplate(CONFIG_TEMPLATES.vites.src.browser, { replacement: nameToRewrite(blueprint.name) });
3172
3543
  else if (path === "configs/src/tsconfig.browser.json") content = CONFIG_TEMPLATES.tsconfigs.src.browser;
3173
- else if (path === "configs/src/vite.server.config.ts") {
3174
- const packageName = serializeTypeScriptString(`@orkestrel/${blueprint.name}`);
3175
- const joined = `\t\t\t\t\t\t? content.replaceAll(/(?:\\.\\.\\/)+core\\/index\\.ts/g, ${packageName})`;
3176
- const replacement = joined.replaceAll(" ", " ").length <= 100 ? joined : [
3177
- " ? content.replaceAll(",
3178
- " /(?:\\.\\.\\/)+core\\/index\\.ts/g,",
3179
- `\t\t\t\t\t\t\t\t${packageName},`,
3180
- " )"
3181
- ].join("\n");
3182
- content = fillTemplate(CONFIG_TEMPLATES.vites.src.server, { replacement });
3183
- } else if (path === "configs/src/tsconfig.server.json") content = CONFIG_TEMPLATES.tsconfigs.src.server;
3544
+ else if (path === "configs/src/vite.server.config.ts") content = fillTemplate(CONFIG_TEMPLATES.vites.src.server, { replacement: nameToRewrite(blueprint.name) });
3545
+ else if (path === "configs/src/tsconfig.server.json") content = CONFIG_TEMPLATES.tsconfigs.src.server;
3184
3546
  artifacts.push({
3185
3547
  path,
3186
3548
  group: "configs",
@@ -4418,6 +4780,6 @@ function createCompiler(options) {
4418
4780
  return new Compiler(options);
4419
4781
  }
4420
4782
  //#endregion
4421
- export { APP_BROWSER_DEV_DEPENDENCIES, APP_DEV_DEPENDENCIES, APP_MATRIX, APP_SERVER_DEV_DEPENDENCIES, ARTIFACT_TEMPLATES, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, BIN_ENTRY_PATH, CATALOG_AGENT_PATH, CONFIG_TEMPLATES, CONFORMANCE_TEST_PATH, CONTROL_CHARACTER_PATTERN, Compiler, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, ENGINES_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, EXTRA_NAME_PATTERN, EXTRA_RANGE_PATTERN, GLOBAL_SETUP_PATH, GROUPS, GUIDES_TEST_PATH, HEX_PATTERN, HOST_PATHS, INTEGRATION_TEST_PATH, INVALID_PATH_CHARACTER_PATTERN, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_AUDIT_FINDINGS, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, MINIMUM_NODE_VERSION, NAME_PATTERN, ORCHESTRATION_PATH_NAMES, ORCHESTRATION_PATH_PREFIXES, ORKESTREL_RANGE_PATTERN, SERVICE_SCRIPT_PATH, SERVICE_SETUP_PATH, SERVICE_TEST_INCLUDE, SHOWCASE_CONFIG_PATH, SHOWCASE_DEV_DEPENDENCIES, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, ScaffoldError, VERSION_PATTERN, applyOverrides, artifactToFinding, artifactToHex, artifactsToQuestions, blueprintToConfigArtifacts, blueprintToDevDependencies, blueprintToDocumentArtifacts, blueprintToGuideArtifacts, blueprintToMachinery, blueprintToManifest, blueprintToOrchestrationArtifacts, blueprintToQuestions, blueprintToRootTsconfig, blueprintToRootVite, blueprintToScripts, blueprintToSourceArtifacts, blueprintToTestArtifacts, bytesToHex, catalogToLayers, cloneValue, compareVersions, computeBytes, computeHash, contentToHex, createBlueprint, createCompiler, dependenciesToQuestions, extractVersion, inferDrift, inferGroup, isArtifact, isAudit, isBlueprint, isCatalogEntry, isCollection, isCompilerHooks, isCompilerOptions, isContent, isDependency, isDependencyName, isEnvironment, isFinding, isGroup, isGroups, isHex, isMirror, isOverride, isPath, isPlan, isQuestion, isScaffoldError, isSnapshot, manifestToDependencies, manifestToName, matchesDriftReachability, matchesEngines, matchesOrchestrationPath, matchesRange, nameToGuide, nameToHostArtifacts, overridesToQuestions, parseBlueprint, parseCompilerOptions, parseGroups, parseSnapshot, pathToCondition, planToFindings, planToHash, planToSummary, selectGroups, selectHostPaths, serializeTypeScriptString, srcToEntry, srcToExports, srcToRoot };
4783
+ export { APP_BROWSER_DEV_DEPENDENCIES, APP_DEV_DEPENDENCIES, APP_MATRIX, APP_SERVER_DEV_DEPENDENCIES, ARTIFACT_TEMPLATES, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, BIN_ENTRY_PATH, CATALOG_AGENT_PATH, CONFIG_TEMPLATES, CONFORMANCE_TEST_PATH, CONTROL_CHARACTER_PATTERN, Compiler, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, ENGINES_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, EXTRA_NAME_PATTERN, EXTRA_RANGE_PATTERN, GLOBAL_SETUP_PATH, GROUPS, GUIDES_TEST_PATH, HEX_PATTERN, HOST_PATHS, INTEGRATION_TEST_PATH, INVALID_PATH_CHARACTER_PATTERN, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_AUDIT_FINDINGS, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, MINIMUM_NODE_VERSION, NAME_PATTERN, ORCHESTRATION_PATH_NAMES, ORCHESTRATION_PATH_PREFIXES, ORKESTREL_RANGE_PATTERN, SERVICE_SCRIPT_PATH, SERVICE_SETUP_PATH, SERVICE_TEST_INCLUDE, SHOWCASE_CONFIG_PATH, SHOWCASE_DEV_DEPENDENCIES, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, ScaffoldError, VERSION_PATTERN, applyOverrides, artifactToFinding, artifactToHex, artifactsToQuestions, blueprintToConfigArtifacts, blueprintToDevDependencies, blueprintToDocumentArtifacts, blueprintToGuideArtifacts, blueprintToMachinery, blueprintToManifest, blueprintToOrchestrationArtifacts, blueprintToQuestions, blueprintToRootTsconfig, blueprintToRootVite, blueprintToScripts, blueprintToSourceArtifacts, blueprintToTestArtifacts, bytesToHex, catalogToLayers, cloneValue, compareVersions, computeBytes, computeHash, contentToHex, createBlueprint, createCompiler, dependenciesToQuestions, extractVersion, inferDrift, inferGroup, isArtifact, isAudit, isBlueprint, isCatalogEntry, isCollection, isCompilerHooks, isCompilerOptions, isContent, isDependency, isDependencyName, isEnvironment, isFinding, isGroup, isGroups, isHex, isMirror, isOverride, isPath, isPlan, isQuestion, isScaffoldError, isSnapshot, manifestToDependencies, manifestToName, matchesDriftReachability, matchesEngines, matchesOrchestrationPath, matchesRange, nameToGuide, nameToHostArtifacts, nameToRewrite, overridesToQuestions, parseBlueprint, parseCompilerOptions, parseGroups, parseSnapshot, pathToCondition, planToFindings, planToHash, planToSummary, selectGroups, selectHostPaths, serializeTypeScriptString, srcToEntry, srcToExports, srcToRoot };
4422
4784
 
4423
4785
  //# sourceMappingURL=index.js.map