flightdeck 0.2.17 → 0.2.18

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.
@@ -1,4 +1,4 @@
1
- import { execSync, spawn } from 'node:child_process';
1
+ import { spawn, execSync } from 'node:child_process';
2
2
  import { createServer } from 'node:http';
3
3
  import { homedir } from 'node:os';
4
4
  import { resolve } from 'node:path';
@@ -58,7 +58,7 @@ var Future = class extends Promise {
58
58
  );
59
59
  } else {
60
60
  this.resolve(value);
61
- this.fate = undefined;
61
+ this.fate = void 0;
62
62
  }
63
63
  }
64
64
  };
@@ -575,7 +575,9 @@ var emitUpdate = (store, state, update) => {
575
575
  state.subject.subscribers
576
576
  );
577
577
  break;
578
- default:
578
+ case `atom`:
579
+ case `selector`:
580
+ case `readonly_selector`:
579
581
  store.logger.info(
580
582
  `\u{1F4E2}`,
581
583
  state.type,
@@ -1162,7 +1164,7 @@ function setEpochNumberOfAction(store, transactionKey, newEpoch) {
1162
1164
  return;
1163
1165
  }
1164
1166
  const continuityKey = store.transactionMeta.actionContinuities.getRelatedKey(transactionKey);
1165
- if (continuityKey !== undefined) {
1167
+ if (continuityKey !== void 0) {
1166
1168
  store.transactionMeta.epoch.set(continuityKey, newEpoch);
1167
1169
  }
1168
1170
  }
@@ -1323,8 +1325,8 @@ var Junction = class {
1323
1325
  }
1324
1326
  replaceRelationsSafely(x, ys) {
1325
1327
  const xRelationsPrev = this.relations.get(x);
1326
- let a = this.isAType?.(x) ? x : undefined;
1327
- let b = a === undefined ? x : undefined;
1328
+ let a = this.isAType?.(x) ? x : void 0;
1329
+ let b = a === void 0 ? x : void 0;
1328
1330
  if (xRelationsPrev) {
1329
1331
  for (const y of xRelationsPrev) {
1330
1332
  a ??= y;
@@ -1406,8 +1408,8 @@ var Junction = class {
1406
1408
  };
1407
1409
  }
1408
1410
  for (const [x, ys] of data.relations ?? []) {
1409
- let a = this.isAType?.(x) ? x : undefined;
1410
- let b = a === undefined ? x : undefined;
1411
+ let a = this.isAType?.(x) ? x : void 0;
1412
+ let b = a === void 0 ? x : void 0;
1411
1413
  for (const y of ys) {
1412
1414
  a ??= y;
1413
1415
  b ??= y;
@@ -1441,7 +1443,7 @@ var Junction = class {
1441
1443
  const relation = params[0];
1442
1444
  a = relation[this.a];
1443
1445
  b = relation[this.b];
1444
- content = undefined;
1446
+ content = void 0;
1445
1447
  break;
1446
1448
  }
1447
1449
  case 2: {
@@ -1468,10 +1470,12 @@ var Junction = class {
1468
1470
  const bPrev = this.getRelatedKey(a);
1469
1471
  if (bPrev && bPrev !== b) this.delete(a, bPrev);
1470
1472
  }
1471
- case `1:n`: {
1472
- const aPrev = this.getRelatedKey(b);
1473
- if (aPrev && aPrev !== a) this.delete(aPrev, b);
1474
- }
1473
+ case `1:n`:
1474
+ {
1475
+ const aPrev = this.getRelatedKey(b);
1476
+ if (aPrev && aPrev !== a) this.delete(aPrev, b);
1477
+ }
1478
+ break;
1475
1479
  }
1476
1480
  if (content) {
1477
1481
  const contentKey = this.makeContentKey(a, b);
@@ -1486,7 +1490,7 @@ var Junction = class {
1486
1490
  // @ts-expect-error we deduce that this.a may index x
1487
1491
  typeof x === `string` ? x : x[this.a]
1488
1492
  );
1489
- if (a === undefined && typeof b === `string`) {
1493
+ if (a === void 0 && typeof b === `string`) {
1490
1494
  const bRelations = this.getRelatedKeys(b);
1491
1495
  if (bRelations) {
1492
1496
  for (const bRelation of bRelations) {
@@ -1494,7 +1498,7 @@ var Junction = class {
1494
1498
  }
1495
1499
  }
1496
1500
  }
1497
- if (typeof a === `string` && b === undefined) {
1501
+ if (typeof a === `string` && b === void 0) {
1498
1502
  const aRelations = this.getRelatedKeys(a);
1499
1503
  if (aRelations) {
1500
1504
  for (const aRelation of aRelations) {
@@ -1551,7 +1555,7 @@ var Junction = class {
1551
1555
  getRelationEntries(input) {
1552
1556
  const a = input[this.a];
1553
1557
  const b = input[this.b];
1554
- if (a !== undefined && b === undefined) {
1558
+ if (a !== void 0 && b === void 0) {
1555
1559
  const aRelations = this.getRelatedKeys(a);
1556
1560
  if (aRelations) {
1557
1561
  return [...aRelations].map((aRelation) => {
@@ -1559,7 +1563,7 @@ var Junction = class {
1559
1563
  });
1560
1564
  }
1561
1565
  }
1562
- if (a === undefined && b !== undefined) {
1566
+ if (a === void 0 && b !== void 0) {
1563
1567
  const bRelations = this.getRelatedKeys(b);
1564
1568
  if (bRelations) {
1565
1569
  return [...bRelations].map((bRelation) => {
@@ -1594,7 +1598,7 @@ var LazyMap = class extends Map {
1594
1598
  const value = this.source.get(key);
1595
1599
  return value;
1596
1600
  }
1597
- return undefined;
1601
+ return void 0;
1598
1602
  }
1599
1603
  set(key, value) {
1600
1604
  this.deleted.delete(key);
@@ -1659,10 +1663,10 @@ var buildTransaction = (store, key, params, id) => {
1659
1663
  type: `transaction_update`,
1660
1664
  key,
1661
1665
  id,
1662
- epoch: epoch === undefined ? Number.NaN : epoch + 1,
1666
+ epoch: epoch === void 0 ? Number.NaN : epoch + 1,
1663
1667
  updates: [],
1664
1668
  params,
1665
- output: undefined
1669
+ output: void 0
1666
1670
  },
1667
1671
  toolkit: {
1668
1672
  get: (...ps) => getFromStore(child, ...ps),
@@ -1724,8 +1728,8 @@ function createTransaction(store, options) {
1724
1728
  // ../atom.io/internal/src/transaction/get-epoch-number.ts
1725
1729
  function getEpochNumberOfAction(store, transactionKey) {
1726
1730
  const isRoot = isRootStore(store);
1727
- const continuity = isRoot ? store.transactionMeta.actionContinuities.getRelatedKey(transactionKey) : undefined;
1728
- const epoch = isRoot && continuity !== undefined ? store.transactionMeta.epoch.get(continuity) : undefined;
1731
+ const continuity = isRoot ? store.transactionMeta.actionContinuities.getRelatedKey(transactionKey) : void 0;
1732
+ const epoch = isRoot && continuity !== void 0 ? store.transactionMeta.epoch.get(continuity) : void 0;
1729
1733
  return epoch;
1730
1734
  }
1731
1735
 
@@ -1941,7 +1945,7 @@ function withdraw(store, token) {
1941
1945
  // ../atom.io/internal/src/families/init-family-member.ts
1942
1946
  function initFamilyMemberInStore(store, token, key) {
1943
1947
  const family = store.families.get(token.key);
1944
- if (family === undefined) {
1948
+ if (family === void 0) {
1945
1949
  throw new NotFoundError(token, store);
1946
1950
  }
1947
1951
  const state = family(key);
@@ -2281,11 +2285,11 @@ var createWritableSelector = (store, options, family) => {
2281
2285
  function createStandaloneSelector(store, options) {
2282
2286
  const isWritable = `set` in options;
2283
2287
  if (isWritable) {
2284
- const state2 = createWritableSelector(store, options, undefined);
2288
+ const state2 = createWritableSelector(store, options, void 0);
2285
2289
  store.on.selectorCreation.next(state2);
2286
2290
  return state2;
2287
2291
  }
2288
- const state = createReadonlySelector(store, options, undefined);
2292
+ const state = createReadonlySelector(store, options, void 0);
2289
2293
  store.on.selectorCreation.next(state);
2290
2294
  return state;
2291
2295
  }
@@ -2446,7 +2450,7 @@ var subscribeToRootAtoms = (store, selector) => {
2446
2450
  const dependencySubscriptions = traceAllSelectorAtoms(selector, store).map(
2447
2451
  (atomKey) => {
2448
2452
  const atom2 = target.atoms.get(atomKey);
2449
- if (atom2 === undefined) {
2453
+ if (atom2 === void 0) {
2450
2454
  throw new Error(
2451
2455
  `Atom "${atomKey}", a dependency of selector "${selector.key}", not found in store "${store.config.name}".`
2452
2456
  );
@@ -2558,7 +2562,7 @@ var Tracker = class {
2558
2562
  const familyMetaData = mutableState.family ? {
2559
2563
  key: `*${mutableState.family.key}`,
2560
2564
  subKey: mutableState.family.subKey
2561
- } : undefined;
2565
+ } : void 0;
2562
2566
  const latestUpdateState = createRegularAtom(
2563
2567
  store,
2564
2568
  {
@@ -2892,7 +2896,7 @@ function copyMutableIfNeeded(target, atom2, origin) {
2892
2896
  const originValue = origin.valueMap.get(atom2.key);
2893
2897
  const targetValue = target.valueMap.get(atom2.key);
2894
2898
  if (originValue === targetValue) {
2895
- if (originValue === undefined) {
2899
+ if (originValue === void 0) {
2896
2900
  return typeof atom2.default === `function` ? atom2.default() : atom2.default;
2897
2901
  }
2898
2902
  origin.logger.info(`\u{1F4C3}`, `atom`, atom2.key, `copying`);
@@ -3040,11 +3044,11 @@ function createRegularAtom(store, options, family) {
3040
3044
  function createStandaloneAtom(store, options) {
3041
3045
  const isMutable = `mutable` in options;
3042
3046
  if (isMutable) {
3043
- const state2 = createMutableAtom(store, options, undefined);
3047
+ const state2 = createMutableAtom(store, options, void 0);
3044
3048
  store.on.atomCreation.next(state2);
3045
3049
  return state2;
3046
3050
  }
3047
- const state = createRegularAtom(store, options, undefined);
3051
+ const state = createRegularAtom(store, options, void 0);
3048
3052
  store.on.atomCreation.next(state);
3049
3053
  return state;
3050
3054
  }
@@ -3565,8 +3569,8 @@ var Join = class {
3565
3569
  get: (x) => ({ get }) => {
3566
3570
  const relatedKeys = get(relatedKeysAtoms, x);
3567
3571
  for (const y of relatedKeys) {
3568
- let a = relations.isAType?.(x) ? x : undefined;
3569
- let b = a === undefined ? x : undefined;
3572
+ let a = relations.isAType?.(x) ? x : void 0;
3573
+ let b = a === void 0 ? x : void 0;
3570
3574
  a ??= y;
3571
3575
  b ??= y;
3572
3576
  const contentKey = relations.makeContentKey(a, b);
@@ -3586,8 +3590,8 @@ var Join = class {
3586
3590
  const jsonFamily = getJsonFamily(relatedKeysAtoms, store);
3587
3591
  const json = get(jsonFamily, x);
3588
3592
  return json.members.map((y) => {
3589
- let a = relations.isAType?.(x) ? x : undefined;
3590
- let b = a === undefined ? x : undefined;
3593
+ let a = relations.isAType?.(x) ? x : void 0;
3594
+ let b = a === void 0 ? x : void 0;
3591
3595
  a ??= y;
3592
3596
  b ??= y;
3593
3597
  const contentKey = relations.makeContentKey(a, b);
@@ -3653,7 +3657,7 @@ var Join = class {
3653
3657
  this.states = states;
3654
3658
  break;
3655
3659
  }
3656
- default: {
3660
+ case `n:n`: {
3657
3661
  const multipleRelatedKeysSelectors = getMultipleKeySelectorFamily();
3658
3662
  const stateKeyA = `${aSide}KeysOf${capitalize(bSide)}`;
3659
3663
  const stateKeyB = `${bSide}KeysOf${capitalize(aSide)}`;
@@ -3688,10 +3692,10 @@ var Join = class {
3688
3692
  // ../atom.io/internal/src/join/get-join.ts
3689
3693
  function getJoin(token, store) {
3690
3694
  let myJoin = store.joins.get(token.key);
3691
- if (myJoin === undefined) {
3695
+ if (myJoin === void 0) {
3692
3696
  const rootJoinMap = IMPLICIT.STORE.joins;
3693
3697
  const rootJoin = rootJoinMap.get(token.key);
3694
- if (rootJoin === undefined) {
3698
+ if (rootJoin === void 0) {
3695
3699
  throw new Error(
3696
3700
  `Join "${token.key}" not found in store "${store.config.name}"`
3697
3701
  );
@@ -3772,7 +3776,7 @@ var jsonRefinery = new Refinery({
3772
3776
  ...jsonTreeRefinery.supported
3773
3777
  });
3774
3778
  var discoverType = (input) => {
3775
- if (input === undefined) {
3779
+ if (input === void 0) {
3776
3780
  return `undefined`;
3777
3781
  }
3778
3782
  const refined = jsonRefinery.refine(input);
@@ -3833,7 +3837,7 @@ function diffObject(a, b, recurse) {
3833
3837
  let key;
3834
3838
  for (key of path) {
3835
3839
  const nodeB = b[key];
3836
- if (nodeB === undefined) {
3840
+ if (nodeB === void 0) {
3837
3841
  removed.push([key, JSON.stringify(nodeA)]);
3838
3842
  } else {
3839
3843
  const delta = recurse(nodeA, nodeB);
@@ -3847,7 +3851,7 @@ function diffObject(a, b, recurse) {
3847
3851
  let key;
3848
3852
  for (key of path) {
3849
3853
  const nodeA = a[key];
3850
- if (nodeA === undefined) {
3854
+ if (nodeA === void 0) {
3851
3855
  added.push([key, JSON.stringify(nodeB)]);
3852
3856
  }
3853
3857
  }
@@ -4039,6 +4043,8 @@ var ChildSocket = class extends CustomSocket {
4039
4043
  case `e`:
4040
4044
  this.logger.error(...rest);
4041
4045
  break;
4046
+ default:
4047
+ return;
4042
4048
  }
4043
4049
  }
4044
4050
  }
@@ -4286,7 +4292,7 @@ var FlightDeck = class {
4286
4292
  this.logger = new FlightDeckLogger(
4287
4293
  this.options.packageName,
4288
4294
  process.pid,
4289
- undefined,
4295
+ void 0,
4290
4296
  { jsonLogging: this.options.jsonLogging ?? false }
4291
4297
  );
4292
4298
  this.serviceLoggers = fromEntries(
@@ -4309,7 +4315,7 @@ var FlightDeck = class {
4309
4315
  this.storage = new FilesystemStorage({
4310
4316
  path: resolve(flightdeckRootDir, `storage`, options.packageName)
4311
4317
  });
4312
- if (FLIGHTDECK_SECRET === undefined) {
4318
+ if (FLIGHTDECK_SECRET === void 0) {
4313
4319
  this.logger.warn(
4314
4320
  `No FLIGHTDECK_SECRET environment variable found. FlightDeck will not run an update server.`
4315
4321
  );
@@ -4762,5 +4768,5 @@ var FlightDeckLogger = class {
4762
4768
  };
4763
4769
 
4764
4770
  export { FLIGHTDECK_ERROR, FLIGHTDECK_INFO, FLIGHTDECK_LNAV_FORMAT, FLIGHTDECK_SETUP_PHASES, FLIGHTDECK_UPDATE_PHASES, FLIGHTDECK_WARN, FlightDeck, FlightDeckLogger, flightDeckLogSchema, isVersionNumber };
4765
- //# sourceMappingURL=chunk-7KMVUPT3.js.map
4766
- //# sourceMappingURL=chunk-7KMVUPT3.js.map
4771
+ //# sourceMappingURL=chunk-RNOG4E3Q.js.map
4772
+ //# sourceMappingURL=chunk-RNOG4E3Q.js.map