@sanity/cli 4.16.0-next.45 → 4.16.0-next.47

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.
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var process = require("node:process"), fs = require("node:fs/promises"), node_url = require("node:url"), path = require("node:path");
3
+ function _interopDefaultCompat(e) {
4
+ return e && typeof e == "object" && "default" in e ? e : { default: e };
5
+ }
6
+ var process__default = /* @__PURE__ */ _interopDefaultCompat(process), fs__default = /* @__PURE__ */ _interopDefaultCompat(fs), path__default = /* @__PURE__ */ _interopDefaultCompat(path);
7
+ const toPath = (urlOrPath) => urlOrPath instanceof URL ? node_url.fileURLToPath(urlOrPath) : urlOrPath;
8
+ async function findUp(name, {
9
+ cwd = process__default.default.cwd(),
10
+ type = "file",
11
+ stopAt
12
+ } = {}) {
13
+ let directory = path__default.default.resolve(toPath(cwd) ?? "");
14
+ const { root } = path__default.default.parse(directory);
15
+ stopAt = path__default.default.resolve(directory, toPath(stopAt ?? root));
16
+ const isAbsoluteName = path__default.default.isAbsolute(name);
17
+ for (; directory; ) {
18
+ const filePath = isAbsoluteName ? name : path__default.default.join(directory, name);
19
+ try {
20
+ const stats = await fs__default.default.stat(filePath);
21
+ if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory())
22
+ return filePath;
23
+ } catch {
24
+ }
25
+ if (directory === stopAt || directory === root)
26
+ break;
27
+ directory = path__default.default.dirname(directory);
28
+ }
29
+ }
30
+ exports.findUp = findUp;
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js"],"sourcesContent":["import process from 'node:process';\nimport fsPromises from 'node:fs/promises';\nimport {fileURLToPath} from 'node:url';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function findUp(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt ?? root));\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\t\ttry {\n\t\t\tconst stats = await fsPromises.stat(filePath); // eslint-disable-line no-await-in-loop\n\t\t\tif ((type === 'file' && stats.isFile()) || (type === 'directory' && stats.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n\nexport function findUpSync(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt) ?? root);\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\n\t\ttry {\n\t\t\tconst stats = fs.statSync(filePath, {throwIfNoEntry: false});\n\t\t\tif ((type === 'file' && stats?.isFile()) || (type === 'directory' && stats?.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n"],"names":["fileURLToPath","process","path","fsPromises"],"mappings":";;;;;;AAMA,MAAM,SAAS,eAAa,qBAAqB,MAAMA,SAAAA,cAAc,SAAS,IAAI;AAE3E,eAAe,OAAO,MAAM;AAAA,EAClC,MAAMC,iBAAAA,QAAQ,IAAG;AAAA,EACjB,OAAO;AAAA,EACP;AACD,IAAI,IAAI;AACP,MAAI,YAAYC,cAAAA,QAAK,QAAQ,OAAO,GAAG,KAAK,EAAE;AAC9C,QAAM,EAAC,KAAI,IAAIA,sBAAK,MAAM,SAAS;AACnC,WAASA,cAAAA,QAAK,QAAQ,WAAW,OAAO,UAAU,IAAI,CAAC;AACvD,QAAM,iBAAiBA,cAAAA,QAAK,WAAW,IAAI;AAE3C,SAAO,aAAW;AACjB,UAAM,WAAW,iBAAiB,OAAOA,cAAAA,QAAK,KAAK,WAAW,IAAI;AAClE,QAAI;AACH,YAAM,QAAQ,MAAMC,YAAAA,QAAW,KAAK,QAAQ;AAC5C,UAAK,SAAS,UAAU,MAAM,OAAM,KAAQ,SAAS,eAAe,MAAM,YAAW;AACpF,eAAO;AAAA,IAET,QAAQ;AAAA,IAAC;AAET,QAAI,cAAc,UAAU,cAAc;AACzC;AAGD,gBAAYD,cAAAA,QAAK,QAAQ,SAAS;AAAA,EACnC;AACD;;","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "4.16.0-next.45+0cb63b4644",
3
+ "version": "4.16.0-next.47+06e8a89381",
4
4
  "description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
5
5
  "keywords": [
6
6
  "sanity",
@@ -61,7 +61,7 @@
61
61
  "pkg-dir": "^5.0.0",
62
62
  "prettier": "^3.6.2",
63
63
  "semver": "^7.7.2",
64
- "@sanity/codegen": "4.16.0-next.45+0cb63b4644"
64
+ "@sanity/codegen": "4.16.0-next.47+06e8a89381"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@rexxars/gitconfiglocal": "^3.0.1",
@@ -104,7 +104,7 @@
104
104
  "ora": "^8.2.0",
105
105
  "p-map": "^4.0.0",
106
106
  "p-timeout": "^4.1.0",
107
- "preferred-pm": "^3.1.4",
107
+ "preferred-pm": "^4.1.1",
108
108
  "promise-props-recursive": "^2.0.2",
109
109
  "recast": "^0.23.11",
110
110
  "resolve-from": "^5.0.0",
@@ -116,11 +116,11 @@
116
116
  "vitest": "^3.2.4",
117
117
  "which": "^2.0.2",
118
118
  "xdg-basedir": "^4.0.0",
119
- "@repo/eslint-config": "4.16.0-next.45+0cb63b4644",
120
- "@repo/package.config": "4.16.0-next.45+0cb63b4644",
121
- "@repo/test-config": "4.16.0-next.45+0cb63b4644",
122
- "@repo/tsconfig": "4.16.0-next.45+0cb63b4644",
123
- "@sanity/types": "4.16.0-next.45+0cb63b4644"
119
+ "@repo/eslint-config": "4.16.0-next.47+06e8a89381",
120
+ "@repo/package.config": "4.16.0-next.47+06e8a89381",
121
+ "@repo/test-config": "4.16.0-next.47+06e8a89381",
122
+ "@repo/tsconfig": "4.16.0-next.47+06e8a89381",
123
+ "@sanity/types": "4.16.0-next.47+06e8a89381"
124
124
  },
125
125
  "peerDependencies": {
126
126
  "babel-plugin-react-compiler": "*"