@papert-code/papert-code 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +18 -16
- package/package.json +5 -3
package/dist/cli.js
CHANGED
|
@@ -182638,7 +182638,7 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
|
|
|
182638
182638
|
};
|
|
182639
182639
|
}
|
|
182640
182640
|
async function createContentGenerator(config, gcConfig, sessionId2) {
|
|
182641
|
-
const version2 = "0.2.
|
|
182641
|
+
const version2 = "0.2.3";
|
|
182642
182642
|
const userAgent2 = `PapertCode/${version2} (${process.platform}; ${process.arch})`;
|
|
182643
182643
|
const baseHeaders = {
|
|
182644
182644
|
"User-Agent": userAgent2
|
|
@@ -321474,12 +321474,12 @@ var Header2 = class {
|
|
|
321474
321474
|
if (!buf || !(buf.length >= off + 512)) {
|
|
321475
321475
|
throw new Error("need 512 bytes for header");
|
|
321476
321476
|
}
|
|
321477
|
-
this.path = decString(buf, off, 100);
|
|
321478
|
-
this.mode = decNumber(buf, off + 100, 8);
|
|
321479
|
-
this.uid = decNumber(buf, off + 108, 8);
|
|
321480
|
-
this.gid = decNumber(buf, off + 116, 8);
|
|
321481
|
-
this.size = decNumber(buf, off + 124, 12);
|
|
321482
|
-
this.mtime = decDate(buf, off + 136, 12);
|
|
321477
|
+
this.path = ex?.path ?? decString(buf, off, 100);
|
|
321478
|
+
this.mode = ex?.mode ?? gex?.mode ?? decNumber(buf, off + 100, 8);
|
|
321479
|
+
this.uid = ex?.uid ?? gex?.uid ?? decNumber(buf, off + 108, 8);
|
|
321480
|
+
this.gid = ex?.gid ?? gex?.gid ?? decNumber(buf, off + 116, 8);
|
|
321481
|
+
this.size = ex?.size ?? gex?.size ?? decNumber(buf, off + 124, 12);
|
|
321482
|
+
this.mtime = ex?.mtime ?? gex?.mtime ?? decDate(buf, off + 136, 12);
|
|
321483
321483
|
this.cksum = decNumber(buf, off + 148, 12);
|
|
321484
321484
|
if (gex)
|
|
321485
321485
|
this.#slurp(gex, true);
|
|
@@ -321497,10 +321497,10 @@ var Header2 = class {
|
|
|
321497
321497
|
}
|
|
321498
321498
|
this.linkpath = decString(buf, off + 157, 100);
|
|
321499
321499
|
if (buf.subarray(off + 257, off + 265).toString() === "ustar\x0000") {
|
|
321500
|
-
this.uname = decString(buf, off + 265, 32);
|
|
321501
|
-
this.gname = decString(buf, off + 297, 32);
|
|
321502
|
-
this.devmaj = decNumber(buf, off + 329, 8) ?? 0;
|
|
321503
|
-
this.devmin = decNumber(buf, off + 337, 8) ?? 0;
|
|
321500
|
+
this.uname = ex?.uname ?? gex?.uname ?? decString(buf, off + 265, 32);
|
|
321501
|
+
this.gname = ex?.gname ?? gex?.gname ?? decString(buf, off + 297, 32);
|
|
321502
|
+
this.devmaj = ex?.devmaj ?? gex?.devmaj ?? decNumber(buf, off + 329, 8) ?? 0;
|
|
321503
|
+
this.devmin = ex?.devmin ?? gex?.devmin ?? decNumber(buf, off + 337, 8) ?? 0;
|
|
321504
321504
|
if (buf[off + 475] !== 0) {
|
|
321505
321505
|
const prefix = decString(buf, off + 345, 155);
|
|
321506
321506
|
this.path = prefix + "/" + this.path;
|
|
@@ -321509,8 +321509,8 @@ var Header2 = class {
|
|
|
321509
321509
|
if (prefix) {
|
|
321510
321510
|
this.path = prefix + "/" + this.path;
|
|
321511
321511
|
}
|
|
321512
|
-
this.atime = decDate(buf, off + 476, 12);
|
|
321513
|
-
this.ctime = decDate(buf, off + 488, 12);
|
|
321512
|
+
this.atime = ex?.atime ?? gex?.atime ?? decDate(buf, off + 476, 12);
|
|
321513
|
+
this.ctime = ex?.ctime ?? gex?.ctime ?? decDate(buf, off + 488, 12);
|
|
321514
321514
|
}
|
|
321515
321515
|
}
|
|
321516
321516
|
let sum = 8 * 32;
|
|
@@ -322456,13 +322456,15 @@ var listFileSync = /* @__PURE__ */ __name((opt) => {
|
|
|
322456
322456
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
322457
322457
|
if (stat7.size < readSize) {
|
|
322458
322458
|
const buf = Buffer.allocUnsafe(stat7.size);
|
|
322459
|
-
fs58.readSync(fd, buf, 0, stat7.size, 0);
|
|
322460
|
-
p.end(buf);
|
|
322459
|
+
const read2 = fs58.readSync(fd, buf, 0, stat7.size, 0);
|
|
322460
|
+
p.end(read2 === buf.byteLength ? buf : buf.subarray(0, read2));
|
|
322461
322461
|
} else {
|
|
322462
322462
|
let pos2 = 0;
|
|
322463
322463
|
const buf = Buffer.allocUnsafe(readSize);
|
|
322464
322464
|
while (pos2 < stat7.size) {
|
|
322465
322465
|
const bytesRead = fs58.readSync(fd, buf, 0, readSize, pos2);
|
|
322466
|
+
if (bytesRead === 0)
|
|
322467
|
+
break;
|
|
322466
322468
|
pos2 += bytesRead;
|
|
322467
322469
|
p.write(buf.subarray(0, bytesRead));
|
|
322468
322470
|
}
|
|
@@ -339145,7 +339147,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
339145
339147
|
// packages/cli/src/utils/version.ts
|
|
339146
339148
|
async function getCliVersion() {
|
|
339147
339149
|
const pkgJson = await getPackageJson();
|
|
339148
|
-
return "0.2.
|
|
339150
|
+
return "0.2.3";
|
|
339149
339151
|
}
|
|
339150
339152
|
__name(getCliVersion, "getCliVersion");
|
|
339151
339153
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papert-code/papert-code",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.0.0"
|
|
6
6
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "git+https://github.com/PapertLM/papert-code.git"
|
|
14
14
|
},
|
|
15
15
|
"config": {
|
|
16
|
-
"sandboxImageUri": "ghcr.io/papertlm/papert-code:0.2.
|
|
16
|
+
"sandboxImageUri": "ghcr.io/papertlm/papert-code:0.2.3"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"start": "cross-env node scripts/start.js",
|
|
@@ -109,8 +109,10 @@
|
|
|
109
109
|
"yargs": "^17.7.2"
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
|
+
"@papert-code/papert-code": "^0.2.3",
|
|
112
113
|
"@testing-library/dom": "^10.4.1",
|
|
113
|
-
"simple-git": "^3.28.0"
|
|
114
|
+
"simple-git": "^3.28.0",
|
|
115
|
+
"tiktoken": "^1.0.21"
|
|
114
116
|
},
|
|
115
117
|
"optionalDependencies": {
|
|
116
118
|
"@lydell/node-pty": "1.1.0",
|