@orieljs/foundation 0.1.0-alpha.12 → 0.1.0-alpha.14

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/dist/index.d.ts CHANGED
@@ -30,7 +30,7 @@ declare class ApplicationBuilder {
30
30
  type LifecycleCallback = (app: Application$1) => void | Promise<void>;
31
31
  declare class Application extends Container implements Application$1 {
32
32
  private readonly base;
33
- readonly version = "0.1.0-alpha.12";
33
+ readonly version = "0.1.0-alpha.14";
34
34
  private readonly providers;
35
35
  private readonly bootingCallbacks;
36
36
  private readonly bootedCallbacks;
package/dist/index.js CHANGED
@@ -471,7 +471,7 @@ var Application = class _Application extends Container2 {
471
471
  this.singleton(ClassNames2, () => new ClassNameMap(this));
472
472
  }
473
473
  base;
474
- version = "0.1.0-alpha.12";
474
+ version = "0.1.0-alpha.14";
475
475
  providers = [];
476
476
  bootingCallbacks = [];
477
477
  bootedCallbacks = [];
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../Application.ts","../ApplicationBuilder.ts","../Http/RenameClasses.ts","../ClassNames.ts","../errors.ts","../Vite.ts","../Http/ClosureKernel.ts"],"sourcesContent":["import { join } from 'node:path'\nimport {\n Application as ApplicationToken,\n ClassNames,\n ClassRegistry as ClassRegistryToken,\n ConfigRepository,\n HttpKernel,\n type Application as ApplicationContract,\n type ServiceProvider,\n type ServiceProviderClass,\n} from '@orieljs/contracts'\nimport { Container } from '@orieljs/container'\nimport { ClassRegistry, Str } from '@orieljs/support'\nimport { ApplicationBuilder } from './ApplicationBuilder'\nimport { ClassNameMap } from './ClassNames'\nimport { ProviderBootError, ProviderRegisterError } from './errors'\nimport { Vite } from './Vite'\n\ntype LifecycleCallback = (app: ApplicationContract) => void | Promise<void>\n\n/** How long shutdown() waits for its callbacks before giving up, so a hung close never keeps the process alive. */\nconst SHUTDOWN_TIMEOUT_MS = 10_000\n\nexport class Application extends Container implements ApplicationContract {\n readonly version = '0.1.0-alpha.12'\n\n private readonly providers: ServiceProvider[] = []\n private readonly bootingCallbacks: LifecycleCallback[] = []\n private readonly bootedCallbacks: LifecycleCallback[] = []\n private readonly terminatingCallbacks: Array<() => void | Promise<void>> = []\n private readonly shutdownCallbacks: Array<() => void | Promise<void>> = []\n private shutdownPromise: Promise<void> | undefined\n private bootPromise: Promise<void> | undefined\n private hasBooted = false\n private inConsole = false\n\n constructor(private readonly base: string) {\n super()\n Container.setInstance(this)\n this.instance(ApplicationToken, this)\n // The class too: otherwise inject(Application) would build a second app and hijack the global instance.\n this.instance(Application, this)\n this.singleton(ClassRegistryToken, ClassRegistry)\n // One per request: a CSP nonce set with vite().useCspNonce() must not leak into other requests.\n this.scoped(Vite, () => new Vite(this))\n this.singleton(ClassNames, () => new ClassNameMap(this))\n }\n\n /** Entry point used by bootstrap/app.ts. */\n static configure(options: { basePath: string }): ApplicationBuilder {\n return new ApplicationBuilder(new Application(options.basePath))\n }\n\n basePath(path = ''): string { return join(this.base, path) }\n appPath(path = ''): string { return this.basePath(join('app', path)) }\n bootstrapPath(path = ''): string { return this.basePath(join('bootstrap', path)) }\n configPath(path = ''): string { return this.basePath(join('config', path)) }\n databasePath(path = ''): string { return this.basePath(join('database', path)) }\n publicPath(path = ''): string { return this.basePath(join('public', path)) }\n resourcePath(path = ''): string { return this.basePath(join('resources', path)) }\n storagePath(path = ''): string { return this.basePath(join('storage', path)) }\n\n environment(): string\n environment(...environments: string[]): boolean\n environment(...environments: string[]): string | boolean {\n const fallback = process.env.APP_ENV ?? 'production'\n const current = this.bound(ConfigRepository)\n ? String(this.make(ConfigRepository).get('app.env', fallback))\n : fallback\n return environments.length === 0 ? current : environments.some((pattern) => Str.is(pattern, current))\n }\n\n isProduction(): boolean { return this.environment('production') }\n isLocal(): boolean { return this.environment('local') }\n runningUnitTests(): boolean { return this.environment('testing') }\n runningInConsole(): boolean { return this.inConsole }\n setRunningInConsole(value = true): void { this.inConsole = value }\n\n async register(provider: ServiceProvider | ServiceProviderClass): Promise<ServiceProvider> {\n const cls = typeof provider === 'function' ? provider : provider.constructor\n const existing = this.providers.find((p) => p.constructor === cls)\n if (existing) return existing\n\n const instance = typeof provider === 'function' ? new provider(this) : provider\n try {\n instance.register?.()\n } catch (error) {\n throw new ProviderRegisterError(instance.constructor.name, error)\n }\n this.providers.push(instance)\n if (this.hasBooted) await this.bootProvider(instance)\n return instance\n }\n\n getProviders(): ServiceProvider[] {\n return [...this.providers]\n }\n\n boot(): Promise<void> {\n return (this.bootPromise ??= this.runBoot())\n }\n\n isBooted(): boolean {\n return this.hasBooted\n }\n\n booting(callback: LifecycleCallback): void {\n this.bootingCallbacks.push(callback)\n }\n\n /** If already booted, the callback runs immediately (a rejection surfaces as an unhandled rejection). */\n booted(callback: LifecycleCallback): void {\n this.bootedCallbacks.push(callback)\n if (this.hasBooted) void callback(this)\n }\n\n terminating(callback: () => void | Promise<void>): void {\n this.terminatingCallbacks.push(callback)\n }\n\n async handle(request: Request): Promise<Response> {\n await this.boot()\n const scope = this.createScope()\n return scope.run(() => scope.make(HttpKernel).handle(request))\n }\n\n async terminate(): Promise<void> {\n for (const callback of this.terminatingCallbacks) await callback()\n }\n\n /**\n * A callback for the end of the process (the CLI after its command, the server on SIGTERM): close DB pools, Redis\n * clients and log files. Not in Laravel, whose PHP processes end with each request.\n */\n onShutdown(callback: () => void | Promise<void>): void {\n this.shutdownCallbacks.push(callback)\n }\n\n /**\n * Runs the shutdown callbacks once (a second call returns the same promise), newest first: an app's own callbacks\n * run before the framework closes what they use, then the framework's in the reverse of its providers' order (the\n * queue, database and cache connections close, then the log is written, then the session store closes). A failing\n * callback is printed with console.error (the log may be closed already) and the others still run; after 10 seconds\n * the rest are given up on, so the process can still exit. Never rejects.\n */\n shutdown(): Promise<void> {\n return (this.shutdownPromise ??= this.runShutdown())\n }\n\n private async runShutdown(): Promise<void> {\n if (this.shutdownCallbacks.length === 0) return\n const callbacks = [...this.shutdownCallbacks].reverse()\n const run = (async () => {\n for (const callback of callbacks) {\n try {\n await callback()\n } catch (error) {\n console.error(error)\n }\n }\n return 'done' as const\n })()\n let timer: ReturnType<typeof setTimeout> | undefined\n // Not unref'd: if a callback hangs on a promise and nothing else is left, the process must still reach its exit.\n const deadline = new Promise<'timeout'>((resolve) => (timer = setTimeout(() => resolve('timeout'), SHUTDOWN_TIMEOUT_MS)))\n const outcome = await Promise.race([run, deadline])\n clearTimeout(timer)\n if (outcome === 'timeout') {\n console.error(`The shutdown callbacks did not finish within ${SHUTDOWN_TIMEOUT_MS / 1000} seconds; carrying on with the exit.`)\n }\n }\n\n private async runBoot(): Promise<void> {\n for (const callback of this.bootingCallbacks) await callback(this)\n // Index loop on purpose: providers registered during boot are appended and booted in this pass.\n for (let i = 0; i < this.providers.length; i++) await this.bootProvider(this.providers[i]!)\n this.hasBooted = true\n for (const callback of this.bootedCallbacks) await callback(this)\n }\n\n private async bootProvider(provider: ServiceProvider): Promise<void> {\n try {\n await provider.boot?.()\n } catch (error) {\n throw new ProviderBootError(provider.constructor.name, error)\n }\n }\n}\n","import { isAbsolute, join } from 'node:path'\nimport {\n ConfigRepository,\n ExceptionCallbacks,\n MiddlewareCallbacks,\n RoutingPaths,\n type Application as ApplicationContract,\n type ExceptionsConfigurator,\n type MiddlewareConfigurator,\n type ServiceProvider,\n type ServiceProviderClass,\n} from '@orieljs/contracts'\nimport { loadConfiguration, loadEnvironment, Repository } from '@orieljs/config'\nimport type { Application } from './Application'\nimport { RenameClasses } from './Http/RenameClasses'\n\nexport interface RoutingOptions {\n /** One route file or several, loaded in order: web: ['routes/web.ts', 'routes/settings.ts', 'routes/auth.ts']. */\n web?: string | string[]\n api?: string | string[]\n console?: string\n /** A URI such as '/up', not a file. */\n health?: string\n apiPrefix?: string\n}\n\ntype Lifecycle = (app: ApplicationContract) => void | Promise<void>\n\nexport class ApplicationBuilder {\n private readonly providers: Array<ServiceProvider | ServiceProviderClass> = []\n private readonly middleware: Array<(middleware: MiddlewareConfigurator) => void> = []\n private readonly exceptions: Array<(exceptions: ExceptionsConfigurator) => void> = []\n private routing: RoutingPaths | undefined\n\n constructor(private readonly app: Application) {}\n\n withProviders(providers: Array<ServiceProvider | ServiceProviderClass> = []): this {\n this.providers.push(...providers)\n return this\n }\n\n withRouting(options: RoutingOptions): this {\n const abs = (p: string) => (isAbsolute(p) ? p : join(this.app.basePath(), p))\n const each = (p: string | string[]) => (Array.isArray(p) ? p.map(abs) : abs(p))\n const paths: RoutingPaths = { apiPrefix: options.apiPrefix ?? 'api' }\n if (options.web !== undefined) paths.web = each(options.web)\n if (options.api !== undefined) paths.api = each(options.api)\n if (options.console !== undefined) paths.console = abs(options.console)\n if (options.health !== undefined) paths.health = options.health\n this.routing = paths\n return this\n }\n\n withMiddleware(callback: (middleware: MiddlewareConfigurator) => void): this {\n this.middleware.push(callback)\n return this\n }\n\n withExceptions(callback: (exceptions: ExceptionsConfigurator) => void): this {\n this.exceptions.push(callback)\n return this\n }\n\n booting(callback: Lifecycle): this {\n this.app.booting(callback)\n return this\n }\n\n booted(callback: Lifecycle): this {\n this.app.booted(callback)\n return this\n }\n\n async create(): Promise<Application> {\n loadEnvironment(this.app.basePath())\n this.app.instance(ConfigRepository, new Repository(await loadConfiguration(this.app.configPath())))\n if (this.routing) this.app.instance(RoutingPaths, this.routing)\n // Outermost, so it sees every page as it leaves: the classes of a scrambled build renamed.\n const middleware = [(m: MiddlewareConfigurator) => void m.prepend(RenameClasses), ...this.middleware]\n this.app.instance(MiddlewareCallbacks, middleware as Array<(configurator: unknown) => void>)\n this.app.instance(ExceptionCallbacks, this.exceptions)\n for (const provider of this.providers) await this.app.register(provider)\n return this.app\n }\n}\n","import { ClassNames, Container, type HttpRequest, type Middleware, type Next } from '@orieljs/contracts'\nimport { inject } from '@orieljs/container'\n\n/** Elements whose content isn't markup: a chunk is never cut inside one, so its text is never read as tags. */\nconst RAW_TEXT = /<(script|style|textarea|title|xmp|noembed|noframes)\\b[^>]*>(?![\\s\\S]*<\\/\\1)/i\n\n/**\n * Renames the classes in the HTML pages the app sends, as a scrambled production build renamed them in its CSS\n * (`ClassNames`). JSON, files and every other response are left alone, and so is every page when there's no\n * scrambled build. A streamed page is renamed chunk by chunk, each chunk cut after its last whole tag.\n */\nexport class RenameClasses implements Middleware {\n readonly #container = inject(Container)\n\n async handle(request: HttpRequest, next: Next): Promise<Response> {\n const response = await next(request)\n if (response.body === null || !/^text\\/html\\b/i.test(response.headers.get('content-type') ?? '') || response.headers.has('content-encoding')) return response\n if (!this.#container.bound(ClassNames)) return response\n const classNames = this.#container.make(ClassNames)\n if (!classNames.active) return response\n const headers = new Headers(response.headers)\n headers.delete('content-length')\n return new Response(response.body.pipeThrough(renamer((html) => classNames.html(html))), { status: response.status, statusText: response.statusText, headers })\n }\n}\n\n/** Decodes the page, renames each whole run of tags, and keeps the rest for the next chunk. */\nfunction renamer(rename: (html: string) => string): TransformStream<Uint8Array, Uint8Array> {\n const decoder = new TextDecoder()\n const encoder = new TextEncoder()\n let carry = ''\n return new TransformStream({\n transform(chunk, controller) {\n const text = carry + decoder.decode(chunk, { stream: true })\n const cut = safeCut(text)\n carry = text.slice(cut)\n if (cut > 0) controller.enqueue(encoder.encode(rename(text.slice(0, cut))))\n },\n flush(controller) {\n const text = carry + decoder.decode()\n if (text !== '') controller.enqueue(encoder.encode(rename(text)))\n },\n })\n}\n\n/** Where a chunk of HTML can be cut: after its last `>`, but before a comment or a raw-text element still open there. */\nfunction safeCut(text: string): number {\n let cut = text.lastIndexOf('>') + 1\n if (cut === 0) return 0\n const head = text.slice(0, cut)\n const comment = head.lastIndexOf('<!--')\n if (comment !== -1 && head.indexOf('-->', comment + 4) === -1) cut = comment\n const raw = RAW_TEXT.exec(text.slice(0, cut))\n if (raw !== null) cut = raw.index\n return cut\n}\n","import { existsSync, readFileSync, statSync } from 'node:fs'\nimport type { Application, ClassNames as ClassNamesContract } from '@orieljs/contracts'\nimport { rewriteHtml } from '@orieljs/obfuscate'\n\n/**\n * The class names of a scrambled production build, read from `bootstrap/cache/classes.json`. The file is read again when\n * a new build replaces it, and ignored while `public/hot` exists (the Vite dev server's CSS keeps the names as written)\n * and while the app runs its tests, which check the HTML its views write.\n */\nexport class ClassNameMap implements ClassNamesContract {\n #loaded: { modified: number; classes: Record<string, string> } | undefined\n\n constructor(private readonly app: Application) {}\n\n /** The map, or undefined: no scrambled build, the dev server is running, or the app is running its tests. */\n classes(): Record<string, string> | undefined {\n if (this.#testing() || existsSync(this.app.publicPath('hot'))) return undefined\n const file = this.app.bootstrapPath('cache/classes.json')\n let modified: number\n try {\n modified = statSync(file).mtimeMs\n } catch {\n this.#loaded = undefined\n return undefined\n }\n if (this.#loaded?.modified !== modified) {\n const parsed = JSON.parse(readFileSync(file, 'utf8')) as { classes?: Record<string, string> }\n this.#loaded = { modified, classes: parsed.classes ?? {} }\n }\n return Object.keys(this.#loaded.classes).length === 0 ? undefined : this.#loaded.classes\n }\n\n /** The app runs its tests: Oriel's TestCase sets APP_ENV=testing, which a test that switches app.env leaves set. */\n #testing(): boolean {\n return this.app.runningUnitTests() || process.env.APP_ENV === 'testing'\n }\n\n get active(): boolean {\n return this.classes() !== undefined\n }\n\n html(html: string): string {\n const classes = this.classes()\n return classes === undefined ? html : rewriteHtml(html, classes)\n }\n}\n","export class ProviderBootError extends Error {\n override readonly name = 'ProviderBootError'\n constructor(readonly provider: string, cause: unknown) {\n super(`Service provider [${provider}] failed to boot: ${cause instanceof Error ? cause.message : String(cause)}`, { cause })\n }\n}\n\nexport class ProviderRegisterError extends Error {\n override readonly name = 'ProviderRegisterError'\n constructor(readonly provider: string, cause: unknown) {\n super(`Service provider [${provider}] failed to register: ${cause instanceof Error ? cause.message : String(cause)}`, { cause })\n }\n}\n","import { existsSync, readFileSync, statSync } from 'node:fs'\nimport { createHash, randomBytes } from 'node:crypto'\nimport { join } from 'node:path'\nimport { Application as ApplicationToken, ConfigRepository, HttpRequest, UrlGenerator, type Application, type Htmlable, type OrielError } from '@orieljs/contracts'\nimport { ContainerNotAvailableError, currentContainer } from '@orieljs/container'\n\n/** One entry of Vite's build manifest (vite's ManifestChunk). */\nexport interface ManifestChunk {\n file: string\n src?: string\n name?: string\n isEntry?: boolean\n isDynamicEntry?: boolean\n imports?: string[]\n dynamicImports?: string[]\n css?: string[]\n assets?: string[]\n [key: string]: unknown\n}\nexport type Manifest = Record<string, ManifestChunk>\n\nexport type TagAttributes = Record<string, string | boolean | null | undefined>\nexport type AttributesResolver = (src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined) => TagAttributes\nexport type PreloadAttributesResolver = (src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined) => TagAttributes | false\n\n/** A missing manifest or chunk (Laravel's ViteException / ViteManifestNotFoundException). */\nexport class ViteError extends Error implements OrielError {\n readonly kind = 'Server' as const\n readonly status = 500\n\n constructor(message: string) {\n super(message)\n this.name = 'ViteError'\n }\n}\n\n/** Markup the view renderer emits unescaped (Htmlable; Foundation can't import View's HtmlString). */\nexport class ViteHtml implements Htmlable {\n constructor(private readonly html: string) {}\n\n toHtml(): string {\n return this.html\n }\n\n toString(): string {\n return this.html\n }\n}\n\n/**\n * Marks the tags as tracked assets: when o:navigate reaches a page whose tracked URLs changed (a new build), it loads\n * the page in full rather than run the new bundle beside the old one. A tag attribute of `false` takes it off.\n */\nconst TRACKED: TagAttributes = { 'data-navigate-track': true }\nconst CSS_PATH = /\\.(css|less|sass|scss|styl|stylus|pcss|postcss)(\\?[^.]*)?$/\n\n/** Parsed manifests by path, reloaded when the file changes (a long-running server outlives a `vite build`). */\nconst manifests = new Map<string, { mtimeMs: number; manifest: Manifest }>()\n\nconst escapeAttribute = (value: string): string => value.replace(/&/g, '&amp;').replace(/\"/g, '&quot;')\n\n/**\n * Laravel's Illuminate\\Foundation\\Vite: the script, style and preload tags for Vite entry points. While the dev\n * server runs (public/hot holds its URL) it points at the dev server; otherwise it reads public/build/manifest.json.\n */\nexport class Vite {\n #hotFile: string | undefined\n #buildDirectory = 'build'\n #manifestFilename = 'manifest.json'\n #nonce: string | undefined\n #integrityKey: string | false = 'integrity'\n #entryPoints: string[] = []\n readonly #scriptResolvers: AttributesResolver[] = []\n readonly #styleResolvers: AttributesResolver[] = []\n readonly #preloadResolvers: PreloadAttributesResolver[] = []\n #assetPathResolver: ((path: string) => string) | undefined\n readonly #preloaded: Record<string, string[]> = {}\n\n constructor(protected readonly app: Application) {}\n\n // Configuration --------------------------------------------------------------------------------------------\n\n useCspNonce(nonce?: string): string {\n this.#nonce = nonce ?? randomBytes(30).toString('base64url').slice(0, 40)\n return this.#nonce\n }\n\n cspNonce(): string | undefined {\n return this.#nonce\n }\n\n useIntegrityKey(key: string | false): this {\n this.#integrityKey = key\n return this\n }\n\n withEntryPoints(entryPoints: string[]): this {\n this.#entryPoints = entryPoints\n return this\n }\n\n useHotFile(path: string): this {\n this.#hotFile = path\n return this\n }\n\n useBuildDirectory(path: string): this {\n this.#buildDirectory = path\n return this\n }\n\n useManifestFilename(filename: string): this {\n this.#manifestFilename = filename\n return this\n }\n\n useScriptTagAttributes(attributes: TagAttributes | AttributesResolver): this {\n this.#scriptResolvers.push(typeof attributes === 'function' ? attributes : () => attributes)\n return this\n }\n\n useStyleTagAttributes(attributes: TagAttributes | AttributesResolver): this {\n this.#styleResolvers.push(typeof attributes === 'function' ? attributes : () => attributes)\n return this\n }\n\n /** Extra preload attributes; a resolver returning false drops that preload. */\n usePreloadTagAttributes(attributes: TagAttributes | PreloadAttributesResolver | false): this {\n this.#preloadResolvers.push(typeof attributes === 'function' ? attributes : () => attributes)\n return this\n }\n\n createAssetPathsUsing(resolver: (path: string) => string): this {\n this.#assetPathResolver = resolver\n return this\n }\n\n // Dev server -----------------------------------------------------------------------------------------------\n\n hotFile(): string {\n return this.#hotFile ?? this.app.publicPath('hot')\n }\n\n isRunningHot(): boolean {\n return existsSync(this.hotFile())\n }\n\n /** The dev server URL written by @orieljs/vite, or undefined when it isn't running. */\n devServerUrl(): string | undefined {\n return this.isRunningHot() ? readFileSync(this.hotFile(), 'utf8').trimEnd() : undefined\n }\n\n // Tags -----------------------------------------------------------------------------------------------------\n\n /** Laravel's @vite([...]): preloads (styles first), then stylesheets, then scripts. */\n tags(entryPoints: string | string[], buildDirectory = this.#buildDirectory): ViteHtml {\n const entries = [entryPoints].flat()\n if (this.isRunningHot()) {\n return new ViteHtml(['@vite/client', ...entries].map((entry) => this.#tagForChunk(entry, this.#hotAsset(entry), undefined, undefined)).join(''))\n }\n const manifest = this.manifest(buildDirectory)\n const tags: string[] = []\n const preloads: Array<[string, string, ManifestChunk | undefined]> = []\n const cssChunk = (css: string): [string, ManifestChunk | undefined] => {\n const found = Object.entries(manifest).find(([, chunk]) => chunk.file === css)\n return found === undefined ? [css, undefined] : [found[0], found[1]]\n }\n for (const entry of entries) {\n const chunk = this.#chunk(manifest, entry)\n preloads.push([chunk.src ?? entry, this.#assetPath(`${buildDirectory}/${chunk.file}`), chunk])\n for (const name of this.#resolveImports(manifest, chunk)) {\n const imported = manifest[name]!\n preloads.push([name, this.#assetPath(`${buildDirectory}/${imported.file}`), imported])\n for (const css of imported.css ?? []) {\n const [key, partial] = cssChunk(css)\n preloads.push([key, this.#assetPath(`${buildDirectory}/${css}`), partial])\n tags.push(this.#tagForChunk(key, this.#assetPath(`${buildDirectory}/${css}`), partial, manifest))\n }\n }\n tags.push(this.#tagForChunk(entry, this.#assetPath(`${buildDirectory}/${chunk.file}`), chunk, manifest))\n for (const css of chunk.css ?? []) {\n const [key, partial] = cssChunk(css)\n preloads.push([key, this.#assetPath(`${buildDirectory}/${css}`), partial])\n tags.push(this.#tagForChunk(key, this.#assetPath(`${buildDirectory}/${css}`), partial, manifest))\n }\n }\n const uniqueTags = [...new Set(tags)]\n const stylesheets = uniqueTags.filter((tag) => tag.startsWith('<link'))\n const scripts = uniqueTags.filter((tag) => !tag.startsWith('<link'))\n const seen = new Set<string>()\n const uniquePreloads = preloads.filter(([, url]) => (seen.has(url) ? false : (seen.add(url), true)))\n const sorted = [...uniquePreloads.filter(([, url]) => CSS_PATH.test(url)), ...uniquePreloads.filter(([, url]) => !CSS_PATH.test(url))]\n const preloadTags = sorted.map(([src, url, chunk]) => this.#preloadTag(src, url, chunk, manifest))\n return new ViteHtml(preloadTags.join('') + stylesheets.join('') + scripts.join(''))\n }\n\n /** Laravel's @viteReactRefresh: the React Refresh preamble while the dev server runs; nothing otherwise. */\n reactRefresh(): ViteHtml | undefined {\n if (!this.isRunningHot()) return undefined\n const attributes = this.#parseAttributes({ nonce: this.#nonce ?? false })\n return new ViteHtml(\n [\n `<script type=\"module\" ${attributes.join(' ')}>`,\n ` import RefreshRuntime from '${this.#hotAsset('@react-refresh')}'`,\n ' RefreshRuntime.injectIntoGlobalHook(window)',\n ' window.$RefreshReg$ = () => {}',\n ' window.$RefreshSig$ = () => (type) => type',\n ' window.__vite_plugin_react_preamble_installed__ = true',\n '</script>',\n ].join('\\n'),\n )\n }\n\n /** The URL of a processed asset (Vite::asset('resources/images/logo.svg')). */\n asset(path: string, buildDirectory = this.#buildDirectory): string {\n if (this.isRunningHot()) return this.#hotAsset(path)\n return this.#assetPath(`${buildDirectory}/${this.#chunk(this.manifest(buildDirectory), path).file}`)\n }\n\n /** The built file's contents (Vite::content()). */\n content(path: string, buildDirectory = this.#buildDirectory): string {\n const chunk = this.#chunk(this.manifest(buildDirectory), path)\n const file = this.app.publicPath(join(buildDirectory, chunk.file))\n if (!existsSync(file)) throw new ViteError(`Unable to locate file from Vite manifest: ${file}.`)\n return readFileSync(file, 'utf8')\n }\n\n /** md5 of the manifest (a cache-busting asset version); undefined while hot or without a build. */\n manifestHash(buildDirectory = this.#buildDirectory): string | undefined {\n if (this.isRunningHot()) return undefined\n const path = this.manifestPath(buildDirectory)\n return existsSync(path) ? createHash('md5').update(readFileSync(path)).digest('hex') : undefined\n }\n\n manifestPath(buildDirectory = this.#buildDirectory): string {\n return this.app.publicPath(join(buildDirectory, this.#manifestFilename))\n }\n\n manifest(buildDirectory = this.#buildDirectory): Manifest {\n const path = this.manifestPath(buildDirectory)\n if (!existsSync(path)) throw new ViteError(`Vite manifest not found at: ${path}`)\n const { mtimeMs } = statSync(path)\n const cached = manifests.get(path)\n if (cached !== undefined && cached.mtimeMs === mtimeMs) return cached.manifest\n const manifest = JSON.parse(readFileSync(path, 'utf8')) as Manifest\n manifests.set(path, { mtimeMs, manifest })\n return manifest\n }\n\n /** URL → the attributes of the preload tags rendered so far (without href), for Link headers. */\n preloadedAssets(): Record<string, string[]> {\n return { ...this.#preloaded }\n }\n\n /** Renders withEntryPoints() (Vite is Htmlable, like Laravel's). */\n toHtml(): string {\n return this.tags(this.#entryPoints).toHtml()\n }\n\n // Internals ------------------------------------------------------------------------------------------------\n\n #hotAsset(path: string): string {\n return `${this.devServerUrl() ?? ''}/${path}`\n }\n\n #assetPath(path: string): string {\n if (this.#assetPathResolver !== undefined) return this.#assetPathResolver(path)\n if (this.app.bound(UrlGenerator)) return this.app.make(UrlGenerator).asset(path)\n const base = this.app.bound(ConfigRepository) ? this.app.make(ConfigRepository).get<string | null>('app.asset_url', null) : null\n return `${(base ?? '').replace(/\\/+$/, '')}/${path.replace(/^\\/+/, '')}`\n }\n\n #chunk(manifest: Manifest, file: string): ManifestChunk {\n const chunk = manifest[file]\n if (chunk === undefined) throw new ViteError(`Unable to locate file in Vite manifest: ${file}.`)\n return chunk\n }\n\n /** Every static import, depth first, each once. */\n #resolveImports(manifest: Manifest, chunk: ManifestChunk, seen = new Set<string>()): string[] {\n const imports: string[] = []\n for (const name of chunk.imports ?? []) {\n if (seen.has(name)) continue\n seen.add(name)\n imports.push(name)\n const imported = manifest[name]\n if (imported !== undefined) imports.push(...this.#resolveImports(manifest, imported, seen))\n }\n return imports\n }\n\n #tagForChunk(src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined): string {\n if (CSS_PATH.test(url)) {\n const attributes = this.#parseAttributes({ rel: 'stylesheet', href: url, nonce: this.#nonce ?? false, ...TRACKED, ...this.#styleAttributes(src, url, chunk, manifest) })\n return `<link ${attributes.join(' ')} />`\n }\n const attributes = this.#parseAttributes({ type: 'module', src: url, nonce: this.#nonce ?? false, ...TRACKED, ...this.#scriptAttributes(src, url, chunk, manifest) })\n return `<script ${attributes.join(' ')}></script>`\n }\n\n #preloadTag(src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest): string {\n const css = CSS_PATH.test(url)\n let attributes: TagAttributes = {\n rel: css ? 'preload' : 'modulepreload',\n as: css ? 'style' : 'script',\n href: url,\n nonce: this.#nonce ?? false,\n crossorigin: (css ? this.#styleAttributes(src, url, chunk, manifest) : this.#scriptAttributes(src, url, chunk, manifest)).crossorigin ?? false,\n }\n if (this.#integrityKey !== false) attributes.integrity = (chunk?.[this.#integrityKey] as string | undefined) ?? false\n for (const resolver of this.#preloadResolvers) {\n const resolved = resolver(src, url, chunk, manifest)\n if (resolved === false) return ''\n attributes = { ...attributes, ...resolved }\n }\n const { href: _href, ...rest } = attributes\n this.#preloaded[url] = this.#parseAttributes(rest)\n return `<link ${this.#parseAttributes(attributes).join(' ')} />`\n }\n\n #scriptAttributes(src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined): TagAttributes {\n let attributes: TagAttributes = this.#integrityKey !== false ? { integrity: (chunk?.[this.#integrityKey] as string | undefined) ?? false } : {}\n for (const resolver of this.#scriptResolvers) attributes = { ...attributes, ...resolver(src, url, chunk, manifest) }\n return attributes\n }\n\n #styleAttributes(src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined): TagAttributes {\n let attributes: TagAttributes = this.#integrityKey !== false ? { integrity: (chunk?.[this.#integrityKey] as string | undefined) ?? false } : {}\n for (const resolver of this.#styleResolvers) attributes = { ...attributes, ...resolver(src, url, chunk, manifest) }\n return attributes\n }\n\n /** false/null/undefined are dropped, true is a bare attribute, anything else name=\"value\". */\n #parseAttributes(attributes: TagAttributes): string[] {\n return Object.entries(attributes)\n .filter(([, value]) => value !== false && value !== null && value !== undefined)\n .map(([name, value]) => (value === true ? name : `${name}=\"${escapeAttribute(String(value))}\"`))\n }\n}\n\n/**\n * The Vite instance for the current context: the request's own (scoped, so a CSP nonce stays in its request),\n * else a fresh one for the application (a mail view rendered by a queue worker).\n */\nexport function currentVite(): Vite {\n const container = currentContainer()\n if (container === undefined) throw new ContainerNotAvailableError('Vite')\n if (container.bound(HttpRequest)) return container.make(Vite)\n return new Vite(container.make(ApplicationToken))\n}\n\n/** vite(['resources/js/app.tsx']) → the tags (Laravel's @vite); vite() → the Vite instance. */\nexport function vite(): Vite\nexport function vite(entryPoints: string | string[], buildDirectory?: string): ViteHtml\nexport function vite(entryPoints?: string | string[], buildDirectory?: string): Vite | ViteHtml {\n const instance = currentVite()\n return entryPoints === undefined ? instance : instance.tags(entryPoints, buildDirectory)\n}\n\n/** Laravel's @viteReactRefresh: put it before vite([...]) in the root view of a React app. */\nexport function viteReactRefresh(): ViteHtml | undefined {\n return currentVite().reactRefresh()\n}\n","import type { HttpKernel } from '@orieljs/contracts'\n\ntype Handler = (request: Request) => unknown\n\n/** Wave 0 stand-in for the Http kernel: exact \"METHOD /path\" matching only. Replaced by Wave 1's router. */\nexport class ClosureKernel implements HttpKernel {\n private readonly routes = new Map<string, Handler>()\n\n on(method: string, path: string, handler: Handler): this {\n this.routes.set(`${method.toUpperCase()} ${path}`, handler)\n return this\n }\n\n async handle(request: Request): Promise<Response> {\n const handler = this.routes.get(`${request.method} ${new URL(request.url).pathname}`)\n if (!handler) return new Response('Not Found', { status: 404, headers: { 'content-type': 'text/plain; charset=utf-8' } })\n return toResponse(await handler(request))\n }\n}\n\nfunction toResponse(output: unknown): Response {\n if (output instanceof Response) return output\n if (output === undefined || output === null) return new Response(null, { status: 204 })\n if (typeof output === 'string') return new Response(output, { headers: { 'content-type': 'text/html; charset=utf-8' } })\n return Response.json(output)\n}\n"],"mappings":";AAAA,SAAS,QAAAA,aAAY;AACrB;AAAA,EACE,eAAeC;AAAA,EACf,cAAAC;AAAA,EACA,iBAAiB;AAAA,EACjB,oBAAAC;AA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AAa,EAAE,QAAQ,KAAK,SAAS,EAAE,gBAAgB,4BAA4B,EAAE,CAAC;AACxH,WAAO,WAAW,MAAM,QAAQ,OAAO,CAAC;AAAA,EAC1C;AACF;AAEA,SAAS,WAAW,QAA2B;AAC7C,MAAI,kBAAkB,SAAU,QAAO;AACvC,MAAI,WAAW,UAAa,WAAW,KAAM,QAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AACtF,MAAI,OAAO,WAAW,SAAU,QAAO,IAAI,SAAS,QAAQ,EAAE,SAAS,EAAE,gBAAgB,2BAA2B,EAAE,CAAC;AACvH,SAAO,SAAS,KAAK,MAAM;AAC7B;","names":["join","ApplicationToken","ClassNames","ConfigRepository","Container","existsSync","readFileSync","statSync","join","ConfigRepository","attributes","Container","ApplicationToken","ClassNames","join","ConfigRepository"]}
1
+ {"version":3,"sources":["../Application.ts","../ApplicationBuilder.ts","../Http/RenameClasses.ts","../ClassNames.ts","../errors.ts","../Vite.ts","../Http/ClosureKernel.ts"],"sourcesContent":["import { join } from 'node:path'\nimport {\n Application as ApplicationToken,\n ClassNames,\n ClassRegistry as ClassRegistryToken,\n ConfigRepository,\n HttpKernel,\n type Application as ApplicationContract,\n type ServiceProvider,\n type ServiceProviderClass,\n} from '@orieljs/contracts'\nimport { Container } from '@orieljs/container'\nimport { ClassRegistry, Str } from '@orieljs/support'\nimport { ApplicationBuilder } from './ApplicationBuilder'\nimport { ClassNameMap } from './ClassNames'\nimport { ProviderBootError, ProviderRegisterError } from './errors'\nimport { Vite } from './Vite'\n\ntype LifecycleCallback = (app: ApplicationContract) => void | Promise<void>\n\n/** How long shutdown() waits for its callbacks before giving up, so a hung close never keeps the process alive. */\nconst SHUTDOWN_TIMEOUT_MS = 10_000\n\nexport class Application extends Container implements ApplicationContract {\n readonly version = '0.1.0-alpha.14'\n\n private readonly providers: ServiceProvider[] = []\n private readonly bootingCallbacks: LifecycleCallback[] = []\n private readonly bootedCallbacks: LifecycleCallback[] = []\n private readonly terminatingCallbacks: Array<() => void | Promise<void>> = []\n private readonly shutdownCallbacks: Array<() => void | Promise<void>> = []\n private shutdownPromise: Promise<void> | undefined\n private bootPromise: Promise<void> | undefined\n private hasBooted = false\n private inConsole = false\n\n constructor(private readonly base: string) {\n super()\n Container.setInstance(this)\n this.instance(ApplicationToken, this)\n // The class too: otherwise inject(Application) would build a second app and hijack the global instance.\n this.instance(Application, this)\n this.singleton(ClassRegistryToken, ClassRegistry)\n // One per request: a CSP nonce set with vite().useCspNonce() must not leak into other requests.\n this.scoped(Vite, () => new Vite(this))\n this.singleton(ClassNames, () => new ClassNameMap(this))\n }\n\n /** Entry point used by bootstrap/app.ts. */\n static configure(options: { basePath: string }): ApplicationBuilder {\n return new ApplicationBuilder(new Application(options.basePath))\n }\n\n basePath(path = ''): string { return join(this.base, path) }\n appPath(path = ''): string { return this.basePath(join('app', path)) }\n bootstrapPath(path = ''): string { return this.basePath(join('bootstrap', path)) }\n configPath(path = ''): string { return this.basePath(join('config', path)) }\n databasePath(path = ''): string { return this.basePath(join('database', path)) }\n publicPath(path = ''): string { return this.basePath(join('public', path)) }\n resourcePath(path = ''): string { return this.basePath(join('resources', path)) }\n storagePath(path = ''): string { return this.basePath(join('storage', path)) }\n\n environment(): string\n environment(...environments: string[]): boolean\n environment(...environments: string[]): string | boolean {\n const fallback = process.env.APP_ENV ?? 'production'\n const current = this.bound(ConfigRepository)\n ? String(this.make(ConfigRepository).get('app.env', fallback))\n : fallback\n return environments.length === 0 ? current : environments.some((pattern) => Str.is(pattern, current))\n }\n\n isProduction(): boolean { return this.environment('production') }\n isLocal(): boolean { return this.environment('local') }\n runningUnitTests(): boolean { return this.environment('testing') }\n runningInConsole(): boolean { return this.inConsole }\n setRunningInConsole(value = true): void { this.inConsole = value }\n\n async register(provider: ServiceProvider | ServiceProviderClass): Promise<ServiceProvider> {\n const cls = typeof provider === 'function' ? provider : provider.constructor\n const existing = this.providers.find((p) => p.constructor === cls)\n if (existing) return existing\n\n const instance = typeof provider === 'function' ? new provider(this) : provider\n try {\n instance.register?.()\n } catch (error) {\n throw new ProviderRegisterError(instance.constructor.name, error)\n }\n this.providers.push(instance)\n if (this.hasBooted) await this.bootProvider(instance)\n return instance\n }\n\n getProviders(): ServiceProvider[] {\n return [...this.providers]\n }\n\n boot(): Promise<void> {\n return (this.bootPromise ??= this.runBoot())\n }\n\n isBooted(): boolean {\n return this.hasBooted\n }\n\n booting(callback: LifecycleCallback): void {\n this.bootingCallbacks.push(callback)\n }\n\n /** If already booted, the callback runs immediately (a rejection surfaces as an unhandled rejection). */\n booted(callback: LifecycleCallback): void {\n this.bootedCallbacks.push(callback)\n if (this.hasBooted) void callback(this)\n }\n\n terminating(callback: () => void | Promise<void>): void {\n this.terminatingCallbacks.push(callback)\n }\n\n async handle(request: Request): Promise<Response> {\n await this.boot()\n const scope = this.createScope()\n return scope.run(() => scope.make(HttpKernel).handle(request))\n }\n\n async terminate(): Promise<void> {\n for (const callback of this.terminatingCallbacks) await callback()\n }\n\n /**\n * A callback for the end of the process (the CLI after its command, the server on SIGTERM): close DB pools, Redis\n * clients and log files. Not in Laravel, whose PHP processes end with each request.\n */\n onShutdown(callback: () => void | Promise<void>): void {\n this.shutdownCallbacks.push(callback)\n }\n\n /**\n * Runs the shutdown callbacks once (a second call returns the same promise), newest first: an app's own callbacks\n * run before the framework closes what they use, then the framework's in the reverse of its providers' order (the\n * queue, database and cache connections close, then the log is written, then the session store closes). A failing\n * callback is printed with console.error (the log may be closed already) and the others still run; after 10 seconds\n * the rest are given up on, so the process can still exit. Never rejects.\n */\n shutdown(): Promise<void> {\n return (this.shutdownPromise ??= this.runShutdown())\n }\n\n private async runShutdown(): Promise<void> {\n if (this.shutdownCallbacks.length === 0) return\n const callbacks = [...this.shutdownCallbacks].reverse()\n const run = (async () => {\n for (const callback of callbacks) {\n try {\n await callback()\n } catch (error) {\n console.error(error)\n }\n }\n return 'done' as const\n })()\n let timer: ReturnType<typeof setTimeout> | undefined\n // Not unref'd: if a callback hangs on a promise and nothing else is left, the process must still reach its exit.\n const deadline = new Promise<'timeout'>((resolve) => (timer = setTimeout(() => resolve('timeout'), SHUTDOWN_TIMEOUT_MS)))\n const outcome = await Promise.race([run, deadline])\n clearTimeout(timer)\n if (outcome === 'timeout') {\n console.error(`The shutdown callbacks did not finish within ${SHUTDOWN_TIMEOUT_MS / 1000} seconds; carrying on with the exit.`)\n }\n }\n\n private async runBoot(): Promise<void> {\n for (const callback of this.bootingCallbacks) await callback(this)\n // Index loop on purpose: providers registered during boot are appended and booted in this pass.\n for (let i = 0; i < this.providers.length; i++) await this.bootProvider(this.providers[i]!)\n this.hasBooted = true\n for (const callback of this.bootedCallbacks) await callback(this)\n }\n\n private async bootProvider(provider: ServiceProvider): Promise<void> {\n try {\n await provider.boot?.()\n } catch (error) {\n throw new ProviderBootError(provider.constructor.name, error)\n }\n }\n}\n","import { isAbsolute, join } from 'node:path'\nimport {\n ConfigRepository,\n ExceptionCallbacks,\n MiddlewareCallbacks,\n RoutingPaths,\n type Application as ApplicationContract,\n type ExceptionsConfigurator,\n type MiddlewareConfigurator,\n type ServiceProvider,\n type ServiceProviderClass,\n} from '@orieljs/contracts'\nimport { loadConfiguration, loadEnvironment, Repository } from '@orieljs/config'\nimport type { Application } from './Application'\nimport { RenameClasses } from './Http/RenameClasses'\n\nexport interface RoutingOptions {\n /** One route file or several, loaded in order: web: ['routes/web.ts', 'routes/settings.ts', 'routes/auth.ts']. */\n web?: string | string[]\n api?: string | string[]\n console?: string\n /** A URI such as '/up', not a file. */\n health?: string\n apiPrefix?: string\n}\n\ntype Lifecycle = (app: ApplicationContract) => void | Promise<void>\n\nexport class ApplicationBuilder {\n private readonly providers: Array<ServiceProvider | ServiceProviderClass> = []\n private readonly middleware: Array<(middleware: MiddlewareConfigurator) => void> = []\n private readonly exceptions: Array<(exceptions: ExceptionsConfigurator) => void> = []\n private routing: RoutingPaths | undefined\n\n constructor(private readonly app: Application) {}\n\n withProviders(providers: Array<ServiceProvider | ServiceProviderClass> = []): this {\n this.providers.push(...providers)\n return this\n }\n\n withRouting(options: RoutingOptions): this {\n const abs = (p: string) => (isAbsolute(p) ? p : join(this.app.basePath(), p))\n const each = (p: string | string[]) => (Array.isArray(p) ? p.map(abs) : abs(p))\n const paths: RoutingPaths = { apiPrefix: options.apiPrefix ?? 'api' }\n if (options.web !== undefined) paths.web = each(options.web)\n if (options.api !== undefined) paths.api = each(options.api)\n if (options.console !== undefined) paths.console = abs(options.console)\n if (options.health !== undefined) paths.health = options.health\n this.routing = paths\n return this\n }\n\n withMiddleware(callback: (middleware: MiddlewareConfigurator) => void): this {\n this.middleware.push(callback)\n return this\n }\n\n withExceptions(callback: (exceptions: ExceptionsConfigurator) => void): this {\n this.exceptions.push(callback)\n return this\n }\n\n booting(callback: Lifecycle): this {\n this.app.booting(callback)\n return this\n }\n\n booted(callback: Lifecycle): this {\n this.app.booted(callback)\n return this\n }\n\n async create(): Promise<Application> {\n loadEnvironment(this.app.basePath())\n this.app.instance(ConfigRepository, new Repository(await loadConfiguration(this.app.configPath())))\n if (this.routing) this.app.instance(RoutingPaths, this.routing)\n // Outermost, so it sees every page as it leaves: the classes of a scrambled build renamed.\n const middleware = [(m: MiddlewareConfigurator) => void m.prepend(RenameClasses), ...this.middleware]\n this.app.instance(MiddlewareCallbacks, middleware as Array<(configurator: unknown) => void>)\n this.app.instance(ExceptionCallbacks, this.exceptions)\n for (const provider of this.providers) await this.app.register(provider)\n return this.app\n }\n}\n","import { ClassNames, Container, type HttpRequest, type Middleware, type Next } from '@orieljs/contracts'\nimport { inject } from '@orieljs/container'\n\n/** Elements whose content isn't markup: a chunk is never cut inside one, so its text is never read as tags. */\nconst RAW_TEXT = /<(script|style|textarea|title|xmp|noembed|noframes)\\b[^>]*>(?![\\s\\S]*<\\/\\1)/i\n\n/**\n * Renames the classes in the HTML pages the app sends, as a scrambled production build renamed them in its CSS\n * (`ClassNames`). JSON, files and every other response are left alone, and so is every page when there's no\n * scrambled build. A streamed page is renamed chunk by chunk, each chunk cut after its last whole tag.\n */\nexport class RenameClasses implements Middleware {\n readonly #container = inject(Container)\n\n async handle(request: HttpRequest, next: Next): Promise<Response> {\n const response = await next(request)\n if (response.body === null || !/^text\\/html\\b/i.test(response.headers.get('content-type') ?? '') || response.headers.has('content-encoding')) return response\n if (!this.#container.bound(ClassNames)) return response\n const classNames = this.#container.make(ClassNames)\n if (!classNames.active) return response\n const headers = new Headers(response.headers)\n headers.delete('content-length')\n return new Response(response.body.pipeThrough(renamer((html) => classNames.html(html))), { status: response.status, statusText: response.statusText, headers })\n }\n}\n\n/** Decodes the page, renames each whole run of tags, and keeps the rest for the next chunk. */\nfunction renamer(rename: (html: string) => string): TransformStream<Uint8Array, Uint8Array> {\n const decoder = new TextDecoder()\n const encoder = new TextEncoder()\n let carry = ''\n return new TransformStream({\n transform(chunk, controller) {\n const text = carry + decoder.decode(chunk, { stream: true })\n const cut = safeCut(text)\n carry = text.slice(cut)\n if (cut > 0) controller.enqueue(encoder.encode(rename(text.slice(0, cut))))\n },\n flush(controller) {\n const text = carry + decoder.decode()\n if (text !== '') controller.enqueue(encoder.encode(rename(text)))\n },\n })\n}\n\n/** Where a chunk of HTML can be cut: after its last `>`, but before a comment or a raw-text element still open there. */\nfunction safeCut(text: string): number {\n let cut = text.lastIndexOf('>') + 1\n if (cut === 0) return 0\n const head = text.slice(0, cut)\n const comment = head.lastIndexOf('<!--')\n if (comment !== -1 && head.indexOf('-->', comment + 4) === -1) cut = comment\n const raw = RAW_TEXT.exec(text.slice(0, cut))\n if (raw !== null) cut = raw.index\n return cut\n}\n","import { existsSync, readFileSync, statSync } from 'node:fs'\nimport type { Application, ClassNames as ClassNamesContract } from '@orieljs/contracts'\nimport { rewriteHtml } from '@orieljs/obfuscate'\n\n/**\n * The class names of a scrambled production build, read from `bootstrap/cache/classes.json`. The file is read again when\n * a new build replaces it, and ignored while `public/hot` exists (the Vite dev server's CSS keeps the names as written)\n * and while the app runs its tests, which check the HTML its views write.\n */\nexport class ClassNameMap implements ClassNamesContract {\n #loaded: { modified: number; classes: Record<string, string> } | undefined\n\n constructor(private readonly app: Application) {}\n\n /** The map, or undefined: no scrambled build, the dev server is running, or the app is running its tests. */\n classes(): Record<string, string> | undefined {\n if (this.#testing() || existsSync(this.app.publicPath('hot'))) return undefined\n const file = this.app.bootstrapPath('cache/classes.json')\n let modified: number\n try {\n modified = statSync(file).mtimeMs\n } catch {\n this.#loaded = undefined\n return undefined\n }\n if (this.#loaded?.modified !== modified) {\n const parsed = JSON.parse(readFileSync(file, 'utf8')) as { classes?: Record<string, string> }\n this.#loaded = { modified, classes: parsed.classes ?? {} }\n }\n return Object.keys(this.#loaded.classes).length === 0 ? undefined : this.#loaded.classes\n }\n\n /** The app runs its tests: Oriel's TestCase sets APP_ENV=testing, which a test that switches app.env leaves set. */\n #testing(): boolean {\n return this.app.runningUnitTests() || process.env.APP_ENV === 'testing'\n }\n\n get active(): boolean {\n return this.classes() !== undefined\n }\n\n html(html: string): string {\n const classes = this.classes()\n return classes === undefined ? html : rewriteHtml(html, classes)\n }\n}\n","export class ProviderBootError extends Error {\n override readonly name = 'ProviderBootError'\n constructor(readonly provider: string, cause: unknown) {\n super(`Service provider [${provider}] failed to boot: ${cause instanceof Error ? cause.message : String(cause)}`, { cause })\n }\n}\n\nexport class ProviderRegisterError extends Error {\n override readonly name = 'ProviderRegisterError'\n constructor(readonly provider: string, cause: unknown) {\n super(`Service provider [${provider}] failed to register: ${cause instanceof Error ? cause.message : String(cause)}`, { cause })\n }\n}\n","import { existsSync, readFileSync, statSync } from 'node:fs'\nimport { createHash, randomBytes } from 'node:crypto'\nimport { join } from 'node:path'\nimport { Application as ApplicationToken, ConfigRepository, HttpRequest, UrlGenerator, type Application, type Htmlable, type OrielError } from '@orieljs/contracts'\nimport { ContainerNotAvailableError, currentContainer } from '@orieljs/container'\n\n/** One entry of Vite's build manifest (vite's ManifestChunk). */\nexport interface ManifestChunk {\n file: string\n src?: string\n name?: string\n isEntry?: boolean\n isDynamicEntry?: boolean\n imports?: string[]\n dynamicImports?: string[]\n css?: string[]\n assets?: string[]\n [key: string]: unknown\n}\nexport type Manifest = Record<string, ManifestChunk>\n\nexport type TagAttributes = Record<string, string | boolean | null | undefined>\nexport type AttributesResolver = (src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined) => TagAttributes\nexport type PreloadAttributesResolver = (src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined) => TagAttributes | false\n\n/** A missing manifest or chunk (Laravel's ViteException / ViteManifestNotFoundException). */\nexport class ViteError extends Error implements OrielError {\n readonly kind = 'Server' as const\n readonly status = 500\n\n constructor(message: string) {\n super(message)\n this.name = 'ViteError'\n }\n}\n\n/** Markup the view renderer emits unescaped (Htmlable; Foundation can't import View's HtmlString). */\nexport class ViteHtml implements Htmlable {\n constructor(private readonly html: string) {}\n\n toHtml(): string {\n return this.html\n }\n\n toString(): string {\n return this.html\n }\n}\n\n/**\n * Marks the tags as tracked assets: when o:navigate reaches a page whose tracked URLs changed (a new build), it loads\n * the page in full rather than run the new bundle beside the old one. A tag attribute of `false` takes it off.\n */\nconst TRACKED: TagAttributes = { 'data-navigate-track': true }\nconst CSS_PATH = /\\.(css|less|sass|scss|styl|stylus|pcss|postcss)(\\?[^.]*)?$/\n\n/** Parsed manifests by path, reloaded when the file changes (a long-running server outlives a `vite build`). */\nconst manifests = new Map<string, { mtimeMs: number; manifest: Manifest }>()\n\nconst escapeAttribute = (value: string): string => value.replace(/&/g, '&amp;').replace(/\"/g, '&quot;')\n\n/**\n * Laravel's Illuminate\\Foundation\\Vite: the script, style and preload tags for Vite entry points. While the dev\n * server runs (public/hot holds its URL) it points at the dev server; otherwise it reads public/build/manifest.json.\n */\nexport class Vite {\n #hotFile: string | undefined\n #buildDirectory = 'build'\n #manifestFilename = 'manifest.json'\n #nonce: string | undefined\n #integrityKey: string | false = 'integrity'\n #entryPoints: string[] = []\n readonly #scriptResolvers: AttributesResolver[] = []\n readonly #styleResolvers: AttributesResolver[] = []\n readonly #preloadResolvers: PreloadAttributesResolver[] = []\n #assetPathResolver: ((path: string) => string) | undefined\n readonly #preloaded: Record<string, string[]> = {}\n\n constructor(protected readonly app: Application) {}\n\n // Configuration --------------------------------------------------------------------------------------------\n\n useCspNonce(nonce?: string): string {\n this.#nonce = nonce ?? randomBytes(30).toString('base64url').slice(0, 40)\n return this.#nonce\n }\n\n cspNonce(): string | undefined {\n return this.#nonce\n }\n\n useIntegrityKey(key: string | false): this {\n this.#integrityKey = key\n return this\n }\n\n withEntryPoints(entryPoints: string[]): this {\n this.#entryPoints = entryPoints\n return this\n }\n\n useHotFile(path: string): this {\n this.#hotFile = path\n return this\n }\n\n useBuildDirectory(path: string): this {\n this.#buildDirectory = path\n return this\n }\n\n useManifestFilename(filename: string): this {\n this.#manifestFilename = filename\n return this\n }\n\n useScriptTagAttributes(attributes: TagAttributes | AttributesResolver): this {\n this.#scriptResolvers.push(typeof attributes === 'function' ? attributes : () => attributes)\n return this\n }\n\n useStyleTagAttributes(attributes: TagAttributes | AttributesResolver): this {\n this.#styleResolvers.push(typeof attributes === 'function' ? attributes : () => attributes)\n return this\n }\n\n /** Extra preload attributes; a resolver returning false drops that preload. */\n usePreloadTagAttributes(attributes: TagAttributes | PreloadAttributesResolver | false): this {\n this.#preloadResolvers.push(typeof attributes === 'function' ? attributes : () => attributes)\n return this\n }\n\n createAssetPathsUsing(resolver: (path: string) => string): this {\n this.#assetPathResolver = resolver\n return this\n }\n\n // Dev server -----------------------------------------------------------------------------------------------\n\n hotFile(): string {\n return this.#hotFile ?? this.app.publicPath('hot')\n }\n\n isRunningHot(): boolean {\n return existsSync(this.hotFile())\n }\n\n /** The dev server URL written by @orieljs/vite, or undefined when it isn't running. */\n devServerUrl(): string | undefined {\n return this.isRunningHot() ? readFileSync(this.hotFile(), 'utf8').trimEnd() : undefined\n }\n\n // Tags -----------------------------------------------------------------------------------------------------\n\n /** Laravel's @vite([...]): preloads (styles first), then stylesheets, then scripts. */\n tags(entryPoints: string | string[], buildDirectory = this.#buildDirectory): ViteHtml {\n const entries = [entryPoints].flat()\n if (this.isRunningHot()) {\n return new ViteHtml(['@vite/client', ...entries].map((entry) => this.#tagForChunk(entry, this.#hotAsset(entry), undefined, undefined)).join(''))\n }\n const manifest = this.manifest(buildDirectory)\n const tags: string[] = []\n const preloads: Array<[string, string, ManifestChunk | undefined]> = []\n const cssChunk = (css: string): [string, ManifestChunk | undefined] => {\n const found = Object.entries(manifest).find(([, chunk]) => chunk.file === css)\n return found === undefined ? [css, undefined] : [found[0], found[1]]\n }\n for (const entry of entries) {\n const chunk = this.#chunk(manifest, entry)\n preloads.push([chunk.src ?? entry, this.#assetPath(`${buildDirectory}/${chunk.file}`), chunk])\n for (const name of this.#resolveImports(manifest, chunk)) {\n const imported = manifest[name]!\n preloads.push([name, this.#assetPath(`${buildDirectory}/${imported.file}`), imported])\n for (const css of imported.css ?? []) {\n const [key, partial] = cssChunk(css)\n preloads.push([key, this.#assetPath(`${buildDirectory}/${css}`), partial])\n tags.push(this.#tagForChunk(key, this.#assetPath(`${buildDirectory}/${css}`), partial, manifest))\n }\n }\n tags.push(this.#tagForChunk(entry, this.#assetPath(`${buildDirectory}/${chunk.file}`), chunk, manifest))\n for (const css of chunk.css ?? []) {\n const [key, partial] = cssChunk(css)\n preloads.push([key, this.#assetPath(`${buildDirectory}/${css}`), partial])\n tags.push(this.#tagForChunk(key, this.#assetPath(`${buildDirectory}/${css}`), partial, manifest))\n }\n }\n const uniqueTags = [...new Set(tags)]\n const stylesheets = uniqueTags.filter((tag) => tag.startsWith('<link'))\n const scripts = uniqueTags.filter((tag) => !tag.startsWith('<link'))\n const seen = new Set<string>()\n const uniquePreloads = preloads.filter(([, url]) => (seen.has(url) ? false : (seen.add(url), true)))\n const sorted = [...uniquePreloads.filter(([, url]) => CSS_PATH.test(url)), ...uniquePreloads.filter(([, url]) => !CSS_PATH.test(url))]\n const preloadTags = sorted.map(([src, url, chunk]) => this.#preloadTag(src, url, chunk, manifest))\n return new ViteHtml(preloadTags.join('') + stylesheets.join('') + scripts.join(''))\n }\n\n /** Laravel's @viteReactRefresh: the React Refresh preamble while the dev server runs; nothing otherwise. */\n reactRefresh(): ViteHtml | undefined {\n if (!this.isRunningHot()) return undefined\n const attributes = this.#parseAttributes({ nonce: this.#nonce ?? false })\n return new ViteHtml(\n [\n `<script type=\"module\" ${attributes.join(' ')}>`,\n ` import RefreshRuntime from '${this.#hotAsset('@react-refresh')}'`,\n ' RefreshRuntime.injectIntoGlobalHook(window)',\n ' window.$RefreshReg$ = () => {}',\n ' window.$RefreshSig$ = () => (type) => type',\n ' window.__vite_plugin_react_preamble_installed__ = true',\n '</script>',\n ].join('\\n'),\n )\n }\n\n /** The URL of a processed asset (Vite::asset('resources/images/logo.svg')). */\n asset(path: string, buildDirectory = this.#buildDirectory): string {\n if (this.isRunningHot()) return this.#hotAsset(path)\n return this.#assetPath(`${buildDirectory}/${this.#chunk(this.manifest(buildDirectory), path).file}`)\n }\n\n /** The built file's contents (Vite::content()). */\n content(path: string, buildDirectory = this.#buildDirectory): string {\n const chunk = this.#chunk(this.manifest(buildDirectory), path)\n const file = this.app.publicPath(join(buildDirectory, chunk.file))\n if (!existsSync(file)) throw new ViteError(`Unable to locate file from Vite manifest: ${file}.`)\n return readFileSync(file, 'utf8')\n }\n\n /** md5 of the manifest (a cache-busting asset version); undefined while hot or without a build. */\n manifestHash(buildDirectory = this.#buildDirectory): string | undefined {\n if (this.isRunningHot()) return undefined\n const path = this.manifestPath(buildDirectory)\n return existsSync(path) ? createHash('md5').update(readFileSync(path)).digest('hex') : undefined\n }\n\n manifestPath(buildDirectory = this.#buildDirectory): string {\n return this.app.publicPath(join(buildDirectory, this.#manifestFilename))\n }\n\n manifest(buildDirectory = this.#buildDirectory): Manifest {\n const path = this.manifestPath(buildDirectory)\n if (!existsSync(path)) throw new ViteError(`Vite manifest not found at: ${path}`)\n const { mtimeMs } = statSync(path)\n const cached = manifests.get(path)\n if (cached !== undefined && cached.mtimeMs === mtimeMs) return cached.manifest\n const manifest = JSON.parse(readFileSync(path, 'utf8')) as Manifest\n manifests.set(path, { mtimeMs, manifest })\n return manifest\n }\n\n /** URL → the attributes of the preload tags rendered so far (without href), for Link headers. */\n preloadedAssets(): Record<string, string[]> {\n return { ...this.#preloaded }\n }\n\n /** Renders withEntryPoints() (Vite is Htmlable, like Laravel's). */\n toHtml(): string {\n return this.tags(this.#entryPoints).toHtml()\n }\n\n // Internals ------------------------------------------------------------------------------------------------\n\n #hotAsset(path: string): string {\n return `${this.devServerUrl() ?? ''}/${path}`\n }\n\n #assetPath(path: string): string {\n if (this.#assetPathResolver !== undefined) return this.#assetPathResolver(path)\n if (this.app.bound(UrlGenerator)) return this.app.make(UrlGenerator).asset(path)\n const base = this.app.bound(ConfigRepository) ? this.app.make(ConfigRepository).get<string | null>('app.asset_url', null) : null\n return `${(base ?? '').replace(/\\/+$/, '')}/${path.replace(/^\\/+/, '')}`\n }\n\n #chunk(manifest: Manifest, file: string): ManifestChunk {\n const chunk = manifest[file]\n if (chunk === undefined) throw new ViteError(`Unable to locate file in Vite manifest: ${file}.`)\n return chunk\n }\n\n /** Every static import, depth first, each once. */\n #resolveImports(manifest: Manifest, chunk: ManifestChunk, seen = new Set<string>()): string[] {\n const imports: string[] = []\n for (const name of chunk.imports ?? []) {\n if (seen.has(name)) continue\n seen.add(name)\n imports.push(name)\n const imported = manifest[name]\n if (imported !== undefined) imports.push(...this.#resolveImports(manifest, imported, seen))\n }\n return imports\n }\n\n #tagForChunk(src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined): string {\n if (CSS_PATH.test(url)) {\n const attributes = this.#parseAttributes({ rel: 'stylesheet', href: url, nonce: this.#nonce ?? false, ...TRACKED, ...this.#styleAttributes(src, url, chunk, manifest) })\n return `<link ${attributes.join(' ')} />`\n }\n const attributes = this.#parseAttributes({ type: 'module', src: url, nonce: this.#nonce ?? false, ...TRACKED, ...this.#scriptAttributes(src, url, chunk, manifest) })\n return `<script ${attributes.join(' ')}></script>`\n }\n\n #preloadTag(src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest): string {\n const css = CSS_PATH.test(url)\n let attributes: TagAttributes = {\n rel: css ? 'preload' : 'modulepreload',\n as: css ? 'style' : 'script',\n href: url,\n nonce: this.#nonce ?? false,\n crossorigin: (css ? this.#styleAttributes(src, url, chunk, manifest) : this.#scriptAttributes(src, url, chunk, manifest)).crossorigin ?? false,\n }\n if (this.#integrityKey !== false) attributes.integrity = (chunk?.[this.#integrityKey] as string | undefined) ?? false\n for (const resolver of this.#preloadResolvers) {\n const resolved = resolver(src, url, chunk, manifest)\n if (resolved === false) return ''\n attributes = { ...attributes, ...resolved }\n }\n const { href: _href, ...rest } = attributes\n this.#preloaded[url] = this.#parseAttributes(rest)\n return `<link ${this.#parseAttributes(attributes).join(' ')} />`\n }\n\n #scriptAttributes(src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined): TagAttributes {\n let attributes: TagAttributes = this.#integrityKey !== false ? { integrity: (chunk?.[this.#integrityKey] as string | undefined) ?? false } : {}\n for (const resolver of this.#scriptResolvers) attributes = { ...attributes, ...resolver(src, url, chunk, manifest) }\n return attributes\n }\n\n #styleAttributes(src: string, url: string, chunk: ManifestChunk | undefined, manifest: Manifest | undefined): TagAttributes {\n let attributes: TagAttributes = this.#integrityKey !== false ? { integrity: (chunk?.[this.#integrityKey] as string | undefined) ?? false } : {}\n for (const resolver of this.#styleResolvers) attributes = { ...attributes, ...resolver(src, url, chunk, manifest) }\n return attributes\n }\n\n /** false/null/undefined are dropped, true is a bare attribute, anything else name=\"value\". */\n #parseAttributes(attributes: TagAttributes): string[] {\n return Object.entries(attributes)\n .filter(([, value]) => value !== false && value !== null && value !== undefined)\n .map(([name, value]) => (value === true ? name : `${name}=\"${escapeAttribute(String(value))}\"`))\n }\n}\n\n/**\n * The Vite instance for the current context: the request's own (scoped, so a CSP nonce stays in its request),\n * else a fresh one for the application (a mail view rendered by a queue worker).\n */\nexport function currentVite(): Vite {\n const container = currentContainer()\n if (container === undefined) throw new ContainerNotAvailableError('Vite')\n if (container.bound(HttpRequest)) return container.make(Vite)\n return new Vite(container.make(ApplicationToken))\n}\n\n/** vite(['resources/js/app.tsx']) → the tags (Laravel's @vite); vite() → the Vite instance. */\nexport function vite(): Vite\nexport function vite(entryPoints: string | string[], buildDirectory?: string): ViteHtml\nexport function vite(entryPoints?: string | string[], buildDirectory?: string): Vite | ViteHtml {\n const instance = currentVite()\n return entryPoints === undefined ? instance : instance.tags(entryPoints, buildDirectory)\n}\n\n/** Laravel's @viteReactRefresh: put it before vite([...]) in the root view of a React app. */\nexport function viteReactRefresh(): ViteHtml | undefined {\n return currentVite().reactRefresh()\n}\n","import type { HttpKernel } from '@orieljs/contracts'\n\ntype Handler = (request: Request) => unknown\n\n/** Wave 0 stand-in for the Http kernel: exact \"METHOD /path\" matching only. Replaced by Wave 1's router. */\nexport class ClosureKernel implements HttpKernel {\n private readonly routes = new Map<string, Handler>()\n\n on(method: string, path: string, handler: Handler): this {\n this.routes.set(`${method.toUpperCase()} ${path}`, handler)\n return this\n }\n\n async handle(request: Request): Promise<Response> {\n const handler = this.routes.get(`${request.method} ${new URL(request.url).pathname}`)\n if (!handler) return new Response('Not Found', { status: 404, headers: { 'content-type': 'text/plain; charset=utf-8' } })\n return toResponse(await handler(request))\n }\n}\n\nfunction toResponse(output: unknown): Response {\n if (output instanceof Response) return output\n if (output === undefined || output === null) return new Response(null, { status: 204 })\n if (typeof output === 'string') return new Response(output, { headers: { 'content-type': 'text/html; charset=utf-8' } })\n return Response.json(output)\n}\n"],"mappings":";AAAA,SAAS,QAAAA,aAAY;AACrB;AAAA,EACE,eAAeC;AAAA,EACf,cAAAC;AAAA,EACA,iBAAiB;AAAA,EACjB,oBAAAC;AAAA,EACA;AAAA,OAIK;AACP,SAAS,aAAAC,kBAAiB;AAC1B,SAAS,eAAe,WAAW;;;ACZnC,SAAS,YAAY,YAAY;AACjC;AA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AAAA,EAC1C;AACF;AAEA,SAAS,WAAW,QAA2B;AAC7C,MAAI,kBAAkB,SAAU,QAAO;AACvC,MAAI,WAAW,UAAa,WAAW,KAAM,QAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AACtF,MAAI,OAAO,WAAW,SAAU,QAAO,IAAI,SAAS,QAAQ,EAAE,SAAS,EAAE,gBAAgB,2BAA2B,EAAE,CAAC;AACvH,SAAO,SAAS,KAAK,MAAM;AAC7B;","names":["join","ApplicationToken","ClassNames","ConfigRepository","Container","existsSync","readFileSync","statSync","join","ConfigRepository","attributes","Container","ApplicationToken","ClassNames","join","ConfigRepository"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orieljs/foundation",
3
- "version": "0.1.0-alpha.12",
3
+ "version": "0.1.0-alpha.14",
4
4
  "description": "The Oriel application: service providers, lifecycle and request handling.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -31,11 +31,11 @@
31
31
  "TRADEMARKS.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@orieljs/config": "0.1.0-alpha.12",
35
- "@orieljs/contracts": "0.1.0-alpha.12",
36
- "@orieljs/support": "0.1.0-alpha.12",
37
- "@orieljs/obfuscate": "0.1.0-alpha.12",
38
- "@orieljs/container": "0.1.0-alpha.12"
34
+ "@orieljs/config": "0.1.0-alpha.14",
35
+ "@orieljs/support": "0.1.0-alpha.14",
36
+ "@orieljs/container": "0.1.0-alpha.14",
37
+ "@orieljs/contracts": "0.1.0-alpha.14",
38
+ "@orieljs/obfuscate": "0.1.0-alpha.14"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsup && node ../../../scripts/copy-license.mjs"