@jujulego/jill 3.0.6 → 3.0.7

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/main.js CHANGED
@@ -1,4 +1,4 @@
1
- ;{try{(function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="036273e6-2a03-4b2f-8434-fb36a7afcd78",e._sentryDebugIdIdentifier="sentry-dbid-036273e6-2a03-4b2f-8434-fb36a7afcd78");})();}catch(e){}};!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"jill@3.0.6"};}catch(e){}}();import { startSpan, startInactiveSpan, getActiveSpan, updateSpanName, getRootSpan, captureException, flush } from '@sentry/node';
1
+ ;{try{(function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9c7c1d09-543a-4fbc-8744-61a506d858ad",e._sentryDebugIdIdentifier="sentry-dbid-9c7c1d09-543a-4fbc-8744-61a506d858ad");})();}catch(e){}};!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"jill@3.0.7"};}catch(e){}}();import { startSpan, startInactiveSpan, getActiveSpan, updateSpanName, getRootSpan, captureException, flush } from '@sentry/node';
2
2
  import process$1 from 'node:process';
3
3
  import { hideBin } from 'yargs/helpers';
4
4
  import path$1, { win32, posix } from 'node:path';
@@ -1450,21 +1450,6 @@ const WORKFLOW_ID = Symbol.for('@jujulego/tasks:workflow-id');
1450
1450
  };
1451
1451
  }
1452
1452
 
1453
- /**
1454
- * Injects delay since previous emitted log
1455
- */ function logDelay$() {
1456
- let previous = Date.now();
1457
- return map$((log)=>{
1458
- const now = Date.now();
1459
- const delay = now - previous;
1460
- previous = now;
1461
- return {
1462
- ...log,
1463
- delay
1464
- };
1465
- });
1466
- }
1467
-
1468
1453
  /**
1469
1454
  * Injects given label in log record
1470
1455
  *
@@ -1902,147 +1887,6 @@ function qwrap(wrapped) {
1902
1887
  return renderer.render(tree, args);
1903
1888
  }
1904
1889
 
1905
- const toZeroIfInfinity = (value)=>Number.isFinite(value) ? value : 0;
1906
- function parseNumber(milliseconds) {
1907
- return {
1908
- days: Math.trunc(milliseconds / 86400000),
1909
- hours: Math.trunc(milliseconds / 3600000 % 24),
1910
- minutes: Math.trunc(milliseconds / 60000 % 60),
1911
- seconds: Math.trunc(milliseconds / 1000 % 60),
1912
- milliseconds: Math.trunc(milliseconds % 1000),
1913
- microseconds: Math.trunc(toZeroIfInfinity(milliseconds * 1000) % 1000),
1914
- nanoseconds: Math.trunc(toZeroIfInfinity(milliseconds * 1e6) % 1000)
1915
- };
1916
- }
1917
- function parseBigint(milliseconds) {
1918
- return {
1919
- days: milliseconds / 86400000n,
1920
- hours: milliseconds / 3600000n % 24n,
1921
- minutes: milliseconds / 60000n % 60n,
1922
- seconds: milliseconds / 1000n % 60n,
1923
- milliseconds: milliseconds % 1000n,
1924
- microseconds: 0n,
1925
- nanoseconds: 0n
1926
- };
1927
- }
1928
- function parseMilliseconds(milliseconds) {
1929
- switch(typeof milliseconds){
1930
- case 'number':
1931
- {
1932
- if (Number.isFinite(milliseconds)) {
1933
- return parseNumber(milliseconds);
1934
- }
1935
- break;
1936
- }
1937
- case 'bigint':
1938
- {
1939
- return parseBigint(milliseconds);
1940
- }
1941
- }
1942
- throw new TypeError('Expected a finite number or bigint');
1943
- }
1944
-
1945
- const isZero = (value)=>value === 0 || value === 0n;
1946
- const pluralize = (word, count)=>count === 1 || count === 1n ? word : `${word}s`;
1947
- const SECOND_ROUNDING_EPSILON = 0.0000001;
1948
- const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
1949
- function prettyMilliseconds(milliseconds, options) {
1950
- const isBigInt = typeof milliseconds === 'bigint';
1951
- if (!isBigInt && !Number.isFinite(milliseconds)) {
1952
- throw new TypeError('Expected a finite number or bigint');
1953
- }
1954
- options = {
1955
- ...options
1956
- };
1957
- const sign = milliseconds < 0 ? '-' : '';
1958
- milliseconds = milliseconds < 0 ? -milliseconds : milliseconds; // Cannot use `Math.abs()` because of BigInt support.
1959
- if (options.colonNotation) {
1960
- options.compact = false;
1961
- options.formatSubMilliseconds = false;
1962
- options.separateMilliseconds = false;
1963
- options.verbose = false;
1964
- }
1965
- if (options.compact) {
1966
- options.unitCount = 1;
1967
- options.secondsDecimalDigits = 0;
1968
- options.millisecondsDecimalDigits = 0;
1969
- }
1970
- let result = [];
1971
- const floorDecimals = (value, decimalDigits)=>{
1972
- const flooredInterimValue = Math.floor(value * 10 ** decimalDigits + SECOND_ROUNDING_EPSILON);
1973
- const flooredValue = Math.round(flooredInterimValue) / 10 ** decimalDigits;
1974
- return flooredValue.toFixed(decimalDigits);
1975
- };
1976
- const add = (value, long, short, valueString)=>{
1977
- if ((result.length === 0 || !options.colonNotation) && isZero(value) && !(options.colonNotation && short === 'm')) {
1978
- return;
1979
- }
1980
- valueString ??= String(value);
1981
- if (options.colonNotation) {
1982
- const wholeDigits = valueString.includes('.') ? valueString.split('.')[0].length : valueString.length;
1983
- const minLength = result.length > 0 ? 2 : 1;
1984
- valueString = '0'.repeat(Math.max(0, minLength - wholeDigits)) + valueString;
1985
- } else {
1986
- valueString += options.verbose ? ' ' + pluralize(long, value) : short;
1987
- }
1988
- result.push(valueString);
1989
- };
1990
- const parsed = parseMilliseconds(milliseconds);
1991
- const days = BigInt(parsed.days);
1992
- if (options.hideYearAndDays) {
1993
- add(BigInt(days) * 24n + BigInt(parsed.hours), 'hour', 'h');
1994
- } else {
1995
- if (options.hideYear) {
1996
- add(days, 'day', 'd');
1997
- } else {
1998
- add(days / 365n, 'year', 'y');
1999
- add(days % 365n, 'day', 'd');
2000
- }
2001
- add(Number(parsed.hours), 'hour', 'h');
2002
- }
2003
- add(Number(parsed.minutes), 'minute', 'm');
2004
- if (!options.hideSeconds) {
2005
- if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1000 && !options.subSecondsAsDecimals) {
2006
- const seconds = Number(parsed.seconds);
2007
- const milliseconds = Number(parsed.milliseconds);
2008
- const microseconds = Number(parsed.microseconds);
2009
- const nanoseconds = Number(parsed.nanoseconds);
2010
- add(seconds, 'second', 's');
2011
- if (options.formatSubMilliseconds) {
2012
- add(milliseconds, 'millisecond', 'ms');
2013
- add(microseconds, 'microsecond', 'µs');
2014
- add(nanoseconds, 'nanosecond', 'ns');
2015
- } else {
2016
- const millisecondsAndBelow = milliseconds + microseconds / 1000 + nanoseconds / 1e6;
2017
- const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === 'number' ? options.millisecondsDecimalDigits : 0;
2018
- const roundedMilliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
2019
- const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMilliseconds;
2020
- add(Number.parseFloat(millisecondsString), 'millisecond', 'ms', millisecondsString);
2021
- }
2022
- } else {
2023
- const seconds = (isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1000 % 60;
2024
- const secondsDecimalDigits = typeof options.secondsDecimalDigits === 'number' ? options.secondsDecimalDigits : 1;
2025
- const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
2026
- const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, '');
2027
- add(Number.parseFloat(secondsString), 'second', 's', secondsString);
2028
- }
2029
- }
2030
- if (result.length === 0) {
2031
- return sign + '0' + (options.verbose ? ' milliseconds' : 'ms');
2032
- }
2033
- const separator = options.colonNotation ? ':' : ' ';
2034
- if (typeof options.unitCount === 'number') {
2035
- result = result.slice(0, Math.max(options.unitCount, 1));
2036
- }
2037
- return sign + result.join(separator);
2038
- }
2039
-
2040
- /**
2041
- * Injects log's delay, formatted using pretty-ms
2042
- */ const qLogDelay = defineQuickFormat((log, opts)=>{
2043
- return prettyMilliseconds(log.delay, opts);
2044
- });
2045
-
2046
1890
  /**
2047
1891
  * Injects log's level name
2048
1892
  */ const qLogLevel = defineQuickFormat((log, opts = {})=>{
@@ -19000,7 +18844,7 @@ const command$1 = {
19000
18844
  }
19001
18845
  };
19002
18846
 
19003
- var version = "3.0.6";
18847
+ var version = "3.0.7";
19004
18848
 
19005
18849
  var ajv = {exports: {}};
19006
18850
 
@@ -32852,7 +32696,7 @@ const LEVEL_COLORS = {
32852
32696
  [LogLevel.error]: 'red'
32853
32697
  };
32854
32698
  const logColor = defineQuickFormat((level)=>LEVEL_COLORS[level])(qprop('level'));
32855
- const logFormat = qwrap(chalkTemplateStderr).fun`#?:${qprop('label')}{grey [${q$}]} ?#{${logColor} ${qprop('message')} {grey +${qLogDelay(qarg())}}#?:${qerror(qprop('error'))}${os.EOL}${q$}?#}`;
32699
+ const logFormat = qwrap(chalkTemplateStderr).fun`#?:${qprop('label')}{grey [${q$}]} ?#{${logColor} ${qprop('message')}#?:${qerror(qprop('error'))}${os.EOL}${q$}?#}`;
32856
32700
 
32857
32701
  /**
32858
32702
  * Adds logger related arguments.
@@ -32869,7 +32713,7 @@ const logFormat = qwrap(chalkTemplateStderr).fun`#?:${qprop('label')}{grey [${q$
32869
32713
  }, ()=>{
32870
32714
  const logLevel = args.verbose ? LogLevel[args.verbose] : LogLevel.info;
32871
32715
  const logGateway = inject$(LogGateway);
32872
- flow$(inject$(LOGGER), filter$((log)=>log.level >= logLevel), logDelay$(), logGateway);
32716
+ flow$(inject$(LOGGER), filter$((log)=>log.level >= logLevel), logGateway);
32873
32717
  logGateway.connect('console', toStderr(logFormat));
32874
32718
  }), true);
32875
32719
  }
@@ -33027,5 +32871,5 @@ void startSpan({
33027
32871
  }
33028
32872
  }).finally(()=>flush(2000));
33029
32873
 
33030
- export { ConfigService as A, cliParser as B, CWD as C, command$1 as D, command$2 as E, command$3 as F, command$4 as G, command$5 as H, instrument as I, LogGateway as L, SCHEDULER as S, WorkloadState as W, capitalize as a, prettyMilliseconds as b, collect$ as c, isWorkloadEnded as d, commonjsGlobal as e, filter$ as f, getDefaultExportFromCjs as g, chalk as h, inject$ as i, observer$ as j, slugify as k, logFormat as l, map$ as m, printJson as n, once$ as o, pipe$ as p, commandName as q, command as r, source$ as s, trace as t, withPlan as u, var$ as v, waitFor$ as w, LOGGER as x, withLabel as y, asyncScope$ as z };
32874
+ export { cliParser as A, command$1 as B, CWD as C, command$2 as D, command$3 as E, command$4 as F, command$5 as G, instrument as H, LogGateway as L, SCHEDULER as S, WorkloadState as W, capitalize as a, isWorkloadEnded as b, collect$ as c, commonjsGlobal as d, chalk as e, filter$ as f, getDefaultExportFromCjs as g, observer$ as h, inject$ as i, slugify as j, printJson as k, logFormat as l, map$ as m, commandName as n, once$ as o, pipe$ as p, command as q, withPlan as r, source$ as s, trace as t, LOGGER as u, var$ as v, waitFor$ as w, withLabel as x, asyncScope$ as y, ConfigService as z };
33031
32875
  //# sourceMappingURL=main.js.map