node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import type { CLIContext } from '../cli/types';
interface BuildOptions extends CLIContext {
/**
* Which bundler to use for building.
*
* @default webpack
*/
bundler?: 'webpack' | 'vite';
/**
* Minify the output
*
* @default true
*/
minify?: boolean;
/**
* Generate sourcemaps useful for debugging bugs in the admin panel UI.
*/
sourcemaps?: boolean;
/**
* Print stats for build
*/
stats?: boolean;
}
/**
* @example `$ strapi build`
*
* @description Builds the admin panel of the strapi application.
*/
declare const build: ({ logger, cwd, tsconfig, ...options }: BuildOptions) => Promise<void>;
export { build };
export type { BuildOptions };
//# sourceMappingURL=build.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/node/build.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM/C,UAAU,YAAa,SAAQ,UAAU;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,QAAA,MAAM,KAAK,0CAAiD,YAAY,kBA4DvE,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,YAAY,EAAE,CAAC"}

View File

@@ -0,0 +1,21 @@
import type { BaseContext } from '../types';
interface AdminCustomisations {
config?: {
locales?: string[];
};
bootstrap?: (...args: any[]) => any;
}
interface AppFile {
/**
* The system path to the file
*/
path: string;
/**
* The module path to the file i.e. how you would import it
*/
modulePath: string;
}
declare const loadUserAppFile: ({ runtimeDir, appDir, }: Pick<BaseContext, 'appDir' | 'runtimeDir'>) => Promise<AppFile | undefined>;
export { loadUserAppFile };
export type { AdminCustomisations, AppFile };
//# sourceMappingURL=admin-customisations.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"admin-customisations.d.ts","sourceRoot":"","sources":["../../../src/node/core/admin-customisations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;CACrC;AAED,UAAU,OAAO;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,4BAGlB,KAAK,WAAW,EAAE,QAAQ,GAAG,YAAY,CAAC,KAAG,QAAQ,OAAO,GAAG,SAAS,CAa1E,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,YAAY,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC"}

View File

@@ -0,0 +1,8 @@
import { StrapiMonorepo } from './monorepo';
declare const getMonorepoAliases: ({ monorepo }: {
monorepo?: StrapiMonorepo;
}) => {
[k: string]: string;
};
export { getMonorepoAliases };
//# sourceMappingURL=aliases.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../../src/node/core/aliases.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA2B5C,QAAA,MAAM,kBAAkB,iBAAkB;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAE;;CAUtE,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}

View File

@@ -0,0 +1,4 @@
import type { BuildContext } from '../create-build-context';
declare const getUserConfig: <TConfig>(fileNames: string[], ctx: BuildContext) => Promise<TConfig | undefined>;
export { getUserConfig };
//# sourceMappingURL=config.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/core/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,QAAA,MAAM,aAAa,uBACN,MAAM,EAAE,OACd,YAAY,KAChB,QAAQ,OAAO,GAAG,SAAS,CAW7B,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}

View File

@@ -0,0 +1,19 @@
import { PackageJson } from 'read-pkg-up';
import type { BuildOptions } from '../build';
interface CheckRequiredDependenciesResult {
didInstall: boolean;
}
/**
* Checks the user's project that it has declared and installed the required dependencies
* needed by the Strapi admin project. Whilst generally speaking most modules will be
* declared by the actual packages there are some packages where you only really want one of
* and thus they are declared as peer dependencies react / styled-components / etc.
*
* If these deps are not installed or declared, then we prompt the user to correct this. In
* V4 this is not a hard requirement, but in V5 it will be. Might as well get people started now.
*/
declare const checkRequiredDependencies: ({ cwd, logger, }: Pick<BuildOptions, 'cwd' | 'logger'>) => Promise<CheckRequiredDependenciesResult>;
declare const getModule: (name: string, cwd: string) => Promise<PackageJson | null>;
export { checkRequiredDependencies, getModule };
export type { CheckRequiredDependenciesResult, PackageJson };
//# sourceMappingURL=dependencies.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../src/node/core/dependencies.ts"],"names":[],"mappings":"AAMA,OAAkB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAa7C,UAAU,+BAA+B;IACvC,UAAU,EAAE,OAAO,CAAC;CACrB;AAQD;;;;;;;;GAQG;AACH,QAAA,MAAM,yBAAyB,qBAG5B,KAAK,YAAY,EAAE,KAAK,GAAG,QAAQ,CAAC,KAAG,QAAQ,+BAA+B,CAwIhF,CAAC;AAEF,QAAA,MAAM,SAAS,SAAgB,MAAM,OAAO,MAAM,KAAG,QAAQ,WAAW,GAAG,IAAI,CAQ9E,CAAC;AAkDF,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE,CAAC;AAChD,YAAY,EAAE,+BAA+B,EAAE,WAAW,EAAE,CAAC"}

View File

@@ -0,0 +1,23 @@
/**
* This is the base of _any_ env set for a strapi project,
* to build a strapi admin panel we require these env variables.
*/
interface DefaultEnv {
ADMIN_PATH: string;
STRAPI_ADMIN_BACKEND_URL: string;
STRAPI_TELEMETRY_DISABLED: string;
}
/**
* @internal
*
* @description Load the .env file if it exists
*/
declare const loadEnv: (cwd: string) => Promise<void>;
/**
* @internal
*
* @description Get all the environment variables that start with `STRAPI_ADMIN_`
*/
declare const getStrapiAdminEnvVars: (defaultEnv: DefaultEnv) => Record<string, string>;
export { getStrapiAdminEnvVars, loadEnv };
//# sourceMappingURL=env.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/node/core/env.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,UAAU,UAAU;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED;;;;GAIG;AACH,QAAA,MAAM,OAAO,QAAe,MAAM,kBAMjC,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,eAAgB,UAAU,KAAG,OAAO,MAAM,EAAE,MAAM,CAW5E,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,CAAC"}

View File

@@ -0,0 +1,10 @@
declare const isError: (err: unknown) => err is Error;
/**
* @description Handle unexpected errors. No, but really, your CLI should anticipate error cases.
* If a user hits an error we don't expect, then we need to flag to them that this is not normal
* and they should use the `--debug` flag to get more information (assuming you've implemented this
* in your action).
*/
declare const handleUnexpectedError: (err: unknown) => never;
export { handleUnexpectedError, isError };
//# sourceMappingURL=errors.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/node/core/errors.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,OAAO,QAAS,OAAO,iBAAuC,CAAC;AAErE;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,QAAS,OAAO,UAkD1C,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,CAAC"}

View File

@@ -0,0 +1,26 @@
/**
* @internal
*/
declare const pathExists: (path: string) => Promise<boolean>;
/**
* @internal
*/
declare const loadFile: (path: string) => Promise<undefined | any>;
/**
* @internal
*
* @description Converts a system path to a module path mainly for `Windows` systems.
* where the path separator is `\` instead of `/`, on linux systems the path separator
* is identical to the module path separator.
*/
declare const convertSystemPathToModulePath: (sysPath: string) => string;
/**
* @internal
*
* @description Converts a module path to a system path, again largely used for Windows systems.
* The original use case was plugins where the resolve path was in module format but we want to
* have it relative to the runtime directory.
*/
declare const convertModulePathToSystemPath: (modulePath: string) => string;
export { pathExists, loadFile, convertSystemPathToModulePath, convertModulePathToSystemPath };
//# sourceMappingURL=files.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/node/core/files.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,QAAA,MAAM,UAAU,SAAgB,MAAM,qBAOrC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,QAAQ,SAAgB,MAAM,KAAG,QAAQ,SAAS,GAAG,GAAG,CAsB7D,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,6BAA6B,YAAa,MAAM,WAMrD,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,6BAA6B,eAAgB,MAAM,WAMxD,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,CAAC"}

View File

@@ -0,0 +1,9 @@
/**
* @description Supports the following managers:
* npm
* yarn
* pnpm
*/
declare const getPackageManager: () => "yarn" | "pnpm" | "npm" | undefined;
export { getPackageManager };
//# sourceMappingURL=managers.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"managers.d.ts","sourceRoot":"","sources":["../../../src/node/core/managers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,2CAoBtB,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}

View File

@@ -0,0 +1,12 @@
interface StrapiMonorepo {
path: string;
}
/**
* Load information about the strapi CMS monorepo (if applicable)
*
* @internal
*/
declare function loadStrapiMonorepo(cwd: string): Promise<StrapiMonorepo | undefined>;
export { loadStrapiMonorepo };
export type { StrapiMonorepo };
//# sourceMappingURL=monorepo.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"monorepo.d.ts","sourceRoot":"","sources":["../../../src/node/core/monorepo.ts"],"names":[],"mappings":"AAGA,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,iBAAe,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAkBlF;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,cAAc,EAAE,CAAC"}

View File

@@ -0,0 +1,70 @@
import type { BaseContext } from '../types';
interface LocalPluginMeta {
name: string;
/**
* camelCased version of the plugin name
*/
importName: string;
/**
* The path to the plugin, relative to the app's root directory
* in system format
*/
path: string;
/**
* The path to the plugin, relative to the runtime directory
* in module format (i.e. with forward slashes) because thats
* where it should be used as an import
*/
modulePath: string;
type: 'local';
}
interface ModulePluginMeta {
name: string;
/**
* camelCased version of the plugin name
*/
importName: string;
/**
* Modules don't have a path because we never resolve them to their node_modules
* because we simply do not require it.
*/
path?: never;
/**
* The path to the plugin, relative to the app's root directory
* in module format (i.e. with forward slashes)
*/
modulePath: string;
type: 'module';
}
type PluginMeta = LocalPluginMeta | ModulePluginMeta;
declare const getEnabledPlugins: ({ cwd, logger, runtimeDir, strapi, }: Pick<BaseContext, 'cwd' | 'logger' | 'strapi' | 'runtimeDir'>) => Promise<Record<string, PluginMeta>>;
declare const getMapOfPluginsWithAdmin: (plugins: Record<string, PluginMeta>) => ({
modulePath: string;
name: string;
/**
* camelCased version of the plugin name
*/
importName: string;
/**
* The path to the plugin, relative to the app's root directory
* in system format
*/
path: string;
type: 'local';
} | {
modulePath: string;
name: string;
/**
* camelCased version of the plugin name
*/
importName: string;
/**
* Modules don't have a path because we never resolve them to their node_modules
* because we simply do not require it.
*/
path?: undefined;
type: 'module';
})[];
export { getEnabledPlugins, getMapOfPluginsWithAdmin };
export type { PluginMeta, LocalPluginMeta, ModulePluginMeta };
//# sourceMappingURL=plugins.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/node/core/plugins.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IACb;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,KAAK,UAAU,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAuBrD,QAAA,MAAM,iBAAiB,yCAKpB,KAAK,WAAW,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC,KAAG,QACjE,OAAO,MAAM,EAAE,UAAU,CAAC,CA2D3B,CAAC;AAsBF,QAAA,MAAM,wBAAwB,YAAa,OAAO,MAAM,EAAE,UAAU,CAAC;;UApJ7D,MAAM;IACZ;;OAEG;gBACS,MAAM;IAClB;;;OAGG;UACG,MAAM;UAON,OAAO;;;UAIP,MAAM;IACZ;;OAEG;gBACS,MAAM;IAClB;;;OAGG;;UAOG,QAAQ;IA6Lf,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,CAAC;AACvD,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC"}

View File

@@ -0,0 +1,8 @@
export interface TimeMeasurer {
start: (name: string) => void;
end: (name: string) => number;
getTimings: () => Record<string, number>;
}
export declare function getTimer(): TimeMeasurer;
export declare const prettyTime: (timeInMs: number) => string;
//# sourceMappingURL=timer.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../../src/node/core/timer.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9B,UAAU,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED,wBAAgB,QAAQ,IAAI,YAAY,CAsBvC;AAED,eAAO,MAAM,UAAU,aAAc,MAAM,KAAG,MAE7C,CAAC"}

View File

@@ -0,0 +1,43 @@
/// <reference types="node" />
import type { Core, Modules } from '@strapi/types';
import type { Server } from 'node:http';
import type { CLIContext } from '../cli/types';
import { PluginMeta } from './core/plugins';
import { AppFile } from './core/admin-customisations';
import type { BaseContext } from './types';
interface BaseOptions {
stats?: boolean;
minify?: boolean;
sourcemaps?: boolean;
bundler?: 'webpack' | 'vite';
open?: boolean;
hmrServer?: Server;
hmrClientPort?: number;
}
interface BuildContext<TOptions = unknown> extends BaseContext {
/**
* The customisations defined by the user in their app.js file
*/
customisations?: AppFile;
/**
* Features object with future flags
*/
features?: Modules.Features.FeaturesService['config'];
/**
* The build options
*/
options: BaseOptions & TOptions;
/**
* The plugins to be included in the JS bundle
* incl. internal plugins, third party plugins & local plugins
*/
plugins: PluginMeta[];
}
interface CreateBuildContextArgs<TOptions = unknown> extends CLIContext {
strapi?: Core.Strapi;
options?: TOptions;
}
declare const createBuildContext: <TOptions extends BaseOptions>({ cwd, logger, tsconfig, strapi, options, }: CreateBuildContextArgs<TOptions>) => Promise<BuildContext<TOptions>>;
export { createBuildContext };
export type { BuildContext, CreateBuildContextArgs };
//# sourceMappingURL=create-build-context.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"create-build-context.d.ts","sourceRoot":"","sources":["../../src/node/create-build-context.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,UAAU,EAA+C,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,OAAO,EAAmB,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,YAAY,CAAC,QAAQ,GAAG,OAAO,CAAE,SAAQ,WAAW;IAC5D;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACtD;;OAEG;IACH,OAAO,EAAE,WAAW,GAAG,QAAQ,CAAC;IAChC;;;OAGG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,UAAU,sBAAsB,CAAC,QAAQ,GAAG,OAAO,CAAE,SAAQ,UAAU;IACrE,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AASD,QAAA,MAAM,kBAAkB,8EAMrB,uBAAuB,QAAQ,CAAC,KAAG,QAAQ,aAAa,QAAQ,CAAC,CAwGnE,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC"}

View File

@@ -0,0 +1,16 @@
import type { CLIContext } from '../cli/types';
interface DevelopOptions extends CLIContext {
/**
* Which bundler to use for building.
*
* @default webpack
*/
bundler?: 'webpack' | 'vite';
polling?: boolean;
open?: boolean;
watchAdmin?: boolean;
}
declare const develop: ({ cwd, polling, logger, tsconfig, watchAdmin, ...options }: DevelopOptions) => Promise<void>;
export { develop };
export type { DevelopOptions };
//# sourceMappingURL=develop.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"develop.d.ts","sourceRoot":"","sources":["../../src/node/develop.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS/C,UAAU,cAAe,SAAQ,UAAU;IACzC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA4CD,QAAA,MAAM,OAAO,+DAOV,cAAc,kBA8PhB,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,cAAc,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
import type { BuildContext } from './create-build-context';
interface GetDocumentHTMLArgs extends Pick<BuildContext, 'logger'> {
props?: {
entryPath?: string;
};
}
/**
* TODO: Here in the future we could add the ability
* to load a user's Document component?
*/
declare const getDocumentHTML: ({ logger, props }: GetDocumentHTMLArgs) => string;
declare const writeStaticClientFiles: (ctx: BuildContext) => Promise<void>;
export { writeStaticClientFiles, getDocumentHTML };
//# sourceMappingURL=staticFiles.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"staticFiles.d.ts","sourceRoot":"","sources":["../../src/node/staticFiles.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAqC3D,UAAU,mBAAoB,SAAQ,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC;IAChE,KAAK,CAAC,EAAE;QACN,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;;GAGG;AACH,QAAA,MAAM,eAAe,sBAA4B,mBAAmB,WAKnE,CAAC;AAgBF,QAAA,MAAM,sBAAsB,QAAe,YAAY,kBAuCtD,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,CAAC"}

View File

@@ -0,0 +1,58 @@
import type { Core } from '@strapi/types';
import type { CLIContext } from '../cli/types';
import { BuildOptions } from './build';
interface BaseContext {
/**
* The absolute path to the app directory defined by the Strapi instance
*/
appDir: string;
/**
* If a user is deploying the project under a nested public path, we use
* this path so all asset paths will be rewritten accordingly
*/
basePath: string;
/**
* internal path to serve the admin panel
*/
adminPath: string;
/**
* The bundler to use for building & watching
*/
bundler: Pick<Required<BuildOptions>, 'bundler'>['bundler'];
/**
* The current working directory
*/
cwd: string;
/**
* The absolute path to the dist directory
*/
distPath: string;
/**
* The relative path to the dist directory
*/
distDir: string;
/**
* The absolute path to the entry file
*/
entry: string;
/**
* The environment variables to be included in the JS bundle
*/
env: Record<string, string>;
logger: CLIContext['logger'];
/**
* The absolute path to the runtime directory
*/
runtimeDir: string;
/**
* The Strapi instance
*/
strapi: Core.Strapi;
/**
* The browserslist target either loaded from the user's workspace or falling back to the default
*/
target: string[];
tsconfig?: CLIContext['tsconfig'];
}
export type { BaseContext };
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/node/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,UAAU,WAAW;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC;IAC5D;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CACnC;AAED,YAAY,EAAE,WAAW,EAAE,CAAC"}

View File

@@ -0,0 +1,4 @@
import type { BuildContext } from '../create-build-context';
declare const build: (ctx: BuildContext) => Promise<void>;
export { build };
//# sourceMappingURL=build.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/node/vite/build.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,QAAA,MAAM,KAAK,QAAe,YAAY,kBASrC,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}

View File

@@ -0,0 +1,7 @@
import type { InlineConfig, UserConfig } from 'vite';
import type { BuildContext } from '../create-build-context';
declare const resolveProductionConfig: (ctx: BuildContext) => Promise<InlineConfig>;
declare const resolveDevelopmentConfig: (ctx: BuildContext) => Promise<InlineConfig>;
declare const mergeConfigWithUserConfig: (config: InlineConfig, ctx: BuildContext) => Promise<UserConfig>;
export { mergeConfigWithUserConfig, resolveProductionConfig, resolveDevelopmentConfig };
//# sourceMappingURL=config.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/vite/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAOrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAwC5D,QAAA,MAAM,uBAAuB,QAAe,YAAY,KAAG,QAAQ,YAAY,CAuB9E,CAAC;AAEF,QAAA,MAAM,wBAAwB,QAAe,YAAY,KAAG,QAAQ,YAAY,CAyB/E,CAAC;AAMF,QAAA,MAAM,yBAAyB,WAAkB,YAAY,OAAO,YAAY,wBAQ/E,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,CAAC"}

View File

@@ -0,0 +1,5 @@
import type { Plugin } from 'vite';
import type { BuildContext } from '../create-build-context';
declare const buildFilesPlugin: (ctx: BuildContext) => Plugin;
export { buildFilesPlugin };
//# sourceMappingURL=plugins.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/node/vite/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,QAAA,MAAM,gBAAgB,QAAS,YAAY,KAAG,MA2C7C,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}

View File

@@ -0,0 +1,8 @@
import type { BuildContext } from '../create-build-context';
interface ViteWatcher {
close(): Promise<void>;
}
declare const watch: (ctx: BuildContext) => Promise<ViteWatcher>;
export { watch };
export type { ViteWatcher };
//# sourceMappingURL=watch.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../../src/node/vite/watch.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,UAAU,WAAW;IACnB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAgDD,QAAA,MAAM,KAAK,QAAe,YAAY,KAAG,QAAQ,WAAW,CA4F3D,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,CAAC"}

View File

@@ -0,0 +1,4 @@
import type { BuildContext } from '../create-build-context';
declare const build: (ctx: BuildContext) => Promise<unknown>;
export { build };
//# sourceMappingURL=build.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/node/webpack/build.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,QAAA,MAAM,KAAK,QAAe,YAAY,qBAoCrC,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}

View File

@@ -0,0 +1,7 @@
import { Configuration } from 'webpack';
import type { BuildContext } from '../create-build-context';
declare const resolveDevelopmentConfig: (ctx: BuildContext) => Promise<Configuration>;
declare const resolveProductionConfig: (ctx: BuildContext) => Promise<Configuration>;
declare const mergeConfigWithUserConfig: (config: Configuration, ctx: BuildContext) => Promise<Configuration>;
export { mergeConfigWithUserConfig, resolveDevelopmentConfig, resolveProductionConfig };
//# sourceMappingURL=config.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/webpack/config.ts"],"names":[],"mappings":"AASA,OAAO,EACL,aAAa,EAId,MAAM,SAAS,CAAC;AAIjB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAyG5D,QAAA,MAAM,wBAAwB,QAAe,YAAY,KAAG,QAAQ,aAAa,CAgDhF,CAAC;AAEF,QAAA,MAAM,uBAAuB,QAAe,YAAY,KAAG,QAAQ,aAAa,CAwC/E,CAAC;AAMF,QAAA,MAAM,yBAAyB,WAAkB,aAAa,OAAO,YAAY,2BAoBhF,CAAC;AAYF,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,CAAC"}

View File

@@ -0,0 +1,8 @@
import type { BuildContext } from '../create-build-context';
interface WebpackWatcher {
close(): Promise<void>;
}
declare const watch: (ctx: BuildContext) => Promise<WebpackWatcher>;
export { watch };
export type { WebpackWatcher };
//# sourceMappingURL=watch.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../../src/node/webpack/watch.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,UAAU,cAAc;IACtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,QAAA,MAAM,KAAK,QAAe,YAAY,KAAG,QAAQ,cAAc,CA+F9D,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,cAAc,EAAE,CAAC"}