ranger-compiler 3.4.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +102 -24
- package/README.md +3 -2
- package/dist/README.md +1 -1
- package/dist/api.d.ts +393 -0
- package/dist/api.js +4140 -413
- package/dist/git-http.mjs +126 -0
- package/dist/lib/zip/Inflate.rgr +675 -0
- package/dist/lib/zip/ZipBuffer.rgr +358 -0
- package/dist/package.json +1 -1
- package/dist/rgrc.js +3540 -56
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -7,26 +7,102 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [3.
|
|
11
|
-
|
|
12
|
-
The
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
10
|
+
## [3.5.1] - 2026-09-17
|
|
11
|
+
|
|
12
|
+
- **The npm README still said 3.3.0.** The package was 3.5.0; the first line
|
|
13
|
+
of `README.md` was never bumped with it, so the npm page advertised the
|
|
14
|
+
old version. npm does not rewrite a published tarball, so this is 3.5.1.
|
|
15
|
+
- **This file now dates 3.4.0 and 3.5.0.** Both shipped on npm with the
|
|
16
|
+
notes below still under Unreleased, so a reader of the package changelog
|
|
17
|
+
could not tell what was in the tarball.
|
|
18
|
+
|
|
19
|
+
## [3.5.0] - 2026-09-17
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **`rgrc install` fetches what `ranger.json` names.** `Import "pkg:…"`
|
|
24
|
+
used to resolve only against files already on disk, so a clean checkout
|
|
25
|
+
of a project that depends on `gallery/evg` had nothing to compile
|
|
26
|
+
against. The compiler now walks the graph, sparse-fetches each git
|
|
27
|
+
dependency at its pinned revision, writes it into the cache
|
|
28
|
+
(`RANGER_PKG_CACHE`, else `~/.cache/ranger/packages/<sha256>`), recurses
|
|
29
|
+
into each fetched package's own manifest, and records `rev` + `sha256`
|
|
30
|
+
in `ranger.lock`. A branch or tag is pinned to the commit it resolved
|
|
31
|
+
to. `-vendor` also writes `vendor/ranger/<name>` so a vendored project
|
|
32
|
+
needs no cache; `-frozen` fails rather than fetching what the lock does
|
|
33
|
+
not cover; `-force` refetches; `-cache=<dir>` overrides the default.
|
|
34
|
+
|
|
35
|
+
- **The Git pack client is MIT, and it runs inside `rgrc`.** It sat under
|
|
36
|
+
`gallery/` and was therefore AGPL, so the MIT compiler could resolve
|
|
37
|
+
`pkg:` but not fetch it — that split cost a second npm package
|
|
38
|
+
(`ranger-pkg`) and a shell-out. The client is a clean-room read of
|
|
39
|
+
published formats (pack layout, pkt-line, smart HTTP, FIPS 180-1 SHA-1,
|
|
40
|
+
RFC 1950/1951), which is how you use the language, not an application
|
|
41
|
+
built with it. `gallery/pkg` moved to `pkg/`. `gallery/zip/Inflate.rgr`
|
|
42
|
+
and `ZipBuffer.rgr` moved to `lib/zip/` (MIT) because DEFLATE is a
|
|
43
|
+
published format and the pack needs it; the ZIP container, the writer
|
|
44
|
+
and CRC32 stay in `gallery/zip`. `compiler/PkgFetch.rgr` drives the
|
|
45
|
+
client: advertisement, want, side-band demux, pack v2 with deltas, the
|
|
46
|
+
tree walk and the content cache. `bin/git-http.mjs` is the only Node
|
|
47
|
+
left — GET and POST of bytes, because Node has no synchronous HTTPS and
|
|
48
|
+
this compiler is synchronous — and it ships in `dist/` beside `rgrc.js`.
|
|
49
|
+
`ranger-pkg` and `tools/install.mjs` are gone.
|
|
50
|
+
|
|
51
|
+
- **The site root is a page about the language.** It was the playground.
|
|
52
|
+
It now says what Ranger is, what it compiles to, which platforms it
|
|
53
|
+
reaches, how the portability claims are checked, and what is in the
|
|
54
|
+
gallery. The playground moved to `/playground/`. `landing/` is plain
|
|
55
|
+
HTML, one stylesheet and one module: the logo is the bitmap tracer
|
|
56
|
+
walking the project's mark into three paths, the backdrop is an EVG
|
|
57
|
+
display list drawn on the GPU by the same painter the editors use, and
|
|
58
|
+
`landing/examples/Cart.rgr` is recompiled for Swift, Kotlin, JavaScript,
|
|
59
|
+
TypeScript, C#, C++, PHP and Rust when the site is built, so the code
|
|
60
|
+
beside each tab is what that commit's compiler writes.
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
|
|
64
|
+
- **A lock entry whose checkout is still in the cache is not fetched
|
|
65
|
+
again.** A sha256 names content and the content at a commit does not
|
|
66
|
+
move. treeni-week's install went from 10s to 0.12s and needs no
|
|
67
|
+
network. `--frozen` makes the cache the only answer; `--force` ignores
|
|
68
|
+
it; a `git` or `rev` repointed in `ranger.json` still outranks the lock.
|
|
69
|
+
|
|
70
|
+
- **PkgImport falls back to `ranger.lock` for a package the manifest does
|
|
71
|
+
not declare.** The lock is the whole graph; `ranger.json` is only its
|
|
72
|
+
first row. A path dependency inside a fetched package is resolved
|
|
73
|
+
against the origin that package came from (`gallery/statechart` plus
|
|
74
|
+
`../vela` is `gallery/vela` in the same repo at the same revision).
|
|
75
|
+
Imports dedup on the folded path as well as the string, so
|
|
76
|
+
`../../evg/X.rgr` and `pkg:evg/X.rgr` are one file.
|
|
77
|
+
|
|
78
|
+
- **Getting started leads, not the playground.** The front page's "three
|
|
79
|
+
ways in" is a numbered path: clone and build, point the agent at
|
|
80
|
+
`AGENTS.md`, start from a gallery project, compile for the target you
|
|
81
|
+
are shipping to. The playground keeps a link in the navigation.
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
|
|
85
|
+
- **`-d=/absolute/path` wrote the tree under cwd + that path**, because
|
|
86
|
+
the working directory was joined onto it unconditionally.
|
|
87
|
+
- **`compiler/bin/api.ts` is not in the tree.** It is the TypeScript
|
|
88
|
+
`build:dist:module` hands to tsc on the way to `dist/api.js`, 77k
|
|
89
|
+
generated lines that had never been tracked and went in with the 3.5.0
|
|
90
|
+
build. `dist/api.js` and `dist/api.d.ts` are what ships.
|
|
91
|
+
|
|
92
|
+
## [3.4.0] - 2026-09-17
|
|
93
|
+
|
|
94
|
+
The last package on npm before this one was **3.2.0**. 3.2.1, 3.3.0 and
|
|
95
|
+
3.3.1 were already dated in this file and never published there, so this
|
|
96
|
+
tarball is the first that carries them.
|
|
97
|
+
|
|
98
|
+
On the compiler: generic classes (`class History @params(Op)`), expanded
|
|
99
|
+
into ordinary classes before any writer runs; a dotted call in return
|
|
100
|
+
position now parses (`return this.helper()`); Swift string operators
|
|
101
|
+
walk UTF-16 in amortised constant time; Kotlin emits `open class` for
|
|
102
|
+
the header form of inheritance; a Python empty constructor writes
|
|
103
|
+
`pass`; the C++ `Any` union only names classes the program actually
|
|
104
|
+
emits. The gallery grew in the same window — EVG, Office, the book
|
|
105
|
+
engine, Mermaid, Figma, CodeGraph, Rave — and is not in the npm tarball.
|
|
30
106
|
|
|
31
107
|
- **All thirty-eight of Mermaid's header keywords are drawn.** The matrix in
|
|
32
108
|
`docs/MERMAID_PARITY.md` is read off Mermaid's own detector registry — the
|
|
@@ -40,10 +116,12 @@ the book engine, Mermaid, Figma — and is not in the npm tarball.
|
|
|
40
116
|
token is a coloured speck, the slider is the viewport, a problem is a tick,
|
|
41
117
|
and a click or a drag there jumps the view without moving the caret. The
|
|
42
118
|
picture keeps a compact scale (two pixels a line, shrinking only when the
|
|
43
|
-
file would not fit);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
the
|
|
119
|
+
file would not fit); each letter is a faint cell at the opacity of its
|
|
120
|
+
glyph (~3 % for `.`, ~10 % for `I`, ~20 % for `R`) rather than a solid
|
|
121
|
+
bar. The pointer's place on that picture, as a fraction of its height,
|
|
122
|
+
is how far the editor scrolls. On r5 a finger on the strip stays a
|
|
123
|
+
pointer, not a line-by-line flick. A panel too narrow to spare the strip
|
|
124
|
+
hides it. The same map shows on the r5 page, on the light theme.
|
|
47
125
|
|
|
48
126
|
- **FigJam boards draw.** A sticky, a shape with text, a connector and a table
|
|
49
127
|
carry no children: Figma builds their layers itself and a `.jam` ships only
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ranger cross language compiler
|
|
2
2
|
|
|
3
|
-
**Version 3.
|
|
3
|
+
**Version 3.5.1** | Status: `experimental`
|
|
4
4
|
|
|
5
5
|
**Licensing:** Ranger-authored compiler and language sources are MIT licensed,
|
|
6
6
|
unless a file says otherwise. Ranger-authored applications and technology
|
|
@@ -78,7 +78,8 @@ host.notifyPath = (path) => { /* sync view model + re-render */ };
|
|
|
78
78
|
## Where To Start
|
|
79
79
|
|
|
80
80
|
- [Documentation site](https://terotests.github.io/Ranger/docs/) — install, first program, types, optionals, and the **generated operator reference** (838 operators, compiled from the sources of the commit that publishes the site, so it cannot drift)
|
|
81
|
-
- [
|
|
81
|
+
- [The front page](https://terotests.github.io/Ranger/) — what Ranger is, the targets, the platforms and the gallery (`landing/`)
|
|
82
|
+
- [Online playground](https://terotests.github.io/Ranger/playground/) — try Ranger in the browser (`playground/`, Vite + current compiler)
|
|
82
83
|
- `README.md` - language overview, installation, and syntax notes
|
|
83
84
|
- [`gallery/README.md`](gallery/README.md) - index of the application stack (AGPL): EVG, Office, DataGrid, parsers, games, and `@process` host apps
|
|
84
85
|
- [`LICENSING.md`](LICENSING.md) - MIT compiler vs AGPL gallery
|
package/dist/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ranger Compiler
|
|
2
2
|
|
|
3
|
-
**Version 3.
|
|
3
|
+
**Version 3.5.1** | Cross-language compiler - compile once, run anywhere
|
|
4
4
|
|
|
5
5
|
Ranger is a self-hosting cross-language compiler that lets you write code once and compile to multiple target languages including JavaScript, TypeScript, Python, Go, Rust, Swift, C++, Java, Kotlin, C#, PHP, and Scala.
|
|
6
6
|
|
package/dist/api.d.ts
CHANGED
|
@@ -1697,7 +1697,9 @@ export declare class PkgImport {
|
|
|
1697
1697
|
static walkUp(env: InputEnv, start: string): string;
|
|
1698
1698
|
static readText(env: InputEnv, dir: string, name: string): Promise<string>;
|
|
1699
1699
|
static findChar(s: string, code: number): number;
|
|
1700
|
+
static manifestChain(env: InputEnv, startDir: string, libraryPaths: Array<string>): Array<string>;
|
|
1700
1701
|
static resolve(env: InputEnv, startDir: string, spec: string, libraryPaths: Array<string>): Promise<PkgHit>;
|
|
1702
|
+
static resolveIn(env: InputEnv, manDir: string, spec: string): Promise<PkgHit>;
|
|
1701
1703
|
static lockRoot(env: InputEnv, lockText: string, pkgName: string, manDir: string): string;
|
|
1702
1704
|
}
|
|
1703
1705
|
export declare class ClassJoinPoint {
|
|
@@ -3704,6 +3706,396 @@ export declare class CLIProgress {
|
|
|
3704
3706
|
printFlag(flag: string, description: string): void;
|
|
3705
3707
|
printSection(title: string): void;
|
|
3706
3708
|
}
|
|
3709
|
+
export declare class GitSha1 {
|
|
3710
|
+
constructor();
|
|
3711
|
+
static mask32(): number;
|
|
3712
|
+
static add32(a: number, b: number): number;
|
|
3713
|
+
static not32(x: number): number;
|
|
3714
|
+
static rotl(x: number, n: number): number;
|
|
3715
|
+
static copyRange(data: Uint8Array, start: number, count: number): Uint8Array;
|
|
3716
|
+
static ascii(data: Uint8Array, start: number, count: number): string;
|
|
3717
|
+
static u32be(data: Uint8Array, i: number): number;
|
|
3718
|
+
static hexDigit(d: number): string;
|
|
3719
|
+
static toHex(data: Uint8Array): string;
|
|
3720
|
+
static fromHex(hex: string): Uint8Array;
|
|
3721
|
+
static hash(data: Uint8Array): Uint8Array;
|
|
3722
|
+
static writeU32be(out: Uint8Array, i: number, v: number): void;
|
|
3723
|
+
static hashHex(data: Uint8Array): string;
|
|
3724
|
+
static objectId(kind: string, payload: Uint8Array): string;
|
|
3725
|
+
static hexEq(a: string, b: string): boolean;
|
|
3726
|
+
}
|
|
3727
|
+
export declare class GitPkt {
|
|
3728
|
+
ok: boolean;
|
|
3729
|
+
err: string;
|
|
3730
|
+
lines: Array<string>;
|
|
3731
|
+
raw: Array<Uint8Array>;
|
|
3732
|
+
isFlush: Array<boolean>;
|
|
3733
|
+
constructor();
|
|
3734
|
+
}
|
|
3735
|
+
export declare class GitRef {
|
|
3736
|
+
name: string;
|
|
3737
|
+
sha: string;
|
|
3738
|
+
peeled: string;
|
|
3739
|
+
constructor();
|
|
3740
|
+
}
|
|
3741
|
+
export declare class GitAdvertisement {
|
|
3742
|
+
ok: boolean;
|
|
3743
|
+
err: string;
|
|
3744
|
+
service: string;
|
|
3745
|
+
caps: string;
|
|
3746
|
+
head: string;
|
|
3747
|
+
refs: Array<GitRef>;
|
|
3748
|
+
constructor();
|
|
3749
|
+
}
|
|
3750
|
+
export declare class GitWant {
|
|
3751
|
+
ok: boolean;
|
|
3752
|
+
err: string;
|
|
3753
|
+
sha: string;
|
|
3754
|
+
body: Uint8Array;
|
|
3755
|
+
constructor();
|
|
3756
|
+
}
|
|
3757
|
+
export declare class GitSideband {
|
|
3758
|
+
ok: boolean;
|
|
3759
|
+
err: string;
|
|
3760
|
+
pack: Uint8Array;
|
|
3761
|
+
progress: string;
|
|
3762
|
+
constructor();
|
|
3763
|
+
}
|
|
3764
|
+
export declare class GitPktIO {
|
|
3765
|
+
constructor();
|
|
3766
|
+
static hexVal(ch: string): number;
|
|
3767
|
+
static parseHex4(data: Uint8Array, at: number): number;
|
|
3768
|
+
static hex4(n: number): string;
|
|
3769
|
+
static encodeLine(text: string): Uint8Array;
|
|
3770
|
+
static encodeFlush(): Uint8Array;
|
|
3771
|
+
static parse(data: Uint8Array): GitPkt;
|
|
3772
|
+
static parseAdvertisement(data: Uint8Array): GitAdvertisement;
|
|
3773
|
+
static findRef(adv: GitAdvertisement, spec: string): string;
|
|
3774
|
+
static hasToken(caps: string, name: string): boolean;
|
|
3775
|
+
static joinBuf(parts: Array<Uint8Array>): Uint8Array;
|
|
3776
|
+
static encodeDelim(): Uint8Array;
|
|
3777
|
+
static buildWant(adv: GitAdvertisement, spec: string): GitWant;
|
|
3778
|
+
static buildWantFetch(sha: string, deepen: number, filter: string, extras: Array<string>): GitWant;
|
|
3779
|
+
static buildWantTrees(adv: GitAdvertisement, spec: string): GitWant;
|
|
3780
|
+
static buildWantSha(sha: string): GitWant;
|
|
3781
|
+
static buildFetchV2(sha: string, deepen: number, filter: string): GitWant;
|
|
3782
|
+
static demux(data: Uint8Array): GitSideband;
|
|
3783
|
+
static indexOfPack(data: Uint8Array): number;
|
|
3784
|
+
static indexOfChar(s: string, code: number): number;
|
|
3785
|
+
static trimNl(s: string): string;
|
|
3786
|
+
}
|
|
3787
|
+
export declare class ZipBuffer {
|
|
3788
|
+
data: Uint8Array;
|
|
3789
|
+
pos: number;
|
|
3790
|
+
length: number;
|
|
3791
|
+
constructor();
|
|
3792
|
+
initWithBuffer(buf: Uint8Array): void;
|
|
3793
|
+
initWithSize(size: number): void;
|
|
3794
|
+
getPosition(): number;
|
|
3795
|
+
setPosition(newPos: number): void;
|
|
3796
|
+
seek(offset: number): void;
|
|
3797
|
+
skip(count: number): void;
|
|
3798
|
+
remaining(): number;
|
|
3799
|
+
isEOF(): boolean;
|
|
3800
|
+
readUint8(): number;
|
|
3801
|
+
readUint16LE(): number;
|
|
3802
|
+
readUint32LE(): number;
|
|
3803
|
+
readBytes(count: number): Uint8Array;
|
|
3804
|
+
readString(count: number): string;
|
|
3805
|
+
peekUint8(): number;
|
|
3806
|
+
peekUint32LE(): number;
|
|
3807
|
+
writeUint8(value: number): void;
|
|
3808
|
+
writeUint16LE(value: number): void;
|
|
3809
|
+
writeUint32LE(value: number): void;
|
|
3810
|
+
writeBytes(src: Uint8Array, srcOffset: number, count: number): void;
|
|
3811
|
+
writeBuffer(src: Uint8Array): void;
|
|
3812
|
+
writeString(s: string): void;
|
|
3813
|
+
getBuffer(): Uint8Array;
|
|
3814
|
+
getLength(): number;
|
|
3815
|
+
findSignatureBackward(sig: number, startPos: number): number;
|
|
3816
|
+
}
|
|
3817
|
+
export declare class GrowableZipBuffer {
|
|
3818
|
+
chunks: Array<Uint8Array>;
|
|
3819
|
+
chunkLens: Array<number>;
|
|
3820
|
+
chunkSize: number;
|
|
3821
|
+
currentChunk: Uint8Array;
|
|
3822
|
+
currentPos: number;
|
|
3823
|
+
totalSize: number;
|
|
3824
|
+
constructor();
|
|
3825
|
+
setChunkSize(size: number): void;
|
|
3826
|
+
allocateNewChunk(): void;
|
|
3827
|
+
writeUint8(value: number): void;
|
|
3828
|
+
writeUint16LE(value: number): void;
|
|
3829
|
+
writeUint32LE(value: number): void;
|
|
3830
|
+
writeBytes(src: Uint8Array, srcOffset: number, count: number): void;
|
|
3831
|
+
writeBuffer(src: Uint8Array): void;
|
|
3832
|
+
writeString(s: string): void;
|
|
3833
|
+
getSize(): number;
|
|
3834
|
+
toBuffer(): Uint8Array;
|
|
3835
|
+
}
|
|
3836
|
+
export declare class InflateHuffmanTable {
|
|
3837
|
+
counts: Array<number>;
|
|
3838
|
+
symbols: Array<number>;
|
|
3839
|
+
maxBits: number;
|
|
3840
|
+
constructor();
|
|
3841
|
+
build(lengths: Array<number>, numSymbols: number): void;
|
|
3842
|
+
decode(reader: InflateBitReader): number;
|
|
3843
|
+
}
|
|
3844
|
+
export declare class InflateBitReader {
|
|
3845
|
+
data: Uint8Array;
|
|
3846
|
+
bytePos: number;
|
|
3847
|
+
bitPos: number;
|
|
3848
|
+
currentByte: number;
|
|
3849
|
+
dataLength: number;
|
|
3850
|
+
constructor();
|
|
3851
|
+
init(buf: Uint8Array, offset: number, length: number): void;
|
|
3852
|
+
readBit(): number;
|
|
3853
|
+
readBits(count: number): number;
|
|
3854
|
+
alignToByte(): void;
|
|
3855
|
+
readByte(): number;
|
|
3856
|
+
readUint16LE(): number;
|
|
3857
|
+
getBytePosition(): number;
|
|
3858
|
+
isEOF(): boolean;
|
|
3859
|
+
}
|
|
3860
|
+
export declare class Inflate {
|
|
3861
|
+
input: Uint8Array;
|
|
3862
|
+
reader: InflateBitReader;
|
|
3863
|
+
outBuf: Uint8Array;
|
|
3864
|
+
outLen: number;
|
|
3865
|
+
outCap: number;
|
|
3866
|
+
fixedLitLen: InflateHuffmanTable;
|
|
3867
|
+
fixedDist: InflateHuffmanTable;
|
|
3868
|
+
fixedTablesBuilt: boolean;
|
|
3869
|
+
lengthBase: Array<number>;
|
|
3870
|
+
lengthExtra: Array<number>;
|
|
3871
|
+
distBase: Array<number>;
|
|
3872
|
+
distExtra: Array<number>;
|
|
3873
|
+
constructor();
|
|
3874
|
+
resetOutput(hint: number): void;
|
|
3875
|
+
ensureCapacity(extra: number): void;
|
|
3876
|
+
pushByte(b: number): void;
|
|
3877
|
+
finalOutput(): Uint8Array;
|
|
3878
|
+
buildLengthDistTables(): void;
|
|
3879
|
+
buildFixedTables(): void;
|
|
3880
|
+
decompress(data: Uint8Array): Uint8Array;
|
|
3881
|
+
decompressFrom(data: Uint8Array, offset: number): Uint8Array;
|
|
3882
|
+
inputPos(): number;
|
|
3883
|
+
decompressStored(): void;
|
|
3884
|
+
decompressHuffman(litLenTable: InflateHuffmanTable, distTable: InflateHuffmanTable): void;
|
|
3885
|
+
decompressDynamic(): void;
|
|
3886
|
+
copyFromOutput(distance: number, length: number): void;
|
|
3887
|
+
}
|
|
3888
|
+
export declare class GitZlib {
|
|
3889
|
+
ok: boolean;
|
|
3890
|
+
err: string;
|
|
3891
|
+
nextPos: number;
|
|
3892
|
+
constructor();
|
|
3893
|
+
inflateAt(data: Uint8Array, offset: number): Uint8Array;
|
|
3894
|
+
inflate(data: Uint8Array): Uint8Array;
|
|
3895
|
+
}
|
|
3896
|
+
export declare class GitObj {
|
|
3897
|
+
kind: number;
|
|
3898
|
+
sha: string;
|
|
3899
|
+
data: Uint8Array;
|
|
3900
|
+
packOff: number;
|
|
3901
|
+
resolved: boolean;
|
|
3902
|
+
delta: boolean;
|
|
3903
|
+
baseOff: number;
|
|
3904
|
+
baseSha: string;
|
|
3905
|
+
constructor();
|
|
3906
|
+
}
|
|
3907
|
+
export declare class GitPack {
|
|
3908
|
+
ok: boolean;
|
|
3909
|
+
err: string;
|
|
3910
|
+
version: number;
|
|
3911
|
+
count: number;
|
|
3912
|
+
objects: Array<GitObj>;
|
|
3913
|
+
bySha: {
|
|
3914
|
+
[key: string]: GitObj;
|
|
3915
|
+
};
|
|
3916
|
+
byOff: {
|
|
3917
|
+
[key: number]: GitObj;
|
|
3918
|
+
};
|
|
3919
|
+
constructor();
|
|
3920
|
+
}
|
|
3921
|
+
export declare class GitDelta {
|
|
3922
|
+
constructor();
|
|
3923
|
+
static varInt(data: Uint8Array, pos: Array<number>): number;
|
|
3924
|
+
static apply(src: Uint8Array, delta: Uint8Array): Uint8Array;
|
|
3925
|
+
}
|
|
3926
|
+
export declare class GitPackIO {
|
|
3927
|
+
constructor();
|
|
3928
|
+
static kindName(kind: number): string;
|
|
3929
|
+
static parse(data: Uint8Array): GitPack;
|
|
3930
|
+
static resolveDeltas(pack: GitPack): void;
|
|
3931
|
+
static lookup(pack: GitPack, sha: string): GitObj | undefined;
|
|
3932
|
+
static merge(a: GitPack, b: GitPack): GitPack;
|
|
3933
|
+
}
|
|
3934
|
+
export declare class GitEntry {
|
|
3935
|
+
name: string;
|
|
3936
|
+
sha: string;
|
|
3937
|
+
isTree: boolean;
|
|
3938
|
+
mode: string;
|
|
3939
|
+
constructor();
|
|
3940
|
+
}
|
|
3941
|
+
export declare class GitFile {
|
|
3942
|
+
path: string;
|
|
3943
|
+
data: Uint8Array;
|
|
3944
|
+
constructor();
|
|
3945
|
+
}
|
|
3946
|
+
export declare class GitTree {
|
|
3947
|
+
sha: string;
|
|
3948
|
+
entries: Array<GitEntry>;
|
|
3949
|
+
constructor();
|
|
3950
|
+
}
|
|
3951
|
+
export declare class GitMem {
|
|
3952
|
+
files: Array<GitFile>;
|
|
3953
|
+
paths: Array<string>;
|
|
3954
|
+
byPath: {
|
|
3955
|
+
[key: string]: GitFile;
|
|
3956
|
+
};
|
|
3957
|
+
constructor();
|
|
3958
|
+
}
|
|
3959
|
+
export declare class GitStore {
|
|
3960
|
+
pack: GitPack;
|
|
3961
|
+
ok: boolean;
|
|
3962
|
+
err: string;
|
|
3963
|
+
constructor(p: GitPack);
|
|
3964
|
+
takeObj(sha: string): GitObj | undefined;
|
|
3965
|
+
parseTree(payload: Uint8Array): GitTree;
|
|
3966
|
+
commitTree(payload: Uint8Array): string;
|
|
3967
|
+
checkout(sha: string, subdir: string): GitMem;
|
|
3968
|
+
walk(mem: GitMem, treeSha: string, prefix: string, want: string): void;
|
|
3969
|
+
mayEnter(path: string, want: string): boolean;
|
|
3970
|
+
splitSegs(path: string): Array<string>;
|
|
3971
|
+
asTreeSha(sha: string): string;
|
|
3972
|
+
treeAt(sha: string, subdir: string): string;
|
|
3973
|
+
underSubdir(path: string, want: string): boolean;
|
|
3974
|
+
stripSubdir(path: string, want: string): string;
|
|
3975
|
+
baseName(path: string): string;
|
|
3976
|
+
writeDisk(mem: GitMem, root: string): void;
|
|
3977
|
+
dirOf(path: string): string;
|
|
3978
|
+
splitPath(path: string): Array<string>;
|
|
3979
|
+
fileText(mem: GitMem, path: string): string;
|
|
3980
|
+
}
|
|
3981
|
+
export declare class PkgVal {
|
|
3982
|
+
kind: string;
|
|
3983
|
+
str: string;
|
|
3984
|
+
num: number;
|
|
3985
|
+
flag: boolean;
|
|
3986
|
+
keys: Array<string>;
|
|
3987
|
+
vals: Array<PkgVal>;
|
|
3988
|
+
constructor();
|
|
3989
|
+
}
|
|
3990
|
+
export declare class PkgJson {
|
|
3991
|
+
text: string;
|
|
3992
|
+
i: number;
|
|
3993
|
+
n: number;
|
|
3994
|
+
ok: boolean;
|
|
3995
|
+
err: string;
|
|
3996
|
+
constructor();
|
|
3997
|
+
parse(src: string): PkgVal;
|
|
3998
|
+
skip(): void;
|
|
3999
|
+
value(): PkgVal;
|
|
4000
|
+
object(): PkgVal;
|
|
4001
|
+
str(): string;
|
|
4002
|
+
num(): number;
|
|
4003
|
+
static child(obj: PkgVal, key: string): PkgVal | undefined;
|
|
4004
|
+
static strOf(obj: PkgVal, key: string): string;
|
|
4005
|
+
static intOf(obj: PkgVal, key: string): number;
|
|
4006
|
+
}
|
|
4007
|
+
export declare class PkgDep {
|
|
4008
|
+
name: string;
|
|
4009
|
+
path: string;
|
|
4010
|
+
git: string;
|
|
4011
|
+
rev: string;
|
|
4012
|
+
tag: string;
|
|
4013
|
+
subdir: string;
|
|
4014
|
+
constructor();
|
|
4015
|
+
}
|
|
4016
|
+
export declare class PkgManifest {
|
|
4017
|
+
name: string;
|
|
4018
|
+
version: string;
|
|
4019
|
+
entry: string;
|
|
4020
|
+
license: string;
|
|
4021
|
+
deps: Array<PkgDep>;
|
|
4022
|
+
ok: boolean;
|
|
4023
|
+
err: string;
|
|
4024
|
+
constructor();
|
|
4025
|
+
}
|
|
4026
|
+
export declare class PkgLockEnt {
|
|
4027
|
+
name: string;
|
|
4028
|
+
path: string;
|
|
4029
|
+
git: string;
|
|
4030
|
+
rev: string;
|
|
4031
|
+
subdir: string;
|
|
4032
|
+
sha256: string;
|
|
4033
|
+
constructor();
|
|
4034
|
+
}
|
|
4035
|
+
export declare class PkgLock {
|
|
4036
|
+
lockVersion: number;
|
|
4037
|
+
packages: Array<PkgLockEnt>;
|
|
4038
|
+
ok: boolean;
|
|
4039
|
+
err: string;
|
|
4040
|
+
constructor();
|
|
4041
|
+
}
|
|
4042
|
+
export declare class PkgManifestIO {
|
|
4043
|
+
constructor();
|
|
4044
|
+
static load(src: string): PkgManifest;
|
|
4045
|
+
static loadLock(src: string): PkgLock;
|
|
4046
|
+
static escape(s: string): string;
|
|
4047
|
+
static dumpLock(lock: PkgLock): string;
|
|
4048
|
+
static dumpManifest(m: PkgManifest): string;
|
|
4049
|
+
}
|
|
4050
|
+
export declare class PkgCache {
|
|
4051
|
+
constructor();
|
|
4052
|
+
static lessStr(a: string, b: string): boolean;
|
|
4053
|
+
static hashMem(mem: GitMem): string;
|
|
4054
|
+
static put(mem: GitMem, cacheRoot: string): string;
|
|
4055
|
+
static lockFor(name: string, git: string, rev: string, subdir: string, hash: string): PkgLockEnt;
|
|
4056
|
+
}
|
|
4057
|
+
export declare class PkgFetchWork {
|
|
4058
|
+
dir: string;
|
|
4059
|
+
man: PkgManifest;
|
|
4060
|
+
git: string;
|
|
4061
|
+
rev: string;
|
|
4062
|
+
subdir: string;
|
|
4063
|
+
fromGit: boolean;
|
|
4064
|
+
constructor();
|
|
4065
|
+
}
|
|
4066
|
+
export declare class PkgFetch {
|
|
4067
|
+
ok: boolean;
|
|
4068
|
+
err: string;
|
|
4069
|
+
cacheRoot: string;
|
|
4070
|
+
cacheOverride: string;
|
|
4071
|
+
rootDir: string;
|
|
4072
|
+
tmpRoot: string;
|
|
4073
|
+
httpTool: string;
|
|
4074
|
+
vendor: boolean;
|
|
4075
|
+
frozen: boolean;
|
|
4076
|
+
force: boolean;
|
|
4077
|
+
lock: PkgLock;
|
|
4078
|
+
previous: PkgLock;
|
|
4079
|
+
seen: {
|
|
4080
|
+
[key: string]: boolean;
|
|
4081
|
+
};
|
|
4082
|
+
lastRev: string;
|
|
4083
|
+
lastMem: GitMem;
|
|
4084
|
+
constructor();
|
|
4085
|
+
runHttp(args: Array<string>): boolean;
|
|
4086
|
+
advertise(url: string, dest: string): boolean;
|
|
4087
|
+
post(url: string, body: string, dest: string): boolean;
|
|
4088
|
+
fetchInto(name: string, url: string, wantRev: string, subdir: string): string;
|
|
4089
|
+
storeMem(mem: GitMem): string;
|
|
4090
|
+
cachedFor(env: InputEnv, name: string, git: string, rev: string, subdir: string): string;
|
|
4091
|
+
install(env: InputEnv, manDir: string): Promise<boolean>;
|
|
4092
|
+
oneDep(env: InputEnv, pending: Array<PkgFetchWork>, w: PkgFetchWork, d: PkgDep): Promise<boolean>;
|
|
4093
|
+
static findHttpTool(env: InputEnv): string;
|
|
4094
|
+
static splitPath(path: string): Array<string>;
|
|
4095
|
+
static readBytes(path: string): Uint8Array;
|
|
4096
|
+
static writeBytes(path: string, data: Uint8Array): void;
|
|
4097
|
+
static loadPack(path: string): GitPack;
|
|
4098
|
+
}
|
|
3707
4099
|
export declare class RangerDocGenerator {
|
|
3708
4100
|
constructor();
|
|
3709
4101
|
writeTypeDef(item: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -3863,6 +4255,7 @@ export declare class VirtualCompiler {
|
|
|
3863
4255
|
fillStr(cnt: number): string;
|
|
3864
4256
|
detectLanguageFromExtension(filename: string): string;
|
|
3865
4257
|
isTypeScriptExtension(filename: string): boolean;
|
|
4258
|
+
runInstall(env: InputEnv, params: CmdParams, cli: CLIProgress): Promise<boolean>;
|
|
3866
4259
|
run(env: InputEnv): Promise<CompilerResults>;
|
|
3867
4260
|
static create_env(): Promise<void>;
|
|
3868
4261
|
static displayCompilerErrorsWithCLI(appCtx: RangerAppWriterContext, cli: CLIProgress): void;
|