gitx.do 0.0.2 → 0.1.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/README.md +319 -92
- package/dist/cli/commands/add.d.ts +174 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +131 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/blame.d.ts +259 -0
- package/dist/cli/commands/blame.d.ts.map +1 -0
- package/dist/cli/commands/blame.js +609 -0
- package/dist/cli/commands/blame.js.map +1 -0
- package/dist/cli/commands/branch.d.ts +249 -0
- package/dist/cli/commands/branch.d.ts.map +1 -0
- package/dist/cli/commands/branch.js +693 -0
- package/dist/cli/commands/branch.js.map +1 -0
- package/dist/cli/commands/commit.d.ts +182 -0
- package/dist/cli/commands/commit.d.ts.map +1 -0
- package/dist/cli/commands/commit.js +437 -0
- package/dist/cli/commands/commit.js.map +1 -0
- package/dist/cli/commands/diff.d.ts +464 -0
- package/dist/cli/commands/diff.d.ts.map +1 -0
- package/dist/cli/commands/diff.js +958 -0
- package/dist/cli/commands/diff.js.map +1 -0
- package/dist/cli/commands/log.d.ts +239 -0
- package/dist/cli/commands/log.d.ts.map +1 -0
- package/dist/cli/commands/log.js +535 -0
- package/dist/cli/commands/log.js.map +1 -0
- package/dist/cli/commands/merge.d.ts +106 -0
- package/dist/cli/commands/merge.d.ts.map +1 -0
- package/dist/cli/commands/merge.js +55 -0
- package/dist/cli/commands/merge.js.map +1 -0
- package/dist/cli/commands/review.d.ts +457 -0
- package/dist/cli/commands/review.d.ts.map +1 -0
- package/dist/cli/commands/review.js +533 -0
- package/dist/cli/commands/review.js.map +1 -0
- package/dist/cli/commands/status.d.ts +269 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +493 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/web.d.ts +199 -0
- package/dist/cli/commands/web.d.ts.map +1 -0
- package/dist/cli/commands/web.js +696 -0
- package/dist/cli/commands/web.js.map +1 -0
- package/dist/cli/fs-adapter.d.ts +656 -0
- package/dist/cli/fs-adapter.d.ts.map +1 -0
- package/dist/cli/fs-adapter.js +1179 -0
- package/dist/cli/fs-adapter.js.map +1 -0
- package/dist/cli/fsx-cli-adapter.d.ts +359 -0
- package/dist/cli/fsx-cli-adapter.d.ts.map +1 -0
- package/dist/cli/fsx-cli-adapter.js +619 -0
- package/dist/cli/fsx-cli-adapter.js.map +1 -0
- package/dist/cli/index.d.ts +387 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +523 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/ui/components/DiffView.d.ts +7 -0
- package/dist/cli/ui/components/DiffView.d.ts.map +1 -0
- package/dist/cli/ui/components/DiffView.js +11 -0
- package/dist/cli/ui/components/DiffView.js.map +1 -0
- package/dist/cli/ui/components/ErrorDisplay.d.ts +6 -0
- package/dist/cli/ui/components/ErrorDisplay.d.ts.map +1 -0
- package/dist/cli/ui/components/ErrorDisplay.js +11 -0
- package/dist/cli/ui/components/ErrorDisplay.js.map +1 -0
- package/dist/cli/ui/components/FuzzySearch.d.ts +9 -0
- package/dist/cli/ui/components/FuzzySearch.d.ts.map +1 -0
- package/dist/cli/ui/components/FuzzySearch.js +12 -0
- package/dist/cli/ui/components/FuzzySearch.js.map +1 -0
- package/dist/cli/ui/components/LoadingSpinner.d.ts +6 -0
- package/dist/cli/ui/components/LoadingSpinner.d.ts.map +1 -0
- package/dist/cli/ui/components/LoadingSpinner.js +10 -0
- package/dist/cli/ui/components/LoadingSpinner.js.map +1 -0
- package/dist/cli/ui/components/NavigationList.d.ts +9 -0
- package/dist/cli/ui/components/NavigationList.d.ts.map +1 -0
- package/dist/cli/ui/components/NavigationList.js +11 -0
- package/dist/cli/ui/components/NavigationList.js.map +1 -0
- package/dist/cli/ui/components/ScrollableContent.d.ts +8 -0
- package/dist/cli/ui/components/ScrollableContent.d.ts.map +1 -0
- package/dist/cli/ui/components/ScrollableContent.js +11 -0
- package/dist/cli/ui/components/ScrollableContent.js.map +1 -0
- package/dist/cli/ui/components/index.d.ts +7 -0
- package/dist/cli/ui/components/index.d.ts.map +1 -0
- package/dist/cli/ui/components/index.js +9 -0
- package/dist/cli/ui/components/index.js.map +1 -0
- package/dist/cli/ui/terminal-ui.d.ts +52 -0
- package/dist/cli/ui/terminal-ui.d.ts.map +1 -0
- package/dist/cli/ui/terminal-ui.js +121 -0
- package/dist/cli/ui/terminal-ui.js.map +1 -0
- package/dist/do/BashModule.d.ts +871 -0
- package/dist/do/BashModule.d.ts.map +1 -0
- package/dist/do/BashModule.js +1143 -0
- package/dist/do/BashModule.js.map +1 -0
- package/dist/do/FsModule.d.ts +601 -0
- package/dist/do/FsModule.d.ts.map +1 -0
- package/dist/do/FsModule.js +1120 -0
- package/dist/do/FsModule.js.map +1 -0
- package/dist/do/GitModule.d.ts +635 -0
- package/dist/do/GitModule.d.ts.map +1 -0
- package/dist/do/GitModule.js +781 -0
- package/dist/do/GitModule.js.map +1 -0
- package/dist/do/GitRepoDO.d.ts +281 -0
- package/dist/do/GitRepoDO.d.ts.map +1 -0
- package/dist/do/GitRepoDO.js +479 -0
- package/dist/do/GitRepoDO.js.map +1 -0
- package/dist/do/bash-ast.d.ts +246 -0
- package/dist/do/bash-ast.d.ts.map +1 -0
- package/dist/do/bash-ast.js +888 -0
- package/dist/do/bash-ast.js.map +1 -0
- package/dist/do/container-executor.d.ts +491 -0
- package/dist/do/container-executor.d.ts.map +1 -0
- package/dist/do/container-executor.js +730 -0
- package/dist/do/container-executor.js.map +1 -0
- package/dist/do/index.d.ts +53 -0
- package/dist/do/index.d.ts.map +1 -0
- package/dist/do/index.js +91 -0
- package/dist/do/index.js.map +1 -0
- package/dist/do/tiered-storage.d.ts +403 -0
- package/dist/do/tiered-storage.d.ts.map +1 -0
- package/dist/do/tiered-storage.js +689 -0
- package/dist/do/tiered-storage.js.map +1 -0
- package/dist/do/withBash.d.ts +231 -0
- package/dist/do/withBash.d.ts.map +1 -0
- package/dist/do/withBash.js +244 -0
- package/dist/do/withBash.js.map +1 -0
- package/dist/do/withFs.d.ts +237 -0
- package/dist/do/withFs.d.ts.map +1 -0
- package/dist/do/withFs.js +387 -0
- package/dist/do/withFs.js.map +1 -0
- package/dist/do/withGit.d.ts +180 -0
- package/dist/do/withGit.d.ts.map +1 -0
- package/dist/do/withGit.js +271 -0
- package/dist/do/withGit.js.map +1 -0
- package/dist/durable-object/object-store.d.ts +545 -25
- package/dist/durable-object/object-store.d.ts.map +1 -1
- package/dist/durable-object/object-store.js +833 -59
- package/dist/durable-object/object-store.js.map +1 -1
- package/dist/durable-object/schema.d.ts +200 -1
- package/dist/durable-object/schema.d.ts.map +1 -1
- package/dist/durable-object/schema.js +247 -2
- package/dist/durable-object/schema.js.map +1 -1
- package/dist/durable-object/wal.d.ts +336 -31
- package/dist/durable-object/wal.d.ts.map +1 -1
- package/dist/durable-object/wal.js +272 -27
- package/dist/durable-object/wal.js.map +1 -1
- package/dist/index.d.ts +408 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +413 -7
- package/dist/index.js.map +1 -1
- package/dist/mcp/adapter.d.ts +579 -38
- package/dist/mcp/adapter.d.ts.map +1 -1
- package/dist/mcp/adapter.js +426 -33
- package/dist/mcp/adapter.js.map +1 -1
- package/dist/mcp/sandbox/miniflare-evaluator.d.ts +22 -0
- package/dist/mcp/sandbox/miniflare-evaluator.d.ts.map +1 -0
- package/dist/mcp/sandbox/miniflare-evaluator.js +140 -0
- package/dist/mcp/sandbox/miniflare-evaluator.js.map +1 -0
- package/dist/mcp/sandbox/object-store-proxy.d.ts +32 -0
- package/dist/mcp/sandbox/object-store-proxy.d.ts.map +1 -0
- package/dist/mcp/sandbox/object-store-proxy.js +30 -0
- package/dist/mcp/sandbox/object-store-proxy.js.map +1 -0
- package/dist/mcp/sandbox/template.d.ts +17 -0
- package/dist/mcp/sandbox/template.d.ts.map +1 -0
- package/dist/mcp/sandbox/template.js +71 -0
- package/dist/mcp/sandbox/template.js.map +1 -0
- package/dist/mcp/sandbox.d.ts +532 -29
- package/dist/mcp/sandbox.d.ts.map +1 -1
- package/dist/mcp/sandbox.js +405 -26
- package/dist/mcp/sandbox.js.map +1 -1
- package/dist/mcp/sdk-adapter.d.ts +478 -56
- package/dist/mcp/sdk-adapter.d.ts.map +1 -1
- package/dist/mcp/sdk-adapter.js +346 -44
- package/dist/mcp/sdk-adapter.js.map +1 -1
- package/dist/mcp/tools/do.d.ts +32 -0
- package/dist/mcp/tools/do.d.ts.map +1 -0
- package/dist/mcp/tools/do.js +115 -0
- package/dist/mcp/tools/do.js.map +1 -0
- package/dist/mcp/tools.d.ts +445 -30
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +363 -33
- package/dist/mcp/tools.js.map +1 -1
- package/dist/ops/blame.d.ts +424 -21
- package/dist/ops/blame.d.ts.map +1 -1
- package/dist/ops/blame.js +303 -20
- package/dist/ops/blame.js.map +1 -1
- package/dist/ops/branch.d.ts +583 -32
- package/dist/ops/branch.d.ts.map +1 -1
- package/dist/ops/branch.js +365 -23
- package/dist/ops/branch.js.map +1 -1
- package/dist/ops/commit-traversal.d.ts +164 -24
- package/dist/ops/commit-traversal.d.ts.map +1 -1
- package/dist/ops/commit-traversal.js +68 -2
- package/dist/ops/commit-traversal.js.map +1 -1
- package/dist/ops/commit.d.ts +387 -53
- package/dist/ops/commit.d.ts.map +1 -1
- package/dist/ops/commit.js +249 -29
- package/dist/ops/commit.js.map +1 -1
- package/dist/ops/merge-base.d.ts +195 -21
- package/dist/ops/merge-base.d.ts.map +1 -1
- package/dist/ops/merge-base.js +122 -12
- package/dist/ops/merge-base.js.map +1 -1
- package/dist/ops/merge.d.ts +600 -130
- package/dist/ops/merge.d.ts.map +1 -1
- package/dist/ops/merge.js +408 -60
- package/dist/ops/merge.js.map +1 -1
- package/dist/ops/tag.d.ts +67 -2
- package/dist/ops/tag.d.ts.map +1 -1
- package/dist/ops/tag.js +42 -1
- package/dist/ops/tag.js.map +1 -1
- package/dist/ops/tree-builder.d.ts +102 -6
- package/dist/ops/tree-builder.d.ts.map +1 -1
- package/dist/ops/tree-builder.js +30 -5
- package/dist/ops/tree-builder.js.map +1 -1
- package/dist/ops/tree-diff.d.ts +50 -2
- package/dist/ops/tree-diff.d.ts.map +1 -1
- package/dist/ops/tree-diff.js +50 -2
- package/dist/ops/tree-diff.js.map +1 -1
- package/dist/pack/delta.d.ts +219 -39
- package/dist/pack/delta.d.ts.map +1 -1
- package/dist/pack/delta.js +468 -75
- package/dist/pack/delta.js.map +1 -1
- package/dist/pack/format.d.ts +390 -28
- package/dist/pack/format.d.ts.map +1 -1
- package/dist/pack/format.js +344 -33
- package/dist/pack/format.js.map +1 -1
- package/dist/pack/full-generation.d.ts +313 -28
- package/dist/pack/full-generation.d.ts.map +1 -1
- package/dist/pack/full-generation.js +238 -19
- package/dist/pack/full-generation.js.map +1 -1
- package/dist/pack/generation.d.ts +346 -23
- package/dist/pack/generation.d.ts.map +1 -1
- package/dist/pack/generation.js +269 -21
- package/dist/pack/generation.js.map +1 -1
- package/dist/pack/index.d.ts +407 -86
- package/dist/pack/index.d.ts.map +1 -1
- package/dist/pack/index.js +351 -70
- package/dist/pack/index.js.map +1 -1
- package/dist/refs/branch.d.ts +534 -90
- package/dist/refs/branch.d.ts.map +1 -1
- package/dist/refs/branch.js +814 -87
- package/dist/refs/branch.js.map +1 -1
- package/dist/refs/storage.d.ts +684 -59
- package/dist/refs/storage.d.ts.map +1 -1
- package/dist/refs/storage.js +671 -69
- package/dist/refs/storage.js.map +1 -1
- package/dist/refs/tag.d.ts +721 -91
- package/dist/refs/tag.d.ts.map +1 -1
- package/dist/refs/tag.js +908 -100
- package/dist/refs/tag.js.map +1 -1
- package/dist/storage/backend.d.ts +425 -0
- package/dist/storage/backend.d.ts.map +1 -0
- package/dist/storage/backend.js +41 -0
- package/dist/storage/backend.js.map +1 -0
- package/dist/storage/fsx-adapter.d.ts +204 -0
- package/dist/storage/fsx-adapter.d.ts.map +1 -0
- package/dist/storage/fsx-adapter.js +470 -0
- package/dist/storage/fsx-adapter.js.map +1 -0
- package/dist/storage/lru-cache.d.ts +556 -53
- package/dist/storage/lru-cache.d.ts.map +1 -1
- package/dist/storage/lru-cache.js +439 -36
- package/dist/storage/lru-cache.js.map +1 -1
- package/dist/storage/object-index.d.ts +483 -38
- package/dist/storage/object-index.d.ts.map +1 -1
- package/dist/storage/object-index.js +388 -22
- package/dist/storage/object-index.js.map +1 -1
- package/dist/storage/r2-pack.d.ts +957 -94
- package/dist/storage/r2-pack.d.ts.map +1 -1
- package/dist/storage/r2-pack.js +756 -48
- package/dist/storage/r2-pack.js.map +1 -1
- package/dist/tiered/cdc-pipeline.d.ts +1610 -38
- package/dist/tiered/cdc-pipeline.d.ts.map +1 -1
- package/dist/tiered/cdc-pipeline.js +1131 -22
- package/dist/tiered/cdc-pipeline.js.map +1 -1
- package/dist/tiered/migration.d.ts +903 -41
- package/dist/tiered/migration.d.ts.map +1 -1
- package/dist/tiered/migration.js +646 -24
- package/dist/tiered/migration.js.map +1 -1
- package/dist/tiered/parquet-writer.d.ts +944 -47
- package/dist/tiered/parquet-writer.d.ts.map +1 -1
- package/dist/tiered/parquet-writer.js +667 -39
- package/dist/tiered/parquet-writer.js.map +1 -1
- package/dist/tiered/read-path.d.ts +728 -34
- package/dist/tiered/read-path.d.ts.map +1 -1
- package/dist/tiered/read-path.js +310 -27
- package/dist/tiered/read-path.js.map +1 -1
- package/dist/types/capability.d.ts +1385 -0
- package/dist/types/capability.d.ts.map +1 -0
- package/dist/types/capability.js +36 -0
- package/dist/types/capability.js.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/objects.d.ts +639 -0
- package/dist/types/objects.d.ts.map +1 -1
- package/dist/types/objects.js +554 -8
- package/dist/types/objects.js.map +1 -1
- package/dist/types/storage.d.ts +521 -35
- package/dist/types/storage.d.ts.map +1 -1
- package/dist/types/storage.js +187 -4
- package/dist/types/storage.js.map +1 -1
- package/dist/types/worker-loader.d.ts +60 -0
- package/dist/types/worker-loader.d.ts.map +1 -0
- package/dist/types/worker-loader.js +62 -0
- package/dist/types/worker-loader.js.map +1 -0
- package/dist/utils/hash.d.ts +186 -20
- package/dist/utils/hash.d.ts.map +1 -1
- package/dist/utils/hash.js +249 -41
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/sha1.d.ts +273 -9
- package/dist/utils/sha1.d.ts.map +1 -1
- package/dist/utils/sha1.js +466 -11
- package/dist/utils/sha1.js.map +1 -1
- package/dist/wire/capabilities.d.ts +896 -88
- package/dist/wire/capabilities.d.ts.map +1 -1
- package/dist/wire/capabilities.js +566 -62
- package/dist/wire/capabilities.js.map +1 -1
- package/dist/wire/path-security.d.ts +157 -0
- package/dist/wire/path-security.d.ts.map +1 -0
- package/dist/wire/path-security.js +307 -0
- package/dist/wire/path-security.js.map +1 -0
- package/dist/wire/pkt-line.d.ts +293 -15
- package/dist/wire/pkt-line.d.ts.map +1 -1
- package/dist/wire/pkt-line.js +251 -15
- package/dist/wire/pkt-line.js.map +1 -1
- package/dist/wire/receive-pack.d.ts +821 -64
- package/dist/wire/receive-pack.d.ts.map +1 -1
- package/dist/wire/receive-pack.js +571 -42
- package/dist/wire/receive-pack.js.map +1 -1
- package/dist/wire/smart-http.d.ts +575 -97
- package/dist/wire/smart-http.d.ts.map +1 -1
- package/dist/wire/smart-http.js +337 -46
- package/dist/wire/smart-http.js.map +1 -1
- package/dist/wire/upload-pack.d.ts +492 -98
- package/dist/wire/upload-pack.d.ts.map +1 -1
- package/dist/wire/upload-pack.js +347 -59
- package/dist/wire/upload-pack.js.map +1 -1
- package/package.json +10 -1
package/README.md
CHANGED
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
# gitx.do
|
|
2
2
|
|
|
3
|
-
Git
|
|
3
|
+
**Git for Cloudflare Workers.** Full protocol. Edge-native. 5,600+ tests.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/gitx.do)
|
|
6
|
+
[](https://github.com/dot-do/gitx)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
## Why gitx?
|
|
11
|
+
|
|
12
|
+
**AI agents need version control.** They generate code, iterate on files, need to track changes and roll back mistakes.
|
|
13
|
+
|
|
14
|
+
**gitx is Git reimplemented for Cloudflare Workers.** Full protocol support - pack files, delta compression, smart HTTP. Not a wrapper around git CLI. A complete implementation.
|
|
15
|
+
|
|
16
|
+
**Scales to millions of agents.** Each agent gets its own git repository on Cloudflare's edge network. No shared servers. No rate limits. Just fast, isolated version control at global scale.
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import git from 'gitx.do'
|
|
20
|
+
|
|
21
|
+
// Initialize a repo
|
|
22
|
+
await git.init('/my-project')
|
|
23
|
+
|
|
24
|
+
// Stage and commit
|
|
25
|
+
await git.add('/my-project', '.')
|
|
26
|
+
await git.commit('/my-project', 'Initial commit')
|
|
6
27
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Cold: Analytics/Parquet (cold storage)
|
|
28
|
+
// Branch and merge
|
|
29
|
+
await git.branch('/my-project', 'feature')
|
|
30
|
+
await git.checkout('/my-project', 'feature')
|
|
31
|
+
// ... make changes ...
|
|
32
|
+
await git.merge('/my-project', 'feature')
|
|
33
|
+
```
|
|
14
34
|
|
|
15
35
|
## Installation
|
|
16
36
|
|
|
@@ -20,137 +40,344 @@ npm install gitx.do
|
|
|
20
40
|
|
|
21
41
|
## Quick Start
|
|
22
42
|
|
|
23
|
-
|
|
43
|
+
```typescript
|
|
44
|
+
import git from 'gitx.do'
|
|
45
|
+
|
|
46
|
+
// Create a repository
|
|
47
|
+
await git.init('/repo')
|
|
48
|
+
|
|
49
|
+
// Write files and commit
|
|
50
|
+
await git.add('/repo', 'README.md')
|
|
51
|
+
await git.commit('/repo', 'Add readme')
|
|
52
|
+
|
|
53
|
+
// View history
|
|
54
|
+
const log = await git.log('/repo')
|
|
55
|
+
console.log(log.commits)
|
|
56
|
+
|
|
57
|
+
// Create branches
|
|
58
|
+
await git.branch('/repo', 'feature/auth')
|
|
59
|
+
await git.checkout('/repo', 'feature/auth')
|
|
60
|
+
|
|
61
|
+
// View changes
|
|
62
|
+
const diff = await git.diff('/repo', 'main', 'feature/auth')
|
|
63
|
+
const status = await git.status('/repo')
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
### Full Git Protocol
|
|
69
|
+
|
|
70
|
+
Complete implementation of Git internals:
|
|
24
71
|
|
|
25
72
|
```typescript
|
|
26
|
-
|
|
73
|
+
// Object model
|
|
74
|
+
await git.hashObject('/repo', content, 'blob')
|
|
75
|
+
await git.catFile('/repo', sha, 'blob')
|
|
27
76
|
|
|
28
|
-
//
|
|
29
|
-
const
|
|
30
|
-
|
|
77
|
+
// Trees and commits
|
|
78
|
+
const tree = await git.writeTree('/repo')
|
|
79
|
+
const commit = await git.commitTree('/repo', tree, 'message', [parent])
|
|
31
80
|
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
81
|
+
// Pack files
|
|
82
|
+
await git.pack('/repo', objects)
|
|
83
|
+
await git.unpack('/repo', packData)
|
|
84
|
+
|
|
85
|
+
// References
|
|
86
|
+
await git.updateRef('/repo', 'refs/heads/main', sha)
|
|
87
|
+
const ref = await git.resolveRef('/repo', 'HEAD')
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Tiered Storage
|
|
37
91
|
|
|
38
|
-
|
|
39
|
-
|
|
92
|
+
Hot objects in SQLite. Pack files in R2. You don't think about it.
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
┌────────────────────────────────────────────────────────┐
|
|
96
|
+
│ Hot Tier (SQLite) │ Warm Tier (R2) │
|
|
97
|
+
├───────────────────────────────┼────────────────────────┤
|
|
98
|
+
│ • Recent commits │ • Pack files │
|
|
99
|
+
│ • Active branches │ • Full history │
|
|
100
|
+
│ • Loose objects │ • Large blobs │
|
|
101
|
+
│ • <10ms access │ • <100ms access │
|
|
102
|
+
└───────────────────────────────┴────────────────────────┘
|
|
40
103
|
```
|
|
41
104
|
|
|
42
|
-
###
|
|
105
|
+
### Pack File Engine
|
|
106
|
+
|
|
107
|
+
Full packfile v2/v3 support:
|
|
43
108
|
|
|
44
109
|
```typescript
|
|
45
|
-
|
|
110
|
+
// Delta compression
|
|
111
|
+
await git.repack('/repo', { deltify: true })
|
|
46
112
|
|
|
47
|
-
//
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
113
|
+
// Verify integrity
|
|
114
|
+
await git.fsck('/repo')
|
|
115
|
+
|
|
116
|
+
// Garbage collection
|
|
117
|
+
await git.gc('/repo')
|
|
118
|
+
```
|
|
52
119
|
|
|
53
|
-
|
|
54
|
-
|
|
120
|
+
- OFS_DELTA and REF_DELTA compression
|
|
121
|
+
- Multi-pack indexes (MIDX)
|
|
122
|
+
- CRC32 verification
|
|
123
|
+
- Thin pack support for network transfer
|
|
55
124
|
|
|
56
|
-
|
|
57
|
-
|
|
125
|
+
### Wire Protocol
|
|
126
|
+
|
|
127
|
+
Smart HTTP protocol for git clients:
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
// Serve git fetch/push
|
|
131
|
+
app.all('/repo.git/*', (req) => git.serve(req))
|
|
132
|
+
|
|
133
|
+
// Clone works
|
|
134
|
+
// git clone https://your-worker.dev/repo.git
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- Capability negotiation
|
|
138
|
+
- Side-band progress reporting
|
|
139
|
+
- Multi-ack for efficiency
|
|
140
|
+
- Shallow clone support
|
|
141
|
+
|
|
142
|
+
### Merge & Diff
|
|
143
|
+
|
|
144
|
+
Full three-way merge with conflict detection:
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
// Merge branches
|
|
148
|
+
const result = await git.merge('/repo', 'feature')
|
|
149
|
+
if (result.conflicts) {
|
|
150
|
+
console.log('Conflicts:', result.conflicts)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// View diff
|
|
154
|
+
const diff = await git.diff('/repo', 'main', 'feature')
|
|
155
|
+
for (const file of diff.files) {
|
|
156
|
+
console.log(file.path, file.additions, file.deletions)
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### CLI Commands
|
|
161
|
+
|
|
162
|
+
Full command-line interface:
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
import { cli } from 'gitx.do/cli'
|
|
166
|
+
|
|
167
|
+
await cli('init /repo')
|
|
168
|
+
await cli('add /repo .')
|
|
169
|
+
await cli('commit /repo -m "message"')
|
|
170
|
+
await cli('log /repo --oneline')
|
|
171
|
+
await cli('branch /repo feature')
|
|
172
|
+
await cli('checkout /repo feature')
|
|
173
|
+
await cli('merge /repo main')
|
|
174
|
+
await cli('status /repo')
|
|
175
|
+
await cli('diff /repo')
|
|
58
176
|
```
|
|
59
177
|
|
|
60
178
|
### MCP Tools
|
|
61
179
|
|
|
180
|
+
Model Context Protocol for AI agents:
|
|
181
|
+
|
|
62
182
|
```typescript
|
|
63
|
-
import { gitTools, invokeTool
|
|
183
|
+
import { gitTools, invokeTool } from 'gitx.do/mcp'
|
|
64
184
|
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
//
|
|
185
|
+
// Available tools
|
|
186
|
+
// git_init, git_add, git_commit, git_log, git_diff, git_status,
|
|
187
|
+
// git_branch, git_checkout, git_merge, git_show, git_blame
|
|
68
188
|
|
|
69
|
-
|
|
70
|
-
|
|
189
|
+
await invokeTool('git_commit', {
|
|
190
|
+
repo: '/my-project',
|
|
191
|
+
message: 'Fix authentication bug'
|
|
192
|
+
})
|
|
71
193
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
description: 'Custom git operation',
|
|
76
|
-
inputSchema: { type: 'object', properties: {} },
|
|
77
|
-
handler: async (params) => ({ content: [{ type: 'text', text: 'Done' }] })
|
|
194
|
+
await invokeTool('git_log', {
|
|
195
|
+
repo: '/my-project',
|
|
196
|
+
limit: 10
|
|
78
197
|
})
|
|
79
198
|
```
|
|
80
199
|
|
|
81
|
-
|
|
200
|
+
## Durable Object Integration
|
|
201
|
+
|
|
202
|
+
### As a Standalone DO
|
|
82
203
|
|
|
83
204
|
```typescript
|
|
84
|
-
import {
|
|
205
|
+
import { GitDO } from 'gitx.do/do'
|
|
85
206
|
|
|
86
|
-
|
|
87
|
-
hot: { enabled: true, maxSize: 1024 * 1024 },
|
|
88
|
-
warm: { enabled: true },
|
|
89
|
-
cold: { enabled: true },
|
|
90
|
-
promotionPolicy: 'aggressive'
|
|
91
|
-
})
|
|
207
|
+
export { GitDO }
|
|
92
208
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
209
|
+
export default {
|
|
210
|
+
async fetch(request, env) {
|
|
211
|
+
const id = env.GIT.idFromName('repo-123')
|
|
212
|
+
const stub = env.GIT.get(id)
|
|
213
|
+
return stub.fetch(request)
|
|
214
|
+
}
|
|
215
|
+
}
|
|
96
216
|
```
|
|
97
217
|
|
|
98
|
-
###
|
|
218
|
+
### With dotdo Framework
|
|
99
219
|
|
|
100
220
|
```typescript
|
|
101
|
-
import {
|
|
221
|
+
import { DO } from 'dotdo'
|
|
222
|
+
import { withGit } from 'gitx.do/do'
|
|
102
223
|
|
|
103
|
-
|
|
224
|
+
class MyAgent extends withGit(DO) {
|
|
225
|
+
async work() {
|
|
226
|
+
await this.$.git.add('.', 'src/')
|
|
227
|
+
await this.$.git.commit('.', 'Update source files')
|
|
104
228
|
|
|
105
|
-
|
|
106
|
-
|
|
229
|
+
const log = await this.$.git.log('.')
|
|
230
|
+
return log.commits[0]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
```
|
|
107
234
|
|
|
108
|
-
|
|
109
|
-
const pack = await storage.downloadPackfile(packId, { verify: true })
|
|
235
|
+
### As RPC Service
|
|
110
236
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
237
|
+
```toml
|
|
238
|
+
# wrangler.toml
|
|
239
|
+
[[services]]
|
|
240
|
+
binding = "GITX"
|
|
241
|
+
service = "gitx-worker"
|
|
114
242
|
```
|
|
115
243
|
|
|
116
|
-
|
|
244
|
+
```typescript
|
|
245
|
+
await env.GITX.commit('/repo', 'message')
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## API Reference
|
|
249
|
+
|
|
250
|
+
### Repository Operations
|
|
251
|
+
|
|
252
|
+
| Method | Description |
|
|
253
|
+
|--------|-------------|
|
|
254
|
+
| `init(path)` | Initialize new repository |
|
|
255
|
+
| `clone(url, path)` | Clone remote repository |
|
|
256
|
+
| `status(path)` | Get working tree status |
|
|
257
|
+
| `log(path, options?)` | View commit history |
|
|
258
|
+
|
|
259
|
+
### Staging & Commits
|
|
117
260
|
|
|
118
|
-
|
|
261
|
+
| Method | Description |
|
|
262
|
+
|--------|-------------|
|
|
263
|
+
| `add(path, files)` | Stage files |
|
|
264
|
+
| `commit(path, message)` | Create commit |
|
|
265
|
+
| `reset(path, ref)` | Reset to commit |
|
|
119
266
|
|
|
120
|
-
|
|
121
|
-
- `createPackIndex(options)` - Create a new pack index
|
|
122
|
-
- `lookupObject(index, sha)` - Find object by SHA in index
|
|
123
|
-
- `verifyPackIndex(data)` - Verify index integrity
|
|
124
|
-
- `calculateCRC32(data)` - Compute CRC32 checksum
|
|
267
|
+
### Branches & Merging
|
|
125
268
|
|
|
126
|
-
|
|
269
|
+
| Method | Description |
|
|
270
|
+
|--------|-------------|
|
|
271
|
+
| `branch(path, name)` | Create branch |
|
|
272
|
+
| `checkout(path, ref)` | Switch branches |
|
|
273
|
+
| `merge(path, branch)` | Merge branch |
|
|
274
|
+
| `rebase(path, onto)` | Rebase branch |
|
|
127
275
|
|
|
128
|
-
|
|
129
|
-
- `handleUploadPack()` - Fetch data transfer
|
|
130
|
-
- `handleReceivePack()` - Push data transfer
|
|
131
|
-
- `formatRefAdvertisement()` - Format ref list
|
|
132
|
-
- `parseCapabilities()` - Parse protocol capabilities
|
|
276
|
+
### Diff & Blame
|
|
133
277
|
|
|
134
|
-
|
|
278
|
+
| Method | Description |
|
|
279
|
+
|--------|-------------|
|
|
280
|
+
| `diff(path, a, b)` | Compare commits |
|
|
281
|
+
| `blame(path, file)` | Line-by-line history |
|
|
282
|
+
| `show(path, ref)` | Show commit details |
|
|
135
283
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
284
|
+
### Low-Level
|
|
285
|
+
|
|
286
|
+
| Method | Description |
|
|
287
|
+
|--------|-------------|
|
|
288
|
+
| `hashObject(path, data, type)` | Create object |
|
|
289
|
+
| `catFile(path, sha, type)` | Read object |
|
|
290
|
+
| `updateRef(path, ref, sha)` | Update reference |
|
|
291
|
+
| `pack(path, objects)` | Create packfile |
|
|
292
|
+
|
|
293
|
+
## How It Works
|
|
294
|
+
|
|
295
|
+
```
|
|
296
|
+
┌─────────────────────────────────────────────────────────┐
|
|
297
|
+
│ gitx.do │
|
|
298
|
+
├─────────────────────────────────────────────────────────┤
|
|
299
|
+
│ Git Commands (add, commit, branch, merge, etc.) │
|
|
300
|
+
├─────────────────────────────────────────────────────────┤
|
|
301
|
+
│ Object Model (blob, tree, commit, tag) │
|
|
302
|
+
├─────────────────────────────────────────────────────────┤
|
|
303
|
+
│ Pack Engine (delta, compression, indexes) │
|
|
304
|
+
├────────────────────┬────────────────────────────────────┤
|
|
305
|
+
│ Hot Tier │ Warm Tier │
|
|
306
|
+
│ (SQLite) │ (R2) │
|
|
307
|
+
│ │ │
|
|
308
|
+
│ • Loose objects │ • Pack files │
|
|
309
|
+
│ • References │ • Large blobs │
|
|
310
|
+
│ • Index │ • Archive │
|
|
311
|
+
└────────────────────┴────────────────────────────────────┘
|
|
312
|
+
```
|
|
140
313
|
|
|
141
|
-
|
|
314
|
+
## Comparison
|
|
142
315
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
316
|
+
| Feature | GitHub | GitLab | gitx.do |
|
|
317
|
+
|---------|--------|--------|---------|
|
|
318
|
+
| **Pricing** | $21/user/month | $29/user/month | Self-hosted |
|
|
319
|
+
| **Storage** | 1GB free | 5GB free | R2 (cheap) |
|
|
320
|
+
| **LFS bandwidth** | $0.0875/GB | Metered | R2 (no egress) |
|
|
321
|
+
| **Full protocol** | Yes | Yes | Yes |
|
|
322
|
+
| **Edge-native** | No | No | Yes |
|
|
323
|
+
| **AI-native API** | No | No | Yes |
|
|
324
|
+
| **Self-hosted** | Enterprise only | Complex | One-click |
|
|
146
325
|
|
|
147
|
-
|
|
326
|
+
## Use Cases
|
|
148
327
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
328
|
+
### AI Agent Version Control
|
|
329
|
+
|
|
330
|
+
Each AI agent gets its own repository:
|
|
331
|
+
|
|
332
|
+
```typescript
|
|
333
|
+
class CodeAgent extends withGit(DO) {
|
|
334
|
+
async generateCode(spec) {
|
|
335
|
+
const code = await this.ai.generate(spec)
|
|
336
|
+
|
|
337
|
+
await this.$.fs.writeFile('src/index.ts', code)
|
|
338
|
+
await this.$.git.add('.', 'src/')
|
|
339
|
+
await this.$.git.commit('.', `Implement: ${spec}`)
|
|
340
|
+
|
|
341
|
+
return this.$.git.log('.', { limit: 1 })
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Private Git Hosting
|
|
347
|
+
|
|
348
|
+
Your repositories on your infrastructure:
|
|
349
|
+
|
|
350
|
+
```typescript
|
|
351
|
+
export default GitX({
|
|
352
|
+
name: 'my-repos',
|
|
353
|
+
domain: 'git.mycompany.com',
|
|
354
|
+
})
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### LFS Without Bandwidth Fees
|
|
358
|
+
|
|
359
|
+
R2 has no egress charges:
|
|
360
|
+
|
|
361
|
+
```typescript
|
|
362
|
+
await git.lfsTrack('/repo', '*.psd')
|
|
363
|
+
await git.lfsPush('/repo')
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## Performance
|
|
367
|
+
|
|
368
|
+
- **5,684 tests** covering all operations
|
|
369
|
+
- **Full Git protocol** - clone, fetch, push all work
|
|
370
|
+
- **<10ms** for hot tier operations
|
|
371
|
+
- **Global edge** - 300+ Cloudflare locations
|
|
372
|
+
- **Zero cold starts** - Durable Objects
|
|
153
373
|
|
|
154
374
|
## License
|
|
155
375
|
|
|
156
376
|
MIT
|
|
377
|
+
|
|
378
|
+
## Links
|
|
379
|
+
|
|
380
|
+
- [GitHub](https://github.com/dot-do/gitx)
|
|
381
|
+
- [Documentation](https://gitx.do)
|
|
382
|
+
- [.do](https://do.org.ai)
|
|
383
|
+
- [Platform.do](https://platform.do)
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview gitx add command
|
|
3
|
+
*
|
|
4
|
+
* This module implements the `gitx add` command which adds files to the
|
|
5
|
+
* staging area (index). It supports:
|
|
6
|
+
* - Adding single files
|
|
7
|
+
* - Adding multiple files
|
|
8
|
+
* - Adding directories recursively
|
|
9
|
+
* - Glob pattern matching
|
|
10
|
+
* - Adding all files (-A or --all)
|
|
11
|
+
* - Updating tracked files only (-u or --update)
|
|
12
|
+
* - Dry run mode (-n or --dry-run)
|
|
13
|
+
* - Verbose output (-v or --verbose)
|
|
14
|
+
*
|
|
15
|
+
* @module cli/commands/add
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Add a single file
|
|
19
|
+
* await addFiles(cwd, ['file.txt'])
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // Add all files
|
|
23
|
+
* await addAll(cwd)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Dry run to see what would be added
|
|
27
|
+
* await addDryRun(cwd, ['*.ts'])
|
|
28
|
+
*/
|
|
29
|
+
import type { CommandContext } from '../index';
|
|
30
|
+
/**
|
|
31
|
+
* Options for the add command.
|
|
32
|
+
*
|
|
33
|
+
* @description Configuration options that control the behavior
|
|
34
|
+
* of the add command.
|
|
35
|
+
*/
|
|
36
|
+
export interface AddOptions {
|
|
37
|
+
/** Force add ignored files */
|
|
38
|
+
force?: boolean;
|
|
39
|
+
/** Show what would be added without actually adding */
|
|
40
|
+
dryRun?: boolean;
|
|
41
|
+
/** Show verbose output */
|
|
42
|
+
verbose?: boolean;
|
|
43
|
+
/** Record only the fact that the path will be added later */
|
|
44
|
+
intentToAdd?: boolean;
|
|
45
|
+
/** Update tracked files only (like git add -u) */
|
|
46
|
+
update?: boolean;
|
|
47
|
+
/** Add all files including untracked (like git add -A) */
|
|
48
|
+
all?: boolean;
|
|
49
|
+
/** Exclude patterns */
|
|
50
|
+
exclude?: string[];
|
|
51
|
+
/** Refresh index stat information */
|
|
52
|
+
refresh?: boolean;
|
|
53
|
+
/** Interactive patch mode */
|
|
54
|
+
patch?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Result of an add operation.
|
|
58
|
+
*
|
|
59
|
+
* @description Contains lists of files that were added, deleted,
|
|
60
|
+
* or unchanged, plus detailed file information.
|
|
61
|
+
*/
|
|
62
|
+
export interface AddResult {
|
|
63
|
+
/** Files that were successfully added to the index */
|
|
64
|
+
added: string[];
|
|
65
|
+
/** Files that were staged for deletion */
|
|
66
|
+
deleted: string[];
|
|
67
|
+
/** Files that were already staged with no changes */
|
|
68
|
+
unchanged: string[];
|
|
69
|
+
/** Files that would be added (for dry-run mode) */
|
|
70
|
+
wouldAdd: string[];
|
|
71
|
+
/** Files marked as intent-to-add */
|
|
72
|
+
intentToAdd: string[];
|
|
73
|
+
/** Detailed file information */
|
|
74
|
+
files: FileToAdd[];
|
|
75
|
+
/** Total count of files affected */
|
|
76
|
+
count: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Information about a file to be added.
|
|
80
|
+
*
|
|
81
|
+
* @description Contains the path, computed SHA, and file mode
|
|
82
|
+
* for a file being staged.
|
|
83
|
+
*/
|
|
84
|
+
export interface FileToAdd {
|
|
85
|
+
/** File path relative to repository root */
|
|
86
|
+
path: string;
|
|
87
|
+
/** SHA-1 hash of the file content */
|
|
88
|
+
sha: string;
|
|
89
|
+
/** File mode (100644 for regular, 100755 for executable, 120000 for symlink) */
|
|
90
|
+
mode: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Handler for the gitx add command.
|
|
94
|
+
*
|
|
95
|
+
* @description Processes command-line arguments and adds files to the staging area.
|
|
96
|
+
*
|
|
97
|
+
* @param ctx - Command context with cwd, args, options
|
|
98
|
+
* @throws Error if not in a git repository or files not found
|
|
99
|
+
*/
|
|
100
|
+
export declare function addCommand(ctx: CommandContext): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Add specified files to the staging area.
|
|
103
|
+
*
|
|
104
|
+
* @description Adds the given files or patterns to the git index.
|
|
105
|
+
* Supports glob patterns and directories.
|
|
106
|
+
*
|
|
107
|
+
* @param cwd - Working directory (repository root)
|
|
108
|
+
* @param paths - File paths or patterns to add
|
|
109
|
+
* @param options - Add options
|
|
110
|
+
* @returns AddResult with added files information
|
|
111
|
+
* @throws Error if not in a git repository or files not found
|
|
112
|
+
*/
|
|
113
|
+
export declare function addFiles(cwd: string, paths: string[], options?: AddOptions): Promise<AddResult>;
|
|
114
|
+
/**
|
|
115
|
+
* Add all files to the staging area (like git add -A).
|
|
116
|
+
*
|
|
117
|
+
* @description Adds all untracked, modified, and deleted files
|
|
118
|
+
* to the staging area.
|
|
119
|
+
*
|
|
120
|
+
* @param cwd - Working directory (repository root)
|
|
121
|
+
* @param options - Add options
|
|
122
|
+
* @returns AddResult with added files information
|
|
123
|
+
* @throws Error if not in a git repository
|
|
124
|
+
*/
|
|
125
|
+
export declare function addAll(cwd: string, options?: AddOptions): Promise<AddResult>;
|
|
126
|
+
/**
|
|
127
|
+
* Update tracked files only (like git add -u).
|
|
128
|
+
*
|
|
129
|
+
* @description Stages modifications and deletions of tracked files only.
|
|
130
|
+
* Does not add untracked files.
|
|
131
|
+
*
|
|
132
|
+
* @param cwd - Working directory (repository root)
|
|
133
|
+
* @param options - Add options
|
|
134
|
+
* @returns AddResult with updated files information
|
|
135
|
+
* @throws Error if not in a git repository
|
|
136
|
+
*/
|
|
137
|
+
export declare function addUpdate(cwd: string, options?: AddOptions): Promise<AddResult>;
|
|
138
|
+
/**
|
|
139
|
+
* Dry run to show what would be added.
|
|
140
|
+
*
|
|
141
|
+
* @description Shows what files would be added without actually
|
|
142
|
+
* modifying the index.
|
|
143
|
+
*
|
|
144
|
+
* @param cwd - Working directory (repository root)
|
|
145
|
+
* @param paths - File paths or patterns to check
|
|
146
|
+
* @param options - Add options
|
|
147
|
+
* @returns AddResult with wouldAdd populated
|
|
148
|
+
* @throws Error if not in a git repository
|
|
149
|
+
*/
|
|
150
|
+
export declare function addDryRun(cwd: string, paths: string[], options?: AddOptions): Promise<AddResult>;
|
|
151
|
+
/**
|
|
152
|
+
* Get list of files that would be added for given paths.
|
|
153
|
+
*
|
|
154
|
+
* @description Resolves paths and glob patterns to a list of files
|
|
155
|
+
* that would be added to the index.
|
|
156
|
+
*
|
|
157
|
+
* @param cwd - Working directory (repository root)
|
|
158
|
+
* @param paths - File paths or patterns
|
|
159
|
+
* @param options - Add options including exclude patterns
|
|
160
|
+
* @returns Array of FileToAdd objects
|
|
161
|
+
* @throws Error if not in a git repository
|
|
162
|
+
*/
|
|
163
|
+
export declare function getFilesToAdd(cwd: string, paths: string[], options?: AddOptions): Promise<FileToAdd[]>;
|
|
164
|
+
/**
|
|
165
|
+
* Match a file path against a glob pattern.
|
|
166
|
+
*
|
|
167
|
+
* @description Utility function to test if a path matches a glob pattern.
|
|
168
|
+
*
|
|
169
|
+
* @param filePath - File path to test
|
|
170
|
+
* @param pattern - Glob pattern to match against
|
|
171
|
+
* @returns true if the path matches the pattern
|
|
172
|
+
*/
|
|
173
|
+
export declare function matchGlobPattern(filePath: string, pattern: string): boolean;
|
|
174
|
+
//# sourceMappingURL=add.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAM9C;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,sDAAsD;IACtD,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,0CAA0C;IAC1C,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,qDAAqD;IACrD,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,oCAAoC;IACpC,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,gCAAgC;IAChC,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,qCAAqC;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAA;CACb;AAMD;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAMD;;;;;;;;;;;GAWG;AACH,wBAAsB,QAAQ,CAC5B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,SAAS,CAAC,CAEpB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,MAAM,CAC1B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,SAAS,CAAC,CAEpB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,SAAS,CAC7B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,SAAS,CAAC,CAEpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAC7B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,SAAS,CAAC,CAEpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,SAAS,EAAE,CAAC,CAEtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAE3E"}
|