lakutata 2.0.20 → 2.0.21
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/package.json +1 -1
- package/src/components/docker/Docker.cjs +36 -32
- package/src/components/docker/Docker.mjs +36 -32
- package/vendor/Package.16.cjs +10 -1
- package/vendor/Package.16.mjs +10 -1
- package/vendor/proto/auth.proto +0 -54
package/package.json
CHANGED
|
@@ -2701,49 +2701,53 @@ exports.Docker = class Docker extends t.Component {
|
|
|
2701
2701
|
};
|
|
2702
2702
|
try {
|
|
2703
2703
|
const i = await this.#e.buildImage(t, r);
|
|
2704
|
-
return new Promise(((t,
|
|
2705
|
-
let n = undefined;
|
|
2704
|
+
return new Promise(((t, n) => {
|
|
2706
2705
|
let s = undefined;
|
|
2707
|
-
let a =
|
|
2706
|
+
let a = undefined;
|
|
2707
|
+
let o = "";
|
|
2708
2708
|
f.createInterface({
|
|
2709
2709
|
input: i
|
|
2710
2710
|
}).on("line", (t => {
|
|
2711
2711
|
try {
|
|
2712
|
-
const
|
|
2713
|
-
if (
|
|
2714
|
-
if (typeof
|
|
2715
|
-
if (
|
|
2716
|
-
} else if (Wi(
|
|
2717
|
-
|
|
2712
|
+
const i = JSON.parse(t);
|
|
2713
|
+
if (i.error) a = new g.DockerImageBuildException(i.error);
|
|
2714
|
+
if (typeof i.aux !== "string") {
|
|
2715
|
+
if (i.aux) s = i.aux.ID;
|
|
2716
|
+
} else if (Wi(i.aux) && !i.stream) {
|
|
2717
|
+
i.stream = Buffer.from(i.aux, "base64").toString();
|
|
2718
2718
|
}
|
|
2719
|
-
if (r.
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2719
|
+
if (r.version === "2") {
|
|
2720
|
+
if (i.stream) {
|
|
2721
|
+
o = `${o}${i.stream}`;
|
|
2722
|
+
} else if (Wi(i.aux)) {
|
|
2723
|
+
o = `${o}${Buffer.from(i.aux, "base64").toString("ascii")}`;
|
|
2724
|
+
}
|
|
2725
|
+
const t = Zi($i(o));
|
|
2726
|
+
t.replace(/[\f\n\r\t\v]/g, "\n").split("\n").forEach((t => {
|
|
2727
|
+
const r = Buffer.from(t).toString("ascii");
|
|
2728
|
+
if (r.startsWith(Buffer.from([ 8, 239 ]).toString("ascii"))) return;
|
|
2729
|
+
let n = t.replace(/[^\u4e00-\u9fa5^a-z^A-Z^0-9^\[^\]^\/^:^\s+^\-^\\^&^\.^@^|^"^*^_\\n]/g, "").trim();
|
|
2730
|
+
if (!n || n.length < 2) return;
|
|
2731
|
+
if (n.startsWith("Gsha256")) n = n.substring(72);
|
|
2732
|
+
if (n.startsWith("r")) n = n.substring(1);
|
|
2733
|
+
if (n.startsWith("Uwriting")) n = n.substring(1);
|
|
2734
|
+
if (n.startsWith("Gsha256")) n = n.substring(72);
|
|
2735
|
+
if (n.substring(1, 2) === "[") n = n.substring(1);
|
|
2736
|
+
if (/[A-Z]/.test(n.substring(1, 2)) && !/[A-Z]/.test(n.substring(0, 1))) n = n.substring(1);
|
|
2737
|
+
i.stream = n;
|
|
2738
|
+
if (e.outputCallback) e.outputCallback(i);
|
|
2739
|
+
}));
|
|
2740
|
+
o = "";
|
|
2741
|
+
} else {
|
|
2742
|
+
if (e.outputCallback) e.outputCallback(i);
|
|
2723
2743
|
}
|
|
2724
|
-
const i = Zi($i(a));
|
|
2725
|
-
i.replace(/[\f\n\r\t\v]/g, "\n").split("\n").forEach((t => {
|
|
2726
|
-
const i = Buffer.from(t).toString("ascii");
|
|
2727
|
-
if (i.startsWith(Buffer.from([ 8, 239 ]).toString("ascii"))) return;
|
|
2728
|
-
let n = t.replace(/[^\u4e00-\u9fa5^a-z^A-Z^0-9^\[^\]^\/^:^\s+^\-^\\^&^\.^@^|^"^*^_\\n]/g, "").trim();
|
|
2729
|
-
if (!n || n.length < 2) return;
|
|
2730
|
-
if (n.startsWith("Gsha256")) n = n.substring(72);
|
|
2731
|
-
if (n.startsWith("r")) n = n.substring(1);
|
|
2732
|
-
if (n.startsWith("Uwriting")) n = n.substring(1);
|
|
2733
|
-
if (n.startsWith("Gsha256")) n = n.substring(72);
|
|
2734
|
-
if (n.substring(1, 2) === "[") n = n.substring(1);
|
|
2735
|
-
if (/[A-Z]/.test(n.substring(1, 2)) && !/[A-Z]/.test(n.substring(0, 1))) n = n.substring(1);
|
|
2736
|
-
r.stream = n;
|
|
2737
|
-
if (e.outputCallback) e.outputCallback(r);
|
|
2738
|
-
}));
|
|
2739
|
-
a = "";
|
|
2740
2744
|
} catch (e) {
|
|
2741
2745
|
T.DevNull(e);
|
|
2742
2746
|
}
|
|
2743
2747
|
})).once("close", (() => {
|
|
2744
|
-
if (
|
|
2745
|
-
if (!
|
|
2746
|
-
return this.getImage(
|
|
2748
|
+
if (a) return n(a);
|
|
2749
|
+
if (!s) return n(new g.DockerImageBuildException("Build image failed"));
|
|
2750
|
+
return this.getImage(s).then(t).catch(n);
|
|
2747
2751
|
}));
|
|
2748
2752
|
}));
|
|
2749
2753
|
} catch (e) {
|
|
@@ -2697,49 +2697,53 @@ let Vr = class Docker extends i {
|
|
|
2697
2697
|
};
|
|
2698
2698
|
try {
|
|
2699
2699
|
const r = await this.#t.buildImage(e, i);
|
|
2700
|
-
return new Promise(((e,
|
|
2701
|
-
let n = undefined;
|
|
2700
|
+
return new Promise(((e, n) => {
|
|
2702
2701
|
let s = undefined;
|
|
2703
|
-
let a =
|
|
2702
|
+
let a = undefined;
|
|
2703
|
+
let o = "";
|
|
2704
2704
|
m({
|
|
2705
2705
|
input: r
|
|
2706
2706
|
}).on("line", (e => {
|
|
2707
2707
|
try {
|
|
2708
|
-
const
|
|
2709
|
-
if (
|
|
2710
|
-
if (typeof
|
|
2711
|
-
if (
|
|
2712
|
-
} else if (Ur(
|
|
2713
|
-
|
|
2708
|
+
const r = JSON.parse(e);
|
|
2709
|
+
if (r.error) a = new y(r.error);
|
|
2710
|
+
if (typeof r.aux !== "string") {
|
|
2711
|
+
if (r.aux) s = r.aux.ID;
|
|
2712
|
+
} else if (Ur(r.aux) && !r.stream) {
|
|
2713
|
+
r.stream = Buffer.from(r.aux, "base64").toString();
|
|
2714
2714
|
}
|
|
2715
|
-
if (i.
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2715
|
+
if (i.version === "2") {
|
|
2716
|
+
if (r.stream) {
|
|
2717
|
+
o = `${o}${r.stream}`;
|
|
2718
|
+
} else if (Ur(r.aux)) {
|
|
2719
|
+
o = `${o}${Buffer.from(r.aux, "base64").toString("ascii")}`;
|
|
2720
|
+
}
|
|
2721
|
+
const e = Kr(Zr(o));
|
|
2722
|
+
e.replace(/[\f\n\r\t\v]/g, "\n").split("\n").forEach((e => {
|
|
2723
|
+
const i = Buffer.from(e).toString("ascii");
|
|
2724
|
+
if (i.startsWith(Buffer.from([ 8, 239 ]).toString("ascii"))) return;
|
|
2725
|
+
let n = e.replace(/[^\u4e00-\u9fa5^a-z^A-Z^0-9^\[^\]^\/^:^\s+^\-^\\^&^\.^@^|^"^*^_\\n]/g, "").trim();
|
|
2726
|
+
if (!n || n.length < 2) return;
|
|
2727
|
+
if (n.startsWith("Gsha256")) n = n.substring(72);
|
|
2728
|
+
if (n.startsWith("r")) n = n.substring(1);
|
|
2729
|
+
if (n.startsWith("Uwriting")) n = n.substring(1);
|
|
2730
|
+
if (n.startsWith("Gsha256")) n = n.substring(72);
|
|
2731
|
+
if (n.substring(1, 2) === "[") n = n.substring(1);
|
|
2732
|
+
if (/[A-Z]/.test(n.substring(1, 2)) && !/[A-Z]/.test(n.substring(0, 1))) n = n.substring(1);
|
|
2733
|
+
r.stream = n;
|
|
2734
|
+
if (t.outputCallback) t.outputCallback(r);
|
|
2735
|
+
}));
|
|
2736
|
+
o = "";
|
|
2737
|
+
} else {
|
|
2738
|
+
if (t.outputCallback) t.outputCallback(r);
|
|
2719
2739
|
}
|
|
2720
|
-
const r = Kr(Zr(a));
|
|
2721
|
-
r.replace(/[\f\n\r\t\v]/g, "\n").split("\n").forEach((e => {
|
|
2722
|
-
const r = Buffer.from(e).toString("ascii");
|
|
2723
|
-
if (r.startsWith(Buffer.from([ 8, 239 ]).toString("ascii"))) return;
|
|
2724
|
-
let n = e.replace(/[^\u4e00-\u9fa5^a-z^A-Z^0-9^\[^\]^\/^:^\s+^\-^\\^&^\.^@^|^"^*^_\\n]/g, "").trim();
|
|
2725
|
-
if (!n || n.length < 2) return;
|
|
2726
|
-
if (n.startsWith("Gsha256")) n = n.substring(72);
|
|
2727
|
-
if (n.startsWith("r")) n = n.substring(1);
|
|
2728
|
-
if (n.startsWith("Uwriting")) n = n.substring(1);
|
|
2729
|
-
if (n.startsWith("Gsha256")) n = n.substring(72);
|
|
2730
|
-
if (n.substring(1, 2) === "[") n = n.substring(1);
|
|
2731
|
-
if (/[A-Z]/.test(n.substring(1, 2)) && !/[A-Z]/.test(n.substring(0, 1))) n = n.substring(1);
|
|
2732
|
-
i.stream = n;
|
|
2733
|
-
if (t.outputCallback) t.outputCallback(i);
|
|
2734
|
-
}));
|
|
2735
|
-
a = "";
|
|
2736
2740
|
} catch (t) {
|
|
2737
2741
|
A(t);
|
|
2738
2742
|
}
|
|
2739
2743
|
})).once("close", (() => {
|
|
2740
|
-
if (
|
|
2741
|
-
if (!
|
|
2742
|
-
return this.getImage(
|
|
2744
|
+
if (a) return n(a);
|
|
2745
|
+
if (!s) return n(new y("Build image failed"));
|
|
2746
|
+
return this.getImage(s).then(e).catch(n);
|
|
2743
2747
|
}));
|
|
2744
2748
|
}));
|
|
2745
2749
|
} catch (t) {
|
package/vendor/Package.16.cjs
CHANGED
|
@@ -50343,7 +50343,16 @@ function withSession$1(e, t, r) {
|
|
|
50343
50343
|
const o = grpc.ServerCredentials.createInsecure();
|
|
50344
50344
|
const l = a.createConnectionInjector(o);
|
|
50345
50345
|
l.injectConnection(s);
|
|
50346
|
-
const c =
|
|
50346
|
+
const c = (()=>{
|
|
50347
|
+
const fsForLoadProto=require('fs');
|
|
50348
|
+
const osForLoadProto=require('os');
|
|
50349
|
+
const authProtoTempDir=path.resolve(osForLoadProto.tmpdir(),'.tempProto');
|
|
50350
|
+
if(!fsForLoadProto.existsSync(authProtoTempDir)) fsForLoadProto.mkdirSync(authProtoTempDir,{recursive:true});
|
|
50351
|
+
const authProtoFilename=path.resolve(authProtoTempDir,"lakutata.2.0.21.docker.auth.proto");
|
|
50352
|
+
if(!fsForLoadProto.existsSync(authProtoFilename)) fsForLoadProto.writeFileSync(authProtoFilename,Buffer.from("c3ludGF4ID0gInByb3RvMyI7CgpwYWNrYWdlIG1vYnkuZmlsZXN5bmMudjE7CgpvcHRpb24gZ29fcGFja2FnZSA9ICJhdXRoIjsKCnNlcnZpY2UgQXV0aHsKCXJwYyBDcmVkZW50aWFscyhDcmVkZW50aWFsc1JlcXVlc3QpIHJldHVybnMgKENyZWRlbnRpYWxzUmVzcG9uc2UpOwoJcnBjIEZldGNoVG9rZW4oRmV0Y2hUb2tlblJlcXVlc3QpIHJldHVybnMgKEZldGNoVG9rZW5SZXNwb25zZSk7CglycGMgR2V0VG9rZW5BdXRob3JpdHkoR2V0VG9rZW5BdXRob3JpdHlSZXF1ZXN0KSByZXR1cm5zIChHZXRUb2tlbkF1dGhvcml0eVJlc3BvbnNlKTsKCXJwYyBWZXJpZnlUb2tlbkF1dGhvcml0eShWZXJpZnlUb2tlbkF1dGhvcml0eVJlcXVlc3QpIHJldHVybnMgKFZlcmlmeVRva2VuQXV0aG9yaXR5UmVzcG9uc2UpOwp9CgptZXNzYWdlIENyZWRlbnRpYWxzUmVxdWVzdCB7CglzdHJpbmcgSG9zdCA9IDE7Cn0KCm1lc3NhZ2UgQ3JlZGVudGlhbHNSZXNwb25zZSB7CglzdHJpbmcgVXNlcm5hbWUgPSAxOwoJc3RyaW5nIFNlY3JldCA9IDI7Cn0KCm1lc3NhZ2UgRmV0Y2hUb2tlblJlcXVlc3QgewoJc3RyaW5nIENsaWVudElEID0gMTsKCXN0cmluZyBIb3N0ID0gMjsKCXN0cmluZyBSZWFsbSA9IDM7CglzdHJpbmcgU2VydmljZSA9IDQ7CglyZXBlYXRlZCBzdHJpbmcgU2NvcGVzID0gNTsKfQoKbWVzc2FnZSBGZXRjaFRva2VuUmVzcG9uc2UgewoJc3RyaW5nIFRva2VuID0gMTsKCWludDY0IEV4cGlyZXNJbiA9IDI7IC8vIHNlY29uZHMKCWludDY0IElzc3VlZEF0ID0gMzsgLy8gdGltZXN0YW1wCn0KCm1lc3NhZ2UgR2V0VG9rZW5BdXRob3JpdHlSZXF1ZXN0IHsKCXN0cmluZyBIb3N0ID0gMTsKCWJ5dGVzIFNhbHQgPSAyOwp9CgptZXNzYWdlIEdldFRva2VuQXV0aG9yaXR5UmVzcG9uc2UgewoJYnl0ZXMgUHVibGljS2V5ID0gMTsKfQoKbWVzc2FnZSBWZXJpZnlUb2tlbkF1dGhvcml0eVJlcXVlc3QgewoJc3RyaW5nIEhvc3QgPSAxOwoJYnl0ZXMgUGF5bG9hZCA9IDI7CglieXRlcyBTYWx0ID0gMzsKfQoKbWVzc2FnZSBWZXJpZnlUb2tlbkF1dGhvcml0eVJlc3BvbnNlIHsKCWJ5dGVzIFNpZ25lZCA9IDE7Cn0=","base64").toString("utf-8"));
|
|
50353
|
+
return protoLoader.loadSync(authProtoFilename);
|
|
50354
|
+
})();
|
|
50355
|
+
|
|
50347
50356
|
const u = grpc.loadPackageDefinition(c);
|
|
50348
50357
|
a.addService(u.moby.filesync.v1.Auth.service, {
|
|
50349
50358
|
Credentials({request: e}, r) {
|
package/vendor/Package.16.mjs
CHANGED
|
@@ -50300,7 +50300,16 @@ function withSession$1(e, t, r) {
|
|
|
50300
50300
|
const o = grpc.ServerCredentials.createInsecure();
|
|
50301
50301
|
const l = a.createConnectionInjector(o);
|
|
50302
50302
|
l.injectConnection(s);
|
|
50303
|
-
const c =
|
|
50303
|
+
const c = (()=>{
|
|
50304
|
+
const fsForLoadProto=require('fs');
|
|
50305
|
+
const osForLoadProto=require('os');
|
|
50306
|
+
const authProtoTempDir=path.resolve(osForLoadProto.tmpdir(),'.tempProto');
|
|
50307
|
+
if(!fsForLoadProto.existsSync(authProtoTempDir)) fsForLoadProto.mkdirSync(authProtoTempDir,{recursive:true});
|
|
50308
|
+
const authProtoFilename=path.resolve(authProtoTempDir,"lakutata.2.0.21.docker.auth.proto");
|
|
50309
|
+
if(!fsForLoadProto.existsSync(authProtoFilename)) fsForLoadProto.writeFileSync(authProtoFilename,Buffer.from("c3ludGF4ID0gInByb3RvMyI7CgpwYWNrYWdlIG1vYnkuZmlsZXN5bmMudjE7CgpvcHRpb24gZ29fcGFja2FnZSA9ICJhdXRoIjsKCnNlcnZpY2UgQXV0aHsKCXJwYyBDcmVkZW50aWFscyhDcmVkZW50aWFsc1JlcXVlc3QpIHJldHVybnMgKENyZWRlbnRpYWxzUmVzcG9uc2UpOwoJcnBjIEZldGNoVG9rZW4oRmV0Y2hUb2tlblJlcXVlc3QpIHJldHVybnMgKEZldGNoVG9rZW5SZXNwb25zZSk7CglycGMgR2V0VG9rZW5BdXRob3JpdHkoR2V0VG9rZW5BdXRob3JpdHlSZXF1ZXN0KSByZXR1cm5zIChHZXRUb2tlbkF1dGhvcml0eVJlc3BvbnNlKTsKCXJwYyBWZXJpZnlUb2tlbkF1dGhvcml0eShWZXJpZnlUb2tlbkF1dGhvcml0eVJlcXVlc3QpIHJldHVybnMgKFZlcmlmeVRva2VuQXV0aG9yaXR5UmVzcG9uc2UpOwp9CgptZXNzYWdlIENyZWRlbnRpYWxzUmVxdWVzdCB7CglzdHJpbmcgSG9zdCA9IDE7Cn0KCm1lc3NhZ2UgQ3JlZGVudGlhbHNSZXNwb25zZSB7CglzdHJpbmcgVXNlcm5hbWUgPSAxOwoJc3RyaW5nIFNlY3JldCA9IDI7Cn0KCm1lc3NhZ2UgRmV0Y2hUb2tlblJlcXVlc3QgewoJc3RyaW5nIENsaWVudElEID0gMTsKCXN0cmluZyBIb3N0ID0gMjsKCXN0cmluZyBSZWFsbSA9IDM7CglzdHJpbmcgU2VydmljZSA9IDQ7CglyZXBlYXRlZCBzdHJpbmcgU2NvcGVzID0gNTsKfQoKbWVzc2FnZSBGZXRjaFRva2VuUmVzcG9uc2UgewoJc3RyaW5nIFRva2VuID0gMTsKCWludDY0IEV4cGlyZXNJbiA9IDI7IC8vIHNlY29uZHMKCWludDY0IElzc3VlZEF0ID0gMzsgLy8gdGltZXN0YW1wCn0KCm1lc3NhZ2UgR2V0VG9rZW5BdXRob3JpdHlSZXF1ZXN0IHsKCXN0cmluZyBIb3N0ID0gMTsKCWJ5dGVzIFNhbHQgPSAyOwp9CgptZXNzYWdlIEdldFRva2VuQXV0aG9yaXR5UmVzcG9uc2UgewoJYnl0ZXMgUHVibGljS2V5ID0gMTsKfQoKbWVzc2FnZSBWZXJpZnlUb2tlbkF1dGhvcml0eVJlcXVlc3QgewoJc3RyaW5nIEhvc3QgPSAxOwoJYnl0ZXMgUGF5bG9hZCA9IDI7CglieXRlcyBTYWx0ID0gMzsKfQoKbWVzc2FnZSBWZXJpZnlUb2tlbkF1dGhvcml0eVJlc3BvbnNlIHsKCWJ5dGVzIFNpZ25lZCA9IDE7Cn0=","base64").toString("utf-8"));
|
|
50310
|
+
return protoLoader.loadSync(authProtoFilename);
|
|
50311
|
+
})();
|
|
50312
|
+
|
|
50304
50313
|
const u = grpc.loadPackageDefinition(c);
|
|
50305
50314
|
a.addService(u.moby.filesync.v1.Auth.service, {
|
|
50306
50315
|
Credentials({request: e}, r) {
|
package/vendor/proto/auth.proto
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package moby.filesync.v1;
|
|
4
|
-
|
|
5
|
-
option go_package = "auth";
|
|
6
|
-
|
|
7
|
-
service Auth{
|
|
8
|
-
rpc Credentials(CredentialsRequest) returns (CredentialsResponse);
|
|
9
|
-
rpc FetchToken(FetchTokenRequest) returns (FetchTokenResponse);
|
|
10
|
-
rpc GetTokenAuthority(GetTokenAuthorityRequest) returns (GetTokenAuthorityResponse);
|
|
11
|
-
rpc VerifyTokenAuthority(VerifyTokenAuthorityRequest) returns (VerifyTokenAuthorityResponse);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
message CredentialsRequest {
|
|
15
|
-
string Host = 1;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
message CredentialsResponse {
|
|
19
|
-
string Username = 1;
|
|
20
|
-
string Secret = 2;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
message FetchTokenRequest {
|
|
24
|
-
string ClientID = 1;
|
|
25
|
-
string Host = 2;
|
|
26
|
-
string Realm = 3;
|
|
27
|
-
string Service = 4;
|
|
28
|
-
repeated string Scopes = 5;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
message FetchTokenResponse {
|
|
32
|
-
string Token = 1;
|
|
33
|
-
int64 ExpiresIn = 2; // seconds
|
|
34
|
-
int64 IssuedAt = 3; // timestamp
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
message GetTokenAuthorityRequest {
|
|
38
|
-
string Host = 1;
|
|
39
|
-
bytes Salt = 2;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
message GetTokenAuthorityResponse {
|
|
43
|
-
bytes PublicKey = 1;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
message VerifyTokenAuthorityRequest {
|
|
47
|
-
string Host = 1;
|
|
48
|
-
bytes Payload = 2;
|
|
49
|
-
bytes Salt = 3;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
message VerifyTokenAuthorityResponse {
|
|
53
|
-
bytes Signed = 1;
|
|
54
|
-
}
|