API Reference
PkgFactory.PkgFactoryPkgFactory.TemplatesPkgFactory.VerificationPkgFactory.CredentialPkgFactory.GitHubTransportPkgFactory.PackagePlanPkgFactory.PackageSpecPkgFactory.Templates.generate_template_files_dictPkgFactory.Templates.get_template_pathPkgFactory.Templates.list_filesPkgFactory.Templates.list_templatesPkgFactory.Templates.read_filePkgFactory.Templates.update_templatePkgFactory.Templates.write_filePkgFactory.Verification.verify_owner_namePkgFactory.Verification.verify_package_namePkgFactory._create_packagePkgFactory.create_packagePkgFactory.device_flow_beginPkgFactory.device_flow_pollPkgFactory.get_repository_ownersPkgFactory.package_schemaPkgFactory.package_specPkgFactory.plan_packagePkgFactory.plan_snapshotPkgFactory.repository_availabilityPkgFactory.restore_plan
PkgFactory.PkgFactory — Module
UI-independent planning, creation and recovery of Julia package repositories.
PkgFactory.Credential — Type
Explicit GitHub and optional Codecov credentials; display always redacts secrets. This type never reads environment variables or starts an interactive login.
PkgFactory.GitHubTransport — Type
Bounded GitHub transport. Writes are never automatically retried or redirected.
PkgFactory.PackagePlan — Type
An immutable snapshot of validated settings and the exact files to commit. Construct with plan_package. Planning performs no network requests.
PkgFactory.PackageSpec — Type
Validated package settings. Secrets are supplied separately in Credential. name accepts a Julia package name with or without the .jl repository suffix.
PkgFactory._create_package — Method
Internal implementation shared by every application.
PkgFactory.create_package — Method
Execute an immutable plan using explicit credentials. Creation and resume share one implementation. Failures report a safe, typed CreationError with the stopped stage. Inspect repository_status before resuming. Operations on the same repository are excluded within this process.
PkgFactory.device_flow_begin — Function
Request an OAuth device code. The caller presents it and controls the polling loop.
PkgFactory.device_flow_poll — Function
Poll device authorization once. Return pending/slow-down states to the caller.
PkgFactory.get_repository_owners — Method
List the authenticated user and organizations visible to an explicit GitHub token.
PkgFactory.package_schema — Method
JSON schema for package settings, including the same defaults used by PackageSpec.
PkgFactory.package_spec — Method
Decode settings from a string-keyed mapping using the shared defaults and validation. package_name is accepted as an alias for name for existing Web API clients.
PkgFactory.plan_package — Method
Validate settings and render a package once, without credentials or side effects.
PkgFactory.plan_snapshot — Method
Encode the exact rendered plan for trusted application storage, without credentials.
PkgFactory.repository_availability — Method
Validate a repository name and query whether it is available without making changes.
PkgFactory.restore_plan — Method
Restore a snapshot from trusted storage. Never accept snapshots from API clients.
PkgFactory.Templates — Module
This module contains functions for generating the package from the templates directory using Mustache.jl.
PkgFactory.Templates.generate_template_files_dict — Method
generate_template_files_dict(
owner_name::String,
repo_name::String,
author_names::Vector{String},
package_description::String,
template_name::String;
package_uuid,
citation_authors
) -> Dict{String, String}
paths_and_contents = PkgFactory.Templates.generate_template_files_dict(
"ohno",
"MyPkg.jl",
["Shuhei Ohno"],
"My special package",
"all-in-one"
)Use citation_authors = [(family_names = "Ohno", given_names = "Shuhei")] to provide explicit CFF name parts, in the same order as author_names. Each entry requires family_names and may include given_names and orcid. Without this keyword, full display names are preserved in family-names; review the name parts in CITATION.cff before release.
PkgFactory.Templates.get_template_path — Method
get_template_path(template_name::String) -> String
path_dir = PkgFactory.Templates.get_template_path("all-in-one")PkgFactory.Templates.list_files — Method
list_files(template_path::String) -> Vector{String}
path_dir = PkgFactory.Templates.get_template_path("all-in-one")
path_files = PkgFactory.Templates.list_files(path_dir)PkgFactory.Templates.list_templates — Method
list_templates() -> Vector{String}
template_names = PkgFactory.Templates.list_templates()PkgFactory.Templates.read_file — Method
read_file(path::String) -> String
path_dir = PkgFactory.Templates.get_template_path("all-in-one")
path_files = PkgFactory.Templates.list_files(path_dir)
path_file = path_files[findfirst(occursin("README.md", path_file) for path_file in path_files)]
text = PkgFactory.Templates.read_file(path_file)PkgFactory.Templates.update_template — Method
This function is only for developers. This function updates the template files in the PkgFactory.jl/template directory.
Signature:
update_template(
owner_name::String,
repo_name::String,
author_names::Vector{String}
)
Example:
PkgFactory.update_template("OWNER_NAME", "template", ["AUTHOR1", "AUTHOR2"])PkgFactory.Templates.write_file — Method
write_file(path::String, content::String) -> Bool
path_dir = PkgFactory.Templates.get_template_path("all-in-one")
path_files = PkgFactory.Templates.list_files(path_dir)
path_file = path_files[findfirst(occursin("README.md", path_file) for path_file in path_files)]
text = PkgFactory.Templates.read_file(path_file)PkgFactory.Verification — Module
This module contains functions for verifying the package name and other inputs.
PkgFactory.Verification.verify_owner_name — Method
This function verifies the owner name according to the GitHub username rules.
Usernames for user accounts on GitHub can only contain alphanumeric characters and dashes (-).
verify_owner_name(owner_name::String) -> String
PkgFactory.Verification.verify_owner_name("ohno")PkgFactory.Verification.verify_package_name — Method
This function verifies the package name according to the package naming rules of Pkg.jl and the automatic merging guidelines of RegistryCI.jl.
verify_package_name(package_name::String) -> String
PkgFactory.Verification.verify_package_name("MyPkg")