@zeroxyz/cli 0.0.32 → 0.0.33

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 +10 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command as Command12 } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@zeroxyz/cli",
9
- version: "0.0.32",
9
+ version: "0.0.33",
10
10
  type: "module",
11
11
  bin: {
12
12
  zero: "dist/index.js",
@@ -1833,7 +1833,6 @@ var getCommand = (appContext) => new Command4("get").description(
1833
1833
  import { createHash as createHash3 } from "crypto";
1834
1834
  import {
1835
1835
  chmodSync as chmodSync2,
1836
- cpSync,
1837
1836
  existsSync as existsSync2,
1838
1837
  mkdirSync as mkdirSync3,
1839
1838
  readdirSync,
@@ -2028,6 +2027,13 @@ var collectAllFiles = (dir) => {
2028
2027
  }
2029
2028
  return files;
2030
2029
  };
2030
+ var copyFile = (src, dest) => {
2031
+ writeFileSync3(dest, readFileSync4(src));
2032
+ try {
2033
+ chmodSync2(dest, statSync(src).mode);
2034
+ } catch {
2035
+ }
2036
+ };
2031
2037
  var copyDirRecursive = (src, dest) => {
2032
2038
  mkdirSync3(dest, { recursive: true });
2033
2039
  for (const entry of readdirSync(src, { withFileTypes: true })) {
@@ -2036,13 +2042,7 @@ var copyDirRecursive = (src, dest) => {
2036
2042
  if (entry.isDirectory()) {
2037
2043
  copyDirRecursive(srcPath, destPath);
2038
2044
  } else {
2039
- const data = readFileSync4(srcPath);
2040
- writeFileSync3(destPath, data);
2041
- try {
2042
- const mode = statSync(srcPath).mode;
2043
- chmodSync2(destPath, mode);
2044
- } catch {
2045
- }
2045
+ copyFile(srcPath, destPath);
2046
2046
  }
2047
2047
  }
2048
2048
  };
@@ -2063,7 +2063,7 @@ var installHook = (home, verbose = false) => {
2063
2063
  for (const hookFile of hookFiles) {
2064
2064
  const hookSource = join2(hooksSourceDir, hookFile);
2065
2065
  const hookDest = join2(zeroHooksDir, hookFile);
2066
- cpSync(hookSource, hookDest);
2066
+ copyFile(hookSource, hookDest);
2067
2067
  chmodSync2(hookDest, 493);
2068
2068
  if (!verifyFileCopy(hookSource, hookDest)) {
2069
2069
  throw new Error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeroxyz/cli",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "zero": "dist/index.js",