@syncify/cli 1.0.0-unstable.0 → 1.0.0-unstable.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 (4) hide show
  1. package/dist/cli.js +76 -61
  2. package/dist/syncify.js +3706 -6047
  3. package/package.json +11 -11
  4. package/readme.md +13 -13
package/dist/cli.js CHANGED
@@ -7,28 +7,28 @@ var node_util = require('node:util');
7
7
 
8
8
  // syncify/cli/help/utils.ts
9
9
  function describe(message) {
10
- return syncify_js.$.terminal.cols < 75 ? "" : syncify_js.gray2(`\u203A ${message}`);
10
+ return syncify_js.$.terminal.cols < 75 ? "" : syncify_js.a(`\u203A ${message}`);
11
11
  }
12
12
  function highlight(input) {
13
- return input.replace(/([${}<>])/g, syncify_js.gray2("$1")).replace(/(,)(?= -)/g, syncify_js.gray2("$1")).replace(/(\[options\])/g, `${syncify_js.LSB}options${syncify_js.RSB}`).replace(/(?<= )(-|--)(?=[a-zA-Z]+)/g, syncify_js.gray2("$1"));
13
+ return input.replace(/([${}<>])/g, syncify_js.a("$1")).replace(/(,)(?= -)/g, syncify_js.a("$1")).replace(/(\[options\])/g, `${syncify_js.Wt}options${syncify_js.Gt}`).replace(/(?<= )(-|--)(?=[a-zA-Z]+)/g, syncify_js.a("$1"));
14
14
  }
15
15
  function encase({ banner = false }) {
16
- const arrow = `${syncify_js.Encase("SB", syncify_js.gray2("\u25B2"))} AND DOWN ${syncify_js.Encase("SB", syncify_js.gray2("\u25BC"))}`;
17
- const label = syncify_js.gray2(`UP ${arrow} ARROW KEYS TO SCROLL`);
18
- const header = syncify_js.Create().Break(2).Top(label, false).Newline();
19
- const footer = syncify_js.Create().Newline(2).End(label, false).Break();
16
+ const arrow = `${syncify_js.$D("SB", syncify_js.a("\u25B2"))} AND DOWN ${syncify_js.$D("SB", syncify_js.a("\u25BC"))}`;
17
+ const label = syncify_js.a(`UP ${arrow} ARROW KEYS TO SCROLL`);
18
+ const header = syncify_js.pt().Break(2).Top(label, false).Newline();
19
+ const footer = syncify_js.pt().Newline(2).End(label, false).Break();
20
20
  if (banner) {
21
- header.Line("\u2588\u2580\u2580 \u2588 \u2588 \u2588\u2580\u2588 \u2588\u2580\u2580 \u2580\u2588\u2580 \u2588\u2580\u2580 \u2588 \u2588", syncify_js.lightGray).Line("\u2580\u2580\u2588 \u2580\u2580\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 \u2580\u2580\u2588", syncify_js.lightGray).Line("\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580 \u2580 \u2580\u2580\u2580 \u2580\u2580\u2580 \u2580 \u2580\u2580\u2580", syncify_js.lightGray).Newline();
21
+ header.Line("\u2588\u2580\u2580 \u2588 \u2588 \u2588\u2580\u2588 \u2588\u2580\u2580 \u2580\u2588\u2580 \u2588\u2580\u2580 \u2588 \u2588", syncify_js.F).Line("\u2580\u2580\u2588 \u2580\u2580\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 \u2580\u2580\u2588", syncify_js.F).Line("\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580 \u2580 \u2580\u2580\u2580 \u2580\u2580\u2580 \u2580 \u2580\u2580\u2580", syncify_js.F).Newline();
22
22
  }
23
23
  return [header.toString(), footer];
24
24
  }
25
25
 
26
26
  // syncify/cli/help/default.ts
27
27
  function Default() {
28
- syncify_js.Create().Header(`HELP${syncify_js.COL}`, syncify_js.bold2).Line(` $ sy help ${describe("Prints this screen")}`).Line(` $ sy help {mode} ${describe("Pick a mode and view usage guide")}`).Line(` $ sy help examples ${describe("Real world command line examples")}`).Header(`USAGE${syncify_js.COL}`, syncify_js.bold2).Line(` $ sy {mode} ${describe("Command mode is required")}`).Line(` $ sy {mode} --flags ${describe("Flags can be provided to modes")}`).Line(` $ sy {mode} [options] ${describe("Some modes accept positionals")}`).Line(` $ sy {mode} [options] --flags ${describe("Mode with positional and flags")}`).Header("MODES" + syncify_js.COL, syncify_js.bold2).Line(` $ sy init ${describe("Setup Syncify in existing project")}`).Line(` $ sy build ${describe("Build theme from source")}`).Line(` $ sy watch ${describe("Watch and rebuild changes")}`).Line(` $ sy pull ${describe("Download from a store theme")}`).Line(` $ sy push ${describe("Upload to a store theme")}`).Line(` $ sy create ${describe("Create a new Syncify project")}`).Line(` $ sy publish ${describe("Changes a theme role to and makes it main")}`, syncify_js.dim2).Line(` $ sy delete ${describe("Remove files/resources from a store or theme")}`, syncify_js.dim2).Line(` $ sy pack ${describe("Generate a .zip package of the current theme")}`, syncify_js.dim2).Line(` $ sy link ${describe("Link existing themes/s from a store")}`).Line(` $ sy unlink ${describe("Remove a linked theme/s from project")}`, syncify_js.dim2).Line(` $ sy duplicate ${describe("Duplicates an existing theme in a store")}`).Line(` $ sy keychain ${describe("Access the global token keychain")}`).Line(` $ sy git ${describe("Git integration configuration and information")}`, syncify_js.dim2).Line(` $ sy prune ${describe("Clears internal project caches from disk")}`, syncify_js.dim2).Line(` $ sy inspect ${describe("Prints information about Syncify installation")}`).Line(` $ sy projects ${describe("Lists all Syncify projects on this device")}`).Line(` $ sy doctor ${describe("Diagnostics and fixable operations")}`, syncify_js.dim2).Line(` $ sy help ${describe("Print complete command list")}`).Header(`FLAGS${syncify_js.COL}`, syncify_js.bold2).Line(` --input, -i ${describe("Define input (source) directory")}`).Line(` --output, -o ${describe("Define output directory")}`).Line(` --config, -c ${describe("Define config directory")}`).Line(` --hot, -h ${describe("HOT Reload when running watch mode")}`).Line(` --target, -T ${describe("Theme and store targeting")}`).Line(` --filter, -F ${describe("File filtering and globs")}`).Line(` --align ${describe("Subset theme file merge with remote sources")}`).Line(` --new ${describe("Used with sy pull to create a new theme")}`).Line(` --bind ${describe("Live bindings in watch mode")}`).Line(` --dev ${describe("Development environment (default)")}`).Line(` --prod ${describe("Production environment")}`).Line(` --terse ${describe("Terse distribution (minification)")}`).Line(` --clean ${describe("Clean output directory")}`).Line(` --silent ${describe("Suppress logging via stdout")}`).Line(` --patch ${describe("Apply a patch version bump")}`).Line(` --minor ${describe("Apply a minor version bump")}`).Line(` --major ${describe("Apply a major version bump")}`).Line(` --force ${describe("Force overwrite or action (caution)")}`).Line(` --batch ${describe("Control batch limit (default is 10)")}`).Ruler().Append("\xA9 2025 \u039D\u03B9\u03BA\u03BF\u03BB\u03B1\u03C2 \u03A3\u03B1\u03B2\u03B2\u03B9\u03B4\u03B7\u03C2", syncify_js.gray2.bold).Line(`Version${syncify_js.COL} ${syncify_js.$.version}`, syncify_js.gray2).Line(`License${syncify_js.COL} Apache 2.0`, syncify_js.gray2).Line(`Website${syncify_js.COL} ${syncify_js.underline2("https://syncify.sh")}`, syncify_js.gray2).Line(`Github${syncify_js.COL} ${syncify_js.underline2("https://github.com/panoply/syncify")}`, syncify_js.gray2).Line(`Discord${syncify_js.COL} ${syncify_js.underline2("https://discord.gg/shopify-developers-597504637167468564")}`, syncify_js.gray2).Newline().toString((input) => {
28
+ syncify_js.pt().Header(`HELP${syncify_js.L}`, syncify_js.x).Line(` $ sy help ${describe("Prints this screen")}`).Line(` $ sy help {mode} ${describe("Pick a mode and view usage guide")}`).Line(` $ sy help examples ${describe("Real world command line examples")}`).Header(`USAGE${syncify_js.L}`, syncify_js.x).Line(` $ sy {mode} ${describe("Command mode is required")}`).Line(` $ sy {mode} --flags ${describe("Flags can be provided to modes")}`).Line(` $ sy {mode} [options] ${describe("Some modes accept positionals")}`).Line(` $ sy {mode} [options] --flags ${describe("Mode with positional and flags")}`).Header("MODES" + syncify_js.L, syncify_js.x).Line(` $ sy init ${describe("Setup Syncify in existing project")}`).Line(` $ sy build ${describe("Build theme from source")}`).Line(` $ sy watch ${describe("Watch and rebuild changes")}`).Line(` $ sy pull ${describe("Download from a store theme")}`).Line(` $ sy push ${describe("Upload to a store theme")}`).Line(` $ sy create ${describe("Create a new Syncify project")}`).Line(` $ sy publish ${describe("Changes a theme role to and makes it main")}`, syncify_js.Eu).Line(` $ sy delete ${describe("Remove files/resources from a store or theme")}`, syncify_js.Eu).Line(` $ sy pack ${describe("Generate a .zip package of the current theme")}`, syncify_js.Eu).Line(` $ sy link ${describe("Link existing themes/s from a store")}`).Line(` $ sy unlink ${describe("Remove a linked theme/s from project")}`, syncify_js.Eu).Line(` $ sy duplicate ${describe("Duplicates an existing theme in a store")}`).Line(` $ sy keychain ${describe("Access the global token keychain")}`).Line(` $ sy git ${describe("Git integration configuration and information")}`, syncify_js.Eu).Line(` $ sy prune ${describe("Clears internal project caches from disk")}`, syncify_js.Eu).Line(` $ sy inspect ${describe("Prints information about Syncify installation")}`).Line(` $ sy projects ${describe("Lists all Syncify projects on this device")}`).Line(` $ sy doctor ${describe("Diagnostics and fixable operations")}`, syncify_js.Eu).Line(` $ sy help ${describe("Print complete command list")}`).Header(`FLAGS${syncify_js.L}`, syncify_js.x).Line(` --input, -i ${describe("Define input (source) directory")}`).Line(` --output, -o ${describe("Define output directory")}`).Line(` --config, -c ${describe("Define config directory")}`).Line(` --hot, -h ${describe("HOT Reload when running watch mode")}`).Line(` --target, -T ${describe("Theme and store targeting")}`).Line(` --filter, -F ${describe("File filtering and globs")}`).Line(` --align ${describe("Subset theme file merge with remote sources")}`).Line(` --new ${describe("Used with sy pull to create a new theme")}`).Line(` --bind ${describe("Live bindings in watch mode")}`).Line(` --dev ${describe("Development environment (default)")}`).Line(` --prod ${describe("Production environment")}`).Line(` --terse ${describe("Terse distribution (minification)")}`).Line(` --clean ${describe("Clean output directory")}`).Line(` --silent ${describe("Suppress logging via stdout")}`).Line(` --patch ${describe("Apply a patch version bump")}`).Line(` --minor ${describe("Apply a minor version bump")}`).Line(` --major ${describe("Apply a major version bump")}`).Line(` --force ${describe("Force overwrite or action (caution)")}`).Line(` --batch ${describe("Control batch limit (default is 10)")}`).Ruler().Append("\xA9 2025 \u039D\u03B9\u03BA\u03BF\u03BB\u03B1\u03C2 \u03A3\u03B1\u03B2\u03B2\u03B9\u03B4\u03B7\u03C2", syncify_js.a.bold).Line(`Version${syncify_js.L} ${syncify_js.$.version}`, syncify_js.a).Line(`License${syncify_js.L} Apache 2.0`, syncify_js.a).Line(`Website${syncify_js.L} ${syncify_js.me("https://syncify.sh")}`, syncify_js.a).Line(`Github${syncify_js.L} ${syncify_js.me("https://github.com/panoply/syncify")}`, syncify_js.a).Line(`Discord${syncify_js.L} ${syncify_js.me("https://discord.gg/shopify-developers-597504637167468564")}`, syncify_js.a).Newline().toString((input) => {
29
29
  const [header, footer] = encase({ banner: true });
30
- const heading = syncify_js.Scroll({ input: header, height: 8 });
31
- const content = syncify_js.Scroll({
30
+ const heading = syncify_js.Co({ input: header, height: 8 });
31
+ const content = syncify_js.Co({
32
32
  input: highlight(input),
33
33
  yPos: 8,
34
34
  height: syncify_js.$.terminal.rows - 12
@@ -43,15 +43,19 @@ function Default() {
43
43
  // syncify/cli/help/information.ts
44
44
  function Inspect() {
45
45
  syncify_js.log.clear();
46
- syncify_js.Create().BR.Top("Inspect").Header(`${syncify_js.white2.bold("@syncify/cli")}`).Line(`${syncify_js.gray2("VERSION")}${syncify_js.COL} v${syncify_js.whiteBright2("1.0.0-alpha.1")}`).Line(`${syncify_js.gray2("HOT")}${syncify_js.COL} v${syncify_js.whiteBright2("0.4.9")}`).Line(`${syncify_js.gray2("LICENSE")}${syncify_js.COL} ${syncify_js.whiteBright2("Apache 2.0")}`).Line(`${syncify_js.gray2("AUTHOR")}${syncify_js.COL} ${syncify_js.whiteBright2("\u039D\u03B9\u03BA\u03BF\u03BB\u03B1\u03C2 \u03A3\u03B1\u03B2\u03B2\u03B9\u03B4\u03B7\u03C2")}`).Line(`${syncify_js.gray2("PM")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.pm)}`).Line(`${syncify_js.gray2("OS")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.platform)}`).Line(`${syncify_js.gray2("BINARY")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.using)}`).Line(`${syncify_js.gray2("CWD")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.cwd)}`).Line(`${syncify_js.gray2("HASH")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.hash)}`).Line(`${syncify_js.gray2("SCRIPT")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.bin)}`).Line(`${syncify_js.gray2("MODULE")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.dirs.module)}`).Line(`${syncify_js.gray2("STORE")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.home)}`).Line(`${syncify_js.gray2("KEYCHAIN")}${syncify_js.COL} ${syncify_js.whiteBright2(`${syncify_js.$.file.keychain}`)}`).Line(`${syncify_js.gray2("GITHUB")}${syncify_js.COL} ${syncify_js.whiteBright2(syncify_js.$.github)}`).Line(`${syncify_js.gray2("WEBSITE")}${syncify_js.COL} ${syncify_js.whiteBright2("https://syncify.sh")}`).NL.End("Inspect").BR.toLog().Break();
46
+ syncify_js.pt().BR.Top("Inspect").Header(`${syncify_js.Ve.bold("@syncify/cli")}`).Line(`${syncify_js.a("VERSION")}${syncify_js.L} v${syncify_js.I("1.0.0-unstable.0")}`).Line(`${syncify_js.a("HOT")}${syncify_js.L} v${syncify_js.I("0.4.9")}`).Line(`${syncify_js.a("LICENSE")}${syncify_js.L} ${syncify_js.I("Apache 2.0")}`).Line(`${syncify_js.a("AUTHOR")}${syncify_js.L} ${syncify_js.I("\u039D\u03B9\u03BA\u03BF\u03BB\u03B1\u03C2 \u03A3\u03B1\u03B2\u03B2\u03B9\u03B4\u03B7\u03C2")}`).Line(`${syncify_js.a("PM")}${syncify_js.L} ${syncify_js.I(syncify_js.$.pm)}`).Line(`${syncify_js.a("OS")}${syncify_js.L} ${syncify_js.I(syncify_js.$.platform)}`).Line(`${syncify_js.a("BINARY")}${syncify_js.L} ${syncify_js.I(syncify_js.$.using)}`).Line(`${syncify_js.a("CWD")}${syncify_js.L} ${syncify_js.I(syncify_js.$.cwd)}`).Line(`${syncify_js.a("HASH")}${syncify_js.L} ${syncify_js.I(syncify_js.$.hash)}`).Line(`${syncify_js.a("SCRIPT")}${syncify_js.L} ${syncify_js.I(syncify_js.$.bin)}`).Line(`${syncify_js.a("MODULE")}${syncify_js.L} ${syncify_js.I(syncify_js.$.dirs.module)}`).Line(`${syncify_js.a("STORE")}${syncify_js.L} ${syncify_js.I(syncify_js.$.home)}`).Line(`${syncify_js.a("KEYCHAIN")}${syncify_js.L} ${syncify_js.I(`${syncify_js.$.file.keychain}`)}`).Line(`${syncify_js.a("GITHUB")}${syncify_js.L} ${syncify_js.I(syncify_js.$.github)}`).Line(`${syncify_js.a("WEBSITE")}${syncify_js.L} ${syncify_js.I("https://syncify.sh")}`).NL.End("Inspect").BR.toLog().Break();
47
47
  }
48
48
  function Version() {
49
49
  syncify_js.log.clear();
50
- syncify_js.Create().BR.Top("Versions", false).NL.Line(`${syncify_js.whiteBright2("@syncify/cli")} ${syncify_js.ARR} ${syncify_js.whiteBright2("v1.0.0-alpha.1")}`).Line(`${syncify_js.whiteBright2("@syncify/hot")} ${syncify_js.ARR} ${syncify_js.whiteBright2("v0.4.9")}`).NL.End("Versions", false).BR.toLog().Break();
50
+ syncify_js.pt().BR.Top("Versions", false).NL.Line(`${syncify_js.I("@syncify/cli")} ${syncify_js.q} ${syncify_js.I("v1.0.0-unstable.0")}`).Line(`${syncify_js.I("@syncify/hot")} ${syncify_js.q} ${syncify_js.I("v0.4.9")}`).NL.End("Versions", false).BR.toLog().Break();
51
51
  }
52
52
 
53
53
  // syncify/cli/help/descriptions.ts
54
54
  var description = (mode) => ({
55
+ init: {
56
+ reference: "https://syncify.sh/cli/sy-init",
57
+ overview: "The init command is used to initalize a new Syncify project. This command analyzes the current directory and guides you through an interactive setup prompt."
58
+ },
55
59
  create: {
56
60
  reference: "https://syncify.sh/cli/sy-create",
57
61
  overview: "The create command is an interactive command prompt. You can (optionally) provide a strap name option to skip choice selection. Options with strikethrough are either deprecated or not yet available for use."
@@ -86,59 +90,63 @@ var description = (mode) => ({
86
90
  // syncify/cli/help/modes.ts
87
91
  function Modes(mode) {
88
92
  if (mode in Modes) return Modes[mode]();
89
- const tui = syncify_js.Create().Top(`Syncify ${syncify_js.CHV} Error`, false).Header("NOT YET AVAILABLE", syncify_js.yellowBright2.bold);
93
+ const tui = syncify_js.pt().Top(`Syncify ${syncify_js.Uu} Error`, false).Header("NOT YET AVAILABLE", syncify_js.O.bold);
90
94
  if (syncify_js.COMMAND_MODES.has(mode)) {
91
95
  const message = [
92
- `Help reference for the ${syncify_js.bold2(`sy help ${mode}`)} command is not yet available to`,
93
- `${syncify_js.bold2("sy help")} but is slated for inclusion in upcoming releases.`,
96
+ `Help reference for the ${syncify_js.x(`sy help ${mode}`)} command is not yet available to`,
97
+ `${syncify_js.x("sy help")} but is slated for inclusion in upcoming releases.`,
94
98
  "The command itself is valid and functional, only the help information is unavailable."
95
99
  ];
96
- const modes = syncify_js.toArray(syncify_js.COMMAND_MODES).filter((n) => n !== "help").sort((a, b) => a in Modes === b in Modes ? 0 : a in Modes ? -1 : 1);
100
+ const modes = syncify_js.toArray(syncify_js.COMMAND_MODES).filter((n) => n !== "help").sort((a2, b) => a2 in Modes === b in Modes ? 0 : a2 in Modes ? -1 : 1);
97
101
  const equal = syncify_js.eqWS(modes, { padding: 0 });
98
- tui.Wrap(message, syncify_js.yellowBright2).Newline().Each(modes, (name) => name in Modes ? tui.Line(`$ sy help ${name} ${equal(name) + syncify_js.CHK}`, syncify_js.whiteBright2) : tui.Line(`$ ${syncify_js.strikethrough2(`sy help ${name}`)}`, syncify_js.gray2));
102
+ tui.Wrap(message, syncify_js.O).Newline().Each(modes, (name) => name in Modes ? tui.Line(`$ sy help ${name} ${equal(name) + syncify_js.Gu}`, syncify_js.I) : tui.Line(`$ ${syncify_js.yu(`sy help ${name}`)}`, syncify_js.a));
99
103
  }
100
- tui.Newline().End(`Syncify ${syncify_js.CHV} Error`, false).BR.toLog(highlight);
104
+ tui.Newline().End(`Syncify ${syncify_js.Uu} Error`, false).BR.toLog(highlight);
101
105
  }
106
+ Modes.init = () => {
107
+ const info = description("init");
108
+ syncify_js.pt().BR.Top(`help ${syncify_js.Ae} sy inspect`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.L}`, syncify_js.x).Wrap(syncify_js.a, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.a.underline)).Header(`COMMANDS${syncify_js.L}`, syncify_js.x).Line(" $ sy init").NL.End(`help ${syncify_js.Ae} sy inspect`, false).BR.toLog(highlight);
109
+ };
102
110
  Modes.push = () => {
103
111
  const info = description("push");
104
- syncify_js.Create().BR.Top(`help ${syncify_js.TLD} sy push`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.COL}`, syncify_js.bold2).Wrap(syncify_js.gray2, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.gray2.underline)).Header(`COMMANDS${syncify_js.COL}`, syncify_js.bold2).Line(" $ sy push").Line(" $ sy push --flags").Header(`FLAGS${syncify_js.COL}`, syncify_js.bold2).Line(` --force ${describe("Skips diffing and force overwrites")}`).Line(` --filter, -F ${describe("filter specific files/directories")}`).Line(` --target, -T ${describe("Target a theme or store")}`).Line(` --batch <number> ${describe("Upsert batch limits (default 10)")}`).Newline().End(`help ${syncify_js.TLD} sy push`, false).BR.toLog(highlight);
105
- syncify_js.kill.exit(0);
112
+ syncify_js.pt().BR.Top(`help ${syncify_js.Ae} sy push`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.L}`, syncify_js.x).Wrap(syncify_js.a, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.a.underline)).Header(`COMMANDS${syncify_js.L}`, syncify_js.x).Line(" $ sy push").Line(" $ sy push --flags").Header(`FLAGS${syncify_js.L}`, syncify_js.x).Line(` --force ${describe("Skips diffing and force overwrites")}`).Line(` --filter, -F ${describe("filter specific files/directories")}`).Line(` --target, -T ${describe("Target a theme or store")}`).Line(` --batch <number> ${describe("Upsert batch limits (default 10)")}`).Newline().End(`help ${syncify_js.Ae} sy push`, false).BR.toLog(highlight);
113
+ syncify_js.i.exit(0);
106
114
  };
107
115
  Modes.pull = () => {
108
116
  const info = description("pull");
109
- syncify_js.Create().BR.Top(`help ${syncify_js.TLD} sy pull`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.COL}`, syncify_js.bold2).Wrap(syncify_js.gray2, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.gray2.underline)).Header(`COMMANDS${syncify_js.COL}`, syncify_js.bold2).Line(" $ sy pull").Line(" $ sy pull --flags").Header(`FLAGS${syncify_js.COL}`, syncify_js.bold2).Line(` --filter, -F ${describe("Filter specific files/directories")}`).Line(` --target, -T ${describe("Target a theme or store")}`).Line(` --merge ${describe(`Merges local ${syncify_js.ARL} remote theme`)}`).Line(` --align ${describe(`Align local ${syncify_js.ARL} remote theme JSON files`)}`).Line(` --force ${describe("Skips diffing and force overwrites")}`).Line(` --output, -o ${describe("Controls where theme file/s are written")}`).Line(` --batch <number> ${describe("Upsert batch limits (default 10)")}`).Line(` --help ${describe("Show this screen")}`).NL.End(`help ${syncify_js.TLD} sy push`, false).BR.toLog(highlight);
117
+ syncify_js.pt().BR.Top(`help ${syncify_js.Ae} sy pull`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.L}`, syncify_js.x).Wrap(syncify_js.a, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.a.underline)).Header(`COMMANDS${syncify_js.L}`, syncify_js.x).Line(" $ sy pull").Line(" $ sy pull --flags").Header(`FLAGS${syncify_js.L}`, syncify_js.x).Line(` --filter, -F ${describe("Filter specific files/directories")}`).Line(` --target, -T ${describe("Target a theme or store")}`).Line(` --merge ${describe(`Merges local ${syncify_js.Hu} remote theme`)}`).Line(` --align ${describe(`Align local ${syncify_js.Hu} remote theme JSON files`)}`).Line(` --force ${describe("Skips diffing and force overwrites")}`).Line(` --output, -o ${describe("Controls where theme file/s are written")}`).Line(` --batch <number> ${describe("Upsert batch limits (default 10)")}`).Line(` --help ${describe("Show this screen")}`).NL.End(`help ${syncify_js.Ae} sy push`, false).BR.toLog(highlight);
110
118
  };
111
119
  Modes.watch = () => {
112
120
  const info = description("watch");
113
- syncify_js.Create().BR.Top(`help ${syncify_js.TLD} sy watch`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.COL}`, syncify_js.bold2).Wrap(syncify_js.gray2, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.gray2.underline)).Header(`COMMANDS${syncify_js.COL}`, syncify_js.bold2).Line(" $ sy watch").Line(" $ sy watch --flags").Header(`FLAGS${syncify_js.COL}`, syncify_js.bold2).Line(` --target, -T ${describe("Target a theme or store")}`).Line(` --filter, -F ${describe("Filter specific files/directories")}`).Line(` --hot ${describe("Activates HOT Reloading")}`).Line(` --align ${describe("Align local theme JSON files before watching")}`).Line(` --bind ${describe("Activates 2 way bindings")}`).Line(` --terse ${describe("Terse minification")}`).Line(` --dev ${describe("Development build mode (default)")}`).Line(` --prod ${describe("Production build mode")}`).Line(` --help ${describe("Show this screen")}`).NL.End(`help ${syncify_js.TLD} sy watch`, false).BR.toLog(highlight);
121
+ syncify_js.pt().BR.Top(`help ${syncify_js.Ae} sy watch`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.L}`, syncify_js.x).Wrap(syncify_js.a, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.a.underline)).Header(`COMMANDS${syncify_js.L}`, syncify_js.x).Line(" $ sy watch").Line(" $ sy watch --flags").Header(`FLAGS${syncify_js.L}`, syncify_js.x).Line(` --target, -T ${describe("Target a theme or store")}`).Line(` --filter, -F ${describe("Filter specific files/directories")}`).Line(` --hot ${describe("Activates HOT Reloading")}`).Line(` --align ${describe("Align local theme JSON files before watching")}`).Line(` --bind ${describe("Activates 2 way bindings")}`).Line(` --terse ${describe("Terse minification")}`).Line(` --dev ${describe("Development build mode (default)")}`).Line(` --prod ${describe("Production build mode")}`).Line(` --help ${describe("Show this screen")}`).NL.End(`help ${syncify_js.Ae} sy watch`, false).BR.toLog(highlight);
114
122
  };
115
123
  Modes.inspect = () => {
116
124
  const info = description("watch");
117
- syncify_js.Create().BR.Top(`help ${syncify_js.TLD} sy inspect`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.COL}`, syncify_js.bold2).Wrap(syncify_js.gray2, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.gray2.underline)).Header(`COMMANDS${syncify_js.COL}`, syncify_js.bold2).Line(" $ sy inspect").NL.End(`help ${syncify_js.TLD} sy inspect`, false).BR.toLog(highlight);
125
+ syncify_js.pt().BR.Top(`help ${syncify_js.Ae} sy inspect`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.L}`, syncify_js.x).Wrap(syncify_js.a, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.a.underline)).Header(`COMMANDS${syncify_js.L}`, syncify_js.x).Line(" $ sy inspect").NL.End(`help ${syncify_js.Ae} sy inspect`, false).BR.toLog(highlight);
118
126
  };
119
127
  Modes.create = () => {
120
128
  const info = description("build");
121
- const message = syncify_js.Create().BR.Top(`help ${syncify_js.TLD} sy create`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.COL}`, syncify_js.bold2).Wrap(syncify_js.gray2, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.gray2.underline)).Header(`COMMANDS${syncify_js.COL}`, syncify_js.bold2).Line(" $ sy create").Line(` $ sy create ${syncify_js.Encase("AN", "strap")}`).Header(`OPTIONS${syncify_js.COL}`, syncify_js.bold2);
129
+ const message = syncify_js.pt().BR.Top(`help ${syncify_js.Ae} sy create`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.L}`, syncify_js.x).Wrap(syncify_js.a, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.a.underline)).Header(`COMMANDS${syncify_js.L}`, syncify_js.x).Line(" $ sy create").Line(` $ sy create ${syncify_js.$D("AN", "strap")}`).Header(`OPTIONS${syncify_js.L}`, syncify_js.x);
122
130
  const straps = [...syncify_js.STRAP_THEMES, ...syncify_js.STRAP_EXAMPLES];
123
131
  const eq = syncify_js.eqWS(straps.map(([name]) => name), { padding: 2 });
124
132
  syncify_js.forEach(([name, desc, unavilable]) => {
125
- const line = unavilable ? ` $ ${syncify_js.strikethrough2(`sy create ${name}`)}${eq(name)} ${describe("unavilable")}` : ` $ sy create ${name}${eq(name)} ${describe(desc.trim())}`;
133
+ const line = unavilable ? ` $ ${syncify_js.yu(`sy create ${name}`)}${eq(name)} ${describe("unavilable")}` : ` $ sy create ${name}${eq(name)} ${describe(desc.trim())}`;
126
134
  message.Line(line);
127
135
  }, straps);
128
- message.NL.End(`help ${syncify_js.TLD} sy push`, false).BR.toLog(highlight);
136
+ message.NL.End(`help ${syncify_js.Ae} sy push`, false).BR.toLog(highlight);
129
137
  };
130
138
  Modes.projects = () => {
131
139
  const info = description("projects");
132
- syncify_js.Create().BR.Top(`help ${syncify_js.TLD} sy projects`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.COL}`, syncify_js.bold2).Wrap(syncify_js.gray2, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.gray2.underline)).Header(`COMMANDS${syncify_js.COL}`, syncify_js.bold2).Line(" $ sy projects").Line(` $ sy projects ${syncify_js.Encase("AN", syncify_js.magenta2("name"))}`).NL.End(`help ${syncify_js.TLD} sy push`, false).BR.toLog(highlight);
140
+ syncify_js.pt().BR.Top(`help ${syncify_js.Ae} sy projects`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.L}`, syncify_js.x).Wrap(syncify_js.a, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.a.underline)).Header(`COMMANDS${syncify_js.L}`, syncify_js.x).Line(" $ sy projects").Line(` $ sy projects ${syncify_js.$D("AN", syncify_js.du("name"))}`).NL.End(`help ${syncify_js.Ae} sy push`, false).BR.toLog(highlight);
133
141
  };
134
142
  Modes.build = () => {
135
143
  const info = description("build");
136
- syncify_js.Create().BR.Top(`help ${syncify_js.TLD} sy build`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.COL}`, syncify_js.bold2).Wrap(syncify_js.gray2, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.gray2.underline)).Header(`COMMANDS${syncify_js.COL}`, syncify_js.bold2).Line(" $ sy build").Line(" $ sy build --flags").Line(` $ sy build ${syncify_js.Encase("SB", "option")}`).Line(` $ sy build ${syncify_js.Encase("SB", "option")} --flags`).Header(`OPTIONS${syncify_js.COL}`, syncify_js.bold2).Line(` $ sy build script ${describe("Run build on script transform")}`).Line(` $ sy build style ${describe("Run build on style transform")}`).Line(` $ sy build svg ${describe("Run build on svg transform")}`).Line(` $ sy build liquid ${describe("Run build on liquid transform")}`).Line(` $ sy build json ${describe("Run build on json transform")}`).Header(`FLAGS${syncify_js.COL}`, syncify_js.bold2).Line(` --terse ${describe("Terse minification")}`).Line(` --dev ${describe("Development build mode (default)")}`).Line(` --prod ${describe("Production build mode")}`).Line(` --help ${describe("Show this screen")}`).NL.End(`help ${syncify_js.TLD} sy build`, false).BR.toLog(highlight);
144
+ syncify_js.pt().BR.Top(`help ${syncify_js.Ae} sy build`, false).True(info, (tui) => tui.Header(`DESCRIPTION${syncify_js.L}`, syncify_js.x).Wrap(syncify_js.a, info.overview)).True(info, (tui) => tui.Prepend(info.reference, syncify_js.a.underline)).Header(`COMMANDS${syncify_js.L}`, syncify_js.x).Line(" $ sy build").Line(" $ sy build --flags").Line(` $ sy build ${syncify_js.$D("SB", "option")}`).Line(` $ sy build ${syncify_js.$D("SB", "option")} --flags`).Header(`OPTIONS${syncify_js.L}`, syncify_js.x).Line(` $ sy build script ${describe("Run build on script transform")}`).Line(` $ sy build style ${describe("Run build on style transform")}`).Line(` $ sy build svg ${describe("Run build on svg transform")}`).Line(` $ sy build liquid ${describe("Run build on liquid transform")}`).Line(` $ sy build json ${describe("Run build on json transform")}`).Header(`FLAGS${syncify_js.L}`, syncify_js.x).Line(` --terse ${describe("Terse minification")}`).Line(` --dev ${describe("Development build mode (default)")}`).Line(` --prod ${describe("Production build mode")}`).Line(` --help ${describe("Show this screen")}`).NL.End(`help ${syncify_js.Ae} sy build`, false).BR.toLog(highlight);
137
145
  };
138
146
 
139
147
  // syncify/cli/help/suggest.ts
140
148
  function Suggest() {
141
- syncify_js.Create().Top(`Syncify ${syncify_js.CHV} Error`, false).Header("1.0.0-alpha.1", syncify_js.gray2).Error("MISSING COMMAND " + syncify_js.BAD, syncify_js.bold2.redBright).Newline("red").Error("Please provide a command line argument", syncify_js.redBright2).Header(`USAGE${syncify_js.COL}`, syncify_js.bold2).Line(` $ sy <${syncify_js.magenta2("mode")}>`).Line(` $ sy <${syncify_js.magenta2("mode")}> --flags`).Line(` $ sy <${syncify_js.magenta2("mode")}> [options]`).Line(` $ sy <${syncify_js.magenta2("mode")}> [options] --flags`).Header(`HELP${syncify_js.COL}`, syncify_js.bold2).Line(" $ sy help").Line(` $ sy <${syncify_js.magenta2("mode")}> --help`).NL.End(`Syncify ${syncify_js.CHV} Error`, false).BR.toLog(highlight).Break();
149
+ syncify_js.pt().Top(`Syncify ${syncify_js.Uu} Error`, false).Header("1.0.0-unstable.0", syncify_js.a).Error("MISSING COMMAND " + syncify_js.Pt, syncify_js.x.redBright).Newline("red").Error("Please provide a command line argument", syncify_js.T).Header(`USAGE${syncify_js.L}`, syncify_js.x).Line(` $ sy <${syncify_js.du("mode")}>`).Line(` $ sy <${syncify_js.du("mode")}> --flags`).Line(` $ sy <${syncify_js.du("mode")}> [options]`).Line(` $ sy <${syncify_js.du("mode")}> [options] --flags`).Header(`HELP${syncify_js.L}`, syncify_js.x).Line(" $ sy help").Line(` $ sy <${syncify_js.du("mode")}> --help`).NL.End(`Syncify ${syncify_js.Uu} Error`, false).BR.toLog(highlight).Break();
142
150
  }
143
151
 
144
152
  // syncify/mode/help.ts
@@ -207,37 +215,37 @@ function parse(cmd) {
207
215
  fallback[0].mode = "help";
208
216
  return fallback;
209
217
  }
210
- let i = -1;
218
+ let i2 = -1;
211
219
  let s = cmd.length;
212
- while (++i < s) if (cmd[i].mode === find) break;
213
- if (i === s) {
220
+ while (++i2 < s) if (cmd[i2].mode === find) break;
221
+ if (i2 === s) {
214
222
  syncify_js.throwCommand([
215
- `Invalid positional or mode${syncify_js.COL} "${syncify_js.red2.bold(find)}"
223
+ `Invalid positional or mode${syncify_js.L} "${syncify_js.w.bold(find)}"
216
224
  `,
217
225
  "You must provide a known and valid execution mode.",
218
- `For a list of available modes, run the help command${syncify_js.COL}
226
+ `For a list of available modes, run the help command${syncify_js.L}
219
227
 
220
228
  `,
221
- `${syncify_js.gray2("$")} ${syncify_js.blue2("sy help modes")}`
229
+ `${syncify_js.a("$")} ${syncify_js.Cu("sy help modes")}`
222
230
  ]);
223
231
  }
224
232
  const flag = flags();
225
- const mode = cmd[i];
233
+ const mode = cmd[i2];
226
234
  const options = syncify_js.o();
227
235
  if ("flags" in mode) {
228
- i = -1;
236
+ i2 = -1;
229
237
  s = mode.flags.length;
230
- while (++i < s) {
231
- if (mode.flags[i] in flag) {
232
- options[mode.flags[i]] = flag[mode.flags[i]];
238
+ while (++i2 < s) {
239
+ if (mode.flags[i2] in flag) {
240
+ options[mode.flags[i2]] = flag[mode.flags[i2]];
233
241
  } else {
234
242
  syncify_js.throwCommand([
235
- `Unknown flag expression provided "${syncify_js.bold2(`--${mode.flags[i]}`)}"
243
+ `Unknown flag expression provided "${syncify_js.x(`--${mode.flags[i2]}`)}"
236
244
  `,
237
- `Accepted flags for ${syncify_js.bold2(mode.mode)} mode${syncify_js.COL}
245
+ `Accepted flags for ${syncify_js.x(mode.mode)} mode${syncify_js.L}
238
246
 
239
247
  `,
240
- `${syncify_js.g.nl(mode.flags.map((v) => syncify_js.gray2("--") + syncify_js.blue2(v)))}`
248
+ `${syncify_js.g.nl(mode.flags.map((v) => syncify_js.a("--") + syncify_js.Cu(v)))}`
241
249
  ]);
242
250
  }
243
251
  }
@@ -251,7 +259,7 @@ function parse(cmd) {
251
259
  });
252
260
  return [mode, args];
253
261
  } catch (error) {
254
- syncify_js.throwCommand(error.message.replace(/(--?)([a-z-]+)?/g, syncify_js.red2.bold("$1$2")));
262
+ syncify_js.throwCommand(error.message.replace(/(--?)([a-z-]+)?/g, syncify_js.w.bold("$1$2")));
255
263
  }
256
264
  }
257
265
  }
@@ -259,11 +267,11 @@ function positional(cmd, tokens) {
259
267
  function parseBuild() {
260
268
  if (tokens.length > 1) {
261
269
  syncify_js.throwCommand([
262
- `Invalid positional ${syncify_js.bold2("build")} arguments expression provided. No more than 1 transform`,
263
- `can be passed. Use comma ${syncify_js.bold2(",")} separated expression instead, e.g:
270
+ `Invalid positional ${syncify_js.x("build")} arguments expression provided. No more than 1 transform`,
271
+ `can be passed. Use comma ${syncify_js.x(",")} separated expression instead, e.g:
264
272
 
265
273
  `,
266
- `${syncify_js.gray2("$")} ${syncify_js.blue2(`sy build ${syncify_js.bold2(tokens.join(syncify_js.gray2(",")))}`)}`
274
+ `${syncify_js.a("$")} ${syncify_js.Cu(`sy build ${syncify_js.x(tokens.join(syncify_js.a(",")))}`)}`
267
275
  ]);
268
276
  return false;
269
277
  } else {
@@ -271,11 +279,11 @@ function positional(cmd, tokens) {
271
279
  for (const transform of tokens[0].split(",")) {
272
280
  if (!syncify_js.includes(transform, cmd.accepts)) {
273
281
  syncify_js.throwCommand([
274
- `Invalid ${syncify_js.bold2("sy build")} transform "${syncify_js.bold2(transform)}" provided.`,
275
- `Must be one of the following${syncify_js.COL}
282
+ `Invalid ${syncify_js.x("sy build")} transform "${syncify_js.x(transform)}" provided.`,
283
+ `Must be one of the following${syncify_js.L}
276
284
 
277
285
  `,
278
- `${syncify_js.g.nl(cmd.accepts.map((v) => syncify_js.blue2(v)))}`
286
+ `${syncify_js.g.nl(cmd.accepts.map((v) => syncify_js.Cu(v)))}`
279
287
  ]);
280
288
  return false;
281
289
  } else {
@@ -286,11 +294,11 @@ function positional(cmd, tokens) {
286
294
  } else {
287
295
  if (!syncify_js.includes(tokens[0], cmd.accepts)) {
288
296
  syncify_js.throwCommand([
289
- `Invalid ${syncify_js.bold2("sy build")} transform "${syncify_js.bold2(tokens[0])}"`,
290
- `Must be one of the following${syncify_js.COL}
297
+ `Invalid ${syncify_js.x("sy build")} transform "${syncify_js.x(tokens[0])}"`,
298
+ `Must be one of the following${syncify_js.L}
291
299
 
292
300
  `,
293
- `${syncify_js.g.nl(cmd.accepts.map((v) => syncify_js.blue2(v)))}`
301
+ `${syncify_js.g.nl(cmd.accepts.map((v) => syncify_js.Cu(v)))}`
294
302
  ]);
295
303
  return false;
296
304
  } else {
@@ -306,11 +314,11 @@ function positional(cmd, tokens) {
306
314
  return true;
307
315
  } else {
308
316
  syncify_js.throwCommand([
309
- `Invalid ${syncify_js.bold2("sy help")} argument "${syncify_js.bold2(tokens[0])}" ${syncify_js.TLD}`,
310
- `Must be one of the following${syncify_js.COL}
317
+ `Invalid ${syncify_js.x("sy help")} argument "${syncify_js.x(tokens[0])}" ${syncify_js.Ae}`,
318
+ `Must be one of the following${syncify_js.L}
311
319
 
312
320
  `,
313
- `${syncify_js.g.nl(cmd.accepts.map((v) => `${syncify_js.DSH} sy help ${v}`))}`
321
+ `${syncify_js.g.nl(cmd.accepts.map((v) => `${syncify_js.Rt} sy help ${v}`))}`
314
322
  ]);
315
323
  return false;
316
324
  }
@@ -321,11 +329,11 @@ function positional(cmd, tokens) {
321
329
  return true;
322
330
  } else {
323
331
  syncify_js.throwCommand([
324
- `Invalid ${syncify_js.bold2("keychain")} argument "${syncify_js.bold2(tokens[0])}" ${syncify_js.TLD}`,
325
- `Must be one of the following${syncify_js.COL}
332
+ `Invalid ${syncify_js.x("keychain")} argument "${syncify_js.x(tokens[0])}" ${syncify_js.Ae}`,
333
+ `Must be one of the following${syncify_js.L}
326
334
 
327
335
  `,
328
- `${syncify_js.g.nl(cmd.accepts.map((v) => `${syncify_js.DSH} ${syncify_js.blue2(v)}`))}`
336
+ `${syncify_js.g.nl(cmd.accepts.map((v) => `${syncify_js.Rt} ${syncify_js.Cu(v)}`))}`
329
337
  ]);
330
338
  return false;
331
339
  }
@@ -390,7 +398,7 @@ function command(commands) {
390
398
  syncify_js.$.env.cli = true;
391
399
  node_process.env.SYNCIFY_ENV = syncify_js.$.env.dev ? "dev" : "prod";
392
400
  node_process.env.SYNCIFY_WATCH = String(syncify_js.$.mode.watch);
393
- node_process.env.SYNCIFY_VERSION = "1.0.0-alpha.1";
401
+ node_process.env.SYNCIFY_VERSION = "1.0.0-unstable.0";
394
402
  return (fn) => fn();
395
403
  }
396
404
 
@@ -559,6 +567,7 @@ command(
559
567
  accepts: [
560
568
  "examples",
561
569
  // SUPPORTED
570
+ "init",
562
571
  "watch",
563
572
  "build",
564
573
  "push",
@@ -575,7 +584,6 @@ command(
575
584
  "keychain",
576
585
  "theme",
577
586
  "git",
578
- "setup",
579
587
  "prune",
580
588
  "doctor"
581
589
  ]
@@ -584,6 +592,13 @@ command(
584
592
  mode: "init",
585
593
  accepts: null
586
594
  },
595
+ {
596
+ mode: "link",
597
+ accepts: [
598
+ "theme",
599
+ "store"
600
+ ]
601
+ },
587
602
  {
588
603
  mode: "projects",
589
604
  accepts: null,