@floomhq/floom 1.0.61 → 1.0.63
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/daemon.js +2 -2
- package/dist/push-watch.js +15 -1
- package/package.json +1 -1
package/dist/daemon.js
CHANGED
|
@@ -11,7 +11,7 @@ const SERVICE_NAME = "floom-sync.service";
|
|
|
11
11
|
const LAUNCHD_LABEL = "dev.floom.sync";
|
|
12
12
|
const LOG_PATH = join(CONFIG_DIR, "daemon.log");
|
|
13
13
|
const STATUS_PATH = join(CONFIG_DIR, "daemon-status.json");
|
|
14
|
-
const NATIVE_BASELINE_VERSION =
|
|
14
|
+
const NATIVE_BASELINE_VERSION = 4;
|
|
15
15
|
const MIN_INTERVAL_SECONDS = 30;
|
|
16
16
|
const MIN_TIMEOUT_SECONDS = 30;
|
|
17
17
|
function targetsFor(value) {
|
|
@@ -129,7 +129,7 @@ async function runTarget(target, opts) {
|
|
|
129
129
|
}
|
|
130
130
|
if (opts.push && ok) {
|
|
131
131
|
if (opts.yolo && !(await fileExists(nativeBaselinePath(target)))) {
|
|
132
|
-
const baselineResult = await runCommand([String(opts.timeoutSeconds), "watch", "--push", "--once", "--target", target, "--no-yolo"], { FLOOM_SYNC_MANIFEST_PATH: nativeManifestPath });
|
|
132
|
+
const baselineResult = await runCommand([String(opts.timeoutSeconds), "watch", "--push", "--once", "--target", target, "--no-yolo"], { FLOOM_SYNC_MANIFEST_PATH: nativeManifestPath, FLOOM_BASELINE_ADOPT_ALL: "1" });
|
|
133
133
|
if (baselineResult.code !== 0 || baselineResult.timedOut) {
|
|
134
134
|
ok = false;
|
|
135
135
|
error = baselineResult.timedOut ? "native baseline timed out" : `${baselineResult.stdout}\n${baselineResult.stderr}`.trim() || "native baseline failed";
|
package/dist/push-watch.js
CHANGED
|
@@ -172,6 +172,9 @@ function slugFromPushManifest(key, pushManifest) {
|
|
|
172
172
|
function pushManifestKey(target, relativeSkillPath) {
|
|
173
173
|
return `${target}:${relativeSkillPath}`;
|
|
174
174
|
}
|
|
175
|
+
function baselineAdoptAll() {
|
|
176
|
+
return process.env.FLOOM_BASELINE_ADOPT_ALL === "1";
|
|
177
|
+
}
|
|
175
178
|
function isUnchangedSyncedPackage(root, skillPackage, syncManifest) {
|
|
176
179
|
const files = [
|
|
177
180
|
{ target: skillPackage.skillPath, hash: createHash("sha256").update(skillPackage.skillBody).digest("hex") },
|
|
@@ -233,6 +236,17 @@ export async function pushWatchOnce(opts) {
|
|
|
233
236
|
}
|
|
234
237
|
activePushKeys.add(pushKey);
|
|
235
238
|
if (pushed?.hash === hash) {
|
|
239
|
+
if (baselineAdoptAll() && pushed.source !== "adopted") {
|
|
240
|
+
pushManifest.files[pushKey] = {
|
|
241
|
+
hash,
|
|
242
|
+
slug: pushed.slug,
|
|
243
|
+
path: key,
|
|
244
|
+
pushedAt: new Date().toISOString(),
|
|
245
|
+
source: "adopted",
|
|
246
|
+
};
|
|
247
|
+
adopted += 1;
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
236
250
|
if (!isUnchangedSyncedPackage(root, skillPackage, syncManifest)) {
|
|
237
251
|
adopted += 1;
|
|
238
252
|
markPackageSynced(root, skillPackage, syncManifest, pushed.slug);
|
|
@@ -253,7 +267,7 @@ export async function pushWatchOnce(opts) {
|
|
|
253
267
|
slug: pushedSlug ?? syncedSlug ?? fallbackSlug ?? key,
|
|
254
268
|
path: key,
|
|
255
269
|
pushedAt: new Date().toISOString(),
|
|
256
|
-
source: pushed?.source ?? "adopted",
|
|
270
|
+
source: baselineAdoptAll() ? "adopted" : pushed?.source ?? "adopted",
|
|
257
271
|
};
|
|
258
272
|
adopted += 1;
|
|
259
273
|
continue;
|