fullstacked 0.12.0-1186 → 0.12.0-1195
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/fullstacked_modules/ai/index.js +26 -26
- package/fullstacked_modules/ai/index.ts +1 -1
- package/fullstacked_modules/ai/package.json +1 -1
- package/fullstacked_modules/ai/tools/fs.ts +4 -4
- package/fullstacked_modules/bridge/index.ts +13 -15
- package/fullstacked_modules/bridge/platform/linux-gtk.ts +0 -1
- package/fullstacked_modules/bridge/platform/linux-qt.ts +21 -12
- package/fullstacked_modules/bridge/platform/node.ts +8 -5
- package/fullstacked_modules/config/config.ts +0 -1
- package/fullstacked_modules/esbuild/esbuild.ts +3 -9
- package/fullstacked_modules/esbuild/sass.ts +4 -4
- package/fullstacked_modules/git/git.ts +14 -24
- package/fullstacked_modules/packages/packages.ts +10 -11
- package/package.json +1 -1
|
@@ -4265,13 +4265,13 @@ var init_dist = __esm({
|
|
|
4265
4265
|
}
|
|
4266
4266
|
};
|
|
4267
4267
|
DefaultSplit = /\r\n?|\n/;
|
|
4268
|
-
MapMode = /* @__PURE__ */ function(MapMode2) {
|
|
4268
|
+
MapMode = /* @__PURE__ */ (function(MapMode2) {
|
|
4269
4269
|
MapMode2[MapMode2["Simple"] = 0] = "Simple";
|
|
4270
4270
|
MapMode2[MapMode2["TrackDel"] = 1] = "TrackDel";
|
|
4271
4271
|
MapMode2[MapMode2["TrackBefore"] = 2] = "TrackBefore";
|
|
4272
4272
|
MapMode2[MapMode2["TrackAfter"] = 3] = "TrackAfter";
|
|
4273
4273
|
return MapMode2;
|
|
4274
|
-
}(MapMode || (MapMode = {}));
|
|
4274
|
+
})(MapMode || (MapMode = {}));
|
|
4275
4275
|
ChangeDesc = class _ChangeDesc {
|
|
4276
4276
|
// Sections are encoded as pairs of integers. The first is the
|
|
4277
4277
|
// length in the current document, and the second is -1 for
|
|
@@ -5459,12 +5459,12 @@ var init_dist = __esm({
|
|
|
5459
5459
|
Transaction.addToHistory = /* @__PURE__ */ Annotation.define();
|
|
5460
5460
|
Transaction.remote = /* @__PURE__ */ Annotation.define();
|
|
5461
5461
|
none = [];
|
|
5462
|
-
CharCategory = /* @__PURE__ */ function(CharCategory2) {
|
|
5462
|
+
CharCategory = /* @__PURE__ */ (function(CharCategory2) {
|
|
5463
5463
|
CharCategory2[CharCategory2["Word"] = 0] = "Word";
|
|
5464
5464
|
CharCategory2[CharCategory2["Space"] = 1] = "Space";
|
|
5465
5465
|
CharCategory2[CharCategory2["Other"] = 2] = "Other";
|
|
5466
5466
|
return CharCategory2;
|
|
5467
|
-
}(CharCategory || (CharCategory = {}));
|
|
5467
|
+
})(CharCategory || (CharCategory = {}));
|
|
5468
5468
|
nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
|
|
5469
5469
|
try {
|
|
5470
5470
|
wordChar = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
|
|
@@ -10075,13 +10075,13 @@ var init_dist2 = __esm({
|
|
|
10075
10075
|
destroy(dom) {
|
|
10076
10076
|
}
|
|
10077
10077
|
};
|
|
10078
|
-
BlockType = /* @__PURE__ */ function(BlockType2) {
|
|
10078
|
+
BlockType = /* @__PURE__ */ (function(BlockType2) {
|
|
10079
10079
|
BlockType2[BlockType2["Text"] = 0] = "Text";
|
|
10080
10080
|
BlockType2[BlockType2["WidgetBefore"] = 1] = "WidgetBefore";
|
|
10081
10081
|
BlockType2[BlockType2["WidgetAfter"] = 2] = "WidgetAfter";
|
|
10082
10082
|
BlockType2[BlockType2["WidgetRange"] = 3] = "WidgetRange";
|
|
10083
10083
|
return BlockType2;
|
|
10084
|
-
}(BlockType || (BlockType = {}));
|
|
10084
|
+
})(BlockType || (BlockType = {}));
|
|
10085
10085
|
Decoration = class extends RangeValue {
|
|
10086
10086
|
constructor(startSide, endSide, widget, spec) {
|
|
10087
10087
|
super();
|
|
@@ -10659,11 +10659,11 @@ var init_dist2 = __esm({
|
|
|
10659
10659
|
};
|
|
10660
10660
|
NullWidget.inline = /* @__PURE__ */ new NullWidget("span");
|
|
10661
10661
|
NullWidget.block = /* @__PURE__ */ new NullWidget("div");
|
|
10662
|
-
Direction = /* @__PURE__ */ function(Direction2) {
|
|
10662
|
+
Direction = /* @__PURE__ */ (function(Direction2) {
|
|
10663
10663
|
Direction2[Direction2["LTR"] = 0] = "LTR";
|
|
10664
10664
|
Direction2[Direction2["RTL"] = 1] = "RTL";
|
|
10665
10665
|
return Direction2;
|
|
10666
|
-
}(Direction || (Direction = {}));
|
|
10666
|
+
})(Direction || (Direction = {}));
|
|
10667
10667
|
LTR = Direction.LTR;
|
|
10668
10668
|
RTL = Direction.RTL;
|
|
10669
10669
|
LowTypes = /* @__PURE__ */ dec("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008");
|
|
@@ -12263,12 +12263,12 @@ var init_dist2 = __esm({
|
|
|
12263
12263
|
return new _BlockInfo(this.from, this.length + other.length, this.top, this.height + other.height, content2);
|
|
12264
12264
|
}
|
|
12265
12265
|
};
|
|
12266
|
-
QueryType = /* @__PURE__ */ function(QueryType3) {
|
|
12266
|
+
QueryType = /* @__PURE__ */ (function(QueryType3) {
|
|
12267
12267
|
QueryType3[QueryType3["ByPos"] = 0] = "ByPos";
|
|
12268
12268
|
QueryType3[QueryType3["ByHeight"] = 1] = "ByHeight";
|
|
12269
12269
|
QueryType3[QueryType3["ByPosNoHeight"] = 2] = "ByPosNoHeight";
|
|
12270
12270
|
return QueryType3;
|
|
12271
|
-
}(QueryType || (QueryType = {}));
|
|
12271
|
+
})(QueryType || (QueryType = {}));
|
|
12272
12272
|
Epsilon = 1e-3;
|
|
12273
12273
|
HeightMap = class _HeightMap {
|
|
12274
12274
|
constructor(length, height, flags = 2) {
|
|
@@ -37512,14 +37512,14 @@ var ostring = () => stringType().optional();
|
|
|
37512
37512
|
var onumber = () => numberType().optional();
|
|
37513
37513
|
var oboolean = () => booleanType().optional();
|
|
37514
37514
|
var coerce = {
|
|
37515
|
-
string: (arg) => ZodString.create({ ...arg, coerce: true }),
|
|
37516
|
-
number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
|
|
37517
|
-
boolean: (arg) => ZodBoolean.create({
|
|
37515
|
+
string: ((arg) => ZodString.create({ ...arg, coerce: true })),
|
|
37516
|
+
number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),
|
|
37517
|
+
boolean: ((arg) => ZodBoolean.create({
|
|
37518
37518
|
...arg,
|
|
37519
37519
|
coerce: true
|
|
37520
|
-
}),
|
|
37521
|
-
bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
|
|
37522
|
-
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
37520
|
+
})),
|
|
37521
|
+
bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),
|
|
37522
|
+
date: ((arg) => ZodDate.create({ ...arg, coerce: true }))
|
|
37523
37523
|
};
|
|
37524
37524
|
var NEVER = INVALID;
|
|
37525
37525
|
|
|
@@ -56404,28 +56404,28 @@ var $ZodFunction = class {
|
|
|
56404
56404
|
if (typeof func !== "function") {
|
|
56405
56405
|
throw new Error("implement() must be called with a function");
|
|
56406
56406
|
}
|
|
56407
|
-
const impl = (...args) => {
|
|
56407
|
+
const impl = ((...args) => {
|
|
56408
56408
|
const parsedArgs = this._def.input ? parse2(this._def.input, args, void 0, { callee: impl }) : args;
|
|
56409
56409
|
if (!Array.isArray(parsedArgs)) {
|
|
56410
56410
|
throw new Error("Invalid arguments schema: not an array or tuple schema.");
|
|
56411
56411
|
}
|
|
56412
56412
|
const output = func(...parsedArgs);
|
|
56413
56413
|
return this._def.output ? parse2(this._def.output, output, void 0, { callee: impl }) : output;
|
|
56414
|
-
};
|
|
56414
|
+
});
|
|
56415
56415
|
return impl;
|
|
56416
56416
|
}
|
|
56417
56417
|
implementAsync(func) {
|
|
56418
56418
|
if (typeof func !== "function") {
|
|
56419
56419
|
throw new Error("implement() must be called with a function");
|
|
56420
56420
|
}
|
|
56421
|
-
const impl = async (...args) => {
|
|
56421
|
+
const impl = (async (...args) => {
|
|
56422
56422
|
const parsedArgs = this._def.input ? await parseAsync(this._def.input, args, void 0, { callee: impl }) : args;
|
|
56423
56423
|
if (!Array.isArray(parsedArgs)) {
|
|
56424
56424
|
throw new Error("Invalid arguments schema: not an array or tuple schema.");
|
|
56425
56425
|
}
|
|
56426
56426
|
const output = await func(...parsedArgs);
|
|
56427
56427
|
return this._def.output ? parseAsync(this._def.output, output, void 0, { callee: impl }) : output;
|
|
56428
|
-
};
|
|
56428
|
+
});
|
|
56429
56429
|
return impl;
|
|
56430
56430
|
}
|
|
56431
56431
|
input(...args) {
|
|
@@ -57658,10 +57658,10 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
57658
57658
|
};
|
|
57659
57659
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
57660
57660
|
inst.brand = () => inst;
|
|
57661
|
-
inst.register = (reg, meta2) => {
|
|
57661
|
+
inst.register = ((reg, meta2) => {
|
|
57662
57662
|
reg.add(inst, meta2);
|
|
57663
57663
|
return inst;
|
|
57664
|
-
};
|
|
57664
|
+
});
|
|
57665
57665
|
inst.parse = (data2, params) => parse3(inst, data2, params, { callee: inst.parse });
|
|
57666
57666
|
inst.safeParse = (data2, params) => safeParse2(inst, data2, params);
|
|
57667
57667
|
inst.parseAsync = async (data2, params) => parseAsync2(inst, data2, params, { callee: inst.parseAsync });
|
|
@@ -69121,14 +69121,14 @@ typeof global !== "undefined" && global || {};
|
|
|
69121
69121
|
var support = {
|
|
69122
69122
|
searchParams: "URLSearchParams" in g,
|
|
69123
69123
|
iterable: "Symbol" in g && "iterator" in Symbol,
|
|
69124
|
-
blob: "FileReader" in g && "Blob" in g && function() {
|
|
69124
|
+
blob: "FileReader" in g && "Blob" in g && (function() {
|
|
69125
69125
|
try {
|
|
69126
69126
|
new Blob();
|
|
69127
69127
|
return true;
|
|
69128
69128
|
} catch (e) {
|
|
69129
69129
|
return false;
|
|
69130
69130
|
}
|
|
69131
|
-
}(),
|
|
69131
|
+
})(),
|
|
69132
69132
|
formData: "FormData" in g,
|
|
69133
69133
|
arrayBuffer: "ArrayBuffer" in g
|
|
69134
69134
|
};
|
|
@@ -69432,12 +69432,12 @@ function Request(input, options) {
|
|
|
69432
69432
|
}
|
|
69433
69433
|
this.method = normalizeMethod(options.method || this.method || "GET");
|
|
69434
69434
|
this.mode = options.mode || this.mode || null;
|
|
69435
|
-
this.signal = options.signal || this.signal || function() {
|
|
69435
|
+
this.signal = options.signal || this.signal || (function() {
|
|
69436
69436
|
if ("AbortController" in g) {
|
|
69437
69437
|
var ctrl = new AbortController();
|
|
69438
69438
|
return ctrl.signal;
|
|
69439
69439
|
}
|
|
69440
|
-
}();
|
|
69440
|
+
})();
|
|
69441
69441
|
this.referrer = null;
|
|
69442
69442
|
if ((this.method === "GET" || this.method === "HEAD") && body) {
|
|
69443
69443
|
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
@@ -6,13 +6,13 @@ import _fs from "fs";
|
|
|
6
6
|
const fs: typeof fsType = _fs;
|
|
7
7
|
|
|
8
8
|
type ToolFSOptions = {
|
|
9
|
-
baseDirectory: string
|
|
10
|
-
}
|
|
9
|
+
baseDirectory: string;
|
|
10
|
+
};
|
|
11
11
|
|
|
12
12
|
export function createToolFS(opts?: Partial<ToolFSOptions>) {
|
|
13
13
|
let basePath = opts?.baseDirectory || "";
|
|
14
14
|
|
|
15
|
-
if(basePath !== "" && !basePath.endsWith("/")) {
|
|
15
|
+
if (basePath !== "" && !basePath.endsWith("/")) {
|
|
16
16
|
basePath += "/";
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -57,4 +57,4 @@ export function createToolFS(opts?: Partial<ToolFSOptions>) {
|
|
|
57
57
|
message: ({ path }) => `Writing to \`${path}\``
|
|
58
58
|
})
|
|
59
59
|
];
|
|
60
|
-
}
|
|
60
|
+
}
|
|
@@ -25,7 +25,7 @@ export let bridge: Bridge;
|
|
|
25
25
|
switch (platform) {
|
|
26
26
|
case Platform.NODE:
|
|
27
27
|
bridge = BridgeNode;
|
|
28
|
-
initCallbackNode();
|
|
28
|
+
await initCallbackNode();
|
|
29
29
|
break;
|
|
30
30
|
case Platform.APPLE:
|
|
31
31
|
bridge = BridgeApple;
|
|
@@ -47,7 +47,7 @@ switch (platform) {
|
|
|
47
47
|
break;
|
|
48
48
|
case Platform.LINUX_QT:
|
|
49
49
|
bridge = BridgeLinuxQT;
|
|
50
|
-
initRespondLinuxQT();
|
|
50
|
+
await initRespondLinuxQT();
|
|
51
51
|
break;
|
|
52
52
|
case Platform.ELECTRON:
|
|
53
53
|
bridge = BridgeElectron;
|
|
@@ -60,9 +60,9 @@ console.log("FullStacked");
|
|
|
60
60
|
bridge(new Uint8Array([0]));
|
|
61
61
|
|
|
62
62
|
let lastUpdateCheck = 0;
|
|
63
|
-
const updateCheckDelay = 1000 * 10 // 10sec;
|
|
63
|
+
const updateCheckDelay = 1000 * 10; // 10sec;
|
|
64
64
|
async function checkForUpdates() {
|
|
65
|
-
window.requestAnimationFrame(checkForUpdates)
|
|
65
|
+
window.requestAnimationFrame(checkForUpdates);
|
|
66
66
|
|
|
67
67
|
const now = Date.now();
|
|
68
68
|
if (now - lastUpdateCheck < updateCheckDelay) {
|
|
@@ -71,7 +71,7 @@ async function checkForUpdates() {
|
|
|
71
71
|
|
|
72
72
|
lastUpdateCheck = now;
|
|
73
73
|
|
|
74
|
-
if (await git.pull() !== git.PullResponse.DID_PULL) {
|
|
74
|
+
if ((await git.pull()) !== git.PullResponse.DID_PULL) {
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -82,22 +82,20 @@ async function checkForUpdates() {
|
|
|
82
82
|
preventReloadButton.onclick = () => {
|
|
83
83
|
preventReload = true;
|
|
84
84
|
snackbar.dismiss();
|
|
85
|
-
}
|
|
85
|
+
};
|
|
86
86
|
|
|
87
87
|
const snackbar = SnackBar({
|
|
88
88
|
message: "Project has updated. Rebuilding...",
|
|
89
89
|
button: preventReloadButton
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
buildSASS(fs)
|
|
93
|
-
.then(() => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
window.location.reload();
|
|
98
|
-
});
|
|
92
|
+
buildSASS(fs).then(() => {
|
|
93
|
+
esbuild.build().then(() => {
|
|
94
|
+
snackbar.dismiss();
|
|
95
|
+
if (preventReload) return;
|
|
96
|
+
window.location.reload();
|
|
99
97
|
});
|
|
100
|
-
|
|
98
|
+
});
|
|
101
99
|
}
|
|
102
100
|
if (await git.hasGit()) {
|
|
103
101
|
checkForUpdates();
|
|
@@ -117,4 +115,4 @@ setInterval(() => {
|
|
|
117
115
|
setTitle(document.title);
|
|
118
116
|
}
|
|
119
117
|
lastTitleSeen = document.title;
|
|
120
|
-
}, 500);
|
|
118
|
+
}, 500);
|
|
@@ -51,18 +51,27 @@ export const BridgeLinuxQT: Bridge = (
|
|
|
51
51
|
export async function initRespondLinuxQT() {
|
|
52
52
|
const script = document.createElement("script");
|
|
53
53
|
script.src = "qrc:///qtwebchannel/qwebchannel.js";
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
return new Promise<void>((channelReady) => {
|
|
55
|
+
script.onload = () => {
|
|
56
|
+
new globalThis.QWebChannel(
|
|
57
|
+
globalThis.qt.webChannelTransport,
|
|
58
|
+
(c) => {
|
|
59
|
+
channel = c;
|
|
60
|
+
pendingRequests.forEach(
|
|
61
|
+
({ payload, transformer, resolve }) => {
|
|
62
|
+
respond(payload, transformer).then(resolve);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
channel.objects.bridge.core_message.connect(function (
|
|
66
|
+
type: string,
|
|
67
|
+
message: string
|
|
68
|
+
) {
|
|
69
|
+
globalThis.oncoremessage(type, message);
|
|
70
|
+
});
|
|
71
|
+
channelReady();
|
|
63
72
|
}
|
|
64
73
|
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
};
|
|
75
|
+
document.body.append(script);
|
|
76
|
+
});
|
|
68
77
|
}
|
|
@@ -24,9 +24,12 @@ export const BridgeNode: Bridge = async (
|
|
|
24
24
|
export function initCallbackNode() {
|
|
25
25
|
const url = new URL(globalThis.location.href);
|
|
26
26
|
url.protocol = "ws:";
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
return new Promise<void>((wsReady) => {
|
|
28
|
+
const ws = new WebSocket(url.toString());
|
|
29
|
+
ws.onmessage = (e) => {
|
|
30
|
+
const [type, message] = JSON.parse(e.data);
|
|
31
|
+
globalThis.oncoremessage(type, message);
|
|
32
|
+
};
|
|
33
|
+
ws.onopen = () => wsReady();
|
|
34
|
+
});
|
|
32
35
|
}
|
|
@@ -57,18 +57,12 @@ export function build(project?: Project): Promise<Message[]> {
|
|
|
57
57
|
addedListener = true;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
const args: any[] = project
|
|
62
|
-
? [project.id]
|
|
63
|
-
: []
|
|
60
|
+
const args: any[] = project ? [project.id] : [];
|
|
64
61
|
|
|
65
62
|
const buildId = getLowestKeyIdAvailable(activeBuilds);
|
|
66
|
-
args.push(buildId)
|
|
63
|
+
args.push(buildId);
|
|
67
64
|
|
|
68
|
-
const payload = new Uint8Array([
|
|
69
|
-
56,
|
|
70
|
-
...serializeArgs(args)
|
|
71
|
-
]);
|
|
65
|
+
const payload = new Uint8Array([56, ...serializeArgs(args)]);
|
|
72
66
|
|
|
73
67
|
return new Promise((resolve) => {
|
|
74
68
|
activeBuilds.set(buildId, {
|
|
@@ -18,7 +18,7 @@ export async function buildSASS(
|
|
|
18
18
|
? `${baseDirectory}/.build`
|
|
19
19
|
: ".build";
|
|
20
20
|
await fs.mkdir(buildDirectory);
|
|
21
|
-
console.log(buildDirectory + "/index.css", css)
|
|
21
|
+
console.log(buildDirectory + "/index.css", css);
|
|
22
22
|
await fs.writeFile(buildDirectory + "/index.css", css);
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -27,7 +27,7 @@ export async function buildSASS(
|
|
|
27
27
|
(item) => item === "index.sass" || item === "index.scss"
|
|
28
28
|
);
|
|
29
29
|
|
|
30
|
-
console.log(entryPointSASS)
|
|
30
|
+
console.log(entryPointSASS);
|
|
31
31
|
|
|
32
32
|
// check for css file and write to output
|
|
33
33
|
// esbuild will pick it up and merge with css in js
|
|
@@ -69,8 +69,8 @@ export async function buildSASS(
|
|
|
69
69
|
syntax: filePath.endsWith(".sass")
|
|
70
70
|
? "indented"
|
|
71
71
|
: filePath.endsWith(".scss")
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
? "scss"
|
|
73
|
+
: "css",
|
|
74
74
|
contents
|
|
75
75
|
};
|
|
76
76
|
},
|
|
@@ -3,7 +3,10 @@ import { serializeArgs } from "../bridge/serialization";
|
|
|
3
3
|
import core_message from "../core_message";
|
|
4
4
|
import { Project } from "../../editor/types";
|
|
5
5
|
|
|
6
|
-
const pullPromises = new Map<
|
|
6
|
+
const pullPromises = new Map<
|
|
7
|
+
string,
|
|
8
|
+
((pullResponse: PullResponse) => void)[]
|
|
9
|
+
>();
|
|
7
10
|
let addedListener = false;
|
|
8
11
|
function setListenerOnce() {
|
|
9
12
|
if (addedListener) return;
|
|
@@ -36,10 +39,10 @@ export function clone(url: string, into: string) {
|
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
// 71
|
|
39
|
-
export function head(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
]);
|
|
42
|
+
export function head(
|
|
43
|
+
projectId: string
|
|
44
|
+
): Promise<{ name: string; hash: string }> {
|
|
45
|
+
const payload = new Uint8Array([71, ...serializeArgs([projectId])]);
|
|
43
46
|
|
|
44
47
|
const transformer = ([name, hash]) => {
|
|
45
48
|
return { name, hash };
|
|
@@ -100,9 +103,7 @@ export enum PullResponse {
|
|
|
100
103
|
export async function pull(project?: Project): Promise<PullResponse> {
|
|
101
104
|
setListenerOnce();
|
|
102
105
|
|
|
103
|
-
const args = project
|
|
104
|
-
? serializeArgs([project.id])
|
|
105
|
-
: [];
|
|
106
|
+
const args = project ? serializeArgs([project.id]) : [];
|
|
106
107
|
|
|
107
108
|
const payload = new Uint8Array([73, ...args]);
|
|
108
109
|
|
|
@@ -208,31 +209,20 @@ export function branchDelete(project: Project, branch: string) {
|
|
|
208
209
|
return bridge(payload);
|
|
209
210
|
}
|
|
210
211
|
|
|
211
|
-
|
|
212
212
|
// 82
|
|
213
213
|
export function hasGit(project?: Project) {
|
|
214
|
-
const args = project
|
|
215
|
-
? [project.id]
|
|
216
|
-
: [];
|
|
214
|
+
const args = project ? [project.id] : [];
|
|
217
215
|
|
|
218
|
-
const payload = new Uint8Array([
|
|
219
|
-
82,
|
|
220
|
-
...serializeArgs(args)
|
|
221
|
-
]);
|
|
216
|
+
const payload = new Uint8Array([82, ...serializeArgs(args)]);
|
|
222
217
|
|
|
223
218
|
return bridge(payload, ([hasGit]) => hasGit);
|
|
224
219
|
}
|
|
225
220
|
|
|
226
221
|
// 83
|
|
227
222
|
export function remoteUrl(project?: Project) {
|
|
228
|
-
const args = project
|
|
229
|
-
? [project.id]
|
|
230
|
-
: [];
|
|
223
|
+
const args = project ? [project.id] : [];
|
|
231
224
|
|
|
232
|
-
const payload = new Uint8Array([
|
|
233
|
-
83,
|
|
234
|
-
...serializeArgs(args)
|
|
235
|
-
]);
|
|
225
|
+
const payload = new Uint8Array([83, ...serializeArgs(args)]);
|
|
236
226
|
|
|
237
227
|
return bridge(payload, ([url]) => url);
|
|
238
|
-
}
|
|
228
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Project } from "../../editor/types";
|
|
2
2
|
import { bridge } from "../bridge";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
getLowestKeyIdAvailable,
|
|
5
|
+
serializeArgs
|
|
6
|
+
} from "../bridge/serialization";
|
|
4
7
|
import core_message from "../core_message";
|
|
5
8
|
|
|
6
|
-
|
|
7
9
|
const activeInstallations = new Map<
|
|
8
10
|
number,
|
|
9
11
|
{
|
|
@@ -37,7 +39,6 @@ type InstallationProgressCb = (
|
|
|
37
39
|
packages: [string, PackageInfoProgress][]
|
|
38
40
|
) => void;
|
|
39
41
|
|
|
40
|
-
|
|
41
42
|
function installationsListener(messageStr: string) {
|
|
42
43
|
const message = JSON.parse(messageStr) as { id: number };
|
|
43
44
|
|
|
@@ -83,10 +84,7 @@ let addedListener = false;
|
|
|
83
84
|
function setListenerOnce() {
|
|
84
85
|
if (addedListener) return;
|
|
85
86
|
|
|
86
|
-
core_message.addListener(
|
|
87
|
-
"packages-installation",
|
|
88
|
-
installationsListener
|
|
89
|
-
);
|
|
87
|
+
core_message.addListener("packages-installation", installationsListener);
|
|
90
88
|
|
|
91
89
|
addedListener = true;
|
|
92
90
|
}
|
|
@@ -119,14 +117,15 @@ export function install(
|
|
|
119
117
|
}
|
|
120
118
|
|
|
121
119
|
//61
|
|
122
|
-
export function installQuick(
|
|
120
|
+
export function installQuick(
|
|
121
|
+
project?: Project,
|
|
122
|
+
progress?: InstallationProgressCb
|
|
123
|
+
) {
|
|
123
124
|
setListenerOnce();
|
|
124
125
|
|
|
125
126
|
const installationId = getLowestKeyIdAvailable(activeInstallations);
|
|
126
127
|
|
|
127
|
-
let args: any[] = project
|
|
128
|
-
? [project.id, installationId]
|
|
129
|
-
: [installationId];
|
|
128
|
+
let args: any[] = project ? [project.id, installationId] : [installationId];
|
|
130
129
|
|
|
131
130
|
const payload = new Uint8Array([61, ...serializeArgs(args)]);
|
|
132
131
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fullstacked",
|
|
3
|
-
"version": "0.12.0-
|
|
3
|
+
"version": "0.12.0-1195",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "node build.js",
|
|
6
6
|
"start": "npm run build && node index.js --lib ../../core/bin --root ~/FullStacked --config ~/.config/fullstacked --editor ../../out/editor",
|