import { type BuiltPlace } from '../build/build.js'; import { type ManifestPlaceInfo } from '@quenty/nevermore-deploy'; /** npm name of the package that ships the manifest module. */ export declare const MANIFEST_PACKAGE_NAME = "@quenty/nevermoreclimanifest"; /** * Attribute map written onto the built place's NevermoreCLIManifestUtils module. * Keys are attribute names and MUST match the `ATTRIBUTE` table in * src/nevermore-cli-manifest/src/Shared/NevermoreCLIManifestUtils.lua. */ export type DeployMetadataAttributes = Record; /** Git facts about the working tree the deploy was built from. */ export interface GitDeployInfo { /** Short commit SHA, e.g. "a1b2c3d". */ commit?: string; /** Full commit SHA. */ version?: string; /** Current branch name, or undefined in a detached HEAD. */ branch?: string; } /** * Collect git metadata once per deploy. Every field is best-effort — a missing * git binary or a non-repo directory yields an empty object rather than an error. */ export declare function gatherGitDeployInfo(): GitDeployInfo; /** Per-place facts known at deploy time. */ export interface DeployPlaceInfo { /** Deploy target name from deploy.nevermore.json (e.g. "test", "integration"). */ target: string; /** True when published live (`--publish`); false when only Saved. */ published: boolean; /** ISO 8601 timestamp — pass one value for the whole deploy so every place agrees. */ timestamp: string; placeId: number; universeId: number; /** `version` from the deploying package's package.json (e.g. "1.0.0"), if any. */ packageVersion?: string; /** * The base place this build was merged from, when there is one. * * `basePlaceVersion` is the answer to "which upstream content is this?" — a * `"published"` pin resolves at deploy time and the base place moves on * afterwards, so this is the only record of what the running build was made * of. Reported alongside its place id, since a version number means nothing * without knowing which place it counts. */ basePlaceId?: number; basePlaceVersion?: number; } /** * Build the attribute map injected into the built place. `Deployed` is always * true here — its mere presence is what distinguishes a deployed build from a * Studio session at runtime. * * Place and universe IDs are stringified on purpose: Roblox `number` attributes * round-trip through Lune serialization as float32, which silently corrupts IDs * above 2^24 (e.g. 123456789 -> 123456792). Strings are exact; the Luau reader * converts them back with `tonumber`. * * When `places` is given (the whole target's place table), it is stamped as a * `Places` JSON-string attribute. The IDs inside stay numeric — a JSON string * is exact text, and the Luau reader decodes it to 64-bit numbers, so the * float32 hazard that forces the top-level IDs to be stringified doesn't apply. */ export declare function buildDeployMetadataAttributes(git: GitDeployInfo, place: DeployPlaceInfo, places?: readonly ManifestPlaceInfo[]): DeployMetadataAttributes; /** A built place with metadata injected, plus a handle to clean up its temp dir. */ export interface InjectedPlace { builtPlace: BuiltPlace; cleanupAsync(): Promise; } /** * Run the Lune transform that writes `attributes` onto the place's manifest * module. Produces a fresh .rbxl in its own temp directory so a shared rojo * build (multi-place / batch deploys) is never mutated in place. The caller * uploads `result.builtPlace` and then calls `result.cleanupAsync()`. */ export declare function injectDeployMetadataAsync(builtPlace: BuiltPlace, attributes: DeployMetadataAttributes): Promise; /** * Inject `attributes` by rewriting `rbxlPath` in place. Only safe when the * caller owns the file exclusively (e.g. a per-session test build); deploys use * {@link injectDeployMetadataAsync} instead because they can share one rojo * build across multiple places. */ export declare function injectDeployMetadataInPlaceAsync(rbxlPath: string, attributes: DeployMetadataAttributes): Promise; /** * True when the package at `packagePath` ships or directly depends on the * manifest package, so its built place will contain the module to inject into. * Gates injection during tests so unrelated packages don't pay for a Lune pass. */ export declare function packageUsesManifestAsync(packagePath: string): Promise; //# sourceMappingURL=deploy-metadata.d.ts.map