@vite-hub/forge 0.8.0 → 0.9.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/dist/build/node.js +0 -6
- package/dist/index.d.ts +0 -4
- package/package.json +2 -2
package/dist/build/node.js
CHANGED
|
@@ -3,7 +3,6 @@ import { execFile } from "node:child_process";
|
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
// ../internal/src/build/revision.ts
|
|
6
|
-
/** CI and host variables that name the commit and branch of a build, in the order they are read. */
|
|
7
6
|
const buildVariables = [
|
|
8
7
|
["VERCEL_GIT_COMMIT_SHA", "VERCEL_GIT_COMMIT_REF"],
|
|
9
8
|
["WORKERS_CI_COMMIT_SHA", "WORKERS_CI_BRANCH"],
|
|
@@ -26,10 +25,6 @@ async function readGit(root, args) {
|
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
/**
|
|
30
|
-
* On a GitHub Actions `pull_request` event, `GITHUB_SHA` is the test merge commit, which matches no deployment of the
|
|
31
|
-
* pull request. The event payload names the head commit.
|
|
32
|
-
*/
|
|
33
28
|
async function pullRequestHead(env) {
|
|
34
29
|
if (!env.GITHUB_EVENT_NAME?.startsWith("pull_request") || !env.GITHUB_EVENT_PATH) return void 0;
|
|
35
30
|
try {
|
|
@@ -39,7 +34,6 @@ async function pullRequestHead(env) {
|
|
|
39
34
|
return;
|
|
40
35
|
}
|
|
41
36
|
}
|
|
42
|
-
/** The commit and branch that the CI or host names, else Git's. Empty outside a Git checkout. */
|
|
43
37
|
async function discoveredRevision(env, git) {
|
|
44
38
|
for (const [commitName, branchName] of buildVariables) {
|
|
45
39
|
const commit = commitName === "GITHUB_SHA" ? await pullRequestHead(env) ?? env.GITHUB_SHA : env[commitName];
|
package/dist/index.d.ts
CHANGED
|
@@ -3827,10 +3827,6 @@ export declare function forgeMemoryCache(options?: ForgeMemoryCacheOptions): For
|
|
|
3827
3827
|
* Every read still reaches the Forge, so a cached body is only returned when the Forge says it is current.
|
|
3828
3828
|
*/
|
|
3829
3829
|
export declare function conditionalFetch(fetcher: typeof fetch, options?: ForgeConditionalRequests): typeof fetch;
|
|
3830
|
-
/**
|
|
3831
|
-
* The Server Env names of each Forge, and the HTTP status of a failed Forge request. `@vite-hub/forge` exports them.
|
|
3832
|
-
* Channels and Workspaces import them from here, so an app without a Forge does not install or bundle `@vite-hub/forge`.
|
|
3833
|
-
*/
|
|
3834
3830
|
/** One Server Env value of a Forge. */
|
|
3835
3831
|
interface ForgeEnvField {
|
|
3836
3832
|
/** Host variable names in lookup order. The `VITEHUB_` name comes first, then the `forges` name. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-hub/forge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "One Forge identity for ViteHub apps: GitHub App installation tokens and GitHub, GitLab, Forgejo and Gitea providers from one set of env names.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"forge",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@vite-hub/runtime": "0.
|
|
50
|
+
"@vite-hub/runtime": "0.9.0",
|
|
51
51
|
"nostics": "1.4.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|