@stacksjs/cli 0.70.0 → 0.70.2

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -14
  2. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -11649,47 +11649,52 @@ function unwrapYield(value, isAsync) {
11649
11649
  throw new QuansyncError;
11650
11650
  return value;
11651
11651
  }
11652
- function iterateSync(generator) {
11652
+ var DEFAULT_ON_YIELD = (value) => value;
11653
+ function iterateSync(generator, onYield = DEFAULT_ON_YIELD) {
11653
11654
  let current = generator.next();
11654
11655
  while (!current.done) {
11655
11656
  try {
11656
- current = generator.next(unwrapYield(current.value));
11657
+ current = generator.next(unwrapYield(onYield(current.value, false)));
11657
11658
  } catch (err) {
11658
11659
  current = generator.throw(err);
11659
11660
  }
11660
11661
  }
11661
11662
  return unwrapYield(current.value);
11662
11663
  }
11663
- async function iterateAsync(generator) {
11664
+ async function iterateAsync(generator, onYield = DEFAULT_ON_YIELD) {
11664
11665
  let current = generator.next();
11665
11666
  while (!current.done) {
11666
11667
  try {
11667
- current = generator.next(await unwrapYield(current.value, true));
11668
+ current = generator.next(await unwrapYield(onYield(current.value, true), true));
11668
11669
  } catch (err) {
11669
11670
  current = generator.throw(err);
11670
11671
  }
11671
11672
  }
11672
11673
  return current.value;
11673
11674
  }
11674
- function fromGeneratorFn(generatorFn) {
11675
+ function fromGeneratorFn(generatorFn, options) {
11675
11676
  return fromObject({
11676
11677
  name: generatorFn.name,
11677
11678
  async(...args) {
11678
- return iterateAsync(generatorFn.apply(this, args));
11679
+ return iterateAsync(generatorFn.apply(this, args), options?.onYield);
11679
11680
  },
11680
11681
  sync(...args) {
11681
- return iterateSync(generatorFn.apply(this, args));
11682
+ return iterateSync(generatorFn.apply(this, args), options?.onYield);
11682
11683
  }
11683
11684
  });
11684
11685
  }
11685
- function quansync(options) {
11686
- if (isThenable(options))
11687
- return fromPromise(options);
11688
- if (typeof options === "function")
11689
- return fromGeneratorFn(options);
11686
+ function quansync(input, options) {
11687
+ if (isThenable(input))
11688
+ return fromPromise(input);
11689
+ if (typeof input === "function")
11690
+ return fromGeneratorFn(input, options);
11690
11691
  else
11691
- return fromObject(options);
11692
+ return fromObject(input);
11692
11693
  }
11694
+ var getIsAsync = quansync({
11695
+ async: () => Promise.resolve(true),
11696
+ sync: () => false
11697
+ });
11693
11698
 
11694
11699
  // ../../../../node_modules/quansync/dist/macro.mjs
11695
11700
  var quansync2 = quansync;
@@ -19059,7 +19064,7 @@ function link(text, url) {
19059
19064
  return options.enabled ? OSC + "8" + SEP + SEP + url + BEL + text + OSC + "8" + SEP + SEP + BEL : `${text} (\u200B${url}\u200B)`;
19060
19065
  }
19061
19066
  // package.json
19062
- var version = "0.70.0";
19067
+ var version = "0.70.2";
19063
19068
 
19064
19069
  // src/helpers.ts
19065
19070
  async function intro(command2, options2) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cli",
3
3
  "type": "module",
4
- "version": "0.70.0",
4
+ "version": "0.70.2",
5
5
  "description": "TypeScript framework for CLI artisans. Build beautiful console apps with ease.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": ["Chris Breuer <chris@stacksjs.org>"],
@@ -52,15 +52,15 @@
52
52
  "devDependencies": {
53
53
  "@antfu/install-pkg": "^1.0.0",
54
54
  "@clack/core": "^0.4.1",
55
- "@stacksjs/collections": "0.70.0",
56
- "@stacksjs/config": "0.70.0",
57
- "@stacksjs/development": "0.70.0",
58
- "@stacksjs/error-handling": "0.70.0",
59
- "@stacksjs/logging": "0.70.0",
60
- "@stacksjs/path": "0.70.0",
61
- "@stacksjs/types": "0.70.0",
62
- "@stacksjs/utils": "0.70.0",
63
- "@stacksjs/validation": "0.70.0",
55
+ "@stacksjs/collections": "0.70.1",
56
+ "@stacksjs/config": "0.70.1",
57
+ "@stacksjs/development": "0.70.1",
58
+ "@stacksjs/error-handling": "0.70.1",
59
+ "@stacksjs/logging": "0.70.1",
60
+ "@stacksjs/path": "0.70.1",
61
+ "@stacksjs/types": "0.70.1",
62
+ "@stacksjs/utils": "0.70.1",
63
+ "@stacksjs/validation": "0.70.1",
64
64
  "@types/prompts": "^2.4.9",
65
65
  "ansi-escapes": "^7.0.0",
66
66
  "cac": "^6.7.14",