@sanity/pkg-utils 7.4.0-canary.0 → 7.4.0-canary.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.
- package/dist/_chunks-cjs/index.cjs +5 -3
- package/dist/_chunks-cjs/index.cjs.map +1 -1
- package/dist/_chunks-es/consoleSpy.js +3 -1
- package/dist/_chunks-es/consoleSpy.js.map +1 -1
- package/dist/_chunks-es/index.js +3 -1
- package/dist/_chunks-es/index.js.map +1 -1
- package/dist/cli.js +1 -1
- package/package.json +2 -2
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
18
18
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
19
19
|
mod
|
|
20
20
|
));
|
|
21
|
-
var path = require("node:path"), rimraf = require("rimraf"), node = require("esbuild-register/dist/node"), pkgUp = require("pkg-up"), findConfig = require("find-config"), node_fs = require("node:fs"), chalk = require("chalk"), zod = require("zod"), fs = require("node:fs/promises"), browserslist = require("browserslist"), config$1 = require("@sanity/browserslist-config"), ts = require("typescript"), zodValidationError = require("zod-validation-error"), rxjs = require("rxjs"), apiExtractor = require("@microsoft/api-extractor"), mkdirp = require("mkdirp"), prettier = require("prettier"), tsdocConfig = require("@microsoft/tsdoc-config"), jsoncParser = require("jsonc-parser"), recast = require("recast"), typeScriptParser = require("recast/parsers/typescript.js"), rollup = require("rollup"), rollupPlugin = require("@optimize-lodash/rollup-plugin"), alias = require("@rollup/plugin-alias"), pluginBabel = require("@rollup/plugin-babel"), commonjs = require("@rollup/plugin-commonjs"), json = require("@rollup/plugin-json"), pluginNodeResolve = require("@rollup/plugin-node-resolve"), replace = require("@rollup/plugin-replace"), terser = require("@rollup/plugin-terser"), esbuild = require("rollup-plugin-esbuild"), esbuild$1 = require("esbuild"), treeify = require("treeify"), prettyBytes = require("pretty-bytes"), prompts = require("prompts"), node_child_process = require("node:child_process"), getLatestVersion = require("get-latest-version"), gitUrlParse = require("git-url-parse"), outdent = require("outdent"), operators = require("rxjs/operators"), globby = require("globby"), chokidar = require("chokidar");
|
|
21
|
+
var path = require("node:path"), rimraf = require("rimraf"), node_module = require("node:module"), node = require("esbuild-register/dist/node"), pkgUp = require("pkg-up"), findConfig = require("find-config"), node_fs = require("node:fs"), chalk = require("chalk"), zod = require("zod"), fs = require("node:fs/promises"), browserslist = require("browserslist"), config$1 = require("@sanity/browserslist-config"), ts = require("typescript"), zodValidationError = require("zod-validation-error"), rxjs = require("rxjs"), apiExtractor = require("@microsoft/api-extractor"), mkdirp = require("mkdirp"), prettier = require("prettier"), tsdocConfig = require("@microsoft/tsdoc-config"), jsoncParser = require("jsonc-parser"), recast = require("recast"), typeScriptParser = require("recast/parsers/typescript.js"), rollup = require("rollup"), rollupPlugin = require("@optimize-lodash/rollup-plugin"), alias = require("@rollup/plugin-alias"), pluginBabel = require("@rollup/plugin-babel"), commonjs = require("@rollup/plugin-commonjs"), json = require("@rollup/plugin-json"), pluginNodeResolve = require("@rollup/plugin-node-resolve"), replace = require("@rollup/plugin-replace"), terser = require("@rollup/plugin-terser"), esbuild = require("rollup-plugin-esbuild"), esbuild$1 = require("esbuild"), treeify = require("treeify"), prettyBytes = require("pretty-bytes"), prompts = require("prompts"), node_child_process = require("node:child_process"), getLatestVersion = require("get-latest-version"), gitUrlParse = require("git-url-parse"), outdent = require("outdent"), operators = require("rxjs/operators"), globby = require("globby"), chokidar = require("chokidar"), _documentCurrentScript = typeof document < "u" ? document.currentScript : null;
|
|
22
22
|
function _interopDefaultCompat(e) {
|
|
23
23
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
24
24
|
}
|
|
@@ -61,6 +61,7 @@ function findConfigFile(cwd) {
|
|
|
61
61
|
return configPath;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
+
const require$2 = node_module.createRequire(typeof document > "u" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("_chunks-cjs/index.cjs", document.baseURI).href);
|
|
64
65
|
async function loadConfig(options) {
|
|
65
66
|
const { cwd } = options, pkgPath = await pkgUp__default.default({ cwd });
|
|
66
67
|
if (!pkgPath) return;
|
|
@@ -68,7 +69,7 @@ async function loadConfig(options) {
|
|
|
68
69
|
if (!configFile || !configFile.startsWith(cwd))
|
|
69
70
|
return;
|
|
70
71
|
const esbuildOptions = { extensions: [".js", ".mjs", ".ts"] }, { unregister } = globalThis.__DEV__ ? { unregister: () => {
|
|
71
|
-
} } : node.register(esbuildOptions), mod = require(configFile);
|
|
72
|
+
} } : node.register(esbuildOptions), mod = require$2(configFile);
|
|
72
73
|
return unregister(), mod?.default || mod || void 0;
|
|
73
74
|
}
|
|
74
75
|
function assertLast(a, arr) {
|
|
@@ -794,12 +795,13 @@ function createApiExtractorConfig(options) {
|
|
|
794
795
|
projectFolder
|
|
795
796
|
};
|
|
796
797
|
}
|
|
798
|
+
const require$1 = node_module.createRequire(typeof document > "u" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("_chunks-cjs/index.cjs", document.baseURI).href);
|
|
797
799
|
async function createTSDocConfig(opts) {
|
|
798
800
|
const { customTags } = opts;
|
|
799
801
|
if (customTags.length === 0)
|
|
800
802
|
return;
|
|
801
803
|
const tsDocBaseBuf = await fs.readFile(
|
|
802
|
-
require.resolve("@microsoft/api-extractor/extends/tsdoc-base.json")
|
|
804
|
+
require$1.resolve("@microsoft/api-extractor/extends/tsdoc-base.json")
|
|
803
805
|
), tsDocBaseConfig = jsoncParser.parse(tsDocBaseBuf.toString()), tagDefinitions = (tsDocBaseConfig.tagDefinitions || []).concat(
|
|
804
806
|
customTags.map((t) => ({
|
|
805
807
|
tagName: `@${t.name}`,
|