ref0-git 0.4.0 → 0.7.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/app/apps/github/README.md +3 -7
- package/app/apps/github/generated/git-rest.ts +12 -12
- package/app/apps/github/src/clients/allowed.ts +7 -9
- package/app/apps/github/src/clients/avatars.ts +5 -3
- package/app/apps/github/src/clients/graphql.ts +12 -2
- package/app/apps/github/src/clients/host-calls.ts +2 -1
- package/app/apps/github/src/clients/transfers.ts +56 -19
- package/app/apps/github/src/context/context.ts +5 -5
- package/app/apps/github/src/context/host.ts +115 -0
- package/app/apps/github/src/ingress.ts +28 -0
- package/app/apps/github/src/policy.ts +143 -79
- package/app/apps/github/src/private-repos.ts +7 -7
- package/app/apps/github/src/pulls/review.ts +2 -1
- package/app/apps/github/src/releases/release-form.tsx +40 -4
- package/app/apps/github/src/releases/releases.ts +148 -22
- package/app/apps/github/src/routes/uploads/$owner/$repo/$release.tsx +9 -2
- package/app/apps/github/src/seed/seed.ts +9 -2
- package/app/apps/github/src/server.ts +28 -11
- package/app/apps/github/src/signin/approval.ts +20 -15
- package/app/apps/github/src/signin/attempts.ts +306 -0
- package/app/apps/github/src/signin/auth.ts +9 -0
- package/app/apps/github/src/signin/host-session.ts +30 -18
- package/app/apps/github/src/signin/limits.ts +35 -0
- package/app/pnpm-workspace.yaml +39 -35
- package/dist/cli/setup.mjs +1 -1
- package/dist/init/app.mjs +43 -22
- package/dist/init/cloudflare.mjs +8 -4
- package/dist/init/create.mjs +1 -1
- package/dist/init/detect.mjs +5 -3
- package/dist/init/files.mjs +6 -1
- package/dist/init/git-module.mjs +4 -6
- package/dist/init/metadata.mjs +6 -6
- package/dist/init/node-app.mjs +5 -2
- package/dist/init/stores.mjs +3 -2
- package/dist/init/template.mjs +13 -7
- package/dist/init/templates.mjs +51 -39
- package/dist/init/vercel.mjs +1 -1
- package/dist/init/versions.mjs +1 -1
- package/package.json +13 -13
package/dist/init/templates.mjs
CHANGED
|
@@ -3,19 +3,23 @@ var templates_default = {
|
|
|
3
3
|
appGit: [
|
|
4
4
|
{
|
|
5
5
|
"slot": "gitImport",
|
|
6
|
-
"text": "import {
|
|
6
|
+
"text": "import {\n Git,\n Lfs,\n Merges,\n MergeQueue,\n Objects,\n RepoRecords,\n Rest,\n SignIn,\n Tokens,\n} from '@ref0/git';"
|
|
7
7
|
},
|
|
8
8
|
"\n",
|
|
9
9
|
{
|
|
10
10
|
"slot": "queueTypes",
|
|
11
11
|
"text": "import type { MergeInput, MergePlan } from '@ref0/git';\n"
|
|
12
12
|
},
|
|
13
|
-
|
|
13
|
+
{
|
|
14
|
+
"slot": "githubImport",
|
|
15
|
+
"text": "import {\n Apps,\n Deployments,\n GitHub,\n Inbox,\n Releases,\n Search,\n Streams,\n Webhooks,\n} from '@ref0/github';"
|
|
16
|
+
},
|
|
17
|
+
"\nimport * as Languages from '@ref0/github/languages';\n",
|
|
14
18
|
{
|
|
15
19
|
"slot": "infraImport",
|
|
16
20
|
"text": "import {\n layer,\n layerR2,\n layerR2Signed,\n toJobObject,\n toRecordsObject,\n} from '@ref0/infra/cloudflare';"
|
|
17
21
|
},
|
|
18
|
-
"\nimport xdiff from '@ref0/xdiff-wasm/xdiff.wasm';\nimport { env as bindings } from 'cloudflare:workers';\n\nimport type { Env } from './env.ts';\nimport { admin, approvalPage, hostPolicy, hostRules, type Identify } from './policy.ts';\nimport { privateReposOf } from './private-repos.ts';\nimport { readyAdapter, readyAuth, starterAuth } from './signin/auth.ts';\nimport { avatars } from './signin/avatars.ts';\nimport { appAuth } from './signin/host-session.ts';\nimport { orgsOver } from './signin/orgs.ts';\nimport { sealKey } from './signin/seal.ts';\n\n// SAFETY: `wrangler.jsonc` ",
|
|
22
|
+
"\nimport xdiff from '@ref0/xdiff-wasm/xdiff.wasm';\nimport { env as bindings } from 'cloudflare:workers';\nimport * as FetchHttpClient from 'effect/http/FetchHttpClient';\nimport * as Layer from 'effect/Layer';\nimport * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { hostLayer, peopleOver, repoListOn, runOn, tokenCallsOn } from './context/host.ts';\nimport type { Env } from './env.ts';\nimport { admin, approvalPage, hostPolicy, hostRules, type Identify } from './policy.ts';\nimport { privateReposOf } from './private-repos.ts';\nimport { readyAdapter, readyAuth, starterAuth } from './signin/auth.ts';\nimport { avatars } from './signin/avatars.ts';\nimport { appAuth } from './signin/host-session.ts';\nimport { orgsOver } from './signin/orgs.ts';\nimport { sealKey } from './signin/seal.ts';\n\n// SAFETY: `wrangler.jsonc` ",
|
|
19
23
|
{
|
|
20
24
|
"slot": "safety",
|
|
21
25
|
"text": "binds the objects, the bucket and D1"
|
|
@@ -23,90 +27,98 @@ var templates_default = {
|
|
|
23
27
|
" and sets `APP_ORIGIN`; the\n// secrets come from `wrangler secret put`, or `.dev.vars` locally.\nexport const env = bindings as Env;\n\n",
|
|
24
28
|
{
|
|
25
29
|
"slot": "bucket",
|
|
26
|
-
"text": "const {\n R2_ACCOUNT_ID: accountId,\n R2_ACCESS_KEY_ID: accessKeyId,\n R2_SECRET_ACCESS_KEY: secretAccessKey,\n} = env;\n\n// With R2's S3 credentials, a push's pack
|
|
30
|
+
"text": "const {\n R2_ACCOUNT_ID: accountId,\n R2_ACCESS_KEY_ID: accessKeyId,\n R2_SECRET_ACCESS_KEY: secretAccessKey,\n} = env;\n\n// With R2's S3 credentials, the bucket signs parts, and a push's pack past 64 MiB may upload to\n// it in parts, past Workers' 100 MB body.\nconst signed =\n accountId === undefined || accessKeyId === undefined || secretAccessKey === undefined\n ? undefined\n : layerR2Signed(env.PACKS, {\n accountId,\n bucket: env.PACKS_BUCKET,\n accessKeyId,\n secretAccessKey,\n });\n\nconst bucket = signed ?? layerR2(env.PACKS);\n\nconst uploads =\n signed === undefined\n ? Layer.empty\n : Layer.provide(Git.layerUploads({ above: 64 * 1024 * 1024 }), signed);\n\n"
|
|
27
31
|
},
|
|
28
32
|
{
|
|
29
33
|
"slot": "queueMerge",
|
|
30
34
|
"text": "/**\n * How the queue writes an entry's link onto `main`: a merge commit, by the person who added it, as\n * a pull request's merge button writes one, and titled as GitHub titles it for a pull request's\n * entry, keyed `pr-<number>`.\n */\nconst queueMerge = ({ entry }: MergeInput): MergePlan => {\n const [owner = ''] = entry.repo.split('/');\n const branch = entry.source.replace(/^refs\\/heads\\//, '');\n const pull = /^pr-([1-9]\\d*)$/.exec(entry.key)?.[1];\n const title =\n pull === undefined ? `Merge ${branch}` : `Merge pull request #${pull} from ${owner}/${branch}`;\n const login = entry.subject?.id ?? entry.actor.id;\n const hostname = new URL(env.APP_ORIGIN).hostname;\n\n return {\n method: 'merge',\n message: `${title}\\n`,\n author: { name: login, email: `${login}@users.noreply.${hostname}`, at: Date.now(), offset: 0 },\n };\n};\n\n"
|
|
31
35
|
},
|
|
32
|
-
"/** The key sessions and host sessions are sealed under, derived once an isolate from its secret. */\nexport const sessionKey = sealKey(env.SESSION_SECRET);\n\n/**\n * Who owns what, and the drop-in's people and orgs, over Better Auth's tables, which `auth` makes\n * at the first request that reads them.\n */\nexport const directory = orgsOver(async () => readyAdapter(await auth()));\n\n/** People's, orgs' and repos' pictures, in Better Auth's database, as `directory` reads it. */\nexport const pictures = avatars(async () => readyAdapter(await auth()));\n\nexport const policy = hostPolicy(directory, {\n origin: env.APP_ORIGIN,\n avatars: pictures,\n privateRepos: async (prefix, most, host) => privateReposOf(
|
|
36
|
+
"/** The key sessions and host sessions are sealed under, derived once an isolate from its secret. */\nexport const sessionKey = sealKey(env.SESSION_SECRET);\n\n/**\n * Who owns what, and the drop-in's people and orgs, over Better Auth's tables, which `auth` makes\n * at the first request that reads them.\n */\nexport const directory = orgsOver(async () => readyAdapter(await auth()));\n\n/** People's, orgs' and repos' pictures, in Better Auth's database, as `directory` reads it. */\nexport const pictures = avatars(async () => readyAdapter(await auth()));\n\nexport const policy = hostPolicy(directory, {\n origin: env.APP_ORIGIN,\n avatars: pictures,\n privateRepos: async (prefix, most, host) => privateReposOf(repoListOn(run))(prefix, most, host),\n repoName: async (internalId, signal) =>\n (await runtime.runPromise(RepoRecords.record(internalId), { signal }))?.name,\n});\n\n",
|
|
33
37
|
{
|
|
34
38
|
"slot": "adapter",
|
|
35
|
-
"text": "
|
|
39
|
+
"text": "/** The records and job objects, and the bucket. */\nconst adapter = Layer.merge(layer({ records: env.RECORDS, jobs: env.JOBS }), bucket);"
|
|
36
40
|
},
|
|
37
|
-
"\n",
|
|
41
|
+
"\n\n",
|
|
38
42
|
{
|
|
39
43
|
"slot": "objects",
|
|
40
|
-
"text": "
|
|
44
|
+
"text": "/** Git's objects, in packs in the bucket. */\nconst objects = Objects.layer();"
|
|
41
45
|
},
|
|
42
|
-
"\n
|
|
46
|
+
"\n\n/**\n * Git's features and the drop-in's, over the host's directory: delete a line to turn its feature\n * off (Q832).\n */\nconst features = Layer.mergeAll(\n Inbox.layer(),\n Deployments.layer(),\n",
|
|
47
|
+
{
|
|
48
|
+
"slot": "releases",
|
|
49
|
+
"text": " // A release's assets, in the bucket beside the packs.\n Releases.layer(),\n"
|
|
50
|
+
},
|
|
51
|
+
" // `org:` and `user:` search an owner's repos, its private ones by the policy's hook.\n Search.layer({ readableRepos: policy.readableRepos }),\n // Without it, a repo's `language` and `license` answer null.\n Languages.layer(),\n // A repo's and an org's hooks, each delivery a `fetch`, and GitHub Apps, whose hooks they send.\n // @effect-diagnostics-next-line unstableApiUsage:off\n Layer.provideMerge(Apps.layer(), Webhooks.layer().pipe(Layer.provide(FetchHttpClient.layer))),\n // GitHub's Event Streams over Git's event feeds, which a pull request's page follows.\n Streams.layer(),\n).pipe(\n Layer.provideMerge(GitHub.layer()),\n Layer.provideMerge(peopleOver(policy.people)),\n Layer.provideMerge(\n Layer.mergeAll(\n Rest.layer(),\n",
|
|
43
52
|
{
|
|
44
53
|
"slot": "lfs",
|
|
45
|
-
"text": "
|
|
54
|
+
"text": " // Git LFS, its objects in the bucket beside the packs.\n Lfs.layer(),\n"
|
|
46
55
|
},
|
|
47
56
|
{
|
|
48
57
|
"slot": "uploads",
|
|
49
|
-
"text": "
|
|
58
|
+
"text": " // A push past 64 MiB may upload its pack, once the bucket signs parts.\n uploads,\n"
|
|
50
59
|
},
|
|
51
|
-
" auth: appAuth({ adminToken: env.ADMIN_TOKEN, admin, key: sessionKey }),\n authorize: policy.authorize,\n",
|
|
52
60
|
{
|
|
53
61
|
"slot": "queue",
|
|
54
|
-
"text": "
|
|
62
|
+
"text": " // Each repo's `main` has a merge queue, beside the merge button: its protection still takes\n // a direct merge, as GitHub's does on a branch whose rules don't ask for the queue.\n MergeQueue.layer({ target: 'refs/heads/main', keys: 'once', merge: queueMerge }),\n"
|
|
55
63
|
},
|
|
56
|
-
"
|
|
64
|
+
" // The device flow's sign-in for `gh` and `ref0-git login`, which the page decides in the\n // person's session, from the Better Auth below and Git's own `identify`.\n SignIn.layer({\n approvalPage: approvalPage({\n auth: () => auth(),\n sealKey: sessionKey,\n identify: (request): ReturnType<Identify> => run(Git.identify(request)),\n origin: env.APP_ORIGIN,\n }),\n }),\n ),\n ),\n Layer.provideMerge(Tokens.layer()),\n Layer.provideMerge(Merges.layer({ xdiff })),\n);\n\n/**\n * The whole host, one runtime a process: Git and its features over the records, the jobs and the\n * bucket, as the policy decides, with `hostRules` its push rules.\n */\nexport const runtime = ManagedRuntime.make(\n hostLayer(adapter, objects, features, {\n authorize: policy.authorize,\n auth: appAuth({ adminToken: env.ADMIN_TOKEN, admin, key: sessionKey }),\n authorizeGitHub: policy.authorizeGitHub,\n rules: hostRules.map((each) => each.rule),\n }),\n);\n\n/** An Effect on the runtime, answered as a `Result`, as host code reads Git. */\nexport const run = runOn(runtime);\n\n/**\n * Better Auth, made at a request that needs it, not the isolate's start: who signs up and in, in\n * `AUTH_DB`, each session with a Git token of its own. It's kept once a request's check settles.\n */\nexport const auth = readyAuth(() =>\n starterAuth({\n database: env.AUTH_DB,\n secret: env.SESSION_SECRET,\n origin: env.APP_ORIGIN,\n signUp: env.SIGN_UP !== 'closed',\n key: sessionKey,\n tokens: tokenCallsOn(run),\n // Cloudflare's own, which it sets on every request in place of any the caller sent.\n ipHeader: 'cf-connecting-ip',\n ownsRepos: async (login) => {\n const listed = await repoListOn(run)({\n actor: admin,\n prefix: `${login}/`,\n page: { limit: 1 },\n });\n\n return listed.kind !== 'success' || listed.value.items.length > 0;\n },\n }),\n);\n\n/** The records objects, one per scope, as `wrangler.jsonc`'s `class_name`s name them. */\nexport const Records = toRecordsObject(runtime);\n\n/** The job objects, one per scope and job, which a records object's alarm rings. */\nexport const Jobs = toJobObject(runtime);\n"
|
|
57
65
|
],
|
|
58
66
|
appGitNode: [
|
|
59
67
|
{
|
|
60
68
|
"slot": "head",
|
|
61
|
-
"text": "import {
|
|
69
|
+
"text": "import {\n Git,\n Lfs,\n Merges,\n MergeQueue,\n Objects,\n RepoRecords,\n Rest,\n SignIn,\n Tokens,\n} from '@ref0/git';\nimport type { MergeInput, MergePlan } from '@ref0/git';\nimport {\n Apps,\n Deployments,\n GitHub,\n Inbox,\n Releases,\n Search,\n Streams,\n Webhooks,\n} from '@ref0/github';\nimport * as Languages from '@ref0/github/languages';\nimport {\n layer,\n layerR2,\n layerR2Signed,\n toJobObject,\n toRecordsObject,\n} from '@ref0/infra/cloudflare';\nimport xdiff from '@ref0/xdiff-wasm/xdiff.wasm';\nimport { env as bindings } from 'cloudflare:workers';\nimport * as FetchHttpClient from 'effect/http/FetchHttpClient';\nimport * as Layer from 'effect/Layer';\nimport * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { hostLayer, peopleOver, repoListOn, runOn, tokenCallsOn } from './context/host.ts';\nimport type { Env } from './env.ts';\nimport { admin, approvalPage, hostPolicy, hostRules, type Identify } from './policy.ts';\nimport { privateReposOf } from './private-repos.ts';\nimport { readyAdapter, readyAuth, starterAuth } from './signin/auth.ts';\nimport { avatars } from './signin/avatars.ts';\nimport { appAuth } from './signin/host-session.ts';\nimport { orgsOver } from './signin/orgs.ts';\nimport { sealKey } from './signin/seal.ts';\n\n// SAFETY: `wrangler.jsonc` binds the objects, the bucket and D1 and sets `APP_ORIGIN`; the\n// secrets come from `wrangler secret put`, or `.dev.vars` locally.\nexport const env = bindings as Env;\n\nconst {\n R2_ACCOUNT_ID: accountId,\n R2_ACCESS_KEY_ID: accessKeyId,\n R2_SECRET_ACCESS_KEY: secretAccessKey,\n} = env;\n\n// With R2's S3 credentials, the bucket signs parts, and a push's pack past 64 MiB may upload to\n// it in parts, past Workers' 100 MB body.\nconst signed =\n accountId === undefined || accessKeyId === undefined || secretAccessKey === undefined\n ? undefined\n : layerR2Signed(env.PACKS, {\n accountId,\n bucket: env.PACKS_BUCKET,\n accessKeyId,\n secretAccessKey,\n });\n\nconst bucket = signed ?? layerR2(env.PACKS);\n\nconst uploads =\n signed === undefined\n ? Layer.empty\n : Layer.provide(Git.layerUploads({ above: 64 * 1024 * 1024 }), signed);\n\n"
|
|
62
70
|
},
|
|
63
71
|
{
|
|
64
72
|
"slot": "queueMerge",
|
|
65
73
|
"text": "/**\n * How the queue writes an entry's link onto `main`: a merge commit, by the person who added it, as\n * a pull request's merge button writes one, and titled as GitHub titles it for a pull request's\n * entry, keyed `pr-<number>`.\n */\nconst queueMerge = ({ entry }: MergeInput): MergePlan => {\n const [owner = ''] = entry.repo.split('/');\n const branch = entry.source.replace(/^refs\\/heads\\//, '');\n const pull = /^pr-([1-9]\\d*)$/.exec(entry.key)?.[1];\n const title =\n pull === undefined ? `Merge ${branch}` : `Merge pull request #${pull} from ${owner}/${branch}`;\n const login = entry.subject?.id ?? entry.actor.id;\n const hostname = new URL(env.APP_ORIGIN).hostname;\n\n return {\n method: 'merge',\n message: `${title}\\n`,\n author: { name: login, email: `${login}@users.noreply.${hostname}`, at: Date.now(), offset: 0 },\n };\n};\n\n"
|
|
66
74
|
},
|
|
67
|
-
"/** The key sessions and host sessions are sealed under, derived once an isolate from its secret. */\nexport const sessionKey = sealKey(env.SESSION_SECRET);\n\n/**\n * Who owns what, and the drop-in's people and orgs, over Better Auth's tables, which `auth` makes\n * at the first request that reads them.\n */\nexport const directory = orgsOver(async () => readyAdapter(await auth()));\n\n/** People's, orgs' and repos' pictures, in Better Auth's database, as `directory` reads it. */\nexport const pictures = avatars(async () => readyAdapter(await auth()));\n\nexport const policy = hostPolicy(directory, {\n origin: env.APP_ORIGIN,\n avatars: pictures,\n privateRepos: async (prefix, most, host) => privateReposOf(
|
|
75
|
+
"/** The key sessions and host sessions are sealed under, derived once an isolate from its secret. */\nexport const sessionKey = sealKey(env.SESSION_SECRET);\n\n/**\n * Who owns what, and the drop-in's people and orgs, over Better Auth's tables, which `auth` makes\n * at the first request that reads them.\n */\nexport const directory = orgsOver(async () => readyAdapter(await auth()));\n\n/** People's, orgs' and repos' pictures, in Better Auth's database, as `directory` reads it. */\nexport const pictures = avatars(async () => readyAdapter(await auth()));\n\nexport const policy = hostPolicy(directory, {\n origin: env.APP_ORIGIN,\n avatars: pictures,\n privateRepos: async (prefix, most, host) => privateReposOf(repoListOn(run))(prefix, most, host),\n repoName: async (internalId, signal) =>\n (await runtime.runPromise(RepoRecords.record(internalId), { signal }))?.name,\n});\n\n",
|
|
68
76
|
{
|
|
69
77
|
"slot": "adapter",
|
|
70
|
-
"text": "
|
|
78
|
+
"text": "/** The records and job objects, and the bucket. */\nconst adapter = Layer.merge(layer({ records: env.RECORDS, jobs: env.JOBS }), bucket);"
|
|
71
79
|
},
|
|
72
|
-
"\n",
|
|
80
|
+
"\n\n",
|
|
73
81
|
{
|
|
74
82
|
"slot": "objects",
|
|
75
|
-
"text": "
|
|
83
|
+
"text": "/** Git's objects, in packs in the bucket. */\nconst objects = Objects.layer();"
|
|
76
84
|
},
|
|
77
|
-
"\n",
|
|
85
|
+
"\n\n/**\n * Git's features and the drop-in's, over the host's directory: delete a line to turn its feature\n * off (Q832).\n */\nconst features = Layer.mergeAll(\n Inbox.layer(),\n Deployments.layer(),\n",
|
|
78
86
|
{
|
|
79
|
-
"slot": "
|
|
80
|
-
"text": "
|
|
87
|
+
"slot": "releases",
|
|
88
|
+
"text": " // A release's assets, in the bucket beside the packs.\n Releases.layer(),\n"
|
|
81
89
|
},
|
|
82
|
-
"
|
|
90
|
+
" // `org:` and `user:` search an owner's repos, its private ones by the policy's hook.\n Search.layer({ readableRepos: policy.readableRepos }),\n // Without it, a repo's `language` and `license` answer null.\n Languages.layer(),\n // A repo's and an org's hooks, each delivery a `fetch`, and GitHub Apps, whose hooks they send.\n // @effect-diagnostics-next-line unstableApiUsage:off\n Layer.provideMerge(Apps.layer(), Webhooks.layer().pipe(Layer.provide(FetchHttpClient.layer))),\n // GitHub's Event Streams over Git's event feeds, which a pull request's page follows.\n Streams.layer(),\n).pipe(\n Layer.provideMerge(GitHub.layer()),\n Layer.provideMerge(peopleOver(policy.people)),\n Layer.provideMerge(\n Layer.mergeAll(\n Rest.layer(),\n",
|
|
83
91
|
{
|
|
84
92
|
"slot": "lfs",
|
|
85
|
-
"text": "
|
|
93
|
+
"text": " // Git LFS, its objects in the bucket beside the packs.\n Lfs.layer(),\n"
|
|
86
94
|
},
|
|
87
95
|
{
|
|
88
96
|
"slot": "uploads",
|
|
89
|
-
"text": "
|
|
97
|
+
"text": " // A push past 64 MiB may upload its pack, once the bucket signs parts.\n uploads,\n"
|
|
90
98
|
},
|
|
91
|
-
" auth: appAuth({ adminToken: env.ADMIN_TOKEN, admin, key: sessionKey }),\n authorize: policy.authorize,\n",
|
|
92
99
|
{
|
|
93
100
|
"slot": "queue",
|
|
94
|
-
"text": "
|
|
101
|
+
"text": " // Each repo's `main` has a merge queue, beside the merge button: its protection still takes\n // a direct merge, as GitHub's does on a branch whose rules don't ask for the queue.\n MergeQueue.layer({ target: 'refs/heads/main', keys: 'once', merge: queueMerge }),\n"
|
|
95
102
|
},
|
|
96
|
-
"
|
|
103
|
+
" // The device flow's sign-in for `gh` and `ref0-git login`, which the page decides in the\n // person's session, from the Better Auth below and Git's own `identify`.\n SignIn.layer({\n approvalPage: approvalPage({\n auth: () => auth(),\n sealKey: sessionKey,\n identify: (request): ReturnType<Identify> => run(Git.identify(request)),\n origin: env.APP_ORIGIN,\n }),\n }),\n ),\n ),\n Layer.provideMerge(Tokens.layer()),\n",
|
|
104
|
+
{
|
|
105
|
+
"slot": "xdiff",
|
|
106
|
+
"text": " Layer.provideMerge(Merges.layer({ xdiff })),"
|
|
107
|
+
},
|
|
108
|
+
"\n);\n\n/**\n * The whole host, one runtime a process: Git and its features over the records, the jobs and the\n * bucket, as the policy decides, with `hostRules` its push rules.\n */\nexport const runtime = ManagedRuntime.make(\n hostLayer(adapter, objects, features, {\n authorize: policy.authorize,\n auth: appAuth({ adminToken: env.ADMIN_TOKEN, admin, key: sessionKey }),\n authorizeGitHub: policy.authorizeGitHub,\n rules: hostRules.map((each) => each.rule),\n }),\n);\n\n/** An Effect on the runtime, answered as a `Result`, as host code reads Git. */\nexport const run = runOn(runtime);\n\n/**\n * Better Auth, made at a request that needs it, not the isolate's start: who signs up and in, in\n * `AUTH_DB`, each session with a Git token of its own. It's kept once a request's check settles.\n */\nexport const auth = readyAuth(() =>\n starterAuth({\n",
|
|
97
109
|
{
|
|
98
110
|
"slot": "database",
|
|
99
111
|
"text": " database: env.AUTH_DB,"
|
|
100
112
|
},
|
|
101
|
-
"\n secret: env.SESSION_SECRET,\n origin: env.APP_ORIGIN,\n signUp: env.SIGN_UP !== 'closed',\n key: sessionKey,\n tokens,\n",
|
|
113
|
+
"\n secret: env.SESSION_SECRET,\n origin: env.APP_ORIGIN,\n signUp: env.SIGN_UP !== 'closed',\n key: sessionKey,\n tokens: tokenCallsOn(run),\n",
|
|
102
114
|
{
|
|
103
115
|
"slot": "ipHeader",
|
|
104
116
|
"text": " // Cloudflare's own, which it sets on every request in place of any the caller sent.\n ipHeader: 'cf-connecting-ip',\n"
|
|
105
117
|
},
|
|
106
|
-
" ownsRepos: async (login) => {\n const listed = await
|
|
118
|
+
" ownsRepos: async (login) => {\n const listed = await repoListOn(run)({\n actor: admin,\n prefix: `${login}/`,\n page: { limit: 1 },\n });\n\n return listed.kind !== 'success' || listed.value.items.length > 0;\n },\n }),\n);\n",
|
|
107
119
|
{
|
|
108
120
|
"slot": "classes",
|
|
109
|
-
"text": "\n/** The records objects, one per scope, as `wrangler.jsonc`'s `class_name`s name them. */\nexport const Records = toRecordsObject(
|
|
121
|
+
"text": "\n/** The records objects, one per scope, as `wrangler.jsonc`'s `class_name`s name them. */\nexport const Records = toRecordsObject(runtime);\n\n/** The job objects, one per scope and job, which a records object's alarm rings. */\nexport const Jobs = toJobObject(runtime);\n"
|
|
110
122
|
}
|
|
111
123
|
],
|
|
112
124
|
appEnv: [
|
|
@@ -163,7 +175,7 @@ var templates_default = {
|
|
|
163
175
|
"tsconfig.json": "// The app's pages, routes, clients and sign-in: DOM, as a browser runs them, and Start's server\n// functions beside them. The Worker's entry and Git are `tsconfig.worker.json`'s, typed by\n// workers-types with no DOM, and the tests `tsconfig.test.json`'s, in Node. Each file is in the\n// one whose globals it runs with, and the root's `tsconfig.json` references all three.\n{\n \"extends\": \"./tsconfig.base.json\",\n \"compilerOptions\": {\n \"composite\": true,\n \"jsx\": \"react-jsx\",\n \"lib\": [\"ES2023\", \"DOM\", \"DOM.Iterable\"],\n \"tsBuildInfoFile\": \"./node_modules/.cache/tsconfig.tsbuildinfo\",\n \"types\": [\"vite-plus/client\"]\n },\n \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"generated/**/*.ts\"],\n \"exclude\": [\n \"src/**/*.test.ts\",\n \"src/**/testing/**\",\n \"src/seed/**\",\n \"src/server.ts\",\n \"src/git.ts\",\n \"src/policy.ts\",\n \"src/env.ts\",\n \"src/signin/approval.ts\",\n \"src/camo/lookup.ts\",\n \"src/camo/node.ts\",\n \"src/markdown/words-plugin.ts\"\n ]\n}\n",
|
|
164
176
|
"tsconfig.worker.json": "// The Worker, typed as Cloudflare types one: workers-types' globals and no DOM, so `Request` and\n// `Response` are a Worker's. The pages are `tsconfig.app.json`'s, and the files both run, sealing\n// and names, are in each.\n{\n \"extends\": \"./tsconfig.base.json\",\n \"compilerOptions\": {\n \"composite\": true,\n \"lib\": [\"ES2023\"],\n \"tsBuildInfoFile\": \"./node_modules/.cache/tsconfig.worker.tsbuildinfo\",\n \"types\": [\"@cloudflare/workers-types\", \"vite-plus/client\"]\n },\n \"include\": [\n \"src/server.ts\",\n \"src/git.ts\",\n \"src/policy.ts\",\n \"src/env.ts\",\n \"src/context/**/*.ts\",\n \"src/names/**/*.ts\",\n \"src/seed/**/*.ts\",\n \"src/signin/approval.ts\",\n \"src/signin/seal.ts\"\n ],\n \"exclude\": [\"src/**/*.test.ts\", \"src/seed/testing/built-app.ts\"]\n}\n"
|
|
165
177
|
},
|
|
166
|
-
nodeServer: "import { Records } from '@ref0/infra';\nimport handler, { createServerEntry } from '@tanstack/react-start/server-entry';\n\nimport { nodeFetch } from './camo/node.ts';\nimport { imageProxy } from './camo/proxy.ts';\nimport type { AppContext } from './context/context.ts';\nimport { auth, directory, env,
|
|
178
|
+
nodeServer: "import { Git } from '@ref0/git';\nimport { Records } from '@ref0/infra';\nimport handler, { createServerEntry } from '@tanstack/react-start/server-entry';\nimport * as Effect from 'effect/Effect';\n\nimport { nodeFetch } from './camo/node.ts';\nimport { imageProxy } from './camo/proxy.ts';\nimport type { AppContext } from './context/context.ts';\nimport { auth, directory, env, pictures, policy, run, runtime, sessionKey } from './git.ts';\nimport { repoListOn, routeOn, tokenCallsOn } from './context/host.ts';\nimport { ingressOf } from './ingress.ts';\nimport { hostRules } from './policy.ts';\nimport { shownRules } from './settings/rules.ts';\nimport { deviceAttemptAnswer, deviceAttemptGate } from './signin/attempts.ts';\nimport { sessionCookieOf, sessionEnder, sessionFrom, sessionIdFrom } from './signin/auth.ts';\nimport { clientIpHeader, withClientIp } from './signin/client-ip.ts';\nimport { withoutHostSession } from './signin/host-session.ts';\n\n/**\n * The device page's attempts (#1962), counted in Git's records, by the address the platform sets\n * and the session Better Auth checks, before Git reads a code.\n */\nconst gate = deviceAttemptGate({\n answer: (who) => runtime.runPromise(deviceAttemptAnswer(who)),\n addressHeader: clientIpHeader,\n session: async (request) => sessionIdFrom(await auth())(request),\n});\n\n/** The front door, then Git's routes, the drop-in's among them, for outside and the app alike. */\nconst { owned, api } = ingressOf({ gate, git: routeOn(runtime) });\n\n/** Git's own calls, as host calls read them. */\nconst git = { repos: { list: repoListOn(run) }, tokens: tokenCallsOn(run) };\n\n/**\n * The image proxy (Q860): a text's remote images load through `/_camo/`, and the pages' CSP loads\n * no other. Without it, and with `IMAGE_PROXY=off`, they load from their own origin.\n */\nconst images = imageProxy({\n secret: env.SESSION_SECRET,\n appOrigin: env.APP_ORIGIN,\n setting: env.IMAGE_PROXY,\n fetch: nodeFetch,\n});\n\n/** The host's push rules, as a repo's settings show them. */\nconst rules = shownRules(hostRules);\n\n/** Whether the dev seed runs: `vite.config.ts` sets it true only under the dev server. */\ndeclare const __DEV_SEED__: boolean;\n\nlet seeding: Promise<void> | undefined;\n\n/**\n * In dev only, the seed, once an isolate, before its first answer: Pip and Mo sign up with\n * `DEMO_PASSWORD` and make the demo org `acme`, a host with no repos gets its repos, and a seed cut\n * off finishes. It signs them up in whatever database `AUTH_DB` points at under the dev server,\n * the local D1 unless the host sets `\"remote\": true` on it, so `.dev.vars.example`'s known\n * `DEMO_PASSWORD` is changed before the dev server points at a remote database.\n */\nconst seeded = () => {\n seeding ??= Promise.all([import('./signin/seed-people.ts'), import('./seed/seed.ts')])\n .then(async ([{ seedPeople }, { seed }]) => {\n if (env.DEMO_PASSWORD === undefined) throw new Error('Set DEMO_PASSWORD in .env');\n\n await seedPeople(await auth(), { origin: env.APP_ORIGIN, password: env.DEMO_PASSWORD });\n\n return seed({\n fetch: api,\n origin: env.APP_ORIGIN,\n adminToken: env.ADMIN_TOKEN,\n // Git's records, on its runtime, keep the seed's progress beside Git's own.\n store: {\n read: (scope, reads) => runtime.runPromise(Records.read(scope, reads)),\n commit: (scope, change) => runtime.runPromise(Records.commit(scope, change)),\n },\n });\n })\n .then(\n () => undefined,\n (cause: unknown) =>\n runtime.runPromise(\n Effect.logError('The seed stopped, and goes on at the next start', cause),\n ),\n );\n\n return seeding;\n};\n\n/** Q8's order: the drop-in, then Git, then the app. A URL one owns never falls through. */\nexport default createServerEntry({\n fetch: images.around(async (incoming) => {\n // A host session is the app's server's to set in this Worker, never a caller's to send\n // (Q520): every route, the APIs, the app and any upgrade, sees the request without one.\n // The caller's address, for the rate limit, set by this server in place of any the caller sent.\n const request = withoutHostSession(withClientIp(incoming, env.CLIENT_IP_HEADER));\n if (__DEV_SEED__) await seeded();\n\n const answered = await owned(request);\n if (answered !== undefined) return answered;\n\n const context: AppContext = {\n api,\n sealKey: await sessionKey,\n // Better Auth is made only for a request that reads it, and checked in that request (#480).\n auth: async (each) => (await auth()).handler(each),\n session: async (each) => sessionFrom(await auth(), sessionKey)(each),\n endSession: async (each) => sessionEnder(await auth())(each),\n sessionCookie: async () => sessionCookieOf(await auth())(),\n identify: (each) => run(Git.identify(each)),\n authorize: policy.authorize,\n authorizeGitHub: policy.authorizeGitHub,\n rules,\n avatars: pictures,\n accounts: directory,\n git,\n images,\n };\n\n return handler.fetch(request, { context });\n }),\n});\n",
|
|
167
179
|
nodeConfigs: { "tsconfig.json": "// The app's pages, routes, clients and sign-in: DOM, as a browser runs them, and Start's server\n// functions beside them. The server and Git are `tsconfig.server.json`'s, typed by\n// Node's types with no DOM, and the tests `tsconfig.test.json`'s, in Node. Each file is in the\n// one whose globals it runs with, and the root's `tsconfig.json` references all three.\n{\n \"extends\": \"./tsconfig.base.json\",\n \"compilerOptions\": {\n \"composite\": true,\n \"jsx\": \"react-jsx\",\n \"lib\": [\"ES2023\", \"DOM\", \"DOM.Iterable\"],\n \"tsBuildInfoFile\": \"./node_modules/.cache/tsconfig.tsbuildinfo\",\n \"types\": [\"vite-plus/client\"]\n },\n \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"generated/**/*.ts\"],\n \"exclude\": [\n \"src/**/*.test.ts\",\n \"src/**/testing/**\",\n \"src/seed/**\",\n \"src/server.ts\",\n \"src/git.ts\",\n \"src/policy.ts\",\n \"src/env.ts\",\n \"src/signin/approval.ts\",\n \"src/camo/lookup.ts\",\n \"src/camo/node.ts\",\n \"src/markdown/words-plugin.ts\"\n ]\n}\n" },
|
|
168
180
|
nodeServerConfig: "// The server, typed as Node runs it: Node's globals and no DOM. The pages are `tsconfig.json`'s,\n// and the files both run, sealing and names, are in each.\n{\n \"extends\": \"./tsconfig.base.json\",\n \"compilerOptions\": {\n \"composite\": true,\n \"lib\": [\"ES2023\"],\n \"tsBuildInfoFile\": \"./node_modules/.cache/tsconfig.server.tsbuildinfo\",\n \"types\": [\"node\", \"vite-plus/client\"]\n },\n \"include\": [\n \"src/server.ts\",\n \"src/camo/lookup.ts\",\n \"src/camo/node.ts\",\n \"server/**/*.ts\",\n \"scripts/**/*.ts\",\n \"src/git.ts\",\n \"src/policy.ts\",\n \"src/env.ts\",\n \"src/context/**/*.ts\",\n \"src/names/**/*.ts\",\n \"src/seed/**/*.ts\",\n \"src/signin/approval.ts\",\n \"src/signin/seal.ts\"\n ],\n \"exclude\": [\"src/**/*.test.ts\", \"src/seed/testing/built-app.ts\"]\n}\n",
|
|
169
181
|
nodeVite: "import tailwindcss from '@tailwindcss/vite';\nimport { tanstackStart } from '@tanstack/react-start/plugin/vite';\nimport viteReact from '@vitejs/plugin-react';\nimport { nitro } from 'nitro/vite';\nimport { defineConfig } from 'vite-plus';\n\nimport { wordsMemoryMax } from './src/markdown/words-plugin.ts';\n\n// Start's server build runs in Node through Nitro, which scans `server/` for the jobs' plugin.\nexport default defineConfig(({ command }) => ({\n // The dev seed is on only under the dev server, `vp dev`: every build drops it and its imports,\n // whatever its mode or `NODE_ENV`.\n define: { __DEV_SEED__: JSON.stringify(command === 'serve') },\n // The diff and highlight Workers are modules: `@pierre/diffs`' loads its highlighter lazily.\n worker: { format: 'es' },\n plugins: [\n // Words' WebAssembly under the drop-in's most on its memory (#1098): in Node, the module is\n // compiled at load from words' own bytes, edited.\n wordsMemoryMax(),\n tanstackStart({\n // NodeNext, as the repo types it, resolves only imports that name their extension.\n router: { generatedRouteTree: '../generated/routeTree.gen.ts', addExtensions: true },\n }),\n nitro({ serverDir: './server' }),\n viteReact(),\n tailwindcss(),\n ],\n}));\n",
|
|
@@ -227,10 +239,6 @@ var templates_default = {
|
|
|
227
239
|
"slot": "queue",
|
|
228
240
|
"text": " queue: mergeQueue({ target: 'refs/heads/main', keys: 'reusable', merge }),\n"
|
|
229
241
|
},
|
|
230
|
-
{
|
|
231
|
-
"slot": "events",
|
|
232
|
-
"text": ""
|
|
233
|
-
},
|
|
234
242
|
"});\n\n",
|
|
235
243
|
{
|
|
236
244
|
"slot": "github",
|
|
@@ -243,15 +251,19 @@ var templates_default = {
|
|
|
243
251
|
"/** The records objects, one per scope, as `wrangler.jsonc`'s `class_name`s name them. */\nexport const Records = toRecordsObject(git.runtime);\n\n/** The job objects, one per scope and job, which a records object's alarm rings. */\nexport const Jobs = toJobObject(git.runtime);\n"
|
|
244
252
|
],
|
|
245
253
|
workerEntry: [
|
|
254
|
+
{
|
|
255
|
+
"slot": "gate",
|
|
256
|
+
"text": "import { deviceAttemptAnswer, deviceAttemptGate } from './device-attempts/attempts.ts';\n"
|
|
257
|
+
},
|
|
246
258
|
"import type { Env } from './env.ts';\n",
|
|
247
259
|
{
|
|
248
260
|
"slot": "names",
|
|
249
|
-
"text": "import { rest } from './git.ts';"
|
|
261
|
+
"text": "import { git, rest } from './git.ts';"
|
|
250
262
|
},
|
|
251
263
|
"\n\nexport { Jobs, Records } from './git.ts';\n\n",
|
|
252
264
|
{
|
|
253
265
|
"slot": "exports",
|
|
254
|
-
"text": "/** Git's REST and protocol, then a JSON `404`. */\nexport default {
|
|
266
|
+
"text": "/** The device page's front door, which spends an attempt of the caller's Cloudflare address. */\nconst gate = deviceAttemptGate({\n answer: (who) => git.runtime.runPromise(deviceAttemptAnswer(who)),\n addressHeader: 'cf-connecting-ip',\n});\n\n/** The front door, then Git's REST and protocol, then a JSON `404`. */\nexport default {\n fetch: async (request) => (await gate(request)) ?? rest.fetch(request),\n} satisfies ExportedHandler<Env>;\n"
|
|
255
267
|
}
|
|
256
268
|
],
|
|
257
269
|
workerEnv: [
|
|
@@ -352,7 +364,7 @@ var templates_default = {
|
|
|
352
364
|
},
|
|
353
365
|
appYours: [
|
|
354
366
|
["`src/policy.ts`", "Who may read and write what: by default, anyone reads a public repo, a person writes under their own login, an org's members write under its login, and a repo is made only under a login someone holds"],
|
|
355
|
-
["`src/git.ts`", "Git's
|
|
367
|
+
["`src/git.ts`", "Git's features and the drop-in's, a line each: each repo's `main` has a merge queue beside the merge button, and the checks the queue waits on"],
|
|
356
368
|
["`wrangler.jsonc`", "The Worker's name, its two Durable Object classes, its R2 bucket, its D1, `APP_ORIGIN` and `SIGN_UP`"]
|
|
357
369
|
]
|
|
358
370
|
};
|
package/dist/init/vercel.mjs
CHANGED
|
@@ -65,7 +65,7 @@ const vercelGitModule = (choices, next) => {
|
|
|
65
65
|
records.infra,
|
|
66
66
|
bucket?.infra,
|
|
67
67
|
"import * as Vercel from '@ref0/infra/vercel';"
|
|
68
|
-
].filter(Predicate.isString).toSorted(), "import { xdiff } from '@ref0/xdiff-wasm/node';", "", needHelper("the project's Environment Variables"), "", "/** Who `ADMIN_TOKEN` signs in as: it makes repos and tokens, and never pushes. */", "const admin = { id: '_admin' };", "", "// Functions don't run between requests: a commit that saves a job sends a queue message, and the", "// cron in `vercel.json` sweeps for any message that was lost.", `const wake = Vercel.layerQueues({ topic: '${topic}' });`, "", records.code, "", lines(bucket === void 0 ? "const bucket = Vercel.layerBlob();" : bucket.code, ""), queue && lines("/** How the queue writes an entry onto `main`: a merge commit, by whoever added it. */", "const merge = ({ entry }: MergeInput): MergePlan => ({", " method: 'merge',", " message: `Merge ${entry.source.replace(/^refs\\/heads\\//, '')}\\n`,", " author: {", " name: entry.actor.id,", " email: `${entry.actor.id}@users.noreply.git`,", " at: Date.now(),", " offset: 0,", " },", "});", ""), "export const git = createGitServer({", " adapter: [store, bucket],", " // The functions' `maxDuration`, from `vercel.json`: a clone that would outrun it ends first, with", " // Git's own message.", ` maxDuration: '${maxDuration} seconds',`, " objects: packs(),", " xdiff: await xdiff(),", " tokens: tokens(),", lfsLines, ` // Vercel refuses a body over 4.5 MB, so a larger push uploads its pack to ${blob ? "Blob" : "the bucket"}.`, " pushes: { upload: { above: 4 * 1024 * 1024 } },", choices.basePath !== "/" && ` // Git's URLs, Smart HTTP, sign-in and REST, under this path.\n basePath: '${choices.basePath.replace(/\/$/, "")}',`, " auth: bearer({ token: need('ADMIN_TOKEN'), actor: admin }),", " authorize: ({ actor, operation }) => {", " if (actor.anonymous === true) return reject({ message: 'Sign in first' });", "", " if (actor.id === admin.id && operation.kind === 'push') {", " return reject({", " message: \"The admin token can't push\",", " hint: 'Make a write token for yourself: npx ref0-git tokens create --help',", " });", " }", "", " return accept();", " },", queue && queueLine(github),
|
|
68
|
+
].filter(Predicate.isString).toSorted(), "import { xdiff } from '@ref0/xdiff-wasm/node';", "", needHelper("the project's Environment Variables"), "", "/** Who `ADMIN_TOKEN` signs in as: it makes repos and tokens, and never pushes. */", "const admin = { id: '_admin' };", "", "// Functions don't run between requests: a commit that saves a job sends a queue message, and the", "// cron in `vercel.json` sweeps for any message that was lost.", `const wake = Vercel.layerQueues({ topic: '${topic}' });`, "", records.code, "", lines(bucket === void 0 ? "const bucket = Vercel.layerBlob();" : bucket.code, ""), queue && lines("/** How the queue writes an entry onto `main`: a merge commit, by whoever added it. */", "const merge = ({ entry }: MergeInput): MergePlan => ({", " method: 'merge',", " message: `Merge ${entry.source.replace(/^refs\\/heads\\//, '')}\\n`,", " author: {", " name: entry.actor.id,", " email: `${entry.actor.id}@users.noreply.git`,", " at: Date.now(),", " offset: 0,", " },", "});", ""), "export const git = createGitServer({", " adapter: [store, bucket],", " // The functions' `maxDuration`, from `vercel.json`: a clone that would outrun it ends first, with", " // Git's own message.", ` maxDuration: '${maxDuration} seconds',`, " objects: packs(),", " xdiff: await xdiff(),", " tokens: tokens(),", lfsLines, ` // Vercel refuses a body over 4.5 MB, so a larger push uploads its pack to ${blob ? "Blob" : "the bucket"}.`, " pushes: { upload: { above: 4 * 1024 * 1024 } },", choices.basePath !== "/" && ` // Git's URLs, Smart HTTP, sign-in and REST, under this path.\n basePath: '${choices.basePath.replace(/\/$/, "")}',`, " auth: bearer({ token: need('ADMIN_TOKEN'), actor: admin }),", " authorize: ({ actor, operation }) => {", " if (actor.anonymous === true) return reject({ message: 'Sign in first' });", "", " if (actor.id === admin.id && operation.kind === 'push') {", " return reject({", " message: \"The admin token can't push\",", " hint: 'Make a write token for yourself: npx ref0-git tokens create --help',", " });", " }", "", " return accept();", " },", queue && queueLine(github), "});", "", `/** The job queue's route: \`${jobsRoute}\` runs what its messages and the cron's calls name. */`, "export const jobs = Vercel.toQueueHandler(git.runtime);", "", github && "/**\n * GitHub's REST, GraphQL, webhooks and Event Streams, so `gh` and Octokit work, with the owner\n * index, so repo and user search answer, and `org:` and `user:` search an owner's public repos.\n */\nexport const github = createGitHubHandler(git, { ownerIndex: {} });\n", choices.serve !== "git" && "/** Git's REST, whose `route` and `fetch` serve Git's protocol and sign-in too. */\nexport const rest = createRestHandler(git);\n", next !== void 0 && serveExport(choices));
|
|
69
69
|
};
|
|
70
70
|
/** What `api/git.ts` answers each method with, for what it serves. */
|
|
71
71
|
const handlers = {
|
package/dist/init/versions.mjs
CHANGED
|
@@ -28,5 +28,5 @@ const packedPath = (name) => {
|
|
|
28
28
|
* the release, or the tarball `--from-checkout` names for that package. One it wrote moves to this
|
|
29
29
|
* run's spec; any other is the person's, a tarball of their own in `vendor/` too, and stays.
|
|
30
30
|
*/
|
|
31
|
-
const initWrote = (name, spec) => spec === "0.
|
|
31
|
+
const initWrote = (name, spec) => spec === "0.7.0" || spec !== void 0 && packedPath(name).test(spec);
|
|
32
32
|
export { catalog, frameworkPackages, initWrote, nodeAppPackages, nodePackages, peerPackages, release, specOf, storePackages, vercelPackages };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ref0-git",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ref0-git, the CLI for a Git host built on @ref0/git, and git-remote-ref0, its remote helper",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
"./package.json": "./package.json"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@effect/platform-node-shared": "4.1.
|
|
27
|
-
"@ref0/git": "0.
|
|
28
|
-
"@ref0/infra": "0.
|
|
26
|
+
"@effect/platform-node-shared": "4.1.7",
|
|
27
|
+
"@ref0/git": "0.7.0",
|
|
28
|
+
"@ref0/infra": "0.7.0",
|
|
29
29
|
"diff": "9.0.0",
|
|
30
|
-
"effect": "^4.1.
|
|
30
|
+
"effect": "^4.1.7"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@cloudflare/workers-types": "5.
|
|
34
|
-
"@effect/vitest": "4.1.
|
|
33
|
+
"@cloudflare/workers-types": "5.20261123.1",
|
|
34
|
+
"@effect/vitest": "4.1.7",
|
|
35
35
|
"@libsql/client": "0.18.0",
|
|
36
36
|
"@libsql/kysely-libsql": "0.4.1",
|
|
37
|
-
"@ref0/github": "0.
|
|
38
|
-
"@ref0/xdiff-wasm": "0.
|
|
39
|
-
"@tanstack/react-start": "1.169.
|
|
40
|
-
"@types/node": "24.19.
|
|
37
|
+
"@ref0/github": "0.7.0",
|
|
38
|
+
"@ref0/xdiff-wasm": "0.7.0",
|
|
39
|
+
"@tanstack/react-start": "1.169.7",
|
|
40
|
+
"@types/node": "24.19.4",
|
|
41
41
|
"@types/pg": "8.23.1",
|
|
42
42
|
"@types/semver": "7.8.0",
|
|
43
43
|
"@vercel/blob": "2.9.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"path-to-regexp": "6.3.0",
|
|
50
50
|
"pg": "8.23.1",
|
|
51
51
|
"semver": "7.8.6",
|
|
52
|
-
"vite-plus": "1.
|
|
53
|
-
"vitest": "5.1.
|
|
52
|
+
"vite-plus": "1.8.0",
|
|
53
|
+
"vitest": "5.1.1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {}
|
|
56
56
|
}
|