@hanzogui/helpers-node 7.3.1 → 8.1.0

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.
@@ -31,7 +31,7 @@ async function getDefaultGuiOptions({
31
31
  }) {
32
32
  return {
33
33
  platform: "native",
34
- components: ["gui"],
34
+ components: ["@hanzo/gui"],
35
35
  config: await (0, import_getGuiDefaultPath.getDefaultGuiConfigPath)({
36
36
  cwd
37
37
  })
@@ -34,7 +34,7 @@ async function getDefaultGuiOptions(param) {
34
34
  } = param;
35
35
  return {
36
36
  platform: "native",
37
- components: ["gui"],
37
+ components: ["@hanzo/gui"],
38
38
  config: await (0, import_getGuiDefaultPath.getDefaultGuiConfigPath)({
39
39
  cwd
40
40
  })
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","getDefaultGuiOptions_exports","getDefaultGuiOptions","module","exports","import_getGuiDefaultPath","require","param","cwd","platform","components","config","getDefaultGuiConfigPath"],"sources":["getDefaultGuiOptions.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar getDefaultGuiOptions_exports = {};\n__export(getDefaultGuiOptions_exports, {\n getDefaultGuiOptions: () => getDefaultGuiOptions\n});\nmodule.exports = __toCommonJS(getDefaultGuiOptions_exports);\nvar import_getGuiDefaultPath = require(\"./getGuiDefaultPath\");\nasync function getDefaultGuiOptions(param) {\n var { cwd = \".\" } = param;\n return {\n platform: \"native\",\n components: [\n \"gui\"\n ],\n config: await (0, import_getGuiDefaultPath.getDefaultGuiConfigPath)({\n cwd\n })\n };\n}\n//# sourceMappingURL=getDefaultGuiOptions.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CnB,SAAS,CAACiB,EAAE,EAAEI,GAAG,EAAE;MAAEP,GAAG,EAAEA,CAAA,KAAMI,IAAI,CAACG,GAAG,CAAC;MAAEN,UAAU,EAAE,EAAEK,IAAI,GAAGjB,gBAAgB,CAACe,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACL;IAAW,CAAC,CAAC;EACxH;EACA,OAAOE,EAAE;AACX,CAAC;AACD,IAAIM,YAAY,GAAIC,GAAG,IAAKR,WAAW,CAAChB,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEyB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAED,GAAG,CAAC;AAC1F,IAAIE,4BAA4B,GAAG,CAAC,CAAC;AACrChB,QAAQ,CAACgB,4BAA4B,EAAE;EACrCC,oBAAoB,EAAEA,CAAA,KAAMA;AAC9B,CAAC,CAAC;AACFC,MAAM,CAACC,OAAO,GAAGN,YAAY,CAACG,4BAA4B,CAAC;AAC3D,IAAII,wBAAwB,GAAGC,OAAO,CAAC,+BAAqB,CAAC;AAC7D,eAAeJ,oBAAoBA,CAACK,KAAK,EAAE;EACzC,IAAI;IAAEC,GAAG,GAAG;EAAI,CAAC,GAAGD,KAAK;EACzB,OAAO;IACLE,QAAQ,EAAE,QAAQ;IAClBC,UAAU,EAAE,CACV,KAAK,CACN;IACDC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAEN,wBAAwB,CAACO,uBAAuB,EAAE;MAClEJ;IACF,CAAC;EACH,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getDefaultGuiOptions_exports","__export","getDefaultGuiOptions","module","exports","import_getGuiDefaultPath","require","param","cwd","platform","components","config","getDefaultGuiConfigPath"],"sources":["../src/getDefaultGuiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,4BAAA;AAAAC,QAAA,CAAAD,4BAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAAAK,4BAAwC;AAExC,IAAAK,wBAAsB,GAAAC,OAAqB;AAAA,eACnCJ,qBAAAK,KAAA;EACR,IAEwB;IAAAC,GAAA;EAAA,IAAAD,KAAA;EACtB,OAAO;IACLE,QAAA,EAAU;IACVC,UAAA,EAAY,CACZ,YAAQ,CACV;IACFC,MAAA,YAAAN,wBAAA,CAAAO,uBAAA","ignoreList":[]}
@@ -35,11 +35,11 @@ async function getDefaultGuiConfigPath({
35
35
  if (cache && cachedPath) {
36
36
  return cachedPath;
37
37
  }
38
- const defaultPaths = ["gui.config.ts", (0, import_node_path.join)("src", "gui.config.ts")].map(p => (0, import_node_path.join)(cwd, p));
38
+ const defaultPaths = ["hanzogui.config.ts", (0, import_node_path.join)("src", "hanzogui.config.ts")].map(p => (0, import_node_path.join)(cwd, p));
39
39
  const existing = (await Promise.all(defaultPaths.map(path => (0, import_fs_extra.pathExists)(path)))).findIndex(x => !!x);
40
40
  const found = defaultPaths[existing];
41
41
  if (!found) {
42
- throw new Error(`No found gui.config.ts`);
42
+ throw new Error(`No found hanzogui.config.ts`);
43
43
  }
44
44
  cachedPath = found;
45
45
  return found;
@@ -38,7 +38,7 @@ async function getDefaultGuiConfigPath(param) {
38
38
  if (cache && cachedPath) {
39
39
  return cachedPath;
40
40
  }
41
- var defaultPaths = ["gui.config.ts", (0, import_path.join)("src", "gui.config.ts")].map(function (p) {
41
+ var defaultPaths = ["hanzogui.config.ts", (0, import_path.join)("src", "hanzogui.config.ts")].map(function (p) {
42
42
  return (0, import_path.join)(cwd, p);
43
43
  });
44
44
  var existing = (await Promise.all(defaultPaths.map(function (path) {
@@ -48,7 +48,7 @@ async function getDefaultGuiConfigPath(param) {
48
48
  });
49
49
  var found = defaultPaths[existing];
50
50
  if (!found) {
51
- throw new Error(`No found gui.config.ts`);
51
+ throw new Error(`No found hanzogui.config.ts`);
52
52
  }
53
53
  cachedPath = found;
54
54
  return found;
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","getGuiDefaultPath_exports","getDefaultGuiConfigPath","module","exports","import_path","require","import_fs_extra","cachedPath","param","cwd","cache","defaultPaths","join","map","p","existing","Promise","path","pathExists","findIndex","x","found","Error"],"sources":["getGuiDefaultPath.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar getGuiDefaultPath_exports = {};\n__export(getGuiDefaultPath_exports, {\n getDefaultGuiConfigPath: () => getDefaultGuiConfigPath\n});\nmodule.exports = __toCommonJS(getGuiDefaultPath_exports);\nvar import_path = require(\"path\");\nvar import_fs_extra = require(\"fs-extra\");\nvar cachedPath = \"\";\nasync function getDefaultGuiConfigPath(param) {\n var { cwd = \".\", cache = true } = param;\n if (cache && cachedPath) {\n return cachedPath;\n }\n var defaultPaths = [\n \"gui.config.ts\",\n (0, import_path.join)(\"src\", \"gui.config.ts\")\n ].map(function(p) {\n return (0, import_path.join)(cwd, p);\n });\n var existing = (await Promise.all(defaultPaths.map(function(path) {\n return (0, import_fs_extra.pathExists)(path);\n }))).findIndex(function(x) {\n return !!x;\n });\n var found = defaultPaths[existing];\n if (!found) {\n throw new Error(`No found gui.config.ts`);\n }\n cachedPath = found;\n return found;\n}\n//# sourceMappingURL=getGuiDefaultPath.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CnB,SAAS,CAACiB,EAAE,EAAEI,GAAG,EAAE;MAAEP,GAAG,EAAEA,CAAA,KAAMI,IAAI,CAACG,GAAG,CAAC;MAAEN,UAAU,EAAE,EAAEK,IAAI,GAAGjB,gBAAgB,CAACe,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACL;IAAW,CAAC,CAAC;EACxH;EACA,OAAOE,EAAE;AACX,CAAC;AACD,IAAIM,YAAY,GAAIC,GAAG,IAA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AAK,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,wBAAwB,CAAC;EAC3C;EACAf,UAAU,GAAGc,KAAK;EAClB,OAAOA,KAAK;AACd","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getGuiDefaultPath_exports","__export","getDefaultGuiConfigPath","module","exports","import_path","require","import_fs_extra","cachedPath","param","cwd","cache","defaultPaths","join","map","p","existing","Promise","all","path","pathExists","findIndex","x","found"],"sources":["../src/getGuiDefaultPath.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,yBAAA;AAAAC,QAAA,CAAAD,yBAAA;EAAAE,uBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAqB,CAAAK,yBAAA;AAErB,IAAAK,WAAA,GAAAC,OAA2B;AAE3B,IAAIC,eAAa,GAAAD,OAAA;AAEjB,IAAAE,UAAA,GAAsB;AAAwB,eACtCN,wBAAAO,KAAA;EACN;IAAAC,GAAQ;IAAAC,KAAA;EAAA,IAAAF,KAAA;EACV,IAIoBE,KAAA,IAAAH,UAAA;IAClB,OAAIA,UAAS;EACX;EACF,IAAAI,YAAA,IAEA,oBAAsB,EACpB,CAAC,GAAAP,WAAM,CAAAQ,IAAA,6BAAW,EACpB,CAAAC,GAAA,WAAAC,CAAA;IACA,OAAM,IAAAV,WACE,CAAAQ,IAAA,EAAAH,GAAQ,EAAIK,CAAA;EAEpB;EACA,IAAIC,QAAQ,UAAAC,OAAA,CAAAC,GAAA,CAAAN,YAAA,CAAAE,GAAA,WAAAK,IAAA;IACV,OAAM,IAAIZ,eAAM,CAAAa,UAAA,EAAAD,IAAA;EAClB,KAAAE,SAAA,WAAAC,CAAA;IAEA,SAAAA,CAAA;EACA;EACF,IAAAC,KAAA,GAAAX,YAAA,CAAAI,QAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","getGuiOptions_exports","getGuiOptions","module","exports","import_readGuiOptions","require","param","cwd","readGuiOptions","options"],"sources":["getGuiOptions.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar getGuiOptions_exports = {};\n__export(getGuiOptions_exports, {\n getGuiOptions: () => getGuiOptions\n});\nmodule.exports = __toCommonJS(getGuiOptions_exports);\nvar import_readGuiOptions = require(\"./readGuiOptions\");\nasync function getGuiOptions(param) {\n var { cwd = \".\" } = param;\n return (await (0, import_readGuiOptions.readGuiOptions)({\n cwd\n })).options;\n}\n//# sourceMappingURL=getGuiOptions.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAA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AAC;AACvD,eAAeJ,aAAaA,CAACK,KAAK,EAAE;EAClC,IAAI;IAAEC,GAAG,GAAG;EAAI,CAAC,GAAGD,KAAK;EACzB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAEF,qBAAqB,CAACI,cAAc,EAAE;IACtDD;EACF,CAAC,CAAC,EAAEE,OAAO;AACb","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getGuiOptions_exports","__export","getGuiOptions","module","exports","import_readGuiOptions","require","param","cwd","readGuiOptions"],"sources":["../src/getGuiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,qBAAA;AAAAC,QAAA,CAAAD,qBAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA+B,CAAAK,qBAAA;AAE/B,IAAAK,qBAAsB,GAAAC,OAAc;AAAA,eAC5BJ,cAAAK,KAAA;EACR,IAEwD;IAAAC,GAAA;EAAA,IAAAD,KAAA;EACtD,QAAQ,UAAMF,qBAAA,CAAAI,cAAA,EAAe;IAC/BD","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__reExport","target","mod","secondTarget","__toCommonJS","value","index_exports","module","exports","require"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./readGuiOptions\"), module.exports);\n__reExport(index_exports, require(\"./getGuiDefaultPath\"), module.exports);\n__reExport(index_exports, require(\"./getGuiOptions\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIV,iBAAiB,CAACO,IAAI,CAAC,EACrC,IAAI,CAACL,YAAY,CAACS,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/Cb,SAAS,CAACW,EAAE,EAAEI,GAAG,EAAE;MAAEE,GAAG,EAAEA,CAAA,KAAML,IAAI,CAACG,GAAG,CAAC;MAAEG,UAAU,EAAE,EAAEJ,IAAI,GAAGX,gBAAgB,CAACS,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACI;IAAW,CAAC,CAAC;EACxH;EACA,OAAOP,EAAE;AACX,CAAC;AACD,IAAIQ,UAAU,GAAGA,CAACC,MAAM,EAAEC,GAAG,EAAEC,YAAY,MAAMZ,WAAW,CAACU,MAAM,EAAEC,GAAG,EAAE,SAAS,CAAC,EAAEC,YAAY,IAAIZ,WAAW,CAACY,YAAY,EAAED,GAAG,EAAE,SAAS,CAAC,CAAC;AAChJ,IAAIE,YAAY,GAAIF,GAAG,IAAKX,WAAW,CAACV,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEwB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAEH,GAAG,CAAC;AAC1F,IAAII,aAAa,GAAG,CAAC,CAAC;AACtBC,MAAM,CAACC,OAAO,GAAGJ,YAAY,CAACE,aAAa,CAAC;AAC5CN,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,4BAAkB,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC;AACtER,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,+BAAqB,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC;AACzER,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,2BAAiB,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,gCAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,gCAFd,GAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
@@ -31,7 +31,7 @@ var import_getDefaultGuiOptions = require("./getDefaultGuiOptions.cjs");
31
31
  async function readGuiOptions({
32
32
  cwd = "."
33
33
  }) {
34
- const filePath = (0, import_node_path.join)(cwd, "gui.json");
34
+ const filePath = (0, import_node_path.join)(cwd, "hanzogui.json");
35
35
  if (!(await (0, import_fs_extra.pathExists)(filePath))) {
36
36
  return {
37
37
  exists: false,
@@ -55,7 +55,7 @@ async function readGuiOptions({
55
55
  }
56
56
  };
57
57
  } catch (err) {
58
- console.error(`Error reading gui.json: ${err.message} ${err.stack}`);
58
+ console.error(`Error reading hanzogui.json: ${err.message} ${err.stack}`);
59
59
  return {
60
60
  exists: false,
61
61
  options: await (0, import_getDefaultGuiOptions.getDefaultGuiOptions)({
@@ -34,7 +34,7 @@ async function readGuiOptions(param) {
34
34
  var {
35
35
  cwd = "."
36
36
  } = param;
37
- var filePath = (0, import_path.join)(cwd, "gui.json");
37
+ var filePath = (0, import_path.join)(cwd, "hanzogui.json");
38
38
  if (!(await (0, import_fs_extra.pathExists)(filePath))) {
39
39
  return {
40
40
  exists: false,
@@ -58,7 +58,7 @@ async function readGuiOptions(param) {
58
58
  }
59
59
  };
60
60
  } catch (err) {
61
- console.error(`Error reading gui.json: ${err.message} ${err.stack}`);
61
+ console.error(`Error reading hanzogui.json: ${err.message} ${err.stack}`);
62
62
  return {
63
63
  exists: false,
64
64
  options: await (0, import_getDefaultGuiOptions.getDefaultGuiOptions)({
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","readGuiOptions_exports","readGuiOptions","module","exports","import_path","require","import_fs_extra","import_getDefaultGuiOptions","param","cwd","filePath","join","pathExists","exists","options","getDefaultGuiOptions","readJSON","Array","isArray","components","Error","config","err","console","error","message","stack"],"sources":["readGuiOptions.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar readGuiOptions_exports = {};\n__export(readGuiOptions_exports, {\n readGuiOptions: () => readGuiOptions\n});\nmodule.exports = __toCommonJS(readGuiOptions_exports);\nvar import_path = require(\"path\");\nvar import_fs_extra = require(\"fs-extra\");\nvar import_getDefaultGuiOptions = require(\"./getDefaultGuiOptions\");\nasync function readGuiOptions(param) {\n var { cwd = \".\" } = param;\n var filePath = (0, import_path.join)(cwd, \"gui.json\");\n if (!await (0, import_fs_extra.pathExists)(filePath)) {\n return {\n exists: false,\n options: await (0, import_getDefaultGuiOptions.getDefaultGuiOptions)({\n cwd\n })\n };\n }\n try {\n var options = await (0, import_fs_extra.readJSON)(filePath);\n if (!Array.isArray(options.components)) {\n throw new Error(`Invalid components: not string[]`);\n }\n return {\n exists: true,\n options: {\n ...!options.config && await (0, import_getDefaultGuiOptions.getDefaultGuiOptions)({\n cwd\n }),\n ...options\n }\n };\n } catch (err) {\n console.error(`Error reading gui.json: ${err.message} ${err.stack}`);\n return {\n exists: false,\n options: await (0, import_getDefaultGuiOptions.getDefaultGuiOptions)({\n cwd\n })\n };\n }\n}\n//# sourceMappingURL=readGuiOptions.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AAC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OAAO;MACLb,MAAM,EAAE,KAAK;MACbC,OAAO,EAAE,MAAM,CAAC,CAAC,EAAEP,2BAA2B,CAACQ,oBAAoB,EAAE;QACnEN;MACF,CAAC;IACH,CAAC;EACH;AACF","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","readGuiOptions_exports","__export","readGuiOptions","module","exports","import_path","require","import_fs_extra","import_getDefaultGuiOptions","param","cwd","filePath","join","pathExists","exists","options","getDefaultGuiOptions","readJSON","Array","isArray","components","Error","config","err","console","error","message","stack"],"sources":["../src/readGuiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,sBAAA;AAAAC,QAAA,CAAAD,sBAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAqB,CAAAK,sBAAA;AAGrB,IAAAK,WAAA,GAAAC,OAAqC;AAErC,IAAAC,eAAA,GAAAD,OAAA,WAAqC;AAErC,IAAAE,2BAAqC,GAAEF,OAAM,CAAI,kCAG9C;AACD,eAAMJ,cAAWA,CAAAO,KAAA;EAEjB,IAAI;IAAEC,GAAA;EAAM,IAAAD,KAAA;EACV,IAAAE,QAAO,OAAAN,WAAA,CAAAO,IAAA,EAAAF,GAAA;EAAA,IACL,SAAQ,GAAAH,eAAA,CAAAM,UAAA,EAAAF,QAAA;IAAA,OACR;MACFG,MAAA;MACFC,OAAA,YAAAP,2BAAA,CAAAQ,oBAAA;QAEIN;MACF;IAEA;EACE;EAAkD,IACpD;IAEA,IAAAK,OAAO,aAAAR,eAAA,CAAAU,QAAA,EAAAN,QAAA;IAAA,IACL,CAAAO,KAAQ,CAAAC,OAAA,CAAAJ,OAAA,CAAAK,UAAA;MACR,UAASC,KAAA;IAAA;IACmD,OACvD;MACLP,MAAA;MACFC,OAAA;QACF,IAAS,CAAAA,OAAU,CAAAO,MAAA,eAAAd,2BAAA,CAAAQ,oBAAA;UACjBN;QAEA;QACE,GAAAK;MACA;IACF;EACF,SAAAQ,GAAA;IACFC,OAAA,CAAAC,KAAA,iCAAAF,GAAA,CAAAG,OAAA,IAAAH,GAAA,CAAAI,KAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzogui/helpers-node",
3
- "version": "7.3.1",
3
+ "version": "8.1.0",
4
4
  "source": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -14,18 +14,21 @@
14
14
  "access": "public"
15
15
  },
16
16
  "scripts": {
17
- "build": "gui-build",
18
- "watch": "gui-build --watch",
19
- "clean": "gui-build clean",
20
- "clean:build": "gui-build clean:build"
17
+ "build": "hanzogui-build",
18
+ "watch": "hanzogui-build --watch",
19
+ "clean": "hanzogui-build clean",
20
+ "clean:build": "hanzogui-build clean:build"
21
21
  },
22
22
  "dependencies": {
23
- "@hanzogui/types": "7.3.0"
23
+ "@hanzogui/types": "8.1.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@hanzogui/build": "7.3.1",
26
+ "@hanzogui/build": "8.1.0",
27
27
  "fs-extra": "^11.2.0"
28
28
  },
29
- "license": "BSD-3-Clause",
30
- "author": "Hanzo AI <dev@hanzo.ai>"
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/hanzoai/gui.git",
32
+ "directory": "pkgs/core/helpers-node"
33
+ }
31
34
  }
@@ -9,7 +9,7 @@ export async function getDefaultGuiOptions({
9
9
  }): Promise<GuiOptions> {
10
10
  return {
11
11
  platform: 'native',
12
- components: ['gui'],
12
+ components: ['@hanzo/gui'],
13
13
  config: await getDefaultGuiConfigPath({ cwd }),
14
14
  }
15
15
  }
@@ -16,15 +16,15 @@ export async function getDefaultGuiConfigPath({
16
16
  return cachedPath
17
17
  }
18
18
 
19
- const defaultPaths = ['gui.config.ts', join('src', 'gui.config.ts')].map((p) =>
20
- join(cwd, p)
19
+ const defaultPaths = ['hanzogui.config.ts', join('src', 'hanzogui.config.ts')].map(
20
+ (p) => join(cwd, p)
21
21
  )
22
22
  const existing = (
23
23
  await Promise.all(defaultPaths.map((path) => pathExists(path)))
24
24
  ).findIndex((x) => !!x)
25
25
  const found = defaultPaths[existing]
26
26
  if (!found) {
27
- throw new Error(`No found gui.config.ts`)
27
+ throw new Error(`No found hanzogui.config.ts`)
28
28
  }
29
29
 
30
30
  cachedPath = found
@@ -9,7 +9,7 @@ export async function readGuiOptions({ cwd = '.' }: { cwd: string }): Promise<{
9
9
  exists: boolean
10
10
  options: GuiOptions
11
11
  }> {
12
- const filePath = join(cwd, 'gui.json')
12
+ const filePath = join(cwd, 'hanzogui.json')
13
13
 
14
14
  if (!(await pathExists(filePath))) {
15
15
  return {
@@ -33,7 +33,7 @@ export async function readGuiOptions({ cwd = '.' }: { cwd: string }): Promise<{
33
33
  },
34
34
  }
35
35
  } catch (err: any) {
36
- console.error(`Error reading gui.json: ${err.message} ${err.stack}`)
36
+ console.error(`Error reading hanzogui.json: ${err.message} ${err.stack}`)
37
37
 
38
38
  return {
39
39
  exists: false,
@@ -6,6 +6,6 @@
6
6
  ],
7
7
  "version": 3,
8
8
  "sourcesContent": [
9
- "import type { GuiOptions } from '@hanzogui/types'\n\nimport { getDefaultGuiConfigPath } from './getGuiDefaultPath'\n\nexport async function getDefaultGuiOptions({\n cwd = '.',\n}: {\n cwd: string\n}): Promise<GuiOptions> {\n return {\n platform: 'native',\n components: ['gui'],\n config: await getDefaultGuiConfigPath({ cwd }),\n }\n}\n"
9
+ "import type { GuiOptions } from '@hanzogui/types'\n\nimport { getDefaultGuiConfigPath } from './getGuiDefaultPath'\n\nexport async function getDefaultGuiOptions({\n cwd = '.',\n}: {\n cwd: string\n}): Promise<GuiOptions> {\n return {\n platform: 'native',\n components: ['@hanzo/gui'],\n config: await getDefaultGuiConfigPath({ cwd }),\n }\n}\n"
10
10
  ]
11
11
  }
@@ -6,6 +6,6 @@
6
6
  ],
7
7
  "version": 3,
8
8
  "sourcesContent": [
9
- "import { join } from 'node:path'\n\nimport { pathExists } from 'fs-extra'\n\nlet cachedPath = ''\n\nexport async function getDefaultGuiConfigPath({\n cwd = '.',\n cache = true,\n}: {\n cwd?: string\n // TODO this isn't passed down / could avoid\n cache?: boolean\n}): Promise<string> {\n if (cache && cachedPath) {\n return cachedPath\n }\n\n const defaultPaths = ['gui.config.ts', join('src', 'gui.config.ts')].map((p) =>\n join(cwd, p)\n )\n const existing = (\n await Promise.all(defaultPaths.map((path) => pathExists(path)))\n ).findIndex((x) => !!x)\n const found = defaultPaths[existing]\n if (!found) {\n throw new Error(`No found gui.config.ts`)\n }\n\n cachedPath = found\n return found\n}\n"
9
+ "import { join } from 'node:path'\n\nimport { pathExists } from 'fs-extra'\n\nlet cachedPath = ''\n\nexport async function getDefaultGuiConfigPath({\n cwd = '.',\n cache = true,\n}: {\n cwd?: string\n // TODO this isn't passed down / could avoid\n cache?: boolean\n}): Promise<string> {\n if (cache && cachedPath) {\n return cachedPath\n }\n\n const defaultPaths = ['hanzogui.config.ts', join('src', 'hanzogui.config.ts')].map(\n (p) => join(cwd, p)\n )\n const existing = (\n await Promise.all(defaultPaths.map((path) => pathExists(path)))\n ).findIndex((x) => !!x)\n const found = defaultPaths[existing]\n if (!found) {\n throw new Error(`No found hanzogui.config.ts`)\n }\n\n cachedPath = found\n return found\n}\n"
10
10
  ]
11
11
  }
@@ -6,6 +6,6 @@
6
6
  ],
7
7
  "version": 3,
8
8
  "sourcesContent": [
9
- "import { join } from 'node:path'\n\nimport type { GuiOptions } from '@hanzogui/types'\nimport { pathExists, readJSON } from 'fs-extra'\n\nimport { getDefaultGuiOptions } from './getDefaultGuiOptions'\n\nexport async function readGuiOptions({ cwd = '.' }: { cwd: string }): Promise<{\n exists: boolean\n options: GuiOptions\n}> {\n const filePath = join(cwd, 'gui.json')\n\n if (!(await pathExists(filePath))) {\n return {\n exists: false,\n options: await getDefaultGuiOptions({ cwd }),\n }\n }\n\n try {\n const options = (await readJSON(filePath)) as GuiOptions\n\n if (!Array.isArray(options.components)) {\n throw new Error(`Invalid components: not string[]`)\n }\n\n return {\n exists: true,\n options: {\n ...(!options.config && (await getDefaultGuiOptions({ cwd }))),\n ...options,\n },\n }\n } catch (err: any) {\n console.error(`Error reading gui.json: ${err.message} ${err.stack}`)\n\n return {\n exists: false,\n options: await getDefaultGuiOptions({ cwd }),\n }\n }\n}\n"
9
+ "import { join } from 'node:path'\n\nimport type { GuiOptions } from '@hanzogui/types'\nimport { pathExists, readJSON } from 'fs-extra'\n\nimport { getDefaultGuiOptions } from './getDefaultGuiOptions'\n\nexport async function readGuiOptions({ cwd = '.' }: { cwd: string }): Promise<{\n exists: boolean\n options: GuiOptions\n}> {\n const filePath = join(cwd, 'hanzogui.json')\n\n if (!(await pathExists(filePath))) {\n return {\n exists: false,\n options: await getDefaultGuiOptions({ cwd }),\n }\n }\n\n try {\n const options = (await readJSON(filePath)) as GuiOptions\n\n if (!Array.isArray(options.components)) {\n throw new Error(`Invalid components: not string[]`)\n }\n\n return {\n exists: true,\n options: {\n ...(!options.config && (await getDefaultGuiOptions({ cwd }))),\n ...options,\n },\n }\n } catch (err: any) {\n console.error(`Error reading hanzogui.json: ${err.message} ${err.stack}`)\n\n return {\n exists: false,\n options: await getDefaultGuiOptions({ cwd }),\n }\n }\n}\n"
10
10
  ]
11
11
  }
package/LICENSE DELETED
@@ -1,42 +0,0 @@
1
- BSD 3-Clause License
2
-
3
- Copyright (c) 2026-present, Hanzo AI, Inc.
4
-
5
- Portions of this software are derived from upstream code originally licensed under
6
- the MIT License, with the following copyright notices retained per its terms:
7
-
8
- Copyright (c) 2020 Nate Wienert
9
- Copyright (c) 2015-present, Nicolas Gallagher.
10
- Copyright (c) 2015-present, Facebook, Inc.
11
- Copyright (c) 2021 Radix
12
- Copyright (c) 2017 Carmelo Pullara
13
- Copyright (c) 2018 Framer B.V.
14
- Copyright (c) 2022 WorkOS
15
-
16
- All rights reserved.
17
-
18
- Redistribution and use in source and binary forms, with or without
19
- modification, are permitted provided that the following conditions are met:
20
-
21
- 1. Redistributions of source code must retain the above copyright notice, this
22
- list of conditions and the following disclaimer.
23
-
24
- 2. Redistributions in binary form must reproduce the above copyright notice,
25
- this list of conditions and the following disclaimer in the documentation
26
- and/or other materials provided with the distribution.
27
-
28
- 3. Neither the name of the copyright holder nor the names of its contributors
29
- may be used to endorse or promote products derived from this software
30
- without specific prior written permission.
31
-
32
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
36
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
39
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
40
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42
- POSSIBILITY OF SUCH DAMAGE.