@astra-kit/rp 0.0.0-stage → 0.10.0
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/CHANGELOG.md +196 -0
- package/LICENSE.md +21 -0
- package/README.md +352 -2
- package/bin/astra-rp.js +51 -0
- package/package.json +93 -4
- package/src/build-gate.js +157 -0
- package/src/changelog-blocks.js +53 -0
- package/src/changelog.js +108 -0
- package/src/constants/build-gate.js +30 -0
- package/src/constants/changelog-draft.js +180 -0
- package/src/constants/changelog.js +74 -0
- package/src/constants/ci-release.js +346 -0
- package/src/constants/cli.js +12 -0
- package/src/constants/create-version.js +523 -0
- package/src/constants/guard-publish.js +29 -0
- package/src/constants/index.js +18 -0
- package/src/constants/monorepo.js +57 -0
- package/src/constants/package-manager.js +56 -0
- package/src/constants/registry.js +72 -0
- package/src/constants/terminal-ui.js +93 -0
- package/src/constants/version-files.js +63 -0
- package/src/constants/versions.js +60 -0
- package/src/create-version/artifact.js +343 -0
- package/src/create-version/changelog-draft-workspace.js +124 -0
- package/src/create-version/changelog-draft.js +380 -0
- package/src/create-version/changelog.js +264 -0
- package/src/create-version/ci-config.js +54 -0
- package/src/create-version/ci-publication-history.js +113 -0
- package/src/create-version/ci-release-identity-step.js +58 -0
- package/src/create-version/ci-setup.js +794 -0
- package/src/create-version/ci.js +555 -0
- package/src/create-version/committed-tree.js +75 -0
- package/src/create-version/config.js +489 -0
- package/src/create-version/errors.js +46 -0
- package/src/create-version/github-workflow.js +199 -0
- package/src/create-version/index.js +54 -0
- package/src/create-version/json.js +32 -0
- package/src/create-version/jsonc.js +76 -0
- package/src/create-version/jsr.js +96 -0
- package/src/create-version/local-changes.js +178 -0
- package/src/create-version/npm-auth.js +142 -0
- package/src/create-version/npm.js +812 -0
- package/src/create-version/plan.js +1200 -0
- package/src/create-version/process.js +334 -0
- package/src/create-version/registry-config.js +121 -0
- package/src/create-version/registry-http.js +62 -0
- package/src/create-version/registry.js +220 -0
- package/src/create-version/release-execution.js +45 -0
- package/src/create-version/release-tag-config.js +76 -0
- package/src/create-version/run.js +2087 -0
- package/src/create-version/state.js +461 -0
- package/src/create-version/strict-utf8.js +11 -0
- package/src/create-version/templates/release.yml +52 -0
- package/src/create-version/templates/vercel-ignore-build.mjs +66 -0
- package/src/guard-publish.js +77 -0
- package/src/index.js +42 -0
- package/src/monorepo/plan.js +475 -0
- package/src/monorepo/release-commit.js +46 -0
- package/src/monorepo/run.js +927 -0
- package/src/monorepo/state.js +206 -0
- package/src/monorepo/workspaces.js +327 -0
- package/src/package-manager.js +107 -0
- package/src/terminal-ui.js +548 -0
- package/src/testing.js +70 -0
- package/src/version-files.js +142 -0
- package/src/versions.js +303 -0
- package/types/build-gate.d.ts +43 -0
- package/types/changelog-blocks.d.ts +33 -0
- package/types/changelog.d.ts +61 -0
- package/types/constants/build-gate.d.ts +23 -0
- package/types/constants/changelog-draft.d.ts +138 -0
- package/types/constants/changelog.d.ts +56 -0
- package/types/constants/ci-release.d.ts +284 -0
- package/types/constants/cli.d.ts +11 -0
- package/types/constants/create-version.d.ts +397 -0
- package/types/constants/guard-publish.d.ts +25 -0
- package/types/constants/index.d.ts +17 -0
- package/types/constants/monorepo.d.ts +45 -0
- package/types/constants/package-manager.d.ts +40 -0
- package/types/constants/registry.d.ts +79 -0
- package/types/constants/terminal-ui.d.ts +73 -0
- package/types/constants/version-files.d.ts +51 -0
- package/types/constants/versions.d.ts +47 -0
- package/types/create-version/artifact.d.ts +113 -0
- package/types/create-version/changelog-draft-workspace.d.ts +33 -0
- package/types/create-version/changelog-draft.d.ts +127 -0
- package/types/create-version/changelog.d.ts +141 -0
- package/types/create-version/ci-config.d.ts +33 -0
- package/types/create-version/ci-publication-history.d.ts +51 -0
- package/types/create-version/ci-release-identity-step.d.ts +12 -0
- package/types/create-version/ci-setup.d.ts +148 -0
- package/types/create-version/ci.d.ts +145 -0
- package/types/create-version/committed-tree.d.ts +55 -0
- package/types/create-version/config.d.ts +128 -0
- package/types/create-version/errors.d.ts +39 -0
- package/types/create-version/github-workflow.d.ts +41 -0
- package/types/create-version/index.d.ts +28 -0
- package/types/create-version/json.d.ts +21 -0
- package/types/create-version/jsonc.d.ts +21 -0
- package/types/create-version/jsr.d.ts +52 -0
- package/types/create-version/local-changes.d.ts +52 -0
- package/types/create-version/npm-auth.d.ts +60 -0
- package/types/create-version/npm.d.ts +331 -0
- package/types/create-version/plan.d.ts +369 -0
- package/types/create-version/process.d.ts +151 -0
- package/types/create-version/registry-config.d.ts +56 -0
- package/types/create-version/registry-http.d.ts +22 -0
- package/types/create-version/registry.d.ts +86 -0
- package/types/create-version/release-execution.d.ts +22 -0
- package/types/create-version/release-tag-config.d.ts +18 -0
- package/types/create-version/run.d.ts +407 -0
- package/types/create-version/state.d.ts +204 -0
- package/types/create-version/strict-utf8.d.ts +10 -0
- package/types/guard-publish.d.ts +49 -0
- package/types/index.d.ts +23 -0
- package/types/monorepo/plan.d.ts +68 -0
- package/types/monorepo/release-commit.d.ts +29 -0
- package/types/monorepo/run.d.ts +68 -0
- package/types/monorepo/state.d.ts +96 -0
- package/types/monorepo/workspaces.d.ts +86 -0
- package/types/package-manager.d.ts +58 -0
- package/types/terminal-ui.d.ts +196 -0
- package/types/testing.d.ts +31 -0
- package/types/version-files.d.ts +59 -0
- package/types/versions.d.ts +158 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git, npm, configuration and display values of the shared `astra-rp create-version` command.
|
|
3
|
+
*
|
|
4
|
+
* @module constants/create-version
|
|
5
|
+
*/
|
|
6
|
+
/** Branch that receives releases. */
|
|
7
|
+
export declare const MAIN_BRANCH = "main";
|
|
8
|
+
/** Remote that receives releases. */
|
|
9
|
+
export declare const RELEASE_REMOTE = "origin";
|
|
10
|
+
/** Remote-tracking ref of the release branch. */
|
|
11
|
+
export declare const REMOTE_MAIN_REF = "origin/main";
|
|
12
|
+
/** Configuration module read from the repository root. */
|
|
13
|
+
export declare const CREATE_VERSION_CONFIG_FILE = "astra-rp.config.js";
|
|
14
|
+
/**
|
|
15
|
+
* Configuration candidates in lookup order: `.mjs` is always ESM, so projects
|
|
16
|
+
* without `"type": "module"` load it without Node warnings.
|
|
17
|
+
*/
|
|
18
|
+
export declare const CREATE_VERSION_CONFIG_FILES: readonly string[];
|
|
19
|
+
/** Manifest whose `version` is released; shared with the build gate. */
|
|
20
|
+
export { PACKAGE_MANIFEST_FILE } from "./build-gate.js";
|
|
21
|
+
/** Pinned Node.js version compared with the running one when present; a full version or only its major. */
|
|
22
|
+
export declare const PINNED_NODE_VERSION_FILE = ".nvmrc";
|
|
23
|
+
/** Environment file that may hold `NPM_TOKEN` locally; ignored by Git. */
|
|
24
|
+
export declare const LOCAL_ENVIRONMENT_FILE = ".env";
|
|
25
|
+
/** Environment variable that holds the npm token; the temporary npm config references it as `${NPM_TOKEN}`. */
|
|
26
|
+
export declare const NPM_TOKEN_VARIABLE = "NPM_TOKEN";
|
|
27
|
+
/**
|
|
28
|
+
* Path segments, relative to the user home directory (`os.homedir()`), of the environment file
|
|
29
|
+
* shared by every project: one `NPM_TOKEN` for all the repositories that release with astra-rp.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SHARED_ENVIRONMENT_FILE_SEGMENTS: readonly string[];
|
|
32
|
+
/** How the shared environment file is shown to the user, independent of the platform. */
|
|
33
|
+
export declare const SHARED_ENVIRONMENT_FILE_LABEL: string;
|
|
34
|
+
/** Where `NPM_TOKEN` was found, in lookup order: environment, repository `.env`, shared file. */
|
|
35
|
+
export declare const NPM_TOKEN_SOURCE: Readonly<{
|
|
36
|
+
environment: "environment";
|
|
37
|
+
repository: "repository";
|
|
38
|
+
shared: "shared";
|
|
39
|
+
}>;
|
|
40
|
+
/** How each {@link NPM_TOKEN_SOURCE} is named in the diagnosis and the error messages; never the token. */
|
|
41
|
+
export declare const NPM_TOKEN_SOURCE_LABEL: Readonly<{
|
|
42
|
+
environment: "variable de entorno";
|
|
43
|
+
repository: ".env del repo";
|
|
44
|
+
shared: string;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Result of checking the npm credentials before publishing:
|
|
48
|
+
* - `ok`: the token authenticates and its user owns the package (or it was never published); npm
|
|
49
|
+
* cannot tell beforehand whether the token itself can write (read-only or granular tokens);
|
|
50
|
+
* - `missingToken`: no source defines `NPM_TOKEN`;
|
|
51
|
+
* - `invalidToken`: the registry rejects the token (`npm whoami` answers 401/403);
|
|
52
|
+
* - `notOwner`: the token authenticates as a user that is not an owner of the package;
|
|
53
|
+
* - `projectCredentials`: the project `.npmrc` defines credentials for the publish registry, which
|
|
54
|
+
* npm prefers over the temporary config that binds `NPM_TOKEN`;
|
|
55
|
+
* - `unknown`: the check could not finish (network, a registry without `npm owner ls`, an
|
|
56
|
+
* organization package whose access may come from a team); it warns but does not block.
|
|
57
|
+
*/
|
|
58
|
+
export declare const NPM_AUTH_STATUS: Readonly<{
|
|
59
|
+
ok: "ok";
|
|
60
|
+
missingToken: "missing-token";
|
|
61
|
+
invalidToken: "invalid-token";
|
|
62
|
+
notOwner: "not-owner";
|
|
63
|
+
projectCredentials: "project-credentials";
|
|
64
|
+
unsupportedAuth: "unsupported-auth";
|
|
65
|
+
unknown: "unknown";
|
|
66
|
+
}>;
|
|
67
|
+
/** npm error codes of a rejected credential: `npm whoami` fails with them for an invalid or expired token. */
|
|
68
|
+
export declare const NPM_REJECTED_CREDENTIAL_PATTERN: RegExp;
|
|
69
|
+
/** Where `NPM_TOKEN` can be defined, in lookup order, as the credential messages explain it. */
|
|
70
|
+
export declare const NPM_TOKEN_LOCATIONS: string;
|
|
71
|
+
/** Why npm answers 404 to a publication the token cannot make. */
|
|
72
|
+
export declare const NPM_PUT_NOT_FOUND_NOTE = "Un 404 Not Found de npm en el PUT suele significar falta de permisos sobre el paquete (npm responde 404 en vez de 403).";
|
|
73
|
+
/** Diagnosis note of an owner token: npm exposes no side-effect-free way to check its write permission. */
|
|
74
|
+
export declare const NPM_WRITE_ACCESS_UNVERIFIED_NOTE = "permiso de escritura del token no verificable antes de publicar";
|
|
75
|
+
/** Why a failed publication can still be the token when its user owns the package. */
|
|
76
|
+
export declare const NPM_READ_ONLY_TOKEN_NOTE = "El token puede ser read-only o granular sin permiso de escritura sobre el paquete (npm no permite verificarlo antes de publicar): revisalo en npm \u2192 Access Tokens.";
|
|
77
|
+
/**
|
|
78
|
+
* Next action after fixing the npm credentials reported by the diagnosis.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} createVersionCommand - How the project runs create-version (`pnpm create-version`, `bun run create-version`…).
|
|
81
|
+
* @returns {string} Spanish next action.
|
|
82
|
+
*/
|
|
83
|
+
export declare const buildNpmAuthRerunAction: (createVersionCommand: string) => string;
|
|
84
|
+
/**
|
|
85
|
+
* Next action after fixing the npm credentials once `npm publish` failed.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} createVersionCommand - How the project runs create-version.
|
|
88
|
+
* @returns {string} Spanish next action.
|
|
89
|
+
*/
|
|
90
|
+
export declare const buildNpmPublishRetryAction: (createVersionCommand: string) => string;
|
|
91
|
+
/** {@link buildNpmAuthRerunAction} of a pnpm project. */
|
|
92
|
+
export declare const NPM_AUTH_RERUN_ACTION: string;
|
|
93
|
+
/** {@link buildNpmPublishRetryAction} of a pnpm project. */
|
|
94
|
+
export declare const NPM_PUBLISH_RETRY_ACTION: string;
|
|
95
|
+
/**
|
|
96
|
+
* Option that keeps the plain text output of `npm whoami` and `npm owner ls` even when the project
|
|
97
|
+
* config or the environment enables npm's global JSON output (`json=true`, `npm_config_json=true`).
|
|
98
|
+
*/
|
|
99
|
+
export declare const NPM_PLAIN_OUTPUT_OPTION = "--json=false";
|
|
100
|
+
/** Arguments of the npm command that prints the user a token authenticates as. */
|
|
101
|
+
export declare const NPM_WHOAMI_ARGUMENTS: readonly string[];
|
|
102
|
+
/** Arguments of the npm command that lists the owners of a package, followed by the package name. */
|
|
103
|
+
export declare const NPM_OWNER_LIST_ARGUMENTS: readonly string[];
|
|
104
|
+
/** Project npm config, read from the repository root; npm prefers it over the temporary `--userconfig`. */
|
|
105
|
+
export declare const PROJECT_NPM_CONFIG_FILE = ".npmrc";
|
|
106
|
+
/**
|
|
107
|
+
* npm config fields that select the HTTP credential of a registry, either bound to it
|
|
108
|
+
* (`//host/path/:_authToken`) or unbound (`_authToken`); any of them in the project `.npmrc` or in an
|
|
109
|
+
* inherited `npm_config_*` variable overrides `NPM_TOKEN`. TLS client options such as `keyfile` or
|
|
110
|
+
* `certfile` are not listed: they do not replace the token.
|
|
111
|
+
*/
|
|
112
|
+
export declare const NPM_CREDENTIAL_CONFIG_FIELDS: readonly string[];
|
|
113
|
+
/** Prefix of the environment variables npm reads as config, in any casing (`npm_config_`, `NPM_CONFIG_`). */
|
|
114
|
+
export declare const NPM_CONFIG_ENVIRONMENT_PREFIX = "npm_config_";
|
|
115
|
+
/** Prefix of an npm config key bound to a registry: `//host[:port]/path/:field`. */
|
|
116
|
+
export declare const NPM_REGISTRY_BOUND_KEY_PREFIX = "//";
|
|
117
|
+
/** One line of `npm owner ls`: `<user> <<email>>`; the `user` group keeps the npm user name. */
|
|
118
|
+
export declare const NPM_OWNER_LINE_PATTERN: RegExp;
|
|
119
|
+
/** Stable identifiers of every step the command knows how to run, in execution order. */
|
|
120
|
+
export declare const RELEASE_STEP: Readonly<{
|
|
121
|
+
syncMain: "sync-main";
|
|
122
|
+
applyMigrations: "apply-migrations";
|
|
123
|
+
verifyChangelog: "verify-changelog";
|
|
124
|
+
runChecks: "run-checks";
|
|
125
|
+
bumpVersion: "bump-version";
|
|
126
|
+
prepareRelease: "prepare-release";
|
|
127
|
+
pushRelease: "push-release";
|
|
128
|
+
pushReleaseTag: "push-release-tag";
|
|
129
|
+
publishRelease: "publish-release";
|
|
130
|
+
}>;
|
|
131
|
+
/** What the command does with the current state. */
|
|
132
|
+
export declare const RELEASE_MODE: Readonly<{
|
|
133
|
+
newRelease: "new-release";
|
|
134
|
+
resume: "resume";
|
|
135
|
+
upToDate: "up-to-date";
|
|
136
|
+
blocked: "blocked";
|
|
137
|
+
}>;
|
|
138
|
+
/** Result of a project migrations adapter. */
|
|
139
|
+
export declare const MIGRATION_STATUS: Readonly<{
|
|
140
|
+
upToDate: "up-to-date";
|
|
141
|
+
pending: "pending";
|
|
142
|
+
unknown: "unknown";
|
|
143
|
+
}>;
|
|
144
|
+
/** Pull request states reported by `gh pr view --json state`. */
|
|
145
|
+
export declare const PULL_REQUEST_STATE: Readonly<{
|
|
146
|
+
open: "OPEN";
|
|
147
|
+
merged: "MERGED";
|
|
148
|
+
closed: "CLOSED";
|
|
149
|
+
}>;
|
|
150
|
+
/** Fields requested from `gh pr view`. */
|
|
151
|
+
export declare const PULL_REQUEST_JSON_FIELDS = "number,url,title,state,isDraft,headRefOid";
|
|
152
|
+
/** Message `gh pr view` prints when the branch has no pull request. */
|
|
153
|
+
export declare const NO_PULL_REQUEST_MESSAGE_PATTERN: RegExp;
|
|
154
|
+
/** Registries whose published versions drive resumes and the banner. */
|
|
155
|
+
export declare const RELEASE_REGISTRY: Readonly<{
|
|
156
|
+
npm: "npm";
|
|
157
|
+
github: "github";
|
|
158
|
+
gitlab: "gitlab";
|
|
159
|
+
jsr: "jsr";
|
|
160
|
+
}>;
|
|
161
|
+
/** `package.json` script run as the release checks when the configuration does not set `checks`. */
|
|
162
|
+
export declare const DEFAULT_CHECKS_SCRIPT = "ci";
|
|
163
|
+
/** Command line of the default release checks in a pnpm project (other package managers run `<pm> run ci`). */
|
|
164
|
+
export declare const DEFAULT_CHECKS_COMMAND = "pnpm run ci";
|
|
165
|
+
/** Built-in publisher selected with `publish: "npm"`. */
|
|
166
|
+
export declare const NPM_PUBLISHER = "npm";
|
|
167
|
+
/** Result of asking npm which versions of the package exist. */
|
|
168
|
+
export declare const NPM_LOOKUP_STATUS: Readonly<{
|
|
169
|
+
ok: "ok";
|
|
170
|
+
failed: "failed";
|
|
171
|
+
}>;
|
|
172
|
+
/** Valid npm package name (optionally scoped), checked before it reaches a shell command line. */
|
|
173
|
+
export declare const NPM_PACKAGE_NAME_PATTERN: RegExp;
|
|
174
|
+
/** npm error code of a package that was never published. */
|
|
175
|
+
export declare const NPM_NOT_FOUND_CODE = "E404";
|
|
176
|
+
/** npm dist-tag every stable release is published under. */
|
|
177
|
+
export declare const NPM_DIST_TAG = "latest";
|
|
178
|
+
/** Command-line flags of `astra-rp create-version`. */
|
|
179
|
+
export declare const CREATE_VERSION_FLAG: Readonly<{
|
|
180
|
+
bump: "bump";
|
|
181
|
+
patch: "patch";
|
|
182
|
+
minor: "minor";
|
|
183
|
+
major: "major";
|
|
184
|
+
setVersion: "set-version";
|
|
185
|
+
dryRun: "dry-run";
|
|
186
|
+
skipUnpublished: "skip-unpublished";
|
|
187
|
+
ignoreLocalChanges: "ignore-local-changes";
|
|
188
|
+
acceptSuggested: "accept-suggested";
|
|
189
|
+
local: "local";
|
|
190
|
+
ci: "ci";
|
|
191
|
+
setupCi: "setup-ci";
|
|
192
|
+
ciRelease: "ci-release";
|
|
193
|
+
retryCi: "retry-ci";
|
|
194
|
+
help: "help";
|
|
195
|
+
/** Short flag of `--help`; public alias of the `h` entry of `CREATE_VERSION_SHORT_FLAG`. */
|
|
196
|
+
helpShort: "h";
|
|
197
|
+
endOfOptions: "--";
|
|
198
|
+
}>;
|
|
199
|
+
/**
|
|
200
|
+
* Short name of each release type: `--bump`/`-b` accepts it as a value (`-b m`) and it is also the
|
|
201
|
+
* short flag of the `--patch`, `--minor` and `--major` shortcuts. Case-sensitive: `m` is minor and
|
|
202
|
+
* `M` major.
|
|
203
|
+
*/
|
|
204
|
+
export declare const RELEASE_TYPE_SHORT_NAME: Readonly<{
|
|
205
|
+
patch: "p";
|
|
206
|
+
minor: "m";
|
|
207
|
+
major: "M";
|
|
208
|
+
}>;
|
|
209
|
+
/**
|
|
210
|
+
* Long flag of each short flag of `astra-rp create-version`. Short flags are whole tokens (`-sv` has
|
|
211
|
+
* two letters), so they are never grouped: `-lm` is rejected instead of read as `-l -m`. A value may
|
|
212
|
+
* follow as the next token or after `=` (`-b m`, `-b=m`, `-sv 1.3.0`, `-sv=1.3.0`).
|
|
213
|
+
*/
|
|
214
|
+
export declare const CREATE_VERSION_SHORT_FLAG: Readonly<{
|
|
215
|
+
b: "bump";
|
|
216
|
+
sv: "set-version";
|
|
217
|
+
p: "patch";
|
|
218
|
+
m: "minor";
|
|
219
|
+
M: "major";
|
|
220
|
+
l: "local";
|
|
221
|
+
h: "help";
|
|
222
|
+
}>;
|
|
223
|
+
/** Single-dash token of a short flag, with an optional `=value`: `-l`, `-sv=1.3.0`; not `--local`. */
|
|
224
|
+
export declare const SHORT_FLAG_TOKEN_PATTERN: RegExp;
|
|
225
|
+
/** Message of the `git stash` entry holding the changes `--ignore-local-changes` sets aside. */
|
|
226
|
+
export declare const LOCAL_CHANGES_STASH_MESSAGE = "astra-rp create-version: cambios locales apartados durante el release";
|
|
227
|
+
/** Optional `v` prefix accepted in hand-typed versions. */
|
|
228
|
+
export declare const VERSION_PREFIX_PATTERN: RegExp;
|
|
229
|
+
/** `version` field of `package.json`, replaced in place to keep formatting. */
|
|
230
|
+
export declare const PACKAGE_VERSION_FIELD_PATTERN: RegExp;
|
|
231
|
+
/** `git log -G` pattern of a changed top-level `version` field; the last such commit is the last release. */
|
|
232
|
+
export declare const VERSION_FIELD_CHANGE_PATTERN = "\"version\"[[:space:]]*:";
|
|
233
|
+
/** GitHub `owner/repo` inside an SSH or HTTPS remote URL. */
|
|
234
|
+
export declare const GITHUB_REPOSITORY_PATTERN: RegExp;
|
|
235
|
+
/** Separates fields inside one `git log --format` record. */
|
|
236
|
+
export declare const FIELD_SEPARATOR = "\u001F";
|
|
237
|
+
/** Separates records in `git log --format` output. */
|
|
238
|
+
export declare const RECORD_SEPARATOR = "\u001E";
|
|
239
|
+
/** Width of the `git status --porcelain` state columns before each path. */
|
|
240
|
+
export declare const PORCELAIN_STATUS_WIDTH = 3;
|
|
241
|
+
/** Separator between the original and the new path of a renamed or copied `git status --porcelain` entry. */
|
|
242
|
+
export declare const PORCELAIN_RENAME_SEPARATOR = " -> ";
|
|
243
|
+
/**
|
|
244
|
+
* Extensions of the files `--ignore-local-changes` refuses to set aside: the configuration is
|
|
245
|
+
* loaded before the changes are set aside, and it (or a hook) may import code or data from them,
|
|
246
|
+
* so the release would run with content that is not the committed one.
|
|
247
|
+
*/
|
|
248
|
+
export declare const UNSETTABLE_ASIDE_EXTENSIONS: readonly string[];
|
|
249
|
+
/** Maximum commits listed in a box. */
|
|
250
|
+
export declare const MAX_LISTED_COMMITS = 12;
|
|
251
|
+
/** Maximum uncommitted files, foreign commits or pending migrations listed before summarizing. */
|
|
252
|
+
export declare const MAX_LISTED_ITEMS = 5;
|
|
253
|
+
/** Length of the abbreviated commit ids shown to the user: the same as in changelog entries. */
|
|
254
|
+
export declare const SHORT_SHA_LENGTH = 7;
|
|
255
|
+
/** Placeholders of the `artifact` pattern: the released version and the npm package name. */
|
|
256
|
+
export declare const ARTIFACT_VERSION_PLACEHOLDER = "{version}";
|
|
257
|
+
export declare const ARTIFACT_NAME_PLACEHOLDER = "{name}";
|
|
258
|
+
/**
|
|
259
|
+
* Scope of a package name as `npm pack` and `pnpm pack` name the tarball: the
|
|
260
|
+
* leading `@` is dropped and the `/` becomes `-` (`@scope/pkg` → `scope-pkg`).
|
|
261
|
+
* The `scope` group keeps the scope without `@`.
|
|
262
|
+
*/
|
|
263
|
+
export declare const PACKAGE_SCOPE_PATTERN: RegExp;
|
|
264
|
+
/** Replacement of {@link PACKAGE_SCOPE_PATTERN} that yields the tarball base name prefix. */
|
|
265
|
+
export declare const PACKED_SCOPE_REPLACEMENT = "$<scope>-";
|
|
266
|
+
/** Wildcard of an `artifact` pattern segment, such as the checksum in `releases/{version}-*`. */
|
|
267
|
+
export declare const ARTIFACT_SEGMENT_WILDCARD = "*";
|
|
268
|
+
/**
|
|
269
|
+
* Checksum placeholder: the SHA-256 of the archive, verified before publishing. It may repeat,
|
|
270
|
+
* in one segment or several, and every occurrence must declare the same digest.
|
|
271
|
+
*/
|
|
272
|
+
export declare const ARTIFACT_SHA256_PLACEHOLDER = "{sha256}";
|
|
273
|
+
/** Lowercase hexadecimal SHA-256 digest matched by {@link ARTIFACT_SHA256_PLACEHOLDER}. */
|
|
274
|
+
export declare const SHA256_HEX_PATTERN_SOURCE = "[0-9a-f]{64}";
|
|
275
|
+
/**
|
|
276
|
+
* Characters allowed in an artifact path passed to `npm publish` through the Windows shell;
|
|
277
|
+
* `~` is allowed because npm package names (and so tarball names) may contain it.
|
|
278
|
+
*/
|
|
279
|
+
export declare const SAFE_ARTIFACT_PATH_PATTERN: RegExp;
|
|
280
|
+
/**
|
|
281
|
+
* Prefix that makes npm read an artifact path as a local file: a bare
|
|
282
|
+
* `releases/x/pkg.tgz` operand is parsed as a package spec (a GitHub shorthand).
|
|
283
|
+
*/
|
|
284
|
+
export declare const LOCAL_PATH_PREFIX = "./";
|
|
285
|
+
/**
|
|
286
|
+
* Arguments of the `npm pack` run that reports the integrity npm would pack from the release
|
|
287
|
+
* checkout: nothing is written and no lifecycle script runs, so it only reads what `prepare` left.
|
|
288
|
+
*/
|
|
289
|
+
export declare const NPM_PACK_DRY_RUN_ARGUMENTS: readonly string[];
|
|
290
|
+
/**
|
|
291
|
+
* Prefix of the temporary directory, outside the package root, that holds the prepared archive
|
|
292
|
+
* while `npm pack --dry-run` runs, so npm never packs the archive into the package it describes.
|
|
293
|
+
*/
|
|
294
|
+
export declare const ARTIFACT_HOLDING_DIRECTORY_PREFIX = "astra-rp-artifact-";
|
|
295
|
+
/** Node.js error code of a `rename` across file systems, retried as copy and delete. */
|
|
296
|
+
export declare const CROSS_DEVICE_RENAME_ERROR_CODE = "EXDEV";
|
|
297
|
+
/** Hash algorithm of the npm `integrity` string (`sha512-<base64>`). */
|
|
298
|
+
export declare const NPM_INTEGRITY_ALGORITHM = "sha512";
|
|
299
|
+
/** npm `integrity` string as `npm pack --json` reports it. */
|
|
300
|
+
export declare const NPM_INTEGRITY_PATTERN: RegExp;
|
|
301
|
+
/** Manifest field whose keys npm applies as configuration when it publishes. */
|
|
302
|
+
export declare const PUBLISH_CONFIG_FIELD = "publishConfig";
|
|
303
|
+
/**
|
|
304
|
+
* `publishConfig` keys pnpm hoists onto the packed manifest root. npm treats every
|
|
305
|
+
* `publishConfig` key as npm configuration and never rewrites manifest fields with it, so a
|
|
306
|
+
* package that declares any of these would be published differently by npm than by `pnpm pack`.
|
|
307
|
+
* Any other key (`registry`, `access`, `tag`, `provenance`, `@scope:registry`, `otp`...) is npm
|
|
308
|
+
* configuration and is accepted.
|
|
309
|
+
*
|
|
310
|
+
* Source: `PUBLISH_CONFIG_WHITELIST` in pnpm v12.6.0
|
|
311
|
+
* (`pnpm/crates/exportable-manifest/src/create.rs`; same list as
|
|
312
|
+
* `releasing/exportable-manifest/src/overridePublishConfig.ts` in pnpm 11).
|
|
313
|
+
*
|
|
314
|
+
* @see https://github.com/pnpm/pnpm/blob/v12.6.0/pnpm/crates/exportable-manifest/src/create.rs
|
|
315
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#publishconfig
|
|
316
|
+
*/
|
|
317
|
+
export declare const PNPM_HOISTED_PUBLISH_CONFIG_KEYS: readonly string[];
|
|
318
|
+
/** Dependency maps npm publishes as they are written in `package.json`. */
|
|
319
|
+
export declare const PUBLISHED_DEPENDENCY_FIELDS: readonly string[];
|
|
320
|
+
/**
|
|
321
|
+
* Dependency specifiers only `pnpm pack` rewrites and npm publishes verbatim, which npm then
|
|
322
|
+
* cannot install (`EUNSUPPORTEDPROTOCOL`):
|
|
323
|
+
* - `catalog:` (dereferenced to the catalog entry);
|
|
324
|
+
* - `workspace:` (resolved to the linked package version), as the whole specifier or, in
|
|
325
|
+
* `peerDependencies`, as a segment of a compound range (`^1.0.0 || workspace:>=1.0.0`);
|
|
326
|
+
* - `jsr:` (turned into an `npm:@jsr/<scope>__<name>` alias).
|
|
327
|
+
*
|
|
328
|
+
* Source: `convert_dependency_for_publish` (catalog → workspace → jsr replacers) in pnpm v12.6.0
|
|
329
|
+
* `pnpm/crates/exportable-manifest/src/create.rs`, and `replace_workspace_protocol_peer_dependency`
|
|
330
|
+
* in `pnpm/crates/exportable-manifest/src/replace.rs`. No other protocol is rewritten there.
|
|
331
|
+
*
|
|
332
|
+
* @see https://github.com/pnpm/pnpm/blob/v12.6.0/pnpm/crates/exportable-manifest/src/create.rs
|
|
333
|
+
* @see https://github.com/pnpm/pnpm/blob/v12.6.0/pnpm/crates/exportable-manifest/src/replace.rs
|
|
334
|
+
*/
|
|
335
|
+
export declare const PNPM_PACK_REWRITTEN_SPECIFIER_PATTERN: RegExp;
|
|
336
|
+
/** Public npm registry: npm's default, used when no config sets `@scope:registry` nor `registry`. */
|
|
337
|
+
export declare const DEFAULT_NPM_REGISTRY_URL = "https://registry.npmjs.org/";
|
|
338
|
+
/** Prefix of a package page on npmjs.com, linked in the summary of a release published to {@link DEFAULT_NPM_REGISTRY_URL}. */
|
|
339
|
+
export declare const NPMJS_PACKAGE_PAGE_URL = "https://www.npmjs.com/package/";
|
|
340
|
+
/** `publishConfig` key of the registry for every package, used when no scope-specific registry applies. */
|
|
341
|
+
export declare const PUBLISH_CONFIG_REGISTRY_KEY = "registry";
|
|
342
|
+
/** Suffix of the scope-specific `publishConfig` registry key, as in `@scope:registry`. */
|
|
343
|
+
export declare const SCOPED_REGISTRY_KEY_SUFFIX = ":registry";
|
|
344
|
+
/**
|
|
345
|
+
* Registry URL allowed on the `npm view` command line built for the Windows shell: only characters
|
|
346
|
+
* without shell meaning (no `%`, `&`, `|`, `^`, quotes or spaces), after URL normalization.
|
|
347
|
+
*/
|
|
348
|
+
export declare const SHELL_SAFE_REGISTRY_URL_PATTERN: RegExp;
|
|
349
|
+
/** npm option that selects the registry `npm view` queries. */
|
|
350
|
+
export declare const NPM_REGISTRY_OPTION = "--registry";
|
|
351
|
+
/** npm option that replaces the user config (`~/.npmrc`) with the temporary one. */
|
|
352
|
+
export declare const NPM_USER_CONFIG_OPTION = "--userconfig";
|
|
353
|
+
/** npm subcommand that prints the effective value of a config key. */
|
|
354
|
+
export declare const NPM_CONFIG_GET_ARGUMENTS: readonly string[];
|
|
355
|
+
/** What `npm config get` prints for a key no config source sets, such as an unused `@scope:registry`. */
|
|
356
|
+
export declare const NPM_UNSET_CONFIG_VALUE = "undefined";
|
|
357
|
+
/** Protocols a publish registry URL may use. */
|
|
358
|
+
export declare const NPM_REGISTRY_PROTOCOLS: readonly string[];
|
|
359
|
+
/**
|
|
360
|
+
* Value of the registry credential in the temporary npm config: npm expands `${NPM_TOKEN}` from
|
|
361
|
+
* the environment, so the token never reaches the disk or a command line.
|
|
362
|
+
*/
|
|
363
|
+
export declare const NPM_AUTH_TOKEN_REFERENCE = "${NPM_TOKEN}";
|
|
364
|
+
/** Prefix of the temporary directory holding the publish-only npm user config. */
|
|
365
|
+
export declare const NPM_AUTH_DIRECTORY_PREFIX = "astra-rp-npm-auth-";
|
|
366
|
+
/** Characters that could break out of a quoted path on the Windows shell. */
|
|
367
|
+
export declare const UNSAFE_QUOTED_PATH_PATTERN: RegExp;
|
|
368
|
+
/** Placeholder replaced by the released version in `summary` lines. */
|
|
369
|
+
export declare const SUMMARY_VERSION_PLACEHOLDER = "{version}";
|
|
370
|
+
/**
|
|
371
|
+
* Shown when syncing `main` brought new commits: the run ends (exit code 0, it is not a failure)
|
|
372
|
+
* so the next one loads the updated configuration and diagnoses again.
|
|
373
|
+
*
|
|
374
|
+
* @param {string} createVersionCommand - How the project runs create-version.
|
|
375
|
+
* @returns {string} Spanish message.
|
|
376
|
+
*/
|
|
377
|
+
export declare const buildMainSyncedRestartMessage: (createVersionCommand: string) => string;
|
|
378
|
+
/** {@link buildMainSyncedRestartMessage} of a pnpm project. */
|
|
379
|
+
export declare const MAIN_SYNCED_RESTART_MESSAGE: string;
|
|
380
|
+
/** Exit code of a release stopped by a failed step, invalid arguments or configuration. */
|
|
381
|
+
export declare const FAILURE_EXIT_CODE = 1;
|
|
382
|
+
/** What each release type means when a project does not describe it. */
|
|
383
|
+
export declare const DEFAULT_RELEASE_TYPE_DESCRIPTIONS: Readonly<{
|
|
384
|
+
patch: "Solo arreglos o cambios internos; nada nuevo para quien lo usa.";
|
|
385
|
+
minor: "Funcionalidades nuevas compatibles; lo existente sigue funcionando igual.";
|
|
386
|
+
major: "Cambio incompatible: quien lo usa tiene que adaptarse.";
|
|
387
|
+
}>;
|
|
388
|
+
/**
|
|
389
|
+
* Default descriptions while `preMajorShift` applies to a `0.x` version: each release type carries
|
|
390
|
+
* the changes of the level above (a patch ships features, a minor breaking changes) and a major
|
|
391
|
+
* leaves `0.x`.
|
|
392
|
+
*/
|
|
393
|
+
export declare const PRE_MAJOR_SHIFTED_RELEASE_TYPE_DESCRIPTIONS: Readonly<{
|
|
394
|
+
patch: "Arreglos o funcionalidades nuevas compatibles; lo existente sigue funcionando igual.";
|
|
395
|
+
minor: "Cambio incompatible: quien lo usa tiene que adaptarse.";
|
|
396
|
+
major: "Sale de 0.x: primera versión estable 1.0.0.";
|
|
397
|
+
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contract of `astra-rp guard-publish`, the `prepublishOnly` guard that keeps
|
|
3
|
+
* packages from being published by a package manager other than npm.
|
|
4
|
+
*
|
|
5
|
+
* @module constants/guard-publish
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Environment variable package managers set for lifecycle scripts, for
|
|
9
|
+
* example `pnpm/12.6.0 npm/? node/v24.21.0 win32 x64`. npm also reads it as its
|
|
10
|
+
* `user-agent` config, so an inherited value survives `npm publish`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PACKAGE_MANAGER_USER_AGENT_VARIABLE = "npm_config_user_agent";
|
|
13
|
+
/** User agent prefix of npm, the only package manager allowed to publish. */
|
|
14
|
+
export declare const ALLOWED_PUBLISH_USER_AGENT_PREFIX = "npm/";
|
|
15
|
+
/** Package managers whose `publish` is blocked, keyed by their user agent prefix. */
|
|
16
|
+
export declare const BLOCKED_PUBLISH_PACKAGE_MANAGERS: Readonly<{
|
|
17
|
+
"pnpm/": "pnpm";
|
|
18
|
+
"yarn/": "yarn";
|
|
19
|
+
"bun/": "bun";
|
|
20
|
+
}>;
|
|
21
|
+
/** Exit codes of `astra-rp guard-publish`. */
|
|
22
|
+
export declare const GUARD_PUBLISH_EXIT_CODE: Readonly<{
|
|
23
|
+
allowed: 0;
|
|
24
|
+
blocked: 1;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Facade of every `astra-rp` constant, grouped by domain.
|
|
3
|
+
*
|
|
4
|
+
* @module constants
|
|
5
|
+
*/
|
|
6
|
+
export * from "./build-gate.js";
|
|
7
|
+
export * from "./changelog.js";
|
|
8
|
+
export * from "./cli.js";
|
|
9
|
+
export * from "./guard-publish.js";
|
|
10
|
+
export * from "./package-manager.js";
|
|
11
|
+
export * from "./version-files.js";
|
|
12
|
+
export * from "./monorepo.js";
|
|
13
|
+
export * from "./terminal-ui.js";
|
|
14
|
+
export * from "./versions.js";
|
|
15
|
+
export * from "./create-version.js";
|
|
16
|
+
export * from "./registry.js";
|
|
17
|
+
export * from "./ci-release.js";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monorepo mode of `astra-rp create-version`: workspace discovery, per-package
|
|
3
|
+
* tags and the subject of the single release commit.
|
|
4
|
+
*
|
|
5
|
+
* @module constants/monorepo
|
|
6
|
+
*/
|
|
7
|
+
/** `packages` value that releases the workspaces the root `package.json` declares. */
|
|
8
|
+
export declare const WORKSPACES_PACKAGES = "workspaces";
|
|
9
|
+
/** Placeholders of `tagFormat`. `{version}` is required. */
|
|
10
|
+
export declare const TAG_FORMAT_PLACEHOLDER: Readonly<{
|
|
11
|
+
version: "{version}";
|
|
12
|
+
/** Last directory segment of the package (`packages/widget` → `widget`). */
|
|
13
|
+
component: "{component}";
|
|
14
|
+
/** npm name of the package (`@scope/widget`). */
|
|
15
|
+
name: "{name}";
|
|
16
|
+
}>;
|
|
17
|
+
/** Tag of each package in monorepo mode: `widget-v1.2.0` (the release-please component tag). */
|
|
18
|
+
export declare const DEFAULT_MONOREPO_TAG_FORMAT: string;
|
|
19
|
+
/**
|
|
20
|
+
* Placeholder of `summary` replaced by the name of each released package in monorepo mode (next
|
|
21
|
+
* to `{version}`, its version): a line with either one is printed once per released package.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SUMMARY_PACKAGE_PLACEHOLDER = "{name}";
|
|
24
|
+
/** Prefix of the release commit subject: `release: @scope/a@1.2.0, @scope/b@0.3.1`. */
|
|
25
|
+
export declare const MONOREPO_RELEASE_SUBJECT_PREFIX = "release: ";
|
|
26
|
+
/** Separator of the released packages in the release commit subject. */
|
|
27
|
+
export declare const MONOREPO_RELEASE_ENTRY_SEPARATOR = ", ";
|
|
28
|
+
/** One `name@X.Y.Z` entry of the release commit subject; the name may be scoped. */
|
|
29
|
+
export declare const MONOREPO_RELEASE_ENTRY_PATTERN: RegExp;
|
|
30
|
+
/** Workspace pattern that matches every direct subdirectory: `packages/*`. */
|
|
31
|
+
export declare const WORKSPACE_WILDCARD_SUFFIX = "/*";
|
|
32
|
+
/** Prefix of a workspace pattern that excludes directories: `!packages/internal`. */
|
|
33
|
+
export declare const WORKSPACE_EXCLUSION_PREFIX = "!";
|
|
34
|
+
/** Manifest fields listing dependencies; any of them links workspace packages for change detection. */
|
|
35
|
+
export declare const DEPENDENCY_FIELDS: readonly string[];
|
|
36
|
+
/** Answer of the per-package version prompt that leaves the package out of this release. */
|
|
37
|
+
export declare const SKIP_PACKAGE_CHOICE = "skip";
|
|
38
|
+
/** Steps of a monorepo release plan (the shared ones reuse `RELEASE_STEP`). */
|
|
39
|
+
export declare const MONOREPO_RELEASE_STEP: Readonly<{
|
|
40
|
+
chooseVersions: "choose-versions";
|
|
41
|
+
verifyChangelogs: "verify-changelogs";
|
|
42
|
+
bumpPackages: "bump-packages";
|
|
43
|
+
pushPackages: "push-packages";
|
|
44
|
+
publishPackages: "publish-packages";
|
|
45
|
+
}>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package managers a project may use and how each one runs its scripts.
|
|
3
|
+
*
|
|
4
|
+
* @module constants/package-manager
|
|
5
|
+
*/
|
|
6
|
+
/** Package managers astra-rp recognizes. */
|
|
7
|
+
export declare const PACKAGE_MANAGER: Readonly<{
|
|
8
|
+
pnpm: "pnpm";
|
|
9
|
+
npm: "npm";
|
|
10
|
+
yarn: "yarn";
|
|
11
|
+
bun: "bun";
|
|
12
|
+
}>;
|
|
13
|
+
/** Package manager assumed when a project declares none and has no lockfile: the historical default. */
|
|
14
|
+
export declare const DEFAULT_PACKAGE_MANAGER: "pnpm";
|
|
15
|
+
/** `packageManager` field of `package.json` (Corepack format, `<name>@<version>`). */
|
|
16
|
+
export declare const PACKAGE_MANAGER_FIELD = "packageManager";
|
|
17
|
+
/** Name part of a `packageManager` value such as `bun@1.3.11`. */
|
|
18
|
+
export declare const PACKAGE_MANAGER_FIELD_PATTERN: RegExp;
|
|
19
|
+
/**
|
|
20
|
+
* Lockfiles of each package manager, checked in order to reveal the package manager when
|
|
21
|
+
* `packageManager` is missing. The generated CI workflow installs with a frozen lockfile, so it
|
|
22
|
+
* also needs one of its package manager's lockfiles committed.
|
|
23
|
+
*/
|
|
24
|
+
export declare const LOCKFILE_PACKAGE_MANAGERS: readonly string[][];
|
|
25
|
+
/** Every lockfile name in {@link LOCKFILE_PACKAGE_MANAGERS}, whatever its package manager. */
|
|
26
|
+
export declare const LOCKFILE_NAMES: readonly string[];
|
|
27
|
+
/**
|
|
28
|
+
* Prefix that runs a `package.json` script by name. `bun create-version` would run `bun create`
|
|
29
|
+
* and `npm create-version` is not a command, so both need `run`; pnpm and yarn run scripts directly.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SCRIPT_RUNNER: Readonly<{
|
|
32
|
+
pnpm: "pnpm";
|
|
33
|
+
npm: "npm run";
|
|
34
|
+
yarn: "yarn";
|
|
35
|
+
bun: "bun run";
|
|
36
|
+
}>;
|
|
37
|
+
/** `package.json` script projects declare to run `astra-rp create-version`. */
|
|
38
|
+
export declare const CREATE_VERSION_SCRIPT = "create-version";
|
|
39
|
+
/** How a pnpm project runs `astra-rp create-version`: the default quoted by messages when no project is known. */
|
|
40
|
+
export declare const DEFAULT_CREATE_VERSION_COMMAND: string;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines providers, authentication modes and transport defaults for one-registry releases.
|
|
3
|
+
*
|
|
4
|
+
* @module constants/registry
|
|
5
|
+
*/
|
|
6
|
+
/** npm package registry provider. */
|
|
7
|
+
export declare const NPM_REGISTRY_PROVIDER = "npm";
|
|
8
|
+
/** GitHub Packages provider. */
|
|
9
|
+
export declare const GITHUB_REGISTRY_PROVIDER = "github";
|
|
10
|
+
/** GitLab package registry provider. */
|
|
11
|
+
export declare const GITLAB_REGISTRY_PROVIDER = "gitlab";
|
|
12
|
+
/** Native JSR provider. */
|
|
13
|
+
export declare const JSR_REGISTRY_PROVIDER = "jsr";
|
|
14
|
+
/** Providers that can publish without a project-defined hook. */
|
|
15
|
+
export declare const REGISTRY_PROVIDERS: readonly string[];
|
|
16
|
+
/** Token-based authentication mode. */
|
|
17
|
+
export declare const TOKEN_AUTHENTICATION = "token";
|
|
18
|
+
/** Tokenless CI authentication mode. */
|
|
19
|
+
export declare const OIDC_AUTHENTICATION = "oidc";
|
|
20
|
+
/** Interactive JSR browser authentication mode. */
|
|
21
|
+
export declare const BROWSER_AUTHENTICATION = "browser";
|
|
22
|
+
/** Authentication modes accepted in project configuration. */
|
|
23
|
+
export declare const REGISTRY_AUTHENTICATION_MODES: readonly string[];
|
|
24
|
+
/** Provider names used in terminal feedback. */
|
|
25
|
+
export declare const REGISTRY_LABELS: Readonly<{
|
|
26
|
+
npm: "npm";
|
|
27
|
+
github: "GitHub Packages";
|
|
28
|
+
gitlab: "GitLab";
|
|
29
|
+
jsr: "JSR";
|
|
30
|
+
}>;
|
|
31
|
+
/** Host of the GitHub Packages npm endpoint. */
|
|
32
|
+
export declare const GITHUB_PACKAGES_HOST = "npm.pkg.github.com";
|
|
33
|
+
/** Public GitHub Packages npm endpoint. */
|
|
34
|
+
export declare const GITHUB_PACKAGES_REGISTRY_URL = "https://npm.pkg.github.com/";
|
|
35
|
+
/** Public native JSR endpoint. */
|
|
36
|
+
export declare const JSR_REGISTRY_URL = "https://jsr.io/";
|
|
37
|
+
/** Hostname of JSR's npm compatibility endpoint, which installs JSR packages but cannot publish them. */
|
|
38
|
+
export declare const JSR_NPM_COMPATIBILITY_HOSTNAME = "npm.jsr.io";
|
|
39
|
+
/** Default credential variable for each provider. */
|
|
40
|
+
export declare const NPM_REGISTRY_TOKEN_VARIABLE = "NPM_TOKEN";
|
|
41
|
+
/** GitHub Actions token or a classic PAT stored under this variable. */
|
|
42
|
+
export declare const GITHUB_REGISTRY_TOKEN_VARIABLE = "GITHUB_TOKEN";
|
|
43
|
+
/** GitLab access token; a project may configure CI_JOB_TOKEN instead. */
|
|
44
|
+
export declare const GITLAB_REGISTRY_TOKEN_VARIABLE = "GITLAB_TOKEN";
|
|
45
|
+
/** Personal JSR publishing token. */
|
|
46
|
+
export declare const JSR_REGISTRY_TOKEN_VARIABLE = "JSR_TOKEN";
|
|
47
|
+
/** Default token variables indexed by the selected provider. */
|
|
48
|
+
export declare const REGISTRY_TOKEN_VARIABLES: Readonly<{
|
|
49
|
+
npm: "NPM_TOKEN";
|
|
50
|
+
github: "GITHUB_TOKEN";
|
|
51
|
+
gitlab: "GITLAB_TOKEN";
|
|
52
|
+
jsr: "JSR_TOKEN";
|
|
53
|
+
}>;
|
|
54
|
+
/** Variable names safe to reference from npm configuration and child-process environments. */
|
|
55
|
+
export declare const REGISTRY_TOKEN_VARIABLE_PATTERN: RegExp;
|
|
56
|
+
/** Distribution tags safe to pass as one npm CLI operand. */
|
|
57
|
+
export declare const REGISTRY_DIST_TAG_PATTERN: RegExp;
|
|
58
|
+
/** npm access modes supported by registry publishers. */
|
|
59
|
+
export declare const REGISTRY_ACCESS_MODES: readonly string[];
|
|
60
|
+
/** HTTP timeout for direct metadata lookups, in milliseconds. */
|
|
61
|
+
export declare const REGISTRY_LOOKUP_TIMEOUT_MS = 15000;
|
|
62
|
+
/** GitLab publishing uses a project endpoint, including on self-managed instances. */
|
|
63
|
+
export declare const GITLAB_PROJECT_REGISTRY_PATTERN: RegExp;
|
|
64
|
+
/** JSR configuration filenames, in preferred lookup order. */
|
|
65
|
+
export declare const JSR_CONFIG_FILES: readonly string[];
|
|
66
|
+
/** Scoped JSR names with command-line-safe scope and package components. */
|
|
67
|
+
export declare const JSR_PACKAGE_NAME_PATTERN: RegExp;
|
|
68
|
+
/** Pinned official npm client used when JSR does not use an installed Deno client. */
|
|
69
|
+
export declare const JSR_NPM_CLIENT_SPEC = "jsr@0.14.3";
|
|
70
|
+
/** JSR client choices. */
|
|
71
|
+
export declare const JSR_CLIENTS: readonly string[];
|
|
72
|
+
/** Child-only JSR token variable expanded by the command shell, never logged by astra-rp. */
|
|
73
|
+
export declare const JSR_CHILD_TOKEN_VARIABLE = "ASTRA_RP_JSR_TOKEN";
|
|
74
|
+
/** Opaque JSR tokens safe to substitute as one shell-quoted operand. */
|
|
75
|
+
export declare const JSR_SHELL_SAFE_TOKEN_PATTERN: RegExp;
|
|
76
|
+
/** Minimum npm CLI version that implements trusted publishing. */
|
|
77
|
+
export declare const NPM_OIDC_MINIMUM_VERSION = "11.5.1";
|
|
78
|
+
/** Minimum Node version needed by npm trusted publishing. */
|
|
79
|
+
export declare const NPM_OIDC_MINIMUM_NODE_VERSION = "22.14.0";
|