web/NPM Workspaces: ESbuild version cleanup (#14541)
* web: Check JS files. Add types. * web: Fix issues surrounding Vite/ESBuild types. * web: Clean up version constants. Tidy types * web: Clean up docs, types. * web: Clean up package paths. * web: (ESLint) no-lonely-if * web: Render slot before navbar. * web: Fix line-height alignment. * web: Truncate long headers. * web: Clean up page header declarations. Add story. Update paths. * web: Ignore out directory. * web: Lint Lit. * web: Use private alias. * web: Fix implicit CJS mode. * web: Update deps. * web: await all imports.
This commit is contained in:
		
							
								
								
									
										39
									
								
								web/types/esbuild.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								web/types/esbuild.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,39 @@
 | 
			
		||||
/**
 | 
			
		||||
 * @file Import meta environment variables available via ESBuild.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
export {};
 | 
			
		||||
declare global {
 | 
			
		||||
    interface ESBuildImportEnv {
 | 
			
		||||
        /**
 | 
			
		||||
         * The authentik version injected by ESBuild during build time.
 | 
			
		||||
         *
 | 
			
		||||
         * @format semver
 | 
			
		||||
         */
 | 
			
		||||
        readonly AK_VERSION: string;
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
         * @todo Determine where this is used and if it is needed,
 | 
			
		||||
         * give it a better name.
 | 
			
		||||
         * @deprecated
 | 
			
		||||
         */
 | 
			
		||||
        readonly AK_API_BASE_PATH: string;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    type ESBuildImportEnvKey = keyof ESBuildImportEnv;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Environment variables injected by ESBuild.
 | 
			
		||||
     */
 | 
			
		||||
    interface ImportMetaEnv extends ESBuildImportEnv {
 | 
			
		||||
        /**
 | 
			
		||||
         * An environment variable used to determine
 | 
			
		||||
         * whether Node.js is running in production mode.
 | 
			
		||||
         */
 | 
			
		||||
        readonly NODE_ENV: "development" | "production";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    interface ImportMeta {
 | 
			
		||||
        readonly env: ImportMetaEnv;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								web/types/global.d.ts → web/types/node.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								web/types/global.d.ts → web/types/node.d.ts
									
									
									
									
										vendored
									
									
								
							@ -1,5 +1,5 @@
 | 
			
		||||
/**
 | 
			
		||||
 * @file Environment variables available via ESBuild.
 | 
			
		||||
 * @file Global variables provided by Node.js
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare module "module" {
 | 
			
		||||
@ -23,13 +23,19 @@ declare module "process" {
 | 
			
		||||
    global {
 | 
			
		||||
        namespace NodeJS {
 | 
			
		||||
            interface ProcessEnv {
 | 
			
		||||
                CWD: string;
 | 
			
		||||
                /**
 | 
			
		||||
                 * An environment variable used to determine
 | 
			
		||||
                 * whether Node.js is running in production mode.
 | 
			
		||||
                 *
 | 
			
		||||
                 * @see {@link https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production | The difference between development and production}
 | 
			
		||||
                 */
 | 
			
		||||
                readonly NODE_ENV?: "development" | "production";
 | 
			
		||||
                /**
 | 
			
		||||
                 * @todo Determine where this is used and if it is needed,
 | 
			
		||||
                 * give it a better name.
 | 
			
		||||
                 * @deprecated
 | 
			
		||||
                 */
 | 
			
		||||
                AK_API_BASE_PATH: string;
 | 
			
		||||
                readonly AK_API_BASE_PATH?: string;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
		Reference in New Issue
	
	Block a user