jive-abstract-app-github-pages 0.1.2 → 0.2.0-latest-darwin-arm64
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/multi-call-binary +4 -0
- package/package.json +11 -47
- package/README.md +0 -146
- package/bin/jive-app-github-pages +0 -34
- package/bin/package.json +0 -1
- package/dist/entrypoints/jive-app-github-pages.js +0 -18
- package/dist/entrypoints/jive-app-github-pages.js.map +0 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +0 -1
- package/dist/internal/commands/cicd/audit.js +0 -10
- package/dist/internal/commands/cicd/audit.js.map +0 -1
- package/dist/internal/commands/cicd/build.js +0 -8
- package/dist/internal/commands/cicd/build.js.map +0 -1
- package/dist/internal/commands/cicd/deploy-plan.js +0 -19
- package/dist/internal/commands/cicd/deploy-plan.js.map +0 -1
- package/dist/internal/commands/cicd/deploy.js +0 -8
- package/dist/internal/commands/cicd/deploy.js.map +0 -1
- package/dist/internal/commands/cicd/get-config.js +0 -9
- package/dist/internal/commands/cicd/get-config.js.map +0 -1
- package/dist/internal/commands/cicd/index.js +0 -16
- package/dist/internal/commands/cicd/index.js.map +0 -1
- package/dist/internal/commands/cicd/upload-artifacts.js +0 -6
- package/dist/internal/commands/cicd/upload-artifacts.js.map +0 -1
- package/dist/internal/commands/create.js +0 -32
- package/dist/internal/commands/create.js.map +0 -1
- package/dist/internal/commands/dev.js +0 -11
- package/dist/internal/commands/dev.js.map +0 -1
- package/dist/internal/common/command.js +0 -5
- package/dist/internal/common/command.js.map +0 -1
- package/dist/internal/common/constants.js +0 -30
- package/dist/internal/common/constants.js.map +0 -1
- package/dist/internal/common/github-token.js +0 -16
- package/dist/internal/common/github-token.js.map +0 -1
- package/dist/internal/common/layer.js +0 -14
- package/dist/internal/common/layer.js.map +0 -1
- package/dist/internal/modules/deployer/impl.js +0 -107
- package/dist/internal/modules/deployer/impl.js.map +0 -1
- package/dist/internal/modules/deployer/interface.js +0 -1
- package/dist/internal/modules/deployer/interface.js.map +0 -1
- package/dist/internal/modules/https-probe/impl.js +0 -15
- package/dist/internal/modules/https-probe/impl.js.map +0 -1
- package/dist/internal/modules/https-probe/interface.js +0 -1
- package/dist/internal/modules/https-probe/interface.js.map +0 -1
- package/dist/internal/modules/index.js +0 -13
- package/dist/internal/modules/index.js.map +0 -1
- package/dist/internal/modules/package/impl.js +0 -16
- package/dist/internal/modules/package/impl.js.map +0 -1
- package/dist/internal/modules/package/interface.js +0 -1
- package/dist/internal/modules/package/interface.js.map +0 -1
- package/dist/internal/modules/pages-api/impl.js +0 -66
- package/dist/internal/modules/pages-api/impl.js.map +0 -1
- package/dist/internal/modules/pages-api/interface.js +0 -1
- package/dist/internal/modules/pages-api/interface.js.map +0 -1
- package/dist/internal/modules/pages-api/recorded/README.md +0 -15
- package/dist/internal/modules/pages-api/recorded/build-built.json +0 -1
- package/dist/internal/modules/pages-api/recorded/build-errored.json +0 -1
- package/dist/internal/modules/pages-api/recorded/site-legacy-gh-pages.json +0 -1
- package/dist/internal/modules/pages-api/recorded/site-none.json +0 -5
- package/dist/internal/modules/publishing-branch/impl.js +0 -83
- package/dist/internal/modules/publishing-branch/impl.js.map +0 -1
- package/dist/internal/modules/publishing-branch/interface.js +0 -1
- package/dist/internal/modules/publishing-branch/interface.js.map +0 -1
- package/dist/internal/modules/scaffold/impl.js +0 -37
- package/dist/internal/modules/scaffold/impl.js.map +0 -1
- package/dist/internal/modules/scaffold/interface.js +0 -1
- package/dist/internal/modules/scaffold/interface.js.map +0 -1
- package/dist/internal/modules/site/impl.js +0 -71
- package/dist/internal/modules/site/impl.js.map +0 -1
- package/dist/internal/modules/site/interface.js +0 -1
- package/dist/internal/modules/site/interface.js.map +0 -1
- package/dist/internal/public/manifest.js +0 -94
- package/dist/internal/public/manifest.js.map +0 -1
- package/dist/internal/public/scaffold.js +0 -62
- package/dist/internal/public/scaffold.js.map +0 -1
- package/dist/internal/public/site-url.js +0 -16
- package/dist/internal/public/site-url.js.map +0 -1
- package/postinstall.cjs +0 -663
- package/src/entrypoints/jive-app-github-pages.ts +0 -19
- package/src/index.ts +0 -18
- package/src/internal/commands/cicd/audit.ts +0 -14
- package/src/internal/commands/cicd/build.ts +0 -12
- package/src/internal/commands/cicd/deploy-plan.ts +0 -23
- package/src/internal/commands/cicd/deploy.ts +0 -12
- package/src/internal/commands/cicd/get-config.ts +0 -13
- package/src/internal/commands/cicd/index.ts +0 -16
- package/src/internal/commands/cicd/upload-artifacts.ts +0 -10
- package/src/internal/commands/create.ts +0 -36
- package/src/internal/commands/dev.ts +0 -11
- package/src/internal/common/command.ts +0 -7
- package/src/internal/common/constants.ts +0 -34
- package/src/internal/common/github-token.ts +0 -19
- package/src/internal/common/layer.ts +0 -25
- package/src/internal/modules/deployer/impl.ts +0 -118
- package/src/internal/modules/deployer/interface.ts +0 -20
- package/src/internal/modules/https-probe/impl.ts +0 -22
- package/src/internal/modules/https-probe/interface.ts +0 -10
- package/src/internal/modules/index.ts +0 -28
- package/src/internal/modules/package/impl.ts +0 -20
- package/src/internal/modules/package/interface.ts +0 -10
- package/src/internal/modules/pages-api/impl.ts +0 -91
- package/src/internal/modules/pages-api/interface.ts +0 -46
- package/src/internal/modules/pages-api/recorded/README.md +0 -15
- package/src/internal/modules/pages-api/recorded/build-built.json +0 -1
- package/src/internal/modules/pages-api/recorded/build-errored.json +0 -1
- package/src/internal/modules/pages-api/recorded/site-legacy-gh-pages.json +0 -1
- package/src/internal/modules/pages-api/recorded/site-none.json +0 -5
- package/src/internal/modules/publishing-branch/impl.ts +0 -95
- package/src/internal/modules/publishing-branch/interface.ts +0 -32
- package/src/internal/modules/scaffold/impl.ts +0 -42
- package/src/internal/modules/scaffold/interface.ts +0 -15
- package/src/internal/modules/site/impl.ts +0 -74
- package/src/internal/modules/site/interface.ts +0 -14
- package/src/internal/public/manifest.ts +0 -116
- package/src/internal/public/scaffold.ts +0 -128
- package/src/internal/public/site-url.ts +0 -18
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { Duration, Effect, Option } from "effect";
|
|
2
|
-
import { effunct, implementing } from "effective-modules";
|
|
3
|
-
import { PUBLISHING_BRANCH, PUBLISHING_PATH } from "../../common/constants";
|
|
4
|
-
import { ABSTRACT_KEY, siteDeployTarget } from "../../public/manifest";
|
|
5
|
-
import { appGithubPagesModules } from "../index";
|
|
6
|
-
/** How often the deploy reads the latest build while waiting, and how long it waits in all. */
|
|
7
|
-
export const BUILD_POLL_INTERVAL = Duration.seconds(5);
|
|
8
|
-
export const BUILD_TIMEOUT = Duration.minutes(10);
|
|
9
|
-
const FINAL_BUILD_STATUSES = ["built", "errored"];
|
|
10
|
-
/** Why a repository's Pages settings would not serve the publishing branch, or nothing when they would. */
|
|
11
|
-
function sourceProblem(site) {
|
|
12
|
-
const source = Option.getOrUndefined(site.source);
|
|
13
|
-
const buildType = Option.getOrUndefined(site.buildType);
|
|
14
|
-
if (buildType === "legacy" && source?.branch === PUBLISHING_BRANCH && source.path === PUBLISHING_PATH)
|
|
15
|
-
return Option.none();
|
|
16
|
-
return Option.some(`its Pages source is ${buildType === "workflow"
|
|
17
|
-
? "GitHub Actions"
|
|
18
|
-
: source === undefined ? "not set" : `the branch ${source.branch} at ${source.path}`}, not the branch ${PUBLISHING_BRANCH} at ${PUBLISHING_PATH}`);
|
|
19
|
-
}
|
|
20
|
-
export class DeployerImpl extends implementing(appGithubPagesModules.Deployer)
|
|
21
|
-
.uses(appGithubPagesModules.Package, appGithubPagesModules.Site, appGithubPagesModules.PublishingBranch, appGithubPagesModules.PagesApi) {
|
|
22
|
-
*deploy(input) {
|
|
23
|
-
const { Package, Site, PublishingBranch, PagesApi } = this.dependencies;
|
|
24
|
-
const { context, environment, token } = input;
|
|
25
|
-
const packageJson = yield* Package.load();
|
|
26
|
-
const config = packageJson.jive[ABSTRACT_KEY];
|
|
27
|
-
const target = siteDeployTarget(packageJson.jive.cicd);
|
|
28
|
-
if (Option.isNone(target) || target.value.environment !== environment) {
|
|
29
|
-
return yield* Effect.fail(`"${environment}" is not the environment this package deploys its site to${Option.isSome(target) ? ` ("${target.value.environment}")` : "; cicd.deploy.branches deploys nothing"}`);
|
|
30
|
-
}
|
|
31
|
-
yield* Site.check(config);
|
|
32
|
-
const { owner, name } = context.repository;
|
|
33
|
-
const repositoryName = `${owner}/${name}`;
|
|
34
|
-
const api = { repository: context.repository, token };
|
|
35
|
-
yield* Effect.log(`Publishing ${config.outputDir} to ${repositoryName}'s ${PUBLISHING_BRANCH} branch for ${environment}`);
|
|
36
|
-
const { commitSha } = yield* PublishingBranch.publish({
|
|
37
|
-
siteDir: config.outputDir,
|
|
38
|
-
remote: { url: `https://github.com/${repositoryName}.git`, token: Option.some(token) },
|
|
39
|
-
branch: PUBLISHING_BRANCH,
|
|
40
|
-
message: `Deploy ${repositoryName}@${context.sourceCommitSha} to ${environment}`,
|
|
41
|
-
});
|
|
42
|
-
const site = yield* PagesApi.getSite(api);
|
|
43
|
-
const settings = `https://github.com/${repositoryName}/settings/pages`;
|
|
44
|
-
if (Option.isNone(site)) {
|
|
45
|
-
return yield* Effect.fail(`${repositoryName} has no GitHub Pages site, so GitHub serves nothing from ${PUBLISHING_BRANCH}. Enabling one needs a repository administrator, which a job's token is not: at ${settings}, set the source to "Deploy from a branch", ${PUBLISHING_BRANCH}, ${PUBLISHING_PATH}`);
|
|
46
|
-
}
|
|
47
|
-
const problem = sourceProblem(site.value);
|
|
48
|
-
if (Option.isSome(problem)) {
|
|
49
|
-
return yield* Effect.fail(`${repositoryName}'s GitHub Pages would not serve what this deploy published: ${problem.value}. Changing it needs a repository administrator, which a job's token is not: at ${settings}, set the source to "Deploy from a branch", ${PUBLISHING_BRANCH}, ${PUBLISHING_PATH}`);
|
|
50
|
-
}
|
|
51
|
-
const latest = yield* PagesApi.latestBuild(api);
|
|
52
|
-
if (Option.isSome(latest) && latest.value.commit === commitSha && latest.value.status === "built") {
|
|
53
|
-
yield* Effect.log(`GitHub Pages has already built ${commitSha}; ${site.value.htmlUrl} serves it`);
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
// The build that was latest before the request is never the one requested, even when it is of the same commit:
|
|
57
|
-
// a rerun after a failed build publishes the same commit, and must not stop at its old failure.
|
|
58
|
-
const earlier = Option.map(latest, ({ url }) => url);
|
|
59
|
-
yield* this.requestBuild({ api, commitSha, earlier });
|
|
60
|
-
const build = yield* this.awaitBuild({ api, commitSha, earlier });
|
|
61
|
-
if (build.status !== "built") {
|
|
62
|
-
return yield* Effect.fail(`GitHub Pages could not build ${commitSha}: ${Option.getOrElse(build.errorMessage, () => `its build ended "${build.status}"`)}`);
|
|
63
|
-
}
|
|
64
|
-
yield* Effect.log(`GitHub Pages built ${commitSha}; ${site.value.htmlUrl} serves it`);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Requests the build. GitHub runs one build per repository at a time, so a refusal while a build of this commit
|
|
68
|
-
* already exists is that build, and the deploy waits for it instead of failing.
|
|
69
|
-
*/
|
|
70
|
-
*requestBuild(input) {
|
|
71
|
-
const { PagesApi } = this.dependencies;
|
|
72
|
-
const requested = yield* Effect.result(effunct(PagesApi.requestBuild.bind(PagesApi))(input.api));
|
|
73
|
-
if (requested._tag === "Success") {
|
|
74
|
-
yield* Effect.log(`Requested a GitHub Pages build of ${input.commitSha}`);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const latest = yield* PagesApi.latestBuild(input.api);
|
|
78
|
-
if (Option.isSome(latest) && this.isNewBuildOf({ build: latest.value, commitSha: input.commitSha, earlier: input.earlier })) {
|
|
79
|
-
yield* Effect.log(`A GitHub Pages build of ${input.commitSha} is already ${latest.value.status}, so the request was refused: ${requested.failure}`);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
return yield* Effect.fail(requested.failure);
|
|
83
|
-
}
|
|
84
|
-
isNewBuildOf(input) {
|
|
85
|
-
return input.build.commit === input.commitSha && !Option.contains(input.earlier, input.build.url);
|
|
86
|
-
}
|
|
87
|
-
*awaitBuild(input) {
|
|
88
|
-
const { PagesApi } = this.dependencies;
|
|
89
|
-
const deadline = Duration.toMillis(BUILD_TIMEOUT);
|
|
90
|
-
let waited = 0;
|
|
91
|
-
for (;;) {
|
|
92
|
-
const latest = yield* PagesApi.latestBuild(input.api);
|
|
93
|
-
if (Option.isSome(latest) && this.isNewBuildOf({ build: latest.value, commitSha: input.commitSha, earlier: input.earlier }) && FINAL_BUILD_STATUSES.includes(latest.value.status)) {
|
|
94
|
-
return latest.value;
|
|
95
|
-
}
|
|
96
|
-
if (waited >= deadline) {
|
|
97
|
-
return yield* Effect.fail(`GitHub Pages had not built ${input.commitSha} after ${Duration.format(BUILD_TIMEOUT)}; the latest build is ${Option.match(latest, {
|
|
98
|
-
onNone: () => "none",
|
|
99
|
-
onSome: (build) => `of ${build.commit}, ${build.status}`,
|
|
100
|
-
})}`);
|
|
101
|
-
}
|
|
102
|
-
yield* Effect.sleep(BUILD_POLL_INTERVAL);
|
|
103
|
-
waited += Duration.toMillis(BUILD_POLL_INTERVAL);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/deployer/impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIjD,+FAA+F;AAC/F,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,OAAO,CAAC,CAA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L,OAAO,MAAM,CAAC,KAAK,CAAC;YACtB,CAAC;YACD,IAAI,MAAM,IAAI,QAAQ,EAAE,CAAC;gBACvB,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,8BAA8B,KAAK,CAAC,SAAS,UAAU,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,yBAAyB,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;oBAC3J,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM;oBACpB,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE;iBACzD,CAAC,EAAE,CAAC,CAAC;YACR,CAAC;YACD,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACzC,MAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/deployer/interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Effect, pipe } from "effect";
|
|
2
|
-
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
3
|
-
import { implementing } from "effective-modules";
|
|
4
|
-
import { appGithubPagesModules } from "../index";
|
|
5
|
-
const PROBE_TIMEOUT = "10 seconds";
|
|
6
|
-
export class HttpsProbeImpl extends implementing(appGithubPagesModules.HttpsProbe).uses(HttpClient.HttpClient) {
|
|
7
|
-
*servesHttps(hostname) {
|
|
8
|
-
const answered = yield* pipe(this.getDependency(HttpClient.HttpClient).execute(HttpClientRequest.head(`https://${hostname}/`)), Effect.timeout(PROBE_TIMEOUT), Effect.as(true), Effect.catchTags({ HttpClientError: () => Effect.succeed(false), TimeoutError: () => Effect.succeed(false) }));
|
|
9
|
-
yield* Effect.log(answered
|
|
10
|
-
? `https://${hostname}/ answers with a valid certificate`
|
|
11
|
-
: `https://${hostname}/ does not answer over https (no certificate yet, or no DNS record), so the site's URL is http://${hostname}/`);
|
|
12
|
-
return answered;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/https-probe/impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,MAAM,aAAa,GAAG,YAAY,CAAC;AAEnC,MAAM,OAAO,cAAe,SAAQ,YAAY,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;IAC5G,CAAC,WAAW,CAAC,QAAgB;QAC3B,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,IAAI,CAC1B,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,QAAQ,GAAG,CAAC,CAAC,EACjG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAC7B,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EACf,MAAM,CAAC,SAAS,CAAC,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAC9G,CAAC;QACF,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ;YACxB,CAAC,CAAC,WAAW,QAAQ,oCAAoC;YACzD,CAAC,CAAC,WAAW,QAAQ,oGAAoG,QAAQ,GAAG,CAAC,CAAC;QACxI,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/https-probe/interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { interfaces } from "effective-modules";
|
|
2
|
-
export var AppGithubPagesModules;
|
|
3
|
-
(function (AppGithubPagesModules) {
|
|
4
|
-
AppGithubPagesModules["Package"] = "Package";
|
|
5
|
-
AppGithubPagesModules["Site"] = "Site";
|
|
6
|
-
AppGithubPagesModules["HttpsProbe"] = "HttpsProbe";
|
|
7
|
-
AppGithubPagesModules["PublishingBranch"] = "PublishingBranch";
|
|
8
|
-
AppGithubPagesModules["PagesApi"] = "PagesApi";
|
|
9
|
-
AppGithubPagesModules["Deployer"] = "Deployer";
|
|
10
|
-
AppGithubPagesModules["Scaffold"] = "Scaffold";
|
|
11
|
-
})(AppGithubPagesModules || (AppGithubPagesModules = {}));
|
|
12
|
-
export const appGithubPagesModules = interfaces(AppGithubPagesModules);
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAS/C,MAAM,CAAN,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,sCAAa,CAAA;IACb,kDAAyB,CAAA;IACzB,8DAAqC,CAAA;IACrC,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACvB,CAAC,EARW,qBAAqB,KAArB,qBAAqB,QAQhC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAQ5C,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Effect, FileSystem, pipe } from "effect";
|
|
2
|
-
import { implementing } from "effective-modules";
|
|
3
|
-
import { loadPackageJson } from "jive-abstract-library";
|
|
4
|
-
import { PackageJsonSchema, crossFieldErrors } from "../../public/manifest";
|
|
5
|
-
import { appGithubPagesModules } from "../index";
|
|
6
|
-
export class PackageImpl extends implementing(appGithubPagesModules.Package).uses(FileSystem.FileSystem) {
|
|
7
|
-
*load() {
|
|
8
|
-
const packageJson = yield* pipe(loadPackageJson(PackageJsonSchema), Effect.provideService(FileSystem.FileSystem, this.getDependency(FileSystem.FileSystem)));
|
|
9
|
-
const errors = crossFieldErrors(packageJson);
|
|
10
|
-
if (errors.length > 0) {
|
|
11
|
-
return yield* Effect.fail(`package.json is inconsistent:\n${errors.map((error) => ` - ${error}`).join("\n")}`);
|
|
12
|
-
}
|
|
13
|
-
return packageJson;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/package/impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,MAAM,OAAO,WAAY,SAAQ,YAAY,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;IACtG,CAAC,IAAI;QACH,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,IAAI,CAC7B,eAAe,CAAC,iBAAiB,CAAC,EAClC,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CACxF,CAAC;QACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC7C,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClH,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/package/interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Effect, Option, Redacted, Schema, SchemaIssue, pipe } from "effect";
|
|
2
|
-
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
3
|
-
import { implementing } from "effective-modules";
|
|
4
|
-
import { appGithubPagesModules } from "../index";
|
|
5
|
-
export const GITHUB_API_URL = "https://api.github.com";
|
|
6
|
-
/** The REST API version the response shapes below were read from. */
|
|
7
|
-
const GITHUB_API_VERSION = "2022-11-28";
|
|
8
|
-
const formatSchemaError = SchemaIssue.makeFormatterDefault();
|
|
9
|
-
const SiteResponse = Schema.Struct({
|
|
10
|
-
build_type: Schema.NullOr(Schema.Literals(["legacy", "workflow"])),
|
|
11
|
-
source: Schema.OptionFromOptionalNullOr(Schema.Struct({ branch: Schema.String, path: Schema.String })),
|
|
12
|
-
cname: Schema.NullOr(Schema.String),
|
|
13
|
-
html_url: Schema.String,
|
|
14
|
-
});
|
|
15
|
-
const BuildResponse = Schema.Struct({
|
|
16
|
-
url: Schema.String,
|
|
17
|
-
status: Schema.String,
|
|
18
|
-
commit: Schema.String,
|
|
19
|
-
error: Schema.Struct({ message: Schema.NullOr(Schema.String) }),
|
|
20
|
-
});
|
|
21
|
-
export class PagesApiImpl extends implementing(appGithubPagesModules.PagesApi).uses(HttpClient.HttpClient) {
|
|
22
|
-
*getSite(input) {
|
|
23
|
-
const response = yield* this.send(input, HttpClientRequest.get(this.url(input, "pages")));
|
|
24
|
-
if (response.status === 404)
|
|
25
|
-
return Option.none();
|
|
26
|
-
const site = yield* this.decode({ response, schema: SiteResponse, what: "Pages site" });
|
|
27
|
-
return Option.some({
|
|
28
|
-
buildType: Option.fromNullOr(site.build_type),
|
|
29
|
-
source: site.source,
|
|
30
|
-
cname: Option.fromNullOr(site.cname),
|
|
31
|
-
htmlUrl: site.html_url,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
*requestBuild(input) {
|
|
35
|
-
const response = yield* this.send(input, HttpClientRequest.post(this.url(input, "pages/builds")));
|
|
36
|
-
if (response.status !== 201)
|
|
37
|
-
return yield* Effect.fail(yield* this.refusal({ response, what: "requesting a Pages build" }));
|
|
38
|
-
}
|
|
39
|
-
*latestBuild(input) {
|
|
40
|
-
const response = yield* this.send(input, HttpClientRequest.get(this.url(input, "pages/builds/latest")));
|
|
41
|
-
if (response.status === 404)
|
|
42
|
-
return Option.none();
|
|
43
|
-
const build = yield* this.decode({ response, schema: BuildResponse, what: "latest Pages build" });
|
|
44
|
-
return Option.some({ url: build.url, status: build.status, commit: build.commit, errorMessage: Option.fromNullOr(build.error.message) });
|
|
45
|
-
}
|
|
46
|
-
url(input, path) {
|
|
47
|
-
return `${GITHUB_API_URL}/repos/${input.repository.owner}/${input.repository.name}/${path}`;
|
|
48
|
-
}
|
|
49
|
-
*send(input, request) {
|
|
50
|
-
return yield* pipe(request, HttpClientRequest.bearerToken(Redacted.value(input.token)), HttpClientRequest.setHeaders({ accept: "application/vnd.github+json", "x-github-api-version": GITHUB_API_VERSION }), (authorized) => this.getDependency(HttpClient.HttpClient).execute(authorized), Effect.mapError((e) => `Cannot reach GitHub's API (${request.method} ${request.url}): ${e.message}`));
|
|
51
|
-
}
|
|
52
|
-
*decode(input) {
|
|
53
|
-
const { response, what } = input;
|
|
54
|
-
if (response.status !== 200)
|
|
55
|
-
return yield* Effect.fail(yield* this.refusal({ response, what: `reading the ${what}` }));
|
|
56
|
-
const body = yield* pipe(response.json, Effect.mapError(() => `GitHub answered the ${what} with HTTP 200 and a body that is not JSON`));
|
|
57
|
-
return yield* pipe(Schema.decodeUnknownEffect(input.schema)(body), Effect.mapError((e) => `GitHub's ${what} is not in the shape this abstract reads:\n${formatSchemaError(e.issue)}`));
|
|
58
|
-
}
|
|
59
|
-
/** GitHub's own reason for a refusal, which names the missing permission when that is the cause. */
|
|
60
|
-
*refusal(input) {
|
|
61
|
-
const text = yield* pipe(input.response.text, Effect.orElseSucceed(() => ""));
|
|
62
|
-
const message = Option.getOrElse(Option.flatMap(Option.liftThrowable(JSON.parse)(text), (body) => typeof body === "object" && body !== null && typeof body.message === "string" ? Option.some(body.message) : Option.none()), () => text.trim());
|
|
63
|
-
return `GitHub refused ${input.what} with HTTP ${input.response.status}${message === "" ? "" : `: ${message}`}`;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/pages-api/impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,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QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAiB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EACtI,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAClB,CAAC;QACF,OAAO,kBAAkB,KAAK,CAAC,IAAI,cAAc,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,EAAE,CAAC;IAClH,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/pages-api/interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Recorded GitHub Pages API responses
|
|
2
|
-
|
|
3
|
-
Bodies GitHub's REST API returned on 2026-11-04, read with an authenticated `gh api`, which the
|
|
4
|
-
[impl tests](../impl.test.ts) serve through a fake HTTP client:
|
|
5
|
-
|
|
6
|
-
| File | Request | Repository |
|
|
7
|
-
| --- | --- | --- |
|
|
8
|
-
| `site-legacy-gh-pages.json` | `GET /repos/{owner}/{repo}/pages` | jive-sh/docs, published from `gh-pages` at `/` |
|
|
9
|
-
| `site-none.json` | `GET /repos/{owner}/{repo}/pages`, HTTP 404 | jive-sh/jive-abstract-library, which has no Pages site |
|
|
10
|
-
| `build-built.json` | `GET /repos/{owner}/{repo}/pages/builds/latest` | jive-sh/docs |
|
|
11
|
-
| `build-errored.json` | one `errored` entry of `GET /repos/{owner}/{repo}/pages/builds` | jive-sh/docs |
|
|
12
|
-
|
|
13
|
-
`POST /repos/{owner}/{repo}/pages/builds` is not recorded: requesting a build of a live site is an action, not a
|
|
14
|
-
read. Its tests use the documented 201 body, `url` and `status`
|
|
15
|
-
([Request a GitHub Pages build](https://docs.github.com/en/rest/pages/pages#request-a-github-pages-build)).
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"url":"https://api.github.com/repos/jive-sh/docs/pages/builds/1339284680","status":"built","error":{"message":null},"pusher":{"login":"ozyman42","id":5025138,"node_id":"MDQ6VXNlcjUwMjUxMzg=","avatar_url":"https://avatars.githubusercontent.com/u/5025138?v=4","gravatar_id":"","url":"https://api.github.com/users/ozyman42","html_url":"https://github.com/ozyman42","followers_url":"https://api.github.com/users/ozyman42/followers","following_url":"https://api.github.com/users/ozyman42/following{/other_user}","gists_url":"https://api.github.com/users/ozyman42/gists{/gist_id}","starred_url":"https://api.github.com/users/ozyman42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozyman42/subscriptions","organizations_url":"https://api.github.com/users/ozyman42/orgs","repos_url":"https://api.github.com/users/ozyman42/repos","events_url":"https://api.github.com/users/ozyman42/events{/privacy}","received_events_url":"https://api.github.com/users/ozyman42/received_events","type":"User","user_view_type":"public","site_admin":false},"commit":"b1ecee4950551b957caff5c2d2a1ea5e12cdb282","duration":34859,"created_at":"2026-11-04T00:39:20Z","updated_at":"2026-11-04T00:39:54Z"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"commit":"528ae0cd43a734a96f1b9244a4ff796014ba5b06","created_at":"2026-11-04T00:39:18Z","duration":0,"error":{"message":"Page build failed."},"pusher":{"avatar_url":"https://avatars.githubusercontent.com/u/5025138?v=4","events_url":"https://api.github.com/users/ozyman42/events{/privacy}","followers_url":"https://api.github.com/users/ozyman42/followers","following_url":"https://api.github.com/users/ozyman42/following{/other_user}","gists_url":"https://api.github.com/users/ozyman42/gists{/gist_id}","gravatar_id":"","html_url":"https://github.com/ozyman42","id":5025138,"login":"ozyman42","node_id":"MDQ6VXNlcjUwMjUxMzg=","organizations_url":"https://api.github.com/users/ozyman42/orgs","received_events_url":"https://api.github.com/users/ozyman42/received_events","repos_url":"https://api.github.com/users/ozyman42/repos","site_admin":false,"starred_url":"https://api.github.com/users/ozyman42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozyman42/subscriptions","type":"User","url":"https://api.github.com/users/ozyman42","user_view_type":"public"},"status":"errored","updated_at":"2026-11-04T00:39:20Z","url":"https://api.github.com/repos/jive-sh/docs/pages/builds/1339284601"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"url":"https://api.github.com/repos/jive-sh/docs/pages","status":"built","cname":"docs.jive.sh","custom_404":true,"html_url":"https://docs.jive.sh/","build_type":"legacy","source":{"branch":"gh-pages","path":"/"},"public":true,"protected_domain_state":null,"pending_domain_unverified_at":null,"https_certificate":{"state":"approved","description":"The certificate has been approved.","domains":["docs.jive.sh"],"expires_at":"2027-02-02"},"https_enforced":true}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { Effect, FileSystem, Option, Redacted, pipe } from "effect";
|
|
2
|
-
import { effunct, implementing } from "effective-modules";
|
|
3
|
-
import { OSPlatform } from "jive-abstract-library";
|
|
4
|
-
import { dirname, resolve } from "node:path";
|
|
5
|
-
import { PUBLISHING_GIT_DIR } from "../../common/constants";
|
|
6
|
-
import { appGithubPagesModules } from "../index";
|
|
7
|
-
/** The identity GitHub shows for commits made with an Actions job's token. */
|
|
8
|
-
const COMMITTER = { name: "github-actions[bot]", email: "41898282+github-actions[bot]@users.noreply.github.com" };
|
|
9
|
-
/**
|
|
10
|
-
* Configuration given to every git command through the environment, so a token never appears in a process's
|
|
11
|
-
* arguments and the machine's own git configuration (a signing key, a credential helper, a URL rewrite) never
|
|
12
|
-
* changes what a deploy does.
|
|
13
|
-
*/
|
|
14
|
-
function gitEnvironment(remote) {
|
|
15
|
-
const config = Option.match(remote.token, {
|
|
16
|
-
onNone: () => [],
|
|
17
|
-
// GitHub accepts a job token as basic auth with any username; actions/checkout sends this same header.
|
|
18
|
-
onSome: (token) => [{
|
|
19
|
-
key: `http.${new URL(remote.url).origin}/.extraheader`,
|
|
20
|
-
value: `AUTHORIZATION: basic ${Buffer.from(`x-access-token:${Redacted.value(token)}`).toString("base64")}`,
|
|
21
|
-
}],
|
|
22
|
-
});
|
|
23
|
-
return {
|
|
24
|
-
...process.env,
|
|
25
|
-
GIT_CONFIG_GLOBAL: "/dev/null",
|
|
26
|
-
GIT_CONFIG_NOSYSTEM: "1",
|
|
27
|
-
GIT_TERMINAL_PROMPT: "0",
|
|
28
|
-
GIT_AUTHOR_NAME: COMMITTER.name,
|
|
29
|
-
GIT_AUTHOR_EMAIL: COMMITTER.email,
|
|
30
|
-
GIT_COMMITTER_NAME: COMMITTER.name,
|
|
31
|
-
GIT_COMMITTER_EMAIL: COMMITTER.email,
|
|
32
|
-
GIT_CONFIG_COUNT: String(config.length),
|
|
33
|
-
...Object.fromEntries(config.flatMap(({ key, value }, index) => [[`GIT_CONFIG_KEY_${index}`, key], [`GIT_CONFIG_VALUE_${index}`, value]])),
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export class PublishingBranchImpl extends implementing(appGithubPagesModules.PublishingBranch).uses(OSPlatform, FileSystem.FileSystem) {
|
|
37
|
-
*publish(input) {
|
|
38
|
-
const fs = this.getDependency(FileSystem.FileSystem);
|
|
39
|
-
const gitDir = resolve(PUBLISHING_GIT_DIR);
|
|
40
|
-
const workTree = resolve(input.siteDir);
|
|
41
|
-
const env = gitEnvironment(input.remote);
|
|
42
|
-
const git = (args) => this.git({ repository: { gitDir, workTree, env }, args });
|
|
43
|
-
const ref = `refs/heads/${input.branch}`;
|
|
44
|
-
// A fresh repository every time: the remote branch is the only state, so nothing a previous run left can matter.
|
|
45
|
-
yield* pipe(fs.remove(gitDir, { recursive: true, force: true }), Effect.mapError((e) => `Cannot clear ${gitDir}: ${e.message}`));
|
|
46
|
-
yield* pipe(fs.makeDirectory(dirname(gitDir), { recursive: true }), Effect.mapError((e) => `Cannot create ${dirname(gitDir)}: ${e.message}`));
|
|
47
|
-
yield* git(["init", "--quiet"]);
|
|
48
|
-
const remoteHead = (yield* git(["ls-remote", "--heads", input.remote.url, ref])).trim();
|
|
49
|
-
const parent = remoteHead === "" ? Option.none() : Option.some(remoteHead.split(/\s/)[0]);
|
|
50
|
-
if (Option.isSome(parent)) {
|
|
51
|
-
yield* git(["fetch", "--quiet", "--depth=1", input.remote.url, ref]);
|
|
52
|
-
}
|
|
53
|
-
// Every file, ignore rules included: the site is exactly what the folder holds.
|
|
54
|
-
yield* git(["add", "--all", "--force", "."]);
|
|
55
|
-
const tree = (yield* git(["write-tree"])).trim();
|
|
56
|
-
if (Option.isSome(parent) && (yield* git(["rev-parse", `${parent.value}^{tree}`])).trim() === tree) {
|
|
57
|
-
yield* Effect.log(`${input.branch} already holds this site, at ${parent.value}`);
|
|
58
|
-
return { commitSha: parent.value, changed: false };
|
|
59
|
-
}
|
|
60
|
-
const commitSha = (yield* git([
|
|
61
|
-
"commit-tree", tree, "--no-gpg-sign", "-m", input.message,
|
|
62
|
-
...Option.match(parent, { onNone: () => [], onSome: (sha) => ["-p", sha] }),
|
|
63
|
-
])).trim();
|
|
64
|
-
const pushed = yield* Effect.result(effunct(git)(["push", "--quiet", input.remote.url, `${commitSha}:${ref}`]));
|
|
65
|
-
if (pushed._tag === "Failure") {
|
|
66
|
-
return yield* Effect.fail(pushed.failure.includes("(fetch first)") || pushed.failure.includes("(non-fast-forward)")
|
|
67
|
-
? `${input.branch} moved while this deploy ran, most likely another deploy publishing first; nothing was overwritten, and rerunning this deploy publishes on top of it. ${pushed.failure}`
|
|
68
|
-
: pushed.failure);
|
|
69
|
-
}
|
|
70
|
-
yield* Effect.log(`Pushed ${commitSha} to ${input.branch}${Option.isSome(parent) ? ` on top of ${parent.value}` : ", its first commit"}`);
|
|
71
|
-
return { commitSha, changed: true };
|
|
72
|
-
}
|
|
73
|
-
/** Runs a git subcommand against the publishing repository and returns its stdout, failing with its stderr on a nonzero exit. */
|
|
74
|
-
*git(input) {
|
|
75
|
-
const { gitDir, workTree, env } = input.repository;
|
|
76
|
-
const result = yield* this.dependencies.OSPlatform.spawnProcess({ command: "git", args: ["--git-dir", gitDir, "--work-tree", workTree, ...input.args], env });
|
|
77
|
-
if (result.exitCode !== 0) {
|
|
78
|
-
return yield* Effect.fail(`git ${input.args[0]} exited with code ${result.exitCode}: ${result.stderr.trim()}`);
|
|
79
|
-
}
|
|
80
|
-
return result.stdout;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/publishing-branch/impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,8EAA8E;AAC9E,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,uDAAuD,EAAW,CAAC;AAE3H;;;;GAIG;AACH,SAAS,cAAc,CAAC,MAAiB;IACvC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE;QACxC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE;QAChB,uGAAuG;QACvG,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAClB,GAAG,EAAE,QAAQ,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAA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,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,MAAM,CAAC,QAAQ,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACjH,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/publishing-branch/interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Effect, FileSystem, pipe } from "effect";
|
|
2
|
-
import { implementing } from "effective-modules";
|
|
3
|
-
import { OSPlatform } from "jive-abstract-library";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
|
-
import { scaffoldFiles } from "../../public/scaffold";
|
|
6
|
-
import { appGithubPagesModules } from "../index";
|
|
7
|
-
export class ScaffoldImpl extends implementing(appGithubPagesModules.Scaffold).uses(OSPlatform, FileSystem.FileSystem) {
|
|
8
|
-
*create(input) {
|
|
9
|
-
const fs = this.getDependency(FileSystem.FileSystem);
|
|
10
|
-
const { directory } = input;
|
|
11
|
-
const exists = yield* pipe(fs.exists(directory), Effect.mapError((e) => `Cannot check for ${directory}: ${e.message}`));
|
|
12
|
-
if (exists) {
|
|
13
|
-
const entries = yield* pipe(fs.readDirectory(directory), Effect.mapError((e) => `Cannot read ${directory}: ${e.message}`));
|
|
14
|
-
if (entries.length > 0)
|
|
15
|
-
return yield* Effect.fail(`${directory} is not empty; create a package in a new or empty directory`);
|
|
16
|
-
}
|
|
17
|
-
const files = scaffoldFiles(input.scaffold);
|
|
18
|
-
for (const [path, text] of Object.entries(files)) {
|
|
19
|
-
const target = join(directory, path);
|
|
20
|
-
yield* pipe(fs.makeDirectory(dirname(target), { recursive: true }), Effect.andThen(fs.writeFileString(target, text)), Effect.mapError((e) => `Cannot write ${target}: ${e.message}`));
|
|
21
|
-
}
|
|
22
|
-
if (input.install) {
|
|
23
|
-
yield* Effect.log(`Installing ${input.scaffold.packageName}'s dependencies`);
|
|
24
|
-
const { exitCode } = yield* this.dependencies.OSPlatform.spawnProcess({
|
|
25
|
-
command: "bun",
|
|
26
|
-
args: ["install"],
|
|
27
|
-
cwd: directory,
|
|
28
|
-
stdout: "inherit",
|
|
29
|
-
stderr: "inherit",
|
|
30
|
-
});
|
|
31
|
-
if (exitCode !== 0)
|
|
32
|
-
return yield* Effect.fail(`bun install in ${directory} exited with code ${exitCode}; the files are written`);
|
|
33
|
-
}
|
|
34
|
-
return Object.keys(files);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/scaffold/impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,MAAM,OAAO,YAAa,SAAQ,YAAY,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;IACpH,CAAC,MAAM,CAAC,KAAkB;QACxB,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU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QACJ,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,QAAQ,CAAC,WAAW,iBAAiB,CAAC,CAAC;YAC7E,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC;gBACpE,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,CAAC,SAAS,CAAC;gBACjB,GAAG,EAAE,SAAS;gBACd,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,SAAS;aAClB,CAAC,CAAC;YACH,IAAI,QAAQ,KAAK,CAAC;gBAAE,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,SAAS,qBAAqB,QAAQ,yBAAyB,CAAC,CAAC;QACnI,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/scaffold/interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Effect, FileSystem, Option, pipe } from "effect";
|
|
2
|
-
import { implementing } from "effective-modules";
|
|
3
|
-
import { OSPlatform } from "jive-abstract-library";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { SITE_FILES, SITE_INDEX_FILE } from "../../common/constants";
|
|
6
|
-
import { ABSTRACT_KEY } from "../../public/manifest";
|
|
7
|
-
import { appGithubPagesModules } from "../index";
|
|
8
|
-
export class SiteImpl extends implementing(appGithubPagesModules.Site).uses(OSPlatform, FileSystem.FileSystem) {
|
|
9
|
-
*build(config) {
|
|
10
|
-
yield* Effect.log(`Building the site: bun run ${config.buildScript}`);
|
|
11
|
-
const { exitCode } = yield* this.dependencies.OSPlatform.spawnProcess({
|
|
12
|
-
command: "bun",
|
|
13
|
-
args: ["run", config.buildScript],
|
|
14
|
-
stdout: "inherit",
|
|
15
|
-
stderr: "inherit",
|
|
16
|
-
});
|
|
17
|
-
if (exitCode !== 0)
|
|
18
|
-
return yield* Effect.fail(`bun run ${config.buildScript} exited with code ${exitCode}`);
|
|
19
|
-
const index = join(config.outputDir, SITE_INDEX_FILE);
|
|
20
|
-
if (!(yield* this.exists(index))) {
|
|
21
|
-
return yield* Effect.fail(`bun run ${config.buildScript} wrote no ${index}, which GitHub Pages serves at the site's root; is jive.${ABSTRACT_KEY}.outputDir "${config.outputDir}" where it writes the site?`);
|
|
22
|
-
}
|
|
23
|
-
const cname = join(config.outputDir, SITE_FILES.customDomain);
|
|
24
|
-
const existing = yield* this.readIfExists(cname);
|
|
25
|
-
if (Option.isSome(config.domain)) {
|
|
26
|
-
if (Option.isSome(existing) && existing.value.trim() !== config.domain.value) {
|
|
27
|
-
yield* Effect.logWarning(`${cname} named "${existing.value.trim()}"; replaced with jive.${ABSTRACT_KEY}.domain, "${config.domain.value}"`);
|
|
28
|
-
}
|
|
29
|
-
yield* this.write(cname, `${config.domain.value}\n`);
|
|
30
|
-
}
|
|
31
|
-
else if (Option.isSome(existing)) {
|
|
32
|
-
yield* Effect.logWarning(`Removed ${cname}, which named "${existing.value.trim()}": jive.${ABSTRACT_KEY}.domain is null, so the site is served without a custom domain`);
|
|
33
|
-
yield* pipe(this.getDependency(FileSystem.FileSystem).remove(cname), Effect.mapError((e) => `Cannot remove ${cname}: ${e.message}`));
|
|
34
|
-
}
|
|
35
|
-
yield* this.write(join(config.outputDir, SITE_FILES.disableJekyll), "");
|
|
36
|
-
yield* Effect.log(`Built the site into ${config.outputDir}${Option.isSome(config.domain) ? `, for ${config.domain.value}` : ""}`);
|
|
37
|
-
}
|
|
38
|
-
*check(config) {
|
|
39
|
-
const problems = [];
|
|
40
|
-
for (const file of [SITE_INDEX_FILE, SITE_FILES.disableJekyll]) {
|
|
41
|
-
const path = join(config.outputDir, file);
|
|
42
|
-
if (!(yield* this.exists(path)))
|
|
43
|
-
problems.push(`${path} is missing`);
|
|
44
|
-
}
|
|
45
|
-
const cname = join(config.outputDir, SITE_FILES.customDomain);
|
|
46
|
-
const existing = yield* this.readIfExists(cname);
|
|
47
|
-
if (Option.isSome(config.domain) && Option.getOrUndefined(existing)?.trim() !== config.domain.value) {
|
|
48
|
-
problems.push(Option.isSome(existing)
|
|
49
|
-
? `${cname} names "${existing.value.trim()}", not jive.${ABSTRACT_KEY}.domain "${config.domain.value}"`
|
|
50
|
-
: `${cname} is missing, so GitHub Pages would not serve the site at ${config.domain.value}`);
|
|
51
|
-
}
|
|
52
|
-
if (Option.isNone(config.domain) && Option.isSome(existing)) {
|
|
53
|
-
problems.push(`${cname} names "${existing.value.trim()}", but jive.${ABSTRACT_KEY}.domain is null`);
|
|
54
|
-
}
|
|
55
|
-
if (problems.length > 0) {
|
|
56
|
-
return yield* Effect.fail(`${config.outputDir} is not a site ready to publish; run jive:cicd:build:\n${problems.map((problem) => ` - ${problem}`).join("\n")}`);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
*exists(path) {
|
|
60
|
-
return yield* pipe(this.getDependency(FileSystem.FileSystem).exists(path), Effect.mapError((e) => `Cannot check for ${path}: ${e.message}`));
|
|
61
|
-
}
|
|
62
|
-
*readIfExists(path) {
|
|
63
|
-
if (!(yield* this.exists(path)))
|
|
64
|
-
return Option.none();
|
|
65
|
-
return Option.some(yield* pipe(this.getDependency(FileSystem.FileSystem).readFileString(path), Effect.mapError((e) => `Cannot read ${path}: ${e.message}`)));
|
|
66
|
-
}
|
|
67
|
-
*write(path, text) {
|
|
68
|
-
yield* pipe(this.getDependency(FileSystem.FileSystem).writeFileString(path, text), Effect.mapError((e) => `Cannot write ${path}: ${e.message}`));
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
//# s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;QAChC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAAE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;QACtD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/J,CAAC;IAEO,CAAC,KAAK,CAAC,IAAY,EAAE,IAAY;QACvC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACnJ,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../../../src/internal/modules/site/interface.ts"],"names":[],"mappings":""}
|