@tamagui/cli 1.130.5 → 1.130.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/cli.cjs CHANGED
@@ -22,8 +22,8 @@ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
22
22
  }) : target, mod));
23
23
  var import_arg = __toESM(require("arg")),
24
24
  import_chalk = __toESM(require("chalk")),
25
- import_add = require("./add.cjs"),
26
- import_utils = require("./utils.cjs"),
25
+ import_add = require("./add"),
26
+ import_utils = require("./utils"),
27
27
  import_static = require("@tamagui/static");
28
28
  ["exit", "SIGINT"].forEach(_ => {
29
29
  process.on(_, () => {
@@ -120,7 +120,7 @@ const COMMAND_MAP = {
120
120
  } = (0, import_arg.default)(this.flags),
121
121
  {
122
122
  installGeneratedPackage
123
- } = require("./add.cjs"),
123
+ } = require("./add"),
124
124
  [cmd, type, path] = _;
125
125
  await installGeneratedPackage(type, path);
126
126
  }
@@ -142,7 +142,7 @@ const COMMAND_MAP = {
142
142
  ...flags2
143
143
  } = (0, import_arg.default)(this.flags),
144
144
  [_command, dir] = _,
145
- imported = await import("./build"),
145
+ imported = await import("./build.mjs"),
146
146
  options = await (0, import_utils.getOptions)({
147
147
  debug: flags2["--debug"] ? flags2["--verbose"] ? "verbose" : !0 : !1
148
148
  });
@@ -179,7 +179,7 @@ const COMMAND_MAP = {
179
179
  } = (0, import_arg.default)(this.flags),
180
180
  {
181
181
  updateTemplate
182
- } = require("./update-template.cjs");
182
+ } = require("./update-template");
183
183
  if (!flags2["--template-repo"]) throw new Error("--template-repo is required");
184
184
  await updateTemplate(flags2["--template-repo"], flags2["--ignored-patterns"]?.split(" "));
185
185
  }
package/dist/generate.cjs CHANGED
@@ -38,7 +38,7 @@ __export(generate_exports, {
38
38
  module.exports = __toCommonJS(generate_exports);
39
39
  var import_fs_extra = __toESM(require("fs-extra")),
40
40
  import_ts_morph = require("ts-morph"),
41
- import_utils = require("./utils.cjs");
41
+ import_utils = require("./utils");
42
42
  async function generateTypes(options) {
43
43
  const types = await getTypes(options);
44
44
  await import_fs_extra.default.writeJSON(options.paths.types, types, {
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- require("./cli.cjs");
2
+ require("./cli");
@@ -35,23 +35,23 @@ __export(update_template_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(update_template_exports);
37
37
  var import_chalk = __toESM(require("chalk")),
38
- import_child_process = require("child_process");
38
+ import_node_child_process = require("node:child_process");
39
39
  function updateTemplate(templateUrl, ignoredPatterns = []) {
40
40
  const remoteName = `${templateUrl.split("/").pop()?.split(".")[0] || "template"}-template`,
41
41
  addRemoteCommand = `git remote add ${remoteName} ${templateUrl}`,
42
42
  rmRemoteCommand = `git remote remove ${remoteName}`;
43
43
  try {
44
- (0, import_child_process.execSync)(addRemoteCommand);
44
+ (0, import_node_child_process.execSync)(addRemoteCommand);
45
45
  } catch (error) {
46
- if (error instanceof Error && error.toString().includes("already exists")) (0, import_child_process.execSync)(rmRemoteCommand), (0, import_child_process.execSync)(addRemoteCommand);else throw error;
46
+ if (error instanceof Error && error.toString().includes("already exists")) (0, import_node_child_process.execSync)(rmRemoteCommand), (0, import_node_child_process.execSync)(addRemoteCommand);else throw error;
47
47
  }
48
- (0, import_child_process.execSync)("git fetch --all");
48
+ (0, import_node_child_process.execSync)("git fetch --all");
49
49
  try {
50
- (0, import_child_process.execSync)("git merge takeout-template/main --allow-unrelated-histories");
50
+ (0, import_node_child_process.execSync)("git merge takeout-template/main --allow-unrelated-histories");
51
51
  } catch (error) {
52
52
  if (error instanceof Error && error.message.includes("unresolved conflict")) console.info(tamaguiLog("We've merged the latest changes. Please resolve the conflicts and commit the merge."));else throw error;
53
53
  }
54
- (0, import_child_process.execSync)(`git reset HEAD ${ignoredPatterns.join(" ")}`);
54
+ (0, import_node_child_process.execSync)(`git reset HEAD ${ignoredPatterns.join(" ")}`);
55
55
  }
56
56
  function tamaguiLog(message) {
57
57
  return `${import_chalk.default.green("[Tamagui]")} ${message}`;
@@ -25,20 +25,20 @@ __export(update_template_exports, {
25
25
  updateTemplate: () => updateTemplate
26
26
  });
27
27
  module.exports = __toCommonJS(update_template_exports);
28
- var import_chalk = __toESM(require("chalk")), import_child_process = require("child_process");
28
+ var import_chalk = __toESM(require("chalk")), import_node_child_process = require("node:child_process");
29
29
  function updateTemplate(templateUrl, ignoredPatterns = []) {
30
30
  const remoteName = `${templateUrl.split("/").pop()?.split(".")[0] || "template"}-template`, addRemoteCommand = `git remote add ${remoteName} ${templateUrl}`, rmRemoteCommand = `git remote remove ${remoteName}`;
31
31
  try {
32
- (0, import_child_process.execSync)(addRemoteCommand);
32
+ (0, import_node_child_process.execSync)(addRemoteCommand);
33
33
  } catch (error) {
34
34
  if (error instanceof Error && error.toString().includes("already exists"))
35
- (0, import_child_process.execSync)(rmRemoteCommand), (0, import_child_process.execSync)(addRemoteCommand);
35
+ (0, import_node_child_process.execSync)(rmRemoteCommand), (0, import_node_child_process.execSync)(addRemoteCommand);
36
36
  else
37
37
  throw error;
38
38
  }
39
- (0, import_child_process.execSync)("git fetch --all");
39
+ (0, import_node_child_process.execSync)("git fetch --all");
40
40
  try {
41
- (0, import_child_process.execSync)("git merge takeout-template/main --allow-unrelated-histories");
41
+ (0, import_node_child_process.execSync)("git merge takeout-template/main --allow-unrelated-histories");
42
42
  } catch (error) {
43
43
  if (error instanceof Error && error.message.includes("unresolved conflict"))
44
44
  console.info(
@@ -49,7 +49,7 @@ function updateTemplate(templateUrl, ignoredPatterns = []) {
49
49
  else
50
50
  throw error;
51
51
  }
52
- (0, import_child_process.execSync)(`git reset HEAD ${ignoredPatterns.join(" ")}`);
52
+ (0, import_node_child_process.execSync)(`git reset HEAD ${ignoredPatterns.join(" ")}`);
53
53
  }
54
54
  function tamaguiLog(message) {
55
55
  return `${import_chalk.default.green("[Tamagui]")} ${message}`;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "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gB;AAAA,EAC3B,SAAS,OAAO;AACd,QAAI,iBAAiB,SAAS,MAAM,SAAS,EAAE,SAAS,gBAAgB;AACtE,8CAAS,eAAe,OACxB,oCAAS,gBAAgB;AAAA;AAEzB,YAAM;AAAA,EAEV;AACA,0CAAS,iBAAiB;AAC1B,MAAI;AACF,4CAAS,6DAA6D;AAAA,EACxE,SAAS,OAAO;AACd,QAAI,iBAAiB,SAAS,MAAM,QAAQ,SAAS,qBAAqB;AACxE,cAAQ;AAAA,QACN;AAAA,UACE;AAAA,QACF;AAAA,MACF;AAAA;AAEA,YAAM;AAAA,EAEV;AACA,0CAAS,kBAAkB,gBAAgB,KAAK,GAAG,CAAC,EAAE;AACxD;AAEA,SAAS,WAAW,SAAS;AAC3B,SAAO,GAAG,aAAAA,QAAM,MAAM,WAAW,CAAC,IAAI,OAAO;AAC/C;",
5
5
  "names": ["chalk"]
6
6
  }
@@ -26,27 +26,27 @@ __export(update_template_exports, {
26
26
  updateTemplate: () => updateTemplate
27
27
  });
28
28
  module.exports = __toCommonJS(update_template_exports);
29
- var import_chalk = __toESM(require("chalk")), import_child_process = require("child_process");
29
+ var import_chalk = __toESM(require("chalk")), import_node_child_process = require("node:child_process");
30
30
  function updateTemplate(templateUrl) {
31
31
  var ignoredPatterns = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], _templateUrl_split_pop, templateName = ((_templateUrl_split_pop = templateUrl.split("/").pop()) === null || _templateUrl_split_pop === void 0 ? void 0 : _templateUrl_split_pop.split(".")[0]) || "template", remoteName = `${templateName}-template`, addRemoteCommand = `git remote add ${remoteName} ${templateUrl}`, rmRemoteCommand = `git remote remove ${remoteName}`;
32
32
  try {
33
- (0, import_child_process.execSync)(addRemoteCommand);
33
+ (0, import_node_child_process.execSync)(addRemoteCommand);
34
34
  } catch (error) {
35
35
  if (error instanceof Error && error.toString().includes("already exists"))
36
- (0, import_child_process.execSync)(rmRemoteCommand), (0, import_child_process.execSync)(addRemoteCommand);
36
+ (0, import_node_child_process.execSync)(rmRemoteCommand), (0, import_node_child_process.execSync)(addRemoteCommand);
37
37
  else
38
38
  throw error;
39
39
  }
40
- (0, import_child_process.execSync)("git fetch --all");
40
+ (0, import_node_child_process.execSync)("git fetch --all");
41
41
  try {
42
- (0, import_child_process.execSync)("git merge takeout-template/main --allow-unrelated-histories");
42
+ (0, import_node_child_process.execSync)("git merge takeout-template/main --allow-unrelated-histories");
43
43
  } catch (error) {
44
44
  if (error instanceof Error && error.message.includes("unresolved conflict"))
45
45
  console.info(tamaguiLog("We've merged the latest changes. Please resolve the conflicts and commit the merge."));
46
46
  else
47
47
  throw error;
48
48
  }
49
- (0, import_child_process.execSync)(`git reset HEAD ${ignoredPatterns.join(" ")}`);
49
+ (0, import_node_child_process.execSync)(`git reset HEAD ${ignoredPatterns.join(" ")}`);
50
50
  }
51
51
  function tamaguiLog(message) {
52
52
  return `${import_chalk.default.green("[Tamagui]")} ${message}`;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/update-template.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;mBAAkB,2BAClB,uBAAyB;AAElB,SAASA,eAAeC,aAAmB;MAAEC,kBAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAA4B,CAAA,GACzDD,wBAAfE,iBAAeF,yBAAAA,YAAYG,MAAM,GAAA,EAAKC,IAAG,OAAA,QAA1BJ,2BAAAA,SAAAA,SAAAA,uBAA8BG,MAAM,GAAA,EAAK,CAAA,MAAM,YAC9DE,aAAa,GAAGH,YAAAA,aAChBI,mBAAmB,kBAAkBD,UAAAA,IAAcL,WAAAA,IACnDO,kBAAkB,qBAAqBF,UAAAA;AAC7C,MAAI;AACFG,uCAASF,gBAAAA;EACX,SAASG,OAAO;AACd,QAAIA,iBAAiBC,SAASD,MAAME,SAAQ,EAAGC,SAAS,gBAAA;AACtDJ,yCAASD,eAAAA,O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BAAgBgB,KAAK,GAAA,CAAA,EAAM;AACxD;AAEA,SAASD,WAAWH,SAAO;AACzB,SAAO,GAAGK,aAAAA,QAAMC,MAAM,WAAA,CAAA,IAAgBN,OAAAA;AACxC;",
5
5
  "names": ["updateTemplate", "templateUrl", "ignoredPatterns", "templateName", "split", "pop", "remoteName", "addRemoteCommand", "rmRemoteCommand", "execSync", "error", "Error", "toString", "includes", "message", "console", "info", "tamaguiLog", "join", "chalk", "green"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/cli",
3
- "version": "1.130.5",
3
+ "version": "1.130.7",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "main": "dist/index.cjs",
@@ -23,11 +23,11 @@
23
23
  "clean:build": "tamagui-build clean:build"
24
24
  },
25
25
  "dependencies": {
26
- "@tamagui/create-theme": "1.130.5",
27
- "@tamagui/generate-themes": "1.130.5",
28
- "@tamagui/static": "1.130.5",
29
- "@tamagui/types": "1.130.5",
30
- "@tamagui/vite-plugin": "1.130.5",
26
+ "@tamagui/create-theme": "1.130.7",
27
+ "@tamagui/generate-themes": "1.130.7",
28
+ "@tamagui/static": "1.130.7",
29
+ "@tamagui/types": "1.130.7",
30
+ "@tamagui/vite-plugin": "1.130.7",
31
31
  "arg": "^5.0.2",
32
32
  "chalk": "^4.1.2",
33
33
  "change-case": "^4.1.2",
@@ -47,7 +47,7 @@
47
47
  "url": "^0.11.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@tamagui/build": "1.130.5",
50
+ "@tamagui/build": "1.130.7",
51
51
  "@types/chokidar": "^2.1.3",
52
52
  "@types/marked": "^5.0.0"
53
53
  }
@@ -1,5 +1,5 @@
1
1
  import chalk from 'chalk'
2
- import { execSync } from 'child_process'
2
+ import { execSync } from 'node:child_process'
3
3
 
4
4
  export function updateTemplate(templateUrl: string, ignoredPatterns: string[] = []) {
5
5
  const templateName = templateUrl.split('/').pop()?.split('.')[0] || 'template'